JBoss Tools SVN: r4123 - in trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core: validation and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2007-10-11 13:41:32 -0400 (Thu, 11 Oct 2007)
New Revision: 4123
Added:
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/SeamELOperandTokenizer.java
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/validation/SeamELValidator.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1039
Added: 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 (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/ELOperandToken.java 2007-10-11 17:41:32 UTC (rev 4123)
@@ -0,0 +1,115 @@
+ /*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.seam.internal.core.el;
+
+import org.eclipse.jface.text.rules.IToken;
+
+/**
+ * Token for the EX expression operand parts
+ *
+ * @author Jeremy
+ */
+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;
+
+ int start;
+ int length;
+ CharSequence chars;
+ int type;
+
+ /**
+ * Constructs the ELToken object
+ *
+ * @param start
+ * @param length
+ * @param chars
+ * @param type
+ */
+ public ELOperandToken(int start, int length, CharSequence chars, int type) {
+ this.start = start;
+ this.length = length;
+ this.chars = chars;
+ this.type = type;
+ }
+
+ /**
+ * Returns string representation for the token
+ */
+ public String toString() {
+ return "ELToken(" + start + ", " + length + ", " + type + ") [" + (chars == null ? "<Empty>" : chars.toString()) + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
+ }
+
+ /*
+ * @see org.eclipse.jface.text.rules.IToken#getData()
+ */
+ public Object getData() {
+ return (chars == null ? null : chars.subSequence(start, start+length).toString());
+ }
+
+ /*
+ * @see org.eclipse.jface.text.rules.IToken#isEOF()
+ */
+ public boolean isEOF() {
+ return (start == -1 && length == -1 && chars == null);
+ }
+
+ /*
+ * @see org.eclipse.jface.text.rules.IToken#isOther()
+ */
+ public boolean isOther() {
+ return false;
+ }
+
+ /*
+ * @see org.eclipse.jface.text.rules.IToken#isUndefined()
+ */
+ public boolean isUndefined() {
+ return false;
+ }
+
+ /*
+ * @see org.eclipse.jface.text.rules.IToken#isWhitespace()
+ */
+ public boolean isWhitespace() {
+ return false;
+ }
+
+ /**
+ * Returns the token type
+ */
+ public int getType(){
+ return type;
+ }
+
+ /**
+ * Returns the token text
+ */
+ public String getText() {
+ return chars.toString();
+ }
+
+ /**
+ * @return offset of token
+ */
+ public int getStart() {
+ return start;
+ }
+
+ /**
+ * @return length of token
+ */
+ public int getLength() {
+ return length;
+ }
+}
\ No newline at end of file
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELCompletionEngine.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELCompletionEngine.java 2007-10-11 16:53:32 UTC (rev 4122)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELCompletionEngine.java 2007-10-11 17:41:32 UTC (rev 4123)
@@ -405,337 +405,6 @@
}
/**
- * EL string parser.
- * Creates list of tokens for the name, method and separator parts
- *
- * @author Jeremy
- */
- public static class SeamELOperandTokenizer {
- static final int STATE_INITIAL = 0;
- static final int STATE_VAR = 1;
- static final int STATE_METHOD = 2;
- static final int STATE_SEPARATOR = 3;
-
- String documentContent;
- List<ELOperandToken> fTokens;
- int index;
-
- /**
- * Constructs SeamELTokenizer object.
- * Parse expression from offset to first operator or space.
- * Tokenizer parses document from offset to beginning.
- * For example: documentContetn is '<tag attr="#{var1.pr!=var2.pr}"/>'
- * offset = 29 ("...var2.pr|}")
- * then tokens are {"pr",".","var2"}
- * @param documentContent
- * @param offset
- */
- public SeamELOperandTokenizer(String documentContent, int offset) {
- this.documentContent = documentContent;
- index = (documentContent == null || documentContent.length() < offset? -1 : offset);
- fTokens = new ArrayList<ELOperandToken>();
- parseBackward();
- }
-
- /**
- * Constructs SeamELTokenizer object.
- * @param document
- * @param offset
- */
- public SeamELOperandTokenizer(IDocument document, int offset) {
- this(document.get(), offset);
- }
-
- /**
- * Returns list of tokens for the expression parsed
- *
- * @return
- */
- public List<ELOperandToken> getTokens() {
- return fTokens;
- }
-
- /*
- * Performs backward parsing of document text for expression
- */
- private void parseBackward() {
- ELOperandToken token;
- fState = STATE_INITIAL;
- while ((token = getNextToken()) != ELOperandToken.EOF) {
-
- if (token.type == ELOperandToken.EL_NAME_TOKEN ||
- token.type == ELOperandToken.EL_METHOD_TOKEN ||
- token.type == ELOperandToken.EL_SEPARATOR_TOKEN) {
-
- fTokens.add(0, token);
- }
- }
- }
-
- int fState;
- int fEndOfToken;
-
- /*
- * Calculates and returns next token for expression
- *
- * @return
- */
- private ELOperandToken getNextToken() {
- switch (fState) {
- case STATE_INITIAL: // Just started
- {
- int ch = readCharBackward();
- if (ch == -1) {
- return ELOperandToken.EOF;
- }
- if (Character.isJavaIdentifierPart((char)ch)) {
- releaseChar();
- return readVarToken();
- }
- if (ch == '.') {
- releaseChar();
- return readSeparatorToken();
- }
- if (ch == ')') {
- releaseChar();
- return readMethodToken();
- }
- releaseChar();
- return ELOperandToken.EOF;
- }
- case STATE_VAR: // Variable name is read - expecting a separator
- {
- int ch = readCharBackward();
- if (ch == -1) {
- return ELOperandToken.EOF;
- }
- if (ch == '.') {
- releaseChar();
- return readSeparatorToken();
- }
- releaseChar();
- return ELOperandToken.EOF;
- }
- case STATE_METHOD: // Method name and parameters are read - expecting a separator
- {
- int ch = readCharBackward();
- if (ch == -1) {
- return ELOperandToken.EOF;
- }
- if (ch == '.') {
- releaseChar();
- return readSeparatorToken();
- }
- releaseChar();
- return ELOperandToken.EOF;
- }
- case STATE_SEPARATOR: // Separator is read - expecting a var or method
- {
- int ch = readCharBackward();
- if (ch == -1) {
- return ELOperandToken.EOF;
- }
- if (Character.isJavaIdentifierPart((char)ch)) {
- releaseChar();
- return readVarToken();
- }
- if (ch == ')') {
- releaseChar();
- return readMethodToken();
- }
- releaseChar();
- return ELOperandToken.EOF;
- }
- }
- return ELOperandToken.EOF;
- }
-
- /* Reads and returns the method token from the expression
- *
- * @return
- */
- ELOperandToken readMethodToken() {
- fState = STATE_METHOD;
- int endOfToken = index;
-
- // read the method parameters
- if (!skipMethodParameters())
- return ELOperandToken.EOF;
-
- // skip spaces between the method's name and it's parameters
- if (!skipSpaceChars())
- return ELOperandToken.EOF;
- // read the method name
- if (!skipMethodName())
- return ELOperandToken.EOF;
-
- return (endOfToken - index > 0 ? new ELOperandToken(index, endOfToken - index, getCharSequence(index, endOfToken - index), ELOperandToken.EL_METHOD_TOKEN) : ELOperandToken.EOF);
- }
-
- /*
- * Returns the CharSequence object
- *
- * @param start
- * @param length
- * @return
- */
- private CharSequence getCharSequence(int start, int length) {
- String text = ""; //$NON-NLS-1$
- try {
- text = documentContent.substring(start, start + length);
- } catch (StringIndexOutOfBoundsException e) {
- SeamCorePlugin.getDefault().logError(e);
- text = ""; // For sure //$NON-NLS-1$
- }
- return text.subSequence(0, text.length());
- }
-
-
- /*
- * Skips the space characters in the document
- */
- boolean skipSpaceChars() {
- int ch;
- while ((ch = readCharBackward()) != -1) {
- if (!Character.isSpaceChar(ch)) {
- releaseChar();
- break;
- }
- }
- return true;
- }
-
- /*
- * Skips the method name characters in the document
- *
- * @return boolean true if at least 1 character had been read
- */
- boolean skipMethodName() {
- int endOfToken = index;
- int ch;
- while((ch = readCharBackward()) != -1) {
- if (!Character.isJavaIdentifierPart(ch)) {
- releaseChar();
- return (endOfToken - index > 0);
- }
- }
- return false;
- }
-
- /*
- * Skips the method parameters characters in the document
- *
- * @return boolean true if complete parameters set had been read
- */
- boolean skipMethodParameters() {
- int ch = readCharBackward();
- if (ch != ')')
- return false;
- int pCount = 1;
- while (pCount > 0) {
- ch = readCharBackward();
- if (ch == -1)
- return false;
-
- if (ch == '"' || ch == '\'') {
- skipQuotedChars((char)ch);
- continue;
- }
- if (ch == ')') {
- pCount++;
- continue;
- }
- if (ch == '(') {
- pCount--;
- continue;
- }
- }
- return true;
- }
-
- /*
- * Skips the quoted characters
- *
- */
- void skipQuotedChars(char pair) {
- int ch = readCharBackward();
-
- while (ch != -1) {
- if (ch == pair) {
- ch = readCharBackward();
- if (ch == '\\') {
- int backSlashCount = 0;
- while (ch == '\\') {
- backSlashCount++;
- ch = readCharBackward();
- }
- releaseChar(); // Return the last non-slash char to the buffer
- if ((backSlashCount/2)*2 == backSlashCount) {
- return;
- }
- }
- }
- ch = readCharBackward();
- }
- }
-
- /* Reads and returns the separator token from the expression
- *
- * @return
- */
- ELOperandToken readSeparatorToken() {
- fState = STATE_SEPARATOR;
- int ch = readCharBackward();
-
- return (ch == '.' ? new ELOperandToken(index, 1, getCharSequence(index, 1), ELOperandToken.EL_SEPARATOR_TOKEN) :
- ELOperandToken.EOF);
- }
-
- /* Reads and returns the variable token from the expression
- *
- * @return
- */
- ELOperandToken readVarToken() {
- fState = STATE_VAR;
- int endOfToken = index;
- int ch;
- 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);
- }
- }
- releaseChar();
- return (endOfToken - index > 0 ? new ELOperandToken(index, endOfToken - index, getCharSequence(index, endOfToken - index), ELOperandToken.EL_NAME_TOKEN) : ELOperandToken.EOF);
- }
-
- /* Reads the next character in the document
- *
- * @return
- */
- int readCharBackward() {
- if (--index < 0 ||
- documentContent == null ||
- documentContent.length() <= index)
- return -1;
-
- try {
- return documentContent.charAt(index);
- } catch (StringIndexOutOfBoundsException e) {
- return -1;
- }
- }
-
- /*
- * returns the character to the document
- */
- void releaseChar() {
- if (index < documentContent.length())
- index++;
- }
- }
-
- /**
* Calculates the EX expression operand string
*
* @param viewer
@@ -975,92 +644,4 @@
return res;
}
-}
-
-/**
- * Token for the EX expression operand parts
- *
- * @author Jeremy
- */
-class ELOperandToken implements IToken {
- static final ELOperandToken EOF = new ELOperandToken(-1, -1, null, -1);
- static final int EL_NAME_TOKEN = 1;
- static final int EL_METHOD_TOKEN = 2;
- static final int EL_SEPARATOR_TOKEN = 3;
-
- int start;
- int length;
- CharSequence chars;
- int type;
-
- /**
- * Constructs the ELToken object
- *
- * @param start
- * @param length
- * @param chars
- * @param type
- */
- public ELOperandToken(int start, int length, CharSequence chars, int type) {
- this.start = start;
- this.length = length;
- this.chars = chars;
- this.type = type;
- }
-
- /**
- * Returns string representation for the token
- */
- public String toString() {
- return "ELToken(" + start + ", " + length + ", " + type + ") [" + (chars == null ? "<Empty>" : chars.toString()) + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
- }
-
- /*
- * @see org.eclipse.jface.text.rules.IToken#getData()
- */
- public Object getData() {
- return (chars == null ? null : chars.subSequence(start, start+length).toString());
- }
-
- /*
- * @see org.eclipse.jface.text.rules.IToken#isEOF()
- */
- public boolean isEOF() {
- return (start == -1 && length == -1 && chars == null);
- }
-
- /*
- * @see org.eclipse.jface.text.rules.IToken#isOther()
- */
- public boolean isOther() {
- return false;
- }
-
- /*
- * @see org.eclipse.jface.text.rules.IToken#isUndefined()
- */
- public boolean isUndefined() {
- return false;
- }
-
- /*
- * @see org.eclipse.jface.text.rules.IToken#isWhitespace()
- */
- public boolean isWhitespace() {
- return false;
- }
-
- /*
- * Returns the token type
- */
- public int getType(){
- return type;
- }
-
- /*
- * Returns the token text
- */
- public String getText() {
- return chars.toString();
- }
}
\ No newline at end of file
Added: 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 (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELOperandTokenizer.java 2007-10-11 17:41:32 UTC (rev 4123)
@@ -0,0 +1,348 @@
+ /*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.seam.internal.core.el;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.text.IDocument;
+import org.jboss.tools.seam.core.SeamCorePlugin;
+
+/**
+ * EL string parser.
+ * Creates list of tokens for the name, method and separator parts
+ *
+ * @author Jeremy
+ */
+public class SeamELOperandTokenizer {
+ static final int STATE_INITIAL = 0;
+ static final int STATE_VAR = 1;
+ static final int STATE_METHOD = 2;
+ static final int STATE_SEPARATOR = 3;
+
+ String documentContent;
+ List<ELOperandToken> fTokens;
+ int index;
+
+ /**
+ * Constructs SeamELTokenizer object.
+ * Parse expression from offset to first operator or space.
+ * Tokenizer parses document from offset to beginning.
+ * For example: documentContetn is '<tag attr="#{var1.pr!=var2.pr}"/>'
+ * offset = 29 ("...var2.pr|}")
+ * then tokens are {"pr",".","var2"}
+ * @param documentContent
+ * @param offset
+ */
+ public SeamELOperandTokenizer(String documentContent, int offset) {
+ this.documentContent = documentContent;
+ index = (documentContent == null || documentContent.length() < offset? -1 : offset);
+ fTokens = new ArrayList<ELOperandToken>();
+ parseBackward();
+ }
+
+ /**
+ * Constructs SeamELTokenizer object.
+ * @param document
+ * @param offset
+ */
+ public SeamELOperandTokenizer(IDocument document, int offset) {
+ this(document.get(), offset);
+ }
+
+ /**
+ * Returns list of tokens for the expression parsed
+ *
+ * @return
+ */
+ public List<ELOperandToken> getTokens() {
+ return fTokens;
+ }
+
+ /*
+ * Performs backward parsing of document text for expression
+ */
+ private void parseBackward() {
+ ELOperandToken token;
+ fState = STATE_INITIAL;
+ while ((token = getNextToken()) != ELOperandToken.EOF) {
+
+ if (token.type == ELOperandToken.EL_NAME_TOKEN ||
+ token.type == ELOperandToken.EL_METHOD_TOKEN ||
+ token.type == ELOperandToken.EL_SEPARATOR_TOKEN) {
+
+ fTokens.add(0, token);
+ }
+ }
+ }
+
+ int fState;
+ int fEndOfToken;
+
+ /*
+ * Calculates and returns next token for expression
+ *
+ * @return
+ */
+ private ELOperandToken getNextToken() {
+ switch (fState) {
+ case STATE_INITIAL: // Just started
+ {
+ int ch = readCharBackward();
+ if (ch == -1) {
+ return ELOperandToken.EOF;
+ }
+ if (Character.isJavaIdentifierPart((char)ch)) {
+ releaseChar();
+ return readVarToken();
+ }
+ if (ch == '.') {
+ releaseChar();
+ return readSeparatorToken();
+ }
+ if (ch == ')') {
+ releaseChar();
+ return readMethodToken();
+ }
+ releaseChar();
+ return ELOperandToken.EOF;
+ }
+ case STATE_VAR: // Variable name is read - expecting a separator
+ {
+ int ch = readCharBackward();
+ if (ch == -1) {
+ return ELOperandToken.EOF;
+ }
+ if (ch == '.') {
+ releaseChar();
+ return readSeparatorToken();
+ }
+ releaseChar();
+ return ELOperandToken.EOF;
+ }
+ case STATE_METHOD: // Method name and parameters are read - expecting a separator
+ {
+ int ch = readCharBackward();
+ if (ch == -1) {
+ return ELOperandToken.EOF;
+ }
+ if (ch == '.') {
+ releaseChar();
+ return readSeparatorToken();
+ }
+ releaseChar();
+ return ELOperandToken.EOF;
+ }
+ case STATE_SEPARATOR: // Separator is read - expecting a var or method
+ {
+ int ch = readCharBackward();
+ if (ch == -1) {
+ return ELOperandToken.EOF;
+ }
+ if (Character.isJavaIdentifierPart((char)ch)) {
+ releaseChar();
+ return readVarToken();
+ }
+ if (ch == ')') {
+ releaseChar();
+ return readMethodToken();
+ }
+ releaseChar();
+ return ELOperandToken.EOF;
+ }
+ }
+ return ELOperandToken.EOF;
+ }
+
+ /* Reads and returns the method token from the expression
+ *
+ * @return
+ */
+ ELOperandToken readMethodToken() {
+ fState = STATE_METHOD;
+ int endOfToken = index;
+
+ // read the method parameters
+ if (!skipMethodParameters())
+ return ELOperandToken.EOF;
+
+ // skip spaces between the method's name and it's parameters
+ if (!skipSpaceChars())
+ return ELOperandToken.EOF;
+ // read the method name
+ if (!skipMethodName())
+ return ELOperandToken.EOF;
+
+ return (endOfToken - index > 0 ? new ELOperandToken(index, endOfToken - index, getCharSequence(index, endOfToken - index), ELOperandToken.EL_METHOD_TOKEN) : ELOperandToken.EOF);
+ }
+
+ /*
+ * Returns the CharSequence object
+ *
+ * @param start
+ * @param length
+ * @return
+ */
+ private CharSequence getCharSequence(int start, int length) {
+ String text = ""; //$NON-NLS-1$
+ try {
+ text = documentContent.substring(start, start + length);
+ } catch (StringIndexOutOfBoundsException e) {
+ SeamCorePlugin.getDefault().logError(e);
+ text = ""; // For sure //$NON-NLS-1$
+ }
+ return text.subSequence(0, text.length());
+ }
+
+
+ /*
+ * Skips the space characters in the document
+ */
+ boolean skipSpaceChars() {
+ int ch;
+ while ((ch = readCharBackward()) != -1) {
+ if (!Character.isSpaceChar(ch)) {
+ releaseChar();
+ break;
+ }
+ }
+ return true;
+ }
+
+ /*
+ * Skips the method name characters in the document
+ *
+ * @return boolean true if at least 1 character had been read
+ */
+ boolean skipMethodName() {
+ int endOfToken = index;
+ int ch;
+ while((ch = readCharBackward()) != -1) {
+ if (!Character.isJavaIdentifierPart(ch)) {
+ releaseChar();
+ return (endOfToken - index > 0);
+ }
+ }
+ return false;
+ }
+
+ /*
+ * Skips the method parameters characters in the document
+ *
+ * @return boolean true if complete parameters set had been read
+ */
+ boolean skipMethodParameters() {
+ int ch = readCharBackward();
+ if (ch != ')')
+ return false;
+ int pCount = 1;
+ while (pCount > 0) {
+ ch = readCharBackward();
+ if (ch == -1)
+ return false;
+
+ if (ch == '"' || ch == '\'') {
+ skipQuotedChars((char)ch);
+ continue;
+ }
+ if (ch == ')') {
+ pCount++;
+ continue;
+ }
+ if (ch == '(') {
+ pCount--;
+ continue;
+ }
+ }
+ return true;
+ }
+
+ /*
+ * Skips the quoted characters
+ *
+ */
+ void skipQuotedChars(char pair) {
+ int ch = readCharBackward();
+
+ while (ch != -1) {
+ if (ch == pair) {
+ ch = readCharBackward();
+ if (ch == '\\') {
+ int backSlashCount = 0;
+ while (ch == '\\') {
+ backSlashCount++;
+ ch = readCharBackward();
+ }
+ releaseChar(); // Return the last non-slash char to the buffer
+ if ((backSlashCount/2)*2 == backSlashCount) {
+ return;
+ }
+ }
+ }
+ ch = readCharBackward();
+ }
+ }
+
+ /* Reads and returns the separator token from the expression
+ *
+ * @return
+ */
+ ELOperandToken readSeparatorToken() {
+ fState = STATE_SEPARATOR;
+ int ch = readCharBackward();
+
+ return (ch == '.' ? new ELOperandToken(index, 1, getCharSequence(index, 1), ELOperandToken.EL_SEPARATOR_TOKEN) :
+ ELOperandToken.EOF);
+ }
+
+ /* Reads and returns the variable token from the expression
+ *
+ * @return
+ */
+ ELOperandToken readVarToken() {
+ fState = STATE_VAR;
+ int endOfToken = index;
+ int ch;
+ 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);
+ }
+ }
+ releaseChar();
+ return (endOfToken - index > 0 ? new ELOperandToken(index, endOfToken - index, getCharSequence(index, endOfToken - index), ELOperandToken.EL_NAME_TOKEN) : ELOperandToken.EOF);
+ }
+
+ /* Reads the next character in the document
+ *
+ * @return
+ */
+ int readCharBackward() {
+ if (--index < 0 ||
+ documentContent == null ||
+ documentContent.length() <= index)
+ return -1;
+
+ try {
+ return documentContent.charAt(index);
+ } catch (StringIndexOutOfBoundsException e) {
+ return -1;
+ }
+ }
+
+ /*
+ * returns the character to the document
+ */
+ void releaseChar() {
+ if (index < documentContent.length())
+ index++;
+ }
+}
\ 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-10-11 16:53:32 UTC (rev 4122)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamELValidator.java 2007-10-11 17:41:32 UTC (rev 4123)
@@ -13,7 +13,6 @@
import java.io.IOException;
import java.util.HashMap;
import java.util.HashSet;
-import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -49,8 +48,10 @@
import org.jboss.tools.seam.core.SeamCoreMessages;
import org.jboss.tools.seam.core.SeamCorePlugin;
import org.jboss.tools.seam.core.SeamPreferences;
+import org.jboss.tools.seam.internal.core.el.ELOperandToken;
import org.jboss.tools.seam.internal.core.el.ELToken;
import org.jboss.tools.seam.internal.core.el.SeamELCompletionEngine;
+import org.jboss.tools.seam.internal.core.el.SeamELOperandTokenizer;
import org.jboss.tools.seam.internal.core.el.SeamELTokenizer;
/**
@@ -256,20 +257,23 @@
private void validateElOperand(IFile file, ELToken operandToken, int documnetOffset) {
String operand = operandToken.getText();
+ String varName = operand;
+ int offsetOfVarName = documnetOffset + operandToken.getStart();
+ int lengthOfVarName = varName.length();
try {
int offset = operand.length();
if (!operand.endsWith(".")) { //$NON-NLS-1$
String prefix = SeamELCompletionEngine.getPrefix(operand, offset);
if(prefix!=null) {
- int possition = operand.indexOf(prefix);
- if (possition == -1) {
- possition = 0;
+ int position = operand.indexOf(prefix);
+ if (position == -1) {
+ position = 0;
}
Set<ISeamContextVariable> usedVariables = new HashSet<ISeamContextVariable>();
Map<String, IMethod> unpairedGettersOrSetters = new HashMap<String, IMethod>();
- List<String> suggestions = engine.getCompletions(project, file, operand, prefix, possition, true, usedVariables, unpairedGettersOrSetters);
+ List<String> suggestions = engine.getCompletions(project, file, operand, prefix, position, true, usedVariables, unpairedGettersOrSetters);
if(usedVariables.size()==0 && suggestions.size()==0) {
// Save resources with unknown variables names
@@ -299,6 +303,19 @@
// It's valid EL.
return;
}
+
+ SeamELOperandTokenizer tokenizer = new SeamELOperandTokenizer(operand, position + prefix.length());
+ List<ELOperandToken> tokens = tokenizer.getTokens();
+ for (ELOperandToken token : tokens) {
+ if((token.getType()==ELOperandToken.EL_NAME_TOKEN) || (token.getType()==ELOperandToken.EL_METHOD_TOKEN)) {
+ if(!isResolvedVar(token.getText(), usedVariables)) {
+ varName = token.getText();
+ offsetOfVarName = documnetOffset + operandToken.getStart() + token.getStart();
+ lengthOfVarName = varName.length();
+ break;
+ }
+ }
+ }
}
}
} catch (BadLocationException e) {
@@ -307,9 +324,18 @@
SeamCorePlugin.getDefault().logError(SeamCoreMessages.getString("SEAM_EL_VALIDATOR_ERROR_VALIDATING_SEAM_EL"), e); //$NON-NLS-1$
}
// Mark invalid EL
- addError(INVALID_EXPRESSION_MESSAGE_ID, SeamPreferences.INVALID_EXPRESSION, new String[]{operand}, operand.length(), documnetOffset + operandToken.getStart(), file);
+ addError(INVALID_EXPRESSION_MESSAGE_ID, SeamPreferences.INVALID_EXPRESSION, new String[]{varName}, lengthOfVarName, offsetOfVarName, file);
}
+ private boolean isResolvedVar(String varName, Set<ISeamContextVariable> usedVariables) {
+ for (ISeamContextVariable seamContextVariable : usedVariables) {
+ if(varName.equals(seamContextVariable.getName())) {
+ return true;
+ }
+ }
+ return false;
+ }
+
public static class EL {
private String value;
private int length;
17 years, 3 months
JBoss Tools SVN: r4122 - in trunk/seam/plugins: org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2007-10-11 12:53:32 -0400 (Thu, 11 Oct 2007)
New Revision: 4122
Added:
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
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/validation/SeamELValidator.java
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.ui/src/org/jboss/tools/seam/ui/preferences/SeamPreferencesMessages.properties
Log:
http://jira.jboss.com/jira/browse/JBIDE-1039
Added: 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 (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/ELToken.java 2007-10-11 16:53:32 UTC (rev 4122)
@@ -0,0 +1,116 @@
+ /*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.seam.internal.core.el;
+
+import org.eclipse.jface.text.rules.IToken;
+
+/**
+ * Token for the EL expression parts
+ * @author Alexey Kazakov
+ */
+public class ELToken implements IToken {
+ public static final ELToken EOF = new ELToken(-1, -1, null, -1);
+ public static final int EL_OPERAND_TOKEN = 1;
+ public static final int EL_OPERATOR_TOKEN = 2;
+ public static final int EL_RESERVED_WORD_TOKEN = 3;
+ public static final int EL_SEPARATOR_TOKEN = 4;
+
+ private int start;
+ private int length;
+ private CharSequence chars;
+ private int type;
+
+ /**
+ * Constructs the ELToken object
+ *
+ * @param start
+ * @param length
+ * @param chars
+ * @param type
+ */
+ public ELToken(int start, int length, CharSequence chars, int type) {
+ this.start = start;
+ this.length = length;
+ this.chars = chars;
+ this.type = type;
+ }
+
+ /**
+ * Returns string representation for the token
+ */
+ public String toString() {
+ return "ELToken(" + start + ", " + length + ", " + type + ") [" + (chars == null ? "<Empty>" : chars.toString()) + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
+ }
+
+ /*
+ * @see org.eclipse.jface.text.rules.IToken#getData()
+ */
+ public Object getData() {
+// return (chars == null ? null : chars.subSequence(start, start+length).toString());
+ return getText();
+ }
+
+ /**
+ * @return offset of token
+ */
+ public int getStart() {
+ return start;
+ }
+
+ /**
+ * @return length of token
+ */
+ public int getLength() {
+ return length;
+ }
+
+ /*
+ * @see org.eclipse.jface.text.rules.IToken#isEOF()
+ */
+ public boolean isEOF() {
+ return (start == -1 && length == -1 && chars == null);
+ }
+
+ /*
+ * @see org.eclipse.jface.text.rules.IToken#isOther()
+ */
+ public boolean isOther() {
+ return false;
+ }
+
+ /*
+ * @see org.eclipse.jface.text.rules.IToken#isUndefined()
+ */
+ public boolean isUndefined() {
+ return false;
+ }
+
+ /*
+ * @see org.eclipse.jface.text.rules.IToken#isWhitespace()
+ */
+ public boolean isWhitespace() {
+ return false;
+ }
+
+ /*
+ * Returns the token type
+ */
+ public int getType(){
+ return type;
+ }
+
+ /*
+ * Returns the token text
+ */
+ public String getText() {
+ return chars.toString();
+ }
+}
\ No newline at end of file
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELCompletionEngine.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELCompletionEngine.java 2007-10-11 16:02:27 UTC (rev 4121)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELCompletionEngine.java 2007-10-11 16:53:32 UTC (rev 4122)
@@ -95,18 +95,18 @@
int position, boolean returnEqualedVariablesOnly, Set<ISeamContextVariable> usedVariables, Map<String, IMethod> unpairedGettersOrSetters) throws BadLocationException, StringIndexOutOfBoundsException {
List<String> res= new ArrayList<String>();
- SeamELTokenizer tokenizer = new SeamELTokenizer(documentContent, position + prefix.length());
- List<ELToken> tokens = tokenizer.getTokens();
+ SeamELOperandTokenizer tokenizer = new SeamELOperandTokenizer(documentContent, position + prefix.length());
+ List<ELOperandToken> tokens = tokenizer.getTokens();
- List<ELToken> resolvedExpressionPart = new ArrayList<ELToken>();
+ List<ELOperandToken> resolvedExpressionPart = new ArrayList<ELOperandToken>();
List<ISeamContextVariable> resolvedVariables = new ArrayList<ISeamContextVariable>();
ScopeType scope = getScope(project, file);
- List<List<ELToken>> variations = getPossibleVarsFromPrefix(tokens);
+ List<List<ELOperandToken>> variations = getPossibleVarsFromPrefix(tokens);
if (variations.isEmpty()) {
resolvedVariables = resolveVariables(project, scope, tokens, tokens, returnEqualedVariablesOnly);
} else {
- for (List<ELToken> variation : variations) {
+ for (List<ELOperandToken> variation : variations) {
List<ISeamContextVariable>resolvedVars = new ArrayList<ISeamContextVariable>();
resolvedVars = resolveVariables(project, scope, variation, tokens, returnEqualedVariablesOnly);
if (resolvedVars != null && !resolvedVars.isEmpty()) {
@@ -150,14 +150,14 @@
tokens != null && i < tokens.size() &&
members != null && members.size() > 0;
i++) {
- ELToken token = tokens.get(i);
+ ELOperandToken token = tokens.get(i);
if (i < tokens.size() - 1) { // inside expression
- if (token.getType() == ELToken.EL_SEPARATOR_TOKEN)
+ if (token.getType() == ELOperandToken.EL_SEPARATOR_TOKEN)
// proceed with next token
continue;
- if (token.getType() == ELToken.EL_NAME_TOKEN) {
+ if (token.getType() == ELOperandToken.EL_NAME_TOKEN) {
// Find properties for the token
String name = token.getText();
Set<IMember> newMembers = new HashSet<IMember>();
@@ -181,7 +181,7 @@
}
members = newMembers;
}
- if (token.getType() == ELToken.EL_METHOD_TOKEN) {
+ if (token.getType() == ELOperandToken.EL_METHOD_TOKEN) {
// Find methods for the token
String name = token.getText();
if (name.indexOf('(') != -1) {
@@ -205,7 +205,7 @@
}
} else { // Last segment
Set<String> proposals = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
- if (token.getType() == ELToken.EL_SEPARATOR_TOKEN) {
+ if (token.getType() == ELOperandToken.EL_SEPARATOR_TOKEN) {
// return all the methods + properties
for (IMember mbr : members) {
try {
@@ -216,8 +216,8 @@
SeamCorePlugin.getPluginLog().logError(ex);
}
}
- } else if (token.getType() == ELToken.EL_NAME_TOKEN ||
- token.getType() == ELToken.EL_METHOD_TOKEN) {
+ } else if (token.getType() == ELOperandToken.EL_NAME_TOKEN ||
+ token.getType() == ELOperandToken.EL_METHOD_TOKEN) {
// return filtered methods + properties
Set<String> proposalsToFilter = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
for (IMember mbr : members) {
@@ -268,14 +268,14 @@
return res;
}
- private String computeVariableName(List<ELToken> tokens){
+ private String computeVariableName(List<ELOperandToken> tokens){
if (tokens == null)
- tokens = new ArrayList<ELToken>();
+ tokens = new ArrayList<ELOperandToken>();
StringBuffer sb = new StringBuffer();
- for (ELToken token : tokens) {
- if (token.getType() == ELToken.EL_NAME_TOKEN ||
- token.getType() == ELToken.EL_METHOD_TOKEN ||
- token.getType() == ELToken.EL_SEPARATOR_TOKEN) {
+ for (ELOperandToken token : tokens) {
+ if (token.getType() == ELOperandToken.EL_NAME_TOKEN ||
+ token.getType() == ELOperandToken.EL_METHOD_TOKEN ||
+ token.getType() == ELOperandToken.EL_SEPARATOR_TOKEN) {
sb.append(token.getText());
}
}
@@ -289,7 +289,7 @@
* @param second
* @return boolean true if two expressions are equal
*/
- private boolean areEqualExpressions(List<ELToken>first, List<ELToken>second) {
+ private boolean areEqualExpressions(List<ELOperandToken>first, List<ELOperandToken>second) {
if (first == null || second == null)
return (first == second);
@@ -334,7 +334,7 @@
* @param tokens
* @return
*/
- private List<ISeamContextVariable> resolveVariables(ISeamProject project, ScopeType scope, List<ELToken>part, List<ELToken> tokens, boolean onlyEqualNames) {
+ private List<ISeamContextVariable> resolveVariables(ISeamProject project, ScopeType scope, List<ELOperandToken>part, List<ELOperandToken> tokens, boolean onlyEqualNames) {
List<ISeamContextVariable>resolvedVars = new ArrayList<ISeamContextVariable>();
String varName = computeVariableName(part);
if (varName != null) {
@@ -365,12 +365,12 @@
* @param prefix
* @return
*/
- private List<List<ELToken>> getPossibleVarsFromPrefix(List<ELToken>prefix) {
- ArrayList<List<ELToken>> result = new ArrayList<List<ELToken>>();
+ private List<List<ELOperandToken>> getPossibleVarsFromPrefix(List<ELOperandToken>prefix) {
+ ArrayList<List<ELOperandToken>> result = new ArrayList<List<ELOperandToken>>();
for (int i = 0; prefix != null && i < prefix.size(); i++) {
- ELToken lastToken = prefix.get(i);
- if (lastToken.getType() != ELToken.EL_SEPARATOR_TOKEN) {
- ArrayList<ELToken> prefixPart = new ArrayList<ELToken>();
+ ELOperandToken lastToken = prefix.get(i);
+ if (lastToken.getType() != ELOperandToken.EL_SEPARATOR_TOKEN) {
+ ArrayList<ELOperandToken> prefixPart = new ArrayList<ELOperandToken>();
for (int j = 0; j <= i; j++) {
prefixPart.add(prefix.get(j));
}
@@ -403,50 +403,47 @@
present.clear();
return unique;
}
-
+
/**
* EL string parser.
* Creates list of tokens for the name, method and separator parts
- *
+ *
* @author Jeremy
*/
- public static class SeamELTokenizer {
+ public static class SeamELOperandTokenizer {
static final int STATE_INITIAL = 0;
static final int STATE_VAR = 1;
static final int STATE_METHOD = 2;
static final int STATE_SEPARATOR = 3;
-
-// IDocument fDocument;
+
String documentContent;
- List<ELToken> fTokens;
+ List<ELOperandToken> fTokens;
int index;
/**
- * Constructs SeamELTokenizer object
- *
- * @param document
+ * Constructs SeamELTokenizer object.
+ * Parse expression from offset to first operator or space.
+ * Tokenizer parses document from offset to beginning.
+ * For example: documentContetn is '<tag attr="#{var1.pr!=var2.pr}"/>'
+ * offset = 29 ("...var2.pr|}")
+ * then tokens are {"pr",".","var2"}
+ * @param documentContent
* @param offset
*/
- public SeamELTokenizer(IDocument document, int offset) {
- if(document!=null) {
- this.documentContent = document.get();
- }
+ public SeamELOperandTokenizer(String documentContent, int offset) {
+ this.documentContent = documentContent;
index = (documentContent == null || documentContent.length() < offset? -1 : offset);
- fTokens = new ArrayList<ELToken>();
+ fTokens = new ArrayList<ELOperandToken>();
parseBackward();
}
/**
- * Constructs SeamELTokenizer object
- *
+ * Constructs SeamELTokenizer object.
* @param document
* @param offset
*/
- public SeamELTokenizer(String documentContent, int offset) {
- this.documentContent = documentContent;
- index = (documentContent == null || documentContent.length() < offset? -1 : offset);
- fTokens = new ArrayList<ELToken>();
- parseBackward();
+ public SeamELOperandTokenizer(IDocument document, int offset) {
+ this(document.get(), offset);
}
/**
@@ -454,27 +451,27 @@
*
* @return
*/
- public List<ELToken> getTokens() {
+ public List<ELOperandToken> getTokens() {
return fTokens;
}
-
+
/*
* Performs backward parsing of document text for expression
*/
private void parseBackward() {
- ELToken token;
+ ELOperandToken token;
fState = STATE_INITIAL;
- while ((token = getNextToken()) != ELToken.EOF) {
-
- if (token.type == ELToken.EL_NAME_TOKEN ||
- token.type == ELToken.EL_METHOD_TOKEN ||
- token.type == ELToken.EL_SEPARATOR_TOKEN) {
-
+ while ((token = getNextToken()) != ELOperandToken.EOF) {
+
+ if (token.type == ELOperandToken.EL_NAME_TOKEN ||
+ token.type == ELOperandToken.EL_METHOD_TOKEN ||
+ token.type == ELOperandToken.EL_SEPARATOR_TOKEN) {
+
fTokens.add(0, token);
}
}
}
-
+
int fState;
int fEndOfToken;
@@ -483,13 +480,13 @@
*
* @return
*/
- private ELToken getNextToken() {
+ private ELOperandToken getNextToken() {
switch (fState) {
case STATE_INITIAL: // Just started
{
int ch = readCharBackward();
if (ch == -1) {
- return ELToken.EOF;
+ return ELOperandToken.EOF;
}
if (Character.isJavaIdentifierPart((char)ch)) {
releaseChar();
@@ -504,39 +501,39 @@
return readMethodToken();
}
releaseChar();
- return ELToken.EOF;
+ return ELOperandToken.EOF;
}
case STATE_VAR: // Variable name is read - expecting a separator
{
int ch = readCharBackward();
if (ch == -1) {
- return ELToken.EOF;
+ return ELOperandToken.EOF;
}
if (ch == '.') {
releaseChar();
return readSeparatorToken();
}
releaseChar();
- return ELToken.EOF;
+ return ELOperandToken.EOF;
}
case STATE_METHOD: // Method name and parameters are read - expecting a separator
{
int ch = readCharBackward();
if (ch == -1) {
- return ELToken.EOF;
+ return ELOperandToken.EOF;
}
if (ch == '.') {
releaseChar();
return readSeparatorToken();
}
releaseChar();
- return ELToken.EOF;
+ return ELOperandToken.EOF;
}
case STATE_SEPARATOR: // Separator is read - expecting a var or method
{
int ch = readCharBackward();
if (ch == -1) {
- return ELToken.EOF;
+ return ELOperandToken.EOF;
}
if (Character.isJavaIdentifierPart((char)ch)) {
releaseChar();
@@ -547,32 +544,32 @@
return readMethodToken();
}
releaseChar();
- return ELToken.EOF;
+ return ELOperandToken.EOF;
}
}
- return ELToken.EOF;
+ return ELOperandToken.EOF;
}
/* Reads and returns the method token from the expression
*
* @return
*/
- ELToken readMethodToken() {
+ ELOperandToken readMethodToken() {
fState = STATE_METHOD;
int endOfToken = index;
// read the method parameters
if (!skipMethodParameters())
- return ELToken.EOF;
+ return ELOperandToken.EOF;
// skip spaces between the method's name and it's parameters
if (!skipSpaceChars())
- return ELToken.EOF;
+ return ELOperandToken.EOF;
// read the method name
if (!skipMethodName())
- return ELToken.EOF;
+ return ELOperandToken.EOF;
- return (endOfToken - index > 0 ? new ELToken(index, endOfToken - index, getCharSequence(index, endOfToken - index), ELToken.EL_METHOD_TOKEN) : ELToken.EOF);
+ return (endOfToken - index > 0 ? new ELOperandToken(index, endOfToken - index, getCharSequence(index, endOfToken - index), ELOperandToken.EL_METHOD_TOKEN) : ELOperandToken.EOF);
}
/*
@@ -686,30 +683,30 @@
*
* @return
*/
- ELToken readSeparatorToken() {
+ ELOperandToken readSeparatorToken() {
fState = STATE_SEPARATOR;
int ch = readCharBackward();
- return (ch == '.' ? new ELToken(index, 1, getCharSequence(index, 1), ELToken.EL_SEPARATOR_TOKEN) :
- ELToken.EOF);
+ return (ch == '.' ? new ELOperandToken(index, 1, getCharSequence(index, 1), ELOperandToken.EL_SEPARATOR_TOKEN) :
+ ELOperandToken.EOF);
}
/* Reads and returns the variable token from the expression
*
* @return
*/
- ELToken readVarToken() {
+ ELOperandToken readVarToken() {
fState = STATE_VAR;
int endOfToken = index;
int ch;
while((ch = readCharBackward()) != -1) {
if (!Character.isJavaIdentifierPart(ch)) {
releaseChar();
- return (endOfToken - index > 0 ? new ELToken(index, endOfToken - index, getCharSequence(index, endOfToken - index), ELToken.EL_NAME_TOKEN) : ELToken.EOF);
+ return (endOfToken - index > 0 ? new ELOperandToken(index, endOfToken - index, getCharSequence(index, endOfToken - index), ELOperandToken.EL_NAME_TOKEN) : ELOperandToken.EOF);
}
}
releaseChar();
- return (endOfToken - index > 0 ? new ELToken(index, endOfToken - index, getCharSequence(index, endOfToken - index), ELToken.EL_NAME_TOKEN) : ELToken.EOF);
+ return (endOfToken - index > 0 ? new ELOperandToken(index, endOfToken - index, getCharSequence(index, endOfToken - index), ELOperandToken.EL_NAME_TOKEN) : ELOperandToken.EOF);
}
/* Reads the next character in the document
@@ -759,33 +756,32 @@
* @param viewer
* @param offset
* @return
- * @throws BadLocationException
+ * @throws StringIndexOutOfBoundsException
*/
public static String getPrefix(String documentContent, int offset) throws StringIndexOutOfBoundsException {
if (documentContent == null || offset > documentContent.length())
return null;
- SeamELTokenizer tokenizer = new SeamELTokenizer(documentContent, offset);
- List<ELToken> tokens = tokenizer.getTokens();
+ SeamELOperandTokenizer tokenizer = new SeamELOperandTokenizer(documentContent, offset);
+ List<ELOperandToken> tokens = tokenizer.getTokens();
if (tokens == null || tokens.size() == 0)
return null;
return documentContent.substring(tokens.get(0).start, offset);
-// return documentContent.substring(tokens.get(0).start, tokens.get(0).start + tokens.get(0).length);
}
-
+
public String getJavaElementExpression(String documentContent, int offset, IRegion region) throws StringIndexOutOfBoundsException {
if (documentContent == null || offset > documentContent.length())
return null;
- SeamELTokenizer tokenizer = new SeamELTokenizer(documentContent, region.getOffset() + region.getLength());
- List<ELToken> tokens = tokenizer.getTokens();
+ SeamELOperandTokenizer tokenizer = new SeamELOperandTokenizer(documentContent, region.getOffset() + region.getLength());
+ List<ELOperandToken> tokens = tokenizer.getTokens();
if (tokens == null || tokens.size() == 0)
return null;
- List<List<ELToken>> vars = getPossibleVarsFromPrefix(tokens);
+ List<List<ELOperandToken>> vars = getPossibleVarsFromPrefix(tokens);
if (vars == null)
return null;
@@ -793,7 +789,7 @@
// Search from the shortest variation to the longest one
for (int i = vars.size() - 1; i >= 0; i--) {
- List<ELToken>var = vars.get(i);
+ List<ELOperandToken>var = vars.get(i);
String varText = computeVariableName(var);
if (varText != null && varText.startsWith(prefixPart)) {
return varText;
@@ -814,21 +810,21 @@
List<IJavaElement> res= new ArrayList<IJavaElement>();
- SeamELTokenizer tokenizer = new SeamELTokenizer(expression, expression.length());
- List<ELToken> tokens = tokenizer.getTokens();
+ SeamELOperandTokenizer tokenizer = new SeamELOperandTokenizer(expression, expression.length());
+ List<ELOperandToken> tokens = tokenizer.getTokens();
- if (tokens == null || tokens.size() == 0 || tokens.get(tokens.size() - 1).getType() == ELToken.EL_SEPARATOR_TOKEN)
+ if (tokens == null || tokens.size() == 0 || tokens.get(tokens.size() - 1).getType() == ELOperandToken.EL_SEPARATOR_TOKEN)
return res;
- List<ELToken> resolvedExpressionPart = new ArrayList<ELToken>();
+ List<ELOperandToken> resolvedExpressionPart = new ArrayList<ELOperandToken>();
List<ISeamContextVariable> resolvedVariables = new ArrayList<ISeamContextVariable>();
ScopeType scope = getScope(project, file);
- List<List<ELToken>> variations = getPossibleVarsFromPrefix(tokens);
+ List<List<ELOperandToken>> variations = getPossibleVarsFromPrefix(tokens);
if (variations.isEmpty()) {
resolvedVariables = resolveVariables(project, scope, tokens, tokens, true);
} else {
- for (List<ELToken> variation : variations) {
+ for (List<ELOperandToken> variation : variations) {
List<ISeamContextVariable>resolvedVars = new ArrayList<ISeamContextVariable>();
resolvedVars = resolveVariables(project, scope, variation, tokens, true);
if (resolvedVars != null && !resolvedVars.isEmpty()) {
@@ -844,13 +840,13 @@
if (areEqualExpressions(resolvedExpressionPart, tokens)) {
// First segment is the last one
for (ISeamContextVariable var : resolvedVariables) {
- String varName = var.getName();
-/* if(expression.length()<varName.length()) {
+/* String varName = var.getName();
+ if(expression.length()<varName.length()) {
res.add(varName.substring(prefixString.length()));
} else if(returnEqualedVariablesOnly) {
res.add(varName);
}
- */
+*/
IMember member = SeamExpressionResolver.getMemberByVariable(var, true);
if (member instanceof IJavaElement){
res.add((IJavaElement)member);
@@ -871,14 +867,14 @@
tokens != null && i < tokens.size() &&
members != null && members.size() > 0;
i++) {
- ELToken token = tokens.get(i);
+ ELOperandToken token = tokens.get(i);
if (i < tokens.size() - 1) { // inside expression
- if (token.getType() == ELToken.EL_SEPARATOR_TOKEN)
+ if (token.getType() == ELOperandToken.EL_SEPARATOR_TOKEN)
// proceed with next token
continue;
- if (token.getType() == ELToken.EL_NAME_TOKEN) {
+ if (token.getType() == ELOperandToken.EL_NAME_TOKEN) {
// Find properties for the token
String name = token.getText();
Set<IMember> newMembers = new HashSet<IMember>();
@@ -902,7 +898,7 @@
}
members = newMembers;
}
- if (token.getType() == ELToken.EL_METHOD_TOKEN) {
+ if (token.getType() == ELOperandToken.EL_METHOD_TOKEN) {
// Find methods for the token
String name = token.getText();
if (name.indexOf('(') != -1) {
@@ -926,8 +922,8 @@
}
} else { // Last segment
Set<IJavaElement> javaElements = new HashSet<IJavaElement>();
- if (token.getType() == ELToken.EL_NAME_TOKEN ||
- token.getType() == ELToken.EL_METHOD_TOKEN) {
+ if (token.getType() == ELOperandToken.EL_NAME_TOKEN ||
+ token.getType() == ELOperandToken.EL_METHOD_TOKEN) {
// return filtered methods + properties
Set<IJavaElement> javaElementsToFilter = new HashSet<IJavaElement>();
for (IMember mbr : members) {
@@ -982,12 +978,12 @@
}
/**
- * Token for the EX expression
- *
+ * Token for the EX expression operand parts
+ *
* @author Jeremy
*/
-class ELToken implements IToken {
- static final ELToken EOF = new ELToken(-1, -1, null, -1);
+class ELOperandToken implements IToken {
+ static final ELOperandToken EOF = new ELOperandToken(-1, -1, null, -1);
static final int EL_NAME_TOKEN = 1;
static final int EL_METHOD_TOKEN = 2;
static final int EL_SEPARATOR_TOKEN = 3;
@@ -1005,7 +1001,7 @@
* @param chars
* @param type
*/
- public ELToken(int start, int length, CharSequence chars, int type) {
+ public ELOperandToken(int start, int length, CharSequence chars, int type) {
this.start = start;
this.length = length;
this.chars = chars;
Added: 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 (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELTokenizer.java 2007-10-11 16:53:32 UTC (rev 4122)
@@ -0,0 +1,264 @@
+ /*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.seam.internal.core.el;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.tools.seam.core.SeamCorePlugin;
+
+/**
+ * EL string parser.
+ * Creates list of tokens for the operands and operators
+ * @author Alexey Kazakov
+ */
+public class SeamELTokenizer {
+ private static final int STATE_INITIAL = 0;
+ private static final int STATE_OPERAND = 1;
+ private static final int STATE_OPERATOR = 2;
+ private static final int STATE_RESERVED_WORD = 3;
+ private static final int STATE_SEPARATOR = 4;
+
+ private String expression;
+ private List<ELToken> fTokens;
+ private int index;
+
+ private int fState;
+ private static final String OPERATOR_SYMBOLS = "!=&(){}[]:+-*%?',|/%<>";
+ private static final String RESERVED_WORDS = " null empty div and or not mod eq ne lt gt le ge true false instanceof ";
+
+ /**
+ * Constructs SeamELTokenizer object.
+ * Constructs SeamELTokenizer object
+ * Parse an expression.
+ * For example: expression is '#{var1.pr != var2.pr}'
+ * then tokens are {"var1.pr"," ", "!=", " ", "var2",}
+ * @param expression
+ */
+ public SeamELTokenizer(String expression) {
+ this.expression = expression;
+ index = 0;
+ fTokens = new ArrayList<ELToken>();
+ parse();
+ }
+
+ /**
+ * Returns list of tokens for the expression parsed
+ *
+ * @return
+ */
+ public List<ELToken> getTokens() {
+ return fTokens;
+ }
+
+ /*
+ * Performs parsing of expression
+ */
+ private void parse() {
+ ELToken token;
+ fState = STATE_INITIAL;
+ while ((token = getNextToken()) != ELToken.EOF) {
+
+ if (token.getType() == ELToken.EL_OPERAND_TOKEN ||
+ token.getType() == ELToken.EL_OPERATOR_TOKEN ||
+ token.getType() == ELToken.EL_RESERVED_WORD_TOKEN ||
+ token.getType() == ELToken.EL_SEPARATOR_TOKEN) {
+
+ fTokens.add(token);
+ }
+ }
+ }
+
+ /*
+ * Calculates and returns next token for expression
+ *
+ * @return
+ */
+ private ELToken getNextToken() {
+ switch (fState) {
+ case STATE_INITIAL: { // Just started
+ int ch = readNextChar();
+ if (ch == -1) {
+ return ELToken.EOF;
+ }
+ releaseChar();
+ if (Character.isJavaIdentifierPart((char)ch)) {
+ return readOperandOrReservedWordToken();
+ }
+ if (OPERATOR_SYMBOLS.indexOf(ch)>-1) {
+ return readOperatorToken();
+ }
+ if (ch == ' ') {
+ return readSeparatorToken();
+ }
+ return ELToken.EOF;
+ }
+ case STATE_RESERVED_WORD: // Reserved word is read - expecting a separator or operator
+ case STATE_OPERAND: { // Operand is read - expecting a separator or operator
+ int ch = readNextChar();
+ if (ch == -1) {
+ return ELToken.EOF;
+ }
+ releaseChar();
+ if (OPERATOR_SYMBOLS.indexOf(ch)>-1) {
+ return readOperatorToken();
+ }
+ if (ch == ' ') {
+ return readSeparatorToken();
+ }
+ return ELToken.EOF;
+ }
+ case STATE_OPERATOR: { // Operator is read - expecting a separator or operand
+ int ch = readNextChar();
+ if (ch == -1) {
+ return ELToken.EOF;
+ }
+ releaseChar();
+ if (Character.isJavaIdentifierPart((char)ch)) {
+ return readOperandOrReservedWordToken();
+ }
+ if (ch == ' ') {
+ return readSeparatorToken();
+ }
+ return ELToken.EOF;
+ }
+ case STATE_SEPARATOR: { // Separator is read - expecting a operand or operator
+ int ch = readNextChar();
+ if (ch == -1) {
+ return ELToken.EOF;
+ }
+ releaseChar();
+ if (Character.isJavaIdentifierPart((char)ch)) {
+ return readOperandOrReservedWordToken();
+ }
+ if (OPERATOR_SYMBOLS.indexOf(ch)>-1) {
+ return readOperatorToken();
+ }
+ releaseChar();
+ return ELToken.EOF;
+ }
+ }
+ return ELToken.EOF;
+ }
+
+ /*
+ * Returns the CharSequence object
+ *
+ * @param start
+ * @param length
+ * @return
+ */
+ private CharSequence getCharSequence(int start, int length) {
+ String text = ""; //$NON-NLS-1$
+ try {
+ text = expression.substring(start, start + length);
+ } catch (StringIndexOutOfBoundsException e) {
+ SeamCorePlugin.getDefault().logError(e);
+ text = ""; // For sure //$NON-NLS-1$
+ }
+ return text.subSequence(0, text.length());
+ }
+
+ /*
+ * Reads and returns the operator token from the expression
+ * @return
+ */
+ private ELToken readOperatorToken() {
+ fState = STATE_OPERATOR;
+ int startOfToken = index;
+ int ch;
+ while((ch = readNextChar()) != -1) {
+ if (OPERATOR_SYMBOLS.indexOf(ch)==-1) {
+ break;
+ }
+ }
+ releaseChar();
+ int length = index - startOfToken;
+ return (length > 0 ? new ELToken(startOfToken, length, getCharSequence(startOfToken, length), ELToken.EL_OPERATOR_TOKEN) : ELToken.EOF);
+ }
+
+ /*
+ * Reads and returns the separator token from the expression
+ * @return
+ */
+ private ELToken readSeparatorToken() {
+ fState = STATE_SEPARATOR;
+ int startOfToken = index;
+ int ch;
+ while((ch = readNextChar()) != -1) {
+ if (ch!=' ') {
+ break;
+ }
+ }
+ releaseChar();
+ int length = index - startOfToken;
+ return (length > 0 ? new ELToken(startOfToken, length, getCharSequence(startOfToken, length), ELToken.EL_SEPARATOR_TOKEN) : ELToken.EOF);
+ }
+
+ /*
+ * Reads and returns the operand token from the expression
+ * @return
+ */
+ private ELToken readOperandOrReservedWordToken() {
+ fState = STATE_OPERAND;
+ int startOfToken = index;
+ int ch;
+ while((ch = readNextChar()) != -1) {
+ if (!Character.isJavaIdentifierPart(ch) && ch!='.') {
+ break;
+ }
+ }
+ releaseChar();
+ int length = index - startOfToken;
+ boolean reservedWord = isResorvedWord(startOfToken, length);
+ int tokenType = ELToken.EL_OPERAND_TOKEN;
+ if(reservedWord) {
+ tokenType = ELToken.EL_RESERVED_WORD_TOKEN;
+ fState = STATE_RESERVED_WORD;
+ }
+
+ return (length > 0 ? new ELToken(startOfToken, length, getCharSequence(startOfToken, length), tokenType) : ELToken.EOF);
+ }
+
+ private boolean isResorvedWord(String word) {
+ return RESERVED_WORDS.indexOf(" " + word.trim() + " ")>-1;
+ }
+
+ private boolean isResorvedWord(int beginIndex, int length) {
+ String word = expression.substring(beginIndex, beginIndex + length);
+ return isResorvedWord(word);
+ }
+
+ /* Reads the next character
+ * @return
+ */
+ private int readNextChar() {
+ int c = -1;
+ try {
+ if (index < expression.length()) {
+ c = expression.charAt(index);
+ }
+ } catch (StringIndexOutOfBoundsException e) {
+ SeamCorePlugin.getPluginLog().logError(e);
+ }
+ index++;
+ return c;
+ }
+
+ /*
+ * returns the character to the document
+ */
+ private void releaseChar() {
+ if (index > 0) {
+ index--;
+ }
+ }
+}
\ 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-10-11 16:02:27 UTC (rev 4121)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamELValidator.java 2007-10-11 16:53:32 UTC (rev 4122)
@@ -13,6 +13,7 @@
import java.io.IOException;
import java.util.HashMap;
import java.util.HashSet;
+import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -48,7 +49,9 @@
import org.jboss.tools.seam.core.SeamCoreMessages;
import org.jboss.tools.seam.core.SeamCorePlugin;
import org.jboss.tools.seam.core.SeamPreferences;
+import org.jboss.tools.seam.internal.core.el.ELToken;
import org.jboss.tools.seam.internal.core.el.SeamELCompletionEngine;
+import org.jboss.tools.seam.internal.core.el.SeamELTokenizer;
/**
* EL Validator
@@ -220,7 +223,7 @@
// startEl = localString.indexOf("${");
// }
if(startEl>-1) {
- endEl = localString.indexOf('}', startEl);
+ endEl = localString.lastIndexOf('}');
if(endEl>-1) {
String value = localString.substring(startEl+2, endEl);
int os = offset + startEl + 2;
@@ -240,31 +243,44 @@
}
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) {
+ if(token.getType()==ELToken.EL_OPERAND_TOKEN) {
+ validateElOperand(file, token, el.getOffset());
+ }
+ }
+ }
+
+ private void validateElOperand(IFile file, ELToken operandToken, int documnetOffset) {
+ String operand = operandToken.getText();
try {
- String exp = el.value;
- int offset = exp.length();
+ int offset = operand.length();
+ if (!operand.endsWith(".")) { //$NON-NLS-1$
+ String prefix = SeamELCompletionEngine.getPrefix(operand, offset);
+ if(prefix!=null) {
+ int possition = operand.indexOf(prefix);
+ if (possition == -1) {
+ possition = 0;
+ }
- if (!exp.endsWith(".")) { //$NON-NLS-1$
- String prefix = SeamELCompletionEngine.getPrefix(exp, offset);
- if(prefix!=null) {
- int possition = exp.indexOf(prefix);
- if (possition == -1) possition = 0;
-
Set<ISeamContextVariable> usedVariables = new HashSet<ISeamContextVariable>();
Map<String, IMethod> unpairedGettersOrSetters = new HashMap<String, IMethod>();
-
- List<String> suggestions = engine.getCompletions(project, file, exp, prefix, possition, true, usedVariables, unpairedGettersOrSetters);
-
+
+ List<String> suggestions = engine.getCompletions(project, file, operand, prefix, possition, true, usedVariables, unpairedGettersOrSetters);
+
if(usedVariables.size()==0 && suggestions.size()==0) {
// Save resources with unknown variables names
validationContext.addUnnamedElResource(file.getFullPath());
} else {
// Save links between resource and used variables names
for(ISeamContextVariable variable: usedVariables) {
- validationContext.addLinkedElResource(variable.getName(), file.getFullPath());
+ validationContext.addLinkedElResource(variable.getName(), file.getFullPath());
}
}
-
+
// Check pair for getter/setter
if(unpairedGettersOrSetters.size()>0) {
IMethod unpairedMethod = unpairedGettersOrSetters.values().iterator().next();
@@ -276,9 +292,9 @@
missingMethodName = existedMethodName;
existedMethodName = SeamCoreMessages.getString("SEAM_EL_VALIDATOR_SETTER"); //$NON-NLS-1$
}
- addError(UNPAIRED_GETTER_OR_SETTER_MESSAGE_ID, SeamPreferences.UNPAIRED_GETTER_OR_SETTER, new String[]{propertyName, existedMethodName, missingMethodName}, el.getLength(), el.getOffset(), file);
+ addError(UNPAIRED_GETTER_OR_SETTER_MESSAGE_ID, SeamPreferences.UNPAIRED_GETTER_OR_SETTER, new String[]{propertyName, existedMethodName, missingMethodName}, operand.length(), documnetOffset, file);
}
-
+
if (suggestions != null && suggestions.size() > 0) {
// It's valid EL.
return;
@@ -291,16 +307,9 @@
SeamCorePlugin.getDefault().logError(SeamCoreMessages.getString("SEAM_EL_VALIDATOR_ERROR_VALIDATING_SEAM_EL"), e); //$NON-NLS-1$
}
// Mark invalid EL
- addError(INVALID_EXPRESSION_MESSAGE_ID, SeamPreferences.INVALID_EXPRESSION, new String[]{el.getValue()}, el.getLength(), el.getOffset(), file);
+ addError(INVALID_EXPRESSION_MESSAGE_ID, SeamPreferences.INVALID_EXPRESSION, new String[]{operand}, operand.length(), documnetOffset + operandToken.getStart(), file);
}
- private IJavaProject getJavaProject() {
- if(javaProject == null) {
- javaProject = coreHelper.getJavaProject();
- }
- return javaProject;
- }
-
public static class EL {
private String value;
private int length;
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-10-11 16:02:27 UTC (rev 4121)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/messages.properties 2007-10-11 16:53:32 UTC (rev 4122)
@@ -41,7 +41,7 @@
UNKNOWN_VARIABLE_NAME=Unknown context variable name: {0}
#Seam Expression language
-INVALID_EXPRESSION=Invalid Expression: {0}
+INVALID_EXPRESSION={0} cannot be resolved
UNPAIRED_GETTER_OR_SETTER=Property "{0}" has only {1}. {2} is missing.
#Messages for Progress Monitor
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-10-11 16:02:27 UTC (rev 4121)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamPreferencesMessages.properties 2007-10-11 16:53:32 UTC (rev 4122)
@@ -56,7 +56,7 @@
##Seam Expression language
SeamValidatorConfigurationBlock_section_el=Expression language
-SeamValidatorConfigurationBlock_pb_invalidExpression_label=Invalid Expression:
+SeamValidatorConfigurationBlock_pb_invalidExpression_label=Expression 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
17 years, 3 months
JBoss Tools SVN: r4121 - trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/libsrc/javaee-5.0.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-10-11 12:02:27 -0400 (Thu, 11 Oct 2007)
New Revision: 4121
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/libsrc/javaee-5.0/jboss-javaee.jar
Removed:
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/libsrc/javaee-5.0/jboss-javaee-sources.jar
Log:
JBIDE-419
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/libsrc/javaee-5.0/jboss-javaee-sources.jar
===================================================================
(Binary files differ)
Copied: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/libsrc/javaee-5.0/jboss-javaee.jar (from rev 4083, trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/libsrc/javaee-5.0/jboss-javaee-sources.jar)
===================================================================
(Binary files differ)
17 years, 3 months
JBoss Tools SVN: r4120 - in trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core: server/internal and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-10-11 11:49:12 -0400 (Thu, 11 Oct 2007)
New Revision: 4120
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServerBehavior.java
Log:
JBIDE-1051
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java 2007-10-11 15:27:55 UTC (rev 4119)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java 2007-10-11 15:49:12 UTC (rev 4120)
@@ -156,6 +156,7 @@
protected boolean deployPackaged(IModule[] moduleTree) {
if( moduleTree[moduleTree.length-1].getModuleType().getId().equals("jst.utility")) return true;
+ if( moduleTree[moduleTree.length-1].getModuleType().getId().equals("jst.appclient")) return true;
return false;
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServerBehavior.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServerBehavior.java 2007-10-11 15:27:55 UTC (rev 4119)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServerBehavior.java 2007-10-11 15:49:12 UTC (rev 4120)
@@ -128,7 +128,7 @@
protected boolean isJstModule(IModule mod) {
String type = mod.getModuleType().getId();
if( type.equals("jst.ejb") || type.equals("jst.web") ||
- type.equals("jst.ear") || type.equals("jst.utility"))
+ type.equals("jst.ear") || type.equals("jst.utility") || type.equals("jst.appclient"))
return true;
return false;
}
17 years, 3 months
JBoss Tools SVN: r4119 - in trunk/hibernatetools/plugins: org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/actions and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: mdryakhlenkov
Date: 2007-10-11 11:27:55 -0400 (Thu, 11 Oct 2007)
New Revision: 4119
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/VisualEditor.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/actions/OpenMappingAction.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/OrmShape.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OpenFileActionUtils.java
Log:
JBIDE-983: Objects on diagram must have context menu
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/VisualEditor.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/VisualEditor.java 2007-10-11 14:08:55 UTC (rev 4118)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/VisualEditor.java 2007-10-11 15:27:55 UTC (rev 4119)
@@ -10,7 +10,6 @@
******************************************************************************/
package org.jboss.tools.hibernate.ui.veditor.editors;
-import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
@@ -33,10 +32,7 @@
import org.eclipse.ui.actions.ActionFactory;
import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
import org.hibernate.console.ConsoleConfiguration;
-import org.hibernate.mapping.DependantValue;
-import org.hibernate.mapping.Property;
import org.hibernate.mapping.RootClass;
-import org.hibernate.mapping.Table;
import org.jboss.tools.hibernate.ui.veditor.editors.actions.OpenMappingAction;
import org.jboss.tools.hibernate.ui.veditor.editors.actions.OpenSourceAction;
import org.jboss.tools.hibernate.ui.veditor.editors.model.ModelElement;
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/actions/OpenMappingAction.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/actions/OpenMappingAction.java 2007-10-11 14:08:55 UTC (rev 4118)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/actions/OpenMappingAction.java 2007-10-11 15:27:55 UTC (rev 4119)
@@ -63,9 +63,11 @@
}
} else {
if (rootClass instanceof SpecialRootClass) {
- resource = OpenFileActionUtils.getResource(consoleConfiguration, proj, configXMLFile,
- ((SpecialRootClass)rootClass).getProperty().getPersistentClass()
- );
+ PersistentClass src = ((SpecialRootClass)rootClass).getProperty().getPersistentClass();
+ while (src instanceof SpecialRootClass) {
+ src = ((SpecialRootClass)src).getProperty().getPersistentClass();
+ }
+ resource = OpenFileActionUtils.getResource(consoleConfiguration, proj, configXMLFile, src);
}
}
}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/OrmShape.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/OrmShape.java 2007-10-11 14:08:55 UTC (rev 4118)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/OrmShape.java 2007-10-11 15:27:55 UTC (rev 4119)
@@ -170,12 +170,14 @@
public Shape getChild(Property ormElement) {
Shape shape = null;
- Iterator iter = getChildren().iterator();
- while (iter.hasNext()) {
- Shape child = (Shape)iter.next();
- Object childElement = child.getOrmElement();
- if (childElement instanceof Property && ormElement.getName().equals(((Property)childElement).getName())) {
- return child;
+ if (ormElement != null) {
+ Iterator iter = getChildren().iterator();
+ while (iter.hasNext()) {
+ Shape child = (Shape)iter.next();
+ Object childElement = child.getOrmElement();
+ if (childElement instanceof Property && ormElement.getName().equals(((Property)childElement).getName())) {
+ return child;
+ }
}
}
return shape;
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OpenFileActionUtils.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OpenFileActionUtils.java 2007-10-11 14:08:55 UTC (rev 4118)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OpenFileActionUtils.java 2007-10-11 15:27:55 UTC (rev 4119)
@@ -149,10 +149,10 @@
return true;
}
}
+ }
- if (getElements(doc, HTConstants.HIBERNATE_TAG_TABLE, table.getName()).hasNext()) {
- return true;
- }
+ if (getElements(doc, HTConstants.HIBERNATE_TAG_TABLE, table.getName()).hasNext()) {
+ return true;
}
return false;
17 years, 3 months
JBoss Tools SVN: r4118 - in trunk/seam/tests/org.jboss.tools.seam.core.test: projects/SeamWebWarTestProject and 26 other directories.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2007-10-11 10:08:55 -0400 (Thu, 11 Oct 2007)
New Revision: 4118
Added:
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/.classpath
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/.project
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/.settings/
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/.settings/org.eclipse.jdt.core.prefs
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/.settings/org.eclipse.jst.common.project.facet.core.prefs
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/.settings/org.eclipse.wst.common.component
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/.settings/org.eclipse.wst.common.project.facet.core.xml
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/.settings/org.hibernate.eclipse.console.prefs
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/.settings/org.jboss.tools.jst.web.xml
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/.settings/org.jboss.tools.seam.core.prefs
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/SeamWebWarTestProject.launch
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/META-INF/
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/META-INF/MANIFEST.MF
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/classes/
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/classes/META-INF/
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/components.xml
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/dev/
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/dev/org/
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/dev/org/domain/
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/dev/org/domain/SeamWebWarTestProject/
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/dev/org/domain/SeamWebWarTestProject/session/
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/dev/org/domain/SeamWebWarTestProject/session/AbcComponent.class
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/dev/org/domain/SeamWebWarTestProject/session/Authenticator.class
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/dev/org/domain/SeamWebWarTestProject/session/BbcComponent.class
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/dev/org/domain/SeamWebWarTestProject/session/StatefulComponent.class
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/faces-config.xml
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/jboss-web.xml
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/ajax4jsf-1.1.1-SNAPSHOT.jar
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/antlr-2.7.6.jar
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/antlr-3.0ea8.jar
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/commons-beanutils-1.7.0.jar
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/commons-collections-3.1.jar
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/commons-digester-1.6.jar
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/commons-jci-core-1.0-406301.jar
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/commons-jci-janino-2.4.3.jar
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/drools-compiler-3.0.5.jar
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/drools-core-3.0.5.jar
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/hsqldb.jar
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/janino-2.4.3.jar
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/jboss-seam-debug.jar
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/jboss-seam-ioc.jar
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/jboss-seam-mail.jar
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/jboss-seam-pdf.jar
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/jboss-seam-remoting.jar
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/jboss-seam-ui.jar
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/jboss-seam.jar
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/jbpm-3.1.4.jar
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/jsf-facelets.jar
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/oscache-2.3.2.jar
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/stringtemplate-2.3b6.jar
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/pages.xml
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/web.xml
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/abcComponent.xhtml
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/bbcComponent.xhtml
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/error.xhtml
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/home.xhtml
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/img/
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/img/cal-next.png
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/img/cal-prev.png
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/img/dtpick.gif
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/index.html
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/layout/
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/layout/display.xhtml
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/layout/edit.xhtml
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/layout/loginout.xhtml
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/layout/menu.xhtml
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/layout/template.xhtml
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/login.page.xml
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/login.xhtml
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/statefulComponent.xhtml
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/stylesheet/
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/stylesheet/theme.css
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/build/
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/build/classes/
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/build/classes/META-INF/
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/build/classes/META-INF/persistence.xml
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/build/classes/SeamWebWarTestProject-ds.xml
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/build/classes/components.properties
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/build/classes/import.sql
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/build/classes/messages_en.properties
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/build/classes/seam.properties
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/build/classes/security.drl
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/hibernate-console.properties
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/AbcComponent.java
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/Authenticator.java
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/BbcComponent.java
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/StatefulComponent.java
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/model/
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/model/META-INF/
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/model/META-INF/persistence.xml
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/model/SeamWebWarTestProject-ds.xml
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/model/components.properties
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/model/import.sql
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/model/messages_en.properties
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/model/seam.properties
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/model/security.drl
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java
Log:
Validator's tests
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/.classpath
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/.classpath (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/.classpath 2007-10-11 14:08:55 UTC (rev 4118)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" output="WebContent/WEB-INF/dev" path="src/action"/>
+ <classpathentry kind="src" path="src/model"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jre1.5.0_10"/>
+ <classpathentry exported="true" kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
+ <classpathentry exported="true" kind="con" path="org.eclipse.jst.jsf.core.internal.jsflibrarycontainer/ejb">
+ <attributes>
+ <attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="output" path="build/classes"/>
+</classpath>
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/.project
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/.project (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/.project 2007-10-11 14:08:55 UTC (rev 4118)
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>SeamWebWarTestProject</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.jboss.tools.common.verification.verifybuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.jboss.tools.seam.core.seambuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+ <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+ <nature>org.jboss.tools.jsf.jsfnature</nature>
+ <nature>org.jboss.tools.seam.core.seamnature</nature>
+ </natures>
+</projectDescription>
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/.settings/org.eclipse.jdt.core.prefs 2007-10-11 14:08:55 UTC (rev 4118)
@@ -0,0 +1,7 @@
+#Thu Oct 11 13:47:58 MSD 2007
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/.settings/org.eclipse.jst.common.project.facet.core.prefs
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/.settings/org.eclipse.jst.common.project.facet.core.prefs (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/.settings/org.eclipse.jst.common.project.facet.core.prefs 2007-10-11 14:08:55 UTC (rev 4118)
@@ -0,0 +1,3 @@
+#Thu Oct 11 13:47:58 MSD 2007
+classpath.helper/org.eclipse.jdt.launching.JRE_CONTAINER\:\:org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType\:\:jre1.5.0_10/owners=jst.java\:5.0
+eclipse.preferences.version=1
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/.settings/org.eclipse.wst.common.component
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/.settings/org.eclipse.wst.common.component (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/.settings/org.eclipse.wst.common.component 2007-10-11 14:08:55 UTC (rev 4118)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-modules id="moduleCoreId" project-version="1.5.0">
+<wb-module deploy-name="SeamWebWarTestProject">
+<wb-resource deploy-path="/" source-path="/WebContent"/>
+<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/action"/>
+<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/model"/>
+<property name="context-root" value="SeamWebWarTestProject"/>
+<property name="java-output-path" value="build/classes"/>
+</wb-module>
+</project-modules>
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/.settings/org.eclipse.wst.common.project.facet.core.xml
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/.settings/org.eclipse.wst.common.project.facet.core.xml (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/.settings/org.eclipse.wst.common.project.facet.core.xml 2007-10-11 14:08:55 UTC (rev 4118)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <fixed facet="jst.jsf"/>
+ <fixed facet="jst.web"/>
+ <fixed facet="jst.seam"/>
+ <fixed facet="jst.java"/>
+ <installed facet="jst.java" version="5.0"/>
+ <installed facet="jst.web" version="2.5"/>
+ <installed facet="jst.jsf" version="1.2"/>
+ <installed facet="jst.seam" version="1.2"/>
+</faceted-project>
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/.settings/org.hibernate.eclipse.console.prefs
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/.settings/org.hibernate.eclipse.console.prefs (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/.settings/org.hibernate.eclipse.console.prefs 2007-10-11 14:08:55 UTC (rev 4118)
@@ -0,0 +1,4 @@
+#Fri Feb 23 14:56:36 CET 2007
+default.configuration=SeamWebWarTestProject
+eclipse.preferences.version=1
+hibernate3.enabled=true
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/.settings/org.jboss.tools.jst.web.xml
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/.settings/org.jboss.tools.jst.web.xml (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/.settings/org.jboss.tools.jst.web.xml 2007-10-11 14:08:55 UTC (rev 4118)
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<FILESYSTEMS APPLICATION_NAME="SeamWebWarTestProject"
+ ENTITY="FileSystems" VERSION="2.0.0" WORKSPACE_HOME="./WebContent/WEB-INF">
+ <FILESYSTEM ENTITY="FileSystemFolder" LOCATION="%workspace.home%" NAME="WEB-INF"/>
+ <FILESYSTEM ENTITY="FileSystemFolder" INFO="Content-Type=Web"
+ LOCATION="%workspace.home%/.." NAME="WEB-ROOT"/>
+ <FILESYSTEM ENTITY="FileSystemFolder"
+ LOCATION="%workspace.home%/../../src" NAME="src"/>
+ <FILESYSTEM ENTITY="FileSystemFolder" LOCATION="%workspace.home%/lib" NAME="lib"/>
+ <FILESYSTEM ENTITY="FileSystemFolder"
+ LOCATION="%workspace.home%/classes" NAME="classes"/>
+ <FILESYSTEM ENTITY="FileSystemFolder" LOCATION="%eclipse.project%" NAME="SeamWebWarTestProject"/>
+ <FILESYSTEM ENTITY="FileSystemJar"
+ LOCATION="%workspace.home%/lib/antlr-2.7.6.jar" NAME="lib-antlr-2.7.6.jar"/>
+ <FILESYSTEM ENTITY="FileSystemJar"
+ LOCATION="%workspace.home%/lib/antlr-3.0ea8.jar" NAME="lib-antlr-3.0ea8.jar"/>
+ <FILESYSTEM ENTITY="FileSystemJar"
+ LOCATION="%workspace.home%/lib/commons-beanutils-1.7.0.jar" NAME="lib-commons-beanutils-1.7.0.jar"/>
+ <FILESYSTEM ENTITY="FileSystemJar"
+ LOCATION="%workspace.home%/lib/commons-collections-3.1.jar" NAME="lib-commons-collections-3.1.jar"/>
+ <FILESYSTEM ENTITY="FileSystemJar"
+ LOCATION="%workspace.home%/lib/commons-digester-1.6.jar" NAME="lib-commons-digester-1.6.jar"/>
+ <FILESYSTEM ENTITY="FileSystemJar"
+ LOCATION="%workspace.home%/lib/commons-jci-core-1.0-406301.jar" NAME="lib-commons-jci-core-1.0-406301.jar"/>
+ <FILESYSTEM ENTITY="FileSystemJar"
+ LOCATION="%workspace.home%/lib/commons-jci-janino-2.4.3.jar" NAME="lib-commons-jci-janino-2.4.3.jar"/>
+ <FILESYSTEM ENTITY="FileSystemJar"
+ LOCATION="%workspace.home%/lib/drools-compiler-3.0.5.jar" NAME="lib-drools-compiler-3.0.5.jar"/>
+ <FILESYSTEM ENTITY="FileSystemJar"
+ LOCATION="%workspace.home%/lib/drools-core-3.0.5.jar" NAME="lib-drools-core-3.0.5.jar"/>
+ <FILESYSTEM ENTITY="FileSystemJar"
+ LOCATION="%workspace.home%/lib/hsqldb.jar" NAME="lib-hsqldb.jar"/>
+ <FILESYSTEM ENTITY="FileSystemJar"
+ LOCATION="%workspace.home%/lib/janino-2.4.3.jar" NAME="lib-janino-2.4.3.jar"/>
+ <FILESYSTEM ENTITY="FileSystemJar"
+ LOCATION="%workspace.home%/lib/jboss-seam-debug.jar" NAME="lib-jboss-seam-debug.jar"/>
+ <FILESYSTEM ENTITY="FileSystemJar"
+ LOCATION="%workspace.home%/lib/jboss-seam-ioc.jar" NAME="lib-jboss-seam-ioc.jar"/>
+ <FILESYSTEM ENTITY="FileSystemJar"
+ LOCATION="%workspace.home%/lib/jboss-seam-mail.jar" NAME="lib-jboss-seam-mail.jar"/>
+ <FILESYSTEM ENTITY="FileSystemJar"
+ LOCATION="%workspace.home%/lib/jboss-seam-pdf.jar" NAME="lib-jboss-seam-pdf.jar"/>
+ <FILESYSTEM ENTITY="FileSystemJar"
+ LOCATION="%workspace.home%/lib/jboss-seam-remoting.jar" NAME="lib-jboss-seam-remoting.jar"/>
+ <FILESYSTEM ENTITY="FileSystemJar"
+ LOCATION="%workspace.home%/lib/jboss-seam-ui.jar" NAME="lib-jboss-seam-ui.jar"/>
+ <FILESYSTEM ENTITY="FileSystemJar"
+ LOCATION="%workspace.home%/lib/jboss-seam.jar" NAME="lib-jboss-seam.jar"/>
+ <FILESYSTEM ENTITY="FileSystemJar"
+ LOCATION="%workspace.home%/lib/jbpm-3.1.4.jar" NAME="lib-jbpm-3.1.4.jar"/>
+ <FILESYSTEM ENTITY="FileSystemJar"
+ LOCATION="%workspace.home%/lib/jsf-facelets.jar" NAME="lib-jsf-facelets.jar"/>
+ <FILESYSTEM ENTITY="FileSystemJar"
+ LOCATION="%workspace.home%/lib/oscache-2.3.2.jar" NAME="lib-oscache-2.3.2.jar"/>
+ <FILESYSTEM ENTITY="FileSystemJar"
+ LOCATION="%workspace.home%/lib/stringtemplate-2.3b6.jar" NAME="lib-stringtemplate-2.3b6.jar"/>
+ <FILESYSTEM ENTITY="FileSystemJar"
+ LOCATION="C:\Program Files\Java\jre1.5.0_10\lib\ext\dnsns.jar" NAME="lib-dnsns.jar"/>
+ <FILESYSTEM ENTITY="FileSystemJar"
+ LOCATION="C:\Program Files\Java\jre1.5.0_10\lib\ext\localedata.jar" NAME="lib-localedata.jar"/>
+ <FILESYSTEM ENTITY="FileSystemJar"
+ LOCATION="C:\Program Files\Java\jre1.5.0_10\lib\ext\sunjce_provider.jar" NAME="lib-sunjce_provider.jar"/>
+ <FILESYSTEM ENTITY="FileSystemJar"
+ LOCATION="C:\Program Files\Java\jre1.5.0_10\lib\ext\sunpkcs11.jar" NAME="lib-sunpkcs11.jar"/>
+ <FILESYSTEM ENTITY="FileSystemJar"
+ LOCATION="Y:\workspaces\runtime-New_configuration\SeamWebWarTestProject\WebContent\WEB-INF\lib\ajax4jsf-1.1.1-SNAPSHOT.jar" NAME="lib-ajax4jsf-1.1.1-SNAPSHOT.jar"/>
+ <FILESYSTEM ENTITY="FileSystemJar"
+ LOCATION="Y:\jboss-seam-1.2.1.GA\lib\jboss-ejb3-all.jar" NAME="lib-jboss-ejb3-all.jar"/>
+ <FILESYSTEM ENTITY="FileSystemJar"
+ LOCATION="%workspace.home%/lib/ajax4jsf-1.1.1-snapshot.jar" NAME="lib-ajax4jsf-1.1.1-snapshot.jar"/>
+ <WEB ENTITY="JstWeb" MODEL_PATH="/web.xml" SERVLET_VERSION="2.4">
+ <MODULE ENTITY="WebJSFModule" MODEL_PATH="/faces-config.xml"
+ ROOT="WEB-ROOT" SRC="src" URI="/WEB-INF/faces-config.xml"/>
+ </WEB>
+</FILESYSTEMS>
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/.settings/org.jboss.tools.seam.core.prefs
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/.settings/org.jboss.tools.seam.core.prefs (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/.settings/org.jboss.tools.seam.core.prefs 2007-10-11 14:08:55 UTC (rev 4118)
@@ -0,0 +1,9 @@
+#Thu Oct 11 13:48:02 MSD 2007
+action.package=org.domain.SeamWebWarTestProject.session
+eclipse.preferences.version=1
+model.package=org.domain.SeamWebWarTestProject.entity
+seam.project.connection.profile=aa
+seam.project.deployment.type=war
+seam.runtime.name=NewSeamRuntime1.2.1_GA
+seam.test.project=SeamWebWarTestProject-test
+test.package=org.domain.SeamWebWarTestProject.test
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/SeamWebWarTestProject.launch
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/SeamWebWarTestProject.launch (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/SeamWebWarTestProject.launch 2007-10-11 14:08:55 UTC (rev 4118)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Hibernate Console launch configuration -->
+<launchConfiguration type="org.hibernate.eclipse.launch.ConsoleConfigurationLaunchConfigurationType">
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="SeamWebWarTestProject"/>
+<stringAttribute key="org.hibernate.eclipse.launch.PROPERTY_FILE" value="/SeamWebWarTestProject/hibernate-console.properties"/>
+<stringAttribute key="org.hibernate.eclipse.launch.CONFIGURATION_FACTORY" value="JPA"/>
+</launchConfiguration>
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/META-INF/MANIFEST.MF
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/META-INF/MANIFEST.MF (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/META-INF/MANIFEST.MF 2007-10-11 14:08:55 UTC (rev 4118)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/components.xml
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/components.xml (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/components.xml 2007-10-11 14:08:55 UTC (rev 4118)
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<components xmlns="http://jboss.com/products/seam/components"
+ xmlns:core="http://jboss.com/products/seam/core"
+ xmlns:drools="http://jboss.com/products/seam/drools"
+ xmlns:security="http://jboss.com/products/seam/security"
+ xmlns:mail="http://jboss.com/products/seam/mail"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation=
+ "http://jboss.com/products/seam/core http://jboss.com/products/seam/core-1.1.xsd
+ http://jboss.com/products/seam/drools http://jboss.com/products/seam/drools-1.1.xsd
+ http://jboss.com/products/seam/security http://jboss.com/products/seam/security-1.1.xsd
+ http://jboss.com/products/seam/mail http://jboss.com/products/seam/mail-1.2.xsd
+ http://jboss.com/products/seam/components http://jboss.com/products/seam/components-1.1.xsd">
+
+ <component class="org.domain.SeamWebWarTestProject.session.StatefulComponent" name="statefulComponent" scope="application">
+ <property name="abc">value1</property>
+ </component>
+
+ <core:init debug="true" jndi-pattern="@jndiPattern@"/>
+
+ <core:manager concurrent-request-timeout="500"
+ conversation-timeout="120000"
+ conversation-id-parameter="cid"
+ conversation-is-long-running-parameter="clr"/>
+
+ <core:managed-persistence-context name="entityManager"
+ auto-create="true"
+ entity-manager-factory="#{SeamWebWarTestProjectEntityManagerFactory}"/>
+
+ <core:entity-manager-factory name="SeamWebWarTestProjectEntityManagerFactory"
+ persistence-unit-name="SeamWebWarTestProject"/>
+
+ <core:ejb installed="@embeddedEjb@"/>
+
+ <drools:rule-base name="securityRules">
+ <drools:rule-files><value>/security.drl</value></drools:rule-files>
+ </drools:rule-base>
+
+ <security:identity authenticate-method="#{authenticator.authenticate}"
+ security-rules="#{securityRules}"
+ remember-me="true"/>
+
+ <event type="org.jboss.seam.notLoggedIn">
+ <action expression="#{redirect.captureCurrentView}"/>
+ </event>
+ <event type="org.jboss.seam.postAuthenticate">
+ <action expression="#{redirect.returnToCapturedView}"/>
+ </event>
+
+ <mail:mail-session host="localhost" port="2525" username="test" password="test" />
+
+ <!-- For use with jBPM pageflow or process management -->
+ <!--
+ <core:jbpm>
+ <core:process-definitions></core:process-definitions>
+ <core:pageflow-definitions></core:pageflow-definitions>
+ </core:jbpm>
+ -->
+
+</components>
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/dev/org/domain/SeamWebWarTestProject/session/AbcComponent.class
===================================================================
(Binary files differ)
Property changes on: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/dev/org/domain/SeamWebWarTestProject/session/AbcComponent.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/dev/org/domain/SeamWebWarTestProject/session/Authenticator.class
===================================================================
(Binary files differ)
Property changes on: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/dev/org/domain/SeamWebWarTestProject/session/Authenticator.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/dev/org/domain/SeamWebWarTestProject/session/BbcComponent.class
===================================================================
(Binary files differ)
Property changes on: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/dev/org/domain/SeamWebWarTestProject/session/BbcComponent.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/dev/org/domain/SeamWebWarTestProject/session/StatefulComponent.class
===================================================================
(Binary files differ)
Property changes on: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/dev/org/domain/SeamWebWarTestProject/session/StatefulComponent.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/faces-config.xml
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/faces-config.xml (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/faces-config.xml 2007-10-11 14:08:55 UTC (rev 4118)
@@ -0,0 +1,28 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE faces-config PUBLIC
+ "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
+ "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
+
+<faces-config>
+
+ <application>
+ <message-bundle>messages</message-bundle>
+ <!-- Disabled when using Ajax4JSF -->
+ <!--
+ <view-handler>org.jboss.seam.ui.facelet.SeamFaceletViewHandler</view-handler>
+ -->
+ </application>
+
+ <!-- Seam transaction management -->
+ <lifecycle>
+ <phase-listener>org.jboss.seam.jsf.TransactionalSeamPhaseListener</phase-listener>
+ </lifecycle>
+
+ <!-- No Seam transaction management -->
+ <!--
+ <lifecycle>
+ <phase-listener>org.jboss.seam.jsf.SeamPhaseListener</phase-listener>
+ </lifecycle>
+ -->
+
+</faces-config>
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/jboss-web.xml
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/jboss-web.xml (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/jboss-web.xml 2007-10-11 14:08:55 UTC (rev 4118)
@@ -0,0 +1,8 @@
+<jboss-web>
+ <class-loading java2ClassLoadingCompliance="false">
+ <loader-repository>
+ seam.jboss.org:loader=SeamWebWarTestProject
+ <loader-repository-config>java2ParentDelegation=false</loader-repository-config>
+ </loader-repository>
+ </class-loading>
+</jboss-web>
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/ajax4jsf-1.1.1-SNAPSHOT.jar
===================================================================
(Binary files differ)
Property changes on: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/ajax4jsf-1.1.1-SNAPSHOT.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/antlr-2.7.6.jar
===================================================================
(Binary files differ)
Property changes on: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/antlr-2.7.6.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/antlr-3.0ea8.jar
===================================================================
(Binary files differ)
Property changes on: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/antlr-3.0ea8.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/commons-beanutils-1.7.0.jar
===================================================================
(Binary files differ)
Property changes on: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/commons-beanutils-1.7.0.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/commons-collections-3.1.jar
===================================================================
(Binary files differ)
Property changes on: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/commons-collections-3.1.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/commons-digester-1.6.jar
===================================================================
(Binary files differ)
Property changes on: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/commons-digester-1.6.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/commons-jci-core-1.0-406301.jar
===================================================================
(Binary files differ)
Property changes on: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/commons-jci-core-1.0-406301.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/commons-jci-janino-2.4.3.jar
===================================================================
(Binary files differ)
Property changes on: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/commons-jci-janino-2.4.3.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/drools-compiler-3.0.5.jar
===================================================================
(Binary files differ)
Property changes on: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/drools-compiler-3.0.5.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/drools-core-3.0.5.jar
===================================================================
(Binary files differ)
Property changes on: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/drools-core-3.0.5.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/hsqldb.jar
===================================================================
(Binary files differ)
Property changes on: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/hsqldb.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/janino-2.4.3.jar
===================================================================
(Binary files differ)
Property changes on: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/janino-2.4.3.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/jboss-seam-debug.jar
===================================================================
(Binary files differ)
Property changes on: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/jboss-seam-debug.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/jboss-seam-ioc.jar
===================================================================
(Binary files differ)
Property changes on: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/jboss-seam-ioc.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/jboss-seam-mail.jar
===================================================================
(Binary files differ)
Property changes on: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/jboss-seam-mail.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/jboss-seam-pdf.jar
===================================================================
(Binary files differ)
Property changes on: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/jboss-seam-pdf.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/jboss-seam-remoting.jar
===================================================================
(Binary files differ)
Property changes on: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/jboss-seam-remoting.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/jboss-seam-ui.jar
===================================================================
(Binary files differ)
Property changes on: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/jboss-seam-ui.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/jboss-seam.jar
===================================================================
(Binary files differ)
Property changes on: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/jboss-seam.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/jbpm-3.1.4.jar
===================================================================
(Binary files differ)
Property changes on: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/jbpm-3.1.4.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/jsf-facelets.jar
===================================================================
(Binary files differ)
Property changes on: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/jsf-facelets.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/oscache-2.3.2.jar
===================================================================
(Binary files differ)
Property changes on: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/oscache-2.3.2.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/stringtemplate-2.3b6.jar
===================================================================
(Binary files differ)
Property changes on: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/lib/stringtemplate-2.3b6.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/pages.xml
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/pages.xml (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/pages.xml 2007-10-11 14:08:55 UTC (rev 4118)
@@ -0,0 +1,53 @@
+<!DOCTYPE pages PUBLIC
+ "-//JBoss/Seam Pages Configuration DTD 1.2//EN"
+ "http://jboss.com/products/seam/pages-1.2.dtd">
+
+<pages no-conversation-view-id="/home.xhtml"
+ login-view-id="/login.xhtml">
+
+ <page view-id="*">
+ <navigation>
+ <rule if-outcome="home">
+ <redirect view-id="/home.xhtml"/>
+ </rule>
+ </navigation>
+ </page>
+
+ <exception class="org.jboss.seam.framework.EntityNotFoundException">
+ <redirect view-id="/error.xhtml">
+ <message>Not found</message>
+ </redirect>
+ </exception>
+
+ <exception class="javax.persistence.EntityNotFoundException">
+ <redirect view-id="/error.xhtml">
+ <message>Not found</message>
+ </redirect>
+ </exception>
+
+ <exception class="javax.persistence.OptimisticLockException">
+ <end-conversation/>
+ <redirect view-id="/error.xhtml">
+ <message>Another user changed the same data, please try again</message>
+ </redirect>
+ </exception>
+
+ <exception class="org.jboss.seam.security.AuthorizationException">
+ <redirect>
+ <message>You don't have permission to do this</message>
+ </redirect>
+ </exception>
+
+ <exception class="org.jboss.seam.security.NotLoggedInException">
+ <redirect view-id="/login.xhtml">
+ <message>Please log in first</message>
+ </redirect>
+ </exception>
+
+ <exception>
+ <redirect view-id="/error.xhtml">
+ <message>Unexpected error, please try again</message>
+ </redirect>
+ </exception>
+
+</pages>
\ No newline at end of file
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/web.xml
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/web.xml (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/web.xml 2007-10-11 14:08:55 UTC (rev 4118)
@@ -0,0 +1,103 @@
+<?xml version="1.0" ?>
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+ version="2.4">
+
+ <!-- Ajax4jsf (must come first!) -->
+
+ <filter>
+ <display-name>Ajax4jsf Filter</display-name>
+ <filter-name>ajax4jsf</filter-name>
+ <filter-class>org.ajax4jsf.Filter</filter-class>
+ </filter>
+
+ <filter-mapping>
+ <filter-name>ajax4jsf</filter-name>
+ <url-pattern>*.seam</url-pattern>
+ </filter-mapping>
+
+ <context-param>
+ <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
+ <param-value>org.jboss.seam.ui.facelet.SeamFaceletViewHandler</param-value>
+ </context-param>
+
+ <context-param>
+ <param-name>org.ajax4jsf.SKIN</param-name>
+ <param-value>blueSky</param-value>
+ </context-param>
+
+ <!-- Seam -->
+
+ <listener>
+ <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
+ </listener>
+
+ <filter>
+ <filter-name>Seam Filter</filter-name>
+ <filter-class>org.jboss.seam.web.SeamFilter</filter-class>
+ </filter>
+
+ <filter-mapping>
+ <filter-name>Seam Filter</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+
+ <servlet>
+ <servlet-name>Seam Resource Servlet</servlet-name>
+ <servlet-class>org.jboss.seam.servlet.ResourceServlet</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Seam Resource Servlet</servlet-name>
+ <url-pattern>/seam/resource/*</url-pattern>
+ </servlet-mapping>
+
+ <!-- MyFaces -->
+
+ <listener>
+ <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
+ </listener>
+
+ <!-- Facelets development mode (disable in production) -->
+
+ <context-param>
+ <param-name>facelets.DEVELOPMENT</param-name>
+ <param-value>true</param-value>
+ </context-param>
+
+ <!-- JSF -->
+
+ <context-param>
+ <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+ <param-value>client</param-value>
+ </context-param>
+
+ <context-param>
+ <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
+ <param-value>.xhtml</param-value>
+ </context-param>
+
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.seam</url-pattern>
+ </servlet-mapping>
+
+ <security-constraint>
+ <display-name>Restrict raw XHTML Documents</display-name>
+ <web-resource-collection>
+ <web-resource-name>XHTML</web-resource-name>
+ <url-pattern>*.xhtml</url-pattern>
+ </web-resource-collection>
+ <auth-constraint>
+ <role-name>NONE</role-name>
+ </auth-constraint>
+ </security-constraint>
+
+</web-app>
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/abcComponent.xhtml
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/abcComponent.xhtml (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/abcComponent.xhtml 2007-10-11 14:08:55 UTC (rev 4118)
@@ -0,0 +1,31 @@
+<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich"
+ xmlns:a="https://ajax4jsf.dev.java.net/ajax"
+ template="layout/template.xhtml">
+
+<ui:define name="body">
+
+ <h:messages globalOnly="true" styleClass="message"/>
+
+ <rich:panel>
+ <f:facet name="header">abcComponent</f:facet>
+
+ <h:form id="abcComponentForm">
+
+ <h:commandButton id="abcComponent" value="abcComponent!"
+ action="#{abcComponent.abcComponent}"/>
+
+ </h:form>
+
+ </rich:panel>
+
+</ui:define>
+
+</ui:composition>
+
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/bbcComponent.xhtml
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/bbcComponent.xhtml (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/bbcComponent.xhtml 2007-10-11 14:08:55 UTC (rev 4118)
@@ -0,0 +1,31 @@
+<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich"
+ xmlns:a="https://ajax4jsf.dev.java.net/ajax"
+ template="layout/template.xhtml">
+
+<ui:define name="body">
+
+ <h:messages globalOnly="true" styleClass="message"/>
+
+ <rich:panel>
+ <f:facet name="header">bbcComponent</f:facet>
+
+ <h:form id="bbcComponentForm">
+
+ <h:commandButton id="bbcComponent" value="bbcComponent!"
+ action="#{bbcComponent.bbcComponent}"/>
+
+ </h:form>
+
+ </rich:panel>
+
+</ui:define>
+
+</ui:composition>
+
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/error.xhtml
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/error.xhtml (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/error.xhtml 2007-10-11 14:08:55 UTC (rev 4118)
@@ -0,0 +1,18 @@
+<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ template="layout/template.xhtml">
+
+<ui:define name="body">
+
+ <h1>Error</h1>
+ <p>Something bad happened :-(</p>
+
+ <h:messages styleClass="message"/>
+
+</ui:define>
+</ui:composition>
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/home.xhtml
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/home.xhtml (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/home.xhtml 2007-10-11 14:08:55 UTC (rev 4118)
@@ -0,0 +1,31 @@
+<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich"
+ template="layout/template.xhtml">
+
+<ui:define name="body">
+
+ <h:messages globalOnly="true" styleClass="message"/>
+
+ <rich:panel>
+ <f:facet name="header">Welcome!</f:facet>
+ <p>This empty shell application includes:</p>
+ <ul>
+ <li>Ant build script</li>
+ <li>Deployment to JBoss AS</li>
+ <li>Integration testing using TestNG and JBoss Embeddable EJB3</li>
+ <li>EJB 3.0 Seam components</li>
+ <li>Templated Facelets views</li>
+ <li>HSQL (or MySQL) Datasource</li>
+ <li>Default CSS stylesheet</li>
+ <li>Internationalization support</li>
+ </ul>
+ </rich:panel>
+
+</ui:define>
+</ui:composition>
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/img/cal-next.png
===================================================================
(Binary files differ)
Property changes on: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/img/cal-next.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/img/cal-prev.png
===================================================================
(Binary files differ)
Property changes on: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/img/cal-prev.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/img/dtpick.gif
===================================================================
(Binary files differ)
Property changes on: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/img/dtpick.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/index.html
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/index.html (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/index.html 2007-10-11 14:08:55 UTC (rev 4118)
@@ -0,0 +1,5 @@
+<html>
+<head>
+ <meta http-equiv="Refresh" content="0; URL=home.seam">
+</head>
+</html>
\ No newline at end of file
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/layout/display.xhtml
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/layout/display.xhtml (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/layout/display.xhtml 2007-10-11 14:08:55 UTC (rev 4118)
@@ -0,0 +1,16 @@
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:s="http://jboss.com/products/seam/taglib">
+
+ <div class="prop">
+ <span class="name">
+ <ui:insert name="label"/>
+ </span>
+ <span class="value">
+ <ui:insert/>
+ </span>
+ </div>
+
+</ui:composition>
\ No newline at end of file
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/layout/edit.xhtml
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/layout/edit.xhtml (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/layout/edit.xhtml 2007-10-11 14:08:55 UTC (rev 4118)
@@ -0,0 +1,24 @@
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:s="http://jboss.com/products/seam/taglib">
+
+ <div class="prop">
+
+ <s:label styleClass="name #{invalid?'errors':''}">
+ <ui:insert name="label"/>
+ <s:span styleClass="required" rendered="#{required}">*</s:span>
+ </s:label>
+
+ <span class="value #{invalid?'errors':''}">
+ <s:validateAll>
+ <ui:insert/>
+ </s:validateAll>
+ </span>
+
+ <s:message styleClass="error errors"/>
+
+ </div>
+
+</ui:composition>
\ No newline at end of file
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/layout/loginout.xhtml
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/layout/loginout.xhtml (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/layout/loginout.xhtml 2007-10-11 14:08:55 UTC (rev 4118)
@@ -0,0 +1,12 @@
+<div class="loginout"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:s="http://jboss.com/products/seam/taglib">
+ <h:outputText value="Welcome, #{identity.username}" rendered="#{identity.loggedIn}"/>
+  | 
+ <s:link view="/login.xhtml" value="Login" rendered="#{not identity.loggedIn}"/>
+ <s:link view="/home.xhtml" action="#{identity.logout}" value="Logout" rendered="#{identity.loggedIn}"/>
+ |
+</div>
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/layout/menu.xhtml
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/layout/menu.xhtml (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/layout/menu.xhtml 2007-10-11 14:08:55 UTC (rev 4118)
@@ -0,0 +1,17 @@
+<rich:toolBar
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+ <rich:toolBarGroup>
+ <h:outputText value="#{projectName}:"/>
+ <s:link view="/home.xhtml" value="Home"/>
+ </rich:toolBarGroup>
+ <rich:toolBarGroup location="right">
+ <h:outputText value="Welcome, #{identity.username}" rendered="#{identity.loggedIn}"/>
+ <s:link view="/login.xhtml" value="Login" rendered="#{not identity.loggedIn}"/>
+ <s:link view="/home.xhtml" action="#{identity.logout}" value="Logout" rendered="#{identity.loggedIn}"/>
+ </rich:toolBarGroup>
+</rich:toolBar>
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/layout/template.xhtml
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/layout/template.xhtml (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/layout/template.xhtml 2007-10-11 14:08:55 UTC (rev 4118)
@@ -0,0 +1,30 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:s="http://jboss.com/products/seam/taglib">
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <title>SeamWebWarTestProject</title>
+ <link href="stylesheet/theme.css" rel="stylesheet" type="text/css" />
+</head>
+
+<body>
+
+ <ui:include src="menu.xhtml">
+ <ui:param name="projectName" value="SeamWebWarTestProject"/>
+ </ui:include>
+
+ <div class="body">
+ <ui:insert name="body"/>
+ </div>
+
+ <div class="footer">
+ Powered by <a href="http://jboss.com/products/seam">Seam</a>.
+ Generated by seam-gen.
+ </div>
+
+</body>
+</html>
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/login.page.xml
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/login.page.xml (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/login.page.xml 2007-10-11 14:08:55 UTC (rev 4118)
@@ -0,0 +1,11 @@
+<!DOCTYPE page PUBLIC
+ "-//JBoss/Seam Pages Configuration DTD 1.2//EN"
+ "http://jboss.com/products/seam/pages-1.2.dtd">
+
+<page>
+ <navigation from-action="#{identity.login}">
+ <rule if="#{identity.loggedIn}">
+ <redirect view-id="/home.xhtml"/>
+ </rule>
+ </navigation>
+</page>
\ No newline at end of file
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/login.xhtml
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/login.xhtml (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/login.xhtml 2007-10-11 14:08:55 UTC (rev 4118)
@@ -0,0 +1,45 @@
+<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich"
+ template="layout/template.xhtml">
+
+<ui:define name="body">
+
+ <h:messages styleClass="message"/>
+
+ <h:form id="login">
+
+ <rich:panel>
+ <f:facet name="header">Login</f:facet>
+
+ <p>Please login using any username and password</p>
+
+ <div class="dialog">
+ <h:panelGrid columns="2" rowClasses="prop" columnClasses="name,value">
+ <h:outputLabel for="username">Username</h:outputLabel>
+ <h:inputText id="username"
+ value="#{identity.username}"/>
+ <h:outputLabel for="password">Password</h:outputLabel>
+ <h:inputSecret id="password"
+ value="#{identity.password}"/>
+ <h:outputLabel for="rememberMe">Remember me</h:outputLabel>
+ <h:selectBooleanCheckbox id="rememberMe"
+ value="#{identity.rememberMe}"/>
+ </h:panelGrid>
+ </div>
+
+ </rich:panel>
+
+ <div class="actionButtons">
+ <h:commandButton value="Login" action="#{identity.login}"/>
+ </div>
+
+ </h:form>
+
+ </ui:define>
+</ui:composition>
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/statefulComponent.xhtml
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/statefulComponent.xhtml (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/statefulComponent.xhtml 2007-10-11 14:08:55 UTC (rev 4118)
@@ -0,0 +1,31 @@
+<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich"
+ xmlns:a="https://ajax4jsf.dev.java.net/ajax"
+ template="layout/template.xhtml">
+
+<ui:define name="body">
+
+ <h:messages globalOnly="true" styleClass="message"/>
+
+ <rich:panel>
+ <f:facet name="header">statefulComponent</f:facet>
+
+ <h:form id="statefulComponentForm">
+
+ <h:commandButton id="statefulComponent" value="statefulComponent!"
+ action="#{statefulComponent.statefulComponent}"/>
+
+ </h:form>
+
+ </rich:panel>
+
+</ui:define>
+
+</ui:composition>
+
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/stylesheet/theme.css
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/stylesheet/theme.css (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/stylesheet/theme.css 2007-10-11 14:08:55 UTC (rev 4118)
@@ -0,0 +1,289 @@
+a:active, a:link, a:visited {
+ color: #0D5798;
+}
+a:hover {
+ color: #8CAFCD;
+}
+
+input, textarea {
+ border: 1px solid #BBBBBB;
+ font-size: 10px;
+ background: #F0F8FF;
+ color: black;
+}
+
+input[type='submit'], input[type='button'] {
+ background: #4477AA;
+ color: white;
+ margin: 5px;
+ border-color: gray;
+}
+
+.tableControl, .actionButtons {
+ width: 100%;
+}
+
+.tableControl {
+ text-align: right;
+}
+
+.footer {
+ text-align: center;
+ font-size: 10px;
+}
+
+.rich-table {
+ width:100%;
+}
+
+h1 {
+ font-family: Arial,sans-serif;
+ color: #578BB8;
+ font-size: 1.6em;
+ margin-top: 0;
+}
+
+body {
+ margin: 0px;
+ font-family: Arial,sans-serif;
+ color: #616161;
+}
+
+.body {
+ padding: 30px;
+}
+
+.columnHeader:hover
+{
+ color: #FF6600;
+}
+
+.message {
+ border: 1px solid #FFCC00;
+ padding: 5px;
+ margin-top: 5px;
+ margin-bottom: 5px;
+ background-color: #F0F8FF;
+ font-size: 12px;
+}
+
+.name {
+ vertical-align: top;
+ font-weight: bold;
+ width: 115px;
+ float: left;
+ padding: 5px;
+ margin-top: 3px;
+ clear: left;
+}
+.value {
+ float: left;
+ padding: 5px;
+}
+.error {
+ margin-left: 20px;
+ margin-top: 5px;
+ float: left;
+ padding: 5px;
+ border: 1px solid red;
+}
+
+.errors {
+ color: red;
+}
+.errors input {
+ border: 1px solid red;
+}
+.errors textarea {
+ border: 1px solid red;
+}
+.required {
+ color: red;
+ padding-left: 2px;
+}
+
+/* date picker style */
+div.seam-date
+{
+ margin-top: 5px;
+ border: 1px solid #AAAAAA;
+ background-color: #FFFFFF;
+ color: #505050;
+ font-family: Tahoma, Arial, Helvetica, sans-serif;
+ font-size: 12px;
+}
+
+table.seam-date td {
+ font-family: Tahoma, Arial, Helvetica, sans-serif;
+ font-weight: 12px;
+}
+
+.seam-date-monthNames
+{
+ width: 70px;
+ border: 1px solid #dddddd;
+ border-right: 3px solid #444444;
+ border-bottom: 3px solid #444444;
+ background-color: #ffffff;
+ font-size: 12px;
+ cursor: pointer;
+ font-family: Tahoma, Arial, Helvetica, sans-serif;
+ font-weight: normal;
+}
+
+a.seam-date-monthNameLink, a.seam-date-monthNameLink:visited
+{
+ text-align: center;
+ display: block;
+ color: #555555;
+}
+
+a.seam-date-monthNameLink:hover
+{
+ background-color: #CCCCCC;
+ color: red;
+}
+
+.seam-date-years
+{
+ height: 10em;
+ overflow: auto;
+ width: 60px;
+ border: 1px solid #dddddd;
+ border-right: 3px solid #444444;
+ border-bottom: 3px solid #444444;
+ background-color: #ffffff;
+ font-size: 12px;
+ cursor: pointer;
+ font-family: Tahoma, Arial, Helvetica, sans-serif;
+ font-weight: normal;
+}
+
+a.seam-date-yearLink, a.seam-date-yearLink:visited
+{
+ text-align: center;
+ display: block;
+ color: #555555;
+}
+
+a.seam-date-yearLink:hover
+{
+ background-color: #CCCCCC;
+ color: red;
+}
+
+tr.seam-date-header
+{
+ padding: 2px 0px 2px 0px;
+}
+
+td.seam-date-header
+{
+ padding: 0px 8px 0px 8px;
+ text-align: center;
+ color: gray;
+ font-family: Tahoma, Arial, Helvetica, sans-serif;
+ font-weight: bold;
+ font-size: 12px;
+}
+
+td.seam-date-header-prevMonth
+{
+ background-image: url("../img/cal-prev.png");
+ background-repeat: no-repeat;
+ background-position: center;
+ padding: 0px 2px 0px 2px;
+ width: 17px;
+ height: 16px;
+ margin-left: 2px;
+}
+
+td.seam-date-header-nextMonth
+{
+ background-image: url("../img/cal-next.png");
+ background-repeat: no-repeat;
+ background-position: center;
+ padding: 0px 2px 0px 2px;
+ width: 17px;
+ height: 16px;
+ margin-right: 2px;
+}
+
+tr.seam-date-headerDays
+{
+ color: white;
+ font-weight: normal;
+}
+
+tr.seam-date-headerDays > td
+{
+ background-color: #CCCCCC;
+ border: 1px solid #AAAAAA;
+ color: white;
+ text-align: center;
+ width: 26px;
+}
+
+tr.seam-date-footer
+{
+ background-color: white;
+ color: #505050;
+ font-weight: bold;
+}
+
+tr.seam-date-footer > td
+{
+ text-align: center;
+}
+
+td.seam-date-inMonth
+{
+ background-color: white;
+ color: black;
+ font-weight: normal;
+ cursor: pointer;
+ border: 1px solid #ece9d8;
+}
+
+td.seam-date-outMonth
+{
+ background-color: white;
+ color: #999999;
+ font-weight: normal;
+ cursor: pointer;
+ border: 1px solid #ece9d8;
+}
+
+td.seam-date-selected
+{
+ background-color: #CCCCCC;
+ border: 1px solid #AAAAAA;
+ color: black;
+ font-weight: normal;
+}
+
+td.seam-date-dayOff-inMonth
+{
+ background-color: #efefef;
+ color: black;
+ font-weight: normal;
+ cursor: pointer;
+ border: 1px solid #ece9d8;
+}
+
+td.seam-date-dayOff-outMonth
+{
+ background-color: #efefef;
+ color: #999999;
+ font-weight: normal;
+ cursor: pointer;
+ border: 1px solid #ece9d8;
+}
+
+td.seam-date-hover
+{
+ background-color: #CCCCCC;
+ border: 1px solid #AAAAAA;
+ cursor: pointer;
+ color: red;
+}
\ No newline at end of file
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/build/classes/META-INF/persistence.xml
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/build/classes/META-INF/persistence.xml (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/build/classes/META-INF/persistence.xml 2007-10-11 14:08:55 UTC (rev 4118)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Persistence deployment descriptor for dev profile -->
+<persistence xmlns="http://java.sun.com/xml/ns/persistence"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
+ version="1.0">
+
+ <persistence-unit name="SeamWebWarTestProject" transaction-type="JTA">
+ <provider>org.hibernate.ejb.HibernatePersistence</provider>
+ <jta-data-source>java:/SeamWebWarTestProjectDatasource</jta-data-source>
+ <properties>
+ <property name="hibernate.hbm2ddl.auto" value="update"/>
+ <property name="hibernate.show_sql" value="true"/>
+ <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup"/>
+ </properties>
+ </persistence-unit>
+
+</persistence>
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/build/classes/SeamWebWarTestProject-ds.xml
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/build/classes/SeamWebWarTestProject-ds.xml (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/build/classes/SeamWebWarTestProject-ds.xml 2007-10-11 14:08:55 UTC (rev 4118)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<datasources>
+
+ <local-tx-datasource>
+ <jndi-name>SeamWebWarTestProjectDatasource</jndi-name>
+ <connection-url>jdbc:hsqldb:MyDB</connection-url>
+ <driver-class>org.hsqldb.jdbcDriver</driver-class>
+ <user-name>sa</user-name>
+ <password></password>
+<!--
+ <exception-sorter-class-name>
+ org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter
+ </exception-sorter-class-name>
+ <metadata>
+ <type-mapping>mySQL</type-mapping>
+ </metadata>
+-->
+ </local-tx-datasource>
+
+</datasources>
+
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/build/classes/components.properties
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/build/classes/components.properties (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/build/classes/components.properties 2007-10-11 14:08:55 UTC (rev 4118)
@@ -0,0 +1,4 @@
+#
+#Thu Oct 11 13:48:01 MSD 2007
+jndiPattern=\#{ejbName}/local
+embeddedEjb=false
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/build/classes/import.sql
===================================================================
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/build/classes/messages_en.properties
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/build/classes/messages_en.properties (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/build/classes/messages_en.properties 2007-10-11 14:08:55 UTC (rev 4118)
@@ -0,0 +1,115 @@
+up=\u2191
+down=\u2193
+left=\u2039
+right=\u203A
+
+validator.assertFalse=validation failed
+validator.assertTrue=validation failed
+validator.future=must be a future date
+validator.length=length must be between {min} and {max}
+validator.max=must be less than or equal to {value}
+validator.min=must be greater than or equal to {value}
+validator.notNull=may not be null
+validator.past=must be a past date
+validator.pattern=must match "{regex}"
+validator.range=must be between {min} and {max}
+validator.size=size must be between {min} and {max}
+validator.email=must be a well-formed email address
+
+org.jboss.seam.loginFailed=Login failed
+org.jboss.seam.loginSuccessful=Welcome, #0
+
+org.jboss.seam.TransactionFailed=Transaction failed
+org.jboss.seam.NoConversation=The conversation ended, timed out or was processing another request
+org.jboss.seam.IllegalNavigation=Illegal navigation
+org.jboss.seam.ProcessEnded=Process #0 already ended
+org.jboss.seam.ProcessNotFound=Process #0 not found
+org.jboss.seam.TaskEnded=Task #0 already ended
+org.jboss.seam.TaskNotFound=Task #0 not found
+org.jboss.seam.NotLoggedIn=Please log in first
+
+javax.faces.component.UIInput.CONVERSION=value could not be converted to the expected type
+javax.faces.component.UIInput.REQUIRED=value is required
+javax.faces.component.UIInput.UPDATE=an error occurred when processing your submitted information
+javax.faces.component.UISelectOne.INVALID=value is not valid
+javax.faces.component.UISelectMany.INVALID=value is not valid
+
+javax.faces.converter.BigDecimalConverter.DECIMAL=value must be a number
+javax.faces.converter.BigDecimalConverter.DECIMAL_detail=value must be a signed decimal number consisting of zero or more digits, optionally followed by a decimal point and fraction, eg. {1}
+javax.faces.converter.BigIntegerConverter.BIGINTEGER=value must be an integer
+javax.faces.converter.BigIntegerConverter.BIGINTEGER_detail=value must be a signed integer number consisting of zero or more digits
+javax.faces.converter.BooleanConverter.BOOLEAN=value must be true or false
+javax.faces.converter.BooleanConverter.BOOLEAN_detail=value must be true or false (any value other than true will evaluate to false)
+javax.faces.converter.ByteConverter.BYTE=value must be a number between 0 and 255
+javax.faces.converter.ByteConverter.BYTE_detail=value must be a number between 0 and 255
+javax.faces.converter.CharacterConverter.CHARACTER=value must be a character
+javax.faces.converter.CharacterConverter.CHARACTER_detail=value must be a valid ASCII character
+javax.faces.converter.DateTimeConverter.DATE=value must be a date
+javax.faces.converter.DateTimeConverter.DATE_detail=value must be a date, eg. {1}
+javax.faces.converter.DateTimeConverter.TIME=value must be a time
+javax.faces.converter.DateTimeConverter.TIME_detail=value must be a time, eg. {1}
+javax.faces.converter.DateTimeConverter.DATETIME=value must be a date and time
+javax.faces.converter.DateTimeConverter.DATETIME_detail=value must be a date and time, eg. {1}
+javax.faces.converter.DateTimeConverter.PATTERN_TYPE=a pattern or type attribute must be specified to convert the value
+javax.faces.converter.DoubleConverter.DOUBLE=value must be a number
+javax.faces.converter.DoubleConverter.DOUBLE_detail=value must be a number between 4.9E-324 and 1.7976931348623157E308
+javax.faces.converter.EnumConverter.ENUM=value must be convertible to an enum
+javax.faces.converter.EnumConverter.ENUM_detail=value must be convertible to an enum or from the enum that contains the constant {1}
+javax.faces.converter.EnumConverter.ENUM_NO_CLASS=value must be convertible to an enum or from the enum, but no enum class provided
+javax.faces.converter.EnumConverter.ENUM_NO_CLASS_detail=value must be convertible to an enum or from the enum, but no enum class provided
+javax.faces.converter.FloatConverter.FLOAT=value must be a number
+javax.faces.converter.FloatConverter.FLOAT_detail=value must be a number between 1.4E-45 and 3.4028235E38
+javax.faces.converter.IntegerConverter.INTEGER=value must be an integer
+javax.faces.converter.IntegerConverter.INTEGER_detail=value must be an integer number between -2147483648 and 2147483647
+javax.faces.converter.LongConverter.LONG=value must be an integer
+javax.faces.converter.LongConverter.LONG_detail=must be an integer number between -9223372036854775808 and 9223372036854775807
+javax.faces.converter.NumberConverter.CURRENCY=value must be a currency amount
+javax.faces.converter.NumberConverter.CURRENCY_detail=value must be a currency amount, eg. {1}
+javax.faces.converter.NumberConverter.PERCENT=value must be a percentage amount
+javax.faces.converter.NumberConverter.PERCENT_detail=value must be a percentage amount, eg. {1}
+javax.faces.converter.NumberConverter.NUMBER=value must be a number
+javax.faces.converter.NumberConverter.NUMBER_detail=value must be a number
+javax.faces.converter.NumberConverter.PATTERN=value must be a number
+javax.faces.converter.NumberConverter.PATTERN_detail=value must be a number
+javax.faces.converter.ShortConverter.SHORT=value must be an integer
+javax.faces.converter.ShortConverter.SHORT_detail=value must be an integer number between -32768 and 32767
+
+javax.faces.validator.DoubleRangeValidator.MAXIMUM=value must be less than or equal to {0}
+javax.faces.validator.DoubleRangeValidator.MINIMUM=value must be greater than or equal to {0}
+javax.faces.validator.DoubleRangeValidator.NOT_IN_RANGE=value must be between {0} and {1}
+javax.faces.validator.DoubleRangeValidator.TYPE=value is not of the correct type
+javax.faces.validator.LengthValidator.MAXIMUM=value is must be shorter than or equal to {0} characters
+javax.faces.validator.LengthValidator.MINIMUM=value is must be longer than or equal to {0} characters
+javax.faces.validator.LongRangeValidator.MAXIMUM=value must be less than or equal to {0}
+javax.faces.validator.LongRangeValidator.MINIMUM=value must be greater than or equal to {0}
+javax.faces.validator.LongRangeValidator.NOT_IN_RANGE=value must be between {0} and {1}
+javax.faces.validator.LongRangeValidator.TYPE=value is not of the correct type
+
+javax.faces.validator.NOT_IN_RANGE=value must be between {0} and {1}
+javax.faces.converter.STRING=value could not be converted to a string
+
+#JSF 1.1:
+javax.faces.convert.BigDecimalConverter.CONVERSION value must be a number
+javax.faces.convert.BigDecimalConverter.CONVERSION_detail value must be a number
+javax.faces.convert.BigIntegerConverter.CONVERSION value must be an integre
+javax.faces.convert.BigIntegerConverter.CONVERSION_detail value must be a number
+javax.faces.convert.BooleanConverter.CONVERSION value must be true or false
+javax.faces.convert.BooleanConverter.CONVERSION_detail value must be true or false
+javax.faces.convert.ByteConverter.CONVERSION value must be a byte
+javax.faces.convert.ByteConverter.CONVERSION_detail value must be a byte
+javax.faces.convert.CharacterConverter.CONVERSION value must be a character
+javax.faces.convert.CharacterConverter.CONVERSION_detail value must be a character
+javax.faces.convert.DateTimeConverter.CONVERSION value must be a datetime
+javax.faces.convert.DateTimeConverter.CONVERSION_detail value must be a datetime
+javax.faces.convert.DoubleConverter.CONVERSION value must be a number
+javax.faces.convert.DoubleConverter.CONVERSION_detail value must be a number
+javax.faces.convert.FloatConverter.CONVERSION value must be a number
+javax.faces.convert.FloatConverter.CONVERSION_detail value must be a number
+javax.faces.convert.IntegerConverter.CONVERSION value must be an integer
+javax.faces.convert.IntegerConverter.CONVERSION_detail value must be an integer
+javax.faces.convert.LongConverter.CONVERSION value must be an integer
+javax.faces.convert.LongConverter.CONVERSION_detail value must be a long integer
+javax.faces.convert.NumberConverter.CONVERSION value must be a number
+javax.faces.convert.NumberConverter.CONVERSION_detail value must be a number
+javax.faces.convert.ShortConverter.CONVERSION value must be an integer
+javax.faces.convert.ShortConverter.CONVERSION_detail value must be a short integer
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/build/classes/seam.properties
===================================================================
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/build/classes/security.drl
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/build/classes/security.drl (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/build/classes/security.drl 2007-10-11 14:08:55 UTC (rev 4118)
@@ -0,0 +1,6 @@
+package Permissions;
+
+import java.security.Principal;
+
+import org.jboss.seam.security.PermissionCheck;
+import org.jboss.seam.security.Role;
\ No newline at end of file
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/hibernate-console.properties
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/hibernate-console.properties (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/hibernate-console.properties 2007-10-11 14:08:55 UTC (rev 4118)
@@ -0,0 +1,10 @@
+#File used by hibernate tools to override <datasource> and other container specific settings in persistence.xml
+hibernate.connection.password=
+hibernate.connection.username=sa
+hibernate.connection.driver_class=org.hsqldb.jdbcDriver
+hibernate.dialect=org.hibernate.dialect.HSQLDialect
+hibernate.connection.url=jdbc:hsqldb:MyDB
+
+hibernate.connection.provider_class org.hibernate.connection.DriverManagerConnectionProvider
+hibernate.datasource=
+hibernate.transaction.manager_lookup_class=
\ No newline at end of file
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/AbcComponent.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/AbcComponent.java (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/AbcComponent.java 2007-10-11 14:08:55 UTC (rev 4118)
@@ -0,0 +1,20 @@
+package org.domain.SeamWebWarTestProject.session;
+
+import org.jboss.seam.annotations.Logger;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.log.Log;
+
+@Name("abcComponent")
+public class AbcComponent {
+
+ @Logger private Log log;
+
+ public void abcComponent()
+ {
+ //implement your business logic here
+ log.info("abcComponent.abcComponent() action called");
+ }
+
+ //add additional action methods
+
+}
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/Authenticator.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/Authenticator.java (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/Authenticator.java 2007-10-11 14:08:55 UTC (rev 4118)
@@ -0,0 +1,26 @@
+package org.domain.SeamWebWarTestProject.session;
+
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Logger;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.log.Log;
+import org.jboss.seam.security.Identity;
+
+
+@Name("authenticator")
+public class Authenticator
+{
+ @Logger Log log;
+
+ @In Identity identity;
+
+ public boolean authenticate()
+ {
+ log.info("authenticating #0", identity.getUsername());
+ //write your authentication logic here,
+ //return true if the authentication was
+ //successful, false otherwise
+ identity.addRole("admin");
+ return true;
+ }
+}
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/BbcComponent.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/BbcComponent.java (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/BbcComponent.java 2007-10-11 14:08:55 UTC (rev 4118)
@@ -0,0 +1,20 @@
+package org.domain.SeamWebWarTestProject.session;
+
+import org.jboss.seam.annotations.Logger;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.log.Log;
+
+@Name("bbcComponent")
+public class BbcComponent {
+
+ @Logger private Log log;
+
+ public void bbcComponent()
+ {
+ //implement your business logic here
+ log.info("bbcComponent.bbcComponent() action called");
+ }
+
+ //add additional action methods
+
+}
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/StatefulComponent.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/StatefulComponent.java (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/StatefulComponent.java 2007-10-11 14:08:55 UTC (rev 4118)
@@ -0,0 +1,50 @@
+package org.domain.SeamWebWarTestProject.session;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.Destroy;
+import org.jboss.seam.annotations.Logger;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.log.Log;
+
+@Name("statefulComponent")
+(a)Scope(ScopeType.APPLICATION)
+@Stateful
+public class StatefulComponent {
+
+ private String abc;
+
+ @Logger private Log log;
+
+
+ //seam-gen method
+ public String statefulComponent()
+ {
+ //implement your business logic here
+ log.info("statefulComponent.statefulComponent() action called");
+ return "success";
+ }
+
+ //add additional action methods
+ @Destroy
+ public void destroyMethod(){
+
+ }
+
+ @Remove
+ public void removeMethod(){
+
+ }
+
+ public String getAbc() {
+ return abc;
+ }
+
+ public void setAbc(String abc) {
+ this.abc = abc;
+ }
+
+}
\ No newline at end of file
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/model/META-INF/persistence.xml
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/model/META-INF/persistence.xml (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/model/META-INF/persistence.xml 2007-10-11 14:08:55 UTC (rev 4118)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Persistence deployment descriptor for dev profile -->
+<persistence xmlns="http://java.sun.com/xml/ns/persistence"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
+ version="1.0">
+
+ <persistence-unit name="SeamWebWarTestProject" transaction-type="JTA">
+ <provider>org.hibernate.ejb.HibernatePersistence</provider>
+ <jta-data-source>java:/SeamWebWarTestProjectDatasource</jta-data-source>
+ <properties>
+ <property name="hibernate.hbm2ddl.auto" value="update"/>
+ <property name="hibernate.show_sql" value="true"/>
+ <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup"/>
+ </properties>
+ </persistence-unit>
+
+</persistence>
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/model/SeamWebWarTestProject-ds.xml
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/model/SeamWebWarTestProject-ds.xml (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/model/SeamWebWarTestProject-ds.xml 2007-10-11 14:08:55 UTC (rev 4118)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<datasources>
+
+ <local-tx-datasource>
+ <jndi-name>SeamWebWarTestProjectDatasource</jndi-name>
+ <connection-url>jdbc:hsqldb:MyDB</connection-url>
+ <driver-class>org.hsqldb.jdbcDriver</driver-class>
+ <user-name>sa</user-name>
+ <password></password>
+<!--
+ <exception-sorter-class-name>
+ org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter
+ </exception-sorter-class-name>
+ <metadata>
+ <type-mapping>mySQL</type-mapping>
+ </metadata>
+-->
+ </local-tx-datasource>
+
+</datasources>
+
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/model/components.properties
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/model/components.properties (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/model/components.properties 2007-10-11 14:08:55 UTC (rev 4118)
@@ -0,0 +1,4 @@
+#
+#Thu Oct 11 13:48:01 MSD 2007
+jndiPattern=\#{ejbName}/local
+embeddedEjb=false
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/model/import.sql
===================================================================
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/model/messages_en.properties
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/model/messages_en.properties (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/model/messages_en.properties 2007-10-11 14:08:55 UTC (rev 4118)
@@ -0,0 +1,115 @@
+up=\u2191
+down=\u2193
+left=\u2039
+right=\u203A
+
+validator.assertFalse=validation failed
+validator.assertTrue=validation failed
+validator.future=must be a future date
+validator.length=length must be between {min} and {max}
+validator.max=must be less than or equal to {value}
+validator.min=must be greater than or equal to {value}
+validator.notNull=may not be null
+validator.past=must be a past date
+validator.pattern=must match "{regex}"
+validator.range=must be between {min} and {max}
+validator.size=size must be between {min} and {max}
+validator.email=must be a well-formed email address
+
+org.jboss.seam.loginFailed=Login failed
+org.jboss.seam.loginSuccessful=Welcome, #0
+
+org.jboss.seam.TransactionFailed=Transaction failed
+org.jboss.seam.NoConversation=The conversation ended, timed out or was processing another request
+org.jboss.seam.IllegalNavigation=Illegal navigation
+org.jboss.seam.ProcessEnded=Process #0 already ended
+org.jboss.seam.ProcessNotFound=Process #0 not found
+org.jboss.seam.TaskEnded=Task #0 already ended
+org.jboss.seam.TaskNotFound=Task #0 not found
+org.jboss.seam.NotLoggedIn=Please log in first
+
+javax.faces.component.UIInput.CONVERSION=value could not be converted to the expected type
+javax.faces.component.UIInput.REQUIRED=value is required
+javax.faces.component.UIInput.UPDATE=an error occurred when processing your submitted information
+javax.faces.component.UISelectOne.INVALID=value is not valid
+javax.faces.component.UISelectMany.INVALID=value is not valid
+
+javax.faces.converter.BigDecimalConverter.DECIMAL=value must be a number
+javax.faces.converter.BigDecimalConverter.DECIMAL_detail=value must be a signed decimal number consisting of zero or more digits, optionally followed by a decimal point and fraction, eg. {1}
+javax.faces.converter.BigIntegerConverter.BIGINTEGER=value must be an integer
+javax.faces.converter.BigIntegerConverter.BIGINTEGER_detail=value must be a signed integer number consisting of zero or more digits
+javax.faces.converter.BooleanConverter.BOOLEAN=value must be true or false
+javax.faces.converter.BooleanConverter.BOOLEAN_detail=value must be true or false (any value other than true will evaluate to false)
+javax.faces.converter.ByteConverter.BYTE=value must be a number between 0 and 255
+javax.faces.converter.ByteConverter.BYTE_detail=value must be a number between 0 and 255
+javax.faces.converter.CharacterConverter.CHARACTER=value must be a character
+javax.faces.converter.CharacterConverter.CHARACTER_detail=value must be a valid ASCII character
+javax.faces.converter.DateTimeConverter.DATE=value must be a date
+javax.faces.converter.DateTimeConverter.DATE_detail=value must be a date, eg. {1}
+javax.faces.converter.DateTimeConverter.TIME=value must be a time
+javax.faces.converter.DateTimeConverter.TIME_detail=value must be a time, eg. {1}
+javax.faces.converter.DateTimeConverter.DATETIME=value must be a date and time
+javax.faces.converter.DateTimeConverter.DATETIME_detail=value must be a date and time, eg. {1}
+javax.faces.converter.DateTimeConverter.PATTERN_TYPE=a pattern or type attribute must be specified to convert the value
+javax.faces.converter.DoubleConverter.DOUBLE=value must be a number
+javax.faces.converter.DoubleConverter.DOUBLE_detail=value must be a number between 4.9E-324 and 1.7976931348623157E308
+javax.faces.converter.EnumConverter.ENUM=value must be convertible to an enum
+javax.faces.converter.EnumConverter.ENUM_detail=value must be convertible to an enum or from the enum that contains the constant {1}
+javax.faces.converter.EnumConverter.ENUM_NO_CLASS=value must be convertible to an enum or from the enum, but no enum class provided
+javax.faces.converter.EnumConverter.ENUM_NO_CLASS_detail=value must be convertible to an enum or from the enum, but no enum class provided
+javax.faces.converter.FloatConverter.FLOAT=value must be a number
+javax.faces.converter.FloatConverter.FLOAT_detail=value must be a number between 1.4E-45 and 3.4028235E38
+javax.faces.converter.IntegerConverter.INTEGER=value must be an integer
+javax.faces.converter.IntegerConverter.INTEGER_detail=value must be an integer number between -2147483648 and 2147483647
+javax.faces.converter.LongConverter.LONG=value must be an integer
+javax.faces.converter.LongConverter.LONG_detail=must be an integer number between -9223372036854775808 and 9223372036854775807
+javax.faces.converter.NumberConverter.CURRENCY=value must be a currency amount
+javax.faces.converter.NumberConverter.CURRENCY_detail=value must be a currency amount, eg. {1}
+javax.faces.converter.NumberConverter.PERCENT=value must be a percentage amount
+javax.faces.converter.NumberConverter.PERCENT_detail=value must be a percentage amount, eg. {1}
+javax.faces.converter.NumberConverter.NUMBER=value must be a number
+javax.faces.converter.NumberConverter.NUMBER_detail=value must be a number
+javax.faces.converter.NumberConverter.PATTERN=value must be a number
+javax.faces.converter.NumberConverter.PATTERN_detail=value must be a number
+javax.faces.converter.ShortConverter.SHORT=value must be an integer
+javax.faces.converter.ShortConverter.SHORT_detail=value must be an integer number between -32768 and 32767
+
+javax.faces.validator.DoubleRangeValidator.MAXIMUM=value must be less than or equal to {0}
+javax.faces.validator.DoubleRangeValidator.MINIMUM=value must be greater than or equal to {0}
+javax.faces.validator.DoubleRangeValidator.NOT_IN_RANGE=value must be between {0} and {1}
+javax.faces.validator.DoubleRangeValidator.TYPE=value is not of the correct type
+javax.faces.validator.LengthValidator.MAXIMUM=value is must be shorter than or equal to {0} characters
+javax.faces.validator.LengthValidator.MINIMUM=value is must be longer than or equal to {0} characters
+javax.faces.validator.LongRangeValidator.MAXIMUM=value must be less than or equal to {0}
+javax.faces.validator.LongRangeValidator.MINIMUM=value must be greater than or equal to {0}
+javax.faces.validator.LongRangeValidator.NOT_IN_RANGE=value must be between {0} and {1}
+javax.faces.validator.LongRangeValidator.TYPE=value is not of the correct type
+
+javax.faces.validator.NOT_IN_RANGE=value must be between {0} and {1}
+javax.faces.converter.STRING=value could not be converted to a string
+
+#JSF 1.1:
+javax.faces.convert.BigDecimalConverter.CONVERSION value must be a number
+javax.faces.convert.BigDecimalConverter.CONVERSION_detail value must be a number
+javax.faces.convert.BigIntegerConverter.CONVERSION value must be an integre
+javax.faces.convert.BigIntegerConverter.CONVERSION_detail value must be a number
+javax.faces.convert.BooleanConverter.CONVERSION value must be true or false
+javax.faces.convert.BooleanConverter.CONVERSION_detail value must be true or false
+javax.faces.convert.ByteConverter.CONVERSION value must be a byte
+javax.faces.convert.ByteConverter.CONVERSION_detail value must be a byte
+javax.faces.convert.CharacterConverter.CONVERSION value must be a character
+javax.faces.convert.CharacterConverter.CONVERSION_detail value must be a character
+javax.faces.convert.DateTimeConverter.CONVERSION value must be a datetime
+javax.faces.convert.DateTimeConverter.CONVERSION_detail value must be a datetime
+javax.faces.convert.DoubleConverter.CONVERSION value must be a number
+javax.faces.convert.DoubleConverter.CONVERSION_detail value must be a number
+javax.faces.convert.FloatConverter.CONVERSION value must be a number
+javax.faces.convert.FloatConverter.CONVERSION_detail value must be a number
+javax.faces.convert.IntegerConverter.CONVERSION value must be an integer
+javax.faces.convert.IntegerConverter.CONVERSION_detail value must be an integer
+javax.faces.convert.LongConverter.CONVERSION value must be an integer
+javax.faces.convert.LongConverter.CONVERSION_detail value must be a long integer
+javax.faces.convert.NumberConverter.CONVERSION value must be a number
+javax.faces.convert.NumberConverter.CONVERSION_detail value must be a number
+javax.faces.convert.ShortConverter.CONVERSION value must be an integer
+javax.faces.convert.ShortConverter.CONVERSION_detail value must be a short integer
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/model/seam.properties
===================================================================
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/model/security.drl
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/model/security.drl (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/model/security.drl 2007-10-11 14:08:55 UTC (rev 4118)
@@ -0,0 +1,6 @@
+package Permissions;
+
+import java.security.Principal;
+
+import org.jboss.seam.security.PermissionCheck;
+import org.jboss.seam.security.Role;
\ No newline at end of file
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java 2007-10-11 14:08:55 UTC (rev 4118)
@@ -0,0 +1,275 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.seam.core.test;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.jboss.tools.common.model.XJob;
+import org.jboss.tools.common.test.util.TestProjectProvider;
+import org.jboss.tools.seam.core.ISeamProject;
+import org.jboss.tools.seam.internal.core.SeamProject;
+import org.jboss.tools.test.util.JUnitUtils;
+
+public class SeamValidatorsTest extends TestCase {
+ IProject project = null;
+
+ boolean makeCopy = false;
+
+ public SeamValidatorsTest() {}
+
+ protected void setUp() throws Exception {
+ TestProjectProvider providerEAR = new TestProjectProvider("org.jboss.tools.seam.core.test", null, "SeamWebWarTestProject", makeCopy);
+ project = providerEAR.getProject();
+
+ try {
+ project.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
+ } catch (Exception e) {
+ JUnitUtils.fail("Error in refreshing",e);
+ }
+
+ try {
+ XJob.waitForJob();
+ } catch (InterruptedException e) {
+ JUnitUtils.fail("Interrupted",e);
+ }
+ }
+
+ private ISeamProject getSeamProject(IProject project) {
+ try {
+ XJob.waitForJob();
+ } catch (Exception e) {
+ JUnitUtils.fail("Interrupted",e);
+ }
+ try {
+ project.build(IncrementalProjectBuilder.FULL_BUILD, new NullProgressMonitor());
+ try {
+ XJob.waitForJob();
+ } catch (InterruptedException e) {
+ JUnitUtils.fail("Interrupted",e);
+ }
+ } catch (Exception e) {
+ JUnitUtils.fail("Cannot build", e);
+ }
+ ISeamProject seamProject = null;
+ try {
+ seamProject = (ISeamProject)project.getNature(SeamProject.NATURE_ID);
+ } catch (Exception e) {
+ JUnitUtils.fail("Cannot get seam nature.",e);
+ }
+ assertNotNull("Seam project is null", seamProject);
+ return seamProject;
+ }
+
+ /**
+ * This empty test is meaningful as it gives Eclipse opportunity
+ * to pass for the first time setUp() and show the license dialog
+ * that may cause InterruptedException for XJob.waitForJob()
+ */
+ public void testCreatingProject() {
+ }
+
+ public void testComponentsValidator() {
+ ISeamProject seamProject = getSeamProject(project);
+
+ IFile bbcComponentFile = project.getFile("src/action/org/domain/SeamWebWarTestProject/session/BbcComponent.java");
+ IFile statefulComponentFile = project.getFile("src/action/org/domain/SeamWebWarTestProject/session/StatefulComponent.java");
+ IFile componentsFile = project.getFile("WebContent/WEB-INF/components.xml");
+
+ // Duplicate component name
+ System.out.println("Test - Duplicate component name");
+
+ IFile bbcComponentFile2 = project.getFile("src/action/org/domain/SeamWebWarTestProject/session/BbcComponent.2");
+ try{
+ bbcComponentFile.setContents(bbcComponentFile2.getContents(), true, false, new NullProgressMonitor());
+ bbcComponentFile.touch(new NullProgressMonitor());
+ }catch(Exception ex){
+ JUnitUtils.fail("Error in changing 'BbcComponent.java' content to " +
+ "'BbcComponent.2'", ex);
+ }
+ try {
+ seamProject.getProject().build(IncrementalProjectBuilder.FULL_BUILD, new NullProgressMonitor());
+ try {
+ XJob.waitForJob();
+ } catch (InterruptedException e) {
+ JUnitUtils.fail("Interrupted",e);
+ }
+ } catch (Exception e) {
+ JUnitUtils.fail("Cannot build", e);
+ }
+ try{
+ IMarker[] markers = bbcComponentFile.findMarkers(IMarker.PROBLEM, true, IResource.DEPTH_INFINITE);
+ for(int i=0;i<markers.length;i++){
+ System.out.println("Marker - "+markers[i].getAttribute(IMarker.TEXT, ""));
+ }
+ }catch(CoreException ex){
+ JUnitUtils.fail("Error in getting problem markers", ex);
+ }
+
+ // Stateful component does not contain @Remove method
+ System.out.println("Test - Stateful component does not contain @Remove method");
+
+ IFile statefulComponentFile2 = project.getFile("src/action/org/domain/SeamWebWarTestProject/session/StatefulComponent.2");
+ try{
+ statefulComponentFile.setContents(statefulComponentFile2.getContents(), true, false, new NullProgressMonitor());
+ statefulComponentFile.touch(new NullProgressMonitor());
+ }catch(Exception ex){
+ JUnitUtils.fail("Error in changing 'StatefulComponent.java' content to " +
+ "'StatefulComponent.2'", ex);
+ }
+ try {
+ seamProject.getProject().build(IncrementalProjectBuilder.FULL_BUILD, new NullProgressMonitor());
+ try {
+ XJob.waitForJob();
+ } catch (InterruptedException e) {
+ JUnitUtils.fail("Interrupted",e);
+ }
+ } catch (Exception e) {
+ JUnitUtils.fail("Cannot build", e);
+ }
+ try{
+ IMarker[] markers = statefulComponentFile.findMarkers(IMarker.PROBLEM, true, IResource.DEPTH_INFINITE);
+ for(int i=0;i<markers.length;i++){
+ System.out.println("Marker - "+markers[i].getAttribute(IMarker.TEXT, ""));
+ }
+ }catch(CoreException ex){
+ JUnitUtils.fail("Error in getting problem markers", ex);
+ }
+
+ // Stateful component does not contain @Destroy method
+ System.out.println("Test - Stateful component does not contain @Destroy method");
+
+ IFile statefulComponentFile3 = project.getFile("src/action/org/domain/SeamWebWarTestProject/session/StatefulComponent.3");
+ try{
+ statefulComponentFile.setContents(statefulComponentFile3.getContents(), true, false, new NullProgressMonitor());
+ statefulComponentFile.touch(new NullProgressMonitor());
+ }catch(Exception ex){
+ JUnitUtils.fail("Error in changing 'StatefulComponent.java' content to " +
+ "'StatefulComponent.3'", ex);
+ }
+ try {
+ seamProject.getProject().build(IncrementalProjectBuilder.FULL_BUILD, new NullProgressMonitor());
+ try {
+ XJob.waitForJob();
+ } catch (InterruptedException e) {
+ JUnitUtils.fail("Interrupted",e);
+ }
+ } catch (Exception e) {
+ JUnitUtils.fail("Cannot build", e);
+ }
+ try{
+ IMarker[] markers = statefulComponentFile.findMarkers(IMarker.PROBLEM, true, IResource.DEPTH_INFINITE);
+ for(int i=0;i<markers.length;i++){
+ System.out.println("Marker - "+markers[i].getAttribute(IMarker.TEXT, ""));
+ }
+ }catch(CoreException ex){
+ JUnitUtils.fail("Error in getting problem markers", ex);
+ }
+
+ // Stateful component has wrong scope
+ System.out.println("Test - Stateful component has wrong scope");
+
+ IFile statefulComponentFile4 = project.getFile("src/action/org/domain/SeamWebWarTestProject/session/StatefulComponent.4");
+ try{
+ statefulComponentFile.setContents(statefulComponentFile4.getContents(), true, false, new NullProgressMonitor());
+ statefulComponentFile.touch(new NullProgressMonitor());
+ }catch(Exception ex){
+ JUnitUtils.fail("Error in changing 'StatefulComponent.java' content to " +
+ "'StatefulComponent.4'", ex);
+ }
+ try {
+ seamProject.getProject().build(IncrementalProjectBuilder.FULL_BUILD, new NullProgressMonitor());
+ try {
+ XJob.waitForJob();
+ } catch (InterruptedException e) {
+ JUnitUtils.fail("Interrupted",e);
+ }
+ } catch (Exception e) {
+ JUnitUtils.fail("Cannot build", e);
+ }
+ try{
+ IMarker[] markers = statefulComponentFile.findMarkers(IMarker.PROBLEM, true, IResource.DEPTH_INFINITE);
+ for(int i=0;i<markers.length;i++){
+ System.out.println("Marker - "+markers[i].getAttribute(IMarker.TEXT, ""));
+ }
+ }catch(CoreException ex){
+ JUnitUtils.fail("Error in getting problem markers", ex);
+ }
+
+ // Component class name cannot be resolved to a type
+ System.out.println("Test - Component class name cannot be resolved to a type");
+
+ IFile componentsFile2 = project.getFile("WebContent/WEB-INF/components.2");
+ try{
+ componentsFile.setContents(componentsFile2.getContents(), true, false, new NullProgressMonitor());
+ componentsFile.touch(new NullProgressMonitor());
+ }catch(Exception ex){
+ JUnitUtils.fail("Error in changing 'components.xml' content to " +
+ "'components.2'", ex);
+ }
+ try {
+ seamProject.getProject().build(IncrementalProjectBuilder.FULL_BUILD, new NullProgressMonitor());
+ try {
+ XJob.waitForJob();
+ } catch (InterruptedException e) {
+ JUnitUtils.fail("Interrupted",e);
+ }
+ } catch (Exception e) {
+ JUnitUtils.fail("Cannot build", e);
+ }
+ try{
+ IMarker[] markers = componentsFile.findMarkers(IMarker.PROBLEM, true, IResource.DEPTH_INFINITE);
+ for(int i=0;i<markers.length;i++){
+ System.out.println("Marker - "+markers[i].getAttribute(IMarker.TEXT, ""));
+ }
+ }catch(CoreException ex){
+ JUnitUtils.fail("Error in getting problem markers", ex);
+ }
+
+ // Component class does not contain setter for property
+ System.out.println("Test - Component class does not contain setter for property");
+
+ IFile statefulComponentFile5 = project.getFile("src/action/org/domain/SeamWebWarTestProject/session/StatefulComponent.5");
+ try{
+ statefulComponentFile.setContents(statefulComponentFile5.getContents(), true, false, new NullProgressMonitor());
+ statefulComponentFile.touch(new NullProgressMonitor());
+ }catch(Exception ex){
+ JUnitUtils.fail("Error in changing 'StatefulComponent.java' content to " +
+ "'StatefulComponent.5'", ex);
+ }
+ try {
+ seamProject.getProject().build(IncrementalProjectBuilder.FULL_BUILD, new NullProgressMonitor());
+ try {
+ XJob.waitForJob();
+ } catch (InterruptedException e) {
+ JUnitUtils.fail("Interrupted",e);
+ }
+ } catch (Exception e) {
+ JUnitUtils.fail("Cannot build", e);
+ }
+ try{
+ IMarker[] markers = componentsFile.findMarkers(IMarker.PROBLEM, true, IResource.DEPTH_INFINITE);
+ for(int i=0;i<markers.length;i++){
+ System.out.println("Marker - "+markers[i].getAttribute(IMarker.TEXT, ""));
+ }
+ }catch(CoreException ex){
+ JUnitUtils.fail("Error in getting problem markers", ex);
+ }
+
+ }
+
+}
17 years, 3 months
JBoss Tools SVN: r4117 - branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor.
by jbosstools-commits@lists.jboss.org
Author: ayukhovich
Date: 2007-10-11 09:21:51 -0400 (Thu, 11 Oct 2007)
New Revision: 4117
Modified:
branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpePreviewDomBuilder.java
branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-531
fixed
Modified: branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpePreviewDomBuilder.java
===================================================================
--- branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpePreviewDomBuilder.java 2007-10-11 12:56:58 UTC (rev 4116)
+++ branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpePreviewDomBuilder.java 2007-10-11 13:21:51 UTC (rev 4117)
@@ -101,18 +101,7 @@
getPageContext().setCurrentVisualNode(null);
return visualNewElement;
case Node.TEXT_NODE:
- //TODO Max Areshkau merge with old version
- String sourceText = sourceNode.getNodeValue();
- if (sourceText.trim().length() <= 0) {
- registerNodes(new VpeNodeMapping(sourceNode, null));
- return null;
- }
- String visualText = TextUtil.visualText(sourceText);
- nsIDOMNode visualNewTextNode = getVisualDocument().createTextNode(visualText);
- if (registerFlag) {
- registerNodes(new VpeNodeMapping(sourceNode, visualNewTextNode));
- }
- return visualNewTextNode;
+ return createTextNode(sourceNode, registerFlag);
case Node.COMMENT_NODE:
if(!YES_STRING.equals(VpePreference.SHOW_COMMENTS.getValue())) {
return null;
Modified: branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
===================================================================
--- branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2007-10-11 12:56:58 UTC (rev 4116)
+++ branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2007-10-11 13:21:51 UTC (rev 4117)
@@ -20,8 +20,11 @@
import java.util.List;
import java.util.Map;
import java.util.Set;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.Path;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Cursor;
@@ -33,10 +36,16 @@
import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
import org.eclipse.wst.xml.core.internal.document.ElementImpl;
import org.eclipse.wst.xml.core.internal.document.NodeImpl;
+import org.jboss.tools.common.model.XModel;
+import org.jboss.tools.common.model.XModelObject;
+import org.jboss.tools.common.model.project.IModelNature;
+import org.jboss.tools.common.model.util.EclipseResourceUtil;
import org.jboss.tools.jst.jsp.preferences.VpePreference;
+import org.jboss.tools.jst.web.model.helpers.WebAppHelper;
import org.jboss.tools.vpe.VpeDebug;
import org.jboss.tools.vpe.VpePlugin;
import org.jboss.tools.vpe.dnd.VpeDnD;
+import org.jboss.tools.vpe.editor.bundle.BundleMap;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.css.CSSReferenceList;
import org.jboss.tools.vpe.editor.css.ResourceReference;
@@ -76,6 +85,9 @@
import org.w3c.dom.NodeList;
public class VpeVisualDomBuilder extends VpeDomBuilder {
+ /** REGEX_EL */
+ private static final Pattern REGEX_EL = Pattern.compile("[\\$|\\#]\\{.*\\}", Pattern.MULTILINE + Pattern.DOTALL);
+
private static final String PSEUDO_ELEMENT = "br";
private static final String PSEUDO_ELEMENT_ATTR = "vpe:pseudo-element";
private static final String INIT_ELEMENT_ATTR = "vpe:init-element";
@@ -97,6 +109,9 @@
private nsIDOMNode headNode;
private List includeStack;
boolean rebuildFlag = false;
+
+ /** faceletFile */
+ private boolean faceletFile = false;
private static final String ATTR_VPE = "vpe";
private static final String ATTR_VPE_INLINE_LINK_VALUE = "inlinelink";
@@ -151,6 +166,13 @@
this.headNode = visualEditor.getHeadNode();
dropper = new VpeDnd();
dropper.setDndData(false, true);
+
+ if ( isFacelet() ) {
+ faceletFile = true;
+ } else {
+ faceletFile = false;
+ }
+
}
public void buildDom(Document sourceDocument) {
@@ -382,18 +404,7 @@
else
return visualNewElement;
case Node.TEXT_NODE:
- String sourceText = sourceNode.getNodeValue();
- if (sourceText.trim().length() <= 0) {
- registerNodes(new VpeNodeMapping(sourceNode, null));
- return null;
- }
- String visualText = TextUtil.visualText(sourceText);
- nsIDOMText visualNewTextNode = visualDocument
- .createTextNode(visualText);
- if (registerFlag) {
- registerNodes(new VpeNodeMapping(sourceNode, visualNewTextNode));
- }
- return visualNewTextNode;
+ return createTextNode(sourceNode, registerFlag);
case Node.COMMENT_NODE:
if (!YES_STRING.equals(VpePreference.SHOW_COMMENTS.getValue())) {
return null;
@@ -1935,4 +1946,70 @@
protected void setVisualDocument(nsIDOMDocument visualDocument) {
this.visualDocument = visualDocument;
}
+
+ /**
+ * Check this file is facelet
+ * @return this if file is facelet, otherwize false
+ */
+ private boolean isFacelet() {
+ boolean isFacelet = false;
+
+ IEditorInput iEditorInput = pageContext.getEditPart().getEditorInput();
+ if ( iEditorInput instanceof IFileEditorInput ) {
+ IFileEditorInput iFileEditorInput = (IFileEditorInput) iEditorInput;
+
+ IFile iFile = iFileEditorInput.getFile();
+
+ IProject project = iFile.getProject();
+ IModelNature nature = EclipseResourceUtil.getModelNature(project);
+ if (nature != null) {
+ XModel model = nature.getModel();
+ XModelObject webXML = WebAppHelper.getWebApp(model);
+ XModelObject param = WebAppHelper.findWebAppContextParam(webXML, "javax.faces.DEFAULT_SUFFIX");
+ if ( param != null ) {
+ String value = param.getAttributeValue("param-value");
+
+ if ( value.length() != 0 && iFile.getName().endsWith(value)) {
+ isFacelet = true;
+ }
+ }
+ }
+ }
+
+ return isFacelet;
+ }
+
+ /**
+ * Create a visual element for text node
+ * @param sourceNode
+ * @param registerFlag
+ * @return a visual element for text node
+ */
+
+ protected nsIDOMNode createTextNode(Node sourceNode, boolean registerFlag ) {
+ String sourceText = sourceNode.getNodeValue();
+ if (sourceText.trim().length() <= 0) {
+ registerNodes(new VpeNodeMapping(sourceNode, null));
+ return null;
+ }
+
+ if (faceletFile) {
+ Matcher matcher_EL = REGEX_EL.matcher(sourceText);
+ if (matcher_EL.find()) {
+ BundleMap bundle = pageContext.getBundle();
+ int offset = pageContext.getVisualBuilder().getCurrentMainIncludeOffset();
+ if (offset == -1) offset = ((IndexedRegion)sourceNode).getStartOffset();
+ String jsfValue = bundle.getBundleValue(sourceText, offset);
+ sourceText = jsfValue;
+ }
+ }
+ String visualText = TextUtil.visualText(sourceText);
+
+ nsIDOMNode visualNewTextNode = visualDocument.createTextNode(visualText);
+ if (registerFlag) {
+ registerNodes(new VpeNodeMapping(sourceNode, visualNewTextNode));
+ }
+
+ return visualNewTextNode;
+ }
}
17 years, 3 months
JBoss Tools SVN: r4116 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template.
by jbosstools-commits@lists.jboss.org
Author: asakharov
Date: 2007-10-11 08:56:58 -0400 (Thu, 11 Oct 2007)
New Revision: 4116
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuItemTemplate.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-847
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuItemTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuItemTemplate.java 2007-10-11 12:43:44 UTC (rev 4115)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuItemTemplate.java 2007-10-11 12:56:58 UTC (rev 4116)
@@ -63,7 +63,6 @@
.createElement(HtmlComponentUtil.HTML_TAG_DIV);
parentVisualElement.appendChild(div);
div.setAttribute("vpeSupport", PANEL_MENU_ITEM);
- creationData = new VpeCreationData(div);
if (sourceElement.getParentNode().getNodeName().endsWith(
":panelMenuGroup")
|| (sourceElement.getParentNode().getNodeName()
17 years, 3 months
JBoss Tools SVN: r4115 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template.
by jbosstools-commits@lists.jboss.org
Author: asakharov
Date: 2007-10-11 08:43:44 -0400 (Thu, 11 Oct 2007)
New Revision: 4115
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuGroupTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuItemTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuTemplate.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-847
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuGroupTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuGroupTemplate.java 2007-10-11 12:15:27 UTC (rev 4114)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuGroupTemplate.java 2007-10-11 12:43:44 UTC (rev 4115)
@@ -31,10 +31,17 @@
private static final String ICON_HSPACE = "0";
- public VpeCreationData create(VpePageContext pageContext, Node sourceNode, Document visualDocument) {
- return new VpeCreationData(visualDocument.createElement(HtmlComponentUtil.HTML_TAG_DIV));
- }
+ private static final String EMPTY_DIV_STYLE = "display: none;";
+ public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
+ Document visualDocument) {
+ Element div = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_DIV);
+ div.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, EMPTY_DIV_STYLE);
+
+ return new VpeCreationData(div);
+ }
+
public static VpeCreationData encode(VpePageContext pageContext, VpeCreationData creationData, Element sourceElement, Document visualDocument, Element parentVisualElement, boolean expanded) {
ComponentUtil.setCSSLink(pageContext, STYLE_PATH, "panelMenuGroup");
@@ -54,7 +61,7 @@
childInfo.addSourceChild(child);
} else {
if(child.getNodeName().endsWith(":panelMenuGroup")) {
- RichFacesPanelMenuGroupTemplate.encode(pageContext, creationData, (Element)child, visualDocument, div, false);
+ RichFacesPanelMenuGroupTemplate.encode(pageContext, creationData, (Element)child, visualDocument, div, true);
}
if(child.getNodeName().endsWith(":panelMenuItem")){
RichFacesPanelMenuItemTemplate.encode(pageContext, creationData, (Element)child, visualDocument, div, false);
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuItemTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuItemTemplate.java 2007-10-11 12:15:27 UTC (rev 4114)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuItemTemplate.java 2007-10-11 12:43:44 UTC (rev 4115)
@@ -44,11 +44,15 @@
private static final String IMG_SPACER_SRC = "/panelMenuItem/spacer.gif";
- //private static final String EMPTY_DIV_STYLE = "display: none;";
+ private static final String EMPTY_DIV_STYLE = "display: none;";
public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
Document visualDocument) {
- return encode(pageContext, null,(Element)sourceNode, visualDocument, null, false);
+ Element div = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_DIV);
+ div.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, EMPTY_DIV_STYLE);
+
+ return new VpeCreationData(div);
}
public static VpeCreationData encode(VpePageContext pageContext,VpeCreationData creationData, Element sourceElement, Document visualDocument, Element parentVisualElement, boolean active){
@@ -57,7 +61,7 @@
Element div = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_DIV);
- //div.setAttribute("style", EMPTY_DIV_STYLE);
+ parentVisualElement.appendChild(div);
div.setAttribute("vpeSupport", PANEL_MENU_ITEM);
creationData = new VpeCreationData(div);
if (sourceElement.getParentNode().getNodeName().endsWith(
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuTemplate.java 2007-10-11 12:15:27 UTC (rev 4114)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuTemplate.java 2007-10-11 12:43:44 UTC (rev 4115)
@@ -83,7 +83,8 @@
div.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, styleClass);
}
- VpeChildrenInfo childrenInfo = new VpeChildrenInfo(div);
+ //VpeChildrenInfo childrenInfo = new VpeChildrenInfo(div);
+ // vpeCreationData.addChildrenInfo(childrenInfo);
List<Node> children = ComponentUtil.getChildren(sourceElement);
int activeId = getActiveId(sourceElement, children);
int i = 0;
@@ -100,20 +101,15 @@
RichFacesPanelMenuItemTemplate.encode(pageContext,
vpeCreationData, (Element) child, visualDocument, div,
active);
- }
- if (child.getNodeName().endsWith(":panelMenuGroup")) {
- RichFacesPanelMenuGroupTemplate.encode(pageContext,
- vpeCreationData, (Element) child, visualDocument, div,
- active);
- } else if (child.getNodeName().endsWith(":panelMenuItem")) {
- RichFacesPanelMenuItemTemplate.encode(pageContext,
- vpeCreationData, (Element) child, visualDocument, div,
- active);
} else {
+ Element childDiv = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_DIV);
+ VpeChildrenInfo childrenInfo = new VpeChildrenInfo(childDiv);
+ div.appendChild(childDiv);
childrenInfo.addSourceChild(child);
+ vpeCreationData.addChildrenInfo(childrenInfo);
}
i++;
- }
+ }
return vpeCreationData;
}
17 years, 3 months
JBoss Tools SVN: r4114 - trunk/jst/plugins/org.jboss.tools.jst.web.tiles/src/org/jboss/tools/jst/web/tiles/model/handlers.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-10-11 08:15:27 -0400 (Thu, 11 Oct 2007)
New Revision: 4114
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.tiles/src/org/jboss/tools/jst/web/tiles/model/handlers/CreateTilesSupport.java
Log:
JBIDE-778
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.tiles/src/org/jboss/tools/jst/web/tiles/model/handlers/CreateTilesSupport.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.tiles/src/org/jboss/tools/jst/web/tiles/model/handlers/CreateTilesSupport.java 2007-10-11 12:12:01 UTC (rev 4113)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.tiles/src/org/jboss/tools/jst/web/tiles/model/handlers/CreateTilesSupport.java 2007-10-11 12:15:27 UTC (rev 4114)
@@ -14,6 +14,7 @@
import org.jboss.tools.common.model.*;
import org.jboss.tools.common.model.files.handlers.CreateFileSupport;
import org.jboss.tools.common.model.undo.*;
+import org.jboss.tools.jst.web.tiles.model.TilesConstants;
import org.jboss.tools.jst.web.tiles.model.TilesProcessImpl;
import org.jboss.tools.jst.web.tiles.model.helpers.TilesRegistrationHelper;
@@ -56,7 +57,14 @@
open(file);
}
-
+
+ protected XModelObject modifyCreatedObject(XModelObject o) {
+ XModelObject d = o.getModel().createModelObject(TilesConstants.ENT_DEFINITION, null);
+ d.setAttributeValue("name", o.getAttributeValue("name"));
+ o.addChild(d);
+ return o;
+ }
+
private boolean canRegisterInternal() {
return TilesRegistrationHelper.isEnabled(getTarget().getModel());
}
17 years, 3 months