Author: vrubezhny
Date: 2010-09-03 09:44:45 -0400 (Fri, 03 Sep 2010)
New Revision: 24695
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/computers/XmlTagCompletionProposalComputer.java
Log:
JBIDE-6285: Don't invoke code assist automaticly if user inserts
<tag></tag>.
Issue is fixed
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/computers/XmlTagCompletionProposalComputer.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/computers/XmlTagCompletionProposalComputer.java 2010-09-03
13:32:14 UTC (rev 24694)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/computers/XmlTagCompletionProposalComputer.java 2010-09-03
13:44:45 UTC (rev 24695)
@@ -326,7 +326,8 @@
for (int i = 0; proposals != null && i < proposals.length; i++) {
TextProposal textProposal = proposals[i];
-
+ boolean useAutoActivation = true;
+
String replacementString = textProposal.getReplacementString();
String closingTag = textProposal.getLabel();
if (closingTag != null && closingTag.startsWith("<")) {
//$NON-NLS-1$
@@ -339,6 +340,7 @@
}
if (!replacementString.endsWith("/>")) { //$NON-NLS-1$
replacementString += "</" + closingTag + ">"; //$NON-NLS-1$
//$NON-NLS-2$
+ useAutoActivation = false; // JBIDE-6285: Don't invoke code assist automaticly if
user inserts <tag></tag>.
}
@@ -358,7 +360,7 @@
relevance = defaultRelevance == TextProposal.R_NONE? TextProposal.R_TAG_INSERTION :
defaultRelevance;
}
- AutoContentAssistantProposal proposal = new AutoContentAssistantProposal(true,
replacementString,
+ AutoContentAssistantProposal proposal = new
AutoContentAssistantProposal(useAutoActivation, replacementString,
replacementOffset, replacementLength, cursorPosition, image, displayString,
contextInformation, additionalProposalInfo, relevance);
Show replies by date