Author: scabanovich
Date: 2011-02-07 06:45:16 -0500 (Mon, 07 Feb 2011)
New Revision: 29037
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/AttributeContentProposalProviderFactory.java
Log:
JBIDE-8328
https://issues.jboss.org/browse/JBIDE-8328
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/AttributeContentProposalProviderFactory.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/AttributeContentProposalProviderFactory.java 2011-02-07
10:53:31 UTC (rev 29036)
+++
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/AttributeContentProposalProviderFactory.java 2011-02-07
11:45:16 UTC (rev 29037)
@@ -31,6 +31,7 @@
import org.eclipse.jface.fieldassist.IControlContentAdapter;
import org.eclipse.jface.fieldassist.TextContentAdapter;
import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.pde.internal.ui.editor.contentassist.TypeContentProposal;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.DisposeEvent;
import org.eclipse.swt.events.DisposeListener;
@@ -108,6 +109,17 @@
cpp,
AttributeContentProposalProviderFactory.getCtrlSpaceKeyStroke(),
null);
+
+ //TODO let IAttributeContentProposalProvider return specific label provider.
+ adapter.setLabelProvider(new LabelProvider() {
+ public Image getImage(Object element) {
+ if(element instanceof TypeContentProposal) {
+ return ((TypeContentProposal)element).getImage();
+ }
+ return null;
+ }
+ });
+
adapter.setPropagateKeys(true);
adapter.setProposalAcceptanceStyle(p.getProposalAcceptanceStyle());
if(listener != null) {