mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 18:29:37 +02:00
GP-873: Fixed a bug that prevented GhidraDev projects from recognizing
extensions installed in the user's home Extension directory
This commit is contained in:
parent
1e39c2ac82
commit
a503ded1fc
5 changed files with 261 additions and 11 deletions
|
@ -83,13 +83,20 @@ public class SystemUtilities {
|
|||
Class<?> myClass = SystemUtilities.class;
|
||||
ClassLoader loader = myClass.getClassLoader();
|
||||
if (loader == null) {
|
||||
// Loaded with the bootstrap class loader...definitely dev mode.
|
||||
// The Eclipse GhidraDevPlugin does this when it's running from dev mode.
|
||||
return true;
|
||||
// Can happen when called from the Eclipse GhidraDev plugin
|
||||
return false;
|
||||
}
|
||||
String name = myClass.getName().replace('.', '/') + ".class";
|
||||
URL url = loader.getResource(name);
|
||||
return !"jar".equals(url.getProtocol());
|
||||
String protocol = loader.getResource(name).getProtocol();
|
||||
switch(protocol) {
|
||||
case "file": // Source repository mode (class files)
|
||||
return true;
|
||||
case "jar": // Release mode (jar files)
|
||||
case "bundleresource": // Eclipse GhidraDev mode
|
||||
return false;
|
||||
default: // Unexpected protocol...assume a development mode
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<feature
|
||||
id="ghidra.ghidradev"
|
||||
label="GhidraDev"
|
||||
version="2.1.2.qualifier"
|
||||
version="2.1.3.qualifier"
|
||||
provider-name="Ghidra">
|
||||
|
||||
<description>
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -19,7 +19,7 @@
|
|||
<h1>GhidraDev README</h1>
|
||||
<p>GhidraDev provides support for developing and debugging Ghidra scripts and modules in Eclipse.
|
||||
</p>
|
||||
<p>The information provided in this document is effective as of GhidraDev 2.1.1 and is subject to
|
||||
<p>The information provided in this document is effective as of GhidraDev 2.1.3 and is subject to
|
||||
change with future releases.</p>
|
||||
|
||||
<ul>
|
||||
|
@ -53,6 +53,8 @@ change with future releases.</p>
|
|||
</ul>
|
||||
|
||||
<h2><a name="ChangeHistory"></a>Change History</h2>
|
||||
<p><u><b>2.1.3</b>:</u> Fixed a bug that prevented Ghidra projects from recognizing extensions
|
||||
installed in the user's <i>~/.ghidra/.ghidra_<version>/Extensions</i> directory.</p>
|
||||
<p><u><b>2.1.2</b>:</u> Fixed exception that occurred when creating a new Ghidra scripting project
|
||||
if a <i>~/ghidra_scripts</i> directory does not exist.</p>
|
||||
<p><u><b>2.1.1</b>:</u>
|
||||
|
|
|
@ -3,7 +3,7 @@ Manifest-Version: 1.0
|
|||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: GhidraDev
|
||||
Bundle-SymbolicName: ghidra.ghidradev;singleton:=true
|
||||
Bundle-Version: 2.1.2.qualifier
|
||||
Bundle-Version: 2.1.3.qualifier
|
||||
Bundle-Activator: ghidradev.Activator
|
||||
Require-Bundle: org.eclipse.ant.core;bundle-version="3.5.200",
|
||||
org.eclipse.buildship.core;bundle-version="3.0.0",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue