org.jtool.jxplatform.actions
Class JxActionDelegate

java.lang.Object
  extended byorg.jtool.jxplatform.actions.JxActionDelegate
All Implemented Interfaces:
org.eclipse.ui.IActionDelegate
Direct Known Subclasses:
JxEditorActionDelegate, JxProjectActionDelegate

public abstract class JxActionDelegate
extends java.lang.Object
implements org.eclipse.ui.IActionDelegate

The implementation of an interface for actions contributed via an extension point.


Field Summary
protected  org.eclipse.jface.viewers.ISelection selection
          A selection underlying this editor.
 
Constructor Summary
protected JxActionDelegate()
          Creates an empty object.
 
Method Summary
protected  org.eclipse.core.resources.IFile getFile(org.eclipse.ui.IEditorPart part)
          Returns a file resource underlying this editor.
protected  org.eclipse.swt.widgets.Shell getShell(org.eclipse.ui.IEditorPart part)
          Returns a shell in which this editor site resides.
protected  org.eclipse.swt.widgets.Shell getShell(org.eclipse.ui.IWorkbenchPart part)
          Returns a shell in which this editor site resides.
protected  void printMessage(org.eclipse.ui.IEditorPart part, java.lang.String msg)
          Displays a message on a dialog for this editor.
protected  void printMessage(org.eclipse.ui.IWorkbenchPart part, java.lang.String msg)
          Displays a message on a dialog for this editor.
 void selectionChanged(org.eclipse.jface.action.IAction action, org.eclipse.jface.viewers.ISelection selection)
          Notifies a given action delegate that the selection in the workbench has changed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.ui.IActionDelegate
run
 

Field Detail

selection

protected org.eclipse.jface.viewers.ISelection selection
A selection underlying this editor.

Constructor Detail

JxActionDelegate

protected JxActionDelegate()
Creates an empty object.

Method Detail

selectionChanged

public void selectionChanged(org.eclipse.jface.action.IAction action,
                             org.eclipse.jface.viewers.ISelection selection)
Notifies a given action delegate that the selection in the workbench has changed.

Specified by:
selectionChanged in interface org.eclipse.ui.IActionDelegate
Parameters:
action - An action triggered by the user.
selection - A current selection, or null if no selection is found.

getFile

protected org.eclipse.core.resources.IFile getFile(org.eclipse.ui.IEditorPart part)
Returns a file resource underlying this editor.

Parameters:
part - An editor.
Returns:
The file resource.

getShell

protected org.eclipse.swt.widgets.Shell getShell(org.eclipse.ui.IEditorPart part)
Returns a shell in which this editor site resides.

Parameters:
part - An editor.
Returns:
The shell.

getShell

protected org.eclipse.swt.widgets.Shell getShell(org.eclipse.ui.IWorkbenchPart part)
Returns a shell in which this editor site resides.

Parameters:
part - A workbench.
Returns:
The shell.

printMessage

protected void printMessage(org.eclipse.ui.IEditorPart part,
                            java.lang.String msg)
Displays a message on a dialog for this editor.

Parameters:
part - An editor.
msg - The message.

printMessage

protected void printMessage(org.eclipse.ui.IWorkbenchPart part,
                            java.lang.String msg)
Displays a message on a dialog for this editor.

Parameters:
part - A workbench.
msg - The message.