diff --git a/.gitignore b/.gitignore index 142454039a..6cad771b5c 100644 --- a/.gitignore +++ b/.gitignore @@ -69,3 +69,16 @@ Release */*/*/*/src-gen */*/*/*/model/generated */*/*/*/test-bin + +# Ignore Intellij metadata +**/*.iml +**/.idea +*.iml +.idea + +# Ignore gradle wrapper files +gradle/wrapper +gradlew +gradlew.* + + diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/graph/AddressBasedGraphDisplayListener.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/graph/AddressBasedGraphDisplayListener.java index a016010465..82761e641a 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/graph/AddressBasedGraphDisplayListener.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/graph/AddressBasedGraphDisplayListener.java @@ -19,7 +19,10 @@ import java.util.List; import java.util.Objects; import java.util.concurrent.atomic.AtomicInteger; +import ghidra.app.cmd.label.AddLabelCmd; +import ghidra.app.cmd.label.RenameLabelCmd; import ghidra.app.events.*; +import ghidra.framework.cmd.Command; import ghidra.framework.model.*; import ghidra.framework.plugintool.PluginEvent; import ghidra.framework.plugintool.PluginTool; @@ -161,6 +164,21 @@ public abstract class AddressBasedGraphDisplayListener return p == program; } + @Override + public boolean updateVertexName(String vertexId, String oldName, String newName) { + Address address = getAddressForVertexId(vertexId); + Symbol symbol = program.getSymbolTable().getPrimarySymbol(address); + + Command command; + if (symbol != null) { + command = new RenameLabelCmd(address, oldName, newName, SourceType.USER_DEFINED); + } + else { + command = new AddLabelCmd(address, newName, SourceType.USER_DEFINED); + } + return tool.execute(command, program); + } + @Override public void domainObjectChanged(DomainObjectChangedEvent ev) { if (!(ev.containsEvent(ChangeManager.DOCR_SYMBOL_ADDED) || diff --git a/Ghidra/Features/GraphServices/Module.manifest b/Ghidra/Features/GraphServices/Module.manifest index 2601f0c525..d9640d0931 100644 --- a/Ghidra/Features/GraphServices/Module.manifest +++ b/Ghidra/Features/GraphServices/Module.manifest @@ -1,7 +1,9 @@ EXCLUDE FROM GHIDRA JAR: true -MODULE FILE LICENSE: lib/jungrapht-visualization-1.0-RC8.jar BSD -MODULE FILE LICENSE: lib/jgrapht-core-1.4.0.jar LGPL 2.1 -MODULE FILE LICENSE: lib/jgrapht-io-1.4.0.jar LGPL 2.1 +MODULE FILE LICENSE: lib/jungrapht-visualization-1.0-SNAPSHOT.jar BSD +MODULE FILE LICENSE: lib/jgrapht-core-1.5.0.jar LGPL 2.1 +MODULE FILE LICENSE: lib/jgrapht-io-1.5.0.jar LGPL 2.1 MODULE FILE LICENSE: lib/jheaps-0.11.jar Apache License 2.0 +MODULE FILE LICENSE: lib/log4j-slf4j-impl-2.12.1.jar Apache License 2.0 MODULE FILE LICENSE: lib/slf4j-api-1.7.25.jar MIT +MODULE FILE LICENSE: lib/slf4j-nop-1.7.25.jar MIT diff --git a/Ghidra/Features/GraphServices/build.gradle b/Ghidra/Features/GraphServices/build.gradle index 55ce5ae4f0..34d2ed640c 100644 --- a/Ghidra/Features/GraphServices/build.gradle +++ b/Ghidra/Features/GraphServices/build.gradle @@ -11,13 +11,17 @@ eclipse.project.name = 'Features Graph Services' dependencies { compile project(":Base") - compile "com.github.tomnelson:jungrapht-visualization:1.0-RC8" - compile "org.jgrapht:jgrapht-core:1.4.0" + compile "com.github.tomnelson:jungrapht-visualization:1.0-RC9" + compile "com.github.tomnelson:jungrapht-layout:1.0-RC9" + compile "org.jgrapht:jgrapht-core:1.5.0" // not using jgrapht-io code that depends on antlr, so exclude antlr - compile ("org.jgrapht:jgrapht-io:1.4.0") { exclude group: "org.antlr", module: "antlr4-runtime" } + compile ("org.jgrapht:jgrapht-io:1.5.0") { exclude group: "org.antlr", module: "antlr4-runtime" } runtime "org.slf4j:slf4j-api:1.7.25" + // use this if you want no slf4j log messages runtime "org.slf4j:slf4j-nop:1.7.25" + // use this if you want slf4j log messages sent to log4j +// runtime "org.apache.logging.log4j:log4j-slf4j-impl:2.12.1" runtime "org.jheaps:jheaps:0.11" helpPath project(path: ":Base", configuration: 'helpPath') diff --git a/Ghidra/Features/GraphServices/certification.manifest b/Ghidra/Features/GraphServices/certification.manifest index 2942238218..96cfda73b6 100644 --- a/Ghidra/Features/GraphServices/certification.manifest +++ b/Ghidra/Features/GraphServices/certification.manifest @@ -15,6 +15,7 @@ src/main/help/help/topics/GraphServices/GraphDisplay.htm||GHIDRA||||END| src/main/help/help/topics/GraphServices/GraphExport.htm||GHIDRA||||END| src/main/help/help/topics/GraphServices/images/DefaultGraphDisplay.png||GHIDRA||||END| src/main/help/help/topics/GraphServices/images/ExportDialog.png||GHIDRA||||END| +src/main/resources/images/Lasso.png||GHIDRA||||END| src/main/resources/images/magnifier.png||FAMFAMFAM Icons - CC 2.5|||famfamfam silk icon set|END| src/main/resources/images/redspheregraph.png||GHIDRA||||END| src/main/resources/images/sat2.png||GHIDRA||||END| diff --git a/Ghidra/Features/GraphServices/src/main/help/help/topics/GraphServices/GraphDisplay.htm b/Ghidra/Features/GraphServices/src/main/help/help/topics/GraphServices/GraphDisplay.htm index fc902b4cbe..8bc74f3830 100644 --- a/Ghidra/Features/GraphServices/src/main/help/help/topics/GraphServices/GraphDisplay.htm +++ b/Ghidra/Features/GraphServices/src/main/help/help/topics/GraphServices/GraphDisplay.htm @@ -27,6 +27,8 @@