JBoss Tools SVN: r4946 - trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2007-11-16 08:42:30 -0500 (Fri, 16 Nov 2007)
New Revision: 4946
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamPreferencesMessages.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamPreferencesMessages.properties
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamValidatorConfigurationBlock.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1308
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamPreferencesMessages.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamPreferencesMessages.java 2007-11-16 13:38:13 UTC (rev 4945)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamPreferencesMessages.java 2007-11-16 13:42:30 UTC (rev 4946)
@@ -88,7 +88,8 @@
//Seam Expression language
public static String SeamValidatorConfigurationBlock_section_el;
- public static String SeamValidatorConfigurationBlock_pb_invalidExpression_label;
+ public static String SeamValidatorConfigurationBlock_pb_unknownElVariableName_label;
+ public static String SeamValidatorConfigurationBlock_pb_unknownElVariablePropertyName_label;
public static String SeamValidatorConfigurationBlock_pb_unpairedGetterOrSetter_label;
static {
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamPreferencesMessages.properties
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamPreferencesMessages.properties 2007-11-16 13:38:13 UTC (rev 4945)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamPreferencesMessages.properties 2007-11-16 13:42:30 UTC (rev 4946)
@@ -56,7 +56,8 @@
##Seam Expression language
SeamValidatorConfigurationBlock_section_el=Expression language
-SeamValidatorConfigurationBlock_pb_invalidExpression_label=Expression cannot be resolved
+SeamValidatorConfigurationBlock_pb_unknownElVariableName_label=Context variable cannot be resolved:
+SeamValidatorConfigurationBlock_pb_unknownElVariablePropertyName_label=Property cannot be resolved:
SeamValidatorConfigurationBlock_pb_unpairedGetterOrSetter_label=Unpaired Getter/Setter:
SEAM_VALIDATOR_CONFIGURATION_BLOCK_SEAM_VALIDATOR_CONFIGURATION_BLOCK=SeamValidatorConfigurationBlock
SEAM_VALIDATOR_CONFIGURATION_BLOCK_ERROR=Error
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamValidatorConfigurationBlock.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamValidatorConfigurationBlock.java 2007-11-16 13:38:13 UTC (rev 4945)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamValidatorConfigurationBlock.java 2007-11-16 13:42:30 UTC (rev 4946)
@@ -113,16 +113,17 @@
private static SectionDescription SECTION_EL = new SectionDescription(
SeamPreferencesMessages.SeamValidatorConfigurationBlock_section_el,
new String[][]{
- {SeamPreferences.INVALID_EXPRESSION, SeamPreferencesMessages.SeamValidatorConfigurationBlock_pb_invalidExpression_label},
+ {SeamPreferences.UNKNOWN_EL_VARIABLE_NAME, SeamPreferencesMessages.SeamValidatorConfigurationBlock_pb_unknownElVariableName_label},
+ {SeamPreferences.UNKNOWN_EL_VARIABLE_PROPERTY_NAME, SeamPreferencesMessages.SeamValidatorConfigurationBlock_pb_unknownElVariablePropertyName_label},
{SeamPreferences.UNPAIRED_GETTER_OR_SETTER, SeamPreferencesMessages.SeamValidatorConfigurationBlock_pb_unpairedGetterOrSetter_label}
}
);
private static SectionDescription[] ALL_SECTIONS = new SectionDescription[]{
- SECTION_COMPONENT,
- SECTION_ENTITY,
+ SECTION_COMPONENT,
+ SECTION_ENTITY,
SECTION_LIFECYCLE,
- SECTION_FACTORY,
+ SECTION_FACTORY,
SECTION_BIJECTION,
SECTION_VARIABLE,
SECTION_EL
17 years, 1 month
JBoss Tools SVN: r4945 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2007-11-16 08:38:13 -0500 (Fri, 16 Nov 2007)
New Revision: 4945
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELTokenizer.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1308
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELTokenizer.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELTokenizer.java 2007-11-16 13:37:06 UTC (rev 4944)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELTokenizer.java 2007-11-16 13:38:13 UTC (rev 4945)
@@ -35,7 +35,6 @@
private int fState;
private static final String OPERATOR_SYMBOLS = "!=&(){}[]:+-*%?,|/%<>";
-// private static final String OPERATOR_SYMBOLS = "!=&{}:+-*%?,|/%<>";
private static final int START_ROUND_BRACKET_SYMBOL = '(';
private static final int END_ROUND_BRACKET_SYMBOL = ')';
private static final int START_SQUARE_BRACKET_SYMBOL = '[';
@@ -43,14 +42,6 @@
private static final int STRING_SYMBOL = '\'';
private static final String RESERVED_WORDS = " null empty div and or not mod eq ne lt gt le ge true false instanceof invalid required ";
- private SeamELTokenizer(String expression, int offset) {
- this.offset = offset;
- this.expression = expression;
- index = 0;
- fTokens = new ArrayList<ELToken>();
- parse();
- }
-
/**
* Constructs SeamELTokenizer object.
* Constructs SeamELTokenizer object
@@ -63,6 +54,14 @@
this(expression, 0);
}
+ private SeamELTokenizer(String expression, int offset) {
+ this.offset = offset;
+ this.expression = expression;
+ index = 0;
+ fTokens = new ArrayList<ELToken>();
+ parse();
+ }
+
/**
* Returns list of tokens for the expression parsed
*
17 years, 1 month
JBoss Tools SVN: r4944 - trunk/hibernatetools/docs/resources/styles/en.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2007-11-16 08:37:06 -0500 (Fri, 16 Nov 2007)
New Revision: 4944
Modified:
trunk/hibernatetools/docs/resources/styles/en/html.xsl
trunk/hibernatetools/docs/resources/styles/en/html_chunk.xsl
Log:
http://jira.jboss.com/jira/browse/RHDS-310
local docbook resources are used now for building
Modified: trunk/hibernatetools/docs/resources/styles/en/html.xsl
===================================================================
--- trunk/hibernatetools/docs/resources/styles/en/html.xsl 2007-11-16 13:37:05 UTC (rev 4943)
+++ trunk/hibernatetools/docs/resources/styles/en/html.xsl 2007-11-16 13:37:06 UTC (rev 4944)
@@ -15,7 +15,7 @@
-->
<!DOCTYPE xsl:stylesheet [
- <!ENTITY db_xsl_path "../support/docbook-xsl">
+ <!ENTITY db_xsl_path "../../support/docbook-xsl">
]>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
@@ -23,7 +23,7 @@
xmlns="http://www.w3.org/TR/xhtml1/transitional"
exclude-result-prefixes="#default">
-<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl"/>
+<xsl:import href="&db_xsl_path;/html/docbook.xsl"/>
<xsl:include href="./collapsing-navigation.xsl"></xsl:include>
<xsl:include href="./highlight.xsl"></xsl:include>
Modified: trunk/hibernatetools/docs/resources/styles/en/html_chunk.xsl
===================================================================
--- trunk/hibernatetools/docs/resources/styles/en/html_chunk.xsl 2007-11-16 13:37:05 UTC (rev 4943)
+++ trunk/hibernatetools/docs/resources/styles/en/html_chunk.xsl 2007-11-16 13:37:06 UTC (rev 4944)
@@ -23,10 +23,8 @@
xmlns="http://www.w3.org/TR/xhtml1/transitional"
exclude-result-prefixes="#default">
-<!-- <xsl:import href="&db_xsl_path;/html/chunk.xsl"/> -->
+<xsl:import href="&db_xsl_path;/html/chunk.xsl"/>
-<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl"/>
-
<xsl:include href="./collapsing-navigation.xsl"></xsl:include>
<xsl:include href="./highlight.xsl"></xsl:include>
17 years, 1 month
JBoss Tools SVN: r4943 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2007-11-16 08:37:05 -0500 (Fri, 16 Nov 2007)
New Revision: 4943
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/ELToken.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELTokenizer.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1308
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/ELToken.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/ELToken.java 2007-11-16 13:31:37 UTC (rev 4942)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/ELToken.java 2007-11-16 13:37:05 UTC (rev 4943)
@@ -24,10 +24,6 @@
public static final int EL_SEPARATOR_TOKEN = 4;
public static final int EL_STRING_TOKEN = 5;
public static final int EL_NUMBER_TOKEN = 6;
-// public static final int EL_START_ROUND_BRACKET_TOKEN = 7;
-// public static final int EL_END_ROUND_BRACKET_TOKEN = 8;
-// public static final int EL_START_SQUARE_BRACKET_TOKEN = 9;
-// public static final int EL_END_SQUARE_BRACKET_TOKEN = 10;
private int start;
private int length;
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELTokenizer.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELTokenizer.java 2007-11-16 13:31:37 UTC (rev 4942)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELTokenizer.java 2007-11-16 13:37:05 UTC (rev 4943)
@@ -43,6 +43,14 @@
private static final int STRING_SYMBOL = '\'';
private static final String RESERVED_WORDS = " null empty div and or not mod eq ne lt gt le ge true false instanceof invalid required ";
+ private SeamELTokenizer(String expression, int offset) {
+ this.offset = offset;
+ this.expression = expression;
+ index = 0;
+ fTokens = new ArrayList<ELToken>();
+ parse();
+ }
+
/**
* Constructs SeamELTokenizer object.
* Constructs SeamELTokenizer object
@@ -51,14 +59,6 @@
* then tokens are {"var1.pr"," ", "!=", " ", "var2",}
* @param expression
*/
- public SeamELTokenizer(String expression, int offset) {
- this.offset = offset;
- this.expression = expression;
- index = 0;
- fTokens = new ArrayList<ELToken>();
- parse();
- }
-
public SeamELTokenizer(String expression) {
this(expression, 0);
}
@@ -340,14 +340,4 @@
index--;
}
}
-
- public static void main(String[] args) throws Exception {
- String test = "hotelBooking.bookHotel(hotel.id, user.username).test.rrr().asss not null av.test[] ! = var2 <> var3.test3";
- System.out.println(test);
- SeamELTokenizer elTokenizer = new SeamELTokenizer(test);
- List<ELToken> tokens = elTokenizer.getTokens();
- for (ELToken token : tokens) {
- System.out.println(token);
- }
- }
}
\ No newline at end of file
17 years, 1 month
JBoss Tools SVN: r4942 - in trunk: seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2007-11-16 08:31:37 -0500 (Fri, 16 Nov 2007)
New Revision: 4942
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/support/kb/WTPKbJsfValuesResource.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/support/kb/WTPKbdBeanPropertyResource.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamPreferences.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamPreferenceInitializer.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/ELOperandToken.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/ELToken.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELCompletionEngine.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELOperandTokenizer.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELTokenizer.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamELValidator.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/messages.properties
Log:
http://jira.jboss.com/jira/browse/JBIDE-1308
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/support/kb/WTPKbJsfValuesResource.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/support/kb/WTPKbJsfValuesResource.java 2007-11-16 13:03:12 UTC (rev 4941)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/support/kb/WTPKbJsfValuesResource.java 2007-11-16 13:31:37 UTC (rev 4942)
@@ -32,7 +32,15 @@
}
protected void fillSortedProposalStrings(Set sorted, String beanName, boolean hasProperty) {
- for (int i = 0; i < fixedJsfValues.length; i++) sorted.add(fixedJsfValues[i]);
+ if((query.indexOf("#{")>-1 || query.indexOf("${")>-1)
+ && (!query.trim().endsWith("."))
+ && (!query.endsWith(")"))
+ && (!query.endsWith("]"))
+ && (beanName == null || beanName.length() == 0 || !hasProperty)) {
+ for (int i = 0; i < fixedJsfValues.length; i++) {
+ sorted.add(fixedJsfValues[i]);
+ }
+ }
}
protected int getKbProposalRelevance() {
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/support/kb/WTPKbdBeanPropertyResource.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/support/kb/WTPKbdBeanPropertyResource.java 2007-11-16 13:03:12 UTC (rev 4941)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/support/kb/WTPKbdBeanPropertyResource.java 2007-11-16 13:31:37 UTC (rev 4942)
@@ -38,6 +38,7 @@
public static String SUPPORTED_ID = WebPromptingProvider.JSF_BEAN_PROPERTIES;
public Properties type = new Properties();
+ protected String query;
public WTPKbdBeanPropertyResource(IEditorInput editorInput, WTPTextJspKbConnector connector) {
super(editorInput);
@@ -48,6 +49,7 @@
}
public Collection<KbProposal> queryProposal(String query) {
+ this.query = query;
Collection<KbProposal> proposals = new ArrayList<KbProposal>();
proposals.clear();
try {
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamPreferences.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamPreferences.java 2007-11-16 13:03:12 UTC (rev 4941)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamPreferences.java 2007-11-16 13:31:37 UTC (rev 4942)
@@ -106,8 +106,10 @@
// Seam Expression language
- // Mark Expressions which we can't resolve.
- public static final String INVALID_EXPRESSION = createSeverityOption("invalidExpression"); //$NON-NLS-1$
+ // Mark EL Variable name which we can't resolve.
+ public static final String UNKNOWN_EL_VARIABLE_NAME = createSeverityOption("unknownElVariableName"); //$NON-NLS-1$
+ // Mark EL Variable property name which we can't resolve.
+ public static final String UNKNOWN_EL_VARIABLE_PROPERTY_NAME = createSeverityOption("unknownElVariablePropertyName"); //$NON-NLS-1$
// If Expression use property of component and this property has only setter(getter) without getter(setter) then mark it.
public static final String UNPAIRED_GETTER_OR_SETTER = createSeverityOption("unpairedGetterOrSetter"); //$NON-NLS-1$
@@ -178,7 +180,8 @@
}
public static boolean isValidateEL(ISeamProject project) {
- return !(SeamPreferences.IGNORE.equals(getProjectPreference(project, INVALID_EXPRESSION)) &&
+ return !(SeamPreferences.IGNORE.equals(getProjectPreference(project, UNKNOWN_EL_VARIABLE_NAME)) &&
+ SeamPreferences.IGNORE.equals(getProjectPreference(project, UNKNOWN_EL_VARIABLE_PROPERTY_NAME)) &&
SeamPreferences.IGNORE.equals(getProjectPreference(project, UNPAIRED_GETTER_OR_SETTER)));
}
}
\ No newline at end of file
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamPreferenceInitializer.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamPreferenceInitializer.java 2007-11-16 13:03:12 UTC (rev 4941)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamPreferenceInitializer.java 2007-11-16 13:31:37 UTC (rev 4942)
@@ -31,7 +31,8 @@
for (String name : SeamPreferences.severityOptionNames) {
defaultPreferences.put(name, SeamPreferences.ERROR);
}
- defaultPreferences.put(SeamPreferences.INVALID_EXPRESSION, SeamPreferences.IGNORE);
+ defaultPreferences.put(SeamPreferences.UNKNOWN_EL_VARIABLE_NAME, SeamPreferences.IGNORE);
+ defaultPreferences.put(SeamPreferences.UNKNOWN_EL_VARIABLE_PROPERTY_NAME, SeamPreferences.WARNING);
defaultPreferences.put(SeamPreferences.UNKNOWN_VARIABLE_NAME, SeamPreferences.WARNING);
defaultPreferences.put(SeamPreferences.UNPAIRED_GETTER_OR_SETTER, SeamPreferences.IGNORE);
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/ELOperandToken.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/ELOperandToken.java 2007-11-16 13:03:12 UTC (rev 4941)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/ELOperandToken.java 2007-11-16 13:31:37 UTC (rev 4942)
@@ -19,9 +19,10 @@
*/
public class ELOperandToken implements IToken {
public static final ELOperandToken EOF = new ELOperandToken(-1, -1, null, -1);
- public static final int EL_NAME_TOKEN = 1;
- public static final int EL_METHOD_TOKEN = 2;
- public static final int EL_SEPARATOR_TOKEN = 3;
+ public static final int EL_VARIABLE_NAME_TOKEN = 1;
+ public static final int EL_PROPERTY_NAME_TOKEN = 2;
+ public static final int EL_METHOD_TOKEN = 3;
+ public static final int EL_SEPARATOR_TOKEN = 4;
int start;
int length;
@@ -93,6 +94,13 @@
}
/**
+ * Returns the token type
+ */
+ public boolean isNameToken(){
+ return EL_VARIABLE_NAME_TOKEN == type || EL_PROPERTY_NAME_TOKEN == type;
+ }
+
+ /**
* Returns the token text
*/
public String getText() {
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/ELToken.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/ELToken.java 2007-11-16 13:03:12 UTC (rev 4941)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/ELToken.java 2007-11-16 13:31:37 UTC (rev 4942)
@@ -24,6 +24,10 @@
public static final int EL_SEPARATOR_TOKEN = 4;
public static final int EL_STRING_TOKEN = 5;
public static final int EL_NUMBER_TOKEN = 6;
+// public static final int EL_START_ROUND_BRACKET_TOKEN = 7;
+// public static final int EL_END_ROUND_BRACKET_TOKEN = 8;
+// public static final int EL_START_SQUARE_BRACKET_TOKEN = 9;
+// public static final int EL_END_SQUARE_BRACKET_TOKEN = 10;
private int start;
private int length;
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 2007-11-16 13:03:12 UTC (rev 4941)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELCompletionEngine.java 2007-11-16 13:31:37 UTC (rev 4942)
@@ -20,24 +20,16 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IMember;
-import org.eclipse.jdt.core.IMethod;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.text.ITextViewer;
-import org.jboss.tools.common.model.util.EclipseJavaUtil;
import org.jboss.tools.seam.core.ISeamComponent;
import org.jboss.tools.seam.core.ISeamContextVariable;
import org.jboss.tools.seam.core.ISeamProject;
import org.jboss.tools.seam.core.ScopeType;
-import org.jboss.tools.seam.core.SeamCoreMessages;
-import org.jboss.tools.seam.core.SeamCorePlugin;
/**
* Utility class used to find Seam Project content assist proposals
@@ -185,8 +177,8 @@
if (token.getType() == ELOperandToken.EL_SEPARATOR_TOKEN)
// proceed with next token
continue;
-
- if (token.getType() == ELOperandToken.EL_NAME_TOKEN) {
+
+ if (token.isNameToken()) {
// Find properties for the token
String name = token.getText();
List<TypeInfoCollector.MemberInfo> newMembers = new ArrayList<TypeInfoCollector.MemberInfo>();
@@ -233,8 +225,9 @@
proposals.addAll(infos.getMethodPresentations());
proposals.addAll(infos.getPropertyPresentations(unpairedGettersOrSetters));
}
- } else if (token.getType() == ELOperandToken.EL_NAME_TOKEN ||
- token.getType() == ELOperandToken.EL_METHOD_TOKEN) {
+ } else if (token.getType() == ELOperandToken.EL_VARIABLE_NAME_TOKEN ||
+ token.getType() == ELOperandToken.EL_PROPERTY_NAME_TOKEN ||
+ token.getType() == ELOperandToken.EL_METHOD_TOKEN) {
// return filtered methods + properties
Set<String> proposalsToFilter = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
for (TypeInfoCollector.MemberInfo mbr : members) {
@@ -458,7 +451,7 @@
status.setLastResolvedToken(token);
continue;
}
- if (token.getType() == ELOperandToken.EL_NAME_TOKEN) {
+ if (token.isNameToken()) {
// Find properties for the token
String name = token.getText();
List<TypeInfoCollector.MemberInfo> newMembers = new ArrayList<TypeInfoCollector.MemberInfo>();
@@ -521,8 +514,9 @@
proposals.addAll(infos.getMethodPresentations());
proposals.addAll(infos.getPropertyPresentations(status.getUnpairedGettersOrSetters()));
}
- } else if (token.getType() == ELOperandToken.EL_NAME_TOKEN ||
- token.getType() == ELOperandToken.EL_METHOD_TOKEN) {
+ } else if (token.getType() == ELOperandToken.EL_VARIABLE_NAME_TOKEN ||
+ token.getType() == ELOperandToken.EL_PROPERTY_NAME_TOKEN ||
+ token.getType() == ELOperandToken.EL_METHOD_TOKEN) {
// return filtered methods + properties
Set<String> proposalsToFilter = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
for (TypeInfoCollector.MemberInfo mbr : members) {
@@ -577,7 +571,8 @@
tokens = new ArrayList<ELOperandToken>();
StringBuffer sb = new StringBuffer();
for (ELOperandToken token : tokens) {
- if (token.getType() == ELOperandToken.EL_NAME_TOKEN ||
+ if (token.getType() == ELOperandToken.EL_VARIABLE_NAME_TOKEN ||
+ token.getType() == ELOperandToken.EL_PROPERTY_NAME_TOKEN ||
token.getType() == ELOperandToken.EL_METHOD_TOKEN ||
token.getType() == ELOperandToken.EL_SEPARATOR_TOKEN) {
sb.append(token.getText());
@@ -845,7 +840,7 @@
// proceed with next token
continue;
- if (token.getType() == ELOperandToken.EL_NAME_TOKEN) {
+ if (token.isNameToken()) {
// Find properties for the token
String name = token.getText();
List<TypeInfoCollector.MemberInfo> newMembers = new ArrayList<TypeInfoCollector.MemberInfo>();
@@ -886,7 +881,8 @@
}
} else { // Last segment
Set<IJavaElement> javaElements = new HashSet<IJavaElement>();
- if (token.getType() == ELOperandToken.EL_NAME_TOKEN ||
+ if (token.getType() == ELOperandToken.EL_VARIABLE_NAME_TOKEN ||
+ token.getType() == ELOperandToken.EL_PROPERTY_NAME_TOKEN ||
token.getType() == ELOperandToken.EL_METHOD_TOKEN) {
// return filtered methods + properties
Set<TypeInfoCollector.MemberInfo> javaElementInfosToFilter = new HashSet<TypeInfoCollector.MemberInfo>();
@@ -925,8 +921,6 @@
res.addAll(javaElements);
}
}
-
return res;
}
-
}
\ No newline at end of file
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELOperandTokenizer.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELOperandTokenizer.java 2007-11-16 13:03:12 UTC (rev 4941)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELOperandTokenizer.java 2007-11-16 13:31:37 UTC (rev 4942)
@@ -74,14 +74,22 @@
ELOperandToken token;
fState = STATE_INITIAL;
while ((token = getNextToken()) != ELOperandToken.EOF) {
-
- if (token.type == ELOperandToken.EL_NAME_TOKEN ||
+ if (token.type == ELOperandToken.EL_VARIABLE_NAME_TOKEN ||
+ token.type == ELOperandToken.EL_PROPERTY_NAME_TOKEN ||
token.type == ELOperandToken.EL_METHOD_TOKEN ||
token.type == ELOperandToken.EL_SEPARATOR_TOKEN) {
fTokens.add(0, token);
}
}
+ // set first token as variable
+ for (int i=0; i<fTokens.size(); i++) {
+ token = fTokens.get(i);
+ if(token.isNameToken()) {
+ token.type = ELOperandToken.EL_VARIABLE_NAME_TOKEN;
+ break;
+ }
+ }
}
int fState;
@@ -311,16 +319,17 @@
fState = STATE_VAR;
int endOfToken = index;
int ch;
+ int type = ELOperandToken.EL_PROPERTY_NAME_TOKEN;
while((ch = readCharBackward()) != -1) {
if (!Character.isJavaIdentifierPart(ch)) {
releaseChar();
- return (endOfToken - index > 0 ? new ELOperandToken(index, endOfToken - index, getCharSequence(index, endOfToken - index), ELOperandToken.EL_NAME_TOKEN) : ELOperandToken.EOF);
+ return (endOfToken - index > 0 ? new ELOperandToken(index, endOfToken - index, getCharSequence(index, endOfToken - index), type) : ELOperandToken.EOF);
}
}
releaseChar();
- return (endOfToken - index > 0 ? new ELOperandToken(index, endOfToken - index, getCharSequence(index, endOfToken - index), ELOperandToken.EL_NAME_TOKEN) : ELOperandToken.EOF);
+ return (endOfToken - index > 0 ? new ELOperandToken(index, endOfToken - index, getCharSequence(index, endOfToken - index), type) : ELOperandToken.EOF);
}
-
+
/* Reads the next character in the document
*
* @return
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELTokenizer.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELTokenizer.java 2007-11-16 13:03:12 UTC (rev 4941)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELTokenizer.java 2007-11-16 13:31:37 UTC (rev 4942)
@@ -31,9 +31,15 @@
private String expression;
private List<ELToken> fTokens;
private int index;
+ private int offset = 0;
private int fState;
private static final String OPERATOR_SYMBOLS = "!=&(){}[]:+-*%?,|/%<>";
+// private static final String OPERATOR_SYMBOLS = "!=&{}:+-*%?,|/%<>";
+ private static final int START_ROUND_BRACKET_SYMBOL = '(';
+ private static final int END_ROUND_BRACKET_SYMBOL = ')';
+ private static final int START_SQUARE_BRACKET_SYMBOL = '[';
+ private static final int END_SQUARE_BRACKET_SYMBOL = ']';
private static final int STRING_SYMBOL = '\'';
private static final String RESERVED_WORDS = " null empty div and or not mod eq ne lt gt le ge true false instanceof invalid required ";
@@ -45,13 +51,18 @@
* then tokens are {"var1.pr"," ", "!=", " ", "var2",}
* @param expression
*/
- public SeamELTokenizer(String expression) {
+ public SeamELTokenizer(String expression, int offset) {
+ this.offset = offset;
this.expression = expression;
index = 0;
fTokens = new ArrayList<ELToken>();
parse();
}
+ public SeamELTokenizer(String expression) {
+ this(expression, 0);
+ }
+
/**
* Returns list of tokens for the expression parsed
*
@@ -68,16 +79,7 @@
ELToken token;
fState = STATE_INITIAL;
while ((token = getNextToken()) != ELToken.EOF) {
-
- if (token.getType() == ELToken.EL_VARIABLE_TOKEN ||
- token.getType() == ELToken.EL_OPERATOR_TOKEN ||
- token.getType() == ELToken.EL_RESERVED_WORD_TOKEN ||
- token.getType() == ELToken.EL_SEPARATOR_TOKEN ||
- token.getType() == ELToken.EL_STRING_TOKEN ||
- token.getType() == ELToken.EL_NUMBER_TOKEN) {
-
- fTokens.add(token);
- }
+ fTokens.add(token);
}
}
@@ -199,7 +201,7 @@
}
releaseChar();
int length = index - startOfToken;
- return (length > 0 ? new ELToken(startOfToken, length, getCharSequence(startOfToken, length), ELToken.EL_OPERATOR_TOKEN) : ELToken.EOF);
+ return (length > 0 ? new ELToken(offset + startOfToken, length, getCharSequence(startOfToken, length), ELToken.EL_OPERATOR_TOKEN) : ELToken.EOF);
}
/*
@@ -217,7 +219,7 @@
}
releaseChar();
int length = index - startOfToken;
- return (length > 0 ? new ELToken(startOfToken, length, getCharSequence(startOfToken, length), ELToken.EL_SEPARATOR_TOKEN) : ELToken.EOF);
+ return (length > 0 ? new ELToken(offset + startOfToken, length, getCharSequence(startOfToken, length), ELToken.EL_SEPARATOR_TOKEN) : ELToken.EOF);
}
/*
@@ -236,7 +238,7 @@
releaseChar();
int length = index - startOfToken;
- return (length > 0 ? new ELToken(startOfToken, length, getCharSequence(startOfToken, length), ELToken.EL_STRING_TOKEN) : ELToken.EOF);
+ return (length > 0 ? new ELToken(offset + startOfToken, length, getCharSequence(startOfToken, length), ELToken.EL_STRING_TOKEN) : ELToken.EOF);
}
/*
@@ -248,6 +250,11 @@
int startOfToken = index;
int ch;
while((ch = readNextChar()) != -1) {
+ if (ch == START_ROUND_BRACKET_SYMBOL) {
+ ch = readTokensWithinBrackets(END_ROUND_BRACKET_SYMBOL);
+ } else if (ch == START_SQUARE_BRACKET_SYMBOL) {
+ ch = readTokensWithinBrackets(END_SQUARE_BRACKET_SYMBOL);
+ }
if (!Character.isJavaIdentifierPart(ch) && ch!='.') {
break;
}
@@ -263,9 +270,23 @@
tokenType = ELToken.EL_NUMBER_TOKEN;
}
- return (length > 0 ? new ELToken(startOfToken, length, getCharSequence(startOfToken, length), tokenType) : ELToken.EOF);
+ return (length > 0 ? new ELToken(offset + startOfToken, length, getCharSequence(startOfToken, length), tokenType) : ELToken.EOF);
}
+ private int readTokensWithinBrackets(int expectedEndBracketSymbol) {
+ int start = index;
+ int ch;
+ while((ch = readNextChar()) != -1) {
+ if (ch == expectedEndBracketSymbol) {
+ CharSequence text = getCharSequence(start, index - 1 - start);
+ SeamELTokenizer tokenizer = new SeamELTokenizer(text.toString(), start);
+ fTokens.addAll(tokenizer.getTokens());
+ return readNextChar();
+ }
+ }
+ return ch;
+ }
+
private boolean isResorvedWord(String word) {
return RESERVED_WORDS.indexOf(" " + word.trim() + " ")>-1;
}
@@ -319,4 +340,14 @@
index--;
}
}
+
+ public static void main(String[] args) throws Exception {
+ String test = "hotelBooking.bookHotel(hotel.id, user.username).test.rrr().asss not null av.test[] ! = var2 <> var3.test3";
+ System.out.println(test);
+ SeamELTokenizer elTokenizer = new SeamELTokenizer(test);
+ List<ELToken> tokens = elTokenizer.getTokens();
+ for (ELToken token : tokens) {
+ System.out.println(token);
+ }
+ }
}
\ No newline at end of file
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 2007-11-16 13:03:12 UTC (rev 4941)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamELValidator.java 2007-11-16 13:31:37 UTC (rev 4942)
@@ -58,7 +58,8 @@
*/
public class SeamELValidator extends SeamValidator {
- protected static final String INVALID_EXPRESSION_MESSAGE_ID = "INVALID_EXPRESSION"; //$NON-NLS-1$
+ protected static final String UNKNOWN_EL_VARIABLE_NAME_MESSAGE_ID = "UNKNOWN_EL_VARIABLE_NAME"; //$NON-NLS-1$
+ protected static final String UNKNOWN_EL_VARIABLE_PROPERTY_NAME_MESSAGE_ID = "UNKNOWN_EL_VARIABLE_PROPERTY_NAME"; //$NON-NLS-1$
protected static final String UNPAIRED_GETTER_OR_SETTER_MESSAGE_ID = "UNPAIRED_GETTER_OR_SETTER"; //$NON-NLS-1$
protected static final String VALIDATING_EL_FILE_MESSAGE_ID = "VALIDATING_EL_FILE";
@@ -248,7 +249,6 @@
private void validateEl(IFile file, EL el) {
String exp = el.value;
-// String test = "hotelBooking.bookHotel(hotel.id, user.username) not null av.test[] ! = var2 <> var3.test3";
SeamELTokenizer elTokenizer = new SeamELTokenizer(exp);
List<ELToken> tokens = elTokenizer.getTokens();
for (ELToken token : tokens) {
@@ -263,6 +263,7 @@
String varName = operand;
int offsetOfVarName = documnetOffset + operandToken.getStart();
int lengthOfVarName = varName.length();
+ boolean unresolvedTokenIsVariable = true;
try {
int offset = operand.length();
if (!operand.endsWith(".")) { //$NON-NLS-1$
@@ -308,10 +309,11 @@
List<ELOperandToken> tokens = status.getUnresolvedTokens();
for (ELOperandToken token : tokens) {
- if((token.getType()==ELOperandToken.EL_NAME_TOKEN) || (token.getType()==ELOperandToken.EL_METHOD_TOKEN)) {
+ 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.getStart() + token.getStart();
lengthOfVarName = varName.length();
+ unresolvedTokenIsVariable = (token.getType()==ELOperandToken.EL_VARIABLE_NAME_TOKEN);
break;
}
}
@@ -323,7 +325,11 @@
SeamCorePlugin.getDefault().logError(SeamCoreMessages.SEAM_EL_VALIDATOR_ERROR_VALIDATING_SEAM_EL, e);
}
// Mark invalid EL
- addError(INVALID_EXPRESSION_MESSAGE_ID, SeamPreferences.INVALID_EXPRESSION, new String[]{varName}, lengthOfVarName, offsetOfVarName, file);
+ if(unresolvedTokenIsVariable) {
+ addError(UNKNOWN_EL_VARIABLE_NAME_MESSAGE_ID, SeamPreferences.UNKNOWN_EL_VARIABLE_NAME, new String[]{varName}, lengthOfVarName, offsetOfVarName, file);
+ } else {
+ addError(UNKNOWN_EL_VARIABLE_PROPERTY_NAME_MESSAGE_ID, SeamPreferences.UNKNOWN_EL_VARIABLE_PROPERTY_NAME, new String[]{varName}, lengthOfVarName, offsetOfVarName, file);
+ }
}
public static class EL {
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 2007-11-16 13:03:12 UTC (rev 4941)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/messages.properties 2007-11-16 13:31:37 UTC (rev 4942)
@@ -41,7 +41,8 @@
UNKNOWN_VARIABLE_NAME=Unknown context variable name: {0}
#Seam Expression language
-INVALID_EXPRESSION={0} cannot be resolved
+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.
#Messages for Progress Monitor
17 years, 1 month
JBoss Tools SVN: r4941 - trunk/hibernatetools/docs.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2007-11-16 08:03:12 -0500 (Fri, 16 Nov 2007)
New Revision: 4941
Modified:
trunk/hibernatetools/docs/
Log:
add ignore
Property changes on: trunk/hibernatetools/docs
___________________________________________________________________
Name: svn:ignore
+ build
17 years, 1 month
JBoss Tools SVN: r4940 - trunk/documentation/qa.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2007-11-16 08:02:58 -0500 (Fri, 16 Nov 2007)
New Revision: 4940
Modified:
trunk/documentation/qa/
Log:
add ignore
Property changes on: trunk/documentation/qa
___________________________________________________________________
Name: svn:ignore
+ build
17 years, 1 month
JBoss Tools SVN: r4939 - in trunk/core/plugins: org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/wizards/pages and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2007-11-16 07:36:22 -0500 (Fri, 16 Nov 2007)
New Revision: 4939
Modified:
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/ArchivesModelCore.java
trunk/core/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/wizards/pages/FilesetInfoWizardPage.java
Log:
JBIDE-1325 better fix
Modified: trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/ArchivesModelCore.java
===================================================================
--- trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/ArchivesModelCore.java 2007-11-16 09:49:59 UTC (rev 4938)
+++ trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/ArchivesModelCore.java 2007-11-16 12:36:22 UTC (rev 4939)
@@ -91,6 +91,8 @@
public static IPath[] findMatchingPaths(IPath root, String includes, String excludes) {
try {
+ if(root==null) return new IPath[0];
+
DirectoryScanner scanner =
DirectoryScannerFactory.createDirectoryScanner(root, includes, excludes, true);
String[] files = scanner.getIncludedFiles();
@@ -102,8 +104,6 @@
} catch( IllegalStateException ise ) {
ArchivesCoreLog.log(IStatus.WARNING, "Error creating directory scanner", ise);
return new IPath[]{};
- } catch( NullPointerException npe ) {
- return new IPath[]{};
}
}
Modified: trunk/core/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/wizards/pages/FilesetInfoWizardPage.java
===================================================================
--- trunk/core/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/wizards/pages/FilesetInfoWizardPage.java 2007-11-16 09:49:59 UTC (rev 4938)
+++ trunk/core/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/wizards/pages/FilesetInfoWizardPage.java 2007-11-16 12:36:22 UTC (rev 4939)
@@ -2,6 +2,7 @@
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
@@ -296,7 +297,16 @@
} else {
rootProjectLabel.setText(parentNode.getProjectPath().lastSegment());
rootDirIsWorkspaceRelative = true;
- rootDir = ResourcesPlugin.getWorkspace().getRoot().getProject(parentNode.getProjectPath().lastSegment()).getLocation();
+
+ // Done since the parentNode.getProjectPath() project might be *outside* the workspace. Shouldn't the parentNode have a getProject() instead ?
+ IContainer[] findContainersForLocation = ResourcesPlugin.getWorkspace().getRoot().findContainersForLocation(parentNode.getProjectPath());
+ for (int i = 0; i < findContainersForLocation.length; i++) {
+ IContainer container = findContainersForLocation[i];
+ if(container.getType()==IResource.PROJECT) {
+ rootDir = container.getLocation();
+ continue;
+ }
+ }
}
}
17 years, 1 month
JBoss Tools SVN: r4938 - in trunk/documentation/guides/userguide/Legacy-jsf-struts/en: modules and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: sabrashevich
Date: 2007-11-16 04:49:59 -0500 (Fri, 16 Nov 2007)
New Revision: 4938
Added:
trunk/documentation/guides/userguide/Legacy-jsf-struts/en/images/struts_validation/struts_validation.png
trunk/documentation/guides/userguide/Legacy-jsf-struts/en/images/struts_validation/struts_validation_2.png
Modified:
trunk/documentation/guides/userguide/Legacy-jsf-struts/en/modules/struts_validation.xml
Log:
http://jira.jboss.com/jira/browse/RHDS-308 corrected defining rule, added new screenshots
Added: trunk/documentation/guides/userguide/Legacy-jsf-struts/en/images/struts_validation/struts_validation.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/guides/userguide/Legacy-jsf-struts/en/images/struts_validation/struts_validation.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/guides/userguide/Legacy-jsf-struts/en/images/struts_validation/struts_validation_2.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/guides/userguide/Legacy-jsf-struts/en/images/struts_validation/struts_validation_2.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/documentation/guides/userguide/Legacy-jsf-struts/en/modules/struts_validation.xml
===================================================================
--- trunk/documentation/guides/userguide/Legacy-jsf-struts/en/modules/struts_validation.xml 2007-11-16 08:59:22 UTC (rev 4937)
+++ trunk/documentation/guides/userguide/Legacy-jsf-struts/en/modules/struts_validation.xml 2007-11-16 09:49:59 UTC (rev 4938)
@@ -31,22 +31,47 @@
server side validation. You need to enable validation as a part of the project, define an error message, and tie it into an appropriate part of the application.</para>
<itemizedlist>
-<listitem><para>Right-click on a plug-ins node under the <emphasis><property>StrutsHello > Configuration > default > struts-config.xml</property></emphasis> node in the Web Projects view and select <emphasis><property>Create Special Plugin > Validators</property></emphasis> from the context menu</para></listitem>
+<listitem><para>Right-click on a "plug-ins" node under the <emphasis><property>StrutsHello > Configuration > default > struts-config.xml</property></emphasis> node in the Web Projects view and select <emphasis><property>Create Special Plugin > Validators</property></emphasis> from the context menu</para></listitem>
<listitem><para>Further down in the Web Projects view, right-click on the
-<emphasis><property>StrutsHello > ResourceBundles</property></emphasis> node and select <emphasis><property> New > Properties File...</property></emphasis>from the context menu</para></listitem>
+<emphasis><property>StrutsHello > ResourceBundles</property></emphasis> node and select <emphasis><property> New > Properties File...</property></emphasis>from the context menu</para></listitem>
<listitem><para>In the dialog box, click on the <emphasis><property>Browse...</property></emphasis>button next to the Folder field, expand the
JavaSource folder in this next dialog box, select the sample subfolder, and click on the <emphasis><property>OK</property></emphasis> button</para></listitem>
- <listitem><para>Back in the first dialog box, type in applResources for the Name field and click on the <emphasis><property>Finish</property></emphasis> button</para></listitem>
-<listitem><para>Right-click on a newly created file and select <emphasis><property>Add > Default Error Messages</property></emphasis>
+ <listitem><para>Back in the first dialog box, type in "applResources" for the Name field and click on the <emphasis><property>Finish</property></emphasis> button</para></listitem>
+<listitem><para>Right-click on a newly created file and select <emphasis><property>Add > Default Error Messages</property></emphasis>
from the context menu</para></listitem>
<listitem><para>Drag up the sample.applResources icon until you can drop it on the resources folder under struts-config.xml</para></listitem>
<listitem><para>Select<emphasis><property> File > Save </property></emphasis>All from the menu bar</para></listitem>
<listitem><para>Select validation.xml under the <emphasis><property>StrutsHello > Validation</property></emphasis> node and double-click it to open it with the JBoss Tools XML Editor</para></listitem>
-<listitem><para>Expand the form-beans node under the <emphasis><property>StrutsHello > Configuration > default > struts-config.xml node.</property></emphasis> Then, drag the form bean GetNameForm and drop it onto a formset (default) in the <property>XML</property> Editor</para></listitem>
+</itemizedlist>
+<para>Here you must create a Formset.</para>
+<itemizedlist>
+<listitem><para>In the validation.xml file editor click the button <emphasis><property>Create Formset</property></emphasis> on the panel <emphasis><property>Formsets</property></emphasis></para></listitem>
+<listitem><para>In the dialog <emphasis><property>Add Formset</property></emphasis> fill the fields <emphasis><property>Language</property></emphasis> and <emphasis><property>Country</property></emphasis> or just leave them empty to create a default formset. Click <emphasis><property>OK</property></emphasis></para></listitem>
+</itemizedlist>
+<figure>
+ <title>Create Formset</title>
+<mediaobject>
+ <imageobject>
+ <imagedata fileref="images/struts_validation/struts_validation.png"/>
+ </imageobject>
+</mediaobject>
+</figure>
+<itemizedlist>
+<listitem><para>Expand the "form-beans" node under the <emphasis><property>StrutsHello > Configuration > default > struts-config.xml node.</property></emphasis> Then, drag the form bean "GetNameForm" and drop it onto a formset in the <property>XML</property> Editor</para></listitem>
<listitem><para>In the Validation Editor, expand the formset node, right-click GetNameForm, and select <emphasis><property>Create Field...</property></emphasis> from the context menu</para></listitem>
-<listitem><para>Enter a name for Property in the dialog box</para></listitem>
-<listitem><para>In the properties for the name field to the right of the "tree" for the validation.xml file, click on the <emphasis><property>Change...</property></emphasis>button next to the Depends entry field</para></listitem>
+<listitem><para>Enter a name for Property in the dialog box. A new property will be created:</para></listitem>
+</itemizedlist>
+<figure>
+ <title>New Property Is Added</title>
+<mediaobject>
+ <imageobject>
+ <imagedata fileref="images/struts_validation/struts_validation_2.png"/>
+ </imageobject>
+</mediaobject>
+</figure>
+<itemizedlist>
+<listitem><para>In the Properties view for the name field to the right of the "tree" for the validation.xml file, click on the <emphasis><property>Change...</property></emphasis>button next to the Depends entry field</para></listitem>
<listitem><para>In the displayed double list, select <emphasis><property>required</property></emphasis> from the left list and then click <emphasis><property>Add</property></emphasis></para></listitem>
<listitem><para>Click <emphasis><property>Ok</property></emphasis></para></listitem>
<listitem><para>Right-click name and select <emphasis><property>Add Arg...</property></emphasis> from the context menu</para></listitem>
17 years, 1 month
JBoss Tools SVN: r4937 - in trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui: internal/project/facet and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2007-11-16 03:59:22 -0500 (Fri, 16 Nov 2007)
New Revision: 4937
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamUIMessages.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/ValidatorFactory.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/messages.properties
Log:
http://jira.jboss.org/jira/browse/JBIDE-1322
So what I have commited.
Seam project that enabled Seam Support by project 'Seam Settings' preference page is excluded from Seam artifacts wizards. If it is selected in navigator and Seam artifact wizard called, selected project will not appear by default in 'Seam Project' field. It will not appear in browse dialog for 'Seam Project' field.
This fix at least NPE.
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamUIMessages.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamUIMessages.java 2007-11-16 08:50:01 UTC (rev 4936)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamUIMessages.java 2007-11-16 08:59:22 UTC (rev 4937)
@@ -377,6 +377,8 @@
public static String VALIDATOR_FACTORY_SEAM_RUNTIME_IS_NOT_SELECTED;
+ public static String VALIDATOR_FACTORY_SELECTED_PRJ_IS_CLOSED;
+
public static String VALIDATOR_FACTORY_SELECTED_PROJECT;
public static String VALIDATOR_FACTORY_TEST_PROJECT;
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/ValidatorFactory.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/ValidatorFactory.java 2007-11-16 08:50:01 UTC (rev 4936)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/ValidatorFactory.java 2007-11-16 08:59:22 UTC (rev 4937)
@@ -38,6 +38,8 @@
import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
import org.jboss.tools.seam.core.ISeamProject;
import org.jboss.tools.seam.core.SeamCorePlugin;
+import org.jboss.tools.seam.core.SeamPreferences;
+import org.jboss.tools.seam.core.project.facet.SeamProjectPreferences;
import org.jboss.tools.seam.core.project.facet.SeamRuntime;
import org.jboss.tools.seam.core.project.facet.SeamRuntimeManager;
import org.jboss.tools.seam.internal.core.project.facet.ISeamFacetDataModelProperties;
@@ -149,7 +151,7 @@
}
String version = (String) context;
- if(version.startsWith("2.0")) {
+ if(version.startsWith("2.0")) { //$NON-NLS-1$
File seamJarFile = new File(value.toString(), "lib/jboss-seam.jar"); //$NON-NLS-1$
if (!seamJarFile.isFile()) {
errors = createErrorMap();
@@ -354,12 +356,17 @@
if (!selection.hasNature(ISeamProject.NATURE_ID)
|| SeamCorePlugin.getSeamPreferences(selection)==null
|| selection.getAdapter(IFacetedProject.class)==null
- || !((IFacetedProject)selection.getAdapter(IFacetedProject.class)).hasProjectFacet(ProjectFacetsManager.getProjectFacet("jst.web"))) { //$NON-NLS-1$
+ || !((IFacetedProject)selection.getAdapter(IFacetedProject.class)).hasProjectFacet(ProjectFacetsManager.getProjectFacet("jst.web"))
+ || "".equals(SeamCorePlugin.getSeamPreferences(selection).get(ISeamFacetDataModelProperties.JBOSS_AS_DEPLOY_AS, ""))) { //$NON-NLS-1$
return createErrormessage(
SeamUIMessages.VALIDATOR_FACTORY_SELECTED_PROJECT + project.getName() + SeamUIMessages.VALIDATOR_FACTORY_IS_NOT_A_SEAM_WEB_PROJECT);
+ } else {
+ //TODO validate project(s) structure
}
} catch (CoreException e) {
- SeamCorePlugin.getPluginLog().logError(e);
+ // it might happen only if project is closed and project
+ // name typed by hand
+ return createErrormessage(NLS.bind(SeamUIMessages.VALIDATOR_FACTORY_SELECTED_PRJ_IS_CLOSED, project.getName()));
}
}
return NO_ERRORS;
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/messages.properties
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/messages.properties 2007-11-16 08:50:01 UTC (rev 4936)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/messages.properties 2007-11-16 08:59:22 UTC (rev 4937)
@@ -125,7 +125,7 @@
VALIDATOR_FACTORY_SEAM_HOME_FOLDER_DOES_NOT_EXISTS=Seam Home folder doesn't exist
VALIDATOR_FACTORY_SEAM_RT_HOME_DIR_DOES_NOT_EXIST=Seam Runtime ''{0}'' home directory doesn't exist for selected Seam Web Project
VALIDATOR_FACTORY_SEAM_RT_HOME_DIR_IS_MISSING=Seam Runtime ''{0}'' home directory doesn't exist
-VALIDATOR_FACTORY_SEAM_RT_RESOURCES_DIR_IS_MISSING=Seam Runtime '{0)' resource templates directory doesn't exist
+VALIDATOR_FACTORY_SEAM_RT_RESOURCES_DIR_IS_MISSING=Seam Runtime ''{0}'' resource templates directory doesn't exist
VALIDATOR_FACTORY_SEAM_RT_TEMPLATES_DIR_DOES_NOT_EXIST=Seam Runtime ''{0}'' templates directory doesn't exist for selected Seam Web Project
VALIDATOR_FACTORY_SEAM_RT_TEMPLATES_DIR_IS_MISSING=Seam Runtime ''{0}'' templates directory doesn't exist
VALIDATOR_FACTORY_SEAM_RT_VIE_TEMPLATE_DIR_DOES_NOT_EXIST=Seam Runtime ''{0}'' view templates directory doesn't exist for selected Seam Web Project
@@ -141,6 +141,7 @@
VALIDATOR_FACTORY_PROJECT=Project '
VALIDATOR_FACTORY_DOES_NOT_EXIST=' doesn't exist.
VALIDATOR_FACTORY_SELECTED_PROJECT=Selected project '
+VALIDATOR_FACTORY_SELECTED_PRJ_IS_CLOSED=Selected project ''{0}'' is closed
VALIDATOR_FACTORY_PRJ_NOT_SELECTED=Project is not selected
VALIDATOR_FACTORY_IS_NOT_A_SEAM_WEB_PROJECT=' is not a Seam Web Project
VALIDATOR_FACTORY_CONNECTION_PROFILE_IS_NOT_SELECTED=Connection profile is not selected
@@ -192,5 +193,5 @@
SEAM_FORM_WIZARD_PAGE1_JAVA_INTERFACE_SLSB_AND_KEY_SEAMEJB3_ANNOTATIONS_WILL_BE_CREATED=Java Interface, SLSB and key Seam/EJB3 annotations will be created.
SEAM_TARGET_SERVER=Target Server
RUNTIME_DELETE_CONFIRM_TITLE=Confirm Runtime Delete
-RUNTIME_DELETE_NOT_USED_CONFIRM=Are you sure you want to delete runtime {0}?
-RUNTIME_DELETE_USED_CONFIRM=Runtime {0} is used by seam projects. Are you sure you want to delete it?
\ No newline at end of file
+RUNTIME_DELETE_NOT_USED_CONFIRM=Are you sure you want to delete runtime ''{0}''?
+RUNTIME_DELETE_USED_CONFIRM=Runtime ''{0}'' is used by seam projects. Are you sure you want to delete it?
\ No newline at end of file
17 years, 1 month