129
|
1 /*******************************************************************************
|
|
2 * Copyright (c) 2007, 2008 IBM Corporation and others.
|
|
3 * All rights reserved. This program and the accompanying materials
|
|
4 * are made available under the terms of the Eclipse Public License v1.0
|
|
5 * which accompanies this distribution, and is available at
|
|
6 * http://www.eclipse.org/legal/epl-v10.html
|
|
7 *
|
|
8 * Contributors:
|
|
9 * IBM Corporation - initial API and implementation
|
|
10 * Port to the D programming language:
|
|
11 * Frank Benoit <benoit@tionex.de>
|
|
12 *******************************************************************************/
|
|
13 module dwtx.jface.text.quickassist.IQuickAssistAssistantExtension;
|
|
14
|
131
|
15 import dwtx.jface.text.quickassist.QuickAssistAssistant; // packageimport
|
|
16 import dwtx.jface.text.quickassist.IQuickAssistAssistant; // packageimport
|
|
17 import dwtx.jface.text.quickassist.IQuickAssistInvocationContext; // packageimport
|
|
18 import dwtx.jface.text.quickassist.IQuickFixableAnnotation; // packageimport
|
|
19 import dwtx.jface.text.quickassist.IQuickAssistProcessor; // packageimport
|
|
20
|
|
21
|
129
|
22 import dwt.dwthelper.utils;
|
|
23
|
|
24
|
|
25 import dwtx.core.commands.IHandler;
|
|
26 import dwtx.jface.text.contentassist.ICompletionProposalExtension6;
|
|
27
|
|
28
|
|
29 /**
|
|
30 * Extends {@link IQuickAssistAssistant} with the following function:
|
|
31 * <ul>
|
|
32 * <li>allows to get a handler for the given command identifier</li>
|
|
33 * <li>allows to enable support for colored labels in the proposal popup</li>
|
|
34 * </ul>
|
|
35 *
|
|
36 * @since 3.4
|
|
37 */
|
|
38 public interface IQuickAssistAssistantExtension {
|
|
39
|
|
40 /**
|
|
41 * Returns the handler for the given command identifier.
|
|
42 * <p>
|
|
43 * The same handler instance will be returned when called a more than once
|
|
44 * with the same command identifier.
|
|
45 * </p>
|
|
46 *
|
|
47 * @param commandId the command identifier
|
|
48 * @return the handler for the given command identifier
|
|
49 * @throws IllegalArgumentException if the command is not supported by this
|
|
50 * content assistant
|
|
51 * @throws IllegalStateException if called when this content assistant is
|
|
52 * uninstalled
|
|
53 */
|
|
54 IHandler getHandler(String commandId);
|
|
55
|
|
56 /**
|
|
57 * Enables the support for colored labels in the proposal popup.
|
|
58 * <p>Completion proposals can implement {@link ICompletionProposalExtension6}
|
|
59 * to provide colored proposal labels.</p>
|
|
60 *
|
|
61 * @param isEnabled if <code>true</code> the support for colored labels is enabled in the proposal popup
|
|
62 * @since 3.4
|
|
63 */
|
|
64 void enableColoredLabels(bool isEnabled);
|
|
65
|
|
66 }
|