JBoss Tools SVN: r32590 - trunk/as/plugins/org.jboss.ide.eclipse.as.core/META-INF.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-07-04 16:29:38 -0400 (Mon, 04 Jul 2011)
New Revision: 32590
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/META-INF/MANIFEST.MF
Log:
[JBIDE-9215] additionnally exporting package so that classes may be used in test and rse
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/META-INF/MANIFEST.MF 2011-07-04 20:28:53 UTC (rev 32589)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/META-INF/MANIFEST.MF 2011-07-04 20:29:38 UTC (rev 32590)
@@ -33,6 +33,7 @@
org.jboss.ide.eclipse.as.core.server.bean,
org.jboss.ide.eclipse.as.core.server.internal,
org.jboss.ide.eclipse.as.core.server.internal.launch,
+ org.jboss.ide.eclipse.as.core.server.internal.launch.configuration,
org.jboss.ide.eclipse.as.core.server.internal.v7,
org.jboss.ide.eclipse.as.core.server.xpl,
org.jboss.ide.eclipse.as.core.util
13 years, 5 months
JBoss Tools SVN: r32589 - trunk/as/plugins/org.jboss.ide.eclipse.as.core.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-07-04 16:28:53 -0400 (Mon, 04 Jul 2011)
New Revision: 32589
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
Log:
[JBIDE-9215] replaced reference to JBoss7ServerStartupLaunchConfiguration by JBoss7StartupLaunchConfiguration (new class)
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2011-07-04 20:26:47 UTC (rev 32588)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2011-07-04 20:28:53 UTC (rev 32589)
@@ -631,7 +631,7 @@
sourcePathComputerId="org.eclipse.jst.server.generic.core.sourcePathComputer"/>
<launchConfigurationType
category="JBoss"
- delegate="org.jboss.ide.eclipse.as.core.server.internal.v7.JBoss7ServerStartupLaunchConfiguration"
+ delegate="org.jboss.ide.eclipse.as.core.server.internal.v7.JBoss7StartupLaunchConfiguration"
id="org.jboss.ide.eclipse.as.core.server.JBoss7StartupConfiguration"
modes="run,debug,profile"
name="JBoss Application Server Startup Configuration"
@@ -1172,7 +1172,7 @@
<extension
point="org.eclipse.jdt.launching.classpathProviders">
<classpathProvider
- class="org.jboss.ide.eclipse.as.core.server.internal.launch.LocalJBossServerStartupLaunchUtil$JBossServerDefaultClasspathProvider"
+ class="org.jboss.ide.eclipse.as.core.server.internal.launch.LocalJBossStartLaunchDelegate$JBossServerDefaultClasspathProvider"
id="org.jboss.ide.eclipse.as.core.server.internal.launch.serverClasspathProvider">
</classpathProvider>
</extension>
13 years, 5 months
JBoss Tools SVN: r32588 - trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-07-04 16:26:47 -0400 (Mon, 04 Jul 2011)
New Revision: 32588
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/LocalPublishMethod.java
Log:
[JBIDE-9215] added comment about bad naming of delegate id (not refactoring since will replace static mapping by osgi service)
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/LocalPublishMethod.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/LocalPublishMethod.java 2011-07-04 20:25:46 UTC (rev 32587)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/LocalPublishMethod.java 2011-07-04 20:26:47 UTC (rev 32588)
@@ -20,8 +20,12 @@
public class LocalPublishMethod extends AbstractPublishMethod {
+ /**
+ * TODO: refactor to "LOCAL" since we have local publishing and local
+ * launching/stopping which both have to be mapped in equal ways
+ */
public static final String LOCAL_PUBLISH_METHOD = "local"; //$NON-NLS-1$
-
+
public String getPublishMethodId() {
return LOCAL_PUBLISH_METHOD;
}
13 years, 5 months
JBoss Tools SVN: r32587 - trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-07-04 16:25:46 -0400 (Mon, 04 Jul 2011)
New Revision: 32587
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/ILaunchConfigConfigurator.java
Removed:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/ILaunchConfigConfigurator.java
Log:
Deleted: 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 2011-07-04 20:25:36 UTC (rev 32586)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/ILaunchConfigConfigurator.java 2011-07-04 20:25:46 UTC (rev 32587)
@@ -1,10 +0,0 @@
-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
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-07-04 20:25:46 UTC (rev 32587)
@@ -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
13 years, 5 months
JBoss Tools SVN: r32586 - 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-07-04 16:25:36 -0400 (Mon, 04 Jul 2011)
New Revision: 32586
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/LocalJBoss7StartupConfigurator.java
Log:
Copied: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/LocalJBoss7StartupConfigurator.java (from rev 32529, trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7StartupConfigurator.java)
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/LocalJBoss7StartupConfigurator.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/LocalJBoss7StartupConfigurator.java 2011-07-04 20:25:36 UTC (rev 32586)
@@ -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.configuration.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 LocalJBoss7StartupConfigurator extends AbstractStartupConfigurator {
+
+ public LocalJBoss7StartupConfigurator(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/LocalJBoss7StartupConfigurator.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
13 years, 5 months
JBoss Tools SVN: r32585 - 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-07-04 16:25:10 -0400 (Mon, 04 Jul 2011)
New Revision: 32585
Removed:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7StartupConfigurator.java
Log:
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7StartupConfigurator.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7StartupConfigurator.java 2011-07-04 20:24:47 UTC (rev 32584)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7StartupConfigurator.java 2011-07-04 20:25:10 UTC (rev 32585)
@@ -1,88 +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.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
13 years, 5 months
JBoss Tools SVN: r32584 - in trunk/as/plugins: org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-07-04 16:24:47 -0400 (Mon, 04 Jul 2011)
New Revision: 32584
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/AbstractJBossBehaviourDelegate.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/LocalJBossBehaviorDelegate.java
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEBehaviourDelegate.java
Log:
[JBIDE-9215] added abstract #forceStop to AbstractJBossBehaviorDelegate
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/AbstractJBossBehaviourDelegate.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/AbstractJBossBehaviourDelegate.java 2011-07-04 20:21:47 UTC (rev 32583)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/AbstractJBossBehaviourDelegate.java 2011-07-04 20:24:47 UTC (rev 32584)
@@ -37,6 +37,11 @@
}
public abstract void stop(boolean force);
+
+ protected abstract void forceStop();
+
+ protected abstract IStatus gracefullStop();
+
public void publishStart(IProgressMonitor monitor) throws CoreException {
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/LocalJBossBehaviorDelegate.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/LocalJBossBehaviorDelegate.java 2011-07-04 20:21:47 UTC (rev 32583)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/LocalJBossBehaviorDelegate.java 2011-07-04 20:24:47 UTC (rev 32584)
@@ -22,6 +22,9 @@
import org.eclipse.debug.core.DebugException;
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.IDebugEventSetListener;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.debug.core.model.IProcess;
import org.eclipse.wst.server.core.IRuntime;
import org.eclipse.wst.server.core.IServer;
@@ -35,8 +38,9 @@
import org.jboss.ide.eclipse.as.core.publishers.LocalPublishMethod;
import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
import org.jboss.ide.eclipse.as.core.server.IServerStatePoller;
-import org.jboss.ide.eclipse.as.core.server.internal.launch.StopLaunchConfiguration;
+import org.jboss.ide.eclipse.as.core.server.internal.launch.configuration.LocalStopLaunchConfigurator;
import org.jboss.ide.eclipse.as.core.util.IJBossRuntimeConstants;
+import org.jboss.ide.eclipse.as.core.util.LaunchConfigUtils;
import org.jboss.ide.eclipse.as.core.util.PollThreadUtils;
/**
@@ -46,6 +50,8 @@
*/
public class LocalJBossBehaviorDelegate extends AbstractJBossBehaviourDelegate implements IProcessProvider {
+ private static final String STOP_LAUNCH_TYPE = "org.jboss.ide.eclipse.as.core.server.stopLaunchConfiguration"; //$NON-NLS-1$
+
protected PollThread pollThread = null;
protected IProcess process;
protected boolean nextStopRequiresForce = false;
@@ -71,19 +77,54 @@
}
serverStopping();
- new Thread() {public void run() {
- boolean success = StopLaunchConfiguration.stop(getServer());
- if( !success ) {
- if( process != null && !process.isTerminated() ) {
- getActualBehavior().setServerStarted();
- pollThread.cancel(Messages.STOP_FAILED_MESSAGE);
- nextStopRequiresForce = true;
+ gracefullStop();
+ }
+
+ @Override
+ protected IStatus gracefullStop() {
+ new Thread() {
+
+ @Override
+ public void run() {
+ try {
+ ILaunchConfigurationWorkingCopy wc =
+ LaunchConfigUtils.createLaunchConfigurationWorkingCopy("Stop JBoss Server", STOP_LAUNCH_TYPE); //$NON-NLS-1$
+ new LocalStopLaunchConfigurator(getServer()).configure(wc);
+ ILaunch launch = wc.launch(ILaunchManager.RUN_MODE, new NullProgressMonitor());
+ IProcess stopProcess = waitForStopProcess(launch);
+ if (stopProcess.getExitValue() == 0) {
+ // TODO: correct concurrent access to process, pollThread and nextStopRequiresForce
+ if( process != null && !process.isTerminated() ) {
+ getActualBehavior().setServerStarted();
+ pollThread.cancel(Messages.STOP_FAILED_MESSAGE);
+ nextStopRequiresForce = true;
+ }
+ }
+ } catch( CoreException ce ) {
+ JBossServerCorePlugin.getDefault().getLog().log(ce.getStatus());
}
+
}
- }}.start();
+
+ private IProcess waitForStopProcess(ILaunch launch) {
+ IProcess stopProcess = launch.getProcesses()[0];
+ while( !stopProcess.isTerminated()) {
+ try {
+ Thread.yield();
+ Thread.sleep(100);
+ } catch(InterruptedException ie) {
+ }
+ }
+ return stopProcess;
+ }
+ }.start();
+ // TODO: find out if this is ok. My current guess is that we should
+ // not thread here and return the real outcome
+ return Status.OK_STATUS;
}
- public synchronized void forceStop() {
+ @Override
+ protected synchronized void forceStop() {
// just terminate the process.
if( process != null && !process.isTerminated()) {
try {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEBehaviourDelegate.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEBehaviourDelegate.java 2011-07-04 20:21:47 UTC (rev 32583)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEBehaviourDelegate.java 2011-07-04 20:24:47 UTC (rev 32584)
@@ -37,8 +37,7 @@
@Override
public void stop(boolean force) {
if( force ) {
- serverStopped();
- return;
+ forceStop();
}
if( LaunchCommandPreferences.ignoreLaunchCommand(getServer())) {
@@ -54,7 +53,14 @@
serverStopped();
}
}
+
+ @Override
+ protected void forceStop() {
+ serverStopped();
+ return;
+ }
+ @Override
protected IStatus gracefullStop() {
try {
ILaunchConfiguration config = getServer().getLaunchConfiguration(false, new NullProgressMonitor());
13 years, 5 months
JBoss Tools SVN: r32583 - trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-07-04 16:21:47 -0400 (Mon, 04 Jul 2011)
New Revision: 32583
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/TwiddleLaunchConfiguration.java
Log:
[JBIDE-9215] renamed JBossLuanchConfigUtils to JBossLuanchConfigProperties
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/TwiddleLaunchConfiguration.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/TwiddleLaunchConfiguration.java 2011-07-04 20:19:49 UTC (rev 32582)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/TwiddleLaunchConfiguration.java 2011-07-04 20:21:47 UTC (rev 32583)
@@ -37,6 +37,7 @@
import org.jboss.ide.eclipse.as.core.Messages;
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.configuration.JBossLaunchConfigProperties;
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;
@@ -62,10 +63,10 @@
String launchName = TwiddleLaunchConfiguration.class.getName();
launchName = launchManager.generateUniqueLaunchConfigurationNameFrom(launchName);
ILaunchConfigurationWorkingCopy wc = launchConfigType.newInstance(null, launchName);
- JBossRuntimeLaunchConfigUtils.setProgramArguments(args, wc);
- JBossRuntimeLaunchConfigUtils.setMainType(IJBossRuntimeConstants.TWIDDLE_MAIN_TYPE, wc);
- JBossRuntimeLaunchConfigUtils.setWorkingDirectory(serverHome + Path.SEPARATOR + IJBossRuntimeResourceConstants.BIN, wc);
- JBossRuntimeLaunchConfigUtils.setServerId(server.getId(), wc);
+ JBossLaunchConfigProperties.setProgramArguments(args, wc);
+ JBossLaunchConfigProperties.setMainType(IJBossRuntimeConstants.TWIDDLE_MAIN_TYPE, wc);
+ JBossLaunchConfigProperties.setWorkingDirectory(serverHome + Path.SEPARATOR + IJBossRuntimeResourceConstants.BIN, wc);
+ JBossLaunchConfigProperties.setServerId(server.getId(), wc);
ArrayList<IRuntimeClasspathEntry> classpath = new ArrayList<IRuntimeClasspathEntry>();
LaunchConfigUtils.addCPEntry(TWIDDLE_JAR_LOC, serverHome, classpath);
@@ -75,8 +76,8 @@
LaunchConfigUtils.addDirectory(serverHome, classpath, IJBossRuntimeResourceConstants.CLIENT);
LaunchConfigUtils.addJREEntry(jbrt.getVM(), classpath);
List<String> runtimeClassPaths = LaunchConfigUtils.toStrings(classpath);
- JBossRuntimeLaunchConfigUtils.setClasspath(runtimeClassPaths, wc);
- JBossRuntimeLaunchConfigUtils.setUseDefaultClassPath(false, wc);
+ JBossLaunchConfigProperties.setClasspath(runtimeClassPaths, wc);
+ JBossLaunchConfigProperties.setUseDefaultClassPath(false, wc);
return wc;
}
13 years, 5 months
JBoss Tools SVN: r32582 - trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-07-04 16:19:49 -0400 (Mon, 04 Jul 2011)
New Revision: 32582
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/StopLaunchConfiguration.java
Log:
[JBIDE-9215] removed static call to RSELaunchDelegate#launchStopServerCommand
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/StopLaunchConfiguration.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/StopLaunchConfiguration.java 2011-07-04 20:15:50 UTC (rev 32581)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/StopLaunchConfiguration.java 2011-07-04 20:19:49 UTC (rev 32582)
@@ -16,15 +16,18 @@
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Status;
import org.eclipse.debug.core.DebugPlugin;
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.ILaunchManager;
import org.eclipse.debug.core.model.IProcess;
+import org.eclipse.jdt.launching.AbstractJavaLaunchConfigurationDelegate;
import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
import org.eclipse.jdt.launching.IRuntimeClasspathEntry;
import org.eclipse.wst.server.core.IServer;
@@ -33,6 +36,8 @@
import org.jboss.ide.eclipse.as.core.server.IJBoss6Server;
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.JBossServerBehavior;
+import org.jboss.ide.eclipse.as.core.server.internal.launch.configuration.JBossLaunchConfigProperties;
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;
@@ -42,6 +47,7 @@
import org.jboss.ide.eclipse.as.core.util.ServerUtil;
+@Deprecated
public class StopLaunchConfiguration extends AbstractJBossLaunchConfigType {
public static final String STOP_LAUNCH_TYPE = "org.jboss.ide.eclipse.as.core.server.stopLaunchConfiguration"; //$NON-NLS-1$
@@ -49,6 +55,7 @@
public static final String STOP_JAR_LOC = IJBossRuntimeResourceConstants.BIN + File.separator + IJBossRuntimeResourceConstants.SHUTDOWN_JAR;
/* Returns whether termination was normal */
+ @Deprecated
public static boolean stop(IServer server) {
try {
ILaunchConfigurationWorkingCopy wc = createLaunchConfiguration(server);
@@ -82,7 +89,7 @@
String launchName = StopLaunchConfiguration.class.getName();
launchName = launchManager.generateUniqueLaunchConfigurationNameFrom(launchName);
ILaunchConfigurationWorkingCopy wc = launchConfigType.newInstance(null, launchName);
- JBossRuntimeLaunchConfigUtils.setServerId(server.getId(), wc);
+ JBossLaunchConfigProperties.setServerId(server.getId(), wc);
wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, getDefaultArgs(jbs));
wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, STOP_MAIN_TYPE);
wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, serverHome.append(IJBossRuntimeResourceConstants.BIN).toOSString());
@@ -97,8 +104,11 @@
return wc;
}
+ /**
+ * moved to {@link JBossServerBehavior#getDefaultStopArguments()}
+ */
+ @Deprecated
public static String getDefaultArgs(JBossServer jbs) {
-
String runtimeTypeId = jbs.getRuntime().getRuntime().getRuntimeType().getId();
String serverUrl;
if (runtimeTypeId.equals(IJBossToolingConstants.AS_60)){
@@ -121,5 +131,4 @@
+ IJBossRuntimeConstants.SPACE + jbs.getPassword() + IJBossRuntimeConstants.SPACE;
return args;
}
-
}
13 years, 5 months
JBoss Tools SVN: r32581 - trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-07-04 16:15:50 -0400 (Mon, 04 Jul 2011)
New Revision: 32581
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/AbstractJBossBehaviourDelegate.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServerBehavior.java
Log:
[JBIDE-9215] removed static call to RSELaunchDelegate#launchStopServerCommand
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/AbstractJBossBehaviourDelegate.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/AbstractJBossBehaviourDelegate.java 2011-07-04 20:03:50 UTC (rev 32580)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/AbstractJBossBehaviourDelegate.java 2011-07-04 20:15:50 UTC (rev 32581)
@@ -14,10 +14,12 @@
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.wst.server.core.IServer;
-import org.jboss.ide.eclipse.as.core.server.IServerStatePoller;
+import org.jboss.ide.eclipse.as.core.server.IJBoss6Server;
import org.jboss.ide.eclipse.as.core.server.internal.JBossServerBehavior.JBossBehaviourDelegate;
+import org.jboss.ide.eclipse.as.core.util.IJBossRuntimeConstants;
+import org.jboss.ide.eclipse.as.core.util.IJBossToolingConstants;
+import org.jboss.ide.eclipse.as.core.util.ServerConverter;
public abstract class AbstractJBossBehaviourDelegate implements JBossBehaviourDelegate {
@@ -53,4 +55,31 @@
return Status.OK_STATUS;
}
+ @Override
+ public String getDefaultStopArguments() throws CoreException {
+
+ String runtimeTypeId = getServer().getRuntime().getRuntimeType().getId();
+ JBossServer jbs = ServerConverter.checkedGetJBossServer(getServer(), JBossServer.class);
+ String serverUrl;
+ if (runtimeTypeId.equals(IJBossToolingConstants.AS_60)){
+ IJBoss6Server server6 = ServerConverter.checkedGetJBossServer(getServer(), IJBoss6Server.class);
+ serverUrl = "service:jmx:rmi:///jndi/rmi://" + jbs.getHost() + ":" + server6.getJMXRMIPort() + "/jmxrmi"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ } else {
+ serverUrl = jbs.getHost() + ":" + jbs.getJNDIPort(); //$NON-NLS-1$
+ }
+ String args = IJBossRuntimeConstants.SHUTDOWN_STOP_ARG
+ + IJBossRuntimeConstants.SPACE;
+ args += IJBossRuntimeConstants.SHUTDOWN_SERVER_ARG
+ + IJBossRuntimeConstants.SPACE
+ + serverUrl
+ + IJBossRuntimeConstants.SPACE;
+ if( jbs.getUsername() != null && !jbs.getUsername().equals("")) //$NON-NLS-1$
+ args += IJBossRuntimeConstants.SHUTDOWN_USER_ARG
+ + IJBossRuntimeConstants.SPACE + jbs.getUsername() + IJBossRuntimeConstants.SPACE;
+ if( jbs.getPassword() != null && !jbs.getPassword().equals("")) //$NON-NLS-1$
+ args += IJBossRuntimeConstants.SHUTDOWN_PASS_ARG
+ + IJBossRuntimeConstants.SPACE + jbs.getPassword() + IJBossRuntimeConstants.SPACE;
+ return args;
+ }
+
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServerBehavior.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServerBehavior.java 2011-07-04 20:03:50 UTC (rev 32580)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServerBehavior.java 2011-07-04 20:15:50 UTC (rev 32581)
@@ -52,7 +52,7 @@
public void serverStarting();
public void serverStopping();
public IStatus canChangeState(String launchMode);
- public String getDefaultStopArguments() throws CoreException;
+ public String getDefaultStopArguments() throws CoreException;
}
private static HashMap<String, Class> delegateClassMap;
13 years, 5 months