Author: scabanovich
Date: 2009-10-01 11:15:51 -0400 (Thu, 01 Oct 2009)
New Revision: 17847
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/properties/SeamELAttributeContentProposalProvider.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4916
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/properties/SeamELAttributeContentProposalProvider.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/properties/SeamELAttributeContentProposalProvider.java 2009-10-01
15:15:06 UTC (rev 17846)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/properties/SeamELAttributeContentProposalProvider.java 2009-10-01
15:15:51 UTC (rev 17847)
@@ -28,6 +28,7 @@
import org.jboss.tools.common.meta.XAttribute;
import org.jboss.tools.common.meta.action.XEntityData;
import org.jboss.tools.common.model.XModelObject;
+import
org.jboss.tools.common.model.ui.attribute.AttributeContentProposalProviderFactory;
import org.jboss.tools.common.model.ui.attribute.IAttributeContentProposalProvider;
import org.jboss.tools.common.text.TextProposal;
import org.jboss.tools.seam.core.ISeamProject;
@@ -120,7 +121,7 @@
List<IContentProposal> list = new ArrayList<IContentProposal>();
for (TextProposal p: uniqueSuggestions) {
String label = prefix + p.getReplacementString();
- IContentProposal cp = makeContentProposal(p.getReplacementString(), label);
+ IContentProposal cp =
AttributeContentProposalProviderFactory.makeContentProposal(p.getReplacementString(),
label);
list.add(cp);
}
return list.toArray(new IContentProposal[0]);
@@ -128,26 +129,6 @@
}
- private IContentProposal makeContentProposal(final String proposal, final String label)
{
- return new IContentProposal() {
- public String getContent() {
- return proposal;
- }
-
- public String getDescription() {
- return null;
- }
-
- public String getLabel() {
- return label;
- }
-
- public int getCursorPosition() {
- return proposal.length();
- }
- };
- }
-
public String getPrefix(String content, int offset, int start, int end) throws
StringIndexOutOfBoundsException {
if (content == null || offset > content.length())
return null;