Author: dazarov
Date: 2010-12-13 04:30:23 -0500 (Mon, 13 Dec 2010)
New Revision: 27398
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/CDIProblemMarkerResolutionGenerator.java
Log:
https://issues.jboss.org/browse/JBIDE-7672
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/CDIProblemMarkerResolutionGenerator.java
===================================================================
---
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/CDIProblemMarkerResolutionGenerator.java 2010-12-13
09:28:46 UTC (rev 27397)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/CDIProblemMarkerResolutionGenerator.java 2010-12-13
09:30:23 UTC (rev 27398)
@@ -80,7 +80,7 @@
IMethod method = findMethod(file, start);
if(method != null){
List<IType> types = findLocalAnnotattedInterfaces(method);
- if(types.size() == 0){
+ if(types.size() == 0 && !isMethodPublic(method)){
return new IMarkerResolution[] {
new MakeMethodPublicMarkerResolution(method, file)
};
@@ -156,7 +156,7 @@
if(javaElement != null && javaElement instanceof IField){
IField field = (IField)javaElement;
- if((field.getFlags() & Flags.AccStatic) == 0 && !field.isBinary())
+ if(!Flags.isStatic(field.getFlags()) && !field.isBinary())
return field;
}
}catch(CoreException ex){
@@ -165,6 +165,12 @@
return null;
}
+ private boolean isMethodPublic(IMethod method) throws JavaModelException{
+ if(Flags.isPublic(method.getFlags()))
+ return true;
+ return false;
+ }
+
public boolean hasResolutions(IMarker marker) {
try {
if (findResolutions(marker).length != 0)