Author: rob.stryker(a)jboss.com
Date: 2009-02-04 05:07:13 -0500 (Wed, 04 Feb 2009)
New Revision: 13462
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/.settings/
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/.settings/org.eclipse.jdt.core.prefs
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ClasspathConstants.java
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ClasspathCorePlugin.java
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/DirectoryLibraryContainerInitializer.java
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ejb3/EJB30SupportVerifier.java
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ejb3/EJB3ClasspathContainer.java
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ejb3/EJB3ClasspathContainerInitializer.java
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/jee/AbstractClasspathContainer.java
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/ClientAllRuntimeClasspathProvider.java
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/ProjectRuntimeClasspathProvider.java
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/WebtoolsProjectJBossClasspathContainerInitializer.java
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/xpl/ClasspathDecorationsManager.java
Log:
Constants moved around / organized, preparing for i18n
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/.settings/org.eclipse.jdt.core.prefs
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/.settings/org.eclipse.jdt.core.prefs
(rev 0)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/.settings/org.eclipse.jdt.core.prefs 2009-02-04
10:07:13 UTC (rev 13462)
@@ -0,0 +1,60 @@
+#Wed Feb 04 18:00:14 CST 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ClasspathConstants.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ClasspathConstants.java
(rev 0)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ClasspathConstants.java 2009-02-04
10:07:13 UTC (rev 13462)
@@ -0,0 +1,69 @@
+package org.jboss.ide.eclipse.as.classpath.core;
+
+
+public interface ClasspathConstants {
+
+ /* Server runtime types */
+ public static final String AS_32 = "org.jboss.ide.eclipse.as.runtime.32";
//$NON-NLS-1$
+ public static final String AS_40 = "org.jboss.ide.eclipse.as.runtime.40";
//$NON-NLS-1$
+ public static final String AS_42 = "org.jboss.ide.eclipse.as.runtime.42";
//$NON-NLS-1$
+ public static final String AS_50 = "org.jboss.ide.eclipse.as.runtime.50";
//$NON-NLS-1$
+ public static final String EAP_43 = "org.jboss.ide.eclipse.as.runtime.eap.43";
//$NON-NLS-1$
+
+ /* Version Strings */
+ public static final String V3_0 = "3.0"; //$NON-NLS-1$
+ public static final String V3_2 = "3.2"; //$NON-NLS-1$
+ public static final String V4_0 = "4.0"; //$NON-NLS-1$
+ public static final String V4_2 = "4.2"; //$NON-NLS-1$
+ public static final String V5_0 = "5.0"; //$NON-NLS-1$
+
+
+ /* Files and folders that must be added to CP */
+ public static final String SERVER = "server"; //$NON-NLS-1$
+ public static final String CLIENT = "client"; //$NON-NLS-1$
+ public static final String LIB = "lib"; //$NON-NLS-1$
+ public static final String DEPLOY = "deploy"; //$NON-NLS-1$
+ public static final String COMMON = "common"; //$NON-NLS-1$
+ public static final String DEPLOYERS = "deployers"; //$NON-NLS-1$
+
+ public static final String JSF_LIB = "jsf-libs"; //$NON-NLS-1$
+ public static final String JBOSSWEB_TOMCAT55_SAR = "jbossweb-tomcat55.sar";
//$NON-NLS-1$
+ public static final String JBOSSWEB_SAR = "jbossweb.sar"; //$NON-NLS-1$
+ public static final String JBOSS_WEB_SERVICE_JAR = "jboss-web-service.jar";
//$NON-NLS-1$
+ public static final String EJB3_DEPLOYER = "ejb3.deployer"; //$NON-NLS-1$
+ public static final String AS5_AOP_DEPLOYER = "jboss-aop-jboss5.deployer";
//$NON-NLS-1$
+ public static final String AOP_JDK5_DEPLOYER = "jboss-aop-jdk50.deployer";
//$NON-NLS-1$
+ public static final String JBOSS_AOP_JDK5_JAR = "jboss-aop-jdk50.jar";
//$NON-NLS-1$
+ public static final String JBOSS_WEB_DEPLOYER = "jboss-web.deployer";
//$NON-NLS-1$
+ public static final String JSP_API_JAR = "jsp-api.jar"; //$NON-NLS-1$
+ public static final String SERVLET_API_JAR = "servlet-api.jar"; //$NON-NLS-1$
+ public static final String JSF_API_JAR = "jsf-api.jar"; //$NON-NLS-1$
+ public static final String JSF_IMPL_JAR = "jsf-impl.jar"; //$NON-NLS-1$
+ public static final String JBOSS_J2EE_JAR = "jboss-j2ee.jar"; //$NON-NLS-1$
+ public static final String JBOSS_EJB3X_JAR = "jboss-ejb3x.jar"; //$NON-NLS-1$
+ public static final String JBOSS_EJB3_JAR = "jboss-ejb3.jar"; //$NON-NLS-1$
+ public static final String JBOSS_ANNOTATIONS_EJB3_JAR =
"jboss-annotations-ejb3.jar"; //$NON-NLS-1$
+ public static final String EJB3_PERSISTENCE_JAR = "ejb3-persistence.jar";
//$NON-NLS-1$
+ public static final String JBOSS_ASPECT_LIBRARY_JDK5_0 =
"jboss-aspect-library-jdk50.jar"; //$NON-NLS-1$
+ public static final String HIBERNATE_CLIENT_JAR = "hibernate-client.jar";
//$NON-NLS-1$
+ public static final String JBOSSALL_CLIENT_JAR = "jbossall-client.jar";
//$NON-NLS-1$
+ public static final String JBOSSWEB_TOMCAT_50_SAR = "jbossweb-tomcat50.sar";
//$NON-NLS-1$
+
+ public static final String JAVAX_SERVLET_JAR = "javax.servlet.jar";
//$NON-NLS-1$
+ public static final String JAVAX_SERVLET_JSP_JAR = "javax.servlet.jsp.jar";
//$NON-NLS-1$
+
+
+ // etc
+ public static final String JAR_EXT = ".jar"; //$NON-NLS-1$
+
+ /* Facet Names */
+ public static final String FACET_JST_JAVA = "jst.java"; //$NON-NLS-1$
+ public static final String FACET_WEB = "jst.web";//$NON-NLS-1$
+ public static final String FACET_EJB = "jst.ejb";//$NON-NLS-1$
+ public static final String FACET_EAR = "jst.ear";//$NON-NLS-1$
+ public static final String FACET_UTILITY = "jst.utility";//$NON-NLS-1$
+ public static final String FACET_CONNECTOR = "jst.connector";//$NON-NLS-1$
+ public static final String FACET_APP_CLIENT = "jst.appclient";//$NON-NLS-1$
+
+
+}
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ClasspathCorePlugin.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ClasspathCorePlugin.java 2009-02-04
09:07:17 UTC (rev 13461)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ClasspathCorePlugin.java 2009-02-04
10:07:13 UTC (rev 13462)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.jboss.ide.eclipse.as.classpath.core;
import org.eclipse.core.runtime.ILog;
@@ -12,7 +22,7 @@
public class ClasspathCorePlugin extends Plugin {
// The plug-in ID
- public static final String PLUGIN_ID =
"org.jboss.ide.eclipse.as.classpath.core";
+ public static final String PLUGIN_ID =
"org.jboss.ide.eclipse.as.classpath.core"; //$NON-NLS-1$
// The shared instance
private static ClasspathCorePlugin plugin;
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/DirectoryLibraryContainerInitializer.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/DirectoryLibraryContainerInitializer.java 2009-02-04
09:07:17 UTC (rev 13461)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/DirectoryLibraryContainerInitializer.java 2009-02-04
10:07:13 UTC (rev 13462)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.jboss.ide.eclipse.as.classpath.core;
import java.util.ArrayList;
@@ -18,7 +28,7 @@
// TODO: need to implement resource change listeners like done in
FlexibleProjectContainer to be usefull.
public class DirectoryLibraryContainerInitializer extends ClasspathContainerInitializer
{
- public static final String CONTAINER_ID =
"org.jboss.ide.eclipse.as.classpath.core.DirectoryLibraryContainer";
+ public static final String CONTAINER_ID =
"org.jboss.ide.eclipse.as.classpath.core.DirectoryLibraryContainer";
//$NON-NLS-1$
@Override
public void initialize(IPath containerPath, IJavaProject project)
@@ -69,7 +79,7 @@
public boolean visit(IResourceProxy proxy) /* throws CoreException */{
switch(proxy.getType()) {
case IResource.FILE :
- if (proxy.getName().endsWith(".jar") ||
proxy.getName().endsWith(".zip")) {
+ if (proxy.getName().endsWith(".jar") ||
proxy.getName().endsWith(".zip")) { //$NON-NLS-1$ //$NON-NLS-2$
libraries.add(JavaCore.newLibraryEntry(proxy.requestFullPath(), null,
null));
}
return false;
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ejb3/EJB30SupportVerifier.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ejb3/EJB30SupportVerifier.java 2009-02-04
09:07:17 UTC (rev 13461)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ejb3/EJB30SupportVerifier.java 2009-02-04
10:07:13 UTC (rev 13462)
@@ -1,24 +1,14 @@
-/**
- * JBoss, a Division of Red Hat
- * Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
*
-* This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
package org.jboss.ide.eclipse.as.classpath.core.ejb3;
import org.eclipse.core.runtime.IPath;
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ejb3/EJB3ClasspathContainer.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ejb3/EJB3ClasspathContainer.java 2009-02-04
09:07:17 UTC (rev 13461)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ejb3/EJB3ClasspathContainer.java 2009-02-04
10:07:13 UTC (rev 13462)
@@ -34,26 +34,27 @@
import org.eclipse.jdt.launching.JavaRuntime;
import org.eclipse.wst.server.core.IServer;
import org.eclipse.wst.server.core.ServerCore;
+import org.jboss.ide.eclipse.as.classpath.core.ClasspathConstants;
import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
/**
* @author Marshall
* @author Rob Stryker
*/
-public class EJB3ClasspathContainer implements IClasspathContainer {
- public static final String CONTAINER_ID =
"org.jboss.ide.eclipse.as.classpath.core.ejb3.classpathContainer";
+public class EJB3ClasspathContainer implements IClasspathContainer, ClasspathConstants {
+ public static final String CONTAINER_ID =
"org.jboss.ide.eclipse.as.classpath.core.ejb3.classpathContainer";
//$NON-NLS-1$
public static final String DESCRIPTION = "JBoss EJB3 Libraries";
public static final QualifiedName JBOSS_EJB3_CONFIGURATION = new QualifiedName(
- "org.jboss.ide.eclipse.ejb3.wizards.core.classpath",
"jboss-ejb3-configuration");
+ "org.jboss.ide.eclipse.ejb3.wizards.core.classpath",
"jboss-ejb3-configuration"); //$NON-NLS-1$ //$NON-NLS-2$
protected IJavaProject javaProject;
protected JBossServer jbossServer;
protected IPath path;
- protected IPath configPath = new Path("");
- protected IPath homePath = new Path("home");
+ protected IPath configPath = new Path(""); //$NON-NLS-1$
+ protected IPath homePath = null;
public EJB3ClasspathContainer(IPath path, IJavaProject project) {
@@ -110,9 +111,9 @@
public IClasspathEntry[] getClasspathEntries() {
ArrayList entries = new ArrayList();
- String id = jbossServer.getServer().getServerType().getId();
- if( id.equals("org.jboss.ide.eclipse.as.40")) return get40Jars();
- if( id.equals("org.jboss.ide.eclipse.as.42")) return get42Jars();
+ String id = jbossServer.getServer().getServerType().getRuntimeType().getId();
+ if( id.equals(AS_40)) return get40Jars();
+ if( id.equals(AS_42)) return get42Jars();
return (IClasspathEntry[]) entries.toArray(new IClasspathEntry[entries.size()]);
}
@@ -120,21 +121,21 @@
ArrayList list = new ArrayList();
// path roots
- IPath deploy = configPath.append("deploy");
- IPath deployer = deploy.append("ejb3.deployer");
- IPath aopDeployer = deploy.append("jboss-aop-jdk50.deployer");
+ IPath deploy = configPath.append(DEPLOY);
+ IPath deployer = deploy.append(EJB3_DEPLOYER);
+ IPath aopDeployer = deploy.append(AOP_JDK5_DEPLOYER);
// ejb3
- list.add(getEntry(deployer.append("jboss-ejb3x.jar")));
- list.add(getEntry(deployer.append("jboss-ejb3.jar")));
- list.add(getEntry(deployer.append("jboss-annotations-ejb3.jar")));
+ list.add(getEntry(deployer.append(JBOSS_EJB3X_JAR)));
+ list.add(getEntry(deployer.append(JBOSS_EJB3_JAR)));
+ list.add(getEntry(deployer.append(JBOSS_ANNOTATIONS_EJB3_JAR)));
// aop
- list.add(getEntry(aopDeployer.append("jboss-aop-jdk50.jar")));
- list.add(getEntry(aopDeployer.append("jboss-aspect-library-jdk50.jar")));
+ list.add(getEntry(aopDeployer.append(JBOSS_AOP_JDK5_JAR)));
+ list.add(getEntry(aopDeployer.append(JBOSS_ASPECT_LIBRARY_JDK5_0)));
// hibernate
- list.add(getEntry(homePath.append("client").append("hibernate-client.jar")));
+ list.add(getEntry(homePath.append(CLIENT).append(HIBERNATE_CLIENT_JAR)));
return (IClasspathEntry[]) list.toArray(new IClasspathEntry[list.size()]);
}
@@ -142,24 +143,24 @@
ArrayList list = new ArrayList();
// path roots
- IPath deploy = configPath.append("deploy");
- IPath deployer = deploy.append("ejb3.deployer");
- IPath aopDeployer = deploy.append("jboss-aop-jdk50.deployer");
- IPath client = homePath.append("client");
+ IPath deploy = configPath.append(DEPLOY);
+ IPath deployer = deploy.append(EJB3_DEPLOYER);
+ IPath aopDeployer = deploy.append(AOP_JDK5_DEPLOYER);
+ IPath client = homePath.append(CLIENT);
- list.add(getEntry(configPath.append("lib").append("jboss-ejb3x.jar")));
- list.add(getEntry(deployer.append("jboss-ejb3.jar")));
- list.add(getEntry(deployer.append("jboss-annotations-ejb3.jar")));
+ list.add(getEntry(configPath.append(LIB).append(JBOSS_EJB3X_JAR)));
+ list.add(getEntry(deployer.append(JBOSS_EJB3_JAR)));
+ list.add(getEntry(deployer.append(JBOSS_ANNOTATIONS_EJB3_JAR)));
// aop
- list.add(getEntry(aopDeployer.append("jboss-aop-jdk50.jar")));
- list.add(getEntry(aopDeployer.append("jboss-aspect-library-jdk50.jar")));
+ list.add(getEntry(aopDeployer.append(JBOSS_AOP_JDK5_JAR)));
+ list.add(getEntry(aopDeployer.append(JBOSS_ASPECT_LIBRARY_JDK5_0)));
// hibernate
- list.add(getEntry(homePath.append("client").append("hibernate-client.jar")));
+ list.add(getEntry(homePath.append(CLIENT).append(HIBERNATE_CLIENT_JAR)));
// persistence jar
- list.add(getEntry(client.append("ejb3-persistence.jar")));
+ list.add(getEntry(client.append(EJB3_PERSISTENCE_JAR)));
return (IClasspathEntry[]) list.toArray(new IClasspathEntry[list.size()]);
}
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ejb3/EJB3ClasspathContainerInitializer.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ejb3/EJB3ClasspathContainerInitializer.java 2009-02-04
09:07:17 UTC (rev 13461)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ejb3/EJB3ClasspathContainerInitializer.java 2009-02-04
10:07:13 UTC (rev 13462)
@@ -54,6 +54,6 @@
return EJB3ClasspathContainer.DESCRIPTION;
}
- return "";
+ return ""; //$NON-NLS-1$
}
}
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/jee/AbstractClasspathContainer.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/jee/AbstractClasspathContainer.java 2009-02-04
09:07:17 UTC (rev 13461)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/jee/AbstractClasspathContainer.java 2009-02-04
10:07:13 UTC (rev 13462)
@@ -48,9 +48,9 @@
*/
public abstract class AbstractClasspathContainer implements IClasspathContainer {
- public static final String LIB_FOLDER = "lib";
- public static final String LIB_SOURCE_FOLDER = "libsrc";
- public final static String CLASSPATH_CONTAINER_PREFIX =
"org.jboss.ide.eclipse.as.classpath.core";
+ public static final String LIB_FOLDER = "lib"; //$NON-NLS-1$
+ public static final String LIB_SOURCE_FOLDER = "libsrc"; //$NON-NLS-1$
+ public final static String CLASSPATH_CONTAINER_PREFIX =
"org.jboss.ide.eclipse.as.classpath.core"; //$NON-NLS-1$
protected IClasspathEntry[] entries;
protected IPath path;
@@ -150,7 +150,7 @@
protected String getBaseDir() {
try {
URL installURL = FileLocator.toFileURL(ClasspathCorePlugin
- .getDefault().getBundle().getEntry("/"));
+ .getDefault().getBundle().getEntry("/")); //$NON-NLS-1$
return installURL.getFile().toString();
} catch (IOException ioe) {
// LOG THE ERROR (one day)
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/ClientAllRuntimeClasspathProvider.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/ClientAllRuntimeClasspathProvider.java 2009-02-04
09:07:17 UTC (rev 13461)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/ClientAllRuntimeClasspathProvider.java 2009-02-04
10:07:13 UTC (rev 13462)
@@ -33,6 +33,7 @@
import org.eclipse.jdt.launching.JavaRuntime;
import org.eclipse.jst.server.core.RuntimeClasspathProviderDelegate;
import org.eclipse.wst.server.core.IRuntime;
+import org.jboss.ide.eclipse.as.classpath.core.ClasspathConstants;
import org.jboss.ide.eclipse.as.classpath.core.ClasspathCorePlugin;
import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
@@ -44,8 +45,9 @@
* @author Rob Stryker
*
*/
-public class ClientAllRuntimeClasspathProvider extends
- RuntimeClasspathProviderDelegate {
+public class ClientAllRuntimeClasspathProvider
+ extends RuntimeClasspathProviderDelegate
+ implements ClasspathConstants {
public ClientAllRuntimeClasspathProvider() {
// TODO Auto-generated constructor stub
@@ -66,33 +68,33 @@
IPath loc = runtime.getLocation();
String config = jbsrt.getJBossConfiguration();
String rtID = runtime.getRuntimeType().getId();
- if("org.jboss.ide.eclipse.as.runtime.32".equals(rtID)) return get32(loc,
config);
- if("org.jboss.ide.eclipse.as.runtime.40".equals(rtID)) return
get40(loc,config);
- if("org.jboss.ide.eclipse.as.runtime.42".equals(rtID)) return
get42(loc,config);
- if("org.jboss.ide.eclipse.as.runtime.50".equals(rtID)) return
get50(loc,config);
- if("org.jboss.ide.eclipse.as.runtime.eap.43".equals(rtID)) return
getEAP43(loc,config);
+ if(AS_32.equals(rtID)) return get32(loc, config);
+ if(AS_40.equals(rtID)) return get40(loc,config);
+ if(AS_42.equals(rtID)) return get42(loc,config);
+ if(AS_50.equals(rtID)) return get50(loc,config);
+ if(EAP_43.equals(rtID)) return getEAP43(loc,config);
return null;
}
protected IClasspathEntry[] get32(IPath location, String config) {
ArrayList<IClasspathEntry> list = new ArrayList<IClasspathEntry>();
- IPath configPath = location.append("server").append(config);
- addEntries(location.append("client"), list);
- addEntries(location.append("lib"), list);
- addEntries(configPath.append("lib"), list);
+ IPath configPath = location.append(SERVER).append(config);
+ addEntries(location.append(CLIENT), list);
+ addEntries(location.append(LIB), list);
+ addEntries(configPath.append(LIB), list);
return list.toArray(new IClasspathEntry[list.size()]);
}
protected IClasspathEntry[] get40(IPath location, String config) {
ArrayList<IClasspathEntry> list = new ArrayList<IClasspathEntry>();
- IPath configPath = location.append("server").append(config);
- IPath deployPath = configPath.append("deploy");
- addEntries(location.append("client"), list);
- addEntries(location.append("lib"), list);
- addEntries(configPath.append("lib"), list);
- addEntries(deployPath.append("jboss-web.deployer").append("jsf-libs"),
list);
- addEntries(deployPath.append("jboss-aop-jdk50.deployer"), list);
- addEntries(deployPath.append("ejb3.deployer"), list);
+ IPath configPath = location.append(SERVER).append(config);
+ IPath deployPath = configPath.append(DEPLOY);
+ addEntries(location.append(CLIENT), list);
+ addEntries(location.append(LIB), list);
+ addEntries(configPath.append(LIB), list);
+ addEntries(deployPath.append(JBOSS_WEB_DEPLOYER).append(JSF_LIB), list);
+ addEntries(deployPath.append(AOP_JDK5_DEPLOYER), list);
+ addEntries(deployPath.append(EJB3_DEPLOYER), list);
return list.toArray(new IClasspathEntry[list.size()]);
}
@@ -106,17 +108,17 @@
protected IClasspathEntry[] get50(IPath location, String config) {
ArrayList<IClasspathEntry> list = new ArrayList<IClasspathEntry>();
- IPath configPath = location.append("server").append(config);
- IPath deployerPath = configPath.append("deployers");
- IPath deployPath = configPath.append("deploy");
- addEntries(location.append("client"), list);
- addEntries(location.append("lib"), list);
- addEntries(location.append("common").append("lib"), list);
- addEntries(configPath.append("lib"), list);
- addEntries(deployPath.append("jbossweb.sar").append("jsf-libs"),list);
- addEntries(deployPath.append("jbossweb.sar").append("jboss-web-service.jar"),list);
- addEntries(deployerPath.append("jboss-aop-jboss5.deployer"), list);
- addEntries(deployerPath.append("ejb3.deployer"), list);
+ IPath configPath = location.append(SERVER).append(config);
+ IPath deployerPath = configPath.append(DEPLOYERS);
+ IPath deployPath = configPath.append(DEPLOY);
+ addEntries(location.append(CLIENT), list);
+ addEntries(location.append(LIB), list);
+ addEntries(location.append(COMMON).append(LIB), list);
+ addEntries(configPath.append(LIB), list);
+ addEntries(deployPath.append(JBOSSWEB_SAR).append(JSF_LIB),list);
+ addEntries(deployPath.append(JBOSSWEB_SAR).append(JBOSS_WEB_SERVICE_JAR),list);
+ addEntries(deployerPath.append(AS5_AOP_DEPLOYER), list);
+ addEntries(deployerPath.append(EJB3_DEPLOYER), list);
return list.toArray(new IClasspathEntry[list.size()]);
}
@@ -129,7 +131,7 @@
if(f.isDirectory()) {
String[] files = f.list();
for( int i = 0; i < files.length; i++ ) {
- if( files[i].endsWith(".jar")) {
+ if( files[i].endsWith(JAR_EXT)) {
list.add(getEntry(folder.append(files[i])));
}
}
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/ProjectRuntimeClasspathProvider.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/ProjectRuntimeClasspathProvider.java 2009-02-04
09:07:17 UTC (rev 13461)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/ProjectRuntimeClasspathProvider.java 2009-02-04
10:07:13 UTC (rev 13462)
@@ -41,6 +41,7 @@
import org.eclipse.wst.common.project.facet.core.runtime.IRuntimeComponent;
import org.eclipse.wst.server.core.IRuntime;
import org.eclipse.wst.server.core.ServerCore;
+import org.jboss.ide.eclipse.as.classpath.core.ClasspathConstants;
import org.jboss.ide.eclipse.as.classpath.core.ClasspathCorePlugin;
import
org.jboss.ide.eclipse.as.classpath.core.runtime.WebtoolsProjectJBossClasspathContainerInitializer.WebtoolsProjectJBossClasspathContainer;
@@ -52,6 +53,7 @@
*
*/
public class ProjectRuntimeClasspathProvider implements IClasspathProvider {
+ public static final String CONTAINER_ID =
"org.jboss.ide.eclipse.as.classpath.core.runtime.ProjectInitializer";
//$NON-NLS-1$
private IRuntimeComponent rc;
public ProjectRuntimeClasspathProvider() {
@@ -63,17 +65,17 @@
public List getClasspathEntries(final IProjectFacetVersion fv) {
IPath path;
- if( fv.getProjectFacet().getId().equals("jst.java") ) {
- path = new
Path("org.jboss.ide.eclipse.as.classpath.core.runtime.ProjectInitializer");
- path = path.append(rc.getProperty("id"));
+ if( fv.getProjectFacet().getId().equals(ClasspathConstants.FACET_JST_JAVA) ) {
+ path = new Path(CONTAINER_ID);
+ path = path.append(rc.getProperty("id")); //$NON-NLS-1$
path = path.append(fv.getProjectFacet().getId());
path = path.append(fv.getVersionString());
IClasspathEntry[] entries =
new WebtoolsProjectJBossClasspathContainer(path).getClasspathEntries();
return Arrays.asList(entries);
} else {
- String id = rc.getProperty("id");
- IPath containerPath = new
Path("org.eclipse.jst.server.core.container").append("org.jboss.ide.eclipse.as.core.server.runtime.runtimeTarget");
+ String id = rc.getProperty("id"); //$NON-NLS-1$
+ IPath containerPath = new
Path("org.eclipse.jst.server.core.container").append("org.jboss.ide.eclipse.as.core.server.runtime.runtimeTarget");
//$NON-NLS-1$ //$NON-NLS-2$
path = containerPath.append(id);
}
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/WebtoolsProjectJBossClasspathContainerInitializer.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/WebtoolsProjectJBossClasspathContainerInitializer.java 2009-02-04
09:07:17 UTC (rev 13461)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/WebtoolsProjectJBossClasspathContainerInitializer.java 2009-02-04
10:07:13 UTC (rev 13462)
@@ -38,6 +38,7 @@
import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
import org.eclipse.wst.server.core.IRuntime;
import org.eclipse.wst.server.core.ServerCore;
+import org.jboss.ide.eclipse.as.classpath.core.ClasspathConstants;
import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
/**
@@ -53,15 +54,15 @@
*
*/
public class WebtoolsProjectJBossClasspathContainerInitializer extends
- ClasspathContainerInitializer {
+ ClasspathContainerInitializer implements ClasspathConstants {
- private static final IProjectFacet JST_JAVA_FACET =
ProjectFacetsManager.getProjectFacet("jst.java");
- private static final IProjectFacet WEB_FACET =
ProjectFacetsManager.getProjectFacet("jst.web");
- private static final IProjectFacet EJB_FACET =
ProjectFacetsManager.getProjectFacet("jst.ejb");
- private static final IProjectFacet EAR_FACET =
ProjectFacetsManager.getProjectFacet("jst.ear");
-// private static final IProjectFacet UTILITY_FACET =
ProjectFacetsManager.getProjectFacet("jst.utility");
-// private static final IProjectFacet CONNECTOR_FACET =
ProjectFacetsManager.getProjectFacet("jst.connector");
- private static final IProjectFacet APP_CLIENT_FACET =
ProjectFacetsManager.getProjectFacet("jst.appclient");
+ private static final IProjectFacet JST_JAVA_FACET =
ProjectFacetsManager.getProjectFacet(FACET_JST_JAVA);
+ private static final IProjectFacet WEB_FACET =
ProjectFacetsManager.getProjectFacet(FACET_WEB);
+ private static final IProjectFacet EJB_FACET =
ProjectFacetsManager.getProjectFacet(FACET_EJB);
+ private static final IProjectFacet EAR_FACET =
ProjectFacetsManager.getProjectFacet(FACET_EAR);
+ private static final IProjectFacet UTILITY_FACET =
ProjectFacetsManager.getProjectFacet(FACET_UTILITY);
+ private static final IProjectFacet CONNECTOR_FACET =
ProjectFacetsManager.getProjectFacet(FACET_CONNECTOR);
+ private static final IProjectFacet APP_CLIENT_FACET =
ProjectFacetsManager.getProjectFacet(FACET_APP_CLIENT);
public WebtoolsProjectJBossClasspathContainerInitializer() {
@@ -146,19 +147,19 @@
IJBossServerRuntime jbsRuntime) {
if( facetId.equals(JST_JAVA_FACET.getId())) {
return loadJREClasspathEntries(jbsRuntime);
- } else if("5.0".equals(jbVersion)) {
+ } else if(V5_0.equals(jbVersion)) {
return loadClasspathEntriesDefault(facetId, facetVersion, serverHome, configName);
- } else if( "4.2".equals(jbVersion)) {
+ } else if( V4_2.equals(jbVersion)) {
return loadClasspathEntries42(facetId, facetVersion, serverHome, configName);
- } else if( "4.0".equals(jbVersion)) {
+ } else if( V4_0.equals(jbVersion)) {
return loadClasspathEntries40(facetId, facetVersion, serverHome, configName);
- } else if( "3.2".equals(jbVersion))
+ } else if( V3_2.equals(jbVersion))
return loadClasspathEntries32( facetId, facetVersion, serverHome, configName);
return loadClasspathEntriesDefault(facetId, facetVersion, serverHome, configName);
}
protected boolean isEjb30(String facetId, String facetVersion) {
- if( facetId.equals(EJB_FACET.getId()) && facetVersion.equals("3.0"))
+ if( facetId.equals(EJB_FACET.getId()) && facetVersion.equals(V3_0))
return true;
return false;
}
@@ -170,7 +171,7 @@
String[] files = folder.toFile().list();
ArrayList<IClasspathEntry> list = new ArrayList<IClasspathEntry>();
for( int i = 0; i < files.length; i++ ) {
- if( files[i].endsWith(".jar")) {
+ if( files[i].endsWith(JAR_EXT)) {
list.add(getEntry(folder.append(files[i])));
}
}
@@ -188,78 +189,78 @@
protected IClasspathEntry[] loadClasspathEntries42(String facetId, String facetVersion,
String serverHome, String configName) {
IPath homePath = new Path(serverHome);
- IPath configPath = homePath.append("server").append(configName);
+ IPath configPath = homePath.append(SERVER).append(configName);
ArrayList<IClasspathEntry> list = new ArrayList<IClasspathEntry>();
if (facetId.equals(WEB_FACET.getId())) {
- IPath jsfDir =
configPath.append("deploy").append("jboss-web.deployer").append("jsf-libs");
- list.add(getEntry(configPath.append("lib").append("jsp-api.jar")));
- list.add(getEntry(homePath.append("client").append("servlet-api.jar")));
- list.add(getEntry(jsfDir.append("jsf-api.jar")));
- list.add(getEntry(jsfDir.append("jsf-impl.jar")));
+ IPath jsfDir = configPath.append(DEPLOY).append(JBOSS_WEB_DEPLOYER).append(JSF_LIB);
+ list.add(getEntry(configPath.append(LIB).append(JSP_API_JAR)));
+ list.add(getEntry(homePath.append(CLIENT).append(SERVLET_API_JAR)));
+ list.add(getEntry(jsfDir.append(JSF_API_JAR)));
+ list.add(getEntry(jsfDir.append(JSF_IMPL_JAR)));
} else if( facetId.equals(EJB_FACET.getId()) && !isEjb30(facetId,
facetVersion)) {
- list.add(getEntry(homePath.append("client").append("jboss-j2ee.jar")));
+ list.add(getEntry(homePath.append(CLIENT).append(JBOSS_J2EE_JAR)));
} else if( isEjb30(facetId, facetVersion)) {
// path roots
- IPath deploy = configPath.append("deploy");
- IPath deployer = deploy.append("ejb3.deployer");
- IPath aopDeployer = deploy.append("jboss-aop-jdk50.deployer");
- IPath client = homePath.append("client");
+ IPath deploy = configPath.append(DEPLOY);
+ IPath deployer = deploy.append(EJB3_DEPLOYER);
+ IPath aopDeployer = deploy.append(AOP_JDK5_DEPLOYER);
+ IPath client = homePath.append(CLIENT);
- list.add(getEntry(configPath.append("lib").append("jboss-ejb3x.jar")));
- list.add(getEntry(deployer.append("jboss-ejb3.jar")));
- list.add(getEntry(deployer.append("jboss-annotations-ejb3.jar")));
+ list.add(getEntry(configPath.append(LIB).append(JBOSS_EJB3X_JAR)));
+ list.add(getEntry(deployer.append(JBOSS_EJB3_JAR)));
+ list.add(getEntry(deployer.append(JBOSS_ANNOTATIONS_EJB3_JAR)));
// aop
- list.add(getEntry(aopDeployer.append("jboss-aop-jdk50.jar")));
- list.add(getEntry(aopDeployer.append("jboss-aspect-library-jdk50.jar")));
+ list.add(getEntry(aopDeployer.append(AOP_JDK5_DEPLOYER)));
+ list.add(getEntry(aopDeployer.append(JBOSS_ASPECT_LIBRARY_JDK5_0)));
// hibernate
- list.add(getEntry(homePath.append("client").append("hibernate-client.jar")));
+ list.add(getEntry(homePath.append(CLIENT).append(HIBERNATE_CLIENT_JAR)));
// persistence jar
- list.add(getEntry(client.append("ejb3-persistence.jar")));
+ list.add(getEntry(client.append(EJB3_PERSISTENCE_JAR)));
} else if( facetId.equals(EAR_FACET.getId())) {
- list.add(getEntry(homePath.append("client").append("jboss-j2ee.jar")));
+ list.add(getEntry(homePath.append(CLIENT).append(JBOSS_J2EE_JAR)));
} else if( facetId.equals(APP_CLIENT_FACET.getId())) {
- list.add(getEntry(homePath.append("client").append("jbossall-client.jar")));
+ list.add(getEntry(homePath.append(CLIENT).append(JBOSSALL_CLIENT_JAR)));
}
return list.toArray(new IClasspathEntry[list.size()]);
}
protected IClasspathEntry[] loadClasspathEntries40(String facetId, String facetVersion,
String serverHome, String configName) {
IPath homePath = new Path(serverHome);
- IPath configPath = homePath.append("server").append(configName);
+ IPath configPath = homePath.append(SERVER).append(configName);
ArrayList<IClasspathEntry> list = new ArrayList<IClasspathEntry>();
if (facetId.equals(WEB_FACET.getId())) {
- IPath jsfDir =
configPath.append("deploy").append("jbossweb-tomcat55.sar").append("jsf-libs");
- list.add(getEntry(configPath.append("lib").append("javax.servlet.jsp.jar")));
- list.add(getEntry(homePath.append("client").append("javax.servlet.jar")));
+ IPath jsfDir =
configPath.append(DEPLOY).append(JBOSSWEB_TOMCAT55_SAR).append(JSF_LIB);
+ list.add(getEntry(configPath.append(LIB).append(JAVAX_SERVLET_JSP_JAR)));
+ list.add(getEntry(homePath.append(CLIENT).append(JAVAX_SERVLET_JAR)));
list.addAll(Arrays.asList(getEntries(jsfDir)));
} else if( facetId.equals(EJB_FACET.getId()) && !isEjb30(facetId,
facetVersion)) {
- list.add(getEntry(homePath.append("client").append("jboss-j2ee.jar")));
+ list.add(getEntry(homePath.append(CLIENT).append(JBOSS_J2EE_JAR)));
} else if( isEjb30(facetId, facetVersion)) {
// path roots
- IPath deploy = configPath.append("deploy");
- IPath deployer = deploy.append("ejb3.deployer");
- IPath aopDeployer = deploy.append("jboss-aop-jdk50.deployer");
+ IPath deploy = configPath.append(DEPLOY);
+ IPath deployer = deploy.append(EJB3_DEPLOYER);
+ IPath aopDeployer = deploy.append(AOP_JDK5_DEPLOYER);
// ejb3
- list.add(getEntry(deployer.append("jboss-ejb3x.jar")));
- list.add(getEntry(deployer.append("jboss-ejb3.jar")));
- list.add(getEntry(deployer.append("jboss-annotations-ejb3.jar")));
+ list.add(getEntry(deployer.append(JBOSS_EJB3X_JAR)));
+ list.add(getEntry(deployer.append(JBOSS_EJB3_JAR)));
+ list.add(getEntry(deployer.append(JBOSS_ANNOTATIONS_EJB3_JAR)));
// aop
- list.add(getEntry(aopDeployer.append("jboss-aop-jdk50.jar")));
- list.add(getEntry(aopDeployer.append("jboss-aspect-library-jdk50.jar")));
+ list.add(getEntry(aopDeployer.append(JBOSS_AOP_JDK5_JAR)));
+ list.add(getEntry(aopDeployer.append(JBOSS_ASPECT_LIBRARY_JDK5_0)));
// hibernate
- list.add(getEntry(homePath.append("client").append("hibernate-client.jar")));
+ list.add(getEntry(homePath.append(CLIENT).append(HIBERNATE_CLIENT_JAR)));
} else if( facetId.equals(EAR_FACET.getId())) {
- list.add(getEntry(homePath.append("client").append("jboss-j2ee.jar")));
+ list.add(getEntry(homePath.append(CLIENT).append(JBOSS_J2EE_JAR)));
} else if( facetId.equals(APP_CLIENT_FACET.getId())) {
- list.add(JavaRuntime.newArchiveRuntimeClasspathEntry(homePath.append("client").append("jbossall-client.jar")).getClasspathEntry());
+ list.add(JavaRuntime.newArchiveRuntimeClasspathEntry(homePath.append(CLIENT).append(JBOSSALL_CLIENT_JAR)).getClasspathEntry());
}
return list.toArray(new IClasspathEntry[list.size()]);
}
@@ -267,17 +268,17 @@
protected IClasspathEntry[] loadClasspathEntries32(String facetId, String facetVersion,
String serverHome, String configName) {
IPath homePath = new Path(serverHome);
- IPath configPath = homePath.append("server").append(configName);
+ IPath configPath = homePath.append(SERVER).append(configName);
ArrayList<IClasspathEntry> list = new ArrayList<IClasspathEntry>();
if (facetId.equals(WEB_FACET.getId())) {
- IPath p =
configPath.append("deploy").append("jbossweb-tomcat50.sar");
- list.add(getEntry(p.append("jsp-api.jar")));
- list.add(getEntry(p.append("servlet-api.jar")));
+ IPath p = configPath.append(DEPLOY).append(JBOSSWEB_TOMCAT_50_SAR);
+ list.add(getEntry(p.append(JSP_API_JAR)));
+ list.add(getEntry(p.append(SERVLET_API_JAR)));
} else if( (facetId.equals(EJB_FACET.getId()) && !isEjb30(facetId,
facetVersion))
|| facetId.equals(EAR_FACET.getId()) ) {
- list.add(getEntry(homePath.append("client").append("jboss-j2ee.jar")));
+ list.add(getEntry(homePath.append(CLIENT).append(JBOSS_J2EE_JAR)));
} else if( facetId.equals(APP_CLIENT_FACET.getId())) {
- list.add(getEntry(homePath.append("client").append("jbossall-client.jar")));
+ list.add(getEntry(homePath.append(CLIENT).append(JBOSSALL_CLIENT_JAR)));
}
return list.toArray(new IClasspathEntry[list.size()]);
}
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/xpl/ClasspathDecorationsManager.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/xpl/ClasspathDecorationsManager.java 2009-02-04
09:07:17 UTC (rev 13461)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/xpl/ClasspathDecorationsManager.java 2009-02-04
10:07:13 UTC (rev 13462)
@@ -37,9 +37,9 @@
*/
public final class ClasspathDecorationsManager {
- private static final String CLASSPATH_PREFERENCES = "classpathPreferences";
+ private static final String CLASSPATH_PREFERENCES = "classpathPreferences";
//$NON-NLS-1$
private static final String SEPARATOR = System
- .getProperty("line.separator");
+ .getProperty("line.separator"); //$NON-NLS-1$
private final HashMap decorations;
public ClasspathDecorationsManager() {
@@ -108,7 +108,7 @@
buffer.append("\">"); //$NON-NLS-1$
buffer.append(SEPARATOR);
- String src = "";
+ String src = ""; //$NON-NLS-1$
if (dec.getSourceAttachmentPath() != null) {
src = dec.getSourceAttachmentPath().toString();
}