JBoss Tools SVN: r33093 - branches/jbosstools-3.2.x/documentation/guides/JBDS_Release_Notes/en-US.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2011-07-20 22:28:24 -0400 (Wed, 20 Jul 2011)
New Revision: 33093
Modified:
branches/jbosstools-3.2.x/documentation/guides/JBDS_Release_Notes/en-US/Component_Versions.xml
branches/jbosstools-3.2.x/documentation/guides/JBDS_Release_Notes/en-US/Fixed_Issues.xml
branches/jbosstools-3.2.x/documentation/guides/JBDS_Release_Notes/en-US/Overview.xml
Log:
updated to fix JBDS-1783
Modified: branches/jbosstools-3.2.x/documentation/guides/JBDS_Release_Notes/en-US/Component_Versions.xml
===================================================================
--- branches/jbosstools-3.2.x/documentation/guides/JBDS_Release_Notes/en-US/Component_Versions.xml 2011-07-21 00:35:44 UTC (rev 33092)
+++ branches/jbosstools-3.2.x/documentation/guides/JBDS_Release_Notes/en-US/Component_Versions.xml 2011-07-21 02:28:24 UTC (rev 33093)
@@ -28,7 +28,7 @@
</note>
<important>
<para>
- The Drools Rule editor has been removed from this release. For further information on why this has occurred, see <ulink url="https://issues.jboss.org/browse/JBIDE-9052">JBIDE-9052</ulink>
+ The Guided Drools Rule editor has been removed from this release. For further information on why this has occurred, see <ulink url="https://issues.jboss.org/browse/JBIDE-9052">JBIDE-9052</ulink>
</para>
</important>
</section>
Modified: branches/jbosstools-3.2.x/documentation/guides/JBDS_Release_Notes/en-US/Fixed_Issues.xml
===================================================================
--- branches/jbosstools-3.2.x/documentation/guides/JBDS_Release_Notes/en-US/Fixed_Issues.xml 2011-07-21 00:35:44 UTC (rev 33092)
+++ branches/jbosstools-3.2.x/documentation/guides/JBDS_Release_Notes/en-US/Fixed_Issues.xml 2011-07-21 02:28:24 UTC (rev 33093)
@@ -24,7 +24,7 @@
<itemizedlist>
<listitem>
<para>
- <ulink url="http://jira.jboss.com/jira/browse/JBIDE-3126">JBIDE-3126</ulink>: Validation for the serializablity of injected beans into passive-scoped beans has been added. This ensures that if a bean belongs to <property>@SessionScoped</property>, <property>@ConversationScope</property> or any <property>@NormalScope(passivating=true)</property> and it is not stateful (<property>@Stateful</property>), the bean is checked to see if it implements <classname>java.io.Serializible</classname>. If it does implement the Serializible class, then it is marked as an error.
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-3126">JBIDE-3126</ulink>: Validation for the serializablity of injected beans into passive-scoped beans has been added. This ensures that if a bean belongs to <property>@SessionScoped</property>, <property>@ConversationScope</property> or any <property>@NormalScope(passivating=true)</property> and it is not stateful (<property>@Stateful</property>), the bean is checked to see if it implements <classname>java.io.Serializible</classname>. If it does not implement the Serializible class, then it is marked as an error.
</para>
</listitem>
</itemizedlist>
@@ -328,7 +328,7 @@
<title>General Issues</title>
<para>
<itemizedlist>
- <listitem>
+ <listitem id="JBDS-1268">
<para>
<ulink url="http://jira.jboss.com/jira/browse/JBDS-1268">JBDS-1268</ulink>: The JBoss Developer Studio can now be installed by passing the installer a settings file named <filename>InstallConfigRecord.xml</filename>. To undertake this, setup an <filename>InstallConfigRecord.xml</filename> and run the following on a command line: <code>java -jar jbdevstudio-4.1.0.GA.jar InstallConfigRecord.xml</code>. This allows for an automated and reproducible installation. For further information consult the <emphasis>Getting Started Guide</emphasis>.
</para>
Modified: branches/jbosstools-3.2.x/documentation/guides/JBDS_Release_Notes/en-US/Overview.xml
===================================================================
--- branches/jbosstools-3.2.x/documentation/guides/JBDS_Release_Notes/en-US/Overview.xml 2011-07-21 00:35:44 UTC (rev 33092)
+++ branches/jbosstools-3.2.x/documentation/guides/JBDS_Release_Notes/en-US/Overview.xml 2011-07-21 02:28:24 UTC (rev 33093)
@@ -10,12 +10,12 @@
<itemizedlist>
<listitem>
<para>
- Scriptble install of JBoss Developer Studio 4.1. When installing JBoss Developer Studio 4.1, you can now pass the installation a <filename>InstallConfigRecord.xml</filename> file to install with pre-defined settings, ensuring no user interaction is required. For further details see the release note for JBDS-1268 in the new and fixed issues section of this document, or the <emphasis>Getting Started Guide</emphasis> for this release.
+ Scriptable install of JBoss Developer Studio 4.1. When installing JBoss Developer Studio 4.1, you can now pass the installation a <filename>InstallConfigRecord.xml</filename> file to install with pre-defined settings, ensuring no user interaction is required. For further details see the release note for <xref linkend="JBDS-1268" /> in the new and fixed issues section of this document, or the <emphasis>Getting Started Guide</emphasis> for this release.
</para>
</listitem>
<listitem>
<para>
- Full BPEL Editor support through the JBoss Developer Studio Extras site. The BPEL Editor is now fully supported as an add-on to your basic install of JBoss Developer Studio 4.1. To access this plug-in, add the JBoss Developer Studio Extras site <!-- (insert site here) --> to your installation; see the BPEL User Guide for further information.
+ Full BPEL Editor support through the JBoss Developer Studio Extras site. The BPEL Editor is now fully supported as an add-on to your basic installation of JBoss Developer Studio 4.1. To access this plug-in, add the JBoss Developer Studio Extras site <!-- (insert site here) --> to your installation; see the BPEL User Guide for further information.
</para>
</listitem>
</itemizedlist>
14 years, 8 months
JBoss Tools SVN: r33092 - trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2011-07-20 20:35:44 -0400 (Wed, 20 Jul 2011)
New Revision: 33092
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/CDIProblemMarkerResolutionGenerator.java
Log:
https://issues.jboss.org/browse/JBIDE-7641
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/CDIProblemMarkerResolutionGenerator.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/CDIProblemMarkerResolutionGenerator.java 2011-07-20 23:48:22 UTC (rev 33091)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/CDIProblemMarkerResolutionGenerator.java 2011-07-21 00:35:44 UTC (rev 33092)
@@ -19,6 +19,7 @@
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jdt.core.Flags;
+import org.eclipse.jdt.core.IAnnotatable;
import org.eclipse.jdt.core.IAnnotation;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IField;
@@ -262,10 +263,13 @@
messageId == CDIValidationErrorManager.MISSING_NONBINDING_FOR_ARRAY_VALUE_IN_INTERCEPTOR_BINDING_TYPE_MEMBER_ID ||
messageId == CDIValidationErrorManager.MISSING_NONBINDING_FOR_ARRAY_VALUE_IN_QUALIFIER_TYPE_MEMBER_ID){
IJavaElement element = findJavaElement(file, start);
- if(element instanceof IMember){
- return new IMarkerResolution[] {
- new AddNonbindingAnnotationMarkerResolution((IMember)element)
- };
+ if(element != null){
+ IAnnotation annotation = getAnnotation(element, CDIConstants.NON_BINDING_ANNOTATION_TYPE_NAME);
+ if(element instanceof IMember && annotation == null){
+ return new IMarkerResolution[] {
+ new AddNonbindingAnnotationMarkerResolution((IMember)element)
+ };
+ }
}
}
}
@@ -386,13 +390,9 @@
if(javaElement != null && javaElement instanceof IType){
IType type = (IType)javaElement;
if(!type.isBinary()){
- String shortName = MarkerResolutionUtils.getShortName(annotationQualifiedName);
- IAnnotation[] annotations = type.getAnnotations();
- for(IAnnotation annotation : annotations){
- if(annotation.getElementName().equals(annotationQualifiedName) ||
- annotation.getElementName().equals(shortName))
- return new TypeAndAnnotation(type, annotation);
-
+ IAnnotation annotation = getAnnotation(type, annotationQualifiedName);
+ if(annotation != null){
+ return new TypeAndAnnotation(type, annotation);
}
return new TypeAndAnnotation(type);
}
@@ -483,4 +483,23 @@
return false;
}
+ private IAnnotation getAnnotation(IJavaElement element, String annotationQualifiedName){
+ if(element instanceof IAnnotatable){
+ String shortName = MarkerResolutionUtils.getShortName(annotationQualifiedName);
+ IAnnotation[] annotations;
+ try {
+ annotations = ((IAnnotatable)element).getAnnotations();
+ for(IAnnotation annotation : annotations){
+ if(annotation.getElementName().equals(annotationQualifiedName) ||
+ annotation.getElementName().equals(shortName))
+ return annotation;
+
+ }
+ } catch (JavaModelException e) {
+ CDIUIPlugin.getDefault().logError(e);
+ }
+ }
+ return null;
+ }
+
}
14 years, 8 months
JBoss Tools SVN: r33091 - trunk/cdi/plugins/org.jboss.tools.cdi.ui.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-07-20 19:48:22 -0400 (Wed, 20 Jul 2011)
New Revision: 33091
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/plugin.xml
Log:
JBIDE-9362
https://issues.jboss.org/browse/JBIDE-9362
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/plugin.xml
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/plugin.xml 2011-07-20 23:47:18 UTC (rev 33090)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/plugin.xml 2011-07-20 23:48:22 UTC (rev 33091)
@@ -93,22 +93,6 @@
</extension>
- <extension point="org.eclipse.jdt.ui.javaCompletionProposalComputer"
- id="cdi_el_proposals"
- name="CDI EL Proposals">
- <proposalCategory icon="$nl$/icons/cdi16.png"/>
- </extension>
-
- <extension point="org.eclipse.jdt.ui.javaCompletionProposalComputer"
- id="CDIJavaELCompletionProposalComputer"
- name="CDI EL Java Completion Proposal Computer">
- <javaCompletionProposalComputer
- class="org.jboss.tools.cdi.ui.ca.CDIJavaELProposalComputer"
- categoryId="org.jboss.tools.cdi.ui.cdi_el_proposals"
- activate="true">
- <partition type="__java_string"/>
- </javaCompletionProposalComputer>
- </extension>
<extension
point="org.eclipse.jdt.ui.queryParticipants">
<queryParticipant
14 years, 8 months
JBoss Tools SVN: r33090 - trunk/seam/plugins/org.jboss.tools.seam.ui.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-07-20 19:47:18 -0400 (Wed, 20 Jul 2011)
New Revision: 33090
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml
Log:
JBIDE-9362
https://issues.jboss.org/browse/JBIDE-9362
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml 2011-07-20 23:42:03 UTC (rev 33089)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml 2011-07-20 23:47:18 UTC (rev 33090)
@@ -577,23 +577,6 @@
</factory>
</extension>
- <extension point="org.eclipse.jdt.ui.javaCompletionProposalComputer"
- id="seam_el_proposals"
- name="Seam EL Proposals">
- <proposalCategory icon="$nl$/icons/seam16.png"/>
- </extension>
-
- <extension point="org.eclipse.jdt.ui.javaCompletionProposalComputer"
- id="SeamELCompletionProposalComputer"
- name="Seam EL Completion Proposal Computer">
- <javaCompletionProposalComputer
- class="org.jboss.tools.seam.ui.text.java.SeamELProposalComputer"
- categoryId="org.jboss.tools.seam.ui.seam_el_proposals"
- activate="true">
- <partition type="__java_string"/>
- </javaCompletionProposalComputer>
- </extension>
-
<extension
point="org.eclipse.ui.workbench.texteditor.hyperlinkDetectors">
<hyperlinkDetector
14 years, 8 months
JBoss Tools SVN: r33089 - in trunk/jst/plugins/org.jboss.tools.jst.web.kb: icons and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-07-20 19:42:03 -0400 (Wed, 20 Jul 2011)
New Revision: 33089
Added:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/icons/
trunk/jst/plugins/org.jboss.tools.jst.web.kb/icons/ca/
trunk/jst/plugins/org.jboss.tools.jst.web.kb/icons/ca/el.png
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/el/DefaultKbELProposalProcessor.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/el/KbELProposalComputer.java
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/build.properties
trunk/jst/plugins/org.jboss.tools.jst.web.kb/plugin.xml
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/WebKbPlugin.java
Log:
JBIDE-9362
https://issues.jboss.org/browse/JBIDE-9362
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/build.properties
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/build.properties 2011-07-20 23:35:43 UTC (rev 33088)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/build.properties 2011-07-20 23:42:03 UTC (rev 33089)
@@ -4,7 +4,8 @@
.,\
about.html,\
schema/,\
- taglibs/
+ taglibs/,\
+ icons/
source.. = src/,\
resources/
output.. = bin/
Added: trunk/jst/plugins/org.jboss.tools.jst.web.kb/icons/ca/el.png
===================================================================
(Binary files differ)
Property changes on: trunk/jst/plugins/org.jboss.tools.jst.web.kb/icons/ca/el.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/plugin.xml
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/plugin.xml 2011-07-20 23:35:43 UTC (rev 33088)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/plugin.xml 2011-07-20 23:42:03 UTC (rev 33089)
@@ -274,4 +274,21 @@
</catalogContribution>
</extension>
+ <extension point="org.eclipse.jdt.ui.javaCompletionProposalComputer"
+ id="kb_el_proposals"
+ name="KB EL Proposals">
+ <proposalCategory icon="$nl$/icons/ca/el.png"/>
+ </extension>
+
+ <extension point="org.eclipse.jdt.ui.javaCompletionProposalComputer"
+ id="CDIJavaELCompletionProposalComputer"
+ name="CDI EL Java Completion Proposal Computer">
+ <javaCompletionProposalComputer
+ class="org.jboss.tools.jst.web.kb.el.KbELProposalComputer"
+ categoryId="org.jboss.tools.jst.web.kb.kb_el_proposals"
+ activate="true">
+ <partition type="__java_string"/>
+ </javaCompletionProposalComputer>
+ </extension>
+
</plugin>
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/WebKbPlugin.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/WebKbPlugin.java 2011-07-20 23:35:43 UTC (rev 33088)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/WebKbPlugin.java 2011-07-20 23:42:03 UTC (rev 33089)
@@ -23,6 +23,8 @@
// The plug-in ID
public static final String PLUGIN_ID = "org.jboss.tools.jst.web.kb"; //$NON-NLS-1$
+ public static final String CA_KB_IMAGE_PATH = "icons/ca/el.gif"; //$NON-NLS-1$
+
// The shared instance
private static WebKbPlugin plugin;
Added: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/el/DefaultKbELProposalProcessor.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/el/DefaultKbELProposalProcessor.java (rev 0)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/el/DefaultKbELProposalProcessor.java 2011-07-20 23:42:03 UTC (rev 33089)
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jst.web.kb.el;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.swt.graphics.Image;
+import org.jboss.tools.jst.web.kb.IKbProject;
+import org.jboss.tools.jst.web.kb.KbProjectFactory;
+import org.jboss.tools.jst.web.kb.WebKbPlugin;
+
+public class DefaultKbELProposalProcessor extends KbELProposalProcessor {
+ public static final Image KB_PROPOSAL_IMAGE =
+ WebKbPlugin.getDefault().getImage(WebKbPlugin.CA_KB_IMAGE_PATH);
+
+ public DefaultKbELProposalProcessor() {
+ }
+
+ @Override
+ protected boolean isEnabled(IFile file) {
+ IProject project = (file == null ? null : file.getProject());
+ IKbProject kb = KbProjectFactory.getKbProject(project, false, true);
+ return kb != null;
+ }
+
+ @Override
+ protected Image getImage() {
+ return KB_PROPOSAL_IMAGE;
+ }
+
+}
Property changes on: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/el/DefaultKbELProposalProcessor.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/el/KbELProposalComputer.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/el/KbELProposalComputer.java (rev 0)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/el/KbELProposalComputer.java 2011-07-20 23:42:03 UTC (rev 33089)
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jst.web.kb.el;
+
+import org.jboss.tools.common.el.ui.ca.ELProposalProcessor;
+import org.jboss.tools.common.el.ui.ca.JavaELProposalComputer;
+
+public class KbELProposalComputer extends JavaELProposalComputer {
+ DefaultKbELProposalProcessor processor = new DefaultKbELProposalProcessor();
+
+ @Override
+ protected ELProposalProcessor getELProcessor() {
+ return processor;
+ }
+
+}
Property changes on: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/el/KbELProposalComputer.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
14 years, 8 months
JBoss Tools SVN: r33088 - trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2011-07-20 19:35:43 -0400 (Wed, 20 Jul 2011)
New Revision: 33088
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/ChangeRetentionAnnotationMarkerResolution.java
Log:
https://issues.jboss.org/browse/JBIDE-7631
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/ChangeRetentionAnnotationMarkerResolution.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/ChangeRetentionAnnotationMarkerResolution.java 2011-07-20 23:35:03 UTC (rev 33087)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/ChangeRetentionAnnotationMarkerResolution.java 2011-07-20 23:35:43 UTC (rev 33088)
@@ -50,6 +50,8 @@
ICompilationUnit original = type.getCompilationUnit();
ICompilationUnit compilationUnit = original.getWorkingCopy(new NullProgressMonitor());
+ MarkerResolutionUtils.addImport(CDIConstants.RETENTION_ANNOTATION_TYPE_NAME, compilationUnit);
+
MarkerResolutionUtils.addImport(CDIConstants.RETENTION_POLICY_RUNTIME_TYPE_NAME, compilationUnit, true);
IAnnotation workingCopyAnnotation = MarkerResolutionUtils.findWorkingCopy(compilationUnit, annotation);
14 years, 8 months
JBoss Tools SVN: r33087 - trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2011-07-20 19:35:03 -0400 (Wed, 20 Jul 2011)
New Revision: 33087
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/ChangeTargetAnnotationMarkerResolution.java
Log:
https://issues.jboss.org/browse/JBIDE-7632, https://issues.jboss.org/browse/JBIDE-7633, https://issues.jboss.org/browse/JBIDE-7630
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/ChangeTargetAnnotationMarkerResolution.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/ChangeTargetAnnotationMarkerResolution.java 2011-07-20 22:58:24 UTC (rev 33086)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/ChangeTargetAnnotationMarkerResolution.java 2011-07-20 23:35:03 UTC (rev 33087)
@@ -58,6 +58,8 @@
ICompilationUnit original = type.getCompilationUnit();
ICompilationUnit compilationUnit = original.getWorkingCopy(new NullProgressMonitor());
+ MarkerResolutionUtils.addImport(CDIConstants.TARGET_ANNOTATION_TYPE_NAME, compilationUnit);
+
for(String qualifiedName : qualifiedNames){
MarkerResolutionUtils.addImport(qualifiedName, compilationUnit, true);
}
14 years, 8 months
JBoss Tools SVN: r33086 - in trunk/cdi: plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2011-07-20 18:58:24 -0400 (Wed, 20 Jul 2011)
New Revision: 33086
Added:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/AddNonbindingAnnotationMarkerResolution.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/AAnnotation.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestInterceptor1.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestInterceptor1.qfxresult
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestInterceptor2.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestInterceptor2.qfxresult
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestQualifier5.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestQualifier5.qfxresult
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestQualifier6.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestQualifier6.qfxresult
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIValidationErrorManager.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.properties
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/AddRetentionAnnotationMarkerResolution.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/AddTargetAnnotationMarkerResolution.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/CDIProblemMarkerResolutionGenerator.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/ChangeRetentionAnnotationMarkerResolution.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/ChangeTargetAnnotationMarkerResolution.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MakeInjectedPointUnambiguousMarkerResolution.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MarkerResolutionUtils.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/SelectBeanMarkerResolution.java
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/marker/CDIMarkerResolutionTest.java
Log:
https://issues.jboss.org/browse/JBIDE-7641
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2011-07-20 22:49:54 UTC (rev 33085)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2011-07-20 22:58:24 UTC (rev 33086)
@@ -2319,7 +2319,13 @@
* 9.5.2. Interceptor binding types with members
* array-valued or annotation-valued member of an interceptor binding type is not annotated @Nonbinding (Non-Portable behavior)
*/
- validateAnnotationMembers(binding, CDIValidationMessages.MISSING_NONBINDING_FOR_ARRAY_VALUE_IN_INTERCEPTOR_BINDING_TYPE_MEMBER, CDIValidationMessages.MISSING_NONBINDING_FOR_ANNOTATION_VALUE_IN_INTERCEPTOR_BINDING_TYPE_MEMBER, CDIPreferences.MISSING_NONBINDING_IN_INTERCEPTOR_BINDING_TYPE_MEMBER);
+ validateAnnotationMembers(
+ binding,
+ CDIValidationMessages.MISSING_NONBINDING_FOR_ARRAY_VALUE_IN_INTERCEPTOR_BINDING_TYPE_MEMBER,
+ CDIValidationMessages.MISSING_NONBINDING_FOR_ANNOTATION_VALUE_IN_INTERCEPTOR_BINDING_TYPE_MEMBER,
+ CDIPreferences.MISSING_NONBINDING_IN_INTERCEPTOR_BINDING_TYPE_MEMBER,
+ MISSING_NONBINDING_FOR_ARRAY_VALUE_IN_INTERCEPTOR_BINDING_TYPE_MEMBER_ID,
+ MISSING_NONBINDING_FOR_ANNOTATION_VALUE_IN_INTERCEPTOR_BINDING_TYPE_MEMBER_ID);
try {
annotationValidator.validateInterceptorBindingAnnotationTypeAnnotations(binding);
@@ -2345,7 +2351,13 @@
* 5.2.5. Qualifier annotations with members
* - array-valued or annotation-valued member of a qualifier type is not annotated @Nonbinding (Non-Portable behavior)
*/
- validateAnnotationMembers(qualifier, CDIValidationMessages.MISSING_NONBINDING_FOR_ARRAY_VALUE_IN_QUALIFIER_TYPE_MEMBER, CDIValidationMessages.MISSING_NONBINDING_FOR_ANNOTATION_VALUE_IN_QUALIFIER_TYPE_MEMBER, CDIPreferences.MISSING_NONBINDING_IN_QUALIFIER_TYPE_MEMBER);
+ validateAnnotationMembers(
+ qualifier,
+ CDIValidationMessages.MISSING_NONBINDING_FOR_ARRAY_VALUE_IN_QUALIFIER_TYPE_MEMBER,
+ CDIValidationMessages.MISSING_NONBINDING_FOR_ANNOTATION_VALUE_IN_QUALIFIER_TYPE_MEMBER,
+ CDIPreferences.MISSING_NONBINDING_IN_QUALIFIER_TYPE_MEMBER,
+ MISSING_NONBINDING_FOR_ARRAY_VALUE_IN_QUALIFIER_TYPE_MEMBER_ID,
+ MISSING_NONBINDING_FOR_ANNOTATION_VALUE_IN_QUALIFIER_TYPE_MEMBER_ID);
/*
* Qualifier annotation type should be annotated with @Target({METHOD, FIELD, PARAMETER, TYPE})
@@ -2357,7 +2369,7 @@
}
}
- void validateAnnotationMembers(ICDIAnnotation annotation, String arrayMessageErrorKey, String annotationValueErrorKey, String preferencesKey) {
+ void validateAnnotationMembers(ICDIAnnotation annotation, String arrayMessageErrorKey, String annotationValueErrorKey, String preferencesKey, int arrayMessageId, int annotationValueId) {
IType type = annotation.getSourceType();
try {
IMethod[] methods = type.getMethods();
@@ -2367,7 +2379,7 @@
if(kind == Signature.ARRAY_TYPE_SIGNATURE) {
if(!annotation.getNonBindingMethods().contains(method)) {
ITextSourceReference reference = CDIUtil.convertToSourceReference(method.getNameRange(), annotation.getResource());
- addError(arrayMessageErrorKey, preferencesKey, reference, annotation.getResource());
+ addError(arrayMessageErrorKey, preferencesKey, reference, annotation.getResource(), arrayMessageId);
}
} else if(kind == Signature.CLASS_TYPE_SIGNATURE) {
String typeName = Signature.getSignatureSimpleName(returnTypeSignature);
@@ -2382,7 +2394,7 @@
if(memberType!=null && memberType.isAnnotation()) {
if(!annotation.getNonBindingMethods().contains(method)) {
ITextSourceReference reference = CDIUtil.convertToSourceReference(method.getNameRange(), annotation.getResource());
- addError(annotationValueErrorKey, preferencesKey, reference, annotation.getResource());
+ addError(annotationValueErrorKey, preferencesKey, reference, annotation.getResource(), annotationValueId);
}
}
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIValidationErrorManager.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIValidationErrorManager.java 2011-07-20 22:49:54 UTC (rev 33085)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIValidationErrorManager.java 2011-07-20 22:58:24 UTC (rev 33086)
@@ -35,7 +35,12 @@
public static final int MISSING_TARGET_ANNOTATION_IN_QUALIFIER_TYPE_ID = 14;
public static final int MISSING_TARGET_ANNOTATION_IN_STEREOTYPE_TYPE_ID = 15;
public static final int MISSING_TARGET_ANNOTATION_IN_SCOPE_TYPE_ID = 16;
+ public static final int MISSING_NONBINDING_FOR_ANNOTATION_VALUE_IN_QUALIFIER_TYPE_MEMBER_ID = 17;
+ public static final int MISSING_NONBINDING_FOR_ARRAY_VALUE_IN_QUALIFIER_TYPE_MEMBER_ID = 18;
+ public static final int MISSING_NONBINDING_FOR_ANNOTATION_VALUE_IN_INTERCEPTOR_BINDING_TYPE_MEMBER_ID = 19;
+ public static final int MISSING_NONBINDING_FOR_ARRAY_VALUE_IN_INTERCEPTOR_BINDING_TYPE_MEMBER_ID = 20;
+
/*
* (non-Javadoc)
* @see org.jboss.tools.jst.web.kb.internal.validation.ValidationErrorManager#getPreference(org.eclipse.core.resources.IProject, java.lang.String)
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.java 2011-07-20 22:49:54 UTC (rev 33085)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.java 2011-07-20 22:58:24 UTC (rev 33086)
@@ -107,6 +107,7 @@
public static String CHANGE_RETENTION_MARKER_RESOLUTION_TITLE;
public static String ADD_TARGET_MARKER_RESOLUTION_TITLE;
public static String CHANGE_TARGET_MARKER_RESOLUTION_TITLE;
+ public static String ADD_NONBINDING_MARKER_RESOLUTION_TITLE;
public static String QUESTION;
public static String DECREASING_FIELD_VISIBILITY_MAY_CAUSE_COMPILATION_PROBLEMS;
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.properties
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.properties 2011-07-20 22:49:54 UTC (rev 33085)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.properties 2011-07-20 22:58:24 UTC (rev 33086)
@@ -91,6 +91,7 @@
CHANGE_RETENTION_MARKER_RESOLUTION_TITLE=Change ''{0}'' annotation to @Retention(RUNTIME)
ADD_TARGET_MARKER_RESOLUTION_TITLE=Add @Target({0}) annotation to ''{1}'' class
CHANGE_TARGET_MARKER_RESOLUTION_TITLE=Change ''{0}'' annotation to @Target({1})
+ADD_NONBINDING_MARKER_RESOLUTION_TITLE=Add @Nonbinding annotation to ''{0}'' member
QUESTION=Question
DECREASING_FIELD_VISIBILITY_MAY_CAUSE_COMPILATION_PROBLEMS=Decreasing field visibility may cause compilation problems. Do you want to continue?
Added: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/AddNonbindingAnnotationMarkerResolution.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/AddNonbindingAnnotationMarkerResolution.java (rev 0)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/AddNonbindingAnnotationMarkerResolution.java 2011-07-20 22:58:24 UTC (rev 33086)
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.cdi.ui.marker;
+
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.IMember;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.IMarkerResolution2;
+import org.jboss.tools.cdi.core.CDIConstants;
+import org.jboss.tools.cdi.ui.CDIUIMessages;
+import org.jboss.tools.cdi.ui.CDIUIPlugin;
+
+public class AddNonbindingAnnotationMarkerResolution implements
+ IMarkerResolution2 {
+ private IMember member;
+ private String label;
+
+ public AddNonbindingAnnotationMarkerResolution(IMember member){
+ this.member = member;
+ label = NLS.bind(CDIUIMessages.ADD_NONBINDING_MARKER_RESOLUTION_TITLE, member.getElementName());
+ }
+
+ public String getLabel() {
+ return label;
+ }
+
+ public void run(IMarker marker) {
+ try{
+ ICompilationUnit original = member.getCompilationUnit();
+ ICompilationUnit compilationUnit = original.getWorkingCopy(new NullProgressMonitor());
+
+ MarkerResolutionUtils.addAnnotation(CDIConstants.NON_BINDING_ANNOTATION_TYPE_NAME, compilationUnit, member);
+
+ compilationUnit.commitWorkingCopy(false, new NullProgressMonitor());
+ compilationUnit.discardWorkingCopy();
+ }catch(CoreException ex){
+ CDIUIPlugin.getDefault().logError(ex);
+ }
+ }
+
+ public String getDescription() {
+ return label;
+ }
+
+ public Image getImage() {
+ return null;
+ }
+}
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/AddNonbindingAnnotationMarkerResolution.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/AddRetentionAnnotationMarkerResolution.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/AddRetentionAnnotationMarkerResolution.java 2011-07-20 22:49:54 UTC (rev 33085)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/AddRetentionAnnotationMarkerResolution.java 2011-07-20 22:58:24 UTC (rev 33086)
@@ -15,7 +15,6 @@
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IType;
-import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.graphics.Image;
import org.eclipse.ui.IMarkerResolution2;
@@ -44,10 +43,8 @@
MarkerResolutionUtils.addImport(CDIConstants.RETENTION_POLICY_RUNTIME_TYPE_NAME, compilationUnit, true);
- IType workingCopyType = MarkerResolutionUtils.findWorkingCopyType(compilationUnit, type);
+ MarkerResolutionUtils.addAnnotation(CDIConstants.RETENTION_ANNOTATION_TYPE_NAME, compilationUnit, type, "(RUNTIME)");
- MarkerResolutionUtils.addAnnotation(CDIConstants.RETENTION_ANNOTATION_TYPE_NAME, compilationUnit, workingCopyType, "(RUNTIME)");
-
compilationUnit.commitWorkingCopy(false, new NullProgressMonitor());
compilationUnit.discardWorkingCopy();
}catch(CoreException ex){
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/AddTargetAnnotationMarkerResolution.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/AddTargetAnnotationMarkerResolution.java 2011-07-20 22:49:54 UTC (rev 33085)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/AddTargetAnnotationMarkerResolution.java 2011-07-20 22:58:24 UTC (rev 33086)
@@ -51,10 +51,8 @@
MarkerResolutionUtils.addImport(qualifiedName, compilationUnit, true);
}
- IType workingCopyType = MarkerResolutionUtils.findWorkingCopyType(compilationUnit, type);
+ MarkerResolutionUtils.addAnnotation(CDIConstants.TARGET_ANNOTATION_TYPE_NAME, compilationUnit, type, "("+totalList+")");
- MarkerResolutionUtils.addAnnotation(CDIConstants.TARGET_ANNOTATION_TYPE_NAME, compilationUnit, workingCopyType, "("+totalList+")");
-
compilationUnit.commitWorkingCopy(false, new NullProgressMonitor());
compilationUnit.discardWorkingCopy();
}catch(CoreException ex){
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/CDIProblemMarkerResolutionGenerator.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/CDIProblemMarkerResolutionGenerator.java 2011-07-20 22:49:54 UTC (rev 33085)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/CDIProblemMarkerResolutionGenerator.java 2011-07-20 22:58:24 UTC (rev 33086)
@@ -23,6 +23,7 @@
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IField;
import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.IMember;
import org.eclipse.jdt.core.IMethod;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaModelException;
@@ -256,6 +257,16 @@
}
}
+ }else if(messageId == CDIValidationErrorManager.MISSING_NONBINDING_FOR_ANNOTATION_VALUE_IN_INTERCEPTOR_BINDING_TYPE_MEMBER_ID ||
+ messageId == CDIValidationErrorManager.MISSING_NONBINDING_FOR_ANNOTATION_VALUE_IN_QUALIFIER_TYPE_MEMBER_ID ||
+ messageId == CDIValidationErrorManager.MISSING_NONBINDING_FOR_ARRAY_VALUE_IN_INTERCEPTOR_BINDING_TYPE_MEMBER_ID ||
+ messageId == CDIValidationErrorManager.MISSING_NONBINDING_FOR_ARRAY_VALUE_IN_QUALIFIER_TYPE_MEMBER_ID){
+ IJavaElement element = findJavaElement(file, start);
+ if(element instanceof IMember){
+ return new IMarkerResolution[] {
+ new AddNonbindingAnnotationMarkerResolution((IMember)element)
+ };
+ }
}
}
return new IMarkerResolution[] {};
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/ChangeRetentionAnnotationMarkerResolution.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/ChangeRetentionAnnotationMarkerResolution.java 2011-07-20 22:49:54 UTC (rev 33085)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/ChangeRetentionAnnotationMarkerResolution.java 2011-07-20 22:58:24 UTC (rev 33086)
@@ -52,12 +52,11 @@
MarkerResolutionUtils.addImport(CDIConstants.RETENTION_POLICY_RUNTIME_TYPE_NAME, compilationUnit, true);
- IAnnotation workingCopyAnnotation = MarkerResolutionUtils.findWorkingCopyAnnotation(compilationUnit, type, annotation);
+ IAnnotation workingCopyAnnotation = MarkerResolutionUtils.findWorkingCopy(compilationUnit, annotation);
IBuffer buffer = compilationUnit.getBuffer();
String shortName = MarkerResolutionUtils.getShortName(CDIConstants.RETENTION_ANNOTATION_TYPE_NAME);
-
buffer.replace(workingCopyAnnotation.getSourceRange().getOffset(), workingCopyAnnotation.getSourceRange().getLength(), MarkerResolutionUtils.AT+shortName+"(RUNTIME)");
compilationUnit.commitWorkingCopy(false, new NullProgressMonitor());
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/ChangeTargetAnnotationMarkerResolution.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/ChangeTargetAnnotationMarkerResolution.java 2011-07-20 22:49:54 UTC (rev 33085)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/ChangeTargetAnnotationMarkerResolution.java 2011-07-20 22:58:24 UTC (rev 33086)
@@ -62,7 +62,7 @@
MarkerResolutionUtils.addImport(qualifiedName, compilationUnit, true);
}
- IAnnotation workingCopyAnnotation = MarkerResolutionUtils.findWorkingCopyAnnotation(compilationUnit, type, annotation);
+ IAnnotation workingCopyAnnotation = MarkerResolutionUtils.findWorkingCopy(compilationUnit, annotation);
IBuffer buffer = compilationUnit.getBuffer();
String shortName = MarkerResolutionUtils.getShortName(CDIConstants.TARGET_ANNOTATION_TYPE_NAME);
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MakeInjectedPointUnambiguousMarkerResolution.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MakeInjectedPointUnambiguousMarkerResolution.java 2011-07-20 22:49:54 UTC (rev 33085)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MakeInjectedPointUnambiguousMarkerResolution.java 2011-07-20 22:58:24 UTC (rev 33086)
@@ -111,7 +111,7 @@
}
}
- MarkerResolutionUtils.addQualifiersToInjectedPoint(injectionPoint, selectedBean);
+ MarkerResolutionUtils.addQualifiersToInjectionPoint(injectionPoint, selectedBean);
}
private boolean checkBeans(){
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MarkerResolutionUtils.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MarkerResolutionUtils.java 2011-07-20 22:49:54 UTC (rev 33085)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MarkerResolutionUtils.java 2011-07-20 22:58:24 UTC (rev 33086)
@@ -37,7 +37,6 @@
import org.eclipse.jdt.core.ITypeParameter;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.core.Signature;
-import org.eclipse.jdt.core.SourceRange;
import org.jboss.tools.cdi.core.CDIConstants;
import org.jboss.tools.cdi.core.IBean;
import org.jboss.tools.cdi.core.IInjectionPoint;
@@ -158,27 +157,37 @@
return false;
}
- public static void addAnnotation(String qualifiedName, ICompilationUnit compilationUnit, IType element) throws JavaModelException{
+ public static void addAnnotation(String qualifiedName, ICompilationUnit compilationUnit, IMember element) throws JavaModelException{
addAnnotation(qualifiedName, compilationUnit, element, "");
}
- public static void addAnnotation(String qualifiedName, ICompilationUnit compilationUnit, IType element, String params) throws JavaModelException{
- IAnnotation annotation = getAnnotation(element, qualifiedName);
+ public static void addAnnotation(String qualifiedName, ICompilationUnit compilationUnit, IMember element, String params) throws JavaModelException{
+ IMember workingCopyMember = findWorkingCopy(compilationUnit, element);
+ if(workingCopyMember == null)
+ return;
+
+ IAnnotation annotation = getAnnotation(workingCopyMember, qualifiedName);
if(annotation != null && annotation.exists())
return;
boolean duplicateShortName = addImport(qualifiedName, compilationUnit);
- String lineDelim = compilationUnit.findRecommendedLineSeparator();
-
IBuffer buffer = compilationUnit.getBuffer();
String shortName = getShortName(qualifiedName);
if(duplicateShortName)
shortName = qualifiedName;
- buffer.replace(element.getSourceRange().getOffset(), 0, AT+shortName+params+lineDelim);
+ String str = AT+shortName+params;
+ if(workingCopyMember instanceof IType){
+ str += compilationUnit.findRecommendedLineSeparator();
+ }else{
+ str += SPACE;
+ }
+
+ buffer.replace(workingCopyMember.getSourceRange().getOffset(), 0, str);
+
synchronized(compilationUnit) {
compilationUnit.reconcile(ICompilationUnit.NO_AST, true, null, null);
}
@@ -358,7 +367,7 @@
for(ILocalVariable parameter : method.getParameters()){
if(parameter.getElementName().equals(paramName)){
- return new SourceRange(parameter.getSourceRange().getOffset(), parameter.getSourceRange().getLength());
+ return parameter.getSourceRange();
}
}
}catch(JavaModelException ex){
@@ -367,7 +376,7 @@
return null;
}
- public static void addQualifiersToInjectedPoint(IInjectionPoint injectionPoint, IBean bean){
+ public static void addQualifiersToInjectionPoint(IInjectionPoint injectionPoint, IBean bean){
try{
ICompilationUnit original = injectionPoint.getClassBean().getBeanClass().getCompilationUnit();
ICompilationUnit compilationUnit = original.getWorkingCopy(new NullProgressMonitor());
@@ -407,15 +416,12 @@
ICompilationUnit original = EclipseUtil.getCompilationUnit(file);
ICompilationUnit compilationUnit = original.getWorkingCopy(new NullProgressMonitor());
- IType type = compilationUnit.findPrimaryType();
- if(type != null){
- for(IQualifier qualifier : deployed){
- String qualifierName = qualifier.getSourceType().getFullyQualifiedName();
- if(!qualifierName.equals(CDIConstants.ANY_QUALIFIER_TYPE_NAME) && !qualifierName.equals(CDIConstants.DEFAULT_QUALIFIER_TYPE_NAME)){
- MarkerResolutionUtils.addAnnotation(qualifier.getSourceType().getFullyQualifiedName(), compilationUnit, type);
- }
-
+ for(IQualifier qualifier : deployed){
+ String qualifierName = qualifier.getSourceType().getFullyQualifiedName();
+ if(!qualifierName.equals(CDIConstants.ANY_QUALIFIER_TYPE_NAME) && !qualifierName.equals(CDIConstants.DEFAULT_QUALIFIER_TYPE_NAME)){
+ MarkerResolutionUtils.addAnnotation(qualifier.getSourceType().getFullyQualifiedName(), compilationUnit, bean.getBeanClass());
}
+
}
compilationUnit.commitWorkingCopy(false, new NullProgressMonitor());
@@ -485,20 +491,26 @@
return null;
}
- public static IType findWorkingCopyType(ICompilationUnit compilationUnit, IType type) throws JavaModelException{
- for(IType t : compilationUnit.getAllTypes()){
- if(t.getFullyQualifiedName().equals(type.getFullyQualifiedName()))
- return t;
+ @SuppressWarnings("unchecked")
+ public static <T extends IJavaElement> T findWorkingCopy(ICompilationUnit compilationUnit, T element) throws JavaModelException{
+ if(element instanceof IAnnotation){
+ IJavaElement parent = findWorkingCopy(compilationUnit, element.getParent());
+ if(parent instanceof IAnnotatable){
+ for(IAnnotation a : ((IAnnotatable)parent).getAnnotations()){
+ if(a.getElementName().equals(element.getElementName()))
+ return (T)a;
+ }
+ }
+ }else{
+ IJavaElement[] elements = compilationUnit.findElements(element);
+ if(elements != null){
+ for(IJavaElement e : elements){
+ if(e.getClass().equals(element.getClass()))
+ return (T)e;
+ }
+ }
}
return null;
}
- public static IAnnotation findWorkingCopyAnnotation(ICompilationUnit compilationUnit, IType type, IAnnotation annotation) throws JavaModelException{
- IType workingCopyType = findWorkingCopyType(compilationUnit, type);
- for(IAnnotation a : workingCopyType.getAnnotations()){
- if(a.getElementName().equals(annotation.getElementName()))
- return a;
- }
- return null;
- }
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/SelectBeanMarkerResolution.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/SelectBeanMarkerResolution.java 2011-07-20 22:49:54 UTC (rev 33085)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/SelectBeanMarkerResolution.java 2011-07-20 22:58:24 UTC (rev 33086)
@@ -110,7 +110,7 @@
break;
}
}
- MarkerResolutionUtils.addQualifiersToInjectedPoint(injectionPoint, selectedBean);
+ MarkerResolutionUtils.addQualifiersToInjectionPoint(injectionPoint, selectedBean);
}
public String getDescription() {
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/AAnnotation.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/AAnnotation.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/AAnnotation.java 2011-07-20 22:58:24 UTC (rev 33086)
@@ -0,0 +1,5 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+@interface AAnnotation {
+
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/AAnnotation.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestInterceptor1.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestInterceptor1.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestInterceptor1.java 2011-07-20 22:58:24 UTC (rev 33086)
@@ -0,0 +1,19 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.interceptor.InterceptorBinding;
+
+@Inherited
+@InterceptorBinding
+@Target( { TYPE, METHOD })
+@Retention(RUNTIME)
+public @interface TestInterceptor1 {
+ AAnnotation abc();
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestInterceptor1.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestInterceptor1.qfxresult
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestInterceptor1.qfxresult (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestInterceptor1.qfxresult 2011-07-20 22:58:24 UTC (rev 33086)
@@ -0,0 +1,20 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.interceptor.InterceptorBinding;
+import javax.enterprise.util.Nonbinding;
+
+@Inherited
+@InterceptorBinding
+@Target( { TYPE, METHOD })
+@Retention(RUNTIME)
+public @interface TestInterceptor1 {
+ @Nonbinding AAnnotation abc();
+}
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestInterceptor2.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestInterceptor2.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestInterceptor2.java 2011-07-20 22:58:24 UTC (rev 33086)
@@ -0,0 +1,19 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.interceptor.InterceptorBinding;
+
+@Inherited
+@InterceptorBinding
+@Target( { TYPE, METHOD })
+@Retention(RUNTIME)
+public @interface TestInterceptor2 {
+ String[] abc();
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestInterceptor2.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestInterceptor2.qfxresult
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestInterceptor2.qfxresult (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestInterceptor2.qfxresult 2011-07-20 22:58:24 UTC (rev 33086)
@@ -0,0 +1,20 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.interceptor.InterceptorBinding;
+import javax.enterprise.util.Nonbinding;
+
+@Inherited
+@InterceptorBinding
+@Target( { TYPE, METHOD })
+@Retention(RUNTIME)
+public @interface TestInterceptor2 {
+ @Nonbinding String[] abc();
+}
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestQualifier5.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestQualifier5.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestQualifier5.java 2011-07-20 22:58:24 UTC (rev 33086)
@@ -0,0 +1,21 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.PARAMETER;
+
+@Retention(RUNTIME)
+@Target({TYPE, METHOD, FIELD, PARAMETER})
+@Documented
+@Qualifier
+public @interface TestQualifier5 {
+ AAnnotation abc();
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestQualifier5.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestQualifier5.qfxresult
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestQualifier5.qfxresult (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestQualifier5.qfxresult 2011-07-20 22:58:24 UTC (rev 33086)
@@ -0,0 +1,22 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import javax.enterprise.util.Nonbinding;
+
+@Retention(RUNTIME)
+@Target({TYPE, METHOD, FIELD, PARAMETER})
+@Documented
+@Qualifier
+public @interface TestQualifier5 {
+ @Nonbinding AAnnotation abc();
+}
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestQualifier6.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestQualifier6.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestQualifier6.java 2011-07-20 22:58:24 UTC (rev 33086)
@@ -0,0 +1,20 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.PARAMETER;
+
+@Retention(RUNTIME)
+@Target({TYPE, METHOD, FIELD, PARAMETER})
+@Documented
+@Qualifier
+public @interface TestQualifier6 {
+ String[] abc();
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestQualifier6.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestQualifier6.qfxresult
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestQualifier6.qfxresult (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestQualifier6.qfxresult 2011-07-20 22:58:24 UTC (rev 33086)
@@ -0,0 +1,21 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import javax.enterprise.util.Nonbinding;
+
+@Retention(RUNTIME)
+@Target({TYPE, METHOD, FIELD, PARAMETER})
+@Documented
+@Qualifier
+public @interface TestQualifier6 {
+ @Nonbinding String[] abc();
+}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/marker/CDIMarkerResolutionTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/marker/CDIMarkerResolutionTest.java 2011-07-20 22:49:54 UTC (rev 33085)
+++ trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/marker/CDIMarkerResolutionTest.java 2011-07-20 22:58:24 UTC (rev 33086)
@@ -28,6 +28,7 @@
import org.jboss.tools.cdi.internal.core.validation.CDICoreValidator;
import org.jboss.tools.cdi.internal.core.validation.CDIValidationErrorManager;
import org.jboss.tools.cdi.ui.marker.AddLocalBeanMarkerResolution;
+import org.jboss.tools.cdi.ui.marker.AddNonbindingAnnotationMarkerResolution;
import org.jboss.tools.cdi.ui.marker.AddRetentionAnnotationMarkerResolution;
import org.jboss.tools.cdi.ui.marker.AddSerializableInterfaceMarkerResolution;
import org.jboss.tools.cdi.ui.marker.AddTargetAnnotationMarkerResolution;
@@ -548,5 +549,61 @@
CDIValidationErrorManager.MISSING_TARGET_ANNOTATION_IN_SCOPE_TYPE_ID,
ChangeTargetAnnotationMarkerResolution.class);
}
+
+ public void testAddNonbindingToAnnotationMemberOfQualifierResolution() throws CoreException{
+ checkResolution(tckProject,
+ new String[]{
+ "JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/TestQualifier5.java"
+ },
+ new String[]{
+ "JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/TestQualifier5.qfxresult"
+ },
+ CDICoreValidator.PROBLEM_TYPE,
+ CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
+ CDIValidationErrorManager.MISSING_NONBINDING_FOR_ANNOTATION_VALUE_IN_QUALIFIER_TYPE_MEMBER_ID,
+ AddNonbindingAnnotationMarkerResolution.class);
+ }
+ public void testAddNonbindingToArrayMemberOfQualifierResolution() throws CoreException{
+ checkResolution(tckProject,
+ new String[]{
+ "JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/TestQualifier6.java"
+ },
+ new String[]{
+ "JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/TestQualifier6.qfxresult"
+ },
+ CDICoreValidator.PROBLEM_TYPE,
+ CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
+ CDIValidationErrorManager.MISSING_NONBINDING_FOR_ARRAY_VALUE_IN_QUALIFIER_TYPE_MEMBER_ID,
+ AddNonbindingAnnotationMarkerResolution.class);
+ }
+
+ public void testAddNonbindingToAnnotationMemberOfInterceptorResolution() throws CoreException{
+ checkResolution(tckProject,
+ new String[]{
+ "JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/TestInterceptor1.java"
+ },
+ new String[]{
+ "JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/TestInterceptor1.qfxresult"
+ },
+ CDICoreValidator.PROBLEM_TYPE,
+ CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
+ CDIValidationErrorManager.MISSING_NONBINDING_FOR_ANNOTATION_VALUE_IN_INTERCEPTOR_BINDING_TYPE_MEMBER_ID,
+ AddNonbindingAnnotationMarkerResolution.class);
+ }
+
+ public void testAddNonbindingToArrayMemberOfInterceptorResolution() throws CoreException{
+ checkResolution(tckProject,
+ new String[]{
+ "JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/TestInterceptor2.java"
+ },
+ new String[]{
+ "JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/TestInterceptor2.qfxresult"
+ },
+ CDICoreValidator.PROBLEM_TYPE,
+ CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
+ CDIValidationErrorManager.MISSING_NONBINDING_FOR_ARRAY_VALUE_IN_INTERCEPTOR_BINDING_TYPE_MEMBER_ID,
+ AddNonbindingAnnotationMarkerResolution.class);
+ }
+
}
\ No newline at end of file
14 years, 8 months
JBoss Tools SVN: r33085 - trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/validation.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2011-07-20 18:49:54 -0400 (Wed, 20 Jul 2011)
New Revision: 33085
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/validation/ValidationUtil.java
Log:
https://issues.jboss.org/browse/JBIDE-9329
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/validation/ValidationUtil.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/validation/ValidationUtil.java 2011-07-20 22:48:45 UTC (rev 33084)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/validation/ValidationUtil.java 2011-07-20 22:49:54 UTC (rev 33085)
@@ -33,6 +33,10 @@
* @return
*/
public static boolean checkFileExtensionForJavaAndXml(IFile file) {
- return EXTNS.contains(file.getFileExtension());
+ String ext = file.getFileExtension();
+ if(ext!=null) {
+ ext = ext.toLowerCase();
+ }
+ return EXTNS.contains(ext);
}
}
\ No newline at end of file
14 years, 8 months
JBoss Tools SVN: r33084 - in trunk/cdi/tests/org.jboss.tools.cdi.core.test: resources/tck/tests/jbt/lookup and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2011-07-20 18:48:45 -0400 (Wed, 20 Jul 2011)
New Revision: 33084
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/lookup/
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/lookup/AdvancedPaymentProcessor.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/lookup/AlternativePaymentProcessor.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/lookup/AsynchronousPaymentProcessor.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/lookup/NonBinding.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/lookup/ObtainsInstanceBean.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/lookup/PayBy.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/lookup/PayByBinding.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/lookup/PaymentInterceptor.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/lookup/PaymentProcessor.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/lookup/PaymentProcessorImpl.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/lookup/RemotePaymentProcessor.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/lookup/SimplePaymentProcessor.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/lookup/SynchronousPaymentProcessor.java
Removed:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/DynamicLookupTest.java
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreAllTests.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/lookup/DynamicLookupTest.java
Log:
https://issues.jboss.org/browse/JBIDE-9329
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/lookup/AdvancedPaymentProcessor.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/lookup/AdvancedPaymentProcessor.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/lookup/AdvancedPaymentProcessor.java 2011-07-20 22:48:45 UTC (rev 33084)
@@ -0,0 +1,38 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.jbt.lookup;
+
+import javax.enterprise.context.ApplicationScoped;
+
+import org.jboss.jsr299.tck.tests.jbt.lookup.PayBy.PaymentMethod;
+
+(a)PayBy(PaymentMethod.CHEQUE)
+@ApplicationScoped
+class AdvancedPaymentProcessor implements AsynchronousPaymentProcessor
+{
+ private int value = 0;
+
+ public int getValue()
+ {
+ return value;
+ }
+
+ public void setValue(int value)
+ {
+ this.value = value;
+ }
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/lookup/AdvancedPaymentProcessor.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/lookup/AlternativePaymentProcessor.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/lookup/AlternativePaymentProcessor.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/lookup/AlternativePaymentProcessor.java 2011-07-20 22:48:45 UTC (rev 33084)
@@ -0,0 +1,10 @@
+package org.jboss.jsr299.tck.tests.jbt.lookup;
+
+import javax.enterprise.inject.Alternative;
+
+@Alternative
+public class AlternativePaymentProcessor extends PaymentProcessorImpl {
+
+ public AlternativePaymentProcessor() {
+ }
+}
\ No newline at end of file
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/lookup/AlternativePaymentProcessor.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/lookup/AsynchronousPaymentProcessor.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/lookup/AsynchronousPaymentProcessor.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/lookup/AsynchronousPaymentProcessor.java 2011-07-20 22:48:45 UTC (rev 33084)
@@ -0,0 +1,23 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.jbt.lookup;
+
+interface AsynchronousPaymentProcessor extends PaymentProcessor
+{
+ int getValue();
+ void setValue(int value);
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/lookup/AsynchronousPaymentProcessor.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/lookup/NonBinding.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/lookup/NonBinding.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/lookup/NonBinding.java 2011-07-20 22:48:45 UTC (rev 33084)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.jbt.lookup;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+@interface NonBinding
+{
+
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/lookup/NonBinding.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/lookup/ObtainsInstanceBean.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/lookup/ObtainsInstanceBean.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/lookup/ObtainsInstanceBean.java 2011-07-20 22:48:45 UTC (rev 33084)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.jbt.lookup;
+
+import static org.jboss.jsr299.tck.tests.jbt.lookup.PayBy.PaymentMethod.CHEQUE;
+
+import javax.enterprise.inject.Any;
+import javax.enterprise.inject.Instance;
+import javax.inject.Inject;
+
+class ObtainsInstanceBean {
+ @Inject @PayBy(CHEQUE) Instance<AsynchronousPaymentProcessor> paymentProcessor;
+
+ @Inject @Any Instance<PaymentProcessor> anyPaymentProcessor;
+
+ @Inject @Any PaymentProcessor anyPaymentProcessorBroken;
+
+ @Inject PaymentProcessor defaultPaymentProcessor;
+
+ public Instance<AsynchronousPaymentProcessor> getPaymentProcessor() {
+ return paymentProcessor;
+ }
+
+ public Instance<PaymentProcessor> getAnyPaymentProcessor() {
+ return anyPaymentProcessor;
+ }
+}
\ No newline at end of file
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/lookup/ObtainsInstanceBean.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/lookup/PayBy.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/lookup/PayBy.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/lookup/PayBy.java 2011-07-20 22:48:45 UTC (rev 33084)
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.jbt.lookup;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+@Qualifier
+@interface PayBy
+{
+ public static enum PaymentMethod { CASH, CHEQUE, CREDIT_CARD };
+
+ PaymentMethod value();
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/lookup/PayBy.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/lookup/PayByBinding.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/lookup/PayByBinding.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/lookup/PayByBinding.java 2011-07-20 22:48:45 UTC (rev 33084)
@@ -0,0 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.jbt.lookup;
+
+import javax.enterprise.util.AnnotationLiteral;
+
+abstract class PayByBinding extends AnnotationLiteral<PayBy> implements PayBy
+{
+
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/lookup/PayByBinding.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/lookup/PaymentInterceptor.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/lookup/PaymentInterceptor.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/lookup/PaymentInterceptor.java 2011-07-20 22:48:45 UTC (rev 33084)
@@ -0,0 +1,17 @@
+package org.jboss.jsr299.tck.tests.jbt.lookup;
+
+import javax.interceptor.AroundInvoke;
+import javax.interceptor.Interceptor;
+import javax.interceptor.InvocationContext;
+
+@Interceptor
+public class PaymentInterceptor implements PaymentProcessor {
+
+ public PaymentInterceptor() {
+ }
+
+ @AroundInvoke
+ public Object manage(InvocationContext ic) throws Exception {
+ return null;
+ }
+}
\ No newline at end of file
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/lookup/PaymentInterceptor.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/lookup/PaymentProcessor.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/lookup/PaymentProcessor.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/lookup/PaymentProcessor.java 2011-07-20 22:48:45 UTC (rev 33084)
@@ -0,0 +1,21 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.jbt.lookup;
+
+interface PaymentProcessor
+{
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/lookup/PaymentProcessor.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/lookup/PaymentProcessorImpl.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/lookup/PaymentProcessorImpl.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/lookup/PaymentProcessorImpl.java 2011-07-20 22:48:45 UTC (rev 33084)
@@ -0,0 +1,7 @@
+package org.jboss.jsr299.tck.tests.jbt.lookup;
+
+public class PaymentProcessorImpl implements PaymentProcessor {
+
+ public PaymentProcessorImpl() {
+ }
+}
\ No newline at end of file
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/lookup/PaymentProcessorImpl.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/lookup/RemotePaymentProcessor.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/lookup/RemotePaymentProcessor.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/lookup/RemotePaymentProcessor.java 2011-07-20 22:48:45 UTC (rev 33084)
@@ -0,0 +1,38 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.jbt.lookup;
+
+import javax.enterprise.context.ApplicationScoped;
+
+import org.jboss.jsr299.tck.tests.jbt.lookup.PayBy.PaymentMethod;
+
+@ApplicationScoped
+(a)PayBy(PaymentMethod.CREDIT_CARD)
+class RemotePaymentProcessor implements AsynchronousPaymentProcessor
+{
+ private int value = 0;
+
+ public int getValue()
+ {
+ return value;
+ }
+
+ public void setValue(int value)
+ {
+ this.value = value;
+ }
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/lookup/RemotePaymentProcessor.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/lookup/SimplePaymentProcessor.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/lookup/SimplePaymentProcessor.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/lookup/SimplePaymentProcessor.java 2011-07-20 22:48:45 UTC (rev 33084)
@@ -0,0 +1,29 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.jbt.lookup;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.enterprise.inject.Alternative;
+
+import org.jboss.jsr299.tck.tests.jbt.lookup.PayBy.PaymentMethod;
+
+(a)PayBy(PaymentMethod.CASH)
+@ApplicationScoped
+@Alternative
+class SimplePaymentProcessor extends PaymentProcessorImpl implements SynchronousPaymentProcessor
+{
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/lookup/SimplePaymentProcessor.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/lookup/SynchronousPaymentProcessor.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/lookup/SynchronousPaymentProcessor.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/lookup/SynchronousPaymentProcessor.java 2011-07-20 22:48:45 UTC (rev 33084)
@@ -0,0 +1,21 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.jbt.lookup;
+
+interface SynchronousPaymentProcessor extends PaymentProcessor
+{
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/lookup/SynchronousPaymentProcessor.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreAllTests.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreAllTests.java 2011-07-20 20:15:07 UTC (rev 33083)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreAllTests.java 2011-07-20 22:48:45 UTC (rev 33084)
@@ -25,7 +25,6 @@
import org.jboss.tools.cdi.core.test.tck.BuiltInBeanInjectionTest;
import org.jboss.tools.cdi.core.test.tck.DecoratorDefinitionTest;
import org.jboss.tools.cdi.core.test.tck.DefaultNamedTest;
-import org.jboss.tools.cdi.core.test.tck.DynamicLookupTest;
import org.jboss.tools.cdi.core.test.tck.EnterpriseQualifierDefinitionTest;
import org.jboss.tools.cdi.core.test.tck.EnterpriseResolutionByTypeTest;
import org.jboss.tools.cdi.core.test.tck.EnterpriseScopeDefinitionTest;
@@ -43,6 +42,7 @@
import org.jboss.tools.cdi.core.test.tck.StereotypeInheritenceTest;
import org.jboss.tools.cdi.core.test.tck.lookup.AmbiguousDependencyTest;
import org.jboss.tools.cdi.core.test.tck.lookup.CircularDependencyTest;
+import org.jboss.tools.cdi.core.test.tck.lookup.DynamicLookupTest;
import org.jboss.tools.cdi.core.test.tck.lookup.ResolutionByNameTest;
import org.jboss.tools.cdi.core.test.tck.lookup.ResolutionByTypeTest;
import org.jboss.tools.cdi.core.test.tck.lookup.UnsatisfiedDependencyTest;
@@ -88,7 +88,6 @@
suite.addTestSuite(EnterpriseResolutionByTypeTest.class);
suite.addTestSuite(AssignabilityOfRawAndParameterizedTypesTest.class);
suite.addTestSuite(QualifierWithMembersTest.class);
- suite.addTestSuite(DynamicLookupTest.class);
suite.addTestSuite(InterceptorDefinitionTest.class);
suite.addTestSuite(DecoratorDefinitionTest.class);
suite.addTestSuite(ObserverMethodResolutionTest.class);
Deleted: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/DynamicLookupTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/DynamicLookupTest.java 2011-07-20 20:15:07 UTC (rev 33083)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/DynamicLookupTest.java 2011-07-20 22:48:45 UTC (rev 33084)
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.cdi.core.test.tck;
-
-import java.util.Set;
-
-import org.eclipse.core.runtime.CoreException;
-import org.jboss.tools.cdi.core.IBean;
-import org.jboss.tools.cdi.core.IInjectionPointField;
-
-/**
- * @author Alexey Kazakov
- */
-public class DynamicLookupTest extends TCKTest {
-
- /**
- * Section 5.6 - Programmatic lookup
- * @throws CoreException
- */
- public void testObtainsInjectsInstance() throws CoreException {
- IInjectionPointField injection = getInjectionPointField("JavaSource/org/jboss/jsr299/tck/tests/lookup/dynamic/ObtainsInstanceBean.java", "paymentProcessor");
- Set<IBean> beans = cdiProject.getBeans(true, injection);
- assertContainsBeanClass(beans, "org.jboss.jsr299.tck.tests.lookup.dynamic.AdvancedPaymentProcessor");
- }
-
- /**
- * Section 5.6 - Programmatic lookup
- * @throws CoreException
- */
- public void testObtainsAmbiguousInjectsInstance() throws CoreException {
- IInjectionPointField injection = getInjectionPointField("JavaSource/org/jboss/jsr299/tck/tests/lookup/dynamic/ObtainsInstanceBean.java", "anyPaymentProcessor");
- Set<IBean> beans = cdiProject.getBeans(true, injection);
- assertContainsBeanClasses(beans, "org.jboss.jsr299.tck.tests.lookup.dynamic.AdvancedPaymentProcessor", "org.jboss.jsr299.tck.tests.lookup.dynamic.SimplePaymentProcessor", "org.jboss.jsr299.tck.tests.lookup.dynamic.RemotePaymentProcessor");
- }
-}
\ No newline at end of file
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/lookup/DynamicLookupTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/lookup/DynamicLookupTest.java 2011-07-20 20:15:07 UTC (rev 33083)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/lookup/DynamicLookupTest.java 2011-07-20 22:48:45 UTC (rev 33084)
@@ -23,16 +23,24 @@
public class DynamicLookupTest extends TCKTest {
/**
- * section 5.6 aa)
- * @throws CoreException
+ * Section 5.6 - Programmatic lookup
+ * @throws CoreException
*/
- public void testObtainsInjectsInstanceOfInstance() throws CoreException {
- IInjectionPointField injectionPoint = getInjectionPointField("JavaSource/org/jboss/jsr299/tck/tests/lookup/dynamic/ObtainsInstanceBean.java", "paymentProcessor");
- Set<IBean> beans = cdiProject.getBeans(false, injectionPoint);
+ public void testObtainsInjectsInstance() throws CoreException {
+ IInjectionPointField injection = getInjectionPointField("JavaSource/org/jboss/jsr299/tck/tests/lookup/dynamic/ObtainsInstanceBean.java", "paymentProcessor");
+ Set<IBean> beans = cdiProject.getBeans(true, injection);
assertEquals(1, beans.size());
+ assertContainsBeanClass(beans, "org.jboss.jsr299.tck.tests.lookup.dynamic.AdvancedPaymentProcessor");
+ }
- injectionPoint = getInjectionPointField("JavaSource/org/jboss/jsr299/tck/tests/lookup/dynamic/ObtainsInstanceBean.java", "anyPaymentProcessor");
- beans = cdiProject.getBeans(false, injectionPoint);
+ /**
+ * Section 5.6 - Programmatic lookup
+ * @throws CoreException
+ */
+ public void testObtainsAmbiguousInjectsInstance() throws CoreException {
+ IInjectionPointField injection = getInjectionPointField("JavaSource/org/jboss/jsr299/tck/tests/lookup/dynamic/ObtainsInstanceBean.java", "anyPaymentProcessor");
+ Set<IBean> beans = cdiProject.getBeans(true, injection);
assertEquals(3, beans.size());
+ assertContainsBeanClasses(beans, "org.jboss.jsr299.tck.tests.lookup.dynamic.AdvancedPaymentProcessor", "org.jboss.jsr299.tck.tests.lookup.dynamic.SimplePaymentProcessor", "org.jboss.jsr299.tck.tests.lookup.dynamic.RemotePaymentProcessor");
}
}
\ No newline at end of file
14 years, 8 months