1.1 --- a/bpel.refactoring/src/org/netbeans/modules/bpel/refactoring/XPath.java Wed May 02 08:22:10 2007 +0000
1.2 +++ b/bpel.refactoring/src/org/netbeans/modules/bpel/refactoring/XPath.java Wed May 02 09:59:44 2007 +0000
1.3 @@ -84,6 +84,7 @@
1.4 void visit(String content, Component component) {
1.5 //out();
1.6 //out("XPATH visit: " + content);
1.7 +//out("XPATH visit: '" + content + "' " + component);
1.8 visit(content, component, false);
1.9 }
1.10
1.11 @@ -97,6 +98,8 @@
1.12 if (content == null || content.length() == 0) {
1.13 return content;
1.14 }
1.15 +//out();
1.16 +//out("visit: " + content);
1.17 XPathModel model = AbstractXPathModelHelper.getInstance().newXPathModel();
1.18 myVisitedComplexType = new LinkedList<ComplexType>();
1.19 myExpressions = new LinkedList<XPathExpression>();
1.20 @@ -106,7 +109,8 @@
1.21 try {
1.22 XPathExpression expression = model.parseExpression(content);
1.23 expression.accept(this);
1.24 -
1.25 +//out();
1.26 +//out();
1.27 if (myDoRename) {
1.28 //out(" do rename: " + myTarget.getName());
1.29 rename(myTarget.getName());
1.30 @@ -115,7 +119,7 @@
1.31 return expression.getExpressionString();
1.32 }
1.33 catch (XPathException e) {
1.34 -//out(" exception: " + e.getMessage());
1.35 +//out(" !!!! exception: " + e.getMessage());
1.36 return content;
1.37 }
1.38 }
1.39 @@ -172,17 +176,17 @@
1.40 myVariableReference = null;
1.41
1.42 if ( !expressionPath.equals(rootExpression)) {
1.43 -///out(" root: " + expression);
1.44 +//out(" root: " + rootExpression);
1.45 rootExpression.accept(this);
1.46 }
1.47 if (myVariable == null) {
1.48 //out("Variable is not found");
1.49 return;
1.50 }
1.51 -//out(" Variable: " + myVariable.getName());
1.52 +//out("Variable: " + myVariable.getName());
1.53
1.54 if (myVariable == myTarget) {
1.55 - addItem();
1.56 +//out(" variable is target: " + myVariable.getName());
1.57 return;
1.58 }
1.59 LocationStep [] locations = expressionPath.getSteps();
1.60 @@ -468,6 +472,11 @@
1.61 myVariable = variable;
1.62 myVariableReference = reference;
1.63 myPartName = part;
1.64 +
1.65 + if (myVariable == myTarget) {
1.66 +//out(" add variable: " + myVariable.getName());
1.67 + addItem();
1.68 + }
1.69 break;
1.70 }
1.71 }