Author: rob.stryker(a)jboss.com
Date: 2010-06-14 06:16:28 -0400 (Mon, 14 Jun 2010)
New Revision: 22780
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IJBoss6Server.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBoss6Server.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/properties/jboss.60.default.ports.properties
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/descriptors/XPathModel.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/StopLaunchConfiguration.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/plugin.xml
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/PortSection.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.properties
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/schema/ServerEditorPortSection.exsd
Log:
JBIDE-6454 and JBIDE-6455 committing to trunk...
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/descriptors/XPathModel.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/descriptors/XPathModel.java 2010-06-14
09:03:11 UTC (rev 22779)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/descriptors/XPathModel.java 2010-06-14
10:16:28 UTC (rev 22780)
@@ -248,6 +248,7 @@
rtToPortsFile.put(IConstants.AS_42,
properties.append(IJBossToolingConstants.DEFAULT_PROPS_42));
rtToPortsFile.put(IConstants.AS_50,
properties.append(IJBossToolingConstants.DEFAULT_PROPS_50));
rtToPortsFile.put(IConstants.AS_51,
properties.append(IJBossToolingConstants.DEFAULT_PROPS_51));
+ rtToPortsFile.put(IConstants.AS_60,
properties.append(IJBossToolingConstants.DEFAULT_PROPS_60));
rtToPortsFile.put(IConstants.EAP_43,
properties.append(IJBossToolingConstants.DEFAULT_PROPS_EAP_43));
rtToPortsFile.put(IConstants.EAP_50,
properties.append(IJBossToolingConstants.DEFAULT_PROPS_EAP_50));
}
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IJBoss6Server.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IJBoss6Server.java
(rev 0)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IJBoss6Server.java 2010-06-14
10:16:28 UTC (rev 22780)
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.ide.eclipse.as.core.server;
+
+import org.eclipse.core.runtime.IPath;
+import org.jboss.ide.eclipse.as.core.Messages;
+
+public interface IJBoss6Server {
+ public static final String JMX_RMI_PORT =
"org.jboss.ide.eclipse.as.core.server.jmxrmiport"; //$NON-NLS-1$
+ public static final String JMX_RMI_PORT_DETECT =
"org.jboss.ide.eclipse.as.core.server.jmxrmiport_AutoDetect"; //$NON-NLS-1$
+ public static final String JMX_RMI_PORT_DETECT_XPATH =
"org.jboss.ide.eclipse.as.core.server.jmxrmiport_AutoDetect.XPath";
//$NON-NLS-1$
+ public static final String JMX_RMI_PORT_DEFAULT_XPATH = Messages.Ports + IPath.SEPARATOR
+ "JMX RMI Port"; //$NON-NLS-1$
+ public static final int JMX_RMI_DEFAULT_PORT = 1090;
+
+ public int getJMXRMIPort();
+}
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBoss6Server.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBoss6Server.java
(rev 0)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBoss6Server.java 2010-06-14
10:16:28 UTC (rev 22780)
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.ide.eclipse.as.core.server.internal;
+
+import org.jboss.ide.eclipse.as.core.server.IJBoss6Server;
+
+public class JBoss6Server extends JBossServer implements IJBoss6Server {
+
+ public int getJMXRMIPort() {
+ return findPort(JMX_RMI_PORT, JMX_RMI_PORT_DETECT, JMX_RMI_PORT_DETECT_XPATH,
+ JMX_RMI_PORT_DEFAULT_XPATH, JMX_RMI_DEFAULT_PORT);
+ }
+
+}
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/StopLaunchConfiguration.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/StopLaunchConfiguration.java 2010-06-14
09:03:11 UTC (rev 22779)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/StopLaunchConfiguration.java 2010-06-14
10:16:28 UTC (rev 22780)
@@ -31,6 +31,7 @@
import org.eclipse.wst.server.core.IServer;
import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
import org.jboss.ide.eclipse.as.core.Messages;
+import org.jboss.ide.eclipse.as.core.server.IJBoss6Server;
import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
import org.jboss.ide.eclipse.as.core.util.IJBossRuntimeConstants;
@@ -105,7 +106,8 @@
String runtimeTypeId = jbs.getRuntime().getRuntime().getRuntimeType().getId();
String serverUrl;
if (runtimeTypeId.equals(tc.AS_60)){
- serverUrl = "service:jmx:rmi:///jndi/rmi://" + jbs.getHost() + ":"
+ 1090 + "/jmxrmi"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ IJBoss6Server server6 =
(IJBoss6Server)jbs.getServer().loadAdapter(IJBoss6Server.class, new
NullProgressMonitor());
+ serverUrl = "service:jmx:rmi:///jndi/rmi://" + jbs.getHost() + ":"
+ server6.getJMXRMIPort() + "/jmxrmi"; //$NON-NLS-1$ //$NON-NLS-2$
//$NON-NLS-3$
} else {
serverUrl = jbs.getHost() + ":" + jbs.getJNDIPort(); //$NON-NLS-1$
}
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 2010-06-14
09:03:11 UTC (rev 22779)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/IJBossToolingConstants.java 2010-06-14
10:16:28 UTC (rev 22780)
@@ -59,6 +59,7 @@
public static final String DEFAULT_PROPS_42 =
"jboss.42.default.ports.properties"; //$NON-NLS-1$
public static final String DEFAULT_PROPS_50 =
"jboss.50.default.ports.properties"; //$NON-NLS-1$
public static final String DEFAULT_PROPS_51 =
"jboss.51.default.ports.properties"; //$NON-NLS-1$
+ public static final String DEFAULT_PROPS_60 =
"jboss.60.default.ports.properties"; //$NON-NLS-1$
public static final String DEFAULT_PROPS_EAP_43 =
"jboss.eap.43.default.ports.properties"; //$NON-NLS-1$
public static final String DEFAULT_PROPS_EAP_50 =
"jboss.eap.50.default.ports.properties"; //$NON-NLS-1$
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2010-06-14 09:03:11 UTC (rev
22779)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2010-06-14 10:16:28 UTC (rev
22780)
@@ -96,7 +96,7 @@
<serverType
behaviourClass="org.jboss.ide.eclipse.as.core.server.internal.JBossServerBehavior"
- class="org.jboss.ide.eclipse.as.core.server.internal.JBossServer"
+ class="org.jboss.ide.eclipse.as.core.server.internal.JBoss6Server"
description="%jboss.version.60.description"
hasConfiguration="false"
id="org.jboss.ide.eclipse.as.60"
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/properties/jboss.60.default.ports.properties
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.core/properties/jboss.60.default.ports.properties
(rev 0)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.core/properties/jboss.60.default.ports.properties 2010-06-14
10:16:28 UTC (rev 22780)
@@ -0,0 +1,40 @@
+# As much as possible, try to create file patterns that match
+# as few files as possible. Each matching file *WILL* be scanned
+# and cached, regardless of if there's a match.
+
+JNDI=/deployment/jboss_bean-deployer_2:bean/jboss_bean-deployer_2:constructor/jboss_bean-deployer_2:parameter/jboss_bean-deployer_2:set/jboss_bean-deployer_2:bean[jboss_bean-deployer_2:property='jboss:service=Naming'
and
jboss_bean-deployer_2:property='Port']/jboss_bean-deployer_2:property[@name='port']
+JNDI_FILE=conf/bindingservice.beans/META-INF/bindings-jboss-beans.xml
+JBoss_Web=/deployment/jboss_bean-deployer_2:bean/jboss_bean-deployer_2:constructor/jboss_bean-deployer_2:parameter/jboss_bean-deployer_2:set/jboss_bean-deployer_2:bean[jboss_bean-deployer_2:property='jboss.web:service=WebServer'][not(jboss_bean-deployer_2:property='HttpsConnector')]/jboss_bean-deployer_2:property[@name='port']
+JBoss_Web_FILE=conf/bindingservice.beans/META-INF/bindings-jboss-beans.xml
+HTTPS_Connector=/deployment/jboss_bean-deployer_2:bean/jboss_bean-deployer_2:constructor/jboss_bean-deployer_2:parameter/jboss_bean-deployer_2:set/jboss_bean-deployer_2:bean[jboss_bean-deployer_2:property='jboss.web:service=WebServer'][jboss_bean-deployer_2:property='HttpsConnector']/jboss_bean-deployer_2:property[@name='port']
+HTTPS_Connector_FILE=conf/bindingservice.beans/META-INF/bindings-jboss-beans.xml
+Unified_Invoker_Connector=/deployment/jboss_bean-deployer_2:bean/jboss_bean-deployer_2:constructor/jboss_bean-deployer_2:parameter/jboss_bean-deployer_2:set/jboss_bean-deployer_2:bean[jboss_bean-deployer_2:property='UnifiedInvokerConnector']/jboss_bean-deployer_2:property[@name='port']
+Unified_Invoker_Connector_FILE=conf/bindingservice.beans/META-INF/bindings-jboss-beans.xml
+RMI_JRMP_Invoker=/deployment/jboss_bean-deployer_2:bean/jboss_bean-deployer_2:constructor/jboss_bean-deployer_2:parameter/jboss_bean-deployer_2:set/jboss_bean-deployer_2:bean[jboss_bean-deployer_2:property='jboss:service=invoker,type=jrmp']/jboss_bean-deployer_2:property[@name='port']
+RMI_JRMP_Invoker_FILE=conf/bindingservice.beans/META-INF/bindings-jboss-beans.xml
+Pooled_Invoker=/deployment/jboss_bean-deployer_2:bean/jboss_bean-deployer_2:constructor/jboss_bean-deployer_2:parameter/jboss_bean-deployer_2:set/jboss_bean-deployer_2:bean[jboss_bean-deployer_2:property='jboss:service=invoker,type=pooled']/jboss_bean-deployer_2:property[@name='port']
+Pooled_Invoker_FILE=conf/bindingservice.beans/META-INF/bindings-jboss-beans.xml
+HA_JNDI_Port=/deployment/jboss_bean-deployer_2:bean/jboss_bean-deployer_2:constructor/jboss_bean-deployer_2:parameter/jboss_bean-deployer_2:set/jboss_bean-deployer_2:bean[jboss_bean-deployer_2:property='jboss:service=HAJNDI'][jboss_bean-deployer_2:property='Port']/jboss_bean-deployer_2:property[@name='port']
+HA_JNDI_Port_FILE=conf/bindingservice.beans/META-INF/bindings-jboss-beans.xml
+RMI_JNDI_Port=/deployment/jboss_bean-deployer_2:bean/jboss_bean-deployer_2:constructor/jboss_bean-deployer_2:parameter/jboss_bean-deployer_2:set/jboss_bean-deployer_2:bean[jboss_bean-deployer_2:property='jboss:service=HAJNDI'][jboss_bean-deployer_2:property='RmiPort']/jboss_bean-deployer_2:property[@name='port']
+RMI_JNDI_Port_FILE=conf/bindingservice.beans/META-INF/bindings-jboss-beans.xml
+HA_RMI_JRMP_Invoker=/deployment/jboss_bean-deployer_2:bean/jboss_bean-deployer_2:constructor/jboss_bean-deployer_2:parameter/jboss_bean-deployer_2:set/jboss_bean-deployer_2:bean[jboss_bean-deployer_2:property='jboss:service=invoker,type=jrmpha']/jboss_bean-deployer_2:property[@name='port']
+HA_RMI_JRMP_Invoker_FILE=conf/bindingservice.beans/META-INF/bindings-jboss-beans.xml
+HA_Pooled_Invoker=/deployment/jboss_bean-deployer_2:bean/jboss_bean-deployer_2:constructor/jboss_bean-deployer_2:parameter/jboss_bean-deployer_2:set/jboss_bean-deployer_2:bean[jboss_bean-deployer_2:property='jboss:service=invoker,type=pooledha']/jboss_bean-deployer_2:property[@name='port']
+HA_Pooled_Invoker_FILE=conf/bindingservice.beans/META-INF/bindings-jboss-beans.xml
+IIOP_Deploy=/deployment/jboss_bean-deployer_2:bean/jboss_bean-deployer_2:constructor/jboss_bean-deployer_2:parameter/jboss_bean-deployer_2:set/jboss_bean-deployer_2:bean[jboss_bean-deployer_2:property='jboss:service=CorbaORB']/jboss_bean-deployer_2:property[@name='port']
+IIOP_Deploy_FILE=conf/bindingservice.beans/META-INF/bindings-jboss-beans.xml
+SNMP_Manager=/deployment/jboss_bean-deployer_2:bean/jboss_bean-deployer_2:constructor/jboss_bean-deployer_2:parameter/jboss_bean-deployer_2:set/jboss_bean-deployer_2:bean[jboss_bean-deployer_2:property='jboss.jmx:name=SnmpAgent,service=trapd,type=logger']/jboss_bean-deployer_2:property[@name='port']
+SNMP_Manager_FILE=conf/bindingservice.beans/META-INF/bindings-jboss-beans.xml
+SNMP_Adapter=/deployment/jboss_bean-deployer_2:bean/jboss_bean-deployer_2:constructor/jboss_bean-deployer_2:parameter/jboss_bean-deployer_2:set/jboss_bean-deployer_2:bean[jboss_bean-deployer_2:property='jboss.jmx:name=SnmpAgent,service=snmp,type=adaptor']/jboss_bean-deployer_2:property[@name='port']
+SNMP_Adapter_FILE=conf/bindingservice.beans/META-INF/bindings-jboss-beans.xml
+JMX_Remoting=/deployment/jboss_bean-deployer_2:bean/jboss_bean-deployer_2:constructor/jboss_bean-deployer_2:parameter/jboss_bean-deployer_2:set/jboss_bean-deployer_2:bean[jboss_bean-deployer_2:property='jboss.remoting:service=JMXConnectorServer,protocol=rmi']/jboss_bean-deployer_2:property[@name='port']
+JMX_Remoting_FILE=conf/bindingservice.beans/META-INF/bindings-jboss-beans.xml
+JBM_Bisocket_Connector=/deployment/jboss_bean-deployer_2:bean/jboss_bean-deployer_2:constructor/jboss_bean-deployer_2:parameter/jboss_bean-deployer_2:set/jboss_bean-deployer_2:bean[jboss_bean-deployer_2:property='jboss.messaging:service=Connector,transport=bisocket']/jboss_bean-deployer_2:property[@name='port']
+JBM_Bisocket_Connector_FILE=conf/bindingservice.beans/META-INF/bindings-jboss-beans.xml
+Transaction_Recovery_Manager=/deployment/jboss_bean-deployer_2:bean/jboss_bean-deployer_2:constructor/jboss_bean-deployer_2:parameter/jboss_bean-deployer_2:set/jboss_bean-deployer_2:bean[jboss_bean-deployer_2:property='TransactionManager'][jboss_bean-deployer_2:property='recoveryManager']/jboss_bean-deployer_2:property[@name='port']
+Transaction_Recovery_Manager_FILE=conf/bindingservice.beans/META-INF/bindings-jboss-beans.xml
+Transaction_SocketProcessId=/deployment/jboss_bean-deployer_2:bean/jboss_bean-deployer_2:constructor/jboss_bean-deployer_2:parameter/jboss_bean-deployer_2:set/jboss_bean-deployer_2:bean[jboss_bean-deployer_2:property='TransactionManager'][jboss_bean-deployer_2:property='socketProcessId']/jboss_bean-deployer_2:property[@name='port']
+Transaction_SocketProcessId_FILE=conf/bindingservice.beans/META-INF/bindings-jboss-beans.xml
+JMX_RMI_Port=/deployment/jboss_bean-deployer_2:bean/jboss_bean-deployer_2:constructor/jboss_bean-deployer_2:parameter/jboss_bean-deployer_2:set/jboss_bean-deployer_2:bean[jboss_bean-deployer_2:property='jboss.remoting:service=JMXConnectorServer,protocol=rmi']/jboss_bean-deployer_2:property[@name='port']
+JMX_RMI_Port_FILE=conf/bindingservice.beans/META-INF/bindings-jboss-beans.xml
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 2010-06-14
09:03:11 UTC (rev 22779)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.java 2010-06-14
10:16:28 UTC (rev 22780)
@@ -187,10 +187,12 @@
public static String EditorServerPortsDescription;
public static String EditorJNDIPort;
public static String EditorWebPort;
+ public static String EditorJMXRMIPort;
public static String EditorAutomaticallyDetectPort;
public static String EditorPortInvalid;
public static String EditorChangeJNDICommandName;
public static String EditorChangeWebCommandName;
+ public static String EditorChangeJMXRMICommandName;
public static String EditorChangeUsernameCommandName;
public static String EditorChangePasswordCommandName;
public static String EditorCPD_Value;
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 2010-06-14
09:03:11 UTC (rev 22779)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties 2010-06-14
10:16:28 UTC (rev 22780)
@@ -162,10 +162,12 @@
EditorServerPortsDescription=The ports entered here are which ports the tools\nwill poll
the server on. Changing these fields\nwill not change the ports the server itself listens
on.
EditorJNDIPort=JNDI Port
EditorWebPort=Web Port
+EditorJMXRMIPort=JMX RMI Port
EditorAutomaticallyDetectPort=Automatically detect
EditorPortInvalid=One or more ports have an invalid value. This may adversely affect the
tooling's ability to interact with the server.
EditorChangeJNDICommandName=Change JNDI Port Details
EditorChangeWebCommandName=Change Web Port Details
+EditorChangeJMXRMICommandName=Change JMX RMI Port Details
EditorChangeUsernameCommandName=Change Username
EditorChangePasswordCommandName=Change Password
EditorCPD_Value=Current Value
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/PortSection.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/PortSection.java 2010-06-14
09:03:11 UTC (rev 22779)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/PortSection.java 2010-06-14
10:16:28 UTC (rev 22780)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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.editor;
import java.util.ArrayList;
@@ -2,3 +12,2 @@
import java.util.Iterator;
-import java.util.List;
@@ -38,6 +47,7 @@
import org.jboss.ide.eclipse.as.core.extensions.descriptors.XPathCategory;
import org.jboss.ide.eclipse.as.core.extensions.descriptors.XPathModel;
import org.jboss.ide.eclipse.as.core.extensions.descriptors.XPathQuery;
+import org.jboss.ide.eclipse.as.core.server.IJBoss6Server;
import org.jboss.ide.eclipse.as.core.server.IJBossServerConstants;
import org.jboss.ide.eclipse.as.core.server.internal.ServerAttributeHelper;
import org.jboss.ide.eclipse.as.ui.JBossServerUIPlugin;
@@ -57,21 +67,35 @@
public void init(IEditorSite site, IEditorInput input) {
super.init(site, input);
helper = new ServerAttributeHelper(server.getOriginal(), server);
+ String serverTypeId = server.getServerType().getId();
if (sectionList.size() <= 0) {
IExtensionRegistry registry = Platform.getExtensionRegistry();
IConfigurationElement[] cf = registry.getConfigurationElementsFor(
JBossServerUIPlugin.PLUGIN_ID, "ServerEditorPortSection"); //$NON-NLS-1$
for (int i = 0; i < cf.length; i++) {
try {
- Object o = cf[i].createExecutableExtension("class"); //$NON-NLS-1$
- if (o != null && o instanceof IPortEditorExtension)
- sectionList.add((IPortEditorExtension) o);
+ String approvedTypes = cf[i].getAttribute("serverIds"); //$NON-NLS-1$
+ if( serverTypeMatches(serverTypeId, approvedTypes)) {
+ Object o = cf[i].createExecutableExtension("class"); //$NON-NLS-1$
+ if (o != null && o instanceof IPortEditorExtension)
+ sectionList.add((IPortEditorExtension) o);
+ }
} catch (CoreException ce) { /* ignore */
}
}
}
}
+ protected boolean serverTypeMatches(String serverType, String approvedTypes) {
+ if( approvedTypes == null || approvedTypes.equals(""))
+ return true;
+ String[] split = approvedTypes.split(",");
+ for( int i = 0; i < split.length; i++ )
+ if( split[i].equals(serverType))
+ return true;
+ return false;
+ }
+
public void createSection(Composite parent) {
super.createSection(parent);
createUI(parent);
@@ -90,22 +114,9 @@
IJBossServerConstants.JNDI_PORT_DETECT_XPATH,
IJBossServerConstants.JNDI_PORT_DETECT,
IJBossServerConstants.JNDI_PORT,
- IJBossServerConstants.JNDI_PORT_DEFAULT_XPATH);
+ IJBossServerConstants.JNDI_PORT_DEFAULT_XPATH,
+ Messages.EditorChangeJNDICommandName);
}
- public ServerCommand getCommand() {
- return new SetPortCommand(helper.getWorkingCopy(), helper,
Messages.EditorChangeJNDICommandName,
- IJBossServerConstants.JNDI_PORT, IJBossServerConstants.JNDI_PORT_DETECT,
- IJBossServerConstants.JNDI_PORT_DETECT_XPATH,
IJBossServerConstants.JNDI_PORT_DEFAULT_XPATH,
- this);
- }
- protected ChangePortDialogInfo getDialogInfo() {
- ChangePortDialogInfo info = new ChangePortDialogInfo();
- info.port = Messages.EditorJNDIPort;
- info.defaultValue = IJBossServerConstants.JNDI_PORT_DEFAULT_XPATH;
- info.server = helper.getWorkingCopy().getOriginal();
- info.currentXPath = currentXPath;
- return info;
- }
}
public static class WebPortEditorExtension extends PortEditorExtension {
@@ -114,42 +125,42 @@
IJBossServerConstants.WEB_PORT_DETECT_XPATH,
IJBossServerConstants.WEB_PORT_DETECT,
IJBossServerConstants.WEB_PORT,
- IJBossServerConstants.WEB_PORT_DEFAULT_XPATH);
+ IJBossServerConstants.WEB_PORT_DEFAULT_XPATH,
+ Messages.EditorChangeWebCommandName);
}
-
- public ServerCommand getCommand() {
- return new SetPortCommand(helper.getWorkingCopy(), helper,
Messages.EditorChangeWebCommandName,
- IJBossServerConstants.WEB_PORT, IJBossServerConstants.WEB_PORT_DETECT,
- IJBossServerConstants.WEB_PORT_DETECT_XPATH,
IJBossServerConstants.WEB_PORT_DEFAULT_XPATH,
- this);
+ }
+
+ public static class JBoss6JMXRMIPortEditorExtension extends PortEditorExtension {
+ public JBoss6JMXRMIPortEditorExtension() {
+ super(Messages.EditorJMXRMIPort,
+ IJBoss6Server.JMX_RMI_PORT_DETECT_XPATH,
+ IJBoss6Server.JMX_RMI_PORT_DETECT,
+ IJBoss6Server.JMX_RMI_PORT,
+ IJBoss6Server.JMX_RMI_PORT_DEFAULT_XPATH,
+ Messages.EditorChangeJMXRMICommandName);
}
- protected ChangePortDialogInfo getDialogInfo() {
- ChangePortDialogInfo info = new ChangePortDialogInfo();
- info.port = Messages.EditorWebPort;
- info.defaultValue = IJBossServerConstants.WEB_PORT_DEFAULT_XPATH;
- info.server = helper.getWorkingCopy().getOriginal();
- info.currentXPath = currentXPath;
- return info;
- }
}
+
public static abstract class PortEditorExtension implements IPortEditorExtension {
protected Button detect;
protected Text text;
protected Label label;
protected Link link;
protected String labelText, currentXPathKey, detectXPathKey, overrideValueKey,
defaultXPath;
- protected String currentXPath;
+ protected String currentXPath, changeValueCommandName;
protected ServerAttributeHelper helper;
protected Listener listener;
protected PortSection section;
public PortEditorExtension(String labelText, String currentXPathKey,
- String detectXPathKey, String overrideValueKey, String defaultXPath) {
+ String detectXPathKey, String overrideValueKey, String defaultXPath,
+ String changeValueCommandName) {
this.labelText = labelText;
this.currentXPathKey = currentXPathKey;
this.detectXPathKey = detectXPathKey;
this.overrideValueKey = overrideValueKey;
this.defaultXPath = defaultXPath;
+ this.changeValueCommandName = changeValueCommandName;
}
public void setServerAttributeHelper(ServerAttributeHelper helper) {
this.helper = helper;
@@ -238,11 +249,18 @@
public ChangePortDialog getDialog() {
return new ChangePortDialog(section.getShell(), getDialogInfo());
}
- protected abstract ChangePortDialogInfo getDialogInfo();
-
- protected /* abstract */ ServerCommand getCommand() {
- return null;
+ public ServerCommand getCommand() {
+ return new SetPortCommand(helper.getWorkingCopy(), helper, changeValueCommandName,
+ overrideValueKey, detectXPathKey,currentXPathKey, defaultXPath, this);
}
+ protected ChangePortDialogInfo getDialogInfo() {
+ ChangePortDialogInfo info = new ChangePortDialogInfo();
+ info.port = labelText;
+ info.defaultValue = defaultXPath;
+ info.server = helper.getWorkingCopy().getOriginal();
+ info.currentXPath = currentXPath;
+ return info;
+ }
public String getValue() {
return text.getText();
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.properties
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.properties 2010-06-14 09:03:11 UTC
(rev 22779)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.properties 2010-06-14 10:16:28 UTC
(rev 22780)
@@ -22,3 +22,7 @@
NavigatorContent_ServersViewDefaultContent=Servers View Default Content
NavigatorContent_XMLConfiguration=XML Configuration
NavigatorContent_JMX=JMX
+
+AllJBossRuntimeTypes=org.jboss.ide.eclipse.as.runtime.32,org.jboss.ide.eclipse.as.runtime.40,org.jboss.ide.eclipse.as.runtime.42,org.jboss.ide.eclipse.as.runtime.50,org.jboss.ide.eclipse.as.runtime.51,org.jboss.ide.eclipse.as.runtime.60,org.jboss.ide.eclipse.as.runtime.eap.43,org.jboss.ide.eclipse.as.runtime.eap.50
+AllJBossServerTypes=org.jboss.ide.eclipse.as.32,org.jboss.ide.eclipse.as.40,org.jboss.ide.eclipse.as.42,org.jboss.ide.eclipse.as.50,org.jboss.ide.eclipse.as.51,org.jboss.ide.eclipse.as.60,org.jboss.ide.eclipse.as.eap.43,org.jboss.ide.eclipse.as.eap.50
+ServerTypesJBoss6OrHigher=org.jboss.ide.eclipse.as.60
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml 2010-06-14 09:03:11 UTC (rev
22779)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml 2010-06-14 10:16:28 UTC (rev
22780)
@@ -9,11 +9,11 @@
point="org.eclipse.wst.server.ui.serverImages">
<image
icon="$nl$/icons/jboss.gif"
-
typeIds="org.jboss.ide.eclipse.as.32,org.jboss.ide.eclipse.as.40,org.jboss.ide.eclipse.as.42,org.jboss.ide.eclipse.as.50,org.jboss.ide.eclipse.as.51,org.jboss.ide.eclipse.as.60,org.jboss.ide.eclipse.as.eap.43,org.jboss.ide.eclipse.as.eap.50"
+ typeIds="%AllJBossServerTypes"
id="org.jboss.ide.eclipse.as.ui.jbossIcon"/>
<image
icon="$nl$/icons/jboss.gif"
-
typeIds="org.jboss.ide.eclipse.as.runtime.32,org.jboss.ide.eclipse.as.runtime.40,org.jboss.ide.eclipse.as.runtime.42,org.jboss.ide.eclipse.as.runtime.50,org.jboss.ide.eclipse.as.runtime.51,org.jboss.ide.eclipse.as.runtime.60,org.jboss.ide.eclipse.as.runtime.eap.43,org.jboss.ide.eclipse.as.runtime.eap.50"
+ typeIds="%AllJBossRuntimeTypes"
id="org.jboss.ide.eclipse.as.ui.jbossIcon"/>
<image
@@ -35,7 +35,7 @@
<fragment
class="org.jboss.ide.eclipse.as.ui.wizards.JBossServerWizardFragment"
id="org.jboss.ide.eclipse.as.ui.jbossServerWizardFragment"
-
typeIds="org.jboss.ide.eclipse.as.32,org.jboss.ide.eclipse.as.40,org.jboss.ide.eclipse.as.42,org.jboss.ide.eclipse.as.50,org.jboss.ide.eclipse.as.51,org.jboss.ide.eclipse.as.60,org.jboss.ide.eclipse.as.eap.43,org.jboss.ide.eclipse.as.eap.50"/>
+ typeIds="%AllJBossServerTypes"/>
<fragment
class="org.jboss.ide.eclipse.as.ui.wizards.StrippedServerWizardFragment"
id="org.jboss.ide.eclipse.as.ui.strippedServerWizardFragment"
@@ -141,7 +141,7 @@
class="org.jboss.ide.eclipse.as.ui.editor.ModuleDeploymentPage"
id="org.jboss.ide.eclipse.as.ui.editor.deploymentPage"
name="Deployment"
- typeIds="org.jboss.ide.eclipse.as.systemCopyServer,
org.jboss.ide.eclipse.as.32,org.jboss.ide.eclipse.as.40,org.jboss.ide.eclipse.as.42,org.jboss.ide.eclipse.as.50,org.jboss.ide.eclipse.as.51,org.jboss.ide.eclipse.as.60,org.jboss.ide.eclipse.as.eap.43,org.jboss.ide.eclipse.as.eap.50">
+ typeIds="org.jboss.ide.eclipse.as.systemCopyServer,
%AllJBossServerTypes%">
</page>
</extension>
@@ -161,19 +161,19 @@
id="org.jboss.ide.eclipse.as.ui.editor.pollerSection"
insertionId="org.eclipse.wst.server.editor.overview.right"
order="10"
- typeIds="org.jboss.ide.eclipse.as.32, org.jboss.ide.eclipse.as.40,
org.jboss.ide.eclipse.as.42,
org.jboss.ide.eclipse.as.50,org.jboss.ide.eclipse.as.51,org.jboss.ide.eclipse.as.eap.43,org.jboss.ide.eclipse.as.eap.50"/>
+ typeIds="%AllJBossServerTypes"/>
<section
class="org.jboss.ide.eclipse.as.ui.editor.PortSection"
id="org.jboss.ide.eclipse.as.ui.editor.portSection"
insertionId="org.eclipse.wst.server.editor.overview.right"
order="11"
- typeIds="org.jboss.ide.eclipse.as.32, org.jboss.ide.eclipse.as.40,
org.jboss.ide.eclipse.as.42,
org.jboss.ide.eclipse.as.50,org.jboss.ide.eclipse.as.51,org.jboss.ide.eclipse.as.eap.43,org.jboss.ide.eclipse.as.eap.50"/>
+ typeIds="%AllJBossServerTypes"/>
<section
class="org.jboss.ide.eclipse.as.ui.editor.ServerPasswordSection"
id="org.jboss.ide.eclipse.as.ui.editor.passwordSection"
insertionId="org.eclipse.wst.server.editor.overview.left"
order="10"
-
typeIds="org.jboss.ide.eclipse.as.32,org.jboss.ide.eclipse.as.40,org.jboss.ide.eclipse.as.42,org.jboss.ide.eclipse.as.50,org.jboss.ide.eclipse.as.51,org.jboss.ide.eclipse.as.eap.43,org.jboss.ide.eclipse.as.eap.50"/>
+ typeIds="%AllJBossServerTypes"/>
</extension>
@@ -253,11 +253,17 @@
<extension
point="org.jboss.ide.eclipse.as.ui.ServerEditorPortSection">
<section
-
class="org.jboss.ide.eclipse.as.ui.editor.PortSection$JNDIPortEditorExtension">
+
class="org.jboss.ide.eclipse.as.ui.editor.PortSection$JNDIPortEditorExtension"
+ serverIds="%AllJBossServerTypes">
</section>
<section
-
class="org.jboss.ide.eclipse.as.ui.editor.PortSection$WebPortEditorExtension">
+
class="org.jboss.ide.eclipse.as.ui.editor.PortSection$WebPortEditorExtension"
+ serverIds="%AllJBossServerTypes">
</section>
+ <section
+
class="org.jboss.ide.eclipse.as.ui.editor.PortSection$JBoss6JMXRMIPortEditorExtension"
+ serverIds="%ServerTypesJBoss6OrHigher">
+ </section>
</extension>
@@ -569,7 +575,7 @@
<runtimeLocator
class="org.jboss.ide.eclipse.as.ui.wizards.JBossRuntimeLocator"
id="org.jboss.ide.eclipse.as.ui.wizards.jboss.runtimeLocator"
-
typeIds="org.jboss.ide.eclipse.as.32,org.jboss.ide.eclipse.as.40,org.jboss.ide.eclipse.as.42,org.jboss.ide.eclipse.as.50,org.jboss.ide.eclipse.as.51,org.jboss.ide.eclipse.as.60,org.jboss.ide.eclipse.as.eap.43,org.jboss.ide.eclipse.as.eap.50">
+ typeIds="%AllJBossServerTypes">
</runtimeLocator>
</extension>
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/schema/ServerEditorPortSection.exsd
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/schema/ServerEditorPortSection.exsd 2010-06-14
09:03:11 UTC (rev 22779)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/schema/ServerEditorPortSection.exsd 2010-06-14
10:16:28 UTC (rev 22780)
@@ -2,9 +2,9 @@
<!-- Schema file written by PDE -->
<schema targetNamespace="org.jboss.ide.eclipse.as.ui"
xmlns="http://www.w3.org/2001/XMLSchema">
<annotation>
- <appinfo>
+ <appInfo>
<meta.schema plugin="org.jboss.ide.eclipse.as.ui"
id="ServerEditorPortSection"
name="org.jboss.ide.as.ui.editor.portSection"/>
- </appinfo>
+ </appInfo>
<documentation>
[Enter description of this extension point.]
</documentation>
@@ -12,9 +12,9 @@
<element name="extension">
<annotation>
- <appinfo>
+ <appInfo>
<meta.element />
- </appinfo>
+ </appInfo>
</annotation>
<complexType>
<sequence minOccurs="0" maxOccurs="unbounded">
@@ -39,9 +39,9 @@
<documentation>
</documentation>
- <appinfo>
+ <appInfo>
<meta.attribute translatable="true"/>
- </appinfo>
+ </appInfo>
</annotation>
</attribute>
</complexType>
@@ -54,45 +54,52 @@
<documentation>
</documentation>
- <appinfo>
+ <appInfo>
<meta.attribute kind="java"
basedOn=":org.jboss.ide.eclipse.as.ui.editor.PortSection$IPortEditorExtension"/>
- </appinfo>
+ </appInfo>
</annotation>
</attribute>
+ <attribute name="serverIds" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
</complexType>
</element>
<annotation>
- <appinfo>
+ <appInfo>
<meta.section type="since"/>
- </appinfo>
+ </appInfo>
<documentation>
[Enter the first release in which this extension point appears.]
</documentation>
</annotation>
<annotation>
- <appinfo>
+ <appInfo>
<meta.section type="examples"/>
- </appinfo>
+ </appInfo>
<documentation>
[Enter extension point usage example here.]
</documentation>
</annotation>
<annotation>
- <appinfo>
+ <appInfo>
<meta.section type="apiinfo"/>
- </appinfo>
+ </appInfo>
<documentation>
[Enter API information here.]
</documentation>
</annotation>
<annotation>
- <appinfo>
+ <appInfo>
<meta.section type="implementation"/>
- </appinfo>
+ </appInfo>
<documentation>
[Enter information about supplied implementation of this extension point.]
</documentation>