com.alveole.studio.web.wizard
Class ImportStruts2FileWizard

java.lang.Object
  extended by org.eclipse.jface.wizard.Wizard
      extended by com.alveole.studio.web.wizard.ImportStruts2FileWizard
All Implemented Interfaces:
org.eclipse.jface.wizard.IWizard, org.eclipse.ui.IImportWizard, org.eclipse.ui.IWorkbenchWizard

public class ImportStruts2FileWizard
extends org.eclipse.jface.wizard.Wizard
implements org.eclipse.ui.IImportWizard

This class is a wizard that imports Struts2 files to ASWP files.

Author:
sylvain

Field Summary
 
Fields inherited from class org.eclipse.jface.wizard.Wizard
DEFAULT_IMAGE
 
Constructor Summary
ImportStruts2FileWizard()
           
 
Method Summary
 void addPages()
          Constructs the single page wizard.
 boolean canFinish()
          Check if wizard can finish: simply check if selected source file exists and if target file path is valid.
 void init(org.eclipse.ui.IWorkbench workbench, org.eclipse.jface.viewers.IStructuredSelection selection)
          Init wizard.
protected  org.w3c.dom.Document loadStrutsFile(javax.xml.parsers.DocumentBuilderFactory factory, org.eclipse.core.resources.IFile file)
          Loads a struts2 file and merge its includes.
protected  void mergeDoc(org.w3c.dom.Element source, org.w3c.dom.Element target)
          Takes contents of "source" and copies it to "target".
 boolean performFinish()
          Loads struts file and apply xslt transform to produce target file.
 
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
 

Constructor Detail

ImportStruts2FileWizard

public ImportStruts2FileWizard()
Method Detail

addPages

public void addPages()
Constructs the single page wizard.

Specified by:
addPages in interface org.eclipse.jface.wizard.IWizard
Overrides:
addPages in class org.eclipse.jface.wizard.Wizard

canFinish

public boolean canFinish()
Check if wizard can finish: simply check if selected source file exists and if target file path is valid.

Specified by:
canFinish in interface org.eclipse.jface.wizard.IWizard
Overrides:
canFinish in class org.eclipse.jface.wizard.Wizard

init

public void init(org.eclipse.ui.IWorkbench workbench,
                 org.eclipse.jface.viewers.IStructuredSelection selection)
Init wizard.

Specified by:
init in interface org.eclipse.ui.IWorkbenchWizard

mergeDoc

protected void mergeDoc(org.w3c.dom.Element source,
                        org.w3c.dom.Element target)
Takes contents of "source" and copies it to "target".

Parameters:
source -
target -

loadStrutsFile

protected org.w3c.dom.Document loadStrutsFile(javax.xml.parsers.DocumentBuilderFactory factory,
                                              org.eclipse.core.resources.IFile file)
                                       throws java.lang.Exception
Loads a struts2 file and merge its includes.

Throws:
java.lang.Exception

performFinish

public boolean performFinish()
Loads struts file and apply xslt transform to produce target file.

Specified by:
performFinish in interface org.eclipse.jface.wizard.IWizard
Specified by:
performFinish in class org.eclipse.jface.wizard.Wizard