передача смешения при точечной подстановке процедур.v++

This commit is contained in:
2023-11-22 18:36:28 +03:00
parent 97a2429923
commit 14b13eae97
6 changed files with 16 additions and 4 deletions

9
.idea/workspace.xml generated
View File

@@ -6,7 +6,14 @@
</artifacts-to-build> </artifacts-to-build>
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="e42177c3-2328-4b27-8a01-35779b2beb99" name="Default Changelist" comment="" /> <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$/src/ProjectData/SapforData/Functions/FuncCall.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/ProjectData/SapforData/Functions/FuncCall.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/SPF_GetGraphFunctions.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/SPF_GetGraphFunctions.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/SPF_InlineProcedure.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/SPF_InlineProcedure.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/SPF_InlineProcedures.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/SPF_InlineProcedures.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/SapforPass.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/SapforPass.java" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" /> <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />

View File

@@ -8,6 +8,7 @@ import Visual_DVM_2021.Passes.Pass_2021;
public class FuncCall extends FileObjectWithMessages { public class FuncCall extends FileObjectWithMessages {
public String funcName = ""; //не нужны дополнительные поля.имя функции это уже ключ. public String funcName = ""; //не нужны дополнительные поля.имя функции это уже ключ.
public boolean canBeInlined = false; public boolean canBeInlined = false;
public FuncInfo parent = null;
public FuncCall(DBProjectFile father_in, String funcName_in, int line_in) { public FuncCall(DBProjectFile father_in, String funcName_in, int line_in) {
super(father_in, line_in); super(father_in, line_in);
funcName = funcName_in; funcName = funcName_in;
@@ -34,4 +35,7 @@ public class FuncCall extends FileObjectWithMessages {
UI.Info("Для подстановки функций требуется выполнить проход " + Utils.DQuotes(PassCode_2021.SPF_GetGraphFunctions.getDescription())); UI.Info("Для подстановки функций требуется выполнить проход " + Utils.DQuotes(PassCode_2021.SPF_GetGraphFunctions.getDescription()));
} }
} }
public int getInlineOffset(){
return parent.line-line;
}
} }

View File

@@ -62,7 +62,7 @@ public class Visualiser extends Component {
//http://www.seostella.com/ru/article/2012/02/05/formatirovanie-daty-v-java.html //http://www.seostella.com/ru/article/2012/02/05/formatirovanie-daty-v-java.html
@Override @Override
public void GetVersionInfo() { public void GetVersionInfo() {
version = 1033; version = 1034;
String pattern = "MMM dd yyyy HH:mm:ss"; String pattern = "MMM dd yyyy HH:mm:ss";
DateFormat df = new SimpleDateFormat(pattern, Locale.ENGLISH); DateFormat df = new SimpleDateFormat(pattern, Locale.ENGLISH);
date_text = df.format(getClassBuildTime()); date_text = df.format(getClassBuildTime());

View File

@@ -85,6 +85,7 @@ public class SPF_GetGraphFunctions extends SapforAnalysis {
int c_line = Integer.parseInt(splited[idx.Inc()]); int c_line = Integer.parseInt(splited[idx.Inc()]);
//- //-
FuncCall fc = new FuncCall(file, call_name, c_line); FuncCall fc = new FuncCall(file, call_name, c_line);
fc.parent = nf;
nf.calls.add(fc); nf.calls.add(fc);
} }
} }

View File

@@ -16,7 +16,7 @@ public class SPF_InlineProcedure extends SapforFilesModification {
protected boolean canStart(Object... args) throws Exception { protected boolean canStart(Object... args) throws Exception {
if (super.canStart(args) && (call = (args.length > 0) ? (FuncCall) args[0] : null) != null) { if (super.canStart(args) && (call = (args.length > 0) ? (FuncCall) args[0] : null) != null) {
addOpt1 = call.funcName + "|" + Current.getFile().name; addOpt1 = call.funcName + "|" + Current.getFile().name;
addOpt2 = String.valueOf(call.line); addOpt2 = String.valueOf(call.getInlineOffset());
Global.changeSetting(SettingName.PARSE_FOR_INLINE, "1"); Global.changeSetting(SettingName.PARSE_FOR_INLINE, "1");
// Pass_2021.passes.get(PassCode_2021.UpdateSetting).Do(SettingName.PARSE_FOR_INLINE, "1"); // Pass_2021.passes.get(PassCode_2021.UpdateSetting).Do(SettingName.PARSE_FOR_INLINE, "1");
SPF_ParseFilesWithOrder.silent = true; SPF_ParseFilesWithOrder.silent = true;

View File

@@ -31,7 +31,7 @@ public class SPF_InlineProcedures extends SapforTransformation {
Result.add(String.valueOf(selected_children.size())); Result.add(String.valueOf(selected_children.size()));
for (FuncCall fc : selected_children) { for (FuncCall fc : selected_children) {
Result.add(fc.file); Result.add(fc.file);
Result.add(String.valueOf(fc.line)); Result.add(String.valueOf(fc.getInlineOffset()));
} }
} }
} }