aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzzhongwei2012-10-22 01:54:37 (EDT)
committerzzhongwei2012-10-22 01:54:37 (EDT)
commitf3bddfe47f4d8b6c1478e87483b495ed370312f0 (patch)
tree024cd49c27fe3c45b0556acd048441f2b7b6fffc
parentf36afcd1baf5a47df579478546841d1fdc552060 (diff)
downloadorg.eclipse.pdt-f3bddfe47f4d8b6c1478e87483b495ed370312f0.zip
org.eclipse.pdt-f3bddfe47f4d8b6c1478e87483b495ed370312f0.tar.gz
org.eclipse.pdt-f3bddfe47f4d8b6c1478e87483b495ed370312f0.tar.bz2
392537: CA shows class icon for trait.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=392537
-rw-r--r--plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/editor/contentassist/PHPCompletionProposalLabelProvider.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/editor/contentassist/PHPCompletionProposalLabelProvider.java b/plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/editor/contentassist/PHPCompletionProposalLabelProvider.java
index cfb9cf1..79cc6b4 100644
--- a/plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/editor/contentassist/PHPCompletionProposalLabelProvider.java
+++ b/plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/editor/contentassist/PHPCompletionProposalLabelProvider.java
@@ -16,9 +16,11 @@ import org.eclipse.dltk.internal.core.ArchiveProjectFragment;
import org.eclipse.dltk.ui.DLTKPluginImages;
import org.eclipse.dltk.ui.text.completion.CompletionProposalLabelProvider;
import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.php.core.compiler.PHPFlags;
import org.eclipse.php.internal.core.codeassist.AliasType;
import org.eclipse.php.internal.core.compiler.ast.nodes.NamespaceReference;
import org.eclipse.php.internal.core.typeinference.FakeConstructor;
+import org.eclipse.php.internal.ui.util.PHPPluginImages;
public class PHPCompletionProposalLabelProvider extends
CompletionProposalLabelProvider {
@@ -137,4 +139,14 @@ public class PHPCompletionProposalLabelProvider extends
}
return super.createImageDescriptor(proposal);
}
+
+ @Override
+ public ImageDescriptor createTypeImageDescriptor(CompletionProposal proposal) {
+ if (PHPFlags.isTrait(proposal.getFlags())) {
+ return decorateImageDescriptor(PHPPluginImages.DESC_OBJS_TRAIT,
+ proposal);
+ } else {
+ return super.createTypeImageDescriptor(proposal);
+ }
+ }
}