Author: bbrodt
Date: 2010-05-03 17:45:42 -0400 (Mon, 03 May 2010)
New Revision: 21870
Modified:
trunk/bpel/plugins/org.eclipse.bpel.validator/src/org/eclipse/bpel/validator/xpath/JoinCondition.java
trunk/bpel/plugins/org.eclipse.bpel.validator/src/org/eclipse/bpel/validator/xpath/XPathValidator.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-6000
duplicated error message checking returned too soon. It should only check if we're
sure that there really IS a problem.
Modified:
trunk/bpel/plugins/org.eclipse.bpel.validator/src/org/eclipse/bpel/validator/xpath/JoinCondition.java
===================================================================
---
trunk/bpel/plugins/org.eclipse.bpel.validator/src/org/eclipse/bpel/validator/xpath/JoinCondition.java 2010-05-03
20:37:23 UTC (rev 21869)
+++
trunk/bpel/plugins/org.eclipse.bpel.validator/src/org/eclipse/bpel/validator/xpath/JoinCondition.java 2010-05-03
21:45:42 UTC (rev 21870)
@@ -91,12 +91,17 @@
final String name = expr.getVariableName();
IProblem problem;
- if (duplicateThing( "duplicate.joinCondition.link.check.", name)) {
- return ;
- }
+ //
https://jira.jboss.org/jira/browse/JBIDE-6000
+ // this returns too soon - only check duplicateThing if we're sure that there
really IS a problem
+// if (duplicateThing( "duplicate.joinCondition.link.check.", name)) {
+// return ;
+// }
if ( isEmpty ( prefix ) == false ) {
+ if (duplicateThing( "duplicate.joinCondition.link.check.", name)) {
+ return ;
+ }
problem = createError();
problem.fill("XPATH_PREFIX_NOT_ALLOWED",
toString(mNode.nodeName()),
@@ -116,6 +121,9 @@
);
if (isUndefined(target)) {
+ if (duplicateThing( "duplicate.joinCondition.link.check.", name)) {
+ return ;
+ }
problem = createError();
problem.fill("XPATH_LINK_UNDEF", name , expr.getText() );
repointOffsets(problem, expr);
Modified:
trunk/bpel/plugins/org.eclipse.bpel.validator/src/org/eclipse/bpel/validator/xpath/XPathValidator.java
===================================================================
---
trunk/bpel/plugins/org.eclipse.bpel.validator/src/org/eclipse/bpel/validator/xpath/XPathValidator.java 2010-05-03
20:37:23 UTC (rev 21869)
+++
trunk/bpel/plugins/org.eclipse.bpel.validator/src/org/eclipse/bpel/validator/xpath/XPathValidator.java 2010-05-03
21:45:42 UTC (rev 21870)
@@ -747,13 +747,19 @@
String name = expr.getVariableName();
IProblem problem;
+ //
https://jira.jboss.org/jira/browse/JBIDE-6000
+ // this returns too soon - only check duplicateThing if we're sure that there
really IS a problem
// check to make sure we don't print the same message twice.
- if (duplicateThing("duplicate.variable.check.", name)) {
- return;
- }
+// if (duplicateThing("duplicate.variable.check.", name)) {
+// return;
+// }
if (isEmpty(prefix) == false) {
+ // check to make sure we don't print the same message twice.
+ if (duplicateThing("duplicate.variable.check.", name)) {
+ return;
+ }
problem = createError();
problem.fill("XPATH_INVALID_VARREF_PREFIX", //$NON-NLS-1$
prefix + ":" + name); //$NON-NLS-1$
@@ -774,6 +780,10 @@
if (isUndefined(variable)) {
+ // check to make sure we don't print the same message twice.
+ if (duplicateThing("duplicate.variable.check.", name)) {
+ return;
+ }
problem = createError();
problem.fill("XPATH_UNDEF_VARIABLE", //$NON-NLS-1$
varName, expr.getText());
@@ -808,6 +818,10 @@
if (partName != null) {
if (WSDL_ND_MESSAGE.equals(varTypeNode.nodeName()) == false) {
+ // check to make sure we don't print the same message twice.
+ if (duplicateThing("duplicate.variable.check.", name)) {
+ return;
+ }
problem = createError();
problem.fill("XPATH_VARIABLE_PART", varName, partName, expr
.getText(), 0);
@@ -815,6 +829,10 @@
} else if (isUndefined(variablePart)) {
+ // check to make sure we don't print the same message twice.
+ if (duplicateThing("duplicate.variable.check.", name)) {
+ return;
+ }
problem = createError();
problem.fill("XPATH_UNDEF_VARIABLE_PART", //$NON-NLS-1$
varName, partName, expr.getText());
@@ -829,6 +847,10 @@
// there is no part name specified, but variable does have more then
// 1 part.
if (WSDL_ND_MESSAGE.equals(varTypeNode.nodeName())) {
+ // check to make sure we don't print the same message twice.
+ if (duplicateThing("duplicate.variable.check.", name)) {
+ return;
+ }
problem = createError();
problem.fill("XPATH_VARIABLE_PART", varName,
"text.term.unspecified", expr.getText(), 1);