JBoss Tools SVN: r32375 - trunk/ws/features/org.jboss.tools.ws.feature.
by jbosstools-commits@lists.jboss.org
Author: bfitzpat
Date: 2011-06-27 13:37:32 -0400 (Mon, 27 Jun 2011)
New Revision: 32375
Modified:
trunk/ws/features/org.jboss.tools.ws.feature/feature.xml
trunk/ws/features/org.jboss.tools.ws.feature/pom.xml
Log:
JBIDE-9180 - updating WS feature version from 1.1.0 to 1.2.2 to match the highest versioned plug-in
Modified: trunk/ws/features/org.jboss.tools.ws.feature/feature.xml
===================================================================
--- trunk/ws/features/org.jboss.tools.ws.feature/feature.xml 2011-06-27 13:31:25 UTC (rev 32374)
+++ trunk/ws/features/org.jboss.tools.ws.feature/feature.xml 2011-06-27 17:37:32 UTC (rev 32375)
@@ -1,49 +1,49 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.jboss.tools.ws.feature"
- label="%featureName"
- version="1.1.0.qualifier"
- provider-name="%providerName"
- plugin="org.jboss.tools.ws.ui">
-
- <description>
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <plugin
- id="org.jboss.tools.ws.core"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.jboss.tools.ws.creation.core"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.jboss.tools.ws.creation.ui"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.jboss.tools.ws.ui"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
-</feature>
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.jboss.tools.ws.feature"
+ label="%featureName"
+ version="1.2.2.qualifier"
+ provider-name="%providerName"
+ plugin="org.jboss.tools.ws.ui">
+
+ <description>
+ %description
+ </description>
+
+ <copyright>
+ %copyright
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <plugin
+ id="org.jboss.tools.ws.core"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.jboss.tools.ws.creation.core"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.jboss.tools.ws.creation.ui"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.jboss.tools.ws.ui"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
Modified: trunk/ws/features/org.jboss.tools.ws.feature/pom.xml
===================================================================
--- trunk/ws/features/org.jboss.tools.ws.feature/pom.xml 2011-06-27 13:31:25 UTC (rev 32374)
+++ trunk/ws/features/org.jboss.tools.ws.feature/pom.xml 2011-06-27 17:37:32 UTC (rev 32375)
@@ -9,6 +9,6 @@
</parent>
<groupId>org.jboss.tools.ws.features</groupId>
<artifactId>org.jboss.tools.ws.feature</artifactId>
- <version>1.1.0-SNAPSHOT</version>
+ <version>1.2.2-SNAPSHOT</version>
<packaging>eclipse-feature</packaging>
</project>
\ No newline at end of file
14 years, 9 months
JBoss Tools SVN: r32374 - trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/server.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2011-06-27 09:31:25 -0400 (Mon, 27 Jun 2011)
New Revision: 32374
Modified:
trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/server/MockTests.java
Log:
Mock Tests adding a trim for accuracy
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/server/MockTests.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/server/MockTests.java 2011-06-27 13:20:15 UTC (rev 32373)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/server/MockTests.java 2011-06-27 13:31:25 UTC (rev 32374)
@@ -88,8 +88,8 @@
LocalJBossServerRuntime rt = (LocalJBossServerRuntime)server.getRuntime().loadAdapter(LocalJBossServerRuntime.class, new NullProgressMonitor());
String defaultArgs = rt.getDefaultRunArgs().replace("\"", "");
String defaultVMArgs = rt.getDefaultRunVMArgs().replace("\"", "");
- assertTrue(command.replace("\"", "").contains(defaultArgs));
- assertTrue(command.replace("\"", "").contains(defaultVMArgs));
+ assertTrue(command.replace("\"", "").contains(defaultArgs.trim()));
+ assertTrue(command.replace("\"", "").contains(defaultVMArgs.trim()));
return fixed;
}
14 years, 9 months
JBoss Tools SVN: r32373 - in trunk/vpe/plugins/org.jboss.tools.vpe: META-INF and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2011-06-27 09:20:15 -0400 (Mon, 27 Jun 2011)
New Revision: 32373
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/META-INF/MANIFEST.MF
trunk/vpe/plugins/org.jboss.tools.vpe/plugin.xml
Log:
https://issues.jboss.org/browse/JBIDE-9096 : Enable JSP Editor -> context menu for source -> "Add to Snippets"
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/META-INF/MANIFEST.MF
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/META-INF/MANIFEST.MF 2011-06-27 09:56:20 UTC (rev 32372)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/META-INF/MANIFEST.MF 2011-06-27 13:20:15 UTC (rev 32373)
@@ -60,6 +60,7 @@
org.eclipse.core.expressions,
org.jboss.tools.common.model.ui,
org.eclipse.wst.xml.xpath.core,
- org.jboss.tools.jst.css;bundle-version="3.2.0"
+ org.jboss.tools.jst.css;bundle-version="3.2.0",
+ org.eclipse.wst.common.snippets
Bundle-Version: 3.3.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/plugin.xml
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/plugin.xml 2011-06-27 09:56:20 UTC (rev 32372)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/plugin.xml 2011-06-27 13:20:15 UTC (rev 32373)
@@ -322,4 +322,15 @@
type="java.lang.Object">
</propertyTester>
</extension>
+
+ <extension point="org.eclipse.wst.common.snippets.SnippetProvider">
+ <provider
+ class="org.eclipse.wst.common.snippets.ui.TextSnippetProvider"
+ priority="100">
+ <enablement>
+ <instanceof value="org.jboss.tools.vpe.editor.VpeEditorPart"/>
+ </enablement>
+ </provider>
+ </extension>
+
</plugin>
14 years, 9 months
JBoss Tools SVN: r32372 - trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2011-06-27 05:56:20 -0400 (Mon, 27 Jun 2011)
New Revision: 32372
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEHostShellModel.java
Log:
JBIDE-8421 - removal of extra lines
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEHostShellModel.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEHostShellModel.java 2011-06-27 09:48:30 UTC (rev 32371)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEHostShellModel.java 2011-06-27 09:56:20 UTC (rev 32372)
@@ -96,12 +96,6 @@
try {
IHostShell hs = service.runCommand(initialWorkingDirectory,
command, environment, monitor);
- hs.getStandardOutputReader().addOutputListener(new IHostShellOutputListener( ) {
- public void shellOutputChanged(IHostShellChangeEvent event) {
- System.out.println(event.getLines().length);
- System.out.println(event.getLines());
- }
- });
listener = new IHostShellOutputListener() {
public void shellOutputChanged(IHostShellChangeEvent event) {
IHostOutput[] lines = event.getLines();
14 years, 9 months
JBoss Tools SVN: r32371 - in trunk/as/plugins: org.jboss.ide.eclipse.as.rse.ui/META-INF and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2011-06-27 05:48:30 -0400 (Mon, 27 Jun 2011)
New Revision: 32371
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/src/org/jboss/ide/eclipse/as/rse/ui/JBASConsoleWriter.java
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEHostShellModel.java
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/META-INF/MANIFEST.MF
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/src/org/jboss/ide/eclipse/as/rse/ui/RSEUIPlugin.java
Log:
JBIDE-8421 - initial implementation of adding console connection for RSE servers
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEHostShellModel.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEHostShellModel.java 2011-06-27 09:45:56 UTC (rev 32370)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEHostShellModel.java 2011-06-27 09:48:30 UTC (rev 32371)
@@ -11,7 +11,9 @@
******************************************************************************/
package org.jboss.ide.eclipse.as.rse.core;
+import java.util.ArrayList;
import java.util.HashMap;
+import java.util.Iterator;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -22,7 +24,10 @@
import org.eclipse.rse.core.model.IHost;
import org.eclipse.rse.core.subsystems.ISubSystem;
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
+import org.eclipse.rse.services.shells.IHostOutput;
import org.eclipse.rse.services.shells.IHostShell;
+import org.eclipse.rse.services.shells.IHostShellChangeEvent;
+import org.eclipse.rse.services.shells.IHostShellOutputListener;
import org.eclipse.rse.services.shells.IShellService;
import org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem.IShellServiceSubSystem;
import org.eclipse.wst.server.core.IServer;
@@ -39,13 +44,24 @@
return instance;
}
-
private HashMap<String, ServerShellModel> map =
new HashMap<String, ServerShellModel>();
RSEHostShellModel() {
}
+ public interface IJBASHostShellListener {
+ public void writeToShell(String serverId, String[] lines);
+ }
+
+ private ArrayList<IJBASHostShellListener> listeners = new ArrayList<IJBASHostShellListener>();
+ public void addHostShellListener(IJBASHostShellListener listener) {
+ listeners.add(listener);
+ }
+ public void removeHostShellListener(IJBASHostShellListener listener) {
+ listeners.remove(listener);
+ }
+
public ServerShellModel getModel(IServer server) {
if( map.get(server.getId()) == null ) {
map.put(server.getId(), new ServerShellModel(server.getId()));
@@ -57,6 +73,7 @@
private String serverId;
private IHostShell startupShell;
private IHostShell singleUseShell;
+ private IHostShellOutputListener listener;
public ServerShellModel(String id) {
this.serverId = id;
}
@@ -79,7 +96,24 @@
try {
IHostShell hs = service.runCommand(initialWorkingDirectory,
command, environment, monitor);
+ hs.getStandardOutputReader().addOutputListener(new IHostShellOutputListener( ) {
+ public void shellOutputChanged(IHostShellChangeEvent event) {
+ System.out.println(event.getLines().length);
+ System.out.println(event.getLines());
+ }
+ });
+ listener = new IHostShellOutputListener() {
+ public void shellOutputChanged(IHostShellChangeEvent event) {
+ IHostOutput[] lines = event.getLines();
+ String[] lines2 = new String[lines.length];
+ for(int i = 0; i < lines.length; i++ ) {
+ lines2[i] = lines[i].getString();
+ }
+ writeToConsole(lines2);
+ }
+ };
startupShell = hs;
+ startupShell.addOutputListener(listener);
return hs;
} catch(RuntimeException re) {
throw new CoreException(new Status(IStatus.ERROR, org.jboss.ide.eclipse.as.rse.core.RSECorePlugin.PLUGIN_ID,
@@ -87,6 +121,12 @@
}
}
+ protected void writeToConsole(String[] lines) {
+ Iterator<IJBASHostShellListener> i = RSEHostShellModel.getInstance().listeners.iterator();
+ while(i.hasNext())
+ i.next().writeToShell(serverId, lines);
+ }
+
public void executeRemoteCommand(
String initialWorkingDirectory, String command,
String[] environment, IProgressMonitor monitor)
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/META-INF/MANIFEST.MF 2011-06-27 09:45:56 UTC (rev 32370)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/META-INF/MANIFEST.MF 2011-06-27 09:48:30 UTC (rev 32371)
@@ -31,7 +31,8 @@
org.eclipse.rse.subsystems.shells.dstore;bundle-version="2.1.300",
org.eclipse.rse.subsystems.shells.local;bundle-version="2.1.300",
org.eclipse.rse.subsystems.shells.ssh;bundle-version="2.1.300",
- org.eclipse.rse.subsystems.shells.telnet;bundle-version="1.2.200"
+ org.eclipse.rse.subsystems.shells.telnet;bundle-version="1.2.200",
+ org.eclipse.ui.console;bundle-version="3.5.100"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-Localization: plugin
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/src/org/jboss/ide/eclipse/as/rse/ui/JBASConsoleWriter.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/src/org/jboss/ide/eclipse/as/rse/ui/JBASConsoleWriter.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/src/org/jboss/ide/eclipse/as/rse/ui/JBASConsoleWriter.java 2011-06-27 09:48:30 UTC (rev 32371)
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * 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.rse.ui;
+
+import org.eclipse.ui.console.ConsolePlugin;
+import org.eclipse.ui.console.IConsole;
+import org.eclipse.ui.console.IConsoleManager;
+import org.eclipse.ui.console.MessageConsole;
+import org.eclipse.ui.console.MessageConsoleStream;
+import org.jboss.ide.eclipse.as.rse.core.RSEHostShellModel.IJBASHostShellListener;
+
+public class JBASConsoleWriter implements IJBASHostShellListener {
+ public void writeToShell(String serverId, String[] lines) {
+ MessageConsole myConsole = findConsole(serverId);
+ MessageConsoleStream out = myConsole.newMessageStream();
+ for( int i = 0; i < lines.length; i++ )
+ out.println(lines[i]);
+ }
+
+ private MessageConsole findConsole(String name) {
+ ConsolePlugin plugin = ConsolePlugin.getDefault();
+ IConsoleManager conMan = plugin.getConsoleManager();
+ IConsole[] existing = conMan.getConsoles();
+ for (int i = 0; i < existing.length; i++)
+ if (name.equals(existing[i].getName()))
+ return (MessageConsole) existing[i];
+ //no console found, so create a new one
+ MessageConsole myConsole = new MessageConsole(name, null);
+ conMan.addConsoles(new IConsole[]{myConsole});
+ return myConsole;
+ }
+
+}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/src/org/jboss/ide/eclipse/as/rse/ui/RSEUIPlugin.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/src/org/jboss/ide/eclipse/as/rse/ui/RSEUIPlugin.java 2011-06-27 09:45:56 UTC (rev 32370)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/src/org/jboss/ide/eclipse/as/rse/ui/RSEUIPlugin.java 2011-06-27 09:48:30 UTC (rev 32371)
@@ -1,5 +1,6 @@
package org.jboss.ide.eclipse.as.rse.ui;
+import org.jboss.ide.eclipse.as.rse.core.RSEHostShellModel;
import org.jboss.ide.eclipse.as.rse.core.RSEPublishMethod;
import org.jboss.ide.eclipse.as.ui.editor.DeploymentModuleOptionCompositeAssistant;
import org.jboss.ide.eclipse.as.ui.launch.JBoss7LaunchConfigurationTabGroup;
@@ -10,7 +11,8 @@
public class RSEUIPlugin implements BundleActivator {
private static BundleContext context;
-
+ private JBASConsoleWriter consoleWriter;
+
static BundleContext getContext() {
return context;
}
@@ -24,6 +26,8 @@
DeploymentModuleOptionCompositeAssistant.addMapping(RSEPublishMethod.RSE_ID, new RSEDeploymentPageCallback());
JBossLaunchConfigurationTabGroup.addTabProvider(new RSELaunchTabProvider());
JBoss7LaunchConfigurationTabGroup.addTabProvider(new RSELaunchTabProvider());
+ consoleWriter = new JBASConsoleWriter();
+ RSEHostShellModel.getInstance().addHostShellListener(consoleWriter);
}
/*
@@ -32,6 +36,7 @@
*/
public void stop(BundleContext bundleContext) throws Exception {
RSEUIPlugin.context = null;
+ RSEHostShellModel.getInstance().removeHostShellListener(consoleWriter);
}
}
14 years, 9 months
JBoss Tools SVN: r32370 - in trunk/forge: plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core and 6 other directories.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2011-06-27 05:45:56 -0400 (Mon, 27 Jun 2011)
New Revision: 32370
Added:
trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/preferences/
trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/preferences/ForgeInstallations.java
trunk/forge/tests/org.jboss.tools.forge.core.test/src/org/jboss/tools/forge/core/preferences/
trunk/forge/tests/org.jboss.tools.forge.core.test/src/org/jboss/tools/forge/core/preferences/ForgeInstallationsTest.java
Removed:
trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/process/ForgeInstallations.java
trunk/forge/tests/org.jboss.tools.forge.core.test/src/org/jboss/tools/forge/core/process/ForgeInstallationsTest.java
Modified:
trunk/forge/plugins/org.jboss.tools.forge.core/META-INF/MANIFEST.MF
trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/process/ForgeLaunchHelper.java
trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/process/ForgeRuntime.java
trunk/forge/tests/org.jboss.tools.forge.core.test/META-INF/MANIFEST.MF
trunk/forge/tests/org.jboss.tools.forge.core.test/src/org/jboss/tools/forge/core/process/ForgeLaunchHelperTest.java
trunk/forge/tests/org.jboss.tools.forge.core.test/src/org/jboss/tools/forge/core/process/ForgeRuntimeTest.java
Log:
remove the compilation errors in ForgeLaunchHelper
Modified: trunk/forge/plugins/org.jboss.tools.forge.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.core/META-INF/MANIFEST.MF 2011-06-27 08:45:46 UTC (rev 32369)
+++ trunk/forge/plugins/org.jboss.tools.forge.core/META-INF/MANIFEST.MF 2011-06-27 09:45:56 UTC (rev 32370)
@@ -9,5 +9,6 @@
org.eclipse.jdt.launching;bundle-version="3.6.0"
Bundle-ActivationPolicy: lazy
Export-Package: org.jboss.tools.forge.core,
+ org.jboss.tools.forge.core.preferences,
org.jboss.tools.forge.core.process
Bundle-Activator: org.jboss.tools.forge.core.ForgeCorePlugin
Added: trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/preferences/ForgeInstallations.java
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/preferences/ForgeInstallations.java (rev 0)
+++ trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/preferences/ForgeInstallations.java 2011-06-27 09:45:56 UTC (rev 32370)
@@ -0,0 +1,166 @@
+package org.jboss.tools.forge.core.preferences;
+
+import java.util.List;
+
+import org.jboss.tools.forge.core.process.ForgeRuntime;
+
+public class ForgeInstallations {
+
+ private static final String PREF_FORGE_INSTALLATIONS = "installations";
+
+ private static List<ForgeRuntime> installations = null;
+ private static ForgeRuntime defaultInstallation = null;
+
+ public static ForgeRuntime[] getInstallations() {
+// if (installations == null) {
+// initializeInstallations();
+// }
+ return (ForgeRuntime[])installations.toArray(new ForgeRuntime[installations.size()]);
+ }
+
+ public static ForgeRuntime getDefault() {
+// if (installations == null) {
+// initializeInstallations();
+// }
+ return defaultInstallation;
+ }
+
+// private static IEclipsePreferences getForgeCorePreferences() {
+// return InstanceScope.INSTANCE.getNode(ForgeCorePlugin.PLUGIN_ID);
+// }
+//
+// private static void initializeInstallations() {
+// String installPrefsXml = getForgeCorePreferences().get(PREF_FORGE_INSTALLATIONS, null);
+// if (installPrefsXml == null || "".equals(installPrefsXml)) {
+// createInitialInstallations();
+// installPrefsXml = getForgeCorePreferences().get(PREF_FORGE_INSTALLATIONS, null);
+// }
+// initializeFromXml(installPrefsXml);
+// }
+//
+// private static void initializeFromXml(String installPrefsXml) {
+// if (installPrefsXml == null) return;
+// DocumentBuilder documentBuilder = newDocumentBuilder();
+// if (documentBuilder == null) return;
+// InputStream inputStream = createInputStream(installPrefsXml);
+// if (inputStream == null) return;
+// installations = new ArrayList<ForgeRuntime>();
+// Document document = parseInstallations(documentBuilder, inputStream);
+// Element installationsElement = document.getDocumentElement();
+// String defaultInstallationName = installationsElement.getAttribute("default");
+// NodeList nodeList = installationsElement.getChildNodes();
+// for (int i = 0; i < nodeList.getLength(); i++) {
+// Node node = nodeList.item(i);
+// if (node.getNodeType() == Node.ELEMENT_NODE) {
+// Element element = (Element)node;
+// String name = element.getAttribute("name");
+// String location = element.getAttribute("location");
+// ForgeRuntime newInstallation = new ForgeRuntime(name, location);
+// installations.add(newInstallation);
+// if (name.equals(defaultInstallationName)) {
+// defaultInstallation = newInstallation;
+// }
+// }
+// }
+// }
+//
+// private static Document parseInstallations(DocumentBuilder documentBuilder, InputStream inputStream) {
+// Document result = null;
+// try {
+// result = documentBuilder.parse(inputStream);
+// } catch (SAXException e) {
+// ForgeUIPlugin.log(e);
+// } catch (IOException e) {
+// ForgeUIPlugin.log(e);
+// }
+// return result;
+// }
+//
+// private static InputStream createInputStream(String string) {
+// InputStream result = null;
+// try {
+// result = new BufferedInputStream(new ByteArrayInputStream(string.getBytes("UTF8")));
+// } catch (UnsupportedEncodingException e) {
+// ForgeUIPlugin.log(e);
+// }
+// return result;
+// }
+//
+// private static DocumentBuilder newDocumentBuilder() {
+// try {
+// return DocumentBuilderFactory.newInstance().newDocumentBuilder();
+// } catch (ParserConfigurationException e) {
+// ForgeUIPlugin.log(e);
+// return null;
+// }
+// }
+//
+// private static Document createEmptyDocument() {
+// DocumentBuilder documentBuilder = newDocumentBuilder();
+// if (documentBuilder == null) {
+// return null;
+// } else {
+// return documentBuilder.newDocument();
+// }
+// }
+//
+// private static String serializeDocument(Document doc) throws TransformerException, IOException {
+// ByteArrayOutputStream s = new ByteArrayOutputStream();
+// TransformerFactory factory = TransformerFactory.newInstance();
+// Transformer transformer = factory.newTransformer();
+// transformer.setOutputProperty(OutputKeys.METHOD, "xml");
+// transformer.setOutputProperty(OutputKeys.INDENT, "yes");
+// DOMSource source = new DOMSource(doc);
+// StreamResult outputTarget = new StreamResult(s);
+// transformer.transform(source, outputTarget);
+// return s.toString("UTF8");
+// }
+//
+// private static void createInitialInstallations() {
+// try {
+// File file = FileLocator.getBundleFile(ForgeUIPlugin.getDefault().getBundle());
+// defaultInstallation = new ForgeInstallation("embedded", file.getAbsolutePath());
+// installations = new ArrayList<ForgeInstallation>();
+// installations.add(defaultInstallation);
+// saveInstallations();
+// } catch (IOException e) {
+// ForgeUIPlugin.log(e);
+// }
+// }
+//
+// public static void setInstallations(ForgeInstallation[] installs, ForgeInstallation defaultInstall) {
+// installations.clear();
+// for (ForgeInstallation install : installs) {
+// installations.add(install);
+// }
+// defaultInstallation = defaultInstall;
+// saveInstallations();
+// }
+//
+// private static void saveInstallations() {
+// try {
+// String xml = serializeDocument(createInstallationsDocument());
+// ForgeUIPlugin.getDefault().getPreferenceStore().setValue(PREF_FORGE_INSTALLATIONS, xml);
+// } catch (IOException e) {
+// ForgeUIPlugin.log(e);
+// } catch (TransformerException e) {
+// ForgeUIPlugin.log(e);
+// }
+// }
+//
+// private static Document createInstallationsDocument() {
+// Document document = createEmptyDocument();
+// if (document == null) return null;
+// Element main = document.createElement("forgeInstallations");
+// document.appendChild(main);
+// for (ForgeInstallation installation : installations) {
+// Element element = document.createElement("installation");
+// element.setAttribute("name", installation.getName());
+// element.setAttribute("location", installation.getLocation());
+// main.appendChild(element);
+// }
+// main.setAttribute("default", defaultInstallation.getName());
+// return document;
+// }
+
+}
Deleted: trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/process/ForgeInstallations.java
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/process/ForgeInstallations.java 2011-06-27 08:45:46 UTC (rev 32369)
+++ trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/process/ForgeInstallations.java 2011-06-27 09:45:56 UTC (rev 32370)
@@ -1,5 +0,0 @@
-package org.jboss.tools.forge.core.process;
-
-public class ForgeInstallations {
-
-}
Modified: trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/process/ForgeLaunchHelper.java
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/process/ForgeLaunchHelper.java 2011-06-27 08:45:46 UTC (rev 32369)
+++ trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/process/ForgeLaunchHelper.java 2011-06-27 09:45:56 UTC (rev 32370)
@@ -144,10 +144,10 @@
return result;
}
- public static IProcess launch(ForgeRuntime runtime) {
+ public static IProcess launch(String name, String location) {
IProcess result = null;
- String launchConfigurationName = runtime.getName() + System.currentTimeMillis();
- List<String> classPath = createClassPath(runtime.getLocation());
+ String launchConfigurationName = name + System.currentTimeMillis();
+ List<String> classPath = createClassPath(location);
if (classPath != null) {
ILaunch launch = launch(launchConfigurationName, classPath);
removeLaunchConfiguration(launchConfigurationName);
Modified: trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/process/ForgeRuntime.java
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/process/ForgeRuntime.java 2011-06-27 08:45:46 UTC (rev 32369)
+++ trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/process/ForgeRuntime.java 2011-06-27 09:45:56 UTC (rev 32370)
@@ -1,39 +1,8 @@
package org.jboss.tools.forge.core.process;
-import java.beans.PropertyChangeSupport;
-
-import org.eclipse.debug.core.model.IProcess;
-
-public class ForgeRuntime {
+public interface ForgeRuntime {
- public static final String STATE_NOT_RUNNING = "org.jboss.tools.forge.notRunning";
- public static final String STATE_RUNNING = "org.jboss.tools.forge.running";
- public static final String STATE_STARTING = "org.jboss.tools.forge.starting";
- public static final String STATE_STOPPING = "org.jboss.tools.forge.stopping";
-
- private IProcess forgeProcess = null;
- private String runtimeState = STATE_NOT_RUNNING;
- private PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport(this);
-
- private String name;
- private String location;
-
- public ForgeRuntime(String name, String location) {
- this.name = name;
- this.location = location;
- }
-
- public void start() {
- if (!isTerminated()) return;
-
- }
-
- public void stop() {
- if (isTerminated()) return;
- }
-
- public boolean isTerminated() {
- return forgeProcess == null || forgeProcess.isTerminated();
- }
+ String getName();
+ String getLocation();
}
Modified: trunk/forge/tests/org.jboss.tools.forge.core.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/forge/tests/org.jboss.tools.forge.core.test/META-INF/MANIFEST.MF 2011-06-27 08:45:46 UTC (rev 32369)
+++ trunk/forge/tests/org.jboss.tools.forge.core.test/META-INF/MANIFEST.MF 2011-06-27 09:45:56 UTC (rev 32370)
@@ -8,4 +8,5 @@
Require-Bundle: org.junit;bundle-version="3.8.2",
org.eclipse.core.runtime;bundle-version="3.7.0",
org.jboss.tools.forge.core;bundle-version="1.0.0",
- org.eclipse.debug.core;bundle-version="3.7.0"
+ org.eclipse.debug.core;bundle-version="3.7.0",
+ org.eclipse.ui.workbench;bundle-version="3.7.0"
Added: trunk/forge/tests/org.jboss.tools.forge.core.test/src/org/jboss/tools/forge/core/preferences/ForgeInstallationsTest.java
===================================================================
--- trunk/forge/tests/org.jboss.tools.forge.core.test/src/org/jboss/tools/forge/core/preferences/ForgeInstallationsTest.java (rev 0)
+++ trunk/forge/tests/org.jboss.tools.forge.core.test/src/org/jboss/tools/forge/core/preferences/ForgeInstallationsTest.java 2011-06-27 09:45:56 UTC (rev 32370)
@@ -0,0 +1,34 @@
+package org.jboss.tools.forge.core.preferences;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import java.io.IOException;
+
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.Platform;
+import org.jboss.tools.forge.core.process.ForgeRuntime;
+import org.junit.Test;
+
+public class ForgeInstallationsTest {
+
+ private static String defaultForgeLocation = null;
+
+ static {
+ try {
+ defaultForgeLocation = FileLocator.getBundleFile(Platform.getBundle("org.jboss.tools.forge.runtime")).getAbsolutePath();
+ } catch (IOException e) {
+ // ignore
+ }
+
+ }
+
+ @Test
+ public void testGetDefault() {
+ ForgeRuntime forgeRuntime = ForgeInstallations.getDefault();
+ assertNotNull(forgeRuntime);
+ assertEquals("embedded", forgeRuntime.getName());
+ assertEquals(defaultForgeLocation, forgeRuntime.getLocation());
+ }
+
+}
Deleted: trunk/forge/tests/org.jboss.tools.forge.core.test/src/org/jboss/tools/forge/core/process/ForgeInstallationsTest.java
===================================================================
--- trunk/forge/tests/org.jboss.tools.forge.core.test/src/org/jboss/tools/forge/core/process/ForgeInstallationsTest.java 2011-06-27 08:45:46 UTC (rev 32369)
+++ trunk/forge/tests/org.jboss.tools.forge.core.test/src/org/jboss/tools/forge/core/process/ForgeInstallationsTest.java 2011-06-27 09:45:56 UTC (rev 32370)
@@ -1,7 +0,0 @@
-package org.jboss.tools.forge.core.process;
-
-import junit.framework.TestCase;
-
-public class ForgeInstallationsTest extends TestCase {
-
-}
Modified: trunk/forge/tests/org.jboss.tools.forge.core.test/src/org/jboss/tools/forge/core/process/ForgeLaunchHelperTest.java
===================================================================
--- trunk/forge/tests/org.jboss.tools.forge.core.test/src/org/jboss/tools/forge/core/process/ForgeLaunchHelperTest.java 2011-06-27 08:45:46 UTC (rev 32369)
+++ trunk/forge/tests/org.jboss.tools.forge.core.test/src/org/jboss/tools/forge/core/process/ForgeLaunchHelperTest.java 2011-06-27 09:45:56 UTC (rev 32370)
@@ -19,12 +19,20 @@
public class ForgeLaunchHelperTest {
+ private static String TEST_LOCATION;
+
private IProcess forgeProcess = null;
- private ForgeRuntime forgeRuntime = null;
+
+ static {
+ try {
+ TEST_LOCATION = FileLocator.getBundleFile(Platform.getBundle("org.jboss.tools.forge.runtime")).getAbsolutePath();
+ } catch (IOException e) {
+ TEST_LOCATION = null;
+ }
+ }
@Before
public void setUp() throws Exception {
- forgeRuntime = new TestRuntime();
forgeProcess = null;
}
@@ -36,7 +44,6 @@
} catch (DebugException e) {}
}
forgeProcess = null;
- forgeRuntime = null;
}
@Test
@@ -44,7 +51,7 @@
new UIJob("testLaunch") {
public IStatus runInUIThread(IProgressMonitor monitor) {
try {
- forgeProcess = ForgeLaunchHelper.launch(forgeRuntime);
+ forgeProcess = ForgeLaunchHelper.launch("test", TEST_LOCATION);
assertNotNull(forgeProcess);
assertFalse(forgeProcess.isTerminated());
} catch (RuntimeException e) {
@@ -56,17 +63,4 @@
}.schedule();
}
- private class TestRuntime extends ForgeRuntime {
- public String getName() {
- return "test";
- }
- public String getLocation() {
- try {
- return FileLocator.getBundleFile(Platform.getBundle("org.jboss.tools.forge.runtime")).getAbsolutePath();
- } catch (IOException e) {
- return null;
- }
- }
- }
-
}
Modified: trunk/forge/tests/org.jboss.tools.forge.core.test/src/org/jboss/tools/forge/core/process/ForgeRuntimeTest.java
===================================================================
--- trunk/forge/tests/org.jboss.tools.forge.core.test/src/org/jboss/tools/forge/core/process/ForgeRuntimeTest.java 2011-06-27 08:45:46 UTC (rev 32369)
+++ trunk/forge/tests/org.jboss.tools.forge.core.test/src/org/jboss/tools/forge/core/process/ForgeRuntimeTest.java 2011-06-27 09:45:56 UTC (rev 32370)
@@ -1,29 +1,27 @@
package org.jboss.tools.forge.core.process;
-import junit.framework.TestCase;
+import static org.junit.Assert.fail;
-import org.eclipse.core.runtime.Platform;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
-public class ForgeRuntimeTest extends TestCase {
+public class ForgeRuntimeTest {
- private ForgeRuntime forgeRuntime;
-
- protected void setUp() {
- String location = Platform.getBundle("org.jboss.tools.forge.runtime").getLocation();
- location = location.substring("reference:file:".length());
- forgeRuntime = new ForgeRuntime("forge-test", location);
+ private ForgeRuntime forgeRuntime = null;
+
+ @Before
+ public void setUp() throws Exception {
+// forgeRuntime = new ForgeRuntime("test", )
}
-
+
+ @After
+ public void tearDown() throws Exception {
+ }
+
+ @Test
public void testStartStop() {
- assertTrue(forgeRuntime.isTerminated());
- forgeRuntime.start();
- assertFalse(forgeRuntime.isTerminated());
- forgeRuntime.stop();
- assertTrue(forgeRuntime.isTerminated());
+ fail("Not yet implemented");
}
-
- protected void tearDown() {
- forgeRuntime = null;
- }
}
14 years, 9 months
JBoss Tools SVN: r32369 - trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-06-27 04:45:46 -0400 (Mon, 27 Jun 2011)
New Revision: 32369
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/LocalJBossServerStartupLaunchUtil.java
Log:
[JBIDE-9215] fixed missing setting of endorsed dir
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/LocalJBossServerStartupLaunchUtil.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/LocalJBossServerStartupLaunchUtil.java 2011-06-27 06:31:37 UTC (rev 32368)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/LocalJBossServerStartupLaunchUtil.java 2011-06-27 08:45:46 UTC (rev 32369)
@@ -123,7 +123,7 @@
private void updateVMArgs(ILaunchConfigurationWorkingCopy wc, IJBossServerRuntime runtime) throws CoreException {
String vmArgs = wc.getAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, ""); //$NON-NLS-1$
- updateEndorsedDir(vmArgs, runtime);
+ vmArgs = updateEndorsedDir(vmArgs, runtime);
wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, vmArgs.trim());
}
@@ -137,8 +137,8 @@
wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, args.trim());
}
- private void updateEndorsedDir(String vmArgs, IJBossServerRuntime runtime) {
- vmArgs = ArgsUtil.setArg(vmArgs, null,
+ private String updateEndorsedDir(String vmArgs, IJBossServerRuntime runtime) {
+ return ArgsUtil.setArg(vmArgs, null,
IJBossRuntimeConstants.SYSPROP + IJBossRuntimeConstants.ENDORSED_DIRS,
runtime.getRuntime().getLocation().append(
IJBossRuntimeResourceConstants.LIB).append(
14 years, 9 months
JBoss Tools SVN: r32368 - trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/project/facet.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2011-06-27 02:31:37 -0400 (Mon, 27 Jun 2011)
New Revision: 32368
Modified:
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/project/facet/JBossWSRuntimeConfigBlock.java
Log:
JBIDE-7141: modify the layout data for ws facet page
Modified: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/project/facet/JBossWSRuntimeConfigBlock.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/project/facet/JBossWSRuntimeConfigBlock.java 2011-06-27 05:26:07 UTC (rev 32367)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/project/facet/JBossWSRuntimeConfigBlock.java 2011-06-27 06:31:37 UTC (rev 32368)
@@ -143,7 +143,7 @@
gd.horizontalSpan = 3;
btnDeploy.setLayoutData(gd);
- Label[] texts = JBossWSUIUtils.createWSRuntimeDetailsGroup(composite, 2);
+ Label[] texts = JBossWSUIUtils.createWSRuntimeDetailsGroup(composite, 3);
impl = texts[0];
vDetail = texts[1];
14 years, 9 months
JBoss Tools SVN: r32367 - in trunk/ws/plugins: org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2011-06-27 01:26:07 -0400 (Mon, 27 Jun 2011)
New Revision: 32367
Added:
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/WSRuntimeSelectionChangedListener.java
Modified:
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/classpath/JBossWSRuntime.java
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/classpath/JBossWSRuntimeListConverter.java
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JBossWSUI.properties
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JBossWSUIMessages.java
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/JBossWSRuntimeListFieldEditor.java
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/JBossWSRuntimePreferencePage.java
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/project/facet/JBossWSRuntimeConfigBlock.java
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/utils/JBossWSUIUtils.java
Log:
JBIDE-7141: add the details of web serivce runtime implemetation and version
Modified: trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/classpath/JBossWSRuntime.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/classpath/JBossWSRuntime.java 2011-06-27 03:22:15 UTC (rev 32366)
+++ trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/classpath/JBossWSRuntime.java 2011-06-27 05:26:07 UTC (rev 32367)
@@ -31,6 +31,9 @@
private boolean userConfigClasspath;
+ private String impl;
+ private String versionDetail;
+
/**
* Default constructor
*/
@@ -119,5 +122,23 @@
public void setVersion(String version) {
this.version = version;
}
+
+
+ public String getImpl() {
+ return impl;
+ }
+ public void setImpl(String impl) {
+ this.impl = impl;
+ }
+
+ public String getVersionDetail() {
+ return versionDetail;
+ }
+
+ public void setVersionDetail(String versionDetail) {
+ this.versionDetail = versionDetail;
+ }
+
+
}
Modified: trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/classpath/JBossWSRuntimeListConverter.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/classpath/JBossWSRuntimeListConverter.java 2011-06-27 03:22:15 UTC (rev 32366)
+++ trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/classpath/JBossWSRuntimeListConverter.java 2011-06-27 05:26:07 UTC (rev 32367)
@@ -29,6 +29,8 @@
private static final String NAME = "name"; //$NON-NLS-1$
private static final String USER_CONFIG_CLASSPATH = "userConfig"; //$NON-NLS-1$
private static final String LIBRARY = "libraries"; //$NON-NLS-1$
+ private static final String IMPL= "impl"; //$NON-NLS-1$
+ private static final String VDETAIL = "vdetail"; //$NON-NLS-1$
/**
* Load String to JBossWSRuntime map from String
@@ -63,12 +65,16 @@
rt.setVersion(value);
} else if (DEFAULT.equals(name)) {
rt.setDefault(Boolean.parseBoolean(value));
- }else if(USER_CONFIG_CLASSPATH.equals(name)){
+ } else if (USER_CONFIG_CLASSPATH.equals(name)){
rt.setUserConfigClasspath(Boolean.parseBoolean(value));
- }else if(LIBRARY.equals(name)){
+ } else if (LIBRARY.equals(name)){
if(value != null && !EMPTY_STRING.equals(value)){
rt.setLibraries(getLibrariesFromString(value));
}
+ } else if (IMPL.equals(name)) {
+ rt.setImpl(value);
+ } else if (VDETAIL.equals(name)) {
+ rt.setVersionDetail(value);
}
}
@@ -129,6 +135,10 @@
buffer.append(runtimes[i].isDefault());
buffer.append(FIELD_SEPARATOR).append(USER_CONFIG_CLASSPATH).append(FIELD_SEPARATOR);
buffer.append(runtimes[i].isUserConfigClasspath());
+ buffer.append(FIELD_SEPARATOR).append(IMPL).append(FIELD_SEPARATOR);
+ buffer.append(runtimes[i].getImpl());
+ buffer.append(FIELD_SEPARATOR).append(VDETAIL).append(FIELD_SEPARATOR);
+ buffer.append(runtimes[i].getVersionDetail());
buffer.append(FIELD_SEPARATOR).append(LIBRARY).append(FIELD_SEPARATOR);
buffer.append(convertListToString(runtimes[i].getLibraries()));
if (i != runtimes.length - 1) {
Modified: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JBossWSUI.properties
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JBossWSUI.properties 2011-06-27 03:22:15 UTC (rev 32366)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JBossWSUI.properties 2011-06-27 05:26:07 UTC (rev 32367)
@@ -34,6 +34,9 @@
JBossWS_Runtime_List_Field_Editor_Name2=Name:
JBossWS_Runtime_Check_Field_Default_Classpath=Customize JBoss Web Service runtime jars
JBossWS_Preference_Page_Runtimes=JBossWS Runtimes
+Runtime_Details=Runtime Details
+Runtime_Details_Impl=Implementation:
+Runtime_Details_Version=Version:
JBossWSLibraryListFieldEditor_ActionAdd=&Add
JBossWSLibraryListFieldEditor_ActionRemove=&Remove
JBossWSLibraryListFieldEditor_LIBRARY_JARS=Library Jars
Modified: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JBossWSUIMessages.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JBossWSUIMessages.java 2011-06-27 03:22:15 UTC (rev 32366)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JBossWSUIMessages.java 2011-06-27 05:26:07 UTC (rev 32367)
@@ -66,6 +66,9 @@
public static String JBossWS_Runtime_List_Field_Editor_Name2;
public static String JBossWS_Runtime_Check_Field_Default_Classpath;
public static String JBossWS_Preference_Page_Runtimes;
+ public static String Runtime_Details;
+ public static String Runtime_Details_Impl;
+ public static String Runtime_Details_Version;
public static String JBossWSLibraryListFieldEditor_ActionAdd;
public static String JBossWSLibraryListFieldEditor_ActionRemove;
public static String JBossWSLibraryListFieldEditor_LIBRARY_JARS;
Modified: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/JBossWSRuntimeListFieldEditor.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/JBossWSRuntimeListFieldEditor.java 2011-06-27 03:22:15 UTC (rev 32366)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/JBossWSRuntimeListFieldEditor.java 2011-06-27 05:26:07 UTC (rev 32367)
@@ -54,6 +54,7 @@
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.DirectoryDialog;
import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.wst.common.project.facet.core.IProjectFacet;
import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
@@ -62,10 +63,10 @@
import org.jboss.tools.common.ui.widget.editor.ButtonFieldEditor;
import org.jboss.tools.common.ui.widget.editor.IFieldEditor;
import org.jboss.tools.common.ui.widget.editor.IFieldEditorFactory;
-import org.jboss.tools.ws.ui.messages.JBossWSUIMessages;
-import org.jboss.tools.ws.ui.utils.JBossWSUIUtils;
import org.jboss.tools.ws.core.classpath.JBossWSRuntime;
import org.jboss.tools.ws.core.classpath.JBossWSRuntimeManager;
+import org.jboss.tools.ws.ui.messages.JBossWSUIMessages;
+import org.jboss.tools.ws.ui.utils.JBossWSUIUtils;
/**
* @author Grid Qian
@@ -210,8 +211,7 @@
TableColumn tc3 = new TableColumn(tableView.getTable(), SWT.LEFT);
tc3.setWidth(TC_VERSION_WIDTH);
- tc3
- .setText(JBossWSUIMessages.JBossWS_Runtime_List_Field_Editor_Version);
+ tc3.setText(JBossWSUIMessages.JBossWS_Runtime_List_Field_Editor_Version);
TableColumn tc4 = new TableColumn(tableView.getTable(), SWT.LEFT);
tc4.setWidth(TC_PATH_WIDTH);
@@ -420,28 +420,23 @@
List<JBossWSRuntime> value = null;
- IFieldEditor name = IFieldEditorFactory.INSTANCE.createTextEditor(
- SRT_NAME,
+ IFieldEditor name = IFieldEditorFactory.INSTANCE.createTextEditor(SRT_NAME,
JBossWSUIMessages.JBossWS_Runtime_List_Field_Editor_Name2, ""); //$NON-NLS-1$
- IFieldEditor version = IFieldEditorFactory.INSTANCE.createComboEditor(
- SRT_VERSION,
- JBossWSUIMessages.JBossWS_Runtime_List_Field_Editor_Version,
- getWSFacetVersions(), ""); //$NON-NLS-1$
+ IFieldEditor version = IFieldEditorFactory.INSTANCE.createComboEditor(SRT_VERSION,
+ JBossWSUIMessages.JBossWS_Runtime_List_Field_Editor_Version, getWSFacetVersions(), ""); //$NON-NLS-1$
- IFieldEditor homeDir = IFieldEditorFactory.INSTANCE
- .createBrowseFolderEditor(
- SRT_HOMEDIR,
- JBossWSUIMessages.JBossWS_Runtime_List_Field_Editor_Home_Folder,
- ""); //$NON-NLS-1$
+ IFieldEditor homeDir = IFieldEditorFactory.INSTANCE.createBrowseFolderEditor(SRT_HOMEDIR,
+ JBossWSUIMessages.JBossWS_Runtime_List_Field_Editor_Home_Folder,""); //$NON-NLS-1$
+
+ Label impl;
+ Label vDetail;
JBossWSRuntime current = null;
-
IFieldEditor jars = null;
public JBossWSRuntimeWizardPage(List<JBossWSRuntime> editedList) {
- super(
- JBossWSUIMessages.JBossWS_Runtime_List_Field_Editor_New_Runtime);
+ super(JBossWSUIMessages.JBossWS_Runtime_List_Field_Editor_New_Runtime);
setMessage(JBossWSUIMessages.JBossWS_Runtime_List_Field_Editor_Create_A_Runtime);
setTitle(JBossWSUIMessages.JBossWS_Runtime_List_Field_Editor_Runtime);
value = editedList;
@@ -450,8 +445,7 @@
/**
* Create Wizard page content
*
- * @param parent
- * Composite - parent composite
+ * @param parent Composite - parent composite
*/
public void createControl(Composite parent) {
parent.setLayout(new GridLayout(GL_PARENT_COLUMNS, false));
@@ -472,11 +466,18 @@
version.setValue(getWSFacetVersions().get(1));
homeDir.doFillIntoGrid(root);
homeDir.addPropertyChangeListener(this);
+
+ Label[] texts = JBossWSUIUtils.createWSRuntimeDetailsGroup(root, 3);
+ impl = texts[0];
+ vDetail = texts[1];
+ if (current != null) {
+ impl.setText(current.getImpl());
+ vDetail.setText(current.getVersionDetail());
+ }
jars = new JBossWSLibraryListFieldEditor("", "", current); //$NON-NLS-1$ //$NON-NLS-2$
jars.doFillIntoGrid(root);
-
-
+
jars.addPropertyChangeListener(this);
setPageComplete(false);
setControl(root);
@@ -486,20 +487,18 @@
* Process evt: setup default values based on JBossWS Home folder and
* validate user input
*
- * @param evt
- * PropertyChangeEvent describes changes in wizard
+ * @param evt PropertyChangeEvent describes changes in wizard
*/
public void propertyChange(java.beans.PropertyChangeEvent evt) {
if ("homeDir".equals(evt.getPropertyName())) { //$NON-NLS-1$
- if (name.getValueAsString() == null
- || "".equals(name.getValueAsString().trim()) //$NON-NLS-1$
+ if (name.getValueAsString() == null || "".equals(name.getValueAsString().trim()) //$NON-NLS-1$
|| this.getErrorMessage() != null) {
String homeDirName = homeDir.getValueAsString();
if (homeDirName != null && !"".equals(homeDirName.trim())) { //$NON-NLS-1$
File folder = new File(homeDirName);
homeDirName = folder.getName();
}
- name.setValue(homeDirName);
+ name.setValue(homeDirName);
}
}
@@ -510,8 +509,7 @@
return;
}
- if (!name.getValueAsString().matches(
- "[a-zA-Z_][a-zA-Z0-9_\\-\\. ]*")) { //$NON-NLS-1$
+ if (!name.getValueAsString().matches("[a-zA-Z_][a-zA-Z0-9_\\-\\. ]*")) { //$NON-NLS-1$
setErrorMessage(JBossWSUIMessages.Error_JBossWS_Runtime_List_Field_Editor_Runtime_Name_Is_Not_Correct);
setPageComplete(false);
return;
@@ -521,9 +519,7 @@
continue;
}
if (rt.getName().equals(name.getValueAsString())) {
- setErrorMessage(NLS
- .bind(
- JBossWSUIMessages.JBossWS_Runtime_List_Field_Editor_Runtime_Already_Exists,
+ setErrorMessage(NLS.bind(JBossWSUIMessages.JBossWS_Runtime_List_Field_Editor_Runtime_Already_Exists,
name.getValueAsString()));
setPageComplete(false);
return;
@@ -536,37 +532,37 @@
&& current.getName().equals(name.getValueAsString())
&& current.getHomeDir().equals(homeDir.getValueAsString())
&& current.getVersion().equals(version.getValueAsString())
- && current.isUserConfigClasspath() == jarJbws
- .isUserConfigClasspath()
+ && current.isUserConfigClasspath() == jarJbws.isUserConfigClasspath()
&& (!jarJbws.isUserConfigClasspath() || hasSameLibraies(
- current.getLibraries(), jarJbws.getLibraries()))) {
-
+ current.getLibraries(), jarJbws.getLibraries()))) {
setErrorMessage(null);
setPageComplete(false);
return;
}
- if (jarJbws.isUserConfigClasspath()
- && jarJbws.getLibraries().size() == 0) {
+ if (jarJbws.isUserConfigClasspath()&& jarJbws.getLibraries().size() == 0) {
setErrorMessage(JBossWSUIMessages.JBossRuntimeListFieldEditor_ErrorMessageAtLeastOneJar);
setPageComplete(false);
return;
}
}
- if (homeDir.getValueAsString() == null
- || "".equals(homeDir.getValueAsString().trim())) { //$NON-NLS-1$
+ if (homeDir.getValueAsString() == null || "".equals(homeDir.getValueAsString().trim())) { //$NON-NLS-1$
setErrorMessage(JBossWSUIMessages.Error_JBossWS_Runtime_List_Field_Editor_Path_To_Home_Diretory_Cannot_Be_Empty);
setPageComplete(false);
return;
- }
+ }
if (!runtimeExist(homeDir.getValueAsString())) {
setErrorMessage(JBossWSUIMessages.Error_JBossWS_Label_Runtime_Load);
setPageComplete(false);
return;
+ } else if ("homeDir".equals(evt.getPropertyName())) { //$NON-NLS-1$
+ String[] strs = JBossWSUIUtils.getWSRuntimeDetail(homeDir.getValueAsString());
+ impl.setText(strs[0]);
+ vDetail.setText(strs[1]);
}
-
+
setErrorMessage(null);
setPageComplete(true);
}
@@ -578,7 +574,6 @@
if (!lib2.contains(jar))
return false;
}
-
return true;
}
@@ -587,12 +582,10 @@
*/
private List<String> getWSFacetVersions() {
List<String> versions = new ArrayList<String>();
- IProjectFacet wsFacet = ProjectFacetsManager
- .getProjectFacet("jbossws.core"); //$NON-NLS-1$
+ IProjectFacet wsFacet = ProjectFacetsManager.getProjectFacet("jbossws.core"); //$NON-NLS-1$
for (IProjectFacetVersion version : wsFacet.getVersions()) {
versions.add(version.getVersionString());
}
-
return versions;
}
@@ -606,6 +599,8 @@
newRt.setName(name.getValueAsString());
newRt.setVersion(version.getValueAsString());
newRt.setHomeDir(homeDir.getValueAsString());
+ newRt.setImpl(impl.getText());
+ newRt.setVersionDetail(vDetail.getText());
JBossWSRuntime rt = (JBossWSRuntime) jars.getValue();
newRt.setLibraries(rt.getLibraries());
newRt.setUserConfigClasspath(rt.isUserConfigClasspath());
@@ -617,11 +612,9 @@
return new ButtonFieldEditor.ButtonPressedAction(buttonName) {
@Override
public void run() {
- DirectoryDialog dialog = new DirectoryDialog(Display
- .getCurrent().getActiveShell());
+ DirectoryDialog dialog = new DirectoryDialog(Display.getCurrent().getActiveShell());
dialog.setFilterPath(getFieldEditor().getValueAsString());
- dialog
- .setMessage(JBossWSUIMessages.JBossWS_SWT_Field_Editor_Factory_Select_Home_Folder);
+ dialog.setMessage(JBossWSUIMessages.JBossWS_SWT_Field_Editor_Factory_Select_Home_Folder);
dialog.setFilterPath(getFieldEditor().getValueAsString());
String directory = dialog.open();
if (directory != null) {
@@ -632,23 +625,13 @@
}
private boolean runtimeExist(String path) {
-
File jbosswsHomeDir = new File(path);
if (!jbosswsHomeDir.isDirectory())
return false;
- String[] newNode = { JBossWSUIMessages.Bin,
- JBossWSUIMessages.Command };
+ String[] newNode = { JBossWSUIMessages.Bin, JBossWSUIMessages.Command };
String jbosswsBinPath = JBossWSUIUtils.addNodesToPath(
jbosswsHomeDir.getAbsolutePath(), newNode);
- if (new File(jbosswsBinPath).isFile()
- && new File(JBossWSUIUtils.addAnotherNodeToPath(
- jbosswsHomeDir.getAbsolutePath(),
- JBossWSUIMessages.Client)).isDirectory()
- && new File(JBossWSUIUtils
- .addNodesToPath(jbosswsHomeDir.getAbsolutePath(),
- new String[] { JBossWSUIMessages.Lib,
- JBossWSUIMessages.Endorsed }))
- .isDirectory()) {
+ if (new File(jbosswsBinPath).isFile()) {
return true;
}
return false;
@@ -665,8 +648,7 @@
List<JBossWSRuntime> added = null;
List<JBossWSRuntime> value = null;
- public JBossWSRuntimeNewWizard(List<JBossWSRuntime> exist,
- List<JBossWSRuntime> added) {
+ public JBossWSRuntimeNewWizard(List<JBossWSRuntime> exist,List<JBossWSRuntime> added) {
super();
setWindowTitle(JBossWSUIMessages.JBossWS_Runtime_List_Field_Editor_New_Runtime);
page1 = new JBossWSRuntimeWizardPage(exist);
@@ -726,10 +708,8 @@
super();
setWindowTitle(JBossWSUIMessages.JBossWS_Runtime_List_Field_Editor_Edit_Runtime);
page1 = new JBossWSRuntimeWizardPage(existing);
- page1
- .setMessage(JBossWSUIMessages.JBossWS_Runtime_List_Field_Editor_Modify_Runtime);
- page1
- .setTitle(JBossWSUIMessages.JBossWS_Runtime_List_Field_Editor_Edit_Runtime);
+ page1.setMessage(JBossWSUIMessages.JBossWS_Runtime_List_Field_Editor_Modify_Runtime);
+ page1.setTitle(JBossWSUIMessages.JBossWS_Runtime_List_Field_Editor_Edit_Runtime);
addPage(page1);
this.value = existing;
this.added = added;
@@ -756,6 +736,8 @@
source.setVersion(rt.getVersion());
source.setUserConfigClasspath(rt.isUserConfigClasspath());
source.setLibraries(rt.getLibraries());
+ source.setImpl(rt.getImpl());
+ source.setVersionDetail(rt.getVersionDetail());
} else {
changed.put(rt, source);
if (source.isDefault()) {
@@ -1106,4 +1088,8 @@
}
}
}
+
+ public CheckboxTableViewer getTableView() {
+ return tableView;
+ }
}
\ No newline at end of file
Modified: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/JBossWSRuntimePreferencePage.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/JBossWSRuntimePreferencePage.java 2011-06-27 03:22:15 UTC (rev 32366)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/JBossWSRuntimePreferencePage.java 2011-06-27 05:26:07 UTC (rev 32367)
@@ -20,11 +20,13 @@
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.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
import org.jboss.tools.ws.core.classpath.JBossWSRuntime;
import org.jboss.tools.ws.core.classpath.JBossWSRuntimeManager;
import org.jboss.tools.ws.ui.messages.JBossWSUIMessages;
+import org.jboss.tools.ws.ui.utils.JBossWSUIUtils;
/**
* @author Grid Qian
@@ -42,6 +44,9 @@
JBossWSRuntimeListFieldEditor jbossWSRuntimes = new JBossWSRuntimeListFieldEditor(
"rtlist", JBossWSUIMessages.JBossWS_Preference_Page_Runtimes, new ArrayList<JBossWSRuntime>(Arrays.asList(JBossWSRuntimeManager.getInstance().getRuntimes()))); //$NON-NLS-1$
+ Label impl;
+ Label vDetail;
+
/**
* Create contents of JBossWS preferences page. JBossWSRuntime list editor
* is created
@@ -52,6 +57,12 @@
GridLayout gl = new GridLayout(COLUMNS, false);
root.setLayout(gl);
jbossWSRuntimes.doFillIntoGrid(root);
+
+ Label[] texts = JBossWSUIUtils.createWSRuntimeDetailsGroup(root, 2);
+ impl = texts[0];
+ vDetail = texts[1];
+
+ jbossWSRuntimes.getTableView().addSelectionChangedListener(new WSRuntimeSelectionChangedListener(impl, vDetail));
return root;
}
Added: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/WSRuntimeSelectionChangedListener.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/WSRuntimeSelectionChangedListener.java (rev 0)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/WSRuntimeSelectionChangedListener.java 2011-06-27 05:26:07 UTC (rev 32367)
@@ -0,0 +1,34 @@
+package org.jboss.tools.ws.ui.preferences;
+
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.swt.widgets.Label;
+import org.jboss.tools.ws.core.classpath.JBossWSRuntime;
+
+public class WSRuntimeSelectionChangedListener implements
+ ISelectionChangedListener {
+
+ private Label impl;
+ private Label vdetail;
+
+ public WSRuntimeSelectionChangedListener(Label impl, Label vdetail) {
+ this.impl = impl;
+ this.vdetail = vdetail;
+ }
+
+ @Override
+ public void selectionChanged(SelectionChangedEvent event) {
+ ISelection selection = event.getSelection();
+ if (selection instanceof StructuredSelection) {
+ JBossWSRuntime runtime = (JBossWSRuntime)((StructuredSelection)selection).getFirstElement();
+ if (runtime == null) {
+ return;
+ }
+ impl.setText(runtime.getImpl());
+ vdetail.setText(runtime.getVersionDetail());
+ }
+ }
+
+}
Property changes on: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/WSRuntimeSelectionChangedListener.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/project/facet/JBossWSRuntimeConfigBlock.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/project/facet/JBossWSRuntimeConfigBlock.java 2011-06-27 03:22:15 UTC (rev 32366)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/project/facet/JBossWSRuntimeConfigBlock.java 2011-06-27 05:26:07 UTC (rev 32367)
@@ -42,6 +42,7 @@
import org.jboss.tools.ws.ui.JBossWSUIPlugin;
import org.jboss.tools.ws.ui.messages.JBossWSUIMessages;
import org.jboss.tools.ws.ui.preferences.JBossWSRuntimeListFieldEditor;
+import org.jboss.tools.ws.ui.utils.JBossWSUIUtils;
public class JBossWSRuntimeConfigBlock {
@@ -50,6 +51,8 @@
private Combo cmbRuntimes;
private Button btnDeploy;
private Button btnNew;
+ private Label impl;
+ private Label vDetail;
private String errMsg;
private IMessageNotifier notifier;
@@ -96,8 +99,7 @@
setServerSuppliedSelection(e);
}
});
- lblServerSupplied
- .setText(JBossWSUIMessages.JBossWSFacetInstallPage_ServerSuppliedJBossWS);
+ lblServerSupplied.setText(JBossWSUIMessages.JBossWSFacetInstallPage_ServerSuppliedJBossWS);
gd = new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalSpan = 2;
lblServerSupplied.setLayoutData(gd);
@@ -115,8 +117,7 @@
cmbRuntimes.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
String runtimeName = cmbRuntimes.getText();
- JBossWSRuntime jr = (JBossWSRuntime) cmbRuntimes
- .getData(runtimeName);
+ JBossWSRuntime jr = (JBossWSRuntime) cmbRuntimes.getData(runtimeName);
saveJBosswsRuntimeToModel(jr);
changePageStatus();
}
@@ -132,18 +133,19 @@
});
btnDeploy = new Button(composite, SWT.CHECK);
- btnDeploy
- .setText(JBossWSUIMessages.JBossWSFacetInstallPage_Deploy);
+ btnDeploy.setText(JBossWSUIMessages.JBossWSFacetInstallPage_Deploy);
btnDeploy.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
- model.setBooleanProperty(
- IJBossWSFacetDataModelProperties.JBOSS_WS_DEPLOY,
- btnDeploy.getSelection());
+ model.setBooleanProperty(IJBossWSFacetDataModelProperties.JBOSS_WS_DEPLOY, btnDeploy.getSelection());
}
});
gd = new GridData();
gd.horizontalSpan = 3;
btnDeploy.setLayoutData(gd);
+
+ Label[] texts = JBossWSUIUtils.createWSRuntimeDetailsGroup(composite, 2);
+ impl = texts[0];
+ vDetail = texts[1];
setInitialValues();
changePageStatus();
@@ -152,7 +154,7 @@
}
- private void validateTargetRuntime() {
+ private void validateandDisplayTargetRuntime() {
IFacetedProjectWorkingCopy fpWorkingCopy = (IFacetedProjectWorkingCopy) model
.getProperty(JBossWSFacetInstallDataModelProvider.FACETED_PROJECT_WORKING_COPY);
IRuntime runtime = null;
@@ -181,7 +183,11 @@
return;
}
}
-
+
+ String[] strs = JBossWSUIUtils.getWSRuntimeDetail(serverRuntime.getLocation().toFile().getAbsolutePath());
+ impl.setText(strs[0]);
+ vDetail.setText(strs[1]);
+
setErrorMessage(null);
}
@@ -216,33 +222,21 @@
StatusUtils.errorStatus(e1));
}
if ("".equals(duplicateMsg)) { //$NON-NLS-1$
- model.setStringProperty(
- IJBossWSFacetDataModelProperties.JBOSS_WS_RUNTIME_HOME,
- jbws.getHomeDir());
- model.setStringProperty(
- IJBossWSFacetDataModelProperties.JBOSS_WS_RUNTIME_ID, jbws
- .getName());
+ model.setStringProperty(IJBossWSFacetDataModelProperties.JBOSS_WS_RUNTIME_HOME, jbws.getHomeDir());
+ model.setStringProperty(IJBossWSFacetDataModelProperties.JBOSS_WS_RUNTIME_ID, jbws.getName());
} else {
- model.setStringProperty(
- IJBossWSFacetDataModelProperties.JBOSS_WS_RUNTIME_ID, null);
- model.setStringProperty(
- IJBossWSFacetDataModelProperties.JBOSS_WS_RUNTIME_HOME,
- null);
+ model.setStringProperty(IJBossWSFacetDataModelProperties.JBOSS_WS_RUNTIME_ID, null);
+ model.setStringProperty(IJBossWSFacetDataModelProperties.JBOSS_WS_RUNTIME_HOME, null);
}
}
protected void setServerSuppliedSelection(EventObject e) {
btnServerSupplied.setSelection(true);
btnUserSupplied.setSelection(false);
- model
- .setBooleanProperty(
- IJBossWSFacetDataModelProperties.JBOSS_WS_RUNTIME_IS_SERVER_SUPPLIED,
- true);
+ model.setBooleanProperty(IJBossWSFacetDataModelProperties.JBOSS_WS_RUNTIME_IS_SERVER_SUPPLIED, true);
// remove user supplied properties
- model.setStringProperty(
- IJBossWSFacetDataModelProperties.JBOSS_WS_RUNTIME_ID, null);
- model.setStringProperty(
- IJBossWSFacetDataModelProperties.JBOSS_WS_RUNTIME_HOME, null);
+ model.setStringProperty(IJBossWSFacetDataModelProperties.JBOSS_WS_RUNTIME_ID, null);
+ model.setStringProperty(IJBossWSFacetDataModelProperties.JBOSS_WS_RUNTIME_HOME, null);
enableUserSupplied(false);
changePageStatus();
@@ -252,13 +246,9 @@
protected void setUserSuppliedSelection(EventObject e) {
btnServerSupplied.setSelection(false);
btnUserSupplied.setSelection(true);
- model
- .setBooleanProperty(
- IJBossWSFacetDataModelProperties.JBOSS_WS_RUNTIME_IS_SERVER_SUPPLIED,
- false);
+ model.setBooleanProperty(IJBossWSFacetDataModelProperties.JBOSS_WS_RUNTIME_IS_SERVER_SUPPLIED, false);
String runtimeId = cmbRuntimes.getText();
- JBossWSRuntime jbws = JBossWSRuntimeManager.getInstance()
- .findRuntimeByName(runtimeId);
+ JBossWSRuntime jbws = JBossWSRuntimeManager.getInstance().findRuntimeByName(runtimeId);
if (jbws != null) {
saveJBosswsRuntimeToModel(jbws);
@@ -281,8 +271,7 @@
// int selectIndex = 0;
int defaultIndex = 0;
cmRuntime.removeAll();
- JBossWSRuntime[] runtimes = JBossWSRuntimeManager.getInstance()
- .getRuntimes();
+ JBossWSRuntime[] runtimes = JBossWSRuntimeManager.getInstance().getRuntimes();
for (int i = 0; i < runtimes.length; i++) {
JBossWSRuntime jr = runtimes[i];
if (jbossWSVersion.compareTo(jr.getVersion()) > 0) {
@@ -348,22 +337,27 @@
setErrorMessage(JBossWSUIMessages.Error_WS_Chose_runtime);
} else if (btnUserSupplied.getSelection()) {
String duplicateMsg = ""; //$NON-NLS-1$
+ String jr = cmbRuntimes.getText();
try {
- duplicateMsg = getDuplicateJars(cmbRuntimes.getText());
+ duplicateMsg = getDuplicateJars(jr);
} catch (JavaModelException e1) {
JBossWSUIPlugin.getDefault().getLog().log(
StatusUtils.errorStatus(e1));
}
if (!duplicateMsg.equals("")) { //$NON-NLS-1$
- setErrorMessage(MessageFormat
- .format(
- JBossWSUIMessages.Error_JBossWSRuntimeConfigBlock_Duplicated_Jar,
- duplicateMsg));
+ setErrorMessage(MessageFormat.format(JBossWSUIMessages.Error_JBossWSRuntimeConfigBlock_Duplicated_Jar,duplicateMsg));
} else {
setErrorMessage(null);
}
+ if (jr != null) {
+ JBossWSRuntime r = (JBossWSRuntime)cmbRuntimes.getData(jr);
+ if (r != null) {
+ impl.setText(r.getImpl());
+ vDetail.setText(r.getVersionDetail());
+ }
+ }
} else if (btnServerSupplied.getSelection()) {
- validateTargetRuntime();
+ validateandDisplayTargetRuntime();
} else {
setErrorMessage(null);
}
@@ -397,8 +391,7 @@
protected String getDuplicateJars(String jbwsName)
throws JavaModelException {
- String prjName = model
- .getStringProperty(IFacetDataModelProperties.FACET_PROJECT_NAME);
+ String prjName = model.getStringProperty(IFacetDataModelProperties.FACET_PROJECT_NAME);
if (prjName == null || "".equals(prjName)) { //$NON-NLS-1$
return ""; //$NON-NLS-1$
Modified: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/utils/JBossWSUIUtils.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/utils/JBossWSUIUtils.java 2011-06-27 03:22:15 UTC (rev 32366)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/utils/JBossWSUIUtils.java 2011-06-27 05:26:07 UTC (rev 32367)
@@ -12,7 +12,10 @@
package org.jboss.tools.ws.ui.utils;
import java.io.File;
+import java.io.IOException;
import java.net.URI;
+import java.util.jar.Attributes;
+import java.util.jar.JarFile;
import org.eclipse.core.filesystem.EFS;
import org.eclipse.core.filesystem.IFileStore;
@@ -27,6 +30,12 @@
import org.eclipse.jdt.core.JavaConventions;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
import org.jboss.tools.ws.core.utils.StatusUtils;
import org.jboss.tools.ws.creation.core.utils.JBossWSCreationUtils;
import org.jboss.tools.ws.ui.JBossWSUIPlugin;
@@ -38,6 +47,14 @@
public class JBossWSUIUtils {
private static String JAVA = ".java"; //$NON-NLS-1$
private static String CLASS = ".class"; //$NON-NLS-1$
+ private static final String WS_NATIVE_JAR = "jbossws-native-client.jar"; //$NON-NLS-1$
+ private static final String WS_CXF_JAR = "jbossws-cxf-client.jar"; //$NON-NLS-1$
+ private static final String WS_METRO_JAR = "jbossws-metro-client.jar"; //$NON-NLS-1$
+ private static final String CLIENT_FOLDER = "client"; //$NON-NLS-1$
+ private static final String CLIENT_AS7_FOLDER = "modules:org:jboss:ws:jaxws-client:main"; //$NON-NLS-1$
+ private static final String WS_IMPL = "Implementation-Title"; //$NON-NLS-1$
+ private static final String WS_VERSION = "Implementation-Version"; //$NON-NLS-1$
+ private static final String WS_JAR = "jbossws-client.jar"; //$NON-NLS-1$
public static String addAnotherNodeToPath(String currentPath, String newNode) {
return currentPath + File.separator + newNode;
@@ -157,5 +174,95 @@
return new String[] { JavaCore.getOption(JavaCore.COMPILER_SOURCE),
JavaCore.getOption(JavaCore.COMPILER_COMPLIANCE) };
}
+
+
+ public static String[] getWSRuntimeDetail(String serverHome) {
+ String[] strs = null;
+ File jbosswsHomeDir = new File(serverHome);
+
+ String jarPath = JBossWSUIUtils.addNodesToPath(jbosswsHomeDir.getAbsolutePath(), new String[] {CLIENT_FOLDER, WS_CXF_JAR});
+ strs = getWSRuntimeDetailFromPath(jarPath);
+ if (strs != null) {
+ return strs;
+ }
+ jarPath = JBossWSUIUtils.addNodesToPath(jbosswsHomeDir.getAbsolutePath(), new String[] {CLIENT_FOLDER, WS_NATIVE_JAR});
+ strs = getWSRuntimeDetailFromPath(jarPath);
+ if (strs != null) {
+ return strs;
+ }
+ jarPath = JBossWSUIUtils.addNodesToPath(jbosswsHomeDir.getAbsolutePath(), new String[] {CLIENT_FOLDER, WS_METRO_JAR});
+ strs = getWSRuntimeDetailFromPath(jarPath);
+ if (strs != null) {
+ return strs;
+ }
+ jarPath = JBossWSUIUtils.addNodesToPath(jbosswsHomeDir.getAbsolutePath(), new String[] {CLIENT_FOLDER, WS_JAR});
+ strs = getWSRuntimeDetailFromPath(jarPath);
+ if (strs != null) {
+ return strs;
+ }
+
+ String as7 = JBossWSUIUtils.addNodesToPath(jbosswsHomeDir.getAbsolutePath(), CLIENT_AS7_FOLDER.split(":")); //$NON-NLS-1$
+ File as7File = new File(as7);
+ if (!as7File.isDirectory()) {
+ return new String[] {"", ""}; //$NON-NLS-1$ //$NON-NLS-2$;
+ }
+ File[] files = as7File.listFiles();
+ String jarName = ""; //$NON-NLS-1$
+ for (int i = 0 ; i < files.length ; i++) {
+ jarName = files[i].getName();
+ if (jarName.contains(WS_CXF_JAR.substring(0, WS_CXF_JAR.length()-5))
+ || jarName.contains(WS_CXF_JAR.substring(0, WS_NATIVE_JAR.length()-5))
+ || jarName.contains(WS_CXF_JAR.substring(0, WS_METRO_JAR.length()-5))) {
+ strs = getWSRuntimeDetailFromPath(files[i].getAbsolutePath());
+ if (strs != null) {
+ return strs;
+ }
+ }
+ }
+ return new String[] {"", ""}; //$NON-NLS-1$ //$NON-NLS-2$;
+ }
+
+ public static String[] getWSRuntimeDetailFromPath(String path) {
+ File jarFile = new File(path);
+ if (!jarFile.isFile()) {
+ return null;
+ }
+ String[] strs = new String[] {"", ""}; //$NON-NLS-1$ //$NON-NLS-2$
+ JarFile jar;
+ try {
+ jar = new JarFile(jarFile);
+ Attributes attributes = jar.getManifest().getMainAttributes();
+ strs[0] = attributes.getValue(WS_IMPL);
+ strs[1] = attributes.getValue(WS_VERSION);
+ } catch (IOException e) {
+ return strs;
+ }
+ return strs;
+ }
+ public static Label[] createWSRuntimeDetailsGroup(Composite root, int horizontalSpan) {
+ Group wsRuntimeDetails = new Group(root, SWT.NONE);
+ wsRuntimeDetails.setText(JBossWSUIMessages.Runtime_Details);
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = horizontalSpan;
+ wsRuntimeDetails.setLayout(new GridLayout(2, false));
+ wsRuntimeDetails.setLayoutData(gd);
+
+ new Label(wsRuntimeDetails, SWT.NONE).setText(JBossWSUIMessages.Runtime_Details_Impl);
+ Label impl = new Label(wsRuntimeDetails, SWT.NONE);
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ impl.setLayoutData(gd);
+
+ new Label(wsRuntimeDetails, SWT.NONE).setText(JBossWSUIMessages.Runtime_Details_Version);
+ Label vDetail = new Label(wsRuntimeDetails, SWT.NONE);
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ vDetail.setLayoutData(gd);
+
+ Label[] labels = new Label[] {impl, vDetail};
+
+ return labels;
+
+
+ }
+
}
\ No newline at end of file
14 years, 9 months
JBoss Tools SVN: r32366 - trunk/ws/docs/reference/en-US.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2011-06-26 23:22:15 -0400 (Sun, 26 Jun 2011)
New Revision: 32366
Modified:
trunk/ws/docs/reference/en-US/overview.xml
trunk/ws/docs/reference/en-US/preference.xml
trunk/ws/docs/reference/en-US/sample_web_service_wizards.xml
Log:
updated with patch file from TOOLSDOC-141
Modified: trunk/ws/docs/reference/en-US/overview.xml
===================================================================
--- trunk/ws/docs/reference/en-US/overview.xml 2011-06-26 22:55:41 UTC (rev 32365)
+++ trunk/ws/docs/reference/en-US/overview.xml 2011-06-27 03:22:15 UTC (rev 32366)
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<chapter id="overview">
- <title>JBossWS Runtime Overview</title>
-
+ <title>JBossWS Runtime and Tools support Overview</title>
<para>JBossWS is a web service framework developed as a part of the JBoss Application Server. It implements the JAX-WS and JAX-RS specifications. JAX-WS (Java API for XML Web Services) defines a programming model and run-time architecture for implementing web services in Java, targeted at the Java Platform, Enterprise Edition 5 (Java EE 5). JAX-RS (Java API for RESTful Web Services) is a Java API that supports the creation of Representational State Transfer (REST) web services, using annotations. </para>
- <para>JBossWS integrates with most current JBoss Application Server releases as well as earlier ones, that did implement the J2EE 1.4 specifications. Even though JAX-RPC, the web service specification for J2EE 1.4, is still supported JBossWS does put a clear focus on JAX-WS.</para>
-
+ <para>JBossWS integrates with most current JBoss Application Server releases as well as earlier ones, that did implement the J2EE 1.4 specifications. Even though JAX-RPC, the web service specification for J2EE 1.4, is still supported JBossWS does put a clear focus on JAX-WS.</para>
+ <para>JBossWS Tool works with <property>JBossWS Runtime</property>. Users can easily create, deploy and run a Web Service(WSDL base or RESTful base) and a Web Service Client using JBossWS Tool and JBossWS Runtime.</para>
+ <para>Also JBossWS Tool gives a way to test a web service running on a server.</para>
<section>
<title>Key Features of JBossWS</title>
+
<para>For a start, we propose you to look through the table of main features of JBossWS Runtime:</para>
-
<table>
<title>Key Functionality for JBossWS</title>
@@ -71,9 +71,7 @@
</tbody>
</tgroup>
- </table>
-
-
+ </table>
</section>
<section>
<title>Other relevant resources on the topic</title>
@@ -82,15 +80,14 @@
<itemizedlist>
<listitem>
<para>
- <ulink url="http://www.jboss.org/community/wiki/JBossWS-FAQ#Tools">JBossWS Tools Wiki FAQ.</ulink>
+ <ulink url="http://www.jboss.org/community/wiki/JBossWS-FAQ#Tools">JBossWS Wiki FAQ.</ulink>
</para>
</listitem>
- </itemizedlist>
-
-
- </section>
-
-
-
-
+ <listitem>
+ <para>
+ <ulink url="http://www.jboss.com/index.html?module=bb&op=viewforum&f=201">JBossWS Tools Forum.</ulink>
+ </para>
+ </listitem>
+ </itemizedlist>
+</section>
</chapter>
\ No newline at end of file
Modified: trunk/ws/docs/reference/en-US/preference.xml
===================================================================
--- trunk/ws/docs/reference/en-US/preference.xml 2011-06-26 22:55:41 UTC (rev 32365)
+++ trunk/ws/docs/reference/en-US/preference.xml 2011-06-27 03:22:15 UTC (rev 32366)
@@ -98,13 +98,5 @@
</imageobject>
</mediaobject>
</figure>
-
- <para>
- On the whole, this guide covers the fundamental concepts of work with tooling for <property>JBossWS</property>. It describes how to easily create a Web Service and a Web Service Client using JBossWS Runtime and adjust JBossWS and development environment as well.
- </para>
-
- <para>
- If the information on JBossWS tools in this guide isn't enough for you, ask questions on our <ulink url="http://www.jboss.com/index.html?module=bb&op=viewforum&f=201">forum</ulink>. Your comments and suggestions are also welcome.
- </para>
</section>
</chapter>
Modified: trunk/ws/docs/reference/en-US/sample_web_service_wizards.xml
===================================================================
--- trunk/ws/docs/reference/en-US/sample_web_service_wizards.xml 2011-06-26 22:55:41 UTC (rev 32365)
+++ trunk/ws/docs/reference/en-US/sample_web_service_wizards.xml 2011-06-27 03:22:15 UTC (rev 32366)
@@ -16,7 +16,7 @@
</listitem>
<listitem>
<para>
- <guilabel>Create a sample RESTful Web Service</guilabel> for a JAX-WS web service.
+ <guilabel>Create a sample RESTful Web Service</guilabel> for a JAX-RS web service.
</para>
</listitem>
</itemizedlist>
14 years, 9 months