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>
15 years, 7 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>
15 years, 7 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");
+ }
+
+
}
15 years, 7 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."
15 years, 7 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"
15 years, 7 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;
- }
-
-}
15 years, 7 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>
15 years, 7 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>
15 years, 7 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
15 years, 7 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();
15 years, 7 months