JBoss Tools SVN: r36377 - trunk/seam/tests/org.jboss.tools.seam.ui.test/META-INF.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-11-16 14:53:40 -0500 (Wed, 16 Nov 2011)
New Revision: 36377
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.test/META-INF/MANIFEST.MF
Log:
JBIDE-10164
https://issues.jboss.org/browse/JBIDE-10164
Plugin versions specified.
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/META-INF/MANIFEST.MF 2011-11-16 18:36:55 UTC (rev 36376)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/META-INF/MANIFEST.MF 2011-11-16 19:53:40 UTC (rev 36377)
@@ -8,22 +8,23 @@
org.jboss.tools.seam.ui,
org.jboss.tools.jst.web.ui,
org.jboss.tools.common.model,
- org.eclipse.ui.navigator,
+ org.eclipse.ui.navigator;bundle-version="3.5.0",
+ org.eclipse.ui.navigator.resources;bundle-version="3.4.300",
org.jboss.tools.seam.core,
- org.eclipse.jst.j2ee,
- org.eclipse.ui.ide,
- org.eclipse.ui.workbench.texteditor,
+ org.eclipse.jst.j2ee;bundle-version="1.1.500",
+ org.eclipse.ui.ide;bundle-version="3.7.0",
+ org.eclipse.ui.workbench.texteditor;bundle-version="3.7.0",
org.jboss.tools.common.text.ext,
org.jboss.tools.jst.text.ext,
org.jboss.tools.seam.text.ext,
- org.eclipse.jface.text,
- org.eclipse.wst.web.ui,
- org.eclipse.wst.common.project.facet.ui,
- org.eclipse.wst.common.frameworks,
+ org.eclipse.jface.text;bundle-version="3.7.0",
+ org.eclipse.wst.web.ui;bundle-version="1.1.400",
+ org.eclipse.wst.common.project.facet.ui;bundle-version="1.4.200",
+ org.eclipse.wst.common.frameworks;bundle-version="1.2.0",
org.jboss.tools.jst.firstrun,
org.eclipse.wst.server.core,
org.jboss.tools.jst.jsp,
- org.eclipse.jdt.ui,
+ org.eclipse.jdt.ui;bundle-version="3.7.0",
org.jboss.tools.common.el.core,
org.jboss.tools.common.ui,
org.jboss.tools.common.el.ui,
13 years, 1 month
JBoss Tools SVN: r36376 - trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2011-11-16 13:36:55 -0500 (Wed, 16 Nov 2011)
New Revision: 36376
Modified:
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/FeedsToolTip.java
Log:
JBIDE-10172 Cannot open links from the RSS pop-up
Modified: trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/FeedsToolTip.java
===================================================================
--- trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/FeedsToolTip.java 2011-11-16 17:48:01 UTC (rev 36375)
+++ trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/FeedsToolTip.java 2011-11-16 18:36:55 UTC (rev 36376)
@@ -14,6 +14,9 @@
import org.eclipse.jface.window.ToolTip;
import org.eclipse.swt.SWT;
import org.eclipse.swt.browser.Browser;
+import org.eclipse.swt.browser.LocationAdapter;
+import org.eclipse.swt.browser.LocationEvent;
+import org.eclipse.swt.browser.LocationListener;
import org.eclipse.swt.browser.OpenWindowListener;
import org.eclipse.swt.browser.WindowEvent;
import org.eclipse.swt.events.DisposeEvent;
@@ -35,6 +38,7 @@
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.forms.widgets.FormText;
+import org.jboss.tools.central.JBossCentralActivator;
/**
*
@@ -72,16 +76,29 @@
GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
parent.setLayoutData(gd);
- Browser browser;
+ Browser browser1;
try {
- browser = new Browser(parent, SWT.NONE);
+ browser1 = new Browser(parent, SWT.NONE);
} catch (Exception e1) {
- browser = new Browser(parent, SWT.WEBKIT);
+ browser1 = new Browser(parent, SWT.WEBKIT);
}
+ final Browser browser = browser1;
browser.setJavascriptEnabled(false);
+ browser.addLocationListener(new LocationAdapter() {
+
+ @Override
+ public void changed(LocationEvent event) {
+ String location = event.location;
+ if (location != null && !location.startsWith("about:")) {
+ JBossCentralActivator.openUrl(location, Display.getCurrent().getActiveShell());
+ hide();
+ }
+ }
+ });
browser.addOpenWindowListener(new OpenWindowListener() {
public void open(WindowEvent event) {
event.required= true;
+ event.browser = browser;
}
});
gd = new GridData(SWT.FILL, SWT.FILL, true, true);
13 years, 1 month
JBoss Tools SVN: r36375 - in trunk/cdi: tests/org.jboss.tools.cdi.seam.core.test/META-INF and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2011-11-16 12:48:01 -0500 (Wed, 16 Nov 2011)
New Revision: 36375
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/international/CACdiAddInfoELMessagesTest.java
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.seam.core/src/org/jboss/tools/cdi/seam/core/international/el/CDIInternationalMessagesELResolver.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/META-INF/MANIFEST.MF
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/CDISeamCoreAllTests.java
Log:
JBIDE-9910 Proposal info for message bundles in code completion for EL
JUnit test for CDI International EL Resource Bundle Messages resolver is added
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.seam.core/src/org/jboss/tools/cdi/seam/core/international/el/CDIInternationalMessagesELResolver.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.seam.core/src/org/jboss/tools/cdi/seam/core/international/el/CDIInternationalMessagesELResolver.java 2011-11-16 16:30:06 UTC (rev 36374)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.seam.core/src/org/jboss/tools/cdi/seam/core/international/el/CDIInternationalMessagesELResolver.java 2011-11-16 17:48:01 UTC (rev 36375)
@@ -317,10 +317,24 @@
for (Variable var : resolvedVariables) {
String varName = var.getName();
if(operand.getLength()<=varName.length()) {
- TextProposal proposal = new TextProposal();
+ MessagesELTextProposal proposal = new MessagesELTextProposal();
proposal.setReplacementString(varName.substring(operand.getLength()));
proposal.setLabel(varName);
+ proposal.setPropertyName(null); // Since it's not a property
proposal.setImage(getELProposalImageForMember(null));
+
+ List<XModelObject> objects = new ArrayList<XModelObject>();
+ IBundleModel bundleModel = BundleModelFactory.getBundleModel(var.f.getProject());
+ if(bundleModel != null && bundleModel.getBundle(var.basename) != null) {
+ IBundle bundle = bundleModel.getBundle(var.basename);
+ if(bundle == null)
+ continue;
+ Map<String, XModelObject> os = ((BundleImpl)bundle).getObjects();
+ for (XModelObject o: os.values()) {
+ if (o != null) objects.add(o);
+ }
+ }
+ proposal.setObjects(objects);
proposals.add(proposal);
} else if(returnEqualedVariablesOnly) {
TextProposal proposal = new TextProposal();
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/META-INF/MANIFEST.MF 2011-11-16 16:30:06 UTC (rev 36374)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/META-INF/MANIFEST.MF 2011-11-16 17:48:01 UTC (rev 36375)
@@ -24,6 +24,7 @@
org.jboss.tools.jst.text.ext,
org.jboss.tools.jst.text.ext.test,
org.jboss.tools.cdi.seam.solder.core.test,
- org.eclipse.wst.validation;bundle-version="1.2.300"
+ org.eclipse.wst.validation;bundle-version="1.2.300",
+ org.jboss.tools.jst.jsp
Export-Package: org.jboss.tools.cdi.seam.core.test
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/CDISeamCoreAllTests.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/CDISeamCoreAllTests.java 2011-11-16 16:30:06 UTC (rev 36374)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/CDISeamCoreAllTests.java 2011-11-16 17:48:01 UTC (rev 36375)
@@ -16,6 +16,7 @@
import org.eclipse.jdt.internal.core.JavaModelManager;
import org.eclipse.wst.validation.ValidationFramework;
import org.jboss.tools.cdi.seam.core.test.international.BundleModelTest;
+import org.jboss.tools.cdi.seam.core.test.international.CACdiAddInfoELMessagesTest;
import org.jboss.tools.cdi.seam.core.test.international.SeamResourceBundleCdiElResolverTest;
import org.jboss.tools.cdi.seam.core.test.international.SeamResourceBundleELTooltipTest;
import org.jboss.tools.cdi.seam.core.test.international.SeamResourceBundlesTest;
@@ -48,6 +49,7 @@
suite.addTestSuite(SeamResourceBundleCdiElResolverTest.class);
suite.addTestSuite(SeamResourceBundleELTooltipTest.class);
suite.addTestSuite(SeamRestValidationTest.class);
+ suite.addTestSuite(CACdiAddInfoELMessagesTest.class);
suite.addTestSuite(BundleModelTest.class); // should be the last in this suite because it removes/adds seam-international.jar
suiteAll.addTest(new SeamCoreTestSetup(suite));
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/international/CACdiAddInfoELMessagesTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/international/CACdiAddInfoELMessagesTest.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/international/CACdiAddInfoELMessagesTest.java 2011-11-16 17:48:01 UTC (rev 36375)
@@ -0,0 +1,118 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.cdi.seam.core.test.international;
+
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.jface.text.contentassist.ICompletionProposal;
+import org.jboss.tools.cdi.seam.core.test.SeamCoreTest;
+import org.jboss.tools.common.base.test.contentassist.CATestUtil;
+import org.jboss.tools.jst.jsp.contentassist.AutoELContentAssistantProposal;
+import org.jboss.tools.jst.jsp.test.ca.ContentAssistantTestCase;
+
+/**
+ * The JUnit test case for JBIDE-9910 issue
+ *
+ * @author Victor V. Rubezhny
+ *
+ */
+public class CACdiAddInfoELMessagesTest extends SeamCoreTest {
+
+ private ContentAssistantTestCase caTest = new ContentAssistantTestCase();
+ private static final String PAGE_NAME = "WebContent/seam-international.xhtml";
+
+ private static final String PREFIXES[] = new String[] {"#{bundles.messa", "#{bundles.messages.home_hea"};
+ private static final String NAMES[] = new String[] {"bundles.messages", "home_header"};
+ private static final String ADD_INFOS[] = new String[] {
+ "<html><body text=\"#000000\" bgcolor=\"#ffffe1\"><br><b>Resource Bundle:</b> /SeamCoreTest/src/messages.properties<br><br><b>Resource Bundle:</b> /SeamCoreTest/src/messages_de.properties</body></html>",
+ "<html><body text=\'#ffffff\" bgcolor=\"#000000\"><b>Property:</b> home_header<br><b>Base Name:</b> messages<br><br><b>Resource Bundle:</b> /SeamCoreTest/src/messages.properties<br><b>Value:</b> About this example application</body></html>"
+ };
+
+ /**
+ * The method tests CA on CDI Seam International Module Resource Bundles
+ * @throws Exception
+ */
+ public void testCACdiAddInfoELMessagesTest() throws Exception {
+ // Perform CA test
+ caTest.setProject(getTestProject());
+
+ for (int i = 0; i < PREFIXES.length; i++) {
+ AutoELContentAssistantProposal jstProposals[] = getJSTProposals(PREFIXES[i]);
+ assertFalse ("No EL Proposals found in Web page: " + PAGE_NAME, (jstProposals == null || jstProposals.length == 0));
+
+ boolean proposalFound = false;
+ for (AutoELContentAssistantProposal proposal : jstProposals) {
+ if (NAMES[i].equals(proposal.getDisplayString())) {
+ String addInfo = proposal.getAdditionalProposalInfo();
+
+ String addInfoValue = html2Text(addInfo);
+ String compareValue = html2Text(ADD_INFOS[i]);
+ assertTrue("Additional Info exists but its value is not expected:\nAdd. Info: [" + addInfoValue + "]\nExpected Value: [" + compareValue + "]", compareValue.equalsIgnoreCase(addInfoValue));
+ proposalFound = true;
+ break;
+ }
+ }
+ assertTrue("No '" + NAMES[i] + "' EL Proposals found in Web page: " + PAGE_NAME, proposalFound);
+ }
+ }
+
+ String html2Text(String html) {
+ StringBuilder sb = new StringBuilder();
+ int state = 0;
+ for (char ch : html.toCharArray()) {
+ switch (state) {
+ case (int)'<':
+ // Read to null until '>'-char is read
+ if (ch != '>')
+ continue;
+ state = 0;
+ break;
+ default:
+ if (ch == '<') {
+ state = '<';
+ continue;
+ }
+ sb.append(ch);
+ break;
+ }
+ }
+ return sb.toString();
+ }
+
+ AutoELContentAssistantProposal[] getJSTProposals(String prefix) {
+ caTest.openEditor(PAGE_NAME);
+ try {
+ String documentContent = caTest.getDocument().get();
+
+ int start = (documentContent == null ? -1 : documentContent.indexOf(prefix));
+ assertFalse("Required node '" + prefix + "' not found in document", (start == -1));
+ int offsetToTest = start + prefix.length();
+
+
+ List<ICompletionProposal> res = CATestUtil.collectProposals(caTest.getContentAssistant(), caTest.getViewer(), offsetToTest);
+
+ assertTrue("Content Assistant returned no proposals", (res != null && res.size() > 0));
+
+ Set<AutoELContentAssistantProposal> jstProposals = new HashSet<AutoELContentAssistantProposal>();
+ for (ICompletionProposal p : res) {
+ if (p instanceof AutoELContentAssistantProposal) {
+ jstProposals.add((AutoELContentAssistantProposal)p);
+ }
+ }
+
+ return jstProposals.toArray(new AutoELContentAssistantProposal[0]);
+ } finally {
+ caTest.closeEditor();
+ }
+ }
+}
\ No newline at end of file
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/international/CACdiAddInfoELMessagesTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
13 years, 1 month
JBoss Tools SVN: r36374 - trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-11-16 11:30:06 -0500 (Wed, 16 Nov 2011)
New Revision: 36374
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewApplicationWizardPage.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewApplicationWizardPageModel.java
Log:
[JBIDE-9927] added collection of selected embeddable cartridges + reacting on user selection
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewApplicationWizardPage.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewApplicationWizardPage.java 2011-11-16 16:29:36 UTC (rev 36373)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewApplicationWizardPage.java 2011-11-16 16:30:06 UTC (rev 36374)
@@ -32,7 +32,10 @@
import org.eclipse.jface.layout.TableColumnLayout;
import org.eclipse.jface.viewers.ArrayContentProvider;
import org.eclipse.jface.viewers.CellLabelProvider;
+import org.eclipse.jface.viewers.CheckStateChangedEvent;
+import org.eclipse.jface.viewers.CheckboxTableViewer;
import org.eclipse.jface.viewers.ColumnWeightData;
+import org.eclipse.jface.viewers.ICheckStateListener;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.TableViewerColumn;
import org.eclipse.jface.viewers.ViewerCell;
@@ -59,7 +62,7 @@
public class NewApplicationWizardPage extends AbstractOpenShiftWizardPage {
private NewApplicationWizardPageModel model;
- private TableViewer viewer;
+ private CheckboxTableViewer viewer;
public NewApplicationWizardPage(NewApplicationWizardPageModel model, IWizard wizard) {
super("Create new OpenShift Express application", "Create new OpenShift Express application",
@@ -158,15 +161,31 @@
Composite tableContainer = new Composite(embedGroup, SWT.NONE);
this.viewer = createTable(tableContainer);
+ viewer.addCheckStateListener(onEmbeddableCartridgeSelected());
}
- protected TableViewer createTable(Composite tableContainer) {
+ private ICheckStateListener onEmbeddableCartridgeSelected() {
+ return new ICheckStateListener() {
+
+ @Override
+ public void checkStateChanged(CheckStateChangedEvent event) {
+ IEmbeddableCartridge cartridge = (IEmbeddableCartridge) event.getElement();
+ if (event.getChecked()) {
+ model.getSeleEmbeddableCartridges().add(cartridge);
+ } else {
+ model.getSeleEmbeddableCartridges().remove(cartridge);
+ }
+ }
+ };
+ }
+
+ protected CheckboxTableViewer createTable(Composite tableContainer) {
Table table =
new Table(tableContainer, SWT.BORDER | SWT.FULL_SELECTION | SWT.V_SCROLL | SWT.H_SCROLL | SWT.CHECK);
table.setLinesVisible(true);
TableColumnLayout tableLayout = new TableColumnLayout();
tableContainer.setLayout(tableLayout);
- TableViewer viewer = new TableViewer(table);
+ CheckboxTableViewer viewer = new CheckboxTableViewer(table);
viewer.setContentProvider(new ArrayContentProvider());
createTableColumn("Embeddable Cartridge", 1, new CellLabelProvider() {
@@ -214,10 +233,10 @@
@Override
protected IStatus run(IProgressMonitor monitor) {
try {
- setViewerInput(model.loadEmbeddableCartridges());
+ setCartridgesViewerInput(model.loadEmbeddableCartridges());
return Status.OK_STATUS;
} catch (Exception e) {
- clearViewer();
+ clearCartridgesViewer();
return new Status(IStatus.ERROR, OpenShiftUIActivator.PLUGIN_ID,
"Could not load embeddable cartridges", e);
}
@@ -230,11 +249,11 @@
}
- private void clearViewer() {
- setViewerInput(new ArrayList<IEmbeddableCartridge>());
+ private void clearCartridgesViewer() {
+ setCartridgesViewerInput(new ArrayList<IEmbeddableCartridge>());
}
- private void setViewerInput(final Collection<IEmbeddableCartridge> cartridges) {
+ private void setCartridgesViewerInput(final Collection<IEmbeddableCartridge> cartridges) {
getShell().getDisplay().syncExec(new Runnable() {
@Override
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewApplicationWizardPageModel.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewApplicationWizardPageModel.java 2011-11-16 16:29:36 UTC (rev 36373)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewApplicationWizardPageModel.java 2011-11-16 16:30:06 UTC (rev 36374)
@@ -42,7 +42,8 @@
private StringPreferenceValue selectedCartridgePreference;
private List<IEmbeddableCartridge> embeddableCartridges = new ArrayList<IEmbeddableCartridge>();
-
+ private List<IEmbeddableCartridge> selectedEmbeddableCartridges = new ArrayList<IEmbeddableCartridge>();
+
public NewApplicationWizardPageModel(IUser user) {
this.user = user;
this.selectedCartridgePreference = new StringPreferenceValue(
@@ -125,6 +126,10 @@
return embeddableCartridges;
}
+ public List<IEmbeddableCartridge> getSeleEmbeddableCartridges() {
+ return selectedEmbeddableCartridges;
+ }
+
public void createApplication() throws OpenShiftException {
IApplication application = user.createApplication(name, selectedCartridge);
setApplication(application);
13 years, 1 month
JBoss Tools SVN: r36372 - trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-11-16 11:00:56 -0500 (Wed, 16 Nov 2011)
New Revision: 36372
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewApplicationWizardPage.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewApplicationWizardPageModel.java
Log:
[JBIDE-9927] added checkbox table with embeddable cartridges
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewApplicationWizardPage.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewApplicationWizardPage.java 2011-11-16 16:00:22 UTC (rev 36371)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewApplicationWizardPage.java 2011-11-16 16:00:56 UTC (rev 36372)
@@ -10,6 +10,9 @@
******************************************************************************/
package org.jboss.tools.openshift.express.internal.ui.wizard;
+import java.util.ArrayList;
+import java.util.Collection;
+
import org.eclipse.core.databinding.Binding;
import org.eclipse.core.databinding.DataBindingContext;
import org.eclipse.core.databinding.UpdateListStrategy;
@@ -26,16 +29,27 @@
import org.eclipse.jface.databinding.swt.WidgetProperties;
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.jface.layout.GridLayoutFactory;
+import org.eclipse.jface.layout.TableColumnLayout;
+import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.CellLabelProvider;
+import org.eclipse.jface.viewers.ColumnWeightData;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.TableViewerColumn;
+import org.eclipse.jface.viewers.ViewerCell;
import org.eclipse.jface.wizard.IWizard;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.Text;
import org.jboss.tools.common.ui.WizardUtils;
import org.jboss.tools.openshift.express.client.Cartridge;
import org.jboss.tools.openshift.express.client.ICartridge;
+import org.jboss.tools.openshift.express.client.IEmbeddableCartridge;
import org.jboss.tools.openshift.express.client.OpenShiftException;
import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
@@ -45,6 +59,7 @@
public class NewApplicationWizardPage extends AbstractOpenShiftWizardPage {
private NewApplicationWizardPageModel model;
+ private TableViewer viewer;
public NewApplicationWizardPage(NewApplicationWizardPageModel model, IWizard wizard) {
super("Create new OpenShift Express application", "Create new OpenShift Express application",
@@ -93,7 +108,7 @@
WidgetProperties.selection().observe(cartridgesCombo)
, BeanProperties.value(NewApplicationWizardPageModel.PROPERTY_SELECTED_CARTRIDGE).observe(model)
, new UpdateValueStrategy().setConverter(new Converter(String.class, ICartridge.class) {
-
+
@Override
public Object convert(Object fromObject) {
if (fromObject instanceof String
@@ -116,18 +131,64 @@
}
})
, new UpdateValueStrategy().setConverter(new Converter(ICartridge.class, String.class) {
-
- @Override
- public Object convert(Object fromObject) {
- if (fromObject instanceof ICartridge) {
- return ((ICartridge) fromObject).getName();
- }
- return null;
- }
- }));
+
+ @Override
+ public Object convert(Object fromObject) {
+ if (fromObject instanceof ICartridge) {
+ return ((ICartridge) fromObject).getName();
+ }
+ return null;
+ }
+ }));
ControlDecorationSupport.create(comboSelectionBinding, SWT.LEFT | SWT.TOP);
+
+ createEmbedGroup(parent);
}
+ private void createEmbedGroup(Composite parent) {
+ Group embedGroup = new Group(parent, SWT.NONE);
+ embedGroup.setText("Embeddable Cartridges");
+ GridDataFactory.fillDefaults()
+ .hint(300, 150).align(SWT.FILL, SWT.FILL).span(2, 1).grab(true, true)
+ .applyTo(embedGroup);
+ FillLayout fillLayout = new FillLayout();
+ fillLayout.marginHeight = 6;
+ fillLayout.marginWidth = 6;
+ embedGroup.setLayout(fillLayout);
+
+ Composite tableContainer = new Composite(embedGroup, SWT.NONE);
+ this.viewer = createTable(tableContainer);
+ }
+
+ protected TableViewer createTable(Composite tableContainer) {
+ Table table =
+ new Table(tableContainer, SWT.BORDER | SWT.FULL_SELECTION | SWT.V_SCROLL | SWT.H_SCROLL | SWT.CHECK);
+ table.setLinesVisible(true);
+ TableColumnLayout tableLayout = new TableColumnLayout();
+ tableContainer.setLayout(tableLayout);
+ TableViewer viewer = new TableViewer(table);
+ viewer.setContentProvider(new ArrayContentProvider());
+
+ createTableColumn("Embeddable Cartridge", 1, new CellLabelProvider() {
+
+ @Override
+ public void update(ViewerCell cell) {
+ IEmbeddableCartridge cartridge = (IEmbeddableCartridge) cell.getElement();
+ cell.setText(cartridge.getName());
+ }
+ }, viewer, tableLayout);
+ return viewer;
+ }
+
+ private void createTableColumn(String name, int weight, CellLabelProvider cellLabelProvider, TableViewer viewer,
+ TableColumnLayout layout) {
+ TableViewerColumn column = new TableViewerColumn(viewer, SWT.LEFT);
+ column.getColumn().setText(name);
+ column.setLabelProvider(cellLabelProvider);
+
+ layout.setColumnData(column.getColumn(), new ColumnWeightData(weight, true));
+ }
+
@Override
protected void onPageActivated(DataBindingContext dbc) {
try {
@@ -146,8 +207,43 @@
} catch (Exception e) {
// ignore
}
+
+ try {
+ WizardUtils.runInWizard(new Job("Loading embeddable cartridges...") {
+
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ try {
+ setViewerInput(model.loadEmbeddableCartridges());
+ return Status.OK_STATUS;
+ } catch (Exception e) {
+ clearViewer();
+ return new Status(IStatus.ERROR, OpenShiftUIActivator.PLUGIN_ID,
+ "Could not load embeddable cartridges", e);
+ }
+ }
+
+ }, getContainer(), getDataBindingContext());
+ } catch (Exception e) {
+ // ignore
+ }
+
}
+ private void clearViewer() {
+ setViewerInput(new ArrayList<IEmbeddableCartridge>());
+ }
+
+ private void setViewerInput(final Collection<IEmbeddableCartridge> cartridges) {
+ getShell().getDisplay().syncExec(new Runnable() {
+
+ @Override
+ public void run() {
+ viewer.setInput(cartridges);
+ }
+ });
+ }
+
private class ApplicationNameValidator implements IValidator {
@Override
@@ -162,4 +258,5 @@
return ValidationStatus.ok();
}
}
+
}
\ No newline at end of file
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewApplicationWizardPageModel.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewApplicationWizardPageModel.java 2011-11-16 16:00:22 UTC (rev 36371)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewApplicationWizardPageModel.java 2011-11-16 16:00:56 UTC (rev 36372)
@@ -17,6 +17,7 @@
import org.jboss.tools.common.ui.preferencevalue.StringPreferenceValue;
import org.jboss.tools.openshift.express.client.IApplication;
import org.jboss.tools.openshift.express.client.ICartridge;
+import org.jboss.tools.openshift.express.client.IEmbeddableCartridge;
import org.jboss.tools.openshift.express.client.IUser;
import org.jboss.tools.openshift.express.client.OpenShiftException;
import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
@@ -29,6 +30,7 @@
public static final String PROPERTY_APPLICATION = "application";
public static final String PROPERTY_NAME = "name";
public static final String PROPERTY_CARTRIDGES = "cartridges";
+ public static final String PROPERTY_EMBEDDABLE_CARTRIDGES = "embeddableCartridges";
public static final String PROPERTY_SELECTED_CARTRIDGE = "selectedCartridge";
private IUser user;
@@ -39,6 +41,8 @@
private ICartridge selectedCartridge;
private StringPreferenceValue selectedCartridgePreference;
+ private List<IEmbeddableCartridge> embeddableCartridges = new ArrayList<IEmbeddableCartridge>();
+
public NewApplicationWizardPageModel(IUser user) {
this.user = user;
this.selectedCartridgePreference = new StringPreferenceValue(
@@ -106,6 +110,21 @@
return matchingCartridge;
}
+ public List<IEmbeddableCartridge> loadEmbeddableCartridges() throws OpenShiftException {
+ List<IEmbeddableCartridge> cartridges = user.getEmbeddableCartridges();
+ setEmbeddableCartridges(cartridges);
+ return cartridges;
+ }
+
+ public void setEmbeddableCartridges(List<IEmbeddableCartridge> cartridges) {
+ firePropertyChange(
+ PROPERTY_EMBEDDABLE_CARTRIDGES, this.embeddableCartridges, this.embeddableCartridges = cartridges);
+ }
+
+ public List<IEmbeddableCartridge> getEmbeddableCartridges() {
+ return embeddableCartridges;
+ }
+
public void createApplication() throws OpenShiftException {
IApplication application = user.createApplication(name, selectedCartridge);
setApplication(application);
@@ -114,7 +133,7 @@
public void setApplication(IApplication application) {
firePropertyChange(PROPERTY_APPLICATION, this.application, this.application = application);
}
-
+
public IApplication getApplication() {
return application;
}
13 years, 1 month
JBoss Tools SVN: r36371 - trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-11-16 11:00:22 -0500 (Wed, 16 Nov 2011)
New Revision: 36371
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardPage.java
Log:
cleaned commented code
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardPage.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardPage.java 2011-11-16 15:59:33 UTC (rev 36370)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardPage.java 2011-11-16 16:00:22 UTC (rev 36371)
@@ -250,18 +250,6 @@
cell.setText(application.getCartridge().getName());
}
}, viewer, tableLayout);
- // createTableColumn("URL", 3, new CellLabelProvider() {
- //
- // @Override
- // public void update(ViewerCell cell) {
- // try {
- // IApplication application = (IApplication) cell.getElement();
- // cell.setText(application.getApplicationUrl());
- // } catch (OpenShiftException e) {
- // // ignore
- // }
- // }
- // }, viewer, tableLayout);
return viewer;
}
13 years, 1 month
JBoss Tools SVN: r36370 - trunk/openshift/plugins/org.jboss.tools.openshift.express.client.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-11-16 10:59:33 -0500 (Wed, 16 Nov 2011)
New Revision: 36370
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.client/org.jboss.tools.openshift.express.client-2.3.0-SNAPSHOT.jar
Log:
[JBIDE-9927] switched to latest client jar
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.client/org.jboss.tools.openshift.express.client-2.3.0-SNAPSHOT.jar
===================================================================
(Binary files differ)
13 years, 1 month
JBoss Tools SVN: r36369 - trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2011-11-16 10:35:43 -0500 (Wed, 16 Nov 2011)
New Revision: 36369
Modified:
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/JBossCentralActivator.java
Log:
JBIDE-10072 Twitter in JBoss Central is non-functional
Modified: trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/JBossCentralActivator.java
===================================================================
--- trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/JBossCentralActivator.java 2011-11-16 14:46:08 UTC (rev 36368)
+++ trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/JBossCentralActivator.java 2011-11-16 15:35:43 UTC (rev 36369)
@@ -215,7 +215,7 @@
}
public static void openUrl(String location, Shell shell) {
- openUrl(location, shell);
+ openUrl(location, shell, false);
}
public static void openUrl(String location, Shell shell, boolean asExternal) {
13 years, 1 month
JBoss Tools SVN: r36368 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2011-11-16 09:46:08 -0500 (Wed, 16 Nov 2011)
New Revision: 36368
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java
Log:
https://issues.jboss.org/browse/JBIDE-10178 - regexp for getting the URL string was added.
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java 2011-11-16 14:27:12 UTC (rev 36367)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java 2011-11-16 14:46:08 UTC (rev 36368)
@@ -20,6 +20,8 @@
import java.net.URL;
import java.net.URLDecoder;
import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
@@ -487,17 +489,30 @@
}
private static String[] splitURL(String url) {
- int startAttr = url.indexOf(ATTR_URL);
- int startPathIndex = url.indexOf(OPEN_BRACKET, startAttr);
-// int endPathIndex = url.lastIndexOf(CLOSE_BRACKET, startPathIndex + 1);
- int endPathIndex = url.lastIndexOf(CLOSE_BRACKET, url.length());
- if (startPathIndex < 0 || endPathIndex < 0) {
- return null;
+ /*
+ * https://issues.jboss.org/browse/JBIDE-10178
+ * The index of closing bracket was wrong.
+ * Thus replaced with java regexp.
+ */
+ String urlRegExp = "(?<=\\burl\\b)\\((.*)\\)(?=(?>[^\\)]*;|[^\\)]*))"; //$NON-NLS-1$
+ Pattern p = Pattern.compile(urlRegExp);
+ Matcher m = p.matcher(url);
+ String[] res = null;
+ if (m.find()) {
+ res = new String[3];
+ /*
+ * Before URL
+ */
+ res[0] = url.substring(0, m.start(1));
+ /*
+ * The URL string itself
+ */
+ res[1] = m.group(1);
+ /*
+ * After the URL string
+ */
+ res[2] = url.substring(m.end(1), url.length());
}
- String[] res = new String[3];
- res[0] = url.substring(0, startPathIndex + 1);
- res[1] = url.substring(startPathIndex + 1, endPathIndex);
- res[2] = url.substring(endPathIndex, url.length());
return res;
}
13 years, 1 month
JBoss Tools SVN: r36367 - in trunk/as/plugins: org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/configuration and 2 other directories.
by jbosstools-commits@lists.jboss.org
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;
13 years, 1 month