JBoss Tools SVN: r5601 - in trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test: META-INF and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-01-10 19:31:23 -0500 (Thu, 10 Jan 2008)
New Revision: 5601
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/META-INF/MANIFEST.MF
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/build.properties
Log:
fixing testexception
[echo] performing "ui" test on plugin "org.jboss.tools.jsf.vpe.facelets.test" class "org.jboss.tools.jsf.vpe.facelets.test.FaceletsAllTests"
ui-test:
eclipse-test:
[java] !SESSION 2008-01-10 18:18:18.960 -----------------------------------------------
[java] eclipse.buildId=M20071023-1652
[java] java.version=1.5.0_12
[java] java.vendor=Sun Microsystems Inc.
[java] BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US
[java] Framework arguments: -application org.eclipse.test.uitestapplication formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,org.jboss.tools.jsf.vpe.facelets.test.FaceletsAllTests.xml -testPluginName org.jboss.tools.jsf.vpe.facelets.test -classname org.jboss.tools.jsf.vpe.facelets.test.FaceletsAllTests
[java] Command-line arguments: -application org.eclipse.test.uitestapplication -dev bin -data /home/hudson/jbosstools-build/200801101741-nightly/tests/workspace formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,org.jboss.tools.jsf.vpe.facelets.test.FaceletsAllTests.xml -testPluginName org.jboss.tools.jsf.vpe.facelets.test -classname org.jboss.tools.jsf.vpe.facelets.test.FaceletsAllTests -consolelog
[java] !ENTRY org.eclipse.osgi 2 0 2008-01-10 18:18:35.720
[java] !MESSAGE The activator org.jboss.tools.jsf.vpe.facelets.test.FaceletsTestPlugin for bundle org.jboss.tools.jsf.vpe.facelets.test is invalid
[java] !STACK 0
[java] org.osgi.framework.BundleException: The activator org.jboss.tools.jsf.vpe.facelets.test.FaceletsTestPlugin for bundle org.jboss.tools.jsf.vpe.facelets.test is invalid
[java] at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:141)
[java] at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:970)
[java] at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:346)
...
[java] at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508)
[java] at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
[java] Class not found "org.jboss.tools.jsf.vpe.facelets.test.FaceletsAllTests"
[java] at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
[java] at org.eclipse.equinox.launcher.Main.main(Main.java:1148)
[java] at org.eclipse.core.launcher.Main.main(Main.java:30)
[java] Caused by: java.lang.ClassNotFoundException: org.jboss.tools.jsf.vpe.facelets.test.FaceletsTestPlugin
[java] at java.lang.ClassLoader.findClass(ClassLoader.java:358)
[java] ... 40 more
[java] Root exception:
[java] java.lang.ClassNotFoundException: org.jboss.tools.jsf.vpe.facelets.test.FaceletsTestPlugin
[java] at java.lang.ClassLoader.findClass(ClassLoader.java:358)
...
[java] at org.eclipse.core.launcher.Main.main(Main.java:30)
[java] Java Result: 2
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/META-INF/MANIFEST.MF 2008-01-10 22:33:59 UTC (rev 5600)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/META-INF/MANIFEST.MF 2008-01-11 00:31:23 UTC (rev 5601)
@@ -16,3 +16,5 @@
org.jboss.tools.vpe.xulrunner,
org.mozilla.xpcom
Eclipse-LazyStart: true
+Export-Package: org.jboss.tools.jsf.vpe.facelets.test
+Bundle-ClassPath: facelets-tests.jar
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/build.properties
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/build.properties 2008-01-10 22:33:59 UTC (rev 5600)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/build.properties 2008-01-11 00:31:23 UTC (rev 5601)
@@ -1,9 +1,9 @@
-source.facelets-tests.jar = src/
output.facelets-tests.jar = bin/
bin.includes = META-INF/,\
- facelets-tests.jar,\
- resources/
+ resources/,\
+ facelets-tests.jar
src.includes = META-INF/,\
build.properties,\
resources/,\
src/
+source.facelets-tests.jar = src/
16 years, 5 months
JBoss Tools SVN: r5600 - in trunk/hibernatetools: tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-01-10 17:33:59 -0500 (Thu, 10 Jan 2008)
New Revision: 5600
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/ConsoleConfigurationCreationWizard.java
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/OpenMappingFileTest.java
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/OpenSourceFileTest.java
Log:
fix for JUnit Tests compilation level
[java] [javac] 32. ERROR in /home/hudson/jbosstools-build/eclipse/plugins/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/OpenMappingFileTest.java (at line 31)
[java] [javac] final ConsoleConfiguration consCFG = knownConfigurations.find(CreateConsoleConfigTest.ConsoleCFGName);
[java] [javac] ^^^^^^^^^^^^^^^^^^^^^^^
[java] [javac] CreateConsoleConfigTest cannot be resolved
[java] [javac] ----------
[java] [javac] ----------
[java] [javac] 33. ERROR in /home/hudson/jbosstools-build/eclipse/plugins/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/OpenSourceFileTest.java (at line 34)
[java] [javac] final ConsoleConfiguration consCFG = knownConfigurations.find(CreateConsoleConfigTest.ConsoleCFGName);
[java] [javac] ^^^^^^^^^^^^^^^^^^^^^^^
[java] [javac] CreateConsoleConfigTest cannot be resolved
[java] [javac] ----------
[java] [javac] ----------
[java] [javac] 34. ERROR in /home/hudson/jbosstools-build/eclipse/plugins/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/ProjectUtil.java (at line 101)
[java] [javac] createConsoleConfiguration(null, null, ConsoleCFGName, ConsoleConfigurationPreferences.ConfigurationMode.CORE,
[java] [javac] ^^^^^^^^^^^^^^^^^^^^^^^^^^
[java] [javac] The method createConsoleConfiguration(Shell, EclipseConsoleConfiguration, String, ConsoleConfigurationPreferences.ConfigurationMode, String, boolean, String, IPath, IPath, IPath[], IPath[], String, String, IProgressMonitor) from the type ConsoleConfigurationCreationWizard is not visible
[java] [javac] ----------
[java] [javac] 34 problems (3 errors, 31 warnings)
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/ConsoleConfigurationCreationWizard.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/ConsoleConfigurationCreationWizard.java 2008-01-10 20:59:39 UTC (rev 5599)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/ConsoleConfigurationCreationWizard.java 2008-01-10 22:33:59 UTC (rev 5600)
@@ -146,7 +146,7 @@
return true;
}
- static private void createConsoleConfiguration(
+ static public void createConsoleConfiguration(
final Shell shell,
final EclipseConsoleConfiguration oldConfig,
final String configName,
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/OpenMappingFileTest.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/OpenMappingFileTest.java 2008-01-10 20:59:39 UTC (rev 5599)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/OpenMappingFileTest.java 2008-01-10 22:33:59 UTC (rev 5600)
@@ -28,7 +28,7 @@
public class OpenMappingFileTest extends TestCase {
public void testOpenMappingFileTest(){
KnownConfigurations knownConfigurations = KnownConfigurations.getInstance();
- final ConsoleConfiguration consCFG = knownConfigurations.find(CreateConsoleConfigTest.ConsoleCFGName);
+ final ConsoleConfiguration consCFG = null; //knownConfigurations.find(CreateConsoleConfigTest.ConsoleCFGName);
assertNotNull(consCFG);
consCFG.reset();
Object[] configs = new ConsoleConfigurationWorkbenchAdapter().getChildren(consCFG);
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/OpenSourceFileTest.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/OpenSourceFileTest.java 2008-01-10 20:59:39 UTC (rev 5599)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/OpenSourceFileTest.java 2008-01-10 22:33:59 UTC (rev 5600)
@@ -31,7 +31,7 @@
public void testOpenSourceFileTest(){
//fail("test fail");
KnownConfigurations knownConfigurations = KnownConfigurations.getInstance();
- final ConsoleConfiguration consCFG = knownConfigurations.find(CreateConsoleConfigTest.ConsoleCFGName);
+ final ConsoleConfiguration consCFG = null;//knownConfigurations.find(CreateConsoleConfigTest.ConsoleCFGName);
assertNotNull(consCFG);
consCFG.reset();
Object[] configs = new ConsoleConfigurationWorkbenchAdapter().getChildren(consCFG);
16 years, 5 months
JBoss Tools SVN: r5599 - in trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test: src/org/jboss/tools/jsf/vpe/facelets/test and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dsakovich
Date: 2008-01-10 15:59:39 -0500 (Thu, 10 Jan 2008)
New Revision: 5599
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/composition_absolute.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/composition_related.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/decorate_absolute.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/decorate_related.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/include_absolute.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/include_related.xhtml
Removed:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/composition.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/decorate.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/include.xhtml
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/define.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/src/org/jboss/tools/jsf/vpe/facelets/test/FaceletsComponentTest.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1504
Deleted: trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/composition.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/composition.xhtml 2008-01-10 18:48:21 UTC (rev 5598)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/composition.xhtml 2008-01-10 20:59:39 UTC (rev 5599)
@@ -1,14 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:f="http://java.sun.com/jsf/core">
-
- <ui:composition template="insert.xhtml">
-
- <ui:define name="pageTitle">JSF 1.2 and Facelets under Tomcat. KickStart Application</ui:define>
-
- <ui:define name="pageHeader">JSF 1.2 Hello Application</ui:define>
-
- </ui:composition>
-</html>
Copied: trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/composition_absolute.xhtml (from rev 5582, trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/composition.xhtml)
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/composition_absolute.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/composition_absolute.xhtml 2008-01-10 20:59:39 UTC (rev 5599)
@@ -0,0 +1,14 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core">
+
+ <ui:composition template="/pages/components/insert.xhtml">
+
+ <ui:define name="pageTitle">JSF 1.2 and Facelets under Tomcat. KickStart Application</ui:define>
+
+ <ui:define name="pageHeader">JSF 1.2 Hello Application</ui:define>
+
+ </ui:composition>
+</html>
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/composition_related.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/composition_related.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/composition_related.xhtml 2008-01-10 20:59:39 UTC (rev 5599)
@@ -0,0 +1,14 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core">
+
+ <ui:composition template="./insert.xhtml">
+
+ <ui:define name="pageTitle">JSF 1.2 and Facelets under Tomcat. KickStart Application</ui:define>
+
+ <ui:define name="pageHeader">JSF 1.2 Hello Application</ui:define>
+
+ </ui:composition>
+</html>
Deleted: trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/decorate.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/decorate.xhtml 2008-01-10 18:48:21 UTC (rev 5598)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/decorate.xhtml 2008-01-10 20:59:39 UTC (rev 5599)
@@ -1,14 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:f="http://java.sun.com/jsf/core">
-
- <ui:decorate template="insert.xhtml">
-
- <ui:define name="pageTitle">JSF 1.2 and Facelets under Tomcat. KickStart Application</ui:define>
-
- <ui:define name="pageHeader">JSF 1.2 Hello Application</ui:define>
-
- </ui:decorate>
-</html>
Copied: trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/decorate_absolute.xhtml (from rev 5582, trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/decorate.xhtml)
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/decorate_absolute.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/decorate_absolute.xhtml 2008-01-10 20:59:39 UTC (rev 5599)
@@ -0,0 +1,14 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core">
+
+ <ui:decorate template="/pages/components/insert.xhtml">
+
+ <ui:define name="pageTitle">JSF 1.2 and Facelets under Tomcat. KickStart Application</ui:define>
+
+ <ui:define name="pageHeader">JSF 1.2 Hello Application</ui:define>
+
+ </ui:decorate>
+</html>
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/decorate_related.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/decorate_related.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/decorate_related.xhtml 2008-01-10 20:59:39 UTC (rev 5599)
@@ -0,0 +1,14 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core">
+
+ <ui:decorate template="./insert.xhtml">
+
+ <ui:define name="pageTitle">JSF 1.2 and Facelets under Tomcat. KickStart Application</ui:define>
+
+ <ui:define name="pageHeader">JSF 1.2 Hello Application</ui:define>
+
+ </ui:decorate>
+</html>
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/define.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/define.xhtml 2008-01-10 18:48:21 UTC (rev 5598)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/define.xhtml 2008-01-10 20:59:39 UTC (rev 5599)
@@ -4,10 +4,7 @@
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core">
<ui:composition template="insert.xhtml">
- <ui:define name="pageTitle">JSF 1.2 and Facelets under Tomcat. KickStart Application</ui:define>
<ui:define name="pageHeader">Greeting Page</ui:define>
- <ui:define name="body">
- #{person.name}!
- </ui:define>
+ <ui:define name="body">#{person.name}!</ui:define>
</ui:composition>
</html>
\ No newline at end of file
Deleted: trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/include.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/include.xhtml 2008-01-10 18:48:21 UTC (rev 5598)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/include.xhtml 2008-01-10 20:59:39 UTC (rev 5599)
@@ -1,15 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:f="http://java.sun.com/jsf/core">
-
-<head>
-<title>Debug Test</title>
-</head>
-
-<body bgcolor="#ffffff">
- <h3 align="center">ui:include test page</h3>
- <ui:include src="insert.xhtml" />
-</body>
-</html>
\ No newline at end of file
Copied: trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/include_absolute.xhtml (from rev 5582, trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/include.xhtml)
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/include_absolute.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/include_absolute.xhtml 2008-01-10 20:59:39 UTC (rev 5599)
@@ -0,0 +1,15 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core">
+
+<head>
+<title>Debug Test</title>
+</head>
+
+<body bgcolor="#ffffff">
+ <h3 align="center">ui:include test page</h3>
+ <ui:include src="insert.xhtml" />
+</body>
+</html>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/include_related.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/include_related.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/include_related.xhtml 2008-01-10 20:59:39 UTC (rev 5599)
@@ -0,0 +1,15 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core">
+
+<head>
+<title>Debug Test</title>
+</head>
+
+<body bgcolor="#ffffff">
+ <h3 align="center">ui:include test page</h3>
+ <ui:include src="insert.xhtml" />
+</body>
+</html>
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/src/org/jboss/tools/jsf/vpe/facelets/test/FaceletsComponentTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/src/org/jboss/tools/jsf/vpe/facelets/test/FaceletsComponentTest.java 2008-01-10 18:48:21 UTC (rev 5598)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/src/org/jboss/tools/jsf/vpe/facelets/test/FaceletsComponentTest.java 2008-01-10 20:59:39 UTC (rev 5599)
@@ -23,9 +23,10 @@
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
import org.mozilla.interfaces.nsIDOMNode;
+import org.mozilla.interfaces.nsIDOMText;
/**
- * Class for testing all Seam components
+ * Class for testing all Facelets components
*
* @author dsakovich(a)exadel.com
*
@@ -37,71 +38,269 @@
public FaceletsComponentTest(String name) {
super(name);
+ setCheckWarning(false);
}
+ /**
+ * Test for ui:debug
+ *
+ * @throws Throwable
+ */
public void testDebug() throws Throwable {
- performTestForVpeComponent((IFile) TestUtil.getComponentPath("components/debug.xhtml",IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ performTestForVpeComponent((IFile) TestUtil.getComponentPath(
+ "components/debug.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
}
+ /**
+ * Test for ui:define
+ *
+ * @throws Throwable
+ */
public void testDefine() throws Throwable {
- TestUtil.waitForJobs();
- // set exception
- setException(null);
- // get test page path
- IFile file = (IFile) TestUtil.getComponentPath(
- "components/define.xhtml", IMPORT_PROJECT_NAME);
+ nsIDOMElement element = performTestForFaceletComponent("components/define.xhtml");
+ nsIDOMNode node = (nsIDOMNode) element
+ .queryInterface(nsIDOMNode.NS_IDOMNODE_IID);
- assertNotNull("Could not open specified file " + file.getFullPath(),
- file);
+ List<nsIDOMNode> elements = new ArrayList<nsIDOMNode>();
- IEditorInput input = new FileEditorInput(file);
+ // find "span" elements
+ TestUtil.findElementsByName(node, elements, HTML.TAG_SPAN);
- assertNotNull("Editor input is null", input);
- // open and get editor
- JSPMultiPageEditor part = openEditor(input);
+ assertEquals(2, elements.size());
+ nsIDOMElement elementSpan0 = (nsIDOMElement) elements.get(0)
+ .queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+ nsIDOMElement elementSpan1 = (nsIDOMElement) elements.get(1)
+ .queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
- // get dom document
- nsIDOMDocument document = getVpeVisualDocument(part);
- nsIDOMElement element = document.getDocumentElement();
+ nsIDOMText text0 = (nsIDOMText) elementSpan0.getFirstChild()
+ .queryInterface(nsIDOMText.NS_IDOMTEXT_IID);
+ nsIDOMText text1 = (nsIDOMText) elementSpan1.getFirstChild()
+ .queryInterface(nsIDOMText.NS_IDOMTEXT_IID);
- // check that element is not null
- assertNotNull(element);
+ assertEquals(text0.getNodeValue(), "Greeting Page");
+ assertEquals(text1.getNodeValue(), "#{person.name}!");
- // get root node
+ if (getException() != null) {
+ throw getException();
+ }
+ }
+
+ /**
+ * Test for ui:composition
+ *
+ * @throws Throwable
+ */
+ public void testComposition() throws Throwable {
+
+ // check absolute path
+ nsIDOMElement element = performTestForFaceletComponent("components/composition_absolute.xhtml");
nsIDOMNode node = (nsIDOMNode) element
.queryInterface(nsIDOMNode.NS_IDOMNODE_IID);
List<nsIDOMNode> elements = new ArrayList<nsIDOMNode>();
- // find "span" elements
- TestUtil.findElementsByName(node, elements, HTML.TAG_SPAN);
+ // find "table" elements
+ TestUtil.findElementsByName(node, elements, HTML.TAG_TABLE);
- assertEquals(2, elements.size());
+ assertEquals(1, elements.size());
- nsIDOMElement elementSpan0 = (nsIDOMElement) elements.get(0)
+ // check related path
+ element = performTestForFaceletComponent("components/composition_related.xhtml");
+ node = (nsIDOMNode) element.queryInterface(nsIDOMNode.NS_IDOMNODE_IID);
+
+ elements = new ArrayList<nsIDOMNode>();
+
+ // find "table" elements
+ TestUtil.findElementsByName(node, elements, HTML.TAG_TABLE);
+
+ assertEquals(1, elements.size());
+
+ if (getException() != null) {
+ throw getException();
+ }
+ }
+
+ /**
+ * Test for ui:component
+ *
+ * @throws Throwable
+ */
+ public void testComponent() throws Throwable {
+
+ nsIDOMElement element = performTestForFaceletComponent("components/component.xhtml");
+ nsIDOMNode node = (nsIDOMNode) element
+ .queryInterface(nsIDOMNode.NS_IDOMNODE_IID);
+
+ List<nsIDOMNode> elements = new ArrayList<nsIDOMNode>();
+
+ // find "div" elements
+ TestUtil.findElementsByName(node, elements, HTML.TAG_DIV);
+ assertEquals(1, elements.size());
+ nsIDOMElement divElement = (nsIDOMElement) elements.get(0)
.queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
- nsIDOMElement elementSpan1 = (nsIDOMElement) elements.get(1)
+
+ nsIDOMElement divBody = (nsIDOMElement) divElement.getLastChild()
.queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
- /*
- * nsIDOMText text0 = (nsIDOMText) elementSpan0.getFirstChild();
- * nsIDOMText text1 = (nsIDOMText) elementSpan1.getFirstChild();
- * System.out.println(text0.getNodeValue());
- * assertEquals(elementInput0.getAttribute("value"), "");
- * assertNotNull(elementInput1.getAttribute("value"), "");
- * assertNotNull(elementInput2.getAttribute("value"), "test");
- */
+ nsIDOMElement div = (nsIDOMElement) divBody.getLastChild()
+ .queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
- // TODO Dzmitry Sakovich Test not complete
- assertTrue("Defined content is not shown", false);
+ String title = div.getAttribute("title");
+
+ assertEquals(title.replaceAll("\\s+", ""),
+ "ui:componentbinding:#{backingBean.menu}");
if (getException() != null) {
throw getException();
}
}
+ /**
+ * Test for ui:remove
+ *
+ * @throws Throwable
+ */
+ public void testRemove() throws Throwable {
+ performTestForVpeComponent((IFile) TestUtil.getComponentPath(
+ "components/remove.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ // TODO check that content in ui:remove isn't shown in VPE
+ assertTrue("Content inside ui:remove tag shouldn't be shown", false);
+ }
+
+ /**
+ * Test for ui:decorate
+ *
+ * @throws Throwable
+ */
+ public void testDecorate() throws Throwable {
+ // check absolute path
+ nsIDOMElement element = performTestForFaceletComponent("components/decorate_absolute.xhtml");
+ nsIDOMNode node = (nsIDOMNode) element
+ .queryInterface(nsIDOMNode.NS_IDOMNODE_IID);
+
+ List<nsIDOMNode> elements = new ArrayList<nsIDOMNode>();
+
+ // find "table" elements
+ TestUtil.findElementsByName(node, elements, HTML.TAG_TABLE);
+
+ assertEquals(1, elements.size());
+
+ // check related path
+ element = performTestForFaceletComponent("components/decorate_related.xhtml");
+ node = (nsIDOMNode) element.queryInterface(nsIDOMNode.NS_IDOMNODE_IID);
+
+ elements = new ArrayList<nsIDOMNode>();
+
+ // find "table" elements
+ TestUtil.findElementsByName(node, elements, HTML.TAG_TABLE);
+
+ assertEquals(1, elements.size());
+
+ if (getException() != null) {
+ throw getException();
+ }
+ }
+
+ /**
+ * Test for ui:repeat
+ *
+ * @throws Throwable
+ */
+ public void testRepeat() throws Throwable {
+ performTestForVpeComponent((IFile) TestUtil.getComponentPath(
+ "components/repeat.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ assertTrue("Component's content is not shown", false);
+ }
+
+ /**
+ * Test for ui:include
+ *
+ * @throws Throwable
+ */
+ public void testInclude() throws Throwable {
+ // check absolute path
+ nsIDOMElement element = performTestForFaceletComponent("components/include_absolute.xhtml");
+ nsIDOMNode node = (nsIDOMNode) element
+ .queryInterface(nsIDOMNode.NS_IDOMNODE_IID);
+
+ List<nsIDOMNode> elements = new ArrayList<nsIDOMNode>();
+
+ // find "table" elements
+ TestUtil.findElementsByName(node, elements, HTML.TAG_TABLE);
+
+ assertEquals(1, elements.size());
+
+ // check related path
+ element = performTestForFaceletComponent("components/include_related.xhtml");
+ node = (nsIDOMNode) element.queryInterface(nsIDOMNode.NS_IDOMNODE_IID);
+
+ elements = new ArrayList<nsIDOMNode>();
+
+ // find "table" elements
+ TestUtil.findElementsByName(node, elements, HTML.TAG_TABLE);
+
+ assertEquals(1, elements.size());
+
+ if (getException() != null) {
+ throw getException();
+ }
+ }
+
+ /**
+ * Test for ui:fragment
+ *
+ * @throws Throwable
+ */
+ public void testFragment() throws Throwable {
+ performTestForVpeComponent((IFile) TestUtil.getComponentPath(
+ "components/fragment.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ // TODO check that fragment's content is showed
+ assertTrue("Fragment's content is not sown", false);
+ }
+
+ /**
+ * Test for ui:insert
+ *
+ * @throws Throwable
+ */
public void testInsert() throws Throwable {
- performTestForVpeComponent((IFile) TestUtil.getComponentPath("components/insert.xhtml",IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ performTestForVpeComponent((IFile) TestUtil.getComponentPath(
+ "components/insert.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
}
+ /**
+ *
+ * @param componentPage
+ * @return
+ * @throws Throwable
+ */
+ private nsIDOMElement performTestForFaceletComponent(String componentPage)
+ throws Throwable {
+ TestUtil.waitForJobs();
+ // set exception
+ setException(null);
+
+ // get test page path
+ IFile file = (IFile) TestUtil.getComponentPath(componentPage,
+ IMPORT_PROJECT_NAME);
+
+ assertNotNull("Could not open specified file " + file.getFullPath(),
+ file);
+
+ IEditorInput input = new FileEditorInput(file);
+
+ assertNotNull("Editor input is null", input);
+ // open and get editor
+ JSPMultiPageEditor part = openEditor(input);
+
+ // get dom document
+ nsIDOMDocument document = getVpeVisualDocument(part);
+ nsIDOMElement element = document.getDocumentElement();
+
+ // check that element is not null
+ assertNotNull(element);
+
+ return element;
+ }
+
}
16 years, 5 months
JBoss Tools SVN: r5598 - in trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console: viewers/xpl and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2008-01-10 13:48:21 -0500 (Thu, 10 Jan 2008)
New Revision: 5598
Added:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/viewers/xpl/
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/viewers/xpl/MTreeViewer.java
Removed:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/viewers/MTreeViewer.java
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/KnownConfigurationsView.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1482
Deleted: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/viewers/MTreeViewer.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/viewers/MTreeViewer.java 2008-01-10 18:31:04 UTC (rev 5597)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/viewers/MTreeViewer.java 2008-01-10 18:48:21 UTC (rev 5598)
@@ -1,196 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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
- *
- * Contributor:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.hibernate.eclipse.console.viewers;
-
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.jface.viewers.AbstractTreeViewer;
-import org.eclipse.jface.viewers.TreePath;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Item;
-import org.eclipse.swt.widgets.Widget;
-
-public class MTreeViewer extends TreeViewer {
-
- public MTreeViewer(Composite parent, int style) {
- super(parent, style);
- }
-
- // some little hack
- public boolean isBusy() {
-
- Object obj = null;
- Class clazz = org.eclipse.jface.viewers.ColumnViewer.class;
- try {
- Method hiddenMethod = clazz.getDeclaredMethod("isBusy");
- if (null != hiddenMethod) {
- hiddenMethod.setAccessible(true);
- obj = hiddenMethod.invoke(this);
- }
- } catch (IllegalArgumentException e) {
- e.printStackTrace();
- } catch (IllegalAccessException e) {
- e.printStackTrace();
- } catch (InvocationTargetException e) {
- e.printStackTrace();
- } catch (SecurityException e) {
- e.printStackTrace();
- } catch (NoSuchMethodException e) {
- e.printStackTrace();
- }
- if (obj instanceof Boolean) {
- return ((Boolean)obj).booleanValue();
- }
- return false;
- }
-
- /**
- * Adds the given child elements to this viewer as children of the given
- * parent element. If this viewer does not have a sorter, the elements are
- * added at the end of the parent's list of children in the order given;
- * otherwise, the elements are inserted at the appropriate positions.
- * <p>
- * This method should be called (by the content provider) when elements have
- * been added to the model, in order to cause the viewer to accurately
- * reflect the model. This method only affects the viewer, not the model.
- * </p>
- *
- * @param parentElementOrTreePath
- * the parent element
- * @param childElements
- * the child elements to add
- */
- public void add(Object parentElementOrTreePath, Object[] childElements) {
- Assert.isNotNull(parentElementOrTreePath);
- assertElementsNotNull(childElements);
- if (isBusy())
- return;
- Widget[] widgets = internalFindItems2(parentElementOrTreePath);
- // If parent hasn't been realized yet, just ignore the add.
- if (widgets.length == 0) {
- return;
- }
-
- for (int i = 0; i < widgets.length; i++) {
- internalAdd(widgets[i], parentElementOrTreePath, childElements);
- }
- }
-
- /**
- * Find the items for the given element of tree path
- *
- * @param parentElementOrTreePath
- * the element or tree path
- * @return the items for that element
- */
- protected Widget[] internalFindItems2(Object parentElementOrTreePath) {
- Widget[] widgets;
- if (parentElementOrTreePath instanceof TreePath) {
- widgets = internalFindItems(parentElementOrTreePath);
- } else {
- widgets = findItems2(parentElementOrTreePath);
- }
- return widgets;
- }
-
- /**
- * Finds the widgets which represent the given element. The returned array
- * must not be changed by clients; it might change upon calling other
- * methods on this viewer.
- * <p>
- * This method was introduced to support multiple equal elements in a viewer
- * (@see {@link AbstractTreeViewer}). Multiple equal elements are only
- * supported if the element map is enabled by calling
- * {@link #setUseHashlookup(boolean)} and passing <code>true</code>.
- * </p>
- * <p>
- * The default implementation of this method tries first to find the widget
- * for the given element assuming that it is the viewer's input; this is
- * done by calling <code>doFindInputItem</code>. If it is not found
- * there, the widgets are looked up in the internal element map provided
- * that this feature has been enabled. If the element map is disabled, the
- * widget is found via <code>doFindInputItem</code>.
- * </p>
- *
- * @param element
- * the element
- * @return the corresponding widgets
- */
- protected Widget[] findItems2(Object element) {
- Widget result = doFindInputItem(element);
- if (result != null) {
- return new Widget[] { result };
- }
- // if we have an element map use it, otherwise search for the item.
- if (usingElementMap()) {
- return findItems2(element);
- }
- return doFindItems(element);
- }
-
- /**
- * Recursively tries to find the given element.
- *
- * @param parent
- * the parent item
- * @param element
- * the element
- * @return Widget
- */
- protected ArrayList<Widget> internalFindItem(Item parent, Object element) {
-
- ArrayList<Widget> ret = new ArrayList<Widget>();
- // compare with node
- Object data = parent.getData();
- if (data != null) {
- if (equals(data, element)) {
- ret.add(parent);
- return ret;
- }
- }
- // recurse over children
- Item[] items = getChildren(parent);
- for (int i = 0; i < items.length; i++) {
- Item item = items[i];
- ArrayList<Widget> o = internalFindItem(item, element);
- if (null != o) {
- ret.addAll(o);
- }
- }
- return ret;
- }
-
- protected Widget[] doFindItems(Object element) {
- Widget[] ret = new Widget[0];
- // compare with root
- Object root = getRoot();
- if (null == root) {
- return ret;
- }
- ArrayList<Widget> res = new ArrayList<Widget>();
- Item[] items = getChildren(getControl());
- if (items != null) {
- for (int i = 0; i < items.length; i++) {
- ArrayList<Widget> o = internalFindItem(items[i], element);
- if (null != o) {
- res.addAll(o);
- }
- }
- }
- ret = res.toArray(ret);
- return ret;
- }
-
-}
Copied: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/viewers/xpl/MTreeViewer.java (from rev 5568, trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/viewers/MTreeViewer.java)
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/viewers/xpl/MTreeViewer.java (rev 0)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/viewers/xpl/MTreeViewer.java 2008-01-10 18:48:21 UTC (rev 5598)
@@ -0,0 +1,215 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.hibernate.eclipse.console.viewers.xpl;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.viewers.AbstractTreeViewer;
+import org.eclipse.jface.viewers.TreePath;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Item;
+import org.eclipse.swt.widgets.Widget;
+
+/**
+ * TreeViewer has the next lack design to work with the objects as TreeItem id:
+ * internalFindItems always return array of size <= 1
+ * cause doFindItems & internalFindItem returns FIRST proper item which it find
+ * but in common case this is not the TRUTH - so TreeViewer add method doesn't work
+ * as we expected.
+ *
+ * So MTreeViewer fix the problem.
+ * It redefine add method taking into account what for one parentElementOrTreePath as id
+ * could exist several ( >= 0 ) widgets.
+ * doFindItems & internalFindItem returns ALL proper items which it find.
+ *
+ * We expect what TreeViewer developers fix the bug in future versions,
+ * but we can't wait it.
+ *
+ * more info is here http://jira.jboss.com/jira/browse/JBIDE-1482
+ *
+ * @author Vitali
+ */
+public class MTreeViewer extends TreeViewer {
+
+ public MTreeViewer(Composite parent, int style) {
+ super(parent, style);
+ }
+
+ // some little hack - cause TreeViewer has lack design for extensions
+ public boolean isBusy() {
+
+ Object obj = null;
+ Class clazz = org.eclipse.jface.viewers.ColumnViewer.class;
+ try {
+ Method hiddenMethod = clazz.getDeclaredMethod("isBusy");
+ if (null != hiddenMethod) {
+ hiddenMethod.setAccessible(true);
+ obj = hiddenMethod.invoke(this);
+ }
+ } catch (IllegalArgumentException e) {
+ e.printStackTrace();
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ } catch (InvocationTargetException e) {
+ e.printStackTrace();
+ } catch (SecurityException e) {
+ e.printStackTrace();
+ } catch (NoSuchMethodException e) {
+ e.printStackTrace();
+ }
+ if (obj instanceof Boolean) {
+ return ((Boolean)obj).booleanValue();
+ }
+ return false;
+ }
+
+ /**
+ * Adds the given child elements to this viewer as children of the given
+ * parent element. If this viewer does not have a sorter, the elements are
+ * added at the end of the parent's list of children in the order given;
+ * otherwise, the elements are inserted at the appropriate positions.
+ * <p>
+ * This method should be called (by the content provider) when elements have
+ * been added to the model, in order to cause the viewer to accurately
+ * reflect the model. This method only affects the viewer, not the model.
+ * </p>
+ *
+ * @param parentElementOrTreePath
+ * the parent element
+ * @param childElements
+ * the child elements to add
+ */
+ public void add(Object parentElementOrTreePath, Object[] childElements) {
+ Assert.isNotNull(parentElementOrTreePath);
+ assertElementsNotNull(childElements);
+ if (isBusy())
+ return;
+ Widget[] widgets = internalFindItems2(parentElementOrTreePath);
+ // If parent hasn't been realized yet, just ignore the add.
+ if (widgets.length == 0) {
+ return;
+ }
+
+ for (int i = 0; i < widgets.length; i++) {
+ internalAdd(widgets[i], parentElementOrTreePath, childElements);
+ }
+ }
+
+ /**
+ * Find the items for the given element of tree path
+ *
+ * @param parentElementOrTreePath
+ * the element or tree path
+ * @return the items for that element
+ */
+ protected Widget[] internalFindItems2(Object parentElementOrTreePath) {
+ Widget[] widgets;
+ if (parentElementOrTreePath instanceof TreePath) {
+ widgets = internalFindItems(parentElementOrTreePath);
+ } else {
+ widgets = findItems2(parentElementOrTreePath);
+ }
+ return widgets;
+ }
+
+ /**
+ * Finds the widgets which represent the given element. The returned array
+ * must not be changed by clients; it might change upon calling other
+ * methods on this viewer.
+ * <p>
+ * This method was introduced to support multiple equal elements in a viewer
+ * (@see {@link AbstractTreeViewer}). Multiple equal elements are only
+ * supported if the element map is enabled by calling
+ * {@link #setUseHashlookup(boolean)} and passing <code>true</code>.
+ * </p>
+ * <p>
+ * The default implementation of this method tries first to find the widget
+ * for the given element assuming that it is the viewer's input; this is
+ * done by calling <code>doFindInputItem</code>. If it is not found
+ * there, the widgets are looked up in the internal element map provided
+ * that this feature has been enabled. If the element map is disabled, the
+ * widget is found via <code>doFindInputItem</code>.
+ * </p>
+ *
+ * @param element
+ * the element
+ * @return the corresponding widgets
+ */
+ protected Widget[] findItems2(Object element) {
+ Widget result = doFindInputItem(element);
+ if (result != null) {
+ return new Widget[] { result };
+ }
+ // if we have an element map use it, otherwise search for the item.
+ if (usingElementMap()) {
+ return findItems2(element);
+ }
+ return doFindItems(element);
+ }
+
+ /**
+ * Recursively tries to find the given element.
+ *
+ * @param parent
+ * the parent item
+ * @param element
+ * the element
+ * @return Widget
+ */
+ protected ArrayList<Widget> internalFindItem(Item parent, Object element) {
+
+ ArrayList<Widget> ret = new ArrayList<Widget>();
+ // compare with node
+ Object data = parent.getData();
+ if (data != null) {
+ if (equals(data, element)) {
+ ret.add(parent);
+ return ret;
+ }
+ }
+ // recurse over children
+ Item[] items = getChildren(parent);
+ for (int i = 0; i < items.length; i++) {
+ Item item = items[i];
+ ArrayList<Widget> o = internalFindItem(item, element);
+ if (null != o) {
+ ret.addAll(o);
+ }
+ }
+ return ret;
+ }
+
+ protected Widget[] doFindItems(Object element) {
+ Widget[] ret = new Widget[0];
+ // compare with root
+ Object root = getRoot();
+ if (null == root) {
+ return ret;
+ }
+ ArrayList<Widget> res = new ArrayList<Widget>();
+ Item[] items = getChildren(getControl());
+ if (items != null) {
+ for (int i = 0; i < items.length; i++) {
+ ArrayList<Widget> o = internalFindItem(items[i], element);
+ if (null != o) {
+ res.addAll(o);
+ }
+ }
+ }
+ ret = res.toArray(ret);
+ return ret;
+ }
+
+}
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/KnownConfigurationsView.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/KnownConfigurationsView.java 2008-01-10 18:31:04 UTC (rev 5597)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/KnownConfigurationsView.java 2008-01-10 18:48:21 UTC (rev 5598)
@@ -49,7 +49,7 @@
import org.hibernate.console.node.BaseNode;
import org.hibernate.eclipse.console.actions.EditConsoleConfiguration;
import org.hibernate.eclipse.console.actions.OpenMappingAction;
-import org.hibernate.eclipse.console.viewers.MTreeViewer;
+import org.hibernate.eclipse.console.viewers.xpl.MTreeViewer;
import org.hibernate.eclipse.console.workbench.xpl.AnyAdaptableLabelProvider;
import org.hibernate.mapping.Property;
import org.hibernate.mapping.RootClass;
16 years, 5 months
JBoss Tools SVN: r5597 - in trunk/common/plugins/org.jboss.tools.common.model: lib and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-01-10 13:31:04 -0500 (Thu, 10 Jan 2008)
New Revision: 5597
Removed:
trunk/common/plugins/org.jboss.tools.common.model/lib/Bundles.jar
Modified:
trunk/common/plugins/org.jboss.tools.common.model/.classpath
trunk/common/plugins/org.jboss.tools.common.model/build.properties
Log:
JBIDE-1603
Modified: trunk/common/plugins/org.jboss.tools.common.model/.classpath
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/.classpath 2008-01-10 17:50:12 UTC (rev 5596)
+++ trunk/common/plugins/org.jboss.tools.common.model/.classpath 2008-01-10 18:31:04 UTC (rev 5597)
@@ -2,7 +2,6 @@
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="resources"/>
- <classpathentry exported="true" kind="lib" path="lib/Bundles.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
Modified: trunk/common/plugins/org.jboss.tools.common.model/build.properties
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/build.properties 2008-01-10 17:50:12 UTC (rev 5596)
+++ trunk/common/plugins/org.jboss.tools.common.model/build.properties 2008-01-10 18:31:04 UTC (rev 5597)
@@ -2,7 +2,6 @@
resources/
bin.includes = META-INF/,\
about.html,\
- lib/,\
plugin.properties,\
plugin.xml,\
schema/,\
Deleted: trunk/common/plugins/org.jboss.tools.common.model/lib/Bundles.jar
===================================================================
(Binary files differ)
16 years, 5 months
JBoss Tools SVN: r5595 - in trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test: org.jboss.tools.struts.vpe.struts.test and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2008-01-10 12:49:40 -0500 (Thu, 10 Jan 2008)
New Revision: 5595
Added:
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/build.properties
Removed:
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/org.jboss.tools.struts.vpe.struts.test/build.properties
Log:
http://jira.jboss.com/jira/browse/JBIDE-1565
Copied: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/build.properties (from rev 5594, trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/org.jboss.tools.struts.vpe.struts.test/build.properties)
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/build.properties (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/build.properties 2008-01-10 17:49:40 UTC (rev 5595)
@@ -0,0 +1,10 @@
+bin.includes = META-INF/,\
+ resources/,\
+ struts-test.jar
+jars.compile.order = struts-test.jar
+src.includes = src/,\
+ resources/,\
+ META-INF/,\
+ build.properties
+source.struts-test.jar = src/
+output.struts-test.jar = bin/
Deleted: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/org.jboss.tools.struts.vpe.struts.test/build.properties
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/org.jboss.tools.struts.vpe.struts.test/build.properties 2008-01-10 17:49:25 UTC (rev 5594)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/org.jboss.tools.struts.vpe.struts.test/build.properties 2008-01-10 17:49:40 UTC (rev 5595)
@@ -1,10 +0,0 @@
-bin.includes = META-INF/,\
- resources/,\
- struts-test.jar
-jars.compile.order = struts-test.jar
-src.includes = src/,\
- resources/,\
- META-INF/,\
- build.properties
-source.struts-test.jar = src/
-output.struts-test.jar = bin/
16 years, 5 months
JBoss Tools SVN: r5594 - in trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test: org.jboss.tools.struts.vpe.struts.test and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2008-01-10 12:49:25 -0500 (Thu, 10 Jan 2008)
New Revision: 5594
Added:
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/.project
Removed:
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/org.jboss.tools.struts.vpe.struts.test/.project
Log:
http://jira.jboss.com/jira/browse/JBIDE-1565
Copied: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/.project (from rev 5593, trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/org.jboss.tools.struts.vpe.struts.test/.project)
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/.project (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/.project 2008-01-10 17:49:25 UTC (rev 5594)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.struts.vpe.struts.test</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Deleted: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/org.jboss.tools.struts.vpe.struts.test/.project
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/org.jboss.tools.struts.vpe.struts.test/.project 2008-01-10 17:49:10 UTC (rev 5593)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/org.jboss.tools.struts.vpe.struts.test/.project 2008-01-10 17:49:25 UTC (rev 5594)
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.jboss.tools.struts.vpe.struts.test</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
16 years, 5 months
JBoss Tools SVN: r5593 - in trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test: org.jboss.tools.struts.vpe.struts.test and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2008-01-10 12:49:10 -0500 (Thu, 10 Jan 2008)
New Revision: 5593
Added:
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/.classpath
Removed:
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/org.jboss.tools.struts.vpe.struts.test/.classpath
Log:
http://jira.jboss.com/jira/browse/JBIDE-1565
Copied: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/.classpath (from rev 5592, trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/org.jboss.tools.struts.vpe.struts.test/.classpath)
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/.classpath (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/.classpath 2008-01-10 17:49:10 UTC (rev 5593)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Deleted: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/org.jboss.tools.struts.vpe.struts.test/.classpath
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/org.jboss.tools.struts.vpe.struts.test/.classpath 2008-01-10 17:48:55 UTC (rev 5592)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/org.jboss.tools.struts.vpe.struts.test/.classpath 2008-01-10 17:49:10 UTC (rev 5593)
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
16 years, 5 months