Author: vrubezhny
Date: 2008-10-16 08:14:54 -0400 (Thu, 16 Oct 2008)
New Revision: 10880
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/text/java/SeamELProposalProcessor.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2118 Cleanup/unify the EL code completion used in
JSF, Java, Seam completions
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/text/java/SeamELProposalProcessor.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/text/java/SeamELProposalProcessor.java 2008-10-16
11:35:55 UTC (rev 10879)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/text/java/SeamELProposalProcessor.java 2008-10-16
12:14:54 UTC (rev 10880)
@@ -49,10 +49,12 @@
import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
import org.eclipse.wst.sse.ui.internal.contentassist.ContentAssistUtils;
+import org.eclipse.wst.sse.ui.internal.contentassist.IRelevanceCompletionProposal;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
import org.eclipse.wst.xml.ui.internal.contentassist.AbstractContentAssistProcessor;
+import org.eclipse.wst.xml.ui.internal.contentassist.XMLRelevanceConstants;
import org.eclipse.wst.xml.ui.internal.util.SharedXMLEditorPluginImageHelper;
import org.jboss.tools.common.el.core.model.ELInvocationExpression;
import org.jboss.tools.common.el.core.model.ELModel;
@@ -83,7 +85,7 @@
private static final ICompletionProposal[] NO_PROPOSALS= new ICompletionProposal[0];
private static final IContextInformation[] NO_CONTEXTS= new IContextInformation[0];
- public static final class Proposal implements ICompletionProposal,
ICompletionProposalExtension, ICompletionProposalExtension2,
ICompletionProposalExtension3, ICompletionProposalExtension4 {
+ public static final class Proposal implements ICompletionProposal,
ICompletionProposalExtension, ICompletionProposalExtension2,
ICompletionProposalExtension3, ICompletionProposalExtension4, IRelevanceCompletionProposal
{
private final String fString;
private final String fPrefix;
@@ -265,6 +267,13 @@
return fNewPosition;
}
+ /**
+ * Returns the relevance of the proposal
+ */
+ public int getRelevance() {
+ return XMLRelevanceConstants.R_XML_ATTRIBUTE_VALUE;
+ }
+
}
/**