aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDawid Pakuła2018-05-10 18:00:42 -0400
committerDawid Pakuła2018-05-10 18:00:42 -0400
commit06369fb0ea3d484a80ae5390b2faa0df093d9e70 (patch)
treef39e68e2ed5628b18d09b0eda6b6a5dc3c14468f
parenta5dc8d1f8dbc386c60bdc1207ae6a6081de1d528 (diff)
downloadorg.eclipse.pdt-06369fb0ea3d484a80ae5390b2faa0df093d9e70.zip
org.eclipse.pdt-06369fb0ea3d484a80ae5390b2faa0df093d9e70.tar.gz
org.eclipse.pdt-06369fb0ea3d484a80ae5390b2faa0df093d9e70.tar.xz
Bug 534544 - Image allocated by PHPEditorErrorTickUpdater never disposed and stored forever in dltk image registry
Signed-off-by: Dawid Pakuła <zulus@w3des.net>
-rw-r--r--plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/util/PHPModelLabelProvider.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/util/PHPModelLabelProvider.java b/plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/util/PHPModelLabelProvider.java
index 9115b83..500557d 100644
--- a/plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/util/PHPModelLabelProvider.java
+++ b/plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/util/PHPModelLabelProvider.java
@@ -11,10 +11,7 @@
*******************************************************************************/
package org.eclipse.php.internal.ui.util;
-import org.eclipse.dltk.core.IMember;
-import org.eclipse.dltk.core.IMethod;
-import org.eclipse.dltk.core.IModelElement;
-import org.eclipse.dltk.core.ModelException;
+import org.eclipse.dltk.core.*;
import org.eclipse.dltk.ui.DLTKUIPlugin;
import org.eclipse.dltk.ui.ScriptElementImageProvider;
import org.eclipse.dltk.ui.ScriptElementLabels;
@@ -22,6 +19,7 @@ import org.eclipse.dltk.ui.viewsupport.ImageDescriptorRegistry;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.php.core.PHPToolkitUtil;
import org.eclipse.php.core.compiler.PHPFlags;
import org.eclipse.php.internal.core.Logger;
import org.eclipse.swt.graphics.Image;
@@ -45,9 +43,9 @@ public class PHPModelLabelProvider extends LabelProvider implements ILabelProvid
/**
* @param textFlags
- * Flags defined in {@link ScriptElementLabels}.
+ * Flags defined in {@link ScriptElementLabels}.
* @param imageFlags
- * Flags defined in {@link ScriptElementImageProvider}.
+ * Flags defined in {@link ScriptElementImageProvider}.
*/
public PHPModelLabelProvider(final long textFlags, final int imageFlags) {
fImageFlags = imageFlags;
@@ -95,7 +93,9 @@ public class PHPModelLabelProvider extends LabelProvider implements ILabelProvid
}
private ImageDescriptor getBaseImageDescriptor(IModelElement element, int imageFlags) {
-
+ if (element instanceof ISourceModule && PHPToolkitUtil.isPHPFile((ISourceModule) element)) {
+ return PHPPluginImages.getImageRegistry().getDescriptor(PHPPluginImages.IMG_OBJS_PHP_FILE);
+ }
return fImageProvider.getBaseImageDescriptor(element, imageFlags);
}