JBoss Tools SVN: r38639 - trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2012-02-10 20:44:26 -0500 (Fri, 10 Feb 2012)
New Revision: 38639
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/BuilderValidationTest.java
Log:
https://issues.jboss.org/browse/JBIDE-10872 EL incremental validation doesn't work for complex ELs.
Modified: trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/BuilderValidationTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/BuilderValidationTest.java 2012-02-11 01:37:48 UTC (rev 38638)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/BuilderValidationTest.java 2012-02-11 01:44:26 UTC (rev 38639)
@@ -49,7 +49,7 @@
*
* #{authenticator.broken} #11
*/
- IFile file = project.getFile("WebContent/inputname.xhtml");
+ IFile file = project.getFile("WebContent/test.xhtml");
AbstractResourceMarkerTest.assertMarkerIsCreated(file, "\"broken\" cannot be resolved", 11);
AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"authenticator\" cannot be resolved", 6);
AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"authenticator\" cannot be resolved", 7);
@@ -82,7 +82,7 @@
TestUtil.validate(javaFile);
- IFile file = project.getFile("WebContent/inputname.xhtml");
+ IFile file = project.getFile("WebContent/test.xhtml");
AbstractResourceMarkerTest.assertMarkerIsCreated(file, "\"broken\" cannot be resolved", 11);
AbstractResourceMarkerTest.assertMarkerIsCreated(file, "\"test\" cannot be resolved", 6, 8, 9);
14 years, 1 month
JBoss Tools SVN: r38638 - trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2012-02-10 20:37:48 -0500 (Fri, 10 Feb 2012)
New Revision: 38638
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/BuilderValidationTest.java
Log:
https://issues.jboss.org/browse/JBIDE-10872 EL incremental validation doesn't work for complex ELs.
Modified: trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/BuilderValidationTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/BuilderValidationTest.java 2012-02-11 01:11:17 UTC (rev 38637)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/BuilderValidationTest.java 2012-02-11 01:37:48 UTC (rev 38638)
@@ -33,7 +33,7 @@
/**
* See https://issues.jboss.org/browse/JBIDE-10872
- * EL incremental validation doesn't work for complex ELs.
+ * EL incremental validation doesnt work for complex ELs.
* @throws Exception
*/
public void testFullBuildValidation() throws Exception {
@@ -50,25 +50,25 @@
* #{authenticator.broken} #11
*/
IFile file = project.getFile("WebContent/inputname.xhtml");
- AbstractResourceMarkerTest.assertMarkerIsCreated(file, "\"broken\" cannot be resolved'", 11);
- AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"authenticator\" cannot be resolved'", 6);
- AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"authenticator\" cannot be resolved'", 7);
- AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"authenticator\" cannot be resolved'", 8);
- AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"authenticator\" cannot be resolved'", 9);
- AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"authenticate()\" cannot be resolved'", 7);
- AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"test\" cannot be resolved'", 6);
- AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"test\" cannot be resolved'", 8);
- AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"test\" cannot be resolved'", 9);
- AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"string\" cannot be resolved'", 6);
- AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"string\" cannot be resolved'", 9);
- AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"newString\" cannot be resolved'", 6);
- AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"foo()\" cannot be resolved'", 8);
- AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"foo()\" cannot be resolved'", 9);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file, "\"broken\" cannot be resolved", 11);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"authenticator\" cannot be resolved", 6);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"authenticator\" cannot be resolved", 7);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"authenticator\" cannot be resolved", 8);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"authenticator\" cannot be resolved", 9);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"authenticate()\" cannot be resolved", 7);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"test\" cannot be resolved", 6);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"test\" cannot be resolved", 8);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"test\" cannot be resolved", 9);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"string\" cannot be resolved", 6);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"string\" cannot be resolved", 9);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"newString\" cannot be resolved", 6);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"foo()\" cannot be resolved", 8);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"foo()\" cannot be resolved", 9);
}
/**
* See https://issues.jboss.org/browse/JBIDE-10872
- * EL incremental validation doesn't work for complex ELs.
+ * EL incremental validation doesnt work for complex ELs.
* @throws Exception
*/
public void testIncrementalBuildValidation() throws Exception {
@@ -83,19 +83,19 @@
TestUtil.validate(javaFile);
IFile file = project.getFile("WebContent/inputname.xhtml");
- AbstractResourceMarkerTest.assertMarkerIsCreated(file, "\"broken\" cannot be resolved'", 11);
- AbstractResourceMarkerTest.assertMarkerIsCreated(file, "\"test\" cannot be resolved'", 6, 8, 9);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file, "\"broken\" cannot be resolved", 11);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file, "\"test\" cannot be resolved", 6, 8, 9);
- AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"authenticator\" cannot be resolved'", 6);
- AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"authenticator\" cannot be resolved'", 7);
- AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"authenticator\" cannot be resolved'", 8);
- AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"authenticator\" cannot be resolved'", 9);
- AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"authenticate()\" cannot be resolved'", 7);
- AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"string\" cannot be resolved'", 6);
- AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"string\" cannot be resolved'", 9);
- AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"newString\" cannot be resolved'", 6);
- AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"foo()\" cannot be resolved'", 8);
- AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"foo()\" cannot be resolved'", 9);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"authenticator\" cannot be resolved", 6);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"authenticator\" cannot be resolved", 7);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"authenticator\" cannot be resolved", 8);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"authenticator\" cannot be resolved", 9);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"authenticate()\" cannot be resolved", 7);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"string\" cannot be resolved", 6);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"string\" cannot be resolved", 9);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"newString\" cannot be resolved", 6);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"foo()\" cannot be resolved", 8);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"foo()\" cannot be resolved", 9);
javaFile.setContents(original.getContents(), IFile.FORCE, new NullProgressMonitor());
@@ -111,20 +111,20 @@
TestUtil.validate(javaFile);
- AbstractResourceMarkerTest.assertMarkerIsCreated(file, "\"broken\" cannot be resolved'", 11);
- AbstractResourceMarkerTest.assertMarkerIsCreated(file, "\"string\" cannot be resolved'", 6, 9);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file, "\"broken\" cannot be resolved", 11);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file, "\"string\" cannot be resolved", 6, 9);
- AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"authenticator\" cannot be resolved'", 6);
- AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"authenticator\" cannot be resolved'", 7);
- AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"authenticator\" cannot be resolved'", 8);
- AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"authenticator\" cannot be resolved'", 9);
- AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"authenticate()\" cannot be resolved'", 7);
- AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"test\" cannot be resolved'", 6);
- AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"test\" cannot be resolved'", 8);
- AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"test\" cannot be resolved'", 9);
- AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"newString\" cannot be resolved'", 6);
- AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"foo()\" cannot be resolved'", 8);
- AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"foo()\" cannot be resolved'", 9);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"authenticator\" cannot be resolved", 6);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"authenticator\" cannot be resolved", 7);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"authenticator\" cannot be resolved", 8);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"authenticator\" cannot be resolved", 9);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"authenticate()\" cannot be resolved", 7);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"test\" cannot be resolved", 6);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"test\" cannot be resolved", 8);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"test\" cannot be resolved", 9);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"newString\" cannot be resolved", 6);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"foo()\" cannot be resolved", 8);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"foo()\" cannot be resolved", 9);
javaFile.setContents(original.getContents(), IFile.FORCE, new NullProgressMonitor());
@@ -140,21 +140,21 @@
TestUtil.validate(javaFile);
- AbstractResourceMarkerTest.assertMarkerIsCreated(file, "\"broken\" cannot be resolved'", 11);
- AbstractResourceMarkerTest.assertMarkerIsCreated(file, "\"newString\" cannot be resolved'", 6);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file, "\"broken\" cannot be resolved", 11);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file, "\"newString\" cannot be resolved", 6);
- AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"authenticator\" cannot be resolved'", 6);
- AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"authenticator\" cannot be resolved'", 7);
- AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"authenticator\" cannot be resolved'", 8);
- AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"authenticator\" cannot be resolved'", 9);
- AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"authenticate()\" cannot be resolved'", 7);
- AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"test\" cannot be resolved'", 6);
- AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"test\" cannot be resolved'", 8);
- AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"test\" cannot be resolved'", 9);
- AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"string\" cannot be resolved'", 6);
- AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"string\" cannot be resolved'", 9);
- AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"foo()\" cannot be resolved'", 8);
- AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"foo()\" cannot be resolved'", 9);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"authenticator\" cannot be resolved", 6);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"authenticator\" cannot be resolved", 7);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"authenticator\" cannot be resolved", 8);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"authenticator\" cannot be resolved", 9);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"authenticate()\" cannot be resolved", 7);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"test\" cannot be resolved", 6);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"test\" cannot be resolved", 8);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"test\" cannot be resolved", 9);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"string\" cannot be resolved", 6);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"string\" cannot be resolved", 9);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"foo()\" cannot be resolved", 8);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"foo()\" cannot be resolved", 9);
javaFile.setContents(original.getContents(), IFile.FORCE, new NullProgressMonitor());
14 years, 1 month
JBoss Tools SVN: r38637 - in trunk/jsf/tests/org.jboss.tools.jsf.test: projects/jsf2pr/JavaSource/demo and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2012-02-10 20:11:17 -0500 (Fri, 10 Feb 2012)
New Revision: 38637
Added:
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/JavaSource/demo/
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/JavaSource/demo/Authenticator.broken
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/JavaSource/demo/Authenticator.broken2
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/JavaSource/demo/Authenticator.java
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/JavaSource/demo/Authenticator.original
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/JavaSource/demo/Test.broken
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/JavaSource/demo/Test.java
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/JavaSource/demo/Test.original
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/JavaSource/demo/Test2.broken
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/JavaSource/demo/Test2.java
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/JavaSource/demo/Test2.original
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/WebContent/test.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/BuilderValidationTest.java
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JsfAllTests.java
Log:
https://issues.jboss.org/browse/JBIDE-10872 EL incremental validation doesn't work for complex ELs.
Added: trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/JavaSource/demo/Authenticator.broken
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/JavaSource/demo/Authenticator.broken (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/JavaSource/demo/Authenticator.broken 2012-02-11 01:11:17 UTC (rev 38637)
@@ -0,0 +1,15 @@
+package demo;
+
+import javax.faces.bean.ManagedBean;
+
+@ManagedBean(name="authenticator")
+public class Authenticator {
+
+ public Test getTestBroken() {
+ return null;
+ }
+
+ public boolean authenticate() {
+ return true;
+ }
+}
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/JavaSource/demo/Authenticator.broken2
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/JavaSource/demo/Authenticator.broken2 (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/JavaSource/demo/Authenticator.broken2 2012-02-11 01:11:17 UTC (rev 38637)
@@ -0,0 +1,15 @@
+package demo;
+
+import javax.faces.bean.ManagedBean;
+
+@ManagedBean(name="authenticatorBroken")
+public class Authenticator {
+
+ public Test getTest() {
+ return null;
+ }
+
+ public boolean authenticate() {
+ return true;
+ }
+}
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/JavaSource/demo/Authenticator.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/JavaSource/demo/Authenticator.java (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/JavaSource/demo/Authenticator.java 2012-02-11 01:11:17 UTC (rev 38637)
@@ -0,0 +1,15 @@
+package demo;
+
+import javax.faces.bean.ManagedBean;
+
+@ManagedBean(name="authenticator")
+public class Authenticator {
+
+ public Test getTest() {
+ return null;
+ }
+
+ public boolean authenticate() {
+ return true;
+ }
+}
\ No newline at end of file
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/JavaSource/demo/Authenticator.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/JavaSource/demo/Authenticator.original
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/JavaSource/demo/Authenticator.original (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/JavaSource/demo/Authenticator.original 2012-02-11 01:11:17 UTC (rev 38637)
@@ -0,0 +1,15 @@
+package demo;
+
+import javax.faces.bean.ManagedBean;
+
+@ManagedBean(name="authenticator")
+public class Authenticator {
+
+ public Test getTest() {
+ return null;
+ }
+
+ public boolean authenticate() {
+ return true;
+ }
+}
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/JavaSource/demo/Test.broken
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/JavaSource/demo/Test.broken (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/JavaSource/demo/Test.broken 2012-02-11 01:11:17 UTC (rev 38637)
@@ -0,0 +1,11 @@
+package demo;
+
+public class Test {
+ public Test2 getStringBroken() {
+ return null;
+ }
+
+ public String foo() {
+ return null;
+ }
+}
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/JavaSource/demo/Test.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/JavaSource/demo/Test.java (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/JavaSource/demo/Test.java 2012-02-11 01:11:17 UTC (rev 38637)
@@ -0,0 +1,11 @@
+package demo;
+
+public class Test {
+ public Test2 getString() {
+ return null;
+ }
+
+ public String foo() {
+ return null;
+ }
+}
\ No newline at end of file
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/JavaSource/demo/Test.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/JavaSource/demo/Test.original
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/JavaSource/demo/Test.original (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/JavaSource/demo/Test.original 2012-02-11 01:11:17 UTC (rev 38637)
@@ -0,0 +1,11 @@
+package demo;
+
+public class Test {
+ public Test2 getString() {
+ return null;
+ }
+
+ public String foo() {
+ return null;
+ }
+}
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/JavaSource/demo/Test2.broken
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/JavaSource/demo/Test2.broken (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/JavaSource/demo/Test2.broken 2012-02-11 01:11:17 UTC (rev 38637)
@@ -0,0 +1,12 @@
+package demo;
+
+public class Test2 {
+
+ public String getNewStringBroken() {
+ return null;
+ }
+
+ public String foo() {
+ return null;
+ }
+}
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/JavaSource/demo/Test2.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/JavaSource/demo/Test2.java (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/JavaSource/demo/Test2.java 2012-02-11 01:11:17 UTC (rev 38637)
@@ -0,0 +1,12 @@
+package demo;
+
+public class Test2 {
+
+ public String getNewString() {
+ return null;
+ }
+
+ public String foo() {
+ return null;
+ }
+}
\ No newline at end of file
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/JavaSource/demo/Test2.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/JavaSource/demo/Test2.original
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/JavaSource/demo/Test2.original (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/JavaSource/demo/Test2.original 2012-02-11 01:11:17 UTC (rev 38637)
@@ -0,0 +1,12 @@
+package demo;
+
+public class Test2 {
+
+ public String getNewString() {
+ return null;
+ }
+
+ public String foo() {
+ return null;
+ }
+}
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/WebContent/test.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/WebContent/test.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/projects/jsf2pr/WebContent/test.xhtml 2012-02-11 01:11:17 UTC (rev 38637)
@@ -0,0 +1,12 @@
+<!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">
+
+ <h:outputText value="#{authenticator.test.string.newString}" />
+ <h:outputText value="#{authenticator.authenticate()}" />
+ <h:outputText value="#{authenticator.test.foo()}" />
+ <h:outputText value="#{authenticator.test.string.foo()}" />
+
+ <h:outputText value="#{authenticator.broken}" />
+</html>
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JsfAllTests.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JsfAllTests.java 2012-02-11 00:40:42 UTC (rev 38636)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JsfAllTests.java 2012-02-11 01:11:17 UTC (rev 38637)
@@ -15,6 +15,7 @@
import junit.framework.TestSuite;
import org.eclipse.jdt.internal.core.JavaModelManager;
+import org.jboss.tools.common.base.test.validation.ValidationExceptionTest;
import org.jboss.tools.common.base.test.validation.ValidationProjectTestSetup;
import org.jboss.tools.jsf.model.pv.test.JSFPromptingProviderTest;
import org.jboss.tools.jsf.model.pv.test.JsfJbide7975Test;
@@ -23,6 +24,7 @@
import org.jboss.tools.jsf.test.refactoring.JSF2RefactoringTest;
import org.jboss.tools.jsf.test.refactoring.MessagePropertyRefactoringTest;
import org.jboss.tools.jsf.test.refactoring.MethodRefactoringTest;
+import org.jboss.tools.jsf.test.validation.BuilderValidationTest;
import org.jboss.tools.jsf.test.validation.ELValidatorTest;
import org.jboss.tools.jsf.test.validation.FacesConfigValidatorTest;
import org.jboss.tools.jsf.test.validation.JSF2ComponentsInClassFolderTest;
@@ -30,13 +32,14 @@
import org.jboss.tools.jsf.test.validation.WebContentTest;
import org.jboss.tools.jsf.test.validation.XHTMLDetectorAndValidatorTest;
import org.jboss.tools.jsf.test.validation.XHTMLValidatorTest;
-import org.jboss.tools.jsf.web.validation.XHTMLValidator;
import org.jboss.tools.test.util.ProjectImportTestSetup;
public class JsfAllTests {
// public static final String PLUGIN_ID = "org.jboss.tools.jsf";
public static Test suite() {
+ ValidationExceptionTest.initLogger();
+
TestSuite suite = new TestSuite("Test model loading for JSF projects"); //$NON-NLS-1$
suite.addTestSuite(JSFTemplateTest.class);
suite.addTestSuite(JSFFacetOnExistingProjectTest.class);
@@ -103,7 +106,10 @@
// new String[] { "projects/i18nTestProject" }, //$NON-NLS-1$
// new String[] { "i18nTestProject" })); //$NON-NLS-1$
suite.addTest(new ValidationProjectTestSetup(new TestSuite(ELValidatorTest.class),"org.jboss.tools.jsf.test","projects/JSFKickStartOldFormat","JSFKickStartOldFormat"));
+ suite.addTest(new ValidationProjectTestSetup(new TestSuite(BuilderValidationTest.class),"org.jboss.tools.jsf.test","projects/jsf2pr","jsf2pr"));
+ suite.addTestSuite(ValidationExceptionTest.class); // This test should be added last!
+
return new DisableJavaIndexingSetup(suite);
}
Added: trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/BuilderValidationTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/BuilderValidationTest.java (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/BuilderValidationTest.java 2012-02-11 01:11:17 UTC (rev 38637)
@@ -0,0 +1,167 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jsf.test.validation;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.jboss.tools.common.base.test.validation.TestUtil;
+import org.jboss.tools.test.util.ResourcesUtils;
+import org.jboss.tools.tests.AbstractResourceMarkerTest;
+
+/**
+ * @author Alexey Kazakov
+ */
+public class BuilderValidationTest extends AbstractResourceMarkerTest {
+
+ /*
+ * (non-Javadoc)
+ * @see junit.framework.TestCase#setUp()
+ */
+ @Override
+ protected void setUp() throws Exception {
+ project = ResourcesPlugin.getWorkspace().getRoot().getProject("jsf2pr");
+ }
+
+ /**
+ * See https://issues.jboss.org/browse/JBIDE-10872
+ * EL incremental validation doesn't work for complex ELs.
+ * @throws Exception
+ */
+ public void testFullBuildValidation() throws Exception {
+ assertDefaultErrors();
+ }
+
+ private void assertDefaultErrors() throws Exception {
+ /*
+ * #{authenticator.test.string.newString} #6
+ * #{authenticator.authenticate()} #7
+ * #{authenticator.test.foo()} #8
+ * #{authenticator.test.string.foo()} #9
+ *
+ * #{authenticator.broken} #11
+ */
+ IFile file = project.getFile("WebContent/inputname.xhtml");
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file, "\"broken\" cannot be resolved'", 11);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"authenticator\" cannot be resolved'", 6);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"authenticator\" cannot be resolved'", 7);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"authenticator\" cannot be resolved'", 8);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"authenticator\" cannot be resolved'", 9);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"authenticate()\" cannot be resolved'", 7);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"test\" cannot be resolved'", 6);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"test\" cannot be resolved'", 8);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"test\" cannot be resolved'", 9);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"string\" cannot be resolved'", 6);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"string\" cannot be resolved'", 9);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"newString\" cannot be resolved'", 6);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"foo()\" cannot be resolved'", 8);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"foo()\" cannot be resolved'", 9);
+ }
+
+ /**
+ * See https://issues.jboss.org/browse/JBIDE-10872
+ * EL incremental validation doesn't work for complex ELs.
+ * @throws Exception
+ */
+ public void testIncrementalBuildValidation() throws Exception {
+ boolean saveAutoBuild = ResourcesUtils.setBuildAutomatically(false);
+
+ // Authenticator.java
+ IFile javaFile = project.getFile("JavaSource/demo/Authenticator.java");
+ IFile broken = project.getFile("JavaSource/demo/Authenticator.broken");
+ IFile original = project.getFile("JavaSource/demo/Authenticator.original");
+ javaFile.setContents(broken.getContents(), IFile.FORCE, new NullProgressMonitor());
+
+ TestUtil.validate(javaFile);
+
+ IFile file = project.getFile("WebContent/inputname.xhtml");
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file, "\"broken\" cannot be resolved'", 11);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file, "\"test\" cannot be resolved'", 6, 8, 9);
+
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"authenticator\" cannot be resolved'", 6);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"authenticator\" cannot be resolved'", 7);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"authenticator\" cannot be resolved'", 8);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"authenticator\" cannot be resolved'", 9);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"authenticate()\" cannot be resolved'", 7);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"string\" cannot be resolved'", 6);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"string\" cannot be resolved'", 9);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"newString\" cannot be resolved'", 6);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"foo()\" cannot be resolved'", 8);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"foo()\" cannot be resolved'", 9);
+
+ javaFile.setContents(original.getContents(), IFile.FORCE, new NullProgressMonitor());
+
+ TestUtil.validate(javaFile);
+
+ assertDefaultErrors();
+
+ // Test.java
+ javaFile = project.getFile("JavaSource/demo/Test.java");
+ broken = project.getFile("JavaSource/demo/Test.broken");
+ original = project.getFile("JavaSource/demo/Test.original");
+ javaFile.setContents(broken.getContents(), IFile.FORCE, new NullProgressMonitor());
+
+ TestUtil.validate(javaFile);
+
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file, "\"broken\" cannot be resolved'", 11);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file, "\"string\" cannot be resolved'", 6, 9);
+
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"authenticator\" cannot be resolved'", 6);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"authenticator\" cannot be resolved'", 7);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"authenticator\" cannot be resolved'", 8);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"authenticator\" cannot be resolved'", 9);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"authenticate()\" cannot be resolved'", 7);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"test\" cannot be resolved'", 6);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"test\" cannot be resolved'", 8);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"test\" cannot be resolved'", 9);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"newString\" cannot be resolved'", 6);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"foo()\" cannot be resolved'", 8);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"foo()\" cannot be resolved'", 9);
+
+ javaFile.setContents(original.getContents(), IFile.FORCE, new NullProgressMonitor());
+
+ TestUtil.validate(javaFile);
+
+ assertDefaultErrors();
+
+ // Test2.java
+ javaFile = project.getFile("JavaSource/demo/Test2.java");
+ broken = project.getFile("JavaSource/demo/Test2.broken");
+ original = project.getFile("JavaSource/demo/Test2.original");
+ javaFile.setContents(broken.getContents(), IFile.FORCE, new NullProgressMonitor());
+
+ TestUtil.validate(javaFile);
+
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file, "\"broken\" cannot be resolved'", 11);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file, "\"newString\" cannot be resolved'", 6);
+
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"authenticator\" cannot be resolved'", 6);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"authenticator\" cannot be resolved'", 7);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"authenticator\" cannot be resolved'", 8);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"authenticator\" cannot be resolved'", 9);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"authenticate()\" cannot be resolved'", 7);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"test\" cannot be resolved'", 6);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"test\" cannot be resolved'", 8);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"test\" cannot be resolved'", 9);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"string\" cannot be resolved'", 6);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"string\" cannot be resolved'", 9);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"foo()\" cannot be resolved'", 8);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, "\"foo()\" cannot be resolved'", 9);
+
+ javaFile.setContents(original.getContents(), IFile.FORCE, new NullProgressMonitor());
+
+ TestUtil.validate(javaFile);
+
+ assertDefaultErrors();
+
+ ResourcesUtils.setBuildAutomatically(saveAutoBuild);
+ }
+}
\ No newline at end of file
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/BuilderValidationTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
14 years, 1 month
JBoss Tools SVN: r38636 - trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2012-02-10 19:40:42 -0500 (Fri, 10 Feb 2012)
New Revision: 38636
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/JSF2RenameParticipant.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/JSf2MoveParticipant.java
Log:
moved -ds.xml file into META-INF file and got an exception https://issues.jboss.org/browse/JBIDE-10784
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/JSF2RenameParticipant.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/JSF2RenameParticipant.java 2012-02-11 00:14:00 UTC (rev 38635)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/JSF2RenameParticipant.java 2012-02-11 00:40:42 UTC (rev 38636)
@@ -58,7 +58,7 @@
if(element instanceof IFolder){
IFolder folder = (IFolder)element;
IPath newPath = folder.getFullPath().removeLastSegments(1).append(newFileName);
- if (JSf2MoveParticipant.checkDistFolderPath(newPath)) {
+ if (JSf2MoveParticipant.checkDistContainerPath(newPath)) {
urisMap = JSf2MoveParticipant.invokePossibleURIs(folder, newPath, false);
return RefactoringChangesFactory.createRenameURIChanges(project, urisMap);
}
@@ -96,7 +96,7 @@
}
}else if(element instanceof IFolder){
IFolder folder = (IFolder) element;
- if (JSf2MoveParticipant.checkResourceFolderPath(folder.getFullPath())) {
+ if (JSf2MoveParticipant.checkResourceContainerPath(folder.getFullPath())) {
project = folder.getProject();
oldFileName = folder.getName();
return true;
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/JSf2MoveParticipant.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/JSf2MoveParticipant.java 2012-02-11 00:14:00 UTC (rev 38635)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/JSf2MoveParticipant.java 2012-02-11 00:40:42 UTC (rev 38636)
@@ -16,8 +16,8 @@
import java.util.Map;
import java.util.Set;
+import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
@@ -42,7 +42,7 @@
private IProject project;
private Map<String, String> urisMap;
- private static boolean isMoveFolder = true;
+ private static boolean isMoveContainer = true;
@Override
public RefactoringStatus checkConditions(IProgressMonitor pm,
@@ -66,27 +66,27 @@
@Override
protected boolean initialize(Object element) {
- if(!(element instanceof IFolder) && !(element instanceof IFile))
+ if(!(element instanceof IContainer) && !(element instanceof IFile))
return false;
- IFolder folder = null;
- isMoveFolder = true;
+ IContainer container = null;
+ isMoveContainer = true;
if(element instanceof IFile){
IFile file = (IFile)element;
- folder = (IFolder)file.getParent();
- isMoveFolder = false;
+ container = file.getParent();
+ isMoveContainer = false;
}else
- folder = (IFolder) element;
- if (checkResourceFolderPath(folder.getFullPath())) {
+ container = (IContainer) element;
+ if (checkResourceContainerPath(container.getFullPath())) {
Object object = getArguments().getDestination();
- if (object instanceof IFolder) {
- if (folder.getProject() != ((IFolder) object).getProject()) {
+ if (object instanceof IContainer) {
+ if (container.getProject() != ((IContainer) object).getProject()) {
return false;
}
- if (checkDistFolderPath(((IFolder) object).getFullPath())) {
- project = folder.getProject();
- urisMap = invokePossibleURIs(folder, (IFolder) object);
+ if (checkDistContainerPath(((IContainer) object).getFullPath())) {
+ project = container.getProject();
+ urisMap = invokePossibleURIs(container, (IContainer) object);
return true;
}
}
@@ -94,7 +94,7 @@
return false;
}
- public static boolean checkDistFolderPath(IPath fullPath) {
+ public static boolean checkDistContainerPath(IPath fullPath) {
String[] segments = fullPath.segments();
if (segments.length > 2) {
if (segments[2].equals("resources")) { //$NON-NLS-1$
@@ -104,19 +104,19 @@
return false;
}
- public static Map<String, String> invokePossibleURIs(IFolder srcFolder, IFolder distFolder){
- return invokePossibleURIs(srcFolder, distFolder.getFullPath(), isMoveFolder);
+ public static Map<String, String> invokePossibleURIs(IContainer srcContainer, IContainer distContainer){
+ return invokePossibleURIs(srcContainer, distContainer.getFullPath(), isMoveContainer);
}
- public static Map<String, String> invokePossibleURIs(IFolder srcFolder, IPath distPath, boolean isMoveFolder) {
+ public static Map<String, String> invokePossibleURIs(IContainer srcContainer, IPath distPath, boolean isMoveContainer) {
Map<String, String> urisMap;
String newFirstURIPart = createJSF2URIFromPath(distPath);
- String oldFirstURIPart = createJSF2URIFromPath(srcFolder.getFullPath());
- if(isMoveFolder)
+ String oldFirstURIPart = createJSF2URIFromPath(srcContainer.getFullPath());
+ if(isMoveContainer)
oldFirstURIPart = oldFirstURIPart.substring(0, oldFirstURIPart
.lastIndexOf('/'));
Set<String> oldURIs = new HashSet<String>();
- invokeOldPossibleURIs(srcFolder, oldURIs);
+ invokeOldPossibleURIs(srcContainer, oldURIs);
urisMap = new HashMap<String, String>();
for (String oldURI : oldURIs) {
urisMap.put(oldURI, newFirstURIPart
@@ -125,14 +125,14 @@
return urisMap;
}
- private static void invokeOldPossibleURIs(IFolder srcFolder, Set<String> uris) {
- uris.add(createJSF2URIFromPath(srcFolder.getFullPath()));
+ private static void invokeOldPossibleURIs(IContainer srcContainer, Set<String> uris) {
+ uris.add(createJSF2URIFromPath(srcContainer.getFullPath()));
try {
- IResource[] children = srcFolder.members();
+ IResource[] children = srcContainer.members();
if (children != null) {
for (int i = 0; i < children.length; i++) {
- if (children[i] instanceof IFolder) {
- invokeOldPossibleURIs((IFolder) children[i], uris);
+ if (children[i] instanceof IContainer) {
+ invokeOldPossibleURIs((IContainer) children[i], uris);
}
}
}
@@ -141,7 +141,7 @@
}
}
- public static boolean checkResourceFolderPath(IPath path) {
+ public static boolean checkResourceContainerPath(IPath path) {
String[] segments = path.segments();
if (segments.length > 3) {
if (segments[2].equals("resources")) { //$NON-NLS-1$
14 years, 1 month
JBoss Tools SVN: r38635 - trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/xml.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-02-10 19:14:00 -0500 (Fri, 10 Feb 2012)
New Revision: 38635
Modified:
trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/xml/XMLContextParamLinkHyperlinkPartitioner.java
Log:
JBIDE-10830
https://issues.jboss.org/browse/JBIDE-10830
Open-on of faces config from context param is fixed.
Modified: trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/xml/XMLContextParamLinkHyperlinkPartitioner.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/xml/XMLContextParamLinkHyperlinkPartitioner.java 2012-02-10 23:58:01 UTC (rev 38634)
+++ trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/xml/XMLContextParamLinkHyperlinkPartitioner.java 2012-02-11 00:14:00 UTC (rev 38635)
@@ -13,13 +13,13 @@
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.Region;
import org.jboss.tools.common.text.ext.hyperlink.AbstractHyperlinkPartitioner;
import org.jboss.tools.common.text.ext.hyperlink.HyperlinkRegion;
import org.jboss.tools.common.text.ext.hyperlink.IHyperlinkPartitionRecognizer;
import org.jboss.tools.common.text.ext.hyperlink.IHyperlinkRegion;
import org.jboss.tools.common.text.ext.util.StructuredModelWrapper;
import org.jboss.tools.common.text.ext.util.Utils;
+import org.w3c.dom.Attr;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.Text;
@@ -55,7 +55,7 @@
protected abstract String getPartitionType();
- private IRegion getRegion(IDocument document, final int offset) {
+ private IRegion getRegion(IDocument document, int offset) {
StructuredModelWrapper smw = new StructuredModelWrapper();
try {
smw.init(document);
@@ -64,38 +64,51 @@
Node n = Utils.findNodeForOffset(xmlDocument, offset);
- if (n == null || !(n instanceof Text)) return null;
+ if (n == null || !(n instanceof Attr || n instanceof Text)) return null;
int start = Utils.getValueStart(n);
int end = Utils.getValueEnd(n);
-
- if (start < 0 || start > offset || end < offset) return null;
+ if (start > offset || end < offset) return null;
+
String text = document.get(start, end - start);
StringBuffer sb = new StringBuffer(text);
+ int bStart = offset - start;
//find start and end of path property
- int bStart = 0;
- int bEnd = text.length() - 1;
-
- while (bStart < bEnd &&
- (sb.charAt(bStart) == '\'' || sb.charAt(bStart) == '\"' ||
- Character.isWhitespace(sb.charAt(bStart)))) {
- bStart++;
+ while (bStart >= 0) {
+ if (!Character.isJavaIdentifierPart(sb.charAt(bStart)) &&
+ sb.charAt(bStart) != '\\' && sb.charAt(bStart) != '/' &&
+ sb.charAt(bStart) != ':' && sb.charAt(bStart) != '-' &&
+ sb.charAt(bStart) != '.' && sb.charAt(bStart) != '_' &&
+ sb.charAt(bStart) != '%' && sb.charAt(bStart) != '?' &&
+ sb.charAt(bStart) != '&' && sb.charAt(bStart) != '=') {
+ bStart++;
+ break;
+ }
+
+ if (bStart == 0) break;
+ bStart--;
}
- while (bEnd > bStart &&
- (sb.charAt(bEnd) == '\'' || sb.charAt(bEnd) == '\"' ||
- Character.isWhitespace(sb.charAt(bEnd)))) {
- bEnd--;
+ // find end of bean property
+ int bEnd = offset - start;
+ while (bEnd < sb.length()) {
+ if (!Character.isJavaIdentifierPart(sb.charAt(bEnd)) &&
+ sb.charAt(bEnd) != '\\' && sb.charAt(bEnd) != '/' &&
+ sb.charAt(bEnd) != ':' && sb.charAt(bEnd) != '-' &&
+ sb.charAt(bEnd) != '.' && sb.charAt(bEnd) != '_' &&
+ sb.charAt(bEnd) != '%' && sb.charAt(bEnd) != '?' &&
+ sb.charAt(bEnd) != '&' && sb.charAt(bEnd) != '=') {
+ break;
+ }
+ bEnd++;
}
- bEnd++;
- final int propStart = bStart + start;
- final int propLength = bEnd - bStart;
-
- if (propStart > offset || propStart + propLength < offset) return null;
-
- return new Region(propStart,propLength);
+ int propStart = bStart + start;
+ int propLength = bEnd - bStart;
+ if (propStart > offset + 1 || propStart + propLength < offset) return null;
+ IRegion region = new HyperlinkRegion(propStart, propLength);
+ return region;
} catch (BadLocationException x) {
//ignore
return null;
14 years, 1 month
JBoss Tools SVN: r38634 - in trunk: common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2012-02-10 18:58:01 -0500 (Fri, 10 Feb 2012)
New Revision: 38634
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.validation/src/org/jboss/tools/common/validation/IProjectValidationContext.java
trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/internal/ELValidatorContext.java
trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/internal/ProjectValidationContext.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ELValidator.java
Log:
https://issues.jboss.org/browse/JBIDE-10872 EL incremental validation doesn't work for complex ELs.
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 2012-02-10 23:19:46 UTC (rev 38633)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/ca/AbstractELCompletionEngine.java 2012-02-10 23:58:01 UTC (rev 38634)
@@ -18,6 +18,8 @@
import java.util.TreeSet;
import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaModelException;
@@ -692,6 +694,18 @@
List<TypeInfoCollector.MemberInfo> newMembers = new ArrayList<TypeInfoCollector.MemberInfo>();
for (TypeInfoCollector.MemberInfo mbr : members) {
if (mbr.getMemberType() == null) continue;
+ ICompilationUnit unit = mbr.getMemberType().getCompilationUnit();
+ if(unit!=null && unit.exists()) {
+ IResource resource;
+ try {
+ resource = unit.getCorrespondingResource();
+ if(resource!=null) {
+ segment.setResource(resource);
+ }
+ } catch (JavaModelException e) {
+ ELCorePlugin.getDefault().logError(e);
+ }
+ }
TypeInfoCollector infos = mbr.getTypeCollector(varIsUsed, isStaticMethodsCollectingEnabled());
if (TypeInfoCollector.isNotParameterizedCollection(mbr) || TypeInfoCollector.isResourceBundle(mbr.getMemberType())) {
resolution.setMapOrCollectionOrBundleAmoungTheTokens(true);
@@ -893,7 +907,24 @@
String filter = expr.getMemberName();
if(filter == null) filter = ""; //$NON-NLS-1$
String presentationString = proposal.getPresentation();
-
+ //proposal.getMember().getSourceType().getCompilationUnit().getCorrespondingResource()
+ MemberInfo info = proposal.getMember();
+ if(info!=null) {
+ IType type = info.getSourceType();
+ if(type!=null) {
+ ICompilationUnit unit = type.getCompilationUnit();
+ if(unit!=null && unit.exists()) {
+ try {
+ IResource resource = unit.getCorrespondingResource();
+ if(resource!=null) {
+ segment.setResource(resource);
+ }
+ } catch (JavaModelException e) {
+ ELCorePlugin.getDefault().logError(e);
+ }
+ }
+ }
+ }
if(returnEqualedVariablesOnly) {
// This is used for validation.
if (presentationString.equals(filter)) {
Modified: trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/IProjectValidationContext.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/IProjectValidationContext.java 2012-02-10 23:19:46 UTC (rev 38633)
+++ trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/IProjectValidationContext.java 2012-02-10 23:58:01 UTC (rev 38634)
@@ -117,6 +117,12 @@
void removeLinkedEl(String name, ELReference el);
/**
+ * Removes all the links between the EL and all the linked variable name.
+ * @param el
+ */
+ void removeLinkedEl(ELReference el);
+
+ /**
* Return ELs with given variable name
* @param variableName
* @return
Modified: trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/internal/ELValidatorContext.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/internal/ELValidatorContext.java 2012-02-10 23:19:46 UTC (rev 38633)
+++ trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/internal/ELValidatorContext.java 2012-02-10 23:58:01 UTC (rev 38634)
@@ -82,6 +82,23 @@
}
public synchronized void removeLinkedEls(IFile resource) {
+ String name = resource.getFullPath().toString(); // Resource path is also a variable name
+ Set<ELReference> linkedEls = elsByVariableName.remove(name);
+ if(linkedEls!=null ) {
+ modifications++;
+ for (ELReference el : linkedEls) {
+ Set<String> variableNames = variableNamesByEl.get(el);
+ if(variableNames!=null) {
+ if(variableNames.remove(name)) {
+ modifications++;
+ }
+ if(variableNames.isEmpty()) {
+ variableNamesByEl.remove(el);
+ }
+ }
+ }
+ }
+
Set<ELReference> els = elsByResource.get(resource.getFullPath());
if(els!=null) {
if(elsByResource.remove(resource.getFullPath()) != null) {
@@ -99,6 +116,25 @@
}
}
+ public synchronized void removeLinkedEl(ELReference el) {
+ Set<String> names = variableNamesByEl.remove(el);
+ if(names==null) {
+ return;
+ }
+ if(!names.isEmpty()) {
+ modifications++;
+ }
+ for (String name : names) {
+ Set<ELReference> els = elsByVariableName.get(name);
+ if(els!=null) {
+ els.remove(el);
+ if(els.isEmpty()) {
+ elsByVariableName.remove(name);
+ }
+ }
+ }
+ }
+
/**
* Removes link between EL and variable name.
* @param name
@@ -110,10 +146,10 @@
if(linkedEls.remove(el)) {
modifications++;
}
+ if(linkedEls.isEmpty()) {
+ elsByVariableName.remove(name);
+ }
}
- if(linkedEls.isEmpty()) {
- elsByVariableName.remove(name);
- }
// Remove link between EL and variable names.
Set<String> variableNames = variableNamesByEl.get(el);
@@ -121,10 +157,10 @@
if(variableNames.remove(name)) {
modifications++;
}
+ if(variableNames.isEmpty()) {
+ variableNamesByEl.remove(el);
+ }
}
- if(variableNames.isEmpty()) {
- variableNamesByEl.remove(el);
- }
}
/**
Modified: trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/internal/ProjectValidationContext.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/internal/ProjectValidationContext.java 2012-02-10 23:19:46 UTC (rev 38633)
+++ trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/internal/ProjectValidationContext.java 2012-02-10 23:58:01 UTC (rev 38634)
@@ -189,10 +189,15 @@
}
}
}
+ // Threat resource path as a variable name too.
+ Set<ELReference> els = elLinks.getElsByVariableName(resource.getFullPath().toString());
+ if(els!=null) {
+ result.addAll(els);
+ }
if(oldVariableNamesForELValidation!=null) {
for (String oldName :oldVariableNamesForELValidation) {
if(!onlyChangedVariables || newNames==null || !newNames.contains(oldName)) {
- Set<ELReference> els = elLinks.getElsByVariableName(oldName);
+ els = elLinks.getElsByVariableName(oldName);
if(els!=null) {
result.addAll(els);
}
@@ -243,6 +248,14 @@
/*
* (non-Javadoc)
+ * @see org.jboss.tools.common.validation.IProjectValidationContext#removeLinkedEl(org.jboss.tools.common.el.core.ELReference)
+ */
+ public void removeLinkedEl(ELReference el) {
+ elLinks.removeLinkedEl(el);
+ }
+
+ /*
+ * (non-Javadoc)
* @see org.jboss.tools.jst.web.kb.validation.IValidationContext#getElsByVariableName(java.lang.String)
*/
public Set<ELReference> getElsByVariableName(String variableName) {
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ELValidator.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ELValidator.java 2012-02-10 23:19:46 UTC (rev 38633)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ELValidator.java 2012-02-10 23:58:01 UTC (rev 38634)
@@ -193,6 +193,7 @@
if(i++>1000) {
break;
}
+ validationContext.removeLinkedEl(el);
elsToValidate.add(el);
}
}
@@ -319,6 +320,18 @@
if(elResolution==null) {
continue;
}
+// ELSegment previousSegment = null;
+ for (ELSegment segment : elResolution.getSegments()) {
+ IResource resource = segment.getResource();
+ if(resource instanceof IFile) {
+ validationContext.addLinkedEl(resource.getFullPath().toString(), elReference);
+// if(!segment.isResolved() && previousSegment!=null && previousSegment.isResolved() && previousSegment instanceof JavaMemberELSegment) {
+// IJavaElement element = ((JavaMemberELSegment)previousSegment).getJavaElement();
+// element
+// }
+ }
+// previousSegment = segment;
+ }
if(elResolution.isResolved()) {
resolution = elResolution;
break;
14 years, 1 month
JBoss Tools SVN: r38633 - trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-02-10 18:19:46 -0500 (Fri, 10 Feb 2012)
New Revision: 38633
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPage.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPageModel.java
Log:
[JBIDE-10847] clearing app name, cartridge and embedded cartridges when you uncheck "use existing app"
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPage.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPage.java 2012-02-10 23:12:28 UTC (rev 38632)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPage.java 2012-02-10 23:19:46 UTC (rev 38633)
@@ -341,6 +341,9 @@
*/
private void enableApplicationWidgets(final Boolean useExisting, final Group applicationConfigurationGroup,
final Text applicationNameText, final Button applicationBrowseButton) {
+ if (!useExisting) {
+ pageModel.resetExistingApplication();
+ }
applicationNameText.setEnabled(useExisting);
applicationBrowseButton.setEnabled(useExisting);
UIUtils.doForAllChildren(new UIUtils.IWidgetVisitor() {
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPageModel.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPageModel.java 2012-02-10 23:12:28 UTC (rev 38632)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPageModel.java 2012-02-10 23:19:46 UTC (rev 38633)
@@ -178,6 +178,14 @@
setSelectedEmbeddableCartridges(embeddedCartridges);
}
+ public void resetExistingApplication() {
+ wizardModel.setApplication(null);
+ setExistingApplicationName(null);
+ setApplicationName(null);
+ setSelectedCartridge(null);
+ setSelectedEmbeddableCartridges(new HashSet<IEmbeddableCartridge>());
+ }
+
public void setApplicationName(String applicationName) {
wizardModel.setApplicationName(applicationName);
firePropertyChange(PROPERTY_APPLICATION_NAME, this.applicationName, this.applicationName = applicationName);
14 years, 1 month
JBoss Tools SVN: r38632 - in trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard: appimport and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-02-10 18:12:28 -0500 (Fri, 10 Feb 2012)
New Revision: 38632
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPage.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPageModel.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ConfigureGitSharedProject.java
Log:
[JBIDE-10847] Embedded cartridges are now check if you select an existing app
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPage.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPage.java 2012-02-10 23:09:04 UTC (rev 38631)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPage.java 2012-02-10 23:12:28 UTC (rev 38632)
@@ -11,7 +11,6 @@
package org.jboss.tools.openshift.express.internal.ui.wizard;
import java.util.Collection;
-import java.util.HashSet;
import java.util.List;
import java.util.Set;
@@ -137,10 +136,11 @@
this.existingAppNameText = new Text(existingAppSelectionGroup, SWT.BORDER);
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).span(1, 1).grab(true, false)
.applyTo(existingAppNameText);
- final IObservableValue existingAppNameModelObservable = BeanProperties.value(
- ApplicationConfigurationWizardPageModel.PROPERTY_EXISTING_APPLICATION_NAME).observe(pageModel);
- final ISWTObservableValue existingAppNameTextObservable = WidgetProperties.text(SWT.Modify).observe(
- existingAppNameText);
+ final IObservableValue existingAppNameModelObservable =
+ BeanProperties.value(
+ ApplicationConfigurationWizardPageModel.PROPERTY_EXISTING_APPLICATION_NAME).observe(pageModel);
+ final ISWTObservableValue existingAppNameTextObservable =
+ WidgetProperties.text(SWT.Modify).observe(existingAppNameText);
ValueBindingBuilder
.bind(existingAppNameTextObservable)
.to(existingAppNameModelObservable)
@@ -205,12 +205,7 @@
final IApplication selectedApplication = appSelectionDialog.getSelectedApplication();
if (selectedApplication != null) {
try {
- pageModel.setApplicationName(selectedApplication.getName());
- newApplicationNameText.setText(selectedApplication.getName());
- pageModel.setSelectedCartridge(selectedApplication.getCartridge());
- Set<IEmbeddableCartridge> embeddedCartridges = new HashSet<IEmbeddableCartridge>();
- embeddedCartridges.addAll(selectedApplication.getEmbeddedCartridges());
- pageModel.setSelectedEmbeddableCartridges(embeddedCartridges);
+ pageModel.setExistingApplication(selectedApplication);
} catch (OpenShiftException ex) {
OpenShiftUIActivator.log(OpenShiftUIActivator.createErrorStatus(NLS.bind(
"Could not get embedded cartridges for application {0}",
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPageModel.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPageModel.java 2012-02-10 23:09:04 UTC (rev 38631)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPageModel.java 2012-02-10 23:12:28 UTC (rev 38632)
@@ -12,6 +12,7 @@
import java.util.ArrayList;
import java.util.Collections;
+import java.util.HashSet;
import java.util.List;
import java.util.Set;
@@ -164,6 +165,19 @@
return cartridges;
}
+ public void setExistingApplication(IApplication application) throws OpenShiftException {
+ if (application == null) {
+ return;
+ }
+ wizardModel.setApplication(application);
+ setExistingApplicationName(application.getName());
+ setApplicationName(application.getName());
+ setSelectedCartridge(application.getCartridge());
+ Set<IEmbeddableCartridge> embeddedCartridges = new HashSet<IEmbeddableCartridge>();
+ embeddedCartridges.addAll(application.getEmbeddedCartridges());
+ setSelectedEmbeddableCartridges(embeddedCartridges);
+ }
+
public void setApplicationName(String applicationName) {
wizardModel.setApplicationName(applicationName);
firePropertyChange(PROPERTY_APPLICATION_NAME, this.applicationName, this.applicationName = applicationName);
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ConfigureGitSharedProject.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ConfigureGitSharedProject.java 2012-02-10 23:09:04 UTC (rev 38631)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ConfigureGitSharedProject.java 2012-02-10 23:12:28 UTC (rev 38632)
@@ -19,6 +19,7 @@
import java.util.Collection;
import java.util.Collections;
import java.util.List;
+import java.util.regex.Pattern;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
@@ -28,8 +29,10 @@
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.egit.core.op.AddToIndexOperation;
import org.eclipse.jgit.lib.Repository;
+import org.eclipse.jgit.transport.RemoteConfig;
import org.eclipse.osgi.util.NLS;
import org.jboss.ide.eclipse.as.core.util.FileUtil;
+import org.jboss.ide.eclipse.as.core.util.RegExUtils;
import org.jboss.tools.openshift.egit.core.EGitUtils;
import org.jboss.tools.openshift.egit.core.GitIgnore;
import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
@@ -120,7 +123,12 @@
Repository repository = EGitUtils.getRepository(project);
Assert.isTrue(repository != null);
- if (EGitUtils.hasRemote(remoteName, repository)) {
+ RemoteConfig config = EGitUtils.getRemoteByName(remoteName, repository);
+ if (config != null) {
+ if (EGitUtils.hasRemoteUrl(
+ Pattern.compile(RegExUtils.escapeRegex(getApplication().getGitUri())), config)) {
+ return;
+ }
// we shouldn't get here, the UI should validate the remote name and
// inform about an error in this case
throw new OpenShiftUIException(
14 years, 1 month
JBoss Tools SVN: r38631 - in trunk/runtime/plugins: org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core and 7 other directories.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2012-02-10 18:09:04 -0500 (Fri, 10 Feb 2012)
New Revision: 38631
Added:
trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/RuntimeDefinition.java
Removed:
trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/ServerDefinition.java
Modified:
trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/src/org/jboss/tools/runtime/handlers/JBossASHandler.java
trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/JBossRuntimeLocator.java
trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/AbstractRuntimeDetector.java
trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/IRuntimeDetector.java
trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/InvalidRuntimeDetector.java
trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/RuntimePath.java
trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/src/org/jboss/tools/runtime/handlers/DroolsHandler.java
trunk/runtime/plugins/org.jboss.tools.runtime.esb.detector/src/org/jboss/tools/runtime/handlers/EsbHandler.java
trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/src/org/jboss/tools/runtime/handlers/JbpmHandler.java
trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/src/org/jboss/tools/runtime/handlers/SeamHandler.java
trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/JBossRuntimeStartup.java
trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/RuntimeContentProvider.java
trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/RuntimeLabelProvider.java
trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/RuntimeScanner.java
trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/RuntimeUIActivator.java
trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/dialogs/DownloadRuntimeDialog.java
trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/dialogs/EditRuntimePathDialog.java
trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/dialogs/SearchRuntimePathDialog.java
Log:
JBIDE-10244 Cleaning up Runtime plugin
Modified: trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/src/org/jboss/tools/runtime/handlers/JBossASHandler.java
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/src/org/jboss/tools/runtime/handlers/JBossASHandler.java 2012-02-10 23:08:50 UTC (rev 38630)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.as.detector/src/org/jboss/tools/runtime/handlers/JBossASHandler.java 2012-02-10 23:09:04 UTC (rev 38631)
@@ -56,7 +56,7 @@
import org.jboss.tools.runtime.core.RuntimeCoreActivator;
import org.jboss.tools.runtime.core.model.AbstractRuntimeDetector;
import org.jboss.tools.runtime.core.model.IRuntimeDetector;
-import org.jboss.tools.runtime.core.model.ServerDefinition;
+import org.jboss.tools.runtime.core.model.RuntimeDefinition;
import org.osgi.framework.Bundle;
public class JBossASHandler extends AbstractRuntimeDetector implements IJBossRuntimePluginConstants {
@@ -68,11 +68,11 @@
private static final String DROOLS = "DROOLS"; // NON-NLS-1$
private static final String ESB = "ESB"; //$NON-NLS-1$
- public void initializeRuntimes(List<ServerDefinition> serverDefinitions) {
+ public void initializeRuntimes(List<RuntimeDefinition> serverDefinitions) {
createJBossServerFromDefinitions(serverDefinitions);
}
- private static File getLocation(ServerDefinition serverDefinition) {
+ private static File getLocation(RuntimeDefinition serverDefinition) {
String type = serverDefinition.getType();
String version = serverDefinition.getVersion();
if (EAP.equals(type) && version != null && version.startsWith("6") ) {
@@ -93,8 +93,8 @@
return null;
}
- public static void createJBossServerFromDefinitions(List<ServerDefinition> serverDefinitions) {
- for (ServerDefinition serverDefinition:serverDefinitions) {
+ public static void createJBossServerFromDefinitions(List<RuntimeDefinition> serverDefinitions) {
+ for (RuntimeDefinition serverDefinition:serverDefinitions) {
if (!serverDefinition.isEnabled()) {
continue;
}
@@ -137,7 +137,7 @@
}
}
- private static int getJBossASVersion(File asLocation, ServerDefinition serverDefinition) {
+ private static int getJBossASVersion(File asLocation, RuntimeDefinition serverDefinition) {
int index = -1;
String type = serverDefinition.getType();
String ver = serverDefinition.getVersion();
@@ -327,7 +327,7 @@
}
- public ServerDefinition getServerDefinition(File root,
+ public RuntimeDefinition getServerDefinition(File root,
IProgressMonitor monitor) {
if (monitor.isCanceled() || root == null || !isEnabled()) {
return null;
@@ -336,7 +336,7 @@
ServerBean serverBean = loader.getServerBean();
if (!JBossServerType.UNKNOWN.equals(serverBean.getType())) {
- ServerDefinition serverDefinition = new ServerDefinition(serverBean.getName(),
+ RuntimeDefinition serverDefinition = new RuntimeDefinition(serverBean.getName(),
serverBean.getVersion(), serverBean.getType().getId(), new File(serverBean.getLocation()));
calculateIncludedServerDefinition(serverDefinition, monitor);
return serverDefinition;
@@ -345,7 +345,7 @@
}
private void calculateIncludedServerDefinition(
- ServerDefinition serverDefinition, IProgressMonitor monitor) {
+ RuntimeDefinition serverDefinition, IProgressMonitor monitor) {
if (serverDefinition == null || serverDefinition.getType() == null) {
return;
}
@@ -354,7 +354,7 @@
return;
}
serverDefinition.getIncludedServerDefinitions().clear();
- List<ServerDefinition> serverDefinitions = serverDefinition
+ List<RuntimeDefinition> serverDefinitions = serverDefinition
.getIncludedServerDefinitions();
JBossRuntimeLocator locator = new JBossRuntimeLocator();
final File location = getLocation(serverDefinition);
@@ -373,9 +373,9 @@
try {
setEnabled(false);
for (File directory : directories) {
- List<ServerDefinition> definitions = new ArrayList<ServerDefinition>();
+ List<RuntimeDefinition> definitions = new ArrayList<RuntimeDefinition>();
locator.searchDirectory(directory, definitions, 1, monitor);
- for (ServerDefinition definition:definitions) {
+ for (RuntimeDefinition definition:definitions) {
definition.setParent(serverDefinition);
}
serverDefinitions.addAll(definitions);
@@ -389,7 +389,7 @@
}
}
- private void addDrools(ServerDefinition serverDefinition) {
+ private void addDrools(RuntimeDefinition serverDefinition) {
if (serverDefinition == null) {
return;
}
@@ -400,7 +400,7 @@
File droolsRoot = serverDefinition.getLocation();
if (droolsRoot.isDirectory()) {
String name = "Drools - " + serverDefinition.getName();
- ServerDefinition droolsDefinition = new ServerDefinition(
+ RuntimeDefinition droolsDefinition = new RuntimeDefinition(
name, serverDefinition.getVersion(), DROOLS,
droolsRoot);
droolsDefinition.setParent(serverDefinition);
@@ -410,7 +410,7 @@
}
}
- private void addEsb(ServerDefinition serverDefinition) {
+ private void addEsb(RuntimeDefinition serverDefinition) {
if (serverDefinition == null) {
return;
}
@@ -428,7 +428,7 @@
if (esbRoot.isDirectory()) {
String name = "ESB - " + serverDefinition.getName();
String version="";
- ServerDefinition esbDefinition = new ServerDefinition(
+ RuntimeDefinition esbDefinition = new RuntimeDefinition(
name, version, ESB,
esbRoot);
IRuntimeDetector esbDetector = RuntimeCoreActivator.getEsbDetector();
@@ -454,7 +454,7 @@
}
@Override
- public boolean exists(ServerDefinition serverDefinition) {
+ public boolean exists(RuntimeDefinition serverDefinition) {
if (serverDefinition == null || serverDefinition.getLocation() == null) {
return false;
}
@@ -481,7 +481,7 @@
@Override
public void computeIncludedServerDefinition(
- ServerDefinition serverDefinition) {
+ RuntimeDefinition serverDefinition) {
if (serverDefinition == null) {
return;
}
Modified: trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/JBossRuntimeLocator.java
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/JBossRuntimeLocator.java 2012-02-10 23:08:50 UTC (rev 38630)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/JBossRuntimeLocator.java 2012-02-10 23:09:04 UTC (rev 38631)
@@ -20,7 +20,7 @@
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.Path;
import org.jboss.tools.runtime.core.model.IRuntimeDetector;
-import org.jboss.tools.runtime.core.model.ServerDefinition;
+import org.jboss.tools.runtime.core.model.RuntimeDefinition;
/**
* @author snjeza
@@ -33,17 +33,17 @@
public JBossRuntimeLocator() {
}
- public List<ServerDefinition> searchForRuntimes(String path, IProgressMonitor monitor) {
+ public List<RuntimeDefinition> searchForRuntimes(String path, IProgressMonitor monitor) {
return searchForRuntimes(new Path(path), monitor);
}
- public List<ServerDefinition> searchForRuntimes(IPath path, IProgressMonitor monitor) {
- List<ServerDefinition> serverDefinitions = new ArrayList<ServerDefinition>();
+ public List<RuntimeDefinition> searchForRuntimes(IPath path, IProgressMonitor monitor) {
+ List<RuntimeDefinition> serverDefinitions = new ArrayList<RuntimeDefinition>();
searchForRuntimes(serverDefinitions, path, monitor);
return serverDefinitions;
}
- private void searchForRuntimes(List<ServerDefinition> serverDefinitions, IPath path,
+ private void searchForRuntimes(List<RuntimeDefinition> serverDefinitions, IPath path,
IProgressMonitor monitor) {
File[] files = null;
if (path != null) {
@@ -73,7 +73,7 @@
}
- public void searchDirectory(File directory, List<ServerDefinition> serverDefinitions,
+ public void searchDirectory(File directory, List<RuntimeDefinition> serverDefinitions,
int depth, IProgressMonitor monitor) {
if (depth == 0 || monitor.isCanceled() || directory == null || !directory.isDirectory()) {
return;
@@ -89,7 +89,7 @@
if (!detector.isEnabled()) {
continue;
}
- ServerDefinition serverDefinition = detector.getServerDefinition(directory, monitor);
+ RuntimeDefinition serverDefinition = detector.getServerDefinition(directory, monitor);
if (serverDefinition != null) {
serverDefinitions.add(serverDefinition);
return;
Modified: trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/AbstractRuntimeDetector.java
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/AbstractRuntimeDetector.java 2012-02-10 23:08:50 UTC (rev 38630)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/AbstractRuntimeDetector.java 2012-02-10 23:09:04 UTC (rev 38631)
@@ -126,7 +126,7 @@
@Override
public void computeIncludedServerDefinition(
- ServerDefinition serverDefinition) {
+ RuntimeDefinition serverDefinition) {
}
@@ -139,7 +139,7 @@
}
@Override
- public String getVersion(ServerDefinition serverDefinition) {
+ public String getVersion(RuntimeDefinition serverDefinition) {
if (serverDefinition != null) {
return serverDefinition.getVersion();
}
Modified: trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/IRuntimeDetector.java
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/IRuntimeDetector.java 2012-02-10 23:08:50 UTC (rev 38630)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/IRuntimeDetector.java 2012-02-10 23:09:04 UTC (rev 38631)
@@ -20,7 +20,7 @@
*
*/
public interface IRuntimeDetector extends Comparable<IRuntimeDetector> {
- void initializeRuntimes(List<ServerDefinition> serverDefinitions);
+ void initializeRuntimes(List<RuntimeDefinition> serverDefinitions);
void setName(String name);
@@ -38,19 +38,19 @@
boolean isEnabled();
- ServerDefinition getServerDefinition(File root, IProgressMonitor monitor);
+ RuntimeDefinition getServerDefinition(File root, IProgressMonitor monitor);
- boolean exists(ServerDefinition serverDefinition);
+ boolean exists(RuntimeDefinition serverDefinition);
int getPriority();
void setPriority(int priority);
- void computeIncludedServerDefinition(ServerDefinition serverDefinition);
+ void computeIncludedServerDefinition(RuntimeDefinition serverDefinition);
boolean isValid();
void setValid(boolean valid);
- String getVersion(ServerDefinition serverDefinition);
+ String getVersion(RuntimeDefinition serverDefinition);
}
Modified: trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/InvalidRuntimeDetector.java
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/InvalidRuntimeDetector.java 2012-02-10 23:08:50 UTC (rev 38630)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/InvalidRuntimeDetector.java 2012-02-10 23:09:04 UTC (rev 38631)
@@ -23,18 +23,18 @@
public class InvalidRuntimeDetector extends AbstractRuntimeDetector {
@Override
- public void initializeRuntimes(List<ServerDefinition> serverDefinitions) {
+ public void initializeRuntimes(List<RuntimeDefinition> serverDefinitions) {
}
@Override
- public ServerDefinition getServerDefinition(File root,
+ public RuntimeDefinition getServerDefinition(File root,
IProgressMonitor monitor) {
return null;
}
@Override
- public boolean exists(ServerDefinition serverDefinition) {
+ public boolean exists(RuntimeDefinition serverDefinition) {
return false;
}
Copied: trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/RuntimeDefinition.java (from rev 35631, trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/ServerDefinition.java)
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/RuntimeDefinition.java (rev 0)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/RuntimeDefinition.java 2012-02-10 23:09:04 UTC (rev 38631)
@@ -0,0 +1,158 @@
+/*************************************************************************************
+ * Copyright (c) 2010-2011 Red Hat, Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
+package org.jboss.tools.runtime.core.model;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author snjeza
+ *
+ */
+public class RuntimeDefinition {
+
+ private String name;
+ private String version;
+ private String type;
+ private File location;
+ private String description;
+ private boolean enabled = true;
+ private RuntimePath runtimePath;
+ private List<RuntimeDefinition> includedServerDefinitions = new ArrayList<RuntimeDefinition>();
+ private RuntimeDefinition parent;
+
+ public RuntimeDefinition(String name, String version,
+ String type, File location) {
+ super();
+ this.name = name;
+ this.version = version;
+ this.type = type;
+ this.location = location;
+ this.description = "";
+ }
+
+ public String getName() {
+ return name;
+ }
+ public void setName(String name) {
+ this.name = name;
+ }
+ public String getVersion() {
+ return version;
+ }
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ public File getLocation() {
+ return location;
+ }
+
+ public void setLocation(File location) {
+ this.location = location;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result
+ + ((location == null) ? 0 : location.hashCode());
+ result = prime * result + ((name == null) ? 0 : name.hashCode());
+ result = prime * result + ((type == null) ? 0 : type.hashCode());
+ result = prime * result + ((version == null) ? 0 : version.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ RuntimeDefinition other = (RuntimeDefinition) obj;
+ if (location == null) {
+ if (other.location != null)
+ return false;
+ } else if (!location.equals(other.location))
+ return false;
+ if (name == null) {
+ if (other.name != null)
+ return false;
+ } else if (!name.equals(other.name))
+ return false;
+ if (type == null) {
+ if (other.type != null)
+ return false;
+ } else if (!type.equals(other.type))
+ return false;
+ if (version == null) {
+ if (other.version != null)
+ return false;
+ } else if (!version.equals(other.version))
+ return false;
+ return true;
+ }
+
+ @Override
+ public String toString() {
+ return "ServerDefinition [name=" + name + ", version=" + version
+ + ", type=" + type + ", location=" + location + "]";
+ }
+
+ public boolean isEnabled() {
+ return enabled;
+ }
+
+ public void setEnabled(boolean enabled) {
+ this.enabled = enabled;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public RuntimePath getRuntimePath() {
+ return runtimePath;
+ }
+
+ public void setRuntimePath(RuntimePath runtimePath) {
+ this.runtimePath = runtimePath;
+ }
+
+ public List<RuntimeDefinition> getIncludedServerDefinitions() {
+ return includedServerDefinitions;
+ }
+
+ public RuntimeDefinition getParent() {
+ return parent;
+ }
+
+ public void setParent(RuntimeDefinition parent) {
+ this.parent = parent;
+ }
+
+}
Modified: trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/RuntimePath.java
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/RuntimePath.java 2012-02-10 23:08:50 UTC (rev 38630)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/RuntimePath.java 2012-02-10 23:09:04 UTC (rev 38631)
@@ -14,7 +14,7 @@
import java.util.ArrayList;
import java.util.List;
-import org.jboss.tools.runtime.core.model.ServerDefinition;
+import org.jboss.tools.runtime.core.model.RuntimeDefinition;
/**
* @author snjeza
@@ -24,13 +24,13 @@
private String path;
private boolean scanOnEveryStartup;
- private List<ServerDefinition> serverDefinitions;
+ private List<RuntimeDefinition> serverDefinitions;
private long timestamp;
public RuntimePath(String path) {
this.path = path;
this.scanOnEveryStartup = false;
- this.serverDefinitions = new ArrayList<ServerDefinition>();
+ this.serverDefinitions = new ArrayList<RuntimeDefinition>();
this.timestamp = -1;
}
@@ -50,7 +50,7 @@
this.scanOnEveryStartup = scanOnEveryStartup;
}
- public List<ServerDefinition> getServerDefinitions() {
+ public List<RuntimeDefinition> getServerDefinitions() {
return serverDefinitions;
}
@@ -58,7 +58,7 @@
public Object clone() throws CloneNotSupportedException {
RuntimePath runtimePath = new RuntimePath(path);
runtimePath.setScanOnEveryStartup(scanOnEveryStartup);
- runtimePath.serverDefinitions = (List<ServerDefinition>) ((ArrayList<ServerDefinition>)serverDefinitions).clone();
+ runtimePath.serverDefinitions = (List<RuntimeDefinition>) ((ArrayList<RuntimeDefinition>)serverDefinitions).clone();
return runtimePath;
}
Deleted: trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/ServerDefinition.java
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/ServerDefinition.java 2012-02-10 23:08:50 UTC (rev 38630)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/ServerDefinition.java 2012-02-10 23:09:04 UTC (rev 38631)
@@ -1,158 +0,0 @@
-/*************************************************************************************
- * Copyright (c) 2010-2011 Red Hat, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * JBoss by Red Hat - Initial implementation.
- ************************************************************************************/
-package org.jboss.tools.runtime.core.model;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @author snjeza
- *
- */
-public class ServerDefinition {
-
- private String name;
- private String version;
- private String type;
- private File location;
- private String description;
- private boolean enabled = true;
- private RuntimePath runtimePath;
- private List<ServerDefinition> includedServerDefinitions = new ArrayList<ServerDefinition>();
- private ServerDefinition parent;
-
- public ServerDefinition(String name, String version,
- String type, File location) {
- super();
- this.name = name;
- this.version = version;
- this.type = type;
- this.location = location;
- this.description = "";
- }
-
- public String getName() {
- return name;
- }
- public void setName(String name) {
- this.name = name;
- }
- public String getVersion() {
- return version;
- }
- public void setVersion(String version) {
- this.version = version;
- }
-
- public String getType() {
- return type;
- }
-
- public void setType(String type) {
- this.type = type;
- }
-
- public File getLocation() {
- return location;
- }
-
- public void setLocation(File location) {
- this.location = location;
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result
- + ((location == null) ? 0 : location.hashCode());
- result = prime * result + ((name == null) ? 0 : name.hashCode());
- result = prime * result + ((type == null) ? 0 : type.hashCode());
- result = prime * result + ((version == null) ? 0 : version.hashCode());
- return result;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (getClass() != obj.getClass())
- return false;
- ServerDefinition other = (ServerDefinition) obj;
- if (location == null) {
- if (other.location != null)
- return false;
- } else if (!location.equals(other.location))
- return false;
- if (name == null) {
- if (other.name != null)
- return false;
- } else if (!name.equals(other.name))
- return false;
- if (type == null) {
- if (other.type != null)
- return false;
- } else if (!type.equals(other.type))
- return false;
- if (version == null) {
- if (other.version != null)
- return false;
- } else if (!version.equals(other.version))
- return false;
- return true;
- }
-
- @Override
- public String toString() {
- return "ServerDefinition [name=" + name + ", version=" + version
- + ", type=" + type + ", location=" + location + "]";
- }
-
- public boolean isEnabled() {
- return enabled;
- }
-
- public void setEnabled(boolean enabled) {
- this.enabled = enabled;
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public RuntimePath getRuntimePath() {
- return runtimePath;
- }
-
- public void setRuntimePath(RuntimePath runtimePath) {
- this.runtimePath = runtimePath;
- }
-
- public List<ServerDefinition> getIncludedServerDefinitions() {
- return includedServerDefinitions;
- }
-
- public ServerDefinition getParent() {
- return parent;
- }
-
- public void setParent(ServerDefinition parent) {
- this.parent = parent;
- }
-
-}
Modified: trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/src/org/jboss/tools/runtime/handlers/DroolsHandler.java
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/src/org/jboss/tools/runtime/handlers/DroolsHandler.java 2012-02-10 23:08:50 UTC (rev 38630)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.drools.detector/src/org/jboss/tools/runtime/handlers/DroolsHandler.java 2012-02-10 23:09:04 UTC (rev 38631)
@@ -19,7 +19,7 @@
import org.drools.eclipse.util.DroolsRuntimeManager;
import org.eclipse.core.runtime.IProgressMonitor;
import org.jboss.tools.runtime.core.model.AbstractRuntimeDetector;
-import org.jboss.tools.runtime.core.model.ServerDefinition;
+import org.jboss.tools.runtime.core.model.RuntimeDefinition;
public class DroolsHandler extends AbstractRuntimeDetector {
@@ -27,7 +27,7 @@
private static final String SOA_P = "SOA-P"; //$NON-NLS-1$
@Override
- public void initializeRuntimes(List<ServerDefinition> serverDefinitions) {
+ public void initializeRuntimes(List<RuntimeDefinition> serverDefinitions) {
DroolsRuntime[] existingRuntimes = DroolsRuntimeManager
.getDroolsRuntimes();
List<DroolsRuntime> droolsRuntimes = new ArrayList<DroolsRuntime>();
@@ -44,9 +44,9 @@
}
- private void initializeInternal(List<ServerDefinition> serverDefinitions,
+ private void initializeInternal(List<RuntimeDefinition> serverDefinitions,
List<DroolsRuntime> droolsRuntimes) {
- for (ServerDefinition serverDefinition : serverDefinitions) {
+ for (RuntimeDefinition serverDefinition : serverDefinitions) {
String type = serverDefinition.getType();
if (serverDefinition.isEnabled() && !droolsExists(serverDefinition)) {
if (DROOLS.equals(type)) {
@@ -70,7 +70,7 @@
* @param serverDefinition
* @return
*/
- private static boolean droolsExists(ServerDefinition serverDefinition) {
+ private static boolean droolsExists(RuntimeDefinition serverDefinition) {
DroolsRuntime[] droolsRuntimes = DroolsRuntimeManager
.getDroolsRuntimes();
for (DroolsRuntime dr : droolsRuntimes) {
@@ -85,7 +85,7 @@
}
@Override
- public ServerDefinition getServerDefinition(File root,
+ public RuntimeDefinition getServerDefinition(File root,
IProgressMonitor monitor) {
if (monitor.isCanceled() || root == null) {
return null;
@@ -103,7 +103,7 @@
String version = getImplementationVersion(root, files[0]);
if (version != null) {
version = version.substring(0, 3);
- return new ServerDefinition(root.getName(), version, DROOLS,
+ return new RuntimeDefinition(root.getName(), version, DROOLS,
root.getAbsoluteFile());
}
}
@@ -111,7 +111,7 @@
}
@Override
- public boolean exists(ServerDefinition serverDefinition) {
+ public boolean exists(RuntimeDefinition serverDefinition) {
if (serverDefinition == null || serverDefinition.getLocation() == null) {
return false;
}
@@ -119,7 +119,7 @@
}
public static void calculateIncludedServerDefinition(
- ServerDefinition serverDefinition) {
+ RuntimeDefinition serverDefinition) {
if (serverDefinition == null
|| !SOA_P.equals(serverDefinition.getType())) {
return;
@@ -127,7 +127,7 @@
File droolsRoot = serverDefinition.getLocation(); //$NON-NLS-1$
if (droolsRoot.isDirectory()) {
String name = "Drools - " + serverDefinition.getName(); //$NON-NLS-1$
- ServerDefinition sd = new ServerDefinition(name,
+ RuntimeDefinition sd = new RuntimeDefinition(name,
serverDefinition.getVersion(), DROOLS, droolsRoot);
sd.setParent(serverDefinition);
serverDefinition.getIncludedServerDefinitions().add(sd);
Modified: trunk/runtime/plugins/org.jboss.tools.runtime.esb.detector/src/org/jboss/tools/runtime/handlers/EsbHandler.java
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.esb.detector/src/org/jboss/tools/runtime/handlers/EsbHandler.java 2012-02-10 23:08:50 UTC (rev 38630)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.esb.detector/src/org/jboss/tools/runtime/handlers/EsbHandler.java 2012-02-10 23:09:04 UTC (rev 38631)
@@ -17,15 +17,15 @@
import org.jboss.tools.esb.core.runtime.JBossESBRuntime;
import org.jboss.tools.esb.core.runtime.JBossRuntimeManager;
import org.jboss.tools.runtime.core.model.AbstractRuntimeDetector;
-import org.jboss.tools.runtime.core.model.ServerDefinition;
+import org.jboss.tools.runtime.core.model.RuntimeDefinition;
public class EsbHandler extends AbstractRuntimeDetector {
private static final String DEFAULT_CONFIGURATION = "default";
private static final String ESB = "ESB"; //$NON-NLS-1$
- public void initializeRuntimes(List<ServerDefinition> serverDefinitions) {
- for (ServerDefinition serverDefinition : serverDefinitions) {
+ public void initializeRuntimes(List<RuntimeDefinition> serverDefinitions) {
+ for (RuntimeDefinition serverDefinition : serverDefinitions) {
String type = serverDefinition.getType();
if (serverDefinition.isEnabled() && !esbExists(serverDefinition)) {
if (ESB.equals(type)) {
@@ -46,7 +46,7 @@
* @param serverDefinition
* @return
*/
- private static boolean esbExists(ServerDefinition serverDefinition) {
+ private static boolean esbExists(RuntimeDefinition serverDefinition) {
JBossESBRuntime[] runtimes = JBossRuntimeManager.getInstance().getRuntimes();
for (JBossESBRuntime runtime:runtimes) {
String location = runtime.getHomeDir();
@@ -57,7 +57,7 @@
return false;
}
- public ServerDefinition getServerDefinition(File root,
+ public RuntimeDefinition getServerDefinition(File root,
IProgressMonitor monitor) {
if (monitor.isCanceled() || root == null) {
return null;
@@ -67,7 +67,7 @@
}
@Override
- public boolean exists(ServerDefinition serverDefinition) {
+ public boolean exists(RuntimeDefinition serverDefinition) {
if (serverDefinition == null || serverDefinition.getLocation() == null) {
return false;
}
@@ -75,7 +75,7 @@
}
@Override
- public String getVersion(ServerDefinition serverDefinition) {
+ public String getVersion(RuntimeDefinition serverDefinition) {
if (serverDefinition == null || serverDefinition.getLocation() == null) {
return null;
}
Modified: trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/src/org/jboss/tools/runtime/handlers/JbpmHandler.java
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/src/org/jboss/tools/runtime/handlers/JbpmHandler.java 2012-02-10 23:08:50 UTC (rev 38630)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.jbpm.detector/src/org/jboss/tools/runtime/handlers/JbpmHandler.java 2012-02-10 23:09:04 UTC (rev 38631)
@@ -20,7 +20,7 @@
import org.jboss.tools.jbpm.preferences.JbpmInstallation;
import org.jboss.tools.jbpm.preferences.PreferencesManager;
import org.jboss.tools.runtime.core.model.AbstractRuntimeDetector;
-import org.jboss.tools.runtime.core.model.ServerDefinition;
+import org.jboss.tools.runtime.core.model.RuntimeDefinition;
public class JbpmHandler extends AbstractRuntimeDetector {
@@ -30,7 +30,7 @@
private static final String SOA_P = "SOA-P"; //$NON-NLS-1$
private static final String SOA_P_STD = "SOA-P-STD"; //$NON-NLS-1$
- public static File getJbpmRoot(ServerDefinition serverDefinition) {
+ public static File getJbpmRoot(RuntimeDefinition serverDefinition) {
String type = serverDefinition.getType();
if (SOA_P.equals(type) || SOA_P_STD.equals(type)) {
return new File(serverDefinition.getLocation(),"jbpm-jpdl"); //$NON-NLS-1$
@@ -42,8 +42,8 @@
}
@Override
- public void initializeRuntimes(List<ServerDefinition> serverDefinitions) {
- for (ServerDefinition serverDefinition : serverDefinitions) {
+ public void initializeRuntimes(List<RuntimeDefinition> serverDefinitions) {
+ for (RuntimeDefinition serverDefinition : serverDefinitions) {
if (serverDefinition.isEnabled() && !jbpmExists(serverDefinition)) {
File jbpmRoot = getJbpmRoot(serverDefinition);
if (jbpmRoot == null || !jbpmRoot.isDirectory()) {
@@ -63,7 +63,7 @@
* @param serverDefinition
* @return
*/
- public static boolean jbpmExists(ServerDefinition serverDefinition) {
+ public static boolean jbpmExists(RuntimeDefinition serverDefinition) {
File jbpmRoot = getJbpmRoot(serverDefinition);
if (jbpmRoot == null || !jbpmRoot.isDirectory()) {
return false;
@@ -80,7 +80,7 @@
}
@Override
- public ServerDefinition getServerDefinition(File root,
+ public RuntimeDefinition getServerDefinition(File root,
IProgressMonitor monitor) {
if (monitor.isCanceled() || root == null) {
return null;
@@ -100,7 +100,7 @@
name = root.getName() + " " + index++;
nameExists = PreferencesManager.getInstance().getJbpmInstallation(name) != null;
}
- return new ServerDefinition(name, version, JBPM, root.getAbsoluteFile());
+ return new RuntimeDefinition(name, version, JBPM, root.getAbsoluteFile());
}
return null;
}
@@ -118,7 +118,7 @@
}
@Override
- public boolean exists(ServerDefinition serverDefinition) {
+ public boolean exists(RuntimeDefinition serverDefinition) {
if (serverDefinition == null || serverDefinition.getLocation() == null) {
return false;
}
@@ -126,7 +126,7 @@
}
public static void calculateIncludedServerDefinition(
- ServerDefinition serverDefinition) {
+ RuntimeDefinition serverDefinition) {
if (serverDefinition == null || !SOA_P.equals(serverDefinition.getType())) {
return;
}
@@ -136,7 +136,7 @@
if (isJbpm4(serverDefinition.getLocation().getAbsolutePath())) {
version = JBPM4;
}
- ServerDefinition sd = new ServerDefinition(serverDefinition.getName(), version, JBPM, jbpmRoot);
+ RuntimeDefinition sd = new RuntimeDefinition(serverDefinition.getName(), version, JBPM, jbpmRoot);
sd.setParent(serverDefinition);
serverDefinition.getIncludedServerDefinitions().add(sd);
}
Modified: trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/src/org/jboss/tools/runtime/handlers/SeamHandler.java
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/src/org/jboss/tools/runtime/handlers/SeamHandler.java 2012-02-10 23:08:50 UTC (rev 38630)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.seam.detector/src/org/jboss/tools/runtime/handlers/SeamHandler.java 2012-02-10 23:09:04 UTC (rev 38631)
@@ -21,7 +21,7 @@
import org.eclipse.core.runtime.IProgressMonitor;
import org.jboss.tools.runtime.core.model.AbstractRuntimeDetector;
-import org.jboss.tools.runtime.core.model.ServerDefinition;
+import org.jboss.tools.runtime.core.model.RuntimeDefinition;
import org.jboss.tools.seam.core.SeamUtil;
import org.jboss.tools.seam.core.project.facet.SeamRuntime;
import org.jboss.tools.seam.core.project.facet.SeamRuntimeManager;
@@ -33,7 +33,7 @@
private final static String seamVersionAttributeName = "Seam-Version";
private static final String SEAM = "SEAM"; // NON-NLS-1$
- private static File getSeamRoot(ServerDefinition serverDefinition) {
+ private static File getSeamRoot(RuntimeDefinition serverDefinition) {
String type = serverDefinition.getType();
if (SEAM.equals(type)) {
return serverDefinition.getLocation();
@@ -42,11 +42,11 @@
}
@Override
- public void initializeRuntimes(List<ServerDefinition> serverDefinitions) {
+ public void initializeRuntimes(List<RuntimeDefinition> serverDefinitions) {
Map<String, SeamRuntime> map = new HashMap<String,SeamRuntime>();
- for(ServerDefinition serverDefinition:serverDefinitions) {
+ for(RuntimeDefinition serverDefinition:serverDefinitions) {
if (!serverDefinition.isEnabled()) {
continue;
}
@@ -60,7 +60,7 @@
}
private static void addSeam(Map<String, SeamRuntime> map,
- ServerDefinition serverDefinition, File seamFile) {
+ RuntimeDefinition serverDefinition, File seamFile) {
if (seamFile.exists() && seamFile.canRead() && seamFile.isDirectory()) {
SeamVersion seamVersion = getSeamVersion(seamFile.getAbsolutePath());
if (seamVersion != null) {
@@ -115,14 +115,14 @@
}
@Override
- public ServerDefinition getServerDefinition(File root,
+ public RuntimeDefinition getServerDefinition(File root,
IProgressMonitor monitor) {
if (monitor.isCanceled() || root == null) {
return null;
}
String seamVersion = getSeamVersionFromManifest(root.getAbsolutePath());
if (seamVersion != null) {
- return new ServerDefinition(root.getName(), seamVersion, SEAM, root.getAbsoluteFile());
+ return new RuntimeDefinition(root.getName(), seamVersion, SEAM, root.getAbsoluteFile());
}
return null;
}
@@ -169,7 +169,7 @@
}
@Override
- public boolean exists(ServerDefinition serverDefinition) {
+ public boolean exists(RuntimeDefinition serverDefinition) {
if (serverDefinition == null || serverDefinition.getLocation() == null) {
return false;
}
Modified: trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/JBossRuntimeStartup.java
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/JBossRuntimeStartup.java 2012-02-10 23:08:50 UTC (rev 38630)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/JBossRuntimeStartup.java 2012-02-10 23:09:04 UTC (rev 38631)
@@ -35,7 +35,7 @@
import org.jboss.tools.runtime.core.RuntimeCoreActivator;
import org.jboss.tools.runtime.core.model.IRuntimeDetector;
import org.jboss.tools.runtime.core.model.RuntimePath;
-import org.jboss.tools.runtime.core.model.ServerDefinition;
+import org.jboss.tools.runtime.core.model.RuntimeDefinition;
import org.jboss.tools.runtime.ui.RuntimeUIActivator;
import org.osgi.framework.Bundle;
@@ -64,10 +64,10 @@
JBossRuntimeLocator locator = new JBossRuntimeLocator();
for (RuntimePath runtimePath : runtimePaths) {
- List<ServerDefinition> serverDefinitions = locator
+ List<RuntimeDefinition> serverDefinitions = locator
.searchForRuntimes(runtimePath.getPath(), monitor);
runtimePath.getServerDefinitions().clear();
- for (ServerDefinition serverDefinition : serverDefinitions) {
+ for (RuntimeDefinition serverDefinition : serverDefinitions) {
serverDefinition.setRuntimePath(runtimePath);
}
runtimePath.getServerDefinitions().addAll(serverDefinitions);
@@ -81,7 +81,7 @@
}
}
- public static void initializeRuntimes(List<ServerDefinition> serverDefinitions) {
+ public static void initializeRuntimes(List<RuntimeDefinition> serverDefinitions) {
Set<IRuntimeDetector> detectors = RuntimeCoreActivator.getRuntimeDetectors();
for( IRuntimeDetector detector:detectors) {
if (detector.isEnabled()) {
Modified: trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/RuntimeContentProvider.java
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/RuntimeContentProvider.java 2012-02-10 23:08:50 UTC (rev 38630)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/RuntimeContentProvider.java 2012-02-10 23:09:04 UTC (rev 38631)
@@ -14,7 +14,7 @@
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.Viewer;
-import org.jboss.tools.runtime.core.model.ServerDefinition;
+import org.jboss.tools.runtime.core.model.RuntimeDefinition;
/**
* @author snjeza
@@ -22,9 +22,9 @@
*/
public class RuntimeContentProvider implements ITreeContentProvider {
- private List<ServerDefinition> serverDefinitions;
+ private List<RuntimeDefinition> serverDefinitions;
- public RuntimeContentProvider(List<ServerDefinition> serverDefinitions) {
+ public RuntimeContentProvider(List<RuntimeDefinition> serverDefinitions) {
this.serverDefinitions = serverDefinitions;
}
@@ -37,21 +37,21 @@
}
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- serverDefinitions = (List<ServerDefinition>) newInput;
+ serverDefinitions = (List<RuntimeDefinition>) newInput;
}
public boolean hasChildren(Object element) {
- return ((ServerDefinition) element).getIncludedServerDefinitions().size() > 0;
+ return ((RuntimeDefinition) element).getIncludedServerDefinitions().size() > 0;
}
@Override
public Object[] getChildren(Object parentElement) {
- List<ServerDefinition> list = ((ServerDefinition) parentElement).getIncludedServerDefinitions();
+ List<RuntimeDefinition> list = ((RuntimeDefinition) parentElement).getIncludedServerDefinitions();
return list.toArray();
}
@Override
public Object getParent(Object element) {
- return ((ServerDefinition) element).getParent();
+ return ((RuntimeDefinition) element).getParent();
}
}
Modified: trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/RuntimeLabelProvider.java
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/RuntimeLabelProvider.java 2012-02-10 23:08:50 UTC (rev 38630)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/RuntimeLabelProvider.java 2012-02-10 23:09:04 UTC (rev 38631)
@@ -15,7 +15,7 @@
import org.eclipse.jface.viewers.ITableLabelProvider;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.swt.graphics.Image;
-import org.jboss.tools.runtime.core.model.ServerDefinition;
+import org.jboss.tools.runtime.core.model.RuntimeDefinition;
/**
* @author snjeza
@@ -29,8 +29,8 @@
}
public String getColumnText(Object element, int columnIndex) {
- if (element instanceof ServerDefinition) {
- ServerDefinition definition = (ServerDefinition) element;
+ if (element instanceof RuntimeDefinition) {
+ RuntimeDefinition definition = (RuntimeDefinition) element;
if (columnIndex == 0) {
return definition.getName();
}
Modified: trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/RuntimeScanner.java
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/RuntimeScanner.java 2012-02-10 23:08:50 UTC (rev 38630)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/RuntimeScanner.java 2012-02-10 23:09:04 UTC (rev 38631)
@@ -22,7 +22,7 @@
import org.eclipse.ui.IStartup;
import org.jboss.tools.runtime.core.JBossRuntimeLocator;
import org.jboss.tools.runtime.core.model.RuntimePath;
-import org.jboss.tools.runtime.core.model.ServerDefinition;
+import org.jboss.tools.runtime.core.model.RuntimeDefinition;
/**
* @author snjeza
@@ -80,20 +80,20 @@
}
if (runtimePath.isModified()) {
JBossRuntimeLocator locator = new JBossRuntimeLocator();
- List<ServerDefinition> serverDefinitions = locator.searchForRuntimes(runtimePath.getPath(), monitor);
+ List<RuntimeDefinition> serverDefinitions = locator.searchForRuntimes(runtimePath.getPath(), monitor);
if (monitor.isCanceled()) {
return false;
}
runtimePath.getServerDefinitions().clear();
- for (ServerDefinition serverDefinition:serverDefinitions) {
+ for (RuntimeDefinition serverDefinition:serverDefinitions) {
serverDefinition.setRuntimePath(runtimePath);
}
runtimePath.getServerDefinitions().addAll(serverDefinitions);
RuntimeUIActivator.setTimestamp(runtimePaths);
}
monitor.setTaskName("JBoss Runtime Detector: checking " + runtimePath.getPath());
- List<ServerDefinition> serverDefinitions = runtimePath.getServerDefinitions();
- for (ServerDefinition serverDefinition:serverDefinitions) {
+ List<RuntimeDefinition> serverDefinitions = runtimePath.getServerDefinitions();
+ for (RuntimeDefinition serverDefinition:serverDefinitions) {
if (monitor.isCanceled()) {
return false;
}
Modified: trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/RuntimeUIActivator.java
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/RuntimeUIActivator.java 2012-02-10 23:08:50 UTC (rev 38630)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/RuntimeUIActivator.java 2012-02-10 23:09:04 UTC (rev 38631)
@@ -52,7 +52,7 @@
import org.jboss.tools.runtime.core.RuntimeCoreActivator;
import org.jboss.tools.runtime.core.model.IRuntimeDetector;
import org.jboss.tools.runtime.core.model.RuntimePath;
-import org.jboss.tools.runtime.core.model.ServerDefinition;
+import org.jboss.tools.runtime.core.model.RuntimeDefinition;
import org.jboss.tools.runtime.ui.dialogs.SearchRuntimePathDialog;
import org.jboss.tools.runtime.ui.preferences.RuntimePreferencePage;
import org.osgi.framework.BundleContext;
@@ -113,7 +113,7 @@
private Set<IRuntimeDetector> runtimeDetectors;
- private List<ServerDefinition> serverDefinitions;
+ private List<RuntimeDefinition> serverDefinitions;
/**
* The constructor
@@ -187,13 +187,13 @@
}
viewer.setLabelProvider(new RuntimeLabelProvider());
- List<ServerDefinition> serverDefinitions = new ArrayList<ServerDefinition>();
+ List<RuntimeDefinition> serverDefinitions = new ArrayList<RuntimeDefinition>();
for (RuntimePath runtimePath:runtimePaths2) {
serverDefinitions.addAll(runtimePath.getServerDefinitions());
}
viewer.setContentProvider(new RuntimeContentProvider(serverDefinitions));
viewer.setInput(serverDefinitions);
- for (ServerDefinition definition:serverDefinitions) {
+ for (RuntimeDefinition definition:serverDefinitions) {
viewer.setChecked(definition, definition.isEnabled());
}
return viewer;
@@ -207,10 +207,10 @@
InterruptedException {
JBossRuntimeLocator locator = new JBossRuntimeLocator();
for (RuntimePath runtimePath : runtimePaths) {
- List<ServerDefinition> serverDefinitions = locator
+ List<RuntimeDefinition> serverDefinitions = locator
.searchForRuntimes(runtimePath.getPath(), monitor);
runtimePath.getServerDefinitions().clear();
- for (ServerDefinition serverDefinition : serverDefinitions) {
+ for (RuntimeDefinition serverDefinition : serverDefinitions) {
serverDefinition.setRuntimePath(runtimePath);
}
runtimePath.getServerDefinitions()
@@ -227,12 +227,12 @@
@Override
public void widgetDisposed(DisposeEvent e) {
viewer.setInput(null);
- List<ServerDefinition> serverDefinitions = new ArrayList<ServerDefinition>();
+ List<RuntimeDefinition> serverDefinitions = new ArrayList<RuntimeDefinition>();
for (RuntimePath runtimePath : runtimePaths) {
serverDefinitions.addAll(runtimePath
.getServerDefinitions());
viewer.setInput(serverDefinitions);
- for (ServerDefinition serverDefinition : serverDefinitions) {
+ for (RuntimeDefinition serverDefinition : serverDefinitions) {
runtimeExists(serverDefinition);
viewer.setChecked(serverDefinition,
serverDefinition.isEnabled());
@@ -248,7 +248,7 @@
}
}
- public static boolean runtimeExists(ServerDefinition serverDefinition) {
+ public static boolean runtimeExists(RuntimeDefinition serverDefinition) {
Set<IRuntimeDetector> detectors = RuntimeCoreActivator.getRuntimeDetectors();
for (IRuntimeDetector detector:detectors) {
if (detector.isEnabled() && detector.exists(serverDefinition)) {
@@ -311,14 +311,14 @@
IMemento serverDefinitionsNode = node.getChild(SERVER_DEFINITIONS);
IMemento[] sdNodes = serverDefinitionsNode.getChildren(SERVER_DEFINITION);
for (IMemento sdNode:sdNodes) {
- ServerDefinition serverDefinition = createServerDefinition(sdNode);
+ RuntimeDefinition serverDefinition = createServerDefinition(sdNode);
serverDefinition.setRuntimePath(runtimePath);
IMemento includedDefinition = sdNode.getChild(INCLUDED_DEFINITION);
if (includedDefinition != null) {
IMemento[] includedNodes = includedDefinition
.getChildren(SERVER_DEFINITION);
for (IMemento includedNode : includedNodes) {
- ServerDefinition included = createServerDefinition(includedNode);
+ RuntimeDefinition included = createServerDefinition(includedNode);
included.setRuntimePath(runtimePath);
included.setParent(serverDefinition);
serverDefinition.getIncludedServerDefinitions().add(
@@ -330,7 +330,7 @@
runtimePaths.add(runtimePath);
}
if (computeIncluded) {
- for(ServerDefinition definition:getServerDefinitions()) {
+ for(RuntimeDefinition definition:getServerDefinitions()) {
Set<IRuntimeDetector> detectors = RuntimeCoreActivator.getRuntimeDetectors();
for (IRuntimeDetector detector:detectors) {
detector.computeIncludedServerDefinition(definition);
@@ -339,15 +339,15 @@
}
}
- private ServerDefinition createServerDefinition(IMemento node) {
+ private RuntimeDefinition createServerDefinition(IMemento node) {
String name = node.getString(NAME);
String version = node.getString(VERSION);
String type = node.getString(TYPE);
String location = node.getString(LOCATION);
String description = node.getString(DESCRIPTION);
boolean enabled = node.getBoolean(ENABLED);
- ServerDefinition serverDefinition =
- new ServerDefinition(name, version, type, new File(location));
+ RuntimeDefinition serverDefinition =
+ new RuntimeDefinition(name, version, type, new File(location));
serverDefinition.setDescription(description);
serverDefinition.setEnabled(enabled);
return serverDefinition;
@@ -374,7 +374,7 @@
runtimePathNode.putBoolean(SCAN_ON_EVERY_STAERTUP, runtimePath.isScanOnEveryStartup());
runtimePathNode.putString(TIMESTAMP, String.valueOf(runtimePath.getTimestamp()));
IMemento serverDefinitionsNode = runtimePathNode.createChild(SERVER_DEFINITIONS);
- List<ServerDefinition> definitions = runtimePath.getServerDefinitions();
+ List<RuntimeDefinition> definitions = runtimePath.getServerDefinitions();
putDefinitions(serverDefinitionsNode, definitions);
}
writer = new StringWriter();
@@ -397,19 +397,19 @@
}
private void putDefinitions(IMemento serverDefintionsNode,
- List<ServerDefinition> definitions) {
- for (ServerDefinition serverDefinition:definitions) {
+ List<RuntimeDefinition> definitions) {
+ for (RuntimeDefinition serverDefinition:definitions) {
IMemento sdNode = serverDefintionsNode.createChild(SERVER_DEFINITION);
putServerDefinition(serverDefinition, sdNode);
IMemento includedNodes = sdNode.createChild(INCLUDED_DEFINITION);
- for (ServerDefinition included:serverDefinition.getIncludedServerDefinitions()) {
+ for (RuntimeDefinition included:serverDefinition.getIncludedServerDefinitions()) {
IMemento includedNode = includedNodes.createChild(SERVER_DEFINITION);
putServerDefinition(included, includedNode);
}
}
}
- private void putServerDefinition(ServerDefinition serverDefinition,
+ private void putServerDefinition(RuntimeDefinition serverDefinition,
IMemento node) {
node.putString(NAME, serverDefinition.getName());
node.putString(VERSION, serverDefinition.getVersion());
@@ -431,9 +431,9 @@
return runtimePaths;
}
- public List<ServerDefinition> getServerDefinitions() {
+ public List<RuntimeDefinition> getServerDefinitions() {
if (serverDefinitions == null) {
- serverDefinitions = new ArrayList<ServerDefinition>();
+ serverDefinitions = new ArrayList<RuntimeDefinition>();
} else {
serverDefinitions.clear();
}
@@ -472,7 +472,7 @@
runtimeDetectors = null;
}
- public static boolean runtimeCreated(ServerDefinition serverDefinition) {
+ public static boolean runtimeCreated(RuntimeDefinition serverDefinition) {
Set<IRuntimeDetector> detectors = getDefault().getRuntimeDetectors();
boolean created = false;
for (IRuntimeDetector detector:detectors) {
Modified: trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/dialogs/DownloadRuntimeDialog.java
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/dialogs/DownloadRuntimeDialog.java 2012-02-10 23:08:50 UTC (rev 38630)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/dialogs/DownloadRuntimeDialog.java 2012-02-10 23:09:04 UTC (rev 38631)
@@ -54,7 +54,7 @@
import org.jboss.tools.runtime.core.model.DownloadRuntime;
import org.jboss.tools.runtime.core.model.IRuntimeDetector;
import org.jboss.tools.runtime.core.model.RuntimePath;
-import org.jboss.tools.runtime.core.model.ServerDefinition;
+import org.jboss.tools.runtime.core.model.RuntimeDefinition;
import org.jboss.tools.runtime.ui.RuntimeUIActivator;
/**
@@ -411,18 +411,18 @@
RuntimePath newPath = new RuntimePath(directory);
runtimePaths.add(newPath);
for (RuntimePath runtimePath : runtimePaths) {
- List<ServerDefinition> serverDefinitions = locator
+ List<RuntimeDefinition> serverDefinitions = locator
.searchForRuntimes(runtimePath.getPath(),
monitor);
runtimePath.getServerDefinitions().clear();
- for (ServerDefinition serverDefinition : serverDefinitions) {
+ for (RuntimeDefinition serverDefinition : serverDefinitions) {
serverDefinition.setRuntimePath(runtimePath);
}
runtimePath.getServerDefinitions().addAll(serverDefinitions);
RuntimeUIActivator.getDefault().getRuntimePaths().add(runtimePath);
RuntimeUIActivator.getDefault().saveRuntimePaths();
}
- List<ServerDefinition> serverDefinitions = RuntimeUIActivator
+ List<RuntimeDefinition> serverDefinitions = RuntimeUIActivator
.getDefault().getServerDefinitions();
Set<IRuntimeDetector> detectors = RuntimeCoreActivator
.getRuntimeDetectors();
Modified: trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/dialogs/EditRuntimePathDialog.java
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/dialogs/EditRuntimePathDialog.java 2012-02-10 23:08:50 UTC (rev 38630)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/dialogs/EditRuntimePathDialog.java 2012-02-10 23:09:04 UTC (rev 38631)
@@ -34,7 +34,7 @@
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import org.jboss.tools.runtime.core.model.RuntimePath;
-import org.jboss.tools.runtime.core.model.ServerDefinition;
+import org.jboss.tools.runtime.core.model.RuntimeDefinition;
import org.jboss.tools.runtime.ui.RuntimeUIActivator;
/**
@@ -138,7 +138,7 @@
@Override
public void checkStateChanged(CheckStateChangedEvent event) {
- ServerDefinition definition = (ServerDefinition) event.getElement();
+ RuntimeDefinition definition = (RuntimeDefinition) event.getElement();
definition.setEnabled(!definition.isEnabled());
}
});
Modified: trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/dialogs/SearchRuntimePathDialog.java
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/dialogs/SearchRuntimePathDialog.java 2012-02-10 23:08:50 UTC (rev 38630)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/dialogs/SearchRuntimePathDialog.java 2012-02-10 23:09:04 UTC (rev 38631)
@@ -44,7 +44,7 @@
import org.jboss.tools.runtime.core.RuntimeCoreActivator;
import org.jboss.tools.runtime.core.model.IRuntimeDetector;
import org.jboss.tools.runtime.core.model.RuntimePath;
-import org.jboss.tools.runtime.core.model.ServerDefinition;
+import org.jboss.tools.runtime.core.model.RuntimeDefinition;
import org.jboss.tools.runtime.ui.RuntimeUIActivator;
/**
@@ -59,7 +59,7 @@
private boolean canceled;
private boolean needRefresh;
private Label foundRuntimesLabel;
- private List<ServerDefinition> serverDefinitions;
+ private List<RuntimeDefinition> serverDefinitions;
private Button hideCreatedRuntimes;
private int heightHint;
@@ -121,11 +121,11 @@
@Override
public void checkStateChanged(CheckStateChangedEvent event) {
- ServerDefinition definition = (ServerDefinition) event.getElement();
+ RuntimeDefinition definition = (RuntimeDefinition) event.getElement();
definition.setEnabled(!definition.isEnabled());
boolean enableOk = false;
- List<ServerDefinition> serverDefinitions = getServerDefinitions(hideCreatedRuntimes.getSelection());
- for (ServerDefinition serverDefinition:serverDefinitions) {
+ List<RuntimeDefinition> serverDefinitions = getServerDefinitions(hideCreatedRuntimes.getSelection());
+ for (RuntimeDefinition serverDefinition:serverDefinitions) {
if (serverDefinition.isEnabled()) {
enableOk = true;
}
@@ -218,19 +218,19 @@
private void refresh(String message) {
running = false;
treeViewer.setInput(null);
- List<ServerDefinition> serverDefinitions = getServerDefinitions(hideCreatedRuntimes.getSelection());
+ List<RuntimeDefinition> serverDefinitions = getServerDefinitions(hideCreatedRuntimes.getSelection());
treeViewer.setInput(serverDefinitions);
- for (ServerDefinition definition:serverDefinitions) {
+ for (RuntimeDefinition definition:serverDefinitions) {
treeViewer.setChecked(definition, definition.isEnabled());
- for (ServerDefinition included:definition.getIncludedServerDefinitions()) {
+ for (RuntimeDefinition included:definition.getIncludedServerDefinitions()) {
treeViewer.setChecked(included, included.isEnabled());
}
}
TreeItem[] treeItems = treeViewer.getTree().getItems();
for (TreeItem treeItem:treeItems) {
Object data = treeItem.getData();
- if (data instanceof ServerDefinition) {
- ServerDefinition serverDefinition = (ServerDefinition) data;
+ if (data instanceof RuntimeDefinition) {
+ RuntimeDefinition serverDefinition = (RuntimeDefinition) data;
boolean exists = RuntimeUIActivator.runtimeExists(serverDefinition);
if (exists) {
treeItem.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_GRAY));
@@ -247,7 +247,7 @@
protected void okPressed() {
getShell().setCursor(Display.getCurrent().getSystemCursor(SWT.CURSOR_WAIT));
Set<IRuntimeDetector> detectors = RuntimeCoreActivator.getRuntimeDetectors();
- List<ServerDefinition> definitions = getServerDefinitions(true);
+ List<RuntimeDefinition> definitions = getServerDefinitions(true);
for( IRuntimeDetector detector:detectors) {
if (detector.isEnabled()) {
detector.initializeRuntimes(definitions);
@@ -320,18 +320,18 @@
return composite;
}
- private List<ServerDefinition> getServerDefinitions(
+ private List<RuntimeDefinition> getServerDefinitions(
boolean hideCreatedRuntimes) {
if (serverDefinitions == null) {
- serverDefinitions = new ArrayList<ServerDefinition>();
+ serverDefinitions = new ArrayList<RuntimeDefinition>();
} else {
serverDefinitions.clear();
}
for (RuntimePath runtimePath : runtimePaths) {
- for (ServerDefinition serverDefinition : runtimePath
+ for (RuntimeDefinition serverDefinition : runtimePath
.getServerDefinitions()) {
if (!RuntimeUIActivator.runtimeCreated(serverDefinition)) {
- List<ServerDefinition> allServerDefinitions = RuntimeUIActivator.getDefault().getServerDefinitions();
+ List<RuntimeDefinition> allServerDefinitions = RuntimeUIActivator.getDefault().getServerDefinitions();
String name = serverDefinition.getName();
int i = 2;
while (serverDefinitionsExists(serverDefinition, allServerDefinitions)) {
@@ -349,8 +349,8 @@
return serverDefinitions;
}
- private boolean serverDefinitionsExists(ServerDefinition serverDefinition,
- List<ServerDefinition> allServerDefinitions) {
+ private boolean serverDefinitionsExists(RuntimeDefinition serverDefinition,
+ List<RuntimeDefinition> allServerDefinitions) {
String name = serverDefinition.getName();
File location = serverDefinition.getLocation();
String type = serverDefinition.getType();
@@ -361,7 +361,7 @@
if (path == null) {
return false;
}
- for (ServerDefinition definition:allServerDefinitions) {
+ for (RuntimeDefinition definition:allServerDefinitions) {
if (name.equals(definition.getName()) && type.equals(definition.getType())) {
File loc = definition.getLocation();
if (loc == null) {
14 years, 1 month
JBoss Tools SVN: r38630 - trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-02-10 18:08:50 -0500 (Fri, 10 Feb 2012)
New Revision: 38630
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/FacesConfigValidator.java
Log:
JBIDE-10830
https://issues.jboss.org/browse/JBIDE-10830
Faces Config validator is fixed.
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-02-10 23:08:43 UTC (rev 38629)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/FacesConfigValidator.java 2012-02-10 23:08:50 UTC (rev 38630)
@@ -11,8 +11,10 @@
package org.jboss.tools.jsf.web.validation;
import java.text.MessageFormat;
+import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
+import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.StringTokenizer;
@@ -36,6 +38,8 @@
import org.jboss.tools.common.EclipseUtil;
import org.jboss.tools.common.model.XModel;
import org.jboss.tools.common.model.XModelObject;
+import org.jboss.tools.common.model.XModelObjectConstants;
+import org.jboss.tools.common.model.filesystems.FileSystemsHelper;
import org.jboss.tools.common.model.impl.XModelImpl;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
import org.jboss.tools.common.validation.ContextValidationHelper;
@@ -539,8 +543,15 @@
String value = object.getAttributeValue("param-value"); //$NON-NLS-1$
if(value == null || value.length() == 0) return;
XModel model = object.getModel();
- XModelObject webRoot = model == null ? null : model.getByPath("FileSystems/WEB-ROOT"); //$NON-NLS-1$
- if(webRoot == null) return;
+ List<XModelObject> webRoots = new ArrayList<XModelObject>();
+ XModelObject[] fss = FileSystemsHelper.getFileSystems(model).getChildren();
+ for (XModelObject s: fss) {
+ String n = s.getAttributeValue(XModelObjectConstants.ATTR_NAME);
+ if("WEB-ROOT".equals(n) || n.startsWith("WEB-ROOT-")) {
+ webRoots.add(s);
+ }
+ }
+ if(webRoots.isEmpty()) return;
StringTokenizer st = new StringTokenizer(value, ","); //$NON-NLS-1$
while(st.hasMoreTokens()) {
String path = st.nextToken().trim();
@@ -551,7 +562,11 @@
return;
}
String path2 = path.startsWith("/") ? path.substring(1) : path; //$NON-NLS-1$
- XModelObject fc2 = webRoot.getChildByPath(path2);
+ XModelObject fc2 = null;
+ for (XModelObject s: webRoots) {
+ fc2 = s.getChildByPath(path2);
+ if(fc2 != null) break;
+ }
if(fc2 == null) {
fireMessage(object, NLS.bind(JSFValidationMessage.INVALID_FACES_CONFIG_REFERENCE, "param-value", path));
return;
14 years, 1 month