Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIgor Fedorenko2011-05-05 09:28:28 -0400
committerIgor Fedorenko2011-05-05 09:28:28 -0400
commita1fb4d88391ce6cbc535e979d70716cab5ebe6c5 (patch)
treedc2273cf106978d3af90254d7fe777c35919acdf
parent5f01ad82923e2fa4d28b792f13fb5830962aa5a5 (diff)
downloadm2e-core-a1fb4d88391ce6cbc535e979d70716cab5ebe6c5.tar.gz
m2e-core-a1fb4d88391ce6cbc535e979d70716cab5ebe6c5.tar.xz
m2e-core-a1fb4d88391ce6cbc535e979d70716cab5ebe6c5.zip
Polishing m2e.jdt API
Added missing IClasspathEntryDescriptor getter/setter methods Relaxed internal AbstractJavaProjectConfigurator method visibility Signed-off-by: Igor Fedorenko <igor@ifedorenko.com>
-rw-r--r--org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/IClasspathEntryDescriptor.java18
-rw-r--r--org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/AbstractJavaProjectConfigurator.java4
-rw-r--r--org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/ClasspathEntryDescriptor.java28
3 files changed, 48 insertions, 2 deletions
diff --git a/org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/IClasspathEntryDescriptor.java b/org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/IClasspathEntryDescriptor.java
index 47cf3343..51097a4e 100644
--- a/org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/IClasspathEntryDescriptor.java
+++ b/org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/IClasspathEntryDescriptor.java
@@ -11,6 +11,9 @@
package org.eclipse.m2e.jdt;
+import java.util.List;
+import java.util.Map;
+
import org.eclipse.core.runtime.IPath;
import org.eclipse.jdt.core.IAccessRule;
import org.eclipse.jdt.core.IClasspathAttribute;
@@ -59,6 +62,21 @@ public interface IClasspathEntryDescriptor {
public IPath[] getExclusionPatterns();
+ public void setExported(boolean exported);
+
+ public boolean isExported();
+
+ public IPath getOutputLocation();
+
+ public Map<String, String> getClasspathAttributes();
+
+ public List<IAccessRule> getAccessRules();
+
+ public void setCombineAccessRules(boolean combineAccessRules);
+
+ public boolean combineAccessRules();
+
+
// maven-specific getters and setters
/**
diff --git a/org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/AbstractJavaProjectConfigurator.java b/org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/AbstractJavaProjectConfigurator.java
index dcc24f06..00147116 100644
--- a/org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/AbstractJavaProjectConfigurator.java
+++ b/org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/AbstractJavaProjectConfigurator.java
@@ -182,7 +182,7 @@ public abstract class AbstractJavaProjectConfigurator extends AbstractProjectCon
}
}
- private void addJREClasspathContainer(IClasspathDescriptor classpath, String environmentId) {
+ protected void addJREClasspathContainer(IClasspathDescriptor classpath, String environmentId) {
// remove existing JRE entry
classpath.removeEntry(new ClasspathDescriptor.EntryFilter() {
public boolean accept(IClasspathEntryDescriptor descriptor) {
@@ -212,7 +212,7 @@ public abstract class AbstractJavaProjectConfigurator extends AbstractProjectCon
return null;
}
- private void addMavenClasspathContainer(IClasspathDescriptor classpath) {
+ protected void addMavenClasspathContainer(IClasspathDescriptor classpath) {
// remove any old maven classpath container entries
classpath.removeEntry(new ClasspathDescriptor.EntryFilter() {
public boolean accept(IClasspathEntryDescriptor entry) {
diff --git a/org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/ClasspathEntryDescriptor.java b/org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/ClasspathEntryDescriptor.java
index 45c58d47..6a6ced34 100644
--- a/org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/ClasspathEntryDescriptor.java
+++ b/org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/ClasspathEntryDescriptor.java
@@ -165,6 +165,10 @@ public class ClasspathEntryDescriptor implements IClasspathEntryDescriptor {
}
}
+ public Map<String, String> getClasspathAttributes() {
+ return attributes;
+ }
+
public String getGroupId() {
return artifactKey != null ? artifactKey.getGroupId() : null;
}
@@ -246,10 +250,18 @@ public class ClasspathEntryDescriptor implements IClasspathEntryDescriptor {
this.accessRules.add(rule);
}
+ public List<IAccessRule> getAccessRules() {
+ return accessRules;
+ }
+
public void setOutputLocation(IPath outputLocation) {
this.outputLocation = outputLocation;
}
+ public IPath getOutputLocation() {
+ return outputLocation;
+ }
+
public void setInclusionPatterns(IPath[] inclusionPatterns) {
if (inclusionPatterns!=null) {
this.inclusionPatterns = new LinkedHashSet<IPath>(Arrays.asList(inclusionPatterns));
@@ -287,4 +299,20 @@ public class ClasspathEntryDescriptor implements IClasspathEntryDescriptor {
public IPath[] getExclusionPatterns() {
return exclusionPatterns != null? exclusionPatterns.toArray(new IPath[exclusionPatterns.size()]) : null;
}
+
+ public void setExported(boolean exported) {
+ this.exported = exported;
+ }
+
+ public boolean isExported() {
+ return exported;
+ }
+
+ public void setCombineAccessRules(boolean combineAccessRules) {
+ this.combineAccessRules = combineAccessRules;
+ }
+
+ public boolean combineAccessRules() {
+ return combineAccessRules;
+ }
}

Back to the top