Author: vrubezhny
Date: 2009-07-24 15:16:49 -0400 (Fri, 24 Jul 2009)
New Revision: 16785
Modified:
trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/contentassist/SortingCompoundContentAssistProcessor.java
Log:
JBIDE-2808: Improve/refactor org.jboss.tools.common.kb plugin.
Proposals unification procedure is updated.
Modified:
trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/contentassist/SortingCompoundContentAssistProcessor.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/contentassist/SortingCompoundContentAssistProcessor.java 2009-07-24
18:33:39 UTC (rev 16784)
+++
trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/contentassist/SortingCompoundContentAssistProcessor.java 2009-07-24
19:16:49 UTC (rev 16785)
@@ -214,7 +214,10 @@
List<IContentAssistProcessor> processors = new
LinkedList<IContentAssistProcessor>();
if (fProcessorsMap.get(contentType) != null) {
- processors.addAll(fProcessorsMap.get(contentType).get(fPartitionType));
+ List<IContentAssistProcessor> list =
fProcessorsMap.get(contentType).get(fPartitionType);
+ if (list != null) {
+ processors.addAll(list);
+ }
}
if (fProcessorsMap.get(POST_INSTALL_CA_PROCESSORS_CONTENTTYPE_STUB) != null) {
List<IContentAssistProcessor> list =
fProcessorsMap.get(POST_INSTALL_CA_PROCESSORS_CONTENTTYPE_STUB).get(fPartitionType);
@@ -268,10 +271,17 @@
infoUnquoted = infoUnquoted.substring(1);
if (infoUnquoted.endsWith("\""))
infoUnquoted = infoUnquoted.substring(0, infoUnquoted.length() - 1);
- infoUnquoted = infoUnquoted.trim();
+ infoUnquoted = infoUnquoted.trim().toLowerCase();
}
- if (!present.contains(proposals[i].getDisplayString())) {
- present.add(proposals[i].getDisplayString());
+ String displayStringUnquoted = proposals[i].getDisplayString().toLowerCase();
+ if (displayStringUnquoted.startsWith("\""))
+ displayStringUnquoted = displayStringUnquoted.substring(1);
+ if (displayStringUnquoted.endsWith("\""))
+ displayStringUnquoted = displayStringUnquoted.substring(0,
displayStringUnquoted.length() - 1);
+ displayStringUnquoted = displayStringUnquoted.trim().toLowerCase();
+
+ if (!present.contains(displayStringUnquoted)) {
+ present.add(displayStringUnquoted);
if (infoUnquoted != null && infoUnquoted.length() > 0) {
if (!info.contains(infoUnquoted)) {
info.add(infoUnquoted);
Show replies by date