Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: f7af2eaae1fa7fb2f2e04d39c6dd2b641d331998 (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
/*******************************************************************************
 *  Copyright (c) 2017, 2018 Angelo ZERR.
 *
 *  This program and the accompanying materials
 *  are made available under the terms of the Eclipse Public License 2.0
 *  which accompanies this distribution, and is available at
 *  https://www.eclipse.org/legal/epl-2.0/
 *
 *  SPDX-License-Identifier: EPL-2.0
 *
 *  Contributors:
 *  Angelo Zerr <angelo.zerr@gmail.com> - [CodeMining] Add CodeMining support in SourceViewer - Bug 527515
 *******************************************************************************/
package org.eclipse.jface.text.source;

import org.eclipse.jface.text.codemining.ICodeMining;
import org.eclipse.jface.text.codemining.ICodeMiningProvider;

/**
 * Extension interface for {@link org.eclipse.jface.text.source.ISourceViewer}.
 * <p>
 * It introduces API to access a minimal set of code mining APIs.
 * </p>
 *
 * @see ICodeMining
 * @see ICodeMiningProvider
 * @since 3.13
 */
public interface ISourceViewerExtension5 {

	/**
	 * Set the {@link AnnotationPainter} to use to draw code minings.
	 *
	 * @param painter the {@link AnnotationPainter} to use to draw code minings.
	 */
	void setCodeMiningAnnotationPainter(AnnotationPainter painter);

	/**
	 * Register the code mining providers.
	 *
	 * @param codeMiningProviders the code mining providers to register.
	 */
	void setCodeMiningProviders(ICodeMiningProvider[] codeMiningProviders);

	/**
	 * Returns <code>true</code> if there are code mining providers and <code>false</code>
	 * otherwise.
	 *
	 * @return <code>true</code> if there are code mining providers and <code>false</code>
	 *         otherwise.
	 */
	boolean hasCodeMiningProviders();

	/**
	 * Update the code minings.
	 *
	 * Clients and implementors are responsible of calling this method when needed. A typical
	 * use-case can be to run it upon completion of a reconcilier and after a job that would compute
	 * all the necessary pre-requisites to insert code mining annotations.
	 */
	void updateCodeMinings();

}

Back to the top