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/…
[View More]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>
[View Less]
16 years, 5 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-…
[View More]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>
[View Less]
16 years, 5 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/…
[View More]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;
[View Less]
16 years, 5 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/…
[View More]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.
[View Less]
16 years, 5 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
======…
[View More]=============================================================
--- 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) {
[View Less]
16 years, 5 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/…
[View More]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>
[View Less]
16 years, 5 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/…
[View More]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) {
[View Less]
16 years, 5 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.…
[View More]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() {
[View Less]
16 years, 5 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/…
[View More]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,
[View Less]
16 years, 5 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.…
[View More]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
[View Less]
16 years, 5 months