Author: scabanovich
Date: 2010-03-17 08:41:44 -0400 (Wed, 17 Mar 2010)
New Revision: 20877
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-6062
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 2010-03-17
12:32:56 UTC (rev 20876)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/properties/SeamELAttributeContentProposalProvider.java 2010-03-17
12:41:44 UTC (rev 20877)
@@ -100,6 +100,8 @@
if(is == null) {
return EMPTY;
}
+
+ boolean addClosingToken = is.getOpenInstanceToken() != null &&
is.getCloseInstanceToken() == null;
String prefix = getPrefix(contents, position, 0, contents.length());
if(prefix == null || prefix.length() == 0) {
@@ -122,7 +124,7 @@
List<IContentProposal> list = new ArrayList<IContentProposal>();
for (TextProposal p: uniqueSuggestions) {
String label = prefix + p.getReplacementString();
- IContentProposal cp =
AttributeContentProposalProviderFactory.makeContentProposal(p.getReplacementString(),
label, null);
+ IContentProposal cp =
AttributeContentProposalProviderFactory.makeContentProposal(p.getReplacementString() +
(addClosingToken ? "}" : ""), label, null);
list.add(cp);
}
return list.toArray(new IContentProposal[0]);