getMethodImageDescriptor() refactoring & TODO
diff --git a/core/plugins/org.eclipse.dltk.ui/src/org/eclipse/dltk/ui/ScriptElementImageProvider.java b/core/plugins/org.eclipse.dltk.ui/src/org/eclipse/dltk/ui/ScriptElementImageProvider.java
index 6fed577..2eb912b 100644
--- a/core/plugins/org.eclipse.dltk.ui/src/org/eclipse/dltk/ui/ScriptElementImageProvider.java
+++ b/core/plugins/org.eclipse.dltk.ui/src/org/eclipse/dltk/ui/ScriptElementImageProvider.java
@@ -385,18 +385,17 @@
 	}
 
 	public static ImageDescriptor getMethodImageDescriptor(int flags) {
-		if ((flags & Modifiers.AccPrivate) != 0) {
+		if (Flags.isPrivate(flags)) {
 			return DLTKPluginImages.DESC_METHOD_PRIVATE;
 		}
-
-		if ((flags & Modifiers.AccProtected) != 0) {
+		if (Flags.isProtected(flags)) {
 			return DLTKPluginImages.DESC_METHOD_PROTECTED;
 		}
-
-		if ((flags & Modifiers.AccDefault) != 0) {
-			return DLTKPluginImages.DESC_METHOD_DEFAULT;
+		if (Flags.isPublic(flags)) {
+			return DLTKPluginImages.DESC_METHOD_PUBLIC;
 		}
-
+		// TODO (alex) it has been public by default for years
+		// switch to DESC_METHOD_DEFAULT eventually
 		return DLTKPluginImages.DESC_METHOD_PUBLIC;
 	}