Author: Grid.Qian
Date: 2008-11-12 04:03:50 -0500 (Wed, 12 Nov 2008)
New Revision: 11697
Modified:
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/ValidateWSImplCommand.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
Log:
JBIDE-3174: a error dialog opened when web service annotation isjavax.jws.WebService
Modified:
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/ValidateWSImplCommand.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/ValidateWSImplCommand.java 2008-11-12
08:22:45 UTC (rev 11696)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/ValidateWSImplCommand.java 2008-11-12
09:03:50 UTC (rev 11697)
@@ -40,7 +40,7 @@
@Override
public IStatus execute(IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
-
+
String implClass = model.getServiceClasses().get(0);
String project = model.getWebProjectName();
ICompilationUnit unit = null;
@@ -48,14 +48,18 @@
if (JBossWSCreationUtils.getJavaProjectByName(project).findType(
implClass) != null) {
unit = JBossWSCreationUtils.getJavaProjectByName(project)
- .findType(implClass).getCompilationUnit();
+ .findType(implClass).getCompilationUnit();
} else {
return StatusUtils.errorStatus(NLS.bind(
JBossWSCreationCoreMessages.Error_No_Class,
new String[] { implClass, project }));
}
if (!unit.getSource().contains(
- JBossWSCreationCoreMessages.Webservice_Annotation)) {
+ JBossWSCreationCoreMessages.Webservice_Annotation)
+ && !unit
+ .getSource()
+ .contains(
+ JBossWSCreationCoreMessages.Webservice_Annotation_Prefix)) {
return StatusUtils
.errorStatus(JBossWSCreationCoreMessages.Error_No_Annotation);
}
@@ -64,7 +68,7 @@
return StatusUtils.errorStatus(NLS.bind(
JBossWSCreationCoreMessages.Error_No_Class, new String[] {
implClass, project }));
- }
+ }
return Status.OK_STATUS;
}
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 2008-11-12
08:22:45 UTC (rev 11696)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/messages/JBossWSCreationCore.properties 2008-11-12
09:03:50 UTC (rev 11697)
@@ -23,6 +23,7 @@
Error_No_Annotation=This class has no required JAXWS Annotation!
WebserviceClient_Annotation=@WebServiceClient
Webservice_Annotation=@WebService
+Webservice_Annotation_Prefix=(a)javax.jws.WebService
Error_No_Class= The class {0} cannot be loaded via project {1}.Check that the project
contains the class, or that the class is loadable according to the Java Build Path of the
project.
Error_WS_Location=The JBoss WS Runtime Location is NULL. Please set the location on JBoss
WS preferences page.
Webservice_Annotation_Check=@WebService(
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 2008-11-12
08:22:45 UTC (rev 11696)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/messages/JBossWSCreationCoreMessages.java 2008-11-12
09:03:50 UTC (rev 11697)
@@ -50,6 +50,7 @@
public static String Error_WS_Chose_runtime;
public static String Webservice_Annotation_Check;
public static String Webservice_Annotation;
+ public static String Webservice_Annotation_Prefix;
public static String Client_Sample_Package_Name;
public static String Client_Sample_Class_Name;
public static String Error_Create_Client_Sample;
Show replies by date