org.jtool.jxplatform.actions
Class JxEditorActionDelegate

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

public class JxEditorActionDelegate
extends JxActionDelegate
implements org.eclipse.ui.IEditorActionDelegate

Performs an editor action.

Author:
Katsuhisa Maruyama

Field Summary
protected  org.eclipse.core.resources.IFile file
          A file resource underlying this editor.
protected  org.eclipse.ui.IEditorPart part
          An editor target.
protected  JxProjectRepository repository
          A project's repository that stores information about the Java-XML compilation unit of a source file.
protected  JxCompilationUnit unit
          A Java-XML compilation unit that contains the XML document of a source file.
 
Fields inherited from class org.jtool.jxplatform.actions.JxActionDelegate
selection
 
Constructor Summary
JxEditorActionDelegate()
          Creates a new object.
 
Method Summary
 void run(org.eclipse.jface.action.IAction action)
          Creates an XML document from Java source file underlying this editor.
 void setActiveEditor(org.eclipse.jface.action.IAction action, org.eclipse.ui.IEditorPart targetEditor)
          Sets an active editor for the delegate.
 
Methods inherited from class org.jtool.jxplatform.actions.JxActionDelegate
getFile, getShell, getShell, printMessage, printMessage, selectionChanged
 
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
selectionChanged
 

Field Detail

part

protected org.eclipse.ui.IEditorPart part
An editor target.


file

protected org.eclipse.core.resources.IFile file
A file resource underlying this editor.


repository

protected JxProjectRepository repository
A project's repository that stores information about the Java-XML compilation unit of a source file.


unit

protected JxCompilationUnit unit
A Java-XML compilation unit that contains the XML document of a source file.

Constructor Detail

JxEditorActionDelegate

public JxEditorActionDelegate()
Creates a new object.

Method Detail

setActiveEditor

public void setActiveEditor(org.eclipse.jface.action.IAction action,
                            org.eclipse.ui.IEditorPart targetEditor)
Sets an active editor for the delegate.

Specified by:
setActiveEditor in interface org.eclipse.ui.IEditorActionDelegate
Parameters:
action - An action triggered by the user.
targetEditor - A new editor target.

run

public void run(org.eclipse.jface.action.IAction action)
Creates an XML document from Java source file underlying this editor. This method is usually called by subclasses before performing their processes.

Specified by:
run in interface org.eclipse.ui.IActionDelegate
Parameters:
action - An action triggered by the user.