JBoss Tools SVN: r10893 - in trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test: src/org/jboss/tools/jsf/vpe/richfaces/test and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2008-10-16 11:56:06 -0400 (Thu, 16 Oct 2008)
New Revision: 10893
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dragIndicator.xhtml
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentContentTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2810,
junit test for rich:dragIndicator was added.
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dragIndicator.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dragIndicator.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentContentTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentContentTest.java 2008-10-16 15:41:27 UTC (rev 10892)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentContentTest.java 2008-10-16 15:56:06 UTC (rev 10893)
@@ -112,7 +112,7 @@
}
public void testDragIndicator() throws Throwable {
- assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ performInvisibleTagTest("components/dragIndicator.xhtml", "dragIndicator"); //$NON-NLS-1$ //$NON-NLS-2$
}
public void testDragSupport() throws Throwable {
16 years, 3 months
JBoss Tools SVN: r10892 - trunk/birt/docs/en/modules.
by jbosstools-commits@lists.jboss.org
Author: abogachuk
Date: 2008-10-16 11:41:27 -0400 (Thu, 16 Oct 2008)
New Revision: 10892
Modified:
trunk/birt/docs/en/modules/birt_designer.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-388 - BIRT UI, Designer features described
Modified: trunk/birt/docs/en/modules/birt_designer.xml
===================================================================
--- trunk/birt/docs/en/modules/birt_designer.xml 2008-10-16 15:10:40 UTC (rev 10891)
+++ trunk/birt/docs/en/modules/birt_designer.xml 2008-10-16 15:41:27 UTC (rev 10892)
@@ -12,7 +12,7 @@
<title>BIRT Report Designer</title>
- <para>BIRT Designer is an intuitive and quite easy Eclipse-based set of plugins to make reports. We will describe all its features to you.</para>
+ <para>BIRT Designer is an intuitive and quite easy Eclipse-based set of plugins to make reports. In this chapter we will describe its interface and all its features to you.</para>
<section id="birt_designer_UI" xreflabel="birt_designer_UI">
<title>BIRT User Interface</title>
16 years, 3 months
JBoss Tools SVN: r10891 - in trunk: birt/docs/en and 13 other directories.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2008-10-16 11:10:40 -0400 (Thu, 16 Oct 2008)
New Revision: 10891
Modified:
trunk/as/docs/reference/en/master.xml
trunk/birt/docs/en/master.xml
trunk/documentation/guides/GettingStartedGuide/en/modules/getting_started.xml
trunk/esb/docs/esb_ref_guide/en/master.xml
trunk/hibernatetools/docs/reference/en/master.xml
trunk/jbpm/docs/reference/en/master.xml
trunk/jsf/docs/jsf_tools_ref_guide/en/master.xml
trunk/jsf/docs/jsf_tools_tutorial/en/master.xml
trunk/jsf/docs/userguide/en/modules/palette.xml
trunk/portlet/docs/reference/en/master.xml
trunk/portlet/docs/reference/en/modules/installation.xml
trunk/seam/docs/reference/en/master.xml
trunk/struts/docs/struts_tools_ref_guide/en/master.xml
trunk/struts/docs/struts_tools_tutorial/en/master.xml
trunk/ws/docs/reference/en/master.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-292
versions are updated for beta1
Modified: trunk/as/docs/reference/en/master.xml
===================================================================
--- trunk/as/docs/reference/en/master.xml 2008-10-16 15:04:53 UTC (rev 10890)
+++ trunk/as/docs/reference/en/master.xml 2008-10-16 15:10:40 UTC (rev 10891)
@@ -41,7 +41,7 @@
<holder>JBoss, a division of Red Hat Inc.</holder>
</copyright>
<releaseinfo>
- Version: 3.0.0.alpha
+ Version: 3.0.0.beta1
</releaseinfo>
<abstract>
<title/>
Modified: trunk/birt/docs/en/master.xml
===================================================================
--- trunk/birt/docs/en/master.xml 2008-10-16 15:04:53 UTC (rev 10890)
+++ trunk/birt/docs/en/master.xml 2008-10-16 15:10:40 UTC (rev 10891)
@@ -23,7 +23,7 @@
<holder>JBoss, a division of Red Hat Inc.</holder>
</copyright>
<releaseinfo>
- Version: 1.0.0.alpha
+ Version: 3.0.0.beta1
</releaseinfo>
</bookinfo>
Modified: trunk/documentation/guides/GettingStartedGuide/en/modules/getting_started.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en/modules/getting_started.xml 2008-10-16 15:04:53 UTC (rev 10890)
+++ trunk/documentation/guides/GettingStartedGuide/en/modules/getting_started.xml 2008-10-16 15:10:40 UTC (rev 10891)
@@ -386,7 +386,7 @@
<para>Get Eclipse and Web Tools</para>
</listitem>
</itemizedlist>
- <para>The currant version of JBoss Tools (3.0.0Alpha1) targets at Eclipse 3.4/Ganymede and WTP
+ <para>The currant version of JBoss Tools (3.0.0.beta1) targets at Eclipse 3.4/Ganymede and WTP
3.0.</para>
<tip>
Modified: trunk/esb/docs/esb_ref_guide/en/master.xml
===================================================================
--- trunk/esb/docs/esb_ref_guide/en/master.xml 2008-10-16 15:04:53 UTC (rev 10890)
+++ trunk/esb/docs/esb_ref_guide/en/master.xml 2008-10-16 15:10:40 UTC (rev 10891)
@@ -34,7 +34,7 @@
<holder>JBoss, a division of Red Hat Inc.</holder>
</copyright>
<releaseinfo>
- Version: 3.0.0.alpha
+ Version: 3.0.0.beta1
</releaseinfo>
<abstract>
Modified: trunk/hibernatetools/docs/reference/en/master.xml
===================================================================
--- trunk/hibernatetools/docs/reference/en/master.xml 2008-10-16 15:04:53 UTC (rev 10890)
+++ trunk/hibernatetools/docs/reference/en/master.xml 2008-10-16 15:10:40 UTC (rev 10891)
@@ -40,7 +40,7 @@
</copyright>
<releaseinfo>
- Version: 3.0.0.alpha
+ Version: 3.0.0.beta1
</releaseinfo>
Modified: trunk/jbpm/docs/reference/en/master.xml
===================================================================
--- trunk/jbpm/docs/reference/en/master.xml 2008-10-16 15:04:53 UTC (rev 10890)
+++ trunk/jbpm/docs/reference/en/master.xml 2008-10-16 15:10:40 UTC (rev 10891)
@@ -59,7 +59,7 @@
<year>2008</year>
<holder>JBoss, a division of Red Hat Inc.</holder>
</copyright>
- <releaseinfo> Version: 3.0.0.alpha </releaseinfo>
+ <releaseinfo> Version: 3.0.0.beta1</releaseinfo>
<abstract>
<title/>
Modified: trunk/jsf/docs/jsf_tools_ref_guide/en/master.xml
===================================================================
--- trunk/jsf/docs/jsf_tools_ref_guide/en/master.xml 2008-10-16 15:04:53 UTC (rev 10890)
+++ trunk/jsf/docs/jsf_tools_ref_guide/en/master.xml 2008-10-16 15:10:40 UTC (rev 10891)
@@ -41,7 +41,7 @@
<holder>JBoss, a division of Red Hat Inc.</holder>
</copyright>
<releaseinfo>
- Version: 3.0.0.alpha
+ Version: 3.0.0.beta1
</releaseinfo>
<abstract>
Modified: trunk/jsf/docs/jsf_tools_tutorial/en/master.xml
===================================================================
--- trunk/jsf/docs/jsf_tools_tutorial/en/master.xml 2008-10-16 15:04:53 UTC (rev 10890)
+++ trunk/jsf/docs/jsf_tools_tutorial/en/master.xml 2008-10-16 15:10:40 UTC (rev 10891)
@@ -42,7 +42,7 @@
</copyright>
<releaseinfo>
- Version: 3.0.0.alpha
+ Version: 3.0.0.beta1
</releaseinfo>
Modified: trunk/jsf/docs/userguide/en/modules/palette.xml
===================================================================
--- trunk/jsf/docs/userguide/en/modules/palette.xml 2008-10-16 15:04:53 UTC (rev 10890)
+++ trunk/jsf/docs/userguide/en/modules/palette.xml 2008-10-16 15:10:40 UTC (rev 10891)
@@ -586,7 +586,7 @@
<para>Currant version of <property>JBoss Developer Studio</property> (i. e. 1.1.0GA)
includes <ulink url="http://www.jboss.org/jbossrichfaces/downloads/">RichFaces
- 3.1.3</ulink>. The JBoss Tools 3.0Alpha comes with <ulink
+ 3.2.2</ulink>. The JBoss Tools 3.0.0.beta1 comes with <ulink
url="http://www.jboss.org/jbossrichfaces/downloads/">RichFaces 3.1.3</ulink> and
partly support 3.2 version of the component framework. If you need to use the latest
version of the component framework you should import it into the Palette like any
Modified: trunk/portlet/docs/reference/en/master.xml
===================================================================
--- trunk/portlet/docs/reference/en/master.xml 2008-10-16 15:04:53 UTC (rev 10890)
+++ trunk/portlet/docs/reference/en/master.xml 2008-10-16 15:10:40 UTC (rev 10891)
@@ -36,7 +36,7 @@
<holder>JBoss, a division of Red Hat Inc.</holder>
</copyright>
<releaseinfo>
- Version: 3.0.0.alpha
+ Version: 3.0.0.beta1
</releaseinfo>
</bookinfo>
Modified: trunk/portlet/docs/reference/en/modules/installation.xml
===================================================================
--- trunk/portlet/docs/reference/en/modules/installation.xml 2008-10-16 15:04:53 UTC (rev 10890)
+++ trunk/portlet/docs/reference/en/modules/installation.xml 2008-10-16 15:10:40 UTC (rev 10891)
@@ -8,7 +8,7 @@
<itemizedlist>
<listitem>
- <para>First, you need to have Eclipse Ganymede with JBoss Tools 3.0.0.Alpha1 installed.</para>
+ <para>First, you need to have Eclipse Ganymede with JBoss Tools 3.0.0.Alpha1 and higher installed.</para>
<tip>
<title>Tip:</title>
Modified: trunk/seam/docs/reference/en/master.xml
===================================================================
--- trunk/seam/docs/reference/en/master.xml 2008-10-16 15:04:53 UTC (rev 10890)
+++ trunk/seam/docs/reference/en/master.xml 2008-10-16 15:10:40 UTC (rev 10891)
@@ -46,7 +46,7 @@
<holder>JBoss, a division of Red Hat Inc.</holder>
</copyright>
<releaseinfo>
- Version: 3.0.0.alpha
+ Version: 3.0.0.beta1
</releaseinfo>
<abstract>
Modified: trunk/struts/docs/struts_tools_ref_guide/en/master.xml
===================================================================
--- trunk/struts/docs/struts_tools_ref_guide/en/master.xml 2008-10-16 15:04:53 UTC (rev 10890)
+++ trunk/struts/docs/struts_tools_ref_guide/en/master.xml 2008-10-16 15:10:40 UTC (rev 10891)
@@ -42,7 +42,7 @@
<holder>JBoss, a division of Red Hat Inc.</holder>
</copyright>
<releaseinfo>
- Version: 3.0.0.alpha
+ Version: 3.0.0.beta1
</releaseinfo>
<abstract>
Modified: trunk/struts/docs/struts_tools_tutorial/en/master.xml
===================================================================
--- trunk/struts/docs/struts_tools_tutorial/en/master.xml 2008-10-16 15:04:53 UTC (rev 10890)
+++ trunk/struts/docs/struts_tools_tutorial/en/master.xml 2008-10-16 15:10:40 UTC (rev 10891)
@@ -41,7 +41,7 @@
</copyright>
<releaseinfo>
- Version: 3.0.0.alpha
+ Version: 3.0.0.beta1
</releaseinfo>
<abstract>
<title/>
Modified: trunk/ws/docs/reference/en/master.xml
===================================================================
--- trunk/ws/docs/reference/en/master.xml 2008-10-16 15:04:53 UTC (rev 10890)
+++ trunk/ws/docs/reference/en/master.xml 2008-10-16 15:10:40 UTC (rev 10891)
@@ -21,7 +21,7 @@
<holder>JBoss, a division of Red Hat Inc.</holder>
</copyright>
<releaseinfo>
- Version: 3.0.GA
+ Version: 3.0.0.beta1
</releaseinfo>
<abstract>
<title/>
16 years, 3 months
JBoss Tools SVN: r10890 - in trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test: src/org/jboss/tools/jsf/vpe/richfaces/test and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2008-10-16 11:04:53 -0400 (Thu, 16 Oct 2008)
New Revision: 10890
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataOrderedList.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dndParam.xhtml
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentContentTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2810,
junit test for rich:dndParam was added.
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataOrderedList.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataOrderedList.xhtml.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataOrderedList.xhtml.xml 2008-10-16 15:04:53 UTC (rev 10890)
@@ -0,0 +1,5 @@
+<tests>
+ <test id="dataOrderedList">
+
+ </test>
+</tests>
\ No newline at end of file
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataOrderedList.xhtml.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dndParam.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dndParam.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentContentTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentContentTest.java 2008-10-16 14:34:05 UTC (rev 10889)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentContentTest.java 2008-10-16 15:04:53 UTC (rev 10890)
@@ -98,7 +98,7 @@
assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
}
- public void _testDataTable() throws Throwable {
+ public void testDataTable() throws Throwable {
performContentTest("components/dataTable.xhtml");//$NON-NLS-1$
}
@@ -108,7 +108,7 @@
}
public void testDndParam() throws Throwable {
- assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ performInvisibleTagTest("components/dndParam.xhtml", "dndParam"); //$NON-NLS-1$ //$NON-NLS-2$
}
public void testDragIndicator() throws Throwable {
16 years, 3 months
JBoss Tools SVN: r10889 - trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/contentassist.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2008-10-16 10:34:05 -0400 (Thu, 16 Oct 2008)
New Revision: 10889
Modified:
trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/contentassist/SortingCompoundContentAssistProcessor.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2118 Cleanup/unify the EL code completion used in JSF, Java, Seam completions
Modified: trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/contentassist/SortingCompoundContentAssistProcessor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/contentassist/SortingCompoundContentAssistProcessor.java 2008-10-16 14:16:06 UTC (rev 10888)
+++ trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/contentassist/SortingCompoundContentAssistProcessor.java 2008-10-16 14:34:05 UTC (rev 10889)
@@ -16,6 +16,7 @@
import java.util.Collection;
import java.util.Comparator;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.LinkedList;
@@ -207,10 +208,33 @@
ICompletionProposal[] resultArray = ret.toArray(new ICompletionProposal[ret.size()]);
Object[] sorted = createSorter().sort(resultArray);
System.arraycopy(sorted, 0, resultArray, 0, sorted.length);
+ resultArray = makeUnique(resultArray);
return resultArray;
}
+ /**
+ * Removes duplicates of completion strings
+ *
+ * @param suggestions a list of suggestions ({@link String}).
+ * @return a list of unique completion suggestions.
+ */
+ public ICompletionProposal[] makeUnique(ICompletionProposal[] proposals) {
+ HashSet<String> present = new HashSet<String>();
+ ArrayList<ICompletionProposal> unique= new ArrayList<ICompletionProposal>();
+
+ for (int i = 0; proposals != null && i < proposals.length; i++) {
+
+ if (!present.contains(proposals[i].getDisplayString())) {
+ present.add(proposals[i].getDisplayString());
+ unique.add(proposals[i]);
+ }
+ }
+
+ present.clear();
+ return unique.toArray(new ICompletionProposal[unique.size()]);
+ }
+
protected Sorter createSorter() {
return new Sorter() {
public boolean compare(Object proposal1, Object proposal2) {
@@ -233,7 +257,7 @@
return str2.compareTo(str1) > 0;
}
- return (pr1 < pr2);
+ return (pr2 > pr1);
}
};
}
16 years, 3 months
JBoss Tools SVN: r10888 - in trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4: model and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2008-10-16 10:16:06 -0400 (Thu, 16 Oct 2008)
New Revision: 10888
Modified:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlEditor.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/Process.java
Log:
flow properties in properties view
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlEditor.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlEditor.java 2008-10-16 14:14:51 UTC (rev 10887)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlEditor.java 2008-10-16 14:16:06 UTC (rev 10888)
@@ -35,4 +35,5 @@
protected void createModel(InputStream is) {
setModel(createModel());
}
+
}
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/Process.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/Process.java 2008-10-16 14:14:51 UTC (rev 10887)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/Process.java 2008-10-16 14:16:06 UTC (rev 10888)
@@ -9,11 +9,6 @@
private Node initial = null;
- public Process() {
- super();
- setMetaData("xml", "process-definition");
- }
-
public StartState getStartState() {
for (Iterator<Node> iterator = getNodes().iterator(); iterator.hasNext(); ) {
Node node = iterator.next();
@@ -31,5 +26,5 @@
public void setInitial(Node node) {
initial = node;
}
-
+
}
16 years, 3 months
JBoss Tools SVN: r10887 - in trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools: common and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2008-10-16 10:14:51 -0400 (Thu, 16 Oct 2008)
New Revision: 10887
Added:
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/common/
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/common/properties/
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/common/properties/DefaultFlowPropertySource.java
Modified:
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/registry/ElementRegistry.java
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/wrapper/AbstractConnectionWrapper.java
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/wrapper/AbstractWrapper.java
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/wrapper/DefaultFlowWrapper.java
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/wrapper/DefaultNodeWrapper.java
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/wrapper/Wrapper.java
Log:
flow properties in properties view
Added: trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/common/properties/DefaultFlowPropertySource.java
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/common/properties/DefaultFlowPropertySource.java (rev 0)
+++ trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/common/properties/DefaultFlowPropertySource.java 2008-10-16 14:14:51 UTC (rev 10887)
@@ -0,0 +1,50 @@
+package org.jboss.tools.common.properties;
+
+import org.eclipse.ui.views.properties.IPropertyDescriptor;
+import org.eclipse.ui.views.properties.IPropertySource;
+import org.eclipse.ui.views.properties.TextPropertyDescriptor;
+import org.jboss.tools.flow.common.wrapper.DefaultFlowWrapper;
+
+public class DefaultFlowPropertySource implements IPropertySource {
+
+ private static final String NAME = "org.jboss.tools.flow.common.model.DefaultFlow.name";
+
+ private DefaultFlowWrapper wrapper = null;
+ private IPropertyDescriptor[] propertyDescriptors;
+
+ public DefaultFlowPropertySource(DefaultFlowWrapper wrapper) {
+ this.wrapper = wrapper;
+ }
+ public Object getEditableValue() {
+ return null;
+ }
+ public IPropertyDescriptor[] getPropertyDescriptors() {
+ if (propertyDescriptors == null) {
+ propertyDescriptors = new IPropertyDescriptor[] {
+ new TextPropertyDescriptor(NAME, "Name") {}
+ };
+ }
+ return propertyDescriptors;
+ }
+ public Object getPropertyValue(Object id) {
+ if (NAME.equals(id)) {
+ return wrapper.getName();
+ }
+ return null;
+ }
+ public boolean isPropertySet(Object id) {
+ if (NAME.equals(id)) {
+ return wrapper.getName() != null;
+ }
+ return false;
+ }
+ public void resetPropertyValue(Object id) {
+ }
+ public void setPropertyValue(Object id, Object value) {
+ if (NAME.equals(id)) {
+ if (value instanceof String) {
+ wrapper.setName((String)value);
+ }
+ }
+ }
+}
Modified: trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/registry/ElementRegistry.java
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/registry/ElementRegistry.java 2008-10-16 14:02:38 UTC (rev 10886)
+++ trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/registry/ElementRegistry.java 2008-10-16 14:14:51 UTC (rev 10887)
@@ -83,7 +83,7 @@
}
((Element)element).setMetaData("configurationElement", configurationElement);
Wrapper result = new DefaultConnectionWrapper();
- result.setElement(element);
+ result.setElement((Element)element);
return result;
}
@@ -97,7 +97,7 @@
}
((Node)element).setMetaData("configurationElement", configurationElement);
DefaultNodeWrapper result = new DefaultNodeWrapper();
- result.setElement(element);
+ result.setElement((Element)element);
AcceptsIncomingConnectionStrategy acceptsIncomingConnectionStrategy = createAcceptsIncomingConnectionStrategy(configurationElement);
if (acceptsIncomingConnectionStrategy != null) {
acceptsIncomingConnectionStrategy.setNode((Node)element);
@@ -122,7 +122,7 @@
}
((Element) element).setMetaData("configurationElement", configurationElement);
DefaultContainerWrapper result = new DefaultContainerWrapper();
- result.setElement(element);
+ result.setElement((Element)element);
AcceptsElementStrategy acceptsElementStrategy = createAcceptsElementStrategy(configurationElement);
if (acceptsElementStrategy != null) {
acceptsElementStrategy.setContainer((Container)element);
@@ -184,7 +184,7 @@
}
((Element) element).setMetaData("configurationElement", configurationElement);
DefaultFlowWrapper result = new DefaultFlowWrapper();
- result.setElement(element);
+ result.setElement((Element)element);
AcceptsElementStrategy acceptsElementStrategy = createAcceptsElementStrategy(configurationElement);
if (acceptsElementStrategy != null) {
acceptsElementStrategy.setContainer((Container)result.getElement());
Modified: trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/wrapper/AbstractConnectionWrapper.java
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/wrapper/AbstractConnectionWrapper.java 2008-10-16 14:02:38 UTC (rev 10886)
+++ trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/wrapper/AbstractConnectionWrapper.java 2008-10-16 14:14:51 UTC (rev 10887)
@@ -20,6 +20,7 @@
import java.util.List;
import org.eclipse.draw2d.geometry.Point;
+import org.jboss.tools.flow.common.model.Element;
/**
* A connection between two model elements.
@@ -30,17 +31,17 @@
private static final long serialVersionUID = 1L;
- private Object element;
+ private Element element;
private NodeWrapper source;
private NodeWrapper target;
private transient List<Point> bendpoints = new ArrayList<Point>();
private transient List<ModelListener> listeners = new ArrayList<ModelListener>();
- public void setElement(Object element) {
+ public void setElement(Element element) {
this.element = element;
}
- public Object getElement() {
+ public Element getElement() {
return element;
}
Modified: trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/wrapper/AbstractWrapper.java
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/wrapper/AbstractWrapper.java 2008-10-16 14:02:38 UTC (rev 10886)
+++ trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/wrapper/AbstractWrapper.java 2008-10-16 14:14:51 UTC (rev 10887)
@@ -1,15 +1,25 @@
package org.jboss.tools.flow.common.wrapper;
+import org.jboss.tools.flow.common.model.Element;
+
public abstract class AbstractWrapper implements Wrapper {
- private Object element;
+ private Element element;
- public void setElement(Object element) {
+ public void setElement(Element element) {
this.element = element;
}
- public Object getElement() {
+ public Element getElement() {
return element;
}
+
+ @SuppressWarnings("unchecked")
+ public Object getAdapter(Class adapter) {
+ if (adapter == Element.class) {
+ return element;
+ }
+ return null;
+ }
}
Modified: trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/wrapper/DefaultFlowWrapper.java
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/wrapper/DefaultFlowWrapper.java 2008-10-16 14:02:38 UTC (rev 10886)
+++ trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/wrapper/DefaultFlowWrapper.java 2008-10-16 14:14:51 UTC (rev 10887)
@@ -1,5 +1,8 @@
package org.jboss.tools.flow.common.wrapper;
+import org.eclipse.ui.views.properties.IPropertySource;
+import org.jboss.tools.common.properties.DefaultFlowPropertySource;
+import org.jboss.tools.flow.common.model.DefaultFlow;
import org.jboss.tools.flow.common.model.Flow;
import org.jboss.tools.flow.common.model.Node;
import org.jboss.tools.flow.common.strategy.AcceptsElementStrategy;
@@ -7,6 +10,15 @@
public class DefaultFlowWrapper extends AbstractFlowWrapper {
private AcceptsElementStrategy acceptsElementStrategy;
+ private DefaultFlowPropertySource propertySource;
+
+ public String getName() {
+ return ((DefaultFlow)getElement()).getName();
+ }
+
+ public void setName(String name) {
+ ((DefaultFlow)getElement()).setName(name);
+ }
public Integer getRouterLayout() {
Integer routerLayout = (Integer) ((Flow)getElement()).getMetaData("routerLayout");
@@ -49,5 +61,20 @@
public void setAcceptsElementStrategy(AcceptsElementStrategy strategy) {
this.acceptsElementStrategy = strategy;
}
+
+ @SuppressWarnings("unchecked")
+ public Object getAdapter(Class adapter) {
+ if (adapter == IPropertySource.class) {
+ return getPropertySource();
+ }
+ return super.getAdapter(adapter);
+ }
+ private IPropertySource getPropertySource() {
+ if (propertySource == null) {
+ propertySource = new DefaultFlowPropertySource(this);
+ }
+ return propertySource;
+ }
+
}
Modified: trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/wrapper/DefaultNodeWrapper.java
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/wrapper/DefaultNodeWrapper.java 2008-10-16 14:02:38 UTC (rev 10886)
+++ trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/wrapper/DefaultNodeWrapper.java 2008-10-16 14:14:51 UTC (rev 10887)
@@ -28,9 +28,8 @@
return getNode().getName();
}
- public void internalSetName(String name) {
+ protected void internalSetName(String name) {
getNode().setName(name);
- notifyListeners(CHANGE_VISUAL);
}
protected void internalSetConstraint(Rectangle constraint) {
Modified: trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/wrapper/Wrapper.java
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/wrapper/Wrapper.java 2008-10-16 14:02:38 UTC (rev 10886)
+++ trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/wrapper/Wrapper.java 2008-10-16 14:14:51 UTC (rev 10887)
@@ -1,9 +1,13 @@
package org.jboss.tools.flow.common.wrapper;
-public interface Wrapper {
+import org.eclipse.core.runtime.IAdaptable;
+import org.jboss.tools.flow.common.model.Element;
+
+
+public interface Wrapper extends IAdaptable {
- void setElement(Object element);
- Object getElement();
+ void setElement(Element element);
+ Element getElement();
void addListener(ModelListener listener);
void removeListener(ModelListener listener);
16 years, 3 months
JBoss Tools SVN: r10886 - in trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse: launch and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2008-10-16 10:02:38 -0400 (Thu, 16 Oct 2008)
New Revision: 10886
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/TableFilterView.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenerationLaunchDelegate.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ExporterAttributes.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/HibernateLaunchConstants.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1178
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/TableFilterView.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/TableFilterView.java 2008-10-16 14:02:28 UTC (rev 10885)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/TableFilterView.java 2008-10-16 14:02:38 UTC (rev 10886)
@@ -21,17 +21,12 @@
*/
package org.hibernate.eclipse.console.wizards;
-import java.util.ArrayList;
import java.util.Iterator;
-import java.util.List;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.CellEditor;
import org.eclipse.jface.viewers.CheckboxCellEditor;
-import org.eclipse.jface.viewers.ICellEditorListener;
import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.TextCellEditor;
@@ -45,7 +40,6 @@
import org.hibernate.eclipse.console.HibernateConsoleMessages;
import org.hibernate.eclipse.console.model.IReverseEngineeringDefinition;
import org.hibernate.eclipse.console.model.ITableFilter;
-import org.hibernate.eclipse.console.utils.ProjectUtils;
import org.hibernate.eclipse.console.workbench.DeferredContentProvider;
import org.hibernate.eclipse.console.workbench.LazyDatabaseSchema;
import org.hibernate.eclipse.console.workbench.TableContainer;
@@ -60,11 +54,19 @@
private TableViewer tableViewer;
- private IReverseEngineeringDefinition revEngDef;
+ protected IReverseEngineeringDefinition revEngDef;
public TableFilterView(Composite parent, int style) {
- super( parent, style );
+ super( parent, style );
+ }
+ protected TreeViewer createTreeViewer() {
+ TreeViewer viewer = new TreeViewer( tree );
+ viewer.setLabelProvider( new AnyAdaptableLabelProvider() );
+ viewer.setContentProvider( new DeferredContentProvider() );
+
+ viewer.setInput( null );
+ return viewer;
}
public void setModel(IReverseEngineeringDefinition revEngDef) {
@@ -75,13 +77,7 @@
protected void initialize() {
super.initialize();
tableViewer = createTableFilterViewer();
-
- viewer = new TreeViewer( tree );
- viewer.setLabelProvider( new AnyAdaptableLabelProvider() );
- viewer.setContentProvider( new DeferredContentProvider() );
-
- viewer.setInput( null );
-
+ viewer = createTreeViewer();
}
private TableViewer createTableFilterViewer() {
@@ -133,7 +129,7 @@
return revEngDef.getTableFilters();
}
- private void toggle(boolean exclude) {
+ protected void toggle(boolean exclude) {
ISelection selection = viewer.getSelection();
if ( !selection.isEmpty() ) {
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenerationLaunchDelegate.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenerationLaunchDelegate.java 2008-10-16 14:02:28 UTC (rev 10885)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenerationLaunchDelegate.java 2008-10-16 14:02:38 UTC (rev 10886)
@@ -21,6 +21,7 @@
*/
package org.hibernate.eclipse.launch;
+import java.io.ByteArrayInputStream;
import java.io.File;
import java.lang.reflect.Constructor;
import java.util.HashSet;
@@ -65,6 +66,7 @@
import org.hibernate.cfg.reveng.OverrideRepository;
import org.hibernate.cfg.reveng.ReverseEngineeringSettings;
import org.hibernate.cfg.reveng.ReverseEngineeringStrategy;
+import org.hibernate.cfg.reveng.TableFilter;
import org.hibernate.console.ConsoleConfiguration;
import org.hibernate.console.HibernateConsoleRuntimeException;
import org.hibernate.console.KnownConfigurations;
@@ -264,7 +266,8 @@
final String reverseEngineeringStrategy = attributes.getRevengStrategy();
final boolean preferBasicCompositeids = attributes.isPreferBasicCompositeIds();
final IResource revengres = PathHelper.findMember( root, attributes.getRevengSettings());
-
+ final String revengTables = attributes.getRevengTables();
+
if(reveng) {
Configuration configuration = null;
if(cc.hasConfiguration()) {
@@ -282,20 +285,24 @@
cc.execute(new Command() { // need to execute in the consoleconfiguration to let it handle classpath stuff!
- public Object execute() {
+ public Object execute() {
+ //todo: factor this setup of revengstrategy to core
+ ReverseEngineeringStrategy res = new DefaultReverseEngineeringStrategy();
-
- //todo: factor this setup of revengstrategy to core
- DefaultReverseEngineeringStrategy configurableNamingStrategy = new DefaultReverseEngineeringStrategy();
- //configurableNamingStrategy.setSettings(qqsettings);
-
- ReverseEngineeringStrategy res = configurableNamingStrategy;
- if(revengres!=null) {
+ OverrideRepository repository = null;
+
+ if (revengTables != null){
+ repository = new OverrideRepository();
+ repository.addInputStream(new ByteArrayInputStream(revengTables.getBytes()));
+ } else if(revengres!=null) {
/*Configuration configuration = cc.buildWith(new Configuration(), false);*/
/*Settings settings = cc.getSettings(configuration);*/
File file = PathHelper.getLocation( revengres ).toFile();
- OverrideRepository repository = new OverrideRepository();///*settings.getDefaultCatalogName(),settings.getDefaultSchemaName()*/);
- repository.addFile(file);
+ repository = new OverrideRepository();
+ repository.addFile(file);
+ }
+
+ if (repository != null){
res = repository.getReverseEngineeringStrategy(res);
}
@@ -308,7 +315,6 @@
.setDetectManyToMany( attributes.detectManyToMany() )
.setDetectOptimisticLock( attributes.detectOptimisticLock() );
- configurableNamingStrategy.setSettings( qqsettings );
res.setSettings(qqsettings);
cfg.setReverseEngineeringStrategy( res );
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ExporterAttributes.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ExporterAttributes.java 2008-10-16 14:02:28 UTC (rev 10885)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ExporterAttributes.java 2008-10-16 14:02:38 UTC (rev 10886)
@@ -46,6 +46,7 @@
import java.util.List;
import java.util.Map;
import java.util.Set;
+import java.util.StringTokenizer;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.Path;
@@ -58,6 +59,7 @@
import org.hibernate.eclipse.console.HibernateConsolePlugin;
import org.hibernate.eclipse.console.model.impl.ExporterDefinition;
import org.hibernate.eclipse.console.model.impl.ExporterFactory;
+import org.hibernate.mapping.Table;
// This class was created to centralize launch configuration attribute loading/saving
// (and also to clean up CodeGenerationLaunchDelegate considerably)
@@ -71,8 +73,10 @@
private String outputPath;
private String templatePath;
private List exporterFactories;
-private boolean autoManyToManyDetection;
-private boolean autoVersioning;
+ // if set then build reveng strategy relying on the list of tables
+ private String revengTables;
+ private boolean autoManyToManyDetection;
+ private boolean autoVersioning;
public ExporterAttributes () { }
@@ -106,8 +110,8 @@
}
exporterFactories = readExporterFactories(configuration);
-
- } catch (CoreException e) {
+ revengTables = configuration.getAttribute(HibernateLaunchConstants.ATTR_REVENG_TABLES, (String)null);
+ } catch (CoreException e) {
throw new CoreException(HibernateConsolePlugin.throwableToStatus(e, 666));
}
}
@@ -351,7 +355,11 @@
return autoVersioning;
}
+ public String getRevengTables() {
+ return revengTables;
+ }
+
}
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/HibernateLaunchConstants.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/HibernateLaunchConstants.java 2008-10-16 14:02:28 UTC (rev 10885)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/HibernateLaunchConstants.java 2008-10-16 14:02:38 UTC (rev 10886)
@@ -61,5 +61,6 @@
public static final String ATTR_PREFER_BASIC_COMPOSITE_IDS = ATTR_PREFIX + "prefercompositeids"; //$NON-NLS-1$
public static final String ATTR_AUTOMATIC_MANY_TO_MANY = ATTR_PREFIX + "reveng.detect_many_to_many"; //$NON-NLS-1$
public static final String ATTR_AUTOMATIC_VERSIONING = ATTR_PREFIX + "reveng.detect_optimistc_lock"; //$NON-NLS-1$
+ public static final String ATTR_REVENG_TABLES = ATTR_PREFIX + "reveng.tables";//$NON-NLS-1$
}
16 years, 3 months
JBoss Tools SVN: r10885 - in trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui: internal/reveng and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2008-10-16 10:02:28 -0400 (Thu, 16 Oct 2008)
New Revision: 10885
Added:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/reveng/
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/reveng/JDBCTablesColumnsReader.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/reveng/TablesColumnsCollector.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/DBTableFilterView.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/DBTablesViewer.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEntitiesTablesWizardPage.java
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEnitiesWizard.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEnitiesWizardPage.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1178
Added: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/reveng/JDBCTablesColumnsReader.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/reveng/JDBCTablesColumnsReader.java (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/reveng/JDBCTablesColumnsReader.java 2008-10-16 14:02:28 UTC (rev 10885)
@@ -0,0 +1,197 @@
+/*******************************************************************************
+ * Copyright (c) 2008 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.seam.ui.internal.reveng;
+
+import java.sql.SQLException;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.hibernate.cfg.reveng.ReverseEngineeringRuntimeInfo;
+import org.hibernate.cfg.reveng.dialect.MetaDataDialect;
+import org.hibernate.connection.ConnectionProvider;
+import org.hibernate.exception.SQLExceptionConverter;
+import org.hibernate.util.StringHelper;
+
+/**
+ * @author Vitali
+ *
+ */
+public class JDBCTablesColumnsReader {
+
+ private static final Log log = LogFactory.getLog(JDBCTablesColumnsReader.class);
+
+ private MetaDataDialect metadataDialect;
+ // current catalog name - if current connection provide it
+ private String currentCatalog;
+
+ private final ConnectionProvider provider;
+ private final SQLExceptionConverter sec;
+
+ public JDBCTablesColumnsReader(MetaDataDialect dialect, ConnectionProvider provider,
+ SQLExceptionConverter sec) {
+ this.metadataDialect = dialect;
+ this.provider = provider;
+ this.sec = sec;
+ currentCatalog = null;
+ }
+
+ private boolean safeEquals(Object value, Object tf) {
+ if (value == tf)
+ return true;
+ if (null == value)
+ return false;
+ return value.equals(tf);
+ }
+
+ private String quote(String columnName) {
+ if (null == columnName) {
+ return null;
+ }
+ if (!metadataDialect.needQuote(columnName)) {
+ return columnName;
+ }
+ if (columnName.length() > 1 && columnName.charAt(0) == '`'
+ && columnName.charAt(columnName.length() - 1) == '`') {
+ return columnName; // avoid double quoting
+ }
+ return "`" + columnName + "`";
+ }
+
+ private void collectTables(TablesColumnsCollector tcc, String catalog, String schema) {
+ Iterator tableIterator = null;
+ try {
+ String tablesMask = null;
+ tableIterator = metadataDialect.getTables(StringHelper.replace(catalog, ".*", "%"),
+ StringHelper.replace(schema, ".*", "%"), StringHelper.replace(tablesMask, ".*",
+ "%"));
+ while (tableIterator.hasNext()) {
+ Map tableRs = (Map) tableIterator.next();
+ String catalogName = (String) tableRs.get("TABLE_CAT");
+/*
+ * commented by Dmitry Geraskov to prevent showing catalog name if
+ * db provider can't found it
+ * otherwise we'll set it and filter out all tables when will run code generation
+ * if (null == catalogName) {
+ * // simple workaround if db provider do not find resources
+ * // to return right catalog name here
+ * catalogName = currentCatalog;
+ * }
+ */
+ String schemaName = (String) tableRs.get("TABLE_SCHEM");
+ String tableName = (String) tableRs.get("TABLE_NAME");
+ //String comment = (String) tableRs.get("REMARKS");
+ String tableType = (String) tableRs.get("TABLE_TYPE");
+ if (("TABLE".equals(tableType) || "VIEW".equals(tableType))) {
+ log.debug("Adding table " + tableName + " of type " + tableType);
+ tcc.addTableName(catalogName, schemaName, quote(tableName));
+ } else {
+ log.debug("Ignoring table " + tableName + " of type " + tableType);
+ }
+ }
+ } finally {
+ try {
+ if (null != tableIterator) {
+ metadataDialect.close(tableIterator);
+ }
+ } catch (Exception ignore) {
+ }
+ }
+ }
+
+ public void readDatabaseTables(TablesColumnsCollector tcc, String catalog, String schema) {
+ try {
+ ReverseEngineeringRuntimeInfo info = ReverseEngineeringRuntimeInfo.createInstance(provider, sec,
+ null);
+ metadataDialect.configure(info);
+ tcc.init();
+ initCurrentCatalog(info);
+ collectTables(tcc, catalog, schema);
+ tcc.adjust();
+ } finally {
+ metadataDialect.close();
+ }
+ }
+
+ private void collectColumns(TablesColumnsCollector tcc, String catalog, String schema) {
+ Iterator columnIterator = null;
+ try {
+ String tablesMask = null;
+ String columnsMask = null;
+ columnIterator = metadataDialect.getColumns(StringHelper.replace(catalog, ".*", "%"),
+ StringHelper.replace(schema, ".*", "%"), StringHelper.replace(tablesMask, ".*",
+ "%"), StringHelper.replace(columnsMask, ".*", "%"));
+ while (columnIterator.hasNext()) {
+ Map columnRs = (Map) columnIterator.next();
+ String catalogName = (String) columnRs.get("TABLE_CAT");
+ if (null == catalogName) {
+ // simple workaround if db provider do not find resources
+ // to return right catalog name here
+ catalogName = currentCatalog;
+ }
+ String schemaName = (String) columnRs.get("TABLE_SCHEM");
+ String tableName = (String) columnRs.get("TABLE_NAME");
+ String columnName = (String) columnRs.get("COLUMN_NAME");
+ //String dataType = (String) tableRs.get("DATA_TYPE");
+ log.debug("Adding column " + tableName + "." + columnName);
+ tcc.addColumnName(catalogName, schemaName, quote(tableName), columnName);
+ }
+ } finally {
+ try {
+ if (null != columnIterator) {
+ metadataDialect.close(columnIterator);
+ }
+ } catch (Exception ignore) {
+ }
+ }
+ }
+
+ public void readDatabaseColumns(TablesColumnsCollector tcc, String catalog, String schema) {
+ try {
+ ReverseEngineeringRuntimeInfo info = ReverseEngineeringRuntimeInfo.createInstance(provider, sec,
+ null);
+ metadataDialect.configure(info);
+ tcc.init();
+ initCurrentCatalog(info);
+ collectColumns(tcc, catalog, schema);
+ tcc.adjust();
+ } finally {
+ metadataDialect.close();
+ }
+ }
+
+ public void readDatabaseTablesColumns(TablesColumnsCollector tcc, String catalog, String schema) {
+ try {
+ ReverseEngineeringRuntimeInfo info = ReverseEngineeringRuntimeInfo.createInstance(provider, sec,
+ null);
+ metadataDialect.configure(info);
+ tcc.init();
+ initCurrentCatalog(info);
+ collectTables(tcc, catalog, schema);
+ collectColumns(tcc, catalog, schema);
+ tcc.adjust();
+ } finally {
+ metadataDialect.close();
+ }
+ }
+
+ /**
+ * init current catalog name
+ **/
+ private void initCurrentCatalog(ReverseEngineeringRuntimeInfo info) {
+ currentCatalog = null;
+ try {
+ currentCatalog = info.getConnectionProvider().getConnection().getCatalog();
+ } catch (SQLException ignore) {
+ }
+ }
+}
Property changes on: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/reveng/JDBCTablesColumnsReader.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/reveng/TablesColumnsCollector.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/reveng/TablesColumnsCollector.java (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/reveng/TablesColumnsCollector.java 2008-10-16 14:02:28 UTC (rev 10885)
@@ -0,0 +1,586 @@
+/*******************************************************************************
+ * Copyright (c) 2008 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.seam.ui.internal.reveng;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * @author Vitali
+ *
+ * This is specific efficient storage for names of catalogs, schemas, tables, columns and
+ * it's relations.
+ */
+public class TablesColumnsCollector {
+
+ // filter for lower part of long
+ public static final long LOWER_MASK = 0x00000000FFFFFFFFL;
+ // filter for upper part of long
+ public static final long UPPER_MASK = 0xFFFFFFFF00000000L;
+
+ // if true - collect full exact hierarchical structure - full structure info with redundancy
+ // ---------- (useful to get the tree structure easily)
+ // ---------- all relations one-to-many
+ // if false - result structure has no duplicate strings - structure without redundancy
+ // ---------- (useful for context help)
+ // ---------- all relations many-to-many
+ protected boolean fullStructure = false;
+ // sorted in alphabetic order list of catalogs
+ protected List catalogs;
+ // sorted in alphabetic order list of schemas
+ protected List schemas;
+ // sorted in alphabetic order list of tables
+ protected List tables;
+ // sorted in alphabetic order list of columns
+ protected List columns;
+
+ /**
+ * Index relation array-maps.
+ * Maps which are used to save relations between items in both directions.
+ * Here is a short description:
+ * left <-> right;
+ * left - could be catalogs, schemas, tables;
+ * right - could be schemas, tables, columns;
+ * xMap[i] & UPPER_MASK -> this is index in left array;
+ * xMap[i] & LOWER_MASK -> this is index in right array
+ **/
+ // catalogs <-> schemas index map
+ protected long[] csMap;
+ // schemas <-> tables index map
+ protected long[] stMap;
+ // tables <-> columns index map
+ protected long[] tcMap;
+
+ // temporary structures
+ protected List tempCATList;
+ protected List tempCSTList;
+ protected List tempTblList;
+ protected List tempClnList;
+ // simple protection of duplicates
+ protected String strCAT;
+ protected String strCST;
+ protected String strTbl;
+ protected String strCln;
+
+ public TablesColumnsCollector() {
+ }
+
+ /**
+ * @param fullStructure
+ * if true - collect full exact hierarchical structure - (useful to get the tree structure easily)
+ * if false - result structure has no duplicate strings - (useful for context help)
+ */
+ public TablesColumnsCollector(boolean fullStructure) {
+ this.fullStructure = fullStructure;
+ }
+
+ /**
+ * initialize collection
+ */
+ public void init() {
+ catalogs = null;
+ schemas = null;
+ tables = null;
+ columns = null;
+ csMap = null;
+ stMap = null;
+ tcMap = null;
+ tempCATList = new ArrayList();
+ tempCSTList = new ArrayList();
+ tempTblList = new ArrayList();
+ tempClnList = new ArrayList();
+ strCAT = "%%%%";
+ strCST = "%%%%";
+ strTbl = "%%%%";
+ strCln = "%%%%";
+ }
+
+ public String updateNullValue(String str) {
+ if (null == str) {
+ return "";
+ }
+ return str;
+ }
+
+ public void addCatalogName(String catalogName) {
+ catalogName = updateNullValue(catalogName);
+ String strCurr = "" + catalogName;
+ if (!strCAT.equalsIgnoreCase(strCurr)) {
+ tempCATList.add(strCurr);
+ strCAT = strCurr;
+ }
+ }
+
+ public void addSchemaName(String catalogName, String schemaName) {
+ catalogName = updateNullValue(catalogName);
+ schemaName = updateNullValue(schemaName);
+ addCatalogName(catalogName);
+ String strCurr = schemaName + "%" + catalogName;
+ if (!strCST.equalsIgnoreCase(strCurr)) {
+ tempCSTList.add(strCurr);
+ strCST = strCurr;
+ }
+ }
+
+ public void addTableName(String catalogName, String schemaName, String tableName) {
+ catalogName = updateNullValue(catalogName);
+ schemaName = updateNullValue(schemaName);
+ tableName = updateNullValue(tableName);
+ addSchemaName(catalogName, schemaName);
+ String strCurr = fullStructure ?
+ tableName + "%" + schemaName + "%" + catalogName :
+ tableName + "%" + schemaName;
+ if (!strTbl.equalsIgnoreCase(strCurr)) {
+ tempTblList.add(strCurr);
+ strTbl = strCurr;
+ }
+ }
+
+ public void addColumnName(String catalogName, String schemaName, String tableName, String columnName) {
+ catalogName = updateNullValue(catalogName);
+ schemaName = updateNullValue(schemaName);
+ tableName = updateNullValue(tableName);
+ columnName = updateNullValue(columnName);
+ addTableName(catalogName, schemaName, tableName);
+ String strCurr = fullStructure ?
+ columnName + "%" + tableName + "%" + schemaName + "%" + catalogName :
+ columnName + "%" + tableName;
+ if (!strCln.equalsIgnoreCase(strCurr)) {
+ tempClnList.add(strCurr);
+ strCln = strCurr;
+ }
+ }
+
+ protected void copyWithoutDuplicates(List arrTmp, List formList) {
+ String strPrev = null, strCurr = null;
+ for (int i = 0; i < arrTmp.size(); i++) {
+ strCurr = (String)arrTmp.get(i);
+ if (strPrev == strCurr) {
+ continue;
+ }
+ if (null != strPrev && strPrev.equalsIgnoreCase(strCurr)) {
+ continue;
+ }
+ strPrev = strCurr;
+ formList.add(strCurr);
+ }
+ }
+
+ protected void copyIncludeDuplicates(List arrTmp, List formList) {
+ for (int i = 0; i < arrTmp.size(); i++) {
+ String strCurr = (String)arrTmp.get(i);
+ formList.add(strCurr);
+ }
+ }
+
+ /**
+ * @param tempList - relation description list (with duplicates)
+ * @param formList
+ * @return
+ * size of tempList without duplicates
+ * in case of fullStructure: tempList.size() == formList.size() & tempList <-> formList by elements
+ */
+ protected int adjustList(List tempList, List formList) {
+ ArrayList arrTmp = new ArrayList();
+ Collections.sort(tempList, String.CASE_INSENSITIVE_ORDER);
+ String strPrev = null, strCurr = null;
+ int i, j;
+ // remove duplicates
+ for (i = 0, j = 0; i < tempList.size(); i++) {
+ strCurr = (String)tempList.get(i);
+ if (strPrev == strCurr) {
+ continue;
+ }
+ if (null != strPrev && strPrev.equalsIgnoreCase(strCurr)) {
+ continue;
+ }
+ strPrev = strCurr;
+ String[] atc = strCurr.split("%", 2);
+ tempList.set(j++, strCurr);
+ arrTmp.add(fullStructure ? strCurr : atc[0]);
+ }
+ if (fullStructure) {
+ copyIncludeDuplicates(arrTmp, formList);
+ }
+ else {
+ Collections.sort(arrTmp, String.CASE_INSENSITIVE_ORDER);
+ copyWithoutDuplicates(arrTmp, formList);
+ }
+ arrTmp = null;
+ return j;
+ }
+
+ protected void adjustMap(long[] xMap, List tempList, List formList0, List formList1) {
+ // in case of fullStructure:
+ // tempList.size() == formList0.size() &
+ // tempList <-> formList0 by elements
+ int i, j = xMap.length;
+ for (i = 0; i < j; i++) {
+ String strCurr = (String)tempList.get(i);
+ String[] atc = strCurr.split("%", 2);
+ String tmp = atc[1];
+ int keyT = Collections.binarySearch(formList1, tmp, String.CASE_INSENSITIVE_ORDER);
+ if (keyT < 0 || keyT >= formList1.size() || !tmp.equalsIgnoreCase((String)formList1.get(keyT))) {
+ keyT = Integer.MAX_VALUE;
+ }
+ tmp = atc[0];
+ int keyC = fullStructure ?
+ i : Collections.binarySearch(formList0, tmp, String.CASE_INSENSITIVE_ORDER);
+ tmp = fullStructure ? strCurr : tmp;
+ if (keyC < 0 || keyC >= formList0.size() || !tmp.equalsIgnoreCase((String)formList0.get(keyC))) {
+ keyC = Integer.MAX_VALUE;
+ }
+ xMap[i] = ( ((long)keyT) << 32 ) | ((long)keyC);
+ }
+ Arrays.sort(xMap);
+ }
+
+ /**
+ * adjust collected results
+ */
+ public void adjust() {
+ strCAT = null;
+ strCST = null;
+ strTbl = null;
+ strCln = null;
+ int size;
+ catalogs = new ArrayList();
+ if (null != tempCATList) {
+ Collections.sort(tempCATList, String.CASE_INSENSITIVE_ORDER);
+ copyWithoutDuplicates(tempCATList, catalogs);
+ tempCATList = null;
+ }
+ schemas = new ArrayList();
+ csMap = new long[0];
+ if (null != tempCSTList) {
+ size = adjustList(tempCSTList, schemas);
+ csMap = new long[size];
+ adjustMap(csMap, tempCSTList, schemas, catalogs);
+ tempCSTList = null;
+ }
+ tables = new ArrayList();
+ stMap = new long[0];
+ if (null != tempTblList) {
+ size = adjustList(tempTblList, tables);
+ stMap = new long[size];
+ adjustMap(stMap, tempTblList, tables, schemas);
+ tempTblList = null;
+ }
+ columns = new ArrayList();
+ tcMap = new long[0];
+ if (null != tempClnList) {
+ size = adjustList(tempClnList, columns);
+ tcMap = new long[size];
+ adjustMap(tcMap, tempClnList, columns, tables);
+ tempClnList = null;
+ }
+ }
+
+ public static final class Bounds {
+ public int nL = 0;
+ public int nH = 0;
+ }
+
+ /**
+ * binaryBoundsSearch is a method to find lower and upper bounds
+ * in sorted array of strings for some string prefix.
+ * @param list - search array of strings (should be sorted in ascending case insensitive order);
+ * @param prefix - matching prefix;
+ * @param bounds - result interval in the list - all items in interval start from prefix.
+ * bounds.nL <= interval < bounds.nH
+ */
+ public static final Bounds binaryBoundsSearch(List list, String prefix) {
+ Bounds bounds = new Bounds();
+ if (0 == list.size()) {
+ bounds.nL = bounds.nH = 0;
+ return bounds;
+ }
+ prefix = prefix.toUpperCase();
+ int low = 0;
+ int high = list.size() - 1;
+ int mid = (low + high) >> 1;
+ // looking for mid - some element in the interval,
+ // which is matched for criteria (has the prefix)
+ while (low <= high) {
+ mid = (low + high) >> 1;
+ String midVal = ((String)list.get(mid)).toUpperCase();
+ int cmp = midVal.compareToIgnoreCase(prefix);
+ cmp = midVal.startsWith(prefix) ? 0 : cmp;
+ if (cmp < 0) {
+ low = mid + 1;
+ }
+ else if (cmp > 0) {
+ high = mid - 1;
+ }
+ else {
+ break;
+ }
+ }
+ int low2 = mid;
+ int high2 = mid;
+ // looking for low bound - indicates minimal index of element in the interval,
+ // which is matched for criteria (has the prefix)
+ while (low <= high2) {
+ mid = (low + high2) >> 1;
+ String midVal = ((String)list.get(mid)).toUpperCase();
+ int cmp = midVal.compareToIgnoreCase(prefix);
+ cmp = midVal.startsWith(prefix) ? 0 : cmp;
+ if (cmp < 0) {
+ low = mid + 1;
+ }
+ else if (cmp >= 0) {
+ high2 = mid - 1;
+ }
+ }
+ // looking for high bound - indicates maximal index of element in the interval,
+ // which is matched for criteria (has the prefix)
+ while (low2 <= high) {
+ mid = (low2 + high) >> 1;
+ String midVal = ((String)list.get(mid)).toUpperCase();
+ int cmp = midVal.compareToIgnoreCase(prefix);
+ cmp = midVal.startsWith(prefix) ? 0 : cmp;
+ if (cmp <= 0) {
+ low2 = mid + 1;
+ }
+ else if (cmp > 0) {
+ high = mid - 1;
+ }
+ }
+ // adjust low bound
+ if (low < list.size()) {
+ while (0 <= low && ((String)list.get(low)).toUpperCase().startsWith(prefix)) {
+ low--;
+ }
+ low++;
+ }
+ if (high < low) {
+ high = low;
+ }
+ // adjust high bound
+ while (high < list.size() && ((String)list.get(high)).toUpperCase().startsWith(prefix)) {
+ high++;
+ }
+ bounds.nL = low;
+ bounds.nH = high;
+ return bounds;
+ }
+
+
+ /**
+ * Clear string from redundant information.
+ * @param res
+ */
+ protected String correctName(String input) {
+ if (!fullStructure) {
+ return input;
+ }
+ String[] atc = input.split("%", 2);
+ return atc[0];
+ }
+
+ /**
+ * Clear list of string from redundant information.
+ * @param res
+ */
+ protected void correctNames(List res) {
+ if (!fullStructure) {
+ return;
+ }
+ for (int i = 0; i < res.size(); i++) {
+ String strCurr = (String)res.get(i);
+ String[] atc = strCurr.split("%", 2);
+ res.set(i, atc[0]);
+ }
+ }
+
+ protected List getXNames(List xArray, String prefix) {
+ List res = new ArrayList();
+ if (null == xArray) {
+ return res;
+ }
+ if (null != prefix) {
+ prefix = prefix.toUpperCase();
+ }
+ if (null == prefix) {
+ res.addAll(xArray);
+ }
+ else {
+ Bounds bounds = binaryBoundsSearch(xArray, prefix);
+ for (; bounds.nL < bounds.nH; bounds.nL++) {
+ res.add(xArray.get(bounds.nL));
+ }
+ }
+ return res;
+ }
+
+ public List getMatchingCatalogNames(String prefix) {
+ List res = getXNames(catalogs, prefix);
+ correctNames(res);
+ return res;
+ }
+
+ public List getMatchingSchemaNames(String prefix) {
+ List res = getXNames(schemas, prefix);
+ correctNames(res);
+ return res;
+ }
+
+ public List getMatchingTableNames(String prefix) {
+ List res = getXNames(tables, prefix);
+ correctNames(res);
+ return res;
+ }
+
+ public List getMatchingColumnNames(String prefix) {
+ List res = getXNames(columns, prefix);
+ correctNames(res);
+ return res;
+ }
+
+ /**
+ * return list of matching strings.
+ * Here is a short description what is happen here.
+ * the same schema with left <-> right which was above:
+ * xArray1 - right;
+ * xArray2 - left;
+ * xxMap - <-> index relation array-map;
+ * name - exactly string in xArray2;
+ * prefix - prefix string in xArray1.
+ * Matching criteria:
+ * list of strings from xArray1 which start from prefix and which is in relation with
+ * item from xArray2 which is exactly match the name.
+ **/
+ protected List getXNames(List xArray1, long[] xxMap, List xArray2, String name, String prefix) {
+ List res = new ArrayList();
+ if (null == xArray1) {
+ return res;
+ }
+ if (null != name) {
+ name = name.toUpperCase();
+ }
+ if (null != prefix) {
+ prefix = prefix.toUpperCase();
+ }
+ if (null == name && null == prefix) {
+ res.addAll(xArray1);
+ }
+ else if (null == name) {
+ Bounds bounds = binaryBoundsSearch(xArray1, prefix);
+ for (; bounds.nL < bounds.nH; bounds.nL++) {
+ res.add(xArray1.get(bounds.nL));
+ }
+ }
+ else {
+ if (null == xArray2 || null == xxMap) {
+ return res;
+ }
+ Bounds bounds = binaryBoundsSearch(xArray2, name);
+ for (; bounds.nL < bounds.nH; bounds.nL++) {
+ int keyT = bounds.nL;
+ String itemT = (String)xArray2.get(keyT);
+ if (fullStructure) {
+ if (!itemT.toUpperCase().startsWith(name)) {
+ continue;
+ }
+ name = correctName(name);
+ itemT = correctName(itemT);
+ }
+ if (!name.equalsIgnoreCase(itemT)) {
+ continue;
+ }
+ long keyTlong = ((long)keyT) << 32;
+ int i = Arrays.binarySearch(xxMap, keyTlong);
+ if (i < 0) {
+ i = - i - 1;
+ }
+ if (null == prefix) {
+ for ( ; i < xxMap.length; i++) {
+ if (keyTlong != (xxMap[i] & UPPER_MASK)) {
+ break;
+ }
+ int keyC = (int)(xxMap[i] & LOWER_MASK);
+ if (0 <= keyC && keyC < xArray1.size()) {
+ res.add(xArray1.get(keyC));
+ }
+ }
+ }
+ else {
+ for ( ; i < xxMap.length; i++) {
+ if (keyTlong != (xxMap[i] & UPPER_MASK)) {
+ break;
+ }
+ int keyC = (int)(xxMap[i] & LOWER_MASK);
+ if (0 <= keyC && keyC < xArray1.size() && ((String)xArray1.get(keyC)).toUpperCase().startsWith(prefix)) {
+ res.add(xArray1.get(keyC));
+ }
+ }
+ }
+ }
+ }
+ return res;
+ }
+
+ public List getCatalogNames() {
+ List res = new ArrayList();
+ if (null != catalogs) {
+ res.addAll(catalogs);
+ }
+ return res;
+ }
+
+ public List getMatchingSchemaNames(String catalogName, String prefix) {
+ List res = getXNames(schemas, csMap, catalogs, catalogName, prefix);
+ correctNames(res);
+ return res;
+ }
+
+ public List getMatchingTablesNames(String schemaName, String prefix) {
+ List res = getXNames(tables, stMap, schemas, schemaName, prefix);
+ correctNames(res);
+ return res;
+ }
+
+ public List getMatchingColumnNames(String tableName, String prefix) {
+ List res = getXNames(columns, tcMap, tables, tableName, prefix);
+ correctNames(res);
+ return res;
+ }
+
+ public List getMatchingTablesNames(String catalogName, String schemaName, String prefix) {
+ catalogName = updateNullValue(catalogName);
+ schemaName = updateNullValue(schemaName);
+ schemaName = "" + schemaName + "%" + catalogName;
+ List res = getXNames(tables, stMap, schemas, schemaName, prefix);
+ correctNames(res);
+ return res;
+ }
+
+ public List getMatchingColumnNames(String schemaName, String tableName, String prefix) {
+ schemaName = updateNullValue(schemaName);
+ tableName = updateNullValue(tableName);
+ tableName = "" + tableName + "%" + schemaName;
+ List res = getXNames(columns, tcMap, tables, tableName, prefix);
+ correctNames(res);
+ return res;
+ }
+
+ public List getMatchingColumnNames(String catalogName, String schemaName, String tableName, String prefix) {
+ catalogName = updateNullValue(catalogName);
+ schemaName = updateNullValue(schemaName);
+ tableName = updateNullValue(tableName);
+ tableName = "" + tableName + "%" + schemaName + "%" + catalogName;
+ List res = getXNames(columns, tcMap, tables, tableName, prefix);
+ correctNames(res);
+ return res;
+ }
+}
Property changes on: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/reveng/TablesColumnsCollector.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/DBTableFilterView.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/DBTableFilterView.java (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/DBTableFilterView.java 2008-10-16 14:02:28 UTC (rev 10885)
@@ -0,0 +1,112 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2008 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.jboss.tools.seam.ui.views;
+
+import java.util.Iterator;
+
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.swt.widgets.Composite;
+import org.hibernate.console.ConsoleConfiguration;
+import org.hibernate.console.KnownConfigurations;
+import org.hibernate.eclipse.console.model.ITableFilter;
+import org.hibernate.eclipse.console.wizards.TableFilterView;
+import org.hibernate.mapping.Table;
+import org.hibernate.util.StringHelper;
+import org.jboss.tools.seam.ui.views.DBTablesViewer.Catalog;
+import org.jboss.tools.seam.ui.views.DBTablesViewer.Schema;
+
+/**
+ * @author Dmitry Geraskov
+ *
+ */
+public abstract class DBTableFilterView extends TableFilterView {
+
+ private DBTablesViewer viewer;
+
+ public DBTableFilterView(Composite parent, int style) {
+ super( parent, style );
+ }
+
+ @Override
+ protected TreeViewer createTreeViewer() {
+ if (viewer == null){
+ viewer = new DBTablesViewer( tree );
+ }
+ return viewer;
+ }
+
+ @Override
+ protected void doRefreshTree() {
+ ConsoleConfiguration configuration = KnownConfigurations.getInstance()
+ .find( getConsoleConfigurationName() );
+
+ if(configuration!=null) {
+ viewer.setInput( configuration );
+ }
+ }
+
+ @Override
+ protected void toggle(boolean exclude) {
+ ISelection selection = viewer.getSelection();
+
+ if ( !selection.isEmpty() ) {
+ StructuredSelection ss = (StructuredSelection) selection;
+ Iterator iterator = ss.iterator();
+ while ( iterator.hasNext() ) {
+ Object sel = iterator.next();
+ ITableFilter filter = null;
+
+ if ( sel instanceof Table ) {
+ Table table = (Table) sel;
+ filter = revEngDef.createTableFilter();
+ if ( StringHelper.isNotEmpty( table.getName() ) ) {
+ filter.setMatchName( table.getName() );
+ }
+ if ( StringHelper.isNotEmpty( table.getCatalog() ) ) {
+ filter.setMatchCatalog( table.getCatalog() );
+ }
+ if ( StringHelper.isNotEmpty( table.getSchema() ) ) {
+ filter.setMatchSchema( table.getSchema() );
+ }
+ filter.setExclude( Boolean.valueOf( exclude ) );
+ } else if ( sel instanceof Schema ) { // assume its a schema!
+ Schema tc = (Schema) sel;
+ filter = revEngDef.createTableFilter();
+ String schema = tc.getName();
+ String catalog = tc.getParent().getName();
+ if(StringHelper.isNotEmpty(schema)) {
+ filter.setMatchSchema(schema);
+ }
+ if(StringHelper.isNotEmpty(catalog)) {
+ filter.setMatchCatalog(catalog);
+ }
+ filter.setExclude( Boolean.valueOf( exclude ) );
+ } else if ( sel instanceof Catalog ) { // assume its a catalog!
+ Catalog tc = (Catalog) sel;
+ filter = revEngDef.createTableFilter();
+ if(StringHelper.isNotEmpty(tc.getName())) {
+ filter.setMatchCatalog(tc.getName());
+ }
+ filter.setExclude( Boolean.valueOf( exclude ) );
+ }
+ if ( filter != null )
+ revEngDef.addTableFilter( filter );
+ }
+ } else {
+ ITableFilter filter = revEngDef.createTableFilter();
+ filter.setExclude( Boolean.valueOf( exclude ) );
+ revEngDef.addTableFilter( filter );
+ }
+ }
+
+}
Property changes on: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/DBTableFilterView.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/DBTablesViewer.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/DBTablesViewer.java (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/DBTablesViewer.java 2008-10-16 14:02:28 UTC (rev 10885)
@@ -0,0 +1,302 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2008 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.jboss.tools.seam.ui.views;
+
+import java.util.List;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.ui.progress.WorkbenchJob;
+import org.hibernate.HibernateException;
+import org.hibernate.JDBCException;
+import org.hibernate.cfg.Configuration;
+import org.hibernate.cfg.JDBCReaderFactory;
+import org.hibernate.cfg.Settings;
+import org.hibernate.cfg.reveng.dialect.MetaDataDialect;
+import org.hibernate.console.ConsoleConfiguration;
+import org.hibernate.console.ImageConstants;
+import org.hibernate.console.execution.ExecutionContext;
+import org.hibernate.eclipse.console.utils.EclipseImages;
+import org.hibernate.mapping.Table;
+import org.jboss.tools.seam.ui.internal.reveng.JDBCTablesColumnsReader;
+import org.jboss.tools.seam.ui.internal.reveng.TablesColumnsCollector;
+
+/**
+ * Database tree viewer with three-level structure (till Tables)
+ * @author Dmitry Geraskov
+ */
+public class DBTablesViewer extends TreeViewer {
+
+ private String connectionErrorMessage = "Couldn't connect to Database"; //$NON-NLS-1$
+
+ private Image catalog = EclipseImages.getImageDescriptor(ImageConstants.DATABASE).createImage();
+ private Image schema = EclipseImages.getImageDescriptor(ImageConstants.SCHEMA).createImage();
+ private Image table = EclipseImages.getImageDescriptor(ImageConstants.TABLE).createImage();
+
+ public class Element{
+ private String name;
+ protected String defaultLabel;
+
+ Element(String name){
+ this.name = name;
+ }
+
+ public String getName(){
+ return name;
+ }
+
+ public String getLabel(){
+ return name == null ? defaultLabel : name;
+ }
+ }
+
+ public class Catalog extends Element{
+
+ public static final String DEF_CATALOG_NAME = "<Default catalog>"; //$NON-NLS-1$
+
+ Catalog(String name){
+ super(name);
+ defaultLabel = DEF_CATALOG_NAME;
+ }
+ }
+
+ public class Schema extends Element{
+
+ public static final String DEF_SCHEMA_NAME = "<Default schema>"; //$NON-NLS-1$
+
+ private Catalog parent;
+
+ Schema(String name, Catalog parent){
+ super(name);
+ this.parent = parent;
+ defaultLabel = DEF_SCHEMA_NAME;
+ }
+
+ public Catalog getParent(){
+ return parent;
+ }
+ }
+
+ public DBTablesViewer(Tree tree){
+ super(tree);
+ setContentProvider(createContentProvider());
+ setLabelProvider(createLabelProvider());
+ }
+
+ public DBTablesViewer(Composite parent) {
+ super(parent);
+
+ }
+
+ /**
+ * @return ITreeContentProvider
+ */
+ protected ITreeContentProvider createContentProvider() {
+ return new ITreeContentProvider(){
+
+ private Configuration cfg = null;
+
+ private Settings buildSettings = null;
+
+ private String placeHolder = "Pending..."; //$NON-NLS-1$
+
+ private String conErrorItem = '<' + connectionErrorMessage + '>';
+
+ private final Object[] NO_CHILDREN = new Object[0];
+
+ private static final int BEGIN_STATE = 0;
+
+ private static final int CHILDREN_FETCHED = 1;
+
+ private static final int CONNECTION_ERROR = 2;
+
+ private static final int LOADING_IN_PROGRESS = 3;
+
+ private int connectionState = BEGIN_STATE;
+
+ private TablesColumnsCollector tablesCollector;
+
+ private Object[] getCatalogs(){
+ if (connectionState == LOADING_IN_PROGRESS){
+ return new String[]{placeHolder};
+ }
+ if (connectionState == CONNECTION_ERROR){
+ return new String[]{connectionErrorMessage};
+ }
+ List catalogNames = tablesCollector.getCatalogNames();
+ Element[] catalogs = new Element[catalogNames.size()];
+ for (int i = 0; i < catalogs.length; i++) {
+ String catalogName = (String) catalogNames.get(i);
+ if (catalogName == null || "".equals(catalogName)) catalogName = null; //$NON-NLS-1$
+ catalogs[i] = new Catalog(catalogName);
+
+ }
+ return catalogs;
+ }
+
+ private Object[] getSchemas(Catalog catalog){
+ List schemaNames = tablesCollector.getMatchingSchemaNames(catalog.getName(), buildSettings.getDefaultSchemaName());
+ Element[] schemas = new Element[schemaNames.size()];
+ for (int i = 0; i < schemaNames.size(); i++) {
+ String schemaName = (String) schemaNames.get(i);
+ if (schemaName == null || "".equals(schemaName)) schemaName = null; //$NON-NLS-1$
+ schemas[i] = new Schema( schemaName, catalog);
+ }
+ return schemas;
+ }
+
+ private Object[] getTables(Schema schema){
+ List tableNames = tablesCollector.getMatchingTablesNames(schema.getParent().getName(), schema.getName(), ""); //$NON-NLS-1$
+ Table[] tables = new Table[tableNames.size()];
+ for (int i = 0; i < tables.length; i++) {
+ tables[i] = new Table((String) tableNames.get(i));
+ tables[i].setCatalog(schema.getParent().getName());
+ tables[i].setSchema(schema.getName());
+ }
+ return tables;
+ }
+
+ public Object[] getChildren(Object parent) {
+ if (parent instanceof Catalog) {
+ return getSchemas((Catalog)parent);
+ }
+ if (parent instanceof Schema) {
+ Schema schema = (Schema)parent;
+ return getTables(schema);
+ }
+ return NO_CHILDREN;
+ }
+
+ public Object getParent(Object element) {
+ if (element instanceof Schema){
+ return ((Schema)element).getParent();
+ }
+ return null;
+ }
+
+ public boolean hasChildren(Object parent) {
+ return parent instanceof Element;
+ }
+
+ public Object[] getElements(Object inputElement) {
+ if (buildSettings == null) return new String[]{conErrorItem};
+
+ if (connectionState == BEGIN_STATE){
+ tablesCollector = new TablesColumnsCollector(true);
+ if (connectionState == BEGIN_STATE)
+ connectionState = LOADING_IN_PROGRESS;
+ WorkbenchJob job = new WorkbenchJob("Fetching database structure") { //$NON-NLS-1$
+ @Override
+ public IStatus runInUIThread(IProgressMonitor monitor) {
+ try{
+ MetaDataDialect realMetaData = JDBCReaderFactory.newMetaDataDialect(buildSettings
+ .getDialect(), cfg.getProperties());
+
+ JDBCTablesColumnsReader reader = new JDBCTablesColumnsReader(realMetaData,
+ buildSettings.getConnectionProvider(), buildSettings.getSQLExceptionConverter());
+ reader.readDatabaseTables(tablesCollector, buildSettings.getDefaultCatalogName(), buildSettings.getDefaultSchemaName());
+
+ connectionState = CHILDREN_FETCHED;
+ } catch (JDBCException e){
+ connectionState = CONNECTION_ERROR;
+ }
+ DBTablesViewer.this.remove(placeHolder);
+ DBTablesViewer.this.refresh();
+ return Status.OK_STATUS;
+ }};
+ job.schedule();
+ }
+ return getCatalogs();
+ }
+
+ public void dispose() {}
+
+ /**
+ * Supported input types are:
+ * org.hibernate.console.ConsoleConfiguration,
+ * org.hibernate.cfg.Settings.
+ */
+ public void inputChanged(Viewer viewer, Object oldInput,
+ Object newInput) {
+ if (newInput == oldInput
+ && connectionState != CONNECTION_ERROR) return;
+
+ if (newInput instanceof ConsoleConfiguration) {
+ ConsoleConfiguration cc = (ConsoleConfiguration) newInput;
+ try{
+ cc.build();
+ cfg = cc.getConfiguration();
+ cc.getExecutionContext().execute(new ExecutionContext.Command() {
+ public Object execute() {
+ Settings newSettings = cfg.buildSettings();
+ if (!newSettings.equals(buildSettings)){
+ buildSettings = newSettings;
+ connectionState = BEGIN_STATE;
+ }
+ return null;
+ }});
+ } catch (HibernateException e){
+ connectionState = CONNECTION_ERROR;
+ }
+ }
+ }
+ };
+ }
+
+ protected LabelProvider createLabelProvider(){
+ return new LabelProvider(){
+
+ @Override
+ public void dispose() {
+ catalog.dispose();
+ schema.dispose();
+ table.dispose();
+ }
+
+ @Override
+ public Image getImage(Object element) {
+ if (element instanceof Catalog){
+ return catalog;
+ }
+ if (element instanceof Schema){
+ return schema;
+ }
+ if (element instanceof Table){
+ return table;
+ }
+ return null;
+ }
+
+ @Override
+ public String getText(Object element) {
+ if (element instanceof Element){
+ return ((Element)element).getLabel();
+ }
+ if (element instanceof Table){
+ return ((Table)element).getName();
+ }
+ return super.getText(element);
+ }
+ };
+ }
+
+ public void setConnectionErrorMessage(String connectionErrorMessage) {
+ this.connectionErrorMessage = connectionErrorMessage;
+ }
+}
Property changes on: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/DBTablesViewer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEnitiesWizard.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEnitiesWizard.java 2008-10-16 13:32:18 UTC (rev 10884)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEnitiesWizard.java 2008-10-16 14:02:28 UTC (rev 10885)
@@ -30,6 +30,7 @@
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.INewWizard;
import org.eclipse.ui.PlatformUI;
@@ -51,6 +52,9 @@
*/
public class SeamGenerateEnitiesWizard extends SeamBaseWizard implements INewWizard {
+ IWizardPage page1 = new SeamGenerateEnitiesWizardPage();
+ IWizardPage page2 = new SeamGenerateEntitiesTablesWizardPage();
+
public void createPageControls(Composite pageContainer) {
super.createPageControls(pageContainer);
PlatformUI.getWorkbench().getHelpSystem().setHelp(pageContainer, ISeamHelpContextIds.GENERATE_SEAM_ENTITIES);
@@ -59,10 +63,16 @@
public SeamGenerateEnitiesWizard() {
super(GENERATE_SEAM_ENTITIES);
setWindowTitle(SeamUIMessages.GENERATE_SEAM_ENTITIES_WIZARD_TITLE);
- setDefaultPageImageDescriptor(ImageDescriptor.createFromFile(SeamGenerateEnitiesWizard.class, "SeamWebProjectWizBan.png"));
- addPage(new SeamGenerateEnitiesWizardPage());
+ setDefaultPageImageDescriptor(ImageDescriptor.createFromFile(SeamGenerateEnitiesWizard.class, "SeamWebProjectWizBan.png"));
+ addPage(page1);
+ addPage(page2);
}
-
+
+ @Override
+ public boolean canFinish() {
+ return page1.isPageComplete();
+ }
+
public static final IUndoableOperation GENERATE_SEAM_ENTITIES = new SeamBaseOperation(SeamUIMessages.SEAM_GENERATE_ENTITIES_WIZARD_ACTION_CREATING_OPERATION) {
/*
@@ -302,7 +312,14 @@
hbmtemplateAttributes.put("for_each", "entity"); //$NON-NLS-1$ //$NON-NLS-2$
hbmtemplateAttributes.put("hibernatetool.util.toolclass","org.hibernate.eclipse.launch.SeamUtil"); //$NON-NLS-1$ //$NON-NLS-2$
wc.setAttribute(HibernateLaunchConstants.ATTR_EXPORTERS + ".hbmtemplate9.properties", hbmtemplateAttributes); //$NON-NLS-1$
+
+ //save before adding additional attribute
wc.doSave();
+
+ if (params.containsKey(HibernateLaunchConstants.ATTR_REVENG_TABLES)){
+ wc.setAttribute(HibernateLaunchConstants.ATTR_REVENG_TABLES, params.get(HibernateLaunchConstants.ATTR_REVENG_TABLES));
+ }
+
launchManager.addLaunch(wc.launch(ILaunchManager.RUN_MODE, monitor));
WebUtils.changeTimeStamp(project);
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEnitiesWizardPage.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEnitiesWizardPage.java 2008-10-16 13:32:18 UTC (rev 10884)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEnitiesWizardPage.java 2008-10-16 14:02:28 UTC (rev 10885)
@@ -14,6 +14,7 @@
import java.beans.PropertyChangeListener;
import java.util.ArrayList;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
import org.eclipse.core.resources.IProject;
@@ -21,6 +22,7 @@
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
@@ -60,7 +62,6 @@
* @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
*/
public void createControl(Composite parent) {
- setPageComplete(true);
rootSeamProject = SeamWizardUtils.getCurrentSelectedRootSeamProject();
String projectName = rootSeamProject==null?"":rootSeamProject.getName();
projectEditor = SeamWizardFactory.createSeamProjectSelectionFieldEditor(projectName);
@@ -231,8 +232,23 @@
values.put(configEditor.getName(), configEditor.getValueAsString());
String mode = radios.getValue().toString();
values.put(HibernateLaunchConstants.ATTR_REVERSE_ENGINEER, ("reverse".equals(mode) ? "true" : "false")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ IWizardPage page2 = getWizard().getPage(SeamGenerateEntitiesTablesWizardPage.pageName);
+ if (page2 instanceof SeamGenerateEntitiesTablesWizardPage){
+ SeamGenerateEntitiesTablesWizardPage page = (SeamGenerateEntitiesTablesWizardPage)page2;
+ String filters = page.getFilters();
+ if (filters.length() > 0) values.put(HibernateLaunchConstants.ATTR_REVENG_TABLES, filters);
+ }
return values;
}
return null;
}
+
+ @Override
+ public boolean canFlipToNextPage() {
+ return "reverse".equals(radios.getValue()) && (getErrorMessage() == null); //$NON-NLS-1$
+ }
+
+ public String getConsoleCongigurationName(){
+ return configEditor.getValueAsString();
+ }
}
\ No newline at end of file
Added: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEntitiesTablesWizardPage.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEntitiesTablesWizardPage.java (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEntitiesTablesWizardPage.java 2008-10-16 14:02:28 UTC (rev 10885)
@@ -0,0 +1,110 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2008 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.jboss.tools.seam.ui.wizard;
+
+import org.eclipse.jface.dialogs.IPageChangedListener;
+import org.eclipse.jface.dialogs.PageChangedEvent;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.hibernate.eclipse.console.model.IReverseEngineeringDefinition;
+import org.hibernate.eclipse.console.model.ITableFilter;
+import org.hibernate.eclipse.console.model.impl.ReverseEngineeringDefinitionImpl;
+import org.jboss.tools.seam.ui.SeamUIMessages;
+import org.jboss.tools.seam.ui.views.DBTableFilterView;
+
+/**
+ * The page for selection table filters.
+ * @author Dmitry Geraskov
+ */
+public class SeamGenerateEntitiesTablesWizardPage extends WizardPage /*implements ISelectionChangedListener*/ {
+
+ public static final String pageName = "seam.generate.entities.tablesPage"; //$NON-NLS-1$
+
+ private String cfgName;
+
+ private IReverseEngineeringDefinition model;
+
+ public SeamGenerateEntitiesTablesWizardPage() {
+ super(pageName, SeamUIMessages.GENERATE_SEAM_ENTITIES_WIZARD_TITLE, null);
+ setMessage("Select Tables"); //$NON-NLS-1$
+ }
+
+ public void createControl(Composite parent) {
+ setPageComplete(true);
+ Composite top = new Composite(parent, SWT.NONE);
+ top.setLayout(new FillLayout());
+ final DBTableFilterView tfView = new DBTableFilterView(top, SWT.NONE){
+
+ @Override
+ protected String getConsoleConfigurationName() {
+ return cfgName;
+ }
+ };
+
+ model = new ReverseEngineeringDefinitionImpl();
+
+ tfView.setModel(model);
+
+ if (getWizard().getContainer() instanceof WizardDialog){
+ WizardDialog wd = (WizardDialog) getWizard().getContainer();
+ wd.addPageChangedListener(new IPageChangedListener(){
+
+ //set console configuration as treeViewer input
+ public void pageChanged(PageChangedEvent event) {
+ if (event.getSelectedPage() == SeamGenerateEntitiesTablesWizardPage.this){
+ SeamGenerateEnitiesWizardPage page1 = (SeamGenerateEnitiesWizardPage)getWizard().getPreviousPage(SeamGenerateEntitiesTablesWizardPage.this);
+ cfgName = page1.getConsoleCongigurationName();
+ }
+ }});
+ }
+ setControl(top);
+ }
+
+ /*
+ * Get filters founded on the selected tables
+ */
+ public String getFilters() {
+ StringBuilder builder = new StringBuilder();
+ if (model != null){
+ ITableFilter[] filters = model.getTableFilters();
+ if (filters.length == 0) return builder.toString();
+ builder.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n")//$NON-NLS-1$
+ .append("<!DOCTYPE hibernate-reverse-engineering PUBLIC \"-//Hibernate/Hibernate Reverse Engineering DTD 3.0//EN\"")//$NON-NLS-1$
+ .append(" \"http://hibernate.sourceforge.net/hibernate-reverse-engineering-3.0.dtd\" >\r\n")//$NON-NLS-1$
+ .append("\r\n")//$NON-NLS-1$
+ .append("<hibernate-reverse-engineering>\r\n");//$NON-NLS-1$
+ for (ITableFilter element : filters) {
+ builder.append(generateStringForFilter(element));
+ }
+ builder.append("</hibernate-reverse-engineering>\r\n"); //$NON-NLS-1$
+ }
+ return builder.toString();
+ }
+
+ private String generateStringForFilter(ITableFilter filter){
+ String filterStr = "<table-filter match-name=\"" + filter.getMatchName() + "\""; //$NON-NLS-1$ //$NON-NLS-2$
+ if (filter.getMatchSchema() != null){
+ filterStr += " match-schema=\"" + filter.getMatchSchema() + "\"";//$NON-NLS-1$ //$NON-NLS-2$
+ }
+ //TODO some DBs jdbc readers filters by catalog name incorrectly
+ if (filter.getMatchCatalog() != null){
+ filterStr += " match-catalog=\"" + filter.getMatchCatalog() + "\""; //$NON-NLS-1$//$NON-NLS-2$
+ }
+ if (filter.getExclude()){
+ filterStr += " exclude=\"true\""; //$NON-NLS-1$
+ }
+ return filterStr += "></table-filter>\r\n"; //$NON-NLS-1$
+ }
+
+}
Property changes on: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEntitiesTablesWizardPage.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
16 years, 3 months
JBoss Tools SVN: r10884 - in trunk/seam/plugins/org.jboss.tools.seam.xml: resources/meta and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-10-16 09:32:18 -0400 (Thu, 16 Oct 2008)
New Revision: 10884
Added:
trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-ui.meta
trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-wicket.meta
Modified:
trunk/seam/plugins/org.jboss.tools.seam.xml/plugin.xml
trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-components.meta
trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-remoting.meta
Log:
JBIDE-2855
Modified: trunk/seam/plugins/org.jboss.tools.seam.xml/plugin.xml
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/plugin.xml 2008-10-16 12:49:06 UTC (rev 10883)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml/plugin.xml 2008-10-16 13:32:18 UTC (rev 10884)
@@ -19,6 +19,8 @@
<meta path="meta/seam-remoting.meta"/>
<meta path="meta/seam-spring.meta"/>
<meta path="meta/seam-transaction.meta"/>
+ <meta path="meta/seam-ui.meta"/>
+ <meta path="meta/seam-wicket.meta"/>
</extension>
<extension point="org.jboss.tools.common.model.keys">
Modified: trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-components.meta
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-components.meta 2008-10-16 12:49:06 UTC (rev 10883)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-components.meta 2008-10-16 13:32:18 UTC (rev 10884)
@@ -516,7 +516,7 @@
<XEntityRenderer/>
<XModelAttributes/>
<XActionItem kind="list">
- <XActionItemReference entity="FileSeamComponent20"
+ <XActionItemReference entity="FileSeamComponent21"
name="CreateActions" path="CreateActions"/>
<XActionItemReference entity="FileSeamComponent20" name="Properties" path="Properties"/>
<XActionItem kind="list" name="VerifyActions">
@@ -1423,7 +1423,7 @@
</XModelAttribute>
<XModelAttribute PROPERTIES="category=advanced" name="precedence" xmlname="precedence">
<Constraint loader="%ListIntEL%">
- <value name=""/>
+ <value/>
<value name="BUILT_IN"/>
<value name="FRAMEWORK"/>
<value name="APPLICATION"/>
Modified: trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-remoting.meta
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-remoting.meta 2008-10-16 12:49:06 UTC (rev 10883)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-remoting.meta 2008-10-16 13:32:18 UTC (rev 10884)
@@ -31,6 +31,44 @@
<GlobalActions kind="list"/>
<XModelEntity ImplementingClass="%Custom%"
PROPERTIES="formFactory=%Default%;formLayout=org.jboss.tools.seam.xml.ui.editor.form.core.SeamComponentsCoreFormLayoutData"
+ XMLSUBPATH="remoting:remoting" name="SeamRemoting21">
+ <XChildrenEntities/>
+ <XEntityRenderer>
+ <ICONS>
+ <ICON info="main.seam.remoting.config" type="main"/>
+ </ICONS>
+ </XEntityRenderer>
+ <XModelAttributes>
+ <XModelAttribute default="remoting" loader="ElementType" name="element type">
+ <Editor name="Uneditable"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="id=true;category=general"
+ default="org.jboss.seam.remoting.remoting" name="name" xmlname="name"/>
+ <XModelAttributeReference
+ attributes="class,scope,precedence,installed,auto-create,startup"
+ entity="SeamComponent20" name="component"/>
+ <XModelAttributeReference
+ attributes="poll-interval,poll-timeout,debug"
+ entity="SeamRemotingConfig20" name="remoting"/>
+ <XModelAttribute TRIM="no" name="comment" visibility="false" xmlname="#comment">
+ <Editor name="Note"/>
+ </XModelAttribute>
+ </XModelAttributes>
+ <XActionItem kind="list">
+ <XActionItem kind="list" name="CreateActions"/>
+ <XActionItem ICON="action.empty" displayName="Create" kind="list" name="EditActions"/>
+ <XActionItemReference entity="SeamRemotingConfig20"
+ name="CopyActions" path="CopyActions"/>
+ <XActionItemReference entity="SeamRemotingConfig20"
+ name="DeleteActions" path="DeleteActions"/>
+ <XActionItemReference entity="SeamRemotingConfig20" name="Properties" path="Properties"/>
+ <XActionItemReference entity="SeamRemotingConfig20"
+ name="MoveActions" path="MoveActions"/>
+ </XActionItem>
+ <XDependencies/>
+ </XModelEntity>
+ <XModelEntity ImplementingClass="%Custom%"
+ PROPERTIES="formFactory=%Default%;formLayout=org.jboss.tools.seam.xml.ui.editor.form.core.SeamComponentsCoreFormLayoutData"
XMLSUBPATH="remoting:remoting-config" name="SeamRemotingConfig">
<XChildrenEntities/>
<XEntityRenderer>
@@ -103,10 +141,14 @@
<XModelAttributeReference
attributes="class,scope,precedence,installed,auto-create,startup"
entity="SeamComponent20" name="component"/>
- <XModelAttribute PROPERTIES="category=general" name="poll-interval" xmlname="poll-interval"/>
- <XModelAttribute PROPERTIES="category=general" name="poll-timeout" xmlname="poll-timeout"/>
+ <XModelAttribute PROPERTIES="category=general" name="poll-interval" xmlname="poll-interval">
+ <Constraint loader="%IntEL%"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="category=general" name="poll-timeout" xmlname="poll-timeout">
+ <Constraint loader="%IntEL%"/>
+ </XModelAttribute>
<XModelAttribute PROPERTIES="category=advanced" name="debug" xmlname="debug">
- <Constraint loader="ListString">
+ <Constraint loader="%ListEL%">
<value/>
<value name="true"/>
<value name="false"/>
@@ -209,7 +251,7 @@
</XEntityExtension>
<XEntityExtension name="FileSeamComponents21">
<XChildrenEntities>
- <XChildEntity name="SeamRemotingConfig20"/>
+ <XChildEntity name="SeamRemoting21"/>
</XChildrenEntities>
<XActionItem kind="list">
<XActionItem ICON="action.empty" displayName="New" group="1"
@@ -219,7 +261,7 @@
<XActionItem HandlerClassName="%Create%" ICON="action.empty"
PROPERTIES="validator.add=true" WizardClassName="%Default%"
displayName="Config..." kind="action" name="AddRemotingConfig">
- <EntityData EntityName="SeamRemotingConfig20">
+ <EntityData EntityName="SeamRemoting21">
<AttributeData AttributeName="name"/>
<AttributeData AttributeName="poll-interval" Mandatory="no"/>
<AttributeData AttributeName="poll-timeout" Mandatory="no"/>
Added: trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-ui.meta
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-ui.meta (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-ui.meta 2008-10-16 13:32:18 UTC (rev 10884)
@@ -0,0 +1,176 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE XModelEntityGroup PUBLIC "-//Red Hat, Inc.//DTD Meta 1.0//EN"
+ "meta.dtd">
+<XModelEntityGroup>
+ <VERSION DEPENDS="Model:1.0" MODULE="Seam Components Editor" VERSION="1.0"/>
+ <MAPPINGS>
+ <MAPPING name="Handlers"/>
+ <MAPPING name="SeamNamespaces">
+ <PAIR name="ui" value="http://jboss.com/products/seam/ui"/>
+ </MAPPING>
+ <MAPPING name="SeamSchemas">
+ <PAIR name="ui$21" value="http://jboss.com/products/seam/ui-2.1.xsd"/>
+ </MAPPING>
+ </MAPPINGS>
+ <ICONS>
+ <GROUP name="action">
+ <GROUP name="new"/>
+ </GROUP>
+ <GROUP name="main">
+ <GROUP name="seam">
+ <GROUP name="ui">
+ <ICON name="loader" path="images/struts/plug_in.gif"/>
+ </GROUP>
+ </GROUP>
+ </GROUP>
+ </ICONS>
+ <GlobalActions kind="list"/>
+ <XModelEntity ImplementingClass="%Custom%"
+ PROPERTIES="formFactory=%Default%;formLayout=org.jboss.tools.seam.xml.ui.editor.form.core.SeamComponentsCoreFormLayoutData"
+ XMLSUBPATH="ui:entity-converter" name="SeamUIEntityConverter21">
+ <XChildrenEntities/>
+ <XEntityRenderer>
+ <ICONS>
+ <ICON info="main.seam.ui.loader" type="main"/>
+ </ICONS>
+ </XEntityRenderer>
+ <XModelAttributes>
+ <XModelAttribute default="entity-converter" loader="ElementType" name="element type">
+ <Editor name="Uneditable"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="id=true;category=general"
+ default="org.jboss.seam.ui.entityConverter" name="name" xmlname="name"/>
+ <XModelAttributeReference
+ attributes="class,scope,precedence,installed,auto-create,startup"
+ entity="SeamComponent20" name="component"/>
+ <XModelAttribute PROPERTIES="category=general" name="entity-loader" xmlname="entity-loader"/>
+ <XModelAttribute TRIM="no" name="comment" visibility="false" xmlname="#comment">
+ <Editor name="Note"/>
+ </XModelAttribute>
+ </XModelAttributes>
+ <XActionItem kind="list">
+ <XActionItem kind="list" name="CreateActions"/>
+ <XActionItem ICON="action.empty" displayName="Create" kind="list" name="EditActions"/>
+ <XActionItemReference entity="SeamRemotingConfig20"
+ name="CopyActions" path="CopyActions"/>
+ <XActionItemReference entity="SeamRemotingConfig20"
+ name="DeleteActions" path="DeleteActions"/>
+ <XActionItemReference entity="SeamRemotingConfig20" name="Properties" path="Properties"/>
+ <XActionItemReference entity="SeamRemotingConfig20"
+ name="MoveActions" path="MoveActions"/>
+ </XActionItem>
+ <XDependencies/>
+ </XModelEntity>
+ <XModelEntity ImplementingClass="%Custom%"
+ PROPERTIES="formFactory=%Default%;formLayout=org.jboss.tools.seam.xml.ui.editor.form.core.SeamComponentsCoreFormLayoutData"
+ XMLSUBPATH="ui:hibernate-entity-loader" name="SeamUIHibernate21">
+ <XChildrenEntities/>
+ <XEntityRenderer>
+ <ICONS>
+ <ICON info="main.seam.ui.loader" type="main"/>
+ </ICONS>
+ </XEntityRenderer>
+ <XModelAttributes>
+ <XModelAttribute default="hibernate-entity-loader"
+ loader="ElementType" name="element type">
+ <Editor name="Uneditable"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="id=true;category=general"
+ default="org.jboss.seam.ui.hibernateEntityLoader" name="name" xmlname="name"/>
+ <XModelAttributeReference
+ attributes="class,scope,precedence,installed,auto-create,startup"
+ entity="SeamComponent20" name="component"/>
+ <XModelAttribute PROPERTIES="category=general" name="session" xmlname="session"/>
+ <XModelAttribute TRIM="no" name="comment" visibility="false" xmlname="#comment">
+ <Editor name="Note"/>
+ </XModelAttribute>
+ </XModelAttributes>
+ <XActionItem kind="list">
+ <XActionItem kind="list" name="CreateActions"/>
+ <XActionItem ICON="action.empty" displayName="Create" kind="list" name="EditActions"/>
+ <XActionItemReference entity="SeamRemotingConfig20"
+ name="CopyActions" path="CopyActions"/>
+ <XActionItemReference entity="SeamRemotingConfig20"
+ name="DeleteActions" path="DeleteActions"/>
+ <XActionItemReference entity="SeamRemotingConfig20" name="Properties" path="Properties"/>
+ <XActionItemReference entity="SeamRemotingConfig20"
+ name="MoveActions" path="MoveActions"/>
+ </XActionItem>
+ <XDependencies/>
+ </XModelEntity>
+ <XModelEntity ImplementingClass="%Custom%"
+ PROPERTIES="formFactory=%Default%;formLayout=org.jboss.tools.seam.xml.ui.editor.form.core.SeamComponentsCoreFormLayoutData"
+ XMLSUBPATH="ui:jpa-entity-loader" name="SeamUIJPA21">
+ <XChildrenEntities/>
+ <XEntityRenderer>
+ <ICONS>
+ <ICON info="main.seam.ui.loader" type="main"/>
+ </ICONS>
+ </XEntityRenderer>
+ <XModelAttributes>
+ <XModelAttribute default="jpa-entity-loader" loader="ElementType" name="element type">
+ <Editor name="Uneditable"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="id=true;category=general"
+ default="org.jboss.seam.ui.jpaEntityLoader" name="name" xmlname="name"/>
+ <XModelAttributeReference
+ attributes="class,scope,precedence,installed,auto-create,startup"
+ entity="SeamComponent20" name="component"/>
+ <XModelAttribute PROPERTIES="category=general" name="entity-manager" xmlname="entity-manager"/>
+ <XModelAttribute TRIM="no" name="comment" visibility="false" xmlname="#comment">
+ <Editor name="Note"/>
+ </XModelAttribute>
+ </XModelAttributes>
+ <XActionItem kind="list">
+ <XActionItem kind="list" name="CreateActions"/>
+ <XActionItem ICON="action.empty" displayName="Create" kind="list" name="EditActions"/>
+ <XActionItemReference entity="SeamRemotingConfig20"
+ name="CopyActions" path="CopyActions"/>
+ <XActionItemReference entity="SeamRemotingConfig20"
+ name="DeleteActions" path="DeleteActions"/>
+ <XActionItemReference entity="SeamRemotingConfig20" name="Properties" path="Properties"/>
+ <XActionItemReference entity="SeamRemotingConfig20"
+ name="MoveActions" path="MoveActions"/>
+ </XActionItem>
+ <XDependencies/>
+ </XModelEntity>
+ <XEntityExtension name="FileSeamComponents21">
+ <XChildrenEntities>
+ <XChildEntity name="SeamUIJPA21"/>
+ <XChildEntity name="SeamUIHibernate21"/>
+ <XChildEntity name="SeamUIEntityConverter21"/>
+ </XChildrenEntities>
+ <XActionItem kind="list">
+ <XActionItem ICON="action.empty" displayName="New" group="1"
+ kind="list" name="CreateActions">
+ <XActionItem ICON="action.empty" displayName="UI" group="1"
+ kind="list" name="UI">
+ <XActionItem HandlerClassName="%Create%" ICON="action.empty"
+ PROPERTIES="validator.add=true" WizardClassName="%Default%"
+ displayName="JPA Entity Loader..." kind="action" name="AddJPAEntityLoader">
+ <EntityData EntityName="SeamUIJPA21">
+ <AttributeData AttributeName="name"/>
+ <AttributeData AttributeName="entity-manager" Mandatory="no"/>
+ </EntityData>
+ </XActionItem>
+ <XActionItem HandlerClassName="%Create%" ICON="action.empty"
+ PROPERTIES="validator.add=true" WizardClassName="%Default%"
+ displayName="Hibernate Entity Loader..." kind="action" name="AddHibernateEntityLoader">
+ <EntityData EntityName="SeamUIHibernate21">
+ <AttributeData AttributeName="name"/>
+ <AttributeData AttributeName="session" Mandatory="no"/>
+ </EntityData>
+ </XActionItem>
+ <XActionItem HandlerClassName="%Create%" ICON="action.empty"
+ PROPERTIES="validator.add=true" WizardClassName="%Default%"
+ displayName="Entity Converter..." kind="action" name="AddEntityConverter">
+ <EntityData EntityName="SeamUIEntityConverter21">
+ <AttributeData AttributeName="name"/>
+ <AttributeData AttributeName="entity-loader" Mandatory="no"/>
+ </EntityData>
+ </XActionItem>
+ </XActionItem>
+ </XActionItem>
+ </XActionItem>
+ </XEntityExtension>
+</XModelEntityGroup>
Added: trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-wicket.meta
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-wicket.meta (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-wicket.meta 2008-10-16 13:32:18 UTC (rev 10884)
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE XModelEntityGroup PUBLIC "-//Red Hat, Inc.//DTD Meta 1.0//EN"
+ "meta.dtd">
+<XModelEntityGroup>
+ <VERSION DEPENDS="Model:1.0" MODULE="Seam Components Editor" VERSION="1.0"/>
+ <MAPPINGS>
+ <MAPPING name="Handlers"/>
+ <MAPPING name="SeamNamespaces">
+ <PAIR name="wicket" value="http://jboss.com/products/seam/wicket"/>
+ </MAPPING>
+ <MAPPING name="SeamSchemas">
+ <PAIR name="wicket$21" value="http://jboss.com/products/seam/wicket-2.1.xsd"/>
+ </MAPPING>
+ </MAPPINGS>
+ <ICONS>
+ <GROUP name="action">
+ <GROUP name="new">
+ <GROUP name="mail"/>
+ </GROUP>
+ </GROUP>
+ <GROUP name="main">
+ <GROUP name="seam">
+ <GROUP name="remoting">
+ <ICON name="config" path="images/struts/plug_in.gif"/>
+ </GROUP>
+ </GROUP>
+ </GROUP>
+ </ICONS>
+ <GlobalActions kind="list"/>
+ <XModelEntity ImplementingClass="%Custom%"
+ PROPERTIES="formFactory=%Default%;formLayout=org.jboss.tools.seam.xml.ui.editor.form.core.SeamComponentsCoreFormLayoutData"
+ XMLSUBPATH="wicket:web-application" name="SeamWicketWebApp21">
+ <XChildrenEntities/>
+ <XEntityRenderer>
+ <ICONS>
+ <ICON info="main.seam.remoting.config" type="main"/>
+ </ICONS>
+ </XEntityRenderer>
+ <XModelAttributes>
+ <XModelAttribute default="web-application" loader="ElementType" name="element type">
+ <Editor name="Uneditable"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="id=true;category=general"
+ default="org.jboss.seam.wicket.webApplication" name="name" xmlname="name"/>
+ <XModelAttributeReference
+ attributes="class,scope,precedence,installed,auto-create,startup"
+ entity="SeamComponent20" name="component"/>
+ <XModelAttribute PROPERTIES="category=general"
+ name="application-class" xmlname="application-class">
+ <Editor name="AccessibleJava"/>
+ </XModelAttribute>
+ <XModelAttribute TRIM="no" name="comment" visibility="false" xmlname="#comment">
+ <Editor name="Note"/>
+ </XModelAttribute>
+ </XModelAttributes>
+ <XActionItem kind="list">
+ <XActionItem kind="list" name="CreateActions"/>
+ <XActionItem ICON="action.empty" displayName="Create" kind="list" name="EditActions"/>
+ <XActionItemReference entity="SeamRemotingConfig20"
+ name="CopyActions" path="CopyActions"/>
+ <XActionItemReference entity="SeamRemotingConfig20"
+ name="DeleteActions" path="DeleteActions"/>
+ <XActionItemReference entity="SeamRemotingConfig20" name="Properties" path="Properties"/>
+ <XActionItemReference entity="SeamRemotingConfig20"
+ name="MoveActions" path="MoveActions"/>
+ </XActionItem>
+ <XDependencies/>
+ </XModelEntity>
+ <XEntityExtension name="FileSeamComponents21">
+ <XChildrenEntities>
+ <XChildEntity name="SeamWicketWebApp21"/>
+ </XChildrenEntities>
+ <XActionItem kind="list">
+ <XActionItem ICON="action.empty" displayName="New" group="1"
+ kind="list" name="CreateActions">
+ <XActionItem ICON="action.empty" displayName="Wicket" group="1"
+ kind="list" name="Wicket">
+ <XActionItem HandlerClassName="%Create%" ICON="action.empty"
+ PROPERTIES="validator.add=true" WizardClassName="%Default%"
+ displayName="Web Application..." kind="action" name="AddWebApplication">
+ <EntityData EntityName="SeamWicketWebApp21">
+ <AttributeData AttributeName="name"/>
+ <AttributeData AttributeName="application-class" Mandatory="no"/>
+ </EntityData>
+ </XActionItem>
+ </XActionItem>
+ </XActionItem>
+ </XActionItem>
+ </XEntityExtension>
+</XModelEntityGroup>
16 years, 3 months