[jboss-cvs] jbosside/core/plugins/org.jboss.ide.eclipse.packages.core/src/main/org/jboss/ide/eclipse/packages/core/model/types ...
Marshall Culpepper
mculpepper at jboss.com
Wed Dec 20 15:31:43 EST 2006
User: mculpepper
Date: 06/12/20 15:31:43
Modified: core/plugins/org.jboss.ide.eclipse.packages.core/src/main/org/jboss/ide/eclipse/packages/core/model/types
JARPackageType.java IPackageType.java
Log:
added getSupportFor so we can prompt users if/when a project that might need extra setup can be determined
Revision Changes Path
1.5 +11 -1 jbosside/core/plugins/org.jboss.ide.eclipse.packages.core/src/main/org/jboss/ide/eclipse/packages/core/model/types/JARPackageType.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: JARPackageType.java
===================================================================
RCS file: /cvsroot/jboss/jbosside/core/plugins/org.jboss.ide.eclipse.packages.core/src/main/org/jboss/ide/eclipse/packages/core/model/types/JARPackageType.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- JARPackageType.java 20 Dec 2006 19:56:40 -0000 1.4
+++ JARPackageType.java 20 Dec 2006 20:31:43 -0000 1.5
@@ -15,7 +15,7 @@
import org.jboss.ide.eclipse.packages.core.model.PackagesCore;
/**
- * The default JAR package type will simply jar-up all the classes in a project's output directory, and place it in the top-level of the project.
+ * The default JAR package type will simply jar-up all the classes in a java project's output directory, and place it in the top-level of the project.
* The name of the resulting JAR will be the project's name followed by a ".jar" extension.
* @author Marshall
*/
@@ -63,4 +63,14 @@
return jar;
}
+
+ public int getSupportFor(IProject project) {
+ IJavaProject javaProject = JavaCore.create(project);
+
+ if (javaProject == null)
+ {
+ return SUPPORT_NONE;
+ }
+ return SUPPORT_FULL;
+ }
}
1.2 +23 -0 jbosside/core/plugins/org.jboss.ide.eclipse.packages.core/src/main/org/jboss/ide/eclipse/packages/core/model/types/IPackageType.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: IPackageType.java
===================================================================
RCS file: /cvsroot/jboss/jbosside/core/plugins/org.jboss.ide.eclipse.packages.core/src/main/org/jboss/ide/eclipse/packages/core/model/types/IPackageType.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- IPackageType.java 20 Nov 2006 21:06:03 -0000 1.1
+++ IPackageType.java 20 Dec 2006 20:31:43 -0000 1.2
@@ -15,6 +15,21 @@
public interface IPackageType {
/**
+ * Represents full support for a project
+ */
+ public static final int SUPPORT_FULL = 0;
+
+ /**
+ * Represents no support for a project
+ */
+ public static final int SUPPORT_NONE = 1;
+
+ /**
+ * Represents conditional support for a project
+ */
+ public static final int SUPPORT_CONDITIONAL = 2;
+
+ /**
* @return The ID for this PackageType, i.e. "jar", "war" etc
*/
public String getId();
@@ -34,4 +49,12 @@
*/
public IPackage createDefaultConfiguration(IProject project, IProgressMonitor monitor);
+ /**
+ * This will return the type of support this package type has for the passed in project.
+ * The type of support can be FULL (should be no problems), NONE (this project is not supported),
+ * or CONDITIONAL (there might be some user input needed before the project supports this package type)
+ * @param project The project to check
+ * @return The support type this package type has for the project
+ */
+ public int getSupportFor (IProject project);
}
More information about the jboss-cvs-commits
mailing list