diff options
author | Manju Mathew | 2013-08-20 04:16:14 +0000 |
---|---|---|
committer | Manju Mathew | 2013-08-20 04:16:14 +0000 |
commit | dd6840893f31388648711918dc88408ad36f7191 (patch) | |
tree | e6f006d6b4188e01ef9a87d074587c1abb6f57df | |
parent | 08e00e51edbf22976edeb8f1fdd14303c8039f1d (diff) | |
download | eclipse.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.java | 6 |
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) { } |