Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 749c471631ea61ae1c9cd728151113b521edbec9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/*******************************************************************************
 * Copyright (c) 2005, 2008 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *     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
 *******************************************************************************/
package org.eclipse.jface.text.contentassist;


/**
 * Describes the state that the content assistant is in when completing proposals.
 * <p>
 * Clients may use this class.
 * </p>
 *
 * @since 3.2
 * @see ICompletionListener
 * @noinstantiate This class is not intended to be instantiated by clients.
 */
public final class ContentAssistEvent {
	/**
	 * Creates a new event.
	 *
	 * @param ca the assistant
	 * @param proc the processor
	 * @param isAutoActivated whether content assist was triggered by auto activation
	 * @since 3.4
	 */
	ContentAssistEvent(IContentAssistant ca, IContentAssistProcessor proc, boolean isAutoActivated) {
		assistant= ca;
		processor= proc;
		this.isAutoActivated= isAutoActivated;
	}

	/**
	 * Creates a new event.
	 *
	 * @param ca the assistant
	 * @param proc the processor
	 */
	ContentAssistEvent(ContentAssistant ca, IContentAssistProcessor proc) {
		this(ca, proc, false);
	}

	/**
	 * The content assistant computing proposals.
	 */
	public final IContentAssistant assistant;
	/**
	 * The processor for the current partition.
	 */
	public final IContentAssistProcessor processor;
	/**
	 * Tells, whether content assist was triggered by auto activation.
	 * <p>
	 * <strong>Note:</strong> This flag is only valid in {@link ICompletionListener#assistSessionStarted(ContentAssistEvent)}.
	 * </p>
	 *
	 * @since 3.4
	 */
	public final boolean isAutoActivated;
}

Back to the top