Author: rob.stryker(a)jboss.com
Date: 2011-11-16 09:27:12 -0500 (Wed, 16 Nov 2011)
New Revision: 36367
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/launch/CustomJBossArgsTab.java
Removed:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/sar/
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServer.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/configuration/AbstractLaunchConfigurator.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/launch/DeployOnlyLaunchConfigGroup.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/launch/JBTWebLaunchableClient.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/launch/JBoss7LaunchConfigurationTabGroup.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/launch/JBossLaunchConfigurationTabGroup.java
Log:
JBIDE-10184 - allow overwriting of "critical args" in as7 for advanced users.
Also, add / update copyrights.
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServer.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServer.java 2011-11-16
14:10:01 UTC (rev 36366)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServer.java 2011-11-16
14:27:12 UTC (rev 36367)
@@ -59,7 +59,9 @@
*/
public class JBossServer extends DeployableServer
implements IDeployableServer, IURLProvider {
-
+
+ public static final String AUTOMATICALLY_UPDATE_LAUNCH =
"org.jboss.ide.eclipse.as.core.server.internal.AUTOMATICALLY_UPDATE_LAUNCH";
//$NON-NLS-1$
+
public void setDefaults(IProgressMonitor monitor) {
super.setDefaults(monitor);
setAttribute("auto-publish-time", 1); //$NON-NLS-1$
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/configuration/AbstractLaunchConfigurator.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/configuration/AbstractLaunchConfigurator.java 2011-11-16
14:10:01 UTC (rev 36366)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/configuration/AbstractLaunchConfigurator.java 2011-11-16
14:27:12 UTC (rev 36367)
@@ -39,7 +39,7 @@
if (!areDefaultsSet(launchConfig)) {
doConfigure(launchConfig, jbossServer, jbossRuntime);
setDefaultsSet(launchConfig);
- } else {
+ } else if( shouldUpdateLaunch(launchConfig)){
doOverrides(launchConfig, jbossServer, jbossRuntime);
}
}
@@ -77,6 +77,10 @@
return launchConfig.hasAttribute(DEFAULTS_SET);
}
+ private boolean shouldUpdateLaunch(ILaunchConfigurationWorkingCopy launchConfig) throws
CoreException {
+ return launchConfig.getAttribute(JBossServer.AUTOMATICALLY_UPDATE_LAUNCH, true);
+ }
+
private void setDefaultsSet(ILaunchConfigurationWorkingCopy launchConfig) {
launchConfig.setAttribute(DEFAULTS_SET, true);
}
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.java 2011-11-16
14:10:01 UTC (rev 36366)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.java 2011-11-16
14:27:12 UTC (rev 36367)
@@ -258,8 +258,10 @@
public static String ServerAlreadyStartedDialog_Desc;
public static String ServerAlreadyStartedDialog_Connect;
public static String ServerAlreadyStartedDialog_Launch;
+
+ public static String ServerJavaArgsSyncText;
+ public static String ServerJavaArgsSyncDesc;
-
static {
NLS.initializeMessages(BUNDLE_NAME,
Messages.class);
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties 2011-11-16
14:10:01 UTC (rev 36366)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties 2011-11-16
14:27:12 UTC (rev 36367)
@@ -227,6 +227,9 @@
ServerAlreadyStartedDialog_Message=An application server may already be running on host
{0}.
ServerAlreadyStartedDialog_Title=Server already running on {0}
-ServerAlreadyStartedDialog_Desc=Launching an additional server when one is already
running may \nmake some parts of the tools not function properly. \n\n{0}\n\n Would you
like to:
+ServerAlreadyStartedDialog_Desc=Launching an additional server when one is already
running may \nmake some parts of the tools not function properly. \n\n{0}\n\n Would you
like to\:
ServerAlreadyStartedDialog_Connect=Set the server adapter to 'started', but do
not launch
ServerAlreadyStartedDialog_Launch=Launch a new instance anyway
+
+ServerJavaArgsSyncText=Always update arguments related to the runtime.
+ServerJavaArgsSyncDesc=Some values on this tab refer to the server's runtime
location. JBossTools may attempt to update some program and vm arguments.
\ No newline at end of file
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/launch/CustomJBossArgsTab.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/launch/CustomJBossArgsTab.java
(rev 0)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/launch/CustomJBossArgsTab.java 2011-11-16
14:27:12 UTC (rev 36367)
@@ -0,0 +1,69 @@
+/*******************************************************************************
+* Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.ide.eclipse.as.ui.launch;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.jdt.debug.ui.launchConfigurations.JavaArgumentsTab;
+import org.eclipse.jdt.internal.debug.ui.JDIDebugUIPlugin;
+import org.eclipse.jdt.internal.debug.ui.launcher.LauncherMessages;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
+import org.jboss.ide.eclipse.as.ui.Messages;
+
+public class CustomJBossArgsTab extends JavaArgumentsTab {
+
+ private Button syncWithRuntime;
+
+ /**
+ * @see org.eclipse.debug.ui.ILaunchConfigurationTab#createControl(Composite)
+ */
+ public void createControl(Composite parent) {
+ Font font = parent.getFont();
+ Composite comp = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout(1, true);
+ comp.setLayout(layout);
+ comp.setFont(font);
+ GridData gd = new GridData(GridData.FILL_BOTH);
+ comp.setLayoutData(gd);
+ Label desc = new Label(comp, SWT.NONE);
+ desc.setText(Messages.ServerJavaArgsSyncDesc);
+ syncWithRuntime = new Button(comp, SWT.CHECK);
+ syncWithRuntime.setText(Messages.ServerJavaArgsSyncText);
+
+ super.createControl(comp);
+ setControl(comp);
+ }
+
+ public void performApply(ILaunchConfigurationWorkingCopy configuration) {
+ super.performApply(configuration);
+ configuration.setAttribute(JBossServer.AUTOMATICALLY_UPDATE_LAUNCH,
+ syncWithRuntime.getSelection());
+ }
+
+ public void initializeFrom(ILaunchConfiguration configuration) {
+ super.initializeFrom(configuration);
+ try {
+ boolean selected = configuration.getAttribute(JBossServer.AUTOMATICALLY_UPDATE_LAUNCH,
true);
+ syncWithRuntime.setSelection(selected);
+ } catch (CoreException e) {
+ setErrorMessage(LauncherMessages.JavaArgumentsTab_Exception_occurred_reading_configuration___15
+ e.getStatus().getMessage());
+ JDIDebugUIPlugin.log(e);
+ }
+ }
+}
\ No newline at end of file
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/launch/DeployOnlyLaunchConfigGroup.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/launch/DeployOnlyLaunchConfigGroup.java 2011-11-16
14:10:01 UTC (rev 36366)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/launch/DeployOnlyLaunchConfigGroup.java 2011-11-16
14:27:12 UTC (rev 36367)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+* Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.jboss.ide.eclipse.as.ui.launch;
import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup;
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/launch/JBTWebLaunchableClient.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/launch/JBTWebLaunchableClient.java 2011-11-16
14:10:01 UTC (rev 36366)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/launch/JBTWebLaunchableClient.java 2011-11-16
14:27:12 UTC (rev 36367)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+* Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.jboss.ide.eclipse.as.ui.launch;
import java.util.ArrayList;
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/launch/JBoss7LaunchConfigurationTabGroup.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/launch/JBoss7LaunchConfigurationTabGroup.java 2011-11-16
14:10:01 UTC (rev 36366)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/launch/JBoss7LaunchConfigurationTabGroup.java 2011-11-16
14:27:12 UTC (rev 36367)
@@ -1,24 +1,13 @@
-/**
- * JBoss by Red Hat
- * Copyright 2006-2009, Red Hat Middleware, LLC, and individual contributors as
indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
-* This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
+/*******************************************************************************
+* Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.jboss.ide.eclipse.as.ui.launch;
import java.util.ArrayList;
@@ -49,7 +38,7 @@
public static class JBoss7StandardTabProvider implements IJBossLaunchTabProvider {
public ILaunchConfigurationTab[] createTabs() {
ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] {
- new JavaArgumentsTab(),
+ new CustomJBossArgsTab(),
new JavaMainTabExtension(),
new JavaClasspathTab(),
new SourceLookupTab(),
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/launch/JBossLaunchConfigurationTabGroup.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/launch/JBossLaunchConfigurationTabGroup.java 2011-11-16
14:10:01 UTC (rev 36366)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/launch/JBossLaunchConfigurationTabGroup.java 2011-11-16
14:27:12 UTC (rev 36367)
@@ -1,24 +1,13 @@
-/**
- * JBoss by Red Hat
- * Copyright 2006-2009, Red Hat Middleware, LLC, and individual contributors as
indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
-* This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
+/*******************************************************************************
+* Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.jboss.ide.eclipse.as.ui.launch;
import java.util.ArrayList;