JBoss Tools SVN: r32560 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2011-07-04 12:41:59 -0400 (Mon, 04 Jul 2011)
New Revision: 32560
Removed:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration/bin/
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration/
Log:
remove bad bin
Property changes on: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration
___________________________________________________________________
Modified: svn:ignore
- target
+ target
buildlog.latest.txt
bin
build
12 years, 10 months
JBoss Tools SVN: r32559 - trunk/as/plugins/org.jboss.ide.eclipse.as.management.as7.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2011-07-04 12:39:24 -0400 (Mon, 04 Jul 2011)
New Revision: 32559
Removed:
trunk/as/plugins/org.jboss.ide.eclipse.as.management.as7/bin/
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.management.as7/
Log:
remove bad bin
Property changes on: trunk/as/plugins/org.jboss.ide.eclipse.as.management.as7
___________________________________________________________________
Modified: svn:ignore
- target
+ target
buildlog.latest.txt
bin
build
12 years, 10 months
JBoss Tools SVN: r32558 - 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 12:37:42 -0400 (Mon, 04 Jul 2011)
New Revision: 32558
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/LocalJBossStartLaunchDelegate.java
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/JBossServerStartupLaunchConfiguration.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/LocalJBossServerStartupLaunchUtil.java
Log:
[JBIDE-9215] deprecating LocalJBossServerStartupLaunchUtil:
* bad name
* calls super method in delegating class back again!
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/JBossServerStartupLaunchConfiguration.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/JBossServerStartupLaunchConfiguration.java 2011-07-04 16:30:01 UTC (rev 32557)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/JBossServerStartupLaunchConfiguration.java 2011-07-04 16:37:42 UTC (rev 32558)
@@ -58,9 +58,9 @@
static {
setupParticipants = new ArrayList<IStartLaunchSetupParticipant>();
- setupParticipants.add(new LocalJBossServerStartupLaunchUtil());
+ setupParticipants.add(new LocalJBossStartLaunchDelegate());
launchDelegates = new HashMap<String, StartLaunchDelegate>();
- launchDelegates.put(LocalPublishMethod.LOCAL_PUBLISH_METHOD, new LocalJBossServerStartupLaunchUtil());
+ launchDelegates.put(LocalPublishMethod.LOCAL_PUBLISH_METHOD, new LocalJBossStartLaunchDelegate());
}
public static void addLaunchDelegateMapping(String mode, StartLaunchDelegate del) {
@@ -114,6 +114,7 @@
getDelegate(configuration).actualLaunch(this, configuration, mode, launch, monitor);
}
+ @Deprecated
public void superActualLaunch(ILaunchConfiguration configuration,
String mode, ILaunch launch, IProgressMonitor monitor) throws CoreException {
super.actualLaunch(configuration, mode, launch, monitor);
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-07-04 16:30:01 UTC (rev 32557)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/LocalJBossServerStartupLaunchUtil.java 2011-07-04 16:37:42 UTC (rev 32558)
@@ -15,7 +15,6 @@
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
@@ -33,27 +32,28 @@
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.server.internal.launch.configuration.JBossLaunchConfigProperties;
+import org.jboss.ide.eclipse.as.core.server.internal.launch.configuration.LocalJBossStartupConfigurator;
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.LaunchCommandPreferences;
import org.jboss.ide.eclipse.as.core.util.LaunchConfigUtils;
/**
+ * @deprecated please use {@link LocalJBossStartLaunchDelegate}
+ *
* @author Rob Stryker
* @author André Dietisheim
*/
+@Deprecated
public class LocalJBossServerStartupLaunchUtil implements StartLaunchDelegate, IStartLaunchSetupParticipant {
public static final String DEFAULTS_SET = "jboss.defaults.been.set"; //$NON-NLS-1$
- static final String START_JAR_LOC = IJBossRuntimeResourceConstants.BIN + Path.SEPARATOR
- + IJBossRuntimeResourceConstants.START_JAR;
static final String START_MAIN_TYPE = IJBossRuntimeConstants.START_MAIN_TYPE;
public void setupLaunchConfiguration(
ILaunchConfigurationWorkingCopy workingCopy, IServer server) throws CoreException {
- new JBossStartupConfigurator(server).configure(workingCopy);
+ new LocalJBossStartupConfigurator(server).configure(workingCopy);
}
public static class JBossServerDefaultClasspathProvider extends StandardClasspathProvider {
@@ -69,7 +69,7 @@
protected IRuntimeClasspathEntry[] defaultEntries(ILaunchConfiguration config) {
try {
- String server = JBossRuntimeLaunchConfigUtils.getServerId(config);
+ String server = JBossLaunchConfigProperties.getServerId(config);
IServer s = ServerCore.findServer(server);
AbstractLocalJBossServerRuntime ibjsrt = (AbstractLocalJBossServerRuntime)
s.getRuntime().loadAdapter(AbstractLocalJBossServerRuntime.class, new NullProgressMonitor());
Copied: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/LocalJBossStartLaunchDelegate.java (from rev 32529, 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/LocalJBossStartLaunchDelegate.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/LocalJBossStartLaunchDelegate.java 2011-07-04 16:37:42 UTC (rev 32558)
@@ -0,0 +1,135 @@
+/*******************************************************************************
+ * 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.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.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.server.internal.launch.configuration.JBossLaunchConfigProperties;
+import org.jboss.ide.eclipse.as.core.server.internal.launch.configuration.LocalJBossStartupConfigurator;
+import org.jboss.ide.eclipse.as.core.util.JBossServerBehaviorUtils;
+import org.jboss.ide.eclipse.as.core.util.LaunchCommandPreferences;
+import org.jboss.ide.eclipse.as.core.util.LaunchConfigUtils;
+
+/**
+ * @author Rob Stryker
+ * @author André Dietisheim
+ */
+public class LocalJBossStartLaunchDelegate extends AbstractJBossLaunchConfigType implements StartLaunchDelegate, IStartLaunchSetupParticipant {
+
+ public void setupLaunchConfiguration(
+ ILaunchConfigurationWorkingCopy workingCopy, IServer server) throws CoreException {
+ new LocalJBossStartupConfigurator(server).configure(workingCopy);
+ }
+
+ /*
+ * Actual instance methods
+ */
+ public void actualLaunch(
+ JBossServerStartupLaunchConfiguration launchConfig,
+ ILaunchConfiguration configuration, String mode, ILaunch launch,
+ IProgressMonitor monitor) throws CoreException {
+ launch(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));
+ if (LaunchCommandPreferences.ignoreLaunchCommand(jbsBehavior.getServer())) {
+ 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 {
+ if (JBossLaunchConfigProperties.isUseDefaultClasspath(configuration)) {
+ return defaultEntries(configuration);
+ }
+ return super.computeUnresolvedClasspath(configuration);
+ }
+
+ protected IRuntimeClasspathEntry[] defaultEntries(ILaunchConfiguration config) {
+ try {
+ String server = JBossLaunchConfigProperties.getServerId(config);
+ IServer s = ServerCore.findServer(server);
+ AbstractLocalJBossServerRuntime ibjsrt = (AbstractLocalJBossServerRuntime)
+ s.getRuntime().loadAdapter(AbstractLocalJBossServerRuntime.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/LocalJBossStartLaunchDelegate.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
12 years, 10 months
JBoss Tools SVN: r32556 - trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/src/org/jboss/ide/eclipse/as/rse/ui.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-07-04 11:46:40 -0400 (Mon, 04 Jul 2011)
New Revision: 32556
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/src/org/jboss/ide/eclipse/as/rse/ui/RSELaunchTabProvider.java
Log:
[JBIDE-9215] moved launch config setup to external component (configurator) in order to get rid of static methods in launch configuration classes
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/src/org/jboss/ide/eclipse/as/rse/ui/RSELaunchTabProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/src/org/jboss/ide/eclipse/as/rse/ui/RSELaunchTabProvider.java 2011-07-04 15:43:43 UTC (rev 32555)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/src/org/jboss/ide/eclipse/as/rse/ui/RSELaunchTabProvider.java 2011-07-04 15:46:40 UTC (rev 32556)
@@ -27,7 +27,7 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Text;
-import org.jboss.ide.eclipse.as.rse.core.RSELaunchConfigUtils;
+import org.jboss.ide.eclipse.as.rse.core.RSELaunchConfigProperties;
import org.jboss.ide.eclipse.as.rse.core.RSELaunchDelegate;
import org.jboss.ide.eclipse.as.ui.UIUtil;
import org.jboss.ide.eclipse.as.ui.launch.JBossLaunchConfigurationTabGroup.IJBossLaunchTabProvider;
@@ -122,16 +122,16 @@
this.initialConfig = configuration;
try {
- String startCommand = RSELaunchConfigUtils.getStartupCommand(configuration);
+ String startCommand = RSELaunchConfigProperties.getStartupCommand(configuration);
startText.setText(startCommand == null ? "" : startCommand);
- boolean detectStartCommand = RSELaunchConfigUtils.isDetectStartupCommand(configuration, true);
+ boolean detectStartCommand = RSELaunchConfigProperties.isDetectStartupCommand(configuration, true);
autoStartArgs.setSelection(detectStartCommand);
startText.setEditable(!detectStartCommand);
startText.setEnabled(!detectStartCommand);
- String stopCommand = RSELaunchConfigUtils.getShutdownCommand(configuration);
+ String stopCommand = RSELaunchConfigProperties.getShutdownCommand(configuration);
stopText.setText(stopCommand == null ? "" : stopCommand);
- boolean detectStopCommand = RSELaunchConfigUtils.isDetectShutdownCommand(configuration, true);
+ boolean detectStopCommand = RSELaunchConfigProperties.isDetectShutdownCommand(configuration, true);
autoStopArgs.setSelection(detectStopCommand);
stopText.setEditable(!detectStopCommand);
stopText.setEnabled(!detectStopCommand);
@@ -141,10 +141,10 @@
}
}
public void performApply(ILaunchConfigurationWorkingCopy configuration) {
- RSELaunchConfigUtils.setStartupCommand(startText.getText(), configuration);
- RSELaunchConfigUtils.setShutdownCommand(stopText.getText(), configuration);
- RSELaunchConfigUtils.setDetectStartupCommand(autoStartArgs.getSelection(), configuration);
- RSELaunchConfigUtils.setDetectShutdownCommand(autoStopArgs.getSelection(), configuration);
+ RSELaunchConfigProperties.setStartupCommand(startText.getText(), configuration);
+ RSELaunchConfigProperties.setShutdownCommand(stopText.getText(), configuration);
+ RSELaunchConfigProperties.setDetectStartupCommand(autoStartArgs.getSelection(), configuration);
+ RSELaunchConfigProperties.setDetectShutdownCommand(autoStopArgs.getSelection(), configuration);
}
public String getName() {
return RSEUIMessages.RSE_REMOTE_LAUNCH;
12 years, 10 months
JBoss Tools SVN: r32555 - trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-07-04 11:43:43 -0400 (Mon, 04 Jul 2011)
New Revision: 32555
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSELaunchConfigProperties.java
Log:
[JBIDE-9215] moved launch config setup to external component (configurator) in order to get rid of static methods in launch configuration classes
Copied: trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSELaunchConfigProperties.java (from rev 32404, trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSELaunchConfigUtils.java)
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSELaunchConfigProperties.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSELaunchConfigProperties.java 2011-07-04 15:43:43 UTC (rev 32555)
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * 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.rse.core;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+
+/**
+ * @author André Dietisheim
+ */
+public class RSELaunchConfigProperties {
+
+ public static final String RSE_STARTUP_COMMAND = "org.jboss.ide.eclipse.as.rse.core.RSELaunchDelegate.STARTUP_COMMAND";
+ public static final String RSE_SHUTDOWN_COMMAND = "org.jboss.ide.eclipse.as.rse.core.RSELaunchDelegate.SHUTDOWN_COMMAND";
+ public static final String DETECT_STARTUP_COMMAND = "org.jboss.ide.eclipse.as.rse.core.RSELaunchDelegate.DETECT_STARTUP_COMMAND";
+ public static final String DETECT_SHUTDOWN_COMMAND = "org.jboss.ide.eclipse.as.rse.core.RSELaunchDelegate.DETECT_SHUTDOWN_COMMAND";
+
+ public static boolean isDetectStartupCommand(ILaunchConfiguration launchConfig) throws CoreException {
+ return isDetectStartupCommand(launchConfig, true);
+ }
+
+ public static boolean isDetectStartupCommand(ILaunchConfiguration launchConfig, boolean defaultValue)
+ throws CoreException {
+ return launchConfig.getAttribute(DETECT_STARTUP_COMMAND, defaultValue);
+ }
+
+ public static void setDetectStartupCommand(boolean detectStartup, ILaunchConfigurationWorkingCopy launchConfig) {
+ launchConfig.setAttribute(DETECT_STARTUP_COMMAND, detectStartup);
+ }
+
+ public static boolean isDetectShutdownCommand(ILaunchConfiguration launchConfig) throws CoreException {
+ return isDetectShutdownCommand(launchConfig, true);
+ }
+
+ public static boolean isDetectShutdownCommand(ILaunchConfiguration launchConfig, boolean defaultValue)
+ throws CoreException {
+ return launchConfig.getAttribute(DETECT_SHUTDOWN_COMMAND, defaultValue);
+ }
+
+ public static void setDetectShutdownCommand(boolean detectShutdown, ILaunchConfigurationWorkingCopy launchConfig) {
+ launchConfig.setAttribute(DETECT_SHUTDOWN_COMMAND, detectShutdown);
+ }
+
+ public static void setStartupCommand(String startupCommand, ILaunchConfigurationWorkingCopy launchConfig) {
+ launchConfig.setAttribute(RSE_STARTUP_COMMAND, startupCommand);
+ }
+
+ public static String getStartupCommand(ILaunchConfiguration launchConfig) throws CoreException {
+ return getStartupCommand(launchConfig, (String) null);
+ }
+
+ public static String getStartupCommand(ILaunchConfiguration launchConfig, String defaultCommand)
+ throws CoreException {
+ return launchConfig.getAttribute(RSE_STARTUP_COMMAND, defaultCommand);
+ }
+
+ public static void setShutdownCommand(String shutdownCommand, ILaunchConfigurationWorkingCopy launchConfig) {
+ launchConfig.setAttribute(RSE_SHUTDOWN_COMMAND, shutdownCommand);
+ }
+
+ public static String getShutdownCommand(ILaunchConfiguration launchConfig) throws CoreException {
+ return getShutdownCommand(launchConfig, (String) null);
+ }
+
+ public static String getShutdownCommand(ILaunchConfiguration launchConfig, String defaultCommand)
+ throws CoreException {
+ return launchConfig.getAttribute(RSE_SHUTDOWN_COMMAND, defaultCommand);
+ }
+}
Property changes on: trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSELaunchConfigProperties.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
12 years, 10 months
JBoss Tools SVN: r32554 - trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-07-04 11:43:10 -0400 (Mon, 04 Jul 2011)
New Revision: 32554
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSELaunchConfigurator.java
Log:
[JBIDE-9215] moved launch config setup to external component (configurator) in order to get rid of static methods in launch configuration classes
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSELaunchConfigurator.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSELaunchConfigurator.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSELaunchConfigurator.java 2011-07-04 15:43:10 UTC (rev 32554)
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * 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.rse.core;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.jboss.ide.eclipse.as.core.server.internal.launch.configuration.ILaunchConfigConfigurator;
+
+/**
+ * @author André Dietisheim
+ */
+public class RSELaunchConfigurator implements ILaunchConfigConfigurator {
+
+ private String defaultLaunchCommand;
+ private String defaultStopCommand;
+
+ public RSELaunchConfigurator(String defaultLaunchCommand, String defaultStopCommand) throws CoreException {
+ this.defaultLaunchCommand = defaultLaunchCommand;
+ this.defaultStopCommand = defaultStopCommand;
+ }
+
+ @Override
+ public void configure(ILaunchConfigurationWorkingCopy launchConfig) throws CoreException {
+ boolean detectStartupCommand = RSELaunchConfigProperties.isDetectStartupCommand(launchConfig, true);
+ String currentStartupCmd = RSELaunchConfigProperties.getStartupCommand(launchConfig);
+ if( detectStartupCommand || !isSet(currentStartupCmd)) {
+ RSELaunchConfigProperties.setStartupCommand(defaultLaunchCommand, launchConfig);
+ }
+
+ boolean detectShutdownCommand = RSELaunchConfigProperties.isDetectShutdownCommand(launchConfig, true);
+ String currentStopCmd = RSELaunchConfigProperties.getShutdownCommand(launchConfig);
+ if( detectShutdownCommand || isSet(currentStopCmd)) {
+ RSELaunchConfigProperties.setShutdownCommand(defaultStopCommand, launchConfig);
+ }
+ }
+
+ private boolean isSet(String value) {
+ return value != null
+ && value.length() > 0;
+ }
+}
Property changes on: trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSELaunchConfigurator.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
12 years, 10 months
JBoss Tools SVN: r32553 - in trunk/hibernatetools: features and 21 other directories.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2011-07-04 11:20:05 -0400 (Mon, 04 Jul 2011)
New Revision: 32553
Modified:
trunk/hibernatetools/features/org.hibernate.eclipse.feature/pom.xml
trunk/hibernatetools/features/org.hibernate.eclipse.test.feature/pom.xml
trunk/hibernatetools/features/pom.xml
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/pom.xml
trunk/hibernatetools/plugins/org.hibernate.eclipse.help/pom.xml
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.apt.ui/pom.xml
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/pom.xml
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/pom.xml
trunk/hibernatetools/plugins/org.hibernate.eclipse/pom.xml
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/pom.xml
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/pom.xml
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/pom.xml
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml.ui/pom.xml
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/pom.xml
trunk/hibernatetools/plugins/pom.xml
trunk/hibernatetools/pom.xml
trunk/hibernatetools/site/pom.xml
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/pom.xml
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/pom.xml
trunk/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/pom.xml
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/pom.xml
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.test/pom.xml
trunk/hibernatetools/tests/pom.xml
Log:
JBIDE-9260 hibernatetools bumped to 3.4.0.qualifier/snapshot consistently
Modified: trunk/hibernatetools/features/org.hibernate.eclipse.feature/pom.xml
===================================================================
--- trunk/hibernatetools/features/org.hibernate.eclipse.feature/pom.xml 2011-07-04 14:28:09 UTC (rev 32552)
+++ trunk/hibernatetools/features/org.hibernate.eclipse.feature/pom.xml 2011-07-04 15:20:05 UTC (rev 32553)
@@ -4,7 +4,7 @@
<parent>
<groupId>org.jboss.tools.hibernatetools</groupId>
<artifactId>features</artifactId>
- <version>0.0.1-SNAPSHOT</version>
+ <version>3.4.0-SNAPSHOT</version>
</parent>
<groupId>org.jboss.tools.hibernatetools.features</groupId>
<artifactId>org.hibernate.eclipse.feature</artifactId>
Modified: trunk/hibernatetools/features/org.hibernate.eclipse.test.feature/pom.xml
===================================================================
--- trunk/hibernatetools/features/org.hibernate.eclipse.test.feature/pom.xml 2011-07-04 14:28:09 UTC (rev 32552)
+++ trunk/hibernatetools/features/org.hibernate.eclipse.test.feature/pom.xml 2011-07-04 15:20:05 UTC (rev 32553)
@@ -4,7 +4,7 @@
<parent>
<groupId>org.jboss.tools.hibernatetools</groupId>
<artifactId>features</artifactId>
- <version>0.0.1-SNAPSHOT</version>
+ <version>3.4.0-SNAPSHOT</version>
</parent>
<groupId>org.jboss.tools.hibernatetools.plugins</groupId>
<artifactId>org.hibernate.eclipse.test.feature</artifactId>
Modified: trunk/hibernatetools/features/pom.xml
===================================================================
--- trunk/hibernatetools/features/pom.xml 2011-07-04 14:28:09 UTC (rev 32552)
+++ trunk/hibernatetools/features/pom.xml 2011-07-04 15:20:05 UTC (rev 32553)
@@ -4,12 +4,12 @@
<parent>
<groupId>org.jboss.tools</groupId>
<artifactId>hibernatetools</artifactId>
- <version>0.0.1-SNAPSHOT</version>
+ <version>3.4.0-SNAPSHOT</version>
</parent>
<groupId>org.jboss.tools.hibernatetools</groupId>
<artifactId>features</artifactId>
<name>hibernatetools.features</name>
- <version>0.0.1-SNAPSHOT</version>
+ <version>3.4.0-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
<module>org.hibernate.eclipse.feature</module>
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/pom.xml
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse/pom.xml 2011-07-04 14:28:09 UTC (rev 32552)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse/pom.xml 2011-07-04 15:20:05 UTC (rev 32553)
@@ -4,7 +4,7 @@
<parent>
<groupId>org.jboss.tools.hibernatetools</groupId>
<artifactId>plugins</artifactId>
- <version>0.0.1-SNAPSHOT</version>
+ <version>3.4.0-SNAPSHOT</version>
</parent>
<groupId>org.jboss.tools.hibernatetools.plugins</groupId>
<artifactId>org.hibernate.eclipse</artifactId>
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/pom.xml
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/pom.xml 2011-07-04 14:28:09 UTC (rev 32552)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/pom.xml 2011-07-04 15:20:05 UTC (rev 32553)
@@ -4,7 +4,7 @@
<parent>
<groupId>org.jboss.tools.hibernatetools</groupId>
<artifactId>plugins</artifactId>
- <version>0.0.1-SNAPSHOT</version>
+ <version>3.4.0-SNAPSHOT</version>
</parent>
<groupId>org.jboss.tools.hibernatetools.plugins</groupId>
<artifactId>org.hibernate.eclipse.console</artifactId>
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.help/pom.xml
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.help/pom.xml 2011-07-04 14:28:09 UTC (rev 32552)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.help/pom.xml 2011-07-04 15:20:05 UTC (rev 32553)
@@ -4,7 +4,7 @@
<parent>
<groupId>org.jboss.tools.hibernatetools</groupId>
<artifactId>plugins</artifactId>
- <version>0.0.1-SNAPSHOT</version>
+ <version>3.4.0-SNAPSHOT</version>
</parent>
<groupId>org.jboss.tools.hibernatetools.plugins</groupId>
<artifactId>org.hibernate.eclipse.help</artifactId>
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.apt.ui/pom.xml
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.apt.ui/pom.xml 2011-07-04 14:28:09 UTC (rev 32552)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.apt.ui/pom.xml 2011-07-04 15:20:05 UTC (rev 32553)
@@ -4,7 +4,7 @@
<parent>
<groupId>org.jboss.tools.hibernatetools</groupId>
<artifactId>plugins</artifactId>
- <version>0.0.1-SNAPSHOT</version>
+ <version>3.4.0-SNAPSHOT</version>
</parent>
<groupId>org.jboss.tools.hibernatetools.plugins</groupId>
<artifactId>org.hibernate.eclipse.jdt.apt.ui</artifactId>
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/pom.xml
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/pom.xml 2011-07-04 14:28:09 UTC (rev 32552)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/pom.xml 2011-07-04 15:20:05 UTC (rev 32553)
@@ -4,7 +4,7 @@
<parent>
<groupId>org.jboss.tools.hibernatetools</groupId>
<artifactId>plugins</artifactId>
- <version>0.0.1-SNAPSHOT</version>
+ <version>3.4.0-SNAPSHOT</version>
</parent>
<groupId>org.jboss.tools.hibernatetools.plugins</groupId>
<artifactId>org.hibernate.eclipse.jdt.ui</artifactId>
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/pom.xml
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/pom.xml 2011-07-04 14:28:09 UTC (rev 32552)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/pom.xml 2011-07-04 15:20:05 UTC (rev 32553)
@@ -4,7 +4,7 @@
<parent>
<groupId>org.jboss.tools.hibernatetools</groupId>
<artifactId>plugins</artifactId>
- <version>0.0.1-SNAPSHOT</version>
+ <version>3.4.0-SNAPSHOT</version>
</parent>
<groupId>org.jboss.tools.hibernatetools.plugins</groupId>
<artifactId>org.hibernate.eclipse.mapper</artifactId>
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/pom.xml
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/pom.xml 2011-07-04 14:28:09 UTC (rev 32552)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/pom.xml 2011-07-04 15:20:05 UTC (rev 32553)
@@ -4,7 +4,7 @@
<parent>
<groupId>org.jboss.tools.hibernatetools</groupId>
<artifactId>plugins</artifactId>
- <version>0.0.1-SNAPSHOT</version>
+ <version>3.4.0-SNAPSHOT</version>
</parent>
<groupId>org.jboss.tools.hibernatetools.plugins</groupId>
<artifactId>org.jboss.tools.hibernate.jpt.core</artifactId>
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/pom.xml
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/pom.xml 2011-07-04 14:28:09 UTC (rev 32552)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/pom.xml 2011-07-04 15:20:05 UTC (rev 32553)
@@ -4,7 +4,7 @@
<parent>
<groupId>org.jboss.tools.hibernatetools</groupId>
<artifactId>plugins</artifactId>
- <version>0.0.1-SNAPSHOT</version>
+ <version>3.4.0-SNAPSHOT</version>
</parent>
<groupId>org.jboss.tools.hibernatetools.plugins</groupId>
<artifactId>org.jboss.tools.hibernate.jpt.ui</artifactId>
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/pom.xml
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/pom.xml 2011-07-04 14:28:09 UTC (rev 32552)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/pom.xml 2011-07-04 15:20:05 UTC (rev 32553)
@@ -4,7 +4,7 @@
<parent>
<groupId>org.jboss.tools.hibernatetools</groupId>
<artifactId>plugins</artifactId>
- <version>0.0.1-SNAPSHOT</version>
+ <version>3.4.0-SNAPSHOT</version>
</parent>
<groupId>org.jboss.tools.hibernatetools.plugins</groupId>
<artifactId>org.jboss.tools.hibernate.ui</artifactId>
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/pom.xml
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/pom.xml 2011-07-04 14:28:09 UTC (rev 32552)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/pom.xml 2011-07-04 15:20:05 UTC (rev 32553)
@@ -4,7 +4,7 @@
<parent>
<groupId>org.jboss.tools.hibernatetools</groupId>
<artifactId>plugins</artifactId>
- <version>0.0.1-SNAPSHOT</version>
+ <version>3.4.0-SNAPSHOT</version>
</parent>
<groupId>org.jboss.tools.hibernatetools.plugins</groupId>
<artifactId>org.jboss.tools.hibernate.xml</artifactId>
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml.ui/pom.xml
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml.ui/pom.xml 2011-07-04 14:28:09 UTC (rev 32552)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml.ui/pom.xml 2011-07-04 15:20:05 UTC (rev 32553)
@@ -4,7 +4,7 @@
<parent>
<groupId>org.jboss.tools.hibernatetools</groupId>
<artifactId>plugins</artifactId>
- <version>0.0.1-SNAPSHOT</version>
+ <version>3.4.0-SNAPSHOT</version>
</parent>
<groupId>org.jboss.tools.hibernatetools.plugins</groupId>
<artifactId>org.jboss.tools.hibernate.xml.ui</artifactId>
Modified: trunk/hibernatetools/plugins/pom.xml
===================================================================
--- trunk/hibernatetools/plugins/pom.xml 2011-07-04 14:28:09 UTC (rev 32552)
+++ trunk/hibernatetools/plugins/pom.xml 2011-07-04 15:20:05 UTC (rev 32553)
@@ -4,12 +4,12 @@
<parent>
<groupId>org.jboss.tools</groupId>
<artifactId>hibernatetools</artifactId>
- <version>0.0.1-SNAPSHOT</version>
+ <version>3.4.0-SNAPSHOT</version>
</parent>
<groupId>org.jboss.tools.hibernatetools</groupId>
<artifactId>plugins</artifactId>
<name>hibernatetools.plugins</name>
- <version>0.0.1-SNAPSHOT</version>
+ <version>3.4.0-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
<module>org.hibernate.eclipse</module>
Modified: trunk/hibernatetools/pom.xml
===================================================================
--- trunk/hibernatetools/pom.xml 2011-07-04 14:28:09 UTC (rev 32552)
+++ trunk/hibernatetools/pom.xml 2011-07-04 15:20:05 UTC (rev 32553)
@@ -10,7 +10,7 @@
<groupId>org.jboss.tools</groupId>
<artifactId>hibernatetools</artifactId>
<name>hibernatetools.all</name>
- <version>0.0.1-SNAPSHOT</version>
+ <version>3.4.0-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
<module>features</module>
Modified: trunk/hibernatetools/site/pom.xml
===================================================================
--- trunk/hibernatetools/site/pom.xml 2011-07-04 14:28:09 UTC (rev 32552)
+++ trunk/hibernatetools/site/pom.xml 2011-07-04 15:20:05 UTC (rev 32553)
@@ -4,11 +4,11 @@
<parent>
<groupId>org.jboss.tools</groupId>
<artifactId>hibernatetools</artifactId>
- <version>0.0.1-SNAPSHOT</version>
+ <version>3.4.0-SNAPSHOT</version>
</parent>
<groupId>org.jboss.tools.hibernatetools</groupId>
<artifactId>hibernatetools.site</artifactId>
<name>hibernatetools.site</name>
- <version>0.0.1-SNAPSHOT</version>
+ <version>3.4.0-SNAPSHOT</version>
<packaging>eclipse-update-site</packaging>
</project>
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/pom.xml
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/pom.xml 2011-07-04 14:28:09 UTC (rev 32552)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/pom.xml 2011-07-04 15:20:05 UTC (rev 32553)
@@ -4,7 +4,7 @@
<parent>
<groupId>org.jboss.tools.hibernatetools</groupId>
<artifactId>tests</artifactId>
- <version>0.0.1-SNAPSHOT</version>
+ <version>3.4.0-SNAPSHOT</version>
</parent>
<groupId>org.jboss.tools.hibernatetools.tests</groupId>
<artifactId>org.hibernate.eclipse.console.test</artifactId>
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/pom.xml
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/pom.xml 2011-07-04 14:28:09 UTC (rev 32552)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/pom.xml 2011-07-04 15:20:05 UTC (rev 32553)
@@ -4,7 +4,7 @@
<parent>
<groupId>org.jboss.tools.hibernatetools</groupId>
<artifactId>tests</artifactId>
- <version>0.0.1-SNAPSHOT</version>
+ <version>3.4.0-SNAPSHOT</version>
</parent>
<groupId>org.jboss.tools.hibernatetools.tests</groupId>
<artifactId>org.hibernate.eclipse.jdt.ui.test</artifactId>
Modified: trunk/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/pom.xml
===================================================================
--- trunk/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/pom.xml 2011-07-04 14:28:09 UTC (rev 32552)
+++ trunk/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/pom.xml 2011-07-04 15:20:05 UTC (rev 32553)
@@ -4,7 +4,7 @@
<parent>
<groupId>org.jboss.tools.hibernatetools</groupId>
<artifactId>tests</artifactId>
- <version>0.0.1-SNAPSHOT</version>
+ <version>3.4.0-SNAPSHOT</version>
</parent>
<groupId>org.jboss.tools.hibernatetools.tests</groupId>
<artifactId>org.jboss.tools.hibernate.jpt.core.test</artifactId>
Modified: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/pom.xml
===================================================================
--- trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/pom.xml 2011-07-04 14:28:09 UTC (rev 32552)
+++ trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/pom.xml 2011-07-04 15:20:05 UTC (rev 32553)
@@ -4,7 +4,7 @@
<parent>
<groupId>org.jboss.tools.hibernatetools</groupId>
<artifactId>tests</artifactId>
- <version>0.0.1-SNAPSHOT</version>
+ <version>3.4.0-SNAPSHOT</version>
</parent>
<groupId>org.jboss.tools.hibernatetools.tests</groupId>
<artifactId>org.jboss.tools.hibernate.ui.bot.test</artifactId>
Modified: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.test/pom.xml
===================================================================
--- trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.test/pom.xml 2011-07-04 14:28:09 UTC (rev 32552)
+++ trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.test/pom.xml 2011-07-04 15:20:05 UTC (rev 32553)
@@ -4,7 +4,7 @@
<parent>
<groupId>org.jboss.tools.hibernatetools</groupId>
<artifactId>tests</artifactId>
- <version>0.0.1-SNAPSHOT</version>
+ <version>3.4.0-SNAPSHOT</version>
</parent>
<groupId>org.jboss.tools.hibernatetools.tests</groupId>
<artifactId>org.jboss.tools.hibernate.ui.test</artifactId>
Modified: trunk/hibernatetools/tests/pom.xml
===================================================================
--- trunk/hibernatetools/tests/pom.xml 2011-07-04 14:28:09 UTC (rev 32552)
+++ trunk/hibernatetools/tests/pom.xml 2011-07-04 15:20:05 UTC (rev 32553)
@@ -4,12 +4,12 @@
<parent>
<groupId>org.jboss.tools</groupId>
<artifactId>hibernatetools</artifactId>
- <version>0.0.1-SNAPSHOT</version>
+ <version>3.4.0-SNAPSHOT</version>
</parent>
<groupId>org.jboss.tools.hibernatetools</groupId>
<artifactId>tests</artifactId>
<name>hibernatetools.tests</name>
- <version>0.0.1-SNAPSHOT</version>
+ <version>3.4.0-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
<module>org.hibernate.eclipse.console.test</module>
12 years, 10 months
JBoss Tools SVN: r32552 - trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-07-04 10:28:09 -0400 (Mon, 04 Jul 2011)
New Revision: 32552
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSELaunchDelegate.java
Log:
[JBIDE-9054] deprecated #findServer (replaced by using util method ServerConverter#checkedFindJBossServer)
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSELaunchDelegate.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSELaunchDelegate.java 2011-07-04 14:23:37 UTC (rev 32551)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSELaunchDelegate.java 2011-07-04 14:28:09 UTC (rev 32552)
@@ -9,9 +9,10 @@
* Red Hat, Inc. - initial API and implementation
*
* TODO: Logging and Progress Monitors
- ******************************************************************************/
+ ******************************************************************************/
package org.jboss.ide.eclipse.as.rse.core;
+import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
@@ -36,70 +37,83 @@
import org.jboss.ide.eclipse.as.core.server.internal.DeployableServerBehavior;
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.JBossServerBehavior.JBossBehaviourDelegate;
import org.jboss.ide.eclipse.as.core.server.internal.launch.JBossServerStartupLaunchConfiguration;
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.server.internal.launch.StopLaunchConfiguration;
+import org.jboss.ide.eclipse.as.core.server.internal.launch.configuration.JBossLaunchConfigProperties;
import org.jboss.ide.eclipse.as.core.util.ArgsUtil;
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.JBossServerBehaviorUtils;
import org.jboss.ide.eclipse.as.core.util.LaunchCommandPreferences;
import org.jboss.ide.eclipse.as.core.util.ServerConverter;
+import org.jboss.ide.eclipse.as.core.util.ServerUtil;
import org.jboss.ide.eclipse.as.rse.core.RSEHostShellModel.ServerShellModel;
public class RSELaunchDelegate implements StartLaunchDelegate, IStartLaunchSetupParticipant {
-
public void actualLaunch(
JBossServerStartupLaunchConfiguration launchConfig,
ILaunchConfiguration configuration, String mode, ILaunch launch,
IProgressMonitor monitor) throws CoreException {
JBossServerBehavior beh = JBossServerBehaviorUtils.getServerBehavior(configuration);
- if(LaunchCommandPreferences.ignoreLaunchCommand(beh.getServer())) {
+ if (LaunchCommandPreferences.ignoreLaunchCommand(beh.getServer())) {
beh.setServerStarting();
beh.setServerStarted();
return;
}
beh.setServerStarting();
- String command = RSELaunchConfigUtils.getStartupCommand(configuration);
+ String command = RSELaunchConfigProperties.getStartupCommand(configuration);
try {
ServerShellModel model = RSEHostShellModel.getInstance().getModel(beh.getServer());
- IHostShell shell = model.createStartupShell("/", command, new String[]{}, new NullProgressMonitor());
+ IHostShell shell = model.createStartupShell("/", command, new String[] {}, new NullProgressMonitor());
addShellOutputListener(shell);
launchPingThread(beh);
- } catch(SystemMessageException sme) {
- beh.setServerStopped(); // Not sure when this comes, but we should try to keep track
- throw new CoreException(new Status(IStatus.ERROR, org.jboss.ide.eclipse.as.rse.core.RSECorePlugin.PLUGIN_ID,
- sme.getMessage(), sme));
- }
+ } catch (SystemMessageException sme) {
+ beh.setServerStopped(); // Not sure when this comes, but we should
+ // try to keep track
+ throw new CoreException(new Status(IStatus.ERROR,
+ org.jboss.ide.eclipse.as.rse.core.RSECorePlugin.PLUGIN_ID,
+ sme.getMessage(), sme));
+ }
}
-
+
private void launchPingThread(DeployableServerBehavior beh) {
// TODO do it properly here
RSEHostShellModel.delay(30000);
beh.setServerStarted();
}
-
-
+
// Only for debugging
private void addShellOutputListener(IHostShell shell) {
IHostShellOutputListener listener = null;
- listener = new IHostShellOutputListener(){
+ listener = new IHostShellOutputListener() {
public void shellOutputChanged(IHostShellChangeEvent event) {
IHostOutput[] out = event.getLines();
- for(int i = 0; i < out.length; i++ ) {
+ for (int i = 0; i < out.length; i++) {
// TODO listen here for obvious exceptions or failures
// System.out.println(out[i]);
}
}
};
- //shell.addOutputListener(listener);
+ // shell.addOutputListener(listener);
}
-
+
+ /**
+ *
+ * @deprecated
+ * This was called from {@link RSEBehaviourDelegate#stop(boolean)
+ * WTP keeps launching in launch configs and stopping in
+ * the server behavior. We should not change that and offer
+ * stopping-functionalities in launch delegates.
+ *
+ * @param behaviour
+ */
+ @Deprecated
public static void launchStopServerCommand(JBossServerBehavior behaviour) {
- if( LaunchCommandPreferences.ignoreLaunchCommand(behaviour.getServer())) {
+ if (LaunchCommandPreferences.ignoreLaunchCommand(behaviour.getServer())) {
behaviour.setServerStopping();
behaviour.setServerStopped();
return;
@@ -110,26 +124,25 @@
config = behaviour.getServer().getLaunchConfiguration(false, new NullProgressMonitor());
String defaultCmd = getDefaultStopCommand(behaviour.getServer(), true);
command2 = config == null ? defaultCmd :
- RSELaunchConfigUtils.getShutdownCommand(config, defaultCmd);
+ RSELaunchConfigProperties.getShutdownCommand(config, defaultCmd);
behaviour.setServerStopping();
ServerShellModel model = RSEHostShellModel.getInstance().getModel(behaviour.getServer());
- model.executeRemoteCommand("/", command2, new String[]{}, new NullProgressMonitor(), 10000, true);
- if( model.getStartupShell() != null && model.getStartupShell().isActive())
+ model.executeRemoteCommand("/", command2, new String[] {}, new NullProgressMonitor(), 10000, true);
+ if (model.getStartupShell() != null && model.getStartupShell().isActive())
model.getStartupShell().writeToShell("exit");
behaviour.setServerStopped();
- } catch(CoreException ce) {
+ } catch (CoreException ce) {
behaviour.setServerStarted();
ServerLogger.getDefault().log(behaviour.getServer(), ce.getStatus());
}
}
-
-
+
public boolean preLaunchCheck(ILaunchConfiguration configuration,
String mode, IProgressMonitor monitor) throws CoreException {
- // ping if up
+ // ping if up
final JBossServerBehavior beh = JBossServerBehaviorUtils.getServerBehavior(configuration);
boolean started = WebPortPoller.onePing(beh.getServer());
- if( started ) {
+ if (started) {
beh.setServerStarting();
beh.setServerStarted();
return false;
@@ -148,56 +161,58 @@
public void setupLaunchConfiguration(
ILaunchConfigurationWorkingCopy workingCopy, IServer server)
throws CoreException {
- boolean detectStartupCommand = RSELaunchConfigUtils.isDetectStartupCommand(workingCopy, true);
- String currentStartupCmd = RSELaunchConfigUtils.getStartupCommand(workingCopy);
- if( detectStartupCommand || currentStartupCmd == null || "".equals(currentStartupCmd)) {
- RSELaunchConfigUtils.setStartupCommand(getDefaultLaunchCommand(workingCopy), workingCopy);
- }
-
- boolean detectShutdownCommand = RSELaunchConfigUtils.isDetectShutdownCommand(workingCopy, true);
- String currentStopCmd = RSELaunchConfigUtils.getShutdownCommand(workingCopy);
- if( detectShutdownCommand || currentStopCmd == null || "".equals(currentStopCmd)) {
- RSELaunchConfigUtils.setShutdownCommand(getDefaultStopCommand(server), workingCopy);
- }
+ new RSELaunchConfigurator(getDefaultLaunchCommand(workingCopy), getDefaultStopCommand(server))
+ .configure(workingCopy);
/*
- * /usr/lib/jvm/jre/bin/java -Dprogram.name=run.sh -server -Xms1530M -Xmx1530M
- * -XX:PermSize=425M -XX:MaxPermSize=425M -Dorg.jboss.resolver.warning=true
- * -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000
- * -Djboss.partition.udpGroup=228.1.2.3 -Djboss.webpartition.mcast_port=45577
- * -Djboss.hapartition.mcast_port=45566 -Djboss.ejb3entitypartition.mcast_port=43333
- * -Djboss.ejb3sfsbpartition.mcast_port=45551 -Djboss.jvmRoute=node-10.209.183.100
- * -Djboss.gossip_port=12001 -Djboss.gossip_refresh=5000 -Djava.awt.headless=true
- * -Djava.net.preferIPv4Stack=true
- * -Djava.endorsed.dirs=/opt/jboss-eap-5.1.0.Beta/jboss-as/lib/endorsed
- * -classpath /opt/jboss-eap-5.1.0.Beta/jboss-as/bin/run.jar org.jboss.Main
- * -c default -b 10.209.183.100
+ * /usr/lib/jvm/jre/bin/java -Dprogram.name=run.sh -server -Xms1530M
+ * -Xmx1530M -XX:PermSize=425M -XX:MaxPermSize=425M
+ * -Dorg.jboss.resolver.warning=true
+ * -Dsun.rmi.dgc.client.gcInterval=3600000
+ * -Dsun.rmi.dgc.server.gcInterval=3600000
+ * -Djboss.partition.udpGroup=228.1.2.3
+ * -Djboss.webpartition.mcast_port=45577
+ * -Djboss.hapartition.mcast_port=45566
+ * -Djboss.ejb3entitypartition.mcast_port=43333
+ * -Djboss.ejb3sfsbpartition.mcast_port=45551
+ * -Djboss.jvmRoute=node-10.209.183.100 -Djboss.gossip_port=12001
+ * -Djboss.gossip_refresh=5000 -Djava.awt.headless=true
+ * -Djava.net.preferIPv4Stack=true
+ * -Djava.endorsed.dirs=/opt/jboss-eap-5.1.0.Beta/jboss-as/lib/endorsed
+ * -classpath /opt/jboss-eap-5.1.0.Beta/jboss-as/bin/run.jar
+ * org.jboss.Main -c default -b 10.209.183.100
*/
}
-
+
+ @Deprecated
public static String getDefaultStopCommand(IServer server) {
try {
return getDefaultStopCommand(server, false);
- } catch(CoreException ce) {/* ignore, INTENTIONAL */}
+ } catch (CoreException ce) {/* ignore, INTENTIONAL */
+ }
return null;
}
-
+
+ @Deprecated
public static String getDefaultStopCommand(IServer server, boolean errorOnFail) throws CoreException {
String rseHome = null;
rseHome = RSEUtils.getRSEHomeDir(server, errorOnFail);
JBossServer jbs = ServerConverter.getJBossServer(server);
-
+
String stop = new Path(rseHome)
- .append(IJBossRuntimeResourceConstants.BIN)
- .append(IJBossRuntimeResourceConstants.SHUTDOWN_SH).toString()
- + IJBossRuntimeConstants.SPACE;
-
+ .append(IJBossRuntimeResourceConstants.BIN)
+ .append(IJBossRuntimeResourceConstants.SHUTDOWN_SH).toString()
+ + IJBossRuntimeConstants.SPACE;
+
// Pull args from single utility method
- stop += StopLaunchConfiguration.getDefaultArgs(jbs);
+ // stop += StopLaunchConfiguration.getDefaultArgs(jbs);
+ JBossBehaviourDelegate delegate = ServerUtil.checkedGetBehaviorDelegate(server);
+ stop += delegate.getDefaultStopArguments();
return stop;
}
+ @Deprecated
public static IServer findServer(ILaunchConfiguration config) throws CoreException {
- String serverId = config.getAttribute("server-id", (String)null);
+ String serverId = config.getAttribute("server-id", (String) null);
JBossServer jbs = ServerConverter.findJBossServer(serverId);
if (jbs == null) {
throw new CoreException(new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID,
@@ -205,31 +220,31 @@
}
return jbs.getServer();
}
-
+
public static String getDefaultLaunchCommand(ILaunchConfiguration config) throws CoreException {
- IServer server = findServer(config);
- String rseHome = server.getAttribute(RSEUtils.RSE_SERVER_HOME_DIR, "");
+ String serverId = JBossLaunchConfigProperties.getServerId(config);
+ JBossServer jbossServer = ServerConverter.checkedFindJBossServer(serverId);
+ String rseHome = jbossServer.getServer().getAttribute(RSEUtils.RSE_SERVER_HOME_DIR, "");
// initialize startup command to something reasonable
String currentArgs = config.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, ""); //$NON-NLS-1$
String currentVMArgs = config.getAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, ""); //$NON-NLS-1$
-
- currentVMArgs= ArgsUtil.setArg(currentVMArgs, null,
+
+ currentVMArgs = ArgsUtil.setArg(currentVMArgs, null,
IJBossRuntimeConstants.SYSPROP + IJBossRuntimeConstants.ENDORSED_DIRS,
new Path(rseHome).append(
IJBossRuntimeResourceConstants.LIB).append(
- IJBossRuntimeResourceConstants.ENDORSED).toOSString(), true);
+ IJBossRuntimeResourceConstants.ENDORSED).toOSString(), true);
String libPath = new Path(rseHome).append(IJBossRuntimeResourceConstants.BIN)
.append(IJBossRuntimeResourceConstants.NATIVE).toOSString();
- currentVMArgs= ArgsUtil.setArg(currentVMArgs, null,
+ currentVMArgs = ArgsUtil.setArg(currentVMArgs, null,
IJBossRuntimeConstants.SYSPROP + IJBossRuntimeConstants.JAVA_LIB_PATH,
libPath, true);
-
- String cmd = "java " + currentVMArgs + " -classpath " +
- new Path(rseHome).append(IJBossRuntimeResourceConstants.BIN).append(
- IJBossRuntimeResourceConstants.START_JAR).toString() + IJBossRuntimeConstants.SPACE +
- IJBossRuntimeConstants.START_MAIN_TYPE + IJBossRuntimeConstants.SPACE + currentArgs + "&";
+ String cmd = "java " + currentVMArgs + " -classpath " +
+ new Path(rseHome).append(IJBossRuntimeResourceConstants.BIN).append(
+ IJBossRuntimeResourceConstants.START_JAR).toString() + IJBossRuntimeConstants.SPACE +
+ IJBossRuntimeConstants.START_MAIN_TYPE + IJBossRuntimeConstants.SPACE + currentArgs + "&";
return cmd;
}
}
12 years, 10 months
JBoss Tools SVN: r32551 - in trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core: util and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-07-04 10:23:37 -0400 (Mon, 04 Jul 2011)
New Revision: 32551
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/Messages.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/Messages.properties
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ServerConverter.java
Log:
[JBIDE-9054] added method for checked (throws CoreException) getting server for a given server id
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/Messages.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/Messages.java 2011-07-04 13:15:30 UTC (rev 32550)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/Messages.java 2011-07-04 14:23:37 UTC (rev 32551)
@@ -76,6 +76,8 @@
public static String CannotSetUpImproperServer;
public static String CannotLocateServerHome;
public static String CouldNotFindServerBehavior;
+ public static String CouldNotFindServerBehaviorDelegate;
+ public static String CouldNotFindServer;
public static String ServerRuntimeNotFound;
public static String ServerRuntimeConfigNotFound;
public static String ServerNotFound;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/Messages.properties
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/Messages.properties 2011-07-04 13:15:30 UTC (rev 32550)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/Messages.properties 2011-07-04 14:23:37 UTC (rev 32551)
@@ -56,6 +56,8 @@
CannotSetUpImproperServer=Cannot prepare server {0} for launch because it is not a proper JBoss Server
CannotLocateServerHome= Server {0} is corrupt and the server home is unable to be located.
CouldNotFindServerBehavior=Could not find server behavior for server {0}.
+CouldNotFindServerBehaviorDelegate=Could not find server behavior delegate for server {0}.
+CouldNotFindServer=Could not find jboss server with id {0}
ServerRuntimeNotFound=Runtime for server {0} cannot be found.
ServerRuntimeConfigNotFound=Configuration for runtime {0} is not set.
ServerNotFound=Server {0} not found.
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-07-04 13:15:30 UTC (rev 32550)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ServerConverter.java 2011-07-04 14:23:37 UTC (rev 32551)
@@ -46,6 +46,16 @@
return getJBossServer(s);
}
+ public static JBossServer checkedFindJBossServer(String serverId) throws CoreException {
+ JBossServer server = findJBossServer(serverId);
+ if (server == null) {
+ throw new CoreException(
+ new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID,
+ NLS.bind(Messages.CouldNotFindServer, serverId)));
+ }
+ return server;
+ }
+
@SuppressWarnings("unchecked")
public static <SERVER> SERVER checkedGetJBossServer(IServer server, Class<SERVER> serverClass) throws CoreException {
if (server == null) {
12 years, 10 months