Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 170385
Collapse All | Expand All

(-)ui/org/eclipse/jdt/ui/text/JavaSourceViewerConfiguration.java (-3 / +6 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2009 IBM Corporation and others.
2
 * Copyright (c) 2000, 2010 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 427-434 Link Here
427
	 * @since 3.2
427
	 * @since 3.2
428
	 */
428
	 */
429
	public IQuickAssistAssistant getQuickAssistAssistant(ISourceViewer sourceViewer) {
429
	public IQuickAssistAssistant getQuickAssistAssistant(ISourceViewer sourceViewer) {
430
		if (getEditor() != null)
430
		if (getEditor() != null) {
431
			return new JavaCorrectionAssistant(getEditor());
431
			JavaCorrectionAssistant assistant= new JavaCorrectionAssistant(getEditor());
432
			assistant.setRestoreCompletionProposalSize(getSettings("quick_assist_proposal_size")); //$NON-NLS-1$
433
			return assistant;
434
		}
432
		return null;
435
		return null;
433
	}
436
	}
434
437
(-)src/org/eclipse/jface/text/quickassist/QuickAssistAssistant.java (-1 / +27 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2006, 2008 IBM Corporation and others.
2
 * Copyright (c) 2006, 2010 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 14-19 Link Here
14
14
15
import org.eclipse.core.commands.IHandler;
15
import org.eclipse.core.commands.IHandler;
16
16
17
import org.eclipse.jface.dialogs.IDialogSettings;
18
17
import org.eclipse.jface.text.IDocument;
19
import org.eclipse.jface.text.IDocument;
18
import org.eclipse.jface.text.IInformationControlCreator;
20
import org.eclipse.jface.text.IInformationControlCreator;
19
import org.eclipse.jface.text.ITextViewer;
21
import org.eclipse.jface.text.ITextViewer;
Lines 192-197 Link Here
192
	}
194
	}
193
195
194
	/**
196
	/**
197
	 * Tells this assistant to open the proposal popup with the size
198
	 * contained in the given dialog settings and to store the control's last valid size in the
199
	 * given dialog settings.
200
	 * <p>
201
	 * Note: This API is only valid if the information control implements
202
	 * {@link org.eclipse.jface.text.IInformationControlExtension3}. Not following this restriction
203
	 * will later result in an {@link UnsupportedOperationException}.
204
	 * </p>
205
	 * <p>
206
	 * The constants used to store the values are:
207
	 * <ul>
208
	 * <li>{@link ContentAssistant#STORE_SIZE_X}</li>
209
	 * <li>{@link ContentAssistant#STORE_SIZE_Y}</li>
210
	 * </ul>
211
	 * </p>
212
	 *
213
	 * @param dialogSettings the dialog settings
214
	 * @since 3.7
215
	 */
216
	public void setRestoreCompletionProposalSize(IDialogSettings dialogSettings) {
217
		fQuickAssistAssistantImpl.setRestoreCompletionProposalSize(dialogSettings);
218
	}
219
	
220
	/**
195
	 * Callback to signal this quick assist assistant that the presentation of the
221
	 * Callback to signal this quick assist assistant that the presentation of the
196
	 * possible completions has been stopped.
222
	 * possible completions has been stopped.
197
	 */
223
	 */
(-)src/org/eclipse/ui/editors/text/TextSourceViewerConfiguration.java (-1 / +2 lines)
Lines 400-407 Link Here
400
		if (fPreferenceStore == null || !fPreferenceStore.getBoolean(SpellingService.PREFERENCE_SPELLING_ENABLED))
400
		if (fPreferenceStore == null || !fPreferenceStore.getBoolean(SpellingService.PREFERENCE_SPELLING_ENABLED))
401
			return null;
401
			return null;
402
402
403
		IQuickAssistAssistant assistant= new QuickAssistAssistant();
403
		QuickAssistAssistant assistant= new QuickAssistAssistant();
404
		assistant.setQuickAssistProcessor(new SpellingCorrectionProcessor());
404
		assistant.setQuickAssistProcessor(new SpellingCorrectionProcessor());
405
		assistant.setRestoreCompletionProposalSize(EditorsPlugin.getDefault().getDialogSettingsSection("quick_assist_proposal_size")); //$NON-NLS-1$
405
		assistant.setInformationControlCreator(getQuickAssistAssistantInformationControlCreator());
406
		assistant.setInformationControlCreator(getQuickAssistAssistantInformationControlCreator());
406
407
407
		return assistant;
408
		return assistant;
(-)src/org/eclipse/ui/internal/editors/text/EditorsPlugin.java (-1 / +18 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2008 IBM Corporation and others.
2
 * Copyright (c) 2000, 2010 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 18-23 Link Here
18
import org.eclipse.core.runtime.MultiStatus;
18
import org.eclipse.core.runtime.MultiStatus;
19
import org.eclipse.core.runtime.Status;
19
import org.eclipse.core.runtime.Status;
20
20
21
import org.eclipse.jface.dialogs.IDialogSettings;
21
import org.eclipse.jface.util.IPropertyChangeListener;
22
import org.eclipse.jface.util.IPropertyChangeListener;
22
import org.eclipse.jface.util.PropertyChangeEvent;
23
import org.eclipse.jface.util.PropertyChangeEvent;
23
24
Lines 281-284 Link Here
281
		return TextEditorMessages.EditorsPlugin_additionalInfo_affordance;
282
		return TextEditorMessages.EditorsPlugin_additionalInfo_affordance;
282
	}
283
	}
283
284
285
	/**
286
	 * Returns a section in the ui.editors plugin's dialog settings. If the section doesn't exist yet, it is created.
287
	 *
288
	 * @param name the name of the section
289
	 * @return the section of the given name
290
	 * @since 3.7
291
	 */
292
	public IDialogSettings getDialogSettingsSection(String name) {
293
		IDialogSettings dialogSettings= getDialogSettings();
294
		IDialogSettings section= dialogSettings.getSection(name);
295
		if (section == null) {
296
			section= dialogSettings.addNewSection(name);
297
		}
298
		return section;
299
	}
300
284
}
301
}

Return to bug 170385