no message

This commit is contained in:
2025-01-16 20:42:55 +03:00
parent 095c0bad9a
commit 72e4fbdf31
4 changed files with 59 additions and 54 deletions

5
.idea/workspace.xml generated
View File

@@ -8,10 +8,9 @@
<component name="ChangeListManager">
<list default="true" id="e42177c3-2328-4b27-8a01-35779b2beb99" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/properties" beforeDir="false" afterPath="$PROJECT_DIR$/properties" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/SapforProfileSetting/UI/SapforProfileSettingsForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/SapforProfileSetting/UI/SapforProfileSettingsForm.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/ApplyProfile.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/ApplyProfile.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/GlobalDatabase.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/GlobalDatabase.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/SapforData/SapforProperties.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/SapforData/SapforProperties.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Visual/Menus/ProjectMenuBar/ProjectSettingsMenu.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Visual/Menus/ProjectMenuBar/ProjectSettingsMenu.java" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />

View File

@@ -111,35 +111,23 @@ public class GlobalDatabase extends VisualiserDatabase {
}
}
//--
public LinkedHashMap<String, String> getSapforSettingsForProfile() {
/*
LinkedHashMap<SettingName, String> res = new LinkedHashMap<>();
for (DBSetting setting : settings.getSettingsByOwner(ComponentType.SapforOptions))
if (setting.Visible)
res.put(setting.Name, setting.Value);
*/
return null;
}
//проверить, есть ли профиль с таким же набором настроек.
public SapforProfile checkProfileForCurrentSettings() {
/*
LinkedHashMap<SettingName, String> current_values = getSapforSettingsForProfile();
LinkedHashMap<String, String> current_values = Global.mainModule.getProject().sapforProperties.toMap();
for (SapforProfile profile : sapforProfiles.Data.values()) {
//--получить все настройки профиля
LinkedHashMap<SettingName, String> profileValues = new LinkedHashMap<>();
LinkedHashMap<String, String> profileValues = new LinkedHashMap<>();
for (SapforProfileSetting setting : sapforProfilesSettings.Data.values())
if (setting.sapforprofile_id == profile.id) profileValues.put(setting.name, setting.value);
//--
if (current_values.equals(profileValues)) return profile;
}
*/
return null;
}
public void insertProfileSettings(SapforProfile profile) throws Exception {
/*
LinkedHashMap<SettingName, String> current_values = getSapforSettingsForProfile();
for (SettingName name : current_values.keySet()) {
LinkedHashMap<String, String> current_values = Global.mainModule.getProject().sapforProperties.toMap();
for (String name : current_values.keySet()) {
//--
SapforProfileSetting sapforProfileSetting = new SapforProfileSetting();
sapforProfileSetting.name = name;
@@ -148,7 +136,6 @@ public class GlobalDatabase extends VisualiserDatabase {
//--
Insert(sapforProfileSetting);
}
*/
}
public void saveCurrentProfile(String name_in) throws Exception {
if (checkProfileForCurrentSettings() == null) {

View File

@@ -12,22 +12,14 @@ import com.google.gson.annotations.Expose;
import javax.swing.*;
import java.io.File;
import java.lang.reflect.Field;
import java.util.LinkedHashMap;
import java.util.Vector;
public class SapforProperties extends Properties {
//побочные настройки визулизатора
@Expose
public boolean Precompilation = true;
@Expose
public boolean SaveModifications = true; // сохранять исходную версию
@Expose
public int GCOVLimit = 10;
@Expose
public String DVMConvertationOptions = " ";
//настройки для компонента SAPFOR
@Expose
public boolean STATIC_SHADOW_ANALYSIS = false;
@Expose
public boolean STATIC_PRIVATE_ANALYSIS = true;
public boolean STATIC_PRIVATE_ANALYSIS = true;//выключено
@Expose
public boolean FREE_FORM = false;
@Expose
@@ -35,7 +27,7 @@ public class SapforProperties extends Properties {
@Expose
public boolean KEEP_SPF_DIRECTIVES = false;
@Expose
public boolean PARALLELIZE_FREE_LOOPS = false;
public boolean PARALLELIZE_FREE_LOOPS = false; //выключено
@Expose
public int MAX_SHADOW_WIDTH = 50;
@Expose
@@ -57,7 +49,16 @@ public class SapforProperties extends Properties {
@Expose
public boolean KEEP_SPF_DIRECTIVES_AMONG_TRANSFORMATIONS = false;
@Expose
public boolean PARSE_FOR_INLINE = false;
public boolean PARSE_FOR_INLINE = false; //не видимая
//побочные настройки визулизатора
@Expose
public boolean Precompilation = true;
@Expose
public boolean SaveModifications = true; // сохранять исходную версию
@Expose
public int GCOVLimit = 10;
@Expose
public String DVMConvertationOptions = " ";
public String pack() {
Vector<String> res = new Vector_<String>(
STATIC_SHADOW_ANALYSIS ? "1" : "0",
@@ -171,8 +172,7 @@ public class SapforProperties extends Properties {
for (Field field : this.getClass().getFields()) {
try {
res.add(getFieldDescription(field.getName()) + "=" + field.get(this));
}
catch (Exception ex){
} catch (Exception ex) {
ex.printStackTrace();
}
}
@@ -186,8 +186,7 @@ public class SapforProperties extends Properties {
Field field = null;
try {
field = getClass().getField(setting.name);
}
catch (Exception ex){
} catch (Exception ex) {
ex.printStackTrace();
}
if (field != null) {
@@ -220,8 +219,7 @@ public class SapforProperties extends Properties {
Mark(fieldName, getMenuItem(fieldName));
}
}
}
catch (Exception ex) {
} catch (Exception ex) {
ex.printStackTrace();
}
}
@@ -233,8 +231,7 @@ public class SapforProperties extends Properties {
Field field = null;
try {
field = getClass().getField(setting.name);
}
catch (Exception ex){
} catch (Exception ex) {
ex.printStackTrace();
}
if (field != null) {
@@ -267,9 +264,32 @@ public class SapforProperties extends Properties {
Mark(fieldName, getMenuItem(fieldName));
}
}
}
catch (Exception ex) {
} catch (Exception ex) {
ex.printStackTrace();
}
}
public LinkedHashMap<String, String> toMap() {
LinkedHashMap<String, String> res = new LinkedHashMap<>();
Vector<String> forbidden = new Vector_<String>(
// "Precompilation",
// "SaveModifications",
// "GCOVLimit",
// "DVMConvertationOptions",
"PARSE_FOR_INLINE",
"STATIC_PRIVATE_ANALYSIS",
"PARALLELIZE_FREE_LOOPS"
);
try {
for (Field field : getClass().getFields()) {
if (!forbidden.contains(field.getName())) {
Object value = field.get(this);
String value_ = (value instanceof Boolean) ? ((boolean) value ? "1" : "0") : value.toString();
res.put(field.getName(), value_);
}
}
} catch (Exception ex) {
ex.printStackTrace();
}
return res;
}
}

View File

@@ -36,7 +36,6 @@ public class ProjectSettingsMenu extends VisualiserMenu {
add(new PropertiesSubmenu("Анализ", null,
Global.mainModule.getProject().sapforProperties,
"Precompilation",
"STATIC_SHADOW_ANALYSIS",
"KEEP_DVM_DIRECTIVES",
"IGNORE_IO_SAPFOR",
"MPI_PROGRAM",