Skip to main content
summaryrefslogtreecommitdiffstats
blob: cfc086874ae583030f5474bc43f35c10a9eee1e8 (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
package org.eclipse.cdt.internal.ui.editor;

/*
 * (c) Copyright IBM Corp. 2000, 2001.
 * All Rights Reserved.
 */

import org.eclipse.ui.texteditor.ITextEditor;
import org.eclipse.ui.texteditor.TextEditorAction;


public class GotoErrorAction extends TextEditorAction {
	
	
	private boolean fForward;
	
	
	public GotoErrorAction(String prefix, boolean forward) {
		super(CEditorMessages.getResourceBundle(), prefix, null);
		fForward= forward;
	}
	/**
	 * @see Action#run()
	 */
	public void run() {
		CEditor e= (CEditor) getTextEditor();
		e.gotoError(fForward);
	}
	/**
	 * @see TextEditorAction#setEditor(ITextEditor)
	 */
	public void setEditor(ITextEditor editor) {
		if (editor instanceof CEditor) 
			super.setEditor(editor);
	}
	/**
	 * @see TextEditorAction#update()
	 */
	public void update() {
		setEnabled(true);
	}
}

Back to the top