org.openoffice.ide.eclipse.core.wizards.pages
Class NewUnoFilePage

java.lang.Object
  extended by org.eclipse.jface.dialogs.DialogPage
      extended by org.eclipse.jface.wizard.WizardPage
          extended by org.eclipse.ui.dialogs.WizardNewFileCreationPage
              extended by org.openoffice.ide.eclipse.core.wizards.pages.NewUnoFilePage
All Implemented Interfaces:
org.eclipse.jface.dialogs.IDialogPage, org.eclipse.jface.dialogs.IMessageProvider, org.eclipse.jface.wizard.IWizardPage, org.eclipse.swt.widgets.Listener

public class NewUnoFilePage
extends org.eclipse.ui.dialogs.WizardNewFileCreationPage

Simple Uno file creation page, this wizard will be removed when all the UNO types will have their own wizard.

Author:
cedricbosdo

Field Summary
 
Fields inherited from interface org.eclipse.jface.dialogs.IMessageProvider
ERROR, INFORMATION, NONE, WARNING
 
Constructor Summary
NewUnoFilePage(java.lang.String pPageName, org.eclipse.jface.viewers.IStructuredSelection pSelection)
          Constructor.
 
Method Summary
 boolean canFlipToNextPage()
          
static boolean createUnoidlFile(org.eclipse.core.resources.IFolder pFolder, java.lang.String pFilename)
          This method help creating a new unoidl file with it's basic content.
static boolean createUnoidlFile(org.eclipse.core.resources.IFolder pFolder, java.lang.String pFilename, org.eclipse.ui.IWorkbench pWorkbench)
          This method help creating a new unoidl file with it's basic content.
 
Methods inherited from class org.eclipse.ui.dialogs.WizardNewFileCreationPage
createAdvancedControls, createControl, createFile, createFileHandle, createLinkTarget, createNewFile, createRule, getContainerFullPath, getFileExtension, getFileName, getInitialContents, getNewFileLabel, handleAdvancedButtonSelect, handleEvent, initialPopulateContainerNameField, setAllowExistingResources, setContainerFullPath, setFileExtension, setFileName, setVisible, validateLinkedResource, validatePage
 
Methods inherited from class org.eclipse.jface.wizard.WizardPage
getContainer, getDialogSettings, getImage, getName, getNextPage, getPreviousPage, getShell, getWizard, isCurrentPage, isPageComplete, setDescription, setErrorMessage, setImageDescriptor, setMessage, setPageComplete, setPreviousPage, setTitle, setWizard, toString
 
Methods inherited from class org.eclipse.jface.dialogs.DialogPage
convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, dispose, getControl, getDescription, getDialogFontName, getErrorMessage, getFont, getMessage, getMessageType, getTitle, getToolTipText, initializeDialogUnits, isControlCreated, performHelp, setButtonLayoutData, setControl, setMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.jface.dialogs.IDialogPage
dispose, getControl, getDescription, getErrorMessage, getMessage, getTitle, performHelp
 

Constructor Detail

NewUnoFilePage

public NewUnoFilePage(java.lang.String pPageName,
                      org.eclipse.jface.viewers.IStructuredSelection pSelection)
Constructor.

Parameters:
pPageName - the page name
pSelection - the selection where to create the IDL file
Method Detail

canFlipToNextPage

public boolean canFlipToNextPage()

Specified by:
canFlipToNextPage in interface org.eclipse.jface.wizard.IWizardPage
Overrides:
canFlipToNextPage in class org.eclipse.jface.wizard.WizardPage

createUnoidlFile

public static boolean createUnoidlFile(org.eclipse.core.resources.IFolder pFolder,
                                       java.lang.String pFilename)
This method help creating a new unoidl file with it's basic content. The unoidl file can be created only if it's parent is unoidl capable and if the file name ends with .idl.

Parameters:
pFolder - parent folder where to put the unoidl file
pFilename - name of the file to create
Returns:
true if the creation succeeded, false otherwise.

createUnoidlFile

public static boolean createUnoidlFile(org.eclipse.core.resources.IFolder pFolder,
                                       java.lang.String pFilename,
                                       org.eclipse.ui.IWorkbench pWorkbench)
This method help creating a new unoidl file with it's basic content. The unoidl file can be created only if it's parent is unoidl capable and if the file name ends with .idl. After the file creation, the file is edited with the unoidl file editor

Parameters:
pFolder - parent folder where to put the unoidl file
pFilename - name of the file to create
pWorkbench - worbench where to launch the editor
Returns:
true if the creation succeeded, false otherwise.