GP-1338: Bumping GhidraDev to 2.1.5

This commit is contained in:
Ryan Kurtz 2021-09-29 09:42:15 -04:00
parent 2a55b5af29
commit f7af296734
4 changed files with 15 additions and 16 deletions

View File

@ -2,7 +2,7 @@
<feature
id="ghidra.ghidradev"
label="GhidraDev"
version="2.1.4.qualifier"
version="2.1.5.qualifier"
provider-name="Ghidra">
<description>

View File

@ -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.4 and is subject to
<p>The information provided in this document is effective as of GhidraDev 2.1.5 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.5</b>:</u> Eclipse Python breakpoints now work when Eclipse installs PyDev in .p2
bundle pool directory.</p>
<p><u><b>2.1.4</b>:</u> Fixed exception that occurred when performing a "Link Ghidra" on projects
that use a Gradle classpath container.</p>
<p><u><b>2.1.3</b>:</u> Fixed a bug that prevented Ghidra projects from recognizing extensions

View File

@ -3,7 +3,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: GhidraDev
Bundle-SymbolicName: ghidra.ghidradev;singleton:=true
Bundle-Version: 2.1.4.qualifier
Bundle-Version: 2.1.5.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",

View File

@ -16,25 +16,17 @@
package ghidradev.ghidraprojectcreator.utils;
import java.io.File;
import java.io.IOException;
import java.net.URI;
import java.net.URL;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
import java.util.stream.Stream;
import javax.naming.OperationNotSupportedException;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.*;
import org.eclipse.jdt.core.IClasspathEntry;
import org.eclipse.jdt.core.IJavaProject;
import org.osgi.framework.Bundle;
@ -163,14 +155,19 @@ public class PyDevUtils {
* @throws CoreException if there was a problem searching for the PyDev source directory.
*/
public static File getPyDevSrcDir() throws CoreException {
Bundle[] bundles = FrameworkUtil.getBundle(PyDevUtilsInternal.class).getBundleContext().getBundles();
Bundle[] bundles =
FrameworkUtil.getBundle(PyDevUtilsInternal.class).getBundleContext().getBundles();
Bundle pydevCoreBundle = Stream.of(bundles).filter(bundle -> bundle.getSymbolicName().contains("org.python.pydev.core")).findFirst().orElse(null);
Bundle pydevCoreBundle = Stream.of(bundles)
.filter(bundle -> bundle.getSymbolicName().contains("org.python.pydev.core"))
.findFirst()
.orElse(null);
if(pydevCoreBundle != null) {
if (pydevCoreBundle != null) {
try {
URL pydevDirUrl = FileLocator.toFileURL(pydevCoreBundle.getEntry("/"));
URI pydevDirUri = new URI(pydevDirUrl.getProtocol(), pydevDirUrl.getPath(), null).normalize();
URI pydevDirUri =
new URI(pydevDirUrl.getProtocol(), pydevDirUrl.getPath(), null).normalize();
Path pysrcDir = Paths.get(pydevDirUri).resolve("pysrc");
if (Files.exists(pysrcDir)) {
return pysrcDir.toFile();