### Eclipse Workspace Patch 1.0
#P org.eclipse.jface.text
Index: src/org/eclipse/jface/text/contentassist/IContentAssistantExtension3.java
===================================================================
RCS file: /cvsroot/eclipse/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/IContentAssistantExtension3.java,v
retrieving revision 1.1
diff -u -r1.1 IContentAssistantExtension3.java
--- src/org/eclipse/jface/text/contentassist/IContentAssistantExtension3.java 25 Apr 2006 16:26:27 -0000 1.1
+++ src/org/eclipse/jface/text/contentassist/IContentAssistantExtension3.java 9 Oct 2006 08:16:00 -0000
@@ -27,7 +27,7 @@
* Sets the key sequence to listen for in repeated invocation mode. If the key sequence is
* encountered, a step in the repetition iteration is triggered.
*
- * @param sequence the key sequence to listen for in repeated invocation mode
+ * @param sequence the key sequence used for the repeated invocation mode or null
if none
*/
public void setRepeatedInvocationTrigger(KeySequence sequence);
}
Index: src/org/eclipse/jface/text/contentassist/ContentAssistant.java
===================================================================
RCS file: /cvsroot/eclipse/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/ContentAssistant.java,v
retrieving revision 1.74
diff -u -r1.74 ContentAssistant.java
--- src/org/eclipse/jface/text/contentassist/ContentAssistant.java 31 Aug 2006 08:52:39 -0000 1.74
+++ src/org/eclipse/jface/text/contentassist/ContentAssistant.java 9 Oct 2006 08:16:00 -0000
@@ -943,7 +943,7 @@
*
* @since 3.2
*/
- private KeySequence fTriggerSequence= KeySequence.getInstance();
+ private KeySequence fTriggerSequence;
/**
@@ -2264,13 +2264,13 @@
* @since 3.2
*/
public void setRepeatedInvocationTrigger(KeySequence sequence) {
- Assert.isNotNull(sequence);
fTriggerSequence= sequence;
}
/**
* Returns the repeated invocation key sequence.
- * @return the repeated invocation key sequence
+ *
+ * @return the repeated invocation key sequence or null
, if none
* @since 3.2
*/
KeySequence getTriggerSequence() {
Index: src/org/eclipse/jface/text/contentassist/CompletionProposalPopup.java
===================================================================
RCS file: /cvsroot/eclipse/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/CompletionProposalPopup.java,v
retrieving revision 1.124
diff -u -r1.124 CompletionProposalPopup.java
--- src/org/eclipse/jface/text/contentassist/CompletionProposalPopup.java 31 Aug 2006 08:52:39 -0000 1.124
+++ src/org/eclipse/jface/text/contentassist/CompletionProposalPopup.java 9 Oct 2006 08:15:59 -0000
@@ -193,6 +193,12 @@
}
private final class CommandKeyListener extends KeyAdapter {
+ private KeySequence fCommandSequence;
+
+ private CommandKeyListener(KeySequence keySequence) {
+ fCommandSequence= keySequence;
+ }
+
public void keyPressed(KeyEvent e) {
if (!Helper.okToUse(fProposalShell))
return;
@@ -346,12 +352,6 @@
* @since 3.2
*/
private String fEmptyMessage= null;
- /**
- * The invoking command sequence, possibly null
.
- *
- * @since 3.2
- */
- private KeySequence fCommandSequence= KeySequence.getInstance();
/**
* Creates a new completion proposal popup for the given elements.
@@ -615,14 +615,14 @@
* @since 3.2
*/
private void addCommandSupport(final Control control) {
- fCommandSequence= fContentAssistant.getTriggerSequence();
- if (!fCommandSequence.isEmpty() && fContentAssistant.isRepeatedInvocationMode()) {
+ final KeySequence commandSequence= fContentAssistant.getTriggerSequence();
+ if (commandSequence != null && !commandSequence.isEmpty() && fContentAssistant.isRepeatedInvocationMode()) {
control.addFocusListener(new FocusListener() {
private CommandKeyListener fCommandKeyListener;
public void focusGained(FocusEvent e) {
if (Helper.okToUse(control)) {
if (fCommandKeyListener == null) {
- fCommandKeyListener= new CommandKeyListener();
+ fCommandKeyListener= new CommandKeyListener(commandSequence);
fProposalTable.addKeyListener(fCommandKeyListener);
}
}