JBoss Tools SVN: r33274 - in trunk/cdi: plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2011-07-27 17:19:13 -0400 (Wed, 27 Jul 2011)
New Revision: 33274
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestDisposerProducerMethod.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestObserverProducerMethod.java
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/marker/CDIProblemMarkerResolutionGenerator.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-7665
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-27 21:12:09 UTC (rev 33273)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2011-07-27 21:19:13 UTC (rev 33274)
@@ -1264,13 +1264,13 @@
if (observesDeclarations.size() > 1) {
for (ITextSourceReference declaration : observesDeclarations) {
addError(CDIValidationMessages.PRODUCER_PARAMETER_ILLEGALLY_ANNOTATED_OBSERVES, CDIPreferences.PRODUCER_PARAMETER_ILLEGALLY_ANNOTATED,
- declaration, producer.getResource());
+ declaration, producer.getResource(), PRODUCER_PARAMETER_ILLEGALLY_ANNOTATED_OBSERVES_ID);
}
}
if (disposalDeclarations.size() > 1) {
for (ITextSourceReference declaration : disposalDeclarations) {
addError(CDIValidationMessages.PRODUCER_PARAMETER_ILLEGALLY_ANNOTATED_DISPOSES, CDIPreferences.PRODUCER_PARAMETER_ILLEGALLY_ANNOTATED,
- declaration, producer.getResource());
+ declaration, producer.getResource(), PRODUCER_PARAMETER_ILLEGALLY_ANNOTATED_DISPOSES_ID);
}
}
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-27 21:12:09 UTC (rev 33273)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIValidationErrorManager.java 2011-07-27 21:19:13 UTC (rev 33274)
@@ -54,6 +54,8 @@
public static final int STEREOTYPE_IS_ANNOTATED_TYPED_ID = 33;
public static final int INTERCEPTOR_ANNOTATED_SPECIALIZES_ID = 34;
public static final int DECORATOR_ANNOTATED_SPECIALIZES_ID = 35;
+ public static final int PRODUCER_PARAMETER_ILLEGALLY_ANNOTATED_DISPOSES_ID = 36;
+ public static final int PRODUCER_PARAMETER_ILLEGALLY_ANNOTATED_OBSERVES_ID = 37;
/*
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-27 21:12:09 UTC (rev 33273)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/CDIProblemMarkerResolutionGenerator.java 2011-07-27 21:19:13 UTC (rev 33274)
@@ -372,6 +372,30 @@
new DeleteAnnotationMarkerResolution(ta.type, CDIConstants.SPECIALIZES_ANNOTATION_TYPE_NAME)
};
}
+ }else if(messageId == CDIValidationErrorManager.PRODUCER_PARAMETER_ILLEGALLY_ANNOTATED_DISPOSES_ID){
+ IJavaElement element = findJavaElement(file, start);
+ if(element != null){
+ IJavaElement producerElement = findJavaElementByAnnotation(element, CDIConstants.PRODUCES_ANNOTATION_TYPE_NAME);
+ IJavaElement disposerElement = findJavaElementByAnnotation(element, CDIConstants.DISPOSES_ANNOTATION_TYPE_NAME);
+ if(producerElement != null && disposerElement != null){
+ return new IMarkerResolution[] {
+ new DeleteAnnotationMarkerResolution(producerElement, CDIConstants.PRODUCES_ANNOTATION_TYPE_NAME),
+ new DeleteAnnotationMarkerResolution(disposerElement, CDIConstants.DISPOSES_ANNOTATION_TYPE_NAME)
+ };
+ }
+ }
+ }else if(messageId == CDIValidationErrorManager.PRODUCER_PARAMETER_ILLEGALLY_ANNOTATED_OBSERVES_ID){
+ IJavaElement element = findJavaElement(file, start);
+ if(element != null){
+ IJavaElement producerElement = findJavaElementByAnnotation(element, CDIConstants.PRODUCES_ANNOTATION_TYPE_NAME);
+ IJavaElement observerElement = findJavaElementByAnnotation(element, CDIConstants.OBSERVERS_ANNOTATION_TYPE_NAME);
+ if(producerElement != null && observerElement != null){
+ return new IMarkerResolution[] {
+ new DeleteAnnotationMarkerResolution(producerElement, CDIConstants.PRODUCES_ANNOTATION_TYPE_NAME),
+ new DeleteAnnotationMarkerResolution(observerElement, CDIConstants.OBSERVERS_ANNOTATION_TYPE_NAME)
+ };
+ }
+ }
}
}
return new IMarkerResolution[] {};
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestDisposerProducerMethod.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestDisposerProducerMethod.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestDisposerProducerMethod.java 2011-07-27 21:19:13 UTC (rev 33274)
@@ -0,0 +1,11 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+import javax.enterprise.inject.Disposes;
+import javax.enterprise.inject.Produces;
+
+public class TestDisposerProducerMethod {
+ @Produces
+ public String produceString(@Disposes String aaa){
+ return "test";
+ }
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestDisposerProducerMethod.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestObserverProducerMethod.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestObserverProducerMethod.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestObserverProducerMethod.java 2011-07-27 21:19:13 UTC (rev 33274)
@@ -0,0 +1,11 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+import javax.enterprise.event.Observes;
+import javax.enterprise.inject.Produces;
+
+public class TestObserverProducerMethod {
+ @Produces
+ public String produceString(@Observes String aa){
+ return "test";
+ }
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestObserverProducerMethod.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
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-27 21:12:09 UTC (rev 33273)
+++ trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/marker/CDIMarkerResolutionTest.java 2011-07-27 21:19:13 UTC (rev 33274)
@@ -825,4 +825,26 @@
CDIValidationErrorManager.INTERCEPTOR_ANNOTATED_SPECIALIZES_ID,
DeleteAnnotationMarkerResolution.class);
}
+
+ public void testDisposerInProducerResolution() throws CoreException{
+ checkResolution(tckProject,
+ new String[]{
+ "JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/TestDisposerProducerMethod.java"
+ },
+ CDICoreValidator.PROBLEM_TYPE,
+ CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
+ CDIValidationErrorManager.PRODUCER_PARAMETER_ILLEGALLY_ANNOTATED_DISPOSES_ID,
+ DeleteAnnotationMarkerResolution.class);
+ }
+
+ public void testObserverInProducerResolution() throws CoreException{
+ checkResolution(tckProject,
+ new String[]{
+ "JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/TestObserverProducerMethod.java"
+ },
+ CDICoreValidator.PROBLEM_TYPE,
+ CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
+ CDIValidationErrorManager.PRODUCER_PARAMETER_ILLEGALLY_ANNOTATED_OBSERVES_ID,
+ DeleteAnnotationMarkerResolution.class);
+ }
}
\ No newline at end of file
13 years, 6 months
JBoss Tools SVN: r33273 - trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/ca.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-07-27 17:12:09 -0400 (Wed, 27 Jul 2011)
New Revision: 33273
Modified:
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/ca/AbstractELCompletionEngine.java
Log:
JBIDE-9087
https://issues.jboss.org/browse/JBIDE-9087
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/ca/AbstractELCompletionEngine.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/ca/AbstractELCompletionEngine.java 2011-07-27 21:11:36 UTC (rev 33272)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/ca/AbstractELCompletionEngine.java 2011-07-27 21:12:09 UTC (rev 33273)
@@ -495,7 +495,11 @@
// JBIDE-512, JBIDE-2541 related changes ===>>>
TypeInfoCollector.MemberInfo bijectedAttribute = null;
- JavaMemberELSegmentImpl segment = new JavaMemberELSegmentImpl(operand.getFirstToken());
+ LexicalToken t = operand.getFirstToken();
+ if(t != null && t != operand.getLastToken() && operand.getLastToken() != null) {
+ t = t.getCombinedToken(operand.getLastToken());
+ }
+ JavaMemberELSegmentImpl segment = new JavaMemberELSegmentImpl(t);
segment.setResolved(true);
resolution.addSegment(segment);
@@ -556,6 +560,21 @@
for (V var : resolvedVariables) {
TypeInfoCollector.MemberInfo member = getMemberInfoByVariable(var, returnEqualedVariablesOnly, offset);
if (member != null && !members.contains(member)) {
+ String name = var.getName();
+ if(name.indexOf('.') >= 0) {
+ LexicalToken last = expr.getFirstToken();
+ StringBuffer sb = new StringBuffer();
+ sb.append(last.getText());
+ while(!name.equals(sb.toString()) && last != null) {
+ last = last.getNextToken();
+ if(last != null) {
+ sb.append(last.getText());
+ }
+ }
+ if(last != null && name.equals(sb.toString())) {
+ segment = new JavaMemberELSegmentImpl(expr.getFirstToken().getCombinedToken(last));
+ }
+ }
members.add(member);
segment.setMemberInfo(member);
segment.getVariables().add(var);
13 years, 6 months
JBoss Tools SVN: r33272 - trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-07-27 17:11:36 -0400 (Wed, 27 Jul 2011)
New Revision: 33272
Modified:
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/LexicalToken.java
Log:
JBIDE-9087
https://issues.jboss.org/browse/JBIDE-9087
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/LexicalToken.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/LexicalToken.java 2011-07-27 21:01:01 UTC (rev 33271)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/LexicalToken.java 2011-07-27 21:11:36 UTC (rev 33272)
@@ -159,6 +159,7 @@
sb.append(t.getText());
t = t.getNextToken();
}
+ if(t != null) sb.append(t.getText());
LexicalToken token = new LexicalToken(this.start, last.getStart() + last.getLength() - start, sb.toString(), this.type);
token.previous = this.previous;
token.next = last.next;
13 years, 6 months
JBoss Tools SVN: r33271 - trunk/jsf/features/org.jboss.tools.richfaces.feature.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-07-27 17:01:01 -0400 (Wed, 27 Jul 2011)
New Revision: 33271
Modified:
trunk/jsf/features/org.jboss.tools.richfaces.feature/feature.xml
Log:
JBIDE-9410 apply patch so that instead of including org.jboss.tools.xulrunner.initializer, we require it
Modified: trunk/jsf/features/org.jboss.tools.richfaces.feature/feature.xml
===================================================================
--- trunk/jsf/features/org.jboss.tools.richfaces.feature/feature.xml 2011-07-27 20:48:40 UTC (rev 33270)
+++ trunk/jsf/features/org.jboss.tools.richfaces.feature/feature.xml 2011-07-27 21:01:01 UTC (rev 33271)
@@ -18,6 +18,11 @@
Red Hat, Inc. licenses these features and plugins to you under certain open source licenses (or aggregations of such licenses), which in a particular case may include the Eclipse Public License, the GNU Lesser General Public License, and/or certain other open source licenses. For precise licensing details, consult the corresponding source code, or contact Red Hat Legal Affairs, 1801 Varsity Drive, Raleigh NC 27606 USA.
</license>
+
+ <requires>
+ <import plugin="org.jboss.tools.xulrunner.initializer" version="3.1.0" match="greaterOrEqual"/>
+ </requires>
+
<plugin
id="org.jboss.tools.common"
download-size="0"
@@ -333,12 +338,5 @@
version="0.0.0"
unpack="false"/>
- <plugin
- id="org.jboss.tools.xulrunner.initializer"
- download-size="0"
- install-size="0"
- version="0.0.0"
- fragment="true"
- unpack="false"/>
</feature>
13 years, 6 months
JBoss Tools SVN: r33270 - trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/src/org/jboss/tools/jsf/text/ext/test.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2011-07-27 16:48:40 -0400 (Wed, 27 Jul 2011)
New Revision: 33270
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/src/org/jboss/tools/jsf/text/ext/test/JSF2MessagesOpenOnTest.java
Log:
JBIDE-9416
org.jboss.tools.jsf test failure
JUnit test case org.jboss.tools.jsf.text.ext.test.JSF2MessagesOpenOnTest.testJSF2MessagesHyperlink() is fixed
Modified: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/src/org/jboss/tools/jsf/text/ext/test/JSF2MessagesOpenOnTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/src/org/jboss/tools/jsf/text/ext/test/JSF2MessagesOpenOnTest.java 2011-07-27 20:46:25 UTC (rev 33269)
+++ trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/src/org/jboss/tools/jsf/text/ext/test/JSF2MessagesOpenOnTest.java 2011-07-27 20:48:40 UTC (rev 33270)
@@ -52,16 +52,16 @@
public void testJSF2MessagesHyperlink() throws Exception{
ArrayList<TestRegion> regionList = new ArrayList<TestRegion>();
- regionList.add(new TestRegion(881, 13, new TestHyperlink[]{new TestHyperlink(ELHyperlink.class, "Open 'resources'", "resources.properties")}));
+ regionList.add(new TestRegion(881, 13, new TestHyperlink[]{new TestHyperlink(ELHyperlink.class, "Open bundle 'resources'", "resources.properties")}));
regionList.add(new TestRegion(896, 5, new TestHyperlink[]{new TestHyperlink(ELHyperlink.class, "Open property 'prompt' of bundle 'resources'", "resources.properties")}));
- regionList.add(new TestRegion(1004, 13, new TestHyperlink[]{new TestHyperlink(ELHyperlink.class, "Open 'resources'", "resources.properties")}));
+ regionList.add(new TestRegion(1004, 13, new TestHyperlink[]{new TestHyperlink(ELHyperlink.class, "Open bundle 'resources'", "resources.properties")}));
regionList.add(new TestRegion(1019, 25, new TestHyperlink[]{new TestHyperlink(ELHyperlink.class, "Open property 'demo.long.named.property' of bundle 'resources'", "resources.properties")}));
- regionList.add(new TestRegion(1078, 7, new TestHyperlink[]{new TestHyperlink(ELHyperlink.class, "Open 'resources'", "resources.properties")}));
+ regionList.add(new TestRegion(1078, 7, new TestHyperlink[]{new TestHyperlink(ELHyperlink.class, "Open bundle 'resources'", "resources.properties")}));
regionList.add(new TestRegion(1087, 5, new TestHyperlink[]{new TestHyperlink(ELHyperlink.class, "Open property 'prompt' of bundle 'resources'", "resources.properties")}));
- regionList.add(new TestRegion(1125, 7, new TestHyperlink[]{new TestHyperlink(ELHyperlink.class, "Open 'resources'", "resources.properties")}));
+ regionList.add(new TestRegion(1125, 7, new TestHyperlink[]{new TestHyperlink(ELHyperlink.class, "Open bundle 'resources'", "resources.properties")}));
regionList.add(new TestRegion(1134, 25, new TestHyperlink[]{new TestHyperlink(ELHyperlink.class, "Open property 'demo.long.named.property' of bundle 'resources'", "resources.properties")}));
JSFHyperlinkTestUtil.checkRegions(project, PAGE_NAME, regionList, new ELHyperlinkDetector());
13 years, 6 months
JBoss Tools SVN: r33269 - in trunk: common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2011-07-27 16:46:25 -0400 (Wed, 27 Jul 2011)
New Revision: 33269
Modified:
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/ElCoreMessages.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/messages.properties
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/MessagePropertyELSegmentImpl.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/JSFMessageELCompletionEngine.java
Log:
JBIDE-9087
Support of Bundles bean in CDI projects with Seam International module.
Text labels are fixed for Messages EL hyperlinks
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/ElCoreMessages.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/ElCoreMessages.java 2011-07-27 19:31:12 UTC (rev 33268)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/ElCoreMessages.java 2011-07-27 20:46:25 UTC (rev 33269)
@@ -34,6 +34,9 @@
public static String RENAME_MESSAGE_PROPERTY_PROCESSOR_CAN_NOT_FIND_MESSAGE_PROPERTY;
public static String Open;
+ public static String OpenBundle;
+ public static String OpenBundleProperty;
+
static {
// initialize resource bundle
NLS.initializeMessages(BUNDLE_NAME, ElCoreMessages.class);
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/messages.properties
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/messages.properties 2011-07-27 19:31:12 UTC (rev 33268)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/messages.properties 2011-07-27 20:46:25 UTC (rev 33269)
@@ -27,3 +27,6 @@
RENAME_MESSAGE_PROPERTY_PROCESSOR_CAN_NOT_FIND_MESSAGE_PROPERTY=Can not find message: ''{0}''.
Open=Open ''{0}''
+
+OpenBundle=Open bundle ''{0}''
+OpenBundleProperty=Open property ''{0}'' of bundle ''{1}''
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/MessagePropertyELSegmentImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/MessagePropertyELSegmentImpl.java 2011-07-27 19:31:12 UTC (rev 33268)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/MessagePropertyELSegmentImpl.java 2011-07-27 20:46:25 UTC (rev 33269)
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010 Red Hat, Inc.
+ * Copyright (c) 2010-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,
@@ -10,12 +10,15 @@
******************************************************************************/
package org.jboss.tools.common.el.core.resolver;
+import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
import org.eclipse.swt.graphics.Image;
+import org.jboss.tools.common.el.core.ElCoreMessages;
+import org.jboss.tools.common.el.core.ca.AbstractELCompletionEngine;
import org.jboss.tools.common.el.core.parser.LexicalToken;
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.util.FindObjectHelper;
@@ -110,8 +113,17 @@
public String getLabel() {
XModelObject p = o;
while(p != null && p.getFileType() < XModelObject.FILE) p = p.getParent();
+
+ // Improve label - add a locale for a resource bundle
+ String baseName = getBaseName();
+ String propertyName = isBundle() ? null : AbstractELCompletionEngine.trimQuotes(getToken().getText());
+ if (propertyName == null)
+ return MessageFormat.format(ElCoreMessages.OpenBundle, baseName);
+
+ return MessageFormat.format(ElCoreMessages.OpenBundleProperty, propertyName, baseName);
+
//improve label - now it returns file name, with locale
- return p.getAttributeValue("name");
+// return p.getAttributeValue("name");
}
@Override
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/JSFMessageELCompletionEngine.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/JSFMessageELCompletionEngine.java 2011-07-27 19:31:12 UTC (rev 33268)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/JSFMessageELCompletionEngine.java 2011-07-27 20:46:25 UTC (rev 33269)
@@ -547,10 +547,11 @@
segment.setMessagePropertySourceReference(h.getStart(), name.length());
IFile propFile = (IFile)p.getAdapter(IFile.class);
- if(propFile == null)
- continue;
- segment.setMessageBundleResource(propFile);
+ if(propFile != null)
+ segment.setMessageBundleResource(propFile);
}
+ segment.setBaseName(variable.basename);
+ segment.setBundleOnlySegment(false);
}
}
}
13 years, 6 months
JBoss Tools SVN: r33268 - 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-27 15:31:12 -0400 (Wed, 27 Jul 2011)
New Revision: 33268
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestDecorator4.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestDecorator4.qfxresult
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestInterceptor6.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestInterceptor6.qfxresult
Removed:
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
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/CDIProblemMarkerResolutionGenerator.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-7686
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-27 19:01:06 UTC (rev 33267)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2011-07-27 19:31:12 UTC (rev 33268)
@@ -758,9 +758,9 @@
IAnnotationDeclaration specializesDeclaration = bean.getSpecializesAnnotationDeclaration();
if(specializesDeclaration!=null) {
if(bean instanceof IDecorator) {
- addError(CDIValidationMessages.DECORATOR_ANNOTATED_SPECIALIZES, CDIPreferences.INTERCEPTOR_ANNOTATED_SPECIALIZES, specializesDeclaration, bean.getResource());
+ addError(CDIValidationMessages.DECORATOR_ANNOTATED_SPECIALIZES, CDIPreferences.INTERCEPTOR_ANNOTATED_SPECIALIZES, specializesDeclaration, bean.getResource(), DECORATOR_ANNOTATED_SPECIALIZES_ID);
} else if(bean instanceof IInterceptor) {
- addError(CDIValidationMessages.INTERCEPTOR_ANNOTATED_SPECIALIZES, CDIPreferences.INTERCEPTOR_ANNOTATED_SPECIALIZES, specializesDeclaration, bean.getResource());
+ addError(CDIValidationMessages.INTERCEPTOR_ANNOTATED_SPECIALIZES, CDIPreferences.INTERCEPTOR_ANNOTATED_SPECIALIZES, specializesDeclaration, bean.getResource(), INTERCEPTOR_ANNOTATED_SPECIALIZES_ID);
}
}
IBean specializedBean = bean.getSpecializedBean();
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-27 19:01:06 UTC (rev 33267)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIValidationErrorManager.java 2011-07-27 19:31:12 UTC (rev 33268)
@@ -52,6 +52,8 @@
public static final int INTERCEPTOR_HAS_NAME_ID = 31;
public static final int DECORATOR_HAS_NAME_ID = 32;
public static final int STEREOTYPE_IS_ANNOTATED_TYPED_ID = 33;
+ public static final int INTERCEPTOR_ANNOTATED_SPECIALIZES_ID = 34;
+ public static final int DECORATOR_ANNOTATED_SPECIALIZES_ID = 35;
/*
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-27 19:01:06 UTC (rev 33267)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.java 2011-07-27 19:31:12 UTC (rev 33268)
@@ -104,9 +104,7 @@
public static String MAKE_BEAN_SCOPED_DEPENDENT_MARKER_RESOLUTION_TITLE;
public static String MAKE_FIELD_PROTECTED_MARKER_RESOLUTION_TITLE;
public static String ADD_RETENTION_MARKER_RESOLUTION_TITLE;
- 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_ANNOTATION_MARKER_RESOLUTION_TITLE;
public static String DELETE_ANNOTATION_MARKER_RESOLUTION_TITLE;
public static String CHANGE_ANNOTATION_MARKER_RESOLUTION_TITLE;
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-27 19:01:06 UTC (rev 33267)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.properties 2011-07-27 19:31:12 UTC (rev 33268)
@@ -88,9 +88,7 @@
MAKE_BEAN_SCOPED_DEPENDENT_MARKER_RESOLUTION_TITLE=Make ''{0}'' bean scoped @Dependent
MAKE_FIELD_PROTECTED_MARKER_RESOLUTION_TITLE=Make ''{0}'' field protected
ADD_RETENTION_MARKER_RESOLUTION_TITLE=Add @Retention(RUNTIME) annotation to ''{0}'' class
-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_ANNOTATION_MARKER_RESOLUTION_TITLE=Add @{0} annotation to ''{1}'' {2}
DELETE_ANNOTATION_MARKER_RESOLUTION_TITLE=Delete @{0} annotation from ''{1}'' {2}
CHANGE_ANNOTATION_MARKER_RESOLUTION_TITLE=Change ''{0}'' annotation to {1}
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-27 19:01:06 UTC (rev 33267)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/CDIProblemMarkerResolutionGenerator.java 2011-07-27 19:31:12 UTC (rev 33268)
@@ -202,7 +202,7 @@
};
}else{
return new IMarkerResolution[] {
- new ChangeRetentionAnnotationMarkerResolution(ta.type, ta.annotation)
+ new ChangeAnnotationMarkerResolution(ta.annotation, CDIConstants.RETENTION_POLICY_RUNTIME_TYPE_NAME)
};
}
@@ -217,8 +217,8 @@
};
}else{
return new IMarkerResolution[] {
- new ChangeTargetAnnotationMarkerResolution(ta.type, ta.annotation, new String[]{CDIConstants.ELEMENT_TYPE_TYPE_NAME, CDIConstants.ELEMENT_TYPE_METHOD_NAME, CDIConstants.ELEMENT_TYPE_FIELD_NAME, CDIConstants.ELEMENT_TYPE_PARAMETER_NAME}),
- new ChangeTargetAnnotationMarkerResolution(ta.type, ta.annotation, new String[]{CDIConstants.ELEMENT_TYPE_FIELD_NAME, CDIConstants.ELEMENT_TYPE_PARAMETER_NAME})
+ new ChangeAnnotationMarkerResolution(ta.annotation, new String[]{CDIConstants.ELEMENT_TYPE_TYPE_NAME, CDIConstants.ELEMENT_TYPE_METHOD_NAME, CDIConstants.ELEMENT_TYPE_FIELD_NAME, CDIConstants.ELEMENT_TYPE_PARAMETER_NAME}),
+ new ChangeAnnotationMarkerResolution(ta.annotation, new String[]{CDIConstants.ELEMENT_TYPE_FIELD_NAME, CDIConstants.ELEMENT_TYPE_PARAMETER_NAME})
};
}
@@ -236,11 +236,11 @@
};
}else{
return new IMarkerResolution[] {
- new ChangeTargetAnnotationMarkerResolution(ta.type, ta.annotation, new String[]{CDIConstants.ELEMENT_TYPE_TYPE_NAME, CDIConstants.ELEMENT_TYPE_METHOD_NAME, CDIConstants.ELEMENT_TYPE_FIELD_NAME}),
- new ChangeTargetAnnotationMarkerResolution(ta.type, ta.annotation, new String[]{CDIConstants.ELEMENT_TYPE_METHOD_NAME, CDIConstants.ELEMENT_TYPE_FIELD_NAME}),
- new ChangeTargetAnnotationMarkerResolution(ta.type, ta.annotation, new String[]{CDIConstants.ELEMENT_TYPE_TYPE_NAME}),
- new ChangeTargetAnnotationMarkerResolution(ta.type, ta.annotation, new String[]{CDIConstants.ELEMENT_TYPE_METHOD_NAME}),
- new ChangeTargetAnnotationMarkerResolution(ta.type, ta.annotation, new String[]{CDIConstants.ELEMENT_TYPE_FIELD_NAME})
+ new ChangeAnnotationMarkerResolution(ta.annotation, new String[]{CDIConstants.ELEMENT_TYPE_TYPE_NAME, CDIConstants.ELEMENT_TYPE_METHOD_NAME, CDIConstants.ELEMENT_TYPE_FIELD_NAME}),
+ new ChangeAnnotationMarkerResolution(ta.annotation, new String[]{CDIConstants.ELEMENT_TYPE_METHOD_NAME, CDIConstants.ELEMENT_TYPE_FIELD_NAME}),
+ new ChangeAnnotationMarkerResolution(ta.annotation, new String[]{CDIConstants.ELEMENT_TYPE_TYPE_NAME}),
+ new ChangeAnnotationMarkerResolution(ta.annotation, new String[]{CDIConstants.ELEMENT_TYPE_METHOD_NAME}),
+ new ChangeAnnotationMarkerResolution(ta.annotation, new String[]{CDIConstants.ELEMENT_TYPE_FIELD_NAME})
};
}
@@ -254,7 +254,7 @@
};
}else{
return new IMarkerResolution[] {
- new ChangeTargetAnnotationMarkerResolution(ta.type, ta.annotation, new String[]{CDIConstants.ELEMENT_TYPE_TYPE_NAME, CDIConstants.ELEMENT_TYPE_METHOD_NAME, CDIConstants.ELEMENT_TYPE_FIELD_NAME})
+ new ChangeAnnotationMarkerResolution(ta.annotation, new String[]{CDIConstants.ELEMENT_TYPE_TYPE_NAME, CDIConstants.ELEMENT_TYPE_METHOD_NAME, CDIConstants.ELEMENT_TYPE_FIELD_NAME})
};
}
@@ -364,6 +364,14 @@
new DeleteAnnotationMarkerResolution(ta.type, CDIConstants.TYPED_ANNOTATION_TYPE_NAME)
};
}
+ }else if(messageId == CDIValidationErrorManager.INTERCEPTOR_ANNOTATED_SPECIALIZES_ID ||
+ messageId == CDIValidationErrorManager.DECORATOR_ANNOTATED_SPECIALIZES_ID){
+ TypeAndAnnotation ta = findTypeAndAnnotation(file, start, CDIConstants.SPECIALIZES_ANNOTATION_TYPE_NAME);
+ if(ta != null && ta.annotation != null && ta.type != null){
+ return new IMarkerResolution[] {
+ new DeleteAnnotationMarkerResolution(ta.type, CDIConstants.SPECIALIZES_ANNOTATION_TYPE_NAME)
+ };
+ }
}
}
return new IMarkerResolution[] {};
Deleted: 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-27 19:01:06 UTC (rev 33267)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/ChangeRetentionAnnotationMarkerResolution.java 2011-07-27 19:31:12 UTC (rev 33268)
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * 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.IAnnotation;
-import org.eclipse.jdt.core.IBuffer;
-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;
-import org.jboss.tools.cdi.core.CDIConstants;
-import org.jboss.tools.cdi.ui.CDIUIMessages;
-import org.jboss.tools.cdi.ui.CDIUIPlugin;
-
-public class ChangeRetentionAnnotationMarkerResolution implements
- IMarkerResolution2 {
- private String label=null;
- private IType type;
- private IAnnotation annotation;
-
- public ChangeRetentionAnnotationMarkerResolution(IType type, IAnnotation annotation){
- this.type = type;
- this.annotation = annotation;
- try {
- label = NLS.bind(CDIUIMessages.CHANGE_RETENTION_MARKER_RESOLUTION_TITLE, annotation.getSource());
- } catch (JavaModelException e) {
- CDIUIPlugin.getDefault().logError(e);
- }
- }
-
- public String getLabel() {
- return label;
- }
-
- public void run(IMarker marker) {
- try{
- 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);
-
- 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());
- compilationUnit.discardWorkingCopy();
- }catch(CoreException ex){
- CDIUIPlugin.getDefault().logError(ex);
- }
- }
-
- public String getDescription() {
- return label;
- }
-
- public Image getImage() {
- return null;
- }
-}
Deleted: 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-27 19:01:06 UTC (rev 33267)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/ChangeTargetAnnotationMarkerResolution.java 2011-07-27 19:31:12 UTC (rev 33268)
@@ -1,88 +0,0 @@
-/*******************************************************************************
- * 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.IAnnotation;
-import org.eclipse.jdt.core.IBuffer;
-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;
-import org.jboss.tools.cdi.core.CDIConstants;
-import org.jboss.tools.cdi.ui.CDIUIMessages;
-import org.jboss.tools.cdi.ui.CDIUIPlugin;
-
-public class ChangeTargetAnnotationMarkerResolution implements
- IMarkerResolution2 {
- private String label=null;
- private IType type;
- private IAnnotation annotation;
- private String[] qualifiedNames;
- private String[] shortNames;
- private String totalList;
-
-
- public ChangeTargetAnnotationMarkerResolution(IType type, IAnnotation annotation, String[] typeNames){
- this.type = type;
- this.annotation = annotation;
- this.qualifiedNames = typeNames;
- shortNames = MarkerResolutionUtils.getShortNames(qualifiedNames);
- totalList = MarkerResolutionUtils.OPEN_BRACE+MarkerResolutionUtils.getTotalList(shortNames)+MarkerResolutionUtils.CLOSE_BRACE;
-
- try {
- label = NLS.bind(CDIUIMessages.CHANGE_TARGET_MARKER_RESOLUTION_TITLE, annotation.getSource(), totalList);
- } catch (JavaModelException e) {
- CDIUIPlugin.getDefault().logError(e);
- }
- }
-
- public String getLabel() {
- return label;
- }
-
- public void run(IMarker marker) {
- try{
- 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);
- }
-
- IAnnotation workingCopyAnnotation = MarkerResolutionUtils.findWorkingCopy(compilationUnit, annotation);
-
- IBuffer buffer = compilationUnit.getBuffer();
- String shortName = MarkerResolutionUtils.getShortName(CDIConstants.TARGET_ANNOTATION_TYPE_NAME);
-
- buffer.replace(workingCopyAnnotation.getSourceRange().getOffset(), workingCopyAnnotation.getSourceRange().getLength(), MarkerResolutionUtils.AT+shortName+"("+totalList+")");
-
- compilationUnit.commitWorkingCopy(false, new NullProgressMonitor());
- compilationUnit.discardWorkingCopy();
- }catch(CoreException ex){
- CDIUIPlugin.getDefault().logError(ex);
- }
- }
-
- public String getDescription() {
- return label;
- }
-
- public Image getImage() {
- return null;
- }
-}
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestDecorator4.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestDecorator4.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestDecorator4.java 2011-07-27 19:31:12 UTC (rev 33268)
@@ -0,0 +1,17 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+import javax.decorator.Decorator;
+import javax.decorator.Delegate;
+import javax.enterprise.inject.Specializes;
+import javax.inject.Inject;
+
+@Decorator
+@Specializes
+public class TestDecorator4 extends TestDecorator3{
+ @Inject @Delegate @AAnnotation String str;
+
+
+ public String produce(){
+ return str;
+ }
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestDecorator4.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestDecorator4.qfxresult
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestDecorator4.qfxresult (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestDecorator4.qfxresult 2011-07-27 19:31:12 UTC (rev 33268)
@@ -0,0 +1,15 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+import javax.decorator.Decorator;
+import javax.decorator.Delegate;
+import javax.inject.Inject;
+
+@Decorator
+public class TestDecorator4 extends TestDecorator3{
+ @Inject @Delegate @AAnnotation String str;
+
+
+ public String produce(){
+ return str;
+ }
+}
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestInterceptor6.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestInterceptor6.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestInterceptor6.java 2011-07-27 19:31:12 UTC (rev 33268)
@@ -0,0 +1,17 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+import javax.enterprise.inject.Specializes;
+import javax.interceptor.Interceptor;
+
+import org.jboss.jsr299.tck.tests.decorators.interceptor.FooBinding;
+
+@Interceptor
+@FooBinding
+@Specializes
+public class TestInterceptor6 extends TestInterceptor5{
+
+
+ public String produce(){
+ return "a";
+ }
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestInterceptor6.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestInterceptor6.qfxresult
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestInterceptor6.qfxresult (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestInterceptor6.qfxresult 2011-07-27 19:31:12 UTC (rev 33268)
@@ -0,0 +1,15 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+import javax.interceptor.Interceptor;
+
+import org.jboss.jsr299.tck.tests.decorators.interceptor.FooBinding;
+
+@Interceptor
+@FooBinding
+public class TestInterceptor6 extends TestInterceptor5{
+
+
+ public String produce(){
+ return "a";
+ }
+}
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-27 19:01:06 UTC (rev 33267)
+++ trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/marker/CDIMarkerResolutionTest.java 2011-07-27 19:31:12 UTC (rev 33268)
@@ -33,8 +33,6 @@
import org.jboss.tools.cdi.ui.marker.AddSerializableInterfaceMarkerResolution;
import org.jboss.tools.cdi.ui.marker.AddTargetAnnotationMarkerResolution;
import org.jboss.tools.cdi.ui.marker.ChangeAnnotationMarkerResolution;
-import org.jboss.tools.cdi.ui.marker.ChangeRetentionAnnotationMarkerResolution;
-import org.jboss.tools.cdi.ui.marker.ChangeTargetAnnotationMarkerResolution;
import org.jboss.tools.cdi.ui.marker.DeleteAllDisposerDuplicantMarkerResolution;
import org.jboss.tools.cdi.ui.marker.DeleteAllInjectedConstructorsMarkerResolution;
import org.jboss.tools.cdi.ui.marker.DeleteAnnotationMarkerResolution;
@@ -421,7 +419,7 @@
CDICoreValidator.PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.MISSING_RETENTION_ANNOTATION_IN_QUALIFIER_TYPE_ID,
- ChangeRetentionAnnotationMarkerResolution.class);
+ ChangeAnnotationMarkerResolution.class);
}
public void testAddRetentionToScopeResolution() throws CoreException{
@@ -449,7 +447,7 @@
CDICoreValidator.PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.MISSING_RETENTION_ANNOTATION_IN_SCOPE_TYPE_ID,
- ChangeRetentionAnnotationMarkerResolution.class);
+ ChangeAnnotationMarkerResolution.class);
}
public void testAddRetentionToStereotypeResolution() throws CoreException{
@@ -477,7 +475,7 @@
CDICoreValidator.PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.MISSING_RETENTION_ANNOTATION_IN_STEREOTYPE_TYPE_ID,
- ChangeRetentionAnnotationMarkerResolution.class);
+ ChangeAnnotationMarkerResolution.class);
}
public void testAddTargetToStereotypeResolution() throws CoreException{
@@ -499,7 +497,7 @@
CDICoreValidator.PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.MISSING_TARGET_ANNOTATION_IN_STEREOTYPE_TYPE_ID,
- ChangeTargetAnnotationMarkerResolution.class);
+ ChangeAnnotationMarkerResolution.class);
}
public void testAddTargetToQualifierResolution() throws CoreException{
@@ -521,7 +519,7 @@
CDICoreValidator.PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.MISSING_TARGET_ANNOTATION_IN_QUALIFIER_TYPE_ID,
- ChangeTargetAnnotationMarkerResolution.class);
+ ChangeAnnotationMarkerResolution.class);
}
public void testAddTargetToScopeResolution() throws CoreException{
@@ -549,7 +547,7 @@
CDICoreValidator.PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.MISSING_TARGET_ANNOTATION_IN_SCOPE_TYPE_ID,
- ChangeTargetAnnotationMarkerResolution.class);
+ ChangeAnnotationMarkerResolution.class);
}
public void testAddNonbindingToAnnotationMemberOfQualifierResolution() throws CoreException{
@@ -799,5 +797,32 @@
CDIValidationErrorManager.STEREOTYPE_IS_ANNOTATED_TYPED_ID,
DeleteAnnotationMarkerResolution.class);
}
-
+
+ public void testSpecializesInDecoratorResolution() throws CoreException{
+ checkResolution(tckProject,
+ new String[]{
+ "JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/TestDecorator4.java"
+ },
+ new String[]{
+ "JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/TestDecorator4.qfxresult"
+ },
+ CDICoreValidator.PROBLEM_TYPE,
+ CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
+ CDIValidationErrorManager.DECORATOR_ANNOTATED_SPECIALIZES_ID,
+ DeleteAnnotationMarkerResolution.class);
+ }
+
+ public void testSpecializesInInterceptorResolution() throws CoreException{
+ checkResolution(tckProject,
+ new String[]{
+ "JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/TestInterceptor6.java"
+ },
+ new String[]{
+ "JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/TestInterceptor6.qfxresult"
+ },
+ CDICoreValidator.PROBLEM_TYPE,
+ CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
+ CDIValidationErrorManager.INTERCEPTOR_ANNOTATED_SPECIALIZES_ID,
+ DeleteAnnotationMarkerResolution.class);
+ }
}
\ No newline at end of file
13 years, 6 months
JBoss Tools SVN: r33267 - in trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker: META-INF and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2011-07-27 15:01:06 -0400 (Wed, 27 Jul 2011)
New Revision: 33267
Added:
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/freemarker-2.3.18.jar
Removed:
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/freemarker-2.3.8.jar
Modified:
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/.classpath
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/META-INF/MANIFEST.MF
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/build.properties
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/interpolation/BuiltInFragment.java
Log:
https://issues.jboss.org/browse/JBIDE-8519 (?floor, ?ceiling and ?round are not recognized by FreeMarker IDE)
fixed by updating included fremarker jar with version 2.3.18
Content assist is updates as well
Modified: trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/.classpath
===================================================================
--- trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/.classpath 2011-07-27 19:00:16 UTC (rev 33266)
+++ trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/.classpath 2011-07-27 19:01:06 UTC (rev 33267)
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
+ <classpathentry exported="true" kind="lib" path="freemarker-2.3.18.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
- <classpathentry exported="true" kind="lib" path="freemarker-2.3.8.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/META-INF/MANIFEST.MF
===================================================================
--- trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/META-INF/MANIFEST.MF 2011-07-27 19:00:16 UTC (rev 33266)
+++ trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/META-INF/MANIFEST.MF 2011-07-27 19:01:06 UTC (rev 33267)
@@ -22,7 +22,7 @@
org.jboss.tools.usage;bundle-version="1.0.0";resolution:=optional
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: freemarker-ide.jar,
- freemarker-2.3.8.jar
+ freemarker-2.3.18.jar
Bundle-Vendor: %providerName
Export-Package: freemarker.core,
freemarker.template,
Modified: trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/build.properties
===================================================================
--- trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/build.properties 2011-07-27 19:00:16 UTC (rev 33266)
+++ trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/build.properties 2011-07-27 19:01:06 UTC (rev 33267)
@@ -1,13 +1,13 @@
source.freemarker-ide.jar = src/
output.freemarker-ide.jar = bin/
-jars.compile.order = freemarker-ide.jar
+jars.compile.order = freemarker-2.3.18.jar
bin.includes = plugin.*,\
- freemarker-ide.jar,\
+ freemarker-2.3.18.jar,\
META-INF/,\
.,\
icons/,\
License.txt,\
- freemarker-2.3.8.jar,\
+ freemarker-2.3.18.jar,\
about.*,\
jboss_about.png
src.includes = src/,\
@@ -15,4 +15,4 @@
icons/,\
META-INF/,\
License.txt,\
- freemarker-2.3.8.jar
+ freemarker-2.3.18.jar
Copied: trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/freemarker-2.3.18.jar (from rev 33184, trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/freemarker-2.3.8.jar)
===================================================================
(Binary files differ)
Property changes on: trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/freemarker-2.3.18.jar
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Deleted: trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/freemarker-2.3.8.jar
===================================================================
(Binary files differ)
Modified: trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/interpolation/BuiltInFragment.java
===================================================================
--- trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/interpolation/BuiltInFragment.java 2011-07-27 19:00:16 UTC (rev 33266)
+++ trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/interpolation/BuiltInFragment.java 2011-07-27 19:01:06 UTC (rev 33267)
@@ -70,6 +70,9 @@
"if_exists", Boolean.class, null, //$NON-NLS-1$
"has_content", Boolean.class, null, //$NON-NLS-1$
"is_method", Boolean.class, null, //$NON-NLS-1$
+ "round", String.class, null, //$NON-NLS-1$
+ "floor", String.class, null, //$NON-NLS-1$
+ "ceiling", String.class, null, //$NON-NLS-1$
});
addToMap (STRING_BUILT_INS,
new Object[]{
13 years, 6 months
JBoss Tools SVN: r33266 - trunk/vpe/features/org.jboss.tools.xulrunner.feature.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2011-07-27 15:00:16 -0400 (Wed, 27 Jul 2011)
New Revision: 33266
Modified:
trunk/vpe/features/org.jboss.tools.xulrunner.feature/feature.xml
trunk/vpe/features/org.jboss.tools.xulrunner.feature/pom.xml
Log:
JBIDE-9268 aligned vpe xulrunner to 3.3.0 too. no known issue with that
Modified: trunk/vpe/features/org.jboss.tools.xulrunner.feature/feature.xml
===================================================================
--- trunk/vpe/features/org.jboss.tools.xulrunner.feature/feature.xml 2011-07-27 18:29:32 UTC (rev 33265)
+++ trunk/vpe/features/org.jboss.tools.xulrunner.feature/feature.xml 2011-07-27 19:00:16 UTC (rev 33266)
@@ -2,7 +2,7 @@
<feature
id="org.jboss.tools.xulrunner.feature"
label="%featureName"
- version="1.9.216.qualifier"
+ version="3.3.0.qualifier"
provider-name="%providerName"
plugin="org.jboss.tools.xulrunner">
Modified: trunk/vpe/features/org.jboss.tools.xulrunner.feature/pom.xml
===================================================================
--- trunk/vpe/features/org.jboss.tools.xulrunner.feature/pom.xml 2011-07-27 18:29:32 UTC (rev 33265)
+++ trunk/vpe/features/org.jboss.tools.xulrunner.feature/pom.xml 2011-07-27 19:00:16 UTC (rev 33266)
@@ -8,6 +8,6 @@
</parent>
<groupId>org.jboss.tools.vpe.features</groupId>
<artifactId>org.jboss.tools.xulrunner.feature</artifactId>
- <version>1.9.216-SNAPSHOT</version>
+
<packaging>eclipse-feature</packaging>
</project>
13 years, 6 months
JBoss Tools SVN: r33265 - trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/extension.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-07-27 14:29:32 -0400 (Wed, 27 Jul 2011)
New Revision: 33265
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/extension/ExtensionFactoryTest.java
Log:
JBIDE-9402
https://issues.jboss.org/browse/JBIDE-9402
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/extension/ExtensionFactoryTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/extension/ExtensionFactoryTest.java 2011-07-27 18:29:16 UTC (rev 33264)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/extension/ExtensionFactoryTest.java 2011-07-27 18:29:32 UTC (rev 33265)
@@ -3,15 +3,21 @@
import java.util.Set;
import org.jboss.tools.cdi.core.extension.CDIExtensionFactory;
+import org.jboss.tools.cdi.core.extension.ICDIExtension;
import org.jboss.tools.cdi.core.extension.feature.IProcessAnnotatedTypeFeature;
import junit.framework.TestCase;
public class ExtensionFactoryTest extends TestCase {
+ static String RUNTIME = "org.jboss.tools.cdi.core.fake.FakeExtension";
+ static String IMPL = "org.jboss.tools.cdi.core.test.extension.CDIExtensionImpl";
public void testExtensionFactory() throws Exception {
- Set<String> clss = CDIExtensionFactory.getInstance().getExtensionClassesByFeature(IProcessAnnotatedTypeFeature.class);
- System.out.println(clss.size());
+ Set<String> set = CDIExtensionFactory.getInstance().getExtensionClassesByRuntime(RUNTIME);
+ assertTrue(set.contains(IMPL));
+ ICDIExtension ext = CDIExtensionFactory.getInstance().createExtensionInstance(IMPL);
+ Set<Class<?>> fs = CDIExtensionFactory.getInstance().getFeatures(ext);
+ assertTrue(fs.contains(IProcessAnnotatedTypeFeature.class));
}
}
13 years, 6 months