fixed update conflict and outline update bug
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / ui / PHPUiImages.java
index e56aeff..fec960b 100644 (file)
@@ -16,23 +16,28 @@ public class PHPUiImages {
                "net.sourceforge.phpdt.internal.ui.";
        protected static final int NAME_PREFIX_LENGTH = NAME_PREFIX.length();
 
-       protected static URL iconBaseURL;
-
+       protected static URL fgIconBaseURL;
+
+//     static {
+//             String pathSuffix = "icons/";
+//             try {
+//                     fgIconBaseURL =
+//                             new URL(
+//                                     PHPeclipsePlugin
+//                                             .getDefault()
+//                                             .getDescriptor()
+//                                             .getInstallURL(),
+//                                     pathSuffix);
+//             } catch (MalformedURLException e) {
+//                     PHPeclipsePlugin.log(e);
+//             }
+//     }
+
+//      Determine display depth. If depth > 4 then we use high color images. Otherwise low color
+       // images are used
        static {
-               String pathSuffix = "icons/";
-               try {
-                       iconBaseURL =
-                               new URL(
-                                       PHPeclipsePlugin
-                                               .getDefault()
-                                               .getDescriptor()
-                                               .getInstallURL(),
-                                       pathSuffix);
-               } catch (MalformedURLException e) {
-                       PHPeclipsePlugin.log(e);
-               }
+               fgIconBaseURL= PHPeclipsePlugin.getDefault().getBundle().getEntry("/icons/"); //$NON-NLS-1$
        }
-
        protected static final ImageRegistry IMAGE_REGISTRY = new ImageRegistry();
 
        protected static final String OBJ_PREFIX = "obj16";
@@ -130,7 +135,7 @@ public class PHPUiImages {
        public static final String IMG_OBJS_INTERFACE= NAME_PREFIX + "int_obj.gif";                     //$NON-NLS-1$
        public static final String IMG_OBJS_INTERFACEALT= NAME_PREFIX + "intf_obj.gif";                         //$NON-NLS-1$   
        public static final String IMG_OBJS_INTERFACE_DEFAULT= NAME_PREFIX + "int_default_obj.gif";             //$NON-NLS-1$
-       public static final String IMG_OBJS_CUNIT= NAME_PREFIX + "jcu_obj.gif";                                 //$NON-NLS-1$
+       public static final String IMG_OBJS_CUNIT= NAME_PREFIX + "phpedit.gif";                                 //$NON-NLS-1$
        public static final String IMG_OBJS_CUNIT_RESOURCE= NAME_PREFIX + "jcu_resource_obj.gif";                               //$NON-NLS-1$
        public static final String IMG_OBJS_CFILE= NAME_PREFIX + "classf_obj.gif";                      //$NON-NLS-1$
        public static final String IMG_OBJS_CFILECLASS= NAME_PREFIX + "class_obj.gif";                  //$NON-NLS-1$
@@ -359,12 +364,17 @@ public class PHPUiImages {
        public static final String IMG_CORRECTION_RENAME= NAME_PREFIX + "correction_rename.gif"; //$NON-NLS-1$
        public static final String IMG_CORRECTION_DELETE_IMPORT= NAME_PREFIX + "correction_delete_import.gif"; //$NON-NLS-1$
        public static final String IMG_CORRECTION_LOCAL= NAME_PREFIX + "localvariable_obj.gif"; //$NON-NLS-1$
+       public static final String IMG_CORRECTION_REMOVE= NAME_PREFIX + "remove_correction.gif"; //$NON-NLS-1$
+       public static final String IMG_CORRECTION_ADD= NAME_PREFIX + "add_correction.gif"; //$NON-NLS-1$
+
        static {
                createManaged(T_OBJ, IMG_CORRECTION_CHANGE);
                createManaged(T_OBJ, IMG_CORRECTION_MOVE);
                createManaged(T_OBJ, IMG_CORRECTION_RENAME);
                createManaged(T_OBJ, IMG_CORRECTION_DELETE_IMPORT);
                createManaged(T_OBJ, IMG_CORRECTION_LOCAL);
+               createManaged(T_OBJ, IMG_CORRECTION_REMOVE);
+               createManaged(T_OBJ, IMG_CORRECTION_ADD);
        }
        /**
         * Returns the image managed under the given key in this registry.
@@ -454,12 +464,12 @@ public class PHPUiImages {
 
        protected static URL makeIconFileURL(String prefix, String name)
                throws MalformedURLException {
-               if (iconBaseURL == null)
+               if (fgIconBaseURL == null)
                        throw new MalformedURLException();
 
                StringBuffer buffer = new StringBuffer(prefix);
                buffer.append('/');
                buffer.append(name);
-               return new URL(iconBaseURL, buffer.toString());
+               return new URL(fgIconBaseURL, buffer.toString());
        }
 }
\ No newline at end of file