Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c3a669d497 | |||
| 9b76409781 | |||
| ed3d133dcd |
5
.idea/workspace.xml
generated
5
.idea/workspace.xml
generated
@@ -7,12 +7,7 @@
|
||||
</component>
|
||||
<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/Constants.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Constants.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/SPF_InsertIncludesPass.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/SPF_InsertIncludesPass.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/Project/db_project_info.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/Project/db_project_info.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/SapforData/Includes/Transformation/IncludeToInsertJson.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/SapforData/Includes/Transformation/IncludeToInsertJson.java" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
|
||||
@@ -6,6 +6,8 @@ import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.Passes.Sapfor.SapforTransformation;
|
||||
import _VisualDVM.ProjectData.SapforData.Includes.Analysis.FileInfo;
|
||||
import _VisualDVM.ProjectData.SapforData.Includes.Analysis.Include;
|
||||
import _VisualDVM.ProjectData.SapforData.Includes.Transformation.IncludeToInsertJson;
|
||||
import _VisualDVM.ProjectData.SapforData.Includes.Transformation.IncludesToInsertJson;
|
||||
|
||||
import java.util.Vector;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -16,34 +18,6 @@ public class SPF_InsertIncludesPass extends SapforTransformation {
|
||||
}
|
||||
@Override
|
||||
protected boolean canStart(Object... args) throws Exception {
|
||||
if (super.canStart(args)) {
|
||||
if (target.numAddicted <= 0) {
|
||||
Log.Writeln_("Не найдено файлов, имеющих зависимости по включению.");
|
||||
return false;
|
||||
}
|
||||
Vector<String> Result = new Vector<>();
|
||||
for (FileInfo fileInfo : target.addictedFiles.values()) {
|
||||
Vector<Include> selected_children = fileInfo.dependencies.stream().filter(Selectable::isSelected).collect(Collectors.toCollection(Vector::new));
|
||||
if (!selected_children.isEmpty()) {
|
||||
Result.add(fileInfo.file);
|
||||
Result.add(String.valueOf(selected_children.size()));
|
||||
for (Include di : selected_children) {
|
||||
Result.add(String.valueOf(di.line));
|
||||
Result.add(di.dependencyFileName);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (Result.isEmpty()) {
|
||||
Log.Writeln_("Не отмечено ни одного заголовка для подстановки");
|
||||
return false;
|
||||
}
|
||||
Options = Utils_.toU(String.join("|", Result));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
if (super.canStart(args)) {
|
||||
if (target.numAddicted <= 0) {
|
||||
Log.Writeln_("Не найдено файлов, имеющих зависимости по включению.");
|
||||
@@ -64,10 +38,11 @@ public class SPF_InsertIncludesPass extends SapforTransformation {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
*/
|
||||
}
|
||||
@Override
|
||||
protected void FocusBeforeStart() {
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().FocusDependencies();
|
||||
}
|
||||
//test 2
|
||||
//test 3
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user