summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNikolay Metchev2013-08-27 04:56:04 (EDT)
committerNoopur Gupta2013-08-27 04:56:04 (EDT)
commitbd8e7065888ed4d82ba11a6485106ef4ebad93ae (patch)
tree9138c330968f806ba86671164d2cf86915f58799
parentcdce3c1777861b944470aac62a0cd03fa9ddd1c0 (diff)
downloadeclipse.jdt.ui-bd8e7065888ed4d82ba11a6485106ef4ebad93ae.zip
eclipse.jdt.ui-bd8e7065888ed4d82ba11a6485106ef4ebad93ae.tar.gz
eclipse.jdt.ui-bd8e7065888ed4d82ba11a6485106ef4ebad93ae.tar.bz2
Fixed bug 356687: [move method] super method invocation does not compile
after refactoring Signed-off-by: Nikolay Metchev <nikolaymetchev@gmail.com>
-rw-r--r--org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test49/in/A.java13
-rw-r--r--org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test49/out/A.java14
-rw-r--r--org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test50/in/A.java12
-rw-r--r--org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test50/out/A.java13
-rw-r--r--org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test51/in/A.java15
-rw-r--r--org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test51/out/A.java16
-rw-r--r--org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test52/in/A.java16
-rw-r--r--org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test52/out/A.java17
-rw-r--r--org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test53/in/A.java15
-rw-r--r--org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test53/out/A.java16
-rw-r--r--org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test54/in/A.java12
-rw-r--r--org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test54/out/A.java16
-rw-r--r--org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test55/in/A.java15
-rw-r--r--org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test55/out/A.java15
-rw-r--r--org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test56/in/A.java14
-rw-r--r--org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test56/out/A.java14
-rw-r--r--org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test57/in/A.java13
-rw-r--r--org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test57/out/A.java13
-rw-r--r--org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/MoveInstanceMethodTests.java46
-rw-r--r--org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/MoveInstanceMethodProcessor.java48
20 files changed, 350 insertions, 3 deletions
diff --git a/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test49/in/A.java b/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test49/in/A.java
new file mode 100644
index 0000000..d51f77d
--- /dev/null
+++ b/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test49/in/A.java
@@ -0,0 +1,13 @@
+package p;
+
+class A {
+ B b;
+ void m(int i) {
+ }
+}
+
+class B extends A {
+ void test() {
+ super.m(2);
+ }
+} \ No newline at end of file
diff --git a/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test49/out/A.java b/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test49/out/A.java
new file mode 100644
index 0000000..f801bce
--- /dev/null
+++ b/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test49/out/A.java
@@ -0,0 +1,14 @@
+package p;
+
+class A {
+ B b;
+}
+
+class B extends A {
+ void test() {
+ b.m(2);
+ }
+
+ protected void m(int i) {
+ }
+} \ No newline at end of file
diff --git a/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test50/in/A.java b/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test50/in/A.java
new file mode 100644
index 0000000..717b911
--- /dev/null
+++ b/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test50/in/A.java
@@ -0,0 +1,12 @@
+package p;
+
+class A {
+ void m(B b) {
+ }
+}
+
+class B extends A {
+ void test() {
+ super.m(this);
+ }
+} \ No newline at end of file
diff --git a/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test50/out/A.java b/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test50/out/A.java
new file mode 100644
index 0000000..d4ef636
--- /dev/null
+++ b/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test50/out/A.java
@@ -0,0 +1,13 @@
+package p;
+
+class A {
+}
+
+class B extends A {
+ void test() {
+ m();
+ }
+
+ protected void m() {
+ }
+} \ No newline at end of file
diff --git a/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test51/in/A.java b/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test51/in/A.java
new file mode 100644
index 0000000..10180f5
--- /dev/null
+++ b/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test51/in/A.java
@@ -0,0 +1,15 @@
+package p;
+
+class A {
+ void m(B b) {
+ }
+}
+
+class B extends A {
+}
+
+class C extends B {
+ void test() {
+ super.m(this);
+ }
+} \ No newline at end of file
diff --git a/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test51/out/A.java b/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test51/out/A.java
new file mode 100644
index 0000000..db68480
--- /dev/null
+++ b/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test51/out/A.java
@@ -0,0 +1,16 @@
+package p;
+
+class A {
+}
+
+class B extends A {
+
+ protected void m() {
+ }
+}
+
+class C extends B {
+ void test() {
+ m();
+ }
+} \ No newline at end of file
diff --git a/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test52/in/A.java b/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test52/in/A.java
new file mode 100644
index 0000000..434a087
--- /dev/null
+++ b/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test52/in/A.java
@@ -0,0 +1,16 @@
+package p;
+
+class A {
+ B b;
+ void m(int i) {
+ }
+}
+
+class B extends A {
+}
+
+class C extends B {
+ void test() {
+ super.m(2);
+ }
+} \ No newline at end of file
diff --git a/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test52/out/A.java b/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test52/out/A.java
new file mode 100644
index 0000000..04179ce
--- /dev/null
+++ b/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test52/out/A.java
@@ -0,0 +1,17 @@
+package p;
+
+class A {
+ B b;
+}
+
+class B extends A {
+
+ protected void m(int i) {
+ }
+}
+
+class C extends B {
+ void test() {
+ b.m(2);
+ }
+} \ No newline at end of file
diff --git a/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test53/in/A.java b/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test53/in/A.java
new file mode 100644
index 0000000..dae754f
--- /dev/null
+++ b/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test53/in/A.java
@@ -0,0 +1,15 @@
+package p;
+
+class A {
+ void m(B b) {
+ }
+}
+
+class B extends A {
+}
+
+class C extends B {
+ void test(B b) {
+ super.m(b);
+ }
+} \ No newline at end of file
diff --git a/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test53/out/A.java b/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test53/out/A.java
new file mode 100644
index 0000000..a41d57e
--- /dev/null
+++ b/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test53/out/A.java
@@ -0,0 +1,16 @@
+package p;
+
+class A {
+}
+
+class B extends A {
+
+ protected void m() {
+ }
+}
+
+class C extends B {
+ void test(B b) {
+ b.m();
+ }
+} \ No newline at end of file
diff --git a/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test54/in/A.java b/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test54/in/A.java
new file mode 100644
index 0000000..380c050
--- /dev/null
+++ b/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test54/in/A.java
@@ -0,0 +1,12 @@
+package p;
+
+public class A {
+ public long m(B b, int i) {
+ return 1;
+ }
+}
+public class B extends A {
+ public long test() {
+ return super.m(null, 2);
+ }
+} \ No newline at end of file
diff --git a/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test54/out/A.java b/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test54/out/A.java
new file mode 100644
index 0000000..3bb3c3c
--- /dev/null
+++ b/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test54/out/A.java
@@ -0,0 +1,16 @@
+package p;
+
+public class A {
+ public long m(B b, int i) {
+ return b.m(i);
+}
+}
+public class B extends A {
+ public long test() {
+ return super.m(null, 2);
+ }
+
+public long m(int i) {
+ return 1;
+ }
+} \ No newline at end of file
diff --git a/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test55/in/A.java b/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test55/in/A.java
new file mode 100644
index 0000000..5d04130
--- /dev/null
+++ b/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test55/in/A.java
@@ -0,0 +1,15 @@
+package p;
+class A {
+ B b;
+ public void m() {
+ m2();
+ }
+
+ public void m2() {
+ }
+}
+class B extends A {
+ public void test() {
+ super.m();
+ }
+} \ No newline at end of file
diff --git a/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test55/out/A.java b/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test55/out/A.java
new file mode 100644
index 0000000..78dcb67
--- /dev/null
+++ b/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test55/out/A.java
@@ -0,0 +1,15 @@
+package p;
+class A {
+ B b;
+ public void m2() {
+ }
+}
+class B extends A {
+ public void test() {
+ b.m(this);
+ }
+
+ public void m(A a) {
+ a.m2();
+ }
+} \ No newline at end of file
diff --git a/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test56/in/A.java b/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test56/in/A.java
new file mode 100644
index 0000000..c48687f
--- /dev/null
+++ b/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test56/in/A.java
@@ -0,0 +1,14 @@
+package p;
+class A {
+ public void m(B b) {
+ m2();
+ }
+
+ public void m2() {
+ }
+}
+class B extends A {
+ public void test() {
+ super.m(this);
+ }
+} \ No newline at end of file
diff --git a/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test56/out/A.java b/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test56/out/A.java
new file mode 100644
index 0000000..927ff45
--- /dev/null
+++ b/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test56/out/A.java
@@ -0,0 +1,14 @@
+package p;
+class A {
+ public void m2() {
+ }
+}
+class B extends A {
+ public void test() {
+ m(this);
+ }
+
+ public void m(A a) {
+ a.m2();
+ }
+} \ No newline at end of file
diff --git a/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test57/in/A.java b/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test57/in/A.java
new file mode 100644
index 0000000..46f1404
--- /dev/null
+++ b/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test57/in/A.java
@@ -0,0 +1,13 @@
+package p;
+class A {
+ public int i = 0;
+
+ public long m(int i, B b) {
+ return this.i + i;
+ }
+}
+class B extends A {
+ public long test() {
+ return super.m(2, new B());
+ }
+} \ No newline at end of file
diff --git a/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test57/out/A.java b/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test57/out/A.java
new file mode 100644
index 0000000..f2b0e41
--- /dev/null
+++ b/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test57/out/A.java
@@ -0,0 +1,13 @@
+package p;
+class A {
+ public int i = 0;
+}
+class B extends A {
+ public long test() {
+ return new B().m(2, this);
+ }
+
+ public long m(int i, A a) {
+ return a.i + i;
+ }
+} \ No newline at end of file
diff --git a/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/MoveInstanceMethodTests.java b/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/MoveInstanceMethodTests.java
index c73a20a..e5fee78 100644
--- a/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/MoveInstanceMethodTests.java
+++ b/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/MoveInstanceMethodTests.java
@@ -7,6 +7,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Nikolay Metchev <nikolaymetchev@gmail.com> - [move method] super method invocation does not compile after refactoring - https://bugs.eclipse.org/356687
*******************************************************************************/
package org.eclipse.jdt.ui.tests.refactoring;
@@ -475,6 +476,51 @@ public class MoveInstanceMethodTests extends RefactoringTest {
helper1(new String[] { "p.A", "p.B", "q.C" }, "p.B", 3, 17, 3, 17, PARAMETER, "c", true, true);
}
+ //bug 356687
+ public void test49() throws Exception {
+ helper1(new String[] {"p.A"}, "p.A", 5, 10, 5, 11, FIELD, "b", true, true);
+ }
+
+ //bug 356687
+ public void test50() throws Exception {
+ helper1(new String[] {"p.A"}, "p.A", 4, 10, 4, 11, PARAMETER, "b", true, true);
+ }
+
+ //bug 356687
+ public void test51() throws Exception {
+ helper1(new String[] {"p.A"}, "p.A", 4, 10, 4, 11, PARAMETER, "b", true, true);
+ }
+
+ //bug 356687
+ public void test52() throws Exception {
+ helper1(new String[] {"p.A"}, "p.A", 5, 10, 5, 11, FIELD, "b", true, true);
+ }
+
+ //bug 356687
+ public void test53() throws Exception {
+ helper1(new String[] {"p.A"}, "p.A", 4, 10, 4, 11, PARAMETER, "b", true, true);
+ }
+
+ //bug 356687
+ public void test54() throws Exception {
+ helper1(new String[] {"p.A"}, "p.A", 4, 15, 4, 16, PARAMETER, "b", false, false);
+ }
+
+ //bug 356687
+ public void test55() throws Exception {
+ helper1(new String[] {"p.A"}, "p.A", 4, 17, 4, 18, FIELD, "b", true, true);
+ }
+
+ //bug 356687
+ public void test56() throws Exception {
+ helper1(new String[] {"p.A"}, "p.A", 3, 17, 3, 18, PARAMETER, "b", true, true);
+ }
+
+ //bug 356687
+ public void test57() throws Exception {
+ helper1(new String[] { "p.A" }, "p.A", 5, 17, 5, 18, PARAMETER, "b", true, true);
+ }
+
// Move mA1 to field fB, do not inline delegator
public void test3() throws Exception {
helper1(new String[] { "p1.A", "p2.B", "p3.C"}, "p1.A", 9, 17, 9, 20, FIELD, "fB", false, false);
diff --git a/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/MoveInstanceMethodProcessor.java b/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/MoveInstanceMethodProcessor.java
index 48d6687..cac5f1a 100644
--- a/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/MoveInstanceMethodProcessor.java
+++ b/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/MoveInstanceMethodProcessor.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Nikolay Metchev <nikolaymetchev@gmail.com> - [move method] super method invocation does not compile after refactoring - https://bugs.eclipse.org/356687
*******************************************************************************/
package org.eclipse.jdt.internal.corext.refactoring.structure;
@@ -1875,7 +1876,8 @@ public final class MoveInstanceMethodProcessor extends MoveProcessor implements
* if a problem occurred while creating the inlined target
* expression for field targets
*/
- protected boolean createInlinedMethodInvocation(final CompilationUnitRewrite rewriter, final MethodDeclaration declaration, final SearchMatch match, final Map<IMember, IncomingMemberVisibilityAdjustment> adjustments, final boolean target, final RefactoringStatus status) throws JavaModelException {
+ protected boolean createInlinedMethodInvocation(final CompilationUnitRewrite rewriter, final MethodDeclaration declaration, final SearchMatch match,
+ final Map<IMember, IncomingMemberVisibilityAdjustment> adjustments, final boolean target, final RefactoringStatus status) throws JavaModelException {
Assert.isNotNull(rewriter);
Assert.isNotNull(declaration);
Assert.isNotNull(match);
@@ -1885,7 +1887,47 @@ public final class MoveInstanceMethodProcessor extends MoveProcessor implements
final ASTRewrite rewrite= rewriter.getASTRewrite();
final ASTNode node= ASTNodeSearchUtil.findNode(match, rewriter.getRoot());
final TextEditGroup group= rewriter.createGroupDescription(RefactoringCoreMessages.MoveInstanceMethodProcessor_inline_method_invocation);
- if (node instanceof MethodInvocation) {
+ if (node instanceof SuperMethodInvocation) {
+ SuperMethodInvocation invocation= (SuperMethodInvocation) node;
+ MethodInvocation newMethodInvocation= rewrite.getAST().newMethodInvocation();
+ newMethodInvocation.setName(rewrite.getAST().newSimpleName(fMethodName));
+ if (fTarget.isField()) {
+ newMethodInvocation.setStructuralProperty(MethodInvocation.EXPRESSION_PROPERTY, rewrite.getAST().newSimpleName(fTarget.getName()));
+ if (target) {
+ newMethodInvocation.arguments().add(rewrite.getAST().newThisExpression());
+ }
+ for (ASTNode astNode : (List<ASTNode>) invocation.arguments()) {
+ newMethodInvocation.arguments().add(rewrite.createCopyTarget(astNode));
+ }
+ } else {
+ final IVariableBinding[] bindings= getArgumentBindings(declaration);
+ List<ASTNode> arguments= invocation.arguments();
+ for (int i= 0; i < arguments.size(); i++) {
+ ASTNode arg= arguments.get(i);
+ if (bindings.length > i && Bindings.equals(bindings[i], fTarget)) {
+ if (arg.getNodeType() == ASTNode.NULL_LITERAL) {
+ status.merge(RefactoringStatus.createErrorStatus(
+ Messages.format(RefactoringCoreMessages.MoveInstanceMethodProcessor_no_null_argument,
+ BindingLabelProvider.getBindingLabel(declaration.resolveBinding(), JavaElementLabels.ALL_FULLY_QUALIFIED)),
+ JavaStatusContext.create(rewriter.getCu(), invocation)));
+ result= false;
+ } else {
+ if (arg.getNodeType() != ASTNode.THIS_EXPRESSION) {
+ newMethodInvocation.setStructuralProperty(MethodInvocation.EXPRESSION_PROPERTY, rewrite.createCopyTarget(arg));
+ }
+ if (target) {
+ newMethodInvocation.arguments().add(rewrite.getAST().newThisExpression());
+ }
+ }
+ } else {
+ newMethodInvocation.arguments().add(rewrite.createCopyTarget(arg));
+ }
+ }
+ }
+ if (result) {
+ rewrite.replace(node, newMethodInvocation, group);
+ }
+ } else if (node instanceof MethodInvocation) {
final MethodInvocation invocation= (MethodInvocation) node;
final ListRewrite list= rewrite.getListRewrite(invocation, MethodInvocation.ARGUMENTS_PROPERTY);
if (fTarget.isField()) {