JBoss Tools SVN: r32386 - trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-06-28 03:24:53 -0400 (Tue, 28 Jun 2011)
New Revision: 32386
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ServerConverter.java
Log:
[JBIDE-9125] added parameter null checks
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ServerConverter.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ServerConverter.java 2011-06-28 01:07:05 UTC (rev 32385)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ServerConverter.java 2011-06-28 07:24:53 UTC (rev 32386)
@@ -47,6 +47,9 @@
}
public static JBossServer getJBossServer(IServer server) {
+ if (server == null) {
+ return null;
+ }
JBossServer jbServer = (JBossServer) server.getAdapter(JBossServer.class);
if (jbServer == null) {
jbServer = (JBossServer) server.loadAdapter(JBossServer.class, new NullProgressMonitor());
@@ -65,6 +68,9 @@
}
public static JBossServer getJBossServer(IServerWorkingCopy server) {
+ if (server == null) {
+ return null;
+ }
JBossServer jbServer = (JBossServer) server.getAdapter(JBossServer.class);
if (jbServer == null) {
jbServer = (JBossServer) server.loadAdapter(JBossServer.class, new NullProgressMonitor());
@@ -73,6 +79,9 @@
}
public static IDeployableServer getDeployableServer(IServer server) {
+ if (server == null) {
+ return null;
+ }
IDeployableServer dep = (IDeployableServer) server.getAdapter(IDeployableServer.class);
if (dep == null) {
dep = (IDeployableServer) server.loadAdapter(IDeployableServer.class, new NullProgressMonitor());
14 years, 9 months
JBoss Tools SVN: r32385 - trunk/jst/tests/org.jboss.tools.jst.web.kb.test.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2011-06-27 21:07:05 -0400 (Mon, 27 Jun 2011)
New Revision: 32385
Modified:
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/pom.xml
Log:
https://issues.jboss.org/browse/JBIDE-9253
Modified: trunk/jst/tests/org.jboss.tools.jst.web.kb.test/pom.xml
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.web.kb.test/pom.xml 2011-06-28 00:22:12 UTC (rev 32384)
+++ trunk/jst/tests/org.jboss.tools.jst.web.kb.test/pom.xml 2011-06-28 01:07:05 UTC (rev 32385)
@@ -15,4 +15,19 @@
<emma.filter>org.jboss.tools.jst.web.kb*</emma.filter>
<emma.instrument.bundles>org.jboss.tools.jst.web.kb</emma.instrument.bundles>
</properties>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.sonatype.tycho</groupId>
+ <artifactId>maven-osgi-test-plugin</artifactId>
+ <configuration>
+ <explodedBundles>
+ <bundle>org.jboss.tools.jst.web.kb</bundle>
+ </explodedBundles>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
</project>
14 years, 9 months
JBoss Tools SVN: r32384 - trunk/jsf/plugins/org.jboss.tools.jsf/resources/meta.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2011-06-27 20:22:12 -0400 (Mon, 27 Jun 2011)
New Revision: 32384
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/resources/meta/jsf-palette.xml
Log:
https://issues.jboss.org/browse/JBIDE-9259
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/resources/meta/jsf-palette.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/resources/meta/jsf-palette.xml 2011-06-28 00:05:21 UTC (rev 32383)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/resources/meta/jsf-palette.xml 2011-06-28 00:22:12 UTC (rev 32384)
@@ -2795,7 +2795,7 @@
<PageTabHTML DESCRIPTION="" EDITOR_TYPE="" HIDDEN="no"
NAME="JBoss" NATURE_TYPE="" SCOPE="project" TABTYPE="HTML"
model-entity="SharablePageTabHTML">
- <GroupHTML HIDDEN="yes" ICON="" NAME="RichFaces 4" PREFIX="rich"
+ <GroupHTML HIDDEN="no" ICON="" NAME="RichFaces" PREFIX="rich"
SCOPE="project" URI="http://richfaces.org/rich" add_taglib="true"
library-version="" model-entity="SharableGroupHTML">
<MacroHTML
@@ -3075,7 +3075,7 @@
SCOPE="project" STARTTEXT="<tooltip>" large-icon=""
model-entity="SharableMacroHTML" />
</GroupHTML>
- <GroupHTML HIDDEN="no" ICON="" NAME="RichFaces" PREFIX="rich"
+ <GroupHTML HIDDEN="yes" ICON="" NAME="RichFaces 3" PREFIX="rich"
SCOPE="project" URI="http://richfaces.org/rich" add_taglib="true"
library-version="" model-entity="SharableGroupHTML">
<MacroHTML
@@ -3482,7 +3482,7 @@
STARTTEXT="<simpleTogglePanel>" large-icon="" model-entity="SharableMacroHTML" />
</GroupHTML>
- <GroupHTML HIDDEN="yes" ICON="" NAME="Ajax4Jsf 4" PREFIX="a4j"
+ <GroupHTML HIDDEN="no" ICON="" NAME="Ajax4Jsf" PREFIX="a4j"
SCOPE="project" URI="http://richfaces.org/a4j" add_taglib="true"
library-version="" model-entity="SharableGroupHTML">
<MacroHTML
@@ -4139,7 +4139,7 @@
ENDTEXT="</span>" ICON="" NAME="span" REFORMAT="yes" SCOPE="project"
STARTTEXT="<span>" large-icon="" model-entity="SharableMacroHTML" />
</GroupHTML>
- <GroupHTML HIDDEN="no" ICON="" NAME="Ajax4Jsf" PREFIX="a4j"
+ <GroupHTML HIDDEN="yes" ICON="" NAME="Ajax4Jsf 3" PREFIX="a4j"
SCOPE="project" URI="http://richfaces.org/a4j" add_taglib="true"
library-version="" model-entity="SharableGroupHTML">
<MacroHTML
14 years, 9 months
JBoss Tools SVN: r32382 - in trunk/ws/docs/reference/en-US/images: topdown and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2011-06-27 19:06:04 -0400 (Mon, 27 Jun 2011)
New Revision: 32382
Modified:
trunk/ws/docs/reference/en-US/images/preference/Jbossws_preference.png
trunk/ws/docs/reference/en-US/images/preference/Jbossws_preference_new.png
trunk/ws/docs/reference/en-US/images/topdown/jbossws_facet.png
trunk/ws/docs/reference/en-US/images/topdown/jbossws_newruntime.png
Log:
updated images - TOOLSDOC-193
Modified: trunk/ws/docs/reference/en-US/images/preference/Jbossws_preference.png
===================================================================
(Binary files differ)
Modified: trunk/ws/docs/reference/en-US/images/preference/Jbossws_preference_new.png
===================================================================
(Binary files differ)
Modified: trunk/ws/docs/reference/en-US/images/topdown/jbossws_facet.png
===================================================================
(Binary files differ)
Modified: trunk/ws/docs/reference/en-US/images/topdown/jbossws_newruntime.png
===================================================================
(Binary files differ)
14 years, 9 months
JBoss Tools SVN: r32381 - trunk/as/plugins/org.jboss.ide.eclipse.as.core/.settings.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2011-06-27 18:58:05 -0400 (Mon, 27 Jun 2011)
New Revision: 32381
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/.settings/org.eclipse.jdt.core.prefs
Log:
Fixed .settings to use default Java instead of 1.5
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/.settings/org.eclipse.jdt.core.prefs 2011-06-27 22:10:53 UTC (rev 32380)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/.settings/org.eclipse.jdt.core.prefs 2011-06-27 22:58:05 UTC (rev 32381)
@@ -1,14 +1,6 @@
-#Fri Apr 24 04:19:52 CST 2009
+#Mon Jun 27 15:48:07 PDT 2011
eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
org.eclipse.jdt.core.compiler.problem.deadCode=warning
@@ -17,7 +9,6 @@
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.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
@@ -71,4 +62,3 @@
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.5
14 years, 9 months
JBoss Tools SVN: r32380 - trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-06-27 18:10:53 -0400 (Mon, 27 Jun 2011)
New Revision: 32380
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/LocalJBoss7ServerRuntime.java
Log:
[JBIDE-9261] added startup parameters for latest as7
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/LocalJBoss7ServerRuntime.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/LocalJBoss7ServerRuntime.java 2011-06-27 22:07:56 UTC (rev 32379)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/LocalJBoss7ServerRuntime.java 2011-06-27 22:10:53 UTC (rev 32380)
@@ -42,10 +42,12 @@
IPath bootLog = loc.append("standalone").append("log").append("boot.log"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
IPath logConfig = loc.append("standalone").append("configuration").append("logging.properties"); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
return "-server -Xms64m -Xmx512m -XX:MaxPermSize=256m " //$NON-NLS-1$
- + "-Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 " //$NON-NLS-1$
+ + "-Djava.net.preferIPv4Stack=true " //$NON-NLS-1$
+ + "-Dorg.jboss.resolver.warning=true " //$NON-NLS-1$
+ + "-Dsun.rmi.dgc.client.gcInterval=3600000 " //$NON-NLS-1$
+ "-Dsun.rmi.dgc.server.gcInterval=3600000 " //$NON-NLS-1$
- + "\"-Dorg.jboss.boot.log.file=" + bootLog.toString() //$NON-NLS-1$
- + "\" \"-Dlogging.configuration=file:" + logConfig.toString() //$NON-NLS-1$
- + "\" \"-Djboss.home.dir=" + loc.toString() + "\""; //$NON-NLS-1$ //$NON-NLS-2$"
+ + "\"-Dorg.jboss.boot.log.file=" + bootLog.toString() + "\" " //$NON-NLS-1$ //$NON-NLS-2$
+ + "\"-Dlogging.configuration=file:" + logConfig.toString() + "\" " //$NON-NLS-1$ //$NON-NLS-2$
+ + "\"-Djboss.home.dir=" + loc.toString() + "\""; //$NON-NLS-1$ //$NON-NLS-2$"
}
}
14 years, 9 months
JBoss Tools SVN: r32379 - in trunk/as: plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7 and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-06-27 18:07:56 -0400 (Mon, 27 Jun 2011)
New Revision: 32379
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/AbstractStartupConfigurator.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/ILaunchConfigConfigurator.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/JBossRuntimeLaunchConfigUtils.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/JBossStartupConfigurator.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/LocalJBossServerStartLaunchDelegate.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7StartupConfigurator.java
trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/launch/
trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/launch/JBossLaunchConfigTests.java
trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/launch/LaunchConfigConfiguratorFactory.java
trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/launch/LaunchConfigTests.java
trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/launch/MockLaunchConfigWorkingCopy.java
Removed:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7RuntimeLaunchConfigurator.java
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/AbstractJBossLaunchConfigType.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/LocalJBossServerStartupLaunchUtil.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7ServerBehavior.java
Log:
[JBIDE-9215] moved startup launch config to own config builder for jboss as and as7
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/AbstractJBossLaunchConfigType.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/AbstractJBossLaunchConfigType.java 2011-06-27 22:03:27 UTC (rev 32378)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/AbstractJBossLaunchConfigType.java 2011-06-27 22:07:56 UTC (rev 32379)
@@ -66,6 +66,7 @@
// override me
}
+ @Override
public void launch(ILaunchConfiguration configuration, String mode,
ILaunch launch, IProgressMonitor monitor) throws CoreException {
preLaunch(configuration, mode, launch, monitor);
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/AbstractStartupConfigurator.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/AbstractStartupConfigurator.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/AbstractStartupConfigurator.java 2011-06-27 22:07:56 UTC (rev 32379)
@@ -0,0 +1,145 @@
+/*******************************************************************************
+ * 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.core.server.internal.launch;
+
+import static org.jboss.ide.eclipse.as.core.server.internal.launch.JBossRuntimeLaunchConfigUtils.setClasspath;
+import static org.jboss.ide.eclipse.as.core.server.internal.launch.JBossRuntimeLaunchConfigUtils.setClasspathProvider;
+import static org.jboss.ide.eclipse.as.core.server.internal.launch.JBossRuntimeLaunchConfigUtils.setConfig;
+import static org.jboss.ide.eclipse.as.core.server.internal.launch.JBossRuntimeLaunchConfigUtils.setEndorsedDir;
+import static org.jboss.ide.eclipse.as.core.server.internal.launch.JBossRuntimeLaunchConfigUtils.setEnvironmentVariables;
+import static org.jboss.ide.eclipse.as.core.server.internal.launch.JBossRuntimeLaunchConfigUtils.setHost;
+import static org.jboss.ide.eclipse.as.core.server.internal.launch.JBossRuntimeLaunchConfigUtils.setJreContainer;
+import static org.jboss.ide.eclipse.as.core.server.internal.launch.JBossRuntimeLaunchConfigUtils.setMainType;
+import static org.jboss.ide.eclipse.as.core.server.internal.launch.JBossRuntimeLaunchConfigUtils.setProgramArguments;
+import static org.jboss.ide.eclipse.as.core.server.internal.launch.JBossRuntimeLaunchConfigUtils.setServerId;
+import static org.jboss.ide.eclipse.as.core.server.internal.launch.JBossRuntimeLaunchConfigUtils.setUseDefaultClassPath;
+import static org.jboss.ide.eclipse.as.core.server.internal.launch.JBossRuntimeLaunchConfigUtils.setWorkingDirectory;
+import static org.jboss.ide.eclipse.as.core.server.internal.launch.JBossRuntimeLaunchConfigUtils.setVmArguments;
+
+
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
+import org.eclipse.jdt.launching.IVMInstall;
+import org.eclipse.jdt.launching.JavaRuntime;
+import org.eclipse.wst.server.core.IServer;
+import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
+import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
+import org.jboss.ide.eclipse.as.core.util.IJBossRuntimeResourceConstants;
+import org.jboss.ide.eclipse.as.core.util.ServerConverter;
+
+public abstract class AbstractStartupConfigurator implements ILaunchConfigConfigurator {
+
+ private static final String DEFAULT_CP_PROVIDER_ID = "org.jboss.ide.eclipse.as.core.server.internal.launch.serverClasspathProvider"; ///$NON-NLS-1$
+ private static final String DEFAULTS_SET = "DEFAULTS_SET"; //$NON-NLS-1$
+
+ private JBossServer jbossServer;
+ private IJBossServerRuntime jbossRuntime;
+
+ public AbstractStartupConfigurator(IServer server) throws CoreException {
+ this.jbossServer = ServerConverter.checkedGetJBossServer(server);
+ this.jbossRuntime = jbossServer.getRuntime();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.ide.eclipse.as.core.server.internal.launch.
+ * ILaunchConfigConfigurator
+ * #configure(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
+ */
+ @Override
+ public void configure(ILaunchConfigurationWorkingCopy launchConfig) throws CoreException {
+ if (!areDefaultsSet(launchConfig)) {
+ doConfigure(launchConfig);
+ setDefaultsSet(launchConfig);
+ }
+ }
+
+ protected void doConfigure(ILaunchConfigurationWorkingCopy launchConfig) throws CoreException {
+ setProgramArguments(getDefaultProgramArguments(jbossServer, jbossRuntime), launchConfig);
+ setHost(getHost(jbossServer, jbossRuntime), launchConfig);
+ setConfig(getServerConfig(jbossRuntime), launchConfig);
+ setServerHome(getServerHome(jbossRuntime), jbossRuntime, launchConfig);
+ setVmArguments(getDefaultVMArguments(jbossRuntime), launchConfig);
+ setJreContainer(getJreContainerPath(jbossRuntime), launchConfig);
+ setEndorsedDir(getEndorsedDir(jbossRuntime), launchConfig);
+ setMainType(getMainType(), launchConfig);
+ setWorkingDirectory(getWorkingDirectory(jbossServer, jbossRuntime), launchConfig);
+ setEnvironmentVariables(getEnvironmentVariables(jbossRuntime), launchConfig);
+ setClasspathProvider(getClasspathProvider(), launchConfig);
+ setClasspath(getClasspath(jbossServer, jbossRuntime, JBossRuntimeLaunchConfigUtils.getClasspath(launchConfig)), launchConfig);
+ setUseDefaultClassPath(false, launchConfig);
+ setServerId(getServerId(jbossServer), launchConfig);
+ setDefaultsSet(launchConfig);
+ }
+
+ protected abstract String getEndorsedDir(IJBossServerRuntime runtime);
+
+ protected abstract String getServerConfig(IJBossServerRuntime runtime);
+
+ protected abstract String getServerHome(IJBossServerRuntime runtime);
+
+ private void setServerHome(String serverHome, IJBossServerRuntime runtime,
+ ILaunchConfigurationWorkingCopy launchConfig) throws CoreException {
+ if (!isCustomConfigLocation(runtime)) {
+ JBossRuntimeLaunchConfigUtils.setServerHome(serverHome, runtime, launchConfig);
+ }
+ }
+
+ protected boolean isCustomConfigLocation(IJBossServerRuntime runtime) {
+ return runtime.getConfigLocation().equals(IJBossRuntimeResourceConstants.SERVER);
+ }
+
+ protected String getClasspathProvider() {
+ return DEFAULT_CP_PROVIDER_ID;
+ }
+
+ protected Map<String, String> getEnvironmentVariables(IJBossServerRuntime runtime) {
+ return runtime.getDefaultRunEnvVars();
+ }
+
+ protected abstract String getDefaultProgramArguments(JBossServer server, IJBossServerRuntime runtime);
+
+ protected abstract String getDefaultVMArguments(IJBossServerRuntime runtime);
+
+ protected String getJreContainerPath(IJBossServerRuntime runtime) {
+ IVMInstall vmInstall = runtime.getVM();
+ if (vmInstall == null) {
+ return null;
+ }
+ return JavaRuntime.newJREContainerPath(vmInstall).toPortableString();
+ }
+
+ protected abstract List<String> getClasspath(JBossServer server, IJBossServerRuntime runtime, List<String> currentClasspath) throws CoreException;
+
+ protected abstract String getMainType();
+
+ protected abstract String getWorkingDirectory(JBossServer server, IJBossServerRuntime jbossRuntime)
+ throws CoreException;
+
+ protected String getServerId(JBossServer server) {
+ return server.getServer().getId();
+ }
+
+ protected abstract String getHost(JBossServer server, IJBossServerRuntime runtime);
+
+ private boolean areDefaultsSet(ILaunchConfigurationWorkingCopy launchConfig) throws CoreException {
+ return launchConfig.hasAttribute(DEFAULTS_SET);
+ }
+
+ private void setDefaultsSet(ILaunchConfigurationWorkingCopy launchConfig) {
+ launchConfig.setAttribute(DEFAULTS_SET, true);
+ }
+}
\ No newline at end of file
Property changes on: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/AbstractStartupConfigurator.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/ILaunchConfigConfigurator.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/ILaunchConfigConfigurator.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/ILaunchConfigConfigurator.java 2011-06-27 22:07:56 UTC (rev 32379)
@@ -0,0 +1,10 @@
+package org.jboss.ide.eclipse.as.core.server.internal.launch;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+
+public interface ILaunchConfigConfigurator {
+
+ public abstract void configure(ILaunchConfigurationWorkingCopy launchConfig) throws CoreException;
+
+}
\ No newline at end of file
Property changes on: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/ILaunchConfigConfigurator.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/JBossRuntimeLaunchConfigUtils.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/JBossRuntimeLaunchConfigUtils.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/JBossRuntimeLaunchConfigUtils.java 2011-06-27 22:07:56 UTC (rev 32379)
@@ -0,0 +1,240 @@
+/*******************************************************************************
+ * 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.core.server.internal.launch;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.core.ILaunchManager;
+import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
+import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
+import org.jboss.ide.eclipse.as.core.util.ArgsUtil;
+import org.jboss.ide.eclipse.as.core.util.IJBossRuntimeConstants;
+
+/**
+ * @author André Dietisheim
+ */
+public class JBossRuntimeLaunchConfigUtils {
+
+ public static void setClasspath(List<String> entries, ILaunchConfigurationWorkingCopy launchConfig) {
+ if (isSet(entries)) {
+ launchConfig.setAttribute(
+ IJavaLaunchConfigurationConstants.ATTR_CLASSPATH, entries);
+ }
+ }
+
+ public static boolean isClasspathSet(ILaunchConfigurationWorkingCopy launchConfig) throws CoreException {
+ return launchConfig.hasAttribute(IJavaLaunchConfigurationConstants.ATTR_CLASSPATH);
+ }
+
+ public static void setUseDefaultClassPath(boolean useDefaultClassPath, ILaunchConfigurationWorkingCopy launchConfig) {
+ launchConfig.setAttribute(
+ IJavaLaunchConfigurationConstants.ATTR_DEFAULT_CLASSPATH, useDefaultClassPath);
+ }
+
+ public static boolean isDefaultClasspathSet(ILaunchConfigurationWorkingCopy launchConfig) throws CoreException {
+ return launchConfig.hasAttribute(IJavaLaunchConfigurationConstants.ATTR_DEFAULT_CLASSPATH);
+ }
+
+ public static void setMainType(String mainType, ILaunchConfigurationWorkingCopy launchConfig) {
+ if (isSet(mainType)) {
+ launchConfig.setAttribute(
+ IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, mainType);
+ }
+ }
+
+ public static boolean isMainTypeSet(ILaunchConfigurationWorkingCopy launchConfig) throws CoreException {
+ return launchConfig.hasAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME);
+ }
+
+ public static void setWorkingDirectory(String directory, ILaunchConfigurationWorkingCopy launchConfig) {
+ if (isSet(directory)) {
+ launchConfig.setAttribute(
+ IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, directory);
+ }
+ }
+
+ public static boolean isWorkingDirectorySet(ILaunchConfigurationWorkingCopy launchConfig) throws CoreException {
+ return launchConfig.hasAttribute(IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY);
+ }
+
+ public static void setServerId(String serverId, ILaunchConfigurationWorkingCopy launchConfig) {
+ if (isSet(serverId)) {
+ launchConfig.setAttribute(
+ AbstractJBossLaunchConfigType.SERVER_ID, serverId);
+ }
+ }
+
+ public static boolean isServerIdSet(ILaunchConfigurationWorkingCopy launchConfig) throws CoreException {
+ return launchConfig.hasAttribute(AbstractJBossLaunchConfigType.SERVER_ID);
+ }
+
+ public static void setHost(String host, ILaunchConfigurationWorkingCopy launchConfig) throws CoreException {
+ if (isSet(host)) {
+ String currentHost = getHost(launchConfig);
+ if (currentHost == null
+ || !host.equals(currentHost)) {
+ String programArguments = getProgramArguments(launchConfig);
+ programArguments = ArgsUtil.setArg(programArguments,
+ IJBossRuntimeConstants.STARTUP_ARG_HOST_SHORT,
+ IJBossRuntimeConstants.STARTUP_ARG_HOST_LONG,
+ host);
+ setProgramArguments(programArguments, launchConfig);
+ }
+ }
+ }
+
+ public static boolean isHostSet(ILaunchConfigurationWorkingCopy launchConfig) throws CoreException {
+ String value = ArgsUtil.getValue(getProgramArguments(launchConfig),
+ IJBossRuntimeConstants.STARTUP_ARG_HOST_SHORT,
+ IJBossRuntimeConstants.STARTUP_ARG_HOST_LONG);
+ return value != null;
+ }
+
+ public static void setProgramArguments(String programArguments, ILaunchConfigurationWorkingCopy launchConfig)
+ throws CoreException {
+ launchConfig.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, programArguments);
+ }
+
+ public static String getProgramArguments(ILaunchConfigurationWorkingCopy launchConfig) throws CoreException {
+ return launchConfig.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, ""); //$NON-NLS-1$;
+ }
+
+ public static boolean areProgramArgumentsSet(ILaunchConfigurationWorkingCopy launchConfig) throws CoreException {
+ return launchConfig.hasAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS);
+ }
+
+ public static boolean isConfigSet(ILaunchConfigurationWorkingCopy launchConfig) throws CoreException {
+ String value = ArgsUtil.getValue(getProgramArguments(launchConfig),
+ IJBossRuntimeConstants.STARTUP_ARG_CONFIG_SHORT,
+ IJBossRuntimeConstants.STARTUP_ARG_CONFIG_LONG);
+ return value != null;
+ }
+
+ public static String getHost(ILaunchConfigurationWorkingCopy launchConfig) throws CoreException {
+ return ArgsUtil.getValue(getProgramArguments(launchConfig),
+ IJBossRuntimeConstants.STARTUP_ARG_HOST_SHORT,
+ IJBossRuntimeConstants.STARTUP_ARG_HOST_LONG);
+ }
+
+ public static void setConfig(String config, ILaunchConfigurationWorkingCopy launchConfig) throws CoreException {
+ if (isSet(config)) {
+ String programArguments = getProgramArguments(launchConfig);
+ programArguments = ArgsUtil.setArg(programArguments,
+ IJBossRuntimeConstants.STARTUP_ARG_CONFIG_SHORT,
+ IJBossRuntimeConstants.STARTUP_ARG_CONFIG_LONG, config);
+ setProgramArguments(programArguments, launchConfig);
+ }
+ }
+
+ public static void setJreContainer(String vmContainerPath, ILaunchConfigurationWorkingCopy launchConfig) {
+ if (isSet(vmContainerPath)) {
+ launchConfig.setAttribute(IJavaLaunchConfigurationConstants.ATTR_JRE_CONTAINER_PATH, vmContainerPath);
+ }
+ }
+
+ public static boolean isJreContainerSet(ILaunchConfigurationWorkingCopy launchConfig) throws CoreException {
+ return launchConfig.hasAttribute(IJavaLaunchConfigurationConstants.ATTR_JRE_CONTAINER_PATH);
+ }
+
+ public static void setServerHome(String serverHome, IJBossServerRuntime runtime,
+ ILaunchConfigurationWorkingCopy launchConfig) throws CoreException {
+ if (isSet(serverHome)) {
+ String programArguments = getProgramArguments(launchConfig);
+ String arguments = ArgsUtil.setArg(programArguments,
+ null,
+ IJBossRuntimeConstants.SYSPROP + IJBossRuntimeConstants.JBOSS_SERVER_HOME_URL,
+ serverHome);
+ setProgramArguments(arguments, launchConfig);
+ }
+ }
+
+ public static boolean isServerHomeSet(ILaunchConfigurationWorkingCopy launchConfig) throws CoreException {
+ String value = ArgsUtil.getValue(getProgramArguments(launchConfig),
+ null,
+ IJBossRuntimeConstants.SYSPROP + IJBossRuntimeConstants.JBOSS_SERVER_HOME_URL);
+ return value != null;
+ }
+
+ public static void setClasspathProvider(String classpathProvider, ILaunchConfigurationWorkingCopy launchConfig) {
+ if (isSet(classpathProvider)) {
+ launchConfig.setAttribute(IJavaLaunchConfigurationConstants.ATTR_CLASSPATH_PROVIDER, classpathProvider);
+ }
+ }
+
+ public static boolean isClasspathProviderSet(ILaunchConfigurationWorkingCopy launchConfig) throws CoreException {
+ return launchConfig.hasAttribute(IJavaLaunchConfigurationConstants.ATTR_CLASSPATH_PROVIDER);
+ }
+
+ public static void setEndorsedDir(String endorsedDir, ILaunchConfigurationWorkingCopy launchConfig)
+ throws CoreException {
+ if (isSet(endorsedDir)) {
+ String vmArguments = getVMArguments(launchConfig);
+ vmArguments = ArgsUtil.setArg(vmArguments,
+ null, IJBossRuntimeConstants.SYSPROP + IJBossRuntimeConstants.ENDORSED_DIRS, endorsedDir);
+ setVmArguments(vmArguments, launchConfig);
+ }
+ }
+
+ public static boolean isEndorsedDirSet(ILaunchConfigurationWorkingCopy launchConfig) throws CoreException {
+ String value = ArgsUtil.getValue(getVMArguments(launchConfig),
+ null,
+ IJBossRuntimeConstants.SYSPROP + IJBossRuntimeConstants.ENDORSED_DIRS);
+ return value != null;
+ }
+
+ public static void setVmArguments(String vmArguments, ILaunchConfigurationWorkingCopy launchConfig) {
+ if (isSet(vmArguments)) {
+ launchConfig.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, vmArguments);
+ }
+ }
+
+ public static String getVMArguments(ILaunchConfigurationWorkingCopy launchConfig) throws CoreException {
+ return launchConfig.getAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, ""); //$NON-NLS-1$
+ }
+
+ public static boolean areVMArgumentsSet(ILaunchConfigurationWorkingCopy launchConfig) throws CoreException {
+ return launchConfig.hasAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS);
+ }
+
+ public static void setEnvironmentVariables(Map<String, String> environmentVariables,
+ ILaunchConfigurationWorkingCopy launchConfig) {
+ if (isSet(environmentVariables)) {
+ launchConfig.setAttribute(ILaunchManager.ATTR_ENVIRONMENT_VARIABLES, environmentVariables);
+ }
+ }
+
+ public static boolean areEnvironmentVariablesSet(ILaunchConfigurationWorkingCopy launchConfig) throws CoreException {
+ return launchConfig.hasAttribute(ILaunchManager.ATTR_ENVIRONMENT_VARIABLES);
+ }
+
+ @SuppressWarnings("unchecked")
+ public static List<String> getClasspath(ILaunchConfigurationWorkingCopy launchConfig) throws CoreException {
+ return (List<String>) launchConfig.getAttribute(
+ IJavaLaunchConfigurationConstants.ATTR_CLASSPATH, new ArrayList<String>());
+ }
+
+ private static boolean isSet(String value) {
+ return value != null && value.length() > 0;
+ }
+
+ private static boolean isSet(List<String> list) {
+ return list != null;
+ }
+
+ private static boolean isSet(Map<String, String> map) {
+ return map != null;
+ }
+
+}
Property changes on: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/JBossRuntimeLaunchConfigUtils.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/JBossStartupConfigurator.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/JBossStartupConfigurator.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/JBossStartupConfigurator.java 2011-06-27 22:07:56 UTC (rev 32379)
@@ -0,0 +1,112 @@
+/*******************************************************************************
+ * 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.core.server.internal.launch;
+
+import java.net.MalformedURLException;
+import java.util.List;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.wst.server.core.IServer;
+import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
+import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
+import org.jboss.ide.eclipse.as.core.util.IJBossRuntimeConstants;
+import org.jboss.ide.eclipse.as.core.util.IJBossRuntimeResourceConstants;
+import org.jboss.ide.eclipse.as.core.util.LaunchConfigUtils;
+import org.jboss.ide.eclipse.as.core.util.ServerUtil;
+
+public class JBossStartupConfigurator extends AbstractStartupConfigurator {
+
+ public JBossStartupConfigurator(IServer server) throws CoreException {
+ super(server);
+ }
+
+ @Override
+ protected String getMainType() {
+ return IJBossRuntimeConstants.START_MAIN_TYPE;
+ }
+
+ @Override
+ protected String getWorkingDirectory(JBossServer server, IJBossServerRuntime runtime) throws CoreException {
+ return ServerUtil.checkedGetServerHome(server)
+ + Path.SEPARATOR
+ + IJBossRuntimeResourceConstants.BIN;
+ }
+
+ @Override
+ protected List<String> getClasspath(JBossServer server, IJBossServerRuntime runtime, List<String> currentClasspath) throws CoreException {
+ try {
+ boolean replaced = replaceRunJarContainer(server, currentClasspath);
+ if (!replaced) {
+ String runJarEntry = LaunchConfigUtils.getRunJarRuntimeCPEntry(server.getServer()).getMemento();
+ currentClasspath.add(runJarEntry);
+ }
+ return currentClasspath;
+ } catch (CoreException ce) {
+ return currentClasspath;
+ }
+ }
+
+ private boolean replaceRunJarContainer(JBossServer server, List<String> classpath)
+ throws CoreException {
+ boolean replaced = false;
+ for (int i = 0; i < classpath.size(); i++) {
+ String classPathEntry = classpath.get(0);
+ if (classPathEntry.contains(RunJarContainerWrapper.ID)) {
+ replaced = true;
+ classpath.set(i, LaunchConfigUtils.getRunJarRuntimeCPEntry(server.getServer()).getMemento());
+ }
+ }
+ return replaced;
+ }
+
+ @Override
+ protected String getHost(JBossServer server, IJBossServerRuntime runtime) {
+ return server.getServer().getHost();
+ }
+
+ @Override
+ protected String getServerHome(IJBossServerRuntime runtime) {
+ String serverHome = null;
+ try {
+ serverHome = runtime.getConfigLocationFullPath().toFile().toURL().toString();
+ } catch (MalformedURLException murle) {
+ }
+ return serverHome;
+ }
+
+ @Override
+ protected String getServerConfig(IJBossServerRuntime runtime) {
+ return runtime.getJBossConfiguration();
+ }
+
+ @Override
+ protected String getEndorsedDir(IJBossServerRuntime runtime) {
+ return runtime.getRuntime().getLocation().append(
+ IJBossRuntimeResourceConstants.LIB).append(
+ IJBossRuntimeResourceConstants.ENDORSED).toOSString();
+ }
+
+ @Override
+ protected String getDefaultProgramArguments(JBossServer server, IJBossServerRuntime runtime) {
+ return runtime.getDefaultRunArgs() +
+ IJBossRuntimeConstants.SPACE + IJBossRuntimeConstants.STARTUP_ARG_HOST_SHORT +
+ IJBossRuntimeConstants.SPACE + server.getServer().getHost();
+ }
+
+ @Override
+ protected String getDefaultVMArguments(IJBossServerRuntime runtime) {
+ // not needed
+ return null;
+ }
+
+
+}
\ No newline at end of file
Property changes on: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/JBossStartupConfigurator.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/LocalJBossServerStartLaunchDelegate.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/LocalJBossServerStartLaunchDelegate.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/LocalJBossServerStartLaunchDelegate.java 2011-06-27 22:07:56 UTC (rev 32379)
@@ -0,0 +1,142 @@
+/*******************************************************************************
+ * 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.core.server.internal.launch;
+
+import java.util.ArrayList;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.core.model.IProcess;
+import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
+import org.eclipse.jdt.launching.IRuntimeClasspathEntry;
+import org.eclipse.jdt.launching.IVMInstall;
+import org.eclipse.jdt.launching.StandardClasspathProvider;
+import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.core.ServerCore;
+import org.jboss.ide.eclipse.as.core.extensions.polling.WebPortPoller;
+import org.jboss.ide.eclipse.as.core.server.internal.AbstractLocalJBossServerRuntime;
+import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
+import org.jboss.ide.eclipse.as.core.server.internal.JBossServerBehavior;
+import org.jboss.ide.eclipse.as.core.server.internal.LocalJBossBehaviorDelegate;
+import org.jboss.ide.eclipse.as.core.server.internal.launch.JBossServerStartupLaunchConfiguration.IStartLaunchSetupParticipant;
+import org.jboss.ide.eclipse.as.core.server.internal.launch.JBossServerStartupLaunchConfiguration.StartLaunchDelegate;
+import org.jboss.ide.eclipse.as.core.util.IJBossToolingConstants;
+import org.jboss.ide.eclipse.as.core.util.JBossServerBehaviorUtils;
+import org.jboss.ide.eclipse.as.core.util.LaunchConfigUtils;
+
+/**
+ * @author Rob Stryker
+ * @author André Dietisheim
+ */
+public class LocalJBossServerStartLaunchDelegate implements StartLaunchDelegate, IStartLaunchSetupParticipant {
+
+ public void setupLaunchConfiguration(
+ ILaunchConfigurationWorkingCopy workingCopy, IServer server) throws CoreException {
+ new JBossStartupConfigurator(server).configure(workingCopy);
+ }
+
+ /*
+ * Actual instance methods
+ */
+ public void actualLaunch(
+ JBossServerStartupLaunchConfiguration launchConfig,
+ ILaunchConfiguration configuration, String mode, ILaunch launch,
+ IProgressMonitor monitor) throws CoreException {
+ launchConfig.superActualLaunch(configuration, mode, launch, monitor);
+ }
+
+ public boolean preLaunchCheck(ILaunchConfiguration configuration, String mode, IProgressMonitor monitor)
+ throws CoreException {
+ JBossServerBehavior jbsBehavior = JBossServerBehaviorUtils.getServerBehavior(configuration);
+ if (!jbsBehavior.canStart(mode).isOK())
+ throw new CoreException(jbsBehavior.canStart(mode));
+ String ignore = jbsBehavior.getServer().getAttribute(IJBossToolingConstants.IGNORE_LAUNCH_COMMANDS,
+ (String) null);
+ Boolean ignoreB = ignore == null ? new Boolean(false) : new Boolean(ignore);
+ if (ignoreB.booleanValue()) {
+ jbsBehavior.setServerStarting();
+ jbsBehavior.setServerStarted();
+ return false;
+ }
+ boolean started = WebPortPoller.onePing(jbsBehavior.getServer());
+ if (started) {
+ jbsBehavior.setServerStarting();
+ jbsBehavior.setServerStarted();
+ return false;
+ }
+
+ return true;
+ }
+
+ public void preLaunch(ILaunchConfiguration configuration,
+ String mode, ILaunch launch, IProgressMonitor monitor) throws CoreException {
+ try {
+ JBossServerBehavior jbsBehavior = JBossServerBehaviorUtils.getServerBehavior(configuration);
+ jbsBehavior.setRunMode(mode);
+ jbsBehavior.serverStarting();
+ } catch (CoreException ce) {
+ // report it
+ }
+ }
+
+ public void postLaunch(ILaunchConfiguration configuration, String mode,
+ ILaunch launch, IProgressMonitor monitor) throws CoreException {
+ try {
+ IProcess[] processes = launch.getProcesses();
+ JBossServerBehavior jbsBehavior = JBossServerBehaviorUtils.getServerBehavior(configuration);
+ ((LocalJBossBehaviorDelegate) (jbsBehavior.getDelegate())).setProcess(processes[0]);
+ } catch (CoreException ce) {
+ // report
+ }
+ }
+
+ public static class JBossServerDefaultClasspathProvider extends StandardClasspathProvider {
+ public IRuntimeClasspathEntry[] computeUnresolvedClasspath(ILaunchConfiguration configuration)
+ throws CoreException {
+ boolean useDefault = configuration.getAttribute(IJavaLaunchConfigurationConstants.ATTR_DEFAULT_CLASSPATH,
+ true);
+ if (useDefault) {
+ return defaultEntries(configuration);
+ }
+ return super.computeUnresolvedClasspath(configuration);
+ }
+
+ protected IRuntimeClasspathEntry[] defaultEntries(ILaunchConfiguration config) {
+ try {
+ String server = config.getAttribute(AbstractJBossLaunchConfigType.SERVER_ID, (String) null);
+ IServer s = ServerCore.findServer(server);
+ AbstractLocalJBossServerRuntime ibjsrt = (AbstractLocalJBossServerRuntime)
+ s.getRuntime().loadAdapter(AbstractLocalJBossServerRuntime.class, new NullProgressMonitor());
+ JBossServer jbs = (JBossServer) s.loadAdapter(JBossServer.class, new NullProgressMonitor());
+ IVMInstall install = ibjsrt.getVM();
+ ArrayList<IRuntimeClasspathEntry> list = new ArrayList<IRuntimeClasspathEntry>();
+ LaunchConfigUtils.addJREEntry(install, list);
+ list.add(LaunchConfigUtils.getRunJarRuntimeCPEntry(s));
+ return (IRuntimeClasspathEntry[]) list
+ .toArray(new IRuntimeClasspathEntry[list.size()]);
+ } catch (CoreException ce) {
+ // ignore
+ }
+
+ try {
+ return super.computeUnresolvedClasspath(config);
+ } catch (CoreException ce) {
+ // ignore
+ }
+ return new IRuntimeClasspathEntry[] {};
+ }
+ }
+
+}
Property changes on: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/LocalJBossServerStartLaunchDelegate.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/LocalJBossServerStartupLaunchUtil.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/LocalJBossServerStartupLaunchUtil.java 2011-06-27 22:03:27 UTC (rev 32378)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/LocalJBossServerStartupLaunchUtil.java 2011-06-27 22:07:56 UTC (rev 32379)
@@ -10,51 +10,34 @@
******************************************************************************/
package org.jboss.ide.eclipse.as.core.server.internal.launch;
-import java.net.MalformedURLException;
import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Status;
import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.debug.core.model.IProcess;
import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
import org.eclipse.jdt.launching.IRuntimeClasspathEntry;
import org.eclipse.jdt.launching.IVMInstall;
-import org.eclipse.jdt.launching.JavaRuntime;
import org.eclipse.jdt.launching.StandardClasspathProvider;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.wst.server.core.IRuntime;
import org.eclipse.wst.server.core.IServer;
import org.eclipse.wst.server.core.ServerCore;
-import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
-import org.jboss.ide.eclipse.as.core.Messages;
import org.jboss.ide.eclipse.as.core.extensions.polling.WebPortPoller;
-import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
import org.jboss.ide.eclipse.as.core.server.internal.AbstractLocalJBossServerRuntime;
import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
import org.jboss.ide.eclipse.as.core.server.internal.JBossServerBehavior;
import org.jboss.ide.eclipse.as.core.server.internal.LocalJBossBehaviorDelegate;
import org.jboss.ide.eclipse.as.core.server.internal.launch.JBossServerStartupLaunchConfiguration.IStartLaunchSetupParticipant;
import org.jboss.ide.eclipse.as.core.server.internal.launch.JBossServerStartupLaunchConfiguration.StartLaunchDelegate;
-import org.jboss.ide.eclipse.as.core.util.ArgsUtil;
-import org.jboss.ide.eclipse.as.core.util.IConstants;
import org.jboss.ide.eclipse.as.core.util.IJBossRuntimeConstants;
import org.jboss.ide.eclipse.as.core.util.IJBossRuntimeResourceConstants;
import org.jboss.ide.eclipse.as.core.util.IJBossToolingConstants;
import org.jboss.ide.eclipse.as.core.util.JBossServerBehaviorUtils;
import org.jboss.ide.eclipse.as.core.util.LaunchConfigUtils;
-import org.jboss.ide.eclipse.as.core.util.RuntimeUtils;
-import org.jboss.ide.eclipse.as.core.util.ServerConverter;
-import org.jboss.ide.eclipse.as.core.util.ServerUtil;
/**
* @author Rob Stryker
@@ -69,180 +52,9 @@
public void setupLaunchConfiguration(
ILaunchConfigurationWorkingCopy workingCopy, IServer server) throws CoreException {
- JBossServer jbs = ServerConverter.checkedGetJBossServer(server);
- if (!workingCopy.getAttributes().containsKey(DEFAULTS_SET)) {
- forceDefaultsSet(workingCopy, jbs);
- }
-
- upgradeOldLaunchConfig(workingCopy, jbs);
-
- // Force the launch to get certain fields from the runtime
- updateMandatedFields(workingCopy, jbs);
+ new JBossStartupConfigurator(server).configure(workingCopy);
}
- private void upgradeOldLaunchConfig(ILaunchConfigurationWorkingCopy workingCopy, JBossServer jbs)
- throws CoreException {
- String cpProvider = workingCopy.getAttribute(
- IJavaLaunchConfigurationConstants.ATTR_CLASSPATH_PROVIDER, (String) null);
- if (!DEFAULT_CP_PROVIDER_ID.equals(cpProvider)) {
- workingCopy.setAttribute(IJavaLaunchConfigurationConstants.ATTR_CLASSPATH_PROVIDER, DEFAULT_CP_PROVIDER_ID);
- workingCopy.setAttribute(IJavaLaunchConfigurationConstants.ATTR_CLASSPATH, getClasspath(jbs));
- workingCopy.setAttribute(IJavaLaunchConfigurationConstants.ATTR_DEFAULT_CLASSPATH, false);
- }
- }
-
- /*
- * Ensures that the working directory and classpath are 100% accurate.
- * Merges proper required params into args and vm args
- */
- protected void updateMandatedFields(ILaunchConfigurationWorkingCopy wc, JBossServer jbs)
- throws CoreException {
- String serverHome = ServerUtil.checkedGetServerHome(jbs);
- IJBossServerRuntime runtime = RuntimeUtils.checkedGetJBossServerRuntime(jbs.getServer());
-
- updateVMPath(runtime, wc);
- wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY,
- serverHome + Path.SEPARATOR + IJBossRuntimeResourceConstants.BIN);
- updateProgramArguments(wc, jbs, runtime);
- updateVMArgs(wc, runtime);
- updateClassPath(wc, jbs);
- wc.setAttribute(AbstractJBossLaunchConfigType.SERVER_ID, jbs.getServer().getId());
- }
-
- private void updateVMPath(IJBossServerRuntime runtime, ILaunchConfigurationWorkingCopy wc) {
- IVMInstall vmInstall = runtime.getVM();
- if (vmInstall != null)
- wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_JRE_CONTAINER_PATH,
- JavaRuntime.newJREContainerPath(vmInstall).toPortableString());
- }
-
- private void updateClassPath(ILaunchConfigurationWorkingCopy wc, JBossServer jbs) throws CoreException {
- List<String> newCP = updateRunJarEntry(wc, jbs);
- wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_CLASSPATH, newCP);
- }
-
- private void updateVMArgs(ILaunchConfigurationWorkingCopy wc, IJBossServerRuntime runtime) throws CoreException {
- String vmArgs = wc.getAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, ""); //$NON-NLS-1$
- vmArgs = updateEndorsedDir(vmArgs, runtime);
- wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, vmArgs.trim());
- }
-
- private void updateProgramArguments(ILaunchConfigurationWorkingCopy wc, JBossServer jbs, IJBossServerRuntime runtime)
- throws CoreException {
- String args = wc.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, ""); //$NON-NLS-1$
- String host = jbs.getServer().getHost();
- args = updateHostArgument(host, args);
- args = updateConfigArgument(args, runtime);
- args = updateServerHomeArgument(args, runtime);
- wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, args.trim());
- }
-
- private String updateEndorsedDir(String vmArgs, IJBossServerRuntime runtime) {
- return ArgsUtil.setArg(vmArgs, null,
- IJBossRuntimeConstants.SYSPROP + IJBossRuntimeConstants.ENDORSED_DIRS,
- runtime.getRuntime().getLocation().append(
- IJBossRuntimeResourceConstants.LIB).append(
- IJBossRuntimeResourceConstants.ENDORSED).toOSString(), true);
- }
-
- private String updateConfigArgument(String args, IJBossServerRuntime runtime) {
- String config = runtime.getJBossConfiguration();
- args = ArgsUtil.setArg(args,
- IJBossRuntimeConstants.STARTUP_ARG_CONFIG_SHORT,
- IJBossRuntimeConstants.STARTUP_ARG_CONFIG_LONG, config);
- return args;
- }
-
- private String updateServerHomeArgument(String args, IJBossServerRuntime runtime) {
-
- try {
- if (!runtime.getConfigLocation().equals(IConstants.SERVER)) {
- args = ArgsUtil.setArg(args, null,
- IJBossRuntimeConstants.SYSPROP + IJBossRuntimeConstants.JBOSS_SERVER_HOME_URL,
- runtime.getConfigLocationFullPath().toFile().toURL().toString());
- }
- } catch (MalformedURLException murle) {
- }
- return args;
- }
-
- private String updateHostArgument(String host, String args) {
- String argsHost = ArgsUtil.getValue(args,
- IJBossRuntimeConstants.STARTUP_ARG_HOST_SHORT,
- IJBossRuntimeConstants.STARTUP_ARG_HOST_LONG);
-
- if (!host.equals(argsHost))
- args = ArgsUtil.setArg(args,
- IJBossRuntimeConstants.STARTUP_ARG_HOST_SHORT,
- IJBossRuntimeConstants.STARTUP_ARG_HOST_LONG, host);
- return args;
- }
-
- protected List<String> updateRunJarEntry(ILaunchConfigurationWorkingCopy wc, JBossServer jbs) throws CoreException {
- List<String> cp = wc.getAttribute(IJavaLaunchConfigurationConstants.ATTR_CLASSPATH, new ArrayList<String>());
- try {
- boolean found = false;
- String[] asString = (String[]) cp.toArray(new String[cp.size()]);
- for (int i = 0; i < asString.length; i++) {
- if (asString[i].contains(RunJarContainerWrapper.ID)) {
- found = true;
- asString[i] = LaunchConfigUtils.getRunJarRuntimeCPEntry(jbs.getServer()).getMemento();
- }
- }
- List<String> result = new ArrayList<String>();
- result.addAll(Arrays.asList(asString));
- if (!found)
- result.add(LaunchConfigUtils.getRunJarRuntimeCPEntry(jbs.getServer()).getMemento());
- return result;
- } catch (CoreException ce) {
- return cp;
- }
- }
-
- protected void forceDefaultsSet(ILaunchConfigurationWorkingCopy wc, JBossServer jbs) throws CoreException {
- String serverHome = ServerUtil.checkedGetServerHome(jbs);
- IJBossServerRuntime jbrt = RuntimeUtils.checkedGetJBossServerRuntime(jbs.getServer());
- updateVMPath(jbrt, wc);
- wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, getDefaultArgs(jbs));
- wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, jbrt.getDefaultRunVMArgs());
- wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, START_MAIN_TYPE);
- wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, serverHome + Path.SEPARATOR
- + IJBossRuntimeResourceConstants.BIN);
- wc.setAttribute(ILaunchManager.ATTR_ENVIRONMENT_VARIABLES, jbrt.getDefaultRunEnvVars());
- wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_CLASSPATH, getClasspath(jbs));
- wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_CLASSPATH_PROVIDER, DEFAULT_CP_PROVIDER_ID);
- wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_DEFAULT_CLASSPATH, false);
-
- wc.setAttribute(DEFAULTS_SET, true);
- }
-
- private List<String> getClasspath(JBossServer jbs) throws CoreException {
- IJBossServerRuntime jbrt = RuntimeUtils.checkedGetJBossServerRuntime(jbs.getServer());
- ArrayList<IRuntimeClasspathEntry> classpath = new ArrayList<IRuntimeClasspathEntry>();
- classpath.add(LaunchConfigUtils.getRunJarRuntimeCPEntry(jbs.getServer()));
- LaunchConfigUtils.addJREEntry(jbrt.getVM(), classpath);
-
- String version = jbs.getServer().getRuntime().getRuntimeType().getVersion();
- if (version.equals(IJBossToolingConstants.AS_40))
- LaunchConfigUtils.addToolsJar(jbrt.getVM(), classpath);
-
- List<String> runtimeClassPaths = LaunchConfigUtils.toStrings(classpath);
- return runtimeClassPaths;
- }
-
- protected String getDefaultArgs(JBossServer jbs) throws CoreException {
- IJBossServerRuntime rt = RuntimeUtils.checkedGetJBossServerRuntime(jbs.getServer());
- if (rt != null) {
- return rt.getDefaultRunArgs() +
- IJBossRuntimeConstants.SPACE + IJBossRuntimeConstants.STARTUP_ARG_HOST_SHORT +
- IJBossRuntimeConstants.SPACE + jbs.getServer().getHost();
- }
- return null;
- }
-
- /* For "restore defaults" functionality */
- private static final String DEFAULT_CP_PROVIDER_ID = "org.jboss.ide.eclipse.as.core.server.internal.launch.serverClasspathProvider"; //$NON-NLS-1$
-
public static class JBossServerDefaultClasspathProvider extends StandardClasspathProvider {
public IRuntimeClasspathEntry[] computeUnresolvedClasspath(ILaunchConfiguration configuration)
throws CoreException {
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7RuntimeLaunchConfigurator.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7RuntimeLaunchConfigurator.java 2011-06-27 22:03:27 UTC (rev 32378)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7RuntimeLaunchConfigurator.java 2011-06-27 22:07:56 UTC (rev 32379)
@@ -1,126 +0,0 @@
-/*******************************************************************************
- * 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.core.server.internal.v7;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
-import org.eclipse.jdt.launching.IRuntimeClasspathEntry;
-import org.eclipse.jdt.launching.IVMInstall;
-import org.eclipse.jdt.launching.JavaRuntime;
-import org.eclipse.wst.server.core.IRuntime;
-import org.eclipse.wst.server.core.IServer;
-import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
-import org.jboss.ide.eclipse.as.core.server.internal.launch.AbstractJBossLaunchConfigType;
-import org.jboss.ide.eclipse.as.core.util.IJBossRuntimeConstants;
-import org.jboss.ide.eclipse.as.core.util.IJBossRuntimeResourceConstants;
-import org.jboss.ide.eclipse.as.core.util.LaunchConfigUtils;
-import org.jboss.ide.eclipse.as.core.util.RuntimeUtils;
-
-public class JBoss7RuntimeLaunchConfigurator {
-
- private static final String DEFAULTS_SET = "DEFAULTS_SET"; //$NON-NLS-1$
- private ILaunchConfigurationWorkingCopy launchConfig;
-
- public JBoss7RuntimeLaunchConfigurator(ILaunchConfigurationWorkingCopy launchConfig) {
- this.launchConfig = launchConfig;
- }
-
- public void apply(IServer server) throws CoreException {
- if (!areDefaultsSet()) {
- IRuntime runtime = server.getRuntime();
- IJBossServerRuntime jbossRuntime = RuntimeUtils.checkedGetJBossServerRuntime(server);
- setVmContainer(jbossRuntime)
- .setClassPath(server, jbossRuntime)
- .setDefaultArguments(jbossRuntime)
- .setMainType(IJBossRuntimeConstants.START7_MAIN_TYPE)
- .setWorkingDirectory(runtime)
- .setServerId(server)
- .setDefaultsSet();
- }
- }
-
- private JBoss7RuntimeLaunchConfigurator setVmContainer(IJBossServerRuntime jbossRuntime) {
- IVMInstall vmInstall = jbossRuntime.getVM();
- if (vmInstall != null) {
- setVmContainer(JavaRuntime.newJREContainerPath(vmInstall).toPortableString());
- }
- return this;
- }
-
- private JBoss7RuntimeLaunchConfigurator setVmContainer(String vmPath) {
- launchConfig.setAttribute(
- IJavaLaunchConfigurationConstants.ATTR_JRE_CONTAINER_PATH, vmPath);
- return this;
- }
-
- private JBoss7RuntimeLaunchConfigurator setDefaultArguments(IJBossServerRuntime jbossRuntime) {
- launchConfig.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS,
- jbossRuntime.getDefaultRunArgs());
- launchConfig.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS,
- jbossRuntime.getDefaultRunVMArgs());
- return this;
- }
-
- private JBoss7RuntimeLaunchConfigurator setClassPath(IServer server, IJBossServerRuntime jbossRuntime)
- throws CoreException {
- return setClassPath(getClasspath(server, jbossRuntime.getVM()));
- }
-
- private List<String> getClasspath(IServer server, IVMInstall vmInstall) throws CoreException {
- List<IRuntimeClasspathEntry> classpath = new ArrayList<IRuntimeClasspathEntry>();
- classpath.add(LaunchConfigUtils.getModulesClasspathEntry(server));
- LaunchConfigUtils.addJREEntry(vmInstall, classpath);
- List<String> runtimeClassPaths = LaunchConfigUtils.toStrings(classpath);
- return runtimeClassPaths;
- }
-
- private JBoss7RuntimeLaunchConfigurator setClassPath(List<String> entries) throws CoreException {
- launchConfig.setAttribute(IJavaLaunchConfigurationConstants.ATTR_CLASSPATH_PROVIDER,
- JBoss7ServerBehavior.DEFAULT_CP_PROVIDER_ID);
- launchConfig.setAttribute(IJavaLaunchConfigurationConstants.ATTR_CLASSPATH, entries);
- launchConfig.setAttribute(IJavaLaunchConfigurationConstants.ATTR_DEFAULT_CLASSPATH, false);
- return this;
- }
-
- private JBoss7RuntimeLaunchConfigurator setMainType(String mainType) {
- launchConfig.setAttribute(
- IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, mainType);
- return this;
- }
-
- private JBoss7RuntimeLaunchConfigurator setWorkingDirectory(IRuntime runtime) {
- setWorkingDirectory(runtime.getLocation().append(IJBossRuntimeResourceConstants.BIN).toString());
- return this;
- }
-
- private JBoss7RuntimeLaunchConfigurator setWorkingDirectory(String directory) {
- launchConfig.setAttribute(
- IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, directory);
- return this;
- }
-
- private JBoss7RuntimeLaunchConfigurator setServerId(IServer server) {
- launchConfig.setAttribute(AbstractJBossLaunchConfigType.SERVER_ID, server.getId());
- return this;
- }
-
- private boolean areDefaultsSet() throws CoreException {
- return launchConfig.hasAttribute(DEFAULTS_SET);
- }
-
- private void setDefaultsSet() {
- launchConfig.setAttribute(DEFAULTS_SET, true);
- }
-}
\ No newline at end of file
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7ServerBehavior.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7ServerBehavior.java 2011-06-27 22:03:27 UTC (rev 32378)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7ServerBehavior.java 2011-06-27 22:07:56 UTC (rev 32379)
@@ -29,8 +29,6 @@
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.debug.core.model.IProcess;
import org.eclipse.wst.server.core.IModule;
-import org.eclipse.wst.server.core.IRuntime;
-import org.eclipse.wst.server.core.IServer;
import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
import org.jboss.ide.eclipse.as.core.Messages;
import org.jboss.ide.eclipse.as.core.extensions.events.IEventCodes;
@@ -76,9 +74,7 @@
public void setupLaunchConfiguration(ILaunchConfigurationWorkingCopy launchConfig, IProgressMonitor monitor)
throws CoreException {
- IServer server = getServer();
- IRuntime runtime = server.getRuntime();
- new JBoss7RuntimeLaunchConfigurator(launchConfig).apply(server);
+ new JBoss7StartupConfigurator(getServer()).configure(launchConfig);
}
public void setProcess(IProcess process) {
Copied: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7StartupConfigurator.java (from rev 32343, trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7RuntimeLaunchConfigurator.java)
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7StartupConfigurator.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7StartupConfigurator.java 2011-06-27 22:07:56 UTC (rev 32379)
@@ -0,0 +1,88 @@
+/*******************************************************************************
+ * 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.core.server.internal.v7;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jdt.launching.IRuntimeClasspathEntry;
+import org.eclipse.jdt.launching.IVMInstall;
+import org.eclipse.wst.server.core.IServer;
+import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
+import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
+import org.jboss.ide.eclipse.as.core.server.internal.launch.AbstractStartupConfigurator;
+import org.jboss.ide.eclipse.as.core.util.IJBossRuntimeConstants;
+import org.jboss.ide.eclipse.as.core.util.IJBossRuntimeResourceConstants;
+import org.jboss.ide.eclipse.as.core.util.LaunchConfigUtils;
+
+public class JBoss7StartupConfigurator extends AbstractStartupConfigurator {
+
+ public JBoss7StartupConfigurator(IServer server) throws CoreException {
+ super(server);
+ }
+
+ @Override
+ protected String getMainType() {
+ return IJBossRuntimeConstants.START7_MAIN_TYPE;
+ }
+
+ @Override
+ protected String getWorkingDirectory(JBossServer server, IJBossServerRuntime runtime) throws CoreException {
+ return runtime.getRuntime().getLocation()
+ .append(IJBossRuntimeResourceConstants.BIN)
+ .toString();
+ }
+
+ @Override
+ protected List<String> getClasspath(JBossServer server, IJBossServerRuntime runtime, List<String> currentClasspath) throws CoreException {
+ IVMInstall vmInstall = runtime.getVM();
+ List<IRuntimeClasspathEntry> classpath = new ArrayList<IRuntimeClasspathEntry>();
+ classpath.add(LaunchConfigUtils.getModulesClasspathEntry(server));
+ LaunchConfigUtils.addJREEntry(vmInstall, classpath);
+ List<String> runtimeClassPaths = LaunchConfigUtils.toStrings(classpath);
+ return runtimeClassPaths;
+ }
+
+ @Override
+ protected String getHost(JBossServer server, IJBossServerRuntime runtime) {
+ // not needed
+ return null;
+ }
+
+ @Override
+ protected String getDefaultProgramArguments(JBossServer server, IJBossServerRuntime runtime) {
+ return runtime.getDefaultRunArgs();
+ }
+
+ @Override
+ protected String getServerHome(IJBossServerRuntime runtime) {
+ // not needed
+ return null;
+ }
+
+ @Override
+ protected String getServerConfig(IJBossServerRuntime runtime) {
+ // not needed
+ return null;
+ }
+
+ @Override
+ protected String getEndorsedDir(IJBossServerRuntime runtime) {
+ // not needed
+ return null;
+ }
+
+ @Override
+ protected String getDefaultVMArguments(IJBossServerRuntime runtime) {
+ return runtime.getDefaultRunVMArgs();
+ }
+}
\ No newline at end of file
Property changes on: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7StartupConfigurator.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/launch/JBossLaunchConfigTests.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/launch/JBossLaunchConfigTests.java (rev 0)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/launch/JBossLaunchConfigTests.java 2011-06-27 22:07:56 UTC (rev 32379)
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * Copyright (c) 2011 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.test.launch;
+
+import static org.jboss.ide.eclipse.as.core.server.internal.launch.JBossRuntimeLaunchConfigUtils.areEnvironmentVariablesSet;
+import static org.jboss.ide.eclipse.as.core.server.internal.launch.JBossRuntimeLaunchConfigUtils.areProgramArgumentsSet;
+import static org.jboss.ide.eclipse.as.core.server.internal.launch.JBossRuntimeLaunchConfigUtils.areVMArgumentsSet;
+import static org.jboss.ide.eclipse.as.core.server.internal.launch.JBossRuntimeLaunchConfigUtils.isClasspathProviderSet;
+import static org.jboss.ide.eclipse.as.core.server.internal.launch.JBossRuntimeLaunchConfigUtils.isClasspathSet;
+import static org.jboss.ide.eclipse.as.core.server.internal.launch.JBossRuntimeLaunchConfigUtils.isConfigSet;
+import static org.jboss.ide.eclipse.as.core.server.internal.launch.JBossRuntimeLaunchConfigUtils.isDefaultClasspathSet;
+import static org.jboss.ide.eclipse.as.core.server.internal.launch.JBossRuntimeLaunchConfigUtils.isEndorsedDirSet;
+import static org.jboss.ide.eclipse.as.core.server.internal.launch.JBossRuntimeLaunchConfigUtils.isHostSet;
+import static org.jboss.ide.eclipse.as.core.server.internal.launch.JBossRuntimeLaunchConfigUtils.isJreContainerSet;
+import static org.jboss.ide.eclipse.as.core.server.internal.launch.JBossRuntimeLaunchConfigUtils.isMainTypeSet;
+import static org.jboss.ide.eclipse.as.core.server.internal.launch.JBossRuntimeLaunchConfigUtils.isServerHomeSet;
+import static org.jboss.ide.eclipse.as.core.server.internal.launch.JBossRuntimeLaunchConfigUtils.isServerIdSet;
+import static org.jboss.ide.eclipse.as.core.server.internal.launch.JBossRuntimeLaunchConfigUtils.isWorkingDirectorySet;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.wst.server.core.IServer;
+import org.jboss.ide.eclipse.as.test.util.ServerRuntimeUtils;
+
+/**
+ * @author André Dietisheim
+ */
+public class JBossLaunchConfigTests extends LaunchConfigTests {
+
+ private IServer mockServer;
+
+ @Override
+ protected void setUp() throws Exception {
+ this.mockServer = ServerRuntimeUtils.createMockJBoss7Server();
+ }
+
+ public void testConfiguration() throws CoreException {
+ ILaunchConfigurationWorkingCopy launchConfig = LaunchConfigConfiguratorFactory.createCustomConfigLocationLaunchConfig(mockServer);
+
+ assertTrue(areProgramArgumentsSet(launchConfig));
+ assertTrue(areVMArgumentsSet(launchConfig));
+ assertTrue(isHostSet(launchConfig));
+ assertTrue(isMainTypeSet(launchConfig));
+ assertTrue(isWorkingDirectorySet(launchConfig));
+ assertTrue(areEnvironmentVariablesSet(launchConfig));
+ assertTrue(isClasspathSet(launchConfig));
+ assertTrue(isClasspathProviderSet(launchConfig));
+ assertTrue(isDefaultClasspathSet(launchConfig));
+ assertTrue(isJreContainerSet(launchConfig));
+ assertTrue(isConfigSet(launchConfig));
+ assertTrue(isServerHomeSet(launchConfig));
+ assertTrue(isEndorsedDirSet(launchConfig));
+ assertTrue(isServerIdSet(launchConfig));
+ }
+
+
+}
Property changes on: trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/launch/JBossLaunchConfigTests.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/launch/LaunchConfigConfiguratorFactory.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/launch/LaunchConfigConfiguratorFactory.java (rev 0)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/launch/LaunchConfigConfiguratorFactory.java 2011-06-27 22:07:56 UTC (rev 32379)
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2011 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.test.launch;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.wst.server.core.IServer;
+import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
+import org.jboss.ide.eclipse.as.core.server.internal.launch.JBossStartupConfigurator;
+
+/**
+ * @author André Dietisheim
+ */
+public class LaunchConfigConfiguratorFactory {
+
+ public static ILaunchConfigurationWorkingCopy createCustomConfigLocationLaunchConfig(IServer mockServer) throws CoreException {
+ MockLaunchConfigWorkingCopy launchConfig = new MockLaunchConfigWorkingCopy();
+ JBossStartupConfigurator configurator = new JBossStartupConfigurator(mockServer) {
+ @Override
+ protected boolean isCustomConfigLocation(IJBossServerRuntime runtime) {
+ return false;
+ }
+ };
+ configurator.configure(launchConfig);
+ return launchConfig;
+ }
+
+ public static MockLaunchConfigWorkingCopy createNonCustomConfigLocationLaunchConfig(IServer server) throws CoreException {
+ MockLaunchConfigWorkingCopy launchConfig = new MockLaunchConfigWorkingCopy();
+ new JBossStartupConfigurator(server).configure(launchConfig);
+ return launchConfig;
+ }
+}
Property changes on: trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/launch/LaunchConfigConfiguratorFactory.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/launch/LaunchConfigTests.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/launch/LaunchConfigTests.java (rev 0)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/launch/LaunchConfigTests.java 2011-06-27 22:07:56 UTC (rev 32379)
@@ -0,0 +1,133 @@
+/*******************************************************************************
+ * Copyright (c) 2011 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.test.launch;
+
+import static org.jboss.ide.eclipse.as.core.server.internal.launch.JBossRuntimeLaunchConfigUtils.isServerHomeSet;
+
+import java.util.List;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.wst.server.core.IServer;
+import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
+import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
+import org.jboss.ide.eclipse.as.core.server.internal.launch.AbstractStartupConfigurator;
+import org.jboss.ide.eclipse.as.core.server.internal.launch.ILaunchConfigConfigurator;
+import org.jboss.ide.eclipse.as.test.util.ServerRuntimeUtils;
+
+/**
+ * @author André Dietisheim
+ */
+public class LaunchConfigTests extends TestCase {
+
+ private IServer mockServer;
+
+ @Override
+ protected void setUp() throws Exception {
+ this.mockServer = ServerRuntimeUtils.createMockJBoss7Server();
+ }
+
+ public void testDoesNotConfigureTwice() throws CoreException {
+ ILaunchConfigurationWorkingCopy launchConfig = new MockLaunchConfigWorkingCopy();
+
+ final String attributeKey = "configurationKey";
+ final String attributeValue = "configurationValue";
+
+ ILaunchConfigConfigurator mockConfigurator = new MockConfigurator(mockServer) {
+
+ @Override
+ protected void doConfigure(ILaunchConfigurationWorkingCopy launchConfig) throws CoreException {
+ /**
+ * should only be called once
+ */
+ launchConfig.setAttribute(attributeKey, attributeValue);
+ }
+ };
+
+ assertEquals("defaultValue", launchConfig.getAttribute(attributeKey, "defaultValue"));
+ launchConfig.setAttribute(attributeKey, "dummyValue");
+ // overrides "dummyValue" by "configurationValue"
+ mockConfigurator.configure(launchConfig);
+ assertEquals(attributeValue, launchConfig.getAttribute(attributeKey, "defaultValue"));
+ launchConfig.setAttribute(attributeKey, "dummyValue");
+ // configure 2nd time: should not override existing value
+ mockConfigurator.configure(launchConfig);
+ assertEquals("dummyValue", launchConfig.getAttribute(attributeKey, "defaultValue"));
+ }
+
+ private class MockConfigurator extends AbstractStartupConfigurator {
+
+ private MockConfigurator(IServer server) throws CoreException {
+ super(server);
+ }
+
+ @Override
+ protected String getWorkingDirectory(JBossServer server, IJBossServerRuntime jbossRuntime) throws CoreException {
+ return null;
+ }
+
+ @Override
+ protected String getServerHome(IJBossServerRuntime runtime) {
+ return null;
+ }
+
+ @Override
+ protected String getMainType() {
+ return null;
+ }
+
+ @Override
+ protected String getDefaultProgramArguments(JBossServer server, IJBossServerRuntime runtime) {
+ return null;
+ }
+
+ @Override
+ protected String getHost(JBossServer server, IJBossServerRuntime runtime) {
+ return null;
+ }
+
+ @Override
+ protected List<String> getClasspath(JBossServer server, IJBossServerRuntime runtime,
+ List<String> currentClasspath)
+ throws CoreException {
+ return null;
+ }
+
+ @Override
+ protected String getServerConfig(IJBossServerRuntime runtime) {
+ return null;
+ }
+
+ @Override
+ protected String getEndorsedDir(IJBossServerRuntime runtime) {
+ return null;
+ }
+
+ @Override
+ protected String getDefaultVMArguments(IJBossServerRuntime runtime) {
+ return null;
+ }
+ };
+
+ public void testServerHomeIsNotSetIfNotCustomConfigLocation() throws CoreException {
+ ILaunchConfigurationWorkingCopy launchConfig = LaunchConfigConfiguratorFactory.createNonCustomConfigLocationLaunchConfig(mockServer);
+
+ assertFalse(isServerHomeSet(launchConfig));
+ }
+
+ public void testServerHomeIsSetIfCustomConfigLocation() throws CoreException {
+ ILaunchConfigurationWorkingCopy launchConfig = LaunchConfigConfiguratorFactory.createCustomConfigLocationLaunchConfig(mockServer);
+
+ assertTrue(isServerHomeSet(launchConfig));
+ }
+}
Property changes on: trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/launch/LaunchConfigTests.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/launch/MockLaunchConfigWorkingCopy.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/launch/MockLaunchConfigWorkingCopy.java (rev 0)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/launch/MockLaunchConfigWorkingCopy.java 2011-06-27 22:07:56 UTC (rev 32379)
@@ -0,0 +1,285 @@
+/*******************************************************************************
+ * Copyright (c) 2011 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.test.launch;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationType;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.core.ILaunchDelegate;
+
+/**
+ * @author André Dietisheim
+ */
+public class MockLaunchConfigWorkingCopy implements ILaunchConfigurationWorkingCopy {
+
+ protected final Map<String, Object> attributeMap;
+
+ public MockLaunchConfigWorkingCopy() throws CoreException {
+ this.attributeMap = new HashMap<String, Object>();
+ }
+
+ public String getAttribute(String attributeName, String defaultValue) throws CoreException {
+ String value = (String) attributeMap.get(attributeName);
+ if (value == null) {
+ value = defaultValue;
+ }
+ return value;
+ }
+
+ public boolean attributeEquals(String attributeName, Object expectedValue) throws CoreException {
+ String attributeValue = getAttribute(attributeName, (String) null);
+ return (expectedValue == null && attributeValue == null)
+ || expectedValue != null && expectedValue.equals(attributeValue);
+ }
+
+ public boolean getAttribute(String key, boolean defaultValue) throws CoreException {
+ Boolean value = (Boolean) attributeMap.get(key);
+ if (value == null) {
+ value = defaultValue;
+ }
+ return value;
+ }
+
+ @SuppressWarnings("rawtypes")
+ public List getAttribute(String key, List defaultValue) throws CoreException {
+ List value = (List) attributeMap.get(key);
+ if (value == null) {
+ value = defaultValue;
+ }
+ return value;
+ }
+
+ public boolean hasAttribute(String key) throws CoreException {
+ return attributeMap.containsKey(key);
+ }
+
+ public void setAttribute(String key, String value) {
+ attributeMap.put(key, value);
+ }
+
+ @SuppressWarnings("rawtypes")
+ public void setAttribute(String key, List value) {
+ attributeMap.put(key, value);
+ }
+
+ @SuppressWarnings("rawtypes")
+ public void setAttribute(String key, Map map) {
+ attributeMap.put(key, map);
+ }
+
+ public void setAttribute(String key, boolean value) {
+ attributeMap.put(key, value);
+ }
+
+ public boolean contentsEqual(ILaunchConfiguration arg0) {
+ throw new UnsupportedOperationException();
+ }
+
+ public ILaunchConfigurationWorkingCopy copy(String arg0) throws CoreException {
+ throw new UnsupportedOperationException();
+ }
+
+ public void delete() throws CoreException {
+ throw new UnsupportedOperationException();
+ }
+
+ public boolean exists() {
+ throw new UnsupportedOperationException();
+ }
+
+
+ public int getAttribute(String arg0, int arg1) throws CoreException {
+ throw new UnsupportedOperationException();
+ }
+
+ @SuppressWarnings("rawtypes")
+ public Set getAttribute(String arg0, Set arg1) throws CoreException {
+ throw new UnsupportedOperationException();
+ }
+
+ @SuppressWarnings("rawtypes")
+ public Map getAttribute(String arg0, Map arg1) throws CoreException {
+ throw new UnsupportedOperationException();
+ }
+
+ @SuppressWarnings("rawtypes")
+ public Map getAttributes() throws CoreException {
+ throw new UnsupportedOperationException();
+ }
+
+ public String getCategory() throws CoreException {
+ throw new UnsupportedOperationException();
+ }
+
+ public IFile getFile() {
+ throw new UnsupportedOperationException();
+ }
+
+ public IPath getLocation() {
+ throw new UnsupportedOperationException();
+ }
+
+ public IResource[] getMappedResources() throws CoreException {
+ throw new UnsupportedOperationException();
+ }
+
+ public String getMemento() throws CoreException {
+ throw new UnsupportedOperationException();
+ }
+
+ @SuppressWarnings("rawtypes")
+ public Set getModes() throws CoreException {
+ throw new UnsupportedOperationException();
+ }
+
+ public String getName() {
+ throw new UnsupportedOperationException();
+ }
+
+ @SuppressWarnings("rawtypes")
+ public ILaunchDelegate getPreferredDelegate(Set arg0) throws CoreException {
+ throw new UnsupportedOperationException();
+ }
+
+ public ILaunchConfigurationType getType() throws CoreException {
+ throw new UnsupportedOperationException();
+ }
+
+ public ILaunchConfigurationWorkingCopy getWorkingCopy() throws CoreException {
+ throw new UnsupportedOperationException();
+ }
+
+ public boolean isLocal() {
+ throw new UnsupportedOperationException();
+ }
+
+ public boolean isMigrationCandidate() throws CoreException {
+ throw new UnsupportedOperationException();
+ }
+
+ public boolean isReadOnly() {
+ throw new UnsupportedOperationException();
+ }
+
+ public boolean isWorkingCopy() {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public ILaunch launch(String arg0, IProgressMonitor arg1) throws CoreException {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public ILaunch launch(String arg0, IProgressMonitor arg1, boolean arg2) throws CoreException {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public ILaunch launch(String arg0, IProgressMonitor arg1, boolean arg2, boolean arg3) throws CoreException {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public void migrate() throws CoreException {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public boolean supportsMode(String arg0) throws CoreException {
+ throw new UnsupportedOperationException();
+
+ }
+
+ @SuppressWarnings("rawtypes")
+ public Object getAdapter(Class adapter) {
+ throw new UnsupportedOperationException();
+ }
+
+ @SuppressWarnings("rawtypes")
+ public void addModes(Set arg0) {
+ throw new UnsupportedOperationException();
+ }
+
+ public ILaunchConfiguration doSave() throws CoreException {
+ throw new UnsupportedOperationException();
+ }
+
+ public ILaunchConfiguration getOriginal() {
+ throw new UnsupportedOperationException();
+ }
+
+ public ILaunchConfigurationWorkingCopy getParent() {
+ throw new UnsupportedOperationException();
+ }
+
+ public boolean isDirty() {
+ throw new UnsupportedOperationException();
+ }
+
+ public Object removeAttribute(String arg0) {
+ throw new UnsupportedOperationException();
+ }
+
+ @SuppressWarnings("rawtypes")
+ public void removeModes(Set arg0) {
+ throw new UnsupportedOperationException();
+ }
+
+ public void rename(String arg0) {
+ throw new UnsupportedOperationException();
+ }
+
+ public void setAttribute(String arg0, int arg1) {
+ throw new UnsupportedOperationException();
+ }
+
+
+ @SuppressWarnings("rawtypes")
+ public void setAttribute(String arg0, Set arg1) {
+ throw new UnsupportedOperationException();
+ }
+
+ @SuppressWarnings("rawtypes")
+ public void setAttributes(Map arg0) {
+ throw new UnsupportedOperationException();
+ }
+
+ public void setContainer(IContainer arg0) {
+ throw new UnsupportedOperationException();
+ }
+
+ public void setMappedResources(IResource[] arg0) {
+ throw new UnsupportedOperationException();
+ }
+
+ @SuppressWarnings("rawtypes")
+ public void setModes(Set arg0) {
+ throw new UnsupportedOperationException();
+ }
+
+ @SuppressWarnings("rawtypes")
+ public void setPreferredLaunchDelegate(Set arg0, String arg1) {
+ throw new UnsupportedOperationException();
+ }
+}
Property changes on: trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/launch/MockLaunchConfigWorkingCopy.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
14 years, 9 months
JBoss Tools SVN: r32378 - trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-06-27 18:03:27 -0400 (Mon, 27 Jun 2011)
New Revision: 32378
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/LaunchConfigUtils.java
Log:
[JBIDE-9200] moved module related method to util class
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/LaunchConfigUtils.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/LaunchConfigUtils.java 2011-06-27 21:40:11 UTC (rev 32377)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/LaunchConfigUtils.java 2011-06-27 22:03:27 UTC (rev 32378)
@@ -17,6 +17,7 @@
import org.eclipse.wst.server.core.IServer;
import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
import org.jboss.ide.eclipse.as.core.Messages;
+import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
import org.jboss.ide.eclipse.as.core.server.internal.launch.RunJarContainerWrapper;
/**
@@ -95,6 +96,10 @@
}
}
+ public static IRuntimeClasspathEntry getModulesClasspathEntry(JBossServer server) throws CoreException {
+ return getModulesClasspathEntry(server.getServer());
+ }
+
public static IRuntimeClasspathEntry getModulesClasspathEntry(IServer server) throws CoreException {
IPath runtimeLocation = server.getRuntime().getLocation();
IPath modulesLocation = runtimeLocation.append(IJBossRuntimeResourceConstants.JBOSS_MODULES_JAR);
14 years, 9 months
JBoss Tools SVN: r32377 - in trunk/as/plugins/org.jboss.ide.eclipse.as.management.as7: META-INF and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-06-27 17:40:11 -0400 (Mon, 27 Jun 2011)
New Revision: 32377
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.management.as7/jboss-remoting-3.2.0.Beta2.jar
trunk/as/plugins/org.jboss.ide.eclipse.as.management.as7/xnio-api-3.0.0.Beta3.jar
trunk/as/plugins/org.jboss.ide.eclipse.as.management.as7/xnio-nio-3.0.0.Beta3.jar
Removed:
trunk/as/plugins/org.jboss.ide.eclipse.as.management.as7/jboss-remoting-3.2.0.Beta1.jar
trunk/as/plugins/org.jboss.ide.eclipse.as.management.as7/xnio-api-3.0.0.Beta2.jar
trunk/as/plugins/org.jboss.ide.eclipse.as.management.as7/xnio-nio-3.0.0.Beta2.jar
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.management.as7/.classpath
trunk/as/plugins/org.jboss.ide.eclipse.as.management.as7/META-INF/MANIFEST.MF
trunk/as/plugins/org.jboss.ide.eclipse.as.management.as7/build.properties
trunk/as/plugins/org.jboss.ide.eclipse.as.management.as7/jboss-as-controller-client-7.0.0.Beta4-SNAPSHOT.jar
trunk/as/plugins/org.jboss.ide.eclipse.as.management.as7/jboss-as-protocol-7.0.0.Beta4-SNAPSHOT.jar
Log:
[JBIDE-9261] updated to latest jboss as jars
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.management.as7/.classpath
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.management.as7/.classpath 2011-06-27 20:12:34 UTC (rev 32376)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.management.as7/.classpath 2011-06-27 21:40:11 UTC (rev 32377)
@@ -5,10 +5,11 @@
<classpathentry exported="true" kind="lib" path="jboss-dmr-1.0.0.Beta6.jar"/>
<classpathentry exported="true" kind="lib" path="jboss-logging-3.0.0.Beta5.jar"/>
<classpathentry exported="true" kind="lib" path="jboss-marshalling-1.3.0.CR8.jar"/>
- <classpathentry exported="true" kind="lib" path="jboss-remoting-3.2.0.Beta1.jar"/>
+ <classpathentry exported="true" kind="lib" path="jboss-remoting-3.2.0.Beta2.jar"/>
+ <classpathentry exported="true" kind="lib" path="jboss-sasl-1.0.0.Beta1.jar"/>
<classpathentry exported="true" kind="lib" path="jboss-threads-2.0.0.CR8.jar"/>
- <classpathentry exported="true" kind="lib" path="xnio-api-3.0.0.Beta2.jar"/>
- <classpathentry exported="true" kind="lib" path="xnio-nio-3.0.0.Beta2.jar"/>
+ <classpathentry exported="true" kind="lib" path="xnio-api-3.0.0.Beta3.jar"/>
+ <classpathentry exported="true" kind="lib" path="xnio-nio-3.0.0.Beta3.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.management.as7/META-INF/MANIFEST.MF
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.management.as7/META-INF/MANIFEST.MF 2011-06-27 20:12:34 UTC (rev 32376)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.management.as7/META-INF/MANIFEST.MF 2011-06-27 21:40:11 UTC (rev 32377)
@@ -14,10 +14,11 @@
jboss-dmr-1.0.0.Beta6.jar,
jboss-logging-3.0.0.Beta5.jar,
jboss-marshalling-1.3.0.CR8.jar,
- jboss-remoting-3.2.0.Beta1.jar,
+ jboss-remoting-3.2.0.Beta2.jar,
+ jboss-sasl-1.0.0.Beta1.jar,
jboss-threads-2.0.0.CR8.jar,
- xnio-api-3.0.0.Beta2.jar,
- xnio-nio-3.0.0.Beta2.jar
+ xnio-api-3.0.0.Beta3.jar,
+ xnio-nio-3.0.0.Beta3.jar
Service-Component: META-INF/jboss-management-service.xml
Export-Package: org.jboss.ide.eclipse.as.management.as7.deployment;x-friends:="org.jboss.ide.eclipse.as.management.as7.tests"
Bundle-Vendor: JBoss by Red Hat
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.management.as7/build.properties
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.management.as7/build.properties 2011-06-27 20:12:34 UTC (rev 32376)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.management.as7/build.properties 2011-06-27 21:40:11 UTC (rev 32377)
@@ -7,12 +7,13 @@
output.. = bin/
bin.includes = META-INF/,\
.,\
+ jboss-remoting-3.2.0.Beta2.jar,\
+ jboss-sasl-1.0.0.Beta1.jar,\
jboss-as-controller-client-7.0.0.Beta4-SNAPSHOT.jar,\
jboss-as-protocol-7.0.0.Beta4-SNAPSHOT.jar,\
jboss-dmr-1.0.0.Beta6.jar,\
jboss-logging-3.0.0.Beta5.jar,\
jboss-marshalling-1.3.0.CR8.jar,\
- jboss-remoting-3.2.0.Beta1.jar,\
jboss-threads-2.0.0.CR8.jar,\
- xnio-api-3.0.0.Beta2.jar,\
- xnio-nio-3.0.0.Beta2.jar
+ xnio-api-3.0.0.Beta3.jar,\
+ xnio-nio-3.0.0.Beta3.jar
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.management.as7/jboss-as-controller-client-7.0.0.Beta4-SNAPSHOT.jar
===================================================================
(Binary files differ)
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.management.as7/jboss-as-protocol-7.0.0.Beta4-SNAPSHOT.jar
===================================================================
(Binary files differ)
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.management.as7/jboss-remoting-3.2.0.Beta1.jar
===================================================================
(Binary files differ)
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.management.as7/jboss-remoting-3.2.0.Beta2.jar
===================================================================
(Binary files differ)
Property changes on: trunk/as/plugins/org.jboss.ide.eclipse.as.management.as7/jboss-remoting-3.2.0.Beta2.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.management.as7/xnio-api-3.0.0.Beta2.jar
===================================================================
(Binary files differ)
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.management.as7/xnio-api-3.0.0.Beta3.jar
===================================================================
(Binary files differ)
Property changes on: trunk/as/plugins/org.jboss.ide.eclipse.as.management.as7/xnio-api-3.0.0.Beta3.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.management.as7/xnio-nio-3.0.0.Beta2.jar
===================================================================
(Binary files differ)
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.management.as7/xnio-nio-3.0.0.Beta3.jar
===================================================================
(Binary files differ)
Property changes on: trunk/as/plugins/org.jboss.ide.eclipse.as.management.as7/xnio-nio-3.0.0.Beta3.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
14 years, 9 months
JBoss Tools SVN: r32376 - in trunk/cdi/tests: org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2011-06-27 16:12:34 -0400 (Mon, 27 Jun 2011)
New Revision: 32376
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/openon/BasicLogger.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/openon/Logger.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/openon/LoggerConsumer.java
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/InjectedPointHyperlinkDetectorTest.java
Log:
https://issues.jboss.org/browse/JBIDE-9251
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/openon/BasicLogger.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/openon/BasicLogger.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/openon/BasicLogger.java 2011-06-27 20:12:34 UTC (rev 32376)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.jbt.openon;
+
+
+class BasicLogger implements Logger
+{
+
+ private static String message;
+
+ public String getMessage()
+ {
+ return message;
+ }
+
+ public void log(String message)
+ {
+ BasicLogger.message = message;
+ }
+
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/openon/BasicLogger.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/openon/Logger.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/openon/Logger.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/openon/Logger.java 2011-06-27 20:12:34 UTC (rev 32376)
@@ -0,0 +1,22 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.jbt.openon;
+
+interface Logger
+{
+ public void log(String message);
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/openon/Logger.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/openon/LoggerConsumer.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/openon/LoggerConsumer.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/openon/LoggerConsumer.java 2011-06-27 20:12:34 UTC (rev 32376)
@@ -0,0 +1,20 @@
+package org.jboss.jsr299.tck.tests.jbt.openon;
+
+import javax.inject.Inject;
+
+class LoggerConsumer
+{
+ @Inject
+ // Event
+ private Logger logger;
+
+ public Logger getLogger()
+ {
+ return logger;
+ }
+
+ public void doSomething()
+ {
+ logger.log("Test message");
+ }
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/openon/LoggerConsumer.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/InjectedPointHyperlinkDetectorTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/InjectedPointHyperlinkDetectorTest.java 2011-06-27 17:37:32 UTC (rev 32375)
+++ trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/InjectedPointHyperlinkDetectorTest.java 2011-06-27 20:12:34 UTC (rev 32376)
@@ -48,6 +48,29 @@
CDIHyperlinkTestUtil.checkRegions(tckProject, "JavaSource/org/jboss/jsr299/tck/tests/lookup/injectionpoint/LoggerConsumer.java", regionList, new InjectedPointHyperlinkDetector());
}
+ public void testInjectedPointHyperlinkDetectorWithComment() throws Exception {
+ Set<IBean> beans = cdiProject.getBeans("/tck/JavaSource/org/jboss/jsr299/tck/tests/jbt/openon/BasicLogger.java", true);
+ IBean bean=null;
+ for(IBean b : beans){
+ bean = b;
+ }
+ ArrayList<TestRegion> regionList = new ArrayList<TestRegion>();
+ regionList.add(new TestRegion(104, 6, new TestHyperlink[]{
+ new TestHyperlink(InjectedPointHyperlink.class, CDIExtensionsMessages.CDI_INJECTED_POINT_HYPERLINK_OPEN_INJECT_BEAN+ " BasicLogger", bean)
+ })); // Inject
+ regionList.add(new TestRegion(134, 13, new TestHyperlink[]{
+ new TestHyperlink(InjectedPointHyperlink.class, CDIExtensionsMessages.CDI_INJECTED_POINT_HYPERLINK_OPEN_INJECT_BEAN+ " BasicLogger", bean)
+ })); // Logger
+ regionList.add(new TestRegion(197, 6, new TestHyperlink[]{
+ new TestHyperlink(InjectedPointHyperlink.class, CDIExtensionsMessages.CDI_INJECTED_POINT_HYPERLINK_OPEN_INJECT_BEAN+ " BasicLogger", bean)
+ })); // logger
+ regionList.add(new TestRegion(251, 6, new TestHyperlink[]{
+ new TestHyperlink(InjectedPointHyperlink.class, CDIExtensionsMessages.CDI_INJECTED_POINT_HYPERLINK_OPEN_INJECT_BEAN+ " BasicLogger", bean)
+ })); // logger
+
+ CDIHyperlinkTestUtil.checkRegions(tckProject, "JavaSource/org/jboss/jsr299/tck/tests/jbt/openon/LoggerConsumer.java", regionList, new InjectedPointHyperlinkDetector());
+ }
+
public void testInjectedProducerMethodParametersHyperlinkDetector() throws Exception {
Set<IBean> beans = cdiProject.getBeans("/tck/JavaSource/org/jboss/jsr299/tck/tests/jbt/openon/CustomProducerImpl.java", true);
IBean bean=null;
14 years, 9 months