View | Details | Raw Unified | Return to bug 159713 | Differences between
and this patch

Collapse All | Expand All

(-)ui/org/eclipse/jdt/internal/ui/text/java/ContentAssistProcessor.java (-1 / +1 lines)
Lines 189-195 Link Here
189
					extension.setStatusLineVisible(false);
189
					extension.setStatusLineVisible(false);
190
					if (extension instanceof IContentAssistantExtension3) {
190
					if (extension instanceof IContentAssistantExtension3) {
191
						IContentAssistantExtension3 ext3= (IContentAssistantExtension3) extension;
191
						IContentAssistantExtension3 ext3= (IContentAssistantExtension3) extension;
192
						((ContentAssistant) ext3).setRepeatedInvocationTrigger(KeySequence.getInstance());
192
						((ContentAssistant) ext3).setRepeatedInvocationTrigger(null);
193
					}
193
					}
194
				}
194
				}
195
			}
195
			}
(-)src/org/eclipse/jface/text/contentassist/ContentAssistant.java (-3 / +3 lines)
Lines 943-949 Link Here
943
	 *
943
	 *
944
	 * @since 3.2
944
	 * @since 3.2
945
	 */
945
	 */
946
	private KeySequence fTriggerSequence= KeySequence.getInstance();
946
	private KeySequence fTriggerSequence;
947
947
948
948
949
	/**
949
	/**
Lines 2264-2276 Link Here
2264
	 * @since 3.2
2264
	 * @since 3.2
2265
	 */
2265
	 */
2266
	public void setRepeatedInvocationTrigger(KeySequence sequence) {
2266
	public void setRepeatedInvocationTrigger(KeySequence sequence) {
2267
		Assert.isNotNull(sequence);
2268
		fTriggerSequence= sequence;
2267
		fTriggerSequence= sequence;
2269
	}
2268
	}
2270
2269
2271
	/**
2270
	/**
2272
	 * Returns the repeated invocation key sequence.
2271
	 * Returns the repeated invocation key sequence.
2273
	 * @return the repeated invocation key sequence
2272
	 * 
2273
	 * @return the repeated invocation key sequence or <code>null</code>, if none
2274
	 * @since 3.2
2274
	 * @since 3.2
2275
	 */
2275
	 */
2276
	KeySequence getTriggerSequence() {
2276
	KeySequence getTriggerSequence() {
(-)src/org/eclipse/jface/text/contentassist/IContentAssistantExtension3.java (-1 / +1 lines)
Lines 27-33 Link Here
27
	 * Sets the key sequence to listen for in repeated invocation mode. If the key sequence is
27
	 * Sets the key sequence to listen for in repeated invocation mode. If the key sequence is
28
	 * encountered, a step in the repetition iteration is triggered.
28
	 * encountered, a step in the repetition iteration is triggered.
29
	 * 
29
	 * 
30
	 * @param sequence the key sequence to listen for in repeated invocation mode
30
	 * @param sequence the key sequence used for the repeated invocation mode or <code>null</code> if none
31
	 */
31
	 */
32
	public void setRepeatedInvocationTrigger(KeySequence sequence);
32
	public void setRepeatedInvocationTrigger(KeySequence sequence);
33
}
33
}
(-)src/org/eclipse/jface/text/contentassist/CompletionProposalPopup.java (-9 / +9 lines)
Lines 193-198 Link Here
193
	}
193
	}
194
194
195
	private final class CommandKeyListener extends KeyAdapter {
195
	private final class CommandKeyListener extends KeyAdapter {
196
		private KeySequence fCommandSequence;
197
		
198
		private CommandKeyListener(KeySequence keySequence) {
199
			fCommandSequence= keySequence;
200
		}
201
		
196
		public void keyPressed(KeyEvent e) {
202
		public void keyPressed(KeyEvent e) {
197
			if (!Helper.okToUse(fProposalShell))
203
			if (!Helper.okToUse(fProposalShell))
198
				return;
204
				return;
Lines 346-357 Link Here
346
	 * @since 3.2
352
	 * @since 3.2
347
	 */
353
	 */
348
	private String fEmptyMessage= null;
354
	private String fEmptyMessage= null;
349
	/**
350
	 * The invoking command sequence, possibly <code>null</code>.
351
	 *
352
	 * @since 3.2
353
	 */
354
	private KeySequence fCommandSequence= KeySequence.getInstance();
355
355
356
	/**
356
	/**
357
	 * Creates a new completion proposal popup for the given elements.
357
	 * Creates a new completion proposal popup for the given elements.
Lines 615-628 Link Here
615
	 * @since 3.2
615
	 * @since 3.2
616
	 */
616
	 */
617
    private void addCommandSupport(final Control control) {
617
    private void addCommandSupport(final Control control) {
618
    	fCommandSequence= fContentAssistant.getTriggerSequence();
618
    	final KeySequence commandSequence= fContentAssistant.getTriggerSequence();
619
    	if (!fCommandSequence.isEmpty() && fContentAssistant.isRepeatedInvocationMode()) {
619
    	if (commandSequence != null && !commandSequence.isEmpty() && fContentAssistant.isRepeatedInvocationMode()) {
620
    		control.addFocusListener(new FocusListener() {
620
    		control.addFocusListener(new FocusListener() {
621
    			private CommandKeyListener fCommandKeyListener;
621
    			private CommandKeyListener fCommandKeyListener;
622
    			public void focusGained(FocusEvent e) {
622
    			public void focusGained(FocusEvent e) {
623
    				if (Helper.okToUse(control)) {
623
    				if (Helper.okToUse(control)) {
624
    					if (fCommandKeyListener == null) {
624
    					if (fCommandKeyListener == null) {
625
    						fCommandKeyListener= new CommandKeyListener();
625
    						fCommandKeyListener= new CommandKeyListener(commandSequence);
626
    						fProposalTable.addKeyListener(fCommandKeyListener);
626
    						fProposalTable.addKeyListener(fCommandKeyListener);
627
    					}
627
    					}
628
    				}
628
    				}

Return to bug 159713