blob: 5bec1c101ba269f6563eb4ba8ff3d27650745f49 (
plain)
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
68
69
70
71
|
/*******************************************************************************
* Copyright (c) 2009 Alena Laskavaia
* 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:
* Alena Laskavaia - initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.codan.ui;
import org.eclipse.cdt.codan.core.CodanRuntime;
import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
import org.eclipse.cdt.internal.ui.editor.CEditor;
import org.eclipse.cdt.internal.ui.text.ICReconcilingListener;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.ui.texteditor.ITextEditor;
/**
* @author Alena
*
*/
public class CodanCReconciler implements ICReconcilingListener {
void install(ITextEditor editor) {
if (editor instanceof CEditor) {
initialize();
((CEditor) editor).addReconcileListener(this);
}
}
void uninstall(ITextEditor editor) {
if (editor instanceof CEditor) {
initialize();
((CEditor) editor).removeReconcileListener(this);
}
}
/**
*
*/
private void initialize() {
// TODO Auto-generated method stub
}
/*
* (non-Javadoc)
*
* @see
* org.eclipse.cdt.internal.ui.text.ICReconcilingListener#aboutToBeReconciled
* ()
*/
public void aboutToBeReconciled() {
// TODO Auto-generated method stub
}
/*
* (non-Javadoc)
*
* @see
* org.eclipse.cdt.internal.ui.text.ICReconcilingListener#reconciled(org
* .eclipse.cdt.core.dom.ast.IASTTranslationUnit, boolean,
* org.eclipse.core.runtime.IProgressMonitor)
*/
public void reconciled(IASTTranslationUnit ast, boolean force,
IProgressMonitor progressMonitor) {
CodanRuntime.getInstance().getAstQuickBuilder().reconcileAst(ast,
progressMonitor);
// System.err.println("ast reconsiled");
}
}
|