JBoss Tools SVN: r42661 - trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-07-19 19:49:16 -0400 (Thu, 19 Jul 2012)
New Revision: 42661
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/CheckResource.java
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/WebXMLCoreValidator.java
Log:
JBIDE-11248
https://issues.jboss.org/browse/JBIDE-11248
jsfnature is not necessary.
Modified: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/CheckResource.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/CheckResource.java 2012-07-19 22:33:45 UTC (rev 42660)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/CheckResource.java 2012-07-19 23:49:16 UTC (rev 42661)
@@ -49,6 +49,7 @@
public void check(XModelObject object) {
String value = object.getAttributeValue(attr);
+ String actualValue = value;
XModel model = object.getModel();
XModelObject webRoot = model == null ? null : FileSystemsHelper.getWebRoot(model);
if(webRoot == null) return;
@@ -63,7 +64,7 @@
}
List<Object> list = WebPromptingProvider.getInstance().getList(model, IWebPromptingProvider.JSF_CONVERT_URL_TO_PATH, value, null);
- if(list != null && list.size() > 0) {
+ if(list != null && !list.isEmpty()) {
value = list.get(0).toString();
}
@@ -79,12 +80,28 @@
String valuei = v.toString();
String value2 = valuei.startsWith("/") ? valuei.substring(1) : valuei; //$NON-NLS-1$
o = webRoot.getChildByPath(value2);
- if(o != null) break;
+ if(o != null) {
+ value = "/" + value2; //$NON-NLS-1$
+ break;
+ }
}
if(o == null) {
- fireExists(object, preference, attr, value);
- } else if(!checkExtensions(value)) {
- fireExtension(object, preference, attr, value);
+ String v = value;
+ if(list.size() > 1) {
+ v = actualValue;
+ }
+ fireExists(object, preference, attr, v);
+ } else {
+ boolean ok = checkExtensions(value);
+ if(!ok && list != null) {
+ for (Object v: list) {
+ ok = checkExtensions(v.toString());
+ if(ok) break;
+ }
+ }
+ if(!ok) {
+ fireExtension(object, preference, attr, value);
+ }
}
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/WebXMLCoreValidator.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/WebXMLCoreValidator.java 2012-07-19 22:33:45 UTC (rev 42660)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/WebXMLCoreValidator.java 2012-07-19 23:49:16 UTC (rev 42661)
@@ -111,7 +111,7 @@
addCheck(new CheckResource(this, WebXMLPreferences.INVALID_TAGLIB_REF, "taglib-location", false, ".tld", WebXMLValidatorMessages.PATH_NOT_TAGLIB),
WebAppHelper.TAGLIB_ENTITY);
- addCheck(new CheckResource(this, WebXMLPreferences.INVALID_WELCOME_FILE_REF, "file name", false, ".jsp .html .htm .jspx", WebXMLValidatorMessages.PATH_NOT_PAGE),
+ addCheck(new CheckResource(this, WebXMLPreferences.INVALID_WELCOME_FILE_REF, "file name", false, ".jsp .html .htm .jspx .xhtml", WebXMLValidatorMessages.PATH_NOT_PAGE),
"WebAppWelcomFile");
addCheck(new CheckResource(this, WebXMLPreferences.INVALID_ERROR_PAGE_REF, "location", false, null, null).acceptServlet(),
"WebAppErrorPage");
13 years, 8 months
JBoss Tools SVN: r42660 - in trunk/common: plugins/org.jboss.tools.common.gef/META-INF and 14 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2012-07-19 18:33:45 -0400 (Thu, 19 Jul 2012)
New Revision: 42660
Modified:
trunk/common/plugins/org.jboss.tools.common.el.ui/META-INF/MANIFEST.MF
trunk/common/plugins/org.jboss.tools.common.gef/META-INF/MANIFEST.MF
trunk/common/plugins/org.jboss.tools.common.meta.ui/META-INF/MANIFEST.MF
trunk/common/plugins/org.jboss.tools.common.model.ui.capabilities/META-INF/MANIFEST.MF
trunk/common/plugins/org.jboss.tools.common.model.ui/META-INF/MANIFEST.MF
trunk/common/plugins/org.jboss.tools.common.projecttemplates/META-INF/MANIFEST.MF
trunk/common/plugins/org.jboss.tools.common.resref.core/META-INF/MANIFEST.MF
trunk/common/plugins/org.jboss.tools.common.resref.ui/META-INF/MANIFEST.MF
trunk/common/plugins/org.jboss.tools.common.text.xml/META-INF/MANIFEST.MF
trunk/common/plugins/org.jboss.tools.common.verification.ui/META-INF/MANIFEST.MF
trunk/common/plugins/org.jboss.tools.common.verification/META-INF/MANIFEST.MF
trunk/common/tests/org.jboss.tools.common.model.test/META-INF/MANIFEST.MF
trunk/common/tests/org.jboss.tools.common.model.ui.test/META-INF/MANIFEST.MF
trunk/common/tests/org.jboss.tools.common.test/META-INF/MANIFEST.MF
trunk/common/tests/org.jboss.tools.common.verification.test/META-INF/MANIFEST.MF
trunk/common/tests/org.jboss.tools.common.verification.ui.test/META-INF/MANIFEST.MF
Log:
common now requires at least JavaSE-1.6
Modified: trunk/common/plugins/org.jboss.tools.common.el.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.ui/META-INF/MANIFEST.MF 2012-07-19 22:25:37 UTC (rev 42659)
+++ trunk/common/plugins/org.jboss.tools.common.el.ui/META-INF/MANIFEST.MF 2012-07-19 22:33:45 UTC (rev 42660)
@@ -17,6 +17,6 @@
org.eclipse.wst.xml.ui;bundle-version="1.1.200",
org.jboss.tools.common.ui
Bundle-Vendor: %Bundle-Vendor.0
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ClassPath: .
Modified: trunk/common/plugins/org.jboss.tools.common.gef/META-INF/MANIFEST.MF
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.gef/META-INF/MANIFEST.MF 2012-07-19 22:25:37 UTC (rev 42659)
+++ trunk/common/plugins/org.jboss.tools.common.gef/META-INF/MANIFEST.MF 2012-07-19 22:33:45 UTC (rev 42660)
@@ -28,5 +28,5 @@
org.eclipse.core.runtime;bundle-version="3.7.0",
org.eclipse.core.resources;bundle-version="3.7.100"
Bundle-Version: 3.4.0.qualifier
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Eclipse-BundleShape: dir
Modified: trunk/common/plugins/org.jboss.tools.common.meta.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.meta.ui/META-INF/MANIFEST.MF 2012-07-19 22:25:37 UTC (rev 42659)
+++ trunk/common/plugins/org.jboss.tools.common.meta.ui/META-INF/MANIFEST.MF 2012-07-19 22:33:45 UTC (rev 42660)
@@ -30,4 +30,4 @@
org.jboss.tools.common.meta.ui.attribute.editor,
org.jboss.tools.common.meta.ui.search
Bundle-Activator: org.jboss.tools.common.meta.ui.MetaUIPlugin
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/META-INF/MANIFEST.MF 2012-07-19 22:25:37 UTC (rev 42659)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/META-INF/MANIFEST.MF 2012-07-19 22:33:45 UTC (rev 42660)
@@ -94,6 +94,6 @@
org.eclipse.jst.standard.schemas;bundle-version="1.2.0",
org.eclipse.wst.standard.schemas;bundle-version="1.0.300"
Bundle-Version: 3.4.0.qualifier
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ClassPath: org.jboss.tools.common.model.ui.jar
Eclipse-BundleShape: dir
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui.capabilities/META-INF/MANIFEST.MF
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui.capabilities/META-INF/MANIFEST.MF 2012-07-19 22:25:37 UTC (rev 42659)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui.capabilities/META-INF/MANIFEST.MF 2012-07-19 22:33:45 UTC (rev 42660)
@@ -3,7 +3,7 @@
Bundle-Name: %pluginName
Bundle-SymbolicName: org.jboss.tools.common.model.ui.capabilities;singleton:=true
Bundle-Version: 3.4.0.qualifier
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui;bundle-version="3.7.0"
Bundle-Vendor: %providerName
Modified: trunk/common/plugins/org.jboss.tools.common.projecttemplates/META-INF/MANIFEST.MF
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/META-INF/MANIFEST.MF 2012-07-19 22:25:37 UTC (rev 42659)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/META-INF/MANIFEST.MF 2012-07-19 22:33:45 UTC (rev 42660)
@@ -11,5 +11,5 @@
org.jboss.tools.common
Bundle-Version: 3.4.0.qualifier
Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Eclipse-BundleShape: dir
Modified: trunk/common/plugins/org.jboss.tools.common.resref.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.resref.core/META-INF/MANIFEST.MF 2012-07-19 22:25:37 UTC (rev 42659)
+++ trunk/common/plugins/org.jboss.tools.common.resref.core/META-INF/MANIFEST.MF 2012-07-19 22:33:45 UTC (rev 42660)
@@ -1,7 +1,7 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name.0
-Bundle-SymbolicName: org.jboss.tools.common.resref.core
+Bundle-SymbolicName: org.jboss.tools.common.resref.core;singleton:=true
Bundle-Version: 3.4.0.qualifier
Bundle-Activator: org.jboss.tools.common.resref.core.ResourceReferencePlugin
Require-Bundle: org.eclipse.ui;bundle-version="3.7.0",
@@ -10,7 +10,7 @@
org.eclipse.core.resources;bundle-version="3.7.100"
Bundle-ActivationPolicy: lazy
Export-Package: org.jboss.tools.common.resref.core
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-Vendor: %Bundle-Vendor.0
Bundle-Localization: plugin
Bundle-ClassPath: .
Modified: trunk/common/plugins/org.jboss.tools.common.resref.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.resref.ui/META-INF/MANIFEST.MF 2012-07-19 22:25:37 UTC (rev 42659)
+++ trunk/common/plugins/org.jboss.tools.common.resref.ui/META-INF/MANIFEST.MF 2012-07-19 22:33:45 UTC (rev 42660)
@@ -1,7 +1,7 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name.0
-Bundle-SymbolicName: org.jboss.tools.common.resref.ui
+Bundle-SymbolicName: org.jboss.tools.common.resref.ui;singleton:=true
Bundle-Version: 3.4.0.qualifier
Bundle-Activator: org.jboss.tools.common.resref.ui.Activator
Require-Bundle: org.eclipse.ui;bundle-version="3.7.0",
@@ -9,7 +9,7 @@
org.jboss.tools.common.model.ui,
org.jboss.tools.common.resref.core
Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Export-Package: org.jboss.tools.common.resref.ui
Bundle-Vendor: %Bundle-Vendor.0
Bundle-Localization: plugin
Modified: trunk/common/plugins/org.jboss.tools.common.text.xml/META-INF/MANIFEST.MF
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.text.xml/META-INF/MANIFEST.MF 2012-07-19 22:25:37 UTC (rev 42659)
+++ trunk/common/plugins/org.jboss.tools.common.text.xml/META-INF/MANIFEST.MF 2012-07-19 22:33:45 UTC (rev 42660)
@@ -31,5 +31,5 @@
org.junit;bundle-version="3.8.2",
org.eclipse.ui.ide;bundle-version="3.7.0"
Bundle-Version: 3.4.0.qualifier
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ClassPath: .
Modified: trunk/common/plugins/org.jboss.tools.common.verification/META-INF/MANIFEST.MF
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.verification/META-INF/MANIFEST.MF 2012-07-19 22:25:37 UTC (rev 42659)
+++ trunk/common/plugins/org.jboss.tools.common.verification/META-INF/MANIFEST.MF 2012-07-19 22:33:45 UTC (rev 42660)
@@ -23,4 +23,4 @@
org.eclipse.core.runtime;bundle-version="3.7.0",
org.eclipse.wst.validation;bundle-version="1.2.300"
Bundle-Version: 3.4.0.qualifier
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Modified: trunk/common/plugins/org.jboss.tools.common.verification.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.verification.ui/META-INF/MANIFEST.MF 2012-07-19 22:25:37 UTC (rev 42659)
+++ trunk/common/plugins/org.jboss.tools.common.verification.ui/META-INF/MANIFEST.MF 2012-07-19 22:33:45 UTC (rev 42660)
@@ -31,4 +31,4 @@
org.eclipse.wst.common.project.facet.core;bundle-version="1.4.200",
org.eclipse.wst.validation;bundle-version="1.2.300"
Bundle-Version: 3.4.0.qualifier
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Modified: trunk/common/tests/org.jboss.tools.common.model.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/common/tests/org.jboss.tools.common.model.test/META-INF/MANIFEST.MF 2012-07-19 22:25:37 UTC (rev 42659)
+++ trunk/common/tests/org.jboss.tools.common.model.test/META-INF/MANIFEST.MF 2012-07-19 22:33:45 UTC (rev 42660)
@@ -16,5 +16,5 @@
org.jboss.tools.tests,
org.jboss.tools.common.model.ui
Bundle-Localization: plugin
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ClassPath: .
Modified: trunk/common/tests/org.jboss.tools.common.model.ui.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/common/tests/org.jboss.tools.common.model.ui.test/META-INF/MANIFEST.MF 2012-07-19 22:25:37 UTC (rev 42659)
+++ trunk/common/tests/org.jboss.tools.common.model.ui.test/META-INF/MANIFEST.MF 2012-07-19 22:33:45 UTC (rev 42660)
@@ -15,5 +15,5 @@
Export-Package: org.jboss.tools.common.model.ui.test
Bundle-Vendor: %Bundle-Vendor.0
Bundle-Localization: plugin
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ClassPath: .
Modified: trunk/common/tests/org.jboss.tools.common.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/common/tests/org.jboss.tools.common.test/META-INF/MANIFEST.MF 2012-07-19 22:25:37 UTC (rev 42659)
+++ trunk/common/tests/org.jboss.tools.common.test/META-INF/MANIFEST.MF 2012-07-19 22:33:45 UTC (rev 42660)
@@ -19,4 +19,4 @@
org.jboss.tools.common.xml.test
Bundle-ClassPath: .
Bundle-Localization: plugin
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Modified: trunk/common/tests/org.jboss.tools.common.verification.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/common/tests/org.jboss.tools.common.verification.test/META-INF/MANIFEST.MF 2012-07-19 22:25:37 UTC (rev 42659)
+++ trunk/common/tests/org.jboss.tools.common.verification.test/META-INF/MANIFEST.MF 2012-07-19 22:33:45 UTC (rev 42660)
@@ -14,4 +14,4 @@
org.jboss.tools.common.verification,
org.jboss.tools.common.test
Bundle-Localization: plugin
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Modified: trunk/common/tests/org.jboss.tools.common.verification.ui.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/common/tests/org.jboss.tools.common.verification.ui.test/META-INF/MANIFEST.MF 2012-07-19 22:25:37 UTC (rev 42659)
+++ trunk/common/tests/org.jboss.tools.common.verification.ui.test/META-INF/MANIFEST.MF 2012-07-19 22:33:45 UTC (rev 42660)
@@ -10,5 +10,5 @@
org.jboss.tools.common.model.ui
Export-Package: org.jboss.tools.common.verification.ui.test,
org.jboss.tools.common.verification.ui.vrules.preferences.test
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ClassPath: .
13 years, 8 months
JBoss Tools SVN: r42659 - trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-07-19 18:25:37 -0400 (Thu, 19 Jul 2012)
New Revision: 42659
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/FacesConfigValidator.java
Log:
JBIDE-11916
https://issues.jboss.org/browse/JBIDE-11916
Check that file referenced by from-view-id exists if it is not a pattern.
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/FacesConfigValidator.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/FacesConfigValidator.java 2012-07-19 22:24:33 UTC (rev 42658)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/FacesConfigValidator.java 2012-07-19 22:25:37 UTC (rev 42659)
@@ -434,7 +434,7 @@
}
-class JSFCheckFromViewId extends Check {
+class JSFCheckFromViewId extends JSFCheckToViewId {
public JSFCheckFromViewId(ValidationErrorManager manager) {
super(manager, JSFSeverityPreferences.INVALID_FROM_VIEW_ID, JSFConstants.ATT_FROM_VIEW_ID);
@@ -448,6 +448,9 @@
if(value != null && value.length() > 0 && !value.startsWith("*") && !value.startsWith("/")) {
fireMessage(object, JSFValidationMessage.VIEW_ID_NO_SLASH, attr);
}
+ if(value != null && value.length() > 0 && value.indexOf("*") < 0) {
+ checkEsists(object, value);
+ }
}
}
@@ -456,6 +459,11 @@
public JSFCheckToViewId(ValidationErrorManager manager) {
super(manager, JSFSeverityPreferences.INVALID_TO_VIEW_ID, JSFConstants.ATT_TO_VIEW_ID);
}
+
+ public JSFCheckToViewId(ValidationErrorManager manager, String preference, String attr) {
+ super(manager, preference, attr);
+ }
+
public void check(XModelObject object) {
String value = object.getAttributeValue(attr);
@@ -490,8 +498,14 @@
if(o == null) {
JSFUrlPattern pattern = JSFWebProject.getInstance(model).getUrlPattern();
if(pattern != null && pattern.isJSFUrl(value)) {
- value = pattern.getJSFPath(value);
- o = model.getByPath(value);
+ List<String> vs = pattern.getJSFPaths(value);
+ for (String v: vs) {
+ o = model.getByPath(v);
+ if(o != null) break;
+ }
+ if(o == null) {
+ o = model.getByPath(pattern.getJSFPath(value));
+ }
}
}
13 years, 8 months
JBoss Tools SVN: r42658 - trunk/common/plugins/org.jboss.tools.common.text.ext/META-INF.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2012-07-19 18:24:33 -0400 (Thu, 19 Jul 2012)
New Revision: 42658
Modified:
trunk/common/plugins/org.jboss.tools.common.text.ext/META-INF/MANIFEST.MF
Log:
fix for continuous common component build
java 1.6 is required for common common.text.ext
Modified: trunk/common/plugins/org.jboss.tools.common.text.ext/META-INF/MANIFEST.MF
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.text.ext/META-INF/MANIFEST.MF 2012-07-19 21:41:31 UTC (rev 42657)
+++ trunk/common/plugins/org.jboss.tools.common.text.ext/META-INF/MANIFEST.MF 2012-07-19 22:24:33 UTC (rev 42658)
@@ -30,5 +30,5 @@
org.eclipse.wst.css.core;bundle-version="1.1.500",
org.eclipse.wst.html.core;bundle-version="1.1.500",
org.jboss.tools.common.ui
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ClassPath: .
13 years, 8 months
JBoss Tools SVN: r42657 - in trunk: cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/marker and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2012-07-19 17:41:31 -0400 (Thu, 19 Jul 2012)
New Revision: 42657
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/AddAnnotation.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/AddAnnotation.qfxresult
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/AddLocalBean.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/AddLocalBean.qfxresult
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/AddRetention.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/AddRetention.qfxresult
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/AddSerializable.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/AddSerializable.qfxresult
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/AddTarget.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/AddTarget.qfxresult
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/ChangeAnnotation.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/ChangeAnnotation.qfxresult
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/DeleteAnnotation.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/DeleteAnnotation.qfxresult
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/MakeFieldStatic.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/MakeFieldStatic.qfxresult
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/MakeMethodPublic.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/MakeMethodPublic.qfxresult
Removed:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/NonStaticProducerBroken.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/NonStaticProducerBroken.qfxresult
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/marker/CDIQuickFixTest.java
trunk/common/tests/org.jboss.tools.common.base.test/src/org/jboss/tools/common/base/test/QuickFixTestUtil.java
Log:
Make CDI Quick Fixes work for As-You-Type validator annotations https://issues.jboss.org/browse/JBIDE-12328
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/AddAnnotation.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/AddAnnotation.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/AddAnnotation.java 2012-07-19 21:41:31 UTC (rev 42657)
@@ -0,0 +1,23 @@
+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 AddAnnotation {
+ @Nonbinding
+ AAnnotation abc();
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/AddAnnotation.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/AddAnnotation.qfxresult
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/AddAnnotation.qfxresult (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/AddAnnotation.qfxresult 2012-07-19 21:41:31 UTC (rev 42657)
@@ -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 AddAnnotation {
+ AAnnotation abc();
+}
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/AddLocalBean.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/AddLocalBean.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/AddLocalBean.java 2012-07-19 21:41:31 UTC (rev 42657)
@@ -0,0 +1,12 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+import javax.ejb.Stateful;
+import javax.enterprise.inject.Produces;
+import javax.ejb.LocalBean;
+
+@LocalBean
+@Stateful
+public class AddLocalBean implements FooProducerLocal, FooProducerLocal2, FooProducerLocal3
+{
+ @Produces public Foo createFoo() { return new Foo(); }
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/AddLocalBean.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/AddLocalBean.qfxresult
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/AddLocalBean.qfxresult (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/AddLocalBean.qfxresult 2012-07-19 21:41:31 UTC (rev 42657)
@@ -0,0 +1,11 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+import javax.ejb.Stateful;
+import javax.enterprise.inject.Produces;
+import javax.ejb.LocalBean;
+
+@Stateful
+public class AddLocalBean implements FooProducerLocal, FooProducerLocal2, FooProducerLocal3
+{
+ @Produces public Foo createFoo() { return new Foo(); }
+}
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/AddRetention.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/AddRetention.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/AddRetention.java 2012-07-19 21:41:31 UTC (rev 42657)
@@ -0,0 +1,21 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+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 java.lang.annotation.Documented;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Retention;
+
+@Retention(RUNTIME)
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Documented
+@Qualifier
+public @interface AddRetention {
+
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/AddRetention.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/AddRetention.qfxresult
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/AddRetention.qfxresult (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/AddRetention.qfxresult 2012-07-19 21:41:31 UTC (rev 42657)
@@ -0,0 +1,18 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+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 java.lang.annotation.Documented;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Documented
+@Qualifier
+public @interface AddRetention {
+
+}
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/AddSerializable.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/AddSerializable.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/AddSerializable.java 2012-07-19 21:41:31 UTC (rev 42657)
@@ -0,0 +1,11 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+import javax.enterprise.context.SessionScoped;
+import java.io.Serializable;
+
+
+@SessionScoped
+class AddSerializable implements Serializable
+{
+ private static final long serialVersionUID = 1L;
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/AddSerializable.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/AddSerializable.qfxresult
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/AddSerializable.qfxresult (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/AddSerializable.qfxresult 2012-07-19 21:41:31 UTC (rev 42657)
@@ -0,0 +1,10 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+import javax.enterprise.context.SessionScoped;
+
+
+@SessionScoped
+class AddSerializable
+{
+ private static final long serialVersionUID = 1L;
+}
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/AddTarget.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/AddTarget.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/AddTarget.java 2012-07-19 21:41:31 UTC (rev 42657)
@@ -0,0 +1,22 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Inherited;
+
+import javax.inject.Scope;
+
+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 java.lang.annotation.Target;
+
+@Target({TYPE, METHOD, FIELD})
+@Retention(RUNTIME)
+@Scope
+@Inherited
+@Documented
+public @interface AddTarget {
+
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/AddTarget.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/AddTarget.qfxresult
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/AddTarget.qfxresult (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/AddTarget.qfxresult 2012-07-19 21:41:31 UTC (rev 42657)
@@ -0,0 +1,17 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Inherited;
+
+import javax.inject.Scope;
+
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+@Retention(RUNTIME)
+@Scope
+@Inherited
+@Documented
+public @interface AddTarget {
+
+}
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/ChangeAnnotation.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/ChangeAnnotation.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/ChangeAnnotation.java 2012-07-19 21:41:31 UTC (rev 42657)
@@ -0,0 +1,21 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+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 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;
+
+@Retention(RUNTIME)
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Documented
+@Qualifier
+public @interface ChangeAnnotation {
+
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/ChangeAnnotation.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/ChangeAnnotation.qfxresult
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/ChangeAnnotation.qfxresult (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/ChangeAnnotation.qfxresult 2012-07-19 21:41:31 UTC (rev 42657)
@@ -0,0 +1,20 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+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 java.lang.annotation.Documented;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+import java.lang.annotation.Retention;
+
+@Retention(value = null)
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Documented
+@Qualifier
+public @interface ChangeAnnotation {
+
+}
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/DeleteAnnotation.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/DeleteAnnotation.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/DeleteAnnotation.java 2012-07-19 21:41:31 UTC (rev 42657)
@@ -0,0 +1,19 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+import javax.enterprise.inject.Produces;
+import javax.inject.Inject;
+import javax.inject.Named;
+
+@Named("sss")
+public class DeleteAnnotation {
+ @Produces
+ public String produce(){
+ return "test";
+ }
+
+
+ @Inject
+ public DeleteAnnotation(String aaa){
+
+ }
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/DeleteAnnotation.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/DeleteAnnotation.qfxresult
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/DeleteAnnotation.qfxresult (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/DeleteAnnotation.qfxresult 2012-07-19 21:41:31 UTC (rev 42657)
@@ -0,0 +1,20 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+import javax.enterprise.inject.Disposes;
+import javax.enterprise.inject.Produces;
+import javax.inject.Inject;
+import javax.inject.Named;
+
+@Named("sss")
+public class DeleteAnnotation {
+ @Produces
+ public String produce(){
+ return "test";
+ }
+
+
+ @Inject
+ public DeleteAnnotation(@Disposes String aaa){
+
+ }
+}
Copied: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/MakeFieldStatic.java (from rev 42653, trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/NonStaticProducerBroken.java)
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/MakeFieldStatic.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/MakeFieldStatic.java 2012-07-19 21:41:31 UTC (rev 42657)
@@ -0,0 +1,10 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+import javax.ejb.Stateless;
+import javax.enterprise.inject.Produces;
+
+@Stateless
+public class MakeFieldStatic {
+
+ @Produces public static FunnelWeaver<String> anotherFunnelWeaver;
+}
\ No newline at end of file
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/MakeFieldStatic.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Copied: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/MakeFieldStatic.qfxresult (from rev 42653, trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/NonStaticProducerBroken.qfxresult)
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/MakeFieldStatic.qfxresult (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/MakeFieldStatic.qfxresult 2012-07-19 21:41:31 UTC (rev 42657)
@@ -0,0 +1,10 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+import javax.ejb.Stateless;
+import javax.enterprise.inject.Produces;
+
+@Stateless
+public class MakeFieldStatic {
+
+ @Produces public FunnelWeaver<String> anotherFunnelWeaver;
+}
\ No newline at end of file
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/MakeMethodPublic.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/MakeMethodPublic.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/MakeMethodPublic.java 2012-07-19 21:41:31 UTC (rev 42657)
@@ -0,0 +1,10 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+import javax.ejb.Stateful;
+import javax.enterprise.inject.Produces;
+
+@Stateful
+public class MakeMethodPublic
+{
+ @Produces public Foo createFoo() { return new Foo(); }
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/MakeMethodPublic.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/MakeMethodPublic.qfxresult
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/MakeMethodPublic.qfxresult (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/MakeMethodPublic.qfxresult 2012-07-19 21:41:31 UTC (rev 42657)
@@ -0,0 +1,10 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+import javax.ejb.Stateful;
+import javax.enterprise.inject.Produces;
+
+@Stateful
+public class MakeMethodPublic
+{
+ @Produces Foo createFoo() { return new Foo(); }
+}
Deleted: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/NonStaticProducerBroken.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/NonStaticProducerBroken.java 2012-07-19 21:15:14 UTC (rev 42656)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/NonStaticProducerBroken.java 2012-07-19 21:41:31 UTC (rev 42657)
@@ -1,10 +0,0 @@
-package org.jboss.jsr299.tck.tests.jbt.quickfixes;
-
-import javax.ejb.Stateless;
-import javax.enterprise.inject.Produces;
-
-@Stateless
-public class NonStaticProducerBroken {
-
- public FunnelWeaver<String> anotherFunnelWeaver;
-}
\ No newline at end of file
Deleted: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/NonStaticProducerBroken.qfxresult
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/NonStaticProducerBroken.qfxresult 2012-07-19 21:15:14 UTC (rev 42656)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/NonStaticProducerBroken.qfxresult 2012-07-19 21:41:31 UTC (rev 42657)
@@ -1,10 +0,0 @@
-package org.jboss.jsr299.tck.tests.jbt.quickfixes;
-
-import javax.ejb.Stateless;
-import javax.enterprise.inject.Produces;
-
-@Stateless
-public class NonStaticProducerBroken {
-
- @Produces public FunnelWeaver<String> anotherFunnelWeaver;
-}
\ No newline at end of file
Modified: trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/marker/CDIQuickFixTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/marker/CDIQuickFixTest.java 2012-07-19 21:15:14 UTC (rev 42656)
+++ trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/marker/CDIQuickFixTest.java 2012-07-19 21:41:31 UTC (rev 42657)
@@ -2,23 +2,92 @@
import org.eclipse.core.runtime.CoreException;
import org.jboss.tools.cdi.core.test.tck.TCKTest;
-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.AddAnnotationMarkerResolution;
+import org.jboss.tools.cdi.ui.marker.AddLocalBeanMarkerResolution;
+import org.jboss.tools.cdi.ui.marker.AddRetentionAnnotationMarkerResolution;
+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.DeleteAnnotationMarkerResolution;
import org.jboss.tools.cdi.ui.marker.MakeFieldStaticMarkerResolution;
-import org.jboss.tools.common.base.test.MarkerResolutionTestUtil;
+import org.jboss.tools.cdi.ui.marker.MakeMethodPublicMarkerResolution;
import org.jboss.tools.common.base.test.QuickFixTestUtil;
-import org.jboss.tools.common.ui.marker.ConfigureProblemSeverityMarkerResolution;
public class CDIQuickFixTest extends TCKTest {
- QuickFixTestUtil util = new QuickFixTestUtil();
+ private QuickFixTestUtil util = new QuickFixTestUtil();
- public void testConfigureProblemSeverity() throws CoreException {
+ public void testMakeFieldStatic() throws CoreException {
util.checkPrpposal(tckProject,
- "JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/NonStaticProducerBroken.java",
- "JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/NonStaticProducerBroken.qfxresult",
- CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
+ "JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/MakeFieldStatic.java",
+ "JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/MakeFieldStatic.qfxresult",
CDIValidationErrorManager.ILLEGAL_PRODUCER_FIELD_IN_SESSION_BEAN_ID,
MakeFieldStaticMarkerResolution.class);
}
+
+ public void testAddLocalBeanResolution() throws CoreException {
+ util.checkPrpposal(tckProject,
+ "JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/AddLocalBean.java",
+ "JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/AddLocalBean.qfxresult",
+ CDIValidationErrorManager.ILLEGAL_PRODUCER_METHOD_IN_SESSION_BEAN_ID,
+ AddLocalBeanMarkerResolution.class);
+ }
+ public void testMakeProducerMethodPublicResolution() throws CoreException {
+ util.checkPrpposal(tckProject,
+ "JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/MakeMethodPublic.java",
+ "JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/MakeMethodPublic.qfxresult",
+ CDIValidationErrorManager.ILLEGAL_PRODUCER_METHOD_IN_SESSION_BEAN_ID,
+ MakeMethodPublicMarkerResolution.class);
+ }
+
+
+ public void testAddSerializableInterfaceResolution() throws CoreException{
+ util.checkPrpposal(tckProject,
+ "JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/AddSerializable.java",
+ "JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/AddSerializable.qfxresult",
+ CDIValidationErrorManager.NOT_PASSIVATION_CAPABLE_BEAN_ID,
+ AddSerializableInterfaceMarkerResolution.class);
+ }
+
+ public void testAddRetentionToQualifierResolution() throws CoreException{
+ util.checkPrpposal(tckProject,
+ "JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/AddRetention.java",
+ "JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/AddRetention.qfxresult",
+ CDIValidationErrorManager.MISSING_RETENTION_ANNOTATION_IN_QUALIFIER_TYPE_ID,
+ AddRetentionAnnotationMarkerResolution.class);
+ }
+
+ public void testChangeRetentionToQualifierResolution() throws CoreException{
+ util.checkPrpposal(tckProject,
+ "JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/ChangeAnnotation.java",
+ "JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/ChangeAnnotation.qfxresult",
+ CDIValidationErrorManager.MISSING_RETENTION_ANNOTATION_IN_QUALIFIER_TYPE_ID,
+ ChangeAnnotationMarkerResolution.class);
+ }
+
+ public void testAddTargetToScopeResolution() throws CoreException{
+ util.checkPrpposal(tckProject,
+ "JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/AddTarget.java",
+ "JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/AddTarget.qfxresult",
+ CDIValidationErrorManager.MISSING_TARGET_ANNOTATION_IN_SCOPE_TYPE_ID,
+ AddTargetAnnotationMarkerResolution.class);
+ }
+
+ public void testAddNonbindingToAnnotationMemberOfQualifierResolution() throws CoreException{
+ util.checkPrpposal(tckProject,
+ "JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/AddAnnotation.java",
+ "JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/AddAnnotation.qfxresult",
+ CDIValidationErrorManager.MISSING_NONBINDING_FOR_ANNOTATION_VALUE_IN_QUALIFIER_TYPE_MEMBER_ID,
+ AddAnnotationMarkerResolution.class);
+ }
+
+ public void testDeleteDisposesAnnotationFromParameterResolution() throws CoreException{
+ util.checkPrpposal(tckProject,
+ "JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/DeleteAnnotation.java",
+ "JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/DeleteAnnotation.qfxresult",
+ CDIValidationErrorManager.CONSTRUCTOR_PARAMETER_ANNOTATED_DISPOSES_ID,
+ DeleteAnnotationMarkerResolution.class);
+ }
+
}
Modified: trunk/common/tests/org.jboss.tools.common.base.test/src/org/jboss/tools/common/base/test/QuickFixTestUtil.java
===================================================================
--- trunk/common/tests/org.jboss.tools.common.base.test/src/org/jboss/tools/common/base/test/QuickFixTestUtil.java 2012-07-19 21:15:14 UTC (rev 42656)
+++ trunk/common/tests/org.jboss.tools.common.base.test/src/org/jboss/tools/common/base/test/QuickFixTestUtil.java 2012-07-19 21:41:31 UTC (rev 42657)
@@ -30,15 +30,18 @@
import org.jboss.tools.common.ui.marker.AddSuppressWarningsMarkerResolution;
import org.jboss.tools.common.ui.marker.ConfigureProblemSeverityMarkerResolution;
import org.jboss.tools.common.util.FileUtil;
+import org.jboss.tools.common.validation.java.TempJavaProblem;
import org.jboss.tools.common.validation.java.TempJavaProblemAnnotation;
import org.jboss.tools.test.util.JobUtils;
public class QuickFixTestUtil{
- private static final int MAX_SECONDS_TO_WAIT = 10;
+ private static final int MAX_SECONDS_TO_WAIT = 3;
protected ISourceViewer getViewer(IEditorPart editor){
if(editor instanceof JavaEditor){
return ((JavaEditor)editor).getViewer();
+ }else{
+ Assert.fail("editor must be instanceof JavaEditor");
}
return null;
}
@@ -66,7 +69,7 @@
}
}
- public void checkPrpposal(IProject project, String fileName, String newFile, String idName, int id, Class<? extends IJavaCompletionProposal> proposalClass) throws CoreException {
+ public void checkPrpposal(IProject project, String fileName, String newFile, int id, Class<? extends IJavaCompletionProposal> proposalClass) throws CoreException {
IFile file = project.getFile(fileName);
IFile nFile = project.getFile(newFile);
@@ -87,11 +90,11 @@
document.set(text);
// Find annotation
- TempJavaProblemAnnotation[] annotations = waitForProblemAnnotationAppearance(viewer);
- System.out.println("ANNOTATIONS Before...");
- for(TempJavaProblemAnnotation a : annotations){
- System.out.println(a.getText());
- }
+ TempJavaProblemAnnotation[] annotations = waitForProblemAnnotationAppearance(viewer, id);
+ //System.out.println("ANNOTATIONS Before...");
+ //for(TempJavaProblemAnnotation a : annotations){
+ // System.out.println(a.getText());
+ //}
Assert.assertTrue("No annotations found", annotations.length > 0);
@@ -124,11 +127,11 @@
//TestUtil.validate(file);
- TempJavaProblemAnnotation[] newAnnotations = waitForProblemAnnotationAppearance(viewer);
- System.out.println("ANNOTATIONS After...");
- for(TempJavaProblemAnnotation a : newAnnotations){
- System.out.println(a.getText());
- }
+ TempJavaProblemAnnotation[] newAnnotations = waitForProblemAnnotationAppearance(viewer, id);
+ //System.out.println("ANNOTATIONS After...");
+ //for(TempJavaProblemAnnotation a : newAnnotations){
+ // System.out.println(a.getText());
+ //}
Assert.assertTrue("Quick fix did not decrease number of problems. was: "+annotations.length+" now: "+newAnnotations.length, newAnnotations.length <= annotations.length);
@@ -165,7 +168,7 @@
Assert.assertEquals("Wrong result of resolution", fileContent, text);
}
- protected TempJavaProblemAnnotation[] waitForProblemAnnotationAppearance(final ISourceViewer viewer) {
+ protected TempJavaProblemAnnotation[] waitForProblemAnnotationAppearance(final ISourceViewer viewer, final int problemId) {
final ArrayList<TempJavaProblemAnnotation> annotations = new ArrayList<TempJavaProblemAnnotation>();
Display.getDefault().syncExec(new Runnable() {
@@ -191,8 +194,11 @@
Object o = it.next();
if (o instanceof TempJavaProblemAnnotation){
- annotations.add((TempJavaProblemAnnotation) o);
- found = true;
+ int id = ((TempJavaProblemAnnotation) o).getId() - TempJavaProblem.TEMP_PROBLEM_ID;
+ if(id == problemId){
+ annotations.add((TempJavaProblemAnnotation) o);
+ found = true;
+ }
}
}
13 years, 8 months
JBoss Tools SVN: r42656 - trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/pattern.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-07-19 17:15:14 -0400 (Thu, 19 Jul 2012)
New Revision: 42656
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/pattern/PatternLoader.java
Log:
JBIDE-11248
https://issues.jboss.org/browse/JBIDE-11248
Extensions in context param javax.faces.DEFAULT_SUFFIX can be separated by whitespace.
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/pattern/PatternLoader.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/pattern/PatternLoader.java 2012-07-19 19:23:30 UTC (rev 42655)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/pattern/PatternLoader.java 2012-07-19 21:15:14 UTC (rev 42656)
@@ -13,6 +13,7 @@
import java.util.ArrayList;
import org.jboss.tools.common.model.*;
+import org.jboss.tools.common.model.util.XModelObjectUtil;
import org.jboss.tools.jsf.model.JSFConstants;
import org.jboss.tools.jst.web.browser.wtp.RunOnServerContext;
import org.jboss.tools.jst.web.model.helpers.WebAppHelper;
@@ -72,6 +73,9 @@
String[] getFileSuffix(XModelObject webxml) {
String[] list = WebAppHelper.getWebAppContextParamValueList(webxml, "javax.faces.DEFAULT_SUFFIX");
+ if(list != null && list.length == 1) {
+ list = XModelObjectUtil.asStringArray(list[0].trim(), " ");
+ }
return list == null || list.length == 0 || !list[0].startsWith(".") ? DEFAULT_SUFFIXES : list;
}
13 years, 8 months
JBoss Tools SVN: r42655 - trunk/jst/plugins/org.jboss.tools.jst.text.ext/src/org/jboss/tools/jst/text/ext/hyperlink.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-07-19 15:23:30 -0400 (Thu, 19 Jul 2012)
New Revision: 42655
Modified:
trunk/jst/plugins/org.jboss.tools.jst.text.ext/src/org/jboss/tools/jst/text/ext/hyperlink/ELVarListHyperlink.java
Log:
JBIDE-12295
https://issues.jboss.org/browse/JBIDE-12295
Test is added.
Modified: trunk/jst/plugins/org.jboss.tools.jst.text.ext/src/org/jboss/tools/jst/text/ext/hyperlink/ELVarListHyperlink.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.text.ext/src/org/jboss/tools/jst/text/ext/hyperlink/ELVarListHyperlink.java 2012-07-19 17:12:16 UTC (rev 42654)
+++ trunk/jst/plugins/org.jboss.tools.jst.text.ext/src/org/jboss/tools/jst/text/ext/hyperlink/ELVarListHyperlink.java 2012-07-19 19:23:30 UTC (rev 42655)
@@ -68,6 +68,10 @@
return "Open Var Declaration"; //$NON-NLS-1$
}
+ public ELHyperlink[] getHyperlinks() {
+ return hyperlinks;
+ }
+
}
class VarInformationControlManager extends InformationControlManager {
@@ -125,6 +129,5 @@
}
}
-
-
+
}
13 years, 8 months
JBoss Tools SVN: r42654 - in trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test: src/org/jboss/tools/jsf/text/ext/test and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-07-19 13:12:16 -0400 (Thu, 19 Jul 2012)
New Revision: 42654
Added:
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/JSF2CompositeOpenOn/WebContent/params/c.xhtml
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/JSF2CompositeOpenOn/WebContent/params/a.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/JSF2CompositeOpenOn/WebContent/params/b.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/src/org/jboss/tools/jsf/text/ext/test/JSPELHyperlinkUIParamTest.java
Log:
JBIDE-12295
https://issues.jboss.org/browse/JBIDE-12295
Test is added.
Modified: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/JSF2CompositeOpenOn/WebContent/params/a.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/JSF2CompositeOpenOn/WebContent/params/a.xhtml 2012-07-19 16:29:09 UTC (rev 42653)
+++ trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/JSF2CompositeOpenOn/WebContent/params/a.xhtml 2012-07-19 17:12:16 UTC (rev 42654)
@@ -7,6 +7,7 @@
<ui:composition template="/params/b.xhtml">
<ui:param name="myparam1" value="#{person}" />
<ui:param name="myparam2" value="abc" />
+ <ui:param name="myparam3" value="#{person}" />
</ui:composition>
</html>
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/JSF2CompositeOpenOn/WebContent/params/b.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/JSF2CompositeOpenOn/WebContent/params/b.xhtml 2012-07-19 16:29:09 UTC (rev 42653)
+++ trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/JSF2CompositeOpenOn/WebContent/params/b.xhtml 2012-07-19 17:12:16 UTC (rev 42654)
@@ -6,5 +6,6 @@
<body>
#{myparam1}
#{myparam2}
+ #{myparam3}
</body>
</html>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/JSF2CompositeOpenOn/WebContent/params/c.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/JSF2CompositeOpenOn/WebContent/params/c.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/JSF2CompositeOpenOn/WebContent/params/c.xhtml 2012-07-19 17:12:16 UTC (rev 42654)
@@ -0,0 +1,11 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core">
+
+ <ui:composition template="/params/b.xhtml">
+ <ui:param name="myparam3" value="#{person}" />
+ </ui:composition>
+
+</html>
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/src/org/jboss/tools/jsf/text/ext/test/JSPELHyperlinkUIParamTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/src/org/jboss/tools/jsf/text/ext/test/JSPELHyperlinkUIParamTest.java 2012-07-19 16:29:09 UTC (rev 42653)
+++ trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/src/org/jboss/tools/jsf/text/ext/test/JSPELHyperlinkUIParamTest.java 2012-07-19 17:12:16 UTC (rev 42654)
@@ -10,6 +10,9 @@
******************************************************************************/
package org.jboss.tools.jsf.text.ext.test;
+import java.util.ArrayList;
+import java.util.List;
+
import junit.framework.TestCase;
import org.eclipse.core.resources.IProject;
@@ -26,7 +29,9 @@
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
+import org.jboss.tools.jst.text.ext.hyperlink.ELHyperlink;
import org.jboss.tools.jst.text.ext.hyperlink.ELHyperlinkDetector;
+import org.jboss.tools.jst.text.ext.hyperlink.ELVarListHyperlink;
import org.jboss.tools.jst.web.kb.PageContextFactory;
import org.jboss.tools.test.util.WorkbenchUtils;
@@ -58,24 +63,32 @@
public void testELHyperlinkUIParam() throws PartInitException, BadLocationException {
//Activate page, include model is lazy.
PageContextFactory.createPageContext(project.getFile(new Path("/WebContent/params/a.xhtml")));
+ PageContextFactory.createPageContext(project.getFile(new Path("/WebContent/params/c.xhtml")));
String pageName = PROJECT_NAME+"/WebContent/params/b.xhtml";
String textToFind = "myparam1";
String[] resultEditor = new String[]{"a.xhtml", "Person.java"};
try {
- doELHyperlinkUIParam(pageName, textToFind, resultEditor);
+ doELHyperlinkUIParam(pageName, textToFind, false, resultEditor);
} finally {
WorkbenchUtils.closeAllEditors();
}
textToFind = "myparam2";
resultEditor = new String[]{"a.xhtml", "String.java"};
try {
- doELHyperlinkUIParam(pageName, textToFind, resultEditor);
+ doELHyperlinkUIParam(pageName, textToFind, false, resultEditor);
} finally {
WorkbenchUtils.closeAllEditors();
}
+ textToFind = "myparam3";
+ resultEditor = new String[]{"a.xhtml", "c.xhtml", "Person.java"};
+ try {
+ doELHyperlinkUIParam(pageName, textToFind, true, resultEditor);
+ } finally {
+ WorkbenchUtils.closeAllEditors();
+ }
}
- private void doELHyperlinkUIParam(String pageName, String template, String... editorName) throws BadLocationException {
+ private void doELHyperlinkUIParam(String pageName, String template, boolean hasList, String... editorName) throws BadLocationException {
IEditorPart editor = WorkbenchUtils.openEditor(pageName);
assertTrue(editor instanceof JSPMultiPageEditor);
JSPMultiPageEditor jspMultyPageEditor = (JSPMultiPageEditor) editor;
@@ -92,6 +105,22 @@
assertTrue("Hyperlinks for EL: #{" + template + "} are not found",links.length!=0);
+ if(hasList) {
+ boolean found = false;
+ List<IHyperlink> list = new ArrayList<IHyperlink>();
+ for(int i = 0; i < links.length; i++){
+ if(links[i] instanceof ELVarListHyperlink) {
+ found = true;
+ ELHyperlink[] ls = ((ELVarListHyperlink)links[i]).getHyperlinks();
+ for (ELHyperlink l: ls) list.add(l);
+ } else {
+ list.add(links[i]);
+ }
+ }
+ assertTrue(found);
+ links = list.toArray(new IHyperlink[0]);
+ }
+
for(int i = 0; i < links.length; i++){
IHyperlink link = links[i];
assertNotNull(link.toString());
13 years, 8 months
JBoss Tools SVN: r42653 - 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: scabanovich
Date: 2012-07-19 12:29:09 -0400 (Thu, 19 Jul 2012)
New Revision: 42653
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/src/org/jboss/tools/jsf/text/ext/test/JSPELHyperlinkUIParamTest.java
Log:
JBIDE-12295
https://issues.jboss.org/browse/JBIDE-12295
Open-on of multiple declarations of ui:param with the same name are supported.
Modified: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/src/org/jboss/tools/jsf/text/ext/test/JSPELHyperlinkUIParamTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/src/org/jboss/tools/jsf/text/ext/test/JSPELHyperlinkUIParamTest.java 2012-07-19 15:27:02 UTC (rev 42652)
+++ trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/src/org/jboss/tools/jsf/text/ext/test/JSPELHyperlinkUIParamTest.java 2012-07-19 16:29:09 UTC (rev 42653)
@@ -55,27 +55,27 @@
}
- public void testJSPELHyperlinkUIParam() throws PartInitException, BadLocationException {
+ public void testELHyperlinkUIParam() throws PartInitException, BadLocationException {
//Activate page, include model is lazy.
PageContextFactory.createPageContext(project.getFile(new Path("/WebContent/params/a.xhtml")));
String pageName = PROJECT_NAME+"/WebContent/params/b.xhtml";
String textToFind = "myparam1";
String[] resultEditor = new String[]{"a.xhtml", "Person.java"};
try {
- doJSPELHyperlinkUIParam(pageName, textToFind, resultEditor);
+ doELHyperlinkUIParam(pageName, textToFind, resultEditor);
} finally {
WorkbenchUtils.closeAllEditors();
}
textToFind = "myparam2";
resultEditor = new String[]{"a.xhtml", "String.java"};
try {
- doJSPELHyperlinkUIParam(pageName, textToFind, resultEditor);
+ doELHyperlinkUIParam(pageName, textToFind, resultEditor);
} finally {
WorkbenchUtils.closeAllEditors();
}
}
- private void doJSPELHyperlinkUIParam(String pageName, String template, String... editorName) throws BadLocationException {
+ private void doELHyperlinkUIParam(String pageName, String template, String... editorName) throws BadLocationException {
IEditorPart editor = WorkbenchUtils.openEditor(pageName);
assertTrue(editor instanceof JSPMultiPageEditor);
JSPMultiPageEditor jspMultyPageEditor = (JSPMultiPageEditor) editor;
13 years, 8 months
JBoss Tools SVN: r42652 - in trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse: launch and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2012-07-19 11:27:02 -0400 (Thu, 19 Jul 2012)
New Revision: 42652
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/BestGuessConsoleConfigurationVisitor.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ConsoleConfigurationJavaClasspathTab.java
Log:
https://issues.jboss.org/browse/JBIDE-12348
Add validation to project state and ignore error for non java projects
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/BestGuessConsoleConfigurationVisitor.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/BestGuessConsoleConfigurationVisitor.java 2012-07-19 15:21:32 UTC (rev 42651)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/BestGuessConsoleConfigurationVisitor.java 2012-07-19 15:27:02 UTC (rev 42652)
@@ -82,7 +82,7 @@
return false;
}
} else if (proxy.getType() == IResource.FOLDER) {
- if (javaProject != null) {
+ if (javaProject != null && javaProject.exists()) {
if (javaProject.getOutputLocation().isPrefixOf(fullPath)) {
// classpath.add(fullPath);
return false; // skip output locations
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ConsoleConfigurationJavaClasspathTab.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ConsoleConfigurationJavaClasspathTab.java 2012-07-19 15:21:32 UTC (rev 42651)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ConsoleConfigurationJavaClasspathTab.java 2012-07-19 15:27:02 UTC (rev 42652)
@@ -74,7 +74,8 @@
}
}
} catch (CoreException e) {
- HibernateConsolePlugin.getDefault().log( e );
+ //Ignore as the exception occurs if the selected project is not java project
+ //We'll show warning to the user later
}
if (!resUserClasses) {
setErrorMessage(HibernateConsoleMessages.ConsoleConfigurationTabGroup_classpath_must_be_set_or_restored_to_default);
13 years, 8 months