comparison dwtx/jface/text/contentassist/ContentAssistEvent.d @ 129:eb30df5ca28b

Added JFace Text sources
author Frank Benoit <benoit@tionex.de>
date Sat, 23 Aug 2008 19:10:48 +0200
parents
children c4fb132a086c
comparison
equal deleted inserted replaced
128:8df1d4193877 129:eb30df5ca28b
1 /*******************************************************************************
2 * Copyright (c) 2005, 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 * Anton Leherbauer (Wind River Systems) - [content assist][api] ContentAssistEvent should contain information about auto activation - https://bugs.eclipse.org/bugs/show_bug.cgi?id=193728
11 * Port to the D programming language:
12 * Frank Benoit <benoit@tionex.de>
13 *******************************************************************************/
14 module dwtx.jface.text.contentassist.ContentAssistEvent;
15
16 import dwt.dwthelper.utils;
17
18
19 /**
20 * Describes the state that the content assistant is in when completing proposals.
21 * <p>
22 * Clients may use this class.
23 * </p>
24 *
25 * @since 3.2
26 * @see ICompletionListener
27 * @noinstantiate This class is not intended to be instantiated by clients.
28 */
29 public final class ContentAssistEvent {
30 /**
31 * Creates a new event.
32 *
33 * @param ca the assistant
34 * @param proc the processor
35 * @param isAutoActivated whether content assist was triggered by auto activation
36 * @since 3.4
37 */
38 ContentAssistEvent(IContentAssistant ca, IContentAssistProcessor proc, bool isAutoActivated) {
39 assistant= ca;
40 processor= proc;
41 this.isAutoActivated= isAutoActivated;
42 }
43
44 /**
45 * Creates a new event.
46 *
47 * @param ca the assistant
48 * @param proc the processor
49 */
50 ContentAssistEvent(ContentAssistant ca, IContentAssistProcessor proc) {
51 this(ca, proc, false);
52 }
53
54 /**
55 * The content assistant computing proposals.
56 */
57 public final IContentAssistant assistant;
58 /**
59 * The processor for the current partition.
60 */
61 public final IContentAssistProcessor processor;
62 /**
63 * Tells, whether content assist was triggered by auto activation.
64 * <p>
65 * <strong>Note:</strong> This flag is only valid in {@link ICompletionListener#assistSessionStarted(ContentAssistEvent)}.
66 * </p>
67 *
68 * @since 3.4
69 */
70 public final bool isAutoActivated;
71 }