Enable class members visibility icon in variable view.
authorincastrix <incastrix>
Fri, 29 Aug 2008 03:02:34 +0000 (03:02 +0000)
committerincastrix <incastrix>
Fri, 29 Aug 2008 03:02:34 +0000 (03:02 +0000)
net.sourceforge.phpeclipse.xdebug.ui/src/net/sourceforge/phpeclipse/xdebug/ui/XDebugUIPluginImages.java
net.sourceforge.phpeclipse.xdebug.ui/src/net/sourceforge/phpeclipse/xdebug/ui/php/launching/PHPDebugModelPresentation.java

index 69e49cc..c689c49 100644 (file)
@@ -51,6 +51,9 @@ public class XDebugUIPluginImages {
        public static final String IMG_INFO_ST_OBJ="IMG_INFO_ST_OBJ";
        public static final String IMG_ERROR_STACK_OBJ="IMG_ERROR_STACK_OBJ";
 
+       public static final String IMG_FIELD_PUBLIC = "IMG_FIELD_PUBLIC";
+       public static final String IMG_FIELD_PROTECTED = "IMG_FIELD_PROTECTED";
+       public static final String IMG_FIELD_PRIVATE = "IMG_FIELD_PRIVATE";
 
        public static final String IMG_PROPERTIES          = "IMG_PROPERTIES";
 //     public static final String IMG_PROPERTIES_DISABLED = "IMG_PROPERTIES_DISABLED";
@@ -106,6 +109,10 @@ public class XDebugUIPluginImages {
        }
        
        private static void declareImages() {
+               declareRegistryImage(IMG_FIELD_PUBLIC, T_OBJ + "methpub_obj.gif");
+               declareRegistryImage(IMG_FIELD_PROTECTED, T_OBJ + "methpro_obj.gif");
+               declareRegistryImage(IMG_FIELD_PRIVATE, T_OBJ + "methpri_obj.gif");
+
                declareRegistryImage(IMG_EVIEW_ARGUMENTS_TAB, T_EVIEW + "arguments_tab.gif"); //$NON-NLS-1$
                declareRegistryImage(IMG_EVIEW_ENVIROMENT_TAB, T_EVIEW + "environment_tab.gif"); //$NON-NLS-1$
 
index 8ef0577..028eb2c 100644 (file)
@@ -21,6 +21,7 @@ import net.sourceforge.phpeclipse.xdebug.php.model.XDebugThread;
 import net.sourceforge.phpeclipse.xdebug.php.model.XDebugStackFrame;
 import net.sourceforge.phpeclipse.xdebug.php.model.XDebugVariable;
 import net.sourceforge.phpeclipse.xdebug.php.model.XDebugValue;
+import net.sourceforge.phpeclipse.xdebug.ui.XDebugUIPluginImages;
 //import net.sourceforge.phpeclipse.xdebug.ui.XDebugUIPlugin;
 //import net.sourceforge.phpeclipse.xdebug.ui.php.launching.CopyOfPHPDebugModelPresentation.StorageEditorInput;
 
@@ -129,16 +130,25 @@ public class PHPDebugModelPresentation extends LabelProvider implements
                return DebugUITools.getImage(IDebugUIConstants.IMG_OBJS_BREAKPOINT);
        }
 
-       private Image getVariableImage(XDebugVariable phpVar) {
+//     private Image getVariableImage(XDebugVariable phpVar) {
                /*
                 * if (phpVar != null) { if (phpVar.isLocal()) return
                 * DebugUITools.getImage(IDebugUIConstants.IMG_OBJS_VARIABLE); if
                 * (phpVar.isHashValue()) return
                 * DebugUITools.getImage(IDebugUIConstants.IMG_OBJS_VARIABLE); }
                 */
-               return DebugUITools.getImage(IDebugUIConstants.IMG_OBJS_VARIABLE);
-       }
+       //      return DebugUITools.getImage(IDebugUIConstants.IMG_OBJS_VARIABLE);
+       //}
+       
+       private Image getVariableImage(XDebugVariable phpVar) {
+               if (phpVar.getVisibility().equals("protected")) {
+                       return XDebugUIPluginImages.get(XDebugUIPluginImages.IMG_FIELD_PROTECTED);                      
+               }  else if (phpVar.getVisibility().equals("private")) {
+                       return (XDebugUIPluginImages.get(XDebugUIPluginImages.IMG_FIELD_PRIVATE));                      
+               }
 
+               return XDebugUIPluginImages.get(XDebugUIPluginImages.IMG_FIELD_PUBLIC);                 
+       }
        private Image getValueImage(XDebugValue phpVar) {
                if (phpVar != null) {
                        return DebugUITools.getImage(IDebugUIConstants.IMG_OBJS_VARIABLE);