initial contribution
[phpeclipse.git] / archive / net.sourceforge.phpeclipse.wiki / src / net / sourceforge / phpeclipse / wiki / editor / action / WeblogWikiAction.java
1 /*******************************************************************************
2  * Copyright (c) 2000, 2004 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials 
4  * are made available under the terms of the Common Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/cpl-v10.html
7  * 
8  * Contributors:
9  *     IBM Corporation - initial API and implementation
10  *******************************************************************************/
11
12 package net.sourceforge.phpeclipse.wiki.editor.action;
13
14 import net.sourceforge.phpeclipse.wiki.editor.WikiEditor;
15 import net.sourceforge.phpeclipse.wiki.editor.WikiEditorPlugin;
16
17 import org.eclipse.ui.texteditor.ITextEditor;
18 import org.eclipse.ui.texteditor.TextEditorAction;
19
20
21 public class WeblogWikiAction extends TextEditorAction {
22                 
23         private boolean fForward;
24         
25         public WeblogWikiAction(String prefix, boolean forward) {
26                 super(WikiEditorPlugin.getDefault().getResourceBundle(), prefix, null);
27         }
28         
29         public void run() {
30
31         }
32         
33         public void setEditor(ITextEditor editor) {
34                 if (editor instanceof WikiEditor) 
35                         super.setEditor(editor);
36                 update();
37         }
38         
39         public void update() {
40                 setEnabled(getTextEditor() instanceof WikiEditor);
41         }
42 }