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
|
|
15 import dwt.dwthelper.utils;
|
|
16
|
|
17
|
|
18 import dwtx.core.commands.IHandler;
|
|
19 import dwtx.jface.text.contentassist.ICompletionProposalExtension6;
|
|
20
|
|
21
|
|
22 /**
|
|
23 * Extends {@link IQuickAssistAssistant} with the following function:
|
|
24 * <ul>
|
|
25 * <li>allows to get a handler for the given command identifier</li>
|
|
26 * <li>allows to enable support for colored labels in the proposal popup</li>
|
|
27 * </ul>
|
|
28 *
|
|
29 * @since 3.4
|
|
30 */
|
|
31 public interface IQuickAssistAssistantExtension {
|
|
32
|
|
33 /**
|
|
34 * Returns the handler for the given command identifier.
|
|
35 * <p>
|
|
36 * The same handler instance will be returned when called a more than once
|
|
37 * with the same command identifier.
|
|
38 * </p>
|
|
39 *
|
|
40 * @param commandId the command identifier
|
|
41 * @return the handler for the given command identifier
|
|
42 * @throws IllegalArgumentException if the command is not supported by this
|
|
43 * content assistant
|
|
44 * @throws IllegalStateException if called when this content assistant is
|
|
45 * uninstalled
|
|
46 */
|
|
47 IHandler getHandler(String commandId);
|
|
48
|
|
49 /**
|
|
50 * Enables the support for colored labels in the proposal popup.
|
|
51 * <p>Completion proposals can implement {@link ICompletionProposalExtension6}
|
|
52 * to provide colored proposal labels.</p>
|
|
53 *
|
|
54 * @param isEnabled if <code>true</code> the support for colored labels is enabled in the proposal popup
|
|
55 * @since 3.4
|
|
56 */
|
|
57 void enableColoredLabels(bool isEnabled);
|
|
58
|
|
59 }
|