Skip to content

Commit

Permalink
(WIP)
Browse files Browse the repository at this point in the history
  • Loading branch information
Godin committed Oct 15, 2023
1 parent 5dc1ef4 commit f128da9
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.eclemma.internal.core.EclEmmaCorePlugin;
import org.eclipse.jdt.core.IClasspathEntry;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IJavaProject;
Expand All @@ -47,8 +48,6 @@
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.launching.JavaRuntime;

import org.eclipse.eclemma.internal.core.EclEmmaCorePlugin;

/**
* Utility class to setup Java projects programatically.
*/
Expand Down Expand Up @@ -129,10 +128,15 @@ public IPackageFragmentRoot createJAR(String jarsrc, String jarpath,
IFile jarfile = project.getFile(jarpath);
InputStream source = openTestResource(new Path(jarsrc));
jarfile.create(source, true, null);
// IPackageFragmentRoot packageRoot = javaProject
// .getPackageFragmentRoot(jarfile);
addClassPathEntry(JavaCore.newLibraryEntry(jarfile.getFullPath(),
// new Path(jarsrc),
// packageRoot.getPath(),
sourceAttachmentPath, sourceAttachmentRootPath));
// packageRoot = javaProject.getPackageFragmentRoot(jarfile);
IPackageFragmentRoot packageRoot = javaProject
.getPackageFragmentRoot(jarfile);
addClassPathEntry(JavaCore.newLibraryEntry(packageRoot.getPath(),
sourceAttachmentPath, sourceAttachmentRootPath));
return packageRoot;
}

Expand Down

0 comments on commit f128da9

Please sign in to comment.