Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManju Mathew2013-08-20 04:16:14 +0000
committerManju Mathew2013-08-20 04:16:14 +0000
commitdd6840893f31388648711918dc88408ad36f7191 (patch)
treee6f006d6b4188e01ef9a87d074587c1abb6f57df
parent08e00e51edbf22976edeb8f1fdd14303c8039f1d (diff)
downloadeclipse.jdt.ui-dd6840893f31388648711918dc88408ad36f7191.tar.gz
eclipse.jdt.ui-dd6840893f31388648711918dc88408ad36f7191.tar.xz
eclipse.jdt.ui-dd6840893f31388648711918dc88408ad36f7191.zip
Fixed bug 414960: [content assist] completing with semicolon (;) leaves
content assist in linked mode
-rw-r--r--org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/AbstractJavaCompletionProposal.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/AbstractJavaCompletionProposal.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/AbstractJavaCompletionProposal.java
index edcd774503..ececa16de3 100644
--- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/AbstractJavaCompletionProposal.java
+++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/AbstractJavaCompletionProposal.java
@@ -185,11 +185,13 @@ public abstract class AbstractJavaCompletionProposal implements IJavaCompletionP
case ';':
return new ExitFlags(ILinkedModeListener.NONE, true);
case SWT.CR:
- // when entering an anonymous class as a parameter, we don't want
+ // 1) when entering an anonymous class as a parameter, we don't want
// to jump after the parenthesis when return is pressed
+ // 2) after auto completion of methods without parameters, exit from linked mode when return is pressed
if (offset > 0) {
try {
- if (fDocument.getChar(offset - 1) == '{')
+ char prevOffsetChar= fDocument.getChar(offset - 1);
+ if (prevOffsetChar == '{' || prevOffsetChar == ';')
return new ExitFlags(ILinkedModeListener.EXIT_ALL, true);
} catch (BadLocationException e) {
}

Back to the top