Author: Grid.Qian
Date: 2010-05-24 03:14:25 -0400 (Mon, 24 May 2010)
New Revision: 22271
Added:
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/project/
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/project/facet/
trunk/ws/tests/org.jboss.tools.ws.core.test/src/org/jboss/tools/ws/core/test/project/
trunk/ws/tests/org.jboss.tools.ws.core.test/src/org/jboss/tools/ws/core/test/project/facet/
trunk/ws/tests/org.jboss.tools.ws.core.test/src/org/jboss/tools/ws/core/test/project/facet/JBossWSProjectFacetTest.java
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/JBossWSProjectFacetBotTest.java
Removed:
trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/project/facet/
Modified:
trunk/ws/plugins/org.jboss.tools.ws.core/plugin.properties
trunk/ws/plugins/org.jboss.tools.ws.core/plugin.xml
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/ImplementationClassCreationCommand.java
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/RemoveClientJarsCommand.java
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/messages/JBossWSCreationCore.properties
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/messages/JBossWSCreationCoreMessages.java
trunk/ws/plugins/org.jboss.tools.ws.creation.ui/META-INF/MANIFEST.MF
trunk/ws/plugins/org.jboss.tools.ws.creation.ui/plugin.xml
trunk/ws/plugins/org.jboss.tools.ws.ui/META-INF/MANIFEST.MF
trunk/ws/plugins/org.jboss.tools.ws.ui/plugin.xml
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/project/facet/IMessageNotifier.java
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/project/facet/JBossWSFacetInstallPage.java
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/project/facet/JBossWSPropertyPage.java
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/project/facet/JBossWSRuntimeConfigBlock.java
trunk/ws/tests/org.jboss.tools.ws.core.test/src/org/jboss/tools/ws/core/test/JBossWSCoreAllTests.java
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/META-INF/MANIFEST.MF
Log:
JBIDE-6187: to trunk (fix this issue and juint, swtbot test)
Modified: trunk/ws/plugins/org.jboss.tools.ws.core/plugin.properties
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.core/plugin.properties 2010-05-24 06:24:57 UTC
(rev 22270)
+++ trunk/ws/plugins/org.jboss.tools.ws.core/plugin.properties 2010-05-24 07:14:25 UTC
(rev 22271)
@@ -9,4 +9,7 @@
JBOSSWS_FACET_EXT_LABEL=JBoss Web Services Extensions
-JBOSSWS_FACET_EXT_DISCRIPTION=Prepares the project for additional Web services support
with the JBoss Web services runtime.
\ No newline at end of file
+JBOSSWS_FACET_EXT_DISCRIPTION=Prepares the project for additional Web services support
with the JBoss Web services runtime.
+
+JBOSSWS_FACET_CORE_PRESET_LABEL=JBossWS Web Service Project v3.0
+JBOSSWS_FACET_CORE_PRESET_DESCRIPTION=Configures a Dynamic Web Project with JBossWS using
Web Module v2.5 and Java v5.0
\ No newline at end of file
Modified: trunk/ws/plugins/org.jboss.tools.ws.core/plugin.xml
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.core/plugin.xml 2010-05-24 06:24:57 UTC (rev
22270)
+++ trunk/ws/plugins/org.jboss.tools.ws.core/plugin.xml 2010-05-24 07:14:25 UTC (rev
22271)
@@ -1,7 +1,6 @@
<plugin>
<extension
point="org.eclipse.wst.common.project.facet.core.facets">
-
<project-facet id="jbossws.core">
<label>%JBOSSWS_FACET_CORE_LABEL</label>
<description>%JBOSSWS_FACET_CORE_DISCRIPTION</description>
@@ -9,59 +8,46 @@
<project-facet-version facet="jbossws.core" version="2.0">
<constraint>
- <requires facet="jst.web" version="2.2,2.3,2.4,2.5"/>
+ <and>
+ <requires facet="jst.web" version="[2.2"/>
+ </and>
</constraint>
-
</project-facet-version>
- <project-facet-version
- facet="jbossws.core"
- version="3.0">
- <constraint>
- <requires
- facet="jst.web"
- version="2.2,2.3,2.4,2.5">
- </requires>
- </constraint>
- </project-facet-version>
- <action
- facet="jbossws.core"
- id="jbossws.core.install"
- type="INSTALL"
- version="2.0,3.0">
- <delegate
-
class="org.jboss.tools.ws.core.facet.delegate.JBossWSInstallRuntimeDelegate">
- </delegate>
- <config-factory
-
class="org.jboss.tools.ws.core.facet.delegate.JBossWSFacetInstallDataModelProvider">
- </config-factory>
- </action>
- <action
- facet="jbossws.core"
- id="jbossws.core.uninstall"
- type="UNINSTALL"
- version="2.0,3.0">
- <delegate
-
class="org.jboss.tools.ws.core.facet.delegate.JBossWSUnInstallRuntimeDelegate">
- </delegate>
- </action>
+ <project-facet-version facet="jbossws.core"
version="3.0">
+ <constraint>
+ <and>
+ <requires facet="jst.web" version="[2.2"/>
+ </and>
+ </constraint>
+ </project-facet-version>
+ <action facet="jbossws.core" id="jbossws.core.install"
type="INSTALL">
+ <delegate
class="org.jboss.tools.ws.core.facet.delegate.JBossWSInstallRuntimeDelegate"/>
+ <config-factory
class="org.jboss.tools.ws.core.facet.delegate.JBossWSFacetInstallDataModelProvider"/>
+ </action>
+ <action facet="jbossws.core" id="jbossws.core.uninstall"
type="UNINSTALL">
+ <delegate
class="org.jboss.tools.ws.core.facet.delegate.JBossWSUnInstallRuntimeDelegate"/>
+ </action>
</extension>
<extension
point="org.eclipse.wst.common.project.facet.core.runtimes">
<supported>
- <facet
- id="jbossws.core">
- </facet>
- <runtime-component
- any="true"/>
+ <facet id="jbossws.core"/>
+ <runtime-component any="true"/>
</supported>
- </extension>
+ </extension>
+ <extension point="org.eclipse.wst.common.project.facet.core.presets">
+ <static-preset id="jbossws.core.preset">
+ <label>%JBOSSWS_FACET_CORE_PRESET_LABEL</label>
+ <description>%JBOSSWS_FACET_CORE_PRESET_DESCRIPTION</description>
+ <facet id="jbossws.core" version="3.0"/>
+ <facet id="jst.web" version="2.5"/>
+ <facet id="jst.java" version="5.0"/>
+ </static-preset>
+ </extension>
<extension
point="org.eclipse.jdt.core.classpathContainerInitializer">
<classpathContainerInitializer
class="org.jboss.tools.ws.core.classpath.JBossWSRuntimeClassPathInitializer"
- id="JBossWS_Runtime">
- </classpathContainerInitializer>
+ id="JBossWS_Runtime"/>
</extension>
-
-
</plugin>
Modified:
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/ImplementationClassCreationCommand.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/ImplementationClassCreationCommand.java 2010-05-24
06:24:57 UTC (rev 22270)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/ImplementationClassCreationCommand.java 2010-05-24
07:14:25 UTC (rev 22271)
@@ -444,6 +444,7 @@
private CompilationUnit getCompilationUnitForInterface(String portTypeName)
throws CoreException {
+ System.out.println(portTypeName);
IFile inFile = getServiceInterfaceFile(portTypeName);
if (!inFile.exists()) {
throw new CoreException(
Modified:
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/RemoveClientJarsCommand.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/RemoveClientJarsCommand.java 2010-05-24
06:24:57 UTC (rev 22270)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/RemoveClientJarsCommand.java 2010-05-24
07:14:25 UTC (rev 22271)
@@ -22,7 +22,7 @@
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
-import
org.jboss.tools.ws.core.classpath.JBossWSRuntimeClassPathInitializer.JBossWSRuntimeClasspathContainer;
+import org.jboss.tools.ws.core.classpath.JBossWSRuntimeClasspathContainer;
import org.jboss.tools.ws.core.utils.StatusUtils;
import org.jboss.tools.ws.creation.core.JBossWSCreationCorePlugin;
import org.jboss.tools.ws.creation.core.data.ServiceModel;
Modified:
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/messages/JBossWSCreationCore.properties
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/messages/JBossWSCreationCore.properties 2010-05-24
06:24:57 UTC (rev 22270)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/messages/JBossWSCreationCore.properties 2010-05-24
07:14:25 UTC (rev 22271)
@@ -24,14 +24,6 @@
Label_EnableSOAP12_Binding_Extension=Enable SOAP 1.2 binding extension (This option is
only available for JBossWS 3.0 or later)
Label_Button_Text_Remove=Remove
Progress_Message_Generating=Generating Web Service resources...
-JBossWSFacetInstallPage_Title=JBossWS Facet {0}
-JBossWSFacetInstallPage_Description=Select JBossWS {0} Web Service runtime
-JBossWSFacetInstallPage_ServerSuppliedJBossWS=Server Supplied JBossWS Runtime
-JBossWSFacetInstallPage_Deploy= Package all JBossWS runtime jars into the deployment
archive
-JBossWSFacetInstallPage_New=New...
-JBossWSRuntimeConfigBlock_Duplicated_Jar=Duplicated jar on classpath:{0}
-JBossWSRuntimeInstallPage_NoTargetRuntime=Please the specify project target runtime.
-JBossWSRuntimeInstallPage_NoValidJBossWSRuntime=The specified target runtime should be
JBoss AS 5.0 or later.
Client_Sample_Run_Over= Call Over!
Error_Message_Invalid_Binding_File={0} is not a valid JAX-WS or JAXB binding file
@@ -44,6 +36,4 @@
Error_WS_Location=The JBoss WS Runtime Location is NULL. Please set the location on JBoss
WS preferences page.
Error_Create_Client_Sample=When create a client sample, a error comes up. Please check
the generated files.
Error_No_Package=The service implementation selected does not follow Java naming
conventions. This may result in not being able to generate your WebService.
-Error_WS_Chose_runtime=Select a JBoss Web Service runtime. If a server supplied JBoss Web
Service runtime is chosen ,\n the chosen server adapter must be capable of providing the
JBoss Web Service runtime
-Error_WS_No_Runtime_Specifed=A JBossWS runtime has not been chosen
Error_JBossWS_GenerateWizard_WSName_Same=The Web Service Name has been used in the
web.xml of the web project.
Modified:
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/messages/JBossWSCreationCoreMessages.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/messages/JBossWSCreationCoreMessages.java 2010-05-24
06:24:57 UTC (rev 22270)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/messages/JBossWSCreationCoreMessages.java 2010-05-24
07:14:25 UTC (rev 22271)
@@ -18,14 +18,6 @@
public static String Command;
public static String Bin;
- public static String JBossWSFacetInstallPage_Deploy;
- public static String JBossWSFacetInstallPage_Description;
- public static String JBossWSFacetInstallPage_New;
- public static String JBossWSFacetInstallPage_ServerSuppliedJBossWS;
- public static String JBossWSFacetInstallPage_Title;
- public static String JBossWSRuntimeConfigBlock_Duplicated_Jar;
- public static String JBossWSRuntimeInstallPage_NoTargetRuntime;
- public static String JBossWSRuntimeInstallPage_NoValidJBossWSRuntime;
public static String Label_Custom_Package_Name;
public static String Label_Catalog_File;
public static String Label_Button_Text_Seletion;
@@ -47,8 +39,6 @@
public static String Error_No_Class;
public static String Error_No_Package;
public static String Error_WS_Location;
- public static String Error_WS_No_Runtime_Specifed;
- public static String Error_WS_Chose_runtime;
public static String Error_Create_Client_Sample;
public static String Error_Message_No_Runtime_Specified;
public static String Error_JBossWS_GenerateWizard_WSName_Same;
Modified: trunk/ws/plugins/org.jboss.tools.ws.creation.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.creation.ui/META-INF/MANIFEST.MF 2010-05-24
06:24:57 UTC (rev 22270)
+++ trunk/ws/plugins/org.jboss.tools.ws.creation.ui/META-INF/MANIFEST.MF 2010-05-24
07:14:25 UTC (rev 22271)
@@ -24,9 +24,7 @@
org.jboss.tools.ws.core,
org.eclipse.jst.ws.creation.ui,
org.eclipse.wst.common.modulecore,
- org.eclipse.wst.common.project.facet.ui,
- org.jboss.tools.ws.ui,
- org.eclipse.wst.server.core;bundle-version="1.1.3"
+ org.jboss.tools.ws.ui
Bundle-ActivationPolicy: lazy
Export-Package: org.jboss.tools.ws.creation.ui.wsrt
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Modified: trunk/ws/plugins/org.jboss.tools.ws.creation.ui/plugin.xml
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.creation.ui/plugin.xml 2010-05-24 06:24:57 UTC
(rev 22270)
+++ trunk/ws/plugins/org.jboss.tools.ws.creation.ui/plugin.xml 2010-05-24 07:14:25 UTC
(rev 22271)
@@ -1,81 +1,52 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.2"?>
<plugin>
- <extension
+ <extension
point="org.eclipse.wst.command.env.ui.widgetRegistry">
- <widgetFactory
+ <widgetFactory
class="org.jboss.tools.ws.creation.ui.wsrt.JBossWSWSDL2JavaConfigWidgetFactory"
id="JBossWSWSDL2JavaConfig"
insertBeforeCommandId="org.jboss.tools.ws.creation.core.commands.BindingFilesValidationCommand">
- </widgetFactory>
- </extension>
+ </widgetFactory>
+ </extension>
<extension point="org.eclipse.jst.ws.consumption.ui.runtimes">
- <runtime
- id="org.jboss.tools.ws.creation.jbossWebServiceRT"
- label="JBossWS"
- serverRequired="false"/>
+ <runtime
+ id="org.jboss.tools.ws.creation.jbossWebServiceRT"
+ label="JBossWS"
+ serverRequired="false"/>
</extension>
<extension
point="org.eclipse.jst.ws.consumption.ui.serviceRuntimes">
- <serviceRuntime
- id="org.jboss.tools.ws.creation.java"
- serviceImplementationTypeId="org.eclipse.jst.ws.wsImpl.java"
- runtimeId="org.jboss.tools.ws.creation.jbossWebServiceRT"
- bottomUp="true"
- topDown="true"
- class="org.jboss.tools.ws.creation.ui.wsrt.JBossWebServiceRuntime">
+ <serviceRuntime
+ id="org.jboss.tools.ws.creation.java"
+ serviceImplementationTypeId="org.eclipse.jst.ws.wsImpl.java"
+ runtimeId="org.jboss.tools.ws.creation.jbossWebServiceRT"
+ bottomUp="true"
+ topDown="true"
+
class="org.jboss.tools.ws.creation.ui.wsrt.JBossWebServiceRuntime">
<required-facet-version facet="jst.web" version="2.4"
allow-newer="true"/>
<!--required-facet-version facet="jbossws.ext"
version="1.0" allow-newer="true" / -->
-
</serviceRuntime>
</extension>
<extension point="org.eclipse.jst.ws.consumption.ui.clientRuntimes">
- <clientRuntime
- id="org.jboss.tools.ws..consumption.web"
- clientImplementationTypeId="org.eclipse.jst.ws.client.type.java"
- runtimeId="org.jboss.tools.ws.creation.jbossWebServiceRT"
- class="org.jboss.tools.ws.creation.ui.wsrt.JBossWebServiceRuntime">
-
+ <clientRuntime
+ id="org.jboss.tools.ws..consumption.web"
+ clientImplementationTypeId="org.eclipse.jst.ws.client.type.java"
+ runtimeId="org.jboss.tools.ws.creation.jbossWebServiceRT"
+
class="org.jboss.tools.ws.creation.ui.wsrt.JBossWebServiceRuntime">
<required-facet-version facet="jst.java" version="1.4"
allow-newer="true" />
-
</clientRuntime>
</extension>
<extension
- point="org.eclipse.wst.command.env.ui.widgetRegistry">
+ point="org.eclipse.wst.command.env.ui.widgetRegistry">
<widgetFactory
class="org.jboss.tools.ws.creation.ui.wsrt.JBossWSJava2WSDLConfigWidgetFactory"
id="JBossWSProviderInvokeConfig"
insertBeforeCommandId="org.jboss.tools.ws.creation.core.commands.Java2WSCommand">
</widgetFactory>
</extension>
- <extension
- point="org.eclipse.wst.common.project.facet.ui.wizardPages">
- <wizard-pages
- action="jbossws.core.install">
- <page
-
class="org.jboss.tools.ws.creation.ui.project.facet.JBossWSFacetInstallPage">
- </page>
- </wizard-pages>
- </extension>
- <extension
- point="org.eclipse.ui.propertyPages">
- <page
-
class="org.jboss.tools.ws.creation.ui.project.facet.JBossWSPropertyPage"
- id="org.jboss.tools.ws.creation.ui.page"
- name="JBossWS Runtime">
- <enabledWhen>
-<adapt
-type="org.eclipse.core.resources.IProject">
-<test
-property="org.eclipse.wst.common.project.facet.core.projectFacet"
-value="jbossws.core"/>
-</adapt>
-</enabledWhen>
- </page>
- </extension>
-
</plugin>
Modified: trunk/ws/plugins/org.jboss.tools.ws.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/META-INF/MANIFEST.MF 2010-05-24 06:24:57 UTC
(rev 22270)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/META-INF/MANIFEST.MF 2010-05-24 07:14:25 UTC
(rev 22271)
@@ -19,6 +19,9 @@
org.eclipse.wst.common.emfworkbench.integration,
org.jboss.tools.common.ui,
org.eclipse.core.filesystem,
+ org.eclipse.wst.common.project.facet.ui,
+ org.eclipse.wst.server.core,
+ org.eclipse.core.filesystem,
com.ibm.icu,
org.apache.axis,
javax.xml.soap,
Modified: trunk/ws/plugins/org.jboss.tools.ws.ui/plugin.xml
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/plugin.xml 2010-05-24 06:24:57 UTC (rev 22270)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/plugin.xml 2010-05-24 07:14:25 UTC (rev 22271)
@@ -38,6 +38,34 @@
</description>
</wizard>
</extension>
+ <extension point="org.eclipse.wst.common.project.facet.ui.images">
+ <image facet="jbossws.core"
path="icons/obj16/new_webserv_wiz.gif"/>
+ </extension>
+ <extension
+ point="org.eclipse.wst.common.project.facet.ui.wizardPages">
+ <wizard-pages
+ action="jbossws.core.install">
+ <page
+
class="org.jboss.tools.ws.ui.project.facet.JBossWSFacetInstallPage">
+ </page>
+ </wizard-pages>
+ </extension>
+ <extension
+ point="org.eclipse.ui.propertyPages">
+ <page
+ class="org.jboss.tools.ws.ui.project.facet.JBossWSPropertyPage"
+ id="org.jboss.tools.ws.ui.page"
+ name="JBossWS Runtime">
+ <enabledWhen>
+ <adapt
+ type="org.eclipse.core.resources.IProject">
+ <test
+
property="org.eclipse.wst.common.project.facet.core.projectFacet"
+ value="jbossws.core"/>
+ </adapt>
+ </enabledWhen>
+ </page>
+ </extension>
<extension
point="org.eclipse.ui.views">
<category
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 2010-05-24
06:24:57 UTC (rev 22270)
+++
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JBossWSUI.properties 2010-05-24
07:14:25 UTC (rev 22271)
@@ -47,6 +47,14 @@
JBossWSGenerateWebXmlWizardPage_Project_Group_Tooltip=If no Dynamic Web Project exists,
you must create one before creating your sample web service.
JBossWSGenerateWebXmlWizardPage_Web_Service_Group=Web Service
+JBossWSFacetInstallPage_ServerSuppliedJBossWS=Server Supplied JBossWS Runtime
+JBossWSFacetInstallPage_New=New...
+JBossWSFacetInstallPage_Deploy= Package all JBossWS runtime jars into the deployment
archive
+JBossWSRuntimeInstallPage_NoTargetRuntime=Please the specify project target runtime.
+JBossWSRuntimeInstallPage_NoValidJBossWSRuntime=The specified target runtime should be
JBoss AS 5.0 or later.
+JBossWSFacetInstallPage_Title=JBossWS Facet {0}
+JBossWSFacetInstallPage_Description=Select JBossWS {0} Web Service runtime
+
Error_JBossWS_GenerateWizard_NoProjectSelected=No correct project selected. Please select
a Dynamic Web Project to continue.
Error_JBossWS_Label_Runtime_Load=Error occurred while loading JBossWS Command. Select the
correct JBoss Server folder.
Error_JBossWS_Basic_Editor_Composite=Parent control should be Composite
@@ -63,16 +71,20 @@
Error_JBossWS_GenerateWizard_IsOutputFolder=Name conflict with output folder
Error_JBossWS_GenerateWizard_PackageExists=Package already exists
Error_JBossWS_GenerateWizard_PackageNotShown=Package already exists. Note: Views might
filter empty parent packages
-Error_JBossWS_GenerateWizard_PackageExistsDifferentCase=Package already exists with a
different case
+Error_JBossWS_GenerateWizard_PackageExistsDifferentCase=Package already exists with a
different case
Error_JBossWS_GenerateWizard_NoSrcInProject=The project misses JAVA Source folders
+Error_WS_No_Runtime_Specifed=A JBossWS runtime has not been chosen
+Error_WS_Chose_runtime=Select a JBoss Web Service runtime. If a server supplied JBoss Web
Service runtime is chosen ,\n the chosen server adapter must be capable of providing the
JBoss Web Service runtime
+Error_JBossWSRuntimeConfigBlock_Duplicated_Jar=Duplicated jar on classpath:{0}
+
JBossWS_DelimitedStringList_EditValue_Dialog_Title=Edit Value
JBossWS_DelimitedStringList_EditValue_Dialog_Message=Specify the updated value below.
JAXRSWSTestView_Action_URL_Label=Action URL:
JAXRSWSTestView_Configure_Monitor_Button=Configure Monitor
JAXRSWSTestView_CopyResultsMenu=&Copy
-JAXRSWSTestView_Exception_Status=Exception:
+JAXRSWSTestView_Exception_Status=Exception\:
JAXRSWSTestView_HTTP_Method_Label=HTTP Method:
JAXRSWSTestView_Invoke_Label=Invoke
JAXRSWSTestView_Invoking_WS_Status=Invoking web service...
@@ -89,4 +101,4 @@
JAXRSWSTestView_Service_URL_Label=Service URL:
JAXRSWSTestView_Set_Sample_Data_Label=Set Sample Data
JAXRSWSTestView_Web_Service_Type_Label=Web Service Type:
-ResultsXMLStorageInput_WS_Invocation_Results_Prefix=Web Service Invocation Results:
+ResultsXMLStorageInput_WS_Invocation_Results_Prefix=Web Service Invocation Results\:
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 2010-05-24
06:24:57 UTC (rev 22270)
+++
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JBossWSUIMessages.java 2010-05-24
07:14:25 UTC (rev 22271)
@@ -71,6 +71,14 @@
public static String JBossWSGenerateWebXmlWizardPage_Project_Group_Tooltip;
public static String JBossWSGenerateWebXmlWizardPage_Web_Service_Group;
+ public static String JBossWSFacetInstallPage_ServerSuppliedJBossWS;
+ public static String JBossWSFacetInstallPage_New;
+ public static String JBossWSFacetInstallPage_Deploy;
+ public static String JBossWSRuntimeInstallPage_NoTargetRuntime;
+ public static String JBossWSRuntimeInstallPage_NoValidJBossWSRuntime;
+ public static String JBossWSFacetInstallPage_Title;
+ public static String JBossWSFacetInstallPage_Description;
+
public static String Error_JBossWS_GenerateWizard_NoProjectSelected;
public static String Error_JBossWS_Label_Runtime_Load;
public static String Error_JBossWS_Basic_Editor_Composite;
@@ -89,7 +97,11 @@
public static String Error_JBossWS_GenerateWizard_PackageNotShown;
public static String Error_JBossWS_GenerateWizard_PackageExistsDifferentCase;
public static String Error_JBossWS_GenerateWizard_NoSrcInProject;
-
+
+ public static String Error_WS_No_Runtime_Specifed;
+ public static String Error_WS_Chose_runtime;
+ public static String Error_JBossWSRuntimeConfigBlock_Duplicated_Jar;
+
public static String JBossWS_DelimitedStringList_EditValue_Dialog_Title;
public static String JBossWS_DelimitedStringList_EditValue_Dialog_Message;
public static String JAXRSWSTestView_Action_URL_Label;
@@ -113,7 +125,7 @@
public static String JAXRSWSTestView_Set_Sample_Data_Label;
public static String JAXRSWSTestView_Web_Service_Type_Label;
public static String ResultsXMLStorageInput_WS_Invocation_Results_Prefix;
-
+
static {
NLS.initializeMessages(BUNDLE_NAME, JBossWSUIMessages.class);
}
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 2010-05-24
06:24:57 UTC (rev 22270)
+++
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/JBossWSRuntimeListFieldEditor.java 2010-05-24
07:14:25 UTC (rev 22271)
@@ -466,6 +466,7 @@
name.addPropertyChangeListener(this);
version.doFillIntoGrid(root);
version.addPropertyChangeListener(this);
+ version.setValue(getWSFacetVersions().get(1));
homeDir.doFillIntoGrid(root);
homeDir.addPropertyChangeListener(this);
Copied: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/project/facet
(from rev 21295,
trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/project/facet)
Modified:
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/project/facet/IMessageNotifier.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/project/facet/IMessageNotifier.java 2010-04-06
20:50:12 UTC (rev 21295)
+++
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/project/facet/IMessageNotifier.java 2010-05-24
07:14:25 UTC (rev 22271)
@@ -1,4 +1,4 @@
-package org.jboss.tools.ws.creation.ui.project.facet;
+package org.jboss.tools.ws.ui.project.facet;
public interface IMessageNotifier {
Modified:
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/project/facet/JBossWSFacetInstallPage.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/project/facet/JBossWSFacetInstallPage.java 2010-04-06
20:50:12 UTC (rev 21295)
+++
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/project/facet/JBossWSFacetInstallPage.java 2010-05-24
07:14:25 UTC (rev 22271)
@@ -8,7 +8,7 @@
* Contributors:
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
-package org.jboss.tools.ws.creation.ui.project.facet;
+package org.jboss.tools.ws.ui.project.facet;
import java.text.MessageFormat;
@@ -19,7 +19,7 @@
import org.eclipse.wst.common.project.facet.ui.AbstractFacetWizardPage;
import org.eclipse.wst.common.project.facet.ui.IFacetWizardPage;
import org.jboss.tools.ws.core.facet.delegate.JBossWSFacetInstallDataModelProvider;
-import org.jboss.tools.ws.creation.core.messages.JBossWSCreationCoreMessages;
+import org.jboss.tools.ws.ui.messages.JBossWSUIMessages;
/**
* @author Dennyxu
@@ -40,8 +40,8 @@
public void setConfig(Object config) {
this.model = (IDataModel) config;
String JbossWSVersion =
(String)model.getProperty(JBossWSFacetInstallDataModelProvider.FACET_VERSION_STR);
- setTitle(MessageFormat.format(JBossWSCreationCoreMessages.JBossWSFacetInstallPage_Title,
JbossWSVersion));
- setDescription(MessageFormat.format(JBossWSCreationCoreMessages.JBossWSFacetInstallPage_Description,
JbossWSVersion));
+ setTitle(MessageFormat.format(JBossWSUIMessages.JBossWSFacetInstallPage_Title,
JbossWSVersion));
+ setDescription(MessageFormat.format(JBossWSUIMessages.JBossWSFacetInstallPage_Description,
JbossWSVersion));
}
public void createControl(Composite parent) {
Modified:
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/project/facet/JBossWSPropertyPage.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/project/facet/JBossWSPropertyPage.java 2010-04-06
20:50:12 UTC (rev 21295)
+++
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/project/facet/JBossWSPropertyPage.java 2010-05-24
07:14:25 UTC (rev 22271)
@@ -1,4 +1,4 @@
-package org.jboss.tools.ws.creation.ui.project.facet;
+package org.jboss.tools.ws.ui.project.facet;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
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.creation.ui/src/org/jboss/tools/ws/creation/ui/project/facet/JBossWSRuntimeConfigBlock.java 2010-04-06
20:50:12 UTC (rev 21295)
+++
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/project/facet/JBossWSRuntimeConfigBlock.java 2010-05-24
07:14:25 UTC (rev 22271)
@@ -1,4 +1,4 @@
-package org.jboss.tools.ws.creation.ui.project.facet;
+package org.jboss.tools.ws.ui.project.facet;
import java.text.MessageFormat;
import java.util.ArrayList;
@@ -39,8 +39,8 @@
import org.jboss.tools.ws.core.facet.delegate.JBossWSFacetInstallDataModelProvider;
import org.jboss.tools.ws.core.messages.JBossWSCoreMessages;
import org.jboss.tools.ws.core.utils.StatusUtils;
-import org.jboss.tools.ws.creation.core.messages.JBossWSCreationCoreMessages;
-import org.jboss.tools.ws.creation.ui.JBossWSCreationUIPlugin;
+import org.jboss.tools.ws.ui.JBossWSUIPlugin;
+import org.jboss.tools.ws.ui.messages.JBossWSUIMessages;
import org.jboss.tools.ws.ui.preferences.JBossWSRuntimeListFieldEditor;
public class JBossWSRuntimeConfigBlock {
@@ -50,28 +50,26 @@
private Combo cmbRuntimes;
private Button btnDeploy;
private Button btnNew;
-
+
private String errMsg;
private IMessageNotifier notifier;
private String jbossWSVersion;
private IDataModel model;
-
+
private final static String JBOSS_IDE_AS_RUNTIME_ID =
"org.jboss.ide.eclipse.as.runtime"; //$NON-NLS-1$
private final static String JBOSS_IDE_EAP_RUNTIME_ID =
"org.jboss.ide.eclipse.as.runtime.eap"; //$NON-NLS-1$
-
- public JBossWSRuntimeConfigBlock(Object config){
+
+ public JBossWSRuntimeConfigBlock(Object config) {
this.model = (IDataModel) config;
- jbossWSVersion =
(String)model.getProperty(JBossWSFacetInstallDataModelProvider.FACET_VERSION_STR);
-// validateTargetRuntime();
+ jbossWSVersion = (String) model
+ .getProperty(JBossWSFacetInstallDataModelProvider.FACET_VERSION_STR);
+ // validateTargetRuntime();
}
-
- public void setMessageNotifier(IMessageNotifier notifier){
+ public void setMessageNotifier(IMessageNotifier notifier) {
this.notifier = notifier;
}
-
-
public Composite createControl(Composite parent) {
@@ -98,13 +96,14 @@
setServerSuppliedSelection(e);
}
});
- lblServerSupplied.setText(JBossWSCreationCoreMessages.JBossWSFacetInstallPage_ServerSuppliedJBossWS);
+ lblServerSupplied
+ .setText(JBossWSUIMessages.JBossWSFacetInstallPage_ServerSuppliedJBossWS);
gd = new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalSpan = 2;
lblServerSupplied.setLayoutData(gd);
btnUserSupplied = new Button(composite, SWT.RADIO);
-
+
btnUserSupplied.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
setUserSuppliedSelection(e);
@@ -124,16 +123,17 @@
});
btnNew = new Button(composite, SWT.NONE);
- btnNew.setText(JBossWSCreationCoreMessages.JBossWSFacetInstallPage_New);
+ btnNew.setText(JBossWSUIMessages.JBossWSFacetInstallPage_New);
btnNew.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
newJBossWSRuntime();
changePageStatus();
}
});
-
+
btnDeploy = new Button(composite, SWT.CHECK);
- btnDeploy.setText(JBossWSCreationCoreMessages.JBossWSFacetInstallPage_Deploy);
+ btnDeploy
+ .setText(JBossWSUIMessages.JBossWSFacetInstallPage_Deploy);
btnDeploy.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
model.setBooleanProperty(
@@ -144,67 +144,75 @@
gd = new GridData();
gd.horizontalSpan = 3;
btnDeploy.setLayoutData(gd);
-
+
setInitialValues();
changePageStatus();
-
+
return composite;
}
-
- private void validateTargetRuntime(){
- IFacetedProjectWorkingCopy fpWorkingCopy =
(IFacetedProjectWorkingCopy)model.getProperty(JBossWSFacetInstallDataModelProvider.FACETED_PROJECT_WORKING_COPY);
- IRuntime runtime = fpWorkingCopy.getPrimaryRuntime();
- if(runtime == null){
- setErrorMessage(JBossWSCreationCoreMessages.JBossWSRuntimeInstallPage_NoTargetRuntime);
+
+ private void validateTargetRuntime() {
+ IFacetedProjectWorkingCopy fpWorkingCopy = (IFacetedProjectWorkingCopy) model
+ .getProperty(JBossWSFacetInstallDataModelProvider.FACETED_PROJECT_WORKING_COPY);
+ IRuntime runtime = null;
+ if (fpWorkingCopy != null) {
+ runtime = fpWorkingCopy.getPrimaryRuntime();
+ }
+ if (runtime == null) {
+ setErrorMessage(JBossWSUIMessages.JBossWSRuntimeInstallPage_NoTargetRuntime);
return;
}
-
- org.eclipse.wst.server.core.IRuntime serverRuntime =
ServerCore.findRuntime(runtime.getProperty("id")); //$NON-NLS-1$
+
+ org.eclipse.wst.server.core.IRuntime serverRuntime = ServerCore
+ .findRuntime(runtime.getProperty("id")); //$NON-NLS-1$
IRuntimeType rt = serverRuntime.getRuntimeType();
String runtimeTypeId = rt.getId();
String version = rt.getVersion();
- if(runtimeTypeId.indexOf(JBOSS_IDE_AS_RUNTIME_ID) < 0 &&
runtimeTypeId.indexOf(JBOSS_IDE_EAP_RUNTIME_ID) < 0){
- setErrorMessage(JBossWSCreationCoreMessages.JBossWSRuntimeInstallPage_NoValidJBossWSRuntime);
+ if (runtimeTypeId.indexOf(JBOSS_IDE_AS_RUNTIME_ID) < 0
+ && runtimeTypeId.indexOf(JBOSS_IDE_EAP_RUNTIME_ID) < 0) {
+ setErrorMessage(JBossWSUIMessages.JBossWSRuntimeInstallPage_NoValidJBossWSRuntime);
return;
}
-
- if("3.0".compareTo(jbossWSVersion) <= 0){ //$NON-NLS-1$
- if("5.0".compareTo(version) > 0){ //$NON-NLS-1$
- setErrorMessage(JBossWSCreationCoreMessages.JBossWSRuntimeInstallPage_NoValidJBossWSRuntime);
+
+ if ("3.0".compareTo(jbossWSVersion) <= 0) { //$NON-NLS-1$
+ if ("5.0".compareTo(version) > 0) { //$NON-NLS-1$
+ setErrorMessage(JBossWSUIMessages.JBossWSRuntimeInstallPage_NoValidJBossWSRuntime);
return;
}
}
-
+
setErrorMessage(null);
-
-
+
}
-
- private void setInitialValues(){
- boolean isServerSupplied =
model.getBooleanProperty(IJBossWSFacetDataModelProperties.JBOSS_WS_RUNTIME_IS_SERVER_SUPPLIED);
- String runtimeName =
model.getStringProperty(IJBossWSFacetDataModelProperties.JBOSS_WS_RUNTIME_ID);
- boolean isDeploy =
model.getBooleanProperty(IJBossWSFacetDataModelProperties.JBOSS_WS_DEPLOY);
- if(isServerSupplied){
+
+ private void setInitialValues() {
+ boolean isServerSupplied = model
+ .getBooleanProperty(IJBossWSFacetDataModelProperties.JBOSS_WS_RUNTIME_IS_SERVER_SUPPLIED);
+ String runtimeName = model
+ .getStringProperty(IJBossWSFacetDataModelProperties.JBOSS_WS_RUNTIME_ID);
+ boolean isDeploy = model
+ .getBooleanProperty(IJBossWSFacetDataModelProperties.JBOSS_WS_DEPLOY);
+ if (isServerSupplied) {
btnServerSupplied.setSelection(true);
enableUserSupplied(false);
- }else if(runtimeName != null && !runtimeName.equals("")){
//$NON-NLS-1$
+ } else if (runtimeName != null && !runtimeName.equals("")) {
//$NON-NLS-1$
btnUserSupplied.setSelection(true);
- if(isDeploy){
+ if (isDeploy) {
btnDeploy.setSelection(true);
}
-
+
}
initializeRuntimesCombo(cmbRuntimes, runtimeName);
-
+
}
-
+
protected void saveJBosswsRuntimeToModel(JBossWSRuntime jbws) {
String duplicateMsg = ""; //$NON-NLS-1$
try {
duplicateMsg = getDuplicateJars(jbws.getName());
} catch (JavaModelException e1) {
- JBossWSCreationUIPlugin.getDefault().getLog().log(
+ JBossWSUIPlugin.getDefault().getLog().log(
StatusUtils.errorStatus(e1));
}
if ("".equals(duplicateMsg)) { //$NON-NLS-1$
@@ -214,11 +222,12 @@
model.setStringProperty(
IJBossWSFacetDataModelProperties.JBOSS_WS_RUNTIME_ID, jbws
.getName());
- }else{
+ } else {
model.setStringProperty(
IJBossWSFacetDataModelProperties.JBOSS_WS_RUNTIME_ID, null);
model.setStringProperty(
- IJBossWSFacetDataModelProperties.JBOSS_WS_RUNTIME_HOME, null);
+ IJBossWSFacetDataModelProperties.JBOSS_WS_RUNTIME_HOME,
+ null);
}
}
@@ -229,13 +238,13 @@
.setBooleanProperty(
IJBossWSFacetDataModelProperties.JBOSS_WS_RUNTIME_IS_SERVER_SUPPLIED,
true);
- //remove user supplied properties
+ // remove user supplied properties
model.setStringProperty(
IJBossWSFacetDataModelProperties.JBOSS_WS_RUNTIME_ID, null);
model.setStringProperty(
- IJBossWSFacetDataModelProperties.JBOSS_WS_RUNTIME_HOME, null);
+ IJBossWSFacetDataModelProperties.JBOSS_WS_RUNTIME_HOME, null);
enableUserSupplied(false);
-
+
changePageStatus();
}
@@ -247,10 +256,10 @@
.setBooleanProperty(
IJBossWSFacetDataModelProperties.JBOSS_WS_RUNTIME_IS_SERVER_SUPPLIED,
false);
- String runtimeId = cmbRuntimes.getText();
- JBossWSRuntime jbws =
JBossWSRuntimeManager.getInstance().findRuntimeByName(runtimeId);
-
-
+ String runtimeId = cmbRuntimes.getText();
+ JBossWSRuntime jbws = JBossWSRuntimeManager.getInstance()
+ .findRuntimeByName(runtimeId);
+
if (jbws != null) {
saveJBosswsRuntimeToModel(jbws);
}
@@ -269,22 +278,22 @@
protected void initializeRuntimesCombo(Combo cmRuntime, String runtimeName) {
JBossWSRuntime selectedJbws = null;
JBossWSRuntime defaultJbws = null;
-// int selectIndex = 0;
+ // int selectIndex = 0;
int defaultIndex = 0;
cmRuntime.removeAll();
JBossWSRuntime[] runtimes = JBossWSRuntimeManager.getInstance()
.getRuntimes();
for (int i = 0; i < runtimes.length; i++) {
JBossWSRuntime jr = runtimes[i];
- if(jbossWSVersion.compareTo(jr.getVersion()) > 0){
+ if (jbossWSVersion.compareTo(jr.getVersion()) > 0) {
continue;
}
cmRuntime.add(jr.getName());
cmRuntime.setData(jr.getName(), jr);
-
- if(jr.getName().equals(runtimeName)){
+
+ if (jr.getName().equals(runtimeName)) {
selectedJbws = jr;
-// selectIndex = i;
+ // selectIndex = i;
}
// get default jbossws runtime
if (jr.isDefault()) {
@@ -292,11 +301,11 @@
defaultIndex = i;
}
}
-
- if(selectedJbws != null){
- cmRuntime.setText(runtimeName);
- saveJBosswsRuntimeToModel(selectedJbws);
- }else if(defaultJbws != null){
+
+ if (selectedJbws != null) {
+ cmRuntime.setText(runtimeName);
+ saveJBosswsRuntimeToModel(selectedJbws);
+ } else if (defaultJbws != null) {
cmRuntime.select(defaultIndex);
saveJBosswsRuntimeToModel(defaultJbws);
}
@@ -306,9 +315,10 @@
* create a new jbossws runtime and set user supplied runtime to the new one
*/
protected void newJBossWSRuntime() {
- List<JBossWSRuntime> exists = new
ArrayList<JBossWSRuntime>(Arrays.asList(JBossWSRuntimeManager.getInstance().getRuntimes()));
+ List<JBossWSRuntime> exists = new ArrayList<JBossWSRuntime>(Arrays
+ .asList(JBossWSRuntimeManager.getInstance().getRuntimes()));
List<JBossWSRuntime> added = new ArrayList<JBossWSRuntime>();
-
+
JBossWSRuntimeListFieldEditor.JBossWSRuntimeNewWizard newRtwizard = new
JBossWSRuntimeListFieldEditor.JBossWSRuntimeNewWizard(
exists, added) {
public boolean performFinish() {
@@ -324,57 +334,57 @@
.getActiveShell(), newRtwizard);
if (dialog.open() == WizardDialog.OK) {
initializeRuntimesCombo(cmbRuntimes, null);
- //cmbRuntimes.select(0);
+ // cmbRuntimes.select(0);
}
}
protected void changePageStatus() {
-
+
if (btnUserSupplied.getSelection()
&& cmbRuntimes.getSelectionIndex() == -1) {
- setErrorMessage(JBossWSCreationCoreMessages.Error_WS_No_Runtime_Specifed);
+ setErrorMessage(JBossWSUIMessages.Error_WS_No_Runtime_Specifed);
} else if (!btnUserSupplied.getSelection()
&& !btnServerSupplied.getSelection()) {
- setErrorMessage(JBossWSCreationCoreMessages.Error_WS_Chose_runtime);
- }else if(btnUserSupplied.getSelection()){
+ setErrorMessage(JBossWSUIMessages.Error_WS_Chose_runtime);
+ } else if (btnUserSupplied.getSelection()) {
String duplicateMsg = ""; //$NON-NLS-1$
try {
duplicateMsg = getDuplicateJars(cmbRuntimes.getText());
} catch (JavaModelException e1) {
- JBossWSCreationUIPlugin.getDefault().getLog().log(StatusUtils.errorStatus(e1));
+ JBossWSUIPlugin.getDefault().getLog().log(
+ StatusUtils.errorStatus(e1));
}
- if(!duplicateMsg.equals("")){ //$NON-NLS-1$
+ if (!duplicateMsg.equals("")) { //$NON-NLS-1$
setErrorMessage(MessageFormat
- .format(JBossWSCreationCoreMessages.JBossWSRuntimeConfigBlock_Duplicated_Jar,
+ .format(
+ JBossWSUIMessages.Error_JBossWSRuntimeConfigBlock_Duplicated_Jar,
duplicateMsg));
- }else{
+ } else {
setErrorMessage(null);
}
- }
- else if(btnServerSupplied.getSelection()){
+ } else if (btnServerSupplied.getSelection()) {
validateTargetRuntime();
- }
- else{
+ } else {
setErrorMessage(null);
}
-
- //notify the parent property page to set error message
- if(notifier != null){
- notifier.notify(errMsg);
+
+ // notify the parent property page to set error message
+ if (notifier != null) {
+ notifier.notify(errMsg);
}
}
- private void setErrorMessage(String msg){
+ private void setErrorMessage(String msg) {
this.errMsg = msg;
}
-
+
public boolean isPageComplete() {
- if(errMsg != null && !"".equals(errMsg)){ //$NON-NLS-1$
+ if (errMsg != null && !"".equals(errMsg)) { //$NON-NLS-1$
return false;
}
if (btnServerSupplied.getSelection()
|| (btnUserSupplied.getSelection() && cmbRuntimes
- .getSelectionIndex() != -1)) {
+ .getSelectionIndex() != -1)) {
return true;
} else {
return false;
@@ -384,51 +394,59 @@
public void propertyChanged(DataModelEvent event) {
}
-
- protected String getDuplicateJars(String jbwsName) throws JavaModelException{
- String prjName =
model.getStringProperty(IFacetDataModelProperties.FACET_PROJECT_NAME);
-
- if(prjName == null || "".equals(prjName)){ //$NON-NLS-1$
+
+ protected String getDuplicateJars(String jbwsName)
+ throws JavaModelException {
+ String prjName = model
+ .getStringProperty(IFacetDataModelProperties.FACET_PROJECT_NAME);
+
+ if (prjName == null || "".equals(prjName)) { //$NON-NLS-1$
return ""; //$NON-NLS-1$
}
- IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(prjName);
- if(!project.exists()){
+ IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(
+ prjName);
+ if (!project.exists()) {
return ""; //$NON-NLS-1$
}
-
+
List<String> allExistingJars = new ArrayList<String>();
List<String> runtimeJars = new ArrayList<String>();
- JBossWSRuntime jbws = JBossWSRuntimeManager.getInstance().findRuntimeByName(jbwsName);
- if(jbws.isUserConfigClasspath()){
+ JBossWSRuntime jbws = JBossWSRuntimeManager.getInstance()
+ .findRuntimeByName(jbwsName);
+ if (jbws.isUserConfigClasspath()) {
runtimeJars.addAll(jbws.getLibraries());
- }else{
- runtimeJars.addAll(JBossWSRuntimeManager.getInstance().getAllRuntimeJars(jbws));
+ } else {
+ runtimeJars.addAll(JBossWSRuntimeManager.getInstance()
+ .getAllRuntimeJars(jbws));
}
-
+
IJavaProject javaProject = JavaCore.create(project);
IClasspathEntry[] entries = javaProject.getRawClasspath();
- for(IClasspathEntry entry: entries){
- if(entry.getEntryKind() == IClasspathEntry.CPE_CONTAINER){
- if(JBossWSCoreMessages.JBossWS_Runtime_Lib.equals(entry.getPath().segment(0))){
- continue;
+ for (IClasspathEntry entry : entries) {
+ if (entry.getEntryKind() == IClasspathEntry.CPE_CONTAINER) {
+ if (JBossWSCoreMessages.JBossWS_Runtime_Lib.equals(entry
+ .getPath().segment(0))) {
+ continue;
}
- IClasspathContainer container = JavaCore.getClasspathContainer(entry.getPath(),
javaProject);
- for(IClasspathEntry containedEntry: container.getClasspathEntries()){
+ IClasspathContainer container = JavaCore.getClasspathContainer(
+ entry.getPath(), javaProject);
+ for (IClasspathEntry containedEntry : container
+ .getClasspathEntries()) {
allExistingJars.add(containedEntry.getPath().toOSString());
}
- }else if(entry.getEntryKind() == IClasspathEntry.CPE_LIBRARY){
+ } else if (entry.getEntryKind() == IClasspathEntry.CPE_LIBRARY) {
allExistingJars.add(entry.getPath().toOSString());
}
}
-
- for(String jarName: runtimeJars){
- if(allExistingJars.contains(jarName)){
+
+ for (String jarName : runtimeJars) {
+ if (allExistingJars.contains(jarName)) {
return jarName;
}
}
-
- return ""; //$NON-NLS-1$
-
+
+ return ""; //$NON-NLS-1$
+
}
}
Modified:
trunk/ws/tests/org.jboss.tools.ws.core.test/src/org/jboss/tools/ws/core/test/JBossWSCoreAllTests.java
===================================================================
---
trunk/ws/tests/org.jboss.tools.ws.core.test/src/org/jboss/tools/ws/core/test/JBossWSCoreAllTests.java 2010-05-24
06:24:57 UTC (rev 22270)
+++
trunk/ws/tests/org.jboss.tools.ws.core.test/src/org/jboss/tools/ws/core/test/JBossWSCoreAllTests.java 2010-05-24
07:14:25 UTC (rev 22271)
@@ -16,6 +16,7 @@
import junit.framework.TestSuite;
import org.jboss.tools.ws.core.test.classpath.JBossWSRuntimeManagerTest;
+import org.jboss.tools.ws.core.test.project.facet.JBossWSProjectFacetTest;
public class JBossWSCoreAllTests extends TestCase {
public static final String PLUGIN_ID =
"org.jboss.tools.ws.creation.core.test";
@@ -23,6 +24,7 @@
{
TestSuite suite = new TestSuite(JBossWSCoreAllTests.class.getName());
suite.addTestSuite(JBossWSRuntimeManagerTest.class);
+ suite.addTestSuite(JBossWSProjectFacetTest.class);
return suite;
}
}
\ No newline at end of file
Added:
trunk/ws/tests/org.jboss.tools.ws.core.test/src/org/jboss/tools/ws/core/test/project/facet/JBossWSProjectFacetTest.java
===================================================================
---
trunk/ws/tests/org.jboss.tools.ws.core.test/src/org/jboss/tools/ws/core/test/project/facet/JBossWSProjectFacetTest.java
(rev 0)
+++
trunk/ws/tests/org.jboss.tools.ws.core.test/src/org/jboss/tools/ws/core/test/project/facet/JBossWSProjectFacetTest.java 2010-05-24
07:14:25 UTC (rev 22271)
@@ -0,0 +1,56 @@
+package org.jboss.tools.ws.core.test.project.facet;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.wst.common.project.facet.core.IFacetedProject;
+import org.eclipse.wst.common.project.facet.core.IProjectFacet;
+import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
+import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
+
+public class JBossWSProjectFacetTest extends TestCase {
+ protected static final IWorkspace ws = ResourcesPlugin.getWorkspace();
+ private static final IProjectFacet wsFacet;
+ private static final IProjectFacetVersion wsVersion;
+ private IFacetedProject wsProj;
+ static {
+ wsFacet = ProjectFacetsManager.getProjectFacet("jbossws.core");
+ wsVersion = wsFacet.getVersion("3.0");
+ }
+
+ @Override
+ protected void setUp() throws Exception {
+ // TODO Auto-generated method stub
+ super.setUp();
+ wsProj = createFacetedProject("wsFacetTestProject");
+ }
+
+ public void testWSFacet() throws CoreException{
+ wsProj.installProjectFacet(ProjectFacetsManager.getProjectFacet("jst.java").getVersion("5.0"),
null, null);
+ wsProj.installProjectFacet(ProjectFacetsManager.getProjectFacet("jst.web").getVersion("2.5"),
null, null);
+ wsProj.installProjectFacet(wsVersion, null, null);
+ assertTrue(wsProj.hasProjectFacet(wsFacet));
+ wsProj.uninstallProjectFacet(wsVersion, null, null);
+ assertFalse(wsProj.hasProjectFacet(wsVersion));
+ }
+
+ protected void tearDown() throws Exception {
+ wsProj.getProject().delete(true, null);
+ super.tearDown();
+ }
+
+ protected IFacetedProject createFacetedProject(String name)
+ throws CoreException
+
+ {
+ assertFalse(ws.getRoot().getProject(name).exists());
+ final IFacetedProject fpj = ProjectFacetsManager.create(name, null,
+ null);
+ final IProject pj = fpj.getProject();
+ assertTrue(pj.exists());
+ return fpj;
+ }
+}
Property changes on:
trunk/ws/tests/org.jboss.tools.ws.core.test/src/org/jboss/tools/ws/core/test/project/facet/JBossWSProjectFacetTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/META-INF/MANIFEST.MF 2010-05-24 06:24:57
UTC (rev 22270)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/META-INF/MANIFEST.MF 2010-05-24 07:14:25
UTC (rev 22271)
@@ -15,9 +15,10 @@
org.eclipse.swtbot.junit4_x;bundle-version="2.0.0",
org.eclipse.swtbot.swt.finder;bundle-version="2.0.0",
org.eclipse.ui.ide;bundle-version="3.5.1",
- org.eclipse.ui.forms;bundle-version="3.4.1",
+ org.eclipse.ui.forms;bundle-version="3.4.1",
org.junit4;bundle-version="4.5.0",
- org.jboss.tools.ws.ui;bundle-version="1.1.0"
+ org.jboss.tools.ws.ui;bundle-version="1.1.0",
+ org.eclipse.core.resources
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Eclipse-RegisterBuddy: org.apache.log4j
Added:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/JBossWSProjectFacetBotTest.java
===================================================================
---
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/JBossWSProjectFacetBotTest.java
(rev 0)
+++
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/JBossWSProjectFacetBotTest.java 2010-05-24
07:14:25 UTC (rev 22271)
@@ -0,0 +1,107 @@
+package org.jboss.tools.ws.ui.bot.test;
+
+import java.io.IOException;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
+
+public class JBossWSProjectFacetBotTest extends TestCase {
+ private static SWTWorkbenchBot bot;
+ private static final String JBOSSWS_HOME_DEFAULT =
"D:/softinstall/jboss-5.1.0.GA";
+ public static final String JBOSSWS_42_HOME =
"jbosstools.test.jboss.home.5.1";
+ public static final String JBOSS_AS_42_HOME = System.getProperty(
+ JBOSSWS_42_HOME, JBOSSWS_HOME_DEFAULT);
+ private IProject project;
+
+ protected void setUp() throws Exception {
+ bot = new SWTWorkbenchBot();
+ bot.viewByTitle("Welcome").close();
+ createServerRuntime();
+ }
+
+ public void testNewWizard() throws IOException, CoreException {
+ bot.menu("File").menu("New").menu("Project...").click();
+ bot.shell("New Project").activate();
+ SWTBotTree tree = bot.tree();
+ tree.expandNode("Web").expandNode("Dynamic Web Project").select();
+ assertTrue(bot.button("Next >").isEnabled());
+ bot.button("Next >").click();
+ bot.shell("New Dynamic Web Project").activate();
+ assertFalse(bot.button("Finish").isEnabled());
+
+ bot.textWithLabel("Project name:").setText("A");
+ assertTrue(bot.button("Finish").isEnabled());
+ bot.comboBoxInGroup("Dynamic web module
version").setSelection("2.5");
+ bot.comboBoxInGroup("Configuration").setSelection("JBossWS Web
Service Project v3.0");
+ assertFalse(bot.button("Finish").isEnabled());
+ bot.button("Next >").click();
+ bot.button("Next >").click();
+ bot.button("Next >").click();
+ bot.radio(0).click();
+ bot.sleep(6000);
+ assertTrue(bot.button("Finish").isEnabled());
+ bot.button("Finish").click();
+
+ project = ResourcesPlugin.getWorkspace().getRoot().getProject("A");
+ assertNotNull(project);
+
+ }
+
+ protected void tearDown() throws Exception {
+ bot = null;
+ }
+
+ protected void createServerRuntime() {
+ if (!isServerRuntimeDefined(bot, "AS4.2Runtime")) {
+ bot.menu("File").menu("New").menu("Other...").click();
+ bot.shell("New").activate();
+ SWTBotTree tree = bot.tree();
+ bot.sleep(1000);
+ tree.expandNode("Server").select("Server");
+ bot.button("Next >").click();
+ SWTBotTree tree2 = bot.tree();
+ tree2.expandNode("JBoss Community").select("JBoss AS 5.1");
+ bot.textWithLabel("Server name:").setText("AS4.2Server");
+ bot.button("Next >").click();
+ bot.textWithLabel("Name").setText("AS4.2Runtime");
+ bot.textWithLabel("Home Directory").setText(JBOSS_AS_42_HOME);
+ bot.button("Finish").click();
+ bot.sleep(2000);
+ }
+ }
+
+ public static boolean isServerRuntimeDefined(SWTWorkbenchBot bot,
+ String runtimeName) {
+
+ boolean serverRuntimeNotDefined = true;
+
+ bot.menu("Window").menu("Preferences").click();
+ bot.shell("Preferences").activate();
+ bot.tree().expandNode("Server").select("Runtime Environments");
+
+ SWTBotTable tbRuntimeEnvironments = bot.table();
+ int numRows = tbRuntimeEnvironments.rowCount();
+ if (numRows > 0) {
+ int currentRow = 0;
+ while (serverRuntimeNotDefined && currentRow < numRows) {
+ if (tbRuntimeEnvironments.cell(currentRow, 0).equalsIgnoreCase(
+ runtimeName)) {
+ serverRuntimeNotDefined = false;
+ } else {
+ currentRow++;
+ }
+ }
+ }
+
+ bot.button("OK").click();
+
+ return !serverRuntimeNotDefined;
+
+ }
+}
Property changes on:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/JBossWSProjectFacetBotTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain