JBoss Tools SVN: r42791 - in trunk: jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2012-07-30 19:15:57 -0400 (Mon, 30 Jul 2012)
New Revision: 42791
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/test_jsf_project/WebContent/pages/test_page2.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JSPProblemMarkerResolutionTest.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/AddTLDMarkerResolution.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/JSPProblemMarkerResolutionGenerator.java
Log:
Make Quick Fix "Add tag library definition" work with KB Model instead of using plain tag library list https://issues.jboss.org/browse/JBIDE-12304
Modified: trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/test_jsf_project/WebContent/pages/test_page2.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/test_jsf_project/WebContent/pages/test_page2.xhtml 2012-07-30 23:08:26 UTC (rev 42790)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/test_jsf_project/WebContent/pages/test_page2.xhtml 2012-07-30 23:15:57 UTC (rev 42791)
@@ -1,7 +1,6 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:f="http://java.sun.com/jsf/core">
+ xmlns:ui="http://java.sun.com/jsf/facelets">
<f:loadBundle basename="resources" var="msg" />
<head>
Modified: trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JSPProblemMarkerResolutionTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JSPProblemMarkerResolutionTest.java 2012-07-30 23:08:26 UTC (rev 42790)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JSPProblemMarkerResolutionTest.java 2012-07-30 23:15:57 UTC (rev 42791)
@@ -1,7 +1,6 @@
package org.jboss.tools.jsf.ui.test;
import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
@@ -9,7 +8,6 @@
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IncrementalProjectBuilder;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.NullProgressMonitor;
@@ -17,7 +15,6 @@
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.Position;
import org.eclipse.jface.text.source.IAnnotationModel;
import org.eclipse.jface.text.source.SourceViewer;
import org.eclipse.jst.jsp.ui.internal.validation.JSPContentSourceValidator;
@@ -161,17 +158,22 @@
IMarker[] markers = findMarkers(jspFile, JSP_MARKER_TYPE, "Unknown tag (h:commandButton).");
- assertEquals(1, markers.length);
+ assertEquals("Should be 1 marker here", 1, markers.length);
JSPProblemMarkerResolutionGenerator generator = new JSPProblemMarkerResolutionGenerator();
+
+ boolean found = false;
for(IMarker marker : markers){
generator.hasResolutions(marker);
IMarkerResolution[] resolutions = generator.getResolutions(marker);
for(IMarkerResolution resolution : resolutions){
resolution.run(marker);
+ found = true;
}
}
+
+ assertTrue("AddTLDMarkerResolution not found", found);
validate(jspFile);
@@ -185,25 +187,30 @@
validate(jspFile);
- assertMarkerIsCreated(jspFile, XHTML_MARKER_TYPE, "Unknown tag (ui:insert).", true, 8, 17, 31);
+ assertMarkerIsCreated(jspFile, XHTML_MARKER_TYPE, "Unknown tag (f:loadBundle).", true, 5);
- IMarker[] markers = findMarkers(jspFile, XHTML_MARKER_TYPE, "Unknown tag (ui:insert).");
+ IMarker[] markers = findMarkers(jspFile, XHTML_MARKER_TYPE, "Unknown tag (f:loadBundle).");
- assertEquals(3, markers.length);
+ assertEquals("Should be 1 marker here", 1, markers.length);
JSPProblemMarkerResolutionGenerator generator = new JSPProblemMarkerResolutionGenerator();
+
+ boolean found = false;
for(IMarker marker : markers){
generator.hasResolutions(marker);
IMarkerResolution[] resolutions = generator.getResolutions(marker);
for(IMarkerResolution resolution : resolutions){
resolution.run(marker);
+ found = true;
}
}
+
+ assertTrue("AddTLDMarkerResolution not found", found);
validate(jspFile);
- assertMarkerIsNotCreated(jspFile, XHTML_MARKER_TYPE, "Unknown tag (ui:insert).");
+ assertMarkerIsNotCreated(jspFile, XHTML_MARKER_TYPE, "Unknown tag (f:loadBundle).");
}
public void testQuickFixesForTemporaryAnnotationInJSP() throws PartInitException, BadLocationException{
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/AddTLDMarkerResolution.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/AddTLDMarkerResolution.java 2012-07-30 23:08:26 UTC (rev 42790)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/AddTLDMarkerResolution.java 2012-07-30 23:15:57 UTC (rev 42791)
@@ -60,14 +60,6 @@
this.prefix = prefix;
}
- public AddTLDMarkerResolution(String name, int start, int end, String uri, String prefix){
- this.resolutionName = name;
- this.start = start;
- this.end = end;
- this.uri = uri;
- this.prefix = prefix;
- }
-
private Properties getProperties(){
Properties properties = new Properties();
properties.put(JSPPaletteInsertHelper.PROPOPERTY_ADD_TAGLIB, "true"); //$NON-NLS-1$
@@ -101,9 +93,13 @@
public String getLabel() {
return NLS.bind(Messages.AddTLDMarkerResolution_Name, resolutionName);
}
-
+
@Override
public void run(IMarker marker) {
+ if(!JSPProblemMarkerResolutionGenerator.validatePrefix(file, start, prefix)){
+ return;
+ }
+
FileEditorInput input = new FileEditorInput(file);
IDocumentProvider provider = DocumentProviderRegistry.getDefault().getDocumentProvider(input);
try {
@@ -140,7 +136,10 @@
@Override
public void apply(IDocument document) {
-
+ if(!JSPProblemMarkerResolutionGenerator.validatePrefix(file, start, prefix)){
+ return;
+ }
+
Properties properties = getProperties();
PaletteTaglibInserter.getPrefixes(document, properties);
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/JSPProblemMarkerResolutionGenerator.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/JSPProblemMarkerResolutionGenerator.java 2012-07-30 23:08:26 UTC (rev 42790)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/JSPProblemMarkerResolutionGenerator.java 2012-07-30 23:15:57 UTC (rev 42791)
@@ -64,6 +64,23 @@
return new IMarkerResolution[]{};
}
+ public static boolean validatePrefix(IFile file, int start, String prefix){
+ ELContext context = PageContextFactory.createPageContext(file);
+ if(context instanceof XmlContextImpl){
+ Map<String, List<INameSpace>> nameSpaces = ((XmlContextImpl) context).getNameSpaces(start);
+ Iterator<List<INameSpace>> iterator = nameSpaces.values().iterator();
+ while(iterator.hasNext()){
+ List<INameSpace> list = iterator.next();
+ for(INameSpace ns : list){
+ if(prefix.equals(ns.getPrefix())){
+ return false;
+ }
+ }
+ }
+ }
+ return true;
+ }
+
private IJavaCompletionProposal[] isOurCase(Annotation annotation){
ArrayList<IJavaCompletionProposal> proposals = new ArrayList<IJavaCompletionProposal>();
if(!(annotation instanceof TemporaryAnnotation)){
@@ -94,18 +111,8 @@
if(file == null)
return new IJavaCompletionProposal[]{};
- ELContext context = PageContextFactory.createPageContext(file);
- if(context instanceof XmlContextImpl){
- Map<String, List<INameSpace>> nameSpaces = ((XmlContextImpl) context).getNameSpaces(start);
- Iterator<List<INameSpace>> iterator = nameSpaces.values().iterator();
- while(iterator.hasNext()){
- List<INameSpace> list = iterator.next();
- for(INameSpace ns : list){
- if(prefix.equals(ns.getPrefix())){
- return new IJavaCompletionProposal[]{};
- }
- }
- }
+ if(!validatePrefix(file, start, prefix)){
+ return new IJavaCompletionProposal[]{};
}
Object additionalInfo = ta.getAdditionalFixInfo();
@@ -126,7 +133,7 @@
String uri = ns.getURI();
String resolutionName = getResolutionName(xmlDocument != null && xmlDocument.isXMLType(), true, prefix, uri);
if(resolutionName != null && !names.contains(resolutionName) && l.getComponent(tagName) != null){
- proposals.add(new AddTLDMarkerResolution(resolutionName, start, end, uri, prefix));
+ proposals.add(new AddTLDMarkerResolution(file, resolutionName, start, end, uri, prefix));
names.add(resolutionName);
}
}
@@ -140,7 +147,7 @@
String uri = l.getURI();
String resolutionName = getResolutionName(xmlDocument != null && xmlDocument.isXMLType(), true, prefix, uri);
if(resolutionName != null && !names.contains(resolutionName) && l.getComponent(tagName) != null){
- proposals.add(new AddTLDMarkerResolution(resolutionName, start, end, uri, prefix));
+ proposals.add(new AddTLDMarkerResolution(file, resolutionName, start, end, uri, prefix));
names.add(resolutionName);
}
}
@@ -186,18 +193,8 @@
IFile file = (IFile)marker.getResource();
- ELContext context = PageContextFactory.createPageContext(file);
- if(context instanceof XmlContextImpl){
- Map<String, List<INameSpace>> nameSpaces = ((XmlContextImpl) context).getNameSpaces(start);
- Iterator<List<INameSpace>> iterator = nameSpaces.values().iterator();
- while(iterator.hasNext()){
- List<INameSpace> list = iterator.next();
- for(INameSpace ns : list){
- if(prefix.equals(ns.getPrefix())){
- return new IMarkerResolution[]{};
- }
- }
- }
+ if(!validatePrefix(file, start, prefix)){
+ return new IMarkerResolution[]{};
}
IKbProject kbProject = KbProjectFactory.getKbProject(file.getProject(), true);
12 years, 4 months
JBoss Tools SVN: r42790 - in tags/jbosstools-3.3.1.Final/cdi/docs/reference/en-US: images/Validation and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2012-07-30 19:08:26 -0400 (Mon, 30 Jul 2012)
New Revision: 42790
Modified:
tags/jbosstools-3.3.1.Final/cdi/docs/reference/en-US/Book_Info.xml
tags/jbosstools-3.3.1.Final/cdi/docs/reference/en-US/images/Validation/validation_02.png
Log:
updated with jbt 3.3.1 content
Modified: tags/jbosstools-3.3.1.Final/cdi/docs/reference/en-US/Book_Info.xml
===================================================================
--- tags/jbosstools-3.3.1.Final/cdi/docs/reference/en-US/Book_Info.xml 2012-07-30 23:00:30 UTC (rev 42789)
+++ tags/jbosstools-3.3.1.Final/cdi/docs/reference/en-US/Book_Info.xml 2012-07-30 23:08:26 UTC (rev 42790)
@@ -11,9 +11,9 @@
<productnumber>5.0</productnumber>
- <edition>5.0.0</edition>
+ <edition>5.0.1</edition>
- <pubsnumber>9</pubsnumber>
+ <pubsnumber>10</pubsnumber>
<abstract>
<para>
Modified: tags/jbosstools-3.3.1.Final/cdi/docs/reference/en-US/images/Validation/validation_02.png
===================================================================
(Binary files differ)
12 years, 4 months
JBoss Tools SVN: r42789 - in tags/jbosstools-3.3.1.Final/documentation/guides: Beginners_Guide/en-US/images and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2012-07-30 19:00:30 -0400 (Mon, 30 Jul 2012)
New Revision: 42789
Added:
tags/jbosstools-3.3.1.Final/documentation/guides/JBDS_Release_Notes/en-US/5.0.1_Release_Notes.ent
tags/jbosstools-3.3.1.Final/documentation/guides/JBDS_Release_Notes/en-US/5.0.1_Release_Notes.xml
Modified:
tags/jbosstools-3.3.1.Final/documentation/guides/Beginners_Guide/en-US/Book_Info.xml
tags/jbosstools-3.3.1.Final/documentation/guides/Beginners_Guide/en-US/images/jboss_central_01.png
tags/jbosstools-3.3.1.Final/documentation/guides/GettingStartedGuide/en-US/Book_Info.xml
tags/jbosstools-3.3.1.Final/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_central_01.png
tags/jbosstools-3.3.1.Final/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_central_04.png
tags/jbosstools-3.3.1.Final/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_central_06.png
tags/jbosstools-3.3.1.Final/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_perspective_01.png
tags/jbosstools-3.3.1.Final/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_perspective_02.png
tags/jbosstools-3.3.1.Final/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_perspective_03.png
tags/jbosstools-3.3.1.Final/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_perspective_04.png
tags/jbosstools-3.3.1.Final/documentation/guides/GettingStartedGuide/en-US/images/jsp_application/jsp_application_19_finger_touch.png
tags/jbosstools-3.3.1.Final/documentation/guides/GettingStartedGuide/en-US/images/jsp_application/jsp_application_3.png
tags/jbosstools-3.3.1.Final/documentation/guides/GettingStartedGuide/en-US/installation.xml
tags/jbosstools-3.3.1.Final/documentation/guides/GettingStartedGuide/en-US/minimumrequirements.xml
tags/jbosstools-3.3.1.Final/documentation/guides/JBDS_Release_Notes/en-US/Article_Info.xml
tags/jbosstools-3.3.1.Final/documentation/guides/JBDS_Release_Notes/en-US/Component_Versions.xml
tags/jbosstools-3.3.1.Final/documentation/guides/JBDS_Release_Notes/en-US/Fixed_Issues.xml
tags/jbosstools-3.3.1.Final/documentation/guides/JBDS_Release_Notes/en-US/Known_Issues.xml
tags/jbosstools-3.3.1.Final/documentation/guides/JBDS_Release_Notes/en-US/Overview.xml
tags/jbosstools-3.3.1.Final/documentation/guides/JBDS_Release_Notes/en-US/Revision_History.xml
tags/jbosstools-3.3.1.Final/documentation/guides/JBDS_Release_Notes/en-US/master.xml
Log:
updated with jbt 3.3.1 content
Modified: tags/jbosstools-3.3.1.Final/documentation/guides/Beginners_Guide/en-US/Book_Info.xml
===================================================================
--- tags/jbosstools-3.3.1.Final/documentation/guides/Beginners_Guide/en-US/Book_Info.xml 2012-07-30 15:20:53 UTC (rev 42788)
+++ tags/jbosstools-3.3.1.Final/documentation/guides/Beginners_Guide/en-US/Book_Info.xml 2012-07-30 23:00:30 UTC (rev 42789)
@@ -13,7 +13,7 @@
<edition>5.0.1</edition>
- <pubsnumber>4</pubsnumber>
+ <pubsnumber>5</pubsnumber>
<abstract>
<para>
Modified: tags/jbosstools-3.3.1.Final/documentation/guides/Beginners_Guide/en-US/images/jboss_central_01.png
===================================================================
(Binary files differ)
Modified: tags/jbosstools-3.3.1.Final/documentation/guides/GettingStartedGuide/en-US/Book_Info.xml
===================================================================
--- tags/jbosstools-3.3.1.Final/documentation/guides/GettingStartedGuide/en-US/Book_Info.xml 2012-07-30 15:20:53 UTC (rev 42788)
+++ tags/jbosstools-3.3.1.Final/documentation/guides/GettingStartedGuide/en-US/Book_Info.xml 2012-07-30 23:00:30 UTC (rev 42789)
@@ -7,8 +7,8 @@
<subtitle>Provides information on how the JBoss Developer Studio functions.</subtitle>
<productname>JBoss Developer Studio</productname>
<productnumber>5.0</productnumber>
-<edition>5.0.0</edition>
-<pubsnumber>30</pubsnumber>
+<edition>5.0.1</edition>
+<pubsnumber>34</pubsnumber>
<abstract>
<para>The Getting Started Guide explains the JBoss Developer Studio.</para>
</abstract>
Modified: tags/jbosstools-3.3.1.Final/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_central_01.png
===================================================================
(Binary files differ)
Modified: tags/jbosstools-3.3.1.Final/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_central_04.png
===================================================================
(Binary files differ)
Modified: tags/jbosstools-3.3.1.Final/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_central_06.png
===================================================================
(Binary files differ)
Modified: tags/jbosstools-3.3.1.Final/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_perspective_01.png
===================================================================
(Binary files differ)
Modified: tags/jbosstools-3.3.1.Final/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_perspective_02.png
===================================================================
(Binary files differ)
Modified: tags/jbosstools-3.3.1.Final/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_perspective_03.png
===================================================================
(Binary files differ)
Modified: tags/jbosstools-3.3.1.Final/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_perspective_04.png
===================================================================
(Binary files differ)
Modified: tags/jbosstools-3.3.1.Final/documentation/guides/GettingStartedGuide/en-US/images/jsp_application/jsp_application_19_finger_touch.png
===================================================================
(Binary files differ)
Modified: tags/jbosstools-3.3.1.Final/documentation/guides/GettingStartedGuide/en-US/images/jsp_application/jsp_application_3.png
===================================================================
(Binary files differ)
Modified: tags/jbosstools-3.3.1.Final/documentation/guides/GettingStartedGuide/en-US/installation.xml
===================================================================
--- tags/jbosstools-3.3.1.Final/documentation/guides/GettingStartedGuide/en-US/installation.xml 2012-07-30 15:20:53 UTC (rev 42788)
+++ tags/jbosstools-3.3.1.Final/documentation/guides/GettingStartedGuide/en-US/installation.xml 2012-07-30 23:00:30 UTC (rev 42789)
@@ -355,49 +355,30 @@
</figure>
<para>
- This step lets you configure locally available JBoss servers:
+ This step lets you select a location that will be used to search for locally available JBoss servers upon first running of JBoss Developer Studio:
</para>
<figure>
- <title>Configuring a JBoss Enterprise Application Platform installation</title>
+ <title>Selecting a location to search for JBoss servers</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/getting_started/getting_started_3.png"/>
</imageobject>
</mediaobject>
</figure>
-
+
<para>
- You can fill the list automatically using the
+ To add a location click on the <guibutton>Add</guibutton> button. When the
<guibutton>
- Find
+ Add
</guibutton>
- button. When the
- <guibutton>
- Find
- </guibutton>
button is clicked you are prompted to select the folder from which to search for available JBoss Application Servers. Click the
<guibutton>
OK
</guibutton>
- button to select the chosen folder.
+ button to select the chosen location. This location and subsequent directories will be searched for any JBoss server instances when you launch JBoss Developer Studio.
</para>
<!--
- <figure>
- <title>Finding Servers in the Selected Directory</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/getting_started/getting_started_3_3_1.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para/> -->
-
- <para>
- All found servers will be added to the list with the following details: Name, Type, Version and Location.
- </para>
- <!--
<itemizedlist>
<listitem>
<para>
Modified: tags/jbosstools-3.3.1.Final/documentation/guides/GettingStartedGuide/en-US/minimumrequirements.xml
===================================================================
--- tags/jbosstools-3.3.1.Final/documentation/guides/GettingStartedGuide/en-US/minimumrequirements.xml 2012-07-30 15:20:53 UTC (rev 42788)
+++ tags/jbosstools-3.3.1.Final/documentation/guides/GettingStartedGuide/en-US/minimumrequirements.xml 2012-07-30 23:00:30 UTC (rev 42789)
@@ -17,10 +17,16 @@
<para>Microsoft Windows XP (x86_64) running 64-bit Sun JDK 6 (*)</para>
</listitem>
<listitem>
+ <para>MacOS X 10.7 running 32-bit Apple JDK 6</para>
+ </listitem>
+ <listitem>
+ <para>MacOS X 10.7 running 64-bit Apple JDK 6 (*)</para>
+ </listitem>
+ <listitem>
<para>MacOS X 10.6 running 32-bit Apple JDK 6</para>
</listitem>
<listitem>
- <para>MacOS X 10.5 running 64-bit Apple JDK 6 (*)</para>
+ <para>MacOS X 10.6 running 64-bit Apple JDK 6 (*)</para>
</listitem>
<listitem>
<para>Red Hat Enterprise Linux 6 i386 running 32-bit Sun JDK 6 and OpenJDK 6</para>
Added: tags/jbosstools-3.3.1.Final/documentation/guides/JBDS_Release_Notes/en-US/5.0.1_Release_Notes.ent
===================================================================
--- tags/jbosstools-3.3.1.Final/documentation/guides/JBDS_Release_Notes/en-US/5.0.1_Release_Notes.ent (rev 0)
+++ tags/jbosstools-3.3.1.Final/documentation/guides/JBDS_Release_Notes/en-US/5.0.1_Release_Notes.ent 2012-07-30 23:00:30 UTC (rev 42789)
@@ -0,0 +1,4 @@
+<!ENTITY PRODUCT "JBoss Developer Studio">
+<!ENTITY BOOKID "5.0.1_Release_Notes">
+<!ENTITY YEAR "2012">
+<!ENTITY HOLDER "Red Hat">
Property changes on: tags/jbosstools-3.3.1.Final/documentation/guides/JBDS_Release_Notes/en-US/5.0.1_Release_Notes.ent
___________________________________________________________________
Added: svn:executable
+ *
Added: tags/jbosstools-3.3.1.Final/documentation/guides/JBDS_Release_Notes/en-US/5.0.1_Release_Notes.xml
===================================================================
--- tags/jbosstools-3.3.1.Final/documentation/guides/JBDS_Release_Notes/en-US/5.0.1_Release_Notes.xml (rev 0)
+++ tags/jbosstools-3.3.1.Final/documentation/guides/JBDS_Release_Notes/en-US/5.0.1_Release_Notes.xml 2012-07-30 23:00:30 UTC (rev 42789)
@@ -0,0 +1,12 @@
+<?xml version='1.0' encoding='utf-8' ?>
+
+<article>
+ <xi:include href="Article_Info.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
+ <xi:include href="Overview.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
+ <xi:include href="Component_Versions.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
+<!-- <xi:include href="Features.xml" xmlns:xi="http://www.w3.org/2001/XInclude">
+</xi:include> -->
+ <xi:include href="Fixed_Issues.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
+<!-- <xi:include href="Known_Issues.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include> -->
+ <xi:include href="Revision_History.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
+</article>
Property changes on: tags/jbosstools-3.3.1.Final/documentation/guides/JBDS_Release_Notes/en-US/5.0.1_Release_Notes.xml
___________________________________________________________________
Added: svn:executable
+ *
Modified: tags/jbosstools-3.3.1.Final/documentation/guides/JBDS_Release_Notes/en-US/Article_Info.xml
===================================================================
--- tags/jbosstools-3.3.1.Final/documentation/guides/JBDS_Release_Notes/en-US/Article_Info.xml 2012-07-30 15:20:53 UTC (rev 42788)
+++ tags/jbosstools-3.3.1.Final/documentation/guides/JBDS_Release_Notes/en-US/Article_Info.xml 2012-07-30 23:00:30 UTC (rev 42789)
@@ -3,12 +3,12 @@
<!-- Modify the title tag to change which book will be built -->
<articleinfo>
- <title>5.0.0 Release Notes</title>
+ <title>5.0.1 Release Notes</title>
<subtitle>Information about the changes made for this release of the JBoss Developer Studio.</subtitle>
<productname>JBoss Developer Studio</productname>
<productnumber>5.0</productnumber>
- <edition>5.0.0</edition>
- <pubsnumber>17</pubsnumber>
+ <edition>5.0.1</edition>
+ <pubsnumber>4</pubsnumber>
<abstract>
<para>
These release notes contain important information related to the JBoss Developer Studio. New features, known issues, resources, and other current issues are addressed here.
Modified: tags/jbosstools-3.3.1.Final/documentation/guides/JBDS_Release_Notes/en-US/Component_Versions.xml
===================================================================
--- tags/jbosstools-3.3.1.Final/documentation/guides/JBDS_Release_Notes/en-US/Component_Versions.xml 2012-07-30 15:20:53 UTC (rev 42788)
+++ tags/jbosstools-3.3.1.Final/documentation/guides/JBDS_Release_Notes/en-US/Component_Versions.xml 2012-07-30 23:00:30 UTC (rev 42789)
@@ -12,18 +12,8 @@
</listitem>
<listitem>
<para>
- JBoss Tools 3.3.0.GA
+ JBoss Tools 3.3.1.Final
</para>
</listitem>
-<!-- <listitem>
- <para>
- JBoss Enterprise Application Platform 6.0
- </para>
- </listitem> -->
</itemizedlist>
- <!-- <note>
- <para>
- The Enterprise Application Platform Server has been redefined for the enterprise market to a level where direct association to a community release can no longer be drawn.
- </para>
- </note> -->
</section>
Modified: tags/jbosstools-3.3.1.Final/documentation/guides/JBDS_Release_Notes/en-US/Fixed_Issues.xml
===================================================================
--- tags/jbosstools-3.3.1.Final/documentation/guides/JBDS_Release_Notes/en-US/Fixed_Issues.xml 2012-07-30 15:20:53 UTC (rev 42788)
+++ tags/jbosstools-3.3.1.Final/documentation/guides/JBDS_Release_Notes/en-US/Fixed_Issues.xml 2012-07-30 23:00:30 UTC (rev 42789)
@@ -1,920 +1,81 @@
<?xml version='1.0' encoding='utf-8' ?>
<section id="Issues-fixed-in-this-release">
<title>
- Enhancements and fixed issues in version 5.0.0
+ Enhancements and fixed issues in version 5.0.1
</title>
<variablelist>
-
-
-
-
-
-
-
-
-
- <!-- JBIDE-11635 -->
+ <!-- JBIDE-12177 -->
<varlistentry>
<term>
- <ulink url="https://issues.jboss.org/jira/browse/JBIDE-11635">JBIDE-11635</ulink>
+ <ulink url="https://issues.jboss.org/jira/browse/JBIDE-12177">JBIDE-12177</ulink>
</term>
<listitem>
<para>
- When JAX-RS services are tested through JAX-RS Tooling and Web Service Tester integration, the URL of the service can include details about required parameters. If the included parameters require values to be specified, a dialog prompting for these values now appears to the user and validation of the values occurs if the service includes a Regular Expression. This new feature ensures all values are gathered and verified before testing the service, minimizing returned errors.
+ The feature to auto-complete code tags was broken in the Visual Editor. When attempting to auto-complete a code tag, invalid code would be generated. This has been corrected by modifying the content assist file XmlTagCompletionProposalComputer.java to ensure partner code tags are generated correctly when using auto-completion.
</para>
</listitem>
</varlistentry>
-
-
- <!-- JBIDE-11552 -->
+ <!-- JBIDE-12158 -->
<varlistentry>
<term>
- <ulink url="https://issues.jboss.org/jira/browse/JBIDE-11552">JBIDE-11552</ulink>
+ <ulink url="https://issues.jboss.org/jira/browse/JBIDE-12158">JBIDE-12158</ulink>
</term>
<listitem>
<para>
- Support for DeltaSpike portable CDI extensions has been added to the CDI tooling for JBoss Developer Studio 5. This has been archived through the addition of a new org.jboss.tools.cdi.deltaspike feature. The CDI validation preferences page has been updated for DeltaSpike, including security extension validation.
+ An issue existed when creating a Dynamic Web Project and modifying the project to include the JBoss Core Portlet facet to the project. The portlet-api library was not detected in the target runtime, forcing the user to manually specify it via the user library. This has been corrected by adding the option, Portlet Target Runtime Provider, to the combo-box on the JBoss Portlet Capabilities wizard page.
</para>
</listitem>
</varlistentry>
-
-
-
-
-
-
-
-
-
-
- <!-- JBIDE-11064 -->
+ <!-- JBIDE-12111 -->
<varlistentry>
<term>
- <ulink url="https://issues.jboss.org/jira/browse/JBIDE-11064">JBIDE-11064</ulink>
+ <ulink url="https://issues.jboss.org/jira/browse/JBIDE-12111">JBIDE-12111</ulink>
</term>
<listitem>
<para>
- Only customers who downloaded and used the Beta release of JBoss Developer Studio 5 may have noticed this issue, that has since been resolved.
+ The version of Java to be used was hard coded in the pom.xml file of Maven projects. This caused errors when adding Maven configuration to a Seam 2.3 project since Maven projects were created to use Java 1.5, however Seam 2.3 requires Java 1.6. Maven tooling has been updated to allow the maven-compiler-plugin settings that are in the parent project to be dynamically inferred from the converted web project's original settings. This ensures the correct Java version is retained when Maven integration is added to an existing project.
</para>
- <para>
- The JBoss Developer Studio 5.0.Beta JMX tooling was unable to connect to JBoss Application Server 7.1.0 correctly as the ability to connect to the new connector and URL for the server had not been incorporated. New classes have been created for interaction between JMX and JBoss Application Server 7.1.0 and are available as part of JBoss Developer Studio 5.0.
- </para>
</listitem>
</varlistentry>
-
- <!-- JBIDE-10947 -->
+ <!-- JBIDE-12071 -->
<varlistentry>
<term>
- <ulink url="https://issues.jboss.org/jira/browse/JBIDE-10947">JBIDE-10947</ulink>
+ <ulink url="https://issues.jboss.org/jira/browse/JBIDE-12071">JBIDE-12071</ulink>
</term>
<listitem>
<para>
- XML and JSON (JavaScript Object Notation) output from executed web services readability has been improved through the addition of carriage returns, line feeds, and indentation.
+ Previously, when a user performed a drag-and-drop action to publish a project it was ignored. This occurred because the code to publish a project only accepted direct user-initiated actions and not those considered to be a shell action. The ExpressPublishMethod.java and ExpressBehaviour.java files have been updated to handle shell actions correctly. As a result, incremental publishes initiated by the user are now also handled correctly.
</para>
</listitem>
</varlistentry>
-
-
-
- <!-- JBIDE-10390 -->
+ <!-- JBIDE-12046 -->
<varlistentry>
<term>
- <ulink url="https://issues.jboss.org/jira/browse/JBIDE-10390">JBIDE-10390</ulink>
+ <ulink url="https://issues.jboss.org/jira/browse/JBIDE-12046">JBIDE-12046</ulink>
</term>
<listitem>
<para>
- A new enhancement is included that allows JAX-RS tooling to display changes in the code being edited within the primary version. The entities of the project that appear in the Project Explorer section of the workbench will change as the code is edited.
+ When a user tried to start or deploy to a remote server that was no longer reachable, various errors would be returned, however no adequate description of the issue was communicated. This issue has been resolved by returning a descriptive error when the remote server is unreachable and checking for file system responsiveness before attempting to publish.
</para>
</listitem>
</varlistentry>
- <!-- JBIDE-10354 -->
+ <!-- JBIDE-11310 -->
<varlistentry>
- <term>
- <ulink url="https://issues.jboss.org/jira/browse/JBIDE-10354">JBIDE-10354</ulink>
- </term>
- <listitem>
- <para>
- A new OpenShift profile is available for use in the creation of a WAR archive. The template provides a structure compatible with OpenShift Express for the user, and can be inserted into the pom.xml file using Ctrl+Space.
- </para>
- </listitem>
- </varlistentry>
-
-
- <!-- JBIDE-10205 -->
- <varlistentry>
- <term>
- <ulink url="https://issues.jboss.org/jira/browse/JBIDE-10205">JBIDE-10205</ulink>
- </term>
- <listitem>
- <para>
- The option of disabling JAX-RS validation is now available to users through the Properties -> Validation menu of a project. This option has been exposed to users in order to workaround false error and warnings that may be reported for JAX-RS. Someone using this feature should be able to identify a false positive.
- </para>
- </listitem>
- </varlistentry>
-
- <!-- JBIDE-10199 -->
- <varlistentry>
- <term>
- <ulink url="https://issues.jboss.org/jira/browse/JBIDE-10199">JBIDE-10199</ulink>
- </term>
- <listitem>
- <para>
- This issue only affected users in the JBoss Developer Studio Early Access program. Users who did not participate in the early access program would not have encountered this issue.
- </para>
- <para>
- Create a Simple Web Service and Create a Sample RESTful Service wizards were not compatible with JBoss Application Server 7. This occurred as the wizards were unable to recognise required JAR files available in the classpath, when JBoss Application Server 7 was specified as the target runtime. To correct this issue the option of adding RESTeasy JARs from the runtime root now exists in the wizards and is enabled or disabled by default depending on the application server chosen. This allows for the wizards to function correctly.
- </para>
- <para>
- An option for the web.xml file to be updated has been added to the Dynamic Web Project wizard for when a user selects to use the facet version of RESTful services in their project. The option is enabled or disabled by default depending on the application server chosen.
- </para>
- </listitem>
- </varlistentry>
-
-
- <!-- JBIDE-10152 -->
- <varlistentry>
- <term>
- <ulink url="https://issues.jboss.org/jira/browse/JBIDE-10152">JBIDE-10152</ulink>
- </term>
- <listitem>
- <para>
- A new Remote Console has been implemented for OpenShift servers. By accessing the Remote Console, a user is able to see OpenShift server output as they would if it were a local server. For more information see the OpenShift Tools Reference Guide for this release.
- </para>
- </listitem>
- </varlistentry>
-
- <!-- JBIDE-10098 -->
- <varlistentry>
- <term>
- <ulink url="https://issues.jboss.org/jira/browse/JBIDE-10098">JBIDE-10098</ulink>
- </term>
- <listitem>
- <para>
- Support for multiple versions of Hibernate has been updated to use the correct Hibernate tooling JAR file, for each version of Hibernate, when code completion is being undertaken. This update ensures that code completion suggestions are valid for the version of Hibernate in use.
- </para>
- </listitem>
- </varlistentry>
-
- <!-- JBIDE-10086 -->
- <varlistentry>
- <term>
- <ulink url="https://issues.jboss.org/jira/browse/JBIDE-10086">JBIDE-10086</ulink>
- </term>
- <listitem>
- <para>
- A new filter, Eliminated @DefaultBean, has been added and appears as an option for all CDI projects that have the extension org.jboss.solder.bean.defaultbean.DefaultBeanExtension. When the filter is not selected for an eligible project, any default beans that have been assigned will be removed, in the presence of a non-standard eligible bean.
- </para>
- </listitem>
- </varlistentry>
-
- <!-- JBIDE-10020 -->
- <varlistentry>
- <term>
- <ulink url="https://issues.jboss.org/jira/browse/JBIDE-10020">JBIDE-10020</ulink>
- </term>
- <listitem>
- <para>
- An enhancement has been made to the Visual Page Editor that allows a user to press F5 and Ctrl+R (Command+R on Macintosh) to update the editors visual view with the latest user edits from the source view.
- </para>
- </listitem>
- </varlistentry>
-
- <!-- JBIDE-9941 -->
- <varlistentry>
- <term>
- <ulink url="https://issues.jboss.org/jira/browse/JBIDE-9941">JBIDE-9941</ulink>
- </term>
- <listitem>
- <para>
- Runtime detection now detects the embedded ESB runtime within the JBoss SOA-P product, and adds it to the list of defined ESB runtimes available to JBoss Developer Studio. This feature increases usability, ensuring all appropriate runtimes are correctly available for use by a user.
- </para>
- </listitem>
- </varlistentry>
-
-
-
- <!-- JBIDE-9910 -->
- <varlistentry>
- <term>
- <ulink url="https://issues.jboss.org/jira/browse/JBIDE-9910">JBIDE-9910</ulink>
- </term>
- <listitem>
- <para>
- An information window for expression language message bundles now exists, similarly as it does for tooltips. This information allows a user to easily identify the current value of a resource being used within code and where the resource is coming from.
- </para>
- </listitem>
- </varlistentry>
-
- <!-- JBIDE-9885 -->
- <varlistentry>
- <term>
- <ulink url="https://issues.jboss.org/jira/browse/JBIDE-9885">JBIDE-9885</ulink>
- </term>
- <listitem>
- <para>
- A new quick fix, Configure Problem Severity, has been added to assist in resolution of an issue in a projects code. When this quick fix item is selected, it will open the Preferences dialog to the Validation section for the tooling in question and allow the user to select the severity level of the current issue.
- </para>
- </listitem>
- </varlistentry>
-
-
-
- <!-- JBIDE-9834 -->
- <varlistentry>
- <term>
- <ulink url="https://issues.jboss.org/jira/browse/JBIDE-9834">JBIDE-9834</ulink>
- </term>
- <listitem>
- <para>
- Validation has been added for the configuration of abstract types and types without bean constructors. This validation will inform the user if the interface or abstract type in question cannot be configured as a bean.
- </para>
- </listitem>
- </varlistentry>
-
-
-
- <!-- JBIDE-9793 -->
- <varlistentry>
- <term>
- <ulink url="https://issues.jboss.org/jira/browse/JBIDE-9793">JBIDE-9793</ulink>
- </term>
- <listitem>
- <para>
- A new development tool has been created called the OpenShift Express Application wizard. This wizard allows the user to create an OpenShift Express application, import an existing OpenShift application to the workspace, create or rename an OpenShift domain, and clone an application repository and import the cloned repository to the workspace.
- </para>
- <para>
- OpenShift Express is a Red Hat Cloud service.
- </para>
- </listitem>
- </varlistentry>
-
-
- <!-- JBIDE-9734 -->
- <varlistentry>
- <term>
- <ulink url="https://issues.jboss.org/jira/browse/JBIDE-9734">JBIDE-9734</ulink>
- </term>
- <listitem>
- <para>
- The CDI validator would treat @Inject and @RestClient("...") ServiceInterface injection as unstatisfied dependencies. This caused an incorrect warning message to appear. To fix the issue, the CDI Seam Core Rest files have been modified to correctly validate @Inject and @RestClient("...") ServiceInterface properties, ensuring the warning message no longer appears.
- </para>
- </listitem>
- </varlistentry>
-
- <!-- JBIDE-9731 -->
- <varlistentry>
- <term>
- <ulink url="https://issues.jboss.org/jira/browse/JBIDE-9731">JBIDE-9731</ulink>
- </term>
- <listitem>
- <para>
- A new feature has been implemented that produces tool-tips for expression language that references message bundles. The tool-tip provided functions in a similar manor to those already provided for expression language that references Java code.
- </para>
- </listitem>
- </varlistentry>
-
- <!-- JBIDE-9708 -->
- <varlistentry>
- <term>
- <ulink url="https://issues.jboss.org/jira/browse/JBIDE-9708">JBIDE-9708</ulink>
- </term>
- <listitem>
- <para>
- Previously pointers to example file locations had to be re-written depending on how the examples were distributed. This could have caused a user to modify the code that pointed to an example location. For this release all locations in examples are set as relative paths. The result of this is that the example locations will work regardless of distribution and users do not need to modify code.
- </para>
- </listitem>
- </varlistentry>
-
- <!-- JBIDE-9693 -->
- <varlistentry>
- <term>
- <ulink url="https://issues.jboss.org/jira/browse/JBIDE-9693">JBIDE-9693</ulink>
- </term>
- <listitem>
- <para>
- A link that opens the Remote System Explorer View has been added to the Server Behaviour section of the Server Editor. Following the link allows a user to easily remove server hosts.
- </para>
- </listitem>
- </varlistentry>
-
- <!-- JBIDE-9685 -->
- <varlistentry>
- <term>
- <ulink url="https://issues.jboss.org/jira/browse/JBIDE-9685">JBIDE-9685</ulink>
- </term>
- <listitem>
- <para>
- A new feature has been added to the CDI validator making it aware of JMS resource injections. This ensures correct validation of JMS injections that also have a JMS destination.
- </para>
- </listitem>
- </varlistentry>
-
- <!-- JBIDE-9674 -->
- <varlistentry>
- <term>
- <ulink url="https://issues.jboss.org/jira/browse/JBIDE-9674">JBIDE-9674</ulink>
- </term>
- <listitem>
- <para>
- An error existed where the special characters '\r' and '\n' that are part of the Property Key, were not displayed correctly when the Property Key contained more lines than initially shown. This caused the following error to appear: Unable to render embedded object: File (errorAfterWrongPropertyKeySelection.png) not found. The generated Property Key has been corrected by modifying the ExternalizeStringsUtils.java file by adding in single quotes as characters to be correctly replaced when formatting a web page. Property Key is now displayed correctly and the error no longer appears.
- </para>
- </listitem>
- </varlistentry>
-
- <!-- JBIDE-9673 -->
- <varlistentry>
- <term>
- <ulink url="https://issues.jboss.org/jira/browse/JBIDE-9673">JBIDE-9673</ulink>
- </term>
- <listitem>
- <para>
- Before a user had to hold the Ctrl key and left-click on the needed bean in order to bring up the CDI menu concerning the annotation. Users found that this method was not as convenient as that used by other Eclipse-based software offerings. User interaction with the CDI menus has been modified so that the menu items Show All Generic Configuration Points, Show All Generic Beans, Show CDI Events and Show CDI Observer Methods now work as the Java Development Tools menu, Open Implementation, does. This ensures user interface consistency across Eclipse-based software offerings, enabling new users to have a lower barrier-to-entry.
- </para>
- </listitem>
- </varlistentry>
-
-
- <!-- JBIDE-9581 -->
- <varlistentry>
- <term>
- <ulink url="https://issues.jboss.org/jira/browse/JBIDE-9581">JBIDE-9581</ulink>
- </term>
- <listitem>
- <para>
- A new wizard has been added to the JBoss Developer Studio for the creation of CDI projects. Further information can be found in the CDI Tools Reference Guide.
- </para>
- </listitem>
- </varlistentry>
-
- <!-- JBIDE-9560 -->
- <varlistentry>
- <term>
- <ulink url="https://issues.jboss.org/jira/browse/JBIDE-9560">JBIDE-9560</ulink>
- </term>
- <listitem>
- <para>
- A new feature has been added that implements the annotation @GenericGenerators. This annotation can contain many declarations of @GenericGenerator that describe any kind of Hibernate generator.
- </para>
- </listitem>
- </varlistentry>
-
- <!-- JBIDE-9539 -->
- <varlistentry>
- <term>
- <ulink url="https://issues.jboss.org/jira/browse/JBIDE-9539">JBIDE-9539</ulink>
- </term>
- <listitem>
- <para>
- A new feature has been created that allows a user to test web pages as if viewed on portable devices. BrowserSim allows a user to select one of numerous devices and test the usability of a web page. This new feature allows for easy testing and debugging of sites and pages for mobile devices.
- </para>
- </listitem>
- </varlistentry>
-
- <!-- JBIDE-9538 -->
- <varlistentry>
- <term>
- <ulink url="https://issues.jboss.org/jira/browse/JBIDE-9538">JBIDE-9538</ulink>
- </term>
- <listitem>
- <para>
- A regression existed where performing a drag and drop operation with a CSS file from the Package Explorer to the Source view of a JSP page would generate an exception, causing the Insert Tag dialog to not be shown. This issue has been corrected and the addition of Insert Tag dialog support for JS files has been added through the addition of the JsLinkAttributeValueLoader class, and the modification of the FileTagProposalLoader class.
- </para>
- </listitem>
- </varlistentry>
-
-
-
-
- <!-- JBIDE-9510 -->
- <varlistentry>
- <term>
- <ulink url="https://issues.jboss.org/jira/browse/JBIDE-9510">JBIDE-9510</ulink>
- </term>
- <listitem>
- <para>
- The server adaptor for JBoss Application Server 7 and JBoss Enterprise Application Server 6 includes support for deploying to OpenShift Express.
- </para>
- </listitem>
- </varlistentry>
-
- <!-- JBIDE-9497 -->
- <varlistentry>
- <term>
- <ulink url="https://issues.jboss.org/jira/browse/JBIDE-9497">JBIDE-9497</ulink>
- </term>
- <listitem>
- <para>
- JBoss Developer Studio now supports the deployment of standalone SAR projects. To undertake this a new wizard has been created to take a user through the process. For further information see the relevant documentation accompanying this release.
- </para>
- </listitem>
- </varlistentry>
-
- <!-- JBIDE-9486 -->
- <varlistentry>
- <term>
- <ulink url="https://issues.jboss.org/jira/browse/JBIDE-9486">JBIDE-9486</ulink>
- </term>
- <listitem>
- <para>
- The user interface for the new hibernate annotations (org.hibernate.annotation.TypeDef and TypeDefs) has been created as a new tab in the Hibernate editor called Type Definitions. This allows a user to graphically interact with and modify these new annotations.
- </para>
- </listitem>
- </varlistentry>
-
- <!-- JBIDE-9485 -->
- <varlistentry>
- <term>
- <ulink url="https://issues.jboss.org/jira/browse/JBIDE-9485">JBIDE-9485</ulink>
- </term>
- <listitem>
- <para>
- Validation of org.hibernate.annotation.TypeDef annotation has been added to org.hibernate.annotation.Type. For this annotation to be valid it must have a typeClass attribute that contains the name of the class that implements (directly or indirectly) one of the following Hibernate attributes:
- </para>
- <para>
- * org.hibernate.type.Type
- </para>
- <para>
- * org.hibernate.usertype.UserType
- </para>
- <para>
- * org.hibernate.usertype.CompositeUserType
- </para>
- <para>
- * org.hibernate.usertype.UserCollectionType
- </para>
- </listitem>
- </varlistentry>
-
- <!-- JBIDE-9473 -->
- <varlistentry>
- <term>
- <ulink url="https://issues.jboss.org/jira/browse/JBIDE-9473">JBIDE-9473</ulink>
- </term>
- <listitem>
- <para>
- The Java source reference search facility did not work correctly for Expression Language within CDI projects. This consequently meant that users were unable to search within Expression Language elements. Correcting the issue has meant ensuring that the search participant works for any kind of Java project and delegates the search to Expression Language resolvers that will then search Expression Language elements. For the user this means that they are able to now perform a search using the Java source reference search facility and it will also search for their specified term within Expression Language elements.
- </para>
- </listitem>
- </varlistentry>
-
- <!-- JBIDE-9436 -->
- <varlistentry>
- <term>
- <ulink url="https://issues.jboss.org/jira/browse/JBIDE-9436">JBIDE-9436</ulink>
- </term>
- <listitem>
- <para>
- The JPA Details user interface tab has been updated for the new hibernate annotations package-info.java. This allows a user to graphically interact with and modify these new annotations.
- </para>
- </listitem>
- </varlistentry>
-
- <!-- JBIDE-9435 -->
- <varlistentry>
- <term>
- <ulink url="https://issues.jboss.org/jira/browse/JBIDE-9435">JBIDE-9435</ulink>
- </term>
- <listitem>
- <para>
- Package level annotation support has been added to the Java Persistence API component of the Hibernate tooling. This improves user experience by making it easier to annotate Hibernate files.
- </para>
- </listitem>
- </varlistentry>
-
-
- <!-- JBIDE-9408 -->
- <varlistentry>
- <term>
- <ulink url="https://issues.jboss.org/jira/browse/JBIDE-9408">JBIDE-9408</ulink>
- </term>
- <listitem>
- <para>
- A bug existed when a user had edited XML in the Source view and changed focus from the XML editor to the Project Explorer. When the focus changed the XML editor would revert any changes made in the Source view. This issue has been resolved by ensuring the Synchronized To Text state of the Source XML editor is correct when focus is changed. The Source view of the XML editor now synchronizes correctly and does not revert to old content when the focus is changed from the XML editor to the Project Explorer.
- </para>
- </listitem>
- </varlistentry>
-
- <!-- JBIDE-9402 -->
- <varlistentry>
- <term>
- <ulink url="https://issues.jboss.org/jira/browse/JBIDE-9402">JBIDE-9402</ulink>
- </term>
- <listitem>
- <para>
- CDI tooling has been updated to allow extensions to be loaded dynamically and the CDI extension factory now recognizes interface features that are implemented by extensions. These improvements reduce the amount of code required for the implementation of new extensions.
- </para>
- </listitem>
- </varlistentry>
-
-
- <!-- JBIDE-9388 -->
- <varlistentry>
- <term>
- <ulink url="https://issues.jboss.org/jira/browse/JBIDE-9388">JBIDE-9388</ulink>
- </term>
- <listitem>
- <para>
- Tools have been added for use with the new Seam Servlet Module. This module supplies portable enhancements to the Servlet API used by Seam and the tooling allows for development around those enhancements.
- </para>
- </listitem>
- </varlistentry>
-
- <!-- JBIDE-9375 -->
- <varlistentry>
- <term>
- <ulink url="https://issues.jboss.org/jira/browse/JBIDE-9375">JBIDE-9375</ulink>
- </term>
- <listitem>
- <para>
- @ForeignKey annotation can now be validated for the inverseName property of ManyToMany relationships.
- </para>
- </listitem>
- </varlistentry>
-
-
- <!-- JBIDE-9366 -->
- <varlistentry>
- <term>
- <ulink url="https://issues.jboss.org/jira/browse/JBIDE-9366">JBIDE-9366</ulink>
- </term>
- <listitem>
- <para>
- FacesConverter annotation has been added for JSF2. This support ensures no errors appear in XHTML when EL expressions are used.
- </para>
- </listitem>
- </varlistentry>
-
-
- <!-- JBIDE-9347 -->
- <varlistentry>
- <term>
- <ulink url="https://issues.jboss.org/jira/browse/JBIDE-9347">JBIDE-9347</ulink>
- </term>
- <listitem>
- <para>
- A new Assignable Beans dialogue has been implemented. The dialogue presents all beans that can be assigned to a particular annotation. Beans that are not able to be assigned appear greyed out and have the option to be hidden.
- </para>
- </listitem>
- </varlistentry>
-
-
- <!-- JBIDE-9310 -->
- <varlistentry>
- <term>
- <ulink url="https://issues.jboss.org/jira/browse/JBIDE-9310">JBIDE-9310</ulink>
- </term>
- <listitem>
- <para>
- Configuration of which JARs are to be returned for a runtime is now available. This ability ensures the correct libraries are available for a runtime configuration.
- </para>
- </listitem>
- </varlistentry>
-
- <!-- JBIDE-9290 -->
- <varlistentry>
- <term>
- <ulink url="https://issues.jboss.org/jira/browse/JBIDE-9290">JBIDE-9290</ulink>
- </term>
- <listitem>
- <para>
- When a maven project has a dependency on any JAX-RS API, the JAX-RS Facet will be automatically applied to the project during configuration. This ensures that all dependencies are ready for use upon project creation or maven integration.
- </para>
- </listitem>
- </varlistentry>
-
- <!-- JBIDE-9283 -->
- <varlistentry>
- <term>
- <ulink url="https://issues.jboss.org/jira/browse/JBIDE-9283">JBIDE-9283</ulink>
- </term>
- <listitem>
- <para>
- The ability to graphically set a custom value for the Hibernate @Type property has been added to the JPA details view. This allows a user to easily set any value required for this property.
- </para>
- </listitem>
- </varlistentry>
-
- <!-- JBIDE-9259 -->
- <varlistentry>
- <term>
- <ulink url="https://issues.jboss.org/jira/browse/JBIDE-9259">JBIDE-9259</ulink>
- </term>
- <listitem>
- <para>
- The default RichFaces component that appears in the Palette has been changed from RichFaces 3 to RichFaces 4. Tooling for RichFaces 3 is still available, though it is hidden by default.
- </para>
- </listitem>
- </varlistentry>
-
- <!-- JBIDE-9244 -->
- <varlistentry>
- <term>
- <ulink url="https://issues.jboss.org/jira/browse/JBIDE-9244">JBIDE-9244</ulink>
- </term>
- <listitem>
- <para>
- Validation of default Beans has been added when utilizing Seam Solder.
- </para>
- </listitem>
- </varlistentry>
-
-
- <!-- JBIDE-9209 -->
- <varlistentry>
- <term>
- <ulink url="https://issues.jboss.org/jira/browse/JBIDE-9209">JBIDE-9209</ulink>
- </term>
- <listitem>
- <para>
- A new feature has been added that allows a user to select from a list of quick fixes for issues shown when using the XML, JSP or XHTML editors. This feature is similar to the existing feature available for the Java editor.
- </para>
- </listitem>
- </varlistentry>
-
- <!-- JBIDE-9203 -->
- <varlistentry>
- <term>
- <ulink url="https://issues.jboss.org/jira/browse/JBIDE-9203">JBIDE-9203</ulink>
- </term>
- <listitem>
- <para>
- Support for special and non-ASCII characters has been added to the JSP Externalize String Wizard. This allows code that is to be externalized to appear in the current code with indentation and contain such characters as line breaks, without causing error.
- </para>
- </listitem>
- </varlistentry>
-
- <!-- JBIDE-9195 -->
- <varlistentry>
- <term>
- <ulink url="https://issues.jboss.org/jira/browse/JBIDE-9195">JBIDE-9195</ulink>
- </term>
- <listitem>
- <para>
- A filter has been added for validation preference pages, allowing a user to search available preferences based on key words.
- </para>
- </listitem>
- </varlistentry>
-
- <!-- JBIDE-9187 -->
- <varlistentry>
- <term>
- <ulink url="https://issues.jboss.org/jira/browse/JBIDE-9187">JBIDE-9187</ulink>
- </term>
- <listitem>
- <para>
- New OpenOn functionality has been added for the s:Inject Seam tag. When this tag is used, a user can now Ctrl+Click on the tag to see a list of beans that can be injected.
- </para>
- </listitem>
- </varlistentry>
-
-
- <!-- JBIDE-9132 -->
- <varlistentry>
- <term>
- <ulink url="https://issues.jboss.org/jira/browse/JBIDE-9132">JBIDE-9132</ulink>
- </term>
- <listitem>
- <para>
- A bug existed that would show a user the files of the locally defined server when clicking the Explore item from the context menu of a remote server. The remote server adaptor has been updated in this release to display the Remote System Details view and appropriate remote server folder when choosing the Explore open for a remote server.
- </para>
- </listitem>
- </varlistentry>
-
- <!-- JBIDE-9087 -->
- <varlistentry>
- <term>
- <ulink url="https://issues.jboss.org/jira/browse/JBIDE-9087">JBIDE-9087</ulink>
- </term>
- <listitem>
- <para>
- Bundle bean support has been added for the Seam International module. This added support allows users to have access to code completion, OpenOn and validation when using the Seam International module for application localization.
- </para>
- </listitem>
- </varlistentry>
-
-
- <!-- JBIDE-8969 -->
- <varlistentry>
- <term>
- <ulink url="https://issues.jboss.org/jira/browse/JBIDE-8969">JBIDE-8969</ulink>
- </term>
- <listitem>
- <para>
- The user interface has been improved for Maven profile selection. Instead of a user accessing Maven profiles through a projects Preferences screen, a dialog window has been added that can be accessed via the projects context menu.
- </para>
- </listitem>
- </varlistentry>
-
- <!-- JBIDE-8950 -->
- <varlistentry>
- <term>
- <ulink url="https://issues.jboss.org/jira/browse/JBIDE-8950">JBIDE-8950</ulink>
- </term>
- <listitem>
- <para>
- Templates have been created for missing RichFaces 4 tags in the Visual Page Editor. The tags with added templates are: rich:collapsibleSubTable, rich:collapsibleSubTableToggler, rich:dragSource, rich:dropTarget, rich:hashParam, rich:treeModelAdaptor, rich:treeModelRecursiveAdaptor, rich:treeSelectionChangeListener, rich:treeToggleListener and rich:validator.
- </para>
- </listitem>
- </varlistentry>
-
-
- <!-- JBIDE-8770 -->
- <varlistentry>
- <term>
- <ulink url="https://issues.jboss.org/jira/browse/JBIDE-8770">JBIDE-8770</ulink>
- </term>
- <listitem>
- <para>
- Web Services Tester sample input is now provided for WSDLs, and includes SOAP header definition.
- </para>
- </listitem>
- </varlistentry>
-
- <!-- JBIDE-8719 -->
- <varlistentry>
- <term>
- <ulink url="https://issues.jboss.org/jira/browse/JBIDE-8719">JBIDE-8719</ulink>
- </term>
- <listitem>
- <para>
- A new feature has been added when using the Page Design Options dialog of the Visual Page Editor. The default root folder is now displayed in the tab: Actual Run-Time Folders. This provides the user with relevant information in making a decision on whether the folder location should be changed.
- </para>
- </listitem>
- </varlistentry>
-
- <!-- JBIDE-8705 -->
- <varlistentry>
- <term>
- <ulink url="https://issues.jboss.org/jira/browse/JBIDE-8705">JBIDE-8705</ulink>
- </term>
- <listitem>
- <para>
- A new CDI feature has bean implemented that allows a user to select a bean and press the key combination Ctrl+Shift+G in order to search for points where the bean has been injected. This works for bean classes, producer fields and producer methods.
- </para>
- </listitem>
- </varlistentry>
-
-
-
-
- <!-- JBIDE-8658 -->
- <varlistentry>
- <term>
- <ulink url="https://issues.jboss.org/jira/browse/JBIDE-8658">JBIDE-8658</ulink>
- </term>
- <listitem>
- <para>
- When attempting deployment to a remote host, the server adaptor would return a state of synchronization even if deployment failed. This issue has been fixed by ensuring that in the event of an exception, the module's publish state is set to republish and the running state to unknown. If this occurs, the server adaptor will attempt resynchronization.
- </para>
- </listitem>
- </varlistentry>
-
- <!-- JBIDE-8548 -->
- <varlistentry>
- <term>
- <ulink url="https://issues.jboss.org/jira/browse/JBIDE-8548">JBIDE-8548</ulink>
- </term>
- <listitem>
- <para>
- Auto-discovery of remote processes for the purpose of debugging has been added for JBoss Developer Studio 5. This allows for easier testing of Java processes and applications.
- </para>
- </listitem>
- </varlistentry>
-
- <!-- JBIDE-8519 -->
- <varlistentry>
- <term>
- <ulink url="https://issues.jboss.org/jira/browse/JBIDE-8519">JBIDE-8519</ulink>
- </term>
- <listitem>
- <para>
- In previous versions of JBoss Developer Studio the functions ?floor, ?ceiling and ?round caused parse errors. This issue has been fixed by updating the Freemarker runtime to version 2.3.18, which corrects this issue.
- </para>
- </listitem>
- </varlistentry>
-
- <!-- JBIDE-8421 -->
- <varlistentry>
- <term><ulink url="https://issues.jboss.org/jira/browse/JBIDE-8421">JBIDE-8421</ulink></term>
+ <term><ulink url="https://issues.jboss.org/jira/browse/JBIDE-11310">JBIDE-11310</ulink></term>
<listitem>
<para>
- A new feature has been added that outputs remote system explorer information to the console view. This allows a user to use the console view for a remote system as they would for a local server.
+ An issue in the OpenShift tooling meant that if a user logged into OpenShift and created an application, then went back to the login screen and signed in as a different user, the previous application parameters would still be available. This meant the second user was not able to create an application with the same parameters, and was also able to view what the previous user had created, causing a potential security issue. OpenShift tooling has been updated to reset when a new user connects, triggering a refresh of the targets and parameters.
</para>
</listitem>
</varlistentry>
- <!-- JBIDE-8280 -->
- <varlistentry>
- <term><ulink url="https://issues.jboss.org/jira/browse/JBIDE-8280">JBIDE-8280</ulink></term>
- <listitem>
- <para>
- JavaServer Faces 2 has been updated with a new feature called metadata-complete. The metadata-complete attribute defines whether the JSF application is complete and the class files available to and packaged with this application should be examined for configuration annotations. If metadata-complete is not
- </para>
- <para>
- specified or is set to a value of false, the JavaServer Faces runtime must examine the class files of the application
- </para>
- <para>
- for annotations, as specified by the specification.
- </para>
- </listitem>
- </varlistentry>
+</variablelist>
- <!-- JBIDE-8195 -->
- <varlistentry>
- <term><ulink url="https://issues.jboss.org/jira/browse/JBIDE-8195">JBIDE-8195</ulink></term>
- <listitem>
- <para>
- Support for Seam Solder extensions has been added to JBoss Developer Studio. By supporting Seam Solder extensions, general purpose configuration utilities, a resource loader and a typesafe logging framework are available for use with CDI tooling.
- </para>
- </listitem>
- </varlistentry>
- <!-- JBIDE-7892 -->
- <varlistentry>
- <term><ulink url="https://issues.jboss.org/jira/browse/JBIDE-7892">JBIDE-7892</ulink></term>
- <listitem>
- <para>
- CDI tooling has been updated allowing users to search for @Namd beans using the new Open CDI Named Bean Dialog. To see if a bean has been successfully removed, a history update can be performed. Bean removal history is updated when a search is instigated and all labels are styled, and provide the path to search on for bean declaration.
- </para>
- </listitem>
- </varlistentry>
-
- <!-- JBIDE-7851 -->
- <varlistentry>
- <term><ulink url="https://issues.jboss.org/jira/browse/JBIDE-7851">JBIDE-7851</ulink></term>
- <listitem>
- <para>
- The restart ability in the main toolbar has been renamed to restart-module and added to the context menu of a deployed archive. This feature touches the web.xml file of a selected module, forcing the module to refresh on the server.
- </para>
- </listitem>
- </varlistentry>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <!-- JBIDE-7141 -->
- <varlistentry>
- <term><ulink url="https://issues.jboss.org/jira/browse/JBIDE-7141">JBIDE-7141</ulink></term>
- <listitem>
- <para>
- JBoss Web Services runtime implementation and version information has been added to the JBoss Web Services facet addition screen of project creation and when editing a JBoss Web Services runtime within JBoss Developer Studio Preferences. This information allows a user to make an informed decision when selecting a JBoss Web Services runtime for their project.
- </para>
- </listitem>
- </varlistentry>
-
- <!-- JBIDE-6327 -->
- <varlistentry>
- <term><ulink url="https://issues.jboss.org/jira/browse/JBIDE-6327">JBIDE-6327</ulink></term>
- <listitem>
- <para>
- New features have been added that enhance the tooling for web services. A new raw message request format has been implemented for readability. Any enhancements done to the raw XML (such as indenting), will be removed when the message is sent to the web service. This avoids issues encountered with web services that have issues interpreting XML containing spaces between tags.
- </para>
- <para>
- A new button has also been added that displays hierarchical information for XML formatted documents within a tree structure. Using the tree structure, a user can provide data for contained fields that display a question mark. Changes are reflected in the raw text of the request message.
- </para>
- </listitem>
- </varlistentry>
-
- <!-- JBIDE-5045 -->
- <varlistentry>
- <term><ulink url="https://issues.jboss.org/jira/browse/JBIDE-5045">JBIDE-5045</ulink></term>
- <listitem>
- <para>
- Support for annotated manage beans has been added for JSF 2 projects.
- </para>
- </listitem>
- </varlistentry>
-
-
- <!-- JBDS-1673 -->
- <varlistentry>
- <term><ulink url="https://issues.jboss.org/jira/browse/JBDS-1673">JBDS-1673</ulink></term>
- <listitem>
- <para>
- The JBoss Developer Studio installer server detection did not allign with runtime detection from within the tooling. When detection plug-ins were updated, new servers were not automatically detected due to the code split between detection through the product installation wizard and runtime detection within the user interface. In this release, on first start-up, the installer asks for a list of directories to scan for new servers. The directory selected will then be optionally scanned on every subsequent launch of the JBoss Developer Studio and new discovered servers will be displayed in a list to the user. This allows for new servers to be detected, while not having to duplicate the code and combine it with the runtime detection available from within JBoss Developer Studio.
- </para>
- </listitem>
- </varlistentry>
-
-</variablelist>
-
</section>
Modified: tags/jbosstools-3.3.1.Final/documentation/guides/JBDS_Release_Notes/en-US/Known_Issues.xml
===================================================================
--- tags/jbosstools-3.3.1.Final/documentation/guides/JBDS_Release_Notes/en-US/Known_Issues.xml 2012-07-30 15:20:53 UTC (rev 42788)
+++ tags/jbosstools-3.3.1.Final/documentation/guides/JBDS_Release_Notes/en-US/Known_Issues.xml 2012-07-30 23:00:30 UTC (rev 42789)
@@ -1,11 +1,14 @@
<?xml version='1.0' encoding='utf-8' ?>
<section id="Known_Issues_with_this_release">
<title>
- Known Issues in version 5.0.0
+ Known Issues in version 5.0.1
</title>
<!-- <para>
There were no known issues at the time of release.
</para> -->
+
+
+<!-- Below is the list of known issues as they were for JBDS 5.0.0 -->
<para>
Following is a list of known issues at the time of release.
</para>
Modified: tags/jbosstools-3.3.1.Final/documentation/guides/JBDS_Release_Notes/en-US/Overview.xml
===================================================================
--- tags/jbosstools-3.3.1.Final/documentation/guides/JBDS_Release_Notes/en-US/Overview.xml 2012-07-30 15:20:53 UTC (rev 42788)
+++ tags/jbosstools-3.3.1.Final/documentation/guides/JBDS_Release_Notes/en-US/Overview.xml 2012-07-30 23:00:30 UTC (rev 42789)
@@ -2,37 +2,38 @@
<section id="Overview">
<title>Overview</title>
<para>
- JBoss Developer Studio 5.0 is a major release of the Eclipse based IDE developed and supported by Red Hat (the visual tooling components are supported for 3 years, and the runtime platform for 5 years). The IDE, which is available for Windows, Linux and OS X, provides tooling that allows for rapid Web 2.0 application development on the JBoss Enterprise Application Platform. <!-- This release also improves support for SOA application development with the JBoss Enterprise SOA Platform.-->
+ JBoss Developer Studio 5.0.1 is a minor release of the Eclipse based IDE developed and supported by Red Hat (the visual tooling components are supported for 3 years, and the runtime platform for 5 years). The IDE, which is available for Windows, Linux and OS X, provides tooling that allows for rapid Web 2.0 application development on the JBoss Enterprise Application Platform.
</para>
+
<para>
- JBoss Developer Studio 5.0 contains many new features, including:
+ JBoss Developer Studio 5.0.1 corrects bugs and adds enhancements to the 5.0.0 release.
</para>
- <itemizedlist>
+<!-- <itemizedlist>
<listitem>
<para>
OpenShift support
- <!-- https://issues.jboss.org/browse/JBDS-1896 -->
+
</para>
</listitem>
<listitem>
<para>
Maven support
- <!-- https://issues.jboss.org/browse/JBIDE-9591 -->
+
</para>
</listitem>
<listitem>
<para>
SAR project deployment
- <!-- https://issues.jboss.org/browse/JBIDE-9497 -->
+
</para>
</listitem>
<listitem>
<para>
Seam Servlet module support
- <!-- https://issues.jboss.org/browse/JBIDE-9388 -->
+
</para>
</listitem>
- </itemizedlist>
+ </itemizedlist> -->
<para>
JBoss Developer Studio 5 is supported on the following operating systems:
</para>
Modified: tags/jbosstools-3.3.1.Final/documentation/guides/JBDS_Release_Notes/en-US/Revision_History.xml
===================================================================
--- tags/jbosstools-3.3.1.Final/documentation/guides/JBDS_Release_Notes/en-US/Revision_History.xml 2012-07-30 15:20:53 UTC (rev 42788)
+++ tags/jbosstools-3.3.1.Final/documentation/guides/JBDS_Release_Notes/en-US/Revision_History.xml 2012-07-30 23:00:30 UTC (rev 42789)
@@ -6,7 +6,7 @@
<revhistory>
<revision>
<revnumber>1-0</revnumber>
- <date>Thu Sep 01 2011</date>
+ <date>Wed Jul 04 2012</date>
<author>
<firstname>Isaac</firstname>
<surname>Rooskov</surname>
Modified: tags/jbosstools-3.3.1.Final/documentation/guides/JBDS_Release_Notes/en-US/master.xml
===================================================================
--- tags/jbosstools-3.3.1.Final/documentation/guides/JBDS_Release_Notes/en-US/master.xml 2012-07-30 15:20:53 UTC (rev 42788)
+++ tags/jbosstools-3.3.1.Final/documentation/guides/JBDS_Release_Notes/en-US/master.xml 2012-07-30 23:00:30 UTC (rev 42789)
@@ -25,7 +25,7 @@
<holder>JBoss by Red Hat</holder>
</copyright>
<releaseinfo>
- Version: 3.3.0.GA
+ Version: 3.3.1.Final
</releaseinfo>
12 years, 4 months
JBoss Tools SVN: r42788 - trunk/archives/tests/org.jboss.tools.archives.ui.bot.test.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-07-30 11:20:53 -0400 (Mon, 30 Jul 2012)
New Revision: 42788
Modified:
trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/pom.xml
Log:
fix debug profile in pom.xml
Modified: trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/pom.xml
===================================================================
--- trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/pom.xml 2012-07-30 15:15:37 UTC (rev 42787)
+++ trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/pom.xml 2012-07-30 15:20:53 UTC (rev 42788)
@@ -20,8 +20,7 @@
<profile>
<id>debug</id>
<properties>
- <additionalSystemProperties>-Xdebug
- -Xrunjdwp:transport=dt_socket,address=8001,server=y,suspend=y</additionalSystemProperties>
+ <additionalSystemProperties>-Xdebug -Xrunjdwp:transport=dt_socket,address=8001,server=y,suspend=y</additionalSystemProperties>
</properties>
</profile>
</profiles>
12 years, 4 months
JBoss Tools SVN: r42787 - in trunk/ws: plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain and 11 other directories.
by jbosstools-commits@lists.jboss.org
Author: xcoulon
Date: 2012-07-30 11:15:37 -0400 (Mon, 30 Jul 2012)
New Revision: 42787
Added:
trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/utils/Pair.java
trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/jdt/EnumJaxrsClassname.java
trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/metamodel/EnumElementCategory.java
trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/metamodel/EnumElementKind.java
Removed:
trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/jdt/EnumJaxrsElements.java
trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/metamodel/EnumElementKind.java
trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/metamodel/EnumKind.java
Modified:
trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JavaElementChangedProcessor.java
trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JaxrsElementDelta.java
trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JaxrsMetamodelChangedProcessor.java
trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/ResourceChangedProcessor.java
trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsBaseElement.java
trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsElementFactory.java
trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsEndpoint.java
trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsHttpMethod.java
trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsJavaApplication.java
trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsJavaElement.java
trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsMetamodel.java
trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsParamBeanProperty.java
trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsProvider.java
trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsResource.java
trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsResourceField.java
trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsResourceMethod.java
trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsWebxmlApplication.java
trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/validation/JaxrsMetamodelValidator.java
trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/jdt/JaxrsAnnotationsScanner.java
trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/metamodel/IJaxrsApplication.java
trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/metamodel/IJaxrsProvider.java
trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/metamodel/IJaxrsResourceMethod.java
trunk/ws/plugins/org.jboss.tools.ws.jaxrs.ui/src/org/jboss/tools/ws/jaxrs/ui/contentassist/PathParamAnnotationValueCompletionProposalComputer.java
trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/src/org/jboss/tools/ws/jaxrs/core/WorkbenchUtils.java
trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JavaElementChangedProcessorTestCase.java
trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JaxrsMetamodelChangedProcessorTestCase.java
trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/ResourceChangedProcessorTestCase.java
trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsElementFactoryTestCase.java
trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsMetamodelTestCase.java
trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/validation/JaxrsMetamodelValidatorTestCase.java
trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/src/org/jboss/tools/ws/jaxrs/core/internal/utils/WtpUtilsTestCase.java
trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/src/org/jboss/tools/ws/jaxrs/core/jdt/JdtUtilsTestCase.java
Log:
Renaming EnumKind to EnumElementKind to better reflect usage
Modified: trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JavaElementChangedProcessor.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JavaElementChangedProcessor.java 2012-07-30 14:56:26 UTC (rev 42786)
+++ trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JavaElementChangedProcessor.java 2012-07-30 15:15:37 UTC (rev 42787)
@@ -21,7 +21,7 @@
import static org.eclipse.jdt.core.IJavaElementDelta.CHANGED;
import static org.eclipse.jdt.core.IJavaElementDelta.REMOVED;
import static org.jboss.tools.ws.jaxrs.core.internal.metamodel.builder.JaxrsElementDelta.F_NONE;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.HTTP_METHOD;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.HTTP_METHOD;
import java.util.ArrayList;
import java.util.Collections;
@@ -55,8 +55,8 @@
import org.jboss.tools.ws.jaxrs.core.jdt.CompilationUnitsRepository;
import org.jboss.tools.ws.jaxrs.core.jdt.JaxrsAnnotationsScanner;
import org.jboss.tools.ws.jaxrs.core.jdt.JdtUtils;
+import org.jboss.tools.ws.jaxrs.core.metamodel.EnumElementCategory;
import org.jboss.tools.ws.jaxrs.core.metamodel.EnumElementKind;
-import org.jboss.tools.ws.jaxrs.core.metamodel.EnumKind;
import org.jboss.tools.ws.jaxrs.core.metamodel.JaxrsMetamodelDelta;
import org.jboss.tools.ws.jaxrs.core.metamodel.JaxrsMetamodelLocator;
@@ -111,33 +111,36 @@
if (metamodel == null) {
metamodel = JaxrsMetamodel.create(javaProject);
}
-
switch (deltaKind) {
case ADDED:
- switch (elementType) {
- case JAVA_PROJECT:
- return processAddition(element, metamodel, progressMonitor);
- case PACKAGE_FRAGMENT_ROOT:
- return processAddition(element, metamodel, progressMonitor);
- case COMPILATION_UNIT:
- return processAddition((ICompilationUnit) element, ast, metamodel, progressMonitor);
- case TYPE:
- return processAddition((IType) element, ast, metamodel, progressMonitor);
- case METHOD:
- return processAddition((IMethod) element, ast, metamodel, progressMonitor);
- case FIELD:
- return processAddition((IField) element, ast, metamodel, progressMonitor);
- case ANNOTATION:
- return processAddition((IAnnotation) element, ast, metamodel, progressMonitor);
- }
+ //if(element.exists()) { // needed to prevent exception for edge cases such as 'package-info.java' that holds some shadow 'A' type..
+ switch (elementType) {
+ case JAVA_PROJECT:
+ return processAddition(element, metamodel, progressMonitor);
+ case PACKAGE_FRAGMENT_ROOT:
+ return processAddition(element, metamodel, progressMonitor);
+ case COMPILATION_UNIT:
+ return processAddition((ICompilationUnit) element, ast, metamodel, progressMonitor);
+ case TYPE:
+ return processAddition((IType) element, ast, metamodel, progressMonitor);
+ case METHOD:
+ return processAddition((IMethod) element, ast, metamodel, progressMonitor);
+ case FIELD:
+ return processAddition((IField) element, ast, metamodel, progressMonitor);
+ case ANNOTATION:
+ return processAddition((IAnnotation) element, ast, metamodel, progressMonitor);
+ }
+ //}
break;
case CHANGED:
- switch (elementType) {
- case METHOD:
- return processChange((IMethod) element, ast, metamodel, progressMonitor);
- case ANNOTATION:
- return processChange((IAnnotation) element, ast, metamodel, progressMonitor);
- }
+ //if(element.exists()) { // needed to prevent exception for edge cases such as 'package-info.java' that holds some shadow 'A' type..
+ switch (elementType) {
+ case METHOD:
+ return processChange((IMethod) element, ast, metamodel, progressMonitor);
+ case ANNOTATION:
+ return processChange((IAnnotation) element, ast, metamodel, progressMonitor);
+ }
+ //}
break;
case REMOVED:
switch (elementType) {
@@ -315,7 +318,7 @@
if (createdElement != null) {
metamodel.add(createdElement);
changes.add(new JaxrsElementDelta(createdElement, ADDED));
- switch (createdElement.getElementKind()) {
+ switch (createdElement.getElementCategory()) {
case RESOURCE_FIELD:
case RESOURCE_METHOD:
JaxrsResource parentResource = ((JaxrsResourceElement<?>) createdElement).getParentResource();
@@ -353,7 +356,7 @@
if (createdElement != null) {
metamodel.add(createdElement);
changes.add(new JaxrsElementDelta(createdElement, ADDED));
- switch (createdElement.getElementKind()) {
+ switch (createdElement.getElementCategory()) {
case RESOURCE_FIELD:
case RESOURCE_METHOD:
JaxrsResource parentResource = ((JaxrsResourceElement<?>) createdElement).getParentResource();
@@ -377,7 +380,7 @@
JaxrsMetamodel metamodel, IProgressMonitor progressMonitor) throws CoreException {
final List<JaxrsElementDelta> changes = new ArrayList<JaxrsElementDelta>();
final JaxrsBaseElement jaxrsElement = metamodel.getElement(javaMethod);
- if (jaxrsElement != null && jaxrsElement.getElementKind() == EnumElementKind.RESOURCE_METHOD) {
+ if (jaxrsElement != null && jaxrsElement.getElementCategory() == EnumElementCategory.RESOURCE_METHOD) {
final int flag = ((JaxrsResourceMethod) jaxrsElement).update(CompilationUnitsRepository.getInstance()
.getMethodSignature(javaMethod));
if (flag != F_NONE) {
@@ -452,7 +455,7 @@
if (element != null) {
// The logic is the same for all the kinds of elements
final int flag = element.removeAnnotation(javaAnnotation.getHandleIdentifier());
- if (element.getKind() == EnumKind.UNDEFINED) {
+ if (element.getElementKind() == EnumElementKind.UNDEFINED) {
metamodel.remove(element);
changes.add(new JaxrsElementDelta(element, REMOVED));
} else {
@@ -478,7 +481,7 @@
final List<JaxrsElementDelta> changes = new ArrayList<JaxrsElementDelta>();
final List<JaxrsBaseElement> elements = metamodel.getElements(method);
for (JaxrsBaseElement element : elements) {
- if (element.getElementKind() == EnumElementKind.RESOURCE_METHOD) {
+ if (element.getElementCategory() == EnumElementCategory.RESOURCE_METHOD) {
metamodel.remove(element);
changes.add(new JaxrsElementDelta(element, REMOVED));
}
Modified: trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JaxrsElementDelta.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JaxrsElementDelta.java 2012-07-30 14:56:26 UTC (rev 42786)
+++ trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JaxrsElementDelta.java 2012-07-30 15:15:37 UTC (rev 42787)
@@ -21,7 +21,7 @@
import org.jboss.tools.ws.jaxrs.core.internal.metamodel.domain.JaxrsBaseElement;
import org.jboss.tools.ws.jaxrs.core.internal.utils.ConstantUtils;
import org.jboss.tools.ws.jaxrs.core.internal.utils.Logger;
-import org.jboss.tools.ws.jaxrs.core.metamodel.EnumKind;
+import org.jboss.tools.ws.jaxrs.core.metamodel.EnumElementKind;
public class JaxrsElementDelta implements Comparable<JaxrsElementDelta> {
@@ -110,7 +110,7 @@
@Override
public String toString() {
StringBuilder s = new StringBuilder();
- s.append("JaxrsElementChange: [").append(ConstantUtils.toCamelCase(element.getElementKind().toString()))
+ s.append("JaxrsElementChange: [").append(ConstantUtils.toCamelCase(element.getElementCategory().toString()))
.append(" ").append(ConstantUtils.getStaticFieldName(IJavaElementDelta.class, deltaKind)).append("] ")
.append(element.getName());
@@ -142,8 +142,8 @@
@Override
public int compareTo(JaxrsElementDelta other) {
- final EnumKind elementKind = this.element.getKind();
- final EnumKind otherElementKind = other.getElement().getKind();
+ final EnumElementKind elementKind = this.element.getElementKind();
+ final EnumElementKind otherElementKind = other.getElement().getElementKind();
return elementKind.ordinal() - otherElementKind.ordinal();
}
Modified: trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JaxrsMetamodelChangedProcessor.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JaxrsMetamodelChangedProcessor.java 2012-07-30 14:56:26 UTC (rev 42786)
+++ trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JaxrsMetamodelChangedProcessor.java 2012-07-30 15:15:37 UTC (rev 42787)
@@ -36,8 +36,8 @@
import org.jboss.tools.ws.jaxrs.core.internal.metamodel.domain.JaxrsResourceMethod;
import org.jboss.tools.ws.jaxrs.core.internal.utils.Logger;
import org.jboss.tools.ws.jaxrs.core.jdt.JdtUtils;
+import org.jboss.tools.ws.jaxrs.core.metamodel.EnumElementCategory;
import org.jboss.tools.ws.jaxrs.core.metamodel.EnumElementKind;
-import org.jboss.tools.ws.jaxrs.core.metamodel.EnumKind;
import org.jboss.tools.ws.jaxrs.core.metamodel.IJaxrsApplication;
import org.jboss.tools.ws.jaxrs.core.metamodel.IJaxrsResource;
import org.jboss.tools.ws.jaxrs.core.metamodel.IJaxrsResourceMethod;
@@ -87,7 +87,7 @@
@SuppressWarnings("incomplete-switch")
private List<JaxrsEndpointDelta> processEvent(final JaxrsElementDelta event) throws CoreException {
final JaxrsBaseElement element = event.getElement();
- final EnumElementKind elementKind = element.getElementKind();
+ final EnumElementCategory elementKind = element.getElementCategory();
final int flags = event.getFlags();
switch (event.getDeltaKind()) {
case ADDED:
@@ -169,10 +169,10 @@
if (resource == null) {
Logger.warn("Found an orphan resource method: " + resourceMethod);
} else {
- switch (resourceMethod.getKind()) {
+ switch (resourceMethod.getElementKind()) {
case RESOURCE_METHOD:
case SUBRESOURCE_METHOD:
- switch (resource.getKind()) {
+ switch (resource.getElementKind()) {
case ROOT_RESOURCE:
changes.addAll(processRootResourceMethodAddition(resourceMethod, metamodel));
break;
@@ -184,7 +184,7 @@
break;
case SUBRESOURCE_LOCATOR:
// FIXME : support multiple levels of subresource locators
- switch (resource.getKind()) {
+ switch (resource.getElementKind()) {
case ROOT_RESOURCE:
changes.addAll(processSubresourceLocatorAddition(resourceMethod, metamodel));
break;
@@ -208,7 +208,7 @@
for (IJaxrsResource otherResource : metamodel.getAllResources()) {
if (((JaxrsResource) otherResource).isRootResource()) {
for (JaxrsResourceMethod otherResourceMethod : ((JaxrsResource) otherResource).getMethods().values()) {
- if (otherResourceMethod.getKind() == EnumKind.SUBRESOURCE_LOCATOR) {
+ if (otherResourceMethod.getElementKind() == EnumElementKind.SUBRESOURCE_LOCATOR) {
final String returnTypeHandler = (otherResourceMethod.getReturnType() != null) ? otherResourceMethod
.getReturnType().getHandleIdentifier() : null;
if (returnTypeHandler != null && supertypesHandlers.contains(returnTypeHandler)) {
@@ -256,7 +256,7 @@
if (resourceHandleIdentifier.equals(returnType.getHandleIdentifier())
|| subtypesHandlers.contains(resourceHandleIdentifier)) {
for (JaxrsResourceMethod resourceMethod : resource.getMethods().values()) {
- switch (resourceMethod.getKind()) {
+ switch (resourceMethod.getElementKind()) {
case RESOURCE_METHOD:
case SUBRESOURCE_METHOD:
final JaxrsHttpMethod httpMethod = metamodel.getHttpMethod(resourceMethod
@@ -349,7 +349,7 @@
}
// create endpoints using this resourceMethod:
changes.addAll(processAddition(changedResourceMethod));
- } else if (changedResourceMethod.getKind() == EnumKind.SUBRESOURCE_LOCATOR
+ } else if (changedResourceMethod.getElementKind() == EnumElementKind.SUBRESOURCE_LOCATOR
&& (flags & F_METHOD_RETURN_TYPE) > 0) {
for (Iterator<JaxrsEndpoint> endpointIterator = changedResourceMethod.getMetamodel().getEndpoints()
Modified: trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/ResourceChangedProcessor.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/ResourceChangedProcessor.java 2012-07-30 14:56:26 UTC (rev 42786)
+++ trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/ResourceChangedProcessor.java 2012-07-30 15:15:37 UTC (rev 42787)
@@ -15,7 +15,7 @@
import static org.eclipse.jdt.core.IJavaElementDelta.REMOVED;
import static org.jboss.tools.ws.jaxrs.core.internal.metamodel.builder.JaxrsElementDelta.F_ELEMENT_KIND;
import static org.jboss.tools.ws.jaxrs.core.internal.metamodel.builder.JaxrsElementDelta.F_FINE_GRAINED;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.APPLICATION;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.APPLICATION;
import java.util.ArrayList;
import java.util.Collection;
@@ -51,7 +51,7 @@
import org.jboss.tools.ws.jaxrs.core.jdt.JavaMethodSignature;
import org.jboss.tools.ws.jaxrs.core.jdt.JaxrsAnnotationsScanner;
import org.jboss.tools.ws.jaxrs.core.jdt.JdtUtils;
-import org.jboss.tools.ws.jaxrs.core.metamodel.EnumKind;
+import org.jboss.tools.ws.jaxrs.core.metamodel.EnumElementKind;
import org.jboss.tools.ws.jaxrs.core.metamodel.IJaxrsApplication;
import org.jboss.tools.ws.jaxrs.core.metamodel.JaxrsMetamodelDelta;
import org.jboss.tools.ws.jaxrs.core.metamodel.JaxrsMetamodelLocator;
@@ -227,14 +227,14 @@
final IJaxrsApplication application = metamodel.getApplication();
if (resolvedApplicationPath != null) {
final JaxrsWebxmlApplication webxmlApplication = factory.createApplication(resolvedApplicationPath, resource, metamodel);
- if (application == null || application.getKind() == EnumKind.APPLICATION_JAVA) {
+ if (application == null || application.getElementKind() == EnumElementKind.APPLICATION_JAVA) {
metamodel.add(webxmlApplication);
results.add(new JaxrsElementDelta(webxmlApplication, ADDED));
- } else if (application != null && application.getKind() == EnumKind.APPLICATION_WEBXML) {
+ } else if (application != null && application.getElementKind() == EnumElementKind.APPLICATION_WEBXML) {
int flags = webxmlApplication.update(webxmlApplication);
results.add(new JaxrsElementDelta(webxmlApplication, CHANGED, flags));
}
- } else if(application != null && application.getKind() == EnumKind.APPLICATION_WEBXML){
+ } else if(application != null && application.getElementKind() == EnumElementKind.APPLICATION_WEBXML){
final JaxrsWebxmlApplication webxmlApplication = (JaxrsWebxmlApplication) application;
metamodel.remove(webxmlApplication);
results.add(new JaxrsElementDelta(webxmlApplication, REMOVED));
@@ -656,7 +656,7 @@
final JaxrsResourceField existingField = entry.getValue();
final JaxrsResourceField matchingField = matchingResource.getFields().get(entry.getKey());
int flags = existingField.mergeAnnotations(matchingField.getAnnotations());
- if ((flags & F_ELEMENT_KIND) > 0 && existingField.getKind() == EnumKind.UNDEFINED) {
+ if ((flags & F_ELEMENT_KIND) > 0 && existingField.getElementKind() == EnumElementKind.UNDEFINED) {
metamodel.remove(existingField);
changes.add(new JaxrsElementDelta(existingField, REMOVED));
} else if (flags > 0) {
@@ -697,7 +697,7 @@
final JavaMethodSignature matchingResourceMethodSignature = JdtUtils.resolveMethodSignature(matchingMethod.getJavaElement(), matchingResourceAST);
if(matchingResourceMethodSignature != null) {
flags += existingMethod.update(matchingResourceMethodSignature);
- if ((flags & F_ELEMENT_KIND) > 0 && existingMethod.getKind() == EnumKind.UNDEFINED) {
+ if ((flags & F_ELEMENT_KIND) > 0 && existingMethod.getElementKind() == EnumElementKind.UNDEFINED) {
metamodel.remove(existingMethod);
changes.add(new JaxrsElementDelta(existingMethod, REMOVED));
} else if (flags > 0) {
Modified: trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsBaseElement.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsBaseElement.java 2012-07-30 14:56:26 UTC (rev 42786)
+++ trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsBaseElement.java 2012-07-30 15:15:37 UTC (rev 42787)
@@ -5,8 +5,8 @@
import org.eclipse.core.resources.IResource;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.wst.validation.ValidatorMessage;
+import org.jboss.tools.ws.jaxrs.core.metamodel.EnumElementCategory;
import org.jboss.tools.ws.jaxrs.core.metamodel.EnumElementKind;
-import org.jboss.tools.ws.jaxrs.core.metamodel.EnumKind;
import org.jboss.tools.ws.jaxrs.core.metamodel.IJaxrsElement;
public abstract class JaxrsBaseElement implements IJaxrsElement {
@@ -46,10 +46,10 @@
return metamodel;
}
+ public abstract EnumElementCategory getElementCategory();
+
public abstract EnumElementKind getElementKind();
- public abstract EnumKind getKind();
-
public abstract IResource getResource();
public abstract List<ValidatorMessage> validate() throws JavaModelException;
Modified: trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsElementFactory.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsElementFactory.java 2012-07-30 14:56:26 UTC (rev 42786)
+++ trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsElementFactory.java 2012-07-30 15:15:37 UTC (rev 42787)
@@ -14,42 +14,48 @@
import static org.eclipse.jdt.core.IJavaElement.FIELD;
import static org.eclipse.jdt.core.IJavaElement.METHOD;
import static org.eclipse.jdt.core.IJavaElement.TYPE;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.APPLICATION_PATH;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.CONSUMES;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.COOKIE_PARAM;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.DEFAULT_VALUE;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.HEADER_PARAM;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.HTTP_METHOD;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.MATRIX_PARAM;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.PATH;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.PATH_PARAM;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.PRODUCES;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.QUERY_PARAM;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.APPLICATION_PATH;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.CONSUMES;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.COOKIE_PARAM;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.DEFAULT_VALUE;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.HEADER_PARAM;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.HTTP_METHOD;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.MATRIX_PARAM;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.PATH;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.PATH_PARAM;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.PRODUCES;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.PROVIDER;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.QUERY_PARAM;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jdt.core.IAnnotation;
import org.eclipse.jdt.core.IField;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IMethod;
import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.ITypeHierarchy;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.jboss.tools.ws.jaxrs.core.internal.metamodel.domain.JaxrsResourceMethod.Builder;
import org.jboss.tools.ws.jaxrs.core.internal.utils.Logger;
+import org.jboss.tools.ws.jaxrs.core.internal.utils.Pair;
import org.jboss.tools.ws.jaxrs.core.jdt.Annotation;
+import org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname;
import org.jboss.tools.ws.jaxrs.core.jdt.JavaMethodParameter;
import org.jboss.tools.ws.jaxrs.core.jdt.JavaMethodSignature;
import org.jboss.tools.ws.jaxrs.core.jdt.JaxrsAnnotationsScanner;
import org.jboss.tools.ws.jaxrs.core.jdt.JdtUtils;
+import org.jboss.tools.ws.jaxrs.core.metamodel.EnumElementCategory;
import org.jboss.tools.ws.jaxrs.core.metamodel.EnumElementKind;
-import org.jboss.tools.ws.jaxrs.core.metamodel.EnumKind;
import org.jboss.tools.ws.jaxrs.core.metamodel.IJaxrsHttpMethod;
public class JaxrsElementFactory {
@@ -152,7 +158,7 @@
internalCreateField(javaField, ast, metamodel, resource);
}
// well, sorry.. this is not a valid JAX-RS resource..
- if (resource.getKind() == EnumKind.UNDEFINED) {
+ if (resource.getElementKind() == EnumElementKind.UNDEFINED) {
return null;
}
return resource;
@@ -353,7 +359,7 @@
// yet..
parentResource = internalCreateResource(parentType, ast, metamodel);
}
- if (parentResource != null && parentResource.getElementKind() == EnumElementKind.RESOURCE) {
+ if (parentResource != null && parentResource.getElementCategory() == EnumElementCategory.RESOURCE) {
final JaxrsResourceField field = internalCreateField(javaField, ast, metamodel,
(JaxrsResource) parentResource);
return field;
@@ -380,4 +386,77 @@
public JaxrsWebxmlApplication createApplication(String applicationPath, IResource resource, JaxrsMetamodel metamodel) {
return new JaxrsWebxmlApplication(applicationPath, resource, metamodel);
}
+
+ /**
+ * Creates a JAX-RS Provider from the given Type. A valid Provider must be annotated with
+ * <code>javax.ws.rs.ext.MessageBodyReader</code>, <code>javax.ws.rs.ext.MessageBodyWriter</code> or
+ * <code>javax.ws.rs.ext.ExceptionMapper</code>. If the given type is not annotated with
+ * <code>javax.ws.rs.ext.Provider</code>, a should be reported to the user.
+ *
+ * @param javaType
+ * @param metamodel
+ * @throws CoreException in case of underlying exception
+ * @return a representation of the given provider or null in case of invalid type (ie, not a valid JAX-RS Provider)
+ */
+ public JaxrsProvider createProvider(final IType javaType, final CompilationUnit ast, final JaxrsMetamodel metamodel, final IProgressMonitor progressMonitor ) throws CoreException {
+
+ final Map<String, Annotation> annotations = JdtUtils.resolveAnnotations(javaType, ast, PROVIDER.qualifiedName,
+ CONSUMES.qualifiedName, PRODUCES.qualifiedName);
+ // assert that given java type is not abstract
+ if(JdtUtils.isAbstractType(javaType)) {
+ return null;
+ }
+ ITypeHierarchy providerTypeHierarchy = JdtUtils.resolveTypeHierarchy(javaType, false, progressMonitor);
+ IType[] subtypes = providerTypeHierarchy.getSubtypes(javaType);
+ // assert that given java type has no sub-type, or continue;
+ if (subtypes != null && subtypes.length > 0) {
+ return null;
+ }
+ Map<EnumElementKind, IType> providedKinds = getProvidedKinds(javaType, ast, providerTypeHierarchy, progressMonitor);
+
+ //TODO: annotations are splitted here, but they are aggregated later again in the JaxrsProvider :-/
+ final Annotation providerAnnotation = annotations.get(PROVIDER.qualifiedName);
+ final Annotation consumesAnnotation = annotations.get(CONSUMES.qualifiedName);
+ final Annotation producesAnnotation = annotations.get(PRODUCES.qualifiedName);
+
+ final JaxrsProvider provider = new JaxrsProvider.Builder(javaType, metamodel).providing(providerAnnotation, providedKinds)
+ .consumes(consumesAnnotation).produces(producesAnnotation).build();
+ if(provider.getElementKind() == null) {
+ return null;
+ }
+ return provider;
+ }
+
+ /**
+ * @param metamodel
+ * @param providerType
+ * @param providerTypeHierarchy
+ * @param providerInterfaces
+ * @param progressMonitor
+ * @param providerTypeHierarchy
+ * @return
+ * @throws CoreException
+ * @throws JavaModelException
+ */
+ private static Map<EnumElementKind, IType> getProvidedKinds(final IType providerType,
+ final CompilationUnit compilationUnit, final ITypeHierarchy providerTypeHierarchy,
+ final IProgressMonitor progressMonitor)
+ throws CoreException, JavaModelException {
+ final Map<EnumElementKind, IType> providerKinds = new HashMap<EnumElementKind, IType>();
+ List<Pair<EnumJaxrsClassname, EnumElementKind>> pairs = new ArrayList<Pair<EnumJaxrsClassname, EnumElementKind>>();
+ pairs.add(Pair.makePair(EnumJaxrsClassname.MESSAGE_BODY_READER, EnumElementKind.MESSAGE_BODY_READER));
+ pairs.add(Pair.makePair(EnumJaxrsClassname.MESSAGE_BODY_WRITER, EnumElementKind.MESSAGE_BODY_WRITER));
+ pairs.add(Pair.makePair(EnumJaxrsClassname.EXCEPTION_MAPPER, EnumElementKind.EXCEPTION_MAPPER));
+
+ for (Pair<EnumJaxrsClassname, EnumElementKind> pair : pairs) {
+ final IType matchingGenericType = JdtUtils.resolveType(pair.a.qualifiedName, providerType.getJavaProject(), progressMonitor);
+ List<IType> argumentTypes = JdtUtils.resolveTypeArguments(providerType, compilationUnit,
+ matchingGenericType, providerTypeHierarchy, progressMonitor);
+ if (argumentTypes == null || argumentTypes.size() == 0) {
+ continue;
+ }
+ providerKinds.put(pair.b, argumentTypes.get(0));
+ }
+ return providerKinds;
+ }
}
Modified: trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsEndpoint.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsEndpoint.java 2012-07-30 14:56:26 UTC (rev 42786)
+++ trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsEndpoint.java 2012-07-30 15:15:37 UTC (rev 42787)
@@ -18,9 +18,9 @@
import static org.jboss.tools.ws.jaxrs.core.internal.metamodel.builder.JaxrsElementDelta.F_PATH_VALUE;
import static org.jboss.tools.ws.jaxrs.core.internal.metamodel.builder.JaxrsElementDelta.F_PRODUCED_MEDIATYPES_VALUE;
import static org.jboss.tools.ws.jaxrs.core.internal.metamodel.builder.JaxrsElementDelta.F_QUERY_PARAM_VALUE;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.DEFAULT_VALUE;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.MATRIX_PARAM;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.QUERY_PARAM;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.DEFAULT_VALUE;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.MATRIX_PARAM;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.QUERY_PARAM;
import java.util.ArrayList;
import java.util.Arrays;
Modified: trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsHttpMethod.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsHttpMethod.java 2012-07-30 14:56:26 UTC (rev 42786)
+++ trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsHttpMethod.java 2012-07-30 15:15:37 UTC (rev 42787)
@@ -12,7 +12,7 @@
package org.jboss.tools.ws.jaxrs.core.internal.metamodel.domain;
import static org.jboss.tools.ws.jaxrs.core.internal.metamodel.builder.JaxrsElementDelta.F_HTTP_METHOD_VALUE;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.HTTP_METHOD;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.HTTP_METHOD;
import java.util.ArrayList;
import java.util.List;
@@ -22,8 +22,8 @@
import org.eclipse.wst.validation.ValidatorMessage;
import org.jboss.tools.ws.jaxrs.core.internal.metamodel.builder.JaxrsMetamodelBuilder;
import org.jboss.tools.ws.jaxrs.core.jdt.Annotation;
+import org.jboss.tools.ws.jaxrs.core.metamodel.EnumElementCategory;
import org.jboss.tools.ws.jaxrs.core.metamodel.EnumElementKind;
-import org.jboss.tools.ws.jaxrs.core.metamodel.EnumKind;
import org.jboss.tools.ws.jaxrs.core.metamodel.IJaxrsHttpMethod;
/**
@@ -99,8 +99,8 @@
}
@Override
- public EnumElementKind getElementKind() {
- return EnumElementKind.HTTP_METHOD;
+ public EnumElementCategory getElementCategory() {
+ return EnumElementCategory.HTTP_METHOD;
}
@Override
@@ -183,11 +183,11 @@
}
@Override
- public EnumKind getKind() {
+ public EnumElementKind getElementKind() {
if (getHttpMethodAnnotation() != null) {
- return EnumKind.HTTP_METHOD;
+ return EnumElementKind.HTTP_METHOD;
}
- return EnumKind.UNDEFINED;
+ return EnumElementKind.UNDEFINED;
}
/**
Modified: trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsJavaApplication.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsJavaApplication.java 2012-07-30 14:56:26 UTC (rev 42786)
+++ trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsJavaApplication.java 2012-07-30 15:15:37 UTC (rev 42787)
@@ -11,7 +11,7 @@
package org.jboss.tools.ws.jaxrs.core.internal.metamodel.domain;
import static org.jboss.tools.ws.jaxrs.core.internal.metamodel.builder.JaxrsElementDelta.F_APPLICATION_PATH_VALUE;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.APPLICATION_PATH;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.APPLICATION_PATH;
import java.util.ArrayList;
import java.util.List;
@@ -19,8 +19,8 @@
import org.eclipse.jdt.core.IType;
import org.eclipse.wst.validation.ValidatorMessage;
import org.jboss.tools.ws.jaxrs.core.jdt.Annotation;
+import org.jboss.tools.ws.jaxrs.core.metamodel.EnumElementCategory;
import org.jboss.tools.ws.jaxrs.core.metamodel.EnumElementKind;
-import org.jboss.tools.ws.jaxrs.core.metamodel.EnumKind;
import org.jboss.tools.ws.jaxrs.core.metamodel.IJaxrsApplication;
/**
@@ -43,16 +43,16 @@
}
@Override
- public EnumElementKind getElementKind() {
- return EnumElementKind.APPLICATION;
+ public EnumElementCategory getElementCategory() {
+ return EnumElementCategory.APPLICATION;
}
@Override
- public EnumKind getKind() {
+ public EnumElementKind getElementKind() {
if (getAnnotation(APPLICATION_PATH.qualifiedName) != null) {
- return EnumKind.APPLICATION_JAVA;
+ return EnumElementKind.APPLICATION_JAVA;
}
- return EnumKind.UNDEFINED;
+ return EnumElementKind.UNDEFINED;
}
@Override
Modified: trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsJavaElement.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsJavaElement.java 2012-07-30 14:56:26 UTC (rev 42786)
+++ trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsJavaElement.java 2012-07-30 15:15:37 UTC (rev 42787)
@@ -22,15 +22,15 @@
import static org.jboss.tools.ws.jaxrs.core.internal.metamodel.builder.JaxrsElementDelta.F_PATH_VALUE;
import static org.jboss.tools.ws.jaxrs.core.internal.metamodel.builder.JaxrsElementDelta.F_PRODUCED_MEDIATYPES_VALUE;
import static org.jboss.tools.ws.jaxrs.core.internal.metamodel.builder.JaxrsElementDelta.F_QUERY_PARAM_VALUE;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.APPLICATION_PATH;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.CONSUMES;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.DEFAULT_VALUE;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.HTTP_METHOD;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.MATRIX_PARAM;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.PATH;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.PATH_PARAM;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.PRODUCES;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.QUERY_PARAM;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.APPLICATION_PATH;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.CONSUMES;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.DEFAULT_VALUE;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.HTTP_METHOD;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.MATRIX_PARAM;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.PATH;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.PATH_PARAM;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.PRODUCES;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.QUERY_PARAM;
import java.util.Arrays;
import java.util.HashMap;
@@ -43,7 +43,7 @@
import org.eclipse.jdt.core.IMember;
import org.jboss.tools.ws.jaxrs.core.internal.utils.CollectionUtils;
import org.jboss.tools.ws.jaxrs.core.jdt.Annotation;
-import org.jboss.tools.ws.jaxrs.core.metamodel.EnumKind;
+import org.jboss.tools.ws.jaxrs.core.metamodel.EnumElementKind;
import org.jboss.tools.ws.jaxrs.core.metamodel.IJaxrsHttpMethod;
/**
@@ -118,7 +118,7 @@
return 0;
}
boolean changed = false;
- final EnumKind previousKind = getKind();
+ final EnumElementKind previousKind = getElementKind();
final String annotationName = annotation.getName();
if (annotations.containsKey(annotation.getName())) {
changed = annotations.get(annotation.getName()).update(annotation);
@@ -156,9 +156,9 @@
return flags;
}
- private int qualifyChange(final String annotationName, EnumKind previousKind) {
+ private int qualifyChange(final String annotationName, EnumElementKind previousKind) {
int flag = F_NONE;
- final EnumKind currentKind = getKind();
+ final EnumElementKind currentKind = getElementKind();
if (annotationName.equals(PATH.qualifiedName)) {
flag = F_PATH_VALUE;
} else if (annotationName.equals(APPLICATION_PATH.qualifiedName)) {
@@ -203,7 +203,7 @@
Annotation annotation = entry.getValue();
if (annotation.getJavaAnnotation().getHandleIdentifier().equals(handleIdentifier)) {
this.metamodel.unindexElement(this, handleIdentifier);
- final EnumKind previousKind = getKind();
+ final EnumElementKind previousKind = getElementKind();
final String annotationName = entry.getKey();
iterator.remove();
if (annotationName.equals(PATH.qualifiedName)) {
@@ -230,7 +230,7 @@
}
}
}
- final EnumKind currentKind = getKind();
+ final EnumElementKind currentKind = getElementKind();
if (currentKind != previousKind) {
flag += F_ELEMENT_KIND;
}
Modified: trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsMetamodel.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsMetamodel.java 2012-07-30 14:56:26 UTC (rev 42786)
+++ trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsMetamodel.java 2012-07-30 15:15:37 UTC (rev 42787)
@@ -35,7 +35,7 @@
import org.jboss.tools.ws.jaxrs.core.internal.utils.Logger;
import org.jboss.tools.ws.jaxrs.core.jdt.Annotation;
import org.jboss.tools.ws.jaxrs.core.jdt.JdtUtils;
-import org.jboss.tools.ws.jaxrs.core.metamodel.EnumElementKind;
+import org.jboss.tools.ws.jaxrs.core.metamodel.EnumElementCategory;
import org.jboss.tools.ws.jaxrs.core.metamodel.IJaxrsApplication;
import org.jboss.tools.ws.jaxrs.core.metamodel.IJaxrsEndpoint;
import org.jboss.tools.ws.jaxrs.core.metamodel.IJaxrsHttpMethod;
@@ -153,7 +153,7 @@
}
public void add(JaxrsJavaElement<?> element) {
- switch (element.getElementKind()) {
+ switch (element.getElementCategory()) {
case APPLICATION:
this.applications.add((JaxrsJavaApplication) element);
break;
@@ -182,7 +182,7 @@
Collections.sort(this.applications, new Comparator<IJaxrsApplication>() {
@Override
public int compare(IJaxrsApplication app1, IJaxrsApplication app2) {
- return app1.getKind().compareTo(app2.getKind());
+ return app1.getElementKind().compareTo(app2.getElementKind());
}
});
indexElement(application, javaProject);
@@ -205,7 +205,7 @@
for (Entry<String, Annotation> entry : jaxrsElement.getAnnotations().entrySet()) {
indexElement(jaxrsElement, entry.getValue());
}
- if (jaxrsElement.getElementKind() == EnumElementKind.RESOURCE) {
+ if (jaxrsElement.getElementCategory() == EnumElementCategory.RESOURCE) {
JaxrsResource resource = (JaxrsResource) jaxrsElement;
for (JaxrsResourceMethod resourceMethod : resource.getMethods().values()) {
indexElement(resourceMethod);
@@ -243,7 +243,7 @@
protected void unindexElement(final JaxrsBaseElement jaxrsElement) {
// if the given element is a JAX-RS Resource, also unindex its children
// ResourceMethod
- if (jaxrsElement.getElementKind() == EnumElementKind.RESOURCE) {
+ if (jaxrsElement.getElementCategory() == EnumElementCategory.RESOURCE) {
final JaxrsResource resource = (JaxrsResource) jaxrsElement;
for (JaxrsResourceMethod resourceMethod : resource.getMethods().values()) {
unindexElement(resourceMethod);
@@ -349,7 +349,7 @@
IType annotationType = JdtUtils.resolveType(annotationName, javaProject, new NullProgressMonitor());
if (annotationType != null) {
final JaxrsBaseElement element = getElement(annotationType);
- if (element != null && element.getElementKind() == EnumElementKind.HTTP_METHOD) {
+ if (element != null && element.getElementCategory() == EnumElementCategory.HTTP_METHOD) {
return (IJaxrsHttpMethod) element;
}
}
@@ -418,7 +418,7 @@
}
public void remove(JaxrsBaseElement element) {
- switch (element.getKind()) {
+ switch (element.getElementKind()) {
case APPLICATION_WEBXML:
remove((JaxrsWebxmlApplication) element);
break;
@@ -438,7 +438,7 @@
if (element == null) {
return;
}
- switch (element.getElementKind()) {
+ switch (element.getElementCategory()) {
case APPLICATION:
this.applications.remove(element);
break;
Modified: trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsParamBeanProperty.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsParamBeanProperty.java 2012-07-30 14:56:26 UTC (rev 42786)
+++ trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsParamBeanProperty.java 2012-07-30 15:15:37 UTC (rev 42787)
@@ -16,8 +16,8 @@
import org.eclipse.jdt.core.IMethod;
import org.eclipse.wst.validation.ValidatorMessage;
import org.jboss.tools.ws.jaxrs.core.jdt.Annotation;
+import org.jboss.tools.ws.jaxrs.core.metamodel.EnumElementCategory;
import org.jboss.tools.ws.jaxrs.core.metamodel.EnumElementKind;
-import org.jboss.tools.ws.jaxrs.core.metamodel.EnumKind;
import org.jboss.tools.ws.jaxrs.core.metamodel.IJaxrsParamBeanProperty;
/**
@@ -31,8 +31,8 @@
}
@Override
- public EnumElementKind getElementKind() {
- return EnumElementKind.RESOURCE_FIELD;
+ public EnumElementCategory getElementCategory() {
+ return EnumElementCategory.RESOURCE_FIELD;
}
@Override
@@ -42,7 +42,7 @@
}
@Override
- public EnumKind getKind() {
+ public EnumElementKind getElementKind() {
return null;
}
Modified: trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsProvider.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsProvider.java 2012-07-30 14:56:26 UTC (rev 42786)
+++ trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsProvider.java 2012-07-30 15:15:37 UTC (rev 42787)
@@ -13,20 +13,18 @@
import java.util.ArrayList;
import java.util.List;
+import java.util.Map;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jdt.core.IType;
import org.eclipse.wst.validation.ValidatorMessage;
import org.jboss.tools.ws.jaxrs.core.jdt.Annotation;
+import org.jboss.tools.ws.jaxrs.core.metamodel.EnumElementCategory;
import org.jboss.tools.ws.jaxrs.core.metamodel.EnumElementKind;
-import org.jboss.tools.ws.jaxrs.core.metamodel.EnumKind;
import org.jboss.tools.ws.jaxrs.core.metamodel.IJaxrsProvider;
/**
- * JAX-RS Provider class Providers *must* implement MessageBodyReader,
- * MessageBodyWriter or ExceptionMapper Providers *may* be annotated with
- * <code>javax.ws.rs.ext.Provider</code> annotation.
+ * JAX-RS Provider class Providers <strong>must</strong> implement MessageBodyReader, MessageBodyWriter or
+ * ExceptionMapper Providers *may* be annotated with <code>javax.ws.rs.ext.Provider</code> annotation.
*
* @author xcoulon
*/
@@ -38,97 +36,71 @@
* @author xcoulon
*/
public static class Builder {
+ final IType javaType;
+ final JaxrsMetamodel metamodel;
+ private Annotation consumesAnnotation;
+ private Annotation producesAnnotation;
+ private Annotation providerAnnotation;
+ private Map<EnumElementKind, IType> providedKinds;
- private final JaxrsMetamodel metamodel;
- private final IType javaType;
-
- /**
- * Mandatory attributes of the enclosing 'Provider' element.
- *
- * @param javaType
- * @param metamodel
- */
public Builder(final IType javaType, final JaxrsMetamodel metamodel) {
this.javaType = javaType;
this.metamodel = metamodel;
}
- /**
- * Builds and returns the elements. Internally calls the merge() method.
- *
- * @param progressMonitor
- * @return
- * @throws CoreException
- */
- public JaxrsProvider build(IProgressMonitor progressMonitor) throws CoreException {
- JaxrsProvider provider = new JaxrsProvider(this);
- // provider.merge(javaType, progressMonitor);
- return provider;
+ public Builder withProviderAnnotation(final Annotation providerAnnotation) {
+ this.providerAnnotation = providerAnnotation;
+ return this;
}
+
+ public Builder consumes(final Annotation consumesAnnotation) {
+ this.consumesAnnotation = consumesAnnotation;
+ return this;
+ }
+
+ public Builder produces(final Annotation producesAnnotation) {
+ this.producesAnnotation = producesAnnotation;
+ return this;
+ }
+
+ public JaxrsProvider build() {
+ List<Annotation> annotations = new ArrayList<Annotation>();
+ if (providerAnnotation != null) {
+ annotations.add(providerAnnotation);
+ }
+ if (consumesAnnotation != null) {
+ annotations.add(consumesAnnotation);
+ }
+ if (producesAnnotation != null) {
+ annotations.add(producesAnnotation);
+ }
+ return new JaxrsProvider(javaType, annotations, providedKinds, metamodel);
+ }
+
+ public Builder providing(final Annotation providerAnnotation, final Map<EnumElementKind, IType> providedKinds) {
+ this.providerAnnotation = providerAnnotation;
+ this.providedKinds = providedKinds;
+ return this;
+ }
}
+ private final Map<EnumElementKind, IType> providedKinds;
/**
- * Full constructor using the inner 'MediaTypeCapabilitiesBuilder' static
- * class.
+ * Full constructor using the inner 'MediaTypeCapabilitiesBuilder' static class.
+ * @param providedKinds
*
* @param builder
*/
- private JaxrsProvider(Builder builder) {
- super(builder.javaType, (Annotation) null, builder.metamodel);
+ private JaxrsProvider(final IType javaType, final List<Annotation> annotations, final Map<EnumElementKind, IType> providedKinds, final JaxrsMetamodel metamodel) {
+ super(javaType, annotations, metamodel);
+ this.providedKinds = providedKinds;
}
@Override
- public EnumElementKind getElementKind() {
- return EnumElementKind.PROVIDER;
+ public EnumElementCategory getElementCategory() {
+ return EnumElementCategory.PROVIDER;
}
- /**
- * @param javaType
- * @return
- * @throws CoreException
- * @Override public final Set<EnumElementChange> merge(final IType javaType,
- * final IProgressMonitor progressMonitor) throws
- * InvalidModelElementException, CoreException { if
- * (!JdtUtils.isTopLevelType(javaType)) { throw new
- * InvalidModelElementException("Type is not a top-level type"); }
- * Set<EnumElementChange> changes = new
- * HashSet<EnumElementChange>();
- *
- * CompilationUnit compilationUnit =
- * getCompilationUnit(progressMonitor); Set<IProblem> problems =
- * JdtUtils.resolveErrors(javaType, compilationUnit); if (problems
- * != null && problems.size() > 0) { //
- * metamodel.reportErrors(javaType, problems); return changes; }
- * IAnnotationBinding annotationBinding =
- * JdtUtils.resolveAnnotationBinding(javaType, compilationUnit,
- * javax.ws.rs.ext.Provider.class); // annotation was removed, or
- * import was removed if (annotationBinding == null) { throw new
- * InvalidModelElementException (
- * "SimpleAnnotation binding not found : missing 'import' statement ?"
- * ); } ITypeHierarchy providerTypeHierarchy =
- * JdtUtils.resolveTypeHierarchy(javaType, false,
- * progressMonitor); IType[] subtypes =
- * providerTypeHierarchy.getSubtypes(javaType); // assert that the
- * class is not abstract and has no // sub-type, or continue; if
- * (JdtUtils.isAbstractType(javaType) || (subtypes != null &&
- * subtypes.length > 0)) { throw new InvalidModelElementException(
- * "Type is an abstract type or has subtypes" ); } Map<EnumKind,
- * IType> providerKinds = getProviderKinds(javaType,
- * compilationUnit, providerTypeHierarchy,
- * container.getProviderInterfaces(), null); // removes previous
- * kinds and capabilities for (Iterator<EnumKind> iterator =
- * this.getProvidedKinds().keySet().iterator();
- * iterator.hasNext();) { EnumKind kind = iterator.next(); if
- * (providerKinds == null || !providerKinds.containsKey(kind)) {
- * iterator.remove(); } } // add new kind and capabilities based
- * on resolved types and // annotations if (providerKinds != null)
- * { for (Entry<EnumKind, IType> entry : providerKinds.entrySet())
- * { JaxrsMediaTypeCapabilities mediaTypes =
- * resolveMediaTypeCapabilities(getJavaElement(), compilationUnit,
- * entry.getKey()); addProviderKind(entry.getKey(),
- * entry.getValue(), mediaTypes); } } return changes; }
- */
-
@Override
public List<ValidatorMessage> validate() {
List<ValidatorMessage> messages = new ArrayList<ValidatorMessage>();
@@ -136,9 +108,25 @@
}
@Override
- public EnumKind getKind() {
- // TODO Auto-generated method stub
+ public EnumElementKind getElementKind() {
+ final boolean isMessageBodyReader = providedKinds.get(EnumElementKind.MESSAGE_BODY_READER) != null;
+ final boolean isMessageBodyWriter = providedKinds.get(EnumElementKind.MESSAGE_BODY_WRITER) != null;
+ final boolean isExceptionMapper = providedKinds.get(EnumElementKind.EXCEPTION_MAPPER) != null;
+ if(isMessageBodyReader && isMessageBodyWriter) {
+ return EnumElementKind.ENTITY_MAPPER;
+ } else if(isMessageBodyReader) {
+ return EnumElementKind.MESSAGE_BODY_READER;
+ } else if(isMessageBodyWriter) {
+ return EnumElementKind.MESSAGE_BODY_WRITER;
+ } else if(isExceptionMapper) {
+ return EnumElementKind.EXCEPTION_MAPPER;
+ }
return null;
}
+ @Override
+ public IType getProvidedType(EnumElementKind providerKind) {
+ return providedKinds.get(providerKind);
+ }
+
}
Modified: trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsResource.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsResource.java 2012-07-30 14:56:26 UTC (rev 42786)
+++ trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsResource.java 2012-07-30 15:15:37 UTC (rev 42787)
@@ -11,9 +11,9 @@
package org.jboss.tools.ws.jaxrs.core.internal.metamodel.domain;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.CONSUMES;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.PATH;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.PRODUCES;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.CONSUMES;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.PATH;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.PRODUCES;
import java.util.ArrayList;
import java.util.Collections;
@@ -26,8 +26,8 @@
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.wst.validation.ValidatorMessage;
import org.jboss.tools.ws.jaxrs.core.jdt.Annotation;
+import org.jboss.tools.ws.jaxrs.core.metamodel.EnumElementCategory;
import org.jboss.tools.ws.jaxrs.core.metamodel.EnumElementKind;
-import org.jboss.tools.ws.jaxrs.core.metamodel.EnumKind;
import org.jboss.tools.ws.jaxrs.core.metamodel.IJaxrsResource;
import org.jboss.tools.ws.jaxrs.core.metamodel.IJaxrsResourceField;
import org.jboss.tools.ws.jaxrs.core.metamodel.IJaxrsResourceMethod;
@@ -95,27 +95,27 @@
}
@Override
- public EnumElementKind getElementKind() {
- return EnumElementKind.RESOURCE;
+ public EnumElementCategory getElementCategory() {
+ return EnumElementCategory.RESOURCE;
}
public final boolean isRootResource() {
- return getKind() == EnumKind.ROOT_RESOURCE;
+ return getElementKind() == EnumElementKind.ROOT_RESOURCE;
}
public boolean isSubresource() {
- return getKind() == EnumKind.SUBRESOURCE;
+ return getElementKind() == EnumElementKind.SUBRESOURCE;
}
@Override
- public final EnumKind getKind() {
+ public final EnumElementKind getElementKind() {
final Annotation pathAnnotation = getAnnotation(PATH.qualifiedName);
if (pathAnnotation != null) {
- return EnumKind.ROOT_RESOURCE;
+ return EnumElementKind.ROOT_RESOURCE;
} else if (resourceMethods.size() > 0 || resourceFields.size() > 0 || paramBeanProperties.size() > 0) {
- return EnumKind.SUBRESOURCE;
+ return EnumElementKind.SUBRESOURCE;
}
- return EnumKind.UNDEFINED;
+ return EnumElementKind.UNDEFINED;
}
public final String getName() {
@@ -180,7 +180,7 @@
}
public void addElement(JaxrsResourceElement<?> element) {
- switch (element.getElementKind()) {
+ switch (element.getElementCategory()) {
case RESOURCE_FIELD:
this.resourceFields.put(element.getJavaElement().getHandleIdentifier(), (JaxrsResourceField) element);
break;
Modified: trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsResourceField.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsResourceField.java 2012-07-30 14:56:26 UTC (rev 42786)
+++ trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsResourceField.java 2012-07-30 15:15:37 UTC (rev 42787)
@@ -10,10 +10,10 @@
******************************************************************************/
package org.jboss.tools.ws.jaxrs.core.internal.metamodel.domain;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.DEFAULT_VALUE;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.MATRIX_PARAM;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.PATH_PARAM;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.QUERY_PARAM;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.DEFAULT_VALUE;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.MATRIX_PARAM;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.PATH_PARAM;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.QUERY_PARAM;
import java.util.ArrayList;
import java.util.List;
@@ -21,8 +21,8 @@
import org.eclipse.jdt.core.IField;
import org.eclipse.wst.validation.ValidatorMessage;
import org.jboss.tools.ws.jaxrs.core.jdt.Annotation;
+import org.jboss.tools.ws.jaxrs.core.metamodel.EnumElementCategory;
import org.jboss.tools.ws.jaxrs.core.metamodel.EnumElementKind;
-import org.jboss.tools.ws.jaxrs.core.metamodel.EnumKind;
import org.jboss.tools.ws.jaxrs.core.metamodel.IJaxrsResourceField;
/** @author xcoulon */
@@ -39,8 +39,8 @@
}
@Override
- public EnumElementKind getElementKind() {
- return EnumElementKind.RESOURCE_FIELD;
+ public EnumElementCategory getElementCategory() {
+ return EnumElementCategory.RESOURCE_FIELD;
}
public Annotation getPathParamAnnotation() {
@@ -66,17 +66,17 @@
}
@Override
- public EnumKind getKind() {
+ public EnumElementKind getElementKind() {
if (getPathParamAnnotation() != null) {
- return EnumKind.PATH_PARAM_FIELD;
+ return EnumElementKind.PATH_PARAM_FIELD;
}
if (getQueryParamAnnotation() != null) {
- return EnumKind.QUERY_PARAM_FIELD;
+ return EnumElementKind.QUERY_PARAM_FIELD;
}
if (getMatrixParamAnnotation() != null) {
- return EnumKind.MATRIX_PARAM_FIELD;
+ return EnumElementKind.MATRIX_PARAM_FIELD;
}
- return EnumKind.UNDEFINED;
+ return EnumElementKind.UNDEFINED;
}
@Override
Modified: trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsResourceMethod.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsResourceMethod.java 2012-07-30 14:56:26 UTC (rev 42786)
+++ trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsResourceMethod.java 2012-07-30 15:15:37 UTC (rev 42787)
@@ -19,7 +19,7 @@
import java.util.Arrays;
import java.util.List;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.*;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.*;
@@ -40,8 +40,8 @@
import org.jboss.tools.ws.jaxrs.core.jdt.CompilationUnitsRepository;
import org.jboss.tools.ws.jaxrs.core.jdt.JavaMethodParameter;
import org.jboss.tools.ws.jaxrs.core.jdt.JavaMethodSignature;
+import org.jboss.tools.ws.jaxrs.core.metamodel.EnumElementCategory;
import org.jboss.tools.ws.jaxrs.core.metamodel.EnumElementKind;
-import org.jboss.tools.ws.jaxrs.core.metamodel.EnumKind;
import org.jboss.tools.ws.jaxrs.core.metamodel.IJaxrsHttpMethod;
import org.jboss.tools.ws.jaxrs.core.metamodel.IJaxrsResourceMethod;
@@ -196,8 +196,8 @@
}
@Override
- public EnumElementKind getElementKind() {
- return EnumElementKind.RESOURCE_METHOD;
+ public EnumElementCategory getElementCategory() {
+ return EnumElementCategory.RESOURCE_METHOD;
}
@Override
@@ -367,17 +367,17 @@
* ()
*/
@Override
- public final EnumKind getKind() {
+ public final EnumElementKind getElementKind() {
final Annotation pathAnnotation = getPathAnnotation();
final Annotation httpMethodAnnotation = getHttpMethodAnnotation();
if (pathAnnotation == null && httpMethodAnnotation != null) {
- return EnumKind.RESOURCE_METHOD;
+ return EnumElementKind.RESOURCE_METHOD;
} else if (pathAnnotation != null && httpMethodAnnotation != null) {
- return EnumKind.SUBRESOURCE_METHOD;
+ return EnumElementKind.SUBRESOURCE_METHOD;
} else if (pathAnnotation != null && httpMethodAnnotation == null) {
- return EnumKind.SUBRESOURCE_LOCATOR;
+ return EnumElementKind.SUBRESOURCE_LOCATOR;
}
- return EnumKind.UNDEFINED;
+ return EnumElementKind.UNDEFINED;
}
/*
@@ -471,7 +471,7 @@
public final String toString() {
return "ResourceMethod '" + parentResource.getName() + "."
+ getJavaElement().getElementName() + "' ("
- + getKind().toString() + ")";
+ + getElementKind().toString() + ")";
}
@Override
Modified: trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsWebxmlApplication.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsWebxmlApplication.java 2012-07-30 14:56:26 UTC (rev 42786)
+++ trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsWebxmlApplication.java 2012-07-30 15:15:37 UTC (rev 42787)
@@ -6,8 +6,8 @@
import org.eclipse.core.resources.IResource;
import org.eclipse.wst.validation.ValidatorMessage;
+import org.jboss.tools.ws.jaxrs.core.metamodel.EnumElementCategory;
import org.jboss.tools.ws.jaxrs.core.metamodel.EnumElementKind;
-import org.jboss.tools.ws.jaxrs.core.metamodel.EnumKind;
import org.jboss.tools.ws.jaxrs.core.metamodel.IJaxrsApplication;
public class JaxrsWebxmlApplication extends JaxrsBaseElement implements IJaxrsApplication {
@@ -52,13 +52,13 @@
}
@Override
- public EnumElementKind getElementKind() {
- return EnumElementKind.APPLICATION;
+ public EnumElementCategory getElementCategory() {
+ return EnumElementCategory.APPLICATION;
}
@Override
- public EnumKind getKind() {
- return EnumKind.APPLICATION_WEBXML;
+ public EnumElementKind getElementKind() {
+ return EnumElementKind.APPLICATION_WEBXML;
}
@Override
Modified: trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/validation/JaxrsMetamodelValidator.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/validation/JaxrsMetamodelValidator.java 2012-07-30 14:56:26 UTC (rev 42786)
+++ trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/validation/JaxrsMetamodelValidator.java 2012-07-30 15:15:37 UTC (rev 42787)
@@ -28,7 +28,7 @@
import org.jboss.tools.ws.jaxrs.core.internal.utils.ConstantUtils;
import org.jboss.tools.ws.jaxrs.core.internal.utils.Logger;
import org.jboss.tools.ws.jaxrs.core.jdt.JdtUtils;
-import org.jboss.tools.ws.jaxrs.core.metamodel.EnumElementKind;
+import org.jboss.tools.ws.jaxrs.core.metamodel.EnumElementCategory;
import org.jboss.tools.ws.jaxrs.core.metamodel.JaxrsMetamodelLocator;
public class JaxrsMetamodelValidator extends AbstractValidator {
@@ -55,7 +55,7 @@
}
List<JaxrsBaseElement> elements = jaxrsMetamodel.getElements(JdtUtils.getCompilationUnit(resource));
for(JaxrsBaseElement element : elements) {
- if (element.getElementKind() == EnumElementKind.RESOURCE) {
+ if (element.getElementCategory() == EnumElementCategory.RESOURCE) {
Logger.debug("Validating the JAX-RS Metamodel after {} was {}", resource.getName(),
ConstantUtils.getStaticFieldName(IResourceDelta.class, kind));
List<ValidatorMessage> validationMessages = element.validate();
Added: trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/utils/Pair.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/utils/Pair.java (rev 0)
+++ trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/utils/Pair.java 2012-07-30 15:15:37 UTC (rev 42787)
@@ -0,0 +1,71 @@
+package org.jboss.tools.ws.jaxrs.core.internal.utils;
+
+public class Pair<A, B> {
+
+ public static <P, Q> Pair<P, Q> makePair(P p, Q q) {
+ return new Pair<P, Q>(p, q);
+ }
+
+ public final A a;
+ public final B b;
+
+ public Pair(A a, B b) {
+ this.a = a;
+ this.b = b;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((a == null) ? 0 : a.hashCode());
+ result = prime * result + ((b == null) ? 0 : b.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (obj == null) {
+ return false;
+ }
+ if (getClass() != obj.getClass()) {
+ return false;
+ }
+ @SuppressWarnings("rawtypes")
+ Pair other = (Pair) obj;
+ if (a == null) {
+ if (other.a != null) {
+ return false;
+ }
+ } else if (!a.equals(other.a)) {
+ return false;
+ }
+ if (b == null) {
+ if (other.b != null) {
+ return false;
+ }
+ } else if (!b.equals(other.b)) {
+ return false;
+ }
+ return true;
+ }
+
+ public boolean isInstance(Class<?> classA, Class<?> classB) {
+ return classA.isInstance(a) && classB.isInstance(b);
+ }
+
+ @SuppressWarnings("unchecked")
+ public static <P, Q> Pair<P, Q> cast(Pair<?, ?> pair, Class<P> pClass, Class<Q> qClass) {
+
+ if (pair.isInstance(pClass, qClass)) {
+ return (Pair<P, Q>) pair;
+ }
+
+ throw new ClassCastException();
+
+ }
+
+}
\ No newline at end of file
Property changes on: trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/utils/Pair.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Copied: trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/jdt/EnumJaxrsClassname.java (from rev 42714, trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/jdt/EnumJaxrsElements.java)
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/jdt/EnumJaxrsClassname.java (rev 0)
+++ trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/jdt/EnumJaxrsClassname.java 2012-07-30 15:15:37 UTC (rev 42787)
@@ -0,0 +1,81 @@
+/*******************************************************************************
+ * Copyright (c) 2012 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.tools.ws.jaxrs.core.jdt;
+
+/**
+ * @author Xavier Coulon
+ *
+ */
+public enum EnumJaxrsClassname {
+
+ DELETE("javax.ws.rs.DELETE"),
+
+ GET("javax.ws.rs.GET"),
+
+ POST("javax.ws.rs.POST"),
+
+ PUT("javax.ws.rs.PUT"),
+
+ HEAD("javax.ws.rs.HEAD"),
+
+ OPTIONS("javax.ws.rs.OPTIONS"),
+
+ HTTP_METHOD("javax.ws.rs.HttpMethod"),
+
+ APPLICATION("javax.ws.rs.core.Application"),
+
+ APPLICATION_PATH("javax.ws.rs.ApplicationPath"),
+
+ MESSAGE_BODY_READER("javax.ws.rs.ext.MessageBodyReader"),
+
+ MESSAGE_BODY_WRITER("javax.ws.rs.ext.MessageBodyWriter"),
+
+ EXCEPTION_MAPPER("javax.ws.rs.ext.ExceptionMapper"),
+
+ PATH("javax.ws.rs.Path"),
+
+ PATH_PARAM("javax.ws.rs.PathParam"),
+
+ CONSUMES("javax.ws.rs.Consumes"),
+
+ PRODUCES("javax.ws.rs.Produces"),
+
+ DEFAULT_VALUE("javax.ws.rs.DefaultValue"),
+
+ COOKIE_PARAM("javax.ws.rs.CookieParam"),
+
+ HEADER_PARAM("javax.ws.rs.HeaderParam"),
+
+ MATRIX_PARAM("javax.ws.rs.MatrixParam"),
+
+ QUERY_PARAM("javax.ws.rs.QueryParam"),
+
+ CONTEXT("javax.ws.rs.core.Context"),
+
+ HTTP_HEADERS("javax.ws.rs.core.HttpHeaders"),
+
+ REQUEST("javax.ws.rs.core.Request"),
+
+ RESPONSE("javax.ws.rs.core.Response"),
+
+ URI_INFO("javax.ws.rs.core.UriInfo"),
+
+ ENCODED("javax.ws.rs.Encoded"),
+
+ PROVIDER("javax.ws.rs.ext.Provider");
+
+ public final String qualifiedName;
+
+ private EnumJaxrsClassname(final String qualifiedName) {
+ this.qualifiedName = qualifiedName;
+ }
+
+}
Property changes on: trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/jdt/EnumJaxrsClassname.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Deleted: trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/jdt/EnumJaxrsElements.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/jdt/EnumJaxrsElements.java 2012-07-30 14:56:26 UTC (rev 42786)
+++ trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/jdt/EnumJaxrsElements.java 2012-07-30 15:15:37 UTC (rev 42787)
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012 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.tools.ws.jaxrs.core.jdt;
-
-/**
- * @author Xavier Coulon
- *
- */
-public enum EnumJaxrsElements {
-
- DELETE("javax.ws.rs.DELETE"),
-
- GET("javax.ws.rs.GET"),
-
- POST("javax.ws.rs.POST"),
-
- PUT("javax.ws.rs.PUT"),
-
- HEAD("javax.ws.rs.HEAD"),
-
- OPTIONS("javax.ws.rs.OPTIONS"),
-
- HTTP_METHOD("javax.ws.rs.HttpMethod"),
-
- APPLICATION("javax.ws.rs.core.Application"),
-
- APPLICATION_PATH("javax.ws.rs.ApplicationPath"),
-
- PATH("javax.ws.rs.Path"),
-
- PATH_PARAM("javax.ws.rs.PathParam"),
-
- CONSUMES("javax.ws.rs.Consumes"),
-
- PRODUCES("javax.ws.rs.Produces"),
-
- DEFAULT_VALUE("javax.ws.rs.DefaultValue"),
-
- COOKIE_PARAM("javax.ws.rs.CookieParam"),
-
- HEADER_PARAM("javax.ws.rs.HeaderParam"),
-
- MATRIX_PARAM("javax.ws.rs.MatrixParam"),
-
- QUERY_PARAM("javax.ws.rs.QueryParam"),
-
- CONTEXT("javax.ws.rs.core.Context"),
-
- HTTP_HEADERS("javax.ws.rs.core.HttpHeaders"),
-
- REQUEST("javax.ws.rs.core.Request"),
-
- RESPONSE("javax.ws.rs.core.Response"),
-
- URI_INFO("javax.ws.rs.core.UriInfo"),
-
- ENCODED("javax.ws.rs.Encoded"),
-
- PROVIDER("javax.ws.rs.ext.Provider");
-
- public final String qualifiedName;
-
- private EnumJaxrsElements(final String qualifiedName) {
- this.qualifiedName = qualifiedName;
- }
-
-}
Modified: trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/jdt/JaxrsAnnotationsScanner.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/jdt/JaxrsAnnotationsScanner.java 2012-07-30 14:56:26 UTC (rev 42786)
+++ trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/jdt/JaxrsAnnotationsScanner.java 2012-07-30 15:15:37 UTC (rev 42787)
@@ -11,10 +11,10 @@
package org.jboss.tools.ws.jaxrs.core.jdt;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.APPLICATION_PATH;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.HTTP_METHOD;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.PATH;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.PROVIDER;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.APPLICATION_PATH;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.HTTP_METHOD;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.PATH;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.PROVIDER;
import java.util.ArrayList;
import java.util.List;
Copied: trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/metamodel/EnumElementCategory.java (from rev 42677, trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/metamodel/EnumElementKind.java)
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/metamodel/EnumElementCategory.java (rev 0)
+++ trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/metamodel/EnumElementCategory.java 2012-07-30 15:15:37 UTC (rev 42787)
@@ -0,0 +1,16 @@
+/*******************************************************************************
+ * Copyright (c) 2008 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:
+ * Xavier Coulon - Initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.ws.jaxrs.core.metamodel;
+
+public enum EnumElementCategory {
+ APPLICATION, HTTP_METHOD, PROVIDER, RESOURCE, RESOURCE_FIELD, RESOURCE_METHOD
+
+}
Property changes on: trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/metamodel/EnumElementCategory.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Deleted: trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/metamodel/EnumElementKind.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/metamodel/EnumElementKind.java 2012-07-30 14:56:26 UTC (rev 42786)
+++ trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/metamodel/EnumElementKind.java 2012-07-30 15:15:37 UTC (rev 42787)
@@ -1,16 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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:
- * Xavier Coulon - Initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.ws.jaxrs.core.metamodel;
-
-public enum EnumElementKind {
- APPLICATION, HTTP_METHOD, PROVIDER, RESOURCE, RESOURCE_FIELD, RESOURCE_METHOD
-
-}
Copied: trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/metamodel/EnumElementKind.java (from rev 42677, trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/metamodel/EnumKind.java)
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/metamodel/EnumElementKind.java (rev 0)
+++ trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/metamodel/EnumElementKind.java 2012-07-30 15:15:37 UTC (rev 42787)
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2008 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:
+ * Xavier Coulon - Initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.ws.jaxrs.core.metamodel;
+
+/**
+ * The functional type of the JAX-RS ElementKind. Keeping that order ensures that the elements are sorted according to
+ * the order of priority into which they should be processed
+ * */
+public enum EnumElementKind {
+
+ /**
+ * UNDEFINED KIND (when no annotation nor any other java element can define precisely what the element is.
+ */
+ UNDEFINED,
+ /** A JAX-RS Application declared in the web deployment descriptor.*/
+ // must be declared *before* APPLICATION_JAVA constant to enable comparison !
+ APPLICATION_WEBXML,
+ /** A java annotated type based JAX-RS Application */
+ APPLICATION_JAVA,
+ /** An HTTP method. */
+ HTTP_METHOD,
+ /** A message producer. */
+ MESSAGE_BODY_WRITER,
+ /** A message consumer. */
+ MESSAGE_BODY_READER,
+ /** An Entity Mapper (ie, both reader and writer). */
+ ENTITY_MAPPER,
+ /** An exception mapper. */
+ EXCEPTION_MAPPER,
+ /** A root resource. */
+ ROOT_RESOURCE,
+ /** A subresource. */
+ SUBRESOURCE,
+ /** A resource method. */
+ RESOURCE_METHOD,
+ /** A subresource method. */
+ SUBRESOURCE_METHOD,
+ /** A subresource locator. */
+ SUBRESOURCE_LOCATOR,
+ /** PathParam field. */
+ PATH_PARAM_FIELD,
+ /** QueryParam field. */
+ QUERY_PARAM_FIELD,
+ /** MatrixParam field. */
+ MATRIX_PARAM_FIELD;
+}
Deleted: trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/metamodel/EnumKind.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/metamodel/EnumKind.java 2012-07-30 14:56:26 UTC (rev 42786)
+++ trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/metamodel/EnumKind.java 2012-07-30 15:15:37 UTC (rev 42787)
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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:
- * Xavier Coulon - Initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.ws.jaxrs.core.metamodel;
-
-/**
- * The functional type of the JAX-RS ElementKind. Keeping that order ensures that the elements are sorted according to
- * the order of priority into which they should be processed
- * */
-public enum EnumKind {
-
- /**
- * UNDEFINED KIND (when no annotation nor any other java element can define precisely what the element is.
- */
- UNDEFINED,
- /** A JAX-RS Application declared in the web deployment descriptor.*/
- // must be declared *before* APPLICATION_JAVA constant to enable comparison !
- APPLICATION_WEBXML,
- /** A java annotated type based JAX-RS Application */
- APPLICATION_JAVA,
- /** An HTTP method. */
- HTTP_METHOD,
- /** A message producer. */
- PRODUCER,
- /** A message consumer. */
- CONSUMER,
- /** An exception mapper. */
- EXCEPTION_MAPPER,
- /** A root resource. */
- ROOT_RESOURCE,
- /** A subresource. */
- SUBRESOURCE,
- /** A resource method. */
- RESOURCE_METHOD,
- /** A subresource method. */
- SUBRESOURCE_METHOD,
- /** A subresource locator. */
- SUBRESOURCE_LOCATOR,
- /** PathParam field. */
- PATH_PARAM_FIELD,
- /** QueryParam field. */
- QUERY_PARAM_FIELD,
- /** MatrixParam field. */
- MATRIX_PARAM_FIELD;
-}
Modified: trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/metamodel/IJaxrsApplication.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/metamodel/IJaxrsApplication.java 2012-07-30 14:56:26 UTC (rev 42786)
+++ trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/metamodel/IJaxrsApplication.java 2012-07-30 15:15:37 UTC (rev 42787)
@@ -14,6 +14,6 @@
public abstract String getApplicationPath();
- public abstract EnumKind getKind();
+ public abstract EnumElementKind getElementKind();
}
Modified: trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/metamodel/IJaxrsProvider.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/metamodel/IJaxrsProvider.java 2012-07-30 14:56:26 UTC (rev 42786)
+++ trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/metamodel/IJaxrsProvider.java 2012-07-30 15:15:37 UTC (rev 42787)
@@ -10,6 +10,10 @@
******************************************************************************/
package org.jboss.tools.ws.jaxrs.core.metamodel;
+import org.eclipse.jdt.core.IType;
+
public interface IJaxrsProvider extends IJaxrsElement{
+ public IType getProvidedType(EnumElementKind messageBodyReader);
+
}
Modified: trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/metamodel/IJaxrsResourceMethod.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/metamodel/IJaxrsResourceMethod.java 2012-07-30 14:56:26 UTC (rev 42786)
+++ trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/metamodel/IJaxrsResourceMethod.java 2012-07-30 15:15:37 UTC (rev 42787)
@@ -30,7 +30,7 @@
*/
public abstract void hasErrors(final boolean h);
- public abstract EnumKind getKind();
+ public abstract EnumElementKind getElementKind();
abstract String getPathTemplate();
Modified: trunk/ws/plugins/org.jboss.tools.ws.jaxrs.ui/src/org/jboss/tools/ws/jaxrs/ui/contentassist/PathParamAnnotationValueCompletionProposalComputer.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.jaxrs.ui/src/org/jboss/tools/ws/jaxrs/ui/contentassist/PathParamAnnotationValueCompletionProposalComputer.java 2012-07-30 14:56:26 UTC (rev 42786)
+++ trunk/ws/plugins/org.jboss.tools.ws.jaxrs.ui/src/org/jboss/tools/ws/jaxrs/ui/contentassist/PathParamAnnotationValueCompletionProposalComputer.java 2012-07-30 15:15:37 UTC (rev 42787)
@@ -11,7 +11,7 @@
package org.jboss.tools.ws.jaxrs.ui.contentassist;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.PATH_PARAM;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.PATH_PARAM;
import java.util.ArrayList;
import java.util.Collections;
Modified: trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/src/org/jboss/tools/ws/jaxrs/core/WorkbenchUtils.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/src/org/jboss/tools/ws/jaxrs/core/WorkbenchUtils.java 2012-07-30 14:56:26 UTC (rev 42786)
+++ trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/src/org/jboss/tools/ws/jaxrs/core/WorkbenchUtils.java 2012-07-30 15:15:37 UTC (rev 42787)
@@ -30,6 +30,7 @@
import java.util.List;
import java.util.Map;
+import org.apache.commons.io.IOUtils;
import org.apache.commons.lang.ArrayUtils;
import org.apache.commons.lang.StringUtils;
import org.eclipse.core.resources.IFile;
@@ -870,7 +871,7 @@
* @throws CoreException
* @throws IOException
*/
- public static IResource createContent(IFolder folder, String fileName, InputStream stream) throws CoreException,
+ public static IResource createFileFromStream(IFolder folder, String fileName, InputStream stream) throws CoreException,
IOException {
if (!folder.exists()) {
folder.create(true, true, new NullProgressMonitor());
@@ -900,26 +901,15 @@
* @throws CoreException
* @throws IOException
*/
- public static void replaceContent(IResource resource, InputStream stream) throws CoreException, IOException {
+ public static void replaceContent(IResource resource, InputStream stream, boolean useWorkingCopy) throws CoreException, IOException {
final IProject project = resource.getProject();
final IFile file = project.getFile(resource.getProjectRelativePath());
- if (file.exists()) {
- file.delete(true, new NullProgressMonitor());
- }
- file.create(stream, true, null);
- LOGGER.debug("Content:");
- final InputStream contents = file.getContents();
- final char[] buffer = new char[0x10000];
- StringBuilder out = new StringBuilder();
- Reader in = new InputStreamReader(contents, "UTF-8");
- int read;
- do {
- read = in.read(buffer, 0, buffer.length);
- if (read > 0) {
- out.append(buffer, 0, read);
- }
- } while (read >= 0);
- LOGGER.debug(out.toString());
+ ICompilationUnit unit = getCompilationUnit(JdtUtils.getCompilationUnit(file), useWorkingCopy);
+ IBuffer buffer = ((IOpenable) unit).getBuffer();
+ buffer.setContents(IOUtils.toString(stream));
+ saveAndClose(unit);
+
+
}
/**
@@ -946,10 +936,10 @@
InputStream stream = FileLocator.openStream(bundle, new Path("resources").append(webxmlReplacementName), false);
assertThat(stream, notNullValue());
if (webxmlResource != null) {
- replaceContent(webxmlResource, stream);
+ replaceContent(webxmlResource, stream, false);
return webxmlResource;
} else {
- return createContent(webInfFolder, "web.xml", stream);
+ return createFileFromStream(webInfFolder, "web.xml", stream);
}
}
Modified: trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JavaElementChangedProcessorTestCase.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JavaElementChangedProcessorTestCase.java 2012-07-30 14:56:26 UTC (rev 42786)
+++ trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JavaElementChangedProcessorTestCase.java 2012-07-30 15:15:37 UTC (rev 42787)
@@ -29,23 +29,23 @@
import static org.jboss.tools.ws.jaxrs.core.internal.metamodel.builder.JaxrsElementDelta.F_METHOD_RETURN_TYPE;
import static org.jboss.tools.ws.jaxrs.core.internal.metamodel.builder.JaxrsElementDelta.F_PATH_VALUE;
import static org.jboss.tools.ws.jaxrs.core.internal.metamodel.builder.JaxrsElementDelta.F_PRODUCED_MEDIATYPES_VALUE;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.APPLICATION_PATH;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.CONSUMES;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.CONTEXT;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.DEFAULT_VALUE;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.DELETE;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.ENCODED;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.GET;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.HTTP_METHOD;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.MATRIX_PARAM;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.PATH;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.PATH_PARAM;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.POST;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.PRODUCES;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.PUT;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.QUERY_PARAM;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.RESPONSE;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.URI_INFO;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.APPLICATION_PATH;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.CONSUMES;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.CONTEXT;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.DEFAULT_VALUE;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.DELETE;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.ENCODED;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.GET;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.HTTP_METHOD;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.MATRIX_PARAM;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.PATH;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.PATH_PARAM;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.POST;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.PRODUCES;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.PUT;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.QUERY_PARAM;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.RESPONSE;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.URI_INFO;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.fail;
import static org.mockito.Matchers.any;
@@ -83,10 +83,10 @@
import org.jboss.tools.ws.jaxrs.core.internal.metamodel.domain.JaxrsResourceField;
import org.jboss.tools.ws.jaxrs.core.internal.metamodel.domain.JaxrsResourceMethod;
import org.jboss.tools.ws.jaxrs.core.jdt.Annotation;
-import org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements;
+import org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname;
import org.jboss.tools.ws.jaxrs.core.jdt.JavaMethodParameter;
import org.jboss.tools.ws.jaxrs.core.jdt.JdtUtils;
-import org.jboss.tools.ws.jaxrs.core.metamodel.EnumElementKind;
+import org.jboss.tools.ws.jaxrs.core.metamodel.EnumElementCategory;
import org.jboss.tools.ws.jaxrs.core.metamodel.JaxrsMetamodelDelta;
import org.junit.Before;
import org.junit.Ignore;
@@ -121,7 +121,7 @@
* @throws CoreException
* @throws JavaModelException
*/
- private JaxrsHttpMethod createHttpMethod(EnumJaxrsElements httpMethodElement) throws CoreException, JavaModelException {
+ private JaxrsHttpMethod createHttpMethod(EnumJaxrsClassname httpMethodElement) throws CoreException, JavaModelException {
final IType httpMethodType = JdtUtils.resolveType(httpMethodElement.qualifiedName, javaProject, progressMonitor);
final Annotation httpMethodAnnotation = getAnnotation(httpMethodType, HTTP_METHOD.qualifiedName);
final JaxrsHttpMethod httpMethod = new JaxrsHttpMethod(httpMethodType, httpMethodAnnotation, metamodel);
@@ -224,7 +224,7 @@
final List<JaxrsElementDelta> impacts = processEvent(event, progressMonitor);
// verifications
assertThat(impacts.size(), equalTo(1));
- assertThat(impacts.get(0).getElement().getElementKind(), equalTo(EnumElementKind.APPLICATION));
+ assertThat(impacts.get(0).getElement().getElementCategory(), equalTo(EnumElementCategory.APPLICATION));
assertThat(impacts.get(0).getDeltaKind(), equalTo(ADDED));
assertThat(((JaxrsJavaApplication) impacts.get(0).getElement()).getApplicationPath(), equalTo("/app"));
verify(metamodel, times(1)).add(any(JaxrsJavaApplication.class));
@@ -241,7 +241,7 @@
final List<JaxrsElementDelta> impacts = processEvent(event, progressMonitor);
// verifications
assertThat(impacts.size(), equalTo(1));
- assertThat(impacts.get(0).getElement().getElementKind(), equalTo(EnumElementKind.APPLICATION));
+ assertThat(impacts.get(0).getElement().getElementCategory(), equalTo(EnumElementCategory.APPLICATION));
assertThat(impacts.get(0).getDeltaKind(), equalTo(ADDED));
assertThat(((JaxrsJavaApplication) impacts.get(0).getElement()).getApplicationPath(), equalTo("/app"));
verify(metamodel, times(1)).add(any(JaxrsJavaApplication.class));
@@ -259,7 +259,7 @@
final List<JaxrsElementDelta> impacts = processEvent(event, progressMonitor);
// verifications
assertThat(impacts.size(), equalTo(1));
- assertThat(impacts.get(0).getElement().getElementKind(), equalTo(EnumElementKind.APPLICATION));
+ assertThat(impacts.get(0).getElement().getElementCategory(), equalTo(EnumElementCategory.APPLICATION));
assertThat(impacts.get(0).getDeltaKind(), equalTo(ADDED));
assertThat(((JaxrsJavaApplication) impacts.get(0).getElement()).getApplicationPath(), equalTo("/app"));
verify(metamodel, times(1)).add(any(JaxrsJavaApplication.class));
@@ -296,7 +296,7 @@
final List<JaxrsElementDelta> impacts = processEvent(event, progressMonitor);
// verifications
assertThat(impacts.size(), equalTo(1));
- assertThat(impacts.get(0).getElement().getElementKind(), equalTo(EnumElementKind.APPLICATION));
+ assertThat(impacts.get(0).getElement().getElementCategory(), equalTo(EnumElementCategory.APPLICATION));
assertThat(impacts.get(0).getDeltaKind(), equalTo(CHANGED));
assertThat(((JaxrsJavaApplication) impacts.get(0).getElement()).getApplicationPath(), equalTo("/app"));
assertThat(metamodel.getElements(javaProject).size(), equalTo(1));
@@ -348,7 +348,7 @@
final List<JaxrsElementDelta> impacts = processEvent(event, progressMonitor);
// verifications
assertThat(impacts.size(), equalTo(1));
- assertThat(impacts.get(0).getElement().getElementKind(), equalTo(EnumElementKind.APPLICATION));
+ assertThat(impacts.get(0).getElement().getElementCategory(), equalTo(EnumElementCategory.APPLICATION));
assertThat(impacts.get(0).getDeltaKind(), equalTo(REMOVED));
assertThat(((JaxrsJavaApplication) impacts.get(0).getElement()), equalTo(application));
assertThat(metamodel.getElements(javaProject).size(), equalTo(0));
@@ -367,7 +367,7 @@
final List<JaxrsElementDelta> impacts = processEvent(event, progressMonitor);
// verifications
assertThat(impacts.size(), equalTo(1));
- assertThat(impacts.get(0).getElement().getElementKind(), equalTo(EnumElementKind.APPLICATION));
+ assertThat(impacts.get(0).getElement().getElementCategory(), equalTo(EnumElementCategory.APPLICATION));
assertThat(impacts.get(0).getDeltaKind(), equalTo(REMOVED));
assertThat(((JaxrsJavaApplication) impacts.get(0).getElement()).getApplicationPath(), equalTo("/app"));
assertThat(metamodel.getElements(javaProject).size(), equalTo(0));
@@ -386,7 +386,7 @@
final List<JaxrsElementDelta> impacts = processEvent(event, progressMonitor);
// verifications
assertThat(impacts.size(), equalTo(1));
- assertThat(impacts.get(0).getElement().getElementKind(), equalTo(EnumElementKind.APPLICATION));
+ assertThat(impacts.get(0).getElement().getElementCategory(), equalTo(EnumElementCategory.APPLICATION));
assertThat(impacts.get(0).getDeltaKind(), equalTo(REMOVED));
assertThat(impacts.get(0).getElement(), is(notNullValue()));
assertThat(metamodel.getElements(javaProject).size(), equalTo(0));
@@ -423,7 +423,7 @@
final List<JaxrsElementDelta> impacts = processEvent(event, progressMonitor);
// verifications
assertThat(impacts.size(), equalTo(1));
- assertThat(impacts.get(0).getElement().getElementKind(), equalTo(EnumElementKind.APPLICATION));
+ assertThat(impacts.get(0).getElement().getElementCategory(), equalTo(EnumElementCategory.APPLICATION));
assertThat(impacts.get(0).getElement(), is(notNullValue()));
assertThat(impacts.get(0).getDeltaKind(), equalTo(REMOVED));
assertThat(metamodel.getElements(javaProject).size(), equalTo(0));
@@ -439,7 +439,7 @@
final List<JaxrsElementDelta> impacts = processEvent(event, progressMonitor);
// verifications
assertThat(impacts.size(), equalTo(1));
- assertThat(impacts.get(0).getElement().getElementKind(), equalTo(EnumElementKind.HTTP_METHOD));
+ assertThat(impacts.get(0).getElement().getElementCategory(), equalTo(EnumElementCategory.HTTP_METHOD));
assertThat(impacts.get(0).getDeltaKind(), equalTo(ADDED));
assertThat(((JaxrsHttpMethod) impacts.get(0).getElement()).getHttpVerb(), equalTo("FOO"));
verify(metamodel, times(1)).add(any(JaxrsHttpMethod.class));
@@ -456,7 +456,7 @@
final List<JaxrsElementDelta> impacts = processEvent(event, progressMonitor);
// verifications
assertThat(impacts.size(), equalTo(1));
- assertThat(impacts.get(0).getElement().getElementKind(), equalTo(EnumElementKind.HTTP_METHOD));
+ assertThat(impacts.get(0).getElement().getElementCategory(), equalTo(EnumElementCategory.HTTP_METHOD));
assertThat(impacts.get(0).getDeltaKind(), equalTo(ADDED));
assertThat(((JaxrsHttpMethod) impacts.get(0).getElement()).getHttpVerb(), equalTo("FOO"));
//verify(metamodel, times(1)).add(any(HTTP_METHOD.qualifiedName));
@@ -474,7 +474,7 @@
final List<JaxrsElementDelta> impacts = processEvent(event, progressMonitor);
// verifications
assertThat(impacts.size(), equalTo(1));
- assertThat(impacts.get(0).getElement().getElementKind(), equalTo(EnumElementKind.HTTP_METHOD));
+ assertThat(impacts.get(0).getElement().getElementCategory(), equalTo(EnumElementCategory.HTTP_METHOD));
assertThat(impacts.get(0).getDeltaKind(), equalTo(ADDED));
assertThat(((JaxrsHttpMethod) impacts.get(0).getElement()).getHttpVerb(), equalTo("FOO"));
verify(metamodel, times(1)).add(any(JaxrsHttpMethod.class));
@@ -511,7 +511,7 @@
final List<JaxrsElementDelta> impacts = processEvent(event, progressMonitor);
// verifications
assertThat(impacts.size(), equalTo(1));
- assertThat(impacts.get(0).getElement().getElementKind(), equalTo(EnumElementKind.HTTP_METHOD));
+ assertThat(impacts.get(0).getElement().getElementCategory(), equalTo(EnumElementCategory.HTTP_METHOD));
assertThat(impacts.get(0).getDeltaKind(), equalTo(CHANGED));
assertThat(((JaxrsHttpMethod) impacts.get(0).getElement()).getHttpVerb(), equalTo("FOO"));
assertThat(metamodel.getElements(javaProject).size(), equalTo(1));
@@ -564,7 +564,7 @@
final List<JaxrsElementDelta> impacts = processEvent(event, progressMonitor);
// verifications
assertThat(impacts.size(), equalTo(1));
- assertThat(impacts.get(0).getElement().getElementKind(), equalTo(EnumElementKind.HTTP_METHOD));
+ assertThat(impacts.get(0).getElement().getElementCategory(), equalTo(EnumElementCategory.HTTP_METHOD));
assertThat(impacts.get(0).getDeltaKind(), equalTo(REMOVED));
assertThat(((JaxrsHttpMethod) impacts.get(0).getElement()), equalTo(httpMethod));
assertThat(metamodel.getElements(javaProject).size(), equalTo(0));
@@ -583,7 +583,7 @@
final List<JaxrsElementDelta> impacts = processEvent(event, progressMonitor);
// verifications
assertThat(impacts.size(), equalTo(1));
- assertThat(impacts.get(0).getElement().getElementKind(), equalTo(EnumElementKind.HTTP_METHOD));
+ assertThat(impacts.get(0).getElement().getElementCategory(), equalTo(EnumElementCategory.HTTP_METHOD));
assertThat(impacts.get(0).getDeltaKind(), equalTo(REMOVED));
assertThat(((JaxrsHttpMethod) impacts.get(0).getElement()).getHttpVerb(), equalTo("FOO"));
assertThat(metamodel.getElements(javaProject).size(), equalTo(0));
@@ -602,7 +602,7 @@
final List<JaxrsElementDelta> impacts = processEvent(event, progressMonitor);
// verifications
assertThat(impacts.size(), equalTo(1));
- assertThat(impacts.get(0).getElement().getElementKind(), equalTo(EnumElementKind.HTTP_METHOD));
+ assertThat(impacts.get(0).getElement().getElementCategory(), equalTo(EnumElementCategory.HTTP_METHOD));
assertThat(impacts.get(0).getDeltaKind(), equalTo(REMOVED));
assertThat(impacts.get(0).getElement(), is(notNullValue()));
assertThat(metamodel.getElements(javaProject).size(), equalTo(0));
@@ -638,7 +638,7 @@
final List<JaxrsElementDelta> impacts = processEvent(event, progressMonitor);
// verifications
assertThat(impacts.size(), equalTo(1));
- assertThat(impacts.get(0).getElement().getElementKind(), equalTo(EnumElementKind.HTTP_METHOD));
+ assertThat(impacts.get(0).getElement().getElementCategory(), equalTo(EnumElementCategory.HTTP_METHOD));
assertThat(impacts.get(0).getElement(), is(notNullValue()));
assertThat(impacts.get(0).getDeltaKind(), equalTo(REMOVED));
assertThat(metamodel.getElements(javaProject).size(), equalTo(0));
@@ -659,7 +659,7 @@
final List<JaxrsElementDelta> impacts = processEvent(event, progressMonitor);
// verifications
assertThat(impacts.size(), equalTo(1));
- assertThat(impacts.get(0).getElement().getElementKind(), equalTo(EnumElementKind.HTTP_METHOD));
+ assertThat(impacts.get(0).getElement().getElementCategory(), equalTo(EnumElementCategory.HTTP_METHOD));
assertThat(impacts, everyItem(Matchers.<JaxrsElementDelta> hasProperty("deltaKind", equalTo(REMOVED))));
assertThat(metamodel.getElements(javaProject).size(), equalTo(0));
}
@@ -1986,7 +1986,7 @@
assertThat(impacts.size(), equalTo(1));
assertThat(impacts.get(0).getDeltaKind(), equalTo(CHANGED));
assertThat(impacts.get(0).getFlags(), equalTo(F_METHOD_PARAMETERS));
- assertThat(impacts.get(0).getElement().getElementKind(), equalTo(EnumElementKind.RESOURCE_METHOD));
+ assertThat(impacts.get(0).getElement().getElementCategory(), equalTo(EnumElementCategory.RESOURCE_METHOD));
assertThat(metamodel.getElements(javaProject).size(), equalTo(3)); // @HTTP + resource + resourceMethod
}
@@ -2017,7 +2017,7 @@
assertThat(impacts.size(), equalTo(1));
assertThat(impacts.get(0).getDeltaKind(), equalTo(CHANGED));
assertThat(impacts.get(0).getFlags(), equalTo(F_METHOD_PARAMETERS));
- assertThat(impacts.get(0).getElement().getElementKind(), equalTo(EnumElementKind.RESOURCE_METHOD));
+ assertThat(impacts.get(0).getElement().getElementCategory(), equalTo(EnumElementCategory.RESOURCE_METHOD));
assertThat(metamodel.getElements(javaProject).size(), equalTo(3)); // @HTTP + resource + resourceMethod
}
@@ -2370,5 +2370,5 @@
public void shouldUpdateResourceMethodWhenRemovingThrowsException() throws CoreException {
fail("Not implemented yet - postponed along with support for providers");
}
-
+
}
Modified: trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JaxrsMetamodelChangedProcessorTestCase.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JaxrsMetamodelChangedProcessorTestCase.java 2012-07-30 14:56:26 UTC (rev 42786)
+++ trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JaxrsMetamodelChangedProcessorTestCase.java 2012-07-30 15:15:37 UTC (rev 42787)
@@ -21,13 +21,13 @@
import static org.jboss.tools.ws.jaxrs.core.WorkbenchUtils.getType;
import static org.jboss.tools.ws.jaxrs.core.internal.metamodel.builder.JaxrsElementDelta.F_ELEMENT_KIND;
import static org.jboss.tools.ws.jaxrs.core.internal.metamodel.builder.JaxrsElementDelta.F_PATH_VALUE;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.APPLICATION_PATH;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.CONSUMES;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.GET;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.HTTP_METHOD;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.PATH;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.POST;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.PRODUCES;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.APPLICATION_PATH;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.CONSUMES;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.GET;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.HTTP_METHOD;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.PATH;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.POST;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.PRODUCES;
import static org.junit.Assert.assertThat;
import static org.mockito.Mockito.spy;
@@ -52,11 +52,11 @@
import org.jboss.tools.ws.jaxrs.core.internal.metamodel.domain.JaxrsResourceMethod;
import org.jboss.tools.ws.jaxrs.core.internal.metamodel.domain.JaxrsResourceMethod.Builder;
import org.jboss.tools.ws.jaxrs.core.jdt.Annotation;
-import org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements;
+import org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname;
import org.jboss.tools.ws.jaxrs.core.jdt.JavaMethodParameter;
import org.jboss.tools.ws.jaxrs.core.jdt.JavaMethodSignature;
import org.jboss.tools.ws.jaxrs.core.jdt.JdtUtils;
-import org.jboss.tools.ws.jaxrs.core.metamodel.EnumKind;
+import org.jboss.tools.ws.jaxrs.core.metamodel.EnumElementKind;
import org.jboss.tools.ws.jaxrs.core.metamodel.IJaxrsEndpoint;
import org.jboss.tools.ws.jaxrs.core.metamodel.IJaxrsHttpMethod;
import org.jboss.tools.ws.jaxrs.core.metamodel.JaxrsEndpointDelta;
@@ -95,7 +95,7 @@
}
private JaxrsResourceMethod createResourceMethod(String methodName, JaxrsResource parentResource,
- EnumJaxrsElements httpMethodElement) throws CoreException, JavaModelException {
+ EnumJaxrsClassname httpMethodElement) throws CoreException, JavaModelException {
final IType javaType = parentResource.getJavaElement();
final ICompilationUnit compilationUnit = javaType.getCompilationUnit();
final IMethod javaMethod = getMethod(javaType, methodName);
@@ -274,7 +274,7 @@
final JaxrsResource customerResource = createResource("org.jboss.tools.ws.jaxrs.sample.services.CustomerResource");
final JaxrsResourceMethod customerSubresourceMethod = createResourceMethod("getCustomer", customerResource,
null);
- assertThat(customerSubresourceMethod.getKind(), equalTo(EnumKind.SUBRESOURCE_LOCATOR));
+ assertThat(customerSubresourceMethod.getElementKind(), equalTo(EnumElementKind.SUBRESOURCE_LOCATOR));
// operation
Annotation httpAnnotation = getAnnotation(customerSubresourceMethod.getJavaElement(), GET.qualifiedName);
final int flags = customerSubresourceMethod.addOrUpdateAnnotation(httpAnnotation);
Modified: trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/ResourceChangedProcessorTestCase.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/ResourceChangedProcessorTestCase.java 2012-07-30 14:56:26 UTC (rev 42786)
+++ trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/ResourceChangedProcessorTestCase.java 2012-07-30 15:15:37 UTC (rev 42787)
@@ -19,13 +19,13 @@
import static org.hamcrest.Matchers.notNullValue;
import static org.jboss.tools.ws.jaxrs.core.WorkbenchUtils.getAnnotation;
import static org.jboss.tools.ws.jaxrs.core.WorkbenchUtils.getType;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.APPLICATION_PATH;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.CONSUMES;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.DELETE;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.GET;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.HTTP_METHOD;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.POST;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.PUT;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.APPLICATION_PATH;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.CONSUMES;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.DELETE;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.GET;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.HTTP_METHOD;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.POST;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.PUT;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertThat;
import static org.mockito.Matchers.any;
@@ -60,10 +60,10 @@
import org.jboss.tools.ws.jaxrs.core.internal.metamodel.domain.JaxrsWebxmlApplication;
import org.jboss.tools.ws.jaxrs.core.jdt.Annotation;
import org.jboss.tools.ws.jaxrs.core.jdt.CompilationUnitsRepository;
-import org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements;
+import org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname;
import org.jboss.tools.ws.jaxrs.core.jdt.JdtUtils;
+import org.jboss.tools.ws.jaxrs.core.metamodel.EnumElementCategory;
import org.jboss.tools.ws.jaxrs.core.metamodel.EnumElementKind;
-import org.jboss.tools.ws.jaxrs.core.metamodel.EnumKind;
import org.jboss.tools.ws.jaxrs.core.metamodel.IJaxrsApplication;
import org.jboss.tools.ws.jaxrs.core.metamodel.IJaxrsHttpMethod;
import org.jboss.tools.ws.jaxrs.core.metamodel.IJaxrsMetamodel;
@@ -134,7 +134,7 @@
* @throws CoreException
* @throws JavaModelException
*/
- private JaxrsHttpMethod createHttpMethod(EnumJaxrsElements httpMethodElement) throws CoreException, JavaModelException {
+ private JaxrsHttpMethod createHttpMethod(EnumJaxrsClassname httpMethodElement) throws CoreException, JavaModelException {
final IType httpMethodType = JdtUtils.resolveType(httpMethodElement.qualifiedName, javaProject, progressMonitor);
final Annotation httpMethodAnnotation = getAnnotation(httpMethodType, HTTP_METHOD.qualifiedName);
final JaxrsHttpMethod httpMethod = new JaxrsHttpMethod(httpMethodType, httpMethodAnnotation, metamodel);
@@ -268,7 +268,7 @@
final List<JaxrsElementDelta> affectedElements = processResourceChanges(event, progressMonitor);
// verifications
assertThat(affectedElements.size(), equalTo(1));
- assertThat(affectedElements.get(0).getElement().getElementKind(), equalTo(EnumElementKind.HTTP_METHOD));
+ assertThat(affectedElements.get(0).getElement().getElementCategory(), equalTo(EnumElementCategory.HTTP_METHOD));
assertThat(affectedElements.get(0).getDeltaKind(), equalTo(ADDED));
assertThat(metamodel.getElements(javaProject).size(), equalTo(1));
}
@@ -284,7 +284,7 @@
final List<JaxrsElementDelta> affectedElements = processResourceChanges(event, progressMonitor);
// verifications
assertThat(affectedElements.size(), equalTo(1));
- assertThat(affectedElements.get(0).getElement().getElementKind(), equalTo(EnumElementKind.APPLICATION));
+ assertThat(affectedElements.get(0).getElement().getElementCategory(), equalTo(EnumElementCategory.APPLICATION));
assertThat(affectedElements.get(0).getDeltaKind(), equalTo(ADDED));
assertThat(((IJaxrsApplication) affectedElements.get(0).getElement()).getApplicationPath(), equalTo("/app"));
verify(metamodel, times(1)).add(any(JaxrsJavaApplication.class));
@@ -302,7 +302,7 @@
final List<JaxrsElementDelta> affectedElements = processResourceChanges(event, progressMonitor);
// verifications
assertThat(affectedElements.size(), equalTo(1));
- assertThat(affectedElements.get(0).getElement().getElementKind(), equalTo(EnumElementKind.APPLICATION));
+ assertThat(affectedElements.get(0).getElement().getElementCategory(), equalTo(EnumElementCategory.APPLICATION));
assertThat(affectedElements.get(0).getDeltaKind(), equalTo(CHANGED));
assertThat(((IJaxrsApplication) affectedElements.get(0).getElement()).getApplicationPath(), equalTo("/app"));
verify(metamodel, times(1)).add(any(JaxrsJavaApplication.class));
@@ -322,7 +322,7 @@
final List<JaxrsElementDelta> affectedElements = processResourceChanges(event, progressMonitor);
// verifications
assertThat(affectedElements.size(), equalTo(1));
- assertThat(affectedElements.get(0).getElement().getElementKind(), equalTo(EnumElementKind.APPLICATION));
+ assertThat(affectedElements.get(0).getElement().getElementCategory(), equalTo(EnumElementCategory.APPLICATION));
assertThat(affectedElements.get(0).getDeltaKind(), equalTo(REMOVED));
assertThat(((IJaxrsApplication) affectedElements.get(0).getElement()).getApplicationPath(), equalTo("/app"));
verify(metamodel, times(1)).add(any(JaxrsHttpMethod.class));
@@ -342,7 +342,7 @@
final List<JaxrsElementDelta> affectedElements = processResourceChanges(event, progressMonitor);
// verifications
assertThat(affectedElements.size(), equalTo(1));
- assertThat(affectedElements.get(0).getElement().getElementKind(), equalTo(EnumElementKind.APPLICATION));
+ assertThat(affectedElements.get(0).getElement().getElementCategory(), equalTo(EnumElementCategory.APPLICATION));
assertThat(affectedElements.get(0).getDeltaKind(), equalTo(REMOVED));
assertThat(((JaxrsJavaApplication) affectedElements.get(0).getElement()), equalTo(application));
assertThat(metamodel.getElements(javaProject).size(), equalTo(0));
@@ -362,7 +362,7 @@
final List<JaxrsElementDelta> affectedElements = processResourceChanges(event, progressMonitor);
// verifications
assertThat(affectedElements.size(), equalTo(1));
- assertThat(affectedElements.get(0).getElement().getElementKind(), equalTo(EnumElementKind.HTTP_METHOD));
+ assertThat(affectedElements.get(0).getElement().getElementCategory(), equalTo(EnumElementCategory.HTTP_METHOD));
assertThat(affectedElements.get(0).getDeltaKind(), equalTo(REMOVED));
assertThat(((IJaxrsHttpMethod) affectedElements.get(0).getElement()).getHttpVerb(), equalTo("FOO"));
assertThat(metamodel.getElements(javaProject).size(), equalTo(0));
@@ -382,7 +382,7 @@
final List<JaxrsElementDelta> affectedElements = processResourceChanges(event, progressMonitor);
// verifications
assertThat(affectedElements.size(), equalTo(1));
- assertThat(affectedElements.get(0).getElement().getElementKind(), equalTo(EnumElementKind.APPLICATION));
+ assertThat(affectedElements.get(0).getElement().getElementCategory(), equalTo(EnumElementCategory.APPLICATION));
assertThat(affectedElements.get(0).getElement(), is(notNullValue()));
assertThat(affectedElements.get(0).getDeltaKind(), equalTo(REMOVED));
assertThat(metamodel.getElements(javaProject).size(), equalTo(0));
@@ -398,7 +398,7 @@
final List<JaxrsElementDelta> affectedElements = processResourceChanges(event, progressMonitor);
// verifications
assertThat(affectedElements.size(), equalTo(1));
- assertThat(affectedElements.get(0).getElement().getElementKind(), equalTo(EnumElementKind.APPLICATION));
+ assertThat(affectedElements.get(0).getElement().getElementCategory(), equalTo(EnumElementCategory.APPLICATION));
assertThat(affectedElements.get(0).getDeltaKind(), equalTo(ADDED));
assertThat(((JaxrsWebxmlApplication) affectedElements.get(0).getElement()).getApplicationPath(), equalTo("/hello"));
verify(metamodel, times(1)).add(any(JaxrsWebxmlApplication.class));
@@ -428,7 +428,7 @@
final List<JaxrsElementDelta> affectedElements = processResourceChanges(event, progressMonitor);
// verifications
assertThat(affectedElements.size(), equalTo(1));
- assertThat(affectedElements.get(0).getElement().getElementKind(), equalTo(EnumElementKind.APPLICATION));
+ assertThat(affectedElements.get(0).getElement().getElementCategory(), equalTo(EnumElementCategory.APPLICATION));
assertThat(affectedElements.get(0).getDeltaKind(), equalTo(ADDED));
assertThat(((JaxrsWebxmlApplication) affectedElements.get(0).getElement()).getApplicationPath(), equalTo("/hello"));
verify(metamodel, times(1)).add(any(JaxrsWebxmlApplication.class));
@@ -450,7 +450,7 @@
// verifications
assertThat(affectedElements.size(), equalTo(1));
final JaxrsWebxmlApplication webxmlApplication = (JaxrsWebxmlApplication) affectedElements.get(0).getElement();
- assertThat(webxmlApplication.getElementKind(), equalTo(EnumElementKind.APPLICATION));
+ assertThat(webxmlApplication.getElementCategory(), equalTo(EnumElementCategory.APPLICATION));
assertThat(affectedElements.get(0).getDeltaKind(), equalTo(ADDED));
assertThat(webxmlApplication.getApplicationPath(), equalTo("/hello"));
verify(metamodel, times(1)).add(any(JaxrsWebxmlApplication.class));
@@ -471,7 +471,7 @@
final List<JaxrsElementDelta> affectedElements = processResourceChanges(event, progressMonitor);
// verifications
assertThat(affectedElements.size(), equalTo(1));
- assertThat(affectedElements.get(0).getElement().getElementKind(), equalTo(EnumElementKind.APPLICATION));
+ assertThat(affectedElements.get(0).getElement().getElementCategory(), equalTo(EnumElementCategory.APPLICATION));
assertThat(affectedElements.get(0).getDeltaKind(), equalTo(CHANGED));
assertThat(((JaxrsWebxmlApplication) affectedElements.get(0).getElement()).getApplicationPath(), equalTo("/hello"));
verify(metamodel, times(1)).add(any(JaxrsWebxmlApplication.class));
@@ -506,7 +506,7 @@
final List<JaxrsElementDelta> affectedElements = processResourceChanges(event, progressMonitor);
// verifications
assertThat(affectedElements.size(), equalTo(1));
- assertThat(affectedElements.get(0).getElement().getElementKind(), equalTo(EnumElementKind.APPLICATION));
+ assertThat(affectedElements.get(0).getElement().getElementCategory(), equalTo(EnumElementCategory.APPLICATION));
assertThat(affectedElements.get(0).getDeltaKind(), equalTo(REMOVED));
assertThat(((JaxrsWebxmlApplication) affectedElements.get(0).getElement()).getApplicationPath(), equalTo("/hello"));
verify(metamodel, times(1)).remove(any(JaxrsWebxmlApplication.class));
@@ -527,7 +527,7 @@
final List<JaxrsElementDelta> affectedElements = processResourceChanges(event, progressMonitor);
// verifications
assertThat(affectedElements.size(), equalTo(1));
- assertThat(affectedElements.get(0).getElement().getElementKind(), equalTo(EnumElementKind.APPLICATION));
+ assertThat(affectedElements.get(0).getElement().getElementCategory(), equalTo(EnumElementCategory.APPLICATION));
assertThat(affectedElements.get(0).getDeltaKind(), equalTo(REMOVED));
assertThat(((JaxrsWebxmlApplication) affectedElements.get(0).getElement()), equalTo(application));
assertThat(metamodel.getElements(javaProject).size(), equalTo(0));
@@ -549,7 +549,7 @@
final List<JaxrsElementDelta> affectedElements = processResourceChanges(event, progressMonitor);
// verifications
assertThat(affectedElements.size(), equalTo(1));
- assertThat(affectedElements.get(0).getElement().getElementKind(), equalTo(EnumElementKind.APPLICATION));
+ assertThat(affectedElements.get(0).getElement().getElementCategory(), equalTo(EnumElementCategory.APPLICATION));
assertThat(affectedElements.get(0).getElement(), is(notNullValue()));
assertThat(affectedElements.get(0).getDeltaKind(), equalTo(REMOVED));
assertThat(metamodel.getElements(javaProject).size(), equalTo(0));
@@ -583,7 +583,7 @@
final List<JaxrsElementDelta> affectedElements = processResourceChanges(event, progressMonitor);
// verifications
assertThat(affectedElements.size(), equalTo(1));
- assertThat(affectedElements.get(0).getElement().getElementKind(), equalTo(EnumElementKind.HTTP_METHOD));
+ assertThat(affectedElements.get(0).getElement().getElementCategory(), equalTo(EnumElementCategory.HTTP_METHOD));
assertThat(affectedElements.get(0).getDeltaKind(), equalTo(ADDED));
assertThat(((IJaxrsHttpMethod) affectedElements.get(0).getElement()).getHttpVerb(), equalTo("FOO"));
verify(metamodel, times(1)).add(any(JaxrsHttpMethod.class));
@@ -601,7 +601,7 @@
final List<JaxrsElementDelta> affectedElements = processResourceChanges(event, progressMonitor);
// verifications
assertThat(affectedElements.size(), equalTo(1));
- assertThat(affectedElements.get(0).getElement().getElementKind(), equalTo(EnumElementKind.HTTP_METHOD));
+ assertThat(affectedElements.get(0).getElement().getElementCategory(), equalTo(EnumElementCategory.HTTP_METHOD));
assertThat(affectedElements.get(0).getDeltaKind(), equalTo(CHANGED));
assertThat(((IJaxrsHttpMethod) affectedElements.get(0).getElement()).getHttpVerb(), equalTo("FOO"));
verify(metamodel, times(1)).add(any(JaxrsHttpMethod.class));
@@ -621,7 +621,7 @@
final List<JaxrsElementDelta> affectedElements = processResourceChanges(event, progressMonitor);
// verifications
assertThat(affectedElements.size(), equalTo(1));
- assertThat(affectedElements.get(0).getElement().getElementKind(), equalTo(EnumElementKind.HTTP_METHOD));
+ assertThat(affectedElements.get(0).getElement().getElementCategory(), equalTo(EnumElementCategory.HTTP_METHOD));
assertThat(affectedElements.get(0).getDeltaKind(), equalTo(REMOVED));
assertThat(((IJaxrsHttpMethod) affectedElements.get(0).getElement()).getHttpVerb(), equalTo("FOO"));
verify(metamodel, times(1)).add(any(JaxrsHttpMethod.class));
@@ -642,7 +642,7 @@
final List<JaxrsElementDelta> affectedElements = processResourceChanges(event, progressMonitor);
// verifications
assertThat(affectedElements.size(), equalTo(1));
- assertThat(affectedElements.get(0).getElement().getElementKind(), equalTo(EnumElementKind.HTTP_METHOD));
+ assertThat(affectedElements.get(0).getElement().getElementCategory(), equalTo(EnumElementCategory.HTTP_METHOD));
assertThat(affectedElements.get(0).getDeltaKind(), equalTo(REMOVED));
assertThat(((JaxrsHttpMethod) affectedElements.get(0).getElement()), equalTo(httpMethod));
assertThat(metamodel.getElements(javaProject).size(), equalTo(0));
@@ -662,7 +662,7 @@
final List<JaxrsElementDelta> affectedElements = processResourceChanges(event, progressMonitor);
// verifications
assertThat(affectedElements.size(), equalTo(1));
- assertThat(affectedElements.get(0).getElement().getElementKind(), equalTo(EnumElementKind.HTTP_METHOD));
+ assertThat(affectedElements.get(0).getElement().getElementCategory(), equalTo(EnumElementCategory.HTTP_METHOD));
assertThat(affectedElements.get(0).getDeltaKind(), equalTo(REMOVED));
assertThat(((IJaxrsHttpMethod) affectedElements.get(0).getElement()).getHttpVerb(), equalTo("FOO"));
assertThat(metamodel.getElements(javaProject).size(), equalTo(0));
@@ -683,7 +683,7 @@
final List<JaxrsElementDelta> affectedElements = processResourceChanges(event, progressMonitor);
// verifications
assertThat(affectedElements.size(), equalTo(1));
- assertThat(affectedElements.get(0).getElement().getElementKind(), equalTo(EnumElementKind.HTTP_METHOD));
+ assertThat(affectedElements.get(0).getElement().getElementCategory(), equalTo(EnumElementCategory.HTTP_METHOD));
assertThat(affectedElements.get(0).getElement(), is(notNullValue()));
assertThat(affectedElements.get(0).getDeltaKind(), equalTo(REMOVED));
assertThat(metamodel.getElements(javaProject).size(), equalTo(0));
@@ -703,7 +703,7 @@
// verifications
assertThat(affectedElements.size(), equalTo(1)); // 1 resource
assertThat(affectedElements.get(0).getDeltaKind(), equalTo(ADDED));
- assertThat(affectedElements.get(0).getElement().getElementKind(), equalTo(EnumElementKind.RESOURCE));
+ assertThat(affectedElements.get(0).getElement().getElementCategory(), equalTo(EnumElementCategory.RESOURCE));
// HttpMethods, Resource, ResourceMethods and ResourceFields
assertThat(metamodel.getElements(javaProject).size(), equalTo(11));
}
@@ -765,7 +765,7 @@
// verifications
assertThat(affectedElements.size(), equalTo(1)); // 1 resource method
assertThat(affectedElements.get(0).getDeltaKind(), equalTo(ADDED));
- assertThat(affectedElements.get(0).getElement().getElementKind(), equalTo(EnumElementKind.RESOURCE_METHOD));
+ assertThat(affectedElements.get(0).getElement().getElementCategory(), equalTo(EnumElementCategory.RESOURCE_METHOD));
// 4 HttpMethods + 2 resources (including their methods and fields)
assertThat(metamodel.getElements(javaProject).size(), equalTo(8));
}
@@ -783,7 +783,7 @@
// operation
for (Iterator<JaxrsResourceMethod> iterator = bookResource.getMethods().values().iterator(); iterator.hasNext();) {
JaxrsResourceMethod resourceMethod = iterator.next();
- if (resourceMethod.getKind() == EnumKind.SUBRESOURCE_METHOD) {
+ if (resourceMethod.getElementKind() == EnumElementKind.SUBRESOURCE_METHOD) {
WorkbenchUtils.replaceFirstOccurrenceOfCode(resourceMethod.getJavaElement(), "@Path(\"/{id}\")",
"@Path(\"/{foo}\")", false);
WorkbenchUtils.delete(resourceMethod.getHttpMethodAnnotation().getJavaAnnotation(), false);
@@ -794,9 +794,9 @@
// verifications
assertThat(affectedElements.size(), equalTo(2)); // 2 resource methods
assertThat(affectedElements.get(0).getDeltaKind(), equalTo(CHANGED));
- assertThat(affectedElements.get(0).getElement().getElementKind(), equalTo(EnumElementKind.RESOURCE_METHOD));
+ assertThat(affectedElements.get(0).getElement().getElementCategory(), equalTo(EnumElementCategory.RESOURCE_METHOD));
assertThat(affectedElements.get(1).getDeltaKind(), equalTo(CHANGED));
- assertThat(affectedElements.get(1).getElement().getElementKind(), equalTo(EnumElementKind.RESOURCE_METHOD));
+ assertThat(affectedElements.get(1).getElement().getElementCategory(), equalTo(EnumElementCategory.RESOURCE_METHOD));
// 4 HttpMethods + 2 resources (including their methods and fields)
assertThat(metamodel.getElements(javaProject).size(), equalTo(8));
}
@@ -813,7 +813,7 @@
// operation
for (Iterator<JaxrsResourceMethod> iterator = bookResource.getMethods().values().iterator(); iterator.hasNext();) {
JaxrsResourceMethod resourceMethod = iterator.next();
- if (resourceMethod.getKind() == EnumKind.RESOURCE_METHOD) {
+ if (resourceMethod.getElementKind() == EnumElementKind.RESOURCE_METHOD) {
WorkbenchUtils.delete(resourceMethod.getHttpMethodAnnotation().getJavaAnnotation(), false);
}
}
@@ -822,7 +822,7 @@
// verifications
assertThat(affectedElements.size(), equalTo(1)); // 1 resource method
assertThat(affectedElements.get(0).getDeltaKind(), equalTo(REMOVED));
- assertThat(affectedElements.get(0).getElement().getElementKind(), equalTo(EnumElementKind.RESOURCE_METHOD));
+ assertThat(affectedElements.get(0).getElement().getElementCategory(), equalTo(EnumElementCategory.RESOURCE_METHOD));
// 4 HttpMethods + 1 resource (including their remaining methods and fields)
assertThat(metamodel.getElements(javaProject).size(), equalTo(7));
}
@@ -843,7 +843,7 @@
// verifications
assertThat(affectedElements.size(), equalTo(1)); // 1 resource field
assertThat(affectedElements.get(0).getDeltaKind(), equalTo(ADDED));
- assertThat(affectedElements.get(0).getElement().getElementKind(), equalTo(EnumElementKind.RESOURCE_FIELD));
+ assertThat(affectedElements.get(0).getElement().getElementCategory(), equalTo(EnumElementCategory.RESOURCE_FIELD));
// 4 HttpMethods + 2 resources (including their methods and fields)
assertThat(metamodel.getElements(javaProject).size(), equalTo(9));
}
@@ -872,7 +872,7 @@
// verifications
assertThat(affectedElements.size(), equalTo(1)); // 1 resource field
assertThat(affectedElements.get(0).getDeltaKind(), equalTo(CHANGED));
- assertThat(affectedElements.get(0).getElement().getElementKind(), equalTo(EnumElementKind.RESOURCE_FIELD));
+ assertThat(affectedElements.get(0).getElement().getElementCategory(), equalTo(EnumElementCategory.RESOURCE_FIELD));
// 4 HttpMethods + 2 resources (including their methods and fields)
assertThat(metamodel.getElements(javaProject).size(), equalTo(9));
}
@@ -899,7 +899,7 @@
// verifications
assertThat(affectedElements.size(), equalTo(1)); // 1 resource field
assertThat(affectedElements.get(0).getDeltaKind(), equalTo(REMOVED));
- assertThat(affectedElements.get(0).getElement().getElementKind(), equalTo(EnumElementKind.RESOURCE_FIELD));
+ assertThat(affectedElements.get(0).getElement().getElementCategory(), equalTo(EnumElementCategory.RESOURCE_FIELD));
// 4 HttpMethods + 2 resources (including their methods and fields)
assertThat(metamodel.getElements(javaProject).size(), equalTo(8));
}
@@ -922,7 +922,7 @@
// verifications
assertThat(affectedElements.size(), equalTo(1)); // 1 resource
assertThat(affectedElements.get(0).getDeltaKind(), equalTo(REMOVED));
- assertThat(affectedElements.get(0).getElement().getElementKind(), equalTo(EnumElementKind.RESOURCE));
+ assertThat(affectedElements.get(0).getElement().getElementCategory(), equalTo(EnumElementCategory.RESOURCE));
// 4 HttpMethods left only
assertThat(metamodel.getElements(javaProject).size(), equalTo(4));
}
@@ -942,7 +942,7 @@
// verifications
assertThat(affectedElements.size(), equalTo(1));
assertThat(affectedElements.get(0).getDeltaKind(), equalTo(REMOVED));
- assertThat(affectedElements.get(0).getElement().getElementKind(), equalTo(EnumElementKind.RESOURCE));
+ assertThat(affectedElements.get(0).getElement().getElementCategory(), equalTo(EnumElementCategory.RESOURCE));
assertThat(((JaxrsResource) affectedElements.get(0).getElement()), equalTo(resource));
// 4 HttpMethods left only
assertThat(metamodel.getElements(javaProject).size(), equalTo(4));
@@ -963,7 +963,7 @@
final List<JaxrsElementDelta> affectedElements = processResourceChanges(event, progressMonitor);
// verifications
assertThat(affectedElements.size(), equalTo(1));
- assertThat(affectedElements.get(0).getElement().getElementKind(), equalTo(EnumElementKind.RESOURCE));
+ assertThat(affectedElements.get(0).getElement().getElementCategory(), equalTo(EnumElementCategory.RESOURCE));
assertThat(affectedElements.get(0).getDeltaKind(), equalTo(REMOVED));
assertThat(((JaxrsResource) affectedElements.get(0).getElement()), equalTo(resource));
// 4 HttpMethods left only
@@ -984,7 +984,7 @@
final List<JaxrsElementDelta> affectedElements = processResourceChanges(event, progressMonitor);
// verifications
assertThat(affectedElements.size(), equalTo(1));
- assertThat(affectedElements.get(0).getElement().getElementKind(), equalTo(EnumElementKind.RESOURCE));
+ assertThat(affectedElements.get(0).getElement().getElementCategory(), equalTo(EnumElementCategory.RESOURCE));
verify(metamodel, times(1)).remove(any(JaxrsResource.class));
// nothing left
assertThat(metamodel.getElements(javaProject).size(), equalTo(0));
@@ -1025,7 +1025,7 @@
// verifications
assertThat(affectedElements.size(), equalTo(1)); // 1 resource method
assertThat(affectedElements.get(0).getDeltaKind(), equalTo(REMOVED));
- assertThat(affectedElements.get(0).getElement().getElementKind(), equalTo(EnumElementKind.RESOURCE));
+ assertThat(affectedElements.get(0).getElement().getElementCategory(), equalTo(EnumElementCategory.RESOURCE));
// 4 HttpMethods left only
assertThat(metamodel.getElements(javaProject).size(), equalTo(4));
}
Modified: trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsElementFactoryTestCase.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsElementFactoryTestCase.java 2012-07-30 14:56:26 UTC (rev 42786)
+++ trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsElementFactoryTestCase.java 2012-07-30 15:15:37 UTC (rev 42787)
@@ -16,11 +16,12 @@
import static org.jboss.tools.ws.jaxrs.core.WorkbenchUtils.getAnnotation;
import static org.jboss.tools.ws.jaxrs.core.WorkbenchUtils.getMethod;
import static org.jboss.tools.ws.jaxrs.core.WorkbenchUtils.getType;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.GET;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.HTTP_METHOD;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.PATH;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.QUERY_PARAM;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.GET;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.HTTP_METHOD;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.PATH;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.QUERY_PARAM;
import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertThat;
import static org.mockito.Mockito.spy;
@@ -33,6 +34,7 @@
import org.jboss.tools.ws.jaxrs.core.AbstractCommonTestCase;
import org.jboss.tools.ws.jaxrs.core.jdt.Annotation;
import org.jboss.tools.ws.jaxrs.core.jdt.JdtUtils;
+import org.jboss.tools.ws.jaxrs.core.metamodel.EnumElementKind;
import org.jboss.tools.ws.jaxrs.core.metamodel.IJaxrsHttpMethod;
import org.jboss.tools.ws.jaxrs.core.metamodel.IJaxrsResource;
import org.junit.Before;
@@ -77,7 +79,7 @@
}
@Test
- public void shouldCreateSubesourceFromType() throws CoreException {
+ public void shouldCreateSubresourceFromType() throws CoreException {
// pre-conditions
final IType type = getType("org.jboss.tools.ws.jaxrs.sample.services.BookResource", javaProject);
// operation
@@ -165,5 +167,62 @@
assertThat(element.getQueryParamAnnotation().getValue("value"), equalTo("foo"));
assertThat(element.getDefaultValueAnnotation().getValue("value"), equalTo("foo!"));
}
+
+ @Test
+ public void shouldCreateMessageBodyWriterProviderFromType() throws CoreException {
+ // pre-conditions
+ final IType providerType = getType("org.jboss.tools.ws.jaxrs.sample.services.providers.CustomerVCardMessageBodyWriter", javaProject);
+ // operation
+ JaxrsProvider element = factory.createProvider(providerType, JdtUtils.parse(providerType, progressMonitor), metamodel, progressMonitor);
+ // verifications
+ assertNotNull(element);
+ assertThat(element.getAnnotations().size(), equalTo(2));
+ assertThat(element.getElementKind(), equalTo(EnumElementKind.MESSAGE_BODY_WRITER));
+ assertNull(element.getProvidedType(EnumElementKind.MESSAGE_BODY_READER));
+ assertThat(element.getProvidedType(EnumElementKind.MESSAGE_BODY_WRITER).getFullyQualifiedName(), equalTo("org.jboss.tools.ws.jaxrs.sample.domain.Customer"));
+ assertNull(element.getProvidedType(EnumElementKind.EXCEPTION_MAPPER));
+ }
+
+
+ @Test
+ public void shouldCreateEntityProviderFromType() throws CoreException {
+ // pre-conditions
+ final IType providerType = getType("org.jboss.tools.ws.jaxrs.sample.extra.DummyProvider", javaProject);
+ // operation
+ JaxrsProvider element = factory.createProvider(providerType, JdtUtils.parse(providerType, progressMonitor), metamodel, progressMonitor);
+ // verifications
+ assertNotNull(element);
+ assertThat(element.getAnnotations().size(), equalTo(3));
+ assertThat(element.getElementKind(), equalTo(EnumElementKind.ENTITY_MAPPER));
+ assertThat(element.getProvidedType(EnumElementKind.MESSAGE_BODY_READER).getFullyQualifiedName(), equalTo(String.class.getName()));
+ assertThat(element.getProvidedType(EnumElementKind.MESSAGE_BODY_WRITER).getFullyQualifiedName(), equalTo(Number.class.getName()));
+ assertNull(element.getProvidedType(EnumElementKind.EXCEPTION_MAPPER));
+ }
+ @Test
+ public void shouldCreateExceptionMapperProviderFromType() throws CoreException {
+ // pre-conditions
+ final IType providerType = getType("org.jboss.tools.ws.jaxrs.sample.extra.TestQualifiedExceptionMapper", javaProject);
+ // operation
+ JaxrsProvider element = factory.createProvider(providerType, JdtUtils.parse(providerType, progressMonitor), metamodel, progressMonitor);
+ // verifications
+ assertNotNull(element);
+ assertThat(element.getAnnotations().size(), equalTo(1));
+ assertThat(element.getElementKind(), equalTo(EnumElementKind.EXCEPTION_MAPPER));
+ assertNull(element.getProvidedType(EnumElementKind.MESSAGE_BODY_READER));
+ assertNull(element.getProvidedType(EnumElementKind.MESSAGE_BODY_WRITER));
+ assertThat(element.getProvidedType(EnumElementKind.EXCEPTION_MAPPER).getFullyQualifiedName(), equalTo("org.jboss.tools.ws.jaxrs.sample.extra.TestQualifiedException$TestException"));
+ }
+
+ @Test
+ public void shouldNotCreateProviderFromType() throws CoreException {
+ // pre-conditions
+ final IType providerType = getType("org.jboss.tools.ws.jaxrs.sample.services.ProductResourceLocator", javaProject);
+ // operation
+ JaxrsProvider element = factory.createProvider(providerType, JdtUtils.parse(providerType, progressMonitor), metamodel, progressMonitor);
+ // verifications
+ assertNull(element);
+ }
+
+
}
Modified: trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsMetamodelTestCase.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsMetamodelTestCase.java 2012-07-30 14:56:26 UTC (rev 42786)
+++ trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsMetamodelTestCase.java 2012-07-30 15:15:37 UTC (rev 42787)
@@ -19,7 +19,7 @@
import static org.jboss.tools.ws.jaxrs.core.WorkbenchUtils.getAnnotation;
import static org.jboss.tools.ws.jaxrs.core.WorkbenchUtils.getMethod;
import static org.jboss.tools.ws.jaxrs.core.WorkbenchUtils.getType;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.HTTP_METHOD;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.HTTP_METHOD;
import static org.junit.Assert.assertThat;
import java.lang.annotation.Target;
@@ -39,7 +39,7 @@
import org.jboss.tools.ws.jaxrs.core.builder.AbstractMetamodelBuilderTestCase;
import org.jboss.tools.ws.jaxrs.core.jdt.Annotation;
import org.jboss.tools.ws.jaxrs.core.jdt.JdtUtils;
-import org.jboss.tools.ws.jaxrs.core.metamodel.EnumKind;
+import org.jboss.tools.ws.jaxrs.core.metamodel.EnumElementKind;
import org.jboss.tools.ws.jaxrs.core.metamodel.IJaxrsEndpoint;
import org.jboss.tools.ws.jaxrs.core.metamodel.IJaxrsHttpMethod;
import org.jboss.tools.ws.jaxrs.core.metamodel.IJaxrsResource;
@@ -136,7 +136,7 @@
Assert.assertEquals(7, metamodel.getAllResources().size());
for (IJaxrsResource jaxrsResource : metamodel.getAllResources()) {
assertThat(((JaxrsResource) jaxrsResource).getJavaElement(), notNullValue());
- assertThat(((JaxrsResource) jaxrsResource).getKind(), notNullValue());
+ assertThat(((JaxrsResource) jaxrsResource).getElementKind(), notNullValue());
assertThat(jaxrsResource.getAllMethods().size(), greaterThan(0));
}
}
@@ -159,7 +159,7 @@
}
@Test
public void shouldRetrieveApplicationPath() throws CoreException {
- assertThat(metamodel.getApplication().getKind(), equalTo(EnumKind.APPLICATION_WEBXML));
+ assertThat(metamodel.getApplication().getElementKind(), equalTo(EnumElementKind.APPLICATION_WEBXML));
assertThat(metamodel.getApplication().getApplicationPath(), equalTo("/hello"));
}
Modified: trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/validation/JaxrsMetamodelValidatorTestCase.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/validation/JaxrsMetamodelValidatorTestCase.java 2012-07-30 14:56:26 UTC (rev 42786)
+++ trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/validation/JaxrsMetamodelValidatorTestCase.java 2012-07-30 15:15:37 UTC (rev 42787)
@@ -12,8 +12,8 @@
import static org.hamcrest.Matchers.equalTo;
import static org.jboss.tools.ws.jaxrs.core.WorkbenchUtils.getAnnotation;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.HTTP_METHOD;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.PATH;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.HTTP_METHOD;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.PATH;
import static org.junit.Assert.assertThat;
import java.util.List;
Modified: trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/src/org/jboss/tools/ws/jaxrs/core/internal/utils/WtpUtilsTestCase.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/src/org/jboss/tools/ws/jaxrs/core/internal/utils/WtpUtilsTestCase.java 2012-07-30 14:56:26 UTC (rev 42786)
+++ trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/src/org/jboss/tools/ws/jaxrs/core/internal/utils/WtpUtilsTestCase.java 2012-07-30 15:15:37 UTC (rev 42787)
@@ -3,7 +3,7 @@
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.notNullValue;
import static org.hamcrest.Matchers.nullValue;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.APPLICATION;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.APPLICATION;
import static org.junit.Assert.assertThat;
import org.eclipse.core.resources.IResource;
Modified: trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/src/org/jboss/tools/ws/jaxrs/core/jdt/JdtUtilsTestCase.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/src/org/jboss/tools/ws/jaxrs/core/jdt/JdtUtilsTestCase.java 2012-07-30 14:56:26 UTC (rev 42786)
+++ trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/src/org/jboss/tools/ws/jaxrs/core/jdt/JdtUtilsTestCase.java 2012-07-30 15:15:37 UTC (rev 42787)
@@ -20,14 +20,14 @@
import static org.hamcrest.Matchers.notNullValue;
import static org.hamcrest.Matchers.nullValue;
import static org.jboss.tools.ws.jaxrs.core.WorkbenchUtils.getAnnotation;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.CONSUMES;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.ENCODED;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.GET;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.HTTP_METHOD;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.PATH;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.PATH_PARAM;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.PRODUCES;
-import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsElements.RESPONSE;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.CONSUMES;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.ENCODED;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.GET;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.HTTP_METHOD;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.PATH;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.PATH_PARAM;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.PRODUCES;
+import static org.jboss.tools.ws.jaxrs.core.jdt.EnumJaxrsClassname.RESPONSE;
import static org.junit.Assert.assertThat;
import java.util.List;
12 years, 4 months
JBoss Tools SVN: r42786 - trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot.
by jbosstools-commits@lists.jboss.org
Author: rhopp
Date: 2012-07-30 10:56:26 -0400 (Mon, 30 Jul 2012)
New Revision: 42786
Modified:
trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/DocumentationSectionTest.java
Log:
jenking debugging
Modified: trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/DocumentationSectionTest.java
===================================================================
--- trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/DocumentationSectionTest.java 2012-07-30 13:41:43 UTC (rev 42785)
+++ trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/DocumentationSectionTest.java 2012-07-30 14:56:26 UTC (rev 42786)
@@ -21,12 +21,12 @@
@Test
public void documentationSectionTest(){
+ testHyperlinkToBrowser("Wiki");
testHyperlinkToBrowser("New and Noteworthy");
testHyperlinkToBrowser("User Forum");
testHyperlinkToBrowser("Reference");
testHyperlinkToBrowser("Developer Forum");
testHyperlinkToBrowser("FAQ");
- testHyperlinkToBrowser("Wiki");
testHyperlinkToBrowser("Screencasts");
testHyperlinkToBrowser("Issue Tracker");
}
12 years, 4 months
JBoss Tools SVN: r42785 - trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot.
by jbosstools-commits@lists.jboss.org
Author: rhopp
Date: 2012-07-30 09:41:43 -0400 (Mon, 30 Jul 2012)
New Revision: 42785
Modified:
trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CentralAllBotTests.java
trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CreateProjectsWithServerTest.java
Log:
jenkins debugging
Modified: trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CentralAllBotTests.java
===================================================================
--- trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CentralAllBotTests.java 2012-07-30 13:38:26 UTC (rev 42784)
+++ trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CentralAllBotTests.java 2012-07-30 13:41:43 UTC (rev 42785)
@@ -7,7 +7,7 @@
@RunWith(RequirementAwareSuite.class)
@SuiteClasses({
BaseFunctionalityTest.class,
-// CreateProjectsWithServerTest.class,
+ CreateProjectsWithServerTest.class,
// CreateProjectsWithoutServerTest.class
DocumentationSectionTest.class
// EmptyTestForHudson.class
Modified: trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CreateProjectsWithServerTest.java
===================================================================
--- trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CreateProjectsWithServerTest.java 2012-07-30 13:38:26 UTC (rev 42784)
+++ trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CreateProjectsWithServerTest.java 2012-07-30 13:41:43 UTC (rev 42785)
@@ -99,7 +99,7 @@
}*/
}
- @Test
+// @Test
public void createProjectsSectionTest(){
//Dynamic web project
bot.hyperlink(IDELabel.JBossCentralEditor.DYNAMIC_WEB_PROJECT).click();
12 years, 4 months
JBoss Tools SVN: r42784 - workspace/yradtsevich/browsersim/org.jboss.tools.browsersim.app-ant.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2012-07-30 09:38:26 -0400 (Mon, 30 Jul 2012)
New Revision: 42784
Modified:
workspace/yradtsevich/browsersim/org.jboss.tools.browsersim.app-ant/build.xml
Log:
JBIDE-11493https://issues.jboss.org/browse/JBIDE-11493 : Create standalone BrowserSim application
- changed name of result .jar file to browsersim.jar
Modified: workspace/yradtsevich/browsersim/org.jboss.tools.browsersim.app-ant/build.xml
===================================================================
--- workspace/yradtsevich/browsersim/org.jboss.tools.browsersim.app-ant/build.xml 2012-07-30 13:24:39 UTC (rev 42783)
+++ workspace/yradtsevich/browsersim/org.jboss.tools.browsersim.app-ant/build.xml 2012-07-30 13:38:26 UTC (rev 42784)
@@ -63,7 +63,7 @@
<target name="jar">
<mkdir dir="build/jar"/>
<!-- Package cross platform SWT Jar -->
- <swtjar jarfile="build/jar/org.jboss.tools.vpe.browsersim.app.jar" targetmainclass="org.jboss.tools.vpe.browsersim.ui.BrowserSim" swtversion="3.7.2.v3740f">
+ <swtjar jarfile="build/jar/browsersim.jar" targetmainclass="org.jboss.tools.vpe.browsersim.ui.BrowserSim" swtversion="3.7.2.v3740f">
<!-- Application Classes -->
<fileset dir="build/classes" includes="**/*" />
<!-- SWT Jars -->
@@ -72,7 +72,7 @@
</target>
<target name="run">
- <java jar="build/jar/org.jboss.tools.vpe.browsersim.app.jar" fork="true"/>
+ <java jar="build/jar/browsersim.jar" fork="true"/>
</target>
</project>
12 years, 4 months
JBoss Tools SVN: r42783 - trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot.
by jbosstools-commits@lists.jboss.org
Author: rhopp
Date: 2012-07-30 09:24:39 -0400 (Mon, 30 Jul 2012)
New Revision: 42783
Modified:
trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CentralAllBotTests.java
Log:
jenkins debugging
Modified: trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CentralAllBotTests.java
===================================================================
--- trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CentralAllBotTests.java 2012-07-30 13:18:41 UTC (rev 42782)
+++ trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CentralAllBotTests.java 2012-07-30 13:24:39 UTC (rev 42783)
@@ -7,9 +7,9 @@
@RunWith(RequirementAwareSuite.class)
@SuiteClasses({
BaseFunctionalityTest.class,
- CreateProjectsWithServerTest.class,
+// CreateProjectsWithServerTest.class,
// CreateProjectsWithoutServerTest.class
-// DocumentationSectionTest.class
+ DocumentationSectionTest.class
// EmptyTestForHudson.class
// InstallTest.class
})
12 years, 4 months