JBoss Tools SVN: r32406 - 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-06-28 10:49:39 -0400 (Tue, 28 Jun 2011)
New Revision: 32406
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSELaunchDelegate.java
Log:
[JBIDE-9263] replaced duplicate "ignore launch command" check by call to util class
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-06-28 14:46:06 UTC (rev 32405)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSELaunchDelegate.java 2011-06-28 14:49:39 UTC (rev 32406)
@@ -101,9 +101,7 @@
}
public static void launchStopServerCommand(JBossServerBehavior behaviour) {
- String ignore = behaviour.getServer().getAttribute(IJBossToolingConstants.IGNORE_LAUNCH_COMMANDS, (String)null);
- Boolean ignoreB = ignore == null ? new Boolean(false) : new Boolean(ignore);
- if( ignoreB.booleanValue()) {
+ if( LaunchCommandPreferences.ignoreLaunchCommand(behaviour.getServer())) {
behaviour.setServerStopping();
behaviour.setServerStopped();
return;
14 years, 9 months
JBoss Tools SVN: r32405 - 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-06-28 10:46:06 -0400 (Tue, 28 Jun 2011)
New Revision: 32405
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/RSEPublishMethod.java
Log:
[JBIDE-9215] moved launchCommandNoResult to RSEPublishMethod since this is the only place where it's used. Furthermore turned it from public static to private
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-06-28 14:10:55 UTC (rev 32404)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSELaunchDelegate.java 2011-06-28 14:46:06 UTC (rev 32405)
@@ -100,15 +100,6 @@
//shell.addOutputListener(listener);
}
- public static void launchCommandNoResult(JBossServerBehavior behaviour, int delay, String command) {
- try {
- ServerShellModel model = RSEHostShellModel.getInstance().getModel(behaviour.getServer());
- model.executeRemoteCommand("/", command, new String[]{}, new NullProgressMonitor(), delay, true);
- } catch( CoreException ce ) {
- ServerLogger.getDefault().log(behaviour.getServer(), ce.getStatus());
- }
- }
-
public static void launchStopServerCommand(JBossServerBehavior behaviour) {
String ignore = behaviour.getServer().getAttribute(IJBossToolingConstants.IGNORE_LAUNCH_COMMANDS, (String)null);
Boolean ignoreB = ignore == null ? new Boolean(false) : new Boolean(ignore);
@@ -161,17 +152,7 @@
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(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
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEPublishMethod.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEPublishMethod.java 2011-06-28 14:10:55 UTC (rev 32404)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEPublishMethod.java 2011-06-28 14:46:06 UTC (rev 32405)
@@ -26,6 +26,7 @@
import org.eclipse.rse.services.files.IFileService;
import org.eclipse.rse.subsystems.files.core.servicesubsystem.IFileServiceSubSystem;
import org.eclipse.wst.server.core.IServer;
+import org.jboss.ide.eclipse.as.core.extensions.events.ServerLogger;
import org.jboss.ide.eclipse.as.core.publishers.AbstractPublishMethod;
import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
import org.jboss.ide.eclipse.as.core.server.IJBoss6Server;
@@ -36,6 +37,7 @@
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.ServerConverter;
+import org.jboss.ide.eclipse.as.rse.core.RSEHostShellModel.ServerShellModel;
public class RSEPublishMethod extends AbstractPublishMethod {
@@ -77,13 +79,13 @@
protected void startDeploymentScanner() {
String cmd = getDeploymentScannerCommand(new NullProgressMonitor(), true);
if( cmd != null )
- RSELaunchDelegate.launchCommandNoResult((JBossServerBehavior)behaviour, 3000, cmd);
+ launchCommandNoResult((JBossServerBehavior)behaviour, 3000, cmd);
}
protected void stopDeploymentScanner() {
String cmd = getDeploymentScannerCommand(new NullProgressMonitor(), false);
if( cmd != null )
- RSELaunchDelegate.launchCommandNoResult((JBossServerBehavior)behaviour, 3000, cmd);
+ launchCommandNoResult((JBossServerBehavior)behaviour, 3000, cmd);
}
protected String getDeploymentScannerCommand(IProgressMonitor monitor, boolean start) {
@@ -190,5 +192,15 @@
public String getPublishDefaultRootFolder(IServer server) {
return getRemoteRootFolder().toString();
}
+
+ private void launchCommandNoResult(JBossServerBehavior behaviour, int delay, String command) {
+ try {
+ ServerShellModel model = RSEHostShellModel.getInstance().getModel(behaviour.getServer());
+ model.executeRemoteCommand("/", command, new String[]{}, new NullProgressMonitor(), delay, true);
+ } catch( CoreException ce ) {
+ ServerLogger.getDefault().log(behaviour.getServer(), ce.getStatus());
+ }
+ }
+
}
14 years, 9 months
JBoss Tools SVN: r32404 - in trunk/as/plugins: org.jboss.ide.eclipse.as.rse.ui/src/org/jboss/ide/eclipse/as/rse/ui and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-06-28 10:10:55 -0400 (Tue, 28 Jun 2011)
New Revision: 32404
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSELaunchConfigUtils.java
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.ui/src/org/jboss/ide/eclipse/as/rse/ui/RSELaunchTabProvider.java
Log:
[JBIDE-9215] created util class to set the launch config attributes. refactored the code accordingly
Added: 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/RSELaunchConfigUtils.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSELaunchConfigUtils.java 2011-06-28 14:10:55 UTC (rev 32404)
@@ -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 RSELaunchConfigUtils {
+
+ 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/RSELaunchConfigUtils.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
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-06-28 12:50:27 UTC (rev 32403)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSELaunchDelegate.java 2011-06-28 14:10:55 UTC (rev 32404)
@@ -52,12 +52,7 @@
public class RSELaunchDelegate implements StartLaunchDelegate, IStartLaunchSetupParticipant {
- 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 void actualLaunch(
JBossServerStartupLaunchConfiguration launchConfig,
ILaunchConfiguration configuration, String mode, ILaunch launch,
@@ -70,7 +65,7 @@
}
beh.setServerStarting();
- String command = configuration.getAttribute(RSE_STARTUP_COMMAND, (String)null);
+ String command = RSELaunchConfigUtils.getStartupCommand(configuration);
try {
ServerShellModel model = RSEHostShellModel.getInstance().getModel(beh.getServer());
IHostShell shell = model.createStartupShell("/", command, new String[]{}, new NullProgressMonitor());
@@ -128,7 +123,7 @@
config = behaviour.getServer().getLaunchConfiguration(false, new NullProgressMonitor());
String defaultCmd = getDefaultStopCommand(behaviour.getServer(), true);
command2 = config == null ? defaultCmd :
- config.getAttribute(RSE_SHUTDOWN_COMMAND, defaultCmd);
+ RSELaunchConfigUtils.getShutdownCommand(config, defaultCmd);
behaviour.setServerStopping();
ServerShellModel model = RSEHostShellModel.getInstance().getModel(behaviour.getServer());
model.executeRemoteCommand("/", command2, new String[]{}, new NullProgressMonitor(), 10000, true);
@@ -166,18 +161,16 @@
public void setupLaunchConfiguration(
ILaunchConfigurationWorkingCopy workingCopy, IServer server)
throws CoreException {
- boolean detectStartupCommand, detectShutdownCommand;
- detectStartupCommand = workingCopy.getAttribute(DETECT_STARTUP_COMMAND, true);
- detectShutdownCommand = workingCopy.getAttribute(DETECT_SHUTDOWN_COMMAND, true);
-
- String currentStartupCmd = workingCopy.getAttribute(RSELaunchDelegate.RSE_STARTUP_COMMAND, (String)null);
+ boolean detectStartupCommand = RSELaunchConfigUtils.isDetectStartupCommand(workingCopy, true);
+ String currentStartupCmd = RSELaunchConfigUtils.getStartupCommand(workingCopy);
if( detectStartupCommand || currentStartupCmd == null || "".equals(currentStartupCmd)) {
- workingCopy.setAttribute(RSELaunchDelegate.RSE_STARTUP_COMMAND, getDefaultLaunchCommand(workingCopy));
+ RSELaunchConfigUtils.setStartupCommand(getDefaultLaunchCommand(workingCopy), workingCopy);
}
- String currentStopCmd = workingCopy.getAttribute(RSELaunchDelegate.RSE_SHUTDOWN_COMMAND, (String)null);
+ boolean detectShutdownCommand = RSELaunchConfigUtils.isDetectShutdownCommand(workingCopy, true);
+ String currentStopCmd = RSELaunchConfigUtils.getShutdownCommand(workingCopy);
if( detectShutdownCommand || currentStopCmd == null || "".equals(currentStopCmd)) {
- workingCopy.setAttribute(RSELaunchDelegate.RSE_SHUTDOWN_COMMAND, getDefaultStopCommand(server));
+ RSELaunchConfigUtils.setShutdownCommand(getDefaultStopCommand(server), workingCopy);
}
/*
* /usr/lib/jvm/jre/bin/java -Dprogram.name=run.sh -server -Xms1530M -Xmx1530M
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-06-28 12:50:27 UTC (rev 32403)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/src/org/jboss/ide/eclipse/as/rse/ui/RSELaunchTabProvider.java 2011-06-28 14:10:55 UTC (rev 32404)
@@ -27,6 +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.RSELaunchDelegate;
import org.jboss.ide.eclipse.as.ui.UIUtil;
import org.jboss.ide.eclipse.as.ui.launch.JBossLaunchConfigurationTabGroup.IJBossLaunchTabProvider;
@@ -121,16 +122,16 @@
this.initialConfig = configuration;
try {
- String startCommand = configuration.getAttribute(RSELaunchDelegate.RSE_STARTUP_COMMAND, "");
+ String startCommand = RSELaunchConfigUtils.getStartupCommand(configuration);
startText.setText(startCommand);
- boolean detectStartCommand = configuration.getAttribute(RSELaunchDelegate.DETECT_STARTUP_COMMAND, true);
+ boolean detectStartCommand = RSELaunchConfigUtils.isDetectStartupCommand(configuration, true);
autoStartArgs.setSelection(detectStartCommand);
startText.setEditable(!detectStartCommand);
startText.setEnabled(!detectStartCommand);
- String stopCommand = configuration.getAttribute(RSELaunchDelegate.RSE_SHUTDOWN_COMMAND, "");
+ String stopCommand = RSELaunchConfigUtils.getShutdownCommand(configuration);
stopText.setText(stopCommand);
- boolean detectStopCommand = configuration.getAttribute(RSELaunchDelegate.DETECT_SHUTDOWN_COMMAND, true);
+ boolean detectStopCommand = RSELaunchConfigUtils.isDetectShutdownCommand(configuration, true);
autoStopArgs.setSelection(detectStopCommand);
stopText.setEditable(!detectStopCommand);
stopText.setEnabled(!detectStopCommand);
@@ -140,10 +141,10 @@
}
}
public void performApply(ILaunchConfigurationWorkingCopy configuration) {
- configuration.setAttribute(RSELaunchDelegate.RSE_STARTUP_COMMAND, startText.getText());
- configuration.setAttribute(RSELaunchDelegate.RSE_SHUTDOWN_COMMAND, stopText.getText());
- configuration.setAttribute(RSELaunchDelegate.DETECT_STARTUP_COMMAND, autoStartArgs.getSelection());
- configuration.setAttribute(RSELaunchDelegate.DETECT_SHUTDOWN_COMMAND, autoStopArgs.getSelection());
+ RSELaunchConfigUtils.setStartupCommand(startText.getText(), configuration);
+ RSELaunchConfigUtils.setShutdownCommand(stopText.getText(), configuration);
+ RSELaunchConfigUtils.setDetectStartupCommand(autoStartArgs.getSelection(), configuration);
+ RSELaunchConfigUtils.setDetectShutdownCommand(autoStopArgs.getSelection(), configuration);
}
public String getName() {
return RSEUIMessages.RSE_REMOTE_LAUNCH;
14 years, 9 months
JBoss Tools SVN: r32403 - 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-06-28 08:50:27 -0400 (Tue, 28 Jun 2011)
New Revision: 32403
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/AbstractStartupConfigurator.java
Log:
[JBIDE-9215] cleanup
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/AbstractStartupConfigurator.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/AbstractStartupConfigurator.java 2011-06-28 12:49:44 UTC (rev 32402)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/AbstractStartupConfigurator.java 2011-06-28 12:50:27 UTC (rev 32403)
@@ -73,7 +73,6 @@
setClasspath(getClasspath(jbossServer, jbossRuntime, JBossRuntimeLaunchConfigUtils.getClasspath(launchConfig)), launchConfig);
setUseDefaultClassPath(false, launchConfig);
setServerId(getServerId(jbossServer), launchConfig);
- setDefaultsSet(launchConfig);
}
protected abstract String getEndorsedDir(IJBossServerRuntime runtime);
14 years, 9 months
JBoss Tools SVN: r32402 - 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-06-28 08:49:44 -0400 (Tue, 28 Jun 2011)
New Revision: 32402
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/AbstractStartupConfigurator.java
Log:
[JBIDE-9215] cleanup
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/AbstractStartupConfigurator.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/AbstractStartupConfigurator.java 2011-06-28 12:46:36 UTC (rev 32401)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/AbstractStartupConfigurator.java 2011-06-28 12:49:44 UTC (rev 32402)
@@ -21,16 +21,14 @@
import static org.jboss.ide.eclipse.as.core.server.internal.launch.JBossRuntimeLaunchConfigUtils.setProgramArguments;
import static org.jboss.ide.eclipse.as.core.server.internal.launch.JBossRuntimeLaunchConfigUtils.setServerId;
import static org.jboss.ide.eclipse.as.core.server.internal.launch.JBossRuntimeLaunchConfigUtils.setUseDefaultClassPath;
-import static org.jboss.ide.eclipse.as.core.server.internal.launch.JBossRuntimeLaunchConfigUtils.setWorkingDirectory;
import static org.jboss.ide.eclipse.as.core.server.internal.launch.JBossRuntimeLaunchConfigUtils.setVmArguments;
+import static org.jboss.ide.eclipse.as.core.server.internal.launch.JBossRuntimeLaunchConfigUtils.setWorkingDirectory;
-
import java.util.List;
import java.util.Map;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
import org.eclipse.jdt.launching.IVMInstall;
import org.eclipse.jdt.launching.JavaRuntime;
import org.eclipse.wst.server.core.IServer;
@@ -52,13 +50,6 @@
this.jbossRuntime = jbossServer.getRuntime();
}
- /*
- * (non-Javadoc)
- *
- * @see org.jboss.ide.eclipse.as.core.server.internal.launch.
- * ILaunchConfigConfigurator
- * #configure(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
- */
@Override
public void configure(ILaunchConfigurationWorkingCopy launchConfig) throws CoreException {
if (!areDefaultsSet(launchConfig)) {
14 years, 9 months
JBoss Tools SVN: r32401 - 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-06-28 08:46:36 -0400 (Tue, 28 Jun 2011)
New Revision: 32401
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/TwiddleLaunchConfiguration.java
Log:
[JBIDE-9054] replaced duplicate code by util method
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-06-28 11:38:43 UTC (rev 32400)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/TwiddleLaunchConfiguration.java 2011-06-28 12:46:36 UTC (rev 32401)
@@ -19,7 +19,6 @@
import static org.jboss.ide.eclipse.as.core.util.IJBossRuntimeConstants.SPACE;
import java.io.File;
-import java.io.FilenameFilter;
import java.util.ArrayList;
import java.util.List;
@@ -33,14 +32,12 @@
import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
import org.eclipse.jdt.launching.IRuntimeClasspathEntry;
-import org.eclipse.jdt.launching.JavaRuntime;
import org.eclipse.osgi.util.NLS;
import org.eclipse.wst.server.core.IServer;
import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
import org.jboss.ide.eclipse.as.core.Messages;
import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
-import org.jboss.ide.eclipse.as.core.util.IConstants;
import org.jboss.ide.eclipse.as.core.util.IJBossRuntimeConstants;
import org.jboss.ide.eclipse.as.core.util.IJBossRuntimeResourceConstants;
import org.jboss.ide.eclipse.as.core.util.LaunchConfigUtils;
@@ -57,13 +54,9 @@
IJBossRuntimeResourceConstants.BIN + File.separator + IJBossRuntimeResourceConstants.TWIDDLE_JAR;
public static ILaunchConfigurationWorkingCopy createLaunchConfiguration(IServer server, String args) throws CoreException {
- JBossServer jbs = ServerConverter.findJBossServer(server.getId());
- if (jbs == null) {
- throw new CoreException(new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID,
- NLS.bind(Messages.ServerNotFound, server.getName())));
- }
- IJBossServerRuntime jbrt = RuntimeUtils.checkedGetJBossServerRuntime(server);
+ JBossServer jbs = ServerConverter.checkedGetJBossServer(server);
String serverHome = ServerUtil.checkedGetServerHome(jbs);
+ IJBossServerRuntime jbrt = RuntimeUtils.checkedGetJBossServerRuntime(server);
ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
ILaunchConfigurationType launchConfigType = launchManager.getLaunchConfigurationType(TWIDDLE_LAUNCH_TYPE);
14 years, 9 months
JBoss Tools SVN: r32400 - trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2011-06-28 07:38:43 -0400 (Tue, 28 Jun 2011)
New Revision: 32400
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ServerUtil.java
Log:
JBIDE-9150 - small duplication error in ServerUtil
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ServerUtil.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ServerUtil.java 2011-06-28 11:11:51 UTC (rev 32399)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ServerUtil.java 2011-06-28 11:38:43 UTC (rev 32400)
@@ -109,15 +109,14 @@
// create metadata area
File location = JBossServerCorePlugin.getServerStateLocation(server).toFile();
location.mkdirs();
- JBossServerCorePlugin.getServerStateLocation(server).append(IJBossToolingConstants.TEMP_DEPLOY).toFile().mkdirs();
+ File d1 = new File(location, IJBossRuntimeResourceConstants.DEPLOY);
+ File d2 = new File(location, IJBossToolingConstants.TEMP_DEPLOY);
+ d1.mkdirs();
+ d2.mkdirs();
// create temp deploy folder
JBossServer ds = ( JBossServer)server.loadAdapter(JBossServer.class, null);
if( ds != null && !isJBoss7(server)) {
- File d1 = new File(location, IJBossRuntimeResourceConstants.DEPLOY);
- File d2 = new File(location, IJBossToolingConstants.TEMP_DEPLOY);
- d1.mkdirs();
- d2.mkdirs();
if( !new File(ds.getDeployFolder()).equals(d1))
new File(ds.getDeployFolder()).mkdirs();
if( !new File(ds.getTempDeployFolder()).equals(d2))
14 years, 9 months
JBoss Tools SVN: r32399 - trunk/drools/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test.
by jbosstools-commits@lists.jboss.org
Author: vpakan(a)redhat.com
Date: 2011-06-28 07:11:51 -0400 (Tue, 28 Jun 2011)
New Revision: 32399
Modified:
trunk/drools/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/DroolsAllBotTests.java
Log:
Do not run GuidedDroolsRulesEditorTest.
Modified: trunk/drools/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/DroolsAllBotTests.java
===================================================================
--- trunk/drools/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/DroolsAllBotTests.java 2011-06-28 11:09:34 UTC (rev 32398)
+++ trunk/drools/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/DroolsAllBotTests.java 2011-06-28 11:11:51 UTC (rev 32399)
@@ -16,7 +16,7 @@
import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
import org.jboss.tools.drools.ui.bot.test.smoke.DecisionTableTest;
import org.jboss.tools.drools.ui.bot.test.smoke.DomainSpecificLanguageEditorTest;
-import org.jboss.tools.drools.ui.bot.test.smoke.GuidedDroolsRulesEditorTest;
+//import org.jboss.tools.drools.ui.bot.test.smoke.GuidedDroolsRulesEditorTest;
import org.jboss.tools.drools.ui.bot.test.smoke.GuvnorRepositoriesTest;
import org.jboss.tools.drools.ui.bot.test.smoke.ManageDroolsRuntime;
import org.jboss.tools.drools.ui.bot.test.smoke.ManageDroolsProject;
@@ -47,7 +47,7 @@
ManageDroolsProject.class,
ManageDroolsRules.class,
DroolsRulesEditorTest.class,
- GuidedDroolsRulesEditorTest.class,
+ //GuidedDroolsRulesEditorTest.class,
DomainSpecificLanguageEditorTest.class,
RuleFlowTest.class,
DecisionTableTest.class,
14 years, 9 months
JBoss Tools SVN: r32398 - trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test.
by jbosstools-commits@lists.jboss.org
Author: vpakan(a)redhat.com
Date: 2011-06-28 07:09:34 -0400 (Tue, 28 Jun 2011)
New Revision: 32398
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAllBotTests.java
Log:
Reorder tests.
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAllBotTests.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAllBotTests.java 2011-06-28 11:02:18 UTC (rev 32397)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAllBotTests.java 2011-06-28 11:09:34 UTC (rev 32398)
@@ -94,6 +94,7 @@
suite.addTestSuite(VisualEditorContextMenuTest.class);
suite.addTestSuite(EditingActionsTest.class);
suite.addTestSuite(NewXHTMLPageWizardTest.class);
+ suite.addTestSuite(CodeCompletionTest.class);
suite.addTestSuite(ExternalizeStringsDialogTest.class);
suite.addTestSuite(CancelTagLibDefenitionTest.class);
suite.addTestSuite(ImportTagsFromTLDFileTest.class);
@@ -172,7 +173,6 @@
suite.addTestSuite(AjaxInvisibleTagsTest.class);
suite.addTestSuite(LogTagTest.class);
suite.addTestSuite(OpenOnTest.class);
- suite.addTestSuite(CodeCompletionTest.class);
suite.addTestSuite(XhtmlFilePerformanceTest.class);
return new TestSetup(suite);
}
14 years, 9 months
JBoss Tools SVN: r32397 - trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/projectcreation.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2011-06-28 07:02:18 -0400 (Tue, 28 Jun 2011)
New Revision: 32397
Modified:
trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/projectcreation/NewTargetedWebProjectTest.java
Log:
JBIDE-8718 - unit test passes now for too many file handlers opened
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/projectcreation/NewTargetedWebProjectTest.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/projectcreation/NewTargetedWebProjectTest.java 2011-06-28 10:59:30 UTC (rev 32396)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/projectcreation/NewTargetedWebProjectTest.java 2011-06-28 11:02:18 UTC (rev 32397)
@@ -46,15 +46,13 @@
private IServer server;
private IProject p;
- // Test Commented Until Passing
+ public void testTargetedWebProjectErrorsJboss6() throws Exception {
+ server = ServerRuntimeUtils.create60Server();
+ p = createProject("org.jboss.ide.eclipse.as.runtime.60");
+ int markerSev = p.findMaxProblemSeverity(null, true, IResource.DEPTH_INFINITE);
+ assertTrue(markerSev != IMarker.SEVERITY_ERROR);
+ }
-// public void testTargetedWebProjectErrorsJboss6() throws Exception {
-// server = ServerRuntimeUtils.create60Server();
-// p = createProject("org.jboss.ide.eclipse.as.runtime.60");
-// int markerSev = p.findMaxProblemSeverity(null, true, IResource.DEPTH_INFINITE);
-// assertTrue(markerSev != IMarker.SEVERITY_ERROR);
-// }
-
public void testTargetedWebProjectErrorsJboss7() throws Exception {
server = ServerRuntimeUtils.create70Server();
p = createProject("org.jboss.ide.eclipse.as.runtime.70");
14 years, 9 months