org.eclipse.gmt.umlx.tools
Class AbstractTransformAction

java.lang.Object
  extended by org.eclipse.gmt.umlx.tools.AbstractTransformAction
All Implemented Interfaces:
org.eclipse.ui.IActionDelegate, org.eclipse.ui.IObjectActionDelegate
Direct Known Subclasses:
AtlText2EcoreAction, Umlx2QvtRAction

public abstract class AbstractTransformAction
extends java.lang.Object
implements org.eclipse.ui.IObjectActionDelegate


Field Summary
static java.lang.String TRANSFORM_FILES_TITLE
           
 
Constructor Summary
AbstractTransformAction()
           
 
Method Summary
 java.io.File getOutputFile(org.eclipse.core.runtime.IPath outPath)
          Return an array of all the output files.
 java.io.File[] getOutputFiles(org.eclipse.core.resources.IFile[] inFiles, java.lang.String outFolder, java.lang.String outExtension)
          Return an array of all the output files.
 java.lang.String promptForFile(org.eclipse.core.resources.IFile inputFile, java.lang.String outputExtension, java.lang.String resourceString)
          Return the result of putting up a FileDialog titled by the translation of the resourceString.
 java.lang.String promptForFolder(org.eclipse.core.resources.IFile[] files, java.lang.String resourceString)
          Return the result of putting up a DirectoryDialog titled by the translation of the resourceString.
 void selectionChanged(org.eclipse.jface.action.IAction action, org.eclipse.jface.viewers.ISelection selection)
          Cache notification of the selection.
 void setActivePart(org.eclipse.jface.action.IAction action, org.eclipse.ui.IWorkbenchPart targetPart)
          Cache the shell during configuration.
static void transform(java.io.File outFile, org.eclipse.core.resources.IFile inFile, java.lang.String styleSheet, org.eclipse.core.runtime.IProgressMonitor progressMonitor)
          Apply the styleSheet transform inFile to outFile logging an exception for any problem.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.ui.IActionDelegate
run
 

Field Detail

TRANSFORM_FILES_TITLE

public static final java.lang.String TRANSFORM_FILES_TITLE
See Also:
Constant Field Values
Constructor Detail

AbstractTransformAction

public AbstractTransformAction()
Method Detail

getOutputFile

public java.io.File getOutputFile(org.eclipse.core.runtime.IPath outPath)
Return an array of all the output files.


getOutputFiles

public java.io.File[] getOutputFiles(org.eclipse.core.resources.IFile[] inFiles,
                                     java.lang.String outFolder,
                                     java.lang.String outExtension)
Return an array of all the output files.


promptForFile

public java.lang.String promptForFile(org.eclipse.core.resources.IFile inputFile,
                                      java.lang.String outputExtension,
                                      java.lang.String resourceString)
Return the result of putting up a FileDialog titled by the translation of the resourceString.


promptForFolder

public java.lang.String promptForFolder(org.eclipse.core.resources.IFile[] files,
                                        java.lang.String resourceString)
Return the result of putting up a DirectoryDialog titled by the translation of the resourceString.


selectionChanged

public void selectionChanged(org.eclipse.jface.action.IAction action,
                             org.eclipse.jface.viewers.ISelection selection)
Cache notification of the selection.

Specified by:
selectionChanged in interface org.eclipse.ui.IActionDelegate

setActivePart

public void setActivePart(org.eclipse.jface.action.IAction action,
                          org.eclipse.ui.IWorkbenchPart targetPart)
Cache the shell during configuration.

Specified by:
setActivePart in interface org.eclipse.ui.IObjectActionDelegate

transform

public static void transform(java.io.File outFile,
                             org.eclipse.core.resources.IFile inFile,
                             java.lang.String styleSheet,
                             org.eclipse.core.runtime.IProgressMonitor progressMonitor)
                      throws org.eclipse.core.runtime.CoreException
Apply the styleSheet transform inFile to outFile logging an exception for any problem.

Throws:
org.eclipse.core.runtime.CoreException