JBoss Tools SVN: r10653 - trunk/jsf/docs/userguide/en.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-10-03 09:23:11 -0400 (Fri, 03 Oct 2008)
New Revision: 10653
Modified:
trunk/jsf/docs/userguide/en/master.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-406 - adding a new element for path to migration guide index.html;
Modified: trunk/jsf/docs/userguide/en/master.xml
===================================================================
--- trunk/jsf/docs/userguide/en/master.xml 2008-10-03 13:07:00 UTC (rev 10652)
+++ trunk/jsf/docs/userguide/en/master.xml 2008-10-03 13:23:11 UTC (rev 10653)
@@ -20,7 +20,8 @@
<!ENTITY jsfreflink "../../jsf_tools_ref_guide/html_single/index.html">
<!ENTITY jsftutoriallink "../../jsf_tools_tutorial/html_single/index.html">
<!ENTITY strutsreflink "../../struts_tools_ref_guide/html_single/index.html">
-<!ENTITY strutstutoriallink "../../struts_tools_tutorial/html_single/index.html">
+<!ENTITY strutstutoriallink "../../struts_tools_tutorial/html_single/index.html">
+<!ENTITY migrationlink "../../Exadel-migration/html_single/index.html">
]>
<book>
17 years, 3 months
JBoss Tools SVN: r10652 - trunk/jsf/docs/userguide/en/modules.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-10-03 09:07:00 -0400 (Fri, 03 Oct 2008)
New Revision: 10652
Modified:
trunk/jsf/docs/userguide/en/modules/preferences.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-406 - updating JSF Project Preferences;
Modified: trunk/jsf/docs/userguide/en/modules/preferences.xml
===================================================================
--- trunk/jsf/docs/userguide/en/modules/preferences.xml 2008-10-03 13:05:57 UTC (rev 10651)
+++ trunk/jsf/docs/userguide/en/modules/preferences.xml 2008-10-03 13:07:00 UTC (rev 10652)
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
-<chapter id="preferences" xreflabel="preferences" role="updated">
+<chapter id="preferences" xreflabel="preferences">
<?dbhtml filename="preferences.html"?>
<title>JBoss Tools Preferences</title>
@@ -527,10 +527,9 @@
<section id="JSFPage">
<?dbhtml filename="JSF Page.html"?>
- <title>JSF Page</title>
+ <title>JSF Pages</title>
<para>By selecting <emphasis>
- <property>JBoss Tools > Web > JSF > > JSF
- Pages</property>
+ <property>JBoss Tools > Web > JSF > JSF Pages</property>
</emphasis> you can add jsf pages or remove existing ones.</para>
<figure>
<title>JSF Page</title>
@@ -544,26 +543,70 @@
<section id="JSFPropject">
<?dbhtml filename="JSFPropject.html"?>
- <title>JSF Propject</title>
+ <title>JSF Project</title>
<para>Select <emphasis>
<property>JBoss Tools > Web > JSF > Project</property>
- </emphasis> to see JSF Project preference page.</para>
- <para>On <emphasis>
- <property>Project</property>
- </emphasis> panel you define a template for a new created project: servlet version, page
- template and so on.</para>
+ </emphasis> to see JSF Project preferences page.</para>
+ <para>On the <emphasis>
+ <property>New Project</property>
+ </emphasis> tab you can set default values for <ulink
+ url=" &jsfreflink;#new_jsf_project">New JSF Project</ulink> wizard:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para><emphasis>
+ <property>Version</property>
+ </emphasis> for setting the default JSF Environment</para>
+ </listitem>
+
+ <listitem>
+ <para><emphasis>
+ <property>Project Template</property>
+ </emphasis> so as <property>New JSF
+ Project wizard</property> shows this template as default for the chosen JSF
+ Environment</para>
+ </listitem>
+
+ <listitem>
+ <para><emphasis>
+ <property>Project Root</property>
+ </emphasis> for specifying default location for a new JSF project</para>
+ <para>If you check <emphasis>
+ <property>Use Default Path</property>
+ </emphasis> here, this box will be also checked in the <property>New JSF Project
+ wizard</property>.</para>
+ </listitem>
+
+ <listitem>
+ <para><emphasis>
+ <property>Servlet Version</property>
+ </emphasis> for setting the default Servlet version of a new JSF project</para>
+ <para>Here it's also possible to define whether to register Web Context in <emphasis>
+ <property>server.xml</property>
+ </emphasis> while organizing a new project or not. Check the proper box in order
+ to do that.</para>
+ </listitem>
+ </itemizedlist>
+
<figure>
- <title>JSF Propject</title>
+ <title>New JSF Propject Preferences</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/preferences/preferences_13.png"/>
</imageobject>
</mediaobject>
</figure>
- <para>Selecting the Import Project tab in the JSF Project screen allows you to determine the
- default servlet version and whether to register Web Context in server.xml.</para>
+
+ <para>On the <emphasis>
+ <property>Import Project</property>
+ </emphasis> tab in the JSF Project screen you can determine the default Servlet version
+ for the <ulink url=" &migrationlink;#import_jsf_screen">Import JSF Project</ulink>
+ wizard and also whether to register Web Context in <emphasis>
+ <property>server.xml</property>
+ </emphasis> or not.</para>
+
<figure>
- <title>Import JSF Propject</title>
+ <title>Import JSF Propject Preferences</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/preferences/preferences_14.png"/>
@@ -579,6 +622,7 @@
<property>JBoss Tools > Web > Editors > JSF Flow Diagram</property>
</emphasis> allows you to specify some aspects of the Diagram mode of the JSF
configuration file editor.</para>
+
<figure>
<title>JSF Flow Diagram</title>
<mediaobject>
@@ -587,11 +631,13 @@
</imageobject>
</mediaobject>
</figure>
+
<para>The first two items control the background grid for the diagram. The next two items
allow you to control the appearance of the labels for views (pages) and the transitions
between views. For these two items, clicking the <emphasis>
<property>Change... </property>
</emphasis>button allows you to assign a font with a dialog box.</para>
+
<para>The first check box determines whether a view in the diagram that doesn't have a
transition connecting it to another view yet should be written to the source code as a
partial navigation rule. The next check box determines whether the diagram cursor
17 years, 3 months
JBoss Tools SVN: r10651 - trunk/jsf/docs/userguide/en/modules.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-10-03 09:05:57 -0400 (Fri, 03 Oct 2008)
New Revision: 10651
Modified:
trunk/jsf/docs/userguide/en/modules/editors.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-406 - removing unnecessary attribute role;
Modified: trunk/jsf/docs/userguide/en/modules/editors.xml
===================================================================
--- trunk/jsf/docs/userguide/en/modules/editors.xml 2008-10-03 13:03:43 UTC (rev 10650)
+++ trunk/jsf/docs/userguide/en/modules/editors.xml 2008-10-03 13:05:57 UTC (rev 10651)
@@ -753,7 +753,7 @@
</section>
</section>
- <section id="visual_page" role="updated">
+ <section id="visual_page">
<title>Visual Page Editor</title>
17 years, 3 months
JBoss Tools SVN: r10650 - trunk/documentation/guides/Exadel-migration/en/modules.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-10-03 09:03:43 -0400 (Fri, 03 Oct 2008)
New Revision: 10650
Modified:
trunk/documentation/guides/Exadel-migration/en/modules/jsf_struts.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-406 - adding id to the new jsf project section;
Modified: trunk/documentation/guides/Exadel-migration/en/modules/jsf_struts.xml
===================================================================
--- trunk/documentation/guides/Exadel-migration/en/modules/jsf_struts.xml 2008-10-03 13:01:15 UTC (rev 10649)
+++ trunk/documentation/guides/Exadel-migration/en/modules/jsf_struts.xml 2008-10-03 13:03:43 UTC (rev 10650)
@@ -12,7 +12,7 @@
<title>Migration of JSF and Struts Projects</title>
<para>In this chapter you can find concise description of migration of JSF and Struts Projects.</para>
- <section>
+ <section id="import_jsf">
<title>JSF</title>
<para>JBoss Developer Studio includes an Import <property>JSF Project</property> Wizard that radically simplifies the process of bringing your existing JSF applications
into your JBoss Developer Studio workspace as JSF projects. You just need to follow these four steps:</para>
@@ -53,7 +53,7 @@
</mediaobject>
</figure>
- <itemizedlist continuation="continues">
+ <itemizedlist continuation="continues" id="import_jsf_screen">
<listitem><para>In the <emphasis><property>Project Folders</property></emphasis> screen, you can configure the rest of your project. Afterwards click on the <emphasis><property>Finish</property></emphasis> button.</para></listitem>
</itemizedlist>
<para>On this step JBoss Developer Studio will try to determine your project
17 years, 3 months
JBoss Tools SVN: r10649 - trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2008-10-03 09:01:15 -0400 (Fri, 03 Oct 2008)
New Revision: 10649
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/JBIDE1579Test.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/JBIDE1605Test.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/JBIDE1606Test.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/JBIDE1613Test.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/Jbide1548Test.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/Jbide1580Test.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/Jbide1614Test.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/Jbide1639Test.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/Jbide1682Test.java
Log:
=JBIDE-1169, junit for richfaces was adjusted
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/JBIDE1579Test.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/JBIDE1579Test.java 2008-10-03 12:32:29 UTC (rev 10648)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/JBIDE1579Test.java 2008-10-03 13:01:15 UTC (rev 10649)
@@ -6,6 +6,7 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.part.FileEditorInput;
+import org.jboss.tools.jsf.vpe.richfaces.test.RichFacesAllTests;
import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
import org.jboss.tools.vpe.editor.util.HTML;
import org.jboss.tools.vpe.ui.test.TestUtil;
@@ -16,8 +17,6 @@
public class JBIDE1579Test extends VpeTest {
- public static final String IMPORT_PROJECT_NAME = "richFacesTest";
-
private static final String TEST_PAGE_NAME_2BUTTONS = "JBIDE/1579/JBIDE-1579-2buttons.xhtml";
private static final String TEST_PAGE_NAME_4BUTTONS = "JBIDE/1579/JBIDE-1579-4buttons.xhtml";
@@ -33,7 +32,7 @@
// get test page path
IFile file = (IFile) TestUtil.getComponentPath(
- TEST_PAGE_NAME_2BUTTONS, IMPORT_PROJECT_NAME);
+ TEST_PAGE_NAME_2BUTTONS, RichFacesAllTests.IMPORT_PROJECT_NAME);
assertNotNull("Could not open specified file " + file.getFullPath(),
file);
@@ -71,7 +70,7 @@
// get test page path
IFile file = (IFile) TestUtil.getComponentPath(
- TEST_PAGE_NAME_4BUTTONS, IMPORT_PROJECT_NAME);
+ TEST_PAGE_NAME_4BUTTONS, RichFacesAllTests.IMPORT_PROJECT_NAME);
assertNotNull("Could not open specified file " + file.getFullPath(),
file);
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/JBIDE1605Test.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/JBIDE1605Test.java 2008-10-03 12:32:29 UTC (rev 10648)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/JBIDE1605Test.java 2008-10-03 13:01:15 UTC (rev 10649)
@@ -16,7 +16,6 @@
import org.eclipse.core.resources.IFile;
import org.jboss.tools.jsf.vpe.richfaces.test.RichFacesAllTests;
-import org.jboss.tools.jsf.vpe.richfaces.test.RichFacesComponentTest;
import org.jboss.tools.vpe.editor.util.HTML;
import org.jboss.tools.vpe.ui.test.TestUtil;
import org.jboss.tools.vpe.ui.test.VpeTest;
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/JBIDE1606Test.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/JBIDE1606Test.java 2008-10-03 12:32:29 UTC (rev 10648)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/JBIDE1606Test.java 2008-10-03 13:01:15 UTC (rev 10649)
@@ -18,7 +18,6 @@
import org.eclipse.core.resources.IFile;
import org.jboss.tools.jsf.vpe.richfaces.test.RichFacesAllTests;
-import org.jboss.tools.jsf.vpe.richfaces.test.RichFacesComponentTest;
import org.jboss.tools.vpe.editor.util.HTML;
import org.jboss.tools.vpe.ui.test.TestUtil;
import org.jboss.tools.vpe.ui.test.VpeTest;
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/JBIDE1613Test.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/JBIDE1613Test.java 2008-10-03 12:32:29 UTC (rev 10648)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/JBIDE1613Test.java 2008-10-03 13:01:15 UTC (rev 10649)
@@ -6,6 +6,7 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.part.FileEditorInput;
+import org.jboss.tools.jsf.vpe.richfaces.test.RichFacesAllTests;
import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
import org.jboss.tools.vpe.editor.util.HTML;
import org.jboss.tools.vpe.ui.test.TestUtil;
@@ -16,8 +17,6 @@
public class JBIDE1613Test extends VpeTest {
- public static final String IMPORT_PROJECT_NAME = "richFacesTest";
-
private static final String TEST_PAGE_NAME = "JBIDE/1613/JBIDE-1613.xhtml";
public JBIDE1613Test(String name) {
@@ -32,7 +31,7 @@
// get test page path
IFile file = (IFile) TestUtil.getComponentPath(
- TEST_PAGE_NAME, IMPORT_PROJECT_NAME);
+ TEST_PAGE_NAME, RichFacesAllTests.IMPORT_PROJECT_NAME);
assertNotNull("Could not open specified file " + file.getFullPath(),
file);
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/Jbide1548Test.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/Jbide1548Test.java 2008-10-03 12:32:29 UTC (rev 10648)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/Jbide1548Test.java 2008-10-03 13:01:15 UTC (rev 10649)
@@ -17,6 +17,7 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.part.FileEditorInput;
+import org.jboss.tools.jsf.vpe.richfaces.test.RichFacesAllTests;
import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
import org.jboss.tools.vpe.editor.util.HTML;
import org.jboss.tools.vpe.ui.test.TestUtil;
@@ -39,9 +40,6 @@
// type of input tag
// import project name
-
- public static final String IMPORT_PROJECT_NAME = "richFacesTest";
-
public Jbide1548Test(String name) {
super(name);
}
@@ -59,7 +57,7 @@
// get test page path
IFile file = (IFile) TestUtil.getComponentPath(
- "JBIDE/1548/JBIDE-1548.xhtml", IMPORT_PROJECT_NAME);
+ "JBIDE/1548/JBIDE-1548.xhtml", RichFacesAllTests.IMPORT_PROJECT_NAME);
assertNotNull("Could not open specified file " + file.getFullPath(),
file);
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/Jbide1580Test.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/Jbide1580Test.java 2008-10-03 12:32:29 UTC (rev 10648)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/Jbide1580Test.java 2008-10-03 13:01:15 UTC (rev 10649)
@@ -19,6 +19,7 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.part.FileEditorInput;
+import org.jboss.tools.jsf.vpe.richfaces.test.RichFacesAllTests;
import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
import org.jboss.tools.vpe.editor.util.HTML;
import org.jboss.tools.vpe.ui.test.TestUtil;
@@ -35,8 +36,6 @@
*/
public class Jbide1580Test extends VpeTest {
- public static final String IMPORT_PROJECT_NAME = "richFacesTest";
-
public static final String FILE_NAME1 = "JBIDE/1580/JBIDE-1580-8button.xhtml";
public static final String FILE_NAME2 = "JBIDE/1580/JBIDE-1580-4button.xhtml";
@@ -53,7 +52,7 @@
// get test page path
IFile file = (IFile) TestUtil.getComponentPath(FILE_NAME1,
- IMPORT_PROJECT_NAME);
+ RichFacesAllTests.IMPORT_PROJECT_NAME);
IEditorInput input = new FileEditorInput(file);
@@ -95,7 +94,7 @@
// get test page path
IFile file = (IFile) TestUtil.getComponentPath(FILE_NAME2,
- IMPORT_PROJECT_NAME);
+ RichFacesAllTests.IMPORT_PROJECT_NAME);
IEditorInput input = new FileEditorInput(file);
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/Jbide1614Test.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/Jbide1614Test.java 2008-10-03 12:32:29 UTC (rev 10648)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/Jbide1614Test.java 2008-10-03 13:01:15 UTC (rev 10649)
@@ -19,6 +19,7 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.part.FileEditorInput;
+import org.jboss.tools.jsf.vpe.richfaces.test.RichFacesAllTests;
import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
import org.jboss.tools.vpe.editor.util.HTML;
import org.jboss.tools.vpe.ui.test.TestUtil;
@@ -35,9 +36,7 @@
*/
public class Jbide1614Test extends VpeTest {
- public static final String IMPORT_PROJECT_NAME = "richFacesTest";
-
- public static final String FILE_NAME1 = "JBIDE/1614/JBIDE-1614-absolute.xhtml";
+ public static final String FILE_NAME1 = "JBIDE/1614/JBIDE-1614-absolute.xhtml";
public static final String FILE_NAME2 = "JBIDE/1614/JBIDE-1614-related.xhtml";
public Jbide1614Test(String name) {
@@ -53,7 +52,7 @@
// get test page path
IFile file = (IFile) TestUtil.getComponentPath(FILE_NAME1,
- IMPORT_PROJECT_NAME);
+ RichFacesAllTests.IMPORT_PROJECT_NAME);
IEditorInput input = new FileEditorInput(file);
@@ -95,7 +94,7 @@
// get test page path
IFile file = (IFile) TestUtil.getComponentPath(FILE_NAME2,
- IMPORT_PROJECT_NAME);
+ RichFacesAllTests.IMPORT_PROJECT_NAME);
IEditorInput input = new FileEditorInput(file);
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/Jbide1639Test.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/Jbide1639Test.java 2008-10-03 12:32:29 UTC (rev 10648)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/Jbide1639Test.java 2008-10-03 13:01:15 UTC (rev 10649)
@@ -19,6 +19,7 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.part.FileEditorInput;
+import org.jboss.tools.jsf.vpe.richfaces.test.RichFacesAllTests;
import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
import org.jboss.tools.vpe.editor.util.HTML;
import org.jboss.tools.vpe.ui.test.TestUtil;
@@ -35,8 +36,6 @@
*/
public class Jbide1639Test extends VpeTest {
- public static final String IMPORT_PROJECT_NAME = "richFacesTest";
-
public static final String FILE_NAME = "JBIDE/1639/JBIDE-1639.xhtml";
public Jbide1639Test(String name) {
@@ -52,7 +51,7 @@
// get test page path
IFile file = (IFile) TestUtil.getComponentPath(FILE_NAME,
- IMPORT_PROJECT_NAME);
+ RichFacesAllTests.IMPORT_PROJECT_NAME);
IEditorInput input = new FileEditorInput(file);
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/Jbide1682Test.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/Jbide1682Test.java 2008-10-03 12:32:29 UTC (rev 10648)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/Jbide1682Test.java 2008-10-03 13:01:15 UTC (rev 10649)
@@ -9,6 +9,7 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.part.FileEditorInput;
+import org.jboss.tools.jsf.vpe.richfaces.test.RichFacesAllTests;
import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
import org.jboss.tools.vpe.editor.util.HTML;
import org.jboss.tools.vpe.ui.test.TestUtil;
@@ -22,7 +23,6 @@
*
*/
public class Jbide1682Test extends VpeTest {
- public static final String IMPORT_PROJECT_NAME = "richFacesTest";
public static final String TEST_PAGE_WITH_POPUP = "JBIDE/1682/JBIDE-1682-with-popup.xhtml";
public static final String TEST_PAGE_WITHOUT_POPUP = "JBIDE/1682/JBIDE-1682-without-popup.xhtml";
@@ -39,7 +39,7 @@
// get test page path
IFile file = (IFile) TestUtil.getComponentPath(
- TEST_PAGE_WITH_POPUP, IMPORT_PROJECT_NAME);
+ TEST_PAGE_WITH_POPUP, RichFacesAllTests.IMPORT_PROJECT_NAME);
assertNotNull("Could not open specified file " + file.getFullPath(),
file);
@@ -82,7 +82,7 @@
// get test page path
IFile file = (IFile) TestUtil.getComponentPath(
- TEST_PAGE_WITHOUT_POPUP, IMPORT_PROJECT_NAME);
+ TEST_PAGE_WITHOUT_POPUP, RichFacesAllTests.IMPORT_PROJECT_NAME);
assertNotNull("Could not open specified file " + file.getFullPath(),
file);
17 years, 3 months
JBoss Tools SVN: r10648 - in trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test: jbide and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2008-10-03 08:32:29 -0400 (Fri, 03 Oct 2008)
New Revision: 10648
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesAllTests.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesColumnsTemplateTestCase.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComboBoxTemplateTestCase.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentTest.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesFileUploadTemplateTestCase.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesInplaceInputTemplateTestCase.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesInplaceSelectTemplateTestCase.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesPickListTemplateTestCase.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesProgressBarTemplateTestCase.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/JBIDE1605Test.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/JBIDE1606Test.java
Log:
=JBIDE-1169, junit for richfaces was adjusted
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesAllTests.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesAllTests.java 2008-10-03 12:31:46 UTC (rev 10647)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesAllTests.java 2008-10-03 12:32:29 UTC (rev 10648)
@@ -41,7 +41,7 @@
public static final String IMPORT_PROJECT_NAME = "richFacesTest"; //$NON-NLS-1$
public static Test suite() {
- TestSuite suite = new TestSuite("Tests for Vpe RichFaces components"); // $NON
+ TestSuite suite = new TestSuite("Tests for Vpe RichFaces components"); // $NON //$NON-NLS-1$
// $JUnit-BEGIN$
suite.addTestSuite(RichFacesComponentTest.class);
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesColumnsTemplateTestCase.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesColumnsTemplateTestCase.java 2008-10-03 12:31:46 UTC (rev 10647)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesColumnsTemplateTestCase.java 2008-10-03 12:32:29 UTC (rev 10648)
@@ -53,7 +53,7 @@
public void testColumnsWithAttributes() {
try {
final nsIDOMElement rst = performTestForRichFacesComponent((IFile) TestUtil.getComponentPath(COLUMNS_WITH_ATTRIBUTES,
- RichFacesComponentTest.IMPORT_PROJECT_NAME));
+ RichFacesAllTests.IMPORT_PROJECT_NAME));
final List<nsIDOMNode> elements = new ArrayList<nsIDOMNode>();
TestUtil.findAllElementsByName(rst, elements, HTML.TAG_TD);
@@ -76,7 +76,7 @@
public void testSimpleColumns() {
try {
final nsIDOMElement rst = performTestForRichFacesComponent((IFile) TestUtil.getComponentPath(COMPONENTS_COLUMNS_COLUMNS_XHTML,
- RichFacesComponentTest.IMPORT_PROJECT_NAME));
+ RichFacesAllTests.IMPORT_PROJECT_NAME));
final List<nsIDOMNode> elements = new ArrayList<nsIDOMNode>();
TestUtil.findAllElementsByName(rst, elements, HTML.TAG_TD);
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComboBoxTemplateTestCase.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComboBoxTemplateTestCase.java 2008-10-03 12:31:46 UTC (rev 10647)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComboBoxTemplateTestCase.java 2008-10-03 12:32:29 UTC (rev 10648)
@@ -87,7 +87,7 @@
*/
private nsIDOMElement baseTableCheck(String page, String width) throws PartInitException, Throwable {
final nsIDOMElement rst = TestUtil.performTestForRichFacesComponent((IFile) TestUtil.getComponentPath(page,
- RichFacesComponentTest.IMPORT_PROJECT_NAME));
+ RichFacesAllTests.IMPORT_PROJECT_NAME));
List<nsIDOMNode> elements = new ArrayList<nsIDOMNode>();
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentTest.java 2008-10-03 12:31:46 UTC (rev 10647)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentTest.java 2008-10-03 12:32:29 UTC (rev 10648)
@@ -23,9 +23,6 @@
*/
public class RichFacesComponentTest extends VpeTest {
- // import project name
- public static final String IMPORT_PROJECT_NAME = "richFacesTest";
-
public RichFacesComponentTest(String name) {
super(name);
setCheckWarning(false);
@@ -34,186 +31,186 @@
public void testAllComponentsOnSinglePage() throws PartInitException,
Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/richFacesTest.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ "components/richFacesTest.xhtml", RichFacesAllTests.IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testCalendar() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/calendar.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ "components/calendar.xhtml", RichFacesAllTests.IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testDataDefinitionList() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/dataDefinitionList.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ "components/dataDefinitionList.xhtml", RichFacesAllTests.IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testDataFilterSlider() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/dataFilterSlider.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ "components/dataFilterSlider.xhtml", RichFacesAllTests.IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testDataGrid() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/dataGrid.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ "components/dataGrid.xhtml", RichFacesAllTests.IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testDataList() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/dataList.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ "components/dataList.xhtml", RichFacesAllTests.IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testDataOrderedList() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/dataOrderedList.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ "components/dataOrderedList.xhtml", RichFacesAllTests.IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testDataScroller() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/dataScroller.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ "components/dataScroller.xhtml", RichFacesAllTests.IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testDataTable() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/dataTable.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ "components/dataTable.xhtml", RichFacesAllTests.IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testDragAndDrop() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/dragAndDrop.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ "components/dragAndDrop.xhtml", RichFacesAllTests.IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testDropDawnMenu() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/dropDawnMenu.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ "components/dropDawnMenu.xhtml", RichFacesAllTests.IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testEffect() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/effect.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ "components/effect.xhtml", RichFacesAllTests.IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testGoogleMap() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/googleMap.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ "components/googleMap.xhtml", RichFacesAllTests.IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testInputNumberSlider() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/inputNumberSlider.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ "components/inputNumberSlider.xhtml", RichFacesAllTests.IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testInputNumberSpinner() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/inputNumberSpinner.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ "components/inputNumberSpinner.xhtml", RichFacesAllTests.IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testInsert() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/insert.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ "components/insert.xhtml", RichFacesAllTests.IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testMessage() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/message.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ "components/message.xhtml", RichFacesAllTests.IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testMessages() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/messages.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ "components/messages.xhtml", RichFacesAllTests.IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testModalPanel() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/modalPanel.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ "components/modalPanel.xhtml", RichFacesAllTests.IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testOrderingList() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/orderingList.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ "components/orderingList.xhtml", RichFacesAllTests.IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testPaint2D() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/paint2D.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ "components/paint2D.xhtml", RichFacesAllTests.IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testPanel() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/panel.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ "components/panel.xhtml", RichFacesAllTests.IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testPanelBar() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/panelBar.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ "components/panelBar.xhtml", RichFacesAllTests.IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testPanelMenu() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/panelMenu.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ "components/panelMenu.xhtml", RichFacesAllTests.IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testScrollableDataTable() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/scrollableDataTable.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ "components/scrollableDataTable.xhtml", RichFacesAllTests.IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testSeparator() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/separator.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ "components/separator.xhtml", RichFacesAllTests.IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testSimpleTogglePanel() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/simpleTogglePanel.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ "components/simpleTogglePanel.xhtml", RichFacesAllTests.IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testSpacer() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/spacer.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ "components/spacer.xhtml", RichFacesAllTests.IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testSuggestionBox() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/suggestionbox.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ "components/suggestionbox.xhtml", RichFacesAllTests.IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testTabPanel() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/tabPanel.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ "components/tabPanel.xhtml", RichFacesAllTests.IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testTogglePanel() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/togglePanel.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ "components/togglePanel.xhtml", RichFacesAllTests.IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testToolBar() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/toolBar.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ "components/toolBar.xhtml", RichFacesAllTests.IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testTree() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/tree.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ "components/tree.xhtml", RichFacesAllTests.IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testVirtualEarth() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/virtualEarth.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ "components/virtualEarth.xhtml", RichFacesAllTests.IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testComponentControl() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/componentControl.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ "components/componentControl.xhtml", RichFacesAllTests.IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testContextMenu() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/contextMenu.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ "components/contextMenu.xhtml", RichFacesAllTests.IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testListShuttle() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/listShuttle.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ "components/listShuttle.xhtml", RichFacesAllTests.IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
}
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesFileUploadTemplateTestCase.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesFileUploadTemplateTestCase.java 2008-10-03 12:31:46 UTC (rev 10647)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesFileUploadTemplateTestCase.java 2008-10-03 12:32:29 UTC (rev 10648)
@@ -37,7 +37,7 @@
*/
public void testBaseFileUpload() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(COMPONENTS_FILE_UPLOAD_FILE_UPLOAD_BASE,
- RichFacesComponentTest.IMPORT_PROJECT_NAME));
+ RichFacesAllTests.IMPORT_PROJECT_NAME));
}
}
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesInplaceInputTemplateTestCase.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesInplaceInputTemplateTestCase.java 2008-10-03 12:31:46 UTC (rev 10647)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesInplaceInputTemplateTestCase.java 2008-10-03 12:32:29 UTC (rev 10648)
@@ -74,7 +74,7 @@
*/
private void baseCheck(String page, String value, String styleClass) throws Throwable, CoreException {
final nsIDOMElement rst = TestUtil.performTestForRichFacesComponent((IFile) TestUtil.getComponentPath(page,
- RichFacesComponentTest.IMPORT_PROJECT_NAME));
+ RichFacesAllTests.IMPORT_PROJECT_NAME));
List<nsIDOMNode> elements = new ArrayList<nsIDOMNode>();
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesInplaceSelectTemplateTestCase.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesInplaceSelectTemplateTestCase.java 2008-10-03 12:31:46 UTC (rev 10647)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesInplaceSelectTemplateTestCase.java 2008-10-03 12:32:29 UTC (rev 10648)
@@ -48,7 +48,7 @@
*/
public void testSimple() throws PartInitException, CoreException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(COMPONENTS_INPLACE_SELECT_INPLACE_SELECT_XHTML,
- RichFacesComponentTest.IMPORT_PROJECT_NAME));
+ RichFacesAllTests.IMPORT_PROJECT_NAME));
}
}
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesPickListTemplateTestCase.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesPickListTemplateTestCase.java 2008-10-03 12:31:46 UTC (rev 10647)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesPickListTemplateTestCase.java 2008-10-03 12:32:29 UTC (rev 10648)
@@ -48,7 +48,7 @@
nsIDOMElement rst;
try {
rst = TestUtil.performTestForRichFacesComponent((IFile) TestUtil.getComponentPath("components/pickList/pickList.xhtml", //$NON-NLS-1$
- RichFacesComponentTest.IMPORT_PROJECT_NAME));
+ RichFacesAllTests.IMPORT_PROJECT_NAME));
final List<nsIDOMNode> elements = new ArrayList<nsIDOMNode>();
TestUtil.findAllElementsByName(rst, elements, HTML.TAG_TABLE);
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesProgressBarTemplateTestCase.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesProgressBarTemplateTestCase.java 2008-10-03 12:31:46 UTC (rev 10647)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesProgressBarTemplateTestCase.java 2008-10-03 12:32:29 UTC (rev 10648)
@@ -76,7 +76,7 @@
nsIDOMElement rst = null;
try {
- rst = TestUtil.performTestForRichFacesComponent((IFile) TestUtil.getComponentPath(page, RichFacesComponentTest.IMPORT_PROJECT_NAME));
+ rst = TestUtil.performTestForRichFacesComponent((IFile) TestUtil.getComponentPath(page, RichFacesAllTests.IMPORT_PROJECT_NAME));
} catch (CoreException e) {
fail(e.getMessage() + e);
} catch (Throwable e) {
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/JBIDE1605Test.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/JBIDE1605Test.java 2008-10-03 12:31:46 UTC (rev 10647)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/JBIDE1605Test.java 2008-10-03 12:32:29 UTC (rev 10648)
@@ -15,6 +15,7 @@
import java.util.List;
import org.eclipse.core.resources.IFile;
+import org.jboss.tools.jsf.vpe.richfaces.test.RichFacesAllTests;
import org.jboss.tools.jsf.vpe.richfaces.test.RichFacesComponentTest;
import org.jboss.tools.vpe.editor.util.HTML;
import org.jboss.tools.vpe.ui.test.TestUtil;
@@ -55,7 +56,7 @@
* @throws Throwable the throwable
*/
public void testSimpleJBIDE1605() throws Throwable {
- performTestForVpeComponent((IFile) TestUtil.getComponentPath(PAGE, RichFacesComponentTest.IMPORT_PROJECT_NAME));
+ performTestForVpeComponent((IFile) TestUtil.getComponentPath(PAGE, RichFacesAllTests.IMPORT_PROJECT_NAME));
}
/**
@@ -65,7 +66,7 @@
*/
public void testJBIDE1605() throws Throwable {
final nsIDOMElement rst = TestUtil.performTestForRichFacesComponent((IFile) TestUtil.getComponentPath(PAGE,
- RichFacesComponentTest.IMPORT_PROJECT_NAME));
+ RichFacesAllTests.IMPORT_PROJECT_NAME));
List<nsIDOMNode> elements = new ArrayList<nsIDOMNode>();
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/JBIDE1606Test.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/JBIDE1606Test.java 2008-10-03 12:31:46 UTC (rev 10647)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/JBIDE1606Test.java 2008-10-03 12:32:29 UTC (rev 10648)
@@ -17,6 +17,7 @@
import java.util.List;
import org.eclipse.core.resources.IFile;
+import org.jboss.tools.jsf.vpe.richfaces.test.RichFacesAllTests;
import org.jboss.tools.jsf.vpe.richfaces.test.RichFacesComponentTest;
import org.jboss.tools.vpe.editor.util.HTML;
import org.jboss.tools.vpe.ui.test.TestUtil;
@@ -53,7 +54,7 @@
* @throws Throwable the throwable
*/
public void testSimpleJBIDE1606() throws Throwable {
- performTestForVpeComponent((IFile) TestUtil.getComponentPath(PAGE, RichFacesComponentTest.IMPORT_PROJECT_NAME));
+ performTestForVpeComponent((IFile) TestUtil.getComponentPath(PAGE, RichFacesAllTests.IMPORT_PROJECT_NAME));
}
/**
@@ -63,7 +64,7 @@
*/
public void testJBIDE1606() throws Throwable {
final nsIDOMElement rst = TestUtil.performTestForRichFacesComponent((IFile) TestUtil.getComponentPath(PAGE,
- RichFacesComponentTest.IMPORT_PROJECT_NAME));
+ RichFacesAllTests.IMPORT_PROJECT_NAME));
List<nsIDOMNode> elements = new ArrayList<nsIDOMNode>();
17 years, 3 months
JBoss Tools SVN: r10646 - trunk/documentation/jbosstools-jdocbook-style/src/main/org/css/css.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-10-03 08:24:50 -0400 (Fri, 03 Oct 2008)
New Revision: 10646
Modified:
trunk/documentation/jbosstools-jdocbook-style/src/main/org/css/css/tools.css
Log:
https://jira.jboss.org/jira/browse/JBDS-399 - markers are near the chapters/sections titles now.
Modified: trunk/documentation/jbosstools-jdocbook-style/src/main/org/css/css/tools.css
===================================================================
--- trunk/documentation/jbosstools-jdocbook-style/src/main/org/css/css/tools.css 2008-10-03 12:24:01 UTC (rev 10645)
+++ trunk/documentation/jbosstools-jdocbook-style/src/main/org/css/css/tools.css 2008-10-03 12:24:50 UTC (rev 10646)
@@ -98,4 +98,16 @@
background-color: #c8d7e4;
padding:0px;
margin-left:56px;
+}
+
+h1, h2, h3, h4, h5, h6{
+ display:inline;
+}
+.img_marker{
+ display:inline;
+ padding: 0px;
+ margin:0px;
+}
+h1.title {
+display:block;
}
\ No newline at end of file
17 years, 3 months
JBoss Tools SVN: r10645 - trunk/documentation/jbosstools-jdocbook-style/src/main/com/css/css.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-10-03 08:24:01 -0400 (Fri, 03 Oct 2008)
New Revision: 10645
Modified:
trunk/documentation/jbosstools-jdocbook-style/src/main/com/css/css/tools.css
Log:
https://jira.jboss.org/jira/browse/JBDS-399 - markers are near the chapters/sections titles now;
Modified: trunk/documentation/jbosstools-jdocbook-style/src/main/com/css/css/tools.css
===================================================================
--- trunk/documentation/jbosstools-jdocbook-style/src/main/com/css/css/tools.css 2008-10-03 11:42:17 UTC (rev 10644)
+++ trunk/documentation/jbosstools-jdocbook-style/src/main/com/css/css/tools.css 2008-10-03 12:24:01 UTC (rev 10645)
@@ -110,3 +110,16 @@
padding:0px;
margin-left:56px;
}
+
+h1, h2, h3, h4, h5, h6{
+ display:inline;
+}
+
+.img_marker{
+ display:inline;
+ padding: 0px;
+ margin:0px;
+}
+h1.title {
+display:block;
+}
\ No newline at end of file
17 years, 3 months
JBoss Tools SVN: r10644 - trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2008-10-03 07:42:17 -0400 (Fri, 03 Oct 2008)
New Revision: 10644
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamCoreAllTests.java
Log:
Uncommented JUnit Tests
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamCoreAllTests.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamCoreAllTests.java 2008-10-03 10:59:30 UTC (rev 10643)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamCoreAllTests.java 2008-10-03 11:42:17 UTC (rev 10644)
@@ -29,18 +29,18 @@
public static Test suite() {
TestSuite suite = new TestSuite();
suite.setName("All tests for " + PLUGIN_ID);
-// suite.addTestSuite(ScannerTest.class);
-// suite.addTestSuite(SerializationTest.class);
-// suite.addTestSuite(SeamBigProjectTest.class);
-// suite.addTestSuite(SeamEARTest.class);
-// suite.addTestSuite(SeamRuntimeListConverterTest.class);
-// suite.addTestSuite(SeamRuntimeManagerTest.class);
-// suite.addTestSuite(SeamFacetInstallDelegateTest.class);
+ suite.addTestSuite(ScannerTest.class);
+ suite.addTestSuite(SerializationTest.class);
+ suite.addTestSuite(SeamBigProjectTest.class);
+ suite.addTestSuite(SeamEARTest.class);
+ suite.addTestSuite(SeamRuntimeListConverterTest.class);
+ suite.addTestSuite(SeamRuntimeManagerTest.class);
+ suite.addTestSuite(SeamFacetInstallDelegateTest.class);
suite.addTest(SeamValidatorsAllTests.suite());
-// suite.addTest(SeamRefactoringAllTests.suite());
+ suite.addTest(SeamRefactoringAllTests.suite());
// Seam 2 tests can't run on hudson for now ;(
-// suite.addTestSuite(Seam2FacetInstallDelegateTest.class);
+ suite.addTestSuite(Seam2FacetInstallDelegateTest.class);
return suite;
}
17 years, 3 months
JBoss Tools SVN: r10643 - in trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt: org/jboss/tools and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: artdaw
Date: 2008-10-03 06:59:30 -0400 (Fri, 03 Oct 2008)
New Revision: 10643
Modified:
trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/com/jboss/tools/common.xsl
trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/org/jboss/tools/common.xsl
Log:
https://jira.jboss.org/jira/browse/JBDS-399 - markers for titles are added as <img /> elements
Modified: trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/com/jboss/tools/common.xsl
===================================================================
--- trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/com/jboss/tools/common.xsl 2008-10-03 10:37:42 UTC (rev 10642)
+++ trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/com/jboss/tools/common.xsl 2008-10-03 10:59:30 UTC (rev 10643)
@@ -209,22 +209,10 @@
<!-- Let's handle the case where a component (bibliography, for example)
occurs inside a section; will we need parameters for this? -->
- <xsl:variable name="revflag">
- <xsl:choose>
- <xsl:when test="../@role='new' or ../@role='updated'">
- <xsl:value-of select="../@role"/>
- </xsl:when>
- <!-- For mkdiff compatibility-->
- <xsl:when test="../@revisionflag='added' or ../@revisionflag='changed'">
- <xsl:value-of select="../@revisionflag"/>
- </xsl:when>
- <xsl:otherwise></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
+
<xsl:element name="h{$level+1}">
<xsl:attribute name="class">
title
- <xsl:value-of select="$revflag" />
</xsl:attribute>
<xsl:if test="$generate.id.attributes = 0">
<xsl:call-template name="anchor">
@@ -236,6 +224,15 @@
<xsl:with-param name="allow-anchors" select="1"/>
</xsl:apply-templates>
</xsl:element>
+ <xsl:choose>
+ <xsl:when test="../@role='new' or ../@revisionflag='added'">
+ <img src="images/new.png" alt="new" class="img_marker" />
+ </xsl:when>
+ <!-- For mkdiff compatibility-->
+ <xsl:when test="../@role='updated' or ../@revisionflag='changed'">
+ <img src="images/updated.png" alt="updated" class="img_marker" />
+ </xsl:when>
+ </xsl:choose>
</xsl:template>
<!-- ==================================================================== -->
@@ -275,24 +272,9 @@
</xsl:choose>
</xsl:variable>
- <xsl:variable name="revflag">
- <xsl:choose>
- <xsl:when test="../@role='new' or ../@role='updated'">
- <xsl:value-of select="../@role"/>
- </xsl:when>
- <!-- For mkdiff compatibility-->
- <xsl:when test="../@revisionflag='added' or ../@revisionflag='changed'">
- <xsl:value-of select="../@revisionflag"/>
- </xsl:when>
- <xsl:otherwise></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
<xsl:element name="h{$hlevel}">
<xsl:attribute name="class">
<xsl:value-of select="$class"/>
- <xsl:text> </xsl:text>
- <xsl:value-of select="$revflag"/>
</xsl:attribute>
<xsl:if test="$css.decoration != '0'">
<xsl:if test="$hlevel<3">
@@ -310,6 +292,15 @@
</xsl:if>
<xsl:copy-of select="$title"/>
</xsl:element>
+ <xsl:choose>
+ <xsl:when test="../@role='new' or ../@revisionflag='added'">
+ <img src="images/new.png" alt="new" class="img_marker" />
+ </xsl:when>
+ <!-- For mkdiff compatibility-->
+ <xsl:when test="../@role='updated' or ../@revisionflag='changed'">
+ <img src="images/updated.png" alt="updated" class="img_marker" />
+ </xsl:when>
+ </xsl:choose>
</xsl:template>
<!-- ==================================================================== -->
Modified: trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/org/jboss/tools/common.xsl
===================================================================
--- trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/org/jboss/tools/common.xsl 2008-10-03 10:37:42 UTC (rev 10642)
+++ trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/org/jboss/tools/common.xsl 2008-10-03 10:59:30 UTC (rev 10643)
@@ -200,22 +200,10 @@
<!-- Let's handle the case where a component (bibliography, for example)
occurs inside a section; will we need parameters for this? -->
- <xsl:variable name="revflag">
- <xsl:choose>
- <xsl:when test="../@role='new' or ../@role='updated'">
- <xsl:value-of select="../@role"/>
- </xsl:when>
- <!-- For mkdiff compatibility-->
- <xsl:when test="../@revisionflag='added' or ../@revisionflag='changed'">
- <xsl:value-of select="../@revisionflag"/>
- </xsl:when>
- <xsl:otherwise></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
+
<xsl:element name="h{$level+1}">
<xsl:attribute name="class">
title
- <xsl:value-of select="$revflag" />
</xsl:attribute>
<xsl:if test="$generate.id.attributes = 0">
<xsl:call-template name="anchor">
@@ -227,6 +215,16 @@
<xsl:with-param name="allow-anchors" select="1"/>
</xsl:apply-templates>
</xsl:element>
+
+ <xsl:choose>
+ <xsl:when test="../@role='new' or ../@revisionflag='added'">
+ <img src="images/new.png" alt="new" class="img_marker" />
+ </xsl:when>
+ <!-- For mkdiff compatibility-->
+ <xsl:when test="../@role='updated' or ../@revisionflag='changed'">
+ <img src="images/updated.png" alt="updated" class="img_marker" />
+ </xsl:when>
+ </xsl:choose>
</xsl:template>
<!-- ==================================================================== -->
@@ -266,24 +264,9 @@
</xsl:choose>
</xsl:variable>
- <xsl:variable name="revflag">
- <xsl:choose>
- <xsl:when test="../@role='new' or ../@role='updated'">
- <xsl:value-of select="../@role"/>
- </xsl:when>
- <!-- For mkdiff compatibility-->
- <xsl:when test="../@revisionflag='added' or ../@revisionflag='changed'">
- <xsl:value-of select="../@revisionflag"/>
- </xsl:when>
- <xsl:otherwise></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
<xsl:element name="h{$hlevel}">
<xsl:attribute name="class">
<xsl:value-of select="$class"/>
- <xsl:text> </xsl:text>
- <xsl:value-of select="$revflag"/>
</xsl:attribute>
<xsl:if test="$css.decoration != '0'">
<xsl:if test="$hlevel<3">
@@ -301,6 +284,15 @@
</xsl:if>
<xsl:copy-of select="$title"/>
</xsl:element>
+ <xsl:choose>
+ <xsl:when test="../@role='new' or ../@revisionflag='added'">
+ <img src="images/new.png" alt="new" class="img_marker" />
+ </xsl:when>
+ <!-- For mkdiff compatibility-->
+ <xsl:when test="../@role='updated' or ../@revisionflag='changed'">
+ <img src="images/updated.png" alt="updated" class="img_marker" />
+ </xsl:when>
+ </xsl:choose>
</xsl:template>
<!-- ==================================================================== -->
17 years, 3 months
JBoss Tools SVN: r10642 - trunk/common/plugins/org.jboss.tools.common.kb/schemas/tld.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2008-10-03 06:37:42 -0400 (Fri, 03 Oct 2008)
New Revision: 10642
Modified:
trunk/common/plugins/org.jboss.tools.common.kb/schemas/tld/JstlCore1_0.xml
Log:
https://jira.jboss.org/jira/browse/JBIDE-2695 Fixed
Modified: trunk/common/plugins/org.jboss.tools.common.kb/schemas/tld/JstlCore1_0.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.kb/schemas/tld/JstlCore1_0.xml 2008-10-03 10:01:22 UTC (rev 10641)
+++ trunk/common/plugins/org.jboss.tools.common.kb/schemas/tld/JstlCore1_0.xml 2008-10-03 10:37:42 UTC (rev 10642)
@@ -5,130 +5,262 @@
prefix="c" uri="http://java.sun.com/jstl/core">
<element-type body-content="allowed" content="mixed" end-tag="required"
name="catch" start-tag="required">
- <attribute-type name="var" required="false"/>
+ <attribute-type name="var" required="false">
+ <proposal type="beanProperty" />
+ <proposal type="bundleProperty" />
+ </attribute-type>
<attribute type="var"/>
</element-type>
<element-type body-content="allowed" content="mixed" end-tag="required"
name="choose" start-tag="required"/>
<element-type body-content="allowed" content="mixed" end-tag="required"
name="out" start-tag="required">
- <attribute-type name="value" required="true"/>
+ <attribute-type name="value" required="true">
+ <proposal type="beanProperty" />
+ <proposal type="bundleProperty" />
+ </attribute-type>
<attribute type="value"/>
- <attribute-type name="default" required="false"/>
+ <attribute-type name="default" required="false">
+ <proposal type="beanProperty" />
+ <proposal type="bundleProperty" />
+ </attribute-type>
<attribute type="default"/>
- <attribute-type name="escapeXml" required="false"/>
+ <attribute-type name="escapeXml" required="false">
+ <proposal type="beanProperty" />
+ <proposal type="bundleProperty" />
+ </attribute-type>
<attribute type="escapeXml"/>
</element-type>
<element-type body-content="allowed" content="mixed" end-tag="required"
name="if" start-tag="required">
- <attribute-type name="test" required="true"/>
+ <attribute-type name="test" required="true">
+ <proposal type="beanProperty" />
+ <proposal type="bundleProperty" />
+ </attribute-type>
<attribute type="test"/>
- <attribute-type name="var" required="false"/>
+ <attribute-type name="var" required="false">
+ <proposal type="beanProperty" />
+ <proposal type="bundleProperty" />
+ </attribute-type>
<attribute type="var"/>
- <attribute-type name="scope" required="false"/>
+ <attribute-type name="scope" required="false">
+ <proposal type="beanProperty" />
+ <proposal type="bundleProperty" />
+ </attribute-type>
<attribute type="scope"/>
</element-type>
<element-type body-content="allowed" content="mixed" end-tag="required"
name="import" start-tag="required">
- <attribute-type name="url" required="true"/>
+ <attribute-type name="url" required="true">
+ <proposal type="beanProperty" />
+ <proposal type="bundleProperty" />
+ </attribute-type>
<attribute type="url"/>
- <attribute-type name="var" required="false"/>
+ <attribute-type name="var" required="false">
+ <proposal type="beanProperty" />
+ <proposal type="bundleProperty" />
+ </attribute-type>
<attribute type="var"/>
- <attribute-type name="scope" required="false"/>
+ <attribute-type name="scope" required="false">
+ <proposal type="beanProperty" />
+ <proposal type="bundleProperty" />
+ </attribute-type>
<attribute type="scope"/>
- <attribute-type name="varReader" required="false"/>
+ <attribute-type name="varReader" required="false">
+ <proposal type="beanProperty" />
+ <proposal type="bundleProperty" />
+ </attribute-type>
<attribute type="varReader"/>
- <attribute-type name="context" required="false"/>
+ <attribute-type name="context" required="false">
+ <proposal type="beanProperty" />
+ <proposal type="bundleProperty" />
+ </attribute-type>
<attribute type="context"/>
- <attribute-type name="charEncoding" required="false"/>
+ <attribute-type name="charEncoding" required="false">
+ <proposal type="beanProperty" />
+ <proposal type="bundleProperty" />
+ </attribute-type>
<attribute type="charEncoding"/>
</element-type>
<element-type body-content="allowed" content="mixed" end-tag="required"
name="forEach" start-tag="required">
- <attribute-type name="items" required="false"/>
+ <attribute-type name="items" required="false">
+ <proposal type="beanProperty" />
+ <proposal type="bundleProperty" />
+ </attribute-type>
<attribute type="items"/>
- <attribute-type name="begin" required="false"/>
+ <attribute-type name="begin" required="false">
+ <proposal type="beanProperty" />
+ <proposal type="bundleProperty" />
+ </attribute-type>
<attribute type="begin"/>
- <attribute-type name="end" required="false"/>
+ <attribute-type name="end" required="false">
+ <proposal type="beanProperty" />
+ <proposal type="bundleProperty" />
+ </attribute-type>
<attribute type="end"/>
- <attribute-type name="step" required="false"/>
+ <attribute-type name="step" required="false">
+ <proposal type="beanProperty" />
+ <proposal type="bundleProperty" />
+ </attribute-type>
<attribute type="step"/>
- <attribute-type name="var" required="false"/>
+ <attribute-type name="var" required="false">
+ <proposal type="beanProperty" />
+ <proposal type="bundleProperty" />
+ </attribute-type>
<attribute type="var"/>
- <attribute-type name="varStatus" required="false"/>
+ <attribute-type name="varStatus" required="false">
+ <proposal type="beanProperty" />
+ <proposal type="bundleProperty" />
+ </attribute-type>
<attribute type="varStatus"/>
</element-type>
<element-type body-content="allowed" content="mixed" end-tag="required"
name="forTokens" start-tag="required">
- <attribute-type name="items" required="true"/>
+ <attribute-type name="items" required="true">
+ <proposal type="beanProperty" />
+ <proposal type="bundleProperty" />
+ </attribute-type>
<attribute type="items"/>
- <attribute-type name="delims" required="true"/>
+ <attribute-type name="delims" required="true">
+ <proposal type="beanProperty" />
+ <proposal type="bundleProperty" />
+ </attribute-type>
<attribute type="delims"/>
- <attribute-type name="begin" required="false"/>
+ <attribute-type name="begin" required="false">
+ <proposal type="beanProperty" />
+ <proposal type="bundleProperty" />
+ </attribute-type>
<attribute type="begin"/>
- <attribute-type name="end" required="false"/>
+ <attribute-type name="end" required="false">
+ <proposal type="beanProperty" />
+ <proposal type="bundleProperty" />
+ </attribute-type>
<attribute type="end"/>
- <attribute-type name="step" required="false"/>
+ <attribute-type name="step" required="false">
+ <proposal type="beanProperty" />
+ <proposal type="bundleProperty" />
+ </attribute-type>
<attribute type="step"/>
- <attribute-type name="var" required="false"/>
+ <attribute-type name="var" required="false">
+ <proposal type="beanProperty" />
+ <proposal type="bundleProperty" />
+ </attribute-type>
<attribute type="var"/>
- <attribute-type name="varStatus" required="false"/>
+ <attribute-type name="varStatus" required="false">
+ <proposal type="beanProperty" />
+ <proposal type="bundleProperty" />
+ </attribute-type>
<attribute type="varStatus"/>
</element-type>
<element-type body-content="allowed" content="mixed" end-tag="required"
name="otherwise" start-tag="required"/>
<element-type body-content="allowed" content="mixed" end-tag="required"
name="param" start-tag="required">
- <attribute-type name="name" required="true"/>
+ <attribute-type name="name" required="true">
+ <proposal type="beanProperty" />
+ <proposal type="bundleProperty" />
+ </attribute-type>
<attribute type="name"/>
- <attribute-type name="value" required="false"/>
+ <attribute-type name="value" required="false">
+ <proposal type="beanProperty" />
+ <proposal type="bundleProperty" />
+ </attribute-type>
<attribute type="value"/>
</element-type>
<element-type body-content="allowed" content="mixed" end-tag="required"
name="redirect" start-tag="required">
- <attribute-type name="var" required="false"/>
+ <attribute-type name="var" required="false">
+ <proposal type="beanProperty" />
+ <proposal type="bundleProperty" />
+ </attribute-type>
<attribute type="var"/>
- <attribute-type name="scope" required="false"/>
+ <attribute-type name="scope" required="false">
+ <proposal type="beanProperty" />
+ <proposal type="bundleProperty" />
+ </attribute-type>
<attribute type="scope"/>
- <attribute-type name="url" required="true"/>
+ <attribute-type name="url" required="true">
+ <proposal type="beanProperty" />
+ <proposal type="bundleProperty" />
+ </attribute-type>
<attribute type="url"/>
- <attribute-type name="context" required="false"/>
+ <attribute-type name="context" required="false">
+ <proposal type="beanProperty" />
+ <proposal type="bundleProperty" />
+ </attribute-type>
<attribute type="context"/>
</element-type>
<element-type body-content="refused" content="mixed" end-tag="required"
name="remove" start-tag="required">
- <attribute-type name="var" required="true"/>
+ <attribute-type name="var" required="true">
+ <proposal type="beanProperty" />
+ <proposal type="bundleProperty" />
+ </attribute-type>
<attribute type="var"/>
- <attribute-type name="scope" required="false"/>
+ <attribute-type name="scope" required="false">
+ <proposal type="beanProperty" />
+ <proposal type="bundleProperty" />
+ </attribute-type>
<attribute type="scope"/>
</element-type>
<element-type body-content="allowed" content="mixed" end-tag="required"
name="set" start-tag="required">
- <attribute-type name="var" required="false"/>
+ <attribute-type name="var" required="false">
+ <proposal type="beanProperty" />
+ <proposal type="bundleProperty" />
+ </attribute-type>
<attribute type="var"/>
- <attribute-type name="value" required="false"/>
+ <attribute-type name="value" required="false">
+ <proposal type="beanProperty" />
+ <proposal type="bundleProperty" />
+ </attribute-type>
<attribute type="value"/>
- <attribute-type name="target" required="false"/>
+ <attribute-type name="target" required="false">
+ <proposal type="beanProperty" />
+ <proposal type="bundleProperty" />
+ </attribute-type>
<attribute type="target"/>
- <attribute-type name="property" required="false"/>
+ <attribute-type name="property" required="false">
+ <proposal type="beanProperty" />
+ <proposal type="bundleProperty" />
+ </attribute-type>
<attribute type="property"/>
- <attribute-type name="scope" required="false"/>
+ <attribute-type name="scope" required="false">
+ <proposal type="beanProperty" />
+ <proposal type="bundleProperty" />
+ </attribute-type>
<attribute type="scope"/>
</element-type>
<element-type body-content="allowed" content="mixed" end-tag="required"
name="url" start-tag="required">
- <attribute-type name="var" required="false"/>
+ <attribute-type name="var" required="false">
+ <proposal type="beanProperty" />
+ <proposal type="bundleProperty" />
+ </attribute-type>
<attribute type="var"/>
- <attribute-type name="scope" required="false"/>
+ <attribute-type name="scope" required="false">
+ <proposal type="beanProperty" />
+ <proposal type="bundleProperty" />
+ </attribute-type>
<attribute type="scope"/>
- <attribute-type name="value" required="true"/>
+ <attribute-type name="value" required="true">
+ <proposal type="beanProperty" />
+ <proposal type="bundleProperty" />
+ </attribute-type>
<attribute type="value"/>
- <attribute-type name="context" required="false"/>
+ <attribute-type name="context" required="false">
+ <proposal type="beanProperty" />
+ <proposal type="bundleProperty" />
+ </attribute-type>
<attribute type="context"/>
</element-type>
<element-type body-content="allowed" content="mixed" end-tag="required"
name="when" start-tag="required">
- <attribute-type name="test" required="true"/>
+ <attribute-type name="test" required="true">
+ <proposal type="beanProperty" />
+ <proposal type="bundleProperty" />
+ </attribute-type>
<attribute type="test"/>
</element-type>
-</schema>
+</schema>
\ No newline at end of file
17 years, 3 months
JBoss Tools SVN: r10641 - trunk/vpe/plugins/org.jboss.tools.vpe.resref.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-10-03 06:01:22 -0400 (Fri, 03 Oct 2008)
New Revision: 10641
Added:
trunk/vpe/plugins/org.jboss.tools.vpe.resref/plugin.xml
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.resref/build.properties
Log:
Error in JUnit tests
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.resref/build.properties
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.resref/build.properties 2008-10-03 10:00:46 UTC (rev 10640)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.resref/build.properties 2008-10-03 10:01:22 UTC (rev 10641)
@@ -1,4 +1,6 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
- .
+ .,\
+ plugin.xml
+src.includes = plugin.xml
Added: trunk/vpe/plugins/org.jboss.tools.vpe.resref/plugin.xml
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.resref/plugin.xml (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.resref/plugin.xml 2008-10-03 10:01:22 UTC (rev 10641)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<plugin>
+ <extension point="org.jboss.tools.common.model.classes">
+ <xclass id="org.jboss.tools.vpe.resref.core.VpeAddReferenceSupport"
+ class="org.jboss.tools.vpe.resref.core.VpeAddReferenceSupport"/>
+ </extension>
+</plugin>
17 years, 3 months
JBoss Tools SVN: r10640 - in trunk/vpe/plugins/org.jboss.tools.vpe: resources/meta and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-10-03 06:00:46 -0400 (Fri, 03 Oct 2008)
New Revision: 10640
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/plugin.xml
trunk/vpe/plugins/org.jboss.tools.vpe/resources/meta/vpe.meta
Log:
Error in JUnit tests
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/plugin.xml
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/plugin.xml 2008-10-03 09:51:09 UTC (rev 10639)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/plugin.xml 2008-10-03 10:00:46 UTC (rev 10640)
@@ -27,10 +27,6 @@
paths=".vpe."
/>
</extension>
- <extension point="org.jboss.tools.common.model.classes">
- <xclass id="org.jboss.tools.vpe.resref.core.VpeAddReferenceSupport"
- class="org.jboss.tools.vpe.resref.core.VpeAddReferenceSupport"/>
- </extension>
<extension point="org.eclipse.ui.preferencePages">
<page category="org.jboss.tools.common.xstudio.editors" class="org.jboss.tools.vpe.editor.preferences.VpeEditorPreferencesPage" id="org.jboss.tools.vpe.editor" name="Visual Page Editor"></page>
<page
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/resources/meta/vpe.meta
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/resources/meta/vpe.meta 2008-10-03 09:51:09 UTC (rev 10639)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/resources/meta/vpe.meta 2008-10-03 10:00:46 UTC (rev 10640)
@@ -194,7 +194,7 @@
<XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
PROPERTIES="support=org.jboss.tools.vpe.resref.core.VpeAddReferenceSupport"
displayName="Add El Reference..." kind="action" name="AddItem">
- <EntityData EntityName="VPEELReferenceExt">
+ <EntityData EntityName="VPEElReferenceExt">
<AttributeData AttributeName="location"/>
<AttributeData AttributeName="scope" Mandatory="no"/>
<AttributeData AttributeName="prefix" Mandatory="no"/>
@@ -248,7 +248,7 @@
displayName="Add El Reference..." kind="action" name="AddItem">
<EntityData EntityName="VPEGlobalElReference">
<AttributeData AttributeName="location" Mandatory="no"/>
- <AttributeData AttributeName="scope" Mandatory="no"/>
+ <!--AttributeData AttributeName="scope" Mandatory="no"/-->
<AttributeData AttributeName="prefix" Mandatory="no"/>
</EntityData>
</XActionItem>
@@ -259,7 +259,7 @@
displayName="Edit El Reference..." kind="action" name="EditItem">
<EntityData EntityName="VPEGlobalElReference">
<AttributeData AttributeName="location"/>
- <AttributeData AttributeName="scope" Mandatory="no"/>
+ <!--AttributeData AttributeName="scope" Mandatory="no"/-->
<AttributeData AttributeName="prefix" Mandatory="no"/>
</EntityData>
</XActionItem>
17 years, 3 months
JBoss Tools SVN: r10639 - trunk/common/plugins/org.jboss.tools.common.resref.ui/src/org/jboss/tools/common/resref/ui.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-10-03 05:51:09 -0400 (Fri, 03 Oct 2008)
New Revision: 10639
Modified:
trunk/common/plugins/org.jboss.tools.common.resref.ui/src/org/jboss/tools/common/resref/ui/BaseAddReferenceSupport.java
Log:
Error in JUnit tests
Modified: trunk/common/plugins/org.jboss.tools.common.resref.ui/src/org/jboss/tools/common/resref/ui/BaseAddReferenceSupport.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.resref.ui/src/org/jboss/tools/common/resref/ui/BaseAddReferenceSupport.java 2008-10-02 20:47:21 UTC (rev 10638)
+++ trunk/common/plugins/org.jboss.tools.common.resref.ui/src/org/jboss/tools/common/resref/ui/BaseAddReferenceSupport.java 2008-10-03 09:51:09 UTC (rev 10639)
@@ -68,11 +68,16 @@
if(initialPrefix != null) {
setAttributeValue(0, "prefix", initialPrefix); //$NON-NLS-1$
}
- final XAttributeConstraintL scopeAttribute = ((XAttributeConstraintL) getTarget().getModelEntity().getAttribute("scope") //$NON-NLS-1$
+ if(getTarget().getModelEntity().getAttribute("scope") != null) {
+ final XAttributeConstraintL scopeAttribute = ((XAttributeConstraintL) getTarget().getModelEntity().getAttribute("scope") //$NON-NLS-1$
.getConstraint());
- if (scopeAttribute != null) {
- scopeNames = scopeAttribute.getValues();
- }
+ if (scopeAttribute != null) {
+ scopeNames = scopeAttribute.getValues();
+ }
+ } else {
+ //just in case. should not happen
+ scopeNames = ResourceReference.SCOPE_NAMES;
+ }
int scopeIndex = ((Integer)getProperties().get("scope")).intValue(); //$NON-NLS-1$
if(scopeIndex == 1 && scopeNames.length == 1){
17 years, 3 months
JBoss Tools SVN: r10638 - trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/wizards/pages.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2008-10-02 16:47:21 -0400 (Thu, 02 Oct 2008)
New Revision: 10638
Modified:
trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/wizards/pages/FilesetInfoWizardPage.java
Log:
fileset wizard was also missing error messages in title area dialog
Modified: trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/wizards/pages/FilesetInfoWizardPage.java
===================================================================
--- trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/wizards/pages/FilesetInfoWizardPage.java 2008-10-02 20:17:01 UTC (rev 10637)
+++ trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/wizards/pages/FilesetInfoWizardPage.java 2008-10-02 20:47:21 UTC (rev 10638)
@@ -11,7 +11,10 @@
package org.jboss.ide.eclipse.archives.ui.wizards.pages;
import java.util.ArrayList;
+import java.util.Arrays;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
@@ -35,9 +38,12 @@
import org.eclipse.swt.widgets.Text;
import org.jboss.ide.eclipse.archives.core.ArchivesCore;
import org.jboss.ide.eclipse.archives.core.model.DirectoryScannerFactory;
+import org.jboss.ide.eclipse.archives.core.model.IArchive;
import org.jboss.ide.eclipse.archives.core.model.IArchiveFileSet;
import org.jboss.ide.eclipse.archives.core.model.IArchiveNode;
import org.jboss.ide.eclipse.archives.core.model.DirectoryScannerFactory.DirectoryScannerExtension;
+import org.jboss.ide.eclipse.archives.core.util.ModelUtil;
+import org.jboss.ide.eclipse.archives.core.util.PathUtils;
import org.jboss.ide.eclipse.archives.ui.ArchivesSharedImages;
import org.jboss.ide.eclipse.archives.ui.ArchivesUIMessages;
import org.jboss.ide.eclipse.archives.ui.util.composites.ArchiveFilesetDestinationComposite;
@@ -241,11 +247,22 @@
srcDestComposite.addChangeListener(new ArchiveSourceDestinationComposite.ChangeListener() {
public void compositeChanged() {
+ validate();
changePreview();
}
});
}
+ private boolean validate () {
+ String errorMessage = null;
+ if( !srcDestComposite.isValid() )
+ errorMessage = srcDestComposite.getErrorMessage();
+ setErrorMessage(errorMessage);
+ setPageComplete(errorMessage == null);
+ return errorMessage == null;
+ }
+
+
public IArchiveNode getRootNode () {
return (IArchiveNode) destinationComposite.getPackageNodeDestination();
}
17 years, 3 months
JBoss Tools SVN: r10637 - trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/views.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2008-10-02 16:17:01 -0400 (Thu, 02 Oct 2008)
New Revision: 10637
Modified:
trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/views/ProjectArchivesCommonView.java
Log:
JBIDE-2649 missed file somehow
Modified: trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/views/ProjectArchivesCommonView.java
===================================================================
--- trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/views/ProjectArchivesCommonView.java 2008-10-02 18:32:53 UTC (rev 10636)
+++ trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/views/ProjectArchivesCommonView.java 2008-10-02 20:17:01 UTC (rev 10637)
@@ -83,7 +83,7 @@
Object element = ((IStructuredSelection)selection).getFirstElement();
IProject project = getProject(element);
- if( project != null && project != currentProject ) {
+ if( project != null && project != currentProject && project.isOpen()) {
currentProject = project;
jiggleViewerInput();
}
17 years, 3 months
JBoss Tools SVN: r10636 - trunk/as/tests/org.jboss.ide.eclipse.as.test.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-10-02 14:32:53 -0400 (Thu, 02 Oct 2008)
New Revision: 10636
Modified:
trunk/as/tests/org.jboss.ide.eclipse.as.test/build.properties
Log:
fix archives test errors. missing resources were added to build: testOutput and projectPieces folders
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.test/build.properties
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.test/build.properties 2008-10-02 18:17:06 UTC (rev 10635)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.test/build.properties 2008-10-02 18:32:53 UTC (rev 10636)
@@ -1,8 +1,9 @@
-source.. = src/
bin.includes = META-INF/,\
jbossastest.jar,\
- projects/
+ projects/,\
+ testOutputs/,\
+ projectPieces/
source.jbossastest.jar = src/
-jars.compile.order = .
+jars.compile.order = jbossastest.jar
output.jbossastest.jar = bin/
source.jbossastest.jar = src/
17 years, 3 months
JBoss Tools SVN: r10635 - in trunk/vpe: tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/editor/preferences and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-10-02 14:17:06 -0400 (Thu, 02 Oct 2008)
New Revision: 10635
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/preferences/VpeEditorPreferencesPage.java
trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/editor/preferences/VpeEditorPreferencesPageTest.java
Log:
fix for VPE JUnit test errors
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/preferences/VpeEditorPreferencesPage.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/preferences/VpeEditorPreferencesPage.java 2008-10-02 18:03:55 UTC (rev 10634)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/preferences/VpeEditorPreferencesPage.java 2008-10-02 18:17:06 UTC (rev 10635)
@@ -24,6 +24,8 @@
public class VpeEditorPreferencesPage extends TabbedPreferencesPage implements IWorkbenchPreferencePage {
+
+ public static final String ID = "org.jboss.tools.vpe.editor";
public VpeEditorPreferencesPage() {
addPreferencePage(new GeneralPage());
addPreferencePage(new TemplatesPreferencePage());
@@ -34,8 +36,8 @@
Preferences preferences = VpePlugin.getDefault().getPluginPreferences();
PreferenceDialog prefsdlg = PreferencesUtil.createPreferenceDialogOn(
PlatformUI.getWorkbench().getDisplay().getActiveShell(),
- "org.jboss.tools.vpe.editor", new String[] {
- "org.jboss.tools.vpe.editor" }, null);
+ ID, new String[] {
+ ID }, null);
prefsdlg.open();
}
Modified: trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/editor/preferences/VpeEditorPreferencesPageTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/editor/preferences/VpeEditorPreferencesPageTest.java 2008-10-02 18:03:55 UTC (rev 10634)
+++ trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/editor/preferences/VpeEditorPreferencesPageTest.java 2008-10-02 18:17:06 UTC (rev 10635)
@@ -9,7 +9,7 @@
public void testVpeEditorPreferencesPageShow() {
PreferenceDialog prefDialog =
WorkbenchUtils.createPreferenceDialog(
- VpeEditorPreferencesPage.class.getName());
+ VpeEditorPreferencesPage.ID);
try {
prefDialog.setBlockOnOpen(false);
17 years, 3 months
JBoss Tools SVN: r10634 - trunk/vpe/tests/org.jboss.tools.vpe.test.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-10-02 14:03:55 -0400 (Thu, 02 Oct 2008)
New Revision: 10634
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.test/build.properties
Log:
fix vpe test exceptions:
java.lang.NullPointerException
at org.eclipse.core.internal.runtime.Activator.getURLConverter(Activator.java:313)
at org.eclipse.core.runtime.FileLocator.resolve(FileLocator.java:186)
at org.jboss.tools.vpe.test.TemplateSchemeValidateTest.setUp(TemplateSchemeValidateTest.java:79)
schema folder added to bbuild
Modified: trunk/vpe/tests/org.jboss.tools.vpe.test/build.properties
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.test/build.properties 2008-10-02 16:22:12 UTC (rev 10633)
+++ trunk/vpe/tests/org.jboss.tools.vpe.test/build.properties 2008-10-02 18:03:55 UTC (rev 10634)
@@ -2,7 +2,8 @@
testOk-plugin.xml,\
testFailure-plugin.xml,\
templates/,\
- vpe-tests.jar
+ vpe-tests.jar,\
+ scheme/
src.includes = META-INF/,\
build.properties,\
src/,\
17 years, 3 months
JBoss Tools SVN: r10633 - trunk/seam/docs/reference/en/modules.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-10-02 12:22:12 -0400 (Thu, 02 Oct 2008)
New Revision: 10633
Modified:
trunk/seam/docs/reference/en/modules/testng.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-430 - making a conclusion for the Seam tools guide.
Modified: trunk/seam/docs/reference/en/modules/testng.xml
===================================================================
--- trunk/seam/docs/reference/en/modules/testng.xml 2008-10-02 15:30:48 UTC (rev 10632)
+++ trunk/seam/docs/reference/en/modules/testng.xml 2008-10-02 16:22:12 UTC (rev 10633)
@@ -6,173 +6,254 @@
<keyword>JBoss Developer Studio</keyword>
<keyword>JBDS</keyword>
<keyword>testNG</keyword>
- </keywordset>
+ </keywordset>
</chapterinfo>
<title>Using TestNG project</title>
<para>With the help this chapter you will get to know with TestNG.</para>
<section>
- <title>What is TestNG?</title>
- <para><property>TestNG</property> ("Testing, the Next Generation") is a Java unit testing framework that aims to overcome many limitations of JUnit.
- TestNG introduces some new functionalities that make it more powerful and easier to use, such as:</para>
- <itemizedlist>
- <listitem><para>JDK 5 Annotations (JDK 1.4 is also supported with JavaDoc annotations)</para></listitem>
- <listitem><para>Flexible test configuration</para></listitem>
- <listitem><para>Support for data-driven testing (with @DataProvider)</para></listitem>
- <listitem><para>Support for parameters</para></listitem>
- <listitem><para>Allows distribution of tests on slave machines</para></listitem>
- <listitem><para>Powerful execution model (no more TestSuite)</para></listitem>
- <listitem><para>Supported by a variety of tools and plug-ins (Eclipse, IDEA, Maven, etc...)</para></listitem>
- <listitem><para>Embeds BeanShell for further flexibility</para></listitem>
- <listitem><para>Default JDK functions for runtime and logging (no dependencies)</para></listitem>
- <listitem><para>Dependent methods for application server testing</para></listitem>
- </itemizedlist>
-
- <para>More information can be found on home page: <ulink url="http://testng.org">www.testng.org</ulink></para>
- </section>
+ <title>What is TestNG?</title>
+ <para><property>TestNG</property> ("Testing, the Next Generation") is a
+ Java unit testing framework that aims to overcome many limitations of JUnit. TestNG
+ introduces some new functionalities that make it more powerful and easier to use, such
+ as:</para>
+ <itemizedlist>
+ <listitem>
+ <para>JDK 5 Annotations (JDK 1.4 is also supported with JavaDoc annotations)</para>
+ </listitem>
+ <listitem>
+ <para>Flexible test configuration</para>
+ </listitem>
+ <listitem>
+ <para>Support for data-driven testing (with @DataProvider)</para>
+ </listitem>
+ <listitem>
+ <para>Support for parameters</para>
+ </listitem>
+ <listitem>
+ <para>Allows distribution of tests on slave machines</para>
+ </listitem>
+ <listitem>
+ <para>Powerful execution model (no more TestSuite)</para>
+ </listitem>
+ <listitem>
+ <para>Supported by a variety of tools and plug-ins (Eclipse, IDEA, Maven,
+ etc...)</para>
+ </listitem>
+ <listitem>
+ <para>Embeds BeanShell for further flexibility</para>
+ </listitem>
+ <listitem>
+ <para>Default JDK functions for runtime and logging (no dependencies)</para>
+ </listitem>
+ <listitem>
+ <para>Dependent methods for application server testing</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>More information can be found on home page: <ulink url="http://testng.org"
+ >www.testng.org</ulink></para>
+ </section>
<section id="OtherRelevantResourcesOnTheTopic5">
<?dbhtml filename="OtherRelevantResourcesOnTheTopic5.html"?>
<title>Other relevant resources on the topic</title>
- <para><ulink url="http://www.artima.com/lejava/articles/testng.html">Next-Generation Testing with TestNG (An Interview with Cedric Beust)</ulink></para>
- <para><ulink url="http://www.javaworld.com/javaworld/jw-04-2005/jw-0404-testng.html">TestNG: The next generation of unit testing</ulink></para>
- <para><ulink url="http://dev2dev.bea.com/pub/a/2006/09/testng-categorization.html">Test Categorization Techniques with TestNG</ulink></para>
- <para><ulink url="http://www-128.ibm.com/developerworks/java/library/j-testng/">TestNG makes Java unit testing a breeze</ulink></para>
- <para><ulink url="http://www-128.ibm.com/developerworks/java/library/j-cq08296/index.html">In pursuit of code quality: JUnit 4 vs. TestNG</ulink></para>
+ <para>
+ <ulink url="http://www.artima.com/lejava/articles/testng.html">Next-Generation Testing
+ with TestNG (An Interview with Cedric Beust)</ulink>
+ </para>
+ <para>
+ <ulink url="http://www.javaworld.com/javaworld/jw-04-2005/jw-0404-testng.html">TestNG:
+ The next generation of unit testing</ulink>
+ </para>
+ <para>
+ <ulink url="http://dev2dev.bea.com/pub/a/2006/09/testng-categorization.html">Test
+ Categorization Techniques with TestNG</ulink>
+ </para>
+ <para>
+ <ulink url="http://www-128.ibm.com/developerworks/java/library/j-testng/">TestNG makes
+ Java unit testing a breeze</ulink>
+ </para>
+ <para>
+ <ulink url="http://www-128.ibm.com/developerworks/java/library/j-cq08296/index.html">In
+ pursuit of code quality: JUnit 4 vs. TestNG</ulink>
+ </para>
</section>
<section>
<title>How to use the generated Seam-test project to run Seam tests?</title>
-
+
<itemizedlist>
- <listitem><para>Create a new Seam Web Project with EAR deployment using the New Seam Project wizard.</para></listitem>
+ <listitem>
+ <para>Create a new Seam Web Project with EAR deployment using the New Seam Project
+ wizard.</para>
+ </listitem>
</itemizedlist>
-
+
<itemizedlist>
- <listitem><para>After a project is created you will have the generated Seam-test project that is setup to run TestNG directly against the proper libraries and server runtime libraries.</para></listitem>
+ <listitem>
+ <para>After a project is created you will have the generated Seam-test project that
+ is setup to run TestNG directly against the proper libraries and server runtime
+ libraries.</para>
+ </listitem>
</itemizedlist>
-
+
<figure>
<title>Seam-test Project</title>
- <mediaobject>
+ <mediaobject>
<imageobject>
<imagedata fileref="images/testng/testng_5.png"/>
</imageobject>
</mediaobject>
</figure>
-
+
<itemizedlist>
- <listitem><para>Add Seam Action to your project via <emphasis><property>File > New > Seam Action</property>.</emphasis></para></listitem>
+ <listitem>
+ <para>Add Seam Action to your project via <emphasis><property>File > New > Seam
+ Action</property>.</emphasis></para>
+ </listitem>
</itemizedlist>
-
+
<figure>
<title>Seam Action Creation</title>
- <mediaobject>
+ <mediaobject>
<imageobject>
<imagedata fileref="images/testng/testng_6.png"/>
</imageobject>
</mediaobject>
</figure>
-
+
<itemizedlist>
- <listitem><para>Fill out the wizard fields. New Seam Action wizard will create resources and place them in the appropriate folders dependent on EAR project structure.</para></listitem>
+ <listitem>
+ <para>Fill out the wizard fields. New Seam Action wizard will create resources and
+ place them in the appropriate folders dependent on EAR project structure.</para>
+ </listitem>
</itemizedlist>
-
+
<figure>
<title>New Seam Action Wizard</title>
- <mediaobject>
+ <mediaobject>
<imageobject>
<imagedata fileref="images/testng/testng_7.png"/>
</imageobject>
</mediaobject>
</figure>
-
+
<itemizedlist>
- <listitem><para>When Action is created you will see <property>actionPage.xhtml</property> in Package Explorer view. <property>ActionBean.java</property> will be automatically opened in Java Editor.</para></listitem>
+ <listitem>
+ <para>When Action is created you will see <property>actionPage.xhtml</property> in
+ Package Explorer view. <property>ActionBean.java</property> will be
+ automatically opened in Java Editor.</para>
+ </listitem>
</itemizedlist>
-
+
<figure>
<title>Created Action</title>
- <mediaobject>
+ <mediaobject>
<imageobject>
<imagedata fileref="images/testng/testng_8.png" scale="70"/>
</imageobject>
</mediaobject>
</figure>
-
-
+
+
<itemizedlist>
- <listitem><para>Select <property>ActionLocalTest.xml</property> in Seam-test project and run the test with right click <emphasis><property>Run As > TestNG Suite</property>.</emphasis></para></listitem>
+ <listitem>
+ <para>Select <property>ActionLocalTest.xml</property> in Seam-test project and run
+ the test with right click <emphasis><property>Run As > TestNG
+ Suite</property>.</emphasis></para>
+ </listitem>
</itemizedlist>
-
+
<figure>
<title>Running TestNG</title>
- <mediaobject>
+ <mediaobject>
<imageobject>
<imagedata fileref="images/testng/testng_9.png"/>
</imageobject>
</mediaobject>
</figure>
-
+
<para>The test process will start and its output will be written in Console View.</para>
-
+
<figure>
<title>Test is Finished</title>
- <mediaobject>
+ <mediaobject>
<imageobject>
<imagedata fileref="images/testng/testng_10.png" scale="70"/>
</imageobject>
</mediaobject>
</figure>
-
-
+
+
<itemizedlist>
- <listitem><para>After running TestNG you will have the test results in <emphasis><property>test-output</property></emphasis> folder in Seam-test project (press F5 to refresh the Package Explorer view).
- Open <property>index.html</property> file with Web Browser or simply use the TestNG view.</para></listitem>
+ <listitem>
+ <para>After running TestNG you will have the test results in <emphasis>
+ <property>test-output</property>
+ </emphasis> folder in Seam-test project (press F5 to refresh the Package
+ Explorer view). Open <property>index.html</property> file with Web Browser or
+ simply use the TestNG view.</para>
+ </listitem>
</itemizedlist>
-
+
<para>The below view shows a successful run of the test.</para>
-
+
<figure>
<title>Viewing the Test Results</title>
- <mediaobject>
+ <mediaobject>
<imageobject>
<imagedata fileref="images/testng/testng_11.png" scale="70"/>
</imageobject>
</mediaobject>
</figure>
-
-
+
+
<para>You can see the test results in Web Browser.</para>
-
+
<figure>
<title>Test Results in Browser</title>
- <mediaobject>
+ <mediaobject>
<imageobject>
<imagedata fileref="images/testng/testng_12.png" scale="70"/>
</imageobject>
</mediaobject>
</figure>
-
- <para>After clicking on <emphasis><property>ActionLocal Tests</property></emphasis> link you will see the Results for ActionLocal Tests.</para>
-
+
+ <para>After clicking on <emphasis>
+ <property>ActionLocal Tests</property>
+ </emphasis> link you will see the Results for ActionLocal Tests.</para>
+
<figure>
<title>Test Information</title>
- <mediaobject>
+ <mediaobject>
<imageobject>
<imagedata fileref="images/testng/testng_13.png" scale="70"/>
</imageobject>
</mediaobject>
</figure>
-
- <para>Select a result on the left-hand pane and its details will be displayed on the right-hand one.</para>
-
+
+ <para>Select a result on the left-hand pane and its details will be displayed on the
+ right-hand one.</para>
+
<figure>
<title>ActionLocal Test Details</title>
- <mediaobject>
+ <mediaobject>
<imageobject>
<imagedata fileref="images/testng/testng_14.png"/>
</imageobject>
</mediaobject>
</figure>
-
-
+
+ <para>Thus with Seam tooling you can easily take advantage of TestNG framework. As you can
+ see, it generates its own TestNG project as a separate module within which you can
+ easily monitor the tests execution and their output.</para>
</section>
- </chapter>
+
+ <para>In conclusion, the main goal of this document is to get you know with a full featureset
+ that <property>JBoss Tools</property> provides to support Seam development. Thus if you have
+ some questions, comments or suggestions on the topic, please fell free to ask in the <ulink
+ url="http://www.jboss.com/index.html?module=bb&op=viewforum&f=201">JBoss
+ Tools Forum</ulink>. You can also influence on how you want to see JBoss Tools docs in
+ future leaving your vote on our page <ulink
+ url="http://wiki.jboss.org/wiki/JBossToolsDocsFuture"
+ >here</ulink>. </para>
+
+ <para>A set of movies on Seam tooling is available <ulink url="http://docs.jboss.org/tools/movies">here</ulink>.</para>
+</chapter>
17 years, 3 months
JBoss Tools SVN: r10632 - trunk/jsf/docs/userguide/en/modules.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2008-10-02 11:30:48 -0400 (Thu, 02 Oct 2008)
New Revision: 10632
Modified:
trunk/jsf/docs/userguide/en/modules/editors.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-359
ordered list is corrected
Modified: trunk/jsf/docs/userguide/en/modules/editors.xml
===================================================================
--- trunk/jsf/docs/userguide/en/modules/editors.xml 2008-10-02 15:17:51 UTC (rev 10631)
+++ trunk/jsf/docs/userguide/en/modules/editors.xml 2008-10-02 15:30:48 UTC (rev 10632)
@@ -675,7 +675,7 @@
</proposal>
</AttributeType>
]]></programlisting>
- <orderedlist continuation="continues">
+ <orderedlist Start="10" continuation="continues">
<listitem>
<para>Add information on your xml file in <emphasis>
<property><JBDS_home>/studio/eclipse/plugins/org.jboss.common.kb_***/plugin.xml</property>
17 years, 3 months
JBoss Tools SVN: r10631 - trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/text/java.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-10-02 11:17:51 -0400 (Thu, 02 Oct 2008)
New Revision: 10631
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/text/java/SeamELProposalProcessor.java
Log:
JBIDE-1497.
Refactoring
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/text/java/SeamELProposalProcessor.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/text/java/SeamELProposalProcessor.java 2008-10-02 15:17:29 UTC (rev 10630)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/text/java/SeamELProposalProcessor.java 2008-10-02 15:17:51 UTC (rev 10631)
@@ -54,6 +54,10 @@
import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
import org.eclipse.wst.xml.ui.internal.contentassist.AbstractContentAssistProcessor;
import org.eclipse.wst.xml.ui.internal.util.SharedXMLEditorPluginImageHelper;
+import org.jboss.tools.common.el.core.model.ELInvocationExpression;
+import org.jboss.tools.common.el.core.model.ELModel;
+import org.jboss.tools.common.el.core.model.ELUtil;
+import org.jboss.tools.common.el.core.parser.LexicalToken;
import org.jboss.tools.common.el.core.resolver.ElVarSearcher;
import org.jboss.tools.common.el.core.resolver.Var;
import org.jboss.tools.common.model.ui.texteditors.xmleditor.XMLTextEditor;
@@ -350,7 +354,20 @@
// If we need CA for expressions/variables without #{}, it should be handled separately.
SeamELCompletionEngine engine = new SeamELCompletionEngine(seamProject);
+
+ //TODO refactor method checkStartPositionInEL
+ boolean isInEl = checkStartPositionInEL(viewer, offset);
String prefix= engine.getPrefix(viewer, offset, start, end);
+
+ if(isInEl && (prefix == null || prefix.length() == 0)) {
+ String el = viewer.getDocument().get().substring(start, offset) + "a";
+ ELModel model = engine.getParserFactory().createParser().parse(el);
+ ELInvocationExpression expr = ELUtil.findExpression(model, el.length());
+ if(expr == null) {
+ return NO_PROPOSALS;
+ }
+ }
+
prefix = (prefix == null ? "" : prefix); //$NON-NLS-1$
String proposalPrefix = "";
@@ -358,7 +375,7 @@
String elStartChar = "#";
String documentContent = null;
IDocument document = viewer.getDocument();
- if (!checkStartPositionInEL(viewer, offset)) {
+ if (!isInEl) {
// Work only with attribute value for JSP/HTML
if((part instanceof XMLTextEditor) || (!isAttributeValue(viewer, offset))) {
return NO_PROPOSALS;
17 years, 3 months
JBoss Tools SVN: r10630 - in trunk/seam/plugins/org.jboss.tools.seam.core: src/org/jboss/tools/seam/internal/core/el and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-10-02 11:17:29 -0400 (Thu, 02 Oct 2008)
New Revision: 10630
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/.classpath
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELCompletionEngine.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamELValidator.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/messages.properties
Log:
JBIDE-1497.
Refactoring
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/.classpath
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/.classpath 2008-10-02 15:16:16 UTC (rev 10629)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/.classpath 2008-10-02 15:17:29 UTC (rev 10630)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELCompletionEngine.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELCompletionEngine.java 2008-10-02 15:16:16 UTC (rev 10629)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELCompletionEngine.java 2008-10-02 15:17:29 UTC (rev 10630)
@@ -74,27 +74,8 @@
/**
* Create the array of suggestions.
- *
* @param project Seam project
* @param file File
- * @param document
- * @param prefix the prefix to search for
- * @param position Offset of the prefix
- * @param vars - 'var' attributes which can be used in this EL
- * @param start start of relevant region in document
- * @param end end of relevant region in document
- * @return the list of all possible suggestions
- * @throws BadLocationException if accessing the current document fails
- */
- public List<String> getCompletions(IFile file, IDocument document, CharSequence prefix,
- int position, List<Var> vars, int start, int end) throws BadLocationException, StringIndexOutOfBoundsException {
- return getCompletions(file, document, prefix, position, false, vars, start, end);
- }
-
- /**
- * Create the array of suggestions.
- * @param project Seam project
- * @param file File
* @param documentContent
* @param prefix the prefix to search for
* @param position Offset of the prefix
@@ -119,9 +100,7 @@
int position, boolean returnEqualedVariablesOnly, List<Var> vars, int start, int end) throws BadLocationException, StringIndexOutOfBoundsException {
List<String> completions = new ArrayList<String>();
- String prefix2 = getPrefix(document, position + prefix.length(), start, end);
-
- ELOperandResolveStatus status = resolveELOperand(file, parseOperand(prefix2), returnEqualedVariablesOnly, vars, new ElVarSearcher(file, this));
+ ELOperandResolveStatus status = resolveELOperand(file, parseOperand("" + prefix), returnEqualedVariablesOnly, vars, new ElVarSearcher(file, this));
if (status.isOK()) {
completions.addAll(status.getProposals());
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamELValidator.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamELValidator.java 2008-10-02 15:16:16 UTC (rev 10629)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamELValidator.java 2008-10-02 15:17:29 UTC (rev 10630)
@@ -264,7 +264,7 @@
for (SyntaxError error: errors) {
//TODO 1) make message more informative
// 2) create other preference
- addError(SYNTAX_ERROR_MESSAGE_ID, SeamPreferences.UNKNOWN_EL_VARIABLE_PROPERTY_NAME, new String[]{}, 1, offset + error.getPosition(), file);
+ addError(SYNTAX_ERROR_MESSAGE_ID, SeamPreferences.UNKNOWN_EL_VARIABLE_PROPERTY_NAME, new String[]{"" + error.getProblem()}, 1, offset + error.getPosition(), file);
}
}
@@ -335,21 +335,14 @@
ELInvocationExpression ts = status.getUnresolvedTokens();
varName = ts.getMemberName();
+ if(varName == null) {
+ //This is syntax error case. Reported by parser.
+ return;
+ }
offsetOfVarName = documnetOffset + ts.getInvocationStartPosition();
- lengthOfVarName = varName.length();
- unresolvedTokenIsVariable = true; //TODO
+ lengthOfVarName = varName == null ? 0 : varName.length();
+ unresolvedTokenIsVariable = true;
-// List<ELOperandToken> tokens = status.getUnresolvedTokens();
-//
-// for (ELOperandToken token : tokens) {
-// if((token.getType()==ELOperandToken.EL_VARIABLE_NAME_TOKEN) || (token.getType()==ELOperandToken.EL_PROPERTY_NAME_TOKEN) || (token.getType()==ELOperandToken.EL_METHOD_TOKEN)) {
-// varName = token.getText();
-// offsetOfVarName = documnetOffset + operandToken.getFirstToken().getStart() + token.getStart();
-// lengthOfVarName = varName.length();
-// unresolvedTokenIsVariable = (token.getType()==ELOperandToken.EL_VARIABLE_NAME_TOKEN);
-// break;
-// }
-// }
}
}
} catch (BadLocationException e) {
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/messages.properties
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/messages.properties 2008-10-02 15:16:16 UTC (rev 10629)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/messages.properties 2008-10-02 15:17:29 UTC (rev 10630)
@@ -44,7 +44,7 @@
UNKNOWN_EL_VARIABLE_NAME="{0}" cannot be resolved
UNKNOWN_EL_VARIABLE_PROPERTY_NAME="{0}" cannot be resolved
UNPAIRED_GETTER_OR_SETTER=Property "{0}" has only {1}. {2} is missing.
-SYNTAX_ERROR=EL syntax error.
+SYNTAX_ERROR=EL syntax error: {0}.
#Invalid seam project settings
INVALID_PARENT_PROJECT=Main Seam project "{0}" specified for Seam project "{1}" does not exist.
17 years, 3 months
JBoss Tools SVN: r10629 - in trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el: internal/core/parser and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-10-02 11:16:16 -0400 (Thu, 02 Oct 2008)
New Revision: 10629
Modified:
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/Tokenizer.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/ELParserImpl.java
Log:
JBIDE-1497.
Minor improvements
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/Tokenizer.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/Tokenizer.java 2008-10-02 14:18:35 UTC (rev 10628)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/Tokenizer.java 2008-10-02 15:16:16 UTC (rev 10629)
@@ -78,7 +78,7 @@
this.sourceString = sourceString;
errors.clear();
index = initialOffset;
- start = new LexicalToken(0, 0, "", -1000);
+ start = new LexicalToken(initialOffset, 0, "", -1000);
last = start;
state = BasicStates.STATE_EXPECTING_EL;
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/ELParserImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/ELParserImpl.java 2008-10-02 14:18:35 UTC (rev 10628)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/ELParserImpl.java 2008-10-02 15:16:16 UTC (rev 10629)
@@ -54,6 +54,7 @@
public ELModelImpl parse(LexicalToken start) {
model = new ELModelImpl();
+ model.setFirstToken(start);
current = start;
while(current != null) {
if(current.getType() == StartELTokenDescription.START_EL) {
17 years, 3 months
JBoss Tools SVN: r10628 - in trunk/documentation/jboss-tools-docs: index/en and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2008-10-02 10:18:35 -0400 (Thu, 02 Oct 2008)
New Revision: 10628
Modified:
trunk/documentation/jboss-tools-docs/all-guides.xml
trunk/documentation/jboss-tools-docs/index/en/master.xml
trunk/documentation/jboss-tools-docs/pom.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-388 birt guide is added to nightly doc build
Modified: trunk/documentation/jboss-tools-docs/all-guides.xml
===================================================================
--- trunk/documentation/jboss-tools-docs/all-guides.xml 2008-10-02 13:50:56 UTC (rev 10627)
+++ trunk/documentation/jboss-tools-docs/all-guides.xml 2008-10-02 14:18:35 UTC (rev 10628)
@@ -259,6 +259,20 @@
<fileMode>0644</fileMode>
<directoryMode>0755</directoryMode>
</fileSet>
+
+ <fileSet>
+ <directory>../../birt/docs/target/docbook/publish/en-US</directory>
+ <outputDirectory>/jboss_birt_plugin_ref_guide</outputDirectory>
+ <filtered>false</filtered>
+ <lineEnding>keep</lineEnding>
+ <includes>
+ <include>**/*.*</include>
+ </includes>
+ <useStrictFiltering>false</useStrictFiltering>
+ <useDefaultExcludes>true</useDefaultExcludes>
+ <fileMode>0644</fileMode>
+ <directoryMode>0755</directoryMode>
+ </fileSet>
</fileSets>
</assembly>
\ No newline at end of file
Modified: trunk/documentation/jboss-tools-docs/index/en/master.xml
===================================================================
--- trunk/documentation/jboss-tools-docs/index/en/master.xml 2008-10-02 13:50:56 UTC (rev 10627)
+++ trunk/documentation/jboss-tools-docs/index/en/master.xml 2008-10-02 14:18:35 UTC (rev 10628)
@@ -124,7 +124,19 @@
</primaryie>
</indexentry>
+
<indexentry>
+ <primaryie>JBoss Birt Plugin Reference Guide <ulink
+ url="en/jboss_birt_plugin_ref_guide/html/index.html">(html)</ulink>
+ <ulink url="en/jboss_birt_plugin_ref_guide/html_single/index.html">(html single)</ulink>
+ <ulink url="en/jboss_portal_tools_ref_guide/pdf/Birt_Reference_Guide.pdf"
+ >(pdf)</ulink>
+ </primaryie>
+ </indexentry>
+
+
+
+ <indexentry>
<primaryie>Exadel Studio Migration Guide <ulink
url="en/Exadel-migration/html/index.html">(html)</ulink>
<ulink url="en/Exadel-migration/html_single/index.html">(html single)</ulink>
Modified: trunk/documentation/jboss-tools-docs/pom.xml
===================================================================
--- trunk/documentation/jboss-tools-docs/pom.xml 2008-10-02 13:50:56 UTC (rev 10627)
+++ trunk/documentation/jboss-tools-docs/pom.xml 2008-10-02 14:18:35 UTC (rev 10628)
@@ -25,6 +25,7 @@
<module>../../esb/docs/esb_ref_guide</module>
<module>../../ws/docs/reference</module>
<module>../../portlet/docs/reference</module>
+ <module>../../birt/docs</module>
<module>index</module>
</modules>
17 years, 3 months
JBoss Tools SVN: r10627 - trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-10-02 09:50:56 -0400 (Thu, 02 Oct 2008)
New Revision: 10627
Modified:
trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/ELParserTest.java
Log:
JBIDE-1497.
Parser fixes.
Modified: trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/ELParserTest.java
===================================================================
--- trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/ELParserTest.java 2008-10-02 13:49:45 UTC (rev 10626)
+++ trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/ELParserTest.java 2008-10-02 13:50:56 UTC (rev 10627)
@@ -116,10 +116,10 @@
public void testElLiteralExpressions() {
Tokenizer t = TokenizerFactory.createJbossTokenizer();
checkCorrectEL(t,"#{\"#{\"}");
- checkCorrectEL(t,"#{’#’}");
checkCorrectEL(t,"\\#{exprA}");
checkCorrectEL(t,"#{\"\\\"exprA\\\"\"}");
checkCorrectEL(t,"#{\"\\\"#\\\"\"}");
+ checkCorrectEL(t,"#{’#’}"); //Why this is correct?
}
public void testElReferencesObjectProperties() {
@@ -156,7 +156,7 @@
//2. Incorrect use of ')'
checkIncorrectEL(t, "#{a.b + -c.d + g)}", 16);
//2. Incorrect use of ')' in second EL instance
- checkIncorrectEL(t, "#{a.b + -c.d + g}#{hh.vv..m()}", 16);
+ checkIncorrectEL(t, "#{a.b + -c.d + g}#{hh.vv..m()}", 25);
}
private void checkIncorrectEL(Tokenizer t, String test, int expectedErrorPosition) {
17 years, 3 months
JBoss Tools SVN: r10626 - in trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el: internal/core/parser and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-10-02 09:49:45 -0400 (Thu, 02 Oct 2008)
New Revision: 10626
Modified:
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/Tokenizer.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/TokenizerFactory.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/ELParserImpl.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/OperationTokenDescription.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/PrimitiveValueTokenDescription.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/UnaryTokenDescription.java
Log:
JBIDE-1497.
Parser fixes.
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/Tokenizer.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/Tokenizer.java 2008-10-02 13:33:55 UTC (rev 10625)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/Tokenizer.java 2008-10-02 13:49:45 UTC (rev 10626)
@@ -24,6 +24,7 @@
*
*/
public class Tokenizer {
+ static int LITERAL = -10;
private Map<Integer, ITokenDescription> tokenDescriptions = new HashMap<Integer, ITokenDescription>();
private Map<Integer, List<IRule>> rules = new HashMap<Integer, List<IRule>>();
@@ -127,6 +128,14 @@
public void addToken(int type, int start, int end) {
if(end < 0) return;
+ int lastEnd = last.getStart() + last.getLength();
+ if(start > lastEnd) {
+ int length = start - lastEnd;
+ LexicalToken t = new LexicalToken(lastEnd, length, getCharSequence(lastEnd, start), LITERAL);
+ last.setNextToken(t);
+ last = t;
+ index = start;
+ }
LexicalToken t = new LexicalToken(start, end - start, getCharSequence(start, end), type);
last.setNextToken(t);
last = t;
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/TokenizerFactory.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/TokenizerFactory.java 2008-10-02 13:33:55 UTC (rev 10625)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/TokenizerFactory.java 2008-10-02 13:49:45 UTC (rev 10626)
@@ -98,7 +98,7 @@
}
public static void main(String[] args) {
- String text = "#{a.b + 7d -c.d + g}#{hh.vv..m()}";
+ String text = "ioioio#{1.2e1}ioioio#{0}";
//"#{a[b()['l'].j]}";
//"#{g11.g12.y13} #{#{ #{a14.b15(x.t.u(uu.ii[9], j)).b16(m17(v18(i19[2]).u20).)+ a21(c.).b.}";
//"#{not a.b(x,y) + s.h((6 != -8) & (7 + -iy88.g[9].h(7 div 8).i.j)+(8) ? 4 : 7,'p', a.b.c.d[null])}";
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/ELParserImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/ELParserImpl.java 2008-10-02 13:33:55 UTC (rev 10625)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/ELParserImpl.java 2008-10-02 13:49:45 UTC (rev 10626)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.common.el.internal.core.parser;
+import org.jboss.tools.common.el.core.model.ELObjectType;
import org.jboss.tools.common.el.core.parser.LexicalToken;
import org.jboss.tools.common.el.internal.core.model.ELArgumentImpl;
import org.jboss.tools.common.el.internal.core.model.ELArgumentExpressionImpl;
@@ -80,6 +81,14 @@
instance.setFirstToken(current);
setNextToken();
ELExpressionImpl expression = readExpression();
+ if(expression == null) {
+ //create fake invocation expression
+ expression = new ELPropertyInvocationImpl();
+ int p = current != null ? current.getStart() : instance.getEndPosition();
+ LexicalToken t = new LexicalToken(p, 0, "", JavaNameTokenDescription.JAVA_NAME);
+ expression.setFirstToken(t);
+ expression.setLastToken(t);
+ }
if(expression != null) {
instance.setExpression(expression);
instance.setLastToken(expression.getLastToken());
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/OperationTokenDescription.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/OperationTokenDescription.java 2008-10-02 13:33:55 UTC (rev 10625)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/OperationTokenDescription.java 2008-10-02 13:49:45 UTC (rev 10626)
@@ -27,6 +27,7 @@
};
private static final String[] OPS_2 = {
"div", "and", "or", "not", "mod",
+ "eq", "ne", "lt", "ge", "le",
};
public static OperationTokenDescription INSTANCE = new OperationTokenDescription();
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/PrimitiveValueTokenDescription.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/PrimitiveValueTokenDescription.java 2008-10-02 13:33:55 UTC (rev 10625)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/PrimitiveValueTokenDescription.java 2008-10-02 13:49:45 UTC (rev 10626)
@@ -87,6 +87,7 @@
}
char ch = '\0';
boolean lastCharIsWrong = false;
+ boolean inE = false;
while((ch = tokenizer.readNextChar()) != '\0') {
if(ch == '.') {
dotCount--;
@@ -95,12 +96,31 @@
break;
}
} else if(!Character.isDigit(ch)) {
- if(TYPE_CHAR.indexOf(ch) >= 0) {
+ if(inE) {
+ //
+ } if(TYPE_CHAR.indexOf(ch) >= 0) {
char ch1 = tokenizer.lookUpChar(i + 1);
if(ch1 == '\0' || !Character.isJavaIdentifierPart(ch1)) {
i++;
break;
}
+ } else if(ch == 'e' || ch == 'E') {
+ char ch1 = tokenizer.lookUpChar(i + 1);
+ char ch2 = tokenizer.lookUpChar(i + 2);
+ if((ch1 == '+' || ch1 == '-') && Character.isDigit(ch2)) {
+ tokenizer.readNextChar();
+ tokenizer.readNextChar();
+ i += 3;
+ inE = true;
+ dotCount = 0;
+ continue;
+ } else if(Character.isDigit(ch1)) {
+ tokenizer.readNextChar();
+ i += 2;
+ inE = true;
+ dotCount = 0;
+ continue;
+ }
}
lastCharIsWrong = true;
break;
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/UnaryTokenDescription.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/UnaryTokenDescription.java 2008-10-02 13:33:55 UTC (rev 10625)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/UnaryTokenDescription.java 2008-10-02 13:49:45 UTC (rev 10626)
@@ -23,7 +23,7 @@
public static UnaryTokenDescription INSTANCE = new UnaryTokenDescription();
private static final String[] OPS_2 = {
- "not",
+ "not", "empty"
};
public UnaryTokenDescription() {
17 years, 3 months
JBoss Tools SVN: r10625 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2008-10-02 09:33:55 -0400 (Thu, 02 Oct 2008)
New Revision: 10625
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2FacetInstallDelegate.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2731
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2FacetInstallDelegate.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2FacetInstallDelegate.java 2008-10-02 13:27:48 UTC (rev 10624)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2FacetInstallDelegate.java 2008-10-02 13:33:55 UTC (rev 10625)
@@ -176,7 +176,7 @@
AntCopyUtils.copyFilesAndFolders(
seamGenResFolder,srcFolder,new AntCopyUtils.FileSetFileFilter(webInfClassesSet), viewFilterSetCollection, true);
- createComponentsProperties(srcFolder, isWarConfiguration(model)?"":project.getName()+"-ear", false); //$NON-NLS-1$ //$NON-NLS-2$
+ createComponentsProperties(srcFolder, "", false); //$NON-NLS-1$ //$NON-NLS-2$
/*AntCopyUtils.copyFileToFolder(
hibernateConsolePref,
17 years, 3 months
JBoss Tools SVN: r10624 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2008-10-02 09:27:48 -0400 (Thu, 02 Oct 2008)
New Revision: 10624
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2FacetInstallDelegate.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetAbstractInstallDelegate.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDelegate.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamProjectCreator.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2731
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2FacetInstallDelegate.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2FacetInstallDelegate.java 2008-10-02 13:12:44 UTC (rev 10623)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2FacetInstallDelegate.java 2008-10-02 13:27:48 UTC (rev 10624)
@@ -251,7 +251,6 @@
ClasspathHelper.addClasspathEntries(project, fv);
- // TODO
createSeamProjectPreferenes(project, model);
EclipseResourceUtil.addNatureToProject(project, ISeamProject.NATURE_ID);
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetAbstractInstallDelegate.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetAbstractInstallDelegate.java 2008-10-02 13:12:44 UTC (rev 10623)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetAbstractInstallDelegate.java 2008-10-02 13:27:48 UTC (rev 10624)
@@ -296,39 +296,24 @@
prefs.put(SESSION_BEAN_PACKAGE_NAME, model.getProperty(SESSION_BEAN_PACKAGE_NAME).toString());
prefs.put(ENTITY_BEAN_PACKAGE_NAME, model.getProperty(ENTITY_BEAN_PACKAGE_NAME).toString());
prefs.put(TEST_CASES_PACKAGE_NAME, model.getProperty(TEST_CASES_PACKAGE_NAME).toString());
- prefs.put(TEST_CREATING, "true");
+ prefs.put(TEST_CREATING, "false");
+ prefs.put(SEAM_TEST_PROJECT, project.getName());
- String testSrcPath = project.getFullPath().removeLastSegments(1).append(project.getName() + "-test").append("test-src").toString();
- prefs.put(TEST_SOURCE_FOLDER, testSrcPath);
-
- prefs.put(SEAM_TEST_PROJECT,
- model.getProperty(SEAM_TEST_PROJECT)==null?
- "":model.getProperty(SEAM_TEST_PROJECT).toString()); //$NON-NLS-1$
-
IVirtualComponent component = ComponentCore.createComponent(project);
IVirtualFolder rootFolder = component.getRootFolder();
IContainer webRootFolder = rootFolder.getFolder(new Path("/")).getUnderlyingFolder(); //$NON-NLS-1$
String webRootFolderPath = webRootFolder.getFullPath().toString();
prefs.put(WEB_CONTENTS_FOLDER, webRootFolderPath);
- if(DEPLOY_AS_EAR.equals(model.getProperty(JBOSS_AS_DEPLOY_AS))) {
- prefs.put(SEAM_EJB_PROJECT,
- model.getProperty(SEAM_EJB_PROJECT)==null?
- "":model.getProperty(SEAM_EJB_PROJECT).toString()); //$NON-NLS-1$
+ IPath srcRootFolder = rootFolder.getFolder(new Path("/WEB-INF/classes")).getUnderlyingFolder().getParent().getFullPath(); //$NON-NLS-1$
- prefs.put(SEAM_EAR_PROJECT,
- model.getProperty(SEAM_EAR_PROJECT)==null?
- "":model.getProperty(SEAM_EAR_PROJECT).toString()); //$NON-NLS-1$
-
- String srcPath = project.getFullPath().removeLastSegments(1).append(project.getName() + "-ejb").append("ejbModule").toString();
- prefs.put(ISeamFacetDataModelProperties.ENTITY_BEAN_SOURCE_FOLDER, srcPath);
- prefs.put(ISeamFacetDataModelProperties.SESSION_BEAN_SOURCE_FOLDER, srcPath);
- } else {
- IPath srcRootFolder = rootFolder.getFolder(new Path("/WEB-INF/classes")).getUnderlyingFolder().getParent().getFullPath(); //$NON-NLS-1$
-
- prefs.put(ISeamFacetDataModelProperties.ENTITY_BEAN_SOURCE_FOLDER, srcRootFolder.append("model").toString());
- prefs.put(ISeamFacetDataModelProperties.SESSION_BEAN_SOURCE_FOLDER, srcRootFolder.append("action").toString());
+ if(!isWarConfiguration(model)) {
+ prefs.put(SEAM_EJB_PROJECT, project.getName());
+ prefs.put(SEAM_EAR_PROJECT, project.getName());
}
+ prefs.put(ENTITY_BEAN_SOURCE_FOLDER, srcRootFolder.toString());
+ prefs.put(SESSION_BEAN_SOURCE_FOLDER, srcRootFolder.toString());
+ prefs.put(TEST_SOURCE_FOLDER, srcRootFolder.toString());
try {
prefs.flush();
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDelegate.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDelegate.java 2008-10-02 13:12:44 UTC (rev 10623)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDelegate.java 2008-10-02 13:27:48 UTC (rev 10624)
@@ -271,7 +271,6 @@
ClasspathHelper.addClasspathEntries(project, fv);
- // TODO
createSeamProjectPreferenes(project, model);
EclipseResourceUtil.addNatureToProject(project, ISeamProject.NATURE_ID);
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamProjectCreator.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamProjectCreator.java 2008-10-02 13:12:44 UTC (rev 10623)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamProjectCreator.java 2008-10-02 13:27:48 UTC (rev 10624)
@@ -19,10 +19,14 @@
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ProjectScope;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.core.runtime.preferences.IScopeContext;
import org.eclipse.jst.common.project.facet.core.ClasspathHelper;
import org.eclipse.wst.common.componentcore.ComponentCore;
import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
@@ -35,6 +39,7 @@
import org.jboss.tools.seam.core.SeamCorePlugin;
import org.jboss.tools.seam.core.project.facet.SeamRuntime;
import org.jboss.tools.seam.core.project.facet.SeamRuntimeManager;
+import org.osgi.service.prefs.BackingStoreException;
/**
* @author Alexey Kazakov
@@ -211,8 +216,6 @@
final String consoleName = SeamFacetAbstractInstallDelegate.isWarConfiguration(model) ? seamWebProject.getName() : ejbProjectName;
if(!SeamFacetAbstractInstallDelegate.isWarConfiguration(model)) {
- model.setProperty(ISeamFacetDataModelProperties.SEAM_EJB_PROJECT, ejbProjectName);
- model.setProperty(ISeamFacetDataModelProperties.SEAM_EAR_PROJECT, testProjectName);
createEjbProject();
createEarProject();
@@ -262,12 +265,16 @@
ResourcesUtils.importExistingProject(testProjectToBeImported, wsPath + "/" + testProjectName, testProjectName, monitor, true);
SeamFacetAbstractInstallDelegate.toggleHibernateOnProject(testProjectToBeImported, consoleName);
+
+ createSeamProjectPreferenes();
}
/**
* Creates test project for given seam web project.
*/
protected void createTestProject() {
+ model.setProperty(ISeamFacetDataModelProperties.SEAM_TEST_PROJECT, testProjectName);
+
File testProjectDir = new File(seamWebProject.getLocation().removeLastSegments(1).toFile(), testProjectName); //$NON-NLS-1$
testProjectDir.mkdir();
@@ -305,24 +312,24 @@
return;
}
AntCopyUtils.FileSet excludeCvsSvn
- = new AntCopyUtils.FileSet(SeamFacetAbstractInstallDelegate.CVS_SVN).dir(testTemplateDir);
+ = new AntCopyUtils.FileSet(SeamFacetAbstractInstallDelegate.CVS_SVN).dir(testTemplateDir);
AntCopyUtils.copyFilesAndFolders(
- testTemplateDir,
- testProjectDir,
- new AntCopyUtils.FileSetFileFilter(excludeCvsSvn),
- new FilterSetCollection(filterSet), true);
+ testTemplateDir,
+ testProjectDir,
+ new AntCopyUtils.FileSetFileFilter(excludeCvsSvn),
+ new FilterSetCollection(filterSet), true);
excludeCvsSvn.dir(new File(seamRuntime.getHomeDir(), "embedded-ejb/conf")); //$NON-NLS-1$
AntCopyUtils.copyFiles(
- new File(seamRuntime.getHomeDir(), "embedded-ejb/conf"), //$NON-NLS-1$
- embededEjbDir,
- new AntCopyUtils.FileSetFileFilter(excludeCvsSvn));
+ new File(seamRuntime.getHomeDir(), "embedded-ejb/conf"), //$NON-NLS-1$
+ embededEjbDir,
+ new AntCopyUtils.FileSetFileFilter(excludeCvsSvn));
AntCopyUtils.copyFiles(
- new File(seamRuntime.getHomeDir(), "lib"), //$NON-NLS-1$
- testLibDir,
- new AntCopyUtils.FileSetFileFilter(includeLibs));
+ new File(seamRuntime.getHomeDir(), "lib"), //$NON-NLS-1$
+ testLibDir,
+ new AntCopyUtils.FileSetFileFilter(includeLibs));
SeamFacetAbstractInstallDelegate.createComponentsProperties(testSrcDir, "", Boolean.TRUE); //$NON-NLS-1$
}
@@ -352,56 +359,60 @@
}
protected void createEjbProject() {
+ model.setProperty(ISeamFacetDataModelProperties.SEAM_EJB_PROJECT, ejbProjectName);
+
ejbProjectFolder.mkdir();
AntCopyUtils.copyFilesAndFolders(
- ejbTemplateDir,
- ejbProjectFolder, new AntCopyUtils.FileSetFileFilter(excludeCvsSvn),
- new FilterSetCollection(ejbFilterSet), true);
+ ejbTemplateDir,
+ ejbProjectFolder, new AntCopyUtils.FileSetFileFilter(excludeCvsSvn),
+ new FilterSetCollection(ejbFilterSet), true);
// *******************************************************************************************
// Copy sources to EJB project in case of EAR configuration
// *******************************************************************************************
AntCopyUtils.copyFileToFile(
- new File(seamGenHomeFolder, "src/Authenticator.java"), //$NON-NLS-1$
- new File(ejbProjectFolder, "ejbModule/" + model.getProperty(ISeamFacetDataModelProperties.SESSION_BEAN_PACKAGE_NAME).toString().replace('.', '/') + "/" + "Authenticator.java"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- new FilterSetCollection(filtersFilterSet), true);
+ new File(seamGenHomeFolder, "src/Authenticator.java"), //$NON-NLS-1$
+ new File(ejbProjectFolder, "ejbModule/" + model.getProperty(ISeamFacetDataModelProperties.SESSION_BEAN_PACKAGE_NAME).toString().replace('.', '/') + "/" + "Authenticator.java"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ new FilterSetCollection(filtersFilterSet), true);
AntCopyUtils.copyFileToFile(
- persistenceFile,
- new File(ejbProjectFolder, "ejbModule/META-INF/persistence.xml"), //$NON-NLS-1$
- viewFilterSetCollection, true);
+ persistenceFile,
+ new File(ejbProjectFolder, "ejbModule/META-INF/persistence.xml"), //$NON-NLS-1$
+ viewFilterSetCollection, true);
SeamFacetAbstractInstallDelegate.createComponentsProperties(new File(ejbProjectFolder, "ejbModule"), earProjectName, false); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
AntCopyUtils.FileSet ejbSrcResourcesSet = new AntCopyUtils.FileSet(JBOOS_EJB_WEB_INF_CLASSES_SET).dir(seamGenResFolder);
AntCopyUtils.copyFilesAndFolders(
- seamGenResFolder, new File(ejbProjectFolder, "ejbModule"), new AntCopyUtils.FileSetFileFilter(ejbSrcResourcesSet), viewFilterSetCollection, true); //$NON-NLS-1$
+ seamGenResFolder, new File(ejbProjectFolder, "ejbModule"), new AntCopyUtils.FileSetFileFilter(ejbSrcResourcesSet), viewFilterSetCollection, true); //$NON-NLS-1$
AntCopyUtils.copyFileToFolder(
- new File(seamGenResFolder, "META-INF/ejb-jar.xml"), //$NON-NLS-1$
- new File(ejbProjectFolder, "ejbModule/META-INF/"), //$NON-NLS-1$
- viewFilterSetCollection, true);
+ new File(seamGenResFolder, "META-INF/ejb-jar.xml"), //$NON-NLS-1$
+ new File(ejbProjectFolder, "ejbModule/META-INF/"), //$NON-NLS-1$
+ viewFilterSetCollection, true);
/*AntCopyUtils.copyFileToFolder(
- hibernateConsolePref,
- new File(ejbProjectFolder,".settings"), //$NON-NLS-1$
- new FilterSetCollection(projectFilterSet), true);*/
+ hibernateConsolePref,
+ new File(ejbProjectFolder,".settings"), //$NON-NLS-1$
+ new FilterSetCollection(projectFilterSet), true);*/
FilterSet ejbFilterSet = new FilterSet();
ejbFilterSet.addFilter("projectName", ejbProjectFolder.getName()); //$NON-NLS-1$
AntCopyUtils.copyFileToFile(
- hibernateConsoleLaunchFile,
- new File(ejbProjectFolder, ejbProjectFolder.getName() + ".launch"), //$NON-NLS-1$
- new FilterSetCollection(ejbFilterSet), true);
+ hibernateConsoleLaunchFile,
+ new File(ejbProjectFolder, ejbProjectFolder.getName() + ".launch"), //$NON-NLS-1$
+ new FilterSetCollection(ejbFilterSet), true);
AntCopyUtils.copyFileToFolder(
- hibernateConsolePropsFile,
- ejbProjectFolder,
- hibernateDialectFilterSet, true);
+ hibernateConsolePropsFile,
+ ejbProjectFolder,
+ hibernateDialectFilterSet, true);
}
protected void createEarProject() {
+ model.setProperty(ISeamFacetDataModelProperties.SEAM_EAR_PROJECT, earProjectName);
+
earProjectFolder.mkdir();
File earContentsFolder = new File(earProjectFolder, "EarContent"); //$NON-NLS-1$
@@ -410,16 +421,16 @@
earFilterSet.addFilter("projectName", earProjectFolder.getName() + ".ear"); //$NON-NLS-1$ //$NON-NLS-2$
AntCopyUtils.copyFileToFolder(
- new File(seamGenResFolder, "META-INF/jboss-app.xml"), //$NON-NLS-1$
- new File(earContentsFolder, "META-INF"), //$NON-NLS-1$
- new FilterSetCollection(earFilterSet), true);
+ new File(seamGenResFolder, "META-INF/jboss-app.xml"), //$NON-NLS-1$
+ new File(earContentsFolder, "META-INF"), //$NON-NLS-1$
+ new FilterSetCollection(earFilterSet), true);
// Copy configuration files from template
try {
AntCopyUtils.copyFilesAndFolders(
- new File(SeamFacetInstallDataModelProvider.getTemplatesFolder(), "ear"), //$NON-NLS-1$
- earProjectFolder, new AntCopyUtils.FileSetFileFilter(excludeCvsSvn),
- new FilterSetCollection(ejbFilterSet), true);
+ new File(SeamFacetInstallDataModelProvider.getTemplatesFolder(), "ear"), //$NON-NLS-1$
+ earProjectFolder, new AntCopyUtils.FileSetFileFilter(excludeCvsSvn),
+ new FilterSetCollection(ejbFilterSet), true);
} catch (IOException e) {
SeamCorePlugin.getPluginLog().logError(e);
}
@@ -433,8 +444,40 @@
File resources = new File(earProjectFolder, "resources");
AntCopyUtils.copyFileToFile(
- dataSourceDsFile,
- new File(resources, seamWebProject.getName() + "-ds.xml"), //$NON-NLS-1$ //$NON-NLS-2$
- viewFilterSetCollection, true);
+ dataSourceDsFile,
+ new File(resources, seamWebProject.getName() + "-ds.xml"), //$NON-NLS-1$ //$NON-NLS-2$
+ viewFilterSetCollection, true);
}
+
+ protected void createSeamProjectPreferenes() {
+ IScopeContext projectScope = new ProjectScope(seamWebProject);
+ IEclipsePreferences prefs = projectScope.getNode(SeamCorePlugin.PLUGIN_ID);
+
+ String testSrcPath = seamWebProject.getFullPath().removeLastSegments(1).append(testProjectName).append("test-src").toString();
+ prefs.put(ISeamFacetDataModelProperties.TEST_CREATING, "true");
+ prefs.put(ISeamFacetDataModelProperties.SEAM_TEST_PROJECT, testProjectName);
+ prefs.put(ISeamFacetDataModelProperties.TEST_SOURCE_FOLDER, testSrcPath);
+
+ if(!SeamFacetAbstractInstallDelegate.isWarConfiguration(model)) {
+ prefs.put(ISeamFacetDataModelProperties.SEAM_EJB_PROJECT, ejbProjectName);
+ prefs.put(SeamFacetAbstractInstallDelegate.SEAM_EAR_PROJECT, earProjectName);
+
+ String srcPath = seamWebProject.getFullPath().removeLastSegments(1).append(ejbProjectName).append("ejbModule").toString();
+ prefs.put(ISeamFacetDataModelProperties.ENTITY_BEAN_SOURCE_FOLDER, srcPath);
+ prefs.put(ISeamFacetDataModelProperties.SESSION_BEAN_SOURCE_FOLDER, srcPath);
+ } else {
+ IVirtualComponent component = ComponentCore.createComponent(seamWebProject);
+ IVirtualFolder rootFolder = component.getRootFolder();
+ IPath srcRootFolder = rootFolder.getFolder(new Path("/WEB-INF/classes")).getUnderlyingFolder().getParent().getFullPath(); //$NON-NLS-1$
+
+ prefs.put(ISeamFacetDataModelProperties.ENTITY_BEAN_SOURCE_FOLDER, srcRootFolder.append("model").toString());
+ prefs.put(ISeamFacetDataModelProperties.SESSION_BEAN_SOURCE_FOLDER, srcRootFolder.append("action").toString());
+ }
+
+ try {
+ prefs.flush();
+ } catch (BackingStoreException e) {
+ SeamCorePlugin.getPluginLog().logError(e);
+ }
+ }
}
\ No newline at end of file
17 years, 3 months
JBoss Tools SVN: r10623 - trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2008-10-02 09:12:44 -0400 (Thu, 02 Oct 2008)
New Revision: 10623
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/.project
Log:
Test of my credentials. Nothing changed (a space added).
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/.project
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/.project 2008-10-02 12:45:10 UTC (rev 10622)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/.project 2008-10-02 13:12:44 UTC (rev 10623)
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>jsfTest</name>
<comment></comment>
17 years, 3 months
JBoss Tools SVN: r10622 - trunk/birt/docs/en/modules.
by jbosstools-commits@lists.jboss.org
Author: abogachuk
Date: 2008-10-02 08:45:10 -0400 (Thu, 02 Oct 2008)
New Revision: 10622
Modified:
trunk/birt/docs/en/modules/birt_support.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-388 - Data source: screenshots added
Modified: trunk/birt/docs/en/modules/birt_support.xml
===================================================================
--- trunk/birt/docs/en/modules/birt_support.xml 2008-10-02 10:06:26 UTC (rev 10621)
+++ trunk/birt/docs/en/modules/birt_support.xml 2008-10-02 12:45:10 UTC (rev 10622)
@@ -53,7 +53,7 @@
<title>Creating a BIRT Report</title>
<para>In this chapter we suggest a step-by-step walk-through of creating your own BIRT report.</para>
- <para>We will show you how to use the Creation wizard for creating a new BIRT report.</para>
+ <section><title>Create a Report Project</title>
<para>First create a Report project. Select <emphasis><property>File > New > Project...</property>
</emphasis> in the main menu bar or context menu. The new project dialog appears. Choose <emphasis><property>Business Intelligence and Reporting Tools > Report Project</property></emphasis>:
@@ -89,7 +89,9 @@
</imageobject>
</mediaobject>
</figure>
-
+ </section>
+
+ <section> <title>Create a Report</title>
<para>Now you can create a Report. Go to <emphasis><property>File > New > Report...</property></emphasis>:</para>
<figure>
@@ -135,8 +137,59 @@
</mediaobject>
</figure>
-
+ </section>
+ <section>
+ <title>Build a Data Source</title>
+
+ <para>Data source is used to connect to the database. In order to create a data source for your report follow these steps:</para>
+ <para>Open the Data Explorer View. Select Data Sources, right-click on it and choose New Data Source:</para>
+
+
+ <figure>
+ <title>Create a Data Source</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/BirtSupport/08DataSource.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The New Data Source dialog appears. Choose the "Create from a data source type in the following list" radiobutton and then "Classic Models Inc. Sample Database". Click on the <emphasis><property>Next</property></emphasis> button:</para>
+
+
+ <figure>
+ <title>New Data Source</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/BirtSupport/09NewDataSource.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The newly created data source details wll be displayed: Driver Class, Database URL and Database User:</para>
+
+ <figure>
+ <title>New Data Source Details</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/BirtSupport/10NewSampleDateSource.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Click on the <emphasis><property>Finish</property></emphasis> button to add the data source to the data source for your report.</para>
+
+ <para>If you need to edit the data source right-click on it and select the corresponding option.</para>
+ </section>
+
+
+ <section><title>Builde a Data Set</title>
+
+ text here
+
+
+ </section>
+
</section>
</chapter>
17 years, 3 months
JBoss Tools SVN: r10621 - in trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el: internal/core/model and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-10-02 06:06:26 -0400 (Thu, 02 Oct 2008)
New Revision: 10621
Removed:
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/rule/ArgRule.java
Modified:
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/IRule.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/SyntaxError.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/Tokenizer.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/TokenizerFactory.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELArgumentExpressionImpl.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELInvocationExpressionImpl.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/ELParserImpl.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/rule/CallRule.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/rule/ErrorRecoveryRule.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/rule/ExpressionRule.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/rule/OperationRule.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/ArgEndTokenDescription.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/ArgStartTokenDescription.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/ParamUtil.java
Log:
JBIDE-1497.
Parser improved
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/IRule.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/IRule.java 2008-10-02 09:32:15 UTC (rev 10620)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/IRule.java 2008-10-02 10:06:26 UTC (rev 10621)
@@ -23,4 +23,6 @@
public int getFinalState(int state, int token);
+ public String getProblem(int state, Tokenizer tokenizer);
+
}
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/SyntaxError.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/SyntaxError.java 2008-10-02 09:32:15 UTC (rev 10620)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/SyntaxError.java 2008-10-02 10:06:26 UTC (rev 10621)
@@ -18,6 +18,7 @@
public class SyntaxError {
int position;
int state;
+ String problem;
public SyntaxError(int position, int state) {
this.position = position;
@@ -32,4 +33,12 @@
return position;
}
+ public String getProblem() {
+ return problem;
+ }
+
+ void setProblem(String problem) {
+ this.problem = problem;
+ }
+
}
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/Tokenizer.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/Tokenizer.java 2008-10-02 09:32:15 UTC (rev 10620)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/Tokenizer.java 2008-10-02 10:06:26 UTC (rev 10621)
@@ -102,7 +102,14 @@
char ch = readNextChar();
if(ch == '\0') break;
} else {
- errors.add(new SyntaxError(index, state));
+ SyntaxError error = new SyntaxError(index, state);
+ String problem = null;
+ for (IRule rule : rs) {
+ problem = rule.getProblem(state, this);
+ if(problem != null) break;
+ }
+ error.setProblem(problem);
+ errors.add(error);
state = BasicStates.STATE_ERROR;
}
}
@@ -175,4 +182,8 @@
public int getState() {
return state;
}
+
+ public int getCurrentIndex() {
+ return index;
+ }
}
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/TokenizerFactory.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/TokenizerFactory.java 2008-10-02 09:32:15 UTC (rev 10620)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/TokenizerFactory.java 2008-10-02 10:06:26 UTC (rev 10621)
@@ -13,11 +13,9 @@
import java.util.List;
import org.jboss.tools.common.el.core.model.ELExpression;
-import org.jboss.tools.common.el.core.model.ELInstance;
import org.jboss.tools.common.el.core.model.ELInvocationExpression;
import org.jboss.tools.common.el.core.model.ELModel;
import org.jboss.tools.common.el.core.model.ELUtil;
-import org.jboss.tools.common.el.internal.core.parser.rule.ArgRule;
import org.jboss.tools.common.el.internal.core.parser.rule.CallRule;
import org.jboss.tools.common.el.internal.core.parser.rule.ErrorRecoveryRule;
import org.jboss.tools.common.el.internal.core.parser.rule.ExpressionRule;
@@ -63,7 +61,6 @@
});
t.setRules(new IRule[]{
ExpressionRule.INSTANCE,
- ArgRule.INSTANCE,
CallRule.INSTANCE,
OperationRule.INSTANCE,
ErrorRecoveryRule.INSTANCE,
@@ -93,7 +90,6 @@
});
t.setRules(new IRule[]{
ExpressionRule.INSTANCE,
- ArgRule.INSTANCE,
CallRule.INSTANCE,
OperationRule.INSTANCE,
ErrorRecoveryRule.INSTANCE,
@@ -102,7 +98,8 @@
}
public static void main(String[] args) {
- String text = "#{.8 +(.9d / - (-.8))}";
+ String text = "#{a.b + 7d -c.d + g}#{hh.vv..m()}";
+//"#{a[b()['l'].j]}";
//"#{g11.g12.y13} #{#{ #{a14.b15(x.t.u(uu.ii[9], j)).b16(m17(v18(i19[2]).u20).)+ a21(c.).b.}";
//"#{not a.b(x,y) + s.h((6 != -8) & (7 + -iy88.g[9].h(7 div 8).i.j)+(8) ? 4 : 7,'p', a.b.c.d[null])}";
//"q82#{a( g.h(7 + 8) + 8, g['h'].j(),'p')}k#{b}";
@@ -117,7 +114,7 @@
}
List<SyntaxError> errors = t.getErrors();
for (SyntaxError e: errors) {
- System.out.println("state=" + e.getState() + " position=" + e.getPosition());
+ System.out.println("state=" + e.getState() + " position=" + e.getPosition() + " problem=" + e.getProblem());
}
ELParser parser = ELParserUtil.getJbossFactory().createParser();
ELModel model = parser.parse(text, 0, 90);
@@ -131,7 +128,7 @@
System.out.println(i);
}
- int off = 2;
+ int off = 8;
ELExpression expr1 = ELUtil.findExpression(model, off);
System.out.println("Expression at " + off + ": " + expr1);
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELArgumentExpressionImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELArgumentExpressionImpl.java 2008-10-02 09:32:15 UTC (rev 10620)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELArgumentExpressionImpl.java 2008-10-02 10:06:26 UTC (rev 10621)
@@ -10,7 +10,11 @@
******************************************************************************/
package org.jboss.tools.common.el.internal.core.model;
+import java.util.List;
+
import org.jboss.tools.common.el.core.model.ELArgumentInvocation;
+import org.jboss.tools.common.el.core.model.ELExpression;
+import org.jboss.tools.common.el.core.model.ELInvocationExpression;
import org.jboss.tools.common.el.core.model.ELObjectType;
/**
@@ -54,4 +58,11 @@
return argument.getArgument().getText();
}
+ public void collectInvocationsInArgument(List<ELInvocationExpression> list) {
+ if(argument != null) {
+ if(argument.getArgument() != null) {
+ argument.getArgument().collectInvocations(list);
+ }
+ }
+ }
}
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELInvocationExpressionImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELInvocationExpressionImpl.java 2008-10-02 09:32:15 UTC (rev 10620)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELInvocationExpressionImpl.java 2008-10-02 10:06:26 UTC (rev 10621)
@@ -56,6 +56,8 @@
while(l != null) {
if(l instanceof ELMethodInvocationImpl) {
((ELMethodInvocationImpl)l).collectInvocationsInParameters(list);
+ } else if(l instanceof ELArgumentExpressionImpl) {
+ ((ELArgumentExpressionImpl)l).collectInvocationsInArgument(list);
}
l = l.getLeft();
}
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/ELParserImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/ELParserImpl.java 2008-10-02 09:32:15 UTC (rev 10620)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/ELParserImpl.java 2008-10-02 10:06:26 UTC (rev 10621)
@@ -179,6 +179,13 @@
ELInvocationExpressionImpl result = name;
setNextToken();
if(current != null) switch (current.getType()) {
+ case ParamStartTokenDescription.PARAM_START:
+ ELParametersImpl params = readParameters();
+ ELMethodInvocationImpl method = new ELMethodInvocationImpl();
+ method.setName(name.getName());
+ method.setParameters(params);
+ result = method;
+ //do not break we are ready to have [] suffix here
case ArgStartTokenDescription.ARG_START:
while(current != null && current.getType() == ArgStartTokenDescription.ARG_START) {
ELArgumentImpl arg = readArgument();
@@ -188,12 +195,6 @@
result = call;
}
break;
- case ParamStartTokenDescription.PARAM_START:
- ELParametersImpl params = readParameters();
- ELMethodInvocationImpl method = new ELMethodInvocationImpl();
- method.setName(name.getName());
- method.setParameters(params);
- result = method;
}
if(current != null && current.getType() == DotTokenDescription.DOT) {
LexicalToken dot = current;
Deleted: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/rule/ArgRule.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/rule/ArgRule.java 2008-10-02 09:32:15 UTC (rev 10620)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/rule/ArgRule.java 2008-10-02 10:06:26 UTC (rev 10621)
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.common.el.internal.core.parser.rule;
-
-import org.jboss.tools.common.el.core.parser.IRule;
-import org.jboss.tools.common.el.internal.core.parser.token.ArgEndTokenDescription;
-import org.jboss.tools.common.el.internal.core.parser.token.PrimitiveValueTokenDescription;
-import org.jboss.tools.common.el.internal.core.parser.token.StringTokenDescription;
-import org.jboss.tools.common.el.internal.core.parser.token.WhiteSpaceTokenDescription;
-
-/**
- *
- * @author V. Kabanovich
- *
- */
-public class ArgRule implements IRule, BasicStates {
-
- public static ArgRule INSTANCE = new ArgRule();
-
- public int[] getStartStates() {
- return new int[] {
- STATE_EXPECTING_ARG,
- STATE_EXPECTING_ARG_CLOSE,
- };
- }
-
- public int getFinalState(int state, int token) {
- switch (token) {
- case WhiteSpaceTokenDescription.WHITESPACE:
- return state;
- case PrimitiveValueTokenDescription.PRIMITIVE_VALUE:
- case StringTokenDescription.STRING:
- return STATE_EXPECTING_ARG_CLOSE;
- case ArgEndTokenDescription.ARG_END:
- return STATE_EXPECTING_CALL_AFTER_METHOD;
- }
-
- return 0;
- }
-
- public int[] getTokenTypes(int state) {
- switch(state) {
- case STATE_EXPECTING_ARG:
- return new int[] {
- WhiteSpaceTokenDescription.WHITESPACE,
- PrimitiveValueTokenDescription.PRIMITIVE_VALUE,
- StringTokenDescription.STRING,
- };
- case STATE_EXPECTING_ARG_CLOSE:
- return new int[] {
- WhiteSpaceTokenDescription.WHITESPACE,
- ArgEndTokenDescription.ARG_END,
- };
- }
- return new int[0];
- }
-
-}
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/rule/CallRule.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/rule/CallRule.java 2008-10-02 09:32:15 UTC (rev 10620)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/rule/CallRule.java 2008-10-02 10:06:26 UTC (rev 10621)
@@ -11,6 +11,8 @@
package org.jboss.tools.common.el.internal.core.parser.rule;
import org.jboss.tools.common.el.core.parser.IRule;
+import org.jboss.tools.common.el.core.parser.Tokenizer;
+import org.jboss.tools.common.el.internal.core.parser.token.ArgEndTokenDescription;
import org.jboss.tools.common.el.internal.core.parser.token.ArgStartTokenDescription;
import org.jboss.tools.common.el.internal.core.parser.token.CommaTokenDescription;
import org.jboss.tools.common.el.internal.core.parser.token.DotTokenDescription;
@@ -19,6 +21,7 @@
import org.jboss.tools.common.el.internal.core.parser.token.OperationTokenDescription;
import org.jboss.tools.common.el.internal.core.parser.token.ParamEndTokenDescription;
import org.jboss.tools.common.el.internal.core.parser.token.ParamStartTokenDescription;
+import org.jboss.tools.common.el.internal.core.parser.token.ParamUtil;
import org.jboss.tools.common.el.internal.core.parser.token.WhiteSpaceTokenDescription;
/**
@@ -49,6 +52,7 @@
case OperationTokenDescription.OPERATION:
return STATE_EXPECTING_OPERAND;
case ParamEndTokenDescription.PARAM_END:
+ case ArgEndTokenDescription.ARG_END:
return STATE_EXPECTING_CALL_AFTER_METHOD;
case ParamStartTokenDescription.PARAM_START:
return STATE_EXPECTING_PARAM;
@@ -71,6 +75,7 @@
CommaTokenDescription.COMMA,
OperationTokenDescription.OPERATION,
ParamEndTokenDescription.PARAM_END,
+ ArgEndTokenDescription.ARG_END,
ExprEndTokenDescription.EXPR_END,
ParamStartTokenDescription.PARAM_START,
ArgStartTokenDescription.ARG_START,
@@ -83,10 +88,28 @@
CommaTokenDescription.COMMA,
OperationTokenDescription.OPERATION,
ParamEndTokenDescription.PARAM_END,
+ ArgEndTokenDescription.ARG_END,
ExprEndTokenDescription.EXPR_END,
+ ArgStartTokenDescription.ARG_START,
};
}
return new int[0];
}
+ public String getProblem(int state, Tokenizer tokenizer) {
+ if(ParamUtil.isMethodParamContext(tokenizer.getContext())) {
+ return "Expecting ',' or ')'";
+ } else if(ParamUtil.isComplexExpressionContext(tokenizer.getContext())) {
+ return "Expecting ')'";
+ } else if(ParamUtil.isArgContext(tokenizer.getContext())) {
+ return "Expecting ']'";
+ }
+ if(state == STATE_EXPECTING_CALL_AFTER_METHOD) {
+ if(ParamStartTokenDescription.INSTANCE.isStart(tokenizer, tokenizer.getCurrentIndex())) {
+ return "Unexpected symbol '('";
+ }
+ }
+ return "Expecting '}'";
+ }
+
}
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/rule/ErrorRecoveryRule.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/rule/ErrorRecoveryRule.java 2008-10-02 09:32:15 UTC (rev 10620)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/rule/ErrorRecoveryRule.java 2008-10-02 10:06:26 UTC (rev 10621)
@@ -11,6 +11,7 @@
package org.jboss.tools.common.el.internal.core.parser.rule;
import org.jboss.tools.common.el.core.parser.IRule;
+import org.jboss.tools.common.el.core.parser.Tokenizer;
import org.jboss.tools.common.el.internal.core.parser.token.ArgEndTokenDescription;
import org.jboss.tools.common.el.internal.core.parser.token.EndELTokenDescription;
import org.jboss.tools.common.el.internal.core.parser.token.ExprEndTokenDescription;
@@ -33,7 +34,6 @@
case StartELTokenDescription.START_EL:
return BasicStates.STATE_EXPECTING_EXPRESSION;
case ArgEndTokenDescription.ARG_END:
- return BasicStates.STATE_EXPECTING_CALL_AFTER_METHOD;
case ParamEndTokenDescription.PARAM_END:
return BasicStates.STATE_EXPECTING_CALL_AFTER_METHOD;
case ExprEndTokenDescription.EXPR_END:
@@ -56,4 +56,9 @@
};
}
+ public String getProblem(int state, Tokenizer tokenizer) {
+ // Other rules already reported a problem.
+ return null;
+ }
+
}
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/rule/ExpressionRule.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/rule/ExpressionRule.java 2008-10-02 09:32:15 UTC (rev 10620)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/rule/ExpressionRule.java 2008-10-02 10:06:26 UTC (rev 10621)
@@ -11,6 +11,8 @@
package org.jboss.tools.common.el.internal.core.parser.rule;
import org.jboss.tools.common.el.core.parser.IRule;
+import org.jboss.tools.common.el.core.parser.Tokenizer;
+import org.jboss.tools.common.el.internal.core.parser.token.ArgEndTokenDescription;
import org.jboss.tools.common.el.internal.core.parser.token.EndELTokenDescription;
import org.jboss.tools.common.el.internal.core.parser.token.ExprStartTokenDescription;
import org.jboss.tools.common.el.internal.core.parser.token.JavaNameTokenDescription;
@@ -37,6 +39,7 @@
STATE_EXPECTING_EXPRESSION,
STATE_EXPECTING_NAME,
STATE_EXPECTING_PARAM,
+ STATE_EXPECTING_ARG,
STATE_EXPECTING_OPERAND
};
}
@@ -56,6 +59,7 @@
case PrimitiveValueTokenDescription.PRIMITIVE_VALUE:
return STATE_EXPECTING_OPERATION;
case ParamEndTokenDescription.PARAM_END:
+ case ArgEndTokenDescription.ARG_END:
return STATE_EXPECTING_CALL_AFTER_METHOD;
case ExprStartTokenDescription.EXPR_START:
case UnaryTokenDescription.UNARY:
@@ -97,6 +101,15 @@
ExprStartTokenDescription.EXPR_START,
ParamEndTokenDescription.PARAM_END
};
+ case STATE_EXPECTING_ARG:
+ return new int[] {
+ WhiteSpaceTokenDescription.WHITESPACE,
+ UnaryTokenDescription.UNARY,
+ PrimitiveValueTokenDescription.PRIMITIVE_VALUE,
+ JavaNameTokenDescription.JAVA_NAME,
+ StringTokenDescription.STRING,
+ ExprStartTokenDescription.EXPR_START
+ };
case STATE_EXPECTING_OPERAND:
return new int[] {
WhiteSpaceTokenDescription.WHITESPACE,
@@ -111,4 +124,12 @@
return new int[0];
}
+ public String getProblem(int state, Tokenizer tokenizer) {
+ if(state == STATE_EXPECTING_NAME) {
+ return "Expecting Java method or property name";
+ } else {
+ return "Expecting expression";
+ }
+ }
+
}
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/rule/OperationRule.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/rule/OperationRule.java 2008-10-02 09:32:15 UTC (rev 10620)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/rule/OperationRule.java 2008-10-02 10:06:26 UTC (rev 10621)
@@ -11,11 +11,14 @@
package org.jboss.tools.common.el.internal.core.parser.rule;
import org.jboss.tools.common.el.core.parser.IRule;
+import org.jboss.tools.common.el.core.parser.Tokenizer;
+import org.jboss.tools.common.el.internal.core.parser.token.ArgEndTokenDescription;
import org.jboss.tools.common.el.internal.core.parser.token.CommaTokenDescription;
import org.jboss.tools.common.el.internal.core.parser.token.EndELTokenDescription;
import org.jboss.tools.common.el.internal.core.parser.token.ExprEndTokenDescription;
import org.jboss.tools.common.el.internal.core.parser.token.OperationTokenDescription;
import org.jboss.tools.common.el.internal.core.parser.token.ParamEndTokenDescription;
+import org.jboss.tools.common.el.internal.core.parser.token.ParamUtil;
import org.jboss.tools.common.el.internal.core.parser.token.WhiteSpaceTokenDescription;
/**
@@ -43,6 +46,7 @@
case OperationTokenDescription.OPERATION:
return STATE_EXPECTING_OPERAND;
case ParamEndTokenDescription.PARAM_END:
+ case ArgEndTokenDescription.ARG_END:
return STATE_EXPECTING_CALL_AFTER_METHOD;
case ExprEndTokenDescription.EXPR_END:
return STATE_EXPECTING_OPERATION;
@@ -56,6 +60,7 @@
return new int[] {
WhiteSpaceTokenDescription.WHITESPACE,
ParamEndTokenDescription.PARAM_END,
+ ArgEndTokenDescription.ARG_END,
ExprEndTokenDescription.EXPR_END,
CommaTokenDescription.COMMA,
OperationTokenDescription.OPERATION,
@@ -65,4 +70,15 @@
return new int[0];
}
+ public String getProblem(int state, Tokenizer tokenizer) {
+ if(ParamUtil.isMethodParamContext(tokenizer.getContext())) {
+ return "Expecting ')'";
+ } else if(ParamUtil.isComplexExpressionContext(tokenizer.getContext())) {
+ return "Expecting ')'";
+ } else if(ParamUtil.isArgContext(tokenizer.getContext())) {
+ return "Expecting ']'";
+ }
+ return "Expecting '}'";
+ }
+
}
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/ArgEndTokenDescription.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/ArgEndTokenDescription.java 2008-10-02 09:32:15 UTC (rev 10620)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/ArgEndTokenDescription.java 2008-10-02 10:06:26 UTC (rev 10621)
@@ -38,19 +38,15 @@
}
public boolean isStart(Tokenizer tokenizer, int offset) {
- return isInArg(tokenizer) && super.isStart(tokenizer, offset);
+ return ParamUtil.isArgContext(tokenizer.getContext()) && super.isStart(tokenizer, offset);
}
public boolean read(Tokenizer tokenizer, int offset) {
boolean b = super.read(tokenizer, offset);
if(b) {
- tokenizer.getContext().remove("arg");
+ ParamUtil.closeCurrentParamContext(tokenizer.getContext());
}
return b;
}
- private boolean isInArg(Tokenizer tokenizer) {
- return tokenizer.getContext().get("arg") != null;
- }
-
}
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/ArgStartTokenDescription.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/ArgStartTokenDescription.java 2008-10-02 09:32:15 UTC (rev 10620)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/ArgStartTokenDescription.java 2008-10-02 10:06:26 UTC (rev 10621)
@@ -30,7 +30,7 @@
public boolean read(Tokenizer tokenizer, int offset) {
boolean b = super.read(tokenizer, offset);
if(b) {
- tokenizer.getContext().put("arg", OPEN);
+ ParamUtil.openArgContext(tokenizer.getContext());
}
return b;
}
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/ParamUtil.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/ParamUtil.java 2008-10-02 09:32:15 UTC (rev 10620)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/ParamUtil.java 2008-10-02 10:06:26 UTC (rev 10621)
@@ -43,6 +43,11 @@
return i != null && i.size() > 0 && "params".equals(i.get(i.size() - 1));
}
+ public static boolean isArgContext(Properties context) {
+ ParamHistory i = (ParamHistory)(context.get(PARAM_HISTORY));
+ return i != null && i.size() > 0 && "arg".equals(i.get(i.size() - 1));
+ }
+
public static boolean isComplexExpressionContext(Properties context) {
ParamHistory i = (ParamHistory)(context.get("(_level"));
return i != null && i.size() > 0 && "expr".equals(i.get(i.size() - 1));
@@ -65,4 +70,10 @@
i.add("expr");
}
+ public static void openArgContext(Properties context) {
+ ParamHistory i = (ParamHistory)(context.get("(_level"));
+ i.add("arg");
+ }
+
+
}
17 years, 3 months
JBoss Tools SVN: r10620 - trunk/archives/plugins/org.jboss.ide.eclipse.archives.core.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2008-10-02 05:32:15 -0400 (Thu, 02 Oct 2008)
New Revision: 10620
Modified:
trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/plugin.xml
Log:
JBIDE-2825 fixed the "type-while-in-moving-train" errors
Modified: trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/plugin.xml
===================================================================
--- trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/plugin.xml 2008-10-02 09:31:14 UTC (rev 10619)
+++ trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/plugin.xml 2008-10-02 09:32:15 UTC (rev 10620)
@@ -5,7 +5,7 @@
<extension-point id="actionTypes" name="JBoss Tools Build Action Type" schema="schema/actionTypes.exsd"/>
<extension
id="archivesNature"
- name="JBoss Tools Project Archivs Nature"
+ name="Project Archives Nature"
point="org.eclipse.core.resources.natures">
<runtime>
<run class="org.jboss.ide.eclipse.archives.core.project.ArchivesNature"/>
@@ -14,7 +14,7 @@
</extension>
<extension
id="archivesBuilder"
- name="JBoss Project Archives Builder"
+ name="JProject Archives Builder"
point="org.eclipse.core.resources.builders">
<builder
hasNature="true"
@@ -33,26 +33,26 @@
point="org.eclipse.core.runtime.preferences">
<initializer class="org.jboss.ide.eclipse.archives.core.model.other.internal.WorkspacePreferenceManager"/>
</extension>
-
-
-
- <!-- LEGACY - JBIDE-1041 -->
- <extension
- point="org.eclipse.core.runtime.contentTypes">
- <file-association
- file-names="packaging-build.xml"
- content-type="org.eclipse.ant.core.antBuildFile">
- </file-association>
- </extension>
- <extension
- point="org.jboss.ide.eclipse.archives.core.actionTypes">
- <actionType
- class="org.jboss.ide.eclipse.archives.core.model.types.AntActionType"
- id="org.jboss.ide.eclipse.archives.core.antActionType"
- label="Ant Task">
- </actionType>
+
+
+
+ <!-- LEGACY - JBIDE-1041 -->
+ <extension
+ point="org.eclipse.core.runtime.contentTypes">
+ <file-association
+ file-names="packaging-build.xml"
+ content-type="org.eclipse.ant.core.antBuildFile">
+ </file-association>
</extension>
<extension
+ point="org.jboss.ide.eclipse.archives.core.actionTypes">
+ <actionType
+ class="org.jboss.ide.eclipse.archives.core.model.types.AntActionType"
+ id="org.jboss.ide.eclipse.archives.core.antActionType"
+ label="Ant Task">
+ </actionType>
+ </extension>
+ <extension
point="org.eclipse.core.variables.dynamicVariables">
<variable
description="The project an archives node is declared in."
17 years, 3 months
JBoss Tools SVN: r10619 - trunk/archives/plugins/org.jboss.ide.eclipse.archives.core.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2008-10-02 05:31:14 -0400 (Thu, 02 Oct 2008)
New Revision: 10619
Modified:
trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/plugin.xml
Log:
JBIDE-2825
Modified: trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/plugin.xml
===================================================================
--- trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/plugin.xml 2008-10-02 09:28:41 UTC (rev 10618)
+++ trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/plugin.xml 2008-10-02 09:31:14 UTC (rev 10619)
@@ -5,7 +5,7 @@
<extension-point id="actionTypes" name="JBoss Tools Build Action Type" schema="schema/actionTypes.exsd"/>
<extension
id="archivesNature"
- name="JBossIDE Packages Nature"
+ name="JBoss Tools Project Archivs Nature"
point="org.eclipse.core.resources.natures">
<runtime>
<run class="org.jboss.ide.eclipse.archives.core.project.ArchivesNature"/>
@@ -14,7 +14,7 @@
</extension>
<extension
id="archivesBuilder"
- name="JBossIDE Packages Builder"
+ name="JBoss Project Archives Builder"
point="org.eclipse.core.resources.builders">
<builder
hasNature="true"
17 years, 3 months
JBoss Tools SVN: r10618 - trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/freemarker_ide.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2008-10-02 05:28:41 -0400 (Thu, 02 Oct 2008)
New Revision: 10618
Removed:
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/freemarker_ide/Activator.java
Log:
remove dead activator code
Deleted: trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/freemarker_ide/Activator.java
===================================================================
--- trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/freemarker_ide/Activator.java 2008-10-02 09:27:47 UTC (rev 10617)
+++ trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/freemarker_ide/Activator.java 2008-10-02 09:28:41 UTC (rev 10618)
@@ -1,50 +0,0 @@
-package freemarker_ide;
-
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "Freemarker_IDE";
-
- // The shared instance
- private static Activator plugin;
-
- /**
- * The constructor
- */
- public Activator() {
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
-}
17 years, 3 months
JBoss Tools SVN: r10617 - trunk/jsf/docs/userguide/en/modules.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-10-02 05:27:47 -0400 (Thu, 02 Oct 2008)
New Revision: 10617
Modified:
trunk/jsf/docs/userguide/en/modules/preferences.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-406 - updating the VPE Preferences section;
Modified: trunk/jsf/docs/userguide/en/modules/preferences.xml
===================================================================
--- trunk/jsf/docs/userguide/en/modules/preferences.xml 2008-10-02 09:27:16 UTC (rev 10616)
+++ trunk/jsf/docs/userguide/en/modules/preferences.xml 2008-10-02 09:27:47 UTC (rev 10617)
@@ -344,8 +344,8 @@
<para><emphasis>
<property>JBoss Tools > Web > Editors > Visual Page
Editor</property>
- </emphasis> screen allows you to control some aspects of the behavior of the Visual Page
- Editor (VPE) for JSP files. Also you can define a default editor tab.</para>
+ </emphasis> screen allows you to control some aspects of the behavior of the
+ <property>Visual Page Editor</property> (VPE) for JSF/HTML files.</para>
<figure>
<title>Visual Page Editor</title>
<mediaobject>
@@ -354,7 +354,90 @@
</imageobject>
</mediaobject>
</figure>
- <para>On the Templates tab you can edit or remove VPE templates.</para>
+
+ <para>The next table lists the possible settings that you can adjust on the
+ <property>General tab</property> of the VPE Preferences page.</para>
+
+
+ <table>
+
+ <title>VPE Preferences</title>
+ <tgroup cols="3">
+
+ <colspec colnum="1" align="left" colwidth="2*"/>
+ <colspec colnum="2" colwidth="4*"/>
+ <colspec colnum="3" colwidth="2*"/>
+
+ <thead>
+ <row>
+ <entry>Option</entry>
+ <entry>Description</entry>
+ <entry>Default</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>Show Border for Unknown Tags</entry>
+ <entry>The option allows to place the border around unknown tags or undo
+ this</entry>
+ <entry>On</entry>
+ </row>
+
+ <row>
+ <entry>Show Non-Visual Tags</entry>
+ <entry>Check this box, if you want the editor shows non-visual elements on
+ the page you're editing</entry>
+ <entry>Off</entry>
+ </row>
+
+ <row>
+ <entry>Show Resource Bundles Usage as EL Expressions </entry>
+ <entry>If the option is checked, the editor will show EL expressions instead
+ of the resource values</entry>
+ <entry>Off</entry>
+ </row>
+
+ <row>
+ <entry>Always Prompts for Tag Attributes During Tag Insert </entry>
+ <entry>Having this option off, the dialog with possible attributes for
+ inserting tag won't appear if all its attributes are optional</entry>
+ <entry>On</entry>
+ </row>
+
+ <row>
+ <entry>Show Selection Tag Bar</entry>
+ <entry>This option allows to show or hide the Selection Bar</entry>
+ <entry>On</entry>
+ </row>
+
+ <row>
+ <entry>Always Hide Selection Bar Without Prompt</entry>
+ <entry>Check this box if you don't want the confirmation window
+ appears when closing the Selection Bar</entry>
+ <entry>Off</entry>
+ </row>
+
+ <row>
+ <entry>Default Editor Tab</entry>
+ <entry>The option provides with a possibility to choose one of the following
+ views - Visual/Source, Source or Preview, as default when opening the
+ editor</entry>
+ <entry>Visual/Source</entry>
+ </row>
+
+ <row>
+ <entry>Size of Visual Editor Pane 0 – 100% </entry>
+ <entry>With the help of this scroll bar you can adjust the percentage rating
+ between the Source and Visual modes of the Visual/Source view</entry>
+ <entry>50%</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <para>On the <property>Templates tab</property> you can edit or remove <link
+ linkend="vpe_templating">VPE templates</link>.</para>
<figure>
<title>Visual Page Editor Templates</title>
<mediaobject>
@@ -366,7 +449,7 @@
<para>Select a template for editing from the available list and press <emphasis>
<property>Edit</property>
- </emphasis> button. It will pick up the <link linkend="vpe_templating">Template
+ </emphasis> button. It will pick up the <link linkend="template_dialog">Template
dialog</link> where you can adjust new settings.</para>
</section>
17 years, 3 months
JBoss Tools SVN: r10616 - trunk/jsf/docs/userguide/en/modules.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-10-02 05:27:16 -0400 (Thu, 02 Oct 2008)
New Revision: 10616
Modified:
trunk/jsf/docs/userguide/en/modules/editors.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-406 - adding id to the section;
Modified: trunk/jsf/docs/userguide/en/modules/editors.xml
===================================================================
--- trunk/jsf/docs/userguide/en/modules/editors.xml 2008-10-01 22:16:21 UTC (rev 10615)
+++ trunk/jsf/docs/userguide/en/modules/editors.xml 2008-10-02 09:27:16 UTC (rev 10616)
@@ -901,7 +901,7 @@
</mediaobject>
</figure>
- <para>Here is what the <property>Template dialog</property> looks like.</para>
+ <para id="template_dialog">Here is what the <property>Template dialog</property> looks like.</para>
<figure>
<title>Template Dialog</title>
17 years, 3 months
JBoss Tools SVN: r10615 - trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-10-01 18:16:21 -0400 (Wed, 01 Oct 2008)
New Revision: 10615
Modified:
trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/ELParserTest.java
Log:
test was separated into several logical groups to cover description in J2EE tutorial http://java.sun.com/javaee/5/docs/tutorial/doc/bnahq.html
Modified: trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/ELParserTest.java
===================================================================
--- trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/ELParserTest.java 2008-10-01 19:55:49 UTC (rev 10614)
+++ trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/ELParserTest.java 2008-10-01 22:16:21 UTC (rev 10615)
@@ -28,7 +28,6 @@
public void testTokenizerOnCorrectEL() {
Tokenizer t = TokenizerFactory.createJbossTokenizer();
-
//1. One variable
checkCorrectEL(t, "#{a}");
//2. Two EL instances
@@ -51,8 +50,97 @@
checkCorrectEL(t, "#{a.b(7 + 8) * 4 / 2 - 1}");
//9. Complex expressions
checkCorrectEL(t, "#{a.b(7 + 8) * (4 / 2 - 1)/c.d}");
+ //10. Complex expressions
+ checkCorrectEL(t, "#{a.b(7 + 8) * (4 / 2 - 1)/c.d}");
}
+ public void testElEmptyOperator() {
+ Tokenizer t = TokenizerFactory.createJbossTokenizer();
+ checkCorrectEL(t, "#{empty a}");
+ }
+
+ public void testElLogicalNotOperators() {
+ Tokenizer t = TokenizerFactory.createJbossTokenizer();
+ checkCorrectEL(t, "#{not a == null}");
+ checkCorrectEL(t, "#{!a eq null}");
+ }
+
+ public void testElLogicalAndOperators() {
+ Tokenizer t = TokenizerFactory.createJbossTokenizer();
+ checkCorrectEL(t, "#{a!=null and a!=1}");
+ checkCorrectEL(t, "#{a!=null && a!=1}");
+ }
+
+ public void testElLogicalOrOperators() {
+ Tokenizer t = TokenizerFactory.createJbossTokenizer();
+ checkCorrectEL(t, "#{a!=null or a!=1}");
+ checkCorrectEL(t, "#{a!=null || a!=1}");
+ }
+
+ public void testElConditionalOperator() {
+ Tokenizer t = TokenizerFactory.createJbossTokenizer();
+ checkCorrectEL(t, "#{a?1:2}");
+ }
+
+ public void testElRelationalOperator() {
+ Tokenizer t = TokenizerFactory.createJbossTokenizer();
+ checkCorrectEL(t, "#{a == b}");
+ checkCorrectEL(t, "#{a eq b}");
+ checkCorrectEL(t, "#{a != b}");
+ checkCorrectEL(t, "#{a ne b}");
+ checkCorrectEL(t, "#{a < b}");
+ checkCorrectEL(t, "#{a lt b}");
+ checkCorrectEL(t, "#{a > b}");
+ checkCorrectEL(t, "#{a < b}");
+ checkCorrectEL(t, "#{a <= b}");
+ checkCorrectEL(t, "#{a ge b}");
+ checkCorrectEL(t, "#{a >= b}");
+ checkCorrectEL(t, "#{a le b}");
+ checkCorrectEL(t, "#{'a' < 'b'}");
+
+ }
+
+ public void testElArithmeticOperators() {
+ Tokenizer t = TokenizerFactory.createJbossTokenizer();
+ checkCorrectEL(t, "#{a*b}");
+ checkCorrectEL(t, "#{a/b}");
+ checkCorrectEL(t, "#{a div b}");
+ checkCorrectEL(t, "#{a%b}");
+ checkCorrectEL(t, "#{a mod b}");
+ checkCorrectEL(t, "#{a-b}");
+ checkCorrectEL(t, "#{a+b}");
+ checkCorrectEL(t, "#{-b+1}");
+ checkCorrectEL(t, "#{-b}");
+ }
+
+ public void testElLiteralExpressions() {
+ Tokenizer t = TokenizerFactory.createJbossTokenizer();
+ checkCorrectEL(t,"#{\"#{\"}");
+ checkCorrectEL(t,"#{’#’}");
+ checkCorrectEL(t,"\\#{exprA}");
+ checkCorrectEL(t,"#{\"\\\"exprA\\\"\"}");
+ checkCorrectEL(t,"#{\"\\\"#\\\"\"}");
+ }
+
+ public void testElReferencesObjectProperties() {
+ Tokenizer t = TokenizerFactory.createJbossTokenizer();
+ checkCorrectEL(t,"#{customer.address[\"street\"]}");
+ checkCorrectEL(t,"#{customer.address['street']}");
+ checkCorrectEL(t,"#{planets[object.counter].mass}");
+ }
+
+ public void testElSimpleTypes() {
+ Tokenizer t = TokenizerFactory.createJbossTokenizer();
+ checkCorrectEL(t,"#{\"string\"}");
+ checkCorrectEL(t,"#{'string'}");
+ checkCorrectEL(t,"#{11.0}");
+ checkCorrectEL(t,"#{1.2E4}");
+ checkCorrectEL(t,"#{null}");
+ checkCorrectEL(t,"#{1}");
+ checkCorrectEL(t,"#{true}");
+ checkCorrectEL(t,"#{false}");
+ }
+
private void checkCorrectEL(Tokenizer t, String test) {
LexicalToken token = t.parse(test);
assertEquals(test, restore(token));
@@ -63,10 +151,8 @@
public void testTokenizerOnIncorrectEL() {
Tokenizer t = TokenizerFactory.createJbossTokenizer();
-
//1. Dot unfollowed by name
checkIncorrectEL(t, "#{a.}", 4);
-
//2. Incorrect use of ')'
checkIncorrectEL(t, "#{a.b + -c.d + g)}", 16);
//2. Incorrect use of ')' in second EL instance
17 years, 3 months
JBoss Tools SVN: r10614 - trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/util.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2008-10-01 15:55:49 -0400 (Wed, 01 Oct 2008)
New Revision: 10614
Modified:
trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/util/PathUtils.java
Log:
JBIDE-2662 - file system relative paths in archives
Modified: trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/util/PathUtils.java
===================================================================
--- trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/util/PathUtils.java 2008-10-01 19:07:54 UTC (rev 10613)
+++ trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/util/PathUtils.java 2008-10-01 19:55:49 UTC (rev 10614)
@@ -62,14 +62,22 @@
try {
String translated = ArchivesCore.getInstance().getVFS().
performStringSubstitution(expression, projectName, true);
- if( inWorkspace && version >= 1.2) {
- IPath p = new Path(translated);
- if( !p.isAbsolute() )
- p = new Path(projectName).append(p).makeAbsolute();
- return p.toString();
+ if( inWorkspace ) {
+ if( version >= 1.2) {
+ IPath p = new Path(translated);
+ if( !p.isAbsolute() )
+ p = new Path(projectName).append(p).makeAbsolute();
+ return p.toString();
+ } else {
+ // should be workspace relative already
+ return new Path(translated).makeAbsolute().toString();
+ }
} else {
- // should be workspace relative already
- return new Path(translated).makeAbsolute().toString();
+ if( new Path(translated).isAbsolute())
+ return new Path(translated).toString();
+ // not absolute... hrmm
+ IPath projectPath = ArchivesCore.getInstance().getVFS().workspacePathToAbsolutePath(new Path(projectName));
+ return projectPath.append(translated).toString();
}
} catch( CoreException ce ) {
// ignore, just return null ce.printStackTrace();
17 years, 3 months
JBoss Tools SVN: r10613 - trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/providers.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2008-10-01 15:07:54 -0400 (Wed, 01 Oct 2008)
New Revision: 10613
Modified:
trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/providers/ArchivesRootBridgeContentProvider.java
Log:
JBIDE-2649
Modified: trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/providers/ArchivesRootBridgeContentProvider.java
===================================================================
--- trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/providers/ArchivesRootBridgeContentProvider.java 2008-10-01 19:01:01 UTC (rev 10612)
+++ trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/providers/ArchivesRootBridgeContentProvider.java 2008-10-01 19:07:54 UTC (rev 10613)
@@ -34,8 +34,11 @@
}
public Object[] getChildren(Object parentElement) {
- if( parentElement instanceof IProject )
- return new Object[] { new WrappedProject((IProject)parentElement, WrappedProject.CATEGORY) };
+ if( parentElement instanceof IProject) {
+ if( ((IProject)parentElement).isOpen())
+ return new Object[] { new WrappedProject((IProject)parentElement, WrappedProject.CATEGORY) };
+ return new Object[]{};
+ }
return delegate.getChildren(parentElement);
}
17 years, 3 months
JBoss Tools SVN: r10612 - trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/providers.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2008-10-01 15:01:01 -0400 (Wed, 01 Oct 2008)
New Revision: 10612
Modified:
trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/providers/ArchivesContentProviderDelegate.java
Log:
JBIDE-2664 - NPE
Modified: trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/providers/ArchivesContentProviderDelegate.java
===================================================================
--- trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/providers/ArchivesContentProviderDelegate.java 2008-10-01 18:15:35 UTC (rev 10611)
+++ trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/providers/ArchivesContentProviderDelegate.java 2008-10-01 19:01:01 UTC (rev 10612)
@@ -93,7 +93,10 @@
// if currently loading, always send a delay
if( loadingProjects.contains(p))
return new Object[]{new DelayProxy(wp)};
-
+
+ if( !p.isOpen())
+ return new Object[]{};
+
if( ArchivesModel.instance().isProjectRegistered(p.getLocation()))
return ArchivesModel.instance().getRoot(p.getLocation()).getAllChildren();
if( ArchivesModel.instance().canReregister(p.getLocation())) {
@@ -125,7 +128,8 @@
}
protected boolean shouldRefreshProject() {
- if( viewerInUse == ProjectArchivesCommonView.getInstance().getCommonViewer() &&
+ if( ProjectArchivesCommonView.getInstance() != null &&
+ viewerInUse == ProjectArchivesCommonView.getInstance().getCommonViewer() &&
!PrefsInitializer.getBoolean(PrefsInitializer.PREF_SHOW_PROJECT_ROOT))
return true;
return false;
@@ -139,7 +143,9 @@
if( element instanceof IArchiveNode )
return getChildren(element).length > 0;
if( element instanceof IResource )
- return ArchivesModel.instance().canReregister(((IResource)element).getLocation());
+ return
+ ((IResource)element).getProject().isOpen() &&
+ ArchivesModel.instance().canReregister(((IResource)element).getLocation());
if( element == ArchivesRootContentProvider.NO_PROJECT)
return false;
if( element instanceof DelayProxy)
17 years, 3 months
JBoss Tools SVN: r10611 - in trunk/archives/plugins: org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/util/composites and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2008-10-01 14:15:35 -0400 (Wed, 01 Oct 2008)
New Revision: 10611
Modified:
trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/util/PathUtils.java
trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/util/composites/ArchiveSourceDestinationComposite.java
Log:
JBIDE-2649
Modified: trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/util/PathUtils.java
===================================================================
--- trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/util/PathUtils.java 2008-10-01 18:03:21 UTC (rev 10610)
+++ trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/util/PathUtils.java 2008-10-01 18:15:35 UTC (rev 10611)
@@ -72,7 +72,7 @@
return new Path(translated).makeAbsolute().toString();
}
} catch( CoreException ce ) {
- ce.printStackTrace();
+ // ignore, just return null ce.printStackTrace();
}
return null;
}
Modified: trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/util/composites/ArchiveSourceDestinationComposite.java
===================================================================
--- trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/util/composites/ArchiveSourceDestinationComposite.java 2008-10-01 18:03:21 UTC (rev 10610)
+++ trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/util/composites/ArchiveSourceDestinationComposite.java 2008-10-01 18:15:35 UTC (rev 10611)
@@ -246,12 +246,10 @@
}
- String translated;
+ String translated=""; //$NON-NLS-1$
Image img=null;
try {
- if( destinationNode != null ) {
- translated=""; img=null; //$NON-NLS-1$
- } else {
+ if( destinationNode == null ) {
translated = getTranslatedGlobalPath();
if( translated == null || !new Path(translated).toFile().exists()) {
translated= NLS.bind(ArchivesUIMessages.PathDoesNotExistInFilesystem,translated);
@@ -269,6 +267,7 @@
} else if( ce.getStatus().getSeverity() == IStatus.WARNING)
img = PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJS_WARN_TSK);
}
+
translatedPathImage.setImage(img);
translatedPath.setText(translated);
fireChange();
@@ -281,11 +280,11 @@
if( workspaceRelative ) {
IPath p = ArchivesCore.getInstance().getVFS().workspacePathToAbsolutePath(new Path(postSub));
if( p != null ) return p.toString();
- return NLS.bind(postSub, ArchivesUIMessages.ErrorConvertingPaths);
+ return NLS.bind(ArchivesUIMessages.ErrorConvertingPaths, postSub);
}
return postSub;
} catch( CoreException e ) {
- return NLS.bind(e.getMessage(), ArchivesUIMessages.ErrorStringSubstitution);
+ return NLS.bind(ArchivesUIMessages.ErrorStringSubstitution, e.getMessage());
}
}
@@ -294,12 +293,12 @@
try {
IPath p = PathUtils.getGlobalLocation(path, projectName, workspaceRelative, getDescriptorVersion());
if( p != null ) return p.toString();
- String ERROR = NLS.bind(p.toOSString(), ArchivesUIMessages.ErrorConvertingPaths);
+ String ERROR = NLS.bind(ArchivesUIMessages.ErrorConvertingPaths, path);
Status s = new Status(IStatus.WARNING, PackagesUIPlugin.PLUGIN_ID, ERROR);
throw new CoreException(s);
} catch( CoreException e ) {
- String ERROR = NLS.bind(e.getMessage(), ArchivesUIMessages.ErrorStringSubstitution);
+ String ERROR = NLS.bind(ArchivesUIMessages.ErrorStringSubstitution, e.getMessage());
Status s = new Status(IStatus.ERROR, PackagesUIPlugin.PLUGIN_ID, ERROR, e);
throw new CoreException(s);
}
17 years, 3 months
JBoss Tools SVN: r10610 - in trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui: util/composites and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2008-10-01 14:03:21 -0400 (Wed, 01 Oct 2008)
New Revision: 10610
Modified:
trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/ArchivesUIMessages.java
trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/ArchivesUIMessages.properties
trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/util/composites/ArchiveSourceDestinationComposite.java
Log:
JBIDE-2649
Modified: trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/ArchivesUIMessages.java
===================================================================
--- trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/ArchivesUIMessages.java 2008-10-01 17:46:06 UTC (rev 10609)
+++ trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/ArchivesUIMessages.java 2008-10-01 18:03:21 UTC (rev 10610)
@@ -23,8 +23,9 @@
public static String Filesystem;
public static String Workspace;
public static String Variables;
- public static String WorkspaceRelative;
- public static String FilesystemRelative;
+ public static String Workspace2;
+ public static String Filesystem2;
+ public static String RelativeTo;
public static String PathDoesNotExistInFilesystem;
public static String ErrorConvertingPaths;
public static String ErrorStringSubstitution;
Modified: trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/ArchivesUIMessages.properties
===================================================================
--- trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/ArchivesUIMessages.properties 2008-10-01 17:46:06 UTC (rev 10609)
+++ trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/ArchivesUIMessages.properties 2008-10-01 18:03:21 UTC (rev 10610)
@@ -8,8 +8,9 @@
Filesystem=Filesystem...
Workspace=Workspace...
Variables=Variables...
-WorkspaceRelative=Workspace Relative
-FilesystemRelative=Filesystem Relative
+RelativeTo=Relative to
+Workspace2=workspace
+Filesystem2=file system
PathDoesNotExistInFilesystem={0} does not exist in the filesystem
ErrorConvertingPaths=Unable to convert workspace path into global path: {0}
ErrorStringSubstitution=Error during string substitution: {0}
Modified: trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/util/composites/ArchiveSourceDestinationComposite.java
===================================================================
--- trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/util/composites/ArchiveSourceDestinationComposite.java 2008-10-01 17:46:06 UTC (rev 10609)
+++ trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/util/composites/ArchiveSourceDestinationComposite.java 2008-10-01 18:03:21 UTC (rev 10610)
@@ -60,7 +60,7 @@
*/
public class ArchiveSourceDestinationComposite extends Composite {
private Text text;
- private Label pathImage, translatedPath, translatedPathImage;
+ private Label pathImage, translatedPath, translatedPathImage, relativeTo;
private Button workspaceButton, filesystemButton, variablesButton,
wsRadioButton, fsRadioButton;
@@ -94,6 +94,7 @@
variablesButton = new Button(this, SWT.PUSH);
wsRadioButton = new Button(this, SWT.RADIO);
fsRadioButton = new Button(this, SWT.RADIO);
+ relativeTo = new Label(this, SWT.NONE);
}
protected void layoutWidgets() {
@@ -104,6 +105,7 @@
variablesButton.setLayoutData(createFormData(text,5,null,0,null,0,workspaceButton,-5));
fsRadioButton.setLayoutData(createFormData(text,5,null,0,null,0,variablesButton,-5));
wsRadioButton.setLayoutData(createFormData(text,5,null,0,null,0,fsRadioButton,-5));
+ relativeTo.setLayoutData(createFormData(text,8,null,0,null,0,wsRadioButton,-5));
translatedPathImage.setLayoutData(createFormData(filesystemButton,5,null,0,0,0,0,20));
translatedPath.setLayoutData(createFormData(filesystemButton,5,null,0,translatedPathImage,5,100,-5));
}
@@ -112,8 +114,9 @@
filesystemButton.setText(ArchivesUIMessages.Filesystem);
workspaceButton.setText(ArchivesUIMessages.Workspace);
variablesButton.setText(ArchivesUIMessages.Variables);
- wsRadioButton.setText(ArchivesUIMessages.WorkspaceRelative);
- fsRadioButton.setText(ArchivesUIMessages.FilesystemRelative);
+ wsRadioButton.setText(ArchivesUIMessages.Workspace2);
+ fsRadioButton.setText(ArchivesUIMessages.Filesystem2);
+ relativeTo.setText(ArchivesUIMessages.RelativeTo);
pathImage.setImage(PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_FOLDER));
FontData[] translatedPathData = translatedPath.getFont().getFontData();
for( int i = 0; i < translatedPathData.length; i++ )
@@ -251,7 +254,7 @@
} else {
translated = getTranslatedGlobalPath();
if( translated == null || !new Path(translated).toFile().exists()) {
- translated= NLS.bind(translated, ArchivesUIMessages.PathDoesNotExistInFilesystem);
+ translated= NLS.bind(ArchivesUIMessages.PathDoesNotExistInFilesystem,translated);
img = PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJS_WARN_TSK);
} else {
img = null;
17 years, 3 months
JBoss Tools SVN: r10609 - trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2008-10-01 13:46:06 -0400 (Wed, 01 Oct 2008)
New Revision: 10609
Modified:
trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/plugin.xml
Log:
JBIDE-2650 "Project Archives" in project explorer should show up above resources
Modified: trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/plugin.xml
===================================================================
--- trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/plugin.xml 2008-10-01 17:11:06 UTC (rev 10608)
+++ trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/plugin.xml 2008-10-01 17:46:06 UTC (rev 10609)
@@ -148,7 +148,7 @@
id="org.jboss.ide.eclipse.archives.ui.archivesRootBridgeContent"
labelProvider="org.jboss.ide.eclipse.archives.ui.providers.ArchivesLabelProvider"
name="Project Archives"
- priority="lower">
+ priority="highest">
<triggerPoints>
<instanceof
value="org.eclipse.core.resources.IProject">
17 years, 3 months
JBoss Tools SVN: r10608 - in trunk: tests/features/org.jboss.tools.test.feature and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-10-01 13:11:06 -0400 (Wed, 01 Oct 2008)
New Revision: 10608
Added:
trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/test/util/JobUtils.java
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/AbstractSeamFacetTest.java
trunk/tests/features/org.jboss.tools.test.feature/feature.xml
trunk/ws/tests/org.jboss.tools.ws.core.test/META-INF/MANIFEST.MF
trunk/ws/tests/org.jboss.tools.ws.core.test/build.properties
trunk/ws/tests/org.jboss.tools.ws.core.test/src/org/jboss/tools/ws/core/test/command/AbstractJBossWSCommandTest.java
Log:
ws tests included in build.
ws dearDown() changed to avoid hanging during removing test projects from workspace: disabling Auto Build and waiting for background activities is ended after removing the project.
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/AbstractSeamFacetTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/AbstractSeamFacetTest.java 2008-10-01 16:19:23 UTC (rev 10607)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/AbstractSeamFacetTest.java 2008-10-01 17:11:06 UTC (rev 10608)
@@ -27,6 +27,7 @@
import org.jboss.tools.seam.core.project.facet.SeamVersion;
import org.jboss.tools.seam.internal.core.project.facet.ISeamFacetDataModelProperties;
import org.jboss.tools.seam.internal.core.project.facet.SeamFacetInstallDataModelProvider;
+import org.jboss.tools.test.util.JobUtils;
import org.jboss.tools.test.util.ResourcesUtils;
import org.jboss.tools.test.util.xpl.EditorTestHelper;
@@ -107,15 +108,12 @@
try {
oldAutoBuilding = ResourcesUtils.setBuildAutomatically(false);
ResourcesPlugin.getWorkspace().getRoot().refreshLocal(IResource.DEPTH_INFINITE, null);
- waitForIdle();
+ JobUtils.waitForIdle();
for (IResource r : this.resourcesToCleanup) {
try {
- //System.out.println("Deleting " + r);
- //r.getProject().close(null);
r.delete(true, null);
- waitForIdle();
+ JobUtils.waitForIdle();
} catch(Exception e) {
- System.out.println("Error deleting " + r);
e.printStackTrace();
last = e;
}
@@ -131,19 +129,6 @@
if(last!=null) throw last;
}
- public static void waitForIdle() {
- long start = System.currentTimeMillis();
- // Job.getJobManager().isIdle() is more efficient than EditorTestHelper.allJobsQuiet()
- // EditorTestHelper.allJobsQuiet() isn't thread-safe
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=198241 is fixed
- //while (!EditorTestHelper.allJobsQuiet()) {
- while (!Job.getJobManager().isIdle()) {
- delay(500);
- if ( (System.currentTimeMillis()-start) > MAX_IDLE )
- throw new RuntimeException("A long running task detected"); //$NON-NLS-1$
- }
- }
-
protected final void addResourceToCleanup(final IResource resource) {
this.resourcesToCleanup.add(resource);
}
@@ -270,24 +255,4 @@
}
- public static void delay(long waitTimeMillis) {
- Display display = Display.getCurrent();
- if (display != null) {
- long endTimeMillis = System.currentTimeMillis() + waitTimeMillis;
- while (System.currentTimeMillis() < endTimeMillis) {
- if (!display.readAndDispatch())
- display.sleep();
- }
- display.update();
- }
- // Otherwise, perform a simple sleep.
- else {
- try {
- Thread.sleep(waitTimeMillis);
- } catch (InterruptedException e) {
- // Ignored.
- }
- }
- }
-
}
\ No newline at end of file
Modified: trunk/tests/features/org.jboss.tools.test.feature/feature.xml
===================================================================
--- trunk/tests/features/org.jboss.tools.test.feature/feature.xml 2008-10-01 16:19:23 UTC (rev 10607)
+++ trunk/tests/features/org.jboss.tools.test.feature/feature.xml 2008-10-01 17:11:06 UTC (rev 10608)
@@ -381,4 +381,17 @@
install-size="0"
version="0.0.0"/>
+ <plugin
+ id="org.jboss.tools.ws.core.test"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"/>
+
+ <plugin
+ id="org.jboss.tools.ws.ui.test"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
</feature>
Added: trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/test/util/JobUtils.java
===================================================================
--- trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/test/util/JobUtils.java (rev 0)
+++ trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/test/util/JobUtils.java 2008-10-01 17:11:06 UTC (rev 10608)
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.test.util;
+
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.swt.widgets.Display;
+
+/**
+ * @author eskimo
+ *
+ */
+public class JobUtils {
+
+ private static final long MAX_IDLE = 30*60*1000L;
+
+ public static void waitForIdle() {
+ long start = System.currentTimeMillis();
+ // Job.getJobManager().isIdle() is more efficient than EditorTestHelper.allJobsQuiet()
+ // EditorTestHelper.allJobsQuiet() isn't thread-safe
+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=198241 is fixed
+ //while (!EditorTestHelper.allJobsQuiet()) {
+ while (!Job.getJobManager().isIdle()) {
+ delay(500);
+ if ( (System.currentTimeMillis()-start) > MAX_IDLE )
+ throw new RuntimeException("A long running task detected"); //$NON-NLS-1$
+ }
+ }
+
+ public static void delay(long waitTimeMillis) {
+ Display display = Display.getCurrent();
+ if (display != null) {
+ long endTimeMillis = System.currentTimeMillis() + waitTimeMillis;
+ while (System.currentTimeMillis() < endTimeMillis) {
+ if (!display.readAndDispatch())
+ display.sleep();
+ }
+ display.update();
+ }
+ // Otherwise, perform a simple sleep.
+ else {
+ try {
+ Thread.sleep(waitTimeMillis);
+ } catch (InterruptedException e) {
+ // Ignored.
+ }
+ }
+ }
+}
Property changes on: trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/test/util/JobUtils.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/ws/tests/org.jboss.tools.ws.core.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.core.test/META-INF/MANIFEST.MF 2008-10-01 16:19:23 UTC (rev 10607)
+++ trunk/ws/tests/org.jboss.tools.ws.core.test/META-INF/MANIFEST.MF 2008-10-01 17:11:06 UTC (rev 10608)
@@ -1,6 +1,6 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
-Bundle-Name: Test Plug-in
+Bundle-Name: WS Test Plug-in
Bundle-SymbolicName: org.jboss.tools.ws.core.test
Bundle-Version: 1.0.0
Bundle-Activator: org.jboss.tools.ws.core.test.Activator
@@ -31,3 +31,7 @@
org.eclipse.ui.console;bundle-version="3.3.0",
org.eclipse.jface.text;bundle-version="3.4.0"
Bundle-ActivationPolicy: lazy
+Bundle-ClassPath: ws-core-test.jar
+Export-Package: org.jboss.tools.ws.core.test,
+ org.jboss.tools.ws.core.test.classpath,
+ org.jboss.tools.ws.core.test.command
Modified: trunk/ws/tests/org.jboss.tools.ws.core.test/build.properties
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.core.test/build.properties 2008-10-01 16:19:23 UTC (rev 10607)
+++ trunk/ws/tests/org.jboss.tools.ws.core.test/build.properties 2008-10-01 17:11:06 UTC (rev 10608)
@@ -1,4 +1,6 @@
-source.. = src/
-output.. = bin/
+source.ws-core-test.jar = src/
+output.ws-core-test.jar = bin/
bin.includes = META-INF/,\
- .
+ ws-core-test.jar,\
+ projects/
+source.ws-core-test.jar = src/
Modified: trunk/ws/tests/org.jboss.tools.ws.core.test/src/org/jboss/tools/ws/core/test/command/AbstractJBossWSCommandTest.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.core.test/src/org/jboss/tools/ws/core/test/command/AbstractJBossWSCommandTest.java 2008-10-01 16:19:23 UTC (rev 10607)
+++ trunk/ws/tests/org.jboss.tools.ws.core.test/src/org/jboss/tools/ws/core/test/command/AbstractJBossWSCommandTest.java 2008-10-01 17:11:06 UTC (rev 10608)
@@ -58,6 +58,8 @@
import org.jboss.ide.eclipse.as.core.server.internal.JBossServerBehavior;
import org.jboss.tools.common.test.util.TestProjectProvider;
import org.jboss.tools.test.util.JUnitUtils;
+import org.jboss.tools.test.util.JobUtils;
+import org.jboss.tools.test.util.ResourcesUtils;
import org.jboss.tools.test.util.xpl.EditorTestHelper;
import org.jboss.tools.ws.creation.core.data.ServiceModel;
@@ -69,8 +71,9 @@
protected static final int DEFAULT_SHUTDOWN_TIME = 90000;
protected static final String JBOSSWS_HOME_DEFAULT = "D:/softinstall/jboss-4.2.2.GA/jboss-4.2.2.GA";
+ public static final String JBOSSWS_42_HOME="jbosstools.test.jboss.home.4.2";
public static final String JBOSS_RUNTIME_42 = "org.jboss.ide.eclipse.as.runtime.42";
- public static final String JBOSS_AS_42_HOME = System.getProperty(JBOSS_RUNTIME_42, JBOSSWS_HOME_DEFAULT);
+ public static final String JBOSS_AS_42_HOME = System.getProperty(JBOSSWS_42_HOME, JBOSSWS_HOME_DEFAULT);
public static final String JBOSS_SERVER_42 = "org.jboss.ide.eclipse.as.42";
protected final Set<IResource> resourcesToCleanup = new HashSet<IResource>();
@@ -126,20 +129,27 @@
undeployWebProject();
- EditorTestHelper.joinBackgroundActivities();
- EditorTestHelper.runEventQueue(3000);
- Exception last = null;
- for (IResource r : this.resourcesToCleanup) {
- try {
- System.out.println("Deleting " + r);
- r.delete(true, null);
- } catch(Exception e) {
- System.out.println("Error deleting " + r);
- e.printStackTrace();
- last = e;
+ boolean oldAutoBuilding = ResourcesUtils.setBuildAutomatically(false);
+ Exception last = null;
+
+ try {
+ JobUtils.waitForIdle();
+
+ for (IResource r : this.resourcesToCleanup) {
+ try {
+ System.out.println("Deleting " + r);
+ r.delete(true, null);
+ JobUtils.waitForIdle();
+ } catch(Exception e) {
+ System.out.println("Error deleting " + r);
+ e.printStackTrace();
+ last = e;
+ }
}
- }
-
+ } finally {
+ ResourcesUtils.setBuildAutomatically(oldAutoBuilding);
+ }
+
if(last!=null) throw last;
resourcesToCleanup.clear();
@@ -259,9 +269,9 @@
protected File getJBossWSHomeFolder() {
- String jbosshome = System.getProperty(JBOSS_RUNTIME_42, JBOSSWS_HOME_DEFAULT);
+ String jbosshome = System.getProperty(JBOSSWS_42_HOME, JBOSSWS_HOME_DEFAULT);
File runtimelocation = new File(jbosshome);
- assertTrue("Please set JBoss EAP Home in system property:" + JBOSS_RUNTIME_42, runtimelocation.exists());
+ assertTrue("Please set JBoss EAP Home in system property:" + JBOSSWS_42_HOME, runtimelocation.exists());
String cmdFileLocation = jbosshome + File.separator + "bin" + File.separator + "wsconsume.sh";
assertTrue(jbosshome + " is not a valid jboss EAP home", new File(cmdFileLocation).exists());
17 years, 3 months
JBoss Tools SVN: r10607 - trunk/birt/docs/en/images/BirtSupport.
by jbosstools-commits@lists.jboss.org
Author: abogachuk
Date: 2008-10-01 12:19:23 -0400 (Wed, 01 Oct 2008)
New Revision: 10607
Added:
trunk/birt/docs/en/images/BirtSupport/09NewDataSource.png
trunk/birt/docs/en/images/BirtSupport/10NewSampleDateSource.png
Log:
Added: trunk/birt/docs/en/images/BirtSupport/09NewDataSource.png
===================================================================
(Binary files differ)
Property changes on: trunk/birt/docs/en/images/BirtSupport/09NewDataSource.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/birt/docs/en/images/BirtSupport/10NewSampleDateSource.png
===================================================================
(Binary files differ)
Property changes on: trunk/birt/docs/en/images/BirtSupport/10NewSampleDateSource.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
17 years, 3 months
JBoss Tools SVN: r10606 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/bundle.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-10-01 11:58:20 -0400 (Wed, 01 Oct 2008)
New Revision: 10606
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/bundle/BundleMap.java
Log:
JBIDE-1497.
Refactoring
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/bundle/BundleMap.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/bundle/BundleMap.java 2008-10-01 15:47:20 UTC (rev 10605)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/bundle/BundleMap.java 2008-10-01 15:58:20 UTC (rev 10606)
@@ -42,6 +42,7 @@
import org.jboss.tools.common.el.core.model.ELUtil;
import org.jboss.tools.common.el.core.parser.ELParser;
import org.jboss.tools.common.el.core.parser.ELParserFactory;
+import org.jboss.tools.common.el.core.parser.ELParserUtil;
import org.jboss.tools.common.model.XModel;
import org.jboss.tools.common.model.event.XModelTreeEvent;
import org.jboss.tools.common.model.event.XModelTreeListener;
@@ -346,7 +347,7 @@
}
private List<ELInstance> parseJSFExpression(String expression){
- ELParser parser = ELParserFactory.createDefaultParser();
+ ELParser parser = ELParserUtil.getDefaultFactory().createParser();
ELModel model = parser.parse(expression);
List<ELInstance> is = model.getInstances();
return is;
17 years, 3 months
JBoss Tools SVN: r10605 - trunk/birt/docs/en/images/BirtSupport.
by jbosstools-commits@lists.jboss.org
Author: abogachuk
Date: 2008-10-01 11:47:20 -0400 (Wed, 01 Oct 2008)
New Revision: 10605
Added:
trunk/birt/docs/en/images/BirtSupport/08DataSource.png
Log:
https://jira.jboss.org/jira/browse/JBDS-388 - new image added
Added: trunk/birt/docs/en/images/BirtSupport/08DataSource.png
===================================================================
(Binary files differ)
Property changes on: trunk/birt/docs/en/images/BirtSupport/08DataSource.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
17 years, 3 months
JBoss Tools SVN: r10604 - trunk/jsf/docs/userguide/en/modules.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2008-10-01 11:36:13 -0400 (Wed, 01 Oct 2008)
New Revision: 10604
Modified:
trunk/jsf/docs/userguide/en/modules/Visual_Web_Tools.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-359
text alignment in first chapter table is corrected
Modified: trunk/jsf/docs/userguide/en/modules/Visual_Web_Tools.xml
===================================================================
--- trunk/jsf/docs/userguide/en/modules/Visual_Web_Tools.xml 2008-10-01 15:35:28 UTC (rev 10603)
+++ trunk/jsf/docs/userguide/en/modules/Visual_Web_Tools.xml 2008-10-01 15:36:13 UTC (rev 10604)
@@ -54,7 +54,7 @@
<colspec colnum="1" align="left" colwidth="2*"/>
<colspec colnum="2" colwidth="4*"/>
- <colspec colnum="3" colwidth="2*"/>
+ <colspec colnum="3" colwidth="2*" align="left" />
<thead>
<row>
17 years, 3 months
JBoss Tools SVN: r10603 - in trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui: search and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-10-01 11:35:28 -0400 (Wed, 01 Oct 2008)
New Revision: 10603
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/actions/SeamFindQuickAssistProcessor.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/search/SeamSearchEngine.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/search/SeamSearchQuery.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/search/SeamSearchVisitor.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/text/java/SeamELProposalProcessor.java
Log:
JBIDE-1497.
Refactoring
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/actions/SeamFindQuickAssistProcessor.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/actions/SeamFindQuickAssistProcessor.java 2008-10-01 15:34:53 UTC (rev 10602)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/actions/SeamFindQuickAssistProcessor.java 2008-10-01 15:35:28 UTC (rev 10603)
@@ -89,7 +89,8 @@
private String[] getVariableNames(ISeamProject seamProject, IDocument document, int offset,
int start, int end) {
- ELInvocationExpression tokens = SeamELCompletionEngine.findExpressionAtOffset(
+ SeamELCompletionEngine engine = new SeamELCompletionEngine(seamProject);
+ ELInvocationExpression tokens = engine.findExpressionAtOffset(
document, offset, start, end);
if (tokens == null)
@@ -116,8 +117,10 @@
ISeamProject seamProject = getSeamProject(context);
if (seamProject == null)
return result;
+
+ SeamELCompletionEngine engine = new SeamELCompletionEngine(seamProject);
- ELInvocationExpression tokens = SeamELCompletionEngine.findExpressionAtOffset(
+ ELInvocationExpression tokens = engine.findExpressionAtOffset(
document,
context.getSelectionOffset(),
0, //TODO compute region start
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/search/SeamSearchEngine.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/search/SeamSearchEngine.java 2008-10-01 15:34:53 UTC (rev 10602)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/search/SeamSearchEngine.java 2008-10-01 15:35:28 UTC (rev 10603)
@@ -37,12 +37,12 @@
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.search.core.text.TextSearchEngine;
import org.jboss.tools.common.el.core.model.ELInvocationExpression;
+import org.jboss.tools.common.el.core.resolver.ElVarSearcher;
+import org.jboss.tools.common.el.core.resolver.Var;
import org.jboss.tools.seam.core.ISeamContextVariable;
import org.jboss.tools.seam.core.ISeamProject;
import org.jboss.tools.seam.core.SeamCorePlugin;
-import org.jboss.tools.seam.internal.core.el.ElVarSearcher;
import org.jboss.tools.seam.internal.core.el.SeamELCompletionEngine;
-import org.jboss.tools.seam.internal.core.el.Var;
import org.jboss.tools.seam.ui.SeamGuiPlugin;
import org.jboss.tools.seam.ui.SeamUIMessages;
@@ -90,14 +90,13 @@
return Status.OK_STATUS;
}
- SeamELCompletionEngine engine = new SeamELCompletionEngine();
-
IProject project = (sourceFile == null ? null : sourceFile.getProject());
ISeamProject seamProject = SeamCorePlugin.getSeamProject(project, true);
if (seamProject == null)
return Status.OK_STATUS;
+ SeamELCompletionEngine engine = new SeamELCompletionEngine(seamProject);
//Find Seam variable names
@@ -126,7 +125,7 @@
}
// Try to find a local Var (a pair of variable-value attributes)
- ElVarSearcher varSearcher = new ElVarSearcher(seamProject, sourceFile, new SeamELCompletionEngine());
+ ElVarSearcher varSearcher = new ElVarSearcher(sourceFile, engine);
// Find a Var in the EL
int start = tokens.getStartPosition();
int end = tokens.getEndPosition();
@@ -137,11 +136,11 @@
if (elText == null || elText.length() == 0)
return Status.OK_STATUS;
- List<Var> allVars= ElVarSearcher.findAllVars(sourceFile, tokens.getStartPosition());
+ List<Var> allVars= varSearcher.findAllVars(sourceFile, tokens.getStartPosition());
Var var = varSearcher.findVarForEl(elText.toString(), allVars, true);
if (var == null) {
// Find a Var in the current offset assuming that it's a node with var/value attribute pair
- var = ElVarSearcher.findVar(sourceFile, tokens.getStartPosition());
+ var = varSearcher.findVar(sourceFile, tokens.getStartPosition());
}
if (var == null)
return Status.OK_STATUS;
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/search/SeamSearchQuery.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/search/SeamSearchQuery.java 2008-10-01 15:34:53 UTC (rev 10602)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/search/SeamSearchQuery.java 2008-10-01 15:35:28 UTC (rev 10603)
@@ -263,14 +263,14 @@
private IStatus queryByTokens(AbstractTextSearchResult textResult,
final IProgressMonitor monitor) {
- SeamELCompletionEngine engine = new SeamELCompletionEngine();
-
IProject project = (fSourceFile == null ? null : fSourceFile.getProject());
ISeamProject seamProject = SeamCorePlugin.getSeamProject(project, true);
if (seamProject == null)
return Status.OK_STATUS;
+ SeamELCompletionEngine engine = new SeamELCompletionEngine(seamProject);
+
// List<IJavaElement> elements = engine.getJavaElementsForELOperandTokens(seamProject, fSourceFile, fTokens)
SeamSearchResultCollector collector= new SeamSearchResultCollector(textResult, getParentRequestor());
return SeamSearchEngine.getInstance().search(fScope, collector, fSourceFile, fTokens, monitor);
@@ -279,14 +279,14 @@
private IStatus queryByJavaElements(
AbstractTextSearchResult textResult,
final IProgressMonitor monitor) {
- SeamELCompletionEngine engine = new SeamELCompletionEngine();
-
IProject project = (fSourceFile == null ? null : fSourceFile.getProject());
ISeamProject seamProject = SeamCorePlugin.getSeamProject(project, true);
if (seamProject == null)
return Status.OK_STATUS;
+ SeamELCompletionEngine engine = new SeamELCompletionEngine(seamProject);
+
SeamSearchResultCollector collector= new SeamSearchResultCollector(textResult, getParentRequestor());
return SeamSearchEngine.getInstance().search(fScope, collector, fSourceFile, fJavaElements, monitor);
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/search/SeamSearchVisitor.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/search/SeamSearchVisitor.java 2008-10-01 15:34:53 UTC (rev 10602)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/search/SeamSearchVisitor.java 2008-10-01 15:35:28 UTC (rev 10603)
@@ -97,6 +97,9 @@
import org.jboss.tools.common.el.core.model.ELModel;
import org.jboss.tools.common.el.core.parser.ELParser;
import org.jboss.tools.common.el.core.parser.ELParserFactory;
+import org.jboss.tools.common.el.core.parser.ELParserUtil;
+import org.jboss.tools.common.el.core.resolver.ElVarSearcher;
+import org.jboss.tools.common.el.core.resolver.Var;
import org.jboss.tools.common.model.util.EclipseJavaUtil;
import org.jboss.tools.seam.core.BijectedAttributeType;
import org.jboss.tools.seam.core.IBijectedAttribute;
@@ -113,9 +116,7 @@
import org.jboss.tools.seam.core.SeamCorePlugin;
import org.jboss.tools.seam.internal.core.AbstractSeamDeclaration;
import org.jboss.tools.seam.internal.core.SeamComponent;
-import org.jboss.tools.seam.internal.core.el.ElVarSearcher;
import org.jboss.tools.seam.internal.core.el.SeamELCompletionEngine;
-import org.jboss.tools.seam.internal.core.el.Var;
import org.jboss.tools.seam.internal.core.scanner.ScannerException;
import org.jboss.tools.seam.internal.core.scanner.java.AnnotatedASTNode;
import org.jboss.tools.seam.internal.core.scanner.java.ResolvedAnnotation;
@@ -151,7 +152,6 @@
private IFile fCurrentFile;
private final FileCharSequenceProvider fFileCharSequenceProvider;
- private final SeamELCompletionEngine fCompletionEngine;
interface ISeamMatcher {
String getName();
@@ -327,7 +327,6 @@
}
fFileCharSequenceProvider= new FileCharSequenceProvider();
fMatchAccess= new ReusableMatchAccess();
- fCompletionEngine = new SeamELCompletionEngine();
}
/**
@@ -351,7 +350,6 @@
}
fFileCharSequenceProvider= new FileCharSequenceProvider();
fMatchAccess= new ReusableMatchAccess();
- fCompletionEngine = new SeamELCompletionEngine();
}
/**
@@ -375,7 +373,6 @@
}
fFileCharSequenceProvider= new FileCharSequenceProvider();
fMatchAccess= new ReusableMatchAccess();
- fCompletionEngine = new SeamELCompletionEngine();
}
@@ -478,8 +475,9 @@
}
}
-
- fELVarSearcher = new ElVarSearcher(project, fCompletionEngine);
+
+ SeamELCompletionEngine fCompletionEngine = new SeamELCompletionEngine(project);
+ fELVarSearcher = new ElVarSearcher(fCompletionEngine);
fDocumentsInEditors= evalNonFileBufferDocuments();
boolean res= true;
for (int i = 0; files != null && i < files.length; i++) {
@@ -597,7 +595,7 @@
private void locateMatchesInChildNodes(IFile file, Node parent, CharSequence content)
throws CoreException {
- Var var = ElVarSearcher.findVar(parent);
+ Var var = fELVarSearcher.findVar(parent);
if(var!=null) {
fVarListForCurentValidatedNode.add(var);
}
@@ -696,7 +694,7 @@
private void locateMatchesInString(IFile file, String string, int offset, CharSequence content) throws CoreException {
int startEl = string.indexOf("#{"); //$NON-NLS-1$
if(startEl>-1) {
- ELParser parser = ELParserFactory.createJbossParser();
+ ELParser parser = ELParserUtil.getJbossFactory().createParser();
ELModel model = parser.parse(string);
List<ELInstance> is = model.getInstances();
for (ELInstance i: is) {
@@ -718,6 +716,7 @@
ELInvocationExpression expr = token;
while(expr != null) {
List<IJavaElement> elements = null;
+ SeamELCompletionEngine fCompletionEngine = new SeamELCompletionEngine(fCurrentSeamProject);
try {
elements = fCompletionEngine.getJavaElementsForELOperandTokens(fCurrentSeamProject, file, expr);
} catch (StringIndexOutOfBoundsException e) {
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/text/java/SeamELProposalProcessor.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/text/java/SeamELProposalProcessor.java 2008-10-01 15:34:53 UTC (rev 10602)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/text/java/SeamELProposalProcessor.java 2008-10-01 15:35:28 UTC (rev 10603)
@@ -54,14 +54,14 @@
import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
import org.eclipse.wst.xml.ui.internal.contentassist.AbstractContentAssistProcessor;
import org.eclipse.wst.xml.ui.internal.util.SharedXMLEditorPluginImageHelper;
+import org.jboss.tools.common.el.core.resolver.ElVarSearcher;
+import org.jboss.tools.common.el.core.resolver.Var;
import org.jboss.tools.common.model.ui.texteditors.xmleditor.XMLTextEditor;
import org.jboss.tools.common.text.ext.IEditorWrapper;
import org.jboss.tools.common.text.ext.util.Utils;
import org.jboss.tools.seam.core.ISeamProject;
import org.jboss.tools.seam.core.SeamCorePlugin;
-import org.jboss.tools.seam.internal.core.el.ElVarSearcher;
import org.jboss.tools.seam.internal.core.el.SeamELCompletionEngine;
-import org.jboss.tools.seam.internal.core.el.Var;
import org.jboss.tools.seam.ui.SeamGuiPlugin;
import org.w3c.dom.Attr;
import org.w3c.dom.Document;
@@ -263,8 +263,6 @@
}
- private final SeamELCompletionEngine fEngine= new SeamELCompletionEngine();
-
/**
* Creates a new Seam EL completion proposal computer.
*/
@@ -350,7 +348,9 @@
//TODO Now this will work only for EL.
// If we need CA for expressions/variables without #{}, it should be handled separately.
- String prefix= SeamELCompletionEngine.getPrefix(viewer, offset, start, end);
+
+ SeamELCompletionEngine engine = new SeamELCompletionEngine(seamProject);
+ String prefix= engine.getPrefix(viewer, offset, start, end);
prefix = (prefix == null ? "" : prefix); //$NON-NLS-1$
String proposalPrefix = "";
@@ -388,11 +388,13 @@
proposalSufix = "}";
}
- List<Var> vars = ElVarSearcher.findAllVars(viewer, offset);
+ ElVarSearcher varSearcher = new ElVarSearcher(engine);
+ List<Var> vars = varSearcher.findAllVars(viewer, offset);
//TODO
- List<String> suggestions = fEngine.getCompletions(seamProject, file, document, prefix, offset + proposalPrefix.length() - prefix.length(), false, vars, start, end);
+ SeamELCompletionEngine fEngine= new SeamELCompletionEngine(seamProject);
+ List<String> suggestions = fEngine.getCompletions(file, document, prefix, offset + proposalPrefix.length() - prefix.length(), false, vars, start, end);
List<String> uniqueSuggestions = fEngine.makeUnique(suggestions);
List<ICompletionProposal> result= new ArrayList<ICompletionProposal>();
17 years, 3 months
JBoss Tools SVN: r10602 - trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-10-01 11:34:53 -0400 (Wed, 01 Oct 2008)
New Revision: 10602
Modified:
trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/SeamBeanHyperlinkPartitioner.java
trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/SeamELInJavaStringHyperlinkDetector.java
Log:
JBIDE-1497.
Refactoring
Modified: trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/SeamBeanHyperlinkPartitioner.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/SeamBeanHyperlinkPartitioner.java 2008-10-01 15:34:23 UTC (rev 10601)
+++ trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/SeamBeanHyperlinkPartitioner.java 2008-10-01 15:34:53 UTC (rev 10602)
@@ -21,6 +21,8 @@
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
import org.jboss.tools.common.el.core.model.ELExpression;
import org.jboss.tools.common.el.core.model.ELInvocationExpression;
+import org.jboss.tools.common.el.core.resolver.ElVarSearcher;
+import org.jboss.tools.common.el.core.resolver.Var;
import org.jboss.tools.common.text.ext.hyperlink.AbstractHyperlinkPartitioner;
import org.jboss.tools.common.text.ext.hyperlink.HyperlinkRegion;
import org.jboss.tools.common.text.ext.hyperlink.IHyperLinkPartitionPriority;
@@ -31,9 +33,7 @@
import org.jboss.tools.common.text.ext.util.Utils;
import org.jboss.tools.seam.core.ISeamProject;
import org.jboss.tools.seam.core.SeamCorePlugin;
-import org.jboss.tools.seam.internal.core.el.ElVarSearcher;
import org.jboss.tools.seam.internal.core.el.SeamELCompletionEngine;
-import org.jboss.tools.seam.internal.core.el.Var;
import org.jboss.tools.seam.text.ext.SeamExtPlugin;
import org.w3c.dom.Attr;
import org.w3c.dom.Document;
@@ -202,8 +202,10 @@
start = ((IDOMNode)n).getStartOffset();
end = ((IDOMNode)n).getEndOffset();
}
-
- ELInvocationExpression tokens = SeamELCompletionEngine.findExpressionAtOffset(document, offset, start, end);
+
+ //TODO do we have and need seam project here?
+ SeamELCompletionEngine engine = new SeamELCompletionEngine(null);
+ ELInvocationExpression tokens = engine.findExpressionAtOffset(document, offset, start, end);
if (tokens == null /*|| tokens.size() == 0*/)
return null; // No EL Operand found
@@ -260,13 +262,14 @@
if (seamProject == null)
return null;
- SeamELCompletionEngine engine= new SeamELCompletionEngine();
+ SeamELCompletionEngine engine = new SeamELCompletionEngine(seamProject);
String prefix = propText;
- ELExpression expr = SeamELCompletionEngine.parseOperand(prefix);
+ ELExpression expr = engine.parseOperand(prefix);
if (expr == null)
return null; // No EL Operand found
-
+ expr.getModel().shift(r.getOffset() - expr.getFirstToken().getStart());
+
List<IJavaElement> javaElements = null;
try {
javaElements = engine.getJavaElementsForELOperandTokens(seamProject, file, (ELInvocationExpression)expr);
@@ -278,9 +281,10 @@
return null;
}
+ //Do not need it, vars handled in getJavaElementsForELOperandTokens
if (javaElements == null || javaElements.size() == 0) {
// Try to find a local Var (a pair of variable-value attributes)
- ElVarSearcher varSearcher = new ElVarSearcher(seamProject, file, new SeamELCompletionEngine());
+ ElVarSearcher varSearcher = new ElVarSearcher(file, engine);
// Find a Var in the EL
int start = expr.getStartPosition();
int end = expr.getEndPosition();
@@ -288,11 +292,11 @@
if (expr.getText().length() == 0)
return null;
- List<Var> allVars= ElVarSearcher.findAllVars(file, start);
+ List<Var> allVars= varSearcher.findAllVars(file, start);
Var var = varSearcher.findVarForEl(expr.getText(), allVars, true);
if (var == null) {
// Find a Var in the current offset assuming that it's a node with var/value attribute pair
- var = ElVarSearcher.findVar(file, start);
+ var = varSearcher.findVar(file, start);
}
if (var == null)
return null;
Modified: trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/SeamELInJavaStringHyperlinkDetector.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/SeamELInJavaStringHyperlinkDetector.java 2008-10-01 15:34:23 UTC (rev 10601)
+++ trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/SeamELInJavaStringHyperlinkDetector.java 2008-10-01 15:34:53 UTC (rev 10602)
@@ -101,7 +101,7 @@
if (seamProject == null)
return null;
- SeamELCompletionEngine engine= new SeamELCompletionEngine();
+ SeamELCompletionEngine engine = new SeamELCompletionEngine(seamProject);
String prefix= engine.getJavaElementExpression(document, region.getOffset(), region, start, end);
prefix = (prefix == null ? "" : prefix);
17 years, 3 months
JBoss Tools SVN: r10601 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-10-01 11:34:23 -0400 (Wed, 01 Oct 2008)
New Revision: 10601
Added:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELOperandResolveStatus.java
Log:
JBIDE-1497.
Refactoring
Added: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELOperandResolveStatus.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELOperandResolveStatus.java (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELOperandResolveStatus.java 2008-10-01 15:34:23 UTC (rev 10601)
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.seam.internal.core.el;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.tools.common.el.core.model.ELInvocationExpression;
+import org.jboss.tools.common.el.core.resolver.ELOperandResolveStatus;
+import org.jboss.tools.seam.core.ISeamContextVariable;
+
+public class SeamELOperandResolveStatus extends ELOperandResolveStatus {
+ public List<ISeamContextVariable> usedVariables;
+
+ public SeamELOperandResolveStatus(ELInvocationExpression tokens) {
+ super(tokens);
+ }
+
+ /**
+ * @return List of Seam Context Variables used in EL.
+ */
+ public List<ISeamContextVariable> getUsedVariables() {
+ return (usedVariables == null ? new ArrayList<ISeamContextVariable>() : usedVariables);
+ }
+
+ /**
+ * @param usedVariables List of Seam Context Variables used in EL.
+ */
+ public void setUsedVariables(List<ISeamContextVariable> usedVariables) {
+ this.usedVariables = usedVariables;
+ }
+}
17 years, 3 months
JBoss Tools SVN: r10599 - in trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam: internal/core/el and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-10-01 11:34:00 -0400 (Wed, 01 Oct 2008)
New Revision: 10599
Removed:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/ElVarSearcher.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELOperandResolveStatus.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/Var.java
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamCoreBuilder.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELCompletionEngine.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamExpressionResolver.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamPromptingProvider.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamCoreValidator.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamELValidator.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamValidatorManager.java
Log:
JBIDE-1497.
Refactoring
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamCoreBuilder.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamCoreBuilder.java 2008-10-01 15:33:13 UTC (rev 10598)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamCoreBuilder.java 2008-10-01 15:34:00 UTC (rev 10599)
@@ -21,7 +21,7 @@
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.osgi.util.NLS;
-import org.jboss.tools.common.model.util.TypeInfoCollector;
+import org.jboss.tools.common.el.core.resolver.TypeInfoCollector;
import org.jboss.tools.seam.internal.core.SeamProject;
import org.jboss.tools.seam.internal.core.SeamResourceVisitor;
import org.jboss.tools.seam.internal.core.scanner.IFileScanner;
Deleted: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/ElVarSearcher.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/ElVarSearcher.java 2008-10-01 15:33:13 UTC (rev 10598)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/ElVarSearcher.java 2008-10-01 15:34:00 UTC (rev 10599)
@@ -1,287 +0,0 @@
- /*******************************************************************************
- * Copyright (c) 2007 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.seam.internal.core.el;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
-import org.eclipse.wst.sse.ui.internal.contentassist.ContentAssistUtils;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMAttr;
-import org.jboss.tools.common.el.core.model.ELExpression;
-import org.jboss.tools.seam.core.ISeamProject;
-import org.jboss.tools.seam.core.SeamCorePlugin;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-/**
- * This class helps to find var/value attributes in DOM tree.
- * @author Alexey Kazakov
- */
-public class ElVarSearcher {
-
- private final static String VAR_ATTRIBUTE_NAME = "var";
- private final static String VALUE_ATTRIBUTE_NAME = "value";
-
- private ISeamProject project;
- private IFile file;
- private SeamELCompletionEngine engine;
-
- /**
- * Constructor.
- * @param project Seam project where we will look for vars.
- * @param file File where we will look for vars.
- * @param engine Competion Engine that we will use for resolving vars.
- */
- public ElVarSearcher(ISeamProject project, IFile file, SeamELCompletionEngine engine) {
- this.project = project;
- this.file = file;
- this.engine = engine;
- }
-
- /**
- * Constructor.
- * @param project Seam project where we will look for vars.
- * @param engine Competion Engine that we will use for resolving vars.
- */
- public ElVarSearcher(ISeamProject project, SeamELCompletionEngine engine) {
- this(project, null, engine);
- }
-
- /**
- * @param file File where we will look for vars.
- */
- public void setFile(IFile file) {
- this.file = file;
- }
-
- /**
- * @param viewer
- * @param offset
- * @return
- */
- public static Node getNode(ITextViewer viewer, int offset) {
- IndexedRegion treeNode = ContentAssistUtils.getNodeAt(viewer, offset);
- if(treeNode instanceof Node) {
- return (Node)treeNode;
- }
- return null;
- }
-
- /**
- * @param viewer
- * @param offset
- * @return
- */
-
- public static Node getNode(IFile file, int offset) {
- IndexedRegion treeNode = getNodeAt(file, offset);
- if(treeNode instanceof Node) {
- return (Node)treeNode;
- }
- return null;
- }
-
- /**
- * Returns the closest IndexedRegion for the offset and viewer allowing
- * for differences between viewer offsets and model positions. note: this
- * method returns an IndexedRegion for read only
- *
- * @param file
- * the file whose document is used to compute the proposals
- * @param documentOffset
- * an offset within the document for which completions should
- * be computed
- * @return an IndexedRegion
- */
-
- public static IndexedRegion getNodeAt(IFile file, int documentOffset) {
-
- if (file == null)
- return null;
-
- IndexedRegion node = null;
- IModelManager mm = StructuredModelManager.getModelManager();
- IStructuredModel model = null;
- if (mm != null) {
- try {
- model = mm.getModelForRead(file);
- } catch (IOException e) {
- return null;
- } catch (CoreException e) {
- return null;
- }
- }
- try {
- if (model != null) {
- int lastOffset = documentOffset;
- node = model.getIndexedRegion(documentOffset);
- while (node == null && lastOffset >= 0) {
- lastOffset--;
- node = model.getIndexedRegion(lastOffset);
- }
- }
- } finally {
- if (model != null)
- model.releaseFromRead();
- }
- return node;
- }
-
- /**
- * @param node
- * @return All var/value that can be used in this position and null if can't find anyone.
- */
- public static List<Var> findAllVars(ITextViewer viewer, int offset) {
- Node node = getNode(viewer, offset);
- if(node!=null) {
- return findAllVars(node);
- }
- return null;
- }
-
- /**
- * @param node
- * @return All var/value that can be used in this position and null if can't find anyone.
- */
- public static List<Var> findAllVars(IFile file, int offset) {
- Node node = getNode(file, offset);
- if(node!=null) {
- return findAllVars(node);
- }
- return null;
- }
-
- /**
- * @param node
- * @return All var/value that can be used in node and null if can't find anyone.
- */
- public static List<Var> findAllVars(Node node) {
- ArrayList<Var> vars = null;
- Node parentNode = node.getParentNode();
- while(parentNode!=null) {
- Var var = findVar(parentNode);
- if(var!=null) {
- if(vars == null) {
- vars = new ArrayList<Var>();
- }
- vars.add(0, var);
- }
- parentNode = parentNode.getParentNode();
- }
- return vars;
- }
-
- /**
- * @param node
- * @return found var/value that can be used in this position and null if can't find anyone.
- */
- public static Var findVar(IFile file, int offset) {
- Node node = getNode(file, offset);
- if(node!=null) {
- return findVar(node);
- }
- return null;
- }
-
- /**
- * Finds var/value attribute in node
- * @param node
- * @param vars
- * @return found var/value or null
- */
- public static Var findVar(Node node) {
- if(node!=null && Node.ELEMENT_NODE == node.getNodeType()) {
- Element element = (Element)node;
- String var = element.getAttribute(VAR_ATTRIBUTE_NAME);
- if(var!=null) {
- int declOffset = 0;
- int declLength = 0;
- Node varAttr = element.getAttributeNode(VAR_ATTRIBUTE_NAME);
- if (varAttr instanceof IDOMAttr) {
- int varNameStart = ((IDOMAttr)varAttr).getNameRegionStartOffset();
- int varNameEnd = ((IDOMAttr)varAttr).getNameRegionEndOffset();
- declOffset = varNameStart;
- declLength = varNameEnd - varNameStart;
- }
- var = var.trim();
- if(!"".equals(var)) {
- String value = element.getAttribute(VALUE_ATTRIBUTE_NAME);
- if(value!=null) {
- value = value.trim();
- Var newVar = new Var(var, value, declOffset, declLength);
- if(newVar.getElToken()!=null) {
- return newVar;
- }
- }
- }
- }
- }
-
- return null;
- }
-
- /**
- * Finds var in list of vars that is used in given EL.
- * @param el EL without brackets.
- * @param vars
- * @param initializeNestedVars
- * @return
- */
- public Var findVarForEl(String el, List<Var> vars, boolean initializeNestedVars) {
- if(vars!=null) {
- ArrayList<Var> parentVars = new ArrayList<Var>();
- for (Var var : vars) {
- ELExpression token = var.getElToken();
- if(token!=null && !token.getText().endsWith(".")) {
- String varName = var.getName();
- if(el.startsWith(varName)) { //TODO it was el.equals(varName) and did not work. Why?
- if(var.getElToken()!=null && initializeNestedVars) {
- Var parentVar = findVarForEl(var.getElToken().getText(), parentVars, true);
- if(parentVar!=null) {
- ELExpression resolvedToken = parentVar.getResolvedElToken();
- if(resolvedToken==null && parentVar.getElToken()!=null) {
- try {
- // Initialize parent vars.
- engine.resolveSeamELOperand(project, file, var.getElToken(), true, parentVars, this);
- resolvedToken = parentVar.getResolvedElToken();
- } catch (StringIndexOutOfBoundsException e) {
- SeamCorePlugin.getPluginLog().logError(e);
- } catch (BadLocationException e) {
- SeamCorePlugin.getPluginLog().logError(e);
- }
- }
- if(resolvedToken!=null) {
- String oldText = var.getElToken().getText();
- String newValue = "#{" + resolvedToken.getText() + oldText.substring(parentVar.getName().length()) + "}";
- var.value = newValue;
- var.elToken = var.parseEl(newValue);
- }
- }
- }
- return var;
- }
- }
- parentVars.add(var);
- }
- }
- return null;
- }
-
-}
\ No newline at end of file
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELCompletionEngine.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELCompletionEngine.java 2008-10-01 15:33:13 UTC (rev 10598)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELCompletionEngine.java 2008-10-01 15:34:00 UTC (rev 10599)
@@ -38,8 +38,13 @@
import org.jboss.tools.common.el.core.model.ELUtil;
import org.jboss.tools.common.el.core.parser.ELParser;
import org.jboss.tools.common.el.core.parser.ELParserFactory;
+import org.jboss.tools.common.el.core.parser.ELParserUtil;
import org.jboss.tools.common.el.core.parser.LexicalToken;
-import org.jboss.tools.common.model.util.TypeInfoCollector;
+import org.jboss.tools.common.el.core.resolver.ELCompletionEngine;
+import org.jboss.tools.common.el.core.resolver.ELOperandResolveStatus;
+import org.jboss.tools.common.el.core.resolver.ElVarSearcher;
+import org.jboss.tools.common.el.core.resolver.TypeInfoCollector;
+import org.jboss.tools.common.el.core.resolver.Var;
import org.jboss.tools.seam.core.ISeamComponent;
import org.jboss.tools.seam.core.ISeamContextVariable;
import org.jboss.tools.seam.core.ISeamProject;
@@ -52,14 +57,21 @@
*
* @author Jeremy
*/
-public final class SeamELCompletionEngine {
+public final class SeamELCompletionEngine implements ELCompletionEngine {
+ ISeamProject project;
+ ELParserFactory factory = ELParserUtil.getJbossFactory();
/**
* Constructs SeamELCompletionEngine object
*/
- public SeamELCompletionEngine() {
+ public SeamELCompletionEngine(ISeamProject project) {
+ this.project = project;
}
+ public ELParserFactory getParserFactory() {
+ return factory;
+ }
+
/**
* Create the array of suggestions.
*
@@ -74,9 +86,9 @@
* @return the list of all possible suggestions
* @throws BadLocationException if accessing the current document fails
*/
- public List<String> getCompletions(ISeamProject project, IFile file, IDocument document, CharSequence prefix,
+ public List<String> getCompletions(IFile file, IDocument document, CharSequence prefix,
int position, List<Var> vars, int start, int end) throws BadLocationException, StringIndexOutOfBoundsException {
- return getCompletions(project, file, document, prefix, position, false, vars, start, end);
+ return getCompletions(file, document, prefix, position, false, vars, start, end);
}
/**
@@ -103,13 +115,13 @@
* @throws BadLocationException if accessing the current document fails
* @throws StringIndexOutOfBoundsException
*/
- public List<String> getCompletions(ISeamProject project, IFile file, IDocument document, CharSequence prefix,
+ public List<String> getCompletions(IFile file, IDocument document, CharSequence prefix,
int position, boolean returnEqualedVariablesOnly, List<Var> vars, int start, int end) throws BadLocationException, StringIndexOutOfBoundsException {
List<String> completions = new ArrayList<String>();
String prefix2 = getPrefix(document, position + prefix.length(), start, end);
- SeamELOperandResolveStatus status = resolveSeamELOperand(project, file, parseOperand(prefix2), returnEqualedVariablesOnly, vars, new ElVarSearcher(project, file, this));
+ ELOperandResolveStatus status = resolveELOperand(file, parseOperand(prefix2), returnEqualedVariablesOnly, vars, new ElVarSearcher(file, this));
if (status.isOK()) {
completions.addAll(status.getProposals());
}
@@ -131,7 +143,7 @@
return proposals;
}
- public SeamELOperandResolveStatus resolveSeamELOperand(ISeamProject project, IFile file, ELExpression operand,
+ public SeamELOperandResolveStatus resolveELOperand(IFile file, ELExpression operand,
boolean returnEqualedVariablesOnly, List<Var> vars, ElVarSearcher varSearcher) throws BadLocationException, StringIndexOutOfBoundsException {
if(operand == null) {
//TODO
@@ -142,7 +154,7 @@
String suffix = "";
String newEl = oldEl;
if(var!=null) {
- TypeInfoCollector.MemberInfo member = resolveSeamEL(project, file, var.getElToken());
+ TypeInfoCollector.MemberInfo member = resolveSeamEL(file, var.getElToken());
if(member!=null && !member.getType().isArray()) {
IType type = member.getMemberType();
if(type!=null) {
@@ -164,7 +176,7 @@
boolean prefixWasChanged = newEl != oldEl;
ELExpression newOperand = (prefixWasChanged) ? parseOperand(newEl) : operand;
- SeamELOperandResolveStatus status = resolveSeamELOperand(project, file, newOperand, returnEqualedVariablesOnly);
+ SeamELOperandResolveStatus status = resolveELOperand(file, newOperand, returnEqualedVariablesOnly);
if(prefixWasChanged) {
ELInvocationExpression newLastResolvedToken = status.getLastResolvedToken();
@@ -199,10 +211,10 @@
return status;
}
- public static ELExpression parseOperand(String operand) {
+ public ELExpression parseOperand(String operand) {
if(operand == null) return null;
String el = (operand.indexOf("#{") < 0) ? "#{" + operand + "}" : operand;
- ELParser p = ELParserFactory.createJbossParser();
+ ELParser p = factory.createParser();
ELModel model = p.parse(el);
List<ELInstance> is = model.getInstances();
if(is.size() == 0) return null;
@@ -218,10 +230,9 @@
* @throws BadLocationException
* @throws StringIndexOutOfBoundsException
*/
- public TypeInfoCollector.MemberInfo resolveSeamEL(ISeamProject project, IFile file, ELExpression operand) throws BadLocationException, StringIndexOutOfBoundsException {
+ public TypeInfoCollector.MemberInfo resolveSeamEL(IFile file, ELExpression operand) throws BadLocationException, StringIndexOutOfBoundsException {
if(!(operand instanceof ELInvocationExpression)) return null;
- SeamELOperandResolveStatus status = resolveSeamELOperand(project, file, operand, true);
-
+ ELOperandResolveStatus status = resolveELOperand(file, operand, true);
return status.getMemberOfResolvedOperand();
}
@@ -240,7 +251,7 @@
if(!el.startsWith("#{")) {
el = "#{" + el + "}";
}
- ELParser parser = ELParserFactory.createJbossParser();
+ ELParser parser = factory.createParser();
ELModel model = parser.parse(el);
List<ELInstance> is = model.getInstances();
if(is.size() < 1) return resolvedVariables;
@@ -253,17 +264,17 @@
boolean isIncomplete = expr.getType() == ELObjectType.EL_PROPERTY_INVOCATION
&& ((ELPropertyInvocation) expr).getName() == null;
- SeamELOperandResolveStatus status = new SeamELOperandResolveStatus(expr);
+ ELOperandResolveStatus status = new ELOperandResolveStatus(expr);
ELInvocationExpression left = expr;
ScopeType scope = getScope(project, file);
if (expr.getLeft() == null && isIncomplete) {
- resolvedVariables = resolveVariables(project, scope, expr, true, true);
+ resolvedVariables = resolveVariables(scope, expr, true, true);
} else {
while (left != null) {
List<ISeamContextVariable> resolvedVars = new ArrayList<ISeamContextVariable>();
- resolvedVars = resolveVariables(project, scope, left,
+ resolvedVars = resolveVariables(scope, left,
left == expr, true);
if (resolvedVars != null && !resolvedVars.isEmpty()) {
resolvedVariables = resolvedVars;
@@ -281,7 +292,7 @@
return resolvedVariables;
}
- public SeamELOperandResolveStatus resolveSeamELOperand(ISeamProject project, IFile file, ELExpression operand,
+ public SeamELOperandResolveStatus resolveELOperand(IFile file, ELExpression operand,
boolean returnEqualedVariablesOnly) throws BadLocationException, StringIndexOutOfBoundsException {
if(!(operand instanceof ELInvocationExpression)) {
return new SeamELOperandResolveStatus(null);
@@ -298,13 +309,12 @@
ScopeType scope = getScope(project, file);
if (expr.getLeft() == null && isIncomplete) {
- resolvedVariables = resolveVariables(project, scope,
- expr, true,
+ resolvedVariables = resolveVariables(scope, expr, true,
returnEqualedVariablesOnly);
} else {
while(left != null) {
List<ISeamContextVariable>resolvedVars = new ArrayList<ISeamContextVariable>();
- resolvedVars = resolveVariables(project, scope,
+ resolvedVars = resolveVariables(scope,
left, left == expr,
returnEqualedVariablesOnly);
if (resolvedVars != null && !resolvedVars.isEmpty()) {
@@ -327,7 +337,7 @@
isIncomplete) {
// no vars are resolved
// the tokens are the part of var name ended with a separator (.)
- resolvedVariables = resolveVariables(project, scope, expr, true, returnEqualedVariablesOnly);
+ resolvedVariables = resolveVariables(scope, expr, true, returnEqualedVariablesOnly);
Set<String> proposals = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
for (ISeamContextVariable var : resolvedVariables) {
String varName = var.getName();
@@ -383,7 +393,7 @@
private List<TypeInfoCollector.MemberInfo> resolveSegment(ELInvocationExpression expr,
List<TypeInfoCollector.MemberInfo> members,
- SeamELOperandResolveStatus status,
+ ELOperandResolveStatus status,
boolean returnEqualedVariablesOnly) {
LexicalToken lt = (expr instanceof ELPropertyInvocation)
? ((ELPropertyInvocation)expr).getName()
@@ -444,11 +454,10 @@
private void resolveLastSegment(ELInvocationExpression expr,
List<TypeInfoCollector.MemberInfo> members,
- SeamELOperandResolveStatus status,
+ ELOperandResolveStatus status,
boolean returnEqualedVariablesOnly) {
Set<String> proposals = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
if (expr.getType() == ELObjectType.EL_PROPERTY_INVOCATION && ((ELPropertyInvocation)expr).getName() == null) {
-// if (token.getType() == ELOperandToken.EL_SEPARATOR_TOKEN) {
// return all the methods + properties
for (TypeInfoCollector.MemberInfo mbr : members) {
if (mbr instanceof MessagesInfo) {
@@ -506,15 +515,8 @@
}
for (TypeInfoCollector.MemberPresentation proposal : proposalsToFilter) {
// We do expect nothing but name for method tokens (No round brackets)
- LexicalToken lt = (expr instanceof ELPropertyInvocation)
- ? ((ELPropertyInvocation)expr).getName()
- : (expr instanceof ELMethodInvocation)
- ? ((ELMethodInvocation)expr).getName()
- : null;
- String filter = lt != null ? lt.getText() : ""; //token.getText();
-// if (filter.indexOf('(') != -1) {
-// filter = filter.substring(0, filter.indexOf('('));
-// }
+ String filter = expr.getMemberName();
+ if(filter == null) filter = "";
if(returnEqualedVariablesOnly) {
// This is used for validation.
if (proposal.getPresentation().equals(filter)) {
@@ -596,34 +598,8 @@
return null;
}
-/**
- private List<ISeamContextVariable> resolveVariables(ISeamProject project, ScopeType scope, List<ELOperandToken>part, List<ELOperandToken> tokens, boolean onlyEqualNames) {
+ private List<ISeamContextVariable> resolveVariables(ScopeType scope, ELInvocationExpression expr, boolean isFinal, boolean onlyEqualNames) {
List<ISeamContextVariable>resolvedVars = new ArrayList<ISeamContextVariable>();
- String varName = computeVariableName(part);
- if (varName != null) {
- resolvedVars = SeamExpressionResolver.resolveVariables(project, scope, varName, onlyEqualNames);
- }
- if (resolvedVars != null && resolvedVars.size() > 0) {
- List<ISeamContextVariable> newResolvedVars = new ArrayList<ISeamContextVariable>();
- for (ISeamContextVariable var : resolvedVars) {
- if(!areEqualExpressions(part, tokens)) {
- // Do filter by equals (name)
- // In case of the last pass - do not filter by startsWith(name) instead of equals
- if (varName.equals(var.getName())) {
- newResolvedVars.add(var);
- }
- } else {
- newResolvedVars.add(var);
- }
- }
- return newResolvedVars;
- }
- return new ArrayList<ISeamContextVariable>();
- }
-*/
-
- private List<ISeamContextVariable> resolveVariables(ISeamProject project, ScopeType scope, ELInvocationExpression expr, boolean isFinal, boolean onlyEqualNames) {
- List<ISeamContextVariable>resolvedVars = new ArrayList<ISeamContextVariable>();
String varName = expr.toString();
if (varName != null) {
resolvedVars = SeamExpressionResolver.resolveVariables(project, scope, varName, onlyEqualNames);
@@ -646,23 +622,6 @@
return new ArrayList<ISeamContextVariable>();
}
-/**
- public static List<List<ELOperandToken>> getPossibleVarsFromPrefix(List<ELOperandToken>prefix) {
- ArrayList<List<ELOperandToken>> result = new ArrayList<List<ELOperandToken>>();
- for (int i = 0; prefix != null && i < prefix.size(); i++) {
- ELOperandToken lastToken = prefix.get(i);
- if (lastToken.getType() != ELOperandToken.EL_SEPARATOR_TOKEN) {
- ArrayList<ELOperandToken> prefixPart = new ArrayList<ELOperandToken>();
- for (int j = 0; j <= i; j++) {
- prefixPart.add(prefix.get(j));
- }
- result.add(0, prefixPart);
- }
- }
- return result;
- }
-*/
-
/**
* Removes duplicates of completion strings
*
@@ -697,7 +656,7 @@
* @return
* @throws BadLocationException
*/
- public static String getPrefix(ITextViewer viewer, int offset, int start, int end) throws StringIndexOutOfBoundsException {
+ public String getPrefix(ITextViewer viewer, int offset, int start, int end) throws StringIndexOutOfBoundsException {
IDocument doc= viewer.getDocument();
if (doc == null || offset > doc.getLength())
return null;
@@ -714,7 +673,7 @@
* @return
* @throws StringIndexOutOfBoundsException
*/
- public static String getPrefix(IDocument document, int offset, int start, int end) throws StringIndexOutOfBoundsException {
+ public String getPrefix(IDocument document, int offset, int start, int end) throws StringIndexOutOfBoundsException {
if (document == null || document.get() == null || offset > document.get().length())
return null;
ELInvocationExpression expr = findExpressionAtOffset(document, offset, start, end);
@@ -773,154 +732,6 @@
return getJavaElementsForELOperandTokens(project, file, (ELInvocationExpression)expr);
}
-/**
- public List<IJavaElement> getJavaElementsForELOperandTokens(
- ISeamProject project, IFile file,
- List<ELOperandToken> tokens) throws BadLocationException, StringIndexOutOfBoundsException {
- List<IJavaElement> res= new ArrayList<IJavaElement>();
- if (tokens == null || tokens.size() == 0 || tokens.get(tokens.size() - 1).getType() == ELOperandToken.EL_SEPARATOR_TOKEN)
- return res;
-
- List<ELOperandToken> resolvedExpressionPart = new ArrayList<ELOperandToken>();
- List<ISeamContextVariable> resolvedVariables = new ArrayList<ISeamContextVariable>();
- ScopeType scope = getScope(project, file);
- List<List<ELOperandToken>> variations = getPossibleVarsFromPrefix(tokens);
-
- if (variations.isEmpty()) {
- resolvedVariables = resolveVariables(project, scope, tokens, tokens, true);
- } else {
- for (List<ELOperandToken> variation : variations) {
- List<ISeamContextVariable>resolvedVars = new ArrayList<ISeamContextVariable>();
- resolvedVars = resolveVariables(project, scope, variation, tokens, true);
- if (resolvedVars != null && !resolvedVars.isEmpty()) {
- resolvedVariables = resolvedVars;
- resolvedExpressionPart = variation;
- break;
- }
- }
- }
-
- // Here we have a list of vars for some part of expression
- // OK. we'll proceed with members of these vars
- if (areEqualExpressions(resolvedExpressionPart, tokens)) {
- // First segment is the last one
- for (ISeamContextVariable var : resolvedVariables) {
- IMember member = SeamExpressionResolver.getMemberByVariable(var, true);
- if (member instanceof IJavaElement){
- res.add((IJavaElement)member);
- }
- }
- return res;
- }
-
- // First segment is found - proceed with next tokens
- int startTokenIndex = (resolvedExpressionPart == null ? 0 : resolvedExpressionPart.size());
- List<TypeInfoCollector.MemberInfo> members = new ArrayList<TypeInfoCollector.MemberInfo>();
- for (ISeamContextVariable var : resolvedVariables) {
- TypeInfoCollector.MemberInfo member = SeamExpressionResolver.getMemberInfoByVariable(var, true);
- if (member != null && !members.contains(member))
- members.add(member);
- }
- for (int i = startTokenIndex;
- tokens != null && i < tokens.size() &&
- members != null && members.size() > 0;
- i++) {
- ELOperandToken token = tokens.get(i);
-
- if (i < tokens.size() - 1) { // inside expression
- if (token.getType() == ELOperandToken.EL_SEPARATOR_TOKEN)
- // proceed with next token
- continue;
-
- if (token.isNameToken()) {
- // Find properties for the token
- String name = token.getText();
- List<TypeInfoCollector.MemberInfo> newMembers = new ArrayList<TypeInfoCollector.MemberInfo>();
- for (TypeInfoCollector.MemberInfo mbr : members) {
- TypeInfoCollector infos = mbr.getTypeCollector();
- List<TypeInfoCollector.MemberInfo> properties = infos.getProperties();
- for (TypeInfoCollector.MemberInfo property : properties) {
- StringBuffer propertyName = new StringBuffer(property.getName());
- if (property instanceof TypeInfoCollector.MethodInfo) { // Setter or getter
- propertyName.delete(0, 3);
- propertyName.setCharAt(0, Character.toLowerCase(propertyName.charAt(0)));
- }
- if (name.equals(propertyName.toString())) {
- newMembers.add(property);
- }
- }
- }
- members = newMembers;
- }
- if (token.getType() == ELOperandToken.EL_METHOD_TOKEN) {
- // Find methods for the token
- String name = token.getText();
- if (name.indexOf('(') != -1) {
- name = name.substring(0, name.indexOf('('));
- }
- List<TypeInfoCollector.MemberInfo> newMembers = new ArrayList<TypeInfoCollector.MemberInfo>();
- for (TypeInfoCollector.MemberInfo mbr : members) {
- TypeInfoCollector infos = mbr.getTypeCollector();
- List<TypeInfoCollector.MemberInfo> methods = infos.getMethods();
- for (TypeInfoCollector.MemberInfo method : methods) {
- if (method instanceof TypeInfoCollector.MethodInfo
- && name.equals(method.getName())) {
- newMembers.add(method);
- }
- }
- }
- members = newMembers;
- }
- } else { // Last segment
- List<IJavaElement> javaElements = new ArrayList<IJavaElement>();
- if (token.getType() == ELOperandToken.EL_VARIABLE_NAME_TOKEN ||
- token.getType() == ELOperandToken.EL_PROPERTY_NAME_TOKEN ||
- token.getType() == ELOperandToken.EL_METHOD_TOKEN) {
- // return filtered methods + properties
- List<TypeInfoCollector.MemberInfo> javaElementInfosToFilter = new ArrayList<TypeInfoCollector.MemberInfo>();
- for (TypeInfoCollector.MemberInfo mbr : members) {
- TypeInfoCollector infos = mbr.getTypeCollector();
- javaElementInfosToFilter.addAll(infos.getMethods());
- javaElementInfosToFilter.addAll(infos.getProperties());
- }
-
- for (TypeInfoCollector.MemberInfo info : javaElementInfosToFilter) {
- // We do expect nothing but name for method tokens (No round brackets)
- String filter = token.getText();
- if (token.getType() == ELOperandToken.EL_METHOD_TOKEN) {
- if (filter.indexOf('(') >=0)
- filter = filter.substring(0, filter.indexOf('('));
- }
- // This is used for validation.
- if (info.getName().equals(filter)) {
- javaElements.add(info.getJavaElement());
- } else {
- if (info instanceof TypeInfoCollector.MethodInfo) {
- TypeInfoCollector.MethodInfo methodInfo = (TypeInfoCollector.MethodInfo)info;
- if(methodInfo.isGetter() || methodInfo.isSetter()) {
- StringBuffer name = new StringBuffer(methodInfo.getName());
- if(methodInfo.getName().startsWith("i")) { //$NON-NLS-1$
- name.delete(0, 2);
- } else {
- name.delete(0, 3);
- }
- name.setCharAt(0, Character.toLowerCase(name.charAt(0)));
- String propertyName = name.toString();
- if (propertyName.equals(filter)) {
- javaElements.add(methodInfo.getJavaElement());
- }
- }
- }
- }
- }
- }
- res.addAll(javaElements);
- }
- }
- return res;
- }
-*/
-
/**
* Create the array of suggestions.
* @param project Seam project
@@ -945,17 +756,50 @@
while(left != null) {
List<ISeamContextVariable>resolvedVars = new ArrayList<ISeamContextVariable>();
- resolvedVars = resolveVariables(project, scope,
- left, left == expr,
- true);
+ resolvedVars = resolveVariables(scope, left, left == expr, true);
if (resolvedVars != null && !resolvedVars.isEmpty()) {
resolvedVariables = resolvedVars;
break;
}
- int y = 0;
left = (ELInvocationExpression)left.getLeft();
}
+ if(resolvedVariables.size() == 0) {
+
+ ElVarSearcher varSearcher = new ElVarSearcher(this);
+ List<Var> vars = varSearcher.findAllVars(file, expr.getStartPosition());
+ String oldEl = expr.getText();
+ Var var = varSearcher.findVarForEl(oldEl, vars, true);
+ String suffix = "";
+ String newEl = oldEl;
+ if(var!=null) {
+ TypeInfoCollector.MemberInfo member = resolveSeamEL(file, var.getElToken());
+ if(member!=null && !member.getType().isArray()) {
+ IType type = member.getMemberType();
+ if(type!=null) {
+ try {
+ if(TypeInfoCollector.isInstanceofType(type, "java.util.Map")) {
+ suffix = collectionAdditionForMapDataModel;
+ } else {
+ suffix = collectionAdditionForCollectionDataModel;
+ }
+ } catch (JavaModelException e) {
+ SeamCorePlugin.getPluginLog().logError(e);
+ }
+ }
+ }
+ if(var.getElToken() != null) {
+ newEl = var.getElToken().getText() + suffix + oldEl.substring(var.getName().length());
+ ELExpression newOperand = parseOperand(newEl);
+ if(newOperand instanceof ELInvocationExpression) {
+ return getJavaElementsForELOperandTokens(project, file, (ELInvocationExpression)newOperand);
+ }
+ }
+ }
+
+
+ }
+ int i = 2;
// Here we have a list of vars for some part of expression
// OK. we'll proceed with members of these vars
if (left == expr) {
@@ -1054,12 +898,8 @@
for (TypeInfoCollector.MemberInfo info : javaElementInfosToFilter) {
// We do expect nothing but name for method tokens (No round brackets)
- LexicalToken lt = (expr instanceof ELPropertyInvocation)
- ? ((ELPropertyInvocation)expr).getName()
- : (expr instanceof ELMethodInvocation)
- ? ((ELMethodInvocation)expr).getName()
- : null;
- String filter = lt != null ? lt.getText() : ""; //token.getText();
+ String filter = expr.getMemberName();
+ if(filter == null) filter = "";
// This is used for validation.
if (info.getName().equals(filter)) {
@@ -1095,7 +935,7 @@
* @param end end of relevant region in document
* @return
*/
- public static ELInvocationExpression findExpressionAtOffset(IDocument document, int offset, int start, int end) {
+ public ELInvocationExpression findExpressionAtOffset(IDocument document, int offset, int start, int end) {
String content = document.get();
//TODO this naive calculations should be removed;
@@ -1103,7 +943,7 @@
if(start <= 0) start = guessStart(content, offset);
if(end >= content.length()) end = guessEnd(content, offset);
- ELParser parser = ELParserFactory.createJbossParser();
+ ELParser parser = factory.createParser();
ELModel model = parser.parse(content, start, end - start);
return ELUtil.findExpression(model, offset);
@@ -1133,54 +973,4 @@
return content.length();
}
-/**
- public static List<ELOperandToken> findTokensAtOffset(IDocument document, int offset) {
- List<ELOperandToken> result = new ArrayList<ELOperandToken>();
-
- int elStart = getELStart(document, offset);
-
- if (elStart == -1)
- elStart = offset;
-
- SeamELOperandTokenizerForward tokenizer = new SeamELOperandTokenizerForward(document, elStart);
- List<ELOperandToken> tokens = tokenizer.getTokens();
-
- ELOperandToken lastSeparator = null;
- for (int i = 0; tokens != null && i < tokens.size(); i++) {
- ELOperandToken token = tokens.get(i);
- if (token.getType() == ELOperandToken.EL_SEPARATOR_TOKEN) {
- lastSeparator = token;
- continue;
- }
- if (token.getType() == ELOperandToken.EL_VARIABLE_NAME_TOKEN ||
- token.getType() == ELOperandToken.EL_METHOD_TOKEN ||
- token.getType() == ELOperandToken.EL_PROPERTY_NAME_TOKEN) {
- if (token.getStart() <= offset) {
- if (lastSeparator != null)
- result.add(lastSeparator);
- result.add(token);
- } else {
- // Stop processing. We're not interrested of the rest of tokens
- break;
- }
- }
- }
-
- return result;
- }
-*/
-
-/**
- private static int getELStart(IDocument document, int offset) {
- SeamELOperandTokenizer tokenizer = new SeamELOperandTokenizer(document, offset);
- List<ELOperandToken> tokens = tokenizer.getTokens();
-
- if (tokens == null || tokens.size() == 0)
- return -1;
-
- ELOperandToken firstToken = tokens.get(0);
- return firstToken.getStart();
- }
-*/
-
}
Deleted: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELOperandResolveStatus.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELOperandResolveStatus.java 2008-10-01 15:33:13 UTC (rev 10598)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELOperandResolveStatus.java 2008-10-01 15:34:00 UTC (rev 10599)
@@ -1,174 +0,0 @@
-package org.jboss.tools.seam.internal.core.el;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeSet;
-
-import org.jboss.tools.common.el.core.model.ELInvocationExpression;
-import org.jboss.tools.common.model.util.TypeInfoCollector;
-import org.jboss.tools.seam.core.ISeamContextVariable;
-
-/**
- * Status of EL resolving.
- * @author Jeremy
- */
-public class SeamELOperandResolveStatus {
- private ELInvocationExpression tokens;
- public List<ISeamContextVariable> usedVariables;
- Map<String, TypeInfoCollector.MethodInfo> unpairedGettersOrSetters;
- Set<String> proposals;
- private ELInvocationExpression lastResolvedToken;
- private boolean isMapOrCollectionOrBundleAmoungTheTokens = false;
- private TypeInfoCollector.MemberInfo memberOfResolvedOperand;
-
- /**
- * @return MemberInfo of last segment of EL operand. Null if El is not resolved.
- */
- public TypeInfoCollector.MemberInfo getMemberOfResolvedOperand() {
- return memberOfResolvedOperand;
- }
-
- /**
- * Sets MemberInfo for last segment of EL operand.
- * @param lastResolvedMember
- */
- public void setMemberOfResolvedOperand(
- TypeInfoCollector.MemberInfo lastResolvedMember) {
- this.memberOfResolvedOperand = lastResolvedMember;
- }
-
- /**
- * Constructor
- * @param tokens Tokens of EL
- */
- public SeamELOperandResolveStatus(ELInvocationExpression tokens) {
- this.tokens = tokens;
- }
-
- /**
- * @return true if EL contains any not parametrized Collection or ResourceBundle.
- */
- public boolean isMapOrCollectionOrBundleAmoungTheTokens() {
- return this.isMapOrCollectionOrBundleAmoungTheTokens;
- }
-
- public void setMapOrCollectionOrBundleAmoungTheTokens() {
- this.isMapOrCollectionOrBundleAmoungTheTokens = true;
- }
-
- /**
- * @return true if EL is resolved.
- */
- public boolean isOK() {
- return !getProposals().isEmpty() || isMapOrCollectionOrBundleAmoungTheTokens();
- }
-
- /**
- * @return false if El is not resolved.
- */
- public boolean isError() {
- return !isOK();
- }
-
- /**
- * @return List of resolved tokens of EL. Includes separators "."
- */
- public ELInvocationExpression getResolvedTokens() {
- return lastResolvedToken;
- }
-
- /**
- * @return List of unresolved tokens of EL.
- */
- public ELInvocationExpression getUnresolvedTokens() {
- if(lastResolvedToken == tokens) return null;
- if(lastResolvedToken != null && (lastResolvedToken.getParent() instanceof ELInvocationExpression)) {
- return (ELInvocationExpression)lastResolvedToken.getParent();
- }
- ELInvocationExpression l = tokens;
- while(l != null && l.getLeft() != lastResolvedToken) {
- l = l.getLeft();
- }
- return l;
- }
-
- /**
- * @return Last resolved token of EL. Can be separator "." // no, change it
- */
- public ELInvocationExpression getLastResolvedToken() {
- return lastResolvedToken;
- }
-
- /**
- * @param lastResolvedToken Last resolved token of EL. Can be separator "."
- */
- public void setLastResolvedToken(ELInvocationExpression lastResolvedToken) {
- this.lastResolvedToken = lastResolvedToken;
- }
-
- /**
- * @return Tokens of EL.
- */
- public ELInvocationExpression getTokens() {
- return tokens;
- }
-
- /**
- * @param tokens Tokens of EL.
- */
- public void setTokens(ELInvocationExpression tokens) {
- this.tokens = tokens;
- }
-
- /**
- * @return Set of proposals for EL.
- */
- public Set<String> getProposals() {
- return proposals == null ? new TreeSet<String>() : proposals;
- }
-
- /**
- * @param proposals Set of proposals.
- */
- public void setProposals(Set<String> proposals) {
- this.proposals = proposals;
- }
-
- /**
- * @return List of Seam Context Variables used in EL.
- */
- public List<ISeamContextVariable> getUsedVariables() {
- return (usedVariables == null ? new ArrayList<ISeamContextVariable>() : usedVariables);
- }
-
- /**
- * @param usedVariables List of Seam Context Variables used in EL.
- */
- public void setUsedVariables(List<ISeamContextVariable> usedVariables) {
- this.usedVariables = usedVariables;
- }
-
- /**
- * @return Map of unpaired getters and setters (getters/setters without proper setters/getters).
- * of all properties used in EL.
- * Key - name of property.
- * Value - MethodInfo of existed getter/setter.
- */
- public Map<String, TypeInfoCollector.MethodInfo> getUnpairedGettersOrSetters() {
- if (unpairedGettersOrSetters == null) {
- unpairedGettersOrSetters = new HashMap<String, TypeInfoCollector.MethodInfo>();
- }
- return unpairedGettersOrSetters;
- }
-
- /**
- * Clear Map of unpaired getters and setters.
- */
- public void clearUnpairedGettersOrSetters() {
- getUnpairedGettersOrSetters().clear();
- }
-
-}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamExpressionResolver.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamExpressionResolver.java 2008-10-01 15:33:13 UTC (rev 10598)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamExpressionResolver.java 2008-10-01 15:34:00 UTC (rev 10599)
@@ -20,11 +20,11 @@
import org.eclipse.jdt.core.IMember;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaModelException;
-import org.jboss.tools.common.model.util.TypeInfoCollector;
-import org.jboss.tools.common.model.util.TypeInfoCollector.MemberInfo;
-import org.jboss.tools.common.model.util.TypeInfoCollector.Type;
-import org.jboss.tools.common.model.util.TypeInfoCollector.TypeInfo;
-import org.jboss.tools.common.model.util.TypeInfoCollector.TypeMemberInfo;
+import org.jboss.tools.common.el.core.resolver.TypeInfoCollector;
+import org.jboss.tools.common.el.core.resolver.TypeInfoCollector.MemberInfo;
+import org.jboss.tools.common.el.core.resolver.TypeInfoCollector.Type;
+import org.jboss.tools.common.el.core.resolver.TypeInfoCollector.TypeInfo;
+import org.jboss.tools.common.el.core.resolver.TypeInfoCollector.TypeMemberInfo;
import org.jboss.tools.seam.core.BijectedAttributeType;
import org.jboss.tools.seam.core.IBijectedAttribute;
import org.jboss.tools.seam.core.ISeamComponent;
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamPromptingProvider.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamPromptingProvider.java 2008-10-01 15:33:13 UTC (rev 10598)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamPromptingProvider.java 2008-10-01 15:34:00 UTC (rev 10599)
@@ -29,7 +29,7 @@
public static String VARIABLES = "seam.variables"; //$NON-NLS-1$
public static String MEMBERS = "seam.members"; //$NON-NLS-1$
- SeamELCompletionEngine engine= new SeamELCompletionEngine();
+// SeamELCompletionEngine engine= new SeamELCompletionEngine();
public SeamPromptingProvider() {}
Deleted: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/Var.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/Var.java 2008-10-01 15:33:13 UTC (rev 10598)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/Var.java 2008-10-01 15:34:00 UTC (rev 10599)
@@ -1,156 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.seam.internal.core.el;
-
-import java.util.List;
-
-import org.jboss.tools.common.el.core.model.ELExpression;
-import org.jboss.tools.common.el.core.model.ELInstance;
-import org.jboss.tools.common.el.core.model.ELModel;
-import org.jboss.tools.common.el.core.parser.ELParser;
-import org.jboss.tools.common.el.core.parser.ELParserFactory;
-
-/**
- * Represents "var"/"value" attributes.
- * @author Alexey Kazakov
- */
-public class Var {
- String name;
- String value;
- ELExpression elToken;
- String resolvedValue;
- ELExpression resolvedElToken;
- int declOffset;
- int declLength;
-
- /**
- * Constructor
- * @param name - value of "var" attribute.
- * @param value - value of "value" attribute.
- */
- public Var(String name, String value, int declOffset, int declLength) {
- super();
- this.name = name;
- this.value = value;
- elToken = parseEl(value);
- this.declOffset = declOffset;
- this.declLength = declLength;
- }
-
- /**
- * Constructor
- * @param name - value of "var" attribute.
- * @param value - value of "value" attribute.
- */
- public Var(String name, String value) {
- this(name, value, 0, 0);
- }
-
- ELExpression parseEl(String el) {
- if(el.length()>3 && el.startsWith("#{") && el.endsWith("}")) {
- ELParser parser = ELParserFactory.createJbossParser();
- ELModel model = parser.parse(el);
- if(model == null || parser.getSyntaxErrors().size() > 0) return null;
- List<ELInstance> is = model.getInstances();
- if(is.size() == 0) return null;
- return is.get(0).getExpression();
- }
- return null;
- }
-
- /**
- * Sets value to new resolved EL which we got as result of parsing value.
- * For example:
- * <h:datatable value="#{list}" var="item">
- * <h:dataTable value="#{item.anotherList}" var="innerItem">
- * ...
- * </h:dataTable>
- * </h:dataTable>
- * Original El is #{item.anotherList}
- * Resolved El is #{list.iterator().next().anotherList}
- * It's very useful for nested vars.
- * @param newEl
- */
- public void resolveValue(String newEl) {
- resolvedValue = newEl;
- resolvedElToken = parseEl(newEl);
- }
-
- /**
- * @return parsed EL from "value" attribute. Returns null if EL is not valid.
- */
- public ELExpression getElToken() {
- return elToken;
- }
-
- /**
- * @return parsed resolved EL from "value" attribute. May be null.
- */
- public ELExpression getResolvedElToken() {
- return resolvedElToken;
- }
-
- /**
- * @return name of variable.
- */
- public String getName() {
- return name;
- }
-
- /**
- * @return value of variable. It's EL.
- */
- public String getValue() {
- return value;
- }
-
- /**
- * @return resolved value of variable. It's EL. May be null.
- */
- public String getResolvedValue() {
- return resolvedValue;
- }
-
- /**
- * @return offset of the var declaration
- */
- public int getDeclarationOffset() {
- return declOffset;
- }
-
- /**
- * @return length of the var declaration
- */
- public int getDeclarationLength() {
- return declLength;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (obj instanceof Var) {
- Var compare = (Var)obj;
- String str = getName();
- if (str != null) {
- if (!str.equals(compare.getName()))
- return false;
- } else {
- if (compare.getName() != null)
- return false;
- }
- str = getValue();
- return (str != null ?
- str.equals(compare.getValue()) :
- compare.getValue() == null);
- }
- return false;
- }
-
-}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamCoreValidator.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamCoreValidator.java 2008-10-01 15:33:13 UTC (rev 10598)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamCoreValidator.java 2008-10-01 15:34:00 UTC (rev 10599)
@@ -31,8 +31,8 @@
import org.eclipse.osgi.util.NLS;
import org.eclipse.wst.validation.internal.core.ValidationException;
import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+import org.jboss.tools.common.el.core.resolver.TypeInfoCollector;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
-import org.jboss.tools.common.model.util.TypeInfoCollector;
import org.jboss.tools.seam.core.BijectedAttributeType;
import org.jboss.tools.seam.core.IBijectedAttribute;
import org.jboss.tools.seam.core.IRole;
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamELValidator.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamELValidator.java 2008-10-01 15:33:13 UTC (rev 10598)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamELValidator.java 2008-10-01 15:34:00 UTC (rev 10599)
@@ -47,18 +47,20 @@
import org.jboss.tools.common.el.core.model.ELModel;
import org.jboss.tools.common.el.core.parser.ELParser;
import org.jboss.tools.common.el.core.parser.ELParserFactory;
+import org.jboss.tools.common.el.core.parser.ELParserUtil;
import org.jboss.tools.common.el.core.parser.SyntaxError;
-import org.jboss.tools.common.model.util.TypeInfoCollector;
+import org.jboss.tools.common.el.core.resolver.ELOperandResolveStatus;
+import org.jboss.tools.common.el.core.resolver.ElVarSearcher;
+import org.jboss.tools.common.el.core.resolver.TypeInfoCollector;
+import org.jboss.tools.common.el.core.resolver.Var;
import org.jboss.tools.common.util.FileUtil;
import org.jboss.tools.seam.core.ISeamContextVariable;
import org.jboss.tools.seam.core.ISeamProject;
import org.jboss.tools.seam.core.SeamCoreMessages;
import org.jboss.tools.seam.core.SeamCorePlugin;
import org.jboss.tools.seam.core.SeamPreferences;
-import org.jboss.tools.seam.internal.core.el.ElVarSearcher;
import org.jboss.tools.seam.internal.core.el.SeamELCompletionEngine;
import org.jboss.tools.seam.internal.core.el.SeamELOperandResolveStatus;
-import org.jboss.tools.seam.internal.core.el.Var;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
@@ -75,7 +77,7 @@
protected static final String VALIDATING_EL_FILE_MESSAGE_ID = "VALIDATING_EL_FILE";
- private SeamELCompletionEngine engine = new SeamELCompletionEngine();
+ private SeamELCompletionEngine engine;
private List<Var> varListForCurentValidatedNode = new ArrayList<Var>();
private ElVarSearcher elVarSearcher;
@@ -83,7 +85,8 @@
SeamContextValidationHelper coreHelper, IReporter reporter,
SeamValidationContext validationContext, ISeamProject project) {
super(validatorManager, coreHelper, reporter, validationContext, project);
- elVarSearcher = new ElVarSearcher(project, engine);
+ engine = new SeamELCompletionEngine(project);
+ elVarSearcher = new ElVarSearcher(engine);
}
/* (non-Javadoc)
@@ -213,7 +216,7 @@
String preferenceValue = SeamPreferences.getProjectPreference(project, SeamPreferences.CHECK_VARS);
Var var = null;
if (SeamPreferences.ENABLE.equals(preferenceValue)) {
- var = ElVarSearcher.findVar(parent);
+ var = elVarSearcher.findVar(parent);
}
if(var!=null) {
varListForCurentValidatedNode.add(var);
@@ -254,7 +257,7 @@
private void validateString(IFile file, String string, int offset) {
int startEl = string.indexOf("#{"); //$NON-NLS-1$
if(startEl>-1) {
- ELParser parser = ELParserFactory.createJbossParser();
+ ELParser parser = ELParserUtil.getJbossFactory().createParser();
ELModel model = parser.parse(string);
List<SyntaxError> errors = parser.getSyntaxErrors();
if(errors.size() > 0) {
@@ -298,7 +301,7 @@
if (!operand.endsWith(".")) { //$NON-NLS-1$
{
SeamELOperandResolveStatus status =
- engine.resolveSeamELOperand(project, file, operandToken, true, varListForCurentValidatedNode, elVarSearcher);
+ engine.resolveELOperand(file, operandToken, true, varListForCurentValidatedNode, elVarSearcher);
if(status.getUsedVariables().size()==0 && status.isError()) {
// Save resources with unknown variables names
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamValidatorManager.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamValidatorManager.java 2008-10-01 15:33:13 UTC (rev 10598)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamValidatorManager.java 2008-10-01 15:34:00 UTC (rev 10599)
@@ -19,7 +19,7 @@
import org.eclipse.wst.validation.internal.provisional.core.IReporter;
import org.eclipse.wst.validation.internal.provisional.core.IValidationContext;
import org.eclipse.wst.validation.internal.provisional.core.IValidatorJob;
-import org.jboss.tools.common.model.util.TypeInfoCollector;
+import org.jboss.tools.common.el.core.resolver.TypeInfoCollector;
import org.jboss.tools.seam.core.ISeamProject;
import org.jboss.tools.seam.internal.core.SeamProject;
17 years, 3 months
JBoss Tools SVN: r10598 - in trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp: support/kb and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-10-01 11:33:13 -0400 (Wed, 01 Oct 2008)
New Revision: 10598
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/FaceletsHtmlContentAssistProcessor.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/JSPActiveContentAssistProcessor.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/support/kb/WTPKbdBeanPropertyResource.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/support/kb/WTPKbdBundlePropertyResource.java
Log:
JBIDE-1497.
Refactoring
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/FaceletsHtmlContentAssistProcessor.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/FaceletsHtmlContentAssistProcessor.java 2008-10-01 15:31:52 UTC (rev 10597)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/FaceletsHtmlContentAssistProcessor.java 2008-10-01 15:33:13 UTC (rev 10598)
@@ -51,6 +51,7 @@
import org.jboss.tools.common.el.core.model.ELUtil;
import org.jboss.tools.common.el.core.parser.ELParser;
import org.jboss.tools.common.el.core.parser.ELParserFactory;
+import org.jboss.tools.common.el.core.parser.ELParserUtil;
import org.jboss.tools.common.kb.AttributeDescriptor;
import org.jboss.tools.common.kb.KbConnectorFactory;
import org.jboss.tools.common.kb.KbConnectorType;
@@ -272,7 +273,7 @@
}
// No JBoss parser ?
- ELParser p = ELParserFactory.createDefaultParser();
+ ELParser p = ELParserUtil.getDefaultFactory().createParser();
ELModel model = p.parse(currentValue);
ELInstance instance = ELUtil.findInstance(model, offset);
if(instance != null && instance.getStartPosition() + 2 <= offset) {
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/JSPActiveContentAssistProcessor.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/JSPActiveContentAssistProcessor.java 2008-10-01 15:31:52 UTC (rev 10597)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/JSPActiveContentAssistProcessor.java 2008-10-01 15:33:13 UTC (rev 10598)
@@ -24,6 +24,7 @@
import org.jboss.tools.common.el.core.model.ELUtil;
import org.jboss.tools.common.el.core.parser.ELParser;
import org.jboss.tools.common.el.core.parser.ELParserFactory;
+import org.jboss.tools.common.el.core.parser.ELParserUtil;
import org.jboss.tools.common.kb.KbException;
import org.jboss.tools.common.kb.KbProposal;
import org.jboss.tools.common.kb.KbQuery;
@@ -270,7 +271,7 @@
* @return
*/
private int getELStartPosition(String matchString) {
- ELParser p = ELParserFactory.createJbossParser();
+ ELParser p = ELParserUtil.getJbossFactory().createParser();
ELModel model = p.parse(matchString);
ELInstance is = ELUtil.findInstance(model, matchString.length());
return is == null ? -1 : is.getStartPosition();
@@ -304,7 +305,7 @@
currentValue.length() < matchString.length())
return -1;
- ELParser p = ELParserFactory.createJbossParser();
+ ELParser p = ELParserUtil.getJbossFactory().createParser();
ELModel model = p.parse(currentValue);
ELInstance is = ELUtil.findInstance(model, matchString.length());
if(is == null || is.getCloseInstanceToken() == null) return -1;
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/support/kb/WTPKbdBeanPropertyResource.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/support/kb/WTPKbdBeanPropertyResource.java 2008-10-01 15:31:52 UTC (rev 10597)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/support/kb/WTPKbdBeanPropertyResource.java 2008-10-01 15:33:13 UTC (rev 10598)
@@ -27,6 +27,7 @@
import org.jboss.tools.common.el.core.model.ELPropertyInvocation;
import org.jboss.tools.common.el.core.parser.ELParser;
import org.jboss.tools.common.el.core.parser.ELParserFactory;
+import org.jboss.tools.common.el.core.parser.ELParserUtil;
import org.jboss.tools.common.kb.KbDinamicResource;
import org.jboss.tools.common.kb.KbProposal;
import org.jboss.tools.common.kb.KbProposal.PostProcessing;
@@ -59,7 +60,7 @@
try {
if (!isReadyToUse()) return proposals;
- ELParser p = ELParserFactory.createDefaultParser();
+ ELParser p = ELParserUtil.getDefaultFactory().createParser();
ELModel model = p.parse(query);
List<ELInstance> is = model.getInstances();
@@ -178,7 +179,7 @@
class PostProcessingImpl implements PostProcessing {
public void process(KbProposal proposal, String value, int offset) {
- ELParser p = ELParserFactory.createDefaultParser();
+ ELParser p = ELParserUtil.getDefaultFactory().createParser();
ELModel model = p.parse(value);
List<ELInstance> is = model.getInstances();
ELInvocationExpression expr = null;
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/support/kb/WTPKbdBundlePropertyResource.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/support/kb/WTPKbdBundlePropertyResource.java 2008-10-01 15:31:52 UTC (rev 10597)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/support/kb/WTPKbdBundlePropertyResource.java 2008-10-01 15:33:13 UTC (rev 10598)
@@ -25,6 +25,7 @@
import org.jboss.tools.common.el.core.model.ELModel;
import org.jboss.tools.common.el.core.parser.ELParser;
import org.jboss.tools.common.el.core.parser.ELParserFactory;
+import org.jboss.tools.common.el.core.parser.ELParserUtil;
import org.jboss.tools.common.kb.KbDinamicResource;
import org.jboss.tools.common.kb.KbProposal;
import org.jboss.tools.common.model.XModelObject;
@@ -49,7 +50,7 @@
try {
if (!isReadyToUse()) return proposals;
- ELParser p = ELParserFactory.createDefaultParser();
+ ELParser p = ELParserUtil.getDefaultFactory().createParser();
ELModel model = p.parse(query);
List<ELInstance> is = model.getInstances();
17 years, 3 months
JBoss Tools SVN: r10597 - trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-10-01 11:31:52 -0400 (Wed, 01 Oct 2008)
New Revision: 10597
Removed:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/TypeInfoCollector.java
Log:
JBIDE-1497.
Refactoring
Deleted: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/TypeInfoCollector.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/TypeInfoCollector.java 2008-10-01 15:31:11 UTC (rev 10596)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/TypeInfoCollector.java 2008-10-01 15:31:52 UTC (rev 10597)
@@ -1,1235 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributor:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-
-package org.jboss.tools.common.model.util;
-
-import java.lang.reflect.Modifier;
-import java.util.ArrayList;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeSet;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jdt.core.IField;
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.IMember;
-import org.eclipse.jdt.core.IMethod;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jdt.core.ITypeHierarchy;
-import org.eclipse.jdt.core.ITypeParameter;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jdt.core.Signature;
-import org.jboss.tools.common.model.plugin.ModelPlugin;
-
-/**
- * This class helps to collect information of java elements used in Seam EL.
- * @author Viktor Rubezhny, Alexey Kazakov
- */
-public class TypeInfoCollector {
- IType fType;
- MemberInfo fMember;
- TypeInfo fTypeInfo;
- List<MethodInfo> fMethods;
- List<FieldInfo> fFields;
-
- private static class ProjectCache {
- Map<IMember, MemberInfo> memberInfoCacheFalse = new HashMap<IMember, MemberInfo>();
- Map<IMember, MemberInfo> memberInfoCacheTrue = new HashMap<IMember, MemberInfo>();
- Map<IType, SuperTypeInfo> superTypesCache = new HashMap<IType, SuperTypeInfo>();
- }
-
- private static Caches caches = new Caches();
-
- private static class Caches {
- ProjectCache common = new ProjectCache();
-// Map<IProject, ProjectCache> cache = new HashMap<IProject, ProjectCache>();
-
- public boolean contains(IProject p) {
-// return p != null && cache.containsKey(p);
- return true;
- }
-
- public void clean(IProject p) {
-// if(contains(p)) {
-// cache.remove(p);
-// }
- common = new ProjectCache();
- }
-
- public ProjectCache get(IProject p) {
- if(p == null || !p.isAccessible()) return null;
- return common;
-// ProjectCache c = cache.get(p);
-// if(c == null) {
-// c = new ProjectCache();
-// cache.put(p, c);
-// }
-// return c;
- }
-
- public ProjectCache get(IJavaElement element) {
- if(element == null) {
- return null;
- }
- IJavaProject jp = element.getJavaProject();
- IProject p = jp == null ? null : jp.getProject();
- return get(p);
- }
- }
-
- public static class Type {
- private String fName;
- private String fQualifiedName;
- private Type[] fParameters;
- private IType fSource;
- private String fSignature;
- private boolean fIsArray;
- private Type fTypeOfArrayElement;
- private String fQualifiedTypeNameOfArrayElement;
-
- private Type() {
- }
-
- public static Type valueOf(String name) {
- Type instance = new Type();
- instance.setName(name);
- instance.setParameters(new Type[0]);
- return instance;
- }
-
- public Type(String signature, IType source) {
- if(signature!=null) {
- String erasureSignature = Signature.getTypeErasure(signature);
- String typeOfArraySiganture = Signature.getElementType(erasureSignature);
- fName = String.valueOf(Signature.toString(erasureSignature));
- if(!erasureSignature.equals(typeOfArraySiganture)) {
- // this is an array
- fIsArray = true;
- fTypeOfArrayElement = new Type(typeOfArraySiganture, source);
- }
- String[] signaturesOfParametersOfType = Signature.getTypeArguments(signature);
- fParameters = new Type[signaturesOfParametersOfType.length];
- for (int i = 0; i < signaturesOfParametersOfType.length; i++) {
- fParameters[i] = new Type(signaturesOfParametersOfType[i], source);
- }
- } else {
- fName = source.getFullyQualifiedName();
- setParameters(new Type[0]);
- }
- fSource = source;
- }
-
- public void initializeParameters(Map<String, Type> parameters) {
- Type type = parameters.get(fName);
- if(type!=null) {
- fName = type.getName();
- fParameters = type.getParameters();
- fSource = type.getSource();
- fIsArray = type.isArray();
- fTypeOfArrayElement = type.getTypeOfArrayElement();
- }
- for (int i = 0; i < fParameters.length; i++) {
- fParameters[i].initializeParameters(parameters);
- }
- }
-
- public Type getParameter(int index) {
- if(fParameters.length>index) {
- return fParameters[index];
- }
- return null;
- }
-
- public String getQualifiedTypeNameOfArrayElement() {
- if(fQualifiedTypeNameOfArrayElement==null && fSource!=null) {
- fQualifiedTypeNameOfArrayElement = EclipseJavaUtil.resolveType(fSource, fTypeOfArrayElement.getName());
- }
- return fQualifiedTypeNameOfArrayElement;
- }
-
- public String getQualifiedName() {
- if(fQualifiedName == null && fSource!=null) {
- fQualifiedName = EclipseJavaUtil.resolveType(fSource, fName);
- }
- return fQualifiedName;
- }
-
- public boolean isArray() {
- return fIsArray;
- }
-
- public void setArray(boolean array) {
- fIsArray = array;
- }
-
- public Type getTypeOfArrayElement() {
- return fTypeOfArrayElement;
- }
-
- public void setTypeOfArrayElement(Type typeOfArrayElement) {
- fTypeOfArrayElement = typeOfArrayElement;
- }
-
- public String getName() {
- return fName;
- }
-
- public void setName(String name) {
- fName = name;
- }
-
- public Type[] getParameters() {
- return fParameters;
- }
-
- public void setParameters(Type[] parameters) {
- this.fParameters = parameters;
- }
-
- public IType getSource() {
- return fSource;
- }
-
- public void setSource(IType source) {
- this.fSource = source;
- }
-
- public String getSignature() {
- return fSignature;
- }
-
- public void setSignature(String signature) {
- this.fSignature = signature;
- }
- }
-
- public abstract static class MemberInfo {
- private String fDeclaringTypeQualifiedName;
- private String fName;
- private int fModifiers;
- private IType fSourceType;
- private MemberInfo fParentMember;
- private IType fMemberType;
- private boolean isDataModel;
- private Type fType;
-
- protected MemberInfo (
- IType sourceType,
- String declaringTypeQualifiedName, String name, int modifiers, MemberInfo parentMember, boolean dataModel, Type type) {
- setSourceType(sourceType);
- setDeclaringTypeQualifiedName(declaringTypeQualifiedName);
- setName(name);
- setModifiers(modifiers);
- setParentMember(parentMember);
- setDataModel(dataModel);
- setType(type);
- }
-
- abstract void initializeParameters();
-
- protected void setType(Type type) {
- fType = type;
- }
-
- public Type getType() {
- return fType;
- }
-
- public void setSourceType(IType sourceType) {
- fSourceType = sourceType;
- }
-
- public IType getSourceType() {
- return fSourceType;
- }
-
- protected void setName (String name) {
- this.fName = name;
- }
-
- public String getName() {
- return fName;
- }
-
- protected void setDeclaringTypeQualifiedName(String declaringTypeQualifiedName) {
- this.fDeclaringTypeQualifiedName = declaringTypeQualifiedName;
- }
-
- public String getDeclaringTypeQualifiedName() {
- return fDeclaringTypeQualifiedName;
- }
-
- protected void setModifiers (int modifiers) {
- this.fModifiers = modifiers;
- }
-
- public int getModifiers() {
- return fModifiers;
- }
-
- public boolean isPublic() {
- return Modifier.isPublic(fModifiers);
- }
-
- public boolean isStatic() {
- return Modifier.isStatic(fModifiers);
- }
-
- public boolean isJavaLangObject() {
- return "java.lang.Object".equals(getDeclaringTypeQualifiedName());
- }
-
- public MemberInfo getParentMember() {
- return fParentMember;
- }
-
- protected void setParentMember(MemberInfo parentMember) {
- fParentMember = parentMember;
- }
-
- public IType getMemberType() {
- if(fMemberType==null) {
- initializeParameters();
- try {
- if(isDataModel() && getType().isArray()) {
- fMemberType = getSourceType().getJavaProject().findType(getType().getQualifiedTypeNameOfArrayElement());
- } else if(getType().getQualifiedName()!=null) {
- fMemberType = getSourceType().getJavaProject().findType(getType().getQualifiedName());
- }
- } catch (JavaModelException e) {
- ModelPlugin.getPluginLog().logError(e);
- }
- }
- return fMemberType;
- }
-
- public boolean isDataModel() {
- return isDataModel;
- }
-
- protected void setDataModel(boolean isDataModel) {
- this.isDataModel = isDataModel;
- }
-
- public TypeInfoCollector getTypeCollector() {
- // The rev. 7651 results in a deadlock, typeInfo is not stored anymore
- // The rev. 7623 results in a deadlock, so, it's rolled back
- // >>> Fix for JBIDE-2090
- return new TypeInfoCollector(this);
- // <<< Fix for JBIDE-2090
- }
-
- abstract public IJavaElement getJavaElement();
- }
-
- public static class TypeInfo extends MemberInfo {
- private IType fType;
- private TypeInfo superType;
- private Map<String, Type> params = new HashMap<String, Type>();
-
- public TypeInfo(IType type, MemberInfo parentMember, boolean dataModel) throws JavaModelException {
- super(type.getDeclaringType(),
- (type.getDeclaringType() == null ? null : type.getDeclaringType().getFullyQualifiedName()),
- type.getFullyQualifiedName(),
- type.getFlags(),
- parentMember,
- dataModel,
- Type.valueOf(type.getFullyQualifiedName()));
- this.fType = type;
- }
-
- public Type getParameterType(String name) {
- return params.get(name);
- }
-
- @Override
- public IType getMemberType() {
- return fType;
- }
-
- @Override
- public IJavaElement getJavaElement() {
- return fType;
- }
-
- /* (non-Javadoc)
- * @see org.jboss.tools.common.model.util.TypeInfoCollector.MemberInfo#initializeParameters()
- */
- @Override
- void initializeParameters() {
- try {
- MemberInfo parent = getParentMember();
- if(parent!=null && parent instanceof TypeMemberInfo) {
- ITypeParameter[] parameters = fType.getTypeParameters();
- for (int i = 0; i < parameters.length; i++) {
- Type type = parent.getType().getParameter(i);
- if(type!=null) {
- params.put(parameters[i].getElementName(), type);
- }
- }
- }
- if(superType!=null) {
- superType.initializeParameters(this);
- }
- } catch (JavaModelException e) {
- ModelPlugin.getPluginLog().logError(e);
- }
- }
-
- private void initializeParameters(TypeInfo inheritedType) throws JavaModelException {
- ITypeParameter[] parameters = fType.getTypeParameters();
- String signature = inheritedType.fType.getSuperclassTypeSignature();
- Type classType = new Type(signature, inheritedType.fType);
- for (int i = 0; i < parameters.length; i++) {
- Type paramType = classType.getParameter(i);
- if(paramType!=null) {
- Type resolvedType = inheritedType.getParameterType(paramType.getName());
- if(resolvedType!=null) {
- paramType = resolvedType;
- }
- params.put(parameters[i].getElementName(), paramType);
- }
- }
- if(superType!=null) {
- superType.initializeParameters(this);
- }
- }
-
- public TypeInfo getSuperType() {
- return superType;
- }
-
- public void setSuperType(TypeInfo superType) {
- this.superType = superType;
- }
- }
-
- public abstract static class TypeMemberInfo extends MemberInfo {
- private String[] fParametersNamesOfDeclaringType;
- private TypeInfo declaratedType;
-
- /**
- * @param sourceType
- * @param declaringTypeQualifiedName
- * @param name
- * @param modifiers
- * @param parentMember
- * @param dataModel
- * @param type
- */
- protected TypeMemberInfo(IType sourceType,
- String declaringTypeQualifiedName, String name, int modifiers,
- TypeInfo parentMember, TypeInfo declaratedType, boolean dataModel, Type type) {
- super(sourceType, declaringTypeQualifiedName, name, modifiers, parentMember,
- dataModel, type);
- this.declaratedType = declaratedType;
- }
-
- public String[] getParametersNamesOfDeclaringType() {
- return fParametersNamesOfDeclaringType;
- }
-
- void setParametersNamesOfDeclaringType(
- String[] parametersNamesOfDeclaringType) {
- fParametersNamesOfDeclaringType = parametersNamesOfDeclaringType;
- }
-
- protected void initializeParameters() {
- if(fParametersNamesOfDeclaringType!=null && fParametersNamesOfDeclaringType.length>0 && getParentMember()!=null) {
- Map<String, Type> parametersOfDeclaringType = new HashMap<String, Type>();
- TypeInfo parentTypeInfo = (TypeInfo)getParentMember();
- parentTypeInfo.initializeParameters();
- for (int i = 0; i < fParametersNamesOfDeclaringType.length; i++) {
- String parameterName = getParameterNameFromType(fParametersNamesOfDeclaringType[i]);
- Type paramType = declaratedType.getParameterType(parameterName);
- if(paramType!=null) {
- parametersOfDeclaringType.put(parameterName, paramType);
- }
- }
- getType().initializeParameters(parametersOfDeclaringType);
- }
- }
-
- public TypeInfo getDeclaratedType() {
- return declaratedType;
- }
-
- protected void setDeclaratedType(TypeInfo declaratedType) {
- this.declaratedType = declaratedType;
- }
- }
-
- public static class FieldInfo extends TypeMemberInfo {
- private IJavaElement fJavaElement;
-
- public FieldInfo(IField field, TypeInfo parentMember, TypeInfo declaratedType, boolean dataModel) throws JavaModelException {
- super(field.getDeclaringType(),
- (field.getDeclaringType() == null ? null : field.getDeclaringType().getFullyQualifiedName()),
- field.getElementName(),
- field.getFlags(),
- parentMember,
- declaratedType,
- dataModel,
- new Type(field.getTypeSignature(),
- field.getDeclaringType()));
-
- setParametersNamesOfDeclaringType(getTypeErasureFromSignatureArray(field.getDeclaringType().getTypeParameterSignatures()));
- }
-
- public IJavaElement getJavaElement () {
- if(fJavaElement == null) {
- try {
- if(getDeclaringTypeQualifiedName()==null) {
- return null;
- }
- IType declType = getSourceType().getJavaProject().findType(getDeclaringTypeQualifiedName());
- fJavaElement = (declType == null ? null : declType.getField(getName()));
- } catch (JavaModelException e) {
- ModelPlugin.getPluginLog().logError(e);
- }
- }
- return fJavaElement;
- }
- }
-
- public static class MethodInfo extends TypeMemberInfo {
- private String[] fParameterTypeNames;
- private String[] fParameterTypeQualifiedNames;
- private String[] fParameterNames;
- private IJavaElement fJavaElement;
-
- public MethodInfo(IType sourceType, String declaringTypeQualifiedName, String name,
- int modifiers, String[] parameterTypeQualifiedNames,
- String[] parameterNames,
- String returnTypeQualifiedName,
- TypeInfo parentMember,
- TypeInfo declaratedType,
- boolean dataModel) {
- super(sourceType, declaringTypeQualifiedName, name, modifiers, parentMember, declaratedType, dataModel, Type.valueOf(name));
- setParameterTypeNames(parameterTypeQualifiedNames);
- setParameterNames(parameterNames);
- }
-
- public MethodInfo(IMethod method, TypeInfo parentMember, TypeInfo declaratedType, boolean dataModel) throws JavaModelException {
- super(method.getDeclaringType(),
- (method.getDeclaringType() == null ? null : method.getDeclaringType().getFullyQualifiedName()),
- method.getElementName(),
- method.getFlags(),
- parentMember,
- declaratedType,
- dataModel,
- new Type(method.getReturnType(),
- method.getDeclaringType()));
-
- setParameterNames(method.getParameterNames());
- setParameterTypeNames(resolveSignatures(method.getDeclaringType(), method.getParameterTypes()));
- setParametersNamesOfDeclaringType(getTypeErasureFromSignatureArray(method.getDeclaringType().getTypeParameterSignatures()));
- }
-
- protected void setParameterTypeNames(String[] parameterTypeNames) {
- fParameterTypeNames = (parameterTypeNames == null ?
- new String[0] : parameterTypeNames);
- }
-
- public String[] getParameterTypeQualifiedNames() {
- if(fParameterTypeQualifiedNames==null) {
- fParameterTypeQualifiedNames = new String[fParameterTypeNames.length];
- for (int i = 0; i < fParameterTypeQualifiedNames.length; i++) {
- fParameterTypeQualifiedNames[i] = EclipseJavaUtil.resolveType(getSourceType(), fParameterTypeNames[i]);
- }
- }
- return fParameterTypeQualifiedNames;
- }
-
- public String[] getParameterTypeNames() {
- return fParameterTypeNames;
- }
-
- protected void setParameterNames(String[] parameterNames) {
- fParameterNames = (parameterNames == null ?
- new String[0] : parameterNames);
- }
-
- public String[] getParameterNames() {
- return fParameterNames;
- }
-
- public int getNumberOfParameters() {
- return (getParameterNames() == null ? 0 : getParameterNames().length);
- }
-
- public IType getReturnType() {
- return getMemberType();
- }
-
- public boolean isConstructor () {
- return getDeclaringTypeQualifiedName()!=null && getDeclaringTypeQualifiedName().equals(getName());
- }
-
- public boolean isGetter() {
- if (null == getType()) {
- return false;
- }
-
- return (((getName().startsWith("get") && !getName().equals("get")) || getName().startsWith("is")) && getNumberOfParameters() == 0);
- }
-
- public boolean isSetter() {
- return ((getName().startsWith("set") && !getName().equals("set")) && getNumberOfParameters() == 1);
- }
-
- public List<String> getAsPresentedStrings() {
- List<String> list = new ArrayList<String>(2);
- StringBuffer name = new StringBuffer(getName());
-
- // Add method as 'foo'
- list.add(name.toString());
-
- // Add method as 'foo(param1,param2)'
- name.append('(');
- String[] mParams = getParameterNames();
- for (int j = 0; mParams != null && j < mParams.length; j++) {
- if (j > 0) name.append(", "); //$NON-NLS-1$
- name.append(mParams[j]);
- }
- name.append(')');
- list.add(name.toString());
- return list;
- }
-
- @Override
- public IJavaElement getJavaElement () {
- if(fJavaElement == null) {
- try {
- IType declType = getSourceType().getJavaProject().findType(getDeclaringTypeQualifiedName());
- if(declType==null) {
- return null;
- }
- IMethod[] allMethods = declType.getMethods();
-
- // filter methods by name
- List<IMethod> methods = new ArrayList<IMethod>();
- for (int i = 0; allMethods != null && i < allMethods.length; i++) {
- if (allMethods[i].getElementName().equals(getName())) {
- methods.add(allMethods[i]);
- }
- }
- if (!methods.isEmpty()) {
- if (methods.size() == 1) {
- fJavaElement = methods.get(0);
- } else {
- // filter methods by number of parameters
- List<IMethod> filteredMethods = new ArrayList<IMethod>();
- for (IMethod method : methods) {
- if (method.getNumberOfParameters() == getNumberOfParameters()) {
- filteredMethods.add(method);
- }
- }
- if (!filteredMethods.isEmpty()) {
- if (filteredMethods.size() == 1) {
- fJavaElement = filteredMethods.get(0);
- } else {
- methods = filteredMethods;
-
- // filter methods by parameter types
- for(IMethod method : methods) {
- String[] methodParameterTypes =
- resolveSignatures(method.getDeclaringType(),
- method.getParameterTypes());
- String[] parameterTypes = getParameterTypeQualifiedNames();
-
- boolean equal = true;
- for (int i = 0; parameterTypes != null && i < parameterTypes.length; i++) {
- // simple types must be equal, but complex types may not
- if (!parameterTypes[i].equals(methodParameterTypes[i])) {
- // sure - it's Complex Type
- if (! (parameterTypes[i].indexOf('.') != -1)
- && (methodParameterTypes[i].indexOf('.') == -1)) {
- equal = false;
- break;
- }
- }
- }
- if (equal) {
- fJavaElement = method;
- }
- }
- }
- }
- }
- }
- } catch (JavaModelException e) {
- ModelPlugin.getPluginLog().logError(e);
- }
- }
- return fJavaElement;
- }
- }
-
- public TypeInfoCollector(MemberInfo member) {
- this.fMember = member;
- this.fType = member.getMemberType();
- collectInfo();
- }
-
- public IType getType() {
- return this.fType;
- }
-
- public void collectInfo() {
- if (fMethods == null) {
- fMethods = new ArrayList<MethodInfo>();
- } else {
- fMethods.clear();
- }
-
- if (fFields == null) {
- fFields = new ArrayList<FieldInfo>();
- } else {
- fFields.clear();
- }
-
- if (fType == null) {
- return;
- }
- try {
- IType binType = fType;
- MemberInfo originalParent = fMember;
- if(fMember instanceof TypeInfo) {
- fTypeInfo = (TypeInfo)fMember;
- } else {
- fTypeInfo = new TypeInfo(binType, fMember, fMember.isDataModel());
- }
- TypeInfo parent = fTypeInfo;
- while (binType != null) {
- IMethod[] binMethods = binType.getMethods();
- for (int i = 0; binMethods != null && i < binMethods.length; i++) {
- if (binMethods[i].isConstructor()) {
- continue;
- }
- fMethods.add(new MethodInfo(binMethods[i], fTypeInfo, parent, false));
- }
- binType = getSuperclass(binType);
- if(binType!=null) {
- TypeInfo superType = new TypeInfo(binType, originalParent, parent.isDataModel());
- parent.setSuperType(superType);
- parent = superType;
- }
- }
-
- // This inserts here methods "public int size()" and "public boolean isEmpty()" for javax.faces.model.DataModel
- // as requested by Gavin in JBIDE-1256
- if(isDataModelObject(fType)) {
- addInfoForDataModelObject();
- }
- // This inserts here methods "public int getRowCount()" for @DataModel variables.
- if(fMember.isDataModel) {
- addInfoForDataModelVariable();
- }
- } catch (JavaModelException e) {
- ModelPlugin.getPluginLog().logError(e);
- }
- }
-
- boolean isDataModelObject(IType type) throws JavaModelException {
- return isInstanceofType(type, "javax.faces.model.DataModel");
- }
-
- public static boolean isResourceBundle(IType type) {
- try {
- return isInstanceofType(type, "java.util.ResourceBundle");
- } catch (JavaModelException e) {
- return false;
- }
- }
-
- public static boolean isNotParameterizedCollection(TypeInfoCollector.MemberInfo mbr) {
- try {
- if(mbr.getType().getParameters()!=null && mbr.getType().getParameters().length>0) {
- return false;
- }
- IType type = mbr.getMemberType();
- if(type!=null) {
- return isInstanceofType(type, "java.util.Map") || isInstanceofType(type, "java.util.Collection");
- }
- return false;
- } catch (JavaModelException e) {
- return false;
- }
- }
-
- public static class SuperTypeInfo {
- IType type;
- Set<String> names = new HashSet<String>();
- IType[] superTypes = new IType[0];
-
- SuperTypeInfo(IType type) throws JavaModelException {
- this.type = type;
- ProjectCache cache = caches.get(type);
- if(cache != null) {
- cache.superTypesCache.put(type, this);
- }
- ITypeHierarchy typeHierarchy = type.newSupertypeHierarchy(new NullProgressMonitor());
- superTypes = typeHierarchy == null ? null : typeHierarchy.getAllSupertypes(type);
- if(superTypes != null) for (int i = 0; i < superTypes.length; i++) {
- names.add(superTypes[i].getFullyQualifiedName());
- }
- if(superTypes == null) superTypes = new IType[0];
- }
-
- public Set<String> getNames() {
- return names;
- }
-
- public IType[] getSuperTypes() {
- return superTypes;
- }
- }
-
- public static SuperTypeInfo getSuperTypes(IType type) throws JavaModelException {
- if(type == null) return null;
- ProjectCache cache = caches.get(type);
- SuperTypeInfo ts = (cache != null) ? cache.superTypesCache.get(type) : null;
- if(ts == null) {
- ts = new SuperTypeInfo(type);
- }
- return ts;
- }
-
- public static boolean isInstanceofType(IType type, String qualifiedTypeName) throws JavaModelException {
- if (qualifiedTypeName == null || type == null) return false;
- boolean isInstanceofType = qualifiedTypeName.equals(type.getFullyQualifiedName());
- if (!isInstanceofType) {
- SuperTypeInfo ts = getSuperTypes(type);
- if(ts != null && ts.getNames().contains(qualifiedTypeName)) {
- return true;
- }
- return false;
- }
- return true;
- }
-
- void addInfoForDataModelVariable() {
- fMethods.add(new MethodInfo(fType,
- fType.getFullyQualifiedName(),
- "getRowCount", Modifier.PUBLIC,
- new String[0],
- new String[0],
- "int",
- fTypeInfo,
- fTypeInfo,
- false));
- }
-
- void addInfoForDataModelObject() {
- fMethods.add(new MethodInfo(fType,
- fType.getFullyQualifiedName(),
- "size", Modifier.PUBLIC,
- new String[0],
- new String[0],
- "int",
- fTypeInfo,
- fTypeInfo,
- false));
- fMethods.add(new MethodInfo(fType,
- fType.getFullyQualifiedName(),
- "isEmpty", Modifier.PUBLIC,
- new String[0],
- new String[0],
- "boolean",
- fTypeInfo,
- fTypeInfo,
- false));
- }
-
- private static IType getSuperclass(IType type) throws JavaModelException {
- String superclassName = type.getSuperclassName();
- if(superclassName!=null) {
- String fullySuperclassName = EclipseJavaUtil.resolveType(type, superclassName);
- if(fullySuperclassName!=null&&!fullySuperclassName.equals("java.lang.Object")) { //$NON-NLS-1$
- if(fullySuperclassName.equals(type.getFullyQualifiedName())) {
- //FIX JBIDE-1642
- return null;
- }
- IType superType = type.getJavaProject().findType(fullySuperclassName);
- return superType;
- }
- }
- return null;
- }
-
- public MethodInfo[] findMethodInfos(IMethod iMethod) {
- List<MethodInfo> methods = new ArrayList<MethodInfo>();
-
- // filter methods by name
- for (MethodInfo info : fMethods) {
- if (info.getName().equals(iMethod.getElementName())) {
- methods.add(info);
- }
- }
- if (methods.isEmpty())
- return new MethodInfo[0];
-
- EclipseJavaUtil.getMemberTypeAsString(iMethod);
-
- if (methods.size() == 1)
- return methods.toArray(new MethodInfo[0]);
-
- // filter methods by number of parameters
- List<MethodInfo> filteredMethods = new ArrayList<MethodInfo>();
- for (MethodInfo method : methods) {
- if (method.getNumberOfParameters() == iMethod.getNumberOfParameters())
- filteredMethods.add(method);
- }
- if (filteredMethods.isEmpty())
- return new MethodInfo[0];
- if (filteredMethods.size() == 1)
- return filteredMethods.toArray(new MethodInfo[0]);
-
- methods = filteredMethods;
-
- // filter methods by parameter types
- filteredMethods = new ArrayList<MethodInfo>();
- for(MethodInfo method : methods) {
- String[] methodParameterTypes =
- resolveSignatures(iMethod.getDeclaringType(),
- iMethod.getParameterTypes());
- String[] parameterTypes = method.getParameterTypeQualifiedNames();
-
- boolean equal = true;
- for (int i = 0; equal && parameterTypes != null && i < parameterTypes.length; i++) {
- // simple types must be equal, but complex types may not
- if (!parameterTypes[i].equals(methodParameterTypes[i])) {
- // sure - it's Complex Type
- if ((parameterTypes[i].indexOf('.') != -1)
- && (methodParameterTypes[i].indexOf('.') == -1)) {
- equal = false;
- }
- }
- }
- if (equal) {
- filteredMethods.add(method);
- }
- }
- return filteredMethods.toArray(new MethodInfo[0]);
- }
-
- /**
- * Returns the methods for the type specified
- *
- * @return
- */
- public List<MemberInfo> getMethods() {
- List<MemberInfo> methods = new ArrayList<MemberInfo>();
- for (MethodInfo info : fMethods) {
- if (info.isPublic() && !info.isConstructor()
- && !info.isStatic() && !info.isJavaLangObject()
- && !info.isGetter() && !info.isSetter())
- methods.add(info);
- }
- return methods;
- }
-
- /**
- * String presentation of member
- * @author Alexey Kazakov
- */
- public static class MemberPresentation {
- private String presentation;
- private MemberInfo member;
-
- public MemberPresentation(String presentation, MemberInfo member) {
- super();
- this.presentation = presentation;
- this.member = member;
- }
-
- public String getPresentation() {
- return presentation;
- }
-
- public MemberInfo getMember() {
- return member;
- }
-
- @Override
- public boolean equals(Object obj) {
- if(obj!=null && obj instanceof MemberPresentation) {
- return presentation.equals(((MemberPresentation)obj).getPresentation());
- }
- return false;
- }
-
- @Override
- public int hashCode() {
- return presentation.hashCode();
- }
-
- @Override
- public String toString() {
- return presentation;
- }
- }
-
- private static class MemberPresentationComparator implements Comparator<MemberPresentation> {
- /* (non-Javadoc)
- * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
- */
- public int compare(MemberPresentation m1, MemberPresentation m2) {
- return m1.getPresentation().compareTo(m2.getPresentation());
- }
- }
-
- public final static MemberPresentationComparator MEMBER_PRESENTATION_COMPARATOR = new MemberPresentationComparator();
-
- /**
- * Returns the method presentation strings for the type specified
- * @return
- */
- public Set<String> getMethodPresentationStrings() {
- Set<MemberPresentation> set = getMethodPresentations();
- Set<String> result = new HashSet<String>();
- for (MemberPresentation presentation : set) {
- result.add(presentation.getPresentation());
- }
- return result;
- }
-
- /**
- * Returns the method presentations for the type specified
- * @return
- */
- public Set<MemberPresentation> getMethodPresentations() {
- Set<MemberPresentation> methods = new TreeSet<MemberPresentation>(MEMBER_PRESENTATION_COMPARATOR);
- List<MemberInfo> mthds = getMethods();
- for (MemberInfo info : mthds) {
- if (!(info instanceof MethodInfo))
- continue;
-
- MethodInfo method = (MethodInfo)info;
-
- StringBuffer name = new StringBuffer(method.getName());
-
- // Add method as 'foo'
- methods.add(new MemberPresentation(name.toString(), method));
-
- // Add method as 'foo(param1,param2)'
- name.append('(');
- String[] mParams = method.getParameterNames();
- for (int j = 0; mParams != null && j < mParams.length; j++) {
- if (j > 0) name.append(", "); //$NON-NLS-1$
- name.append(mParams[j]);
- }
- name.append(')');
-
- methods.add(new MemberPresentation(name.toString(), method));
- }
- return methods;
- }
-
- /**
- * Returns the properties for the type specified
- *
- * @return
- */
- public List<MemberInfo> getProperties() {
- List<MemberInfo> properties = new ArrayList<MemberInfo>();
- for (MethodInfo info : fMethods) {
- if (info.isPublic() && !info.isConstructor()
- && !info.isStatic() && !info.isJavaLangObject()
- && (info.isGetter() || info.isSetter()))
- properties.add(info);
- }
-
- /*
- * The following code was excluded due to the following issue:
- *
- * http://jira.jboss.com/jira/browse/JBIDE-1203#action_12385823
- *
- *
- for (FieldInfo info : fFields) {
- if (info.isPublic()
- && !info.isStatic() && !info.isJavaLangObject())
- properties.add(info);
- }
- */
-
- return properties;
- }
-
- /**
- * Returns the property presentations for the type specified
- *
- * @return
- */
- public Set<MemberPresentation> getPropertyPresentations() {
- return getPropertyPresentations(null);
- }
-
- /**
- * Returns the property presentation strings for the type specified
- *
- * @return
- */
- public Set<String> getPropertyPresentationStrings() {
- return getPropertyPresentationStrings(null);
- }
-
- /**
- * Returns the property presentation strings for the type specified
- *
- * @param unpairedGettersOrSetters - map of unpaired getters or setters of type's properties. 'key' is property name.
- * @return
- */
- public Set<String> getPropertyPresentationStrings(Map<String, MethodInfo> unpairedGettersOrSetters) {
- Set<MemberPresentation> set = getPropertyPresentations(unpairedGettersOrSetters);
- Set<String> result = new HashSet<String>();
- for (MemberPresentation presentation : set) {
- result.add(presentation.getPresentation());
- }
- return result;
- }
-
- /**
- * Returns the property presentations for the type specified
- *
- * @param unpairedGettersOrSetters - map of unpaired getters or setters of type's properties. 'key' is property name.
- * @return
- */
- public Set<MemberPresentation> getPropertyPresentations(Map<String, MethodInfo> unpairedGettersOrSetters) {
- Set<MemberPresentation> properties = new TreeSet<MemberPresentation>(MEMBER_PRESENTATION_COMPARATOR);
- List<MemberInfo> props = getProperties();
- HashMap<String, MethodInfo> getters = new HashMap<String, MethodInfo>();
- HashMap<String, MethodInfo> setters = new HashMap<String, MethodInfo>();
- for (MemberInfo info : props) {
- if (info instanceof MethodInfo) {
- MethodInfo m = (MethodInfo)info;
-
- if (m.isGetter() || m.isSetter()) {
- StringBuffer name = new StringBuffer(m.getName());
- if(m.getName().startsWith("i")) { //$NON-NLS-1$
- name.delete(0, 2);
- } else {
- name.delete(0, 3);
- }
- if(name.length()<2 || Character.isLowerCase(name.charAt(1))) {
- name.setCharAt(0, Character.toLowerCase(name.charAt(0)));
- }
- String propertyName = name.toString();
- MemberPresentation pr = new MemberPresentation(propertyName, m);
- if(!properties.contains(pr)) {
- properties.add(pr);
- }
- if(unpairedGettersOrSetters!=null) {
- MethodInfo previousGetter = getters.get(propertyName);
- MethodInfo previousSetter = setters.get(propertyName);
- if((previousGetter!=null && m.isSetter())||(previousSetter!=null && m.isGetter())) {
- // We have both Getter and Setter
- unpairedGettersOrSetters.remove(propertyName);
- } else if(m.isSetter()) {
- setters.put(propertyName, m);
- unpairedGettersOrSetters.put(propertyName, m);
- } else if(m.isGetter()) {
- getters.put(propertyName, m);
- unpairedGettersOrSetters.put(propertyName, m);
- }
- }
- }
- } else {
- properties.add(new MemberPresentation(info.getName(), info));
- }
- }
- return properties;
- }
-
- public static void cleanCache() {
- caches = new Caches();
- }
-
- public static MemberInfo createMemberInfo(IMember member, boolean dataModel) {
- ProjectCache pcache = caches.get(member);
-
- Map<IMember, MemberInfo> cache = null;
- if(pcache != null) {
- cache = dataModel ? pcache.memberInfoCacheTrue : pcache.memberInfoCacheFalse;
- }
- MemberInfo result = cache == null ? null : cache.get(member);
- if(result != null) return result;
- try {
- if (member instanceof IType) {
- result = new TypeInfo((IType)member, null, dataModel);
- } else if (member instanceof IField) {
- IField field = (IField)member;
- TypeInfo declaringType = new TypeInfo(field.getDeclaringType(), null, dataModel);
- result = new FieldInfo(field, declaringType, declaringType, dataModel);
- } else if (member instanceof IMethod) {
- IMethod method = (IMethod)member;
- TypeInfo declaringType = new TypeInfo(method.getDeclaringType(), null, dataModel);
- result = new MethodInfo(method, declaringType, declaringType, dataModel);
- }
- } catch (JavaModelException e) {
- ModelPlugin.getPluginLog().logError(e);
- }
- if(result != null) {
- cache.put(member, result);
- }
-
- return result;
- }
-
- public static MemberInfo createMemberInfo(IMember member) {
- return createMemberInfo(member, false);
- }
-
- static String[] resolveSignatures (IType type, String[] signatures) {
- if (signatures == null || signatures.length == 0)
- return new String[0];
-
- String[] resolvedSignatures = new String[signatures.length];
- for (int i = 0; i < signatures.length; i++) {
- resolvedSignatures[i] = EclipseJavaUtil.resolveTypeAsString(type, signatures[i]);
- }
- return resolvedSignatures;
- }
-
- static String[] convertToStringArray(char[][] names) {
- if (names == null || names.length == 0)
- return new String[0];
- String[] sNames = new String[names.length];
- for (int i = 0; i < sNames.length; i++) {
- sNames[i] = String.valueOf(names[i]);
- }
- return sNames;
- }
-
- static String[] getTypeErasureFromSignatureArray(String[] signatures) {
- if (signatures == null || signatures.length == 0)
- return new String[0];
- String[] result = new String[signatures.length];
- for (int i = 0; i < signatures.length; i++) {
- result[i] = Signature.getTypeErasure(signatures[i]);
- }
- return result;
- }
-
- static String getParameterNameFromType(String typeSignatures) {
- if(typeSignatures==null) {
- return null;
- }
- return Signature.getTypeVariable(typeSignatures);
- }
-}
\ No newline at end of file
17 years, 3 months
JBoss Tools SVN: r10596 - in trunk/common/plugins/org.jboss.tools.common.el.core: src/org/jboss/tools/common/el/core and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-10-01 11:31:11 -0400 (Wed, 01 Oct 2008)
New Revision: 10596
Added:
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/ELParserUtil.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/ELCompletionEngine.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/ELOperandResolveStatus.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/ElVarSearcher.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/TypeInfoCollector.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/Var.java
Modified:
trunk/common/plugins/org.jboss.tools.common.el.core/META-INF/MANIFEST.MF
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/Activator.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/model/ELModel.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/ELParserFactory.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/LexicalToken.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/TokenizerFactory.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELModelImpl.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELObjectImpl.java
Log:
JBIDE-1497.
Refactoring
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/META-INF/MANIFEST.MF 2008-10-01 15:26:10 UTC (rev 10595)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/META-INF/MANIFEST.MF 2008-10-01 15:31:11 UTC (rev 10596)
@@ -7,10 +7,16 @@
Bundle-Version: 2.0.0
Provide-Package: org.jboss.tools.common.el.core,
org.jboss.tools.common.el.core.model,
- org.jboss.tools.common.el.core.parser
+ org.jboss.tools.common.el.core.parser,
+ org.jboss.tools.common.el.core.resolver
Bundle-Activator: org.jboss.tools.common.el.core.Activator
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.core.resources,
+ org.eclipse.jdt.core,
org.eclipse.jface.text,
+ org.eclipse.wst.sse.core,
+ org.eclipse.wst.sse.ui,
+ org.jboss.tools.common,
+ org.jboss.tools.common.model,
org.jboss.tools.common.resref.core;reprovide=true
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/Activator.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/Activator.java 2008-10-01 15:26:10 UTC (rev 10595)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/Activator.java 2008-10-01 15:31:11 UTC (rev 10596)
@@ -10,13 +10,14 @@
******************************************************************************/
package org.jboss.tools.common.el.core;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.jboss.tools.common.log.BaseUIPlugin;
+import org.jboss.tools.common.log.IPluginLog;
import org.osgi.framework.BundleContext;
/**
* The activator class controls the plug-in life cycle
*/
-public class Activator extends AbstractUIPlugin {
+public class Activator extends BaseUIPlugin {
// The plug-in ID
public static final String PLUGIN_ID = "org.jboss.tools.common.el";
@@ -57,4 +58,8 @@
return plugin;
}
+ public static IPluginLog getPluginLog() {
+ return getDefault();
+ }
+
}
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/model/ELModel.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/model/ELModel.java 2008-10-01 15:26:10 UTC (rev 10595)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/model/ELModel.java 2008-10-01 15:31:11 UTC (rev 10596)
@@ -25,4 +25,6 @@
public List<ELInstance> getInstances();
+ public void shift(int delta);
+
}
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/ELParserFactory.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/ELParserFactory.java 2008-10-01 15:26:10 UTC (rev 10595)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/ELParserFactory.java 2008-10-01 15:31:11 UTC (rev 10596)
@@ -10,58 +10,13 @@
******************************************************************************/
package org.jboss.tools.common.el.core.parser;
-import java.util.List;
-
-import org.jboss.tools.common.el.core.model.ELModel;
-import org.jboss.tools.common.el.internal.core.model.ELModelImpl;
-import org.jboss.tools.common.el.internal.core.parser.ELParserImpl;
-
/**
*
* @author V. Kabanovich
*
*/
-public class ELParserFactory {
+public interface ELParserFactory {
- public static ELParser createDefaultParser() {
- return new DefaultParser() {
- protected Tokenizer createTokenizer() {
- return TokenizerFactory.createDefaultTokenizer();
- }
- };
- }
+ public ELParser createParser();
- public static ELParser createJbossParser() {
- return new DefaultParser() {
- protected Tokenizer createTokenizer() {
- return TokenizerFactory.createJbossTokenizer();
- }
- };
- }
-
- private static abstract class DefaultParser implements ELParser {
- ELParserImpl impl = new ELParserImpl();
- List<SyntaxError> errors = null;
-
- public ELModel parse(String source) {
- return parse(source, 0, source.length());
- }
-
- public ELModel parse(String source, int start, int length) {
- Tokenizer t = createTokenizer();
- LexicalToken token = t.parse(source, start, length);
- errors = t.getErrors();
- ELModelImpl model = impl.parse(token);
- model.setSource(source);
- model.setErrors(errors);
- return model;
- }
-
- public List<SyntaxError> getSyntaxErrors() {
- return errors;
- }
-
- protected abstract Tokenizer createTokenizer();
- }
-
}
Added: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/ELParserUtil.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/ELParserUtil.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/ELParserUtil.java 2008-10-01 15:31:11 UTC (rev 10596)
@@ -0,0 +1,75 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.common.el.core.parser;
+
+import java.util.List;
+
+import org.jboss.tools.common.el.core.model.ELModel;
+import org.jboss.tools.common.el.internal.core.model.ELModelImpl;
+import org.jboss.tools.common.el.internal.core.parser.ELParserImpl;
+
+/**
+ *
+ * @author V. Kabanovich
+ *
+ */
+public class ELParserUtil {
+
+ public static ELParserFactory getDefaultFactory() {
+ return new ELParserFactory() {
+ public ELParser createParser() {
+ return new DefaultParser() {
+ protected Tokenizer createTokenizer() {
+ return TokenizerFactory.createDefaultTokenizer();
+ }
+ };
+ }
+ };
+ }
+
+ public static ELParserFactory getJbossFactory() {
+ return new ELParserFactory() {
+ public ELParser createParser() {
+ return new DefaultParser() {
+ protected Tokenizer createTokenizer() {
+ return TokenizerFactory.createJbossTokenizer();
+ }
+ };
+ }
+ };
+ }
+
+ private static abstract class DefaultParser implements ELParser {
+ ELParserImpl impl = new ELParserImpl();
+ List<SyntaxError> errors = null;
+
+ public ELModel parse(String source) {
+ return parse(source, 0, source.length());
+ }
+
+ public ELModel parse(String source, int start, int length) {
+ Tokenizer t = createTokenizer();
+ LexicalToken token = t.parse(source, start, length);
+ errors = t.getErrors();
+ ELModelImpl model = impl.parse(token);
+ model.setSource(source);
+ model.setErrors(errors);
+ return model;
+ }
+
+ public List<SyntaxError> getSyntaxErrors() {
+ return errors;
+ }
+
+ protected abstract Tokenizer createTokenizer();
+ }
+
+}
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/LexicalToken.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/LexicalToken.java 2008-10-01 15:26:10 UTC (rev 10595)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/LexicalToken.java 2008-10-01 15:31:11 UTC (rev 10596)
@@ -138,4 +138,9 @@
return next.findTokenForward(type);
}
+ public void shift(int delta) {
+ start += delta;
+ if(next != null) next.shift(delta);
+ }
+
}
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/TokenizerFactory.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/TokenizerFactory.java 2008-10-01 15:26:10 UTC (rev 10595)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/TokenizerFactory.java 2008-10-01 15:31:11 UTC (rev 10596)
@@ -13,6 +13,7 @@
import java.util.List;
import org.jboss.tools.common.el.core.model.ELExpression;
+import org.jboss.tools.common.el.core.model.ELInstance;
import org.jboss.tools.common.el.core.model.ELInvocationExpression;
import org.jboss.tools.common.el.core.model.ELModel;
import org.jboss.tools.common.el.core.model.ELUtil;
@@ -101,13 +102,14 @@
}
public static void main(String[] args) {
- String text = "#{g11.g12.y13} #{a14.b15(x.t.u(uu.ii[9], j)).b16(m17(v18(i19[2]).u20).)+ a21(c.).b.}";
+ String text = "#{.8 +(.9d / - (-.8))}";
+//"#{g11.g12.y13} #{#{ #{a14.b15(x.t.u(uu.ii[9], j)).b16(m17(v18(i19[2]).u20).)+ a21(c.).b.}";
//"#{not a.b(x,y) + s.h((6 != -8) & (7 + -iy88.g[9].h(7 div 8).i.j)+(8) ? 4 : 7,'p', a.b.c.d[null])}";
//"q82#{a( g.h(7 + 8) + 8, g['h'].j(),'p')}k#{b}";
Tokenizer t = createJbossTokenizer();
LexicalToken token = t.parse(text);
LexicalToken ti = token;
-
+
while(ti != null) {
int type = ti.getType();
System.out.println(type + ":" + ti.getText() + ":");
@@ -117,9 +119,10 @@
for (SyntaxError e: errors) {
System.out.println("state=" + e.getState() + " position=" + e.getPosition());
}
- ELParser parser = ELParserFactory.createJbossParser();
- ELModel model = parser.parse(text, 0, 13);
+ ELParser parser = ELParserUtil.getJbossFactory().createParser();
+ ELModel model = parser.parse(text, 0, 90);
System.out.println(model);
+
ELExpression expr = model.getInstances().get(0).getExpression();
System.out.println("Expression=" + expr);
List<ELInvocationExpression> is = expr.getInvocations();
Added: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/ELCompletionEngine.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/ELCompletionEngine.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/ELCompletionEngine.java 2008-10-01 15:31:11 UTC (rev 10596)
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.common.el.core.resolver;
+
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jface.text.BadLocationException;
+import org.jboss.tools.common.el.core.model.ELExpression;
+import org.jboss.tools.common.el.core.parser.ELParserFactory;
+
+public interface ELCompletionEngine {
+
+ public ELOperandResolveStatus resolveELOperand(IFile file, ELExpression operand,
+ boolean returnEqualedVariablesOnly, List<Var> vars, ElVarSearcher varSearcher) throws BadLocationException, StringIndexOutOfBoundsException;
+
+ public ELParserFactory getParserFactory();
+}
Added: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/ELOperandResolveStatus.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/ELOperandResolveStatus.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/ELOperandResolveStatus.java 2008-10-01 15:31:11 UTC (rev 10596)
@@ -0,0 +1,165 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.common.el.core.resolver;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeSet;
+
+import org.jboss.tools.common.el.core.model.ELInvocationExpression;
+
+/**
+ * Status of EL resolving.
+ * @author Jeremy
+ */
+public class ELOperandResolveStatus {
+ private ELInvocationExpression tokens;
+ Map<String, TypeInfoCollector.MethodInfo> unpairedGettersOrSetters;
+ Set<String> proposals;
+ private ELInvocationExpression lastResolvedToken;
+ private boolean isMapOrCollectionOrBundleAmoungTheTokens = false;
+ private TypeInfoCollector.MemberInfo memberOfResolvedOperand;
+
+ /**
+ * @return MemberInfo of last segment of EL operand. Null if El is not resolved.
+ */
+ public TypeInfoCollector.MemberInfo getMemberOfResolvedOperand() {
+ return memberOfResolvedOperand;
+ }
+
+ /**
+ * Sets MemberInfo for last segment of EL operand.
+ * @param lastResolvedMember
+ */
+ public void setMemberOfResolvedOperand(
+ TypeInfoCollector.MemberInfo lastResolvedMember) {
+ this.memberOfResolvedOperand = lastResolvedMember;
+ }
+
+ /**
+ * Constructor
+ * @param tokens Tokens of EL
+ */
+ public ELOperandResolveStatus(ELInvocationExpression tokens) {
+ this.tokens = tokens;
+ }
+
+ /**
+ * @return true if EL contains any not parametrized Collection or ResourceBundle.
+ */
+ public boolean isMapOrCollectionOrBundleAmoungTheTokens() {
+ return this.isMapOrCollectionOrBundleAmoungTheTokens;
+ }
+
+ public void setMapOrCollectionOrBundleAmoungTheTokens() {
+ this.isMapOrCollectionOrBundleAmoungTheTokens = true;
+ }
+
+ /**
+ * @return true if EL is resolved.
+ */
+ public boolean isOK() {
+ return !getProposals().isEmpty() || isMapOrCollectionOrBundleAmoungTheTokens();
+ }
+
+ /**
+ * @return false if El is not resolved.
+ */
+ public boolean isError() {
+ return !isOK();
+ }
+
+ /**
+ * @return List of resolved tokens of EL. Includes separators "."
+ */
+ public ELInvocationExpression getResolvedTokens() {
+ return lastResolvedToken;
+ }
+
+ /**
+ * @return List of unresolved tokens of EL.
+ */
+ public ELInvocationExpression getUnresolvedTokens() {
+ if(lastResolvedToken == tokens) return null;
+ if(lastResolvedToken != null && (lastResolvedToken.getParent() instanceof ELInvocationExpression)) {
+ return (ELInvocationExpression)lastResolvedToken.getParent();
+ }
+ ELInvocationExpression l = tokens;
+ while(l != null && l.getLeft() != lastResolvedToken) {
+ l = l.getLeft();
+ }
+ return l;
+ }
+
+ /**
+ * @return Last resolved token of EL. Can be separator "." // no, change it
+ */
+ public ELInvocationExpression getLastResolvedToken() {
+ return lastResolvedToken;
+ }
+
+ /**
+ * @param lastResolvedToken Last resolved token of EL. Can be separator "."
+ */
+ public void setLastResolvedToken(ELInvocationExpression lastResolvedToken) {
+ this.lastResolvedToken = lastResolvedToken;
+ }
+
+ /**
+ * @return Tokens of EL.
+ */
+ public ELInvocationExpression getTokens() {
+ return tokens;
+ }
+
+ /**
+ * @param tokens Tokens of EL.
+ */
+ public void setTokens(ELInvocationExpression tokens) {
+ this.tokens = tokens;
+ }
+
+ /**
+ * @return Set of proposals for EL.
+ */
+ public Set<String> getProposals() {
+ return proposals == null ? new TreeSet<String>() : proposals;
+ }
+
+ /**
+ * @param proposals Set of proposals.
+ */
+ public void setProposals(Set<String> proposals) {
+ this.proposals = proposals;
+ }
+
+ /**
+ * @return Map of unpaired getters and setters (getters/setters without proper setters/getters).
+ * of all properties used in EL.
+ * Key - name of property.
+ * Value - MethodInfo of existed getter/setter.
+ */
+ public Map<String, TypeInfoCollector.MethodInfo> getUnpairedGettersOrSetters() {
+ if (unpairedGettersOrSetters == null) {
+ unpairedGettersOrSetters = new HashMap<String, TypeInfoCollector.MethodInfo>();
+ }
+ return unpairedGettersOrSetters;
+ }
+
+ /**
+ * Clear Map of unpaired getters and setters.
+ */
+ public void clearUnpairedGettersOrSetters() {
+ getUnpairedGettersOrSetters().clear();
+ }
+
+}
Copied: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/ElVarSearcher.java (from rev 10526, trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/ElVarSearcher.java)
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/ElVarSearcher.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/ElVarSearcher.java 2008-10-01 15:31:11 UTC (rev 10596)
@@ -0,0 +1,284 @@
+ /*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.common.el.core.resolver;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.wst.sse.core.StructuredModelManager;
+import org.eclipse.wst.sse.core.internal.provisional.IModelManager;
+import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
+import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
+import org.eclipse.wst.sse.ui.internal.contentassist.ContentAssistUtils;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMAttr;
+import org.jboss.tools.common.el.core.Activator;
+import org.jboss.tools.common.el.core.model.ELExpression;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+/**
+ * This class helps to find var/value attributes in DOM tree.
+ * @author Alexey Kazakov
+ */
+public class ElVarSearcher {
+
+ private final static String VAR_ATTRIBUTE_NAME = "var";
+ private final static String VALUE_ATTRIBUTE_NAME = "value";
+
+ private IFile file;
+ private ELCompletionEngine engine;
+
+ /**
+ * Constructor.
+ * @param project Seam project where we will look for vars.
+ * @param file File where we will look for vars.
+ * @param engine Competion Engine that we will use for resolving vars.
+ */
+ public ElVarSearcher(IFile file, ELCompletionEngine engine) {
+ this.file = file;
+ this.engine = engine;
+ }
+
+ /**
+ * Constructor.
+ * @param project Seam project where we will look for vars.
+ * @param engine Competion Engine that we will use for resolving vars.
+ */
+ public ElVarSearcher(ELCompletionEngine engine) {
+ this(null, engine);
+ }
+
+ /**
+ * @param file File where we will look for vars.
+ */
+ public void setFile(IFile file) {
+ this.file = file;
+ }
+
+ /**
+ * @param viewer
+ * @param offset
+ * @return
+ */
+ public static Node getNode(ITextViewer viewer, int offset) {
+ IndexedRegion treeNode = ContentAssistUtils.getNodeAt(viewer, offset);
+ if(treeNode instanceof Node) {
+ return (Node)treeNode;
+ }
+ return null;
+ }
+
+ /**
+ * @param viewer
+ * @param offset
+ * @return
+ */
+
+ public static Node getNode(IFile file, int offset) {
+ IndexedRegion treeNode = getNodeAt(file, offset);
+ if(treeNode instanceof Node) {
+ return (Node)treeNode;
+ }
+ return null;
+ }
+
+ /**
+ * Returns the closest IndexedRegion for the offset and viewer allowing
+ * for differences between viewer offsets and model positions. note: this
+ * method returns an IndexedRegion for read only
+ *
+ * @param file
+ * the file whose document is used to compute the proposals
+ * @param documentOffset
+ * an offset within the document for which completions should
+ * be computed
+ * @return an IndexedRegion
+ */
+
+ public static IndexedRegion getNodeAt(IFile file, int documentOffset) {
+
+ if (file == null)
+ return null;
+
+ IndexedRegion node = null;
+ IModelManager mm = StructuredModelManager.getModelManager();
+ IStructuredModel model = null;
+ if (mm != null) {
+ try {
+ model = mm.getModelForRead(file);
+ } catch (IOException e) {
+ return null;
+ } catch (CoreException e) {
+ return null;
+ }
+ }
+ try {
+ if (model != null) {
+ int lastOffset = documentOffset;
+ node = model.getIndexedRegion(documentOffset);
+ while (node == null && lastOffset >= 0) {
+ lastOffset--;
+ node = model.getIndexedRegion(lastOffset);
+ }
+ }
+ } finally {
+ if (model != null)
+ model.releaseFromRead();
+ }
+ return node;
+ }
+
+ /**
+ * @param node
+ * @return All var/value that can be used in this position and null if can't find anyone.
+ */
+ public List<Var> findAllVars(ITextViewer viewer, int offset) {
+ Node node = getNode(viewer, offset);
+ if(node!=null) {
+ return findAllVars(node);
+ }
+ return null;
+ }
+
+ /**
+ * @param node
+ * @return All var/value that can be used in this position and null if can't find anyone.
+ */
+ public List<Var> findAllVars(IFile file, int offset) {
+ Node node = getNode(file, offset);
+ if(node!=null) {
+ return findAllVars(node);
+ }
+ return null;
+ }
+
+ /**
+ * @param node
+ * @return All var/value that can be used in node and null if can't find anyone.
+ */
+ public List<Var> findAllVars(Node node) {
+ ArrayList<Var> vars = null;
+ Node parentNode = node.getParentNode();
+ while(parentNode!=null) {
+ Var var = findVar(parentNode);
+ if(var!=null) {
+ if(vars == null) {
+ vars = new ArrayList<Var>();
+ }
+ vars.add(0, var);
+ }
+ parentNode = parentNode.getParentNode();
+ }
+ return vars;
+ }
+
+ /**
+ * @param node
+ * @return found var/value that can be used in this position and null if can't find anyone.
+ */
+ public Var findVar(IFile file, int offset) {
+ Node node = getNode(file, offset);
+ if(node!=null) {
+ return findVar(node);
+ }
+ return null;
+ }
+
+ /**
+ * Finds var/value attribute in node
+ * @param node
+ * @param vars
+ * @return found var/value or null
+ */
+ public Var findVar(Node node) {
+ if(node!=null && Node.ELEMENT_NODE == node.getNodeType()) {
+ Element element = (Element)node;
+ String var = element.getAttribute(VAR_ATTRIBUTE_NAME);
+ if(var!=null) {
+ int declOffset = 0;
+ int declLength = 0;
+ Node varAttr = element.getAttributeNode(VAR_ATTRIBUTE_NAME);
+ if (varAttr instanceof IDOMAttr) {
+ int varNameStart = ((IDOMAttr)varAttr).getNameRegionStartOffset();
+ int varNameEnd = ((IDOMAttr)varAttr).getNameRegionEndOffset();
+ declOffset = varNameStart;
+ declLength = varNameEnd - varNameStart;
+ }
+ var = var.trim();
+ if(!"".equals(var)) {
+ String value = element.getAttribute(VALUE_ATTRIBUTE_NAME);
+ if(value!=null) {
+ value = value.trim();
+ Var newVar = new Var(engine.getParserFactory(), var, value, declOffset, declLength);
+ if(newVar.getElToken()!=null) {
+ return newVar;
+ }
+ }
+ }
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * Finds var in list of vars that is used in given EL.
+ * @param el EL without brackets.
+ * @param vars
+ * @param initializeNestedVars
+ * @return
+ */
+ public Var findVarForEl(String el, List<Var> vars, boolean initializeNestedVars) {
+ if(vars!=null) {
+ ArrayList<Var> parentVars = new ArrayList<Var>();
+ for (Var var : vars) {
+ ELExpression token = var.getElToken();
+ if(token!=null && !token.getText().endsWith(".")) {
+ String varName = var.getName();
+ if(el.startsWith(varName)) { //TODO it was el.equals(varName) and did not work. Why?
+ if(var.getElToken()!=null && initializeNestedVars) {
+ Var parentVar = findVarForEl(var.getElToken().getText(), parentVars, true);
+ if(parentVar!=null) {
+ ELExpression resolvedToken = parentVar.getResolvedElToken();
+ if(resolvedToken==null && parentVar.getElToken()!=null) {
+ try {
+ // Initialize parent vars.
+ engine.resolveELOperand(file, var.getElToken(), true, parentVars, this);
+ resolvedToken = parentVar.getResolvedElToken();
+ } catch (StringIndexOutOfBoundsException e) {
+ Activator.getPluginLog().logError(e);
+ } catch (BadLocationException e) {
+ Activator.getPluginLog().logError(e);
+ }
+ }
+ if(resolvedToken!=null) {
+ String oldText = var.getElToken().getText();
+ String newValue = "#{" + resolvedToken.getText() + oldText.substring(parentVar.getName().length()) + "}";
+ var.value = newValue;
+ var.elToken = var.parseEl(newValue);
+ }
+ }
+ }
+ return var;
+ }
+ }
+ parentVars.add(var);
+ }
+ }
+ return null;
+ }
+
+}
Copied: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/TypeInfoCollector.java (from rev 10439, trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/TypeInfoCollector.java)
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/TypeInfoCollector.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/TypeInfoCollector.java 2008-10-01 15:31:11 UTC (rev 10596)
@@ -0,0 +1,1236 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.common.el.core.resolver;
+
+import java.lang.reflect.Modifier;
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeSet;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jdt.core.IField;
+import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IMember;
+import org.eclipse.jdt.core.IMethod;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.ITypeHierarchy;
+import org.eclipse.jdt.core.ITypeParameter;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.Signature;
+import org.jboss.tools.common.el.core.Activator;
+import org.jboss.tools.common.model.util.EclipseJavaUtil;
+
+/**
+ * This class helps to collect information of java elements used in Seam EL.
+ * @author Viktor Rubezhny, Alexey Kazakov
+ */
+public class TypeInfoCollector {
+ IType fType;
+ MemberInfo fMember;
+ TypeInfo fTypeInfo;
+ List<MethodInfo> fMethods;
+ List<FieldInfo> fFields;
+
+ private static class ProjectCache {
+ Map<IMember, MemberInfo> memberInfoCacheFalse = new HashMap<IMember, MemberInfo>();
+ Map<IMember, MemberInfo> memberInfoCacheTrue = new HashMap<IMember, MemberInfo>();
+ Map<IType, SuperTypeInfo> superTypesCache = new HashMap<IType, SuperTypeInfo>();
+ }
+
+ private static Caches caches = new Caches();
+
+ private static class Caches {
+ ProjectCache common = new ProjectCache();
+// Map<IProject, ProjectCache> cache = new HashMap<IProject, ProjectCache>();
+
+ public boolean contains(IProject p) {
+// return p != null && cache.containsKey(p);
+ return true;
+ }
+
+ public void clean(IProject p) {
+// if(contains(p)) {
+// cache.remove(p);
+// }
+ common = new ProjectCache();
+ }
+
+ public ProjectCache get(IProject p) {
+ if(p == null || !p.isAccessible()) return null;
+ return common;
+// ProjectCache c = cache.get(p);
+// if(c == null) {
+// c = new ProjectCache();
+// cache.put(p, c);
+// }
+// return c;
+ }
+
+ public ProjectCache get(IJavaElement element) {
+ if(element == null) {
+ return null;
+ }
+ IJavaProject jp = element.getJavaProject();
+ IProject p = jp == null ? null : jp.getProject();
+ return get(p);
+ }
+ }
+
+ public static class Type {
+ private String fName;
+ private String fQualifiedName;
+ private Type[] fParameters;
+ private IType fSource;
+ private String fSignature;
+ private boolean fIsArray;
+ private Type fTypeOfArrayElement;
+ private String fQualifiedTypeNameOfArrayElement;
+
+ private Type() {
+ }
+
+ public static Type valueOf(String name) {
+ Type instance = new Type();
+ instance.setName(name);
+ instance.setParameters(new Type[0]);
+ return instance;
+ }
+
+ public Type(String signature, IType source) {
+ if(signature!=null) {
+ String erasureSignature = Signature.getTypeErasure(signature);
+ String typeOfArraySiganture = Signature.getElementType(erasureSignature);
+ fName = String.valueOf(Signature.toString(erasureSignature));
+ if(!erasureSignature.equals(typeOfArraySiganture)) {
+ // this is an array
+ fIsArray = true;
+ fTypeOfArrayElement = new Type(typeOfArraySiganture, source);
+ }
+ String[] signaturesOfParametersOfType = Signature.getTypeArguments(signature);
+ fParameters = new Type[signaturesOfParametersOfType.length];
+ for (int i = 0; i < signaturesOfParametersOfType.length; i++) {
+ fParameters[i] = new Type(signaturesOfParametersOfType[i], source);
+ }
+ } else {
+ fName = source.getFullyQualifiedName();
+ setParameters(new Type[0]);
+ }
+ fSource = source;
+ }
+
+ public void initializeParameters(Map<String, Type> parameters) {
+ Type type = parameters.get(fName);
+ if(type!=null) {
+ fName = type.getName();
+ fParameters = type.getParameters();
+ fSource = type.getSource();
+ fIsArray = type.isArray();
+ fTypeOfArrayElement = type.getTypeOfArrayElement();
+ }
+ for (int i = 0; i < fParameters.length; i++) {
+ fParameters[i].initializeParameters(parameters);
+ }
+ }
+
+ public Type getParameter(int index) {
+ if(fParameters.length>index) {
+ return fParameters[index];
+ }
+ return null;
+ }
+
+ public String getQualifiedTypeNameOfArrayElement() {
+ if(fQualifiedTypeNameOfArrayElement==null && fSource!=null) {
+ fQualifiedTypeNameOfArrayElement = EclipseJavaUtil.resolveType(fSource, fTypeOfArrayElement.getName());
+ }
+ return fQualifiedTypeNameOfArrayElement;
+ }
+
+ public String getQualifiedName() {
+ if(fQualifiedName == null && fSource!=null) {
+ fQualifiedName = EclipseJavaUtil.resolveType(fSource, fName);
+ }
+ return fQualifiedName;
+ }
+
+ public boolean isArray() {
+ return fIsArray;
+ }
+
+ public void setArray(boolean array) {
+ fIsArray = array;
+ }
+
+ public Type getTypeOfArrayElement() {
+ return fTypeOfArrayElement;
+ }
+
+ public void setTypeOfArrayElement(Type typeOfArrayElement) {
+ fTypeOfArrayElement = typeOfArrayElement;
+ }
+
+ public String getName() {
+ return fName;
+ }
+
+ public void setName(String name) {
+ fName = name;
+ }
+
+ public Type[] getParameters() {
+ return fParameters;
+ }
+
+ public void setParameters(Type[] parameters) {
+ this.fParameters = parameters;
+ }
+
+ public IType getSource() {
+ return fSource;
+ }
+
+ public void setSource(IType source) {
+ this.fSource = source;
+ }
+
+ public String getSignature() {
+ return fSignature;
+ }
+
+ public void setSignature(String signature) {
+ this.fSignature = signature;
+ }
+ }
+
+ public abstract static class MemberInfo {
+ private String fDeclaringTypeQualifiedName;
+ private String fName;
+ private int fModifiers;
+ private IType fSourceType;
+ private MemberInfo fParentMember;
+ private IType fMemberType;
+ private boolean isDataModel;
+ private Type fType;
+
+ protected MemberInfo (
+ IType sourceType,
+ String declaringTypeQualifiedName, String name, int modifiers, MemberInfo parentMember, boolean dataModel, Type type) {
+ setSourceType(sourceType);
+ setDeclaringTypeQualifiedName(declaringTypeQualifiedName);
+ setName(name);
+ setModifiers(modifiers);
+ setParentMember(parentMember);
+ setDataModel(dataModel);
+ setType(type);
+ }
+
+ abstract void initializeParameters();
+
+ protected void setType(Type type) {
+ fType = type;
+ }
+
+ public Type getType() {
+ return fType;
+ }
+
+ public void setSourceType(IType sourceType) {
+ fSourceType = sourceType;
+ }
+
+ public IType getSourceType() {
+ return fSourceType;
+ }
+
+ protected void setName (String name) {
+ this.fName = name;
+ }
+
+ public String getName() {
+ return fName;
+ }
+
+ protected void setDeclaringTypeQualifiedName(String declaringTypeQualifiedName) {
+ this.fDeclaringTypeQualifiedName = declaringTypeQualifiedName;
+ }
+
+ public String getDeclaringTypeQualifiedName() {
+ return fDeclaringTypeQualifiedName;
+ }
+
+ protected void setModifiers (int modifiers) {
+ this.fModifiers = modifiers;
+ }
+
+ public int getModifiers() {
+ return fModifiers;
+ }
+
+ public boolean isPublic() {
+ return Modifier.isPublic(fModifiers);
+ }
+
+ public boolean isStatic() {
+ return Modifier.isStatic(fModifiers);
+ }
+
+ public boolean isJavaLangObject() {
+ return "java.lang.Object".equals(getDeclaringTypeQualifiedName());
+ }
+
+ public MemberInfo getParentMember() {
+ return fParentMember;
+ }
+
+ protected void setParentMember(MemberInfo parentMember) {
+ fParentMember = parentMember;
+ }
+
+ public IType getMemberType() {
+ if(fMemberType==null) {
+ initializeParameters();
+ try {
+ if(isDataModel() && getType().isArray()) {
+ fMemberType = getSourceType().getJavaProject().findType(getType().getQualifiedTypeNameOfArrayElement());
+ } else if(getType().getQualifiedName()!=null) {
+ fMemberType = getSourceType().getJavaProject().findType(getType().getQualifiedName());
+ }
+ } catch (JavaModelException e) {
+ Activator.getPluginLog().logError(e);
+ }
+ }
+ return fMemberType;
+ }
+
+ public boolean isDataModel() {
+ return isDataModel;
+ }
+
+ protected void setDataModel(boolean isDataModel) {
+ this.isDataModel = isDataModel;
+ }
+
+ public TypeInfoCollector getTypeCollector() {
+ // The rev. 7651 results in a deadlock, typeInfo is not stored anymore
+ // The rev. 7623 results in a deadlock, so, it's rolled back
+ // >>> Fix for JBIDE-2090
+ return new TypeInfoCollector(this);
+ // <<< Fix for JBIDE-2090
+ }
+
+ abstract public IJavaElement getJavaElement();
+ }
+
+ public static class TypeInfo extends MemberInfo {
+ private IType fType;
+ private TypeInfo superType;
+ private Map<String, Type> params = new HashMap<String, Type>();
+
+ public TypeInfo(IType type, MemberInfo parentMember, boolean dataModel) throws JavaModelException {
+ super(type.getDeclaringType(),
+ (type.getDeclaringType() == null ? null : type.getDeclaringType().getFullyQualifiedName()),
+ type.getFullyQualifiedName(),
+ type.getFlags(),
+ parentMember,
+ dataModel,
+ Type.valueOf(type.getFullyQualifiedName()));
+ this.fType = type;
+ }
+
+ public Type getParameterType(String name) {
+ return params.get(name);
+ }
+
+ @Override
+ public IType getMemberType() {
+ return fType;
+ }
+
+ @Override
+ public IJavaElement getJavaElement() {
+ return fType;
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.tools.common.model.util.TypeInfoCollector.MemberInfo#initializeParameters()
+ */
+ @Override
+ void initializeParameters() {
+ try {
+ MemberInfo parent = getParentMember();
+ if(parent!=null && parent instanceof TypeMemberInfo) {
+ ITypeParameter[] parameters = fType.getTypeParameters();
+ for (int i = 0; i < parameters.length; i++) {
+ Type type = parent.getType().getParameter(i);
+ if(type!=null) {
+ params.put(parameters[i].getElementName(), type);
+ }
+ }
+ }
+ if(superType!=null) {
+ superType.initializeParameters(this);
+ }
+ } catch (JavaModelException e) {
+ Activator.getPluginLog().logError(e);
+ }
+ }
+
+ private void initializeParameters(TypeInfo inheritedType) throws JavaModelException {
+ ITypeParameter[] parameters = fType.getTypeParameters();
+ String signature = inheritedType.fType.getSuperclassTypeSignature();
+ Type classType = new Type(signature, inheritedType.fType);
+ for (int i = 0; i < parameters.length; i++) {
+ Type paramType = classType.getParameter(i);
+ if(paramType!=null) {
+ Type resolvedType = inheritedType.getParameterType(paramType.getName());
+ if(resolvedType!=null) {
+ paramType = resolvedType;
+ }
+ params.put(parameters[i].getElementName(), paramType);
+ }
+ }
+ if(superType!=null) {
+ superType.initializeParameters(this);
+ }
+ }
+
+ public TypeInfo getSuperType() {
+ return superType;
+ }
+
+ public void setSuperType(TypeInfo superType) {
+ this.superType = superType;
+ }
+ }
+
+ public abstract static class TypeMemberInfo extends MemberInfo {
+ private String[] fParametersNamesOfDeclaringType;
+ private TypeInfo declaratedType;
+
+ /**
+ * @param sourceType
+ * @param declaringTypeQualifiedName
+ * @param name
+ * @param modifiers
+ * @param parentMember
+ * @param dataModel
+ * @param type
+ */
+ protected TypeMemberInfo(IType sourceType,
+ String declaringTypeQualifiedName, String name, int modifiers,
+ TypeInfo parentMember, TypeInfo declaratedType, boolean dataModel, Type type) {
+ super(sourceType, declaringTypeQualifiedName, name, modifiers, parentMember,
+ dataModel, type);
+ this.declaratedType = declaratedType;
+ }
+
+ public String[] getParametersNamesOfDeclaringType() {
+ return fParametersNamesOfDeclaringType;
+ }
+
+ void setParametersNamesOfDeclaringType(
+ String[] parametersNamesOfDeclaringType) {
+ fParametersNamesOfDeclaringType = parametersNamesOfDeclaringType;
+ }
+
+ protected void initializeParameters() {
+ if(fParametersNamesOfDeclaringType!=null && fParametersNamesOfDeclaringType.length>0 && getParentMember()!=null) {
+ Map<String, Type> parametersOfDeclaringType = new HashMap<String, Type>();
+ TypeInfo parentTypeInfo = (TypeInfo)getParentMember();
+ parentTypeInfo.initializeParameters();
+ for (int i = 0; i < fParametersNamesOfDeclaringType.length; i++) {
+ String parameterName = getParameterNameFromType(fParametersNamesOfDeclaringType[i]);
+ Type paramType = declaratedType.getParameterType(parameterName);
+ if(paramType!=null) {
+ parametersOfDeclaringType.put(parameterName, paramType);
+ }
+ }
+ getType().initializeParameters(parametersOfDeclaringType);
+ }
+ }
+
+ public TypeInfo getDeclaratedType() {
+ return declaratedType;
+ }
+
+ protected void setDeclaratedType(TypeInfo declaratedType) {
+ this.declaratedType = declaratedType;
+ }
+ }
+
+ public static class FieldInfo extends TypeMemberInfo {
+ private IJavaElement fJavaElement;
+
+ public FieldInfo(IField field, TypeInfo parentMember, TypeInfo declaratedType, boolean dataModel) throws JavaModelException {
+ super(field.getDeclaringType(),
+ (field.getDeclaringType() == null ? null : field.getDeclaringType().getFullyQualifiedName()),
+ field.getElementName(),
+ field.getFlags(),
+ parentMember,
+ declaratedType,
+ dataModel,
+ new Type(field.getTypeSignature(),
+ field.getDeclaringType()));
+
+ setParametersNamesOfDeclaringType(getTypeErasureFromSignatureArray(field.getDeclaringType().getTypeParameterSignatures()));
+ }
+
+ public IJavaElement getJavaElement () {
+ if(fJavaElement == null) {
+ try {
+ if(getDeclaringTypeQualifiedName()==null) {
+ return null;
+ }
+ IType declType = getSourceType().getJavaProject().findType(getDeclaringTypeQualifiedName());
+ fJavaElement = (declType == null ? null : declType.getField(getName()));
+ } catch (JavaModelException e) {
+ Activator.getPluginLog().logError(e);
+ }
+ }
+ return fJavaElement;
+ }
+ }
+
+ public static class MethodInfo extends TypeMemberInfo {
+ private String[] fParameterTypeNames;
+ private String[] fParameterTypeQualifiedNames;
+ private String[] fParameterNames;
+ private IJavaElement fJavaElement;
+
+ public MethodInfo(IType sourceType, String declaringTypeQualifiedName, String name,
+ int modifiers, String[] parameterTypeQualifiedNames,
+ String[] parameterNames,
+ String returnTypeQualifiedName,
+ TypeInfo parentMember,
+ TypeInfo declaratedType,
+ boolean dataModel) {
+ super(sourceType, declaringTypeQualifiedName, name, modifiers, parentMember, declaratedType, dataModel, Type.valueOf(name));
+ setParameterTypeNames(parameterTypeQualifiedNames);
+ setParameterNames(parameterNames);
+ }
+
+ public MethodInfo(IMethod method, TypeInfo parentMember, TypeInfo declaratedType, boolean dataModel) throws JavaModelException {
+ super(method.getDeclaringType(),
+ (method.getDeclaringType() == null ? null : method.getDeclaringType().getFullyQualifiedName()),
+ method.getElementName(),
+ method.getFlags(),
+ parentMember,
+ declaratedType,
+ dataModel,
+ new Type(method.getReturnType(),
+ method.getDeclaringType()));
+
+ setParameterNames(method.getParameterNames());
+ setParameterTypeNames(resolveSignatures(method.getDeclaringType(), method.getParameterTypes()));
+ setParametersNamesOfDeclaringType(getTypeErasureFromSignatureArray(method.getDeclaringType().getTypeParameterSignatures()));
+ }
+
+ protected void setParameterTypeNames(String[] parameterTypeNames) {
+ fParameterTypeNames = (parameterTypeNames == null ?
+ new String[0] : parameterTypeNames);
+ }
+
+ public String[] getParameterTypeQualifiedNames() {
+ if(fParameterTypeQualifiedNames==null) {
+ fParameterTypeQualifiedNames = new String[fParameterTypeNames.length];
+ for (int i = 0; i < fParameterTypeQualifiedNames.length; i++) {
+ fParameterTypeQualifiedNames[i] = EclipseJavaUtil.resolveType(getSourceType(), fParameterTypeNames[i]);
+ }
+ }
+ return fParameterTypeQualifiedNames;
+ }
+
+ public String[] getParameterTypeNames() {
+ return fParameterTypeNames;
+ }
+
+ protected void setParameterNames(String[] parameterNames) {
+ fParameterNames = (parameterNames == null ?
+ new String[0] : parameterNames);
+ }
+
+ public String[] getParameterNames() {
+ return fParameterNames;
+ }
+
+ public int getNumberOfParameters() {
+ return (getParameterNames() == null ? 0 : getParameterNames().length);
+ }
+
+ public IType getReturnType() {
+ return getMemberType();
+ }
+
+ public boolean isConstructor () {
+ return getDeclaringTypeQualifiedName()!=null && getDeclaringTypeQualifiedName().equals(getName());
+ }
+
+ public boolean isGetter() {
+ if (null == getType()) {
+ return false;
+ }
+
+ return (((getName().startsWith("get") && !getName().equals("get")) || getName().startsWith("is")) && getNumberOfParameters() == 0);
+ }
+
+ public boolean isSetter() {
+ return ((getName().startsWith("set") && !getName().equals("set")) && getNumberOfParameters() == 1);
+ }
+
+ public List<String> getAsPresentedStrings() {
+ List<String> list = new ArrayList<String>(2);
+ StringBuffer name = new StringBuffer(getName());
+
+ // Add method as 'foo'
+ list.add(name.toString());
+
+ // Add method as 'foo(param1,param2)'
+ name.append('(');
+ String[] mParams = getParameterNames();
+ for (int j = 0; mParams != null && j < mParams.length; j++) {
+ if (j > 0) name.append(", "); //$NON-NLS-1$
+ name.append(mParams[j]);
+ }
+ name.append(')');
+ list.add(name.toString());
+ return list;
+ }
+
+ @Override
+ public IJavaElement getJavaElement () {
+ if(fJavaElement == null) {
+ try {
+ IType declType = getSourceType().getJavaProject().findType(getDeclaringTypeQualifiedName());
+ if(declType==null) {
+ return null;
+ }
+ IMethod[] allMethods = declType.getMethods();
+
+ // filter methods by name
+ List<IMethod> methods = new ArrayList<IMethod>();
+ for (int i = 0; allMethods != null && i < allMethods.length; i++) {
+ if (allMethods[i].getElementName().equals(getName())) {
+ methods.add(allMethods[i]);
+ }
+ }
+ if (!methods.isEmpty()) {
+ if (methods.size() == 1) {
+ fJavaElement = methods.get(0);
+ } else {
+ // filter methods by number of parameters
+ List<IMethod> filteredMethods = new ArrayList<IMethod>();
+ for (IMethod method : methods) {
+ if (method.getNumberOfParameters() == getNumberOfParameters()) {
+ filteredMethods.add(method);
+ }
+ }
+ if (!filteredMethods.isEmpty()) {
+ if (filteredMethods.size() == 1) {
+ fJavaElement = filteredMethods.get(0);
+ } else {
+ methods = filteredMethods;
+
+ // filter methods by parameter types
+ for(IMethod method : methods) {
+ String[] methodParameterTypes =
+ resolveSignatures(method.getDeclaringType(),
+ method.getParameterTypes());
+ String[] parameterTypes = getParameterTypeQualifiedNames();
+
+ boolean equal = true;
+ for (int i = 0; parameterTypes != null && i < parameterTypes.length; i++) {
+ // simple types must be equal, but complex types may not
+ if (!parameterTypes[i].equals(methodParameterTypes[i])) {
+ // sure - it's Complex Type
+ if (! (parameterTypes[i].indexOf('.') != -1)
+ && (methodParameterTypes[i].indexOf('.') == -1)) {
+ equal = false;
+ break;
+ }
+ }
+ }
+ if (equal) {
+ fJavaElement = method;
+ }
+ }
+ }
+ }
+ }
+ }
+ } catch (JavaModelException e) {
+ Activator.getPluginLog().logError(e);
+ }
+ }
+ return fJavaElement;
+ }
+ }
+
+ public TypeInfoCollector(MemberInfo member) {
+ this.fMember = member;
+ this.fType = member.getMemberType();
+ collectInfo();
+ }
+
+ public IType getType() {
+ return this.fType;
+ }
+
+ public void collectInfo() {
+ if (fMethods == null) {
+ fMethods = new ArrayList<MethodInfo>();
+ } else {
+ fMethods.clear();
+ }
+
+ if (fFields == null) {
+ fFields = new ArrayList<FieldInfo>();
+ } else {
+ fFields.clear();
+ }
+
+ if (fType == null) {
+ return;
+ }
+ try {
+ IType binType = fType;
+ MemberInfo originalParent = fMember;
+ if(fMember instanceof TypeInfo) {
+ fTypeInfo = (TypeInfo)fMember;
+ } else {
+ fTypeInfo = new TypeInfo(binType, fMember, fMember.isDataModel());
+ }
+ TypeInfo parent = fTypeInfo;
+ while (binType != null) {
+ IMethod[] binMethods = binType.getMethods();
+ for (int i = 0; binMethods != null && i < binMethods.length; i++) {
+ if (binMethods[i].isConstructor()) {
+ continue;
+ }
+ fMethods.add(new MethodInfo(binMethods[i], fTypeInfo, parent, false));
+ }
+ binType = getSuperclass(binType);
+ if(binType!=null) {
+ TypeInfo superType = new TypeInfo(binType, originalParent, parent.isDataModel());
+ parent.setSuperType(superType);
+ parent = superType;
+ }
+ }
+
+ // This inserts here methods "public int size()" and "public boolean isEmpty()" for javax.faces.model.DataModel
+ // as requested by Gavin in JBIDE-1256
+ if(isDataModelObject(fType)) {
+ addInfoForDataModelObject();
+ }
+ // This inserts here methods "public int getRowCount()" for @DataModel variables.
+ if(fMember.isDataModel) {
+ addInfoForDataModelVariable();
+ }
+ } catch (JavaModelException e) {
+ Activator.getPluginLog().logError(e);
+ }
+ }
+
+ boolean isDataModelObject(IType type) throws JavaModelException {
+ return isInstanceofType(type, "javax.faces.model.DataModel");
+ }
+
+ public static boolean isResourceBundle(IType type) {
+ try {
+ return isInstanceofType(type, "java.util.ResourceBundle");
+ } catch (JavaModelException e) {
+ return false;
+ }
+ }
+
+ public static boolean isNotParameterizedCollection(TypeInfoCollector.MemberInfo mbr) {
+ try {
+ if(mbr.getType().getParameters()!=null && mbr.getType().getParameters().length>0) {
+ return false;
+ }
+ IType type = mbr.getMemberType();
+ if(type!=null) {
+ return isInstanceofType(type, "java.util.Map") || isInstanceofType(type, "java.util.Collection");
+ }
+ return false;
+ } catch (JavaModelException e) {
+ return false;
+ }
+ }
+
+ public static class SuperTypeInfo {
+ IType type;
+ Set<String> names = new HashSet<String>();
+ IType[] superTypes = new IType[0];
+
+ SuperTypeInfo(IType type) throws JavaModelException {
+ this.type = type;
+ ProjectCache cache = caches.get(type);
+ if(cache != null) {
+ cache.superTypesCache.put(type, this);
+ }
+ ITypeHierarchy typeHierarchy = type.newSupertypeHierarchy(new NullProgressMonitor());
+ superTypes = typeHierarchy == null ? null : typeHierarchy.getAllSupertypes(type);
+ if(superTypes != null) for (int i = 0; i < superTypes.length; i++) {
+ names.add(superTypes[i].getFullyQualifiedName());
+ }
+ if(superTypes == null) superTypes = new IType[0];
+ }
+
+ public Set<String> getNames() {
+ return names;
+ }
+
+ public IType[] getSuperTypes() {
+ return superTypes;
+ }
+ }
+
+ public static SuperTypeInfo getSuperTypes(IType type) throws JavaModelException {
+ if(type == null) return null;
+ ProjectCache cache = caches.get(type);
+ SuperTypeInfo ts = (cache != null) ? cache.superTypesCache.get(type) : null;
+ if(ts == null) {
+ ts = new SuperTypeInfo(type);
+ }
+ return ts;
+ }
+
+ public static boolean isInstanceofType(IType type, String qualifiedTypeName) throws JavaModelException {
+ if (qualifiedTypeName == null || type == null) return false;
+ boolean isInstanceofType = qualifiedTypeName.equals(type.getFullyQualifiedName());
+ if (!isInstanceofType) {
+ SuperTypeInfo ts = getSuperTypes(type);
+ if(ts != null && ts.getNames().contains(qualifiedTypeName)) {
+ return true;
+ }
+ return false;
+ }
+ return true;
+ }
+
+ void addInfoForDataModelVariable() {
+ fMethods.add(new MethodInfo(fType,
+ fType.getFullyQualifiedName(),
+ "getRowCount", Modifier.PUBLIC,
+ new String[0],
+ new String[0],
+ "int",
+ fTypeInfo,
+ fTypeInfo,
+ false));
+ }
+
+ void addInfoForDataModelObject() {
+ fMethods.add(new MethodInfo(fType,
+ fType.getFullyQualifiedName(),
+ "size", Modifier.PUBLIC,
+ new String[0],
+ new String[0],
+ "int",
+ fTypeInfo,
+ fTypeInfo,
+ false));
+ fMethods.add(new MethodInfo(fType,
+ fType.getFullyQualifiedName(),
+ "isEmpty", Modifier.PUBLIC,
+ new String[0],
+ new String[0],
+ "boolean",
+ fTypeInfo,
+ fTypeInfo,
+ false));
+ }
+
+ private static IType getSuperclass(IType type) throws JavaModelException {
+ String superclassName = type.getSuperclassName();
+ if(superclassName!=null) {
+ String fullySuperclassName = EclipseJavaUtil.resolveType(type, superclassName);
+ if(fullySuperclassName!=null&&!fullySuperclassName.equals("java.lang.Object")) { //$NON-NLS-1$
+ if(fullySuperclassName.equals(type.getFullyQualifiedName())) {
+ //FIX JBIDE-1642
+ return null;
+ }
+ IType superType = type.getJavaProject().findType(fullySuperclassName);
+ return superType;
+ }
+ }
+ return null;
+ }
+
+ public MethodInfo[] findMethodInfos(IMethod iMethod) {
+ List<MethodInfo> methods = new ArrayList<MethodInfo>();
+
+ // filter methods by name
+ for (MethodInfo info : fMethods) {
+ if (info.getName().equals(iMethod.getElementName())) {
+ methods.add(info);
+ }
+ }
+ if (methods.isEmpty())
+ return new MethodInfo[0];
+
+ EclipseJavaUtil.getMemberTypeAsString(iMethod);
+
+ if (methods.size() == 1)
+ return methods.toArray(new MethodInfo[0]);
+
+ // filter methods by number of parameters
+ List<MethodInfo> filteredMethods = new ArrayList<MethodInfo>();
+ for (MethodInfo method : methods) {
+ if (method.getNumberOfParameters() == iMethod.getNumberOfParameters())
+ filteredMethods.add(method);
+ }
+ if (filteredMethods.isEmpty())
+ return new MethodInfo[0];
+ if (filteredMethods.size() == 1)
+ return filteredMethods.toArray(new MethodInfo[0]);
+
+ methods = filteredMethods;
+
+ // filter methods by parameter types
+ filteredMethods = new ArrayList<MethodInfo>();
+ for(MethodInfo method : methods) {
+ String[] methodParameterTypes =
+ resolveSignatures(iMethod.getDeclaringType(),
+ iMethod.getParameterTypes());
+ String[] parameterTypes = method.getParameterTypeQualifiedNames();
+
+ boolean equal = true;
+ for (int i = 0; equal && parameterTypes != null && i < parameterTypes.length; i++) {
+ // simple types must be equal, but complex types may not
+ if (!parameterTypes[i].equals(methodParameterTypes[i])) {
+ // sure - it's Complex Type
+ if ((parameterTypes[i].indexOf('.') != -1)
+ && (methodParameterTypes[i].indexOf('.') == -1)) {
+ equal = false;
+ }
+ }
+ }
+ if (equal) {
+ filteredMethods.add(method);
+ }
+ }
+ return filteredMethods.toArray(new MethodInfo[0]);
+ }
+
+ /**
+ * Returns the methods for the type specified
+ *
+ * @return
+ */
+ public List<MemberInfo> getMethods() {
+ List<MemberInfo> methods = new ArrayList<MemberInfo>();
+ for (MethodInfo info : fMethods) {
+ if (info.isPublic() && !info.isConstructor()
+ && !info.isStatic() && !info.isJavaLangObject()
+ && !info.isGetter() && !info.isSetter())
+ methods.add(info);
+ }
+ return methods;
+ }
+
+ /**
+ * String presentation of member
+ * @author Alexey Kazakov
+ */
+ public static class MemberPresentation {
+ private String presentation;
+ private MemberInfo member;
+
+ public MemberPresentation(String presentation, MemberInfo member) {
+ super();
+ this.presentation = presentation;
+ this.member = member;
+ }
+
+ public String getPresentation() {
+ return presentation;
+ }
+
+ public MemberInfo getMember() {
+ return member;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if(obj!=null && obj instanceof MemberPresentation) {
+ return presentation.equals(((MemberPresentation)obj).getPresentation());
+ }
+ return false;
+ }
+
+ @Override
+ public int hashCode() {
+ return presentation.hashCode();
+ }
+
+ @Override
+ public String toString() {
+ return presentation;
+ }
+ }
+
+ private static class MemberPresentationComparator implements Comparator<MemberPresentation> {
+ /* (non-Javadoc)
+ * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
+ */
+ public int compare(MemberPresentation m1, MemberPresentation m2) {
+ return m1.getPresentation().compareTo(m2.getPresentation());
+ }
+ }
+
+ public final static MemberPresentationComparator MEMBER_PRESENTATION_COMPARATOR = new MemberPresentationComparator();
+
+ /**
+ * Returns the method presentation strings for the type specified
+ * @return
+ */
+ public Set<String> getMethodPresentationStrings() {
+ Set<MemberPresentation> set = getMethodPresentations();
+ Set<String> result = new HashSet<String>();
+ for (MemberPresentation presentation : set) {
+ result.add(presentation.getPresentation());
+ }
+ return result;
+ }
+
+ /**
+ * Returns the method presentations for the type specified
+ * @return
+ */
+ public Set<MemberPresentation> getMethodPresentations() {
+ Set<MemberPresentation> methods = new TreeSet<MemberPresentation>(MEMBER_PRESENTATION_COMPARATOR);
+ List<MemberInfo> mthds = getMethods();
+ for (MemberInfo info : mthds) {
+ if (!(info instanceof MethodInfo))
+ continue;
+
+ MethodInfo method = (MethodInfo)info;
+
+ StringBuffer name = new StringBuffer(method.getName());
+
+ // Add method as 'foo'
+ methods.add(new MemberPresentation(name.toString(), method));
+
+ // Add method as 'foo(param1,param2)'
+ name.append('(');
+ String[] mParams = method.getParameterNames();
+ for (int j = 0; mParams != null && j < mParams.length; j++) {
+ if (j > 0) name.append(", "); //$NON-NLS-1$
+ name.append(mParams[j]);
+ }
+ name.append(')');
+
+ methods.add(new MemberPresentation(name.toString(), method));
+ }
+ return methods;
+ }
+
+ /**
+ * Returns the properties for the type specified
+ *
+ * @return
+ */
+ public List<MemberInfo> getProperties() {
+ List<MemberInfo> properties = new ArrayList<MemberInfo>();
+ for (MethodInfo info : fMethods) {
+ if (info.isPublic() && !info.isConstructor()
+ && !info.isStatic() && !info.isJavaLangObject()
+ && (info.isGetter() || info.isSetter()))
+ properties.add(info);
+ }
+
+ /*
+ * The following code was excluded due to the following issue:
+ *
+ * http://jira.jboss.com/jira/browse/JBIDE-1203#action_12385823
+ *
+ *
+ for (FieldInfo info : fFields) {
+ if (info.isPublic()
+ && !info.isStatic() && !info.isJavaLangObject())
+ properties.add(info);
+ }
+ */
+
+ return properties;
+ }
+
+ /**
+ * Returns the property presentations for the type specified
+ *
+ * @return
+ */
+ public Set<MemberPresentation> getPropertyPresentations() {
+ return getPropertyPresentations(null);
+ }
+
+ /**
+ * Returns the property presentation strings for the type specified
+ *
+ * @return
+ */
+ public Set<String> getPropertyPresentationStrings() {
+ return getPropertyPresentationStrings(null);
+ }
+
+ /**
+ * Returns the property presentation strings for the type specified
+ *
+ * @param unpairedGettersOrSetters - map of unpaired getters or setters of type's properties. 'key' is property name.
+ * @return
+ */
+ public Set<String> getPropertyPresentationStrings(Map<String, MethodInfo> unpairedGettersOrSetters) {
+ Set<MemberPresentation> set = getPropertyPresentations(unpairedGettersOrSetters);
+ Set<String> result = new HashSet<String>();
+ for (MemberPresentation presentation : set) {
+ result.add(presentation.getPresentation());
+ }
+ return result;
+ }
+
+ /**
+ * Returns the property presentations for the type specified
+ *
+ * @param unpairedGettersOrSetters - map of unpaired getters or setters of type's properties. 'key' is property name.
+ * @return
+ */
+ public Set<MemberPresentation> getPropertyPresentations(Map<String, MethodInfo> unpairedGettersOrSetters) {
+ Set<MemberPresentation> properties = new TreeSet<MemberPresentation>(MEMBER_PRESENTATION_COMPARATOR);
+ List<MemberInfo> props = getProperties();
+ HashMap<String, MethodInfo> getters = new HashMap<String, MethodInfo>();
+ HashMap<String, MethodInfo> setters = new HashMap<String, MethodInfo>();
+ for (MemberInfo info : props) {
+ if (info instanceof MethodInfo) {
+ MethodInfo m = (MethodInfo)info;
+
+ if (m.isGetter() || m.isSetter()) {
+ StringBuffer name = new StringBuffer(m.getName());
+ if(m.getName().startsWith("i")) { //$NON-NLS-1$
+ name.delete(0, 2);
+ } else {
+ name.delete(0, 3);
+ }
+ if(name.length()<2 || Character.isLowerCase(name.charAt(1))) {
+ name.setCharAt(0, Character.toLowerCase(name.charAt(0)));
+ }
+ String propertyName = name.toString();
+ MemberPresentation pr = new MemberPresentation(propertyName, m);
+ if(!properties.contains(pr)) {
+ properties.add(pr);
+ }
+ if(unpairedGettersOrSetters!=null) {
+ MethodInfo previousGetter = getters.get(propertyName);
+ MethodInfo previousSetter = setters.get(propertyName);
+ if((previousGetter!=null && m.isSetter())||(previousSetter!=null && m.isGetter())) {
+ // We have both Getter and Setter
+ unpairedGettersOrSetters.remove(propertyName);
+ } else if(m.isSetter()) {
+ setters.put(propertyName, m);
+ unpairedGettersOrSetters.put(propertyName, m);
+ } else if(m.isGetter()) {
+ getters.put(propertyName, m);
+ unpairedGettersOrSetters.put(propertyName, m);
+ }
+ }
+ }
+ } else {
+ properties.add(new MemberPresentation(info.getName(), info));
+ }
+ }
+ return properties;
+ }
+
+ public static void cleanCache() {
+ caches = new Caches();
+ }
+
+ public static MemberInfo createMemberInfo(IMember member, boolean dataModel) {
+ ProjectCache pcache = caches.get(member);
+
+ Map<IMember, MemberInfo> cache = null;
+ if(pcache != null) {
+ cache = dataModel ? pcache.memberInfoCacheTrue : pcache.memberInfoCacheFalse;
+ }
+ MemberInfo result = cache == null ? null : cache.get(member);
+ if(result != null) return result;
+ try {
+ if (member instanceof IType) {
+ result = new TypeInfo((IType)member, null, dataModel);
+ } else if (member instanceof IField) {
+ IField field = (IField)member;
+ TypeInfo declaringType = new TypeInfo(field.getDeclaringType(), null, dataModel);
+ result = new FieldInfo(field, declaringType, declaringType, dataModel);
+ } else if (member instanceof IMethod) {
+ IMethod method = (IMethod)member;
+ TypeInfo declaringType = new TypeInfo(method.getDeclaringType(), null, dataModel);
+ result = new MethodInfo(method, declaringType, declaringType, dataModel);
+ }
+ } catch (JavaModelException e) {
+ Activator.getPluginLog().logError(e);
+ }
+ if(result != null) {
+ cache.put(member, result);
+ }
+
+ return result;
+ }
+
+ public static MemberInfo createMemberInfo(IMember member) {
+ return createMemberInfo(member, false);
+ }
+
+ static String[] resolveSignatures (IType type, String[] signatures) {
+ if (signatures == null || signatures.length == 0)
+ return new String[0];
+
+ String[] resolvedSignatures = new String[signatures.length];
+ for (int i = 0; i < signatures.length; i++) {
+ resolvedSignatures[i] = EclipseJavaUtil.resolveTypeAsString(type, signatures[i]);
+ }
+ return resolvedSignatures;
+ }
+
+ static String[] convertToStringArray(char[][] names) {
+ if (names == null || names.length == 0)
+ return new String[0];
+ String[] sNames = new String[names.length];
+ for (int i = 0; i < sNames.length; i++) {
+ sNames[i] = String.valueOf(names[i]);
+ }
+ return sNames;
+ }
+
+ static String[] getTypeErasureFromSignatureArray(String[] signatures) {
+ if (signatures == null || signatures.length == 0)
+ return new String[0];
+ String[] result = new String[signatures.length];
+ for (int i = 0; i < signatures.length; i++) {
+ result[i] = Signature.getTypeErasure(signatures[i]);
+ }
+ return result;
+ }
+
+ static String getParameterNameFromType(String typeSignatures) {
+ if(typeSignatures==null) {
+ return null;
+ }
+ return Signature.getTypeVariable(typeSignatures);
+ }
+}
\ No newline at end of file
Copied: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/Var.java (from rev 10454, trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/Var.java)
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/Var.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/Var.java 2008-10-01 15:31:11 UTC (rev 10596)
@@ -0,0 +1,149 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.common.el.core.resolver;
+
+import java.util.List;
+
+import org.jboss.tools.common.el.core.model.ELExpression;
+import org.jboss.tools.common.el.core.model.ELInstance;
+import org.jboss.tools.common.el.core.model.ELModel;
+import org.jboss.tools.common.el.core.parser.ELParser;
+import org.jboss.tools.common.el.core.parser.ELParserFactory;
+import org.jboss.tools.common.el.core.parser.ELParserUtil;
+
+/**
+ * Represents "var"/"value" attributes.
+ * @author Alexey Kazakov
+ */
+public class Var {
+ String name;
+ String value;
+ ELExpression elToken;
+ String resolvedValue;
+ ELExpression resolvedElToken;
+ int declOffset;
+ int declLength;
+ ELParserFactory factory;
+
+ /**
+ * Constructor
+ * @param name - value of "var" attribute.
+ * @param value - value of "value" attribute.
+ */
+ public Var(ELParserFactory factory, String name, String value, int declOffset, int declLength) {
+ this.factory = factory;
+ this.name = name;
+ this.value = value;
+ elToken = parseEl(value);
+ this.declOffset = declOffset;
+ this.declLength = declLength;
+ }
+
+ ELExpression parseEl(String el) {
+ if(el.length()>3 && el.startsWith("#{") && el.endsWith("}")) {
+ ELParser parser = factory.createParser();
+ ELModel model = parser.parse(el);
+ if(model == null || parser.getSyntaxErrors().size() > 0) return null;
+ List<ELInstance> is = model.getInstances();
+ if(is.size() == 0) return null;
+ return is.get(0).getExpression();
+ }
+ return null;
+ }
+
+ /**
+ * Sets value to new resolved EL which we got as result of parsing value.
+ * For example:
+ * <h:datatable value="#{list}" var="item">
+ * <h:dataTable value="#{item.anotherList}" var="innerItem">
+ * ...
+ * </h:dataTable>
+ * </h:dataTable>
+ * Original El is #{item.anotherList}
+ * Resolved El is #{list.iterator().next().anotherList}
+ * It's very useful for nested vars.
+ * @param newEl
+ */
+ public void resolveValue(String newEl) {
+ resolvedValue = newEl;
+ resolvedElToken = parseEl(newEl);
+ }
+
+ /**
+ * @return parsed EL from "value" attribute. Returns null if EL is not valid.
+ */
+ public ELExpression getElToken() {
+ return elToken;
+ }
+
+ /**
+ * @return parsed resolved EL from "value" attribute. May be null.
+ */
+ public ELExpression getResolvedElToken() {
+ return resolvedElToken;
+ }
+
+ /**
+ * @return name of variable.
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * @return value of variable. It's EL.
+ */
+ public String getValue() {
+ return value;
+ }
+
+ /**
+ * @return resolved value of variable. It's EL. May be null.
+ */
+ public String getResolvedValue() {
+ return resolvedValue;
+ }
+
+ /**
+ * @return offset of the var declaration
+ */
+ public int getDeclarationOffset() {
+ return declOffset;
+ }
+
+ /**
+ * @return length of the var declaration
+ */
+ public int getDeclarationLength() {
+ return declLength;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (obj instanceof Var) {
+ Var compare = (Var)obj;
+ String str = getName();
+ if (str != null) {
+ if (!str.equals(compare.getName()))
+ return false;
+ } else {
+ if (compare.getName() != null)
+ return false;
+ }
+ str = getValue();
+ return (str != null ?
+ str.equals(compare.getValue()) :
+ compare.getValue() == null);
+ }
+ return false;
+ }
+
+}
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELModelImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELModelImpl.java 2008-10-01 15:26:10 UTC (rev 10595)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELModelImpl.java 2008-10-01 15:31:11 UTC (rev 10596)
@@ -26,6 +26,7 @@
public class ELModelImpl extends ELObjectImpl implements ELModel {
String source;
List<ELInstance> instances = new ArrayList<ELInstance>();
+ int delta = 0;
public ELModelImpl() {}
@@ -83,4 +84,10 @@
}
+ public void shift(int delta) {
+ this.delta = delta;
+ if(instances.size() > 0) {
+ instances.get(0).getFirstToken().shift(delta);
+ }
+ }
}
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELObjectImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELObjectImpl.java 2008-10-01 15:26:10 UTC (rev 10595)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELObjectImpl.java 2008-10-01 15:31:11 UTC (rev 10596)
@@ -49,9 +49,9 @@
public String getText() {
if(getModel() == null) return null;
String source = getModel().getSource();
- int start = firstToken.getStart();
+ int start = firstToken.getStart() - getModel().delta;
LexicalToken lt = (lastToken != null) ? lastToken : firstToken;
- int end = lt.getStart() + lt.getLength();
+ int end = lt.getStart() + lt.getLength() - getModel().delta;
return source.substring(start, end);
}
17 years, 3 months
JBoss Tools SVN: r10595 - in trunk/documentation: jbosstools-jdocbook-style/src/main/com/css/css and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: artdaw
Date: 2008-10-01 11:26:10 -0400 (Wed, 01 Oct 2008)
New Revision: 10595
Modified:
trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/com/jboss/tools/common.xsl
trunk/documentation/jbosstools-jdocbook-style/src/main/com/css/css/tools.css
Log:
https://jira.jboss.org/jira/browse/JBDS-399 - 2 templates for adding 'added', 'changed' icons to all of the titles are done
Modified: trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/com/jboss/tools/common.xsl
===================================================================
--- trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/com/jboss/tools/common.xsl 2008-10-01 15:12:54 UTC (rev 10594)
+++ trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/com/jboss/tools/common.xsl 2008-10-01 15:26:10 UTC (rev 10595)
@@ -187,4 +187,131 @@
</xsl:with-param>
</xsl:call-template>
</xsl:template>
+
+<!-- THERE ARE 2 TEMPLATES FOR ADDING 'ADDED', 'CHANGED' ICONS TO ALL OF THE TITLES-->
+
+<xsl:template name="component.title">
+ <xsl:param name="node" select="."/>
+
+ <xsl:variable name="level">
+ <xsl:choose>
+ <xsl:when test="ancestor::section">
+ <xsl:value-of select="count(ancestor::section)+1"/>
+ </xsl:when>
+ <xsl:when test="ancestor::sect5">6</xsl:when>
+ <xsl:when test="ancestor::sect4">5</xsl:when>
+ <xsl:when test="ancestor::sect3">4</xsl:when>
+ <xsl:when test="ancestor::sect2">3</xsl:when>
+ <xsl:when test="ancestor::sect1">2</xsl:when>
+ <xsl:otherwise>1</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <!-- Let's handle the case where a component (bibliography, for example)
+ occurs inside a section; will we need parameters for this? -->
+ <xsl:variable name="revflag">
+ <xsl:choose>
+ <xsl:when test="../@role='new' or ../@role='updated'">
+ <xsl:value-of select="../@role"/>
+ </xsl:when>
+ <!-- For mkdiff compatibility-->
+ <xsl:when test="../@revisionflag='added' or ../@revisionflag='changed'">
+ <xsl:value-of select="../@revisionflag"/>
+ </xsl:when>
+ <xsl:otherwise></xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:element name="h{$level+1}">
+ <xsl:attribute name="class">
+ title
+ <xsl:value-of select="$revflag" />
+ </xsl:attribute>
+ <xsl:if test="$generate.id.attributes = 0">
+ <xsl:call-template name="anchor">
+ <xsl:with-param name="node" select="$node"/>
+ <xsl:with-param name="conditional" select="0"/>
+ </xsl:call-template>
+ </xsl:if>
+ <xsl:apply-templates select="$node" mode="object.title.markup">
+ <xsl:with-param name="allow-anchors" select="1"/>
+ </xsl:apply-templates>
+ </xsl:element>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="section.heading">
+ <xsl:param name="section" select="."/>
+ <xsl:param name="level" select="1"/>
+ <xsl:param name="allow-anchors" select="1"/>
+ <xsl:param name="title"/>
+ <xsl:param name="class" select="'title'"/>
+
+ <xsl:variable name="id">
+ <xsl:choose>
+ <!-- if title is in an *info wrapper, get the grandparent -->
+ <xsl:when test="contains(local-name(..), 'info')">
+ <xsl:call-template name="object.id">
+ <xsl:with-param name="object" select="../.."/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="object.id">
+ <xsl:with-param name="object" select=".."/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <!-- HTML H level is one higher than section level -->
+ <xsl:variable name="hlevel">
+ <xsl:choose>
+ <!-- highest valid HTML H level is H6; so anything nested deeper
+ than 5 levels down just becomes H6 -->
+ <xsl:when test="$level > 5">6</xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$level + 1"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="revflag">
+ <xsl:choose>
+ <xsl:when test="../@role='new' or ../@role='updated'">
+ <xsl:value-of select="../@role"/>
+ </xsl:when>
+ <!-- For mkdiff compatibility-->
+ <xsl:when test="../@revisionflag='added' or ../@revisionflag='changed'">
+ <xsl:value-of select="../@revisionflag"/>
+ </xsl:when>
+ <xsl:otherwise></xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:element name="h{$hlevel}">
+ <xsl:attribute name="class">
+ <xsl:value-of select="$class"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="$revflag"/>
+ </xsl:attribute>
+ <xsl:if test="$css.decoration != '0'">
+ <xsl:if test="$hlevel<3">
+ <xsl:attribute name="style">clear: both</xsl:attribute>
+ </xsl:if>
+ </xsl:if>
+ <xsl:if test="$allow-anchors != 0 and $generate.id.attributes = 0">
+ <xsl:call-template name="anchor">
+ <xsl:with-param name="node" select="$section"/>
+ <xsl:with-param name="conditional" select="0"/>
+ </xsl:call-template>
+ </xsl:if>
+ <xsl:if test="$generate.id.attributes != 0 and not(local-name(.) = 'appendix')">
+ <xsl:attribute name="id"><xsl:value-of select="$id"/></xsl:attribute>
+ </xsl:if>
+ <xsl:copy-of select="$title"/>
+ </xsl:element>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
</xsl:stylesheet>
Modified: trunk/documentation/jbosstools-jdocbook-style/src/main/com/css/css/tools.css
===================================================================
--- trunk/documentation/jbosstools-jdocbook-style/src/main/com/css/css/tools.css 2008-10-01 15:12:54 UTC (rev 10594)
+++ trunk/documentation/jbosstools-jdocbook-style/src/main/com/css/css/tools.css 2008-10-01 15:26:10 UTC (rev 10595)
@@ -93,11 +93,20 @@
text-align:right;
}
-a.new {
+.new, .added {
background:transparent url(../images/new.png) no-repeat scroll right top;
padding-right:70px;
}
-a.updated {
+.updated, .changed {
background:transparent url(../images/updated.png) no-repeat scroll right top;
padding-right:70px;
}
+span.diffmkwrapper{
+ background-color: #cce2f6;
+}
+
+div.diffmkwrapper p{
+ background-color: #c8d7e4;
+ padding:0px;
+ margin-left:56px;
+}
17 years, 3 months
JBoss Tools SVN: r10594 - in trunk/vpe/plugins/org.jboss.tools.vpe: src/org/jboss/tools/vpe/editor/template and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2008-10-01 11:12:54 -0400 (Wed, 01 Oct 2008)
New Revision: 10594
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeAnyCreator.java
trunk/vpe/plugins/org.jboss.tools.vpe/ve/init.html
Log:
=show borders attribute now used for creation unknown tag presentation
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2008-10-01 14:41:58 UTC (rev 10593)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2008-10-01 15:12:54 UTC (rev 10594)
@@ -445,7 +445,7 @@
sourceNode)) {
sourceNodeClone = (sourceNode).cloneNode(true);
if(sourceNodeClone instanceof Element){
- ((Element)sourceNodeClone).setAttribute(PARENT,"");
+ ((Element)sourceNodeClone).setAttribute(PARENT,""); //$NON-NLS-1$
Attr a = ((Element)sourceNodeClone).getAttributeNode(PARENT);
a.setUserData(PARENT, sourceNode.getParentNode(),null);
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeAnyCreator.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeAnyCreator.java 2008-10-01 14:41:58 UTC (rev 10593)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeAnyCreator.java 2008-10-01 15:12:54 UTC (rev 10594)
@@ -14,6 +14,8 @@
import java.util.List;
import java.util.Map;
import java.util.Set;
+
+import org.jboss.tools.jst.jsp.preferences.VpePreference;
import org.jboss.tools.vpe.VpePlugin;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.expression.VpeExpression;
@@ -179,6 +181,10 @@
String styleString = getExprValue(pageContext, styleExpr, sourceNode);
+ if ("yes".equalsIgnoreCase(VpePreference.SHOW_BORDER_FOR_UNKNOWN_TAGS.getValue())) { //$NON-NLS-1$
+ styleString = "border: 1px solid green;" +styleString; //$NON-NLS-1$
+ }
+
anyElement.setAttribute(HTML.ATTR_STYLE, styleString);
if (propertyCreators != null) {
@@ -194,8 +200,6 @@
}
}
-// setStyles(pageContext, sourceNode, div, span);
-
String valueStr = getExprValue(pageContext, valueExpr, sourceNode);
nsIDOMNode valueNode = visualDocument.createTextNode(valueStr);
anyElement.appendChild(valueNode);
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/ve/init.html
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/ve/init.html 2008-10-01 14:41:58 UTC (rev 10593)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/ve/init.html 2008-10-01 15:12:54 UTC (rev 10594)
@@ -16,7 +16,6 @@
padding: 2px 1px 1px 1px;
}
.__any__tag__caption {
- border: 1px solid black;
color:#006727;
font-size: 12px;
padding: 0px 2px 0px 2px;
17 years, 3 months
JBoss Tools SVN: r10593 - in trunk/vpe: tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/editor/template and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2008-10-01 10:41:58 -0400 (Wed, 01 Oct 2008)
New Revision: 10593
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeAnyCreator.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeAnyData.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeEditAnyDialog.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeTemplateManager.java
trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/editor/template/VpeTemplateManagerTest.java
trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/TemplatesExpressionParsingTest.java
trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/VpeAllTests.java
trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/VpeTestPlugin.java
Log:
=Show Icon attribute was removed from vpe template dialog, some code adjustment was made
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeAnyCreator.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeAnyCreator.java 2008-10-01 14:27:48 UTC (rev 10592)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeAnyCreator.java 2008-10-01 14:41:58 UTC (rev 10593)
@@ -138,20 +138,6 @@
}
}
- Attr showIconAttr = element.getAttributeNode(VpeTemplateManager.ATTR_ANY_ICON);
- if (showIconAttr != null) {
- try {
- if("yes".equals(showIconAttr.getValue())) showIconBool = true;
- else showIconBool = false;
- VpeExpressionInfo info = VpeExpressionBuilder.buildCompletedExpression(showIconAttr.getValue(), true);
- dependencyMap.setCreator(this, info.getDependencySet());
- } catch(VpeExpressionBuilderException e) {
- VpePlugin.reportProblem(e);
- }
- }
-
-
-
if (VpeTemplateManager.ATTR_ANY_PROPERTIES != null) {
for (int i = 0; i < VpeTemplateManager.ATTR_ANY_PROPERTIES.length; i++) {
String attrName = VpeTemplateManager.ATTR_ANY_PROPERTIES[i];
@@ -270,8 +256,7 @@
return new VpeAnyData(
tagForDisplayStr,
valueStr,
- styleStr,
- showIconBool
+ styleStr
);
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeAnyData.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeAnyData.java 2008-10-01 14:27:48 UTC (rev 10592)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeAnyData.java 2008-10-01 14:41:58 UTC (rev 10593)
@@ -18,7 +18,6 @@
public class VpeAnyData extends VpeTemplateData {
private String uri;
private String tagForDisplay;
- private boolean showIcon;
private String value;
private String style;
@@ -36,11 +35,8 @@
public VpeAnyData(
String tagForDisplay,
String value,
- String style,
- boolean showIcon
- ) {
+ String style) {
this.value = value;
- this.showIcon = showIcon;
this.tagForDisplay = tagForDisplay;
this.style=style;
}
@@ -55,14 +51,6 @@
this.uri = uri;
}
- public boolean isShowIcon(){
- return showIcon;
- }
-
- public void setShowIcon(boolean flag){
- showIcon = flag;
- }
-
public String getValue() {
return value;
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeEditAnyDialog.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeEditAnyDialog.java 2008-10-01 14:27:48 UTC (rev 10592)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeEditAnyDialog.java 2008-10-01 14:41:58 UTC (rev 10593)
@@ -44,7 +44,6 @@
private Text txtTagForDisplay;
private Text txtValue;
private Text txtStyle;
- private CheckControl ctlShowIcon;
public VpeEditAnyDialog(Shell shell, VpeAnyData data) {
super(shell);
@@ -87,9 +86,7 @@
// ctlCaseSensitive = new CheckControl(composite, "Case sensitive", data.isCaseSensitive());
ctlChildren = new CheckControl(composite, VpeUIMessages.CHILDREN, data.isChildren());
// ctlModify = new CheckControl(composite, "Modify", data.isModify());
-
- ctlShowIcon = new CheckControl(composite, VpeUIMessages.ICON, data.isShowIcon());
-
+
//value control
Label lblValue = makeLabel(composite, VpeUIMessages.VALUE);
lblValue.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));
@@ -155,9 +152,6 @@
data.setChanged(isChanged(data, data.getValue(), txtValue.getText()));
data.setValue(txtValue.getText().trim());
- data.setChanged(isChanged(data, data.isShowIcon(), ctlShowIcon.getSelection()));
- data.setShowIcon(ctlShowIcon.getSelection());
-
data.setChanged(isChanged(data, data.getStyle(), txtStyle.getText()));
data.setStyle(txtStyle.getText());
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeTemplateManager.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeTemplateManager.java 2008-10-01 14:27:48 UTC (rev 10592)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeTemplateManager.java 2008-10-01 14:41:58 UTC (rev 10593)
@@ -189,7 +189,6 @@
private static final String ATTR_ANY_DISPLAY = "display"; //$NON-NLS-1$
static final String ATTR_ANY_TAG_FOR_DISPLAY="tag-for-display"; //$NON-NLS-1$
- static final String ATTR_ANY_ICON = "icon"; //$NON-NLS-1$
static final String ATTR_ANY_VALUE = "value"; //$NON-NLS-1$
static final String ATTR_ANY_STYLE = "style"; //$NON-NLS-1$
@Deprecated
@@ -646,10 +645,6 @@
.append(attrDisplay.getNodeValue()).append(";"); //$NON-NLS-1$
}
//-----------END
- attr = anyNode.getAttributeNode(ATTR_ANY_ICON);
- if (attr != null){
- anyData.setShowIcon(ATTR_VALUE_YES.equalsIgnoreCase(attr.getNodeValue()));
- }
attr = anyNode.getAttributeNode(ATTR_ANY_VALUE);
if (attr != null) {
@@ -801,8 +796,6 @@
// if (data.getBorderColor() != null && data.getBorderColor().length() > 0)
// newAnyElement.setAttribute(ATTR_ANY_BORDER_COLOR, data.getBorderColor());
- newAnyElement.setAttribute(ATTR_ANY_ICON, data.isShowIcon() ? ATTR_VALUE_YES : ATTR_VALUE_NO);
-
newTemplateElement.appendChild(newAnyElement);
return newTagElement;
Modified: trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/editor/template/VpeTemplateManagerTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/editor/template/VpeTemplateManagerTest.java 2008-10-01 14:27:48 UTC (rev 10592)
+++ trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/editor/template/VpeTemplateManagerTest.java 2008-10-01 14:41:58 UTC (rev 10593)
@@ -2,27 +2,23 @@
import java.util.List;
-import org.jboss.tools.vpe.editor.util.TemplateManagingUtil;
-
import junit.framework.TestCase;
public class VpeTemplateManagerTest extends TestCase {
public void testSetAnyTemplates() {
VpeAnyData data = new VpeAnyData(
- "tag-name1",
- "tag-value",
- "color:red",
- true
+ "tag-name1", //$NON-NLS-1$
+ "tag-value", //$NON-NLS-1$
+ "color:red" //$NON-NLS-1$
);
VpeTemplateManager.getInstance().setAnyTemplate(data);
data = new VpeAnyData(
- "tag-name2",
- "tag-value",
- "color:white",
- true
+ "tag-name2", //$NON-NLS-1$
+ "tag-value", //$NON-NLS-1$
+ "color:white" //$NON-NLS-1$
);
VpeTemplateManager.getInstance().setAnyTemplate(data);
@@ -40,7 +36,7 @@
public void testGetDefTemplate() {
VpeTemplateManager.getInstance().setDefTemplate(null);
VpeTemplate template = VpeTemplateManager.getInstance().getDefTemplate();
- assertNotNull("TemplateManager.getDefTemplate() cannot return null",template);
+ assertNotNull("TemplateManager.getDefTemplate() cannot return null",template); //$NON-NLS-1$
}
}
Modified: trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/TemplatesExpressionParsingTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/TemplatesExpressionParsingTest.java 2008-10-01 14:27:48 UTC (rev 10592)
+++ trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/TemplatesExpressionParsingTest.java 2008-10-01 14:41:58 UTC (rev 10593)
@@ -14,24 +14,23 @@
import java.io.FileInputStream;
import java.io.IOException;
import java.net.URL;
+import junit.framework.TestCase;
import org.eclipse.core.internal.registry.ExtensionRegistry;
import org.eclipse.core.runtime.ContributorFactoryOSGi;
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IContributor;
import org.eclipse.core.runtime.IExtension;
-import org.eclipse.core.runtime.IExtensionPoint;
import org.eclipse.core.runtime.IExtensionRegistry;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.RegistryFactory;
-import org.osgi.framework.Bundle;
-import org.jboss.tools.vpe.editor.template.VpeTemplateManager;
import org.jboss.tools.common.reporting.IProblemReporter;
import org.jboss.tools.common.reporting.ProblemReporterFactory;
-import junit.framework.TestCase;
+import org.jboss.tools.vpe.editor.template.VpeTemplateManager;
+import org.osgi.framework.Bundle;
/**
* This class created for testing templates expression.
@@ -40,15 +39,15 @@
*/
public class TemplatesExpressionParsingTest extends TestCase {
- private static final String PLUGIN_FAILURE_NAME = "testFailure-plugin.xml";
+ private static final String PLUGIN_FAILURE_NAME = "testFailure-plugin.xml"; //$NON-NLS-1$
- private static final String PLUGIN_OK_NAME = "testOk-plugin.xml";
+ private static final String PLUGIN_OK_NAME = "testOk-plugin.xml"; //$NON-NLS-1$
- private static final String EXTENSION_POINT_ID = "org.jboss.tools.vpe.templates";
+ private static final String EXTENSION_POINT_ID = "org.jboss.tools.vpe.templates"; //$NON-NLS-1$
- private static final String EXTENSION_ERROR_EXTENSION_ID_1 = "org.jboss.tools.vpe.tests.failureExtensions";
+ private static final String EXTENSION_ERROR_EXTENSION_ID_1 = "org.jboss.tools.vpe.tests.failureExtensions"; //$NON-NLS-1$
- private static final String EXTENSION_ERROR_EXTENSION_ID_2 = "org.jboss.tools.vpe.tests.okExtensions";
+ private static final String EXTENSION_ERROR_EXTENSION_ID_2 = "org.jboss.tools.vpe.tests.okExtensions"; //$NON-NLS-1$
private IStatus iStatus = null;
@@ -87,8 +86,8 @@
vpeTemplateManager = VpeTemplateManager.getInstance();
vpeTemplateManager.reload();
- assertNull("Can not parse template from ReDHat DevStudio" + iStatus, iStatus);
- assertEquals("There exist some errors", 0, errorNumber);
+ assertNull("Can not parse template from ReDHat DevStudio" + iStatus, iStatus); //$NON-NLS-1$
+ assertEquals("There exist some errors", 0, errorNumber); //$NON-NLS-1$
assertNotNull(vpeTemplateManager);
}
@@ -101,8 +100,8 @@
createTemplatesForTesting(PLUGIN_OK_NAME);
vpeTemplateManager = VpeTemplateManager.getInstance();
vpeTemplateManager.reload();
- assertNull("Can not parse template from ReDHat DevStudio" + iStatus, iStatus);
- assertEquals("There exist some errors", 0, errorNumber);
+ assertNull("Can not parse template from ReDHat DevStudio" + iStatus, iStatus); //$NON-NLS-1$
+ assertEquals("There exist some errors", 0, errorNumber); //$NON-NLS-1$
return;
}
@@ -117,8 +116,8 @@
vpeTemplateManager = VpeTemplateManager.getInstance();
errorNumber = 0;
vpeTemplateManager.reload();
- assertEquals("Number founds error is Incorrect ", 5, errorNumber);
- assertNotNull("Can not parse template from ReDHat DevStudio" + iStatus,
+ assertEquals("Number founds error is Incorrect ", 5, errorNumber); //$NON-NLS-1$
+ assertNotNull("Can not parse template from ReDHat DevStudio" + iStatus, //$NON-NLS-1$
iStatus);
return;
}
@@ -166,7 +165,7 @@
bundle = Platform.getBundle(confElement.getNamespaceIdentifier());
}
- URL url = bundle.getEntry("/");
+ URL url = bundle.getEntry("/"); //$NON-NLS-1$
IPath path = new Path(FileLocator.toFileURL(url).getFile());
path = path.append(name);
Modified: trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/VpeAllTests.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/VpeAllTests.java 2008-10-01 14:27:48 UTC (rev 10592)
+++ trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/VpeAllTests.java 2008-10-01 14:41:58 UTC (rev 10593)
@@ -34,7 +34,7 @@
public class VpeAllTests extends TestCase{
public static Test suite(){
- TestSuite suite = new TestSuite("Tests for vpe");
+ TestSuite suite = new TestSuite("Tests for vpe"); //$NON-NLS-1$
// $JUnit-BEGIN$
suite.addTestSuite(TemplateLoadingTest.class);
suite.addTestSuite(TemplateSchemeValidateTest.class);
Modified: trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/VpeTestPlugin.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/VpeTestPlugin.java 2008-10-01 14:27:48 UTC (rev 10592)
+++ trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/VpeTestPlugin.java 2008-10-01 14:41:58 UTC (rev 10593)
@@ -19,7 +19,7 @@
public class VpeTestPlugin extends Plugin {
// The plug-in ID
- public static final String PLUGIN_ID = "org.jboss.ide.vpe.tests";
+ public static final String PLUGIN_ID = "org.jboss.ide.vpe.tests"; //$NON-NLS-1$
// The shared instance
private static VpeTestPlugin plugin;
17 years, 3 months
JBoss Tools SVN: r10592 - in trunk/documentation: jbosstools-jdocbook-style/src/main/org/css/css and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: artdaw
Date: 2008-10-01 10:27:48 -0400 (Wed, 01 Oct 2008)
New Revision: 10592
Modified:
trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/org/jboss/tools/common.xsl
trunk/documentation/jbosstools-jdocbook-style/src/main/org/css/css/tools.css
Log:
https://jira.jboss.org/jira/browse/JBDS-399 - 2 templates for adding 'added', 'changed' icons to all of the titles are done
Modified: trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/org/jboss/tools/common.xsl
===================================================================
--- trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/org/jboss/tools/common.xsl 2008-10-01 14:10:39 UTC (rev 10591)
+++ trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/org/jboss/tools/common.xsl 2008-10-01 14:27:48 UTC (rev 10592)
@@ -91,27 +91,17 @@
</xsl:attribute>
<xsl:choose>
- <xsl:when test="@role='new'">
+ <xsl:when test="@role='new' or @role='updated'">
<xsl:attribute name="class">
<xsl:value-of select="@role"/>
</xsl:attribute>
</xsl:when>
- <xsl:when test="@role='updated'">
+ <!-- For mkdiff compatibility-->
+ <xsl:when test="@revisionflag='added' or @revisionflag='changed'">
<xsl:attribute name="class">
- <xsl:value-of select="@role"/>
- </xsl:attribute>
- </xsl:when>
- <!-- For mkdiff compatibility-->
- <xsl:when test="@revisionflag='added'">
- <xsl:attribute name="class">
<xsl:value-of select="@revisionflag"/>
</xsl:attribute>
- </xsl:when>
- <xsl:when test="@revisionflag='changed'">
- <xsl:attribute name="class">
- <xsl:value-of select="@revisionflag"/>
- </xsl:attribute>
- </xsl:when>
+ </xsl:when>
</xsl:choose>
<!-- * if $autotoc.label.in.hyperlink is non-zero, then output the label -->
@@ -188,4 +178,132 @@
</xsl:with-param>
</xsl:call-template>
</xsl:template>
+
+<!-- THERE ARE 2 TEMPLATES FOR ADDING 'ADDED', 'CHANGED' ICONS TO ALL OF THE TITLES-->
+
+<xsl:template name="component.title">
+ <xsl:param name="node" select="."/>
+
+ <xsl:variable name="level">
+ <xsl:choose>
+ <xsl:when test="ancestor::section">
+ <xsl:value-of select="count(ancestor::section)+1"/>
+ </xsl:when>
+ <xsl:when test="ancestor::sect5">6</xsl:when>
+ <xsl:when test="ancestor::sect4">5</xsl:when>
+ <xsl:when test="ancestor::sect3">4</xsl:when>
+ <xsl:when test="ancestor::sect2">3</xsl:when>
+ <xsl:when test="ancestor::sect1">2</xsl:when>
+ <xsl:otherwise>1</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <!-- Let's handle the case where a component (bibliography, for example)
+ occurs inside a section; will we need parameters for this? -->
+ <xsl:variable name="revflag">
+ <xsl:choose>
+ <xsl:when test="../@role='new' or ../@role='updated'">
+ <xsl:value-of select="../@role"/>
+ </xsl:when>
+ <!-- For mkdiff compatibility-->
+ <xsl:when test="../@revisionflag='added' or ../@revisionflag='changed'">
+ <xsl:value-of select="../@revisionflag"/>
+ </xsl:when>
+ <xsl:otherwise></xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:element name="h{$level+1}">
+ <xsl:attribute name="class">
+ title
+ <xsl:value-of select="$revflag" />
+ </xsl:attribute>
+ <xsl:if test="$generate.id.attributes = 0">
+ <xsl:call-template name="anchor">
+ <xsl:with-param name="node" select="$node"/>
+ <xsl:with-param name="conditional" select="0"/>
+ </xsl:call-template>
+ </xsl:if>
+ <xsl:apply-templates select="$node" mode="object.title.markup">
+ <xsl:with-param name="allow-anchors" select="1"/>
+ </xsl:apply-templates>
+ </xsl:element>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="section.heading">
+ <xsl:param name="section" select="."/>
+ <xsl:param name="level" select="1"/>
+ <xsl:param name="allow-anchors" select="1"/>
+ <xsl:param name="title"/>
+ <xsl:param name="class" select="'title'"/>
+
+ <xsl:variable name="id">
+ <xsl:choose>
+ <!-- if title is in an *info wrapper, get the grandparent -->
+ <xsl:when test="contains(local-name(..), 'info')">
+ <xsl:call-template name="object.id">
+ <xsl:with-param name="object" select="../.."/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="object.id">
+ <xsl:with-param name="object" select=".."/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <!-- HTML H level is one higher than section level -->
+ <xsl:variable name="hlevel">
+ <xsl:choose>
+ <!-- highest valid HTML H level is H6; so anything nested deeper
+ than 5 levels down just becomes H6 -->
+ <xsl:when test="$level > 5">6</xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$level + 1"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="revflag">
+ <xsl:choose>
+ <xsl:when test="../@role='new' or ../@role='updated'">
+ <xsl:value-of select="../@role"/>
+ </xsl:when>
+ <!-- For mkdiff compatibility-->
+ <xsl:when test="../@revisionflag='added' or ../@revisionflag='changed'">
+ <xsl:value-of select="../@revisionflag"/>
+ </xsl:when>
+ <xsl:otherwise></xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:element name="h{$hlevel}">
+ <xsl:attribute name="class">
+ <xsl:value-of select="$class"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="$revflag"/>
+ </xsl:attribute>
+ <xsl:if test="$css.decoration != '0'">
+ <xsl:if test="$hlevel<3">
+ <xsl:attribute name="style">clear: both</xsl:attribute>
+ </xsl:if>
+ </xsl:if>
+ <xsl:if test="$allow-anchors != 0 and $generate.id.attributes = 0">
+ <xsl:call-template name="anchor">
+ <xsl:with-param name="node" select="$section"/>
+ <xsl:with-param name="conditional" select="0"/>
+ </xsl:call-template>
+ </xsl:if>
+ <xsl:if test="$generate.id.attributes != 0 and not(local-name(.) = 'appendix')">
+ <xsl:attribute name="id"><xsl:value-of select="$id"/></xsl:attribute>
+ </xsl:if>
+ <xsl:copy-of select="$title"/>
+ </xsl:element>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+
</xsl:stylesheet>
Modified: trunk/documentation/jbosstools-jdocbook-style/src/main/org/css/css/tools.css
===================================================================
--- trunk/documentation/jbosstools-jdocbook-style/src/main/org/css/css/tools.css 2008-10-01 14:10:39 UTC (rev 10591)
+++ trunk/documentation/jbosstools-jdocbook-style/src/main/org/css/css/tools.css 2008-10-01 14:27:48 UTC (rev 10592)
@@ -82,11 +82,11 @@
display:block;
}
-a.new, a.added {
+.new, .added {
background:transparent url(../images/new.png) no-repeat scroll right top;
padding-right:70px;
}
-a.updated, a.changed {
+.updated, .changed {
background:transparent url(../images/updated.png) no-repeat scroll right top;
padding-right:70px;
}
17 years, 3 months
JBoss Tools SVN: r10591 - in trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog: common and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dsakovich
Date: 2008-10-01 10:10:39 -0400 (Wed, 01 Oct 2008)
New Revision: 10591
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSClassDialog.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSStyleDialog.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/common/CSSModel.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/common/Constants.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/common/messages.properties
Log:
https://jira.jboss.org/jira/browse/JBIDE-2530
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSClassDialog.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSClassDialog.java 2008-10-01 13:58:58 UTC (rev 10590)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSClassDialog.java 2008-10-01 14:10:39 UTC (rev 10591)
@@ -135,6 +135,7 @@
.getImageDescriptor(Constants.IMAGE_FOLDERLARGE_FILE_LOCATION);
Image image = imageDesc.createImage();
button.setImage(image);
+ button.setToolTipText(MessageUtil.getString("CSS_BROWSE_BUTTON_TOOLTIP"));
button.addDisposeListener(new DisposeListener() {
public void widgetDisposed(DisposeEvent e) {
Button button = (Button) e.getSource();
@@ -154,12 +155,12 @@
classCombo.addSelectionListener(new SelectionListener() {
public void widgetDefaultSelected(SelectionEvent e) {
- // TODO Auto-generated method stub
}
public void widgetSelected(SelectionEvent e) {
- String style = cssModel.getStyle(classCombo.getText());
+ String style = cssModel.getStyle(classCombo.getText());
+ classCombo.setToolTipText(cssModel.getCSSText(classCombo.getText()));
styleComposite.recreateStyleComposite(style);
}
@@ -202,8 +203,8 @@
+ styleAttributes.getAttribute(key)
+ Constants.SEMICOLON_STRING;
- html = Constants.OPEN_SPAN_TAG + styleForSpan
- + Constants.TEXT_FOR_PREVIEW + Constants.CLOSE_SPAN_TAG;
+ html = Constants.OPEN_DIV_TAG + styleForSpan
+ + Constants.TEXT_FOR_PREVIEW + Constants.CLOSE_DIV_TAG;
browser.setText(html);
}
});
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSStyleDialog.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSStyleDialog.java 2008-10-01 13:58:58 UTC (rev 10590)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSStyleDialog.java 2008-10-01 14:10:39 UTC (rev 10591)
@@ -88,8 +88,8 @@
styleForSpan += key + Constants.COLON_STRING
+ styleAttributes.getAttribute(key) + Constants.SEMICOLON_STRING;
- html = Constants.OPEN_SPAN_TAG + styleForSpan
- + Constants.TEXT_FOR_PREVIEW + Constants.CLOSE_SPAN_TAG;
+ html = Constants.OPEN_DIV_TAG + styleForSpan
+ + Constants.TEXT_FOR_PREVIEW + Constants.CLOSE_DIV_TAG;
browser.setText(html);
}
});
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/common/CSSModel.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/common/CSSModel.java 2008-10-01 13:58:58 UTC (rev 10590)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/common/CSSModel.java 2008-10-01 14:10:39 UTC (rev 10591)
@@ -81,6 +81,21 @@
return selectors;
}
+
+ public String getCSSText(String selector) {
+ if (styleSheet != null) {
+ CSSRuleList list = styleSheet.getCssRules();
+ if (list != null) {
+ for (int i = 0; i < list.getLength(); i++) {
+ if (list.item(i) instanceof CSSStyleRule && ((CSSStyleRule)list.item(i)).getSelectorText().equals(selector)) {
+ return ((CSSStyleRule)list.item(i)).getCssText();
+ }
+ }
+ }
+ }
+ return null;
+ }
+
/**
* Get style by selectorName
*
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/common/Constants.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/common/Constants.java 2008-10-01 13:58:58 UTC (rev 10590)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/common/Constants.java 2008-10-01 14:10:39 UTC (rev 10591)
@@ -63,6 +63,9 @@
public static String OPEN_SPAN_TAG = "<span style=\"width: 100%;";
public static String CLOSE_SPAN_TAG = "</span>";
+ public static String OPEN_DIV_TAG = "<div style=\"width: 100%;";
+ public static String CLOSE_DIV_TAG = "</div>";
+
public static String TEXT_FOR_PREVIEW = "\">Text for preview";
public static String COLON_STRING = ":";
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/common/messages.properties
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/common/messages.properties 2008-10-01 13:58:58 UTC (rev 10590)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/common/messages.properties 2008-10-01 14:10:39 UTC (rev 10591)
@@ -1,5 +1,6 @@
CSS_STYLE_DIALOG_TITLE=CSS Style Dialog
CSS_STYLE_CLASS_DIALOG_TITLE=CSS Style Class Dialog
+CSS_BROWSE_BUTTON_TOOLTIP=Browse
TEXT_FONT_TAB_NAME=Text/Font
BOXES_TAB_NAME=Boxes
BACKGROUND_TAB_NAME=Background
17 years, 3 months
JBoss Tools SVN: r10590 - trunk/birt/docs/en/modules.
by jbosstools-commits@lists.jboss.org
Author: abogachuk
Date: 2008-10-01 09:58:58 -0400 (Wed, 01 Oct 2008)
New Revision: 10590
Modified:
trunk/birt/docs/en/modules/birt_designer.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-388 - birt designer chapter re-structured
Modified: trunk/birt/docs/en/modules/birt_designer.xml
===================================================================
--- trunk/birt/docs/en/modules/birt_designer.xml 2008-10-01 13:36:16 UTC (rev 10589)
+++ trunk/birt/docs/en/modules/birt_designer.xml 2008-10-01 13:58:58 UTC (rev 10590)
@@ -14,200 +14,19 @@
<para>text here</para>
- <section id="esb_file">
+ <section id="birt_designer_introduction">
- <title>ESB File Editor</title>
- <para><property>ESB File Editor</property> is a powerful and customizable tool. ESB File Editor allows developing an
- application using ESB technology.</para>
-
- <para>ESB file editor has two tabs: Tree and Source.</para>
-
- <para>You can switch to Tree. The Tree view for the editor displays all ESB artifacts in a tree format.
- By selecting any node you can see and edit its properties which will appear in the right-hand area. For example, a Provider:</para>
- <figure>
- <title>Tree View</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/esb_editor/01_esb_tree_view.png" scale="90"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>You can easily switch from Tree to Source by selecting the Source tab at the bottom of the editor and work in <link linkend="sourceView">Source view</link>.</para>
-
- <figure id="sourceView">
- <title>Source View</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/esb_editor/02_esb_source_view.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>The Source view for the editor displays a text content of the ESB file. It is always synchronized with tree view,
- so any changes made in one of the views will immediately appear in the other.</para>
- <para>No matter what view you select, you get full integration with <!--Properties and -->Outline view<!-- views -->.
- For example, you can work in the Source view with the help of the Outline view. The Outline view shows a tree structure of the ESB file.
- Simply select any element in the Outline view and it will jump to the same place in the Source editor,
- so you can navigate through the source code with Outline view.</para>
- <figure>
- <title>Outline View</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/esb_editor/03_esb_outline_view.png" scale="70"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Adding, editing or deleting of some artifacts operations are available right in the <property>Tree</property> view. Right-click any node and select one of the available actions in the context menu.
- For example, you can easily add a new provider:</para>
- <para></para>
- <figure>
- <title>Adding new provider</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/esb_editor/04_esb_add_provider.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>You can easily add a new service too:</para>
- <figure>
- <title>Adding new service</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/esb_editor/05_esb_add_service.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The same way you can create a listener for service and other elements of ESB:</para>
- <figure>
- <title>Adding new listener for service</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/esb_editor/06_esb_add_listener.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>The same actions can be done in the right part of <property>Tree</property> view tab
- using <property>Add</property>, <property>Edit</property> and <property>Remove</property> buttons.</para>
+ <title>BIRT Designer</title>
+ <para> text here</para>
</section>
- <section id="esb_editors_features">
+ <section id="birt_designer_features">
- <title>ESB Editors Features</title>
- <para>JBoss ESB tooling has powerful editor features that help you easily make use of content and code assist.</para>
+ <title>BIRT Designer Features</title>
+ <para>text here</para>
- <section id="ESBsyntaxvalidation84">
-
- <title>ESB syntax validation</title>
- <para>When working in JBoss ESB editor you are constantly provided with feedback
- and contextual error checking as you type. In the Source viewer, if at any point a tag is incorrect or incomplete, an error will be indicated next to the line and also in the Problems view below.</para>
- </section>
-
- <section id="ESBSupportXMLSchema">
- <title>Support for XML Schema</title>
-
- <para>JBoss ESB Framework fully
- <link linkend="sourceView">supports XML files based on schemas as well as DTDs</link>.</para>
+
</section>
-
- <!--<section id="OpenOnSelection">
-
- <title>OpenOn</title>
-
- <para><property>OpenOn</property> let's you easily navigate through your
- project without using the Package Explorer view (project tree). With OpenOn, you can
- simply click on a reference to another file and that file will be opened.</para>
-
- <para>OpenOn is available for the XML files </para>
-
- <para>Press and hold down the Ctrl key. As you move the mouse cursor over different
- file references in the file, they display an underline. When you have the mouse
- cursor over the name of the file you want to open, click and the file will open
- in its own editor. In this example the managed bean NameBean will open.</para>
-
- </section>
- -->
-
- <section id="ESBContentAssist">
-
- <title>Content Assist for ESB XML file</title>
-
- <para>When you work with any ESB XML file <property>Content Assist</property> is available to help you.
- It provides pop-up tip to help you complete your code statements.
- It allows you to write your code faster and with more accuracy.
- Content assist is always available in the Source mode. Simply type <emphasis>
- <property>Ctrl-Space</property></emphasis> to see what is available.</para>
-
- <para>Content Assist for ESB XML file:</para>
- <figure>
- <title>Content Assist for ESB XML file</title>
- <mediaobject>
- <imageobject>
- <imagedata
- fileref="images/esb_editor/08_esb_features.png" scale="80"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Content Assist for attributes:</para>
- <figure>
- <title>Content Assist for attributes:</title>
- <mediaobject>
- <imageobject>
- <imagedata
- fileref="images/esb_editor/09_esb_features.png" scale="80"/>
- </imageobject>
- </mediaobject>
- </figure>
- <!-- </section>
-
- <section id="ContentAssistWithinTreeEditor">
-
- <title>Content Assist within Tree ESB Editor</title>
-
- <para>JBoss Developer Studio also provides Content Assist when working within the Tree ESB editor.
- Just click <emphasis><property>Ctrl-Space</property>.</emphasis></para>
- <figure>
- <title>Content Assist in Tree ESB Editor</title>
- <mediaobject>
- <imageobject>
- <imagedata
- fileref="images/esb_file/09_editors_features.png" scale="85"/>
- </imageobject>
- </mediaobject>
- </figure>
- </section> -->
- </section>
-
- <section id="FullControlOverSourceFiles-SynchronizedSourcAndVisualEditing">
-
- <title>Synchronized Source and Visual Editing</title>
-
- <para>ESB file can be edited in either source
- or extra visual modes at the same time.</para>
-
- <para>JBoss Tools provide you two different editors to speed your development: a graphical view (<property>Tree</property>) and source
- (<property>Source</property>). At the same time, you always have full control over esb source file. Any changes you
- make in the source view will immediately appear in the tree view. Both views are synchronized, you can edit the file in any view.</para>
-
- <figure>
- <title>Two Views are Synchronized</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/esb_editor/10_esb_features.png" scale="70"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- </section>
-
- <para>The last chapter covers capabilities on how you can use ESB editor.</para>
-
- <para>In summary, this reference supplies you with all necessary information on the functionality
- that JBoss ESB Editor provides for work with JBoss ESB.</para>
- </section>
</chapter>
17 years, 3 months
JBoss Tools SVN: r10589 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util.
by jbosstools-commits@lists.jboss.org
Author: sdzmitrovich
Date: 2008-10-01 09:36:16 -0400 (Wed, 01 Oct 2008)
New Revision: 10589
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2810
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java 2008-10-01 12:38:24 UTC (rev 10588)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java 2008-10-01 13:36:16 UTC (rev 10589)
@@ -88,6 +88,7 @@
public static final String ATTR_ALT = "alt"; //$NON-NLS-1$
public static final String ATTR_JSFC = "jsfc"; //$NON-NLS-1$
public static final String ATTR_DISPLAY = "display"; //$NON-NLS-1$
+ public static final String ATTR_READONLY = "readonly"; //$NON-NLS-1$
public static final String VALUE_TOP_ALIGN = "top"; //$NON-NLS-1$
public static final String VALUE_MIDDLE_ALIGN = "middle"; //$NON-NLS-1$
17 years, 3 months
JBoss Tools SVN: r10588 - in trunk: jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/util and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: sdzmitrovich
Date: 2008-10-01 08:38:24 -0400 (Wed, 01 Oct 2008)
New Revision: 10588
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/ajaxValidator.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/beanValidator.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/calendar.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/comboBox.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/comboBox.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/graphValidator.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentContentTest.java
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesCalendarTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/util/RichFaces.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/calendar.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/componentControl.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesAllTests.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/ComponentContentTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2810
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesCalendarTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesCalendarTemplate.java 2008-10-01 12:20:59 UTC (rev 10587)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesCalendarTemplate.java 2008-10-01 12:38:24 UTC (rev 10588)
@@ -15,11 +15,9 @@
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
-import java.util.HashSet;
import java.util.List;
import java.util.Locale;
import java.util.Map;
-import java.util.Set;
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
import org.jboss.tools.jsf.vpe.richfaces.HtmlComponentUtil;
@@ -30,6 +28,8 @@
import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
import org.jboss.tools.vpe.editor.template.VpeToggableTemplate;
+import org.jboss.tools.vpe.editor.util.Constants;
+import org.jboss.tools.vpe.editor.util.HTML;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
import org.mozilla.interfaces.nsIDOMNode;
@@ -46,101 +46,101 @@
*/
public class RichFacesCalendarTemplate extends VpeAbstractTemplate implements VpeToggableTemplate {
- static String[] HEADER_CONTENT = { "<<", "<", "", ">", ">>" };
- static String[] HEADER_CONTENT_ON_POPUP = { "<<", "<", "", ">", ">>", "X" };
+ static String[] HEADER_CONTENT = { "<<", "<", "", ">", ">>" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+ static String[] HEADER_CONTENT_ON_POPUP = { "<<", "<", "", ">", ">>", "X" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
final static int MONTH_LENGTH[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31,
30, 31 };
final static int LEAP_MONTH_LENGTH[] = { 31, 29, 31, 30, 31, 30, 31, 31,
30, 31, 30, 31 };
- final static String STYLE_PATH = "calendar/calendar.css";
- final static String BUTTON_IMG = "calendar/calendar.gif";
+ final static String STYLE_PATH = "calendar/calendar.css"; //$NON-NLS-1$
+ final static String BUTTON_IMG = "calendar/calendar.gif"; //$NON-NLS-1$
final static int COLUMN = 8;
- final static String FILL_WIDTH = "100%";
+ final static String FILL_WIDTH = "100%"; //$NON-NLS-1$
final static int NUM_DAYS_IN_WEEK = 7;
final static int NUM_WEEK_ON_PAGE = 6;
- final static String TODAY = "Today";
- final static String VERTICAL_SEPARATOR = "|";
- final static String APPLY = "Apply";
+ final static String TODAY = "Today"; //$NON-NLS-1$
+ final static String VERTICAL_SEPARATOR = "|"; //$NON-NLS-1$
+ final static String APPLY = "Apply"; //$NON-NLS-1$
final static int CALENDAR_WIDTH = 200;
final static int CALENDAR_INPUT_WIDTH = CALENDAR_WIDTH - 20;
final static int CALENDAR_IMAGE_WIDTH = 20;
final static int CALENDAR_CUSTOM_IMAGE_WIDTH = 40;
final static int CALENDAR_BUTTON_WIDTH = 80;
- final static String ATTRIBUTE_TEXT = "text";
+ final static String ATTRIBUTE_TEXT = "text"; //$NON-NLS-1$
- static final String DEFAULT_DATE_PATTERN = "MMMM, yyyy";
- static final String HEADER = "header";
- static final String FOOTER = "footer";
- static final String VPE_USER_TOGGLE_ID_ATTR = "vpe-user-toggle-id";
+ static final String DEFAULT_DATE_PATTERN = "MMMM, yyyy"; //$NON-NLS-1$
+ static final String HEADER = "header"; //$NON-NLS-1$
+ static final String FOOTER = "footer"; //$NON-NLS-1$
+ static final String VPE_USER_TOGGLE_ID_ATTR = "vpe-user-toggle-id"; //$NON-NLS-1$
/*rich:calendar attributes*/
- static final String BUTTON_LABEL = "buttonLabel";
- static final String BUTTON_ICON = "buttonIcon";
- static final String DIRECTION = "direction";
- static final String ENABLE_MANUAL_INPUT = "enableManualInput";
- static final String CELL_HEIGHT = "cellHeight";
- static final String CELL_WIDTH = "cellWidth";
- static final String DATE_PATTERN = "datePattern";
- static final String VALUE = "value";
- static final String DISABLED = "disabled";
- static final String HORIZONTAL_OFFSET = "horizontalOffset";
- static final String VERTICAL_OFFSET = "verticalOffset";
- static final String LOCALE = "locale";
- static final String POPUP = "popup";
- static final String SHOW_APPLY_BUTTON = "showApplyButton";
- static final String SHOW_INPUT = "showInput";
- static final String SHOW_SHOW_WEEKS_DAY_BAR = "showWeekDaysBar";
- static final String SHOW_WEEKS_BAR = "showWeeksBar";
- static final String TODAY_CONTROL_MODE = "todayControlMode";
- static final String SHOW_HEADER = "showHeader";
- static final String SHOW_FOOTER= "showFooter";
+ static final String BUTTON_LABEL = "buttonLabel"; //$NON-NLS-1$
+ static final String BUTTON_ICON = "buttonIcon"; //$NON-NLS-1$
+ static final String DIRECTION = "direction"; //$NON-NLS-1$
+ static final String ENABLE_MANUAL_INPUT = "enableManualInput"; //$NON-NLS-1$
+ static final String CELL_HEIGHT = "cellHeight"; //$NON-NLS-1$
+ static final String CELL_WIDTH = "cellWidth"; //$NON-NLS-1$
+ static final String DATE_PATTERN = "datePattern"; //$NON-NLS-1$
+ static final String VALUE = "value"; //$NON-NLS-1$
+ static final String DISABLED = "disabled"; //$NON-NLS-1$
+ static final String HORIZONTAL_OFFSET = "horizontalOffset"; //$NON-NLS-1$
+ static final String VERTICAL_OFFSET = "verticalOffset"; //$NON-NLS-1$
+ static final String LOCALE = "locale"; //$NON-NLS-1$
+ static final String POPUP = "popup"; //$NON-NLS-1$
+ static final String SHOW_APPLY_BUTTON = "showApplyButton"; //$NON-NLS-1$
+ static final String SHOW_INPUT = "showInput"; //$NON-NLS-1$
+ static final String SHOW_SHOW_WEEKS_DAY_BAR = "showWeekDaysBar"; //$NON-NLS-1$
+ static final String SHOW_WEEKS_BAR = "showWeeksBar"; //$NON-NLS-1$
+ static final String TODAY_CONTROL_MODE = "todayControlMode"; //$NON-NLS-1$
+ static final String SHOW_HEADER = "showHeader"; //$NON-NLS-1$
+ static final String SHOW_FOOTER= "showFooter"; //$NON-NLS-1$
/*CSS classes*/
- static final String CSS_R_C_INPUT = "rich-calendar-input";
- static final String CSS_R_C_BUTTON = "rich-calendar-button";
- static final String CSS_R_C_EXTERIOR = "rich-calendar-exterior";
- static final String CSS_R_C_HEADER = "rich-calendar-header";
- static final String CSS_R_C_TOOL = "rich-calendar-tool";
- static final String CSS_R_C_MONTH = "rich-calendar-month";
- static final String CSS_R_C_TOOL_CLOSE = "rich-calendar-tool-close";
- static final String CSS_R_C_DAYS = "rich-calendar-days";
- static final String CSS_R_C_WEEKENDS = "rich-calendar-weekends";
- static final String CSS_R_C_WEEK = "rich-calendar-week";
- static final String CSS_R_C_CELL = "rich-calendar-cell";
- static final String CSS_R_C_CELL_SIZE = "rich-calendar-cell-size";
- static final String CSS_R_C_HOLLY = "rich-calendar-holly";
- static final String CSS_R_C_BOUNDARY_DATES = "rich-calendar-boundary-dates";
- static final String CSS_R_C_BTN = "rich-calendar-btn";
- static final String CSS_R_C_TODAY = "rich-calendar-today";
- static final String CSS_R_C_SELECT = "rich-calendar-select";
- static final String CSS_R_C_TOOLFOOTER = "rich-calendar-toolfooter";
- static final String CSS_R_C_FOOTER = "rich-calendar-footer";
- static final String CSS_R_C_HEADER_OPTIONAL = "rich-calendar-header-optional";
- static final String CSS_R_C_FOOTER_OPTIONAL = "rich-calendar-footer-optional";
+ static final String CSS_R_C_INPUT = "rich-calendar-input"; //$NON-NLS-1$
+ static final String CSS_R_C_BUTTON = "rich-calendar-button"; //$NON-NLS-1$
+ static final String CSS_R_C_EXTERIOR = "rich-calendar-exterior"; //$NON-NLS-1$
+ static final String CSS_R_C_HEADER = "rich-calendar-header"; //$NON-NLS-1$
+ static final String CSS_R_C_TOOL = "rich-calendar-tool"; //$NON-NLS-1$
+ static final String CSS_R_C_MONTH = "rich-calendar-month"; //$NON-NLS-1$
+ static final String CSS_R_C_TOOL_CLOSE = "rich-calendar-tool-close"; //$NON-NLS-1$
+ static final String CSS_R_C_DAYS = "rich-calendar-days"; //$NON-NLS-1$
+ static final String CSS_R_C_WEEKENDS = "rich-calendar-weekends"; //$NON-NLS-1$
+ static final String CSS_R_C_WEEK = "rich-calendar-week"; //$NON-NLS-1$
+ static final String CSS_R_C_CELL = "rich-calendar-cell"; //$NON-NLS-1$
+ static final String CSS_R_C_CELL_SIZE = "rich-calendar-cell-size"; //$NON-NLS-1$
+ static final String CSS_R_C_HOLLY = "rich-calendar-holly"; //$NON-NLS-1$
+ static final String CSS_R_C_BOUNDARY_DATES = "rich-calendar-boundary-dates"; //$NON-NLS-1$
+ static final String CSS_R_C_BTN = "rich-calendar-btn"; //$NON-NLS-1$
+ static final String CSS_R_C_TODAY = "rich-calendar-today"; //$NON-NLS-1$
+ static final String CSS_R_C_SELECT = "rich-calendar-select"; //$NON-NLS-1$
+ static final String CSS_R_C_TOOLFOOTER = "rich-calendar-toolfooter"; //$NON-NLS-1$
+ static final String CSS_R_C_FOOTER = "rich-calendar-footer"; //$NON-NLS-1$
+ static final String CSS_R_C_HEADER_OPTIONAL = "rich-calendar-header-optional"; //$NON-NLS-1$
+ static final String CSS_R_C_FOOTER_OPTIONAL = "rich-calendar-footer-optional"; //$NON-NLS-1$
private final static String WEEK_DAY_HTML_CLASS_ATTR = CSS_R_C_DAYS;
- private final static String HOL_WEEK_DAY_HTML_CLASS_ATTR = CSS_R_C_DAYS + " " + CSS_R_C_WEEKENDS;
- private final static String TODAY_HTML_CLASS_ATTR = CSS_R_C_CELL_SIZE + " "+ CSS_R_C_CELL + " "+ CSS_R_C_TODAY;
- private final static String CUR_MONTH_HTML_CLASS_ATTR = CSS_R_C_CELL_SIZE + " "+ CSS_R_C_CELL;
- private final static String HOL_CUR_MONTH_HTML_CLASS_ATTR = CSS_R_C_CELL_SIZE + " "+ CSS_R_C_CELL + " "+ CSS_R_C_HOLLY;
- private final static String OTHER_MONTH_HTML_CLASS_ATTR = CSS_R_C_CELL_SIZE + " "+ CSS_R_C_CELL + " "+ CSS_R_C_BOUNDARY_DATES;
- private final static String HOL_OTHER_MONTH_HTML_CLASS_ATTR = CSS_R_C_CELL_SIZE + " "+ CSS_R_C_CELL + " "+ CSS_R_C_HOLLY + " " + CSS_R_C_BOUNDARY_DATES ;
+ private final static String HOL_WEEK_DAY_HTML_CLASS_ATTR = CSS_R_C_DAYS + " " + CSS_R_C_WEEKENDS; //$NON-NLS-1$
+ private final static String TODAY_HTML_CLASS_ATTR = CSS_R_C_CELL_SIZE + " "+ CSS_R_C_CELL + " "+ CSS_R_C_TODAY; //$NON-NLS-1$ //$NON-NLS-2$
+ private final static String CUR_MONTH_HTML_CLASS_ATTR = CSS_R_C_CELL_SIZE + " "+ CSS_R_C_CELL; //$NON-NLS-1$
+ private final static String HOL_CUR_MONTH_HTML_CLASS_ATTR = CSS_R_C_CELL_SIZE + " "+ CSS_R_C_CELL + " "+ CSS_R_C_HOLLY; //$NON-NLS-1$ //$NON-NLS-2$
+ private final static String OTHER_MONTH_HTML_CLASS_ATTR = CSS_R_C_CELL_SIZE + " "+ CSS_R_C_CELL + " "+ CSS_R_C_BOUNDARY_DATES; //$NON-NLS-1$ //$NON-NLS-2$
+ private final static String HOL_OTHER_MONTH_HTML_CLASS_ATTR = CSS_R_C_CELL_SIZE + " "+ CSS_R_C_CELL + " "+ CSS_R_C_HOLLY + " " + CSS_R_C_BOUNDARY_DATES ; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
/*Attribute values*/
- private static final String DIRECTIONS_TOP_LEFT = "top-left";
- private static final String DIRECTIONS_TOP_RIGHT = "top-right";
- private static final String DIRECTIONS_BOTTOM_LEFT = "bottom-left";
- private static final String DIRECTIONS_BOTTOM_RIGHT = "bottom-right";
+ private static final String DIRECTIONS_TOP_LEFT = "top-left"; //$NON-NLS-1$
+ private static final String DIRECTIONS_TOP_RIGHT = "top-right"; //$NON-NLS-1$
+ private static final String DIRECTIONS_BOTTOM_LEFT = "bottom-left"; //$NON-NLS-1$
+ private static final String DIRECTIONS_BOTTOM_RIGHT = "bottom-right"; //$NON-NLS-1$
private static final int DIRECTIONS_TOP_LEFT_INT = 1;
private static final int DIRECTIONS_TOP_RIGHT_INT = 2;
private static final int DIRECTIONS_BOTTOM_LEFT_INT = 3;
private static final int DIRECTIONS_BOTTOM_RIGHT_INT = 4;
/*styles for direction table cells*/
- private static final String STYLE_TOP_LEFT = "vertical-align: bottom; text-align: right;";
- private static final String STYLE_TOP_RIGHT = "vertical-align: bottom; text-align: left;";
- private static final String STYLE_BOTTOM_LEFT = "vertical-align: top; text-align: right;";
- private static final String STYLE_BOTTOM_RIGHT = "vertical-align: top; text-align: left;";
+ private static final String STYLE_TOP_LEFT = "vertical-align: bottom; text-align: right;"; //$NON-NLS-1$
+ private static final String STYLE_TOP_RIGHT = "vertical-align: bottom; text-align: left;"; //$NON-NLS-1$
+ private static final String STYLE_BOTTOM_LEFT = "vertical-align: top; text-align: right;"; //$NON-NLS-1$
+ private static final String STYLE_BOTTOM_RIGHT = "vertical-align: top; text-align: left;"; //$NON-NLS-1$
/*rich:calendar attributes*/
private String buttonLabel;
@@ -202,7 +202,7 @@
readAttributes(sourceNode);
initCalendar();
- ComponentUtil.setCSSLink(pageContext, STYLE_PATH, "calendar");
+ ComponentUtil.setCSSLink(pageContext, STYLE_PATH, "calendar"); //$NON-NLS-1$
nsIDOMElement div = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_DIV);
@@ -222,8 +222,8 @@
nsIDOMElement calendar;
nsIDOMElement calendarWithPopup;
- if ("false".equalsIgnoreCase(popup)) {
- if ("true".equalsIgnoreCase(disabled)) {
+ if ("false".equalsIgnoreCase(popup)) { //$NON-NLS-1$
+ if ("true".equalsIgnoreCase(disabled)) { //$NON-NLS-1$
calendar = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_DIV);
} else {
@@ -298,8 +298,8 @@
nsIDOMElement hiddenDiv = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_DIV);
hiddenDiv.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR,
- HtmlComponentUtil.HTML_ATR_WIDTH + " : " + CALENDAR_WIDTH
- + "px; overflow: hidden; display: none;");
+ HtmlComponentUtil.HTML_ATR_WIDTH + " : " + CALENDAR_WIDTH //$NON-NLS-1$
+ + "px; overflow: hidden; display: none;"); //$NON-NLS-1$
nsIDOMElement hiddenTable = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_TABLE);
@@ -346,7 +346,7 @@
.createElement(HtmlComponentUtil.HTML_TAG_TD);
table.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR,
- HtmlComponentUtil.HTML_ATR_WIDTH + " : 100%");
+ HtmlComponentUtil.HTML_ATR_WIDTH + " : 100%"); //$NON-NLS-1$
tr1.appendChild(td1_1);
tr1.appendChild(td1_2);
@@ -360,21 +360,21 @@
int divWidth = CALENDAR_WIDTH + CALENDAR_IMAGE_WIDTH;
div.appendChild(table);
- if (!"false".equalsIgnoreCase(showInput)) {
+ if (!Constants.FALSE.equalsIgnoreCase(showInput)) {
nsIDOMElement input = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_INPUT);
input.setAttribute(HtmlComponentUtil.HTML_TYPE_ATTR, ATTRIBUTE_TEXT);
input.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, CSS_R_C_INPUT);
input.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR,
- HtmlComponentUtil.HTML_ATR_WIDTH + " : "
- + CALENDAR_INPUT_WIDTH + "px;");
+ HtmlComponentUtil.HTML_ATR_WIDTH + " : " //$NON-NLS-1$
+ + CALENDAR_INPUT_WIDTH + "px;"); //$NON-NLS-1$
- if ("true".equals(enableManualInput)) {
- input.setAttribute(HtmlComponentUtil.HTML_READONLY_ATTR, "true");
- }
- if ("true".equals(disabled)) {
- input.setAttribute(HtmlComponentUtil.HTML_ATTR_DISABLED, "true");
- }
+ if (Constants.TRUE.equals(enableManualInput)) {
+ input.setAttribute(HTML.ATTR_READONLY, Constants.TRUE);
+ }
+ if (Constants.TRUE.equals(disabled)) {
+ input.setAttribute(HTML.ATTR_DISABLED, Constants.TRUE);
+ }
if (attrPresents(value)) {
input.setAttribute(HtmlComponentUtil.HTML_VALUE_ATTR, value);
@@ -391,10 +391,10 @@
HtmlComponentUtil.HTML_TAG_BUTTON);
button.setAttribute(HtmlComponentUtil.HTML_VALUE_ATTR, buttonLabel);
button.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, CSS_R_C_BUTTON);
- if ("true".equalsIgnoreCase(disabled)) {
- button.setAttribute(HtmlComponentUtil.HTML_ATTR_DISABLED, "true");
+ if ("true".equalsIgnoreCase(disabled)) { //$NON-NLS-1$
+ button.setAttribute(HtmlComponentUtil.HTML_ATTR_DISABLED, "true"); //$NON-NLS-1$
}
- button.setAttribute(VPE_USER_TOGGLE_ID_ATTR, ""+showPopupCalendar);
+ button.setAttribute(VPE_USER_TOGGLE_ID_ATTR, ""+showPopupCalendar); //$NON-NLS-1$
td1_2.appendChild(button);
divWidth = CALENDAR_WIDTH + CALENDAR_BUTTON_WIDTH;
} else {
@@ -409,12 +409,12 @@
ComponentUtil.setImg(image, BUTTON_IMG);
divWidth = CALENDAR_WIDTH + CALENDAR_IMAGE_WIDTH;
}
- image.setAttribute(VPE_USER_TOGGLE_ID_ATTR, ""+showPopupCalendar);
+ image.setAttribute(VPE_USER_TOGGLE_ID_ATTR, ""+showPopupCalendar); //$NON-NLS-1$
td1_2.appendChild(image);
}
div.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR,
- HtmlComponentUtil.HTML_ATR_WIDTH + " : "
- + divWidth + "px; overflow: hidden;");
+ HtmlComponentUtil.HTML_ATR_WIDTH + " : " //$NON-NLS-1$
+ + divWidth + "px; overflow: hidden;"); //$NON-NLS-1$
return div;
}
@@ -454,14 +454,14 @@
nsIDOMElement div = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_DIV);
div.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR,
- HtmlComponentUtil.HTML_ATR_WIDTH + " : " + CALENDAR_WIDTH
- + "px; overflow: hidden;");
+ HtmlComponentUtil.HTML_ATR_WIDTH + " : " + CALENDAR_WIDTH //$NON-NLS-1$
+ + "px; overflow: hidden;"); //$NON-NLS-1$
nsIDOMElement table = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_TABLE);
- table.setAttribute(HtmlComponentUtil.HTML_CELLPADDING_ATTR, "0");
- table.setAttribute(HtmlComponentUtil.HTML_BORDER_ATTR, "0");
- table.setAttribute(HtmlComponentUtil.HTML_CELLSPACING_ATTR, "0");
+ table.setAttribute(HtmlComponentUtil.HTML_CELLPADDING_ATTR, "0"); //$NON-NLS-1$
+ table.setAttribute(HtmlComponentUtil.HTML_BORDER_ATTR, "0"); //$NON-NLS-1$
+ table.setAttribute(HtmlComponentUtil.HTML_CELLSPACING_ATTR, "0"); //$NON-NLS-1$
table.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
CSS_R_C_EXTERIOR);
@@ -481,10 +481,10 @@
nsIDOMElement calendarBody = createCalendarBody(visualDocument);
nsIDOMElement footer = null;
- if (!"false".equals(showHeader)) {
+ if (!"false".equals(showHeader)) { //$NON-NLS-1$
header = createCalendarHeader(visualDocument);
}
- if (!"false".equals(showFooter)) {
+ if (!"false".equals(showFooter)) { //$NON-NLS-1$
footer = createCalendarFooter(visualDocument);
}
@@ -524,7 +524,7 @@
.createElement(HtmlComponentUtil.HTML_TAG_TR);
nsIDOMElement td = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_TD);
- td.setAttribute(HtmlComponentUtil.HTML_TABLE_COLSPAN, "" + COLUMN);
+ td.setAttribute(HtmlComponentUtil.HTML_TABLE_COLSPAN, "" + COLUMN); //$NON-NLS-1$
tr.appendChild(td);
if (isHeader) {
@@ -549,10 +549,10 @@
.createElement(HtmlComponentUtil.HTML_TAG_TR);
nsIDOMElement td = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_TD);
- td.setAttribute(HtmlComponentUtil.HTML_TABLE_COLSPAN, "" + COLUMN);
+ td.setAttribute(HtmlComponentUtil.HTML_TABLE_COLSPAN, "" + COLUMN); //$NON-NLS-1$
String[] array;
- if ("false".equalsIgnoreCase(popup)) {
+ if ("false".equalsIgnoreCase(popup)) { //$NON-NLS-1$
array = HEADER_CONTENT;
} else {
array = HEADER_CONTENT_ON_POPUP;
@@ -573,9 +573,9 @@
nsIDOMElement table = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_TABLE);
- table.setAttribute(HtmlComponentUtil.HTML_CELLPADDING_ATTR, "0");
- table.setAttribute(HtmlComponentUtil.HTML_CELLSPACING_ATTR, "0");
- table.setAttribute(HtmlComponentUtil.HTML_BORDER_ATTR, "0");
+ table.setAttribute(HtmlComponentUtil.HTML_CELLPADDING_ATTR, "0"); //$NON-NLS-1$
+ table.setAttribute(HtmlComponentUtil.HTML_CELLSPACING_ATTR, "0"); //$NON-NLS-1$
+ table.setAttribute(HtmlComponentUtil.HTML_BORDER_ATTR, "0"); //$NON-NLS-1$
table.setAttribute(HtmlComponentUtil.HTML_ATR_WIDTH, FILL_WIDTH);
nsIDOMElement tbody = visualDocument
@@ -594,8 +594,8 @@
// close tool
if (i == 5) {
- td1.setAttribute(VPE_USER_TOGGLE_ID_ATTR, "0");
- td1.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, "cursor: pointer;");
+ td1.setAttribute(VPE_USER_TOGGLE_ID_ATTR, "0"); //$NON-NLS-1$
+ td1.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, "cursor: pointer;"); //$NON-NLS-1$
}
nsIDOMText text1 = visualDocument.createTextNode(array[i]);
@@ -622,12 +622,12 @@
.createElement(HtmlComponentUtil.HTML_TAG_TR);
nsIDOMElement td = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_TD);
- td.setAttribute(HtmlComponentUtil.HTML_TABLE_COLSPAN, "" + COLUMN);
+ td.setAttribute(HtmlComponentUtil.HTML_TABLE_COLSPAN, "" + COLUMN); //$NON-NLS-1$
nsIDOMElement table = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_TABLE);
- table.setAttribute(HtmlComponentUtil.HTML_CELLSPACING_ATTR, "0");
- table.setAttribute(HtmlComponentUtil.HTML_CELLPADDING_ATTR, "0");
- table.setAttribute(HtmlComponentUtil.HTML_BORDER_ATTR, "0");
+ table.setAttribute(HtmlComponentUtil.HTML_CELLSPACING_ATTR, "0"); //$NON-NLS-1$
+ table.setAttribute(HtmlComponentUtil.HTML_CELLPADDING_ATTR, "0"); //$NON-NLS-1$
+ table.setAttribute(HtmlComponentUtil.HTML_BORDER_ATTR, "0"); //$NON-NLS-1$
table.setAttribute(HtmlComponentUtil.HTML_ATR_WIDTH, FILL_WIDTH);
nsIDOMElement tr1 = visualDocument
@@ -640,7 +640,7 @@
td1.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
CSS_R_C_TOOLFOOTER);
- SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy");
+ SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy"); //$NON-NLS-1$
Calendar cal = getCalendarWithLocale();
nsIDOMText text1 = visualDocument.createTextNode(sdf.format(cal
@@ -662,14 +662,14 @@
HtmlComponentUtil.HTML_ALIGN_RIGHT_VALUE);
String nodeText;
- if ("false".equalsIgnoreCase(showApplyButton)) {
- if ("hidden".equalsIgnoreCase(todayControlMode)) {
- nodeText = "";
+ if ("false".equalsIgnoreCase(showApplyButton)) { //$NON-NLS-1$
+ if ("hidden".equalsIgnoreCase(todayControlMode)) { //$NON-NLS-1$
+ nodeText = ""; //$NON-NLS-1$
} else {
nodeText = TODAY;
}
} else {
- if ("hidden".equalsIgnoreCase(todayControlMode)) {
+ if ("hidden".equalsIgnoreCase(todayControlMode)) { //$NON-NLS-1$
nodeText = APPLY;
} else {
nodeText = TODAY + VERTICAL_SEPARATOR + APPLY;
@@ -702,16 +702,14 @@
Calendar cal1 = getCalendarWithLocale();
- SimpleDateFormat wdf = new SimpleDateFormat("EE");
-
cal1.set(Calendar.WEEK_OF_MONTH, Calendar.SATURDAY);
// Create week days row
- if (!"false".equalsIgnoreCase(showWeekDaysBar)) {
+ if (!"false".equalsIgnoreCase(showWeekDaysBar)) { //$NON-NLS-1$
for (int i = 0; i < COLUMN; i++) {
nsIDOMElement td = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_TD);
- if ((i == 0) && (!"false".equalsIgnoreCase(showWeeksBar))) {
+ if ((i == 0) && (!"false".equalsIgnoreCase(showWeeksBar))) { //$NON-NLS-1$
td.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
WEEK_DAY_HTML_CLASS_ATTR);
nsIDOMElement br = visualDocument
@@ -726,7 +724,7 @@
td.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
WEEK_DAY_HTML_CLASS_ATTR);
}
- nsIDOMText text = visualDocument.createTextNode(i == 0 ? ""
+ nsIDOMText text = visualDocument.createTextNode(i == 0 ? "" //$NON-NLS-1$
: weeks[i - 1]);
td.appendChild(text);
bodyTR.appendChild(td);
@@ -754,13 +752,13 @@
nsIDOMElement tr = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_TR);
- if (!"false".equalsIgnoreCase(showWeeksBar)) {
+ if (!"false".equalsIgnoreCase(showWeeksBar)) { //$NON-NLS-1$
// Week in year
nsIDOMElement weekTD = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_TD);
weekTD.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
CSS_R_C_WEEK);
- nsIDOMText weekText = visualDocument.createTextNode(""
+ nsIDOMText weekText = visualDocument.createTextNode("" //$NON-NLS-1$
+ cal.get(Calendar.WEEK_OF_YEAR));
weekTD.appendChild(weekText);
tr.appendChild(weekTD);
@@ -773,7 +771,7 @@
nsIDOMElement td = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_TD);
- String currentAttr = "";
+ String currentAttr = ""; //$NON-NLS-1$
int dayOfWeek = cal.get(Calendar.DAY_OF_WEEK);
@@ -808,18 +806,18 @@
td.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, currentAttr);
if (attrPresents(cellWidth) && attrPresents(cellHeight)) {
td.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR,
- HtmlComponentUtil.HTML_ATR_WIDTH + ":" + cellWidth
- + "px;" + HtmlComponentUtil.HTML_ATR_HEIGHT
- + ":" + cellHeight + "px;");
+ HtmlComponentUtil.HTML_ATR_WIDTH + ":" + cellWidth //$NON-NLS-1$
+ + "px;" + HtmlComponentUtil.HTML_ATR_HEIGHT //$NON-NLS-1$
+ + ":" + cellHeight + "px;"); //$NON-NLS-1$ //$NON-NLS-2$
} else if (attrPresents(cellWidth)) {
td.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR,
- HtmlComponentUtil.HTML_ATR_WIDTH +":" + cellWidth + "px;");
+ HtmlComponentUtil.HTML_ATR_WIDTH +":" + cellWidth + "px;"); //$NON-NLS-1$ //$NON-NLS-2$
} else if (attrPresents(cellHeight)) {
td.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR,
- HtmlComponentUtil.HTML_ATR_HEIGHT+":" + cellHeight + "px;");
+ HtmlComponentUtil.HTML_ATR_HEIGHT+":" + cellHeight + "px;"); //$NON-NLS-1$ //$NON-NLS-2$
}
- nsIDOMText text = visualDocument.createTextNode(""
+ nsIDOMText text = visualDocument.createTextNode("" //$NON-NLS-1$
+ cal.get(Calendar.DAY_OF_MONTH));
td.appendChild(text);
tr.appendChild(td);
@@ -843,7 +841,7 @@
visualNode, data, name, value);
if (name.equalsIgnoreCase(HtmlComponentUtil.HTML_VALUE_ATTR)) {
String popup = sourceElement.getAttribute(POPUP);
- if (popup != null && popup.equalsIgnoreCase("false"))
+ if (popup != null && popup.equalsIgnoreCase("false")) //$NON-NLS-1$
return;
nsIDOMElement element = (nsIDOMElement) visualNode
.queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
@@ -867,7 +865,7 @@
visualNode, data, name);
if (name.equalsIgnoreCase(HtmlComponentUtil.HTML_VALUE_ATTR)) {
String popup = sourceElement.getAttribute(POPUP);
- if (popup != null && popup.equalsIgnoreCase("false"))
+ if (popup != null && popup.equalsIgnoreCase("false")) //$NON-NLS-1$
return;
nsIDOMElement element = (nsIDOMElement) visualNode
.queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
@@ -917,7 +915,7 @@
* @return true, if successful
*/
private boolean attrPresents(String attr) {
- return ((null != attr) && (!"".equals(attr)));
+ return ((null != attr) && (!"".equals(attr))); //$NON-NLS-1$
}
/**
@@ -931,8 +929,8 @@
cal.add(Calendar.DAY_OF_MONTH, 1);
}
- SimpleDateFormat sdf = new SimpleDateFormat("EE");
- String dayOfWeek = "";
+ SimpleDateFormat sdf = new SimpleDateFormat("EE"); //$NON-NLS-1$
+ String dayOfWeek = ""; //$NON-NLS-1$
for (int i = 0; i < NUM_DAYS_IN_WEEK; i++) {
dayOfWeek = sdf.format(cal.getTime());
weeks[i] = dayOfWeek;
@@ -964,7 +962,7 @@
return Locale.getDefault();
}
// Lookup index of first '_' in string locale representation.
- int index1 = localeStr.indexOf("_");
+ int index1 = localeStr.indexOf("_"); //$NON-NLS-1$
// Get first charters (if exist) from string
String language = null;
if (index1 != -1) {
@@ -973,7 +971,7 @@
return new Locale(localeStr);
}
// Lookup index of second '_' in string locale representation.
- int index2 = localeStr.indexOf("_", index1 + 1);
+ int index2 = localeStr.indexOf("_", index1 + 1); //$NON-NLS-1$
String country = null;
if (index2 != -1) {
country = localeStr.substring(index1 + 1, index2);
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/util/RichFaces.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/util/RichFaces.java 2008-10-01 12:20:59 UTC (rev 10587)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/util/RichFaces.java 2008-10-01 12:38:24 UTC (rev 10588)
@@ -66,13 +66,13 @@
public static final String ATTR_SHOW_BUTTON_LABELS = "showButtonLabels"; //$NON-NLS-1$
/** The Constant ATTR_DEFAULT_LABEL. */
- public static final String ATTR_DEFAULT_LABEL = "defaultLabel";
+ public static final String ATTR_DEFAULT_LABEL = "defaultLabel"; //$NON-NLS-1$
/** The Constant ATTR_ADD_CONTROL_LABEL. */
- public static final String ATTR_ADD_CONTROL_LABEL = "addControlLabel";
+ public static final String ATTR_ADD_CONTROL_LABEL = "addControlLabel"; //$NON-NLS-1$
/** The Constant ATTR_STYLE_CLASS. */
- public static final String ATTR_STYLE_CLASS = "styleClass";
+ public static final String ATTR_STYLE_CLASS = "styleClass"; //$NON-NLS-1$
public static final String ATTR_SELECT_ITEM_LABEL = "itemLabel"; //$NON-NLS-1$
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/ajaxValidator.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/ajaxValidator.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/ajaxValidator.xhtml 2008-10-01 12:38:24 UTC (rev 10588)
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich">
+
+<head>
+</head>
+<body>
+<h1>ajaxValidator</h1>
+
+<h:form>
+
+ <h:panelGrid columns="2">
+ <h:inputText value="#{bean.avString}" id="input" required="true">
+ <f:validateLength minimum="3" maximum="12" />
+ <rich:ajaxValidator event="onblur" id="ajaxValidator" />
+ </h:inputText>
+ <rich:message for="input" />
+ </h:panelGrid>
+</h:form>
+
+</body>
+</html>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/beanValidator.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/beanValidator.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/beanValidator.xhtml 2008-10-01 12:38:24 UTC (rev 10588)
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich">
+
+<head>
+</head>
+<body>
+<h1>beanValidator</h1>
+<h:form>
+ <h:inputText value="#{bean.bvString}" id="input">
+ <rich:beanValidator id="beanValidator"/>
+ </h:inputText>
+ <rich:message for="input"/>
+ <a4j:commandButton value="Store changes" />
+</h:form>
+</body>
+</html>
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/calendar.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/calendar.xhtml 2008-10-01 12:20:59 UTC (rev 10587)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/calendar.xhtml 2008-10-01 12:38:24 UTC (rev 10588)
@@ -9,7 +9,9 @@
<head>
</head>
<body>
- <!-- Calendar -->
- <rich:calendar />
+<h1>calendar</h1>
+<rich:calendar direction="bottom-right" id="calendar1"></rich:calendar>
+
+<rich:calendar direction="bottom-right" popup="false" id="calendar2"></rich:calendar>
</body>
</html>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/calendar.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/calendar.xhtml.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/calendar.xhtml.xml 2008-10-01 12:38:24 UTC (rev 10588)
@@ -0,0 +1,30 @@
+<tests>
+ <test id="calendar1">
+ <TABLE>
+ <TR>
+ <TD>
+ <DIV>
+ <DIV STYLE="overflow: hidden; width: 220px;">
+ <TABLE STYLE="width: 100%;">
+ <TR>
+ <TD>
+ <INPUT TYPE="text" CLASS="rich-calendar-input" STYLE="width: 180px;" />
+ </TD>
+ <TD>
+ <IMG CLASS="rich-calendar-button" VPE-USER-TOGGLE-ID="false" />
+ </TD>
+ </TR>
+ <TR>
+ <TD>
+ </TD>
+ </TR>
+ </TABLE>
+ </DIV>
+ </DIV>
+ </TD>
+ </TR>
+ <BR VPE:PSEUDO-ELEMENT="yes"
+ STYLE="font-style: italic; color: green; -moz-user-modify: read-only;" />
+ </TABLE>
+ </test>
+</tests>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/comboBox.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/comboBox.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/comboBox.xhtml 2008-10-01 12:38:24 UTC (rev 10588)
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich">
+
+<head>
+</head>
+<body>
+<h1>comboBox</h1>
+<rich:comboBox value="#{bean.cbString}" defaultLabel="Select Any Value"
+ style="width:250px" id="comboBox">
+ <f:selectItem itemValue="suggestion 1" />
+ <f:selectItem itemValue="suggestion 2" />
+ <f:selectItem itemValue="suggestion 3" />
+ <f:selectItem itemValue="suggestion 4" />
+ <f:selectItem itemValue="suggestion 5" />
+</rich:comboBox>
+</body>
+</html>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/comboBox.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/comboBox.xhtml.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/comboBox.xhtml.xml 2008-10-01 12:38:24 UTC (rev 10588)
@@ -0,0 +1,22 @@
+<tests>
+ <test id="comboBox">
+ <DIV STYLE="width: 150px;">
+ <DIV ALIGN="left" CLASS="rich-combobox-font rich-combobox"
+ STYLE="position: static; z-index: 0; width: 250px;">
+ <DIV CLASS="rich-combobox-font rich-combobox-shell" STYLE="width: 150px; z-index: 1;">
+ <INPUT TYPE="text"
+ CLASS="rich-combobox-font-disabled rich-combobox-input-inactive"
+ AUTOCOMPLETE="off" STYLE="width: 133px;" VALUE="Select Any Value" />
+ <INPUT TYPE="text"
+ CLASS="rich-combobox-font-inactive rich-combobox-button-background rich-combobox-button-inactive"
+ READONLY="true" VPE-USER-TOGGLE-ID="0" />
+ <INPUT TYPE="text"
+ CLASS="rich-combobox-font-inactive rich-combobox-button-icon-inactive rich-combobox-button-inactive"
+ READONLY="true" VPE-USER-TOGGLE-ID="0" />
+ <DIV CLASS="rich-combobox-strut rich-combobox-font" STYLE="width: 140px;">
+ Struts</DIV>
+ </DIV>
+ </DIV>
+ </DIV>
+ </test>
+</tests>
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/componentControl.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/componentControl.xhtml 2008-10-01 12:20:59 UTC (rev 10587)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/componentControl.xhtml 2008-10-01 12:38:24 UTC (rev 10588)
@@ -10,6 +10,6 @@
</head>
<body>
<h:inputText value="#{user}" id="inputText"/>
- <rich:componentControl for="inputText" attachTo="link" operation="show" event="onclick"/>
+ <rich:componentControl for="inputText" attachTo="link" operation="show" event="onclick" id="componentControl"/>
</body>
</html>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/graphValidator.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/graphValidator.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/graphValidator.xhtml 2008-10-01 12:38:24 UTC (rev 10588)
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich">
+
+<head>
+</head>
+<body>
+<h1>graphValidator</h1>
+<h:form>
+
+ <rich:graphValidator id="graphValidator">
+
+ <h:inputText value="#{bean.gvString}" id="input">
+ </h:inputText>
+ <rich:message for="input" />
+ <h:inputText value="#{bean.gvString2}" id="input2">
+ </h:inputText>
+ <rich:message for="input2" />
+
+ </rich:graphValidator>
+ <a4j:commandButton value="Store changes" />
+</h:form>
+</body>
+</html>
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesAllTests.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesAllTests.java 2008-10-01 12:20:59 UTC (rev 10587)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesAllTests.java 2008-10-01 12:38:24 UTC (rev 10588)
@@ -38,40 +38,43 @@
public class RichFacesAllTests {
- public static Test suite() {
- TestSuite suite = new TestSuite("Tests for Vpe RichFaces components"); // $NON-NLS-1$
- // $JUnit-BEGIN$
+ public static final String IMPORT_PROJECT_NAME = "richFacesTest"; //$NON-NLS-1$
- suite.addTestSuite(RichFacesComponentTest.class);
- suite.addTestSuite(JBIDE1579Test.class);
- suite.addTestSuite(Jbide1580Test.class);
- suite.addTestSuite(JBIDE1613Test.class);
- suite.addTestSuite(Jbide1614Test.class);
- suite.addTestSuite(Jbide1639Test.class);
- suite.addTestSuite(Jbide1682Test.class);
- suite.addTestSuite(Jbide1548Test.class);
- suite.addTestSuite(JBIDE1713Test.class);
- suite.addTestSuite(RichFacesComboBoxTemplateTestCase.class);
- suite.addTestSuite(RichFacesInplaceInputTemplateTestCase.class);
- suite.addTestSuite(RichFacesInplaceSelectTemplateTestCase.class);
- suite.addTestSuite(RichFacesProgressBarTemplateTestCase.class);
- suite.addTestSuite(RichFacesFileUploadTemplateTestCase.class);
- suite.addTestSuite(RichFacesColumnsTemplateTestCase.class);
- suite.addTestSuite(RichFacesPickListTemplateTestCase.class);
- suite.addTestSuite(JBIDE1605Test.class);
- suite.addTestSuite(JBIDE1606Test.class);
- // $JUnit-END$
+ public static Test suite() {
+ TestSuite suite = new TestSuite("Tests for Vpe RichFaces components"); // $NON
+ // $JUnit-BEGIN$
- List<ImportBean> projectToImport = new ArrayList<ImportBean>();
- ImportBean importBean = new ImportBean();
- importBean
- .setImportProjectName(RichFacesComponentTest.IMPORT_PROJECT_NAME);
- importBean.setImportProjectPath(RichFacesTestPlugin
- .getPluginResourcePath());
- projectToImport.add(importBean);
+ suite.addTestSuite(RichFacesComponentTest.class);
+ suite.addTestSuite(JBIDE1579Test.class);
+ suite.addTestSuite(Jbide1580Test.class);
+ suite.addTestSuite(JBIDE1613Test.class);
+ suite.addTestSuite(Jbide1614Test.class);
+ suite.addTestSuite(Jbide1639Test.class);
+ suite.addTestSuite(Jbide1682Test.class);
+ suite.addTestSuite(Jbide1548Test.class);
+ suite.addTestSuite(JBIDE1713Test.class);
+ suite.addTestSuite(RichFacesComboBoxTemplateTestCase.class);
+ suite.addTestSuite(RichFacesInplaceInputTemplateTestCase.class);
+ suite.addTestSuite(RichFacesInplaceSelectTemplateTestCase.class);
+ suite.addTestSuite(RichFacesProgressBarTemplateTestCase.class);
+ suite.addTestSuite(RichFacesFileUploadTemplateTestCase.class);
+ suite.addTestSuite(RichFacesColumnsTemplateTestCase.class);
+ suite.addTestSuite(RichFacesPickListTemplateTestCase.class);
+ suite.addTestSuite(JBIDE1605Test.class);
+ suite.addTestSuite(JBIDE1606Test.class);
+ suite.addTestSuite(RichFacesComponentContentTest.class);
- return new VpeTestSetup(suite, projectToImport);
+ // $JUnit-END$
- }
+ List<ImportBean> projectToImport = new ArrayList<ImportBean>();
+ ImportBean importBean = new ImportBean();
+ importBean.setImportProjectName(RichFacesAllTests.IMPORT_PROJECT_NAME);
+ importBean.setImportProjectPath(RichFacesTestPlugin
+ .getPluginResourcePath());
+ projectToImport.add(importBean);
+ return new VpeTestSetup(suite, projectToImport);
+
+ }
+
}
Added: 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 (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentContentTest.java 2008-10-01 12:38:24 UTC (rev 10588)
@@ -0,0 +1,324 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jsf.vpe.richfaces.test;
+
+import org.jboss.tools.vpe.ui.test.ComponentContentTest;
+
+/**
+ * Class for testing all richfaces components
+ *
+ * @author sdzmitrovich
+ *
+ */
+public class RichFacesComponentContentTest extends ComponentContentTest {
+
+ public RichFacesComponentContentTest(String name) {
+ super(name);
+ setCheckWarning(false);
+ }
+
+ public void testAjaxValidator() throws Throwable {
+ performInvisibleTagTest(
+ "components/ajaxValidator.xhtml", "ajaxValidator");//$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ public void testGraphValidator() throws Throwable {
+ performInvisibleWrapperTagTest(
+ "components/graphValidator.xhtml", "graphValidator");//$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ public void testBeanValidator() throws Throwable {
+ performInvisibleTagTest(
+ "components/beanValidator.xhtml", "beanValidator");//$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ public void testCalendar() throws Throwable {
+ performContentTest("components/calendar.xhtml");//$NON-NLS-1$
+ }
+
+ public void testComboBox() throws Throwable {
+ performContentTest("components/comboBox.xhtml");//$NON-NLS-1$
+ }
+
+ public void testComponentControl() throws Throwable {
+ performInvisibleTagTest(
+ "components/componentControl.xhtml", "componentControl");//$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ public void testContextMenu() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ }
+
+ public void testDataFilterSlider() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ }
+
+ public void testDatascroller() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ }
+
+ public void testColumns() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ }
+
+ public void testColumnGroup() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ }
+
+ public void testColumn() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ }
+
+ public void testDataGrid() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ }
+
+ public void testDataList() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ }
+
+ public void testDataOrderedList() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ }
+
+ public void testDataDefinitionList() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ }
+
+ public void testDataTable() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ }
+
+ public void testSubTable() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ }
+
+ public void testDndParam() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ }
+
+ public void testDragIndicator() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ }
+
+ public void testDragSupport() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ }
+
+ public void testDropSupport() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ }
+
+ public void testDragListener() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ }
+
+ public void testDropListener() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ }
+
+ public void testDropDownMenu() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ }
+
+ public void testExtendedDataTable() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ }
+
+ public void testMenuGroup() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ }
+
+ public void testMenuItem() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ }
+
+ public void testMenuSeparator() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ }
+
+ public void testEffect() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ }
+
+ public void testFileUpload() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ }
+
+ public void testGmap() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ }
+
+ public void testVirtualEarth() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ }
+
+ public void testHotKey() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ }
+
+ public void testInplaceInput() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ }
+
+ public void testInplaceSelect() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ }
+
+ public void testInputNumberSlider() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ }
+
+ public void testInputNumberSpinner() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ }
+
+ public void testInsert() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ }
+
+ public void testJQuery() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ }
+
+ public void testListShuttle() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ }
+
+ public void testMessage() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ }
+
+ public void testMessages() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ }
+
+ public void testModalPanel() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ }
+
+ public void testOrderingList() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ }
+
+ public void testPaint2D() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ }
+
+ public void testPanel() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ }
+
+ public void testPanelBar() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ }
+
+ public void testPanelBarItem() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ }
+
+ public void testPanelMenu() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ }
+
+ public void testPanelMenuGroup() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ }
+
+ public void testPanelMenuItem() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ }
+
+ public void testPickList() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ }
+
+ public void testProgressBar() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ }
+
+ public void testScrollableDataTable() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ }
+
+ public void testSeparator() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ }
+
+ public void testSimpleTogglePanel() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ }
+
+ public void testSpacer() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ }
+
+ public void testSuggestionbox() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ }
+
+ public void testTabPanel() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ }
+
+ public void testTab() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ }
+
+ public void testTogglePanel() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ }
+
+ public void testToggleControl() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ }
+
+ public void testToolBar() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ }
+
+ public void testToolBarGroup() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ }
+
+ public void testToolTip() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ }
+
+ public void testTree() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ }
+
+ public void testTreeNode() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ }
+
+ public void testChangeExpandListener() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ }
+
+ public void testNodeSelectListener() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ }
+
+ public void testRecursiveTreeNodesAdaptor() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ }
+
+ public void testTreeNodesAdaptor() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ }
+
+ protected String getTestProjectName() {
+ return RichFacesAllTests.IMPORT_PROJECT_NAME;
+ }
+
+}
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentTest.java 2008-10-01 12:20:59 UTC (rev 10587)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentTest.java 2008-10-01 12:38:24 UTC (rev 10588)
@@ -34,186 +34,186 @@
public void testAllComponentsOnSinglePage() throws PartInitException,
Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/richFacesTest.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/richFacesTest.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testCalendar() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/calendar.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/calendar.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testDataDefinitionList() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/dataDefinitionList.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/dataDefinitionList.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testDataFilterSlider() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/dataFilterSlider.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/dataFilterSlider.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testDataGrid() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/dataGrid.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/dataGrid.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testDataList() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/dataList.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/dataList.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testDataOrderedList() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/dataOrderedList.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/dataOrderedList.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testDataScroller() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/dataScroller.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/dataScroller.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testDataTable() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/dataTable.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/dataTable.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testDragAndDrop() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/dragAndDrop.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/dragAndDrop.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testDropDawnMenu() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/dropDawnMenu.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/dropDawnMenu.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testEffect() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/effect.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/effect.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testGoogleMap() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/googleMap.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/googleMap.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testInputNumberSlider() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/inputNumberSlider.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/inputNumberSlider.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testInputNumberSpinner() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/inputNumberSpinner.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/inputNumberSpinner.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testInsert() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/insert.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/insert.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testMessage() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/message.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/message.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testMessages() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/messages.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/messages.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testModalPanel() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/modalPanel.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/modalPanel.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testOrderingList() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/orderingList.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/orderingList.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testPaint2D() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/paint2D.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/paint2D.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testPanel() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/panel.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/panel.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testPanelBar() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/panelBar.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/panelBar.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testPanelMenu() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/panelMenu.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/panelMenu.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testScrollableDataTable() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/scrollableDataTable.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/scrollableDataTable.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testSeparator() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/separator.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/separator.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testSimpleTogglePanel() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/simpleTogglePanel.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/simpleTogglePanel.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testSpacer() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/spacer.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/spacer.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testSuggestionBox() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/suggestionbox.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/suggestionbox.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testTabPanel() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/tabPanel.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/tabPanel.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testTogglePanel() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/togglePanel.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/togglePanel.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testToolBar() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/toolBar.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/toolBar.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testTree() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/tree.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/tree.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testVirtualEarth() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/virtualEarth.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/virtualEarth.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testComponentControl() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/componentControl.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/componentControl.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testContextMenu() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/contextMenu.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/contextMenu.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testListShuttle() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/listShuttle.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/listShuttle.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
}
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/ComponentContentTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/ComponentContentTest.java 2008-10-01 12:20:59 UTC (rev 10587)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/ComponentContentTest.java 2008-10-01 12:38:24 UTC (rev 10588)
@@ -22,8 +22,11 @@
import org.jboss.tools.vpe.editor.VpeController;
import org.jboss.tools.vpe.editor.mapping.VpeNodeMapping;
import org.mozilla.interfaces.nsIDOMElement;
+import org.mozilla.interfaces.nsIDOMNode;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
/**
* @author Sergey Dzmitrovich
@@ -127,9 +130,12 @@
}
/**
+ * test for invisible tags
*
* @param elementPagePath
* - path to test page
+ * @param elementId
+ * - id of element on page
* @throws Throwable
*/
protected void performInvisibleTagTest(String elementPagePath,
@@ -191,7 +197,81 @@
}
/**
+ * test for invisible tags which can have visible children
*
+ * @param elementPagePath
+ * - path to test page
+ * @param elementId
+ * - id of element on page
+ * @throws Throwable
+ */
+ protected void performInvisibleWrapperTagTest(String elementPagePath,
+ String elementId) throws Throwable {
+ setException(null);
+
+ IFile elementPageFile = (IFile) TestUtil.getComponentPath(
+ elementPagePath, getTestProjectName());
+
+ IEditorInput input = new FileEditorInput(elementPageFile);
+
+ TestUtil.waitForJobs();
+
+ IEditorPart editor = PlatformUI.getWorkbench()
+ .getActiveWorkbenchWindow().getActivePage().openEditor(input,
+ EDITOR_ID, true);
+
+ assertNotNull(editor);
+
+ TestUtil.waitForJobs();
+
+ VpeController controller = getVpeController((JSPMultiPageEditor) editor);
+
+ // find source element and check if it is not null
+ Element sourceELement = findSourceElementById(controller, elementId);
+ assertNotNull(sourceELement);
+
+ // find visual element and check if it is null
+ nsIDOMElement visualElement = findElementById(controller, elementId);
+ assertNull(visualElement);
+
+ // check children of non-visual
+ NodeList children = sourceELement.getChildNodes();
+ for (int i = 0; i < children.getLength(); i++) {
+ Node child = children.item(i);
+ assertNotNull(findNode(controller, child));
+ }
+
+ // set show invisible tag's flag to true
+ controller.getVisualBuilder().setShowInvisibleTags(true);
+ controller.visualRefresh();
+
+ TestUtil.waitForIdle();
+
+ // find visual element and check if it is not null
+ visualElement = findElementById(controller, elementId);
+ assertNotNull(visualElement);
+
+ // generate text for invisible tag
+ String modelInvisibleTagText = generateInvisibleTagText(sourceELement
+ .getNodeName());
+
+ // generate dom document and get root element
+ Element modelElement = TestDomUtil.getDocument(modelInvisibleTagText)
+ .getDocumentElement();
+ assertNotNull(modelElement);
+
+ // compare elements
+ assertEquals(true, TestDomUtil
+ .compareNodes(visualElement, modelElement));
+
+ if (getException() != null) {
+ throw getException();
+ }
+
+ }
+
+ /**
+ *
* @param tagName
* @return
*/
@@ -222,6 +302,24 @@
}
/**
+ * find visual element by "id" entered in source part of vpe
+ *
+ * @param controller
+ * @param elementId
+ * @return
+ */
+ protected nsIDOMNode findNode(VpeController controller, Node node) {
+
+ VpeNodeMapping nodeMapping = controller.getDomMapping().getNodeMapping(
+ node);
+
+ if (nodeMapping == null)
+ return null;
+
+ return nodeMapping.getVisualNode();
+ }
+
+ /**
* find source element by "id"
*
* @param controller
17 years, 3 months
JBoss Tools SVN: r10587 - trunk/esb/docs/esb_ref_guide/en.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2008-10-01 08:20:59 -0400 (Wed, 01 Oct 2008)
New Revision: 10587
Modified:
trunk/esb/docs/esb_ref_guide/en/master.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-359
ESB guide was mistakenly merged with Bird, now the changes are fixed, the guide is corrected
Modified: trunk/esb/docs/esb_ref_guide/en/master.xml
===================================================================
--- trunk/esb/docs/esb_ref_guide/en/master.xml 2008-10-01 12:10:07 UTC (rev 10586)
+++ trunk/esb/docs/esb_ref_guide/en/master.xml 2008-10-01 12:20:59 UTC (rev 10587)
@@ -4,26 +4,37 @@
[
<!ENTITY introduction SYSTEM "modules/introduction.xml">
-<!ENTITY birt_support SYSTEM "modules/birt_support.xml">
-<!ENTITY birt_designer SYSTEM "modules/birt_designer.xml">
+<!ENTITY esb_support SYSTEM "modules/esb_support.xml">
+<!ENTITY esb_editor SYSTEM "modules/esb_editor.xml">
-
+<!ENTITY seamlink "../../seam/html_single/index.html">
+<!ENTITY aslink "../../as/html_single/index.html">
+<!ENTITY esblink "../../esb_ref_guide/html_single/index.html">
+<!ENTITY gsglink "../../GettingStartedGuide/html_single/index.html">
+<!ENTITY hibernatelink "../../hibernatetools/html_single/index.html">
+<!ENTITY jbpmlink "../../jbpm/html_single/index.html">
+<!ENTITY jsflink "../../jsf/html_single/index.html">
+<!ENTITY jsfreflink "../../jsf_tools_ref_guide/html_single/index.html">
+<!ENTITY jsftutoriallink "../../jsf_tools_tutorial/html_single/index.html">
+<!ENTITY strutsreflink "../../struts_tools_ref_guide/html_single/index.html">
+<!ENTITY strutstutoriallink "../../struts_tools_tutorial/html_single/index.html">
]>
<book>
<bookinfo>
- <title>Birt Plugin Reference Guide</title>
+ <title>ESB Tools Reference Guide</title>
- <author><firstname>Anastasiya</firstname><surname>Bogachuk</surname><email>abogachuk(a)exadel.com</email></author>
-
+ <author><firstname>Svetlana</firstname><surname>Mukhina</surname><email>smukhina(a)exadel.com</email></author>
+ <author><firstname>Tatyana</firstname><surname>Romanovich</surname></author>
- <pubdate>August 2008</pubdate>
+ <pubdate>April 2008</pubdate>
<copyright>
- <year>2008</year>
+ <year>2007</year>
+ <year>2008</year>
<holder>JBoss, a division of Red Hat Inc.</holder>
</copyright>
<releaseinfo>
- Version: 1.0.0.alpha
+ Version: 3.0.0.alpha
</releaseinfo>
<abstract>
@@ -37,8 +48,7 @@
<toc/>
&introduction;
- &birt_support;
- &birt_designer;
-
+ &esb_support;
+ &esb_editor;
</book>
\ No newline at end of file
17 years, 3 months
JBoss Tools SVN: r10586 - trunk/esb/docs/esb_ref_guide/en/modules.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2008-10-01 08:10:07 -0400 (Wed, 01 Oct 2008)
New Revision: 10586
Removed:
trunk/esb/docs/esb_ref_guide/en/modules/birt_designer.xml
trunk/esb/docs/esb_ref_guide/en/modules/birt_support.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-359
ESB guide was mistakenly merged with Bird, now the changes are fixed, the guide is corrected
Deleted: trunk/esb/docs/esb_ref_guide/en/modules/birt_designer.xml
===================================================================
--- trunk/esb/docs/esb_ref_guide/en/modules/birt_designer.xml 2008-10-01 11:33:56 UTC (rev 10585)
+++ trunk/esb/docs/esb_ref_guide/en/modules/birt_designer.xml 2008-10-01 12:10:07 UTC (rev 10586)
@@ -1,213 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<chapter id="birt_designer" xreflabel="birt_designer">
- <?dbhtml filename="birtDesigner.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss BIRT</keyword>
- <keyword>BIRT</keyword>
- <keyword>BIRT Designer</keyword>
-
- </keywordset>
- </chapterinfo>
-
- <title>BIRT Designer</title>
-
- <para>text here</para>
-
- <section id="esb_file">
-
- <title>ESB File Editor</title>
- <para><property>ESB File Editor</property> is a powerful and customizable tool. ESB File Editor allows developing an
- application using ESB technology.</para>
-
- <para>ESB file editor has two tabs: Tree and Source.</para>
-
- <para>You can switch to Tree. The Tree view for the editor displays all ESB artifacts in a tree format.
- By selecting any node you can see and edit its properties which will appear in the right-hand area. For example, a Provider:</para>
- <figure>
- <title>Tree View</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/esb_editor/01_esb_tree_view.png" scale="90"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>You can easily switch from Tree to Source by selecting the Source tab at the bottom of the editor and work in <link linkend="sourceView">Source view</link>.</para>
-
- <figure id="sourceView">
- <title>Source View</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/esb_editor/02_esb_source_view.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>The Source view for the editor displays a text content of the ESB file. It is always synchronized with tree view,
- so any changes made in one of the views will immediately appear in the other.</para>
- <para>No matter what view you select, you get full integration with <!--Properties and -->Outline view<!-- views -->.
- For example, you can work in the Source view with the help of the Outline view. The Outline view shows a tree structure of the ESB file.
- Simply select any element in the Outline view and it will jump to the same place in the Source editor,
- so you can navigate through the source code with Outline view.</para>
- <figure>
- <title>Outline View</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/esb_editor/03_esb_outline_view.png" scale="70"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Adding, editing or deleting of some artifacts operations are available right in the <property>Tree</property> view. Right-click any node and select one of the available actions in the context menu.
- For example, you can easily add a new provider:</para>
- <para></para>
- <figure>
- <title>Adding new provider</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/esb_editor/04_esb_add_provider.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>You can easily add a new service too:</para>
- <figure>
- <title>Adding new service</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/esb_editor/05_esb_add_service.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The same way you can create a listener for service and other elements of ESB:</para>
- <figure>
- <title>Adding new listener for service</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/esb_editor/06_esb_add_listener.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>The same actions can be done in the right part of <property>Tree</property> view tab
- using <property>Add</property>, <property>Edit</property> and <property>Remove</property> buttons.</para>
- </section>
-
-
-
- <section id="esb_editors_features">
-
- <title>ESB Editors Features</title>
- <para>JBoss ESB tooling has powerful editor features that help you easily make use of content and code assist.</para>
-
- <section id="ESBsyntaxvalidation84">
-
- <title>ESB syntax validation</title>
- <para>When working in JBoss ESB editor you are constantly provided with feedback
- and contextual error checking as you type. In the Source viewer, if at any point a tag is incorrect or incomplete, an error will be indicated next to the line and also in the Problems view below.</para>
- </section>
-
- <section id="ESBSupportXMLSchema">
- <title>Support for XML Schema</title>
-
- <para>JBoss ESB Framework fully
- <link linkend="sourceView">supports XML files based on schemas as well as DTDs</link>.</para>
- </section>
-
- <!--<section id="OpenOnSelection">
-
- <title>OpenOn</title>
-
- <para><property>OpenOn</property> let's you easily navigate through your
- project without using the Package Explorer view (project tree). With OpenOn, you can
- simply click on a reference to another file and that file will be opened.</para>
-
- <para>OpenOn is available for the XML files </para>
-
- <para>Press and hold down the Ctrl key. As you move the mouse cursor over different
- file references in the file, they display an underline. When you have the mouse
- cursor over the name of the file you want to open, click and the file will open
- in its own editor. In this example the managed bean NameBean will open.</para>
-
- </section>
- -->
-
- <section id="ESBContentAssist">
-
- <title>Content Assist for ESB XML file</title>
-
- <para>When you work with any ESB XML file <property>Content Assist</property> is available to help you.
- It provides pop-up tip to help you complete your code statements.
- It allows you to write your code faster and with more accuracy.
- Content assist is always available in the Source mode. Simply type <emphasis>
- <property>Ctrl-Space</property></emphasis> to see what is available.</para>
-
- <para>Content Assist for ESB XML file:</para>
- <figure>
- <title>Content Assist for ESB XML file</title>
- <mediaobject>
- <imageobject>
- <imagedata
- fileref="images/esb_editor/08_esb_features.png" scale="80"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Content Assist for attributes:</para>
- <figure>
- <title>Content Assist for attributes:</title>
- <mediaobject>
- <imageobject>
- <imagedata
- fileref="images/esb_editor/09_esb_features.png" scale="80"/>
- </imageobject>
- </mediaobject>
- </figure>
- <!-- </section>
-
- <section id="ContentAssistWithinTreeEditor">
-
- <title>Content Assist within Tree ESB Editor</title>
-
- <para>JBoss Developer Studio also provides Content Assist when working within the Tree ESB editor.
- Just click <emphasis><property>Ctrl-Space</property>.</emphasis></para>
- <figure>
- <title>Content Assist in Tree ESB Editor</title>
- <mediaobject>
- <imageobject>
- <imagedata
- fileref="images/esb_file/09_editors_features.png" scale="85"/>
- </imageobject>
- </mediaobject>
- </figure>
- </section> -->
- </section>
-
- <section id="FullControlOverSourceFiles-SynchronizedSourcAndVisualEditing">
-
- <title>Synchronized Source and Visual Editing</title>
-
- <para>ESB file can be edited in either source
- or extra visual modes at the same time.</para>
-
- <para>JBoss Tools provide you two different editors to speed your development: a graphical view (<property>Tree</property>) and source
- (<property>Source</property>). At the same time, you always have full control over esb source file. Any changes you
- make in the source view will immediately appear in the tree view. Both views are synchronized, you can edit the file in any view.</para>
-
- <figure>
- <title>Two Views are Synchronized</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/esb_editor/10_esb_features.png" scale="70"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- </section>
-
- <para>The last chapter covers capabilities on how you can use ESB editor.</para>
-
- <para>In summary, this reference supplies you with all necessary information on the functionality
- that JBoss ESB Editor provides for work with JBoss ESB.</para>
- </section>
-</chapter>
Deleted: trunk/esb/docs/esb_ref_guide/en/modules/birt_support.xml
===================================================================
--- trunk/esb/docs/esb_ref_guide/en/modules/birt_support.xml 2008-10-01 11:33:56 UTC (rev 10585)
+++ trunk/esb/docs/esb_ref_guide/en/modules/birt_support.xml 2008-10-01 12:10:07 UTC (rev 10586)
@@ -1,90 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<chapter id="esb_support">
- <?dbhtml filename="esb_support.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Developer Studio</keyword>
- <keyword>Eclipse</keyword>
- <keyword>BIRT</keyword>
- <keyword>Java</keyword>
- <keyword>JBoss</keyword>
- </keywordset>
- </chapterinfo>
-
- <title>BIRT Support</title>
-
- <para>In this section we will focus more on all concepts that JBoss Tools integrates for
- working with BIRT.</para>
-
- <section>
- <title>BIRT Plugin Installation</title>
-
- <para>This chapter will provide you with detailed information on how to install BIRT plugin into JBoss Developer Studio.</para>
-
- <para>Since BIRT plugin is one of the modules of JBoss Tools project it has a dependence on other modules and will require their pre-installation. </para>
-
- <para>These are the prerequisites to create a web project including Seam and BIRT capabilities:</para>
- <itemizedlist>
- <listitem><para>Eclipse Version 3.4 SDK</para></listitem>
- <listitem><para>DTP Version 1.6 Release</para></listitem>
- <listitem><para>EMF Version 2.4 Release EMF+XSD</para></listitem>
- <listitem><para>GEF Version 3.4 Release runtime</para></listitem>
- <listitem><para>WTP Version 3.0 Release</para></listitem>
- <listitem><para>BIRT Report Designer SDK 2.3.0 Release or BIRT Report Designer 2.3.0 Release <ulink url="http://repository.jboss.org/eclipse/birt/2.3.0/birt-report-framework-2_3_...">download here</ulink></para></listitem>
- <listitem><para>JBoss Application Server 4.2.2 GA</para></listitem>
- <listitem><para>JBoss Seam 2.0.1 GA</para></listitem>
- <listitem><para>BIRT Web Tools Integration <ulink url="http://repository.jboss.org/eclipse/birt/2.3.0/birt-wtp-integration-sdk-2...">download here</ulink></para></listitem>
- <listitem><para>JBoss Tools nightly build</para></listitem>
-
- </itemizedlist>
-
-
-
- </section>
-
-<section>
-
- <title>JBoss BIRT Integration</title>
- <para>To understand Hibernate configuration, integration with Seam, and deployment see <ulink url="http://docs.jboss.org/tools/whatsnew/birt/birt-news-1.0.0.Alpha1.html">JBoss BIRT Integration 1.0.0.alpha1 - New and Noteworthy</ulink>.</para>
-
-</section>
-
- <section>
- <title>Creating a BIRT Report</title>
- <para>In this chapter we suggest a step-by-step walk-through of creating your own BIRT report.</para>
-
- <para>We will show you how to use the Creation wizard for creating a new BIRT report.</para>
-
- <para>Select <emphasis><property>File >New > Other...</property>
- </emphasis> in the main menu bar or context menu for selected project and then <emphasis><property>ESB > ESB File</property></emphasis> in the New dialog:</para>
-
- <figure>
- <title>New Dialog</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/esb_support/01_create_esb.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para> Clicking <emphasis><property>Next</property></emphasis> brings us to the wizard page where it's necessary to specify the
- folder, name and version for the file. We choose, for example, <emphasis><property>jboss-esb.xml</property>
- </emphasis> as the name and accept the selected projects folder and default version.</para>
- <figure>
- <title>Folder, Name and Version</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/esb_support/02_create_esb.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Thus, our file will be created in the selected projects folder by default. If you want to change the folder
- for your future file click <emphasis><property>Browse...</property></emphasis> button to set needed folder or simply type it.</para>
-
- <para>Clicking on <emphasis><property>Finish</property>
- </emphasis> results in the file being generated. The wizard creates one xml file.</para>
-
- </section>
-
-</chapter>
17 years, 3 months
JBoss Tools SVN: r10585 - trunk/documentation/guides/GettingStartedGuide/en/modules.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-10-01 07:33:56 -0400 (Wed, 01 Oct 2008)
New Revision: 10585
Modified:
trunk/documentation/guides/GettingStartedGuide/en/modules/gsg_faq.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-429 - reconstracting the FAQ;
Modified: trunk/documentation/guides/GettingStartedGuide/en/modules/gsg_faq.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en/modules/gsg_faq.xml 2008-10-01 11:32:51 UTC (rev 10584)
+++ trunk/documentation/guides/GettingStartedGuide/en/modules/gsg_faq.xml 2008-10-01 11:33:56 UTC (rev 10585)
@@ -11,176 +11,182 @@
</keywordset>
</chapterinfo>
<title>FAQ</title>
-
- <para>For more information on <property>JBoss Developer Studio</property> features, refer to the following
- FAQ to get the answers on the most "popular" questions.</para>
-
- <section id="Installation_Issues">
- <title>Installation Issues</title>
- <para>
- <emphasis role="bold">Visual Editor does not start under Linux</emphasis>
- </para>
- <para>Linux users may need to do the following to get the visual editor to work correctly on
- their machines.</para>
-
- <orderedlist>
- <listitem>
- <para>On Red Hat based Linux distributions install the xpLib.i386 package</para>
- </listitem>
- <listitem>
- <para>Type</para>
- <programlisting role="JAVA"><![CDATA[ln -s libstdc++.so.5.0.7 libstdc++.so.5
+
+ <para>For more information on <property>JBoss Developer Studio</property> features, refer to the
+ following FAQ to get the answers on the most "popular" questions.</para>
+
+ <section id="question_1">
+ <title>What should I do if Visual Page Editor does not start under Linux</title>
+
+ <para>Linux users may need to do the following to get the <property>Visual Page
+ Editor</property> to work correctly on their machines.</para>
+
+ <orderedlist>
+ <listitem>
+ <para>On Red Hat based Linux distributions install the xpLib.i386 package</para>
+ </listitem>
+ <listitem>
+ <para>Type</para>
+ <programlisting role="JAVA"><![CDATA[ln -s libstdc++.so.5.0.7 libstdc++.so.5
]]></programlisting>
- </listitem>
- <listitem>
- <para>and/or use</para>
- <programlisting role="JAVA"><![CDATA[yum install libXp
+ </listitem>
+ <listitem>
+ <para>and/or use</para>
+ <programlisting role="JAVA"><![CDATA[yum install libXp
]]></programlisting>
- </listitem>
- <listitem>
- <para>Open the JBDS perspective. If you see the Help view open, close it and restart
- JBDS</para>
- </listitem>
- <listitem>
- <para>If none of these work, do the following:</para>
- <itemizedlist>
- <listitem>
- <para>Clear the Eclipse log file,
+ </listitem>
+ <listitem>
+ <para>Open the JBDS perspective. If you see the Help view open, close it and restart
+ JBDS</para>
+ </listitem>
+ <listitem>
+ <para>If none of these work, do the following:</para>
+ <itemizedlist>
+ <listitem>
+ <para>Clear the Eclipse log file,
<emphasis><workspace>\.metadata\.log</emphasis></para>
- </listitem>
- <listitem>
- <para>Start Eclipse with the -debug option:</para>
- <programlisting role="JAVA"><![CDATA[eclipse -debug
+ </listitem>
+ <listitem>
+ <para>Start Eclipse with the -debug option:</para>
+ <programlisting role="JAVA"><![CDATA[eclipse -debug
]]></programlisting>
- </listitem>
- <listitem>
- <para>Post the Eclipse log file
- (<emphasis><workspace>\.metadata\.log</emphasis>) on the forums.</para>
- </listitem>
- </itemizedlist>
- </listitem>
- </orderedlist>
-
-
- <para>
- <emphasis role="bold">Do I need to have JBoss server installed to run JBoss Developer
- Studio?</emphasis>
- </para>
- <para>No. JBoss Developer Studio already comes bundled with JBoss server. We bundle it together
- so that you don't need to download any additional software and can test your
- application in a Web browser right away.</para>
- <para>If you want to use a different JBoss server installation, after JBoss Developer Studio is
- installed open Servers View (select <emphasis><property>Window > Show View >
- Others > Server > Servers</property>),</emphasis> then right click on this <emphasis>
- <property>view > New > Server</property>
- </emphasis> and follow the wizards steps to point to another Jboss server installation.</para>
- <para>JBoss Developer Studio works with any servlet container, not just JBoss. For more
- information on deployment, please see the Deploying Your Application section.</para>
- </section>
- <section id="Importing_Projects">
- <title>Importing Projects</title>
- <para>
- <emphasis role="bold">I have an existing Seam 1.2.1 project. Can I migrate/import the project to
- a JBDS Seam project?</emphasis>
- </para>
- <para>We highly recommend you to create Seam 1.2.1 project using the JBDS. In other case try to
- do manually:</para>
- <itemizedlist>
- <listitem>
- <para>Create a Seam Web project to get the JBoss tools structure</para>
- </listitem>
- </itemizedlist>
- <para>Then from your Seam 1.2.1 seam-gen project start doing the following:</para>
- <itemizedlist>
- <listitem>
- <para>Copy <property>src</property> to <property>src</property></para>
- </listitem>
- <listitem>
- <para>Copy <property>view</property> to <property>Web content</property></para>
- </listitem>
- <listitem>
- <para>Copy resources individual files to where they are in the seam web project etc.</para>
- </listitem>
- </itemizedlist>
- <para>
- <emphasis role="bold">I have an existing Struts or JSF project. Can I open the project in
- JBDS?</emphasis>
- </para>
- <para>Yes. From main menu select <emphasis>
+ </listitem>
+ <listitem>
+ <para>Post the Eclipse log file
+ (<emphasis><workspace>\.metadata\.log</emphasis>) on
+ the forums.</para>
+ </listitem>
+ </itemizedlist>
+ </listitem>
+ </orderedlist>
+ </section>
+
+ <section id="question_2">
+ <title>Do I need to have JBoss Server installed to run JBoss Developer Studio?</title>
+
+ <para>No. <property>JBoss Developer Studio</property> already comes bundled with JBoss
+ Server. We bundle it together so that you don't need to download any additional
+ software and can test your application in a Web browser right away.</para>
+ <para>If you want to use a different JBoss server installation, after <property>JBoss Developer Studio</property>
+ is installed open Servers View (select <emphasis><property>Window > Show View
+ > Others > Server > Servers</property>),</emphasis> then
+ right click on this <emphasis>
+ <property>view > New > Server</property>
+ </emphasis> and follow the wizards steps to point to another Jboss Server installation.</para>
+ <para><property>JBoss Developer Studio</property> works with any servlet container, not just JBoss. For more
+ information on deployment, please see the Deploying Your Application section.</para>
+ </section>
+
+ <section id="question_3">
+ <title>I have an existing Seam 1.2.1 project. Can I migrate/import the
+ project to a JBDS Seam project?</title>
+
+ <para>We highly recommend you to create Seam 1.2.1 project using the <property>JBDS</property>. In other case try
+ to do manually:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Create a Seam Web project to get the JBoss tools structure</para>
+ </listitem>
+ </itemizedlist>
+ <para>Then from your Seam 1.2.1 seam-gen project start doing the following:</para>
+ <itemizedlist>
+ <listitem>
+ <para>Copy <property>src</property> to <property>src</property></para>
+ </listitem>
+ <listitem>
+ <para>Copy <property>view</property> to <property>Web content</property></para>
+ </listitem>
+ <listitem>
+ <para>Copy resources individual files to where they are in the seam web project
+ etc.</para>
+ </listitem>
+ </itemizedlist>
+
+ </section>
+ <section id="questio_4">
+ <title>I have an existing Struts or JSF project. Can I open the project
+ in JBDS?</title>
+
+ <para>Yes. From main menu select <emphasis>
<property>File > Import > Other > JSF Project (or Struts
Project)</property>
- </emphasis> and follow wizards steps.</para>
- <para>
- <emphasis role="bold">Can I import a .war file?</emphasis>
- </para>
- <para>Yes. Select <emphasis><property>File > Import > Web > WAR
+ </emphasis> and follow wizards steps.</para>
+
+ </section>
+
+ <section id="question_5">
+ <title>Can I import a .war file?</title>
+
+ <para>Yes. Select <emphasis><property>File > Import > Web > WAR
file</property>, </emphasis> then follow importing steps.</para>
- </section>
- <section id="Troubleshooting">
- <title>Troubleshooting, Problems, Configuration, Error Messages</title>
- <para>
- <emphasis role="bold">Is it possible to increase the performance of Eclipse after installing
- your product?</emphasis>
- </para>
- <para>JBoss Developer Studio preconfigures eclipse via the eclipse.ini file to allocate extra
- memory, but if you for some reason need more memory then by default, you can manually make
- adjustments in this file. For example:</para>
- <programlisting role="XML">
+ </section>
+
+ <section id="question_6">
+ <title>Is it possible to increase the performance of Eclipse after
+ installing your product?</title>
+
+ <para><property>JBoss Developer Studio</property> preconfigures eclipse via the eclipse.ini file to allocate
+ extra memory, but if you for some reason need more memory then by default, you can
+ manually make adjustments in this file. For example:</para>
+ <programlisting role="XML">
<![CDATA[-vmargs -Xms128m -Xmx512m -XX:MaxPermSize=128m
]]></programlisting>
-
- <para>
- <emphasis role="bold">How can I add my own tag library to the JBoss Tools Palette?</emphasis>
- </para>
- <para>See <ulink url="&jsflink;#AddingCustomJSFTagsToTheRedHatPalette7433">Adding Tag
+ </section>
+
+ <section id="question_7">
+ <title>How can I add my own tag library to the JBoss Tools
+ Palette?</title>
+
+ <para>See <ulink url="&jsflink;#AddingCustomJSFTagsToTheRedHatPalette7433">Adding Tag
Libraries</ulink> in Visual Web Tools Guide.</para>
- </section>
-
- <section id="question1">
- <title>How to get Code Assist for Seam specific resources in an externally
- generated project?</title>
-
+ </section>
+
+ <section id="question_8">
+ <title>How to get Code Assist for Seam specific resources in an externally generated
+ project?</title>
+
<para>To get Code Assist for Seam specific resources in an externally generated project, you
should enable Seam features in Project Preferences. Right click an imported project and
navigate <emphasis>
<property>Properties > Seam Settings</property>.</emphasis> Check <emphasis>
- <property>Seam support</property></emphasis> box to enable
- all available <ulink url="&seamlink;#project_pref">Seam Settings</ulink>.</para>
+ <property>Seam support</property>
+ </emphasis> box to enable all available <ulink url="&seamlink;#project_pref">Seam
+ Settings</ulink>.</para>
</section>
-
- <section id="question2">
- <title>How to import an example Seam project from jboss-eap
- directory?</title>
-
+
+ <section id="question_9">
+ <title>How to import an example Seam project from jboss-eap directory?</title>
+
<para>To import an example Seam project from <emphasis>
- <property>jboss-eap</property>
- </emphasis> into your working directory, you should perform the following steps:</para>
-
+ <property>jboss-eap</property>
+ </emphasis> into your working directory, you should perform the following steps:</para>
+
<itemizedlist>
<listitem>
<para>Go to <emphasis>
- <property>New > Other > Java Project from Existing Buildfile</property>
- </emphasis></para>
+ <property>New > Other > Java Project from Existing Buildfile</property>
+ </emphasis></para>
</listitem>
-
+
<listitem>
<para>Point to the <emphasis>
- <property>build.xml</property>
- </emphasis> of any chosen project by pressing <emphasis>
- <property>Browse</property>
- </emphasis> button</para>
+ <property>build.xml</property>
+ </emphasis> of any chosen project by pressing <emphasis>
+ <property>Browse</property>
+ </emphasis> button</para>
</listitem>
-
+
<listitem>
<para>Hit <emphasis>
- <property>Finish</property>
- </emphasis> to open the project</para>
+ <property>Finish</property>
+ </emphasis> to open the project</para>
</listitem>
</itemizedlist>
-
- <para>As these seam examples are non WTP projects, next you should enable Seam support for them.
- To do that, right click the project and go to <emphasis>
+
+ <para>As these seam examples are non WTP projects, next you should enable Seam support for
+ them. To do that, right click the project and go to <emphasis>
<property>Properties > Seam Settings</property>.</emphasis></para>
</section>
-
-</chapter>
\ No newline at end of file
+
+</chapter>
17 years, 3 months
JBoss Tools SVN: r10584 - trunk/documentation/guides/GettingStartedGuide/en/modules.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-10-01 07:32:51 -0400 (Wed, 01 Oct 2008)
New Revision: 10584
Modified:
trunk/documentation/guides/GettingStartedGuide/en/modules/getting_started.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-429 - updating the chapter;
Modified: trunk/documentation/guides/GettingStartedGuide/en/modules/getting_started.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en/modules/getting_started.xml 2008-10-01 10:34:50 UTC (rev 10583)
+++ trunk/documentation/guides/GettingStartedGuide/en/modules/getting_started.xml 2008-10-01 11:32:51 UTC (rev 10584)
@@ -13,14 +13,14 @@
<section id="intro1">
<title>What is JBDS?</title>
- <para>JBoss Developer Studio is a set of eclipse-based development tools that are pre-configured
- for JBoss Enterprise Middleware Platforms and Red Hat Enterprise Linux. Developers are not
- required to use JBoss Developer Studio to develop on JBoss Enterprise Middleware and/or Red Hat
- Linux. But, many find these pre-configured tools offer significant time-savings and value, making
- them more productive and speeding time to deployment.</para>
- <para>This guide covers the first steps to get started working with JBoss Developer Studio. You
- will learn how to install and configure necessary software for your OS (currently Linux,
- Microsoft Windows or Mac OSX).</para>
+ <para><property>JBoss Developer Studio</property> is a set of eclipse-based development tools that
+ are pre-configured for JBoss Enterprise Middleware Platforms and Red Hat Enterprise Linux.
+ Developers are not required to use <property>JBoss Developer Studio</property> to develop on
+ JBoss Enterprise Middleware and/or Red Hat Linux. But, many find these pre-configured tools offer
+ significant time-savings and value, making them more productive and speeding time to deployment.</para>
+ <para>This guide covers the first steps to get started working with <property>JBoss Developer
+ Studio</property>. You will learn how to install and configure necessary software for your OS
+ (currently Linux, Microsoft Windows or Mac OSX).</para>
<para>Thus this guide will provide you with detailed info on how to start JDK, JBDS and JBoss
Tools.</para>
</section>
@@ -28,10 +28,11 @@
<section id="ConfigJavaEnvironment">
<?dbhtml filename="ConfigJavaEnvironment.html"?>
<title>Configuring Your Java Environment</title>
- <para>You must have a working installation of JDK 5 before you install JBoss Developer Studio.
- Currently it will only fully work with a 32-bit JVM, not a 64-bit JVM. On a 64-bit JVM the visual
- editor fails to launch because of feature of OS architecture. Thus in this guide we will show you
- how to install a 32-bit Sun JDK 5.0 on a Linux Platform and Microsoft Windows Platform.</para>
+ <para>You must have a working installation of JDK 5 before you install <property>JBoss Developer
+ Studio</property>. Currently it will only fully work with a 32-bit JVM, not a 64-bit JVM. On a
+ 64-bit JVM the visual editor fails to launch because of feature of OS architecture. Thus in this
+ guide we will show you how to install a 32-bit Sun JDK 5.0 on a Linux Platform and Microsoft
+ Windows Platform.</para>
<section id="InstallJDK50onLinux">
<title>Installing and Configuring 32-bit Sun JDK 5.0 on Linux</title>
@@ -72,8 +73,8 @@
<title>Note:</title>
<para>If you have JDK already installed and added in your system path, you should add
- <emphasis>$JAVA_HOME/bin</emphasis> before the old <emphasis>$PATH</emphasis> (not after it) so that the new
- version of JDK can be found first, i. e. <para>
+ <emphasis>$JAVA_HOME/bin</emphasis> before the old <emphasis>$PATH</emphasis> (not after it)
+ so that the new version of JDK can be found first, i. e. <para>
<emphasis>export PATH=$JAVA_HOME/bin:$PATH</emphasis>
</para> This way, the machine will pick up the new JVM first. You only need to run
"alternative" as a safe guard for the right JVM. </para>
@@ -170,9 +171,17 @@
<para>
<emphasis>C:\Program Files\Java\jdk1.5.0_11\jre\bin</emphasis>
</para>
- <para>To do this, open the Control Panel from the Start Menu, switch to Classic View if
- necessary, open the System Control Panel applet (System), select the Advanced Tab, and click on
- the Environment Variables button.</para>
+ <para>To do this, open the <emphasis>
+ <property>Control Panel</property>
+ </emphasis> from the <emphasis>
+ <property>Start</property>
+ </emphasis> menu, switch to Classic View if necessary, open the System Control Panel applet (<emphasis>
+ <property>System</property>
+ </emphasis>), select the <emphasis>
+ <property>Advanced</property>
+ </emphasis> Tab, and click on the <emphasis>
+ <property>Environment Variables</property>
+ </emphasis> button.</para>
<para>Now, when 32-bit Sun JDK 5.0 has been successfully installed, we can pass on to the next
step.</para>
</section>
@@ -182,129 +191,143 @@
<section id="InstallingJBDS">
<?dbhtml filename="InstallingRHDS.html"?>
<title>JBoss Developer Studio Installation</title>
- <para>This chapter will provide you with detailed information on how to install JBoss Developer
- Studio and all the JBoss Tools modules.</para>
- <section id="Instfromdownver">
- <title>Installing from the downloaded version</title>
- <para>Let's start with the JBDS installation.</para>
- <para>JBDS comes with a simple installer, bundled with tested/pre-configured versions of Eclipse,
- WTP, JBossEAP, Seam, and SpringIDE. Thus, to start perform the next steps:</para>
+ <para>This chapter will provide you with detailed information on how to install <property>JBoss
+ Developer Studio</property>.</para>
- <itemizedlist>
- <listitem>
- <para>First of all you need the appropriate installation file for your platform from <ulink
- url="https://www.redhat.com/apps/store/developers/jboss_developer_studio.html">Red Hat website</ulink>.</para>
- </listitem>
- <listitem>
- <para>Then run in console:</para>
- <programlisting role="JAVA"><![CDATA[java -jar jbdevstudio-linux-gtk-1.1.0.GA.jar
+ <para>JBDS comes with a simple installer, bundled with tested/pre-configured versions of Eclipse,
+ WTP, JBossEAP, Seam, and SpringIDE. Thus, to start perform the next steps:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>First of all you need the appropriate installation file for your platform from <ulink
+ url="https://www.redhat.com/apps/store/developers/jboss_developer_studio.html">Red Hat
+ website</ulink>.</para>
+ </listitem>
+ <listitem>
+ <para>Then run in console:</para>
+ <programlisting role="JAVA"><![CDATA[java -jar jbdevstudio-linux-gtk-1.1.0.GA.jar
]]></programlisting>
- </listitem>
- <listitem>
- <para>Follow the instructions presented by the installation wizard</para>
- </listitem>
- </itemizedlist>
+ </listitem>
+ <listitem>
+ <para>Follow the instructions presented by the installation wizard</para>
+ </listitem>
+ </itemizedlist>
- <figure>
- <title>JBoss Developer Studio Installation Wizard</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/getting_started/getting_started_1.png"/>
- </imageobject>
- </mediaobject>
- </figure>
+ <figure>
+ <title>JBoss Developer Studio Installation Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/getting_started/getting_started_1.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
- <itemizedlist>
- <listitem>
- <para>Provide the installation path</para>
- </listitem>
- <listitem>
- <para>Select Java VM</para>
- </listitem>
- </itemizedlist>
+ <itemizedlist>
+ <listitem>
+ <para>Provide the installation path</para>
+ </listitem>
+ <listitem>
+ <para>Select Java VM</para>
+ </listitem>
+ </itemizedlist>
- <figure>
- <title>Select Java VM</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/getting_started/getting_started_2.png"/>
- </imageobject>
- </mediaobject>
- </figure>
+ <figure>
+ <title>Select Java VM</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/getting_started/getting_started_2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
- <para>Selecting <emphasis>
+ <tip>
+ <title>Tip:</title>
+ <para>By selecting <emphasis>
<property>Default Java VM</property>
</emphasis> you set default Java VM of your system (to verify your Java environment, type
"java -version" in console).</para>
- <para>Selecting <emphasis>
- <property>Specific Java VM</property>
- </emphasis> you can provide the path to non-default Java VM.</para>
+ </tip>
- <note>
- <title>Note:</title>
- <para>JBoss Developer Studio needs Java 5 and "gij" isn't available
- on every platform.</para>
- </note>
+ <para>Selecting <emphasis>
+ <property>Specific Java VM</property>
+ </emphasis> you can provide the path to non-default Java VM.</para>
- <itemizedlist>
- <listitem>
- <para>Installation process includes <ulink
- url="http://www.jboss.com/products/platforms/application">JBoss Enterprise Application
- Platform</ulink>. Select <emphasis>
- <property>Yes</property>
- </emphasis> to use it in JBoss Developer Studio.</para>
- </listitem>
- </itemizedlist>
+ <note>
+ <title>Note:</title>
+ <para>JBoss Developer Studio needs Java 5 and "gij" isn't available on
+ every platform.</para>
+ </note>
- <para/>
+ <itemizedlist>
+ <listitem>
+ <para>Installation process includes <ulink
+ url="http://www.jboss.com/products/platforms/application">JBoss Enterprise Application
+ Platform</ulink>. Select <emphasis>
+ <property>Yes</property>
+ </emphasis> to use it in JBoss Developer Studio.</para>
+ </listitem>
+ </itemizedlist>
- <figure>
- <title>JBoss Enterprise Application Platform Installing</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/getting_started/getting_started_3.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para/>
- <note>
- <title>Note:</title>
- <para>The installer installs JBoss Enterprise Application Platform for running your applications
- if you select this option during the installation process. If you want to use a different
- server than ours, you can change the setting in JBoss Developer Studio.</para>
- </note>
+ <para/>
- <itemizedlist>
- <listitem>
- <para>Check your installation paths and see the components to install. If you'd like to change
- something, press <emphasis>
- <property>Previous</property>
- </emphasis> button. Click <emphasis>
- <property>Next</property>
- </emphasis> to start installation. </para>
- </listitem>
- </itemizedlist>
+ <figure>
+ <title>JBoss Enterprise Application Platform Installing</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/getting_started/getting_started_3.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para/>
+ <note>
+ <title>Note:</title>
+ <para>The installer installs JBoss Enterprise Application Platform for running your applications
+ if you select this option during the installation process. If you want to use a different server
+ than ours, you can change the setting in JBoss Developer Studio.</para>
+ </note>
- <para/>
+ <itemizedlist>
+ <listitem>
+ <para>Check your installation paths and see the components to install. If you'd like to change
+ something, press <emphasis>
+ <property>Previous</property>
+ </emphasis> button. Click <emphasis>
+ <property>Next</property>
+ </emphasis> to start installation. </para>
+ </listitem>
+ </itemizedlist>
- <figure>
- <title>Summary Information</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/getting_started/getting_started_4.png"/>
- </imageobject>
- </mediaobject>
- </figure>
+ <para/>
- </section>
+ <figure>
+ <title>Summary Information</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/getting_started/getting_started_4.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="jbds_jbosstools">
+
+ <title>JBoss Developer Studio and JBoss Tools</title>
+
+ <para>This section uncovers the points on the differences between <property>JBoss Developer
+ Studio</property> and <property>JBoss Tools</property> and provides the steps on <property>JBoss
+ Tools</property> installation as well.</para>
+
<section id="WhatDifferenceBetweenJBDSAndJBossTools">
- <title>What is the difference between JBoss Developer Studio and JBoss Tools</title>
- <para>This release of JBoss Tools is what went into our JBoss Developer Studio which provides an
- easy-to-install Eclipse based IDE fully configured and ready to run with the bundled JBoss
- Enterprise Application Platform.</para>
- <para>In short JBoss Tools are just a set of Eclipse plugins and JBoss Developer Studio adds:</para>
+ <title>What is the difference?</title>
+
+ <para><property>JBoss Tools</property> is what went into our <property>JBoss Developer
+ Studio</property> which comes as an easy-to-install Eclipse based IDE fully configured and ready
+ to run with the bundled <property>JBoss Enterprise Application Platform</property>.</para>
+
+ <para>In short <property>JBoss Tools</property> are just a set of Eclipse plugins and
+ <property>JBoss Developer Studio</property> adds:</para>
<itemizedlist>
<listitem>
<para>An installer</para>
@@ -327,110 +350,109 @@
</itemizedlist>
<para> For additional information see <ulink url="http://www.jboss.com/products/devstudio"
>JBoss.com</ulink></para>
+ </section>
- <section id="JBossToolsInstall" role="updated">
- <title>JBoss Tools Installation</title>
- <para>Here, let's consider the installation of the <property>JBoss Tools</property>
- modules.</para>
- <para>JBoss Tools is an umbrella project for the JBoss developed plugins that will make it into
- JBoss Developer Studio. The JBoss Tools modules are:</para>
- <itemizedlist>
- <listitem>
- <para>JBoss AS Tools</para>
- </listitem>
- <listitem>
- <para>Seam Tools</para>
- </listitem>
- <listitem>
- <para>Hibernate Tools</para>
- </listitem>
- <listitem>
- <para>Visual Page Editor</para>
- </listitem>
- <listitem>
- <para>JST Tools</para>
- </listitem>
- <listitem>
- <para>JBPM Tools</para>
- </listitem>
- </itemizedlist>
+ <section id="JBossToolsInstall" role="updated">
+ <title>JBoss Tools Installation</title>
+ <para>Here, let's consider the installation of the <property>JBoss Tools</property>
+ modules.</para>
+ <para><property>JBoss Tools</property> is an umbrella project for the JBoss developed plugins
+ that will make it into <property>JBoss Developer Studio</property>. The JBoss Tools modules are:</para>
+ <itemizedlist>
+ <listitem>
+ <para>JBoss AS Tools</para>
+ </listitem>
+ <listitem>
+ <para>Seam Tools</para>
+ </listitem>
+ <listitem>
+ <para>Hibernate Tools</para>
+ </listitem>
+ <listitem>
+ <para>Visual Page Editor</para>
+ </listitem>
+ <listitem>
+ <para>JST Tools</para>
+ </listitem>
+ <listitem>
+ <para>JBPM Tools</para>
+ </listitem>
+ </itemizedlist>
- <para>To install the JBoss Tools plugins for Eclipse, you need the following:</para>
+ <para>To install the JBoss Tools plugins for Eclipse, you need the following:</para>
- <itemizedlist>
- <listitem>
- <para>Get Eclipse and Web Tools</para>
- </listitem>
- </itemizedlist>
- <para>The currant version of JBoss Tools (3.0.0 Alpha) targets at Eclipse 3.4/Ganymede and WTP
- 3.0.</para>
+ <itemizedlist>
+ <listitem>
+ <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
+ 3.0.</para>
- <tip>
- <title>Tip:</title>
- <para>We recommend you do not use Eclipse.org update site to go from Eclipse 3.3 to Eclipse
- 3.4. Instead we suggest that you download the full binary from <ulink
- url="http://www.eclipse.org/downloads/">here</ulink>.</para>
- </tip>
+ <tip>
+ <title>Tip:</title>
+ <para>We recommend you do not use Eclipse.org update site to go from Eclipse 3.3 to Eclipse 3.4.
+ Instead we suggest that you download the full binary from <ulink
+ url="http://www.eclipse.org/downloads/">here</ulink>.</para>
+ </tip>
- <para>If you can only use Eclipse 3.3 use <ulink
- url="http://www.jboss.org/tools/download/index.html#stable">JBoss Tools 2.1.2</ulink>, but
- JBoss Tools 2.x will not have any of the new features.</para>
+ <para>If you can only use Eclipse 3.3 use <ulink
+ url="http://www.jboss.org/tools/download/index.html#stable">JBoss Tools 2.1.2</ulink>, but
+ JBoss Tools 2.x will not have any of the new features.</para>
- <note>
- <title>Note:</title>
- <para>Remember to choose the download that matches your OS and use Java 5 when you run
- it.</para>
- </note>
+ <note>
+ <title>Note:</title>
+ <para>Remember to choose the download that matches your OS and use Java 5 when you run
+ it.</para>
+ </note>
- <itemizedlist>
+ <itemizedlist>
+ <listitem>
+ <para>Get the <ulink url="http://download.jboss.org/jbosstools/builds/nightly/latestBuild.html"
+ >latest JBoss Tools build</ulink></para>
+ </listitem>
+ </itemizedlist>
+
+ <para>Some of our newer plugins, like TPTP and BIRT, need additional drivers. On the left side of
+ the download page you can find all of the required drivers for chosen build and their versions.</para>
+ <para>Instead of downloading the nightly build version manually, it's also possible to
+ get the latest release of <property>JBoss Tools</property> from one of our update sites: <itemizedlist>
<listitem>
- <para>Get the <ulink
- url="http://download.jboss.org/jbosstools/builds/nightly/latestBuild.html">latest JBoss
- Tools build</ulink></para>
+ <para>Stable Updates: <ulink url="http://download.jboss.org/jbosstools/updates/stable"
+ >http://download.jboss.org/jbosstools/updates/stable</ulink></para>
</listitem>
- </itemizedlist>
-
- <para>Some of our newer plugins, like TPTP and BIRT, need additional drivers. On the left side
- of the download page you can find all of the required drivers for chosen build and their
- versions.</para>
- <para>Instead of downloading the nightly build version manually, it's also possible to
- get the latest release of <property>JBoss Tools</property> from one of our update sites: <itemizedlist>
- <listitem>
- <para>Stable Updates: <ulink url="http://download.jboss.org/jbosstools/updates/stable"
- >http://download.jboss.org/jbosstools/updates/stable</ulink></para>
- </listitem>
- <listitem>
- <para> Development Updates: <ulink
- url="http://download.jboss.org/jbosstools/updates/development"
- >http://download.jboss.org/jbosstools/updates/development</ulink></para>
- </listitem>
- </itemizedlist>
- </para>
-
- <itemizedlist>
<listitem>
- <para>Finally, install the build</para>
+ <para> Development Updates: <ulink
+ url="http://download.jboss.org/jbosstools/updates/development"
+ >http://download.jboss.org/jbosstools/updates/development</ulink></para>
</listitem>
</itemizedlist>
+ </para>
- <para>Unzip the file(s) directly into your Eclipse <emphasis>
- <property>plugins/features</property>
- </emphasis> directory and it will be readily available. It might be necessary to start Eclipse
- with eclipse -clean to make sure it starts clean and rereads the new list of plugins.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Finally, install the build</para>
+ </listitem>
+ </itemizedlist>
- <para>If you need to install any standalone plug-in from JBoss Tools visit a <ulink
- url="http://labs.jboss.com/wiki/InstallingJBossTools">JBoss Tools Wiki</ulink> page to read
- about dependencies between standalone plug-ins.</para>
- </section>
+ <para>Unzip the file(s) directly into your Eclipse <emphasis>
+ <property>plugins/features</property>
+ </emphasis> directory and it will be readily available. It might be necessary to start Eclipse
+ with eclipse -clean to make sure it starts clean and rereads the new list of plugins.</para>
+ <para>If you need to install any standalone plug-in from JBoss Tools visit a <ulink
+ url="http://labs.jboss.com/wiki/InstallingJBossTools">JBoss Tools Wiki</ulink> page to read
+ about dependencies between standalone plug-ins.</para>
</section>
+
</section>
<section id="Welcome">
<title>Welcome to JBoss Developer Studio</title>
- <para>In this section we'll show you how to work with the welcome page of the JBoss Developer
- Studio.</para>
- <para>The welcome page is the first page you see when you first launch JBoss Developer Studio. </para>
+ <para>In this section we'll show you how to work with the welcome page of the <property>JBoss
+ Developer Studio</property>.</para>
+ <para>The welcome page is the first page you see when you first launch <property>JBoss Developer
+ Studio</property>. </para>
<figure>
<title>Welcome to JBoss Developer Studio</title>
@@ -505,9 +527,9 @@
</mediaobject>
</figure>
- <para>Start work with JBoss Developer Studio by clicking on <emphasis>
+ <para>Start work with <property>JBoss Developer Studio</property> by clicking on <emphasis>
<property>Workbench</property>
- </emphasis> button or simply close the welcome page.</para>
+ </emphasis> button or simply close the Welcome page.</para>
</section>
@@ -522,10 +544,11 @@
<title>Uninstalling</title>
<itemizedlist>
<listitem>
- <para>Make sure JBoss Developer Studio is not running</para>
+ <para>Make sure <property>JBoss Developer Studio</property> is not running</para>
</listitem>
<listitem>
- <para>Uninstall your current version of JBoss Developer Studio by running uninstaller</para>
+ <para>Uninstall your current version of <property>JBoss Developer Studio</property> by running
+ Uninstaller</para>
</listitem>
</itemizedlist>
</section>
@@ -550,7 +573,7 @@
</orderedlist>
</section>
-
+
<section id="OtherRelevantResourcesOnTheTopic33">
<?dbhtml filename="OtherRelevantResourcesOnTheTopic33.html"?>
<title>Other relevant resources on the topic</title>
@@ -559,7 +582,9 @@
<para>Forum: <ulink
url="http://www.jboss.com/index.html?module=bb&op=viewforum&f=258">JBoss
Forum</ulink></para>
- <para>Download: <ulink url="http://www.jboss.com/products/devstudio">JBDS Download</ulink></para>
+ <para>Subscription: <ulink
+ url="https://www.redhat.com/apps/store/developers/jboss_developer_studio.html">JBDS
+ Subscription</ulink></para>
<para>The latest documentation builds are available <ulink
url="http://download.jboss.org/jbosstools/nightly-docs/">here</ulink>.</para>
17 years, 3 months
JBoss Tools SVN: r10583 - trunk/documentation/guides/GettingStartedGuide/en/modules.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2008-10-01 06:34:50 -0400 (Wed, 01 Oct 2008)
New Revision: 10583
Modified:
trunk/documentation/guides/GettingStartedGuide/en/modules/gsg_faq.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-359
FAQ is updated
Modified: trunk/documentation/guides/GettingStartedGuide/en/modules/gsg_faq.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en/modules/gsg_faq.xml 2008-10-01 09:19:52 UTC (rev 10582)
+++ trunk/documentation/guides/GettingStartedGuide/en/modules/gsg_faq.xml 2008-10-01 10:34:50 UTC (rev 10583)
@@ -129,16 +129,13 @@
<![CDATA[-vmargs -Xms128m -Xmx512m -XX:MaxPermSize=128m
]]></programlisting>
-
<para>
<emphasis role="bold">How can I add my own tag library to the JBoss Tools Palette?</emphasis>
</para>
<para>See <ulink url="&jsflink;#AddingCustomJSFTagsToTheRedHatPalette7433">Adding Tag
Libraries</ulink> in Visual Web Tools Guide.</para>
-
- </section>
+ </section>
-
<section id="question1">
<title>How to get Code Assist for Seam specific resources in an externally
generated project?</title>
17 years, 3 months
JBoss Tools SVN: r10582 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/bundle.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-10-01 05:19:52 -0400 (Wed, 01 Oct 2008)
New Revision: 10582
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/bundle/BundleMap.java
Log:
JBIDE-1497.
Old ELParser replaced.
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/bundle/BundleMap.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/bundle/BundleMap.java 2008-10-01 06:59:27 UTC (rev 10581)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/bundle/BundleMap.java 2008-10-01 09:19:52 UTC (rev 10582)
@@ -33,7 +33,15 @@
import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.part.FileEditorInput;
import org.eclipse.wst.sse.ui.StructuredTextEditor;
+import org.jboss.tools.common.el.core.model.ELArgumentInvocation;
+import org.jboss.tools.common.el.core.model.ELExpression;
+import org.jboss.tools.common.el.core.model.ELInstance;
+import org.jboss.tools.common.el.core.model.ELInvocationExpression;
+import org.jboss.tools.common.el.core.model.ELModel;
+import org.jboss.tools.common.el.core.model.ELPropertyInvocation;
+import org.jboss.tools.common.el.core.model.ELUtil;
import org.jboss.tools.common.el.core.parser.ELParser;
+import org.jboss.tools.common.el.core.parser.ELParserFactory;
import org.jboss.tools.common.model.XModel;
import org.jboss.tools.common.model.event.XModelTreeEvent;
import org.jboss.tools.common.model.event.XModelTreeListener;
@@ -122,53 +130,54 @@
}
public boolean openBundle(String expression, String locale){
-// ELParser.Token token = parseJSFExpression(expression);
-// if(token == null) return false;
-// ELParser.Token t = token;
-// String prefix = null;
-// String propertyName = null;
-// while(t != null) {
-// if(t.kind == ELParser.OPEN) {
-// String[] values = getCall(expression, t);
-// if(values != null) {
-// prefix = values[0];
-// propertyName = values[1];
-// break;
-// }
-// }
-// t = t.next;
-// }
-// if(prefix == null) return false;
-//
-// BundleEntry entry = getBundle(prefix);
-//
-// if(entry == null){
-// if (hasJsfProjectNatureType()) {
-// IProject project = ((IFileEditorInput)editor.getEditorInput()).getFile().getProject();
-// XModel model = EclipseResourceUtil.getModelNature(project).getModel();
-// String prefix2 = prefix;
-// if(propertyName != null && prefix != null) {
-// prefix2 = prefix + "." + propertyName;
-// }
-// WebPromptingProvider.getInstance().getList(model, WebPromptingProvider.JSF_BEAN_OPEN, prefix2, null);
-// }
-// return false;
-// }
-//
-// if (hasJsfProjectNatureType()) {
-// Properties p = new Properties();
-// p.put(WebPromptingProvider.BUNDLE, entry.uri);
-// p.put(WebPromptingProvider.KEY, propertyName);
-// if (locale != null) p.put(WebPromptingProvider.LOCALE, locale);
-// p.put(WebPromptingProvider.FILE, ((IFileEditorInput)editor.getEditorInput()).getFile().getProject());
-//
-// IProject project = ((IFileEditorInput)editor.getEditorInput()).getFile().getProject();
-// XModel model = EclipseResourceUtil.getModelNature(project).getModel();
-//
-// WebPromptingProvider.getInstance().getList(model, WebPromptingProvider.JSF_OPEN_KEY, entry.uri, p);
-// String error = p.getProperty(WebPromptingProvider.ERROR);
-// return (error == null || error.length() == 0);
-// }
+ List<ELInstance> is = parseJSFExpression(expression);
+ if(is == null || is.size() == 0) return false;
+ String prefix = null;
+ String propertyName = null;
+ for (ELInstance i: is) {
+ ELExpression expr = i.getExpression();
+ if(expr == null) continue;
+ List<ELInvocationExpression> invs = expr.getInvocations();
+ if(invs.size() > 0) {
+ String[] values = getCall(invs.get(0));
+ if(values != null) {
+ prefix = values[0];
+ propertyName = values[1];
+ break;
+ }
+ }
+ }
+ if(prefix == null) return false;
+
+ BundleEntry entry = getBundle(prefix);
+
+ if(entry == null){
+ if (hasJsfProjectNatureType()) {
+ IProject project = ((IFileEditorInput)editor.getEditorInput()).getFile().getProject();
+ XModel model = EclipseResourceUtil.getModelNature(project).getModel();
+ String prefix2 = prefix;
+ if(propertyName != null && prefix != null) {
+ prefix2 = prefix + "." + propertyName;
+ }
+ WebPromptingProvider.getInstance().getList(model, WebPromptingProvider.JSF_BEAN_OPEN, prefix2, null);
+ }
+ return false;
+ }
+
+ if (hasJsfProjectNatureType()) {
+ Properties p = new Properties();
+ p.put(WebPromptingProvider.BUNDLE, entry.uri);
+ p.put(WebPromptingProvider.KEY, propertyName);
+ if (locale != null) p.put(WebPromptingProvider.LOCALE, locale);
+ p.put(WebPromptingProvider.FILE, ((IFileEditorInput)editor.getEditorInput()).getFile().getProject());
+
+ IProject project = ((IFileEditorInput)editor.getEditorInput()).getFile().getProject();
+ XModel model = EclipseResourceUtil.getModelNature(project).getModel();
+
+ WebPromptingProvider.getInstance().getList(model, WebPromptingProvider.JSF_OPEN_KEY, entry.uri, p);
+ String error = p.getProperty(WebPromptingProvider.ERROR);
+ return (error == null || error.length() == 0);
+ }
return false;
}
@@ -249,10 +258,6 @@
removeBundle(hashCode, true);
}
-// public void addBundle(int hashCode, String prefix, String uri, int offset){
-// addBundle(hashCode, prefix, uri, offset, true);
-// }
-
private void addBundle(int hashCode, String prefix, String uri, int offset, boolean refresh) {
ResourceBundle bundle = getBundleByUrl(uri);
BundleEntry entry = new BundleEntry(bundle, uri, prefix, hashCode, offset);
@@ -340,89 +345,83 @@
}
}
-// private ELParser.Token parseJSFExpression(String expression){
-// ELParser parser = new ELParser();
-// ELParser.Token token = parser.parse(expression);
-// return token;
-// return null;
-// }
+ private List<ELInstance> parseJSFExpression(String expression){
+ ELParser parser = ELParserFactory.createDefaultParser();
+ ELModel model = parser.parse(expression);
+ List<ELInstance> is = model.getInstances();
+ return is;
+ }
public String getBundleValue(String name, int offset){
-// if(isShowBundleUsageAsEL) return name;
-// ELParser.Token token = parseJSFExpression(name);
-// if(token == null) return null;
-// ELParser.Token t = token;
-// StringBuffer sb = new StringBuffer();
-// while(t != null) {
-// if(t.kind == ELParser.OPEN) {
-// String[] values = getCall(name, t);
-// ELParser.Token te = t;
-// while(te.next != null && te.kind != ELParser.CLOSE) te = te.next;
-// String dv = name.substring(t.start, te.end);
-// String value = (values == null) ? null : getBundleValue(values[0], values[1], offset);
-// if(value == null) {
-// sb.append(dv);
-// } else {
-// sb.append(value);
-// }
-// t = te;
-// } else {
-// sb.append(name.substring(t.start, t.end));
-// }
-// t = t.next;
-// }
-// return sb.toString();
- return "";
+ if(isShowBundleUsageAsEL) return name;
+ List<ELInstance> is = parseJSFExpression(name);
+ if(is == null) return null;
+ StringBuffer sb = new StringBuffer();
+ int index = 0;
+ for (ELInstance i: is) {
+ int start = i.getStartPosition();
+ sb.append(name.substring(index, start));
+ index = start;
+ if(i.getExpression() instanceof ELInvocationExpression) {
+ ELInvocationExpression expr = (ELInvocationExpression)i.getExpression();
+ String[] values = getCall(expr);
+ if(values != null) {
+ String value = (values == null) ? null : getBundleValue(values[0], values[1], offset);
+ if(value != null) {
+ sb.append(value);
+ index = i.getEndPosition();
+ }
+
+ }
+ }
+ if(index < i.getEndPosition()) {
+ sb.append(name.substring(index, i.getEndPosition()));
+ index = i.getEndPosition();
+ }
+ }
+ sb.append(name.substring(index));
+ return sb.toString();
}
-// private ELParser.Token next(ELParser.Token t) {
-// if(t == null) return null;
-// t = t.next;
-// if(t != null && t.kind == ELParser.SPACES) t = t.next;
-// return t;
-// }
-//
-// String[] getCall(String expression, ELParser.Token t) {
-// if(t == null || t.kind != ELParser.OPEN) return null;
-// t = next(t);
-// if(t == null || t.kind != ELParser.NAME) return null;
-// String prefix = expression.substring(t.start, t.end);
-// String propName = null;
-// t = next(t);
-// if(t != null && t.kind == ELParser.DOT) {
-// t = next(t);
-// if(t == null || t.kind != ELParser.NAME) return null;
-// propName = expression.substring(t.start, t.end);
-// } else if(t != null && t.kind == ELParser.OPEN_ARG) {
-// t = next(t);
-// if(t == null || t.kind != ELParser.ARGUMENT) return null;
-// propName = expression.substring(t.start, t.end);
-// t = next(t);
-// if(t == null || t.kind != ELParser.CLOSE_ARG) return null;
-// }
-// t = next(t);
-// if(t == null || t.kind != ELParser.CLOSE) return null;
-// return propName == null ? null : new String[]{prefix, propName};
-// }
-//
-// private String getBundleValue(String prefix, String propertyName, int offset) {
-// BundleEntry entry = getBundle(prefix);
-// if(entry != null) {
-// //Added by estherbin fix JBIDE-2010 (issue with resources).
-// if(offset!=0 && (entry.offset > offset))return null;
-// String name = prefix + "." + propertyName;
-// try{
-// String value = (String)entry.bundle.getObject(propertyName);
-// if(!usedKeys.containsKey(name))
-// usedKeys.put(name, new UsedKey(entry.uri, prefix, propertyName, value, entry.hashCode, entry.offset));
-// return value;
-// }catch(MissingResourceException ex){
-// return null;
-// }
-// }
-// return null;
-// }
+ String[] getCall(ELInvocationExpression expr) {
+ if(expr == null) return null;
+ ELInvocationExpression left = expr.getLeft();
+ if(left == null) return null;
+ String name = expr.getMemberName();
+ if(name == null || name.length() == 0) return null;
+ if(expr instanceof ELPropertyInvocation) {
+ return new String[]{left.getText(), name};
+ } else if(expr instanceof ELArgumentInvocation) {
+ if(name.startsWith("\"") || name.startsWith("'")) {
+ name = name.substring(1);
+ }
+ if(name.endsWith("\"") || name.endsWith("'")) {
+ name = name.substring(0, name.length() - 1);
+ }
+ if(name.length() == 0) return null;
+ return new String[]{left.getText(), name};
+ }
+ return null;
+ }
+ private String getBundleValue(String prefix, String propertyName, int offset) {
+ BundleEntry entry = getBundle(prefix);
+ if(entry != null) {
+ //Added by estherbin fix JBIDE-2010 (issue with resources).
+ if(offset!=0 && (entry.offset > offset))return null;
+ String name = prefix + "." + propertyName;
+ try{
+ String value = (String)entry.bundle.getObject(propertyName);
+ if(!usedKeys.containsKey(name))
+ usedKeys.put(name, new UsedKey(entry.uri, prefix, propertyName, value, entry.hashCode, entry.offset));
+ return value;
+ }catch(MissingResourceException ex){
+ return null;
+ }
+ }
+ return null;
+ }
+
public void addBundleMapListener(BundleMapListener listener) {
if (listener != null) {
BundleMapListener[] newBundleMapListener = new BundleMapListener[bundleMapListeners.length + 1];
17 years, 3 months
JBoss Tools SVN: r10580 - trunk/as/plugins/org.jboss.ide.eclipse.as.ui.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-09-30 20:24:09 -0400 (Tue, 30 Sep 2008)
New Revision: 10580
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml
Log:
https://jira.jboss.org/jira/browse/JBIDE-2821 fixed
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml 2008-09-30 20:50:41 UTC (rev 10579)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml 2008-10-01 00:24:09 UTC (rev 10580)
@@ -104,13 +104,13 @@
name="JBoss Server View"/>
</extension>
-
- <extension point="org.eclipse.wst.common.project.facet.core.runtimes">
+ <extension point="org.eclipse.wst.common.project.facet.core.runtimes">
<adapter>
+ <runtime-component id="org.jboss.ide.eclipse.as.runtime.component"/>
<factory class="org.eclipse.jst.server.ui.internal.RuntimeLabelProvider$Factory"/>
<type class="org.eclipse.wst.common.project.facet.ui.IRuntimeComponentLabelProvider"/>
</adapter>
- </extension>
+ </extension>
<extension
point="org.eclipse.ui.views">
17 years, 3 months