PovClipseEditorActionDeligate.java from PovClipse at Krugle
Show PovClipseEditorActionDeligate.java syntax highlighted
/*
* PovClipse - Eclipse plugin for editing and rendering Povray sceene files.
* Copyright (C) 2006-2007 Wolfgang Moestl wmoestl@web.de
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
package com.wm.povclipse.editors;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.IWorkbenchWindowActionDelegate;
import com.wm.povclipse.editors.actions.ToggleCommentAction;
/**
* Action deligator, calls the corresponding action.
* @author Wolfgang Möstl
*/
public class PovClipseEditorActionDeligate implements IWorkbenchWindowActionDelegate {
/**
* Constructor.
*/
public PovClipseEditorActionDeligate() {
}
/* (non-Javadoc)
* @see org.eclipse.ui.IWorkbenchWindowActionDelegate#dispose()
*/
public void dispose() {
// do nothing
}
/* (non-Javadoc)
* @see org.eclipse.ui.IWorkbenchWindowActionDelegate#init(org.eclipse.ui.IWorkbenchWindow)
*/
public void init(IWorkbenchWindow window) {
}
/* (non-Javadoc)
* @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
*/
public void run(IAction action) {
if ("com.wm.povclipse.editor.binding.comment".equals(action.getId())) {
ToggleCommentAction toggleAction = new ToggleCommentAction();
toggleAction.run();
}
}
/* (non-Javadoc)
* @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
*/
public void selectionChanged(IAction action, ISelection selection) {
// System.out.println("======= selectionChanged: " + action.getId() + "|" + action.getText() + ", selection:" + selection.toString());
}
/*
public void run(IAction action) {
System.out.println("======= ACTION: " + action.getId() + "|" + action.getText());
}
public void init(IAction action) {
System.out.println("PovClipseEditorActionDeligate: init");
}
public void runWithEvent(IAction action, Event event) {
System.out.println("PovClipseEditorActionDeligate: runWithEvent");
}
public void selectionChanged(IAction action, ISelection selection) {
System.out.println("PovClipseEditorActionDeligate: selectionChanged");
}
*/
}
See more files for this project here