JBoss Tools SVN: r37332 - trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/widgets.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-12-14 19:26:37 -0500 (Wed, 14 Dec 2011)
New Revision: 37332
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/widgets/DefaultSettings.java
Log:
JBIDE-10225
https://issues.jboss.org/browse/JBIDE-10225
System cursor is used.
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/widgets/DefaultSettings.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/widgets/DefaultSettings.java 2011-12-15 00:03:25 UTC (rev 37331)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/widgets/DefaultSettings.java 2011-12-15 00:26:37 UTC (rev 37332)
@@ -83,8 +83,9 @@
}
protected void initCursors() {
- defaultCursor = new Cursor(Display.getCurrent(), SWT.CURSOR_ARROW);
- handCursor = new Cursor(Display.getCurrent(), SWT.CURSOR_HAND);
+ Display display = Display.getCurrent() != null ? Display.getCurrent() : Display.getDefault();
+ defaultCursor = display.getSystemCursor(SWT.CURSOR_ARROW);
+ handCursor = display.getSystemCursor(SWT.CURSOR_HAND);
}
protected void initBorders() {
14 years, 4 months
JBoss Tools SVN: r37331 - branches/jbosstools-3.3.0.M5/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2011-12-14 19:03:25 -0500 (Wed, 14 Dec 2011)
New Revision: 37331
Modified:
branches/jbosstools-3.3.0.M5/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/ShowJBossCentral.java
Log:
https://issues.jboss.org/browse/JBIDE-10466 - JBoss Central opens after startup even if it is not set so
Snjezana's patch is applied to 3.3.0.M5 branch
Modified: branches/jbosstools-3.3.0.M5/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/ShowJBossCentral.java
===================================================================
--- branches/jbosstools-3.3.0.M5/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/ShowJBossCentral.java 2011-12-14 21:01:00 UTC (rev 37330)
+++ branches/jbosstools-3.3.0.M5/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/ShowJBossCentral.java 2011-12-15 00:03:25 UTC (rev 37331)
@@ -30,22 +30,17 @@
public void earlyStartup() {
boolean showJBossCentral = JBossCentralActivator.getDefault()
.showJBossCentralOnStartup();
+ IEclipsePreferences prefs = JBossCentralActivator.getDefault()
+ .getPreferences();
+ Bundle usage = Platform.getBundle(ORG_JBOSS_TOOLS_USAGE);
+ Bundle central = Platform.getBundle(JBossCentralActivator.PLUGIN_ID);
if (!showJBossCentral) {
- Bundle usage = Platform.getBundle(ORG_JBOSS_TOOLS_USAGE);
if (usage != null) {
Version version = usage.getVersion();
String versionString = version.toString();
- IEclipsePreferences prefs = JBossCentralActivator.getDefault()
- .getPreferences();
String savedVersion = prefs.get(ORG_JBOSS_TOOLS_USAGE, "");
- Bundle central = Platform
- .getBundle(JBossCentralActivator.PLUGIN_ID);
if (!savedVersion.equals(versionString)) {
showJBossCentral = true;
- prefs.put(ORG_JBOSS_TOOLS_USAGE, versionString);
- if (central != null) {
- prefs.put(JBossCentralActivator.PLUGIN_ID, central.getVersion().toString());
- }
} else {
if (central != null) {
version = central.getVersion();
@@ -54,15 +49,18 @@
JBossCentralActivator.PLUGIN_ID, "");
if (!savedVersion.equals(versionString)) {
showJBossCentral = true;
- prefs.put(JBossCentralActivator.PLUGIN_ID, versionString);
}
}
}
}
}
+ saveVersion(prefs, usage, ORG_JBOSS_TOOLS_USAGE);
+ saveVersion(prefs, central, JBossCentralActivator.PLUGIN_ID);
+
if (!showJBossCentral) {
return;
}
+
Display.getDefault().asyncExec(new Runnable() {
@Override
@@ -72,4 +70,16 @@
});
}
+ protected void saveVersion(IEclipsePreferences prefs, Bundle bundle, String preference) {
+ if (bundle == null || prefs == null || preference == null) {
+ return;
+ }
+ Version version = bundle.getVersion();
+ String versionString = version.toString();
+ String savedVersion = prefs.get(preference, "");
+ if (!savedVersion.equals(versionString)) {
+ prefs.put(preference, versionString);
+ }
+ }
+
}
14 years, 4 months
JBoss Tools SVN: r37330 - trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/dialog.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-12-14 16:01:00 -0500 (Wed, 14 Dec 2011)
New Revision: 37330
Modified:
trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/dialog/ImageSelectionDialog.java
Log:
JBIDE-10223
https://issues.jboss.org/browse/JBIDE-10223
System cursor is used..
Modified: trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/dialog/ImageSelectionDialog.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/dialog/ImageSelectionDialog.java 2011-12-14 18:36:48 UTC (rev 37329)
+++ trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/dialog/ImageSelectionDialog.java 2011-12-14 21:01:00 UTC (rev 37330)
@@ -50,6 +50,7 @@
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
@@ -614,13 +615,12 @@
if (file != null) {
Cursor parentCursor = getShell().getCursor();
- final Cursor waitCursor = new Cursor(getShell().getDisplay(), SWT.CURSOR_WAIT);
Point previewPoint = new Point(0, 0);
Point labelPoint = canvas.getSize();
InputStream stream = null;
try {
- getShell().setCursor(waitCursor);
+ getShell().setCursor(Display.getCurrent().getSystemCursor(SWT.CURSOR_WAIT));
stream = new FileInputStream(file.getLocation().toOSString());
ImageData imageData = new ImageData(stream);
14 years, 4 months
JBoss Tools SVN: r37329 - trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-12-14 13:36:48 -0500 (Wed, 14 Dec 2011)
New Revision: 37329
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/NewWebProjectWizardPage.java
Log:
JBIDE-10227
https://issues.jboss.org/browse/JBIDE-10227
Obsolete method is removed.
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/NewWebProjectWizardPage.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/NewWebProjectWizardPage.java 2011-12-14 18:11:40 UTC (rev 37328)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/NewWebProjectWizardPage.java 2011-12-14 18:36:48 UTC (rev 37329)
@@ -34,17 +34,15 @@
import org.jboss.tools.common.model.ui.attribute.editor.PropertyEditor;
import org.jboss.tools.common.model.ui.attribute.editor.StringEditor;
import org.eclipse.jface.preference.FieldEditor;
-import org.eclipse.jface.util.Assert;
+import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
import org.jboss.tools.common.meta.key.WizardKeys;
@@ -178,24 +176,6 @@
// setPageComplete(false);
}
- private String insertBreaks(Control control, String text, int maxWidth) {
- StringBuffer sb = new StringBuffer();
- int size = 0;
- for (int i = 0; i < text.length(); i++) {
- char c = text.charAt(i);
- if(c == '\n' || c == '\r' || c == '\t') c = ' ';
- GC g = new GC(control);
- g.setFont(control.getFont());
- size += g.getCharWidth(c) + 1;
- if(size > maxWidth && c == ' ') {
- size = 0;
- c = '\n';
- }
- sb.append(c);
- }
- return sb.toString();
- }
-
protected String getProjectRootOption() {
return null;
}
14 years, 4 months
JBoss Tools SVN: r37328 - trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/widgets.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-12-14 13:11:40 -0500 (Wed, 14 Dec 2011)
New Revision: 37328
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/widgets/TextAndReferenceComponent.java
Log:
JBIDE-10227
https://issues.jboss.org/browse/JBIDE-10227
GC instance is disposed in TextAndReferenceComponent.
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/widgets/TextAndReferenceComponent.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/widgets/TextAndReferenceComponent.java 2011-12-14 18:00:49 UTC (rev 37327)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/widgets/TextAndReferenceComponent.java 2011-12-14 18:11:40 UTC (rev 37328)
@@ -65,6 +65,7 @@
GC g = new GC(this);
g.setFont(getFont());
lines = Tokenizer.breakIntoLines(g, tokens, width);
+ g.dispose();
return new Point(width + 10, lines.length * lineHeight + 6);
}
14 years, 4 months
JBoss Tools SVN: r37327 - in trunk/central/plugins/org.jboss.tools.central: icons and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2011-12-14 13:00:49 -0500 (Wed, 14 Dec 2011)
New Revision: 37327
Added:
trunk/central/plugins/org.jboss.tools.central/icons/jboss.png
Modified:
trunk/central/plugins/org.jboss.tools.central/plugin.xml
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/configurators/DefaultJBossCentralConfigurator.java
Log:
Better icon for JBoss Central https://issues.jboss.org/browse/JBIDE-10423
Added: trunk/central/plugins/org.jboss.tools.central/icons/jboss.png
===================================================================
(Binary files differ)
Property changes on: trunk/central/plugins/org.jboss.tools.central/icons/jboss.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: trunk/central/plugins/org.jboss.tools.central/plugin.xml
===================================================================
--- trunk/central/plugins/org.jboss.tools.central/plugin.xml 2011-12-14 17:15:29 UTC (rev 37326)
+++ trunk/central/plugins/org.jboss.tools.central/plugin.xml 2011-12-14 18:00:49 UTC (rev 37327)
@@ -9,7 +9,7 @@
point="org.eclipse.ui.editors">
<editor
name="JBoss Central"
- icon="icons/jboss.gif"
+ icon="icons/jboss.png"
contributorClass="org.jboss.tools.central.editors.JBossCentralEditorContributor"
class="org.jboss.tools.central.editors.JBossCentralEditor"
id="org.jboss.tools.central.editors.JBossCentralEditor">
@@ -38,7 +38,7 @@
locationURI="menu:help?before=group.intro">
<command
commandId="org.jboss.tools.central.show"
- icon="icons/jboss.gif"
+ icon="icons/jboss.png"
id="org.jboss.tools.central.show">
</command>
</menuContribution>
@@ -51,7 +51,7 @@
visible="true">
<action
class="org.jboss.tools.central.actions.ShowJBossCentralHandler"
- icon="icons/jboss.gif"
+ icon="icons/jboss.png"
id="org.jboss.tools.central.actions.ShowJBossCentralHandler"
label="JBoss Central"
toolbarPath="org.eclipse.ui.workbench.help/group.application"
Modified: trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/configurators/DefaultJBossCentralConfigurator.java
===================================================================
--- trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/configurators/DefaultJBossCentralConfigurator.java 2011-12-14 17:15:29 UTC (rev 37326)
+++ trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/configurators/DefaultJBossCentralConfigurator.java 2011-12-14 18:00:49 UTC (rev 37327)
@@ -80,7 +80,7 @@
@Override
public Image getHeaderImage() {
if (headerImage == null) {
- headerImage = JBossCentralActivator.getDefault().getImage("/icons/jboss.gif");
+ headerImage = JBossCentralActivator.getDefault().getImage("/icons/jboss.png");
}
return headerImage;
}
14 years, 4 months
JBoss Tools SVN: r37326 - in trunk/documentation/whatsnew/openshift: images and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-12-14 12:15:29 -0500 (Wed, 14 Dec 2011)
New Revision: 37326
Added:
trunk/documentation/whatsnew/openshift/images/create-jenkins.png
trunk/documentation/whatsnew/openshift/images/embed-cartridge.png
trunk/documentation/whatsnew/openshift/images/jenkins-creation-log.png
trunk/documentation/whatsnew/openshift/images/openshift-server-adapter.png
trunk/documentation/whatsnew/openshift/images/push-existing-project.png
trunk/documentation/whatsnew/openshift/openshift-news-3.3.0.M5.html
Log:
[JBIDe-10434] create 3.3.0.M5 N&N
Added: trunk/documentation/whatsnew/openshift/images/create-jenkins.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/openshift/images/create-jenkins.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/whatsnew/openshift/images/embed-cartridge.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/openshift/images/embed-cartridge.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/whatsnew/openshift/images/jenkins-creation-log.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/openshift/images/jenkins-creation-log.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/whatsnew/openshift/images/openshift-server-adapter.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/openshift/images/openshift-server-adapter.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/whatsnew/openshift/images/push-existing-project.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/openshift/images/push-existing-project.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/whatsnew/openshift/openshift-news-3.3.0.M5.html
===================================================================
--- trunk/documentation/whatsnew/openshift/openshift-news-3.3.0.M5.html (rev 0)
+++ trunk/documentation/whatsnew/openshift/openshift-news-3.3.0.M5.html 2011-12-14 17:15:29 UTC (rev 37326)
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Language" content="en-us" />
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+<link rel="stylesheet" href="../whatsnew.css" />
+<title>OpenShift Tools 3.3.0.M5 What's New</title>
+<script type="text/javascript">
+
+ var _gaq = _gaq || [];
+ _gaq.push(['_setAccount', 'UA-17645367-5']);
+ _gaq.push(['_trackPageview']);
+
+ (function() {
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+ })();
+
+</script></head>
+<body>
+<h1>OpenShift 3.3.0.M5 What's New</h1>
+
+<p align="right"><a href="../index.html">< Main Index</a> <a
+ href="../esb/esb-news-1.5.1.M5.html">ESB Tools
+ ></a></p>
+ <table border="0" cellpadding="10" cellspacing="0" width="80%">
+ <tr>
+ <td colspan="2">
+ <hr/>
+ <h3>OpenShift Express Application Wizard</h3>
+ <hr/>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left"><a name="itemname3" id="itemname3"></a><b>Embed Cartridges</b></td>
+ <td valign="top">
+ The OpenShift Express Application wizard now allows you to embed cartridges to your OpenShift application.
+ Cartridges add capabilities to your application. A typical usecase is to add a mysql database.
+ You allow your application to use a mysql database by embedding the mysql cartridge to it.
+ The OpenShift Express Application wizard will list all available cartridges and allow you to add/remove cartridges at will.
+ <p><img src="images/embed-cartridge.png" alt="embed cartridge"/></p>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left"><a name="itemname3" id="itemname3"></a><b>Embed Jenkins</b></td>
+ <td valign="top">
+ An even more exciting use case is to embed jenkins to your OpenShift application. That will turn OpenShift into an Continous Integration server.
+ Anytime you push changes to OpenShift, a jenkins CI server will build your application.
+ Our wizard allows you to embed the jenkins client. It will verify behind the scenes that you already have a jenkins application and
+ prompt you to create one if you haven't yet.
+ <p><img src="images/create-jenkins.png" alt="create jenkins"/></p>
+ Credentials and url of your new jenkins instance will get reported to you accordingly.
+ <p><img src="images/jenkins-creation-log.png" alt="jenkins creation log"/></p>
+ <p><small><a href="https://issues.jboss.org/browse/JBIDE-9927">Related Jira</a></small></p>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left"><a name="itemname3" id="itemname3"></a><b>Push Existing Projects</b></td>
+ <td valign="top">
+ The OpenShift Express Application wizard in M4 allowed you to import the demo application (that the OpenShift PaaS creates initially) to your workspace.
+ It was then up to you to merge the demo with your own application and push things to the OpenShift PaaS. Our tooling did not assist you in that case.
+ In M5 we now allow you to push your own application directly. Just uncheck <b>"Create New Project"</b> and choose the project from your workspace, that you want to
+ publish to OpenShift. The wizard will then copy OpenShift configurations and enable git on it. You'll then be able to manually push it to OpenShift
+ or let our Server Adapter do that job for you.
+ <p><img src="images/push-existing-project.png" alt="push existing project"/></p>
+ <p><small><a href="https://issues.jboss.org/browse/JBIDE-10171">Related Jira</a></small></p>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left"><a name="itemname3" id="itemname3"></a><b>OpenShift server adapter</b></td>
+ <td valign="top">
+ We also offer you an Eclipse WTP compliant OpenShift Server adapter that allows you to publish applications to OpenShift.
+ The server adapter is created when you finish the OpenShift Express Application wizard. We already offered that server adapter in M4.
+ We now turned it into its own distinct server type and made it work even more seamlessly.
+ <p><img src="images/openshift-server-adapter.png" alt="openshift server adapter"/></p>
+ <p><small><a href="https://issues.jboss.org/browse/JBIDE-9935">Related Jira</a></small></p>
+ </td>
+ </tr> <tr>
+ <td colspan="2">
+ <hr/>
+ <h3>OpenShift Express REST client</h3>
+ <hr/>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left"><a name="itemname3" id="itemname3"></a><b>REST Client</b></td>
+ <td valign="top">
+ We developed a client for the OpenShift Express REST service in M4. It pretty much offers all features that
+ are currently available in the rhc-* command line tools (create/rename a domain, create/destroy applications,
+ list all existing applications, available cartridges, read the application log, embed cartridges etc.). <br/>
+ We moved it to github and joined forces with the OpenShift team.
+ The official client is now maintained at <a href="https://github.com/bdecoste/openshift-java-client">https://github.com/bdecoste/openshift-java-client</a>
+ <p><small><a href="https://issues.jboss.org/browse/JBIDE-10068">Related Jira</a>, <a href="https://issues.jboss.org/browse/JBIDE-10455">Related Jira</a></small></p>
+ </td>
+ </tr>
+ </table>
+</body>
+
+</html>
+
+
Property changes on: trunk/documentation/whatsnew/openshift/openshift-news-3.3.0.M5.html
___________________________________________________________________
Added: svn:mime-type
+ text/plain
14 years, 4 months
JBoss Tools SVN: r37325 - in trunk/as/plugins: org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7 and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2011-12-14 07:19:44 -0500 (Wed, 14 Dec 2011)
New Revision: 37325
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/configuration/JBossLaunchConfigProperties.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/configuration/LocalJBossStartLaunchConfigurator.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7LaunchConfigProperties.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/LocalJBoss7StartConfigurator.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/IJBossToolingConstants.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/LaunchCommandPreferences.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/editor/ServerModeSectionComposite.java
Log:
JBIDE-10319 - added a new checkbox with the option.
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/configuration/JBossLaunchConfigProperties.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/configuration/JBossLaunchConfigProperties.java 2011-12-14 11:41:44 UTC (rev 37324)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/configuration/JBossLaunchConfigProperties.java 2011-12-14 12:19:44 UTC (rev 37325)
@@ -102,7 +102,7 @@
String programArguments = getProgramArguments(launchConfig);
programArguments = ArgsUtil.setArg(programArguments,
IJBossRuntimeConstants.STARTUP_ARG_HOST_SHORT,
- null, host);
+ IJBossRuntimeConstants.STARTUP_ARG_HOST_LONG, host);
setProgramArguments(programArguments, launchConfig);
}
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/configuration/LocalJBossStartLaunchConfigurator.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/configuration/LocalJBossStartLaunchConfigurator.java 2011-12-14 11:41:44 UTC (rev 37324)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/configuration/LocalJBossStartLaunchConfigurator.java 2011-12-14 12:19:44 UTC (rev 37325)
@@ -28,6 +28,7 @@
import org.jboss.ide.eclipse.as.core.server.internal.launch.RunJarContainerWrapper;
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.LaunchCommandPreferences;
import org.jboss.ide.eclipse.as.core.util.LaunchConfigUtils;
import org.jboss.ide.eclipse.as.core.util.ServerUtil;
@@ -88,7 +89,9 @@
@Override
protected String getHost(JBossServer server, IJBossServerRuntime runtime) {
- return server.getServer().getHost();
+ if( LaunchCommandPreferences.listensOnAllHosts(server.getServer()))
+ return "0.0.0.0"; //$NON-NLS-1$
+ return server.getHost();
}
@Override
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7LaunchConfigProperties.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7LaunchConfigProperties.java 2011-12-14 11:41:44 UTC (rev 37324)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7LaunchConfigProperties.java 2011-12-14 12:19:44 UTC (rev 37325)
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007 Red Hat, Inc.
+ * 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,
@@ -69,4 +69,19 @@
setVmArguments(arguments, launchConfig);
}
}
+
+ public void setHost(String host, ILaunchConfigurationWorkingCopy launchConfig) throws CoreException {
+ if (isSet(host)) {
+ String currentHost = getHost(launchConfig);
+ if (currentHost == null
+ || !host.equals(currentHost)) {
+ String programArguments = getProgramArguments(launchConfig);
+ programArguments = ArgsUtil.setArg(programArguments,
+ IJBossRuntimeConstants.STARTUP_ARG_HOST_SHORT,
+ null, host);
+ setProgramArguments(programArguments, launchConfig);
+ }
+ }
+ }
+
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/LocalJBoss7StartConfigurator.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/LocalJBoss7StartConfigurator.java 2011-12-14 11:41:44 UTC (rev 37324)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/LocalJBoss7StartConfigurator.java 2011-12-14 12:19:44 UTC (rev 37325)
@@ -25,6 +25,7 @@
import org.jboss.ide.eclipse.as.core.server.internal.launch.configuration.AbstractStartLaunchConfigurator;
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.LaunchCommandPreferences;
import org.jboss.ide.eclipse.as.core.util.LaunchConfigUtils;
public class LocalJBoss7StartConfigurator extends AbstractStartLaunchConfigurator {
@@ -100,6 +101,8 @@
@Override
protected String getHost(JBossServer server, IJBossServerRuntime runtime) {
+ if( LaunchCommandPreferences.listensOnAllHosts(server.getServer()))
+ return "0.0.0.0"; //$NON-NLS-1$
return server.getHost();
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/IJBossToolingConstants.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/IJBossToolingConstants.java 2011-12-14 11:41:44 UTC (rev 37324)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/IJBossToolingConstants.java 2011-12-14 12:19:44 UTC (rev 37325)
@@ -120,6 +120,7 @@
public static final int AS7_MANAGEMENT_PORT_DEFAULT_PORT = 9999;
public static final String IGNORE_LAUNCH_COMMANDS = "org.jboss.ide.eclipse.as.core.server.IGNORE_LAUNCH_COMMANDS"; //$NON-NLS-1$
+ public static final String LISTEN_ALL_HOSTS = "org.jboss.ide.eclipse.as.core.server.LISTEN_ON_ALL_HOSTS"; //$NON-NLS-1$
public static final String LOCAL_DEPLOYMENT_NAME = "name"; //$NON-NLS-1$
public static final String LOCAL_DEPLOYMENT_LOC = "location"; //$NON-NLS-1$
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/LaunchCommandPreferences.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/LaunchCommandPreferences.java 2011-12-14 11:41:44 UTC (rev 37324)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/LaunchCommandPreferences.java 2011-12-14 12:19:44 UTC (rev 37325)
@@ -23,11 +23,23 @@
}
public static boolean isIgnoreLaunchCommand(IServerAttributes server, boolean defaultValue) {
+ return checkBooleanAttribute(server, IJBossToolingConstants.IGNORE_LAUNCH_COMMANDS, defaultValue );
+ }
+
+ public static boolean listensOnAllHosts(IServerAttributes server) {
+ return listensOnAllHosts(server, false);
+ }
+
+ public static boolean listensOnAllHosts(IServerAttributes server, boolean defaultValue) {
+ return checkBooleanAttribute(server, IJBossToolingConstants.LISTEN_ALL_HOSTS, defaultValue );
+ }
+
+ private static boolean checkBooleanAttribute(IServerAttributes server, String key, boolean defaultValue) {
if (server == null) {
return false;
}
- String ignoreCommand = server.getAttribute(IJBossToolingConstants.IGNORE_LAUNCH_COMMANDS, Boolean.toString(defaultValue));
+ String ignoreCommand = server.getAttribute(key, Boolean.toString(defaultValue));
return Boolean.valueOf(ignoreCommand);
}
-
+
}
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-12-14 11:41:44 UTC (rev 37324)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.java 2011-12-14 12:19:44 UTC (rev 37325)
@@ -188,6 +188,8 @@
public static String EditorModule;
public static String EditorDoNotLaunch;
public static String EditorDoNotLaunchCommand;
+ public static String EditorListenOnAllHosts;
+ public static String EditorListenOnAllHostsCommand;
public static String EditorChangeServerMode;
public static String EditorZipDeployments;
public static String EditorSetRadioClicked;
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-12-14 11:41:44 UTC (rev 37324)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties 2011-12-14 12:19:44 UTC (rev 37325)
@@ -167,6 +167,8 @@
EditorTempDeployDNE=The temporary deploy directory "{0}" does not exist.
EditorDoNotLaunch=Server is externally managed. Assume server is started.
EditorDoNotLaunchCommand=Toggle Startup and Shutdown scripts
+EditorListenOnAllHosts=Launched server listens on all hosts ( -b 0.0.0.0 )
+EditorListenOnAllHostsCommand=Toggle allowing launched server to listen on all hosts
EditorChangeServerMode=Change server mode
EditorStartupPollerLabel=Startup Poller
EditorShutdownPollerLabel=Shutdown Poller
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ServerModeSectionComposite.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ServerModeSectionComposite.java 2011-12-14 11:41:44 UTC (rev 37324)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ServerModeSectionComposite.java 2011-12-14 12:19:44 UTC (rev 37325)
@@ -50,6 +50,7 @@
private ScrolledPageBook preferencePageBook;
private IServerModeUICallback callback;
private Button executeShellScripts; // may be null;
+ private Button listenOnAllHosts; // may be null
public ServerModeSectionComposite(Composite parent, int style, IServerModeUICallback callback) {
super(parent, style);
@@ -75,7 +76,23 @@
}}
);
}
-
+
+ if( showListenOnAllHostsCheckbox()) {
+ listenOnAllHosts = new Button(this, SWT.CHECK);
+ listenOnAllHosts.setText(Messages.EditorListenOnAllHosts);
+ FormData fd = UIUtil.createFormData2(top == null ? 0 : top, 5, null, 0, 0, 5, null, 0);
+ listenOnAllHosts.setLayoutData(fd);
+ top = listenOnAllHosts;
+ listenOnAllHosts.setSelection(LaunchCommandPreferences.listensOnAllHosts(callback.getServer()));
+ listenOnAllHosts.addSelectionListener(new SelectionListener(){
+ public void widgetSelected(SelectionEvent e) {
+ listenOnAllHostsToggled();
+ }
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }}
+ );
+ }
+
deployTypeCombo = new Combo(this, SWT.READ_ONLY);
FormData fd = UIUtil.createFormData2(top, 5, null, 0, 0, 5, 50, -5);
deployTypeCombo.setLayoutData(fd);
@@ -139,6 +156,9 @@
protected boolean showExecuteShellCheckbox() {
return true;
}
+ protected boolean showListenOnAllHostsCheckbox() {
+ return true;
+ }
protected void executeShellToggled() {
callback.execute(new ChangeServerPropertyCommand(
@@ -146,6 +166,12 @@
new Boolean(executeShellScripts.getSelection()).toString(), Messages.EditorDoNotLaunchCommand));
}
+ protected void listenOnAllHostsToggled() {
+ callback.execute(new ChangeServerPropertyCommand(
+ callback.getServer(), IJBossToolingConstants.LISTEN_ALL_HOSTS,
+ new Boolean(listenOnAllHosts.getSelection()).toString(), Messages.EditorListenOnAllHostsCommand));
+ }
+
private class DeployUIAdditions {
private String behaviourName;
private String behaviourId;
14 years, 4 months
JBoss Tools SVN: r37324 - in trunk/as/plugins: org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7 and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2011-12-14 06:41:44 -0500 (Wed, 14 Dec 2011)
New Revision: 37324
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/configuration/JBossLaunchConfigProperties.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/LocalJBoss7StartConfigurator.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ArgsUtil.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/IJBossToolingConstants.java
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.jmx.integration/src/org/jboss/ide/eclipse/as/jmx/integration/JMXProvider.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/ShowInJMXConsoleActionProvider.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/ShowInWebManagementActionProvider.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/ShowInWelcomePageActionProvider.java
Log:
JBIDE-10353 - removed irrelevent actions from openshift shown-in
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/configuration/JBossLaunchConfigProperties.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/configuration/JBossLaunchConfigProperties.java 2011-12-14 05:51:18 UTC (rev 37323)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/configuration/JBossLaunchConfigProperties.java 2011-12-14 11:41:44 UTC (rev 37324)
@@ -102,8 +102,7 @@
String programArguments = getProgramArguments(launchConfig);
programArguments = ArgsUtil.setArg(programArguments,
IJBossRuntimeConstants.STARTUP_ARG_HOST_SHORT,
- IJBossRuntimeConstants.STARTUP_ARG_HOST_LONG,
- host);
+ null, host);
setProgramArguments(programArguments, launchConfig);
}
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/LocalJBoss7StartConfigurator.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/LocalJBoss7StartConfigurator.java 2011-12-14 05:51:18 UTC (rev 37323)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/LocalJBoss7StartConfigurator.java 2011-12-14 11:41:44 UTC (rev 37324)
@@ -100,8 +100,7 @@
@Override
protected String getHost(JBossServer server, IJBossServerRuntime runtime) {
- // not needed
- return null;
+ return server.getHost();
}
@Override
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ArgsUtil.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ArgsUtil.java 2011-12-14 05:51:18 UTC (rev 37323)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ArgsUtil.java 2011-12-14 11:41:44 UTC (rev 37324)
@@ -148,8 +148,12 @@
}
// turn this to a retval;
- if( !found )
- retVal = retVal + longOpt + EQ + value;
+ if( !found ) {
+ if( longOpt != null )
+ retVal = retVal + longOpt + EQ + value;
+ else
+ retVal = retVal + shortOpt + SPACE + value;
+ }
return retVal;
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/IJBossToolingConstants.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/IJBossToolingConstants.java 2011-12-14 05:51:18 UTC (rev 37323)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/IJBossToolingConstants.java 2011-12-14 11:41:44 UTC (rev 37324)
@@ -31,6 +31,7 @@
public static final String EAP_60 = "org.jboss.ide.eclipse.as.runtime.eap.60"; //$NON-NLS-1$
// NEW_SERVER_ADAPTER Add the new runtime constant above this line
+ public static final String SERVER_AS_PREFIX = "org.jboss.ide.eclipse.as."; //$NON-NLS-1$
public static final String SERVER_AS_32 = "org.jboss.ide.eclipse.as.32"; //$NON-NLS-1$
public static final String SERVER_AS_40 = "org.jboss.ide.eclipse.as.40"; //$NON-NLS-1$
public static final String SERVER_AS_42 = "org.jboss.ide.eclipse.as.42"; //$NON-NLS-1$
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-12-14 05:51:18 UTC (rev 37323)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ServerUtil.java 2011-12-14 11:41:44 UTC (rev 37324)
@@ -81,6 +81,13 @@
return p;
}
+ public static boolean isJBossServerType(IServerType type) {
+ // If we start with AS or EAP serverIds and are NOT deploy-only server
+ return !type.getId().equals(IJBossToolingConstants.DEPLOY_ONLY_SERVER) &&
+ (type.getId().startsWith(IJBossToolingConstants.SERVER_AS_PREFIX)
+ || type.getId().startsWith(IJBossToolingConstants.EAP_SERVER_PREFIX));
+ }
+
public static boolean isJBoss7(IServer server) {
return isJBoss7(server.getServerType());
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.jmx.integration/src/org/jboss/ide/eclipse/as/jmx/integration/JMXProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.jmx.integration/src/org/jboss/ide/eclipse/as/jmx/integration/JMXProvider.java 2011-12-14 05:51:18 UTC (rev 37323)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.jmx.integration/src/org/jboss/ide/eclipse/as/jmx/integration/JMXProvider.java 2011-12-14 11:41:44 UTC (rev 37324)
@@ -87,7 +87,7 @@
if( quick != null && selection != null && selection.toArray().length == 1 ) {
if( selection.getFirstElement() instanceof IServer ) {
IServer server = (IServer)selection.getFirstElement();
- if( ServerConverter.getJBossServer(server) != null && !ServerUtil.isJBoss7(server)) {
+ if( ServerUtil.isJBossServerType(server.getServerType()) && !ServerUtil.isJBoss7(server)) {
if( menu instanceof MenuManager ) {
((MenuManager)quick).add(showInJMXViewAction);
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/ShowInJMXConsoleActionProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/ShowInJMXConsoleActionProvider.java 2011-12-14 05:51:18 UTC (rev 37323)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/ShowInJMXConsoleActionProvider.java 2011-12-14 11:41:44 UTC (rev 37324)
@@ -32,7 +32,7 @@
if( jbs != null ) {
// TODO fix this so anything BELOW 7 works
// need new util methods
- return !ServerUtil.isJBoss7(server);
+ return ServerUtil.isJBossServerType(server.getServerType()) && !ServerUtil.isJBoss7(server);
}
}
return false;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/ShowInWebManagementActionProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/ShowInWebManagementActionProvider.java 2011-12-14 05:51:18 UTC (rev 37323)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/ShowInWebManagementActionProvider.java 2011-12-14 11:41:44 UTC (rev 37324)
@@ -11,8 +11,10 @@
package org.jboss.ide.eclipse.as.ui.views.server.extensions;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.wst.server.core.IServer;
import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
+import org.jboss.ide.eclipse.as.core.util.ServerConverter;
import org.jboss.ide.eclipse.as.core.util.ServerUtil;
import org.jboss.ide.eclipse.as.ui.Messages;
@@ -24,6 +26,12 @@
protected String getActionText() {
return Messages.ShowInWebManagementConsole_Action_Text;
}
+
+ protected boolean shouldAddForSelection(IStructuredSelection sel) {
+ IServer server = getSingleServer(sel);
+ return accepts(server);
+ }
+
protected boolean accepts(IServer server) {
return (ServerUtil.isJBoss7(server)
&& server.getServerState() == IServer.STATE_STARTED);
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/ShowInWelcomePageActionProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/ShowInWelcomePageActionProvider.java 2011-12-14 05:51:18 UTC (rev 37323)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/ShowInWelcomePageActionProvider.java 2011-12-14 11:41:44 UTC (rev 37324)
@@ -11,6 +11,7 @@
package org.jboss.ide.eclipse.as.ui.views.server.extensions;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.wst.server.core.IServer;
import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
import org.jboss.ide.eclipse.as.core.util.ServerUtil;
@@ -25,6 +26,11 @@
return Messages.ShowInWelcomePage_Action_Text;
}
+ protected boolean shouldAddForSelection(IStructuredSelection sel) {
+ IServer server = getSingleServer(sel);
+ return ServerUtil.isJBossServerType(server.getServerType()) && accepts(server);
+ }
+
protected boolean accepts(IServer server) {
return server.getServerState() == IServer.STATE_STARTED;
}
14 years, 4 months
JBoss Tools SVN: r37323 - trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2011-12-14 00:51:18 -0500 (Wed, 14 Dec 2011)
New Revision: 37323
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/CustomRuntimeClasspathModel.java
Log:
JBIDE-10473 - adds jboss ejb jar to as7.1 list of default cpe (trunk)
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/CustomRuntimeClasspathModel.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/CustomRuntimeClasspathModel.java 2011-12-14 02:18:06 UTC (rev 37322)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/CustomRuntimeClasspathModel.java 2011-12-14 05:51:18 UTC (rev 37323)
@@ -99,7 +99,7 @@
if(AS_70.equals(type.getId()))
return getDefaultAS70Entries();
if(AS_71.equals(type.getId()))
- return getDefaultAS70Entries();
+ return getDefaultAS71Entries();
// NEW_SERVER_ADAPTER add logic for new adapter here
return new IDefaultPathProvider[]{};
@@ -186,6 +186,13 @@
return (IDefaultPathProvider[]) sets.toArray(new IDefaultPathProvider[sets.size()]);
}
+ public IDefaultPathProvider[] getDefaultAS71Entries() {
+ ArrayList<IDefaultPathProvider> sets = new ArrayList<IDefaultPathProvider>();
+ sets.addAll(Arrays.asList(getDefaultAS70Entries()));
+ sets.add(new PathProviderFileset("modules/org/jboss/ejb3/main"));
+ return (IDefaultPathProvider[]) sets.toArray(new IDefaultPathProvider[sets.size()]);
+ }
+
public IPath[] getAllEntries(IRuntime runtime, IDefaultPathProvider[] sets) {
ArrayList<IPath> retval = new ArrayList<IPath>();
for( int i = 0; i < sets.length; i++ ) {
14 years, 4 months