Lines 102-107
Link Here
|
102 |
} |
102 |
} |
103 |
return JavaModelStatus.VERIFIED_OK; |
103 |
return JavaModelStatus.VERIFIED_OK; |
104 |
} |
104 |
} |
|
|
105 |
public IJavaModelStatus verify() { |
106 |
IJavaModelStatus status = super.verify(); |
107 |
if (!status.isOK()) |
108 |
return status; |
109 |
try { |
110 |
IJavaElement parent = getParentElement(); |
111 |
if (this.anchorElement != null && this.anchorElement.getElementType() == IJavaElement.FIELD |
112 |
&& parent.getElementType() == IJavaElement.TYPE && ((IType)parent).isEnum()) |
113 |
return new JavaModelStatus(IJavaModelStatusConstants.INVALID_SIBLING, this.anchorElement); |
114 |
} catch (JavaModelException e) { |
115 |
return e.getJavaModelStatus(); |
116 |
} |
117 |
return JavaModelStatus.VERIFIED_OK; |
118 |
} |
105 |
private String getASTNodeName() { |
119 |
private String getASTNodeName() { |
106 |
return ((AbstractTypeDeclaration) this.createdNode).getName().getIdentifier(); |
120 |
return ((AbstractTypeDeclaration) this.createdNode).getName().getIdentifier(); |
107 |
} |
121 |
} |