mirror of
https://github.com/JHUAPL/CodeCut.git
synced 2026-01-09 13:28:06 -05:00
Final minor tweaks for CodeCut 1.1 release
This commit is contained in:
@@ -121,8 +121,7 @@ public class CodeCutGUIPlugin extends Plugin implements DomainObjectListener {
|
||||
final static Cursor NORM_CURSOR = new Cursor(Cursor.DEFAULT_CURSOR);
|
||||
|
||||
private final static String OPTION_NAME_PYTHON_EXEC = "Python Executable";
|
||||
private final static String OPTION_DEFAULT_PYTHON_EXEC = "/projects/venv/bin/python3";
|
||||
//private final static String OPTION_DEFAULT_PYTHON_EXEC = "/usr/local/bin/python3"; // for testing
|
||||
private final static String OPTION_DEFAULT_PYTHON_EXEC = "/usr/bin/python3";
|
||||
private String pythonExec = OPTION_DEFAULT_PYTHON_EXEC;
|
||||
|
||||
private DockingAction openRefsAction;
|
||||
|
||||
@@ -186,8 +186,11 @@ public class CodecutUtils {
|
||||
SymbolType type = symbol.getSymbolType();
|
||||
if (type == SymbolType.FUNCTION) {
|
||||
Namespace ns = ((Function)symbol.getObject()).getParentNamespace();
|
||||
if (!namespaceList.contains(ns)) {
|
||||
namespaceList.add(ns);
|
||||
//make sure it's a "real" namespace with a body - otherwise we can't work with it
|
||||
if ((ns.getBody().getMinAddress() != null) && (ns.getBody().getMaxAddress() != null)) {
|
||||
if (!namespaceList.contains(ns)) {
|
||||
namespaceList.add(ns);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,10 +79,12 @@ class CombineProvider extends ComponentProviderAdapter implements ActionListener
|
||||
private Namespace firstNamespace;
|
||||
private Namespace secondNamespace;
|
||||
private Namespace combinedNamespace;
|
||||
private SymbolProvider symProvider;
|
||||
|
||||
CombineProvider(CodeCutGUIPlugin plugin) {
|
||||
super(plugin.getTool(), "Combine Namespaces", plugin.getName(), ProgramActionContext.class);
|
||||
this.plugin = plugin;
|
||||
symProvider = plugin.getSymbolProvider();
|
||||
|
||||
setIcon(ICON);
|
||||
addToToolbar();
|
||||
@@ -241,12 +243,12 @@ class CombineProvider extends ComponentProviderAdapter implements ActionListener
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
this.closeComponent();
|
||||
|
||||
symProvider.reload();
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -73,10 +73,13 @@ class CreateProvider extends ComponentProviderAdapter implements ActionListener
|
||||
|
||||
private Namespace namespace;
|
||||
private Symbol symbol;
|
||||
private SymbolProvider symProvider;
|
||||
|
||||
CreateProvider(CodeCutGUIPlugin plugin) {
|
||||
super(plugin.getTool(), "Create Namespace", plugin.getName(), ProgramActionContext.class);
|
||||
this.plugin = plugin;
|
||||
|
||||
symProvider = plugin.getSymbolProvider();
|
||||
|
||||
setIcon(ICON);
|
||||
addToToolbar();
|
||||
@@ -141,9 +144,10 @@ class CreateProvider extends ComponentProviderAdapter implements ActionListener
|
||||
Msg.info(this, "Exception when attempting to change namespace of symbol "
|
||||
+ this.symbol.getName() + " to " + nS.getName());
|
||||
}
|
||||
|
||||
|
||||
this.closeComponent();
|
||||
|
||||
symProvider.reload();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -123,7 +123,12 @@ class NamespacePanel extends JPanel {
|
||||
|
||||
Namespace ns = it.next();
|
||||
AddressSetView ar = ns.getBody();
|
||||
Msg.info(this, "Add: " + ns.getName() + " " + ar.getMinAddress().toString() + " " + ar.getMaxAddress().toString());
|
||||
if ((ar.getMinAddress() != null) && (ar.getMaxAddress() != null)) {
|
||||
Msg.info(this, "Add: " + ns.getName() + " " + ar.getMinAddress().toString() + " " + ar.getMaxAddress().toString());
|
||||
}
|
||||
else {
|
||||
Msg.info(this, "Add: " + ns.getName() + " null min or max??");
|
||||
}
|
||||
SymbolIterator symIter = this.program.getSymbolTable().getSymbols(ns);
|
||||
SymbolTableModel model = new SymbolTableModel(this.program, this.symProvider, this.tool, symIter, ns);
|
||||
|
||||
|
||||
@@ -73,10 +73,12 @@ class RenameProvider extends ComponentProviderAdapter implements ActionListener
|
||||
private JButton button;
|
||||
|
||||
private Namespace namespace;
|
||||
private SymbolProvider symProvider;
|
||||
|
||||
RenameProvider(CodeCutGUIPlugin plugin) {
|
||||
super(plugin.getTool(), "Rename Namespace", plugin.getName(), ProgramActionContext.class);
|
||||
this.plugin = plugin;
|
||||
symProvider = plugin.getSymbolProvider();
|
||||
|
||||
setIcon(ICON);
|
||||
addToToolbar();
|
||||
@@ -172,6 +174,7 @@ class RenameProvider extends ComponentProviderAdapter implements ActionListener
|
||||
this.closeComponent();
|
||||
}
|
||||
}
|
||||
symProvider.reload();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META name="generator" content=
|
||||
"HTML Tidy for Java (vers. 2009-12-01), see jtidy.sourceforge.net">
|
||||
<META http-equiv="Content-Language" content="en-us">
|
||||
<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
|
||||
<META name="GENERATOR" content="Microsoft FrontPage 4.0">
|
||||
<META name="ProgId" content="FrontPage.Editor.Document">
|
||||
|
||||
<TITLE>Skeleton Help File for a Module</TITLE>
|
||||
<LINK rel="stylesheet" type="text/css" href="../../shared/Frontpage.css">
|
||||
</HEAD>
|
||||
|
||||
<BODY>
|
||||
<H1><a name="HelpAnchor"></a>Skeleton Help File for a Module</H1>
|
||||
|
||||
<P>This is a simple skeleton help topic. For a better description of what should and should not
|
||||
go in here, see the "sample" Ghidra extension in the Extensions/Ghidra directory, or see your
|
||||
favorite help topic. In general, language modules do not have their own help topics.</P>
|
||||
</BODY>
|
||||
</HTML>
|
||||
@@ -56,7 +56,7 @@ public class DeepCutAnalyzer extends AbstractAnalyzer {
|
||||
|
||||
private final static String OPTION_NAME_PYTHON_EXEC = "Python Executable";
|
||||
private final static String OPTION_DESCRIPTION_PYTHON_EXEC = "";
|
||||
private final static String OPTION_DEFAULT_PYTHON_EXEC = "/projects/venv/bin/python3";
|
||||
private final static String OPTION_DEFAULT_PYTHON_EXEC = "/usr/bin/python3";
|
||||
private String pythonExec = OPTION_DEFAULT_PYTHON_EXEC;
|
||||
|
||||
public DeepCutAnalyzer() {
|
||||
|
||||
@@ -57,7 +57,7 @@ public class DeepCutPython {
|
||||
|
||||
process = runtime.exec(exec);
|
||||
|
||||
// Yes this is confusing. stdin is a Java OutputStream, stdin is an InputStream
|
||||
// Yes this is confusing. stdin is a Java OutputStream, stdout is an InputStream
|
||||
stdin = process.getOutputStream();
|
||||
stdout = process.getInputStream();
|
||||
stderr = process.getErrorStream();
|
||||
|
||||
Reference in New Issue
Block a user