org.eclipse.m2m.atl.adt.ui.wizard.atlplugin
Class AtlPluginCreator

java.lang.Object
  extended by org.eclipse.jface.wizard.Wizard
      extended by org.eclipse.m2m.atl.adt.ui.wizard.atlplugin.AtlPluginCreator
All Implemented Interfaces:
org.eclipse.core.runtime.IExecutableExtension, org.eclipse.jface.wizard.IWizard, org.eclipse.ui.INewWizard, org.eclipse.ui.IWorkbenchWizard

public class AtlPluginCreator
extends org.eclipse.jface.wizard.Wizard
implements org.eclipse.ui.INewWizard, org.eclipse.core.runtime.IExecutableExtension

The ATL plugin creation wizard.


Field Summary
protected  org.eclipse.core.runtime.IConfigurationElement configElement
           
protected  org.eclipse.ui.dialogs.WizardNewProjectCreationPage newProjectPage
           
protected  AtlPluginScreen parametersPage
           
 
Fields inherited from class org.eclipse.jface.wizard.Wizard
DEFAULT_IMAGE
 
Constructor Summary
AtlPluginCreator()
          Constructor.
 
Method Summary
 void addPages()
          
 boolean canFinish()
          
 void convert(org.eclipse.core.resources.IProject project, CreatePluginData pluginData, org.eclipse.core.runtime.IProgressMonitor monitor)
          Converts the given project to ATL Plugin project.
static void copyAtlFile(org.eclipse.core.resources.IProject project, org.eclipse.core.resources.IFile fileToCopy, org.eclipse.core.runtime.IPath targetDirRelativePath, org.eclipse.core.runtime.IProgressMonitor monitor)
          Copies an ATL file: in case of a .asm, attempt to copy the .atl instead if present.
static void copyFile(org.eclipse.core.resources.IProject project, org.eclipse.core.resources.IFile fileToCopy, org.eclipse.core.runtime.IPath targetDirRelativePath, org.eclipse.core.runtime.IProgressMonitor monitor)
          Copies a file.
static void createFile(org.eclipse.core.resources.IProject project, org.eclipse.core.runtime.IPath projectRelativePath, java.lang.String content, org.eclipse.core.runtime.IProgressMonitor monitor)
          Creates a file and its content.
 org.eclipse.ui.dialogs.WizardNewProjectCreationPage getNewProjectPage()
           
 AtlPluginScreen getParametersPage()
           
 void init(org.eclipse.ui.IWorkbench workbench, org.eclipse.jface.viewers.IStructuredSelection s)
          
 boolean performFinish()
          
 void setInitializationData(org.eclipse.core.runtime.IConfigurationElement config, java.lang.String propertyName, java.lang.Object data)
          
 
Methods inherited from class org.eclipse.jface.wizard.Wizard
addPage, createPageControls, dispose, getContainer, getDefaultPageImage, getDialogSettings, getNextPage, getPage, getPageCount, getPages, getPreviousPage, getShell, getStartingPage, getTitleBarColor, getWindowTitle, isHelpAvailable, needsPreviousAndNextButtons, needsProgressMonitor, performCancel, setContainer, setDefaultPageImageDescriptor, setDialogSettings, setForcePreviousAndNextButtons, setHelpAvailable, setNeedsProgressMonitor, setTitleBarColor, setWindowTitle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.jface.wizard.IWizard
createPageControls, dispose, getContainer, getDefaultPageImage, getDialogSettings, getNextPage, getPage, getPageCount, getPages, getPreviousPage, getStartingPage, getTitleBarColor, getWindowTitle, isHelpAvailable, needsPreviousAndNextButtons, needsProgressMonitor, performCancel, setContainer
 

Field Detail

newProjectPage

protected org.eclipse.ui.dialogs.WizardNewProjectCreationPage newProjectPage

parametersPage

protected AtlPluginScreen parametersPage

configElement

protected org.eclipse.core.runtime.IConfigurationElement configElement
Constructor Detail

AtlPluginCreator

public AtlPluginCreator()
Constructor.

Method Detail

getNewProjectPage

public org.eclipse.ui.dialogs.WizardNewProjectCreationPage getNewProjectPage()

getParametersPage

public AtlPluginScreen getParametersPage()

addPages

public void addPages()

Specified by:
addPages in interface org.eclipse.jface.wizard.IWizard
Overrides:
addPages in class org.eclipse.jface.wizard.Wizard
See Also:
Wizard.addPages()

init

public void init(org.eclipse.ui.IWorkbench workbench,
                 org.eclipse.jface.viewers.IStructuredSelection s)

Specified by:
init in interface org.eclipse.ui.IWorkbenchWizard
See Also:
IWorkbenchWizard.init(org.eclipse.ui.IWorkbench, org.eclipse.jface.viewers.IStructuredSelection)

setInitializationData

public void setInitializationData(org.eclipse.core.runtime.IConfigurationElement config,
                                  java.lang.String propertyName,
                                  java.lang.Object data)
                           throws org.eclipse.core.runtime.CoreException

Specified by:
setInitializationData in interface org.eclipse.core.runtime.IExecutableExtension
Throws:
org.eclipse.core.runtime.CoreException
See Also:
IExecutableExtension.setInitializationData(org.eclipse.core.runtime.IConfigurationElement, java.lang.String, java.lang.Object)

canFinish

public boolean canFinish()

Specified by:
canFinish in interface org.eclipse.jface.wizard.IWizard
Overrides:
canFinish in class org.eclipse.jface.wizard.Wizard
See Also:
Wizard.canFinish()

performFinish

public boolean performFinish()

Specified by:
performFinish in interface org.eclipse.jface.wizard.IWizard
Specified by:
performFinish in class org.eclipse.jface.wizard.Wizard
See Also:
Wizard.performFinish()

convert

public void convert(org.eclipse.core.resources.IProject project,
                    CreatePluginData pluginData,
                    org.eclipse.core.runtime.IProgressMonitor monitor)
Converts the given project to ATL Plugin project.

Parameters:
project - is the project to convert
pluginData - is the class used to configure all the JET generations
monitor - is the monitor

createFile

public static void createFile(org.eclipse.core.resources.IProject project,
                              org.eclipse.core.runtime.IPath projectRelativePath,
                              java.lang.String content,
                              org.eclipse.core.runtime.IProgressMonitor monitor)
Creates a file and its content.

Parameters:
project - is the project
projectRelativePath - is the path of the file to create, relative to the project
content - is the content of the new file
monitor - is the monitor

copyAtlFile

public static void copyAtlFile(org.eclipse.core.resources.IProject project,
                               org.eclipse.core.resources.IFile fileToCopy,
                               org.eclipse.core.runtime.IPath targetDirRelativePath,
                               org.eclipse.core.runtime.IProgressMonitor monitor)
Copies an ATL file: in case of a .asm, attempt to copy the .atl instead if present.

Parameters:
project - the current project
fileToCopy - is the file
targetDirRelativePath - is the path of the copy
monitor - is the monitor

copyFile

public static void copyFile(org.eclipse.core.resources.IProject project,
                            org.eclipse.core.resources.IFile fileToCopy,
                            org.eclipse.core.runtime.IPath targetDirRelativePath,
                            org.eclipse.core.runtime.IProgressMonitor monitor)
Copies a file.

Parameters:
project - the current project
fileToCopy - is the file
targetDirRelativePath - is the path of the copy
monitor - is the monitor

Copyright 2007 IBM Corporation and others.
All Rights Reserved.