public abstract class NewScopedElementWizardPage extends org.eclipse.jface.wizard.WizardPage implements IFieldChangedListener, IListenablePage
| Constructor and Description |
|---|
NewScopedElementWizardPage(java.lang.String pName)
Default constructor to use when neither the project nor the OOo instance is known.
|
NewScopedElementWizardPage(java.lang.String pPageName,
IOOo pOOoInstance)
Creates a default scoped name type wizard page with blank container path and type name.
|
NewScopedElementWizardPage(java.lang.String pPageName,
IUnoidlProject pUnoProject)
Constructor to use when the UNO project is already created.
|
NewScopedElementWizardPage(java.lang.String pPageName,
IUnoidlProject pProject,
java.lang.String pRootName,
java.lang.String pElementName)
Constructor to use when the UNO project is already created, the scoped type name and it's path already known.
|
NewScopedElementWizardPage(java.lang.String pPageName,
java.lang.String pRootName,
java.lang.String pElementName,
IOOo pOOoInstance)
Constructor to use when the UNO project is already created, the scoped type name and it's path already known.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addPageListener(IPageListener pListener)
Add the page listener.
|
void |
createControl(org.eclipse.swt.widgets.Composite pParent) |
protected abstract void |
createSpecificControl(org.eclipse.swt.widgets.Composite pParent)
Implement this method to add specific controls for the subclassing wizard page.
|
void |
dispose() |
static boolean |
existsIdlFile(java.lang.String pIdlFullName,
IUnoidlProject pPrj)
Checks if an IDL file exists in the project for a given IDL type.
|
void |
fieldChanged(FieldEvent pEvent)
Method called when the row has changed.
|
UnoFactoryData |
fillData(UnoFactoryData pData) |
protected void |
firePageChanged(UnoFactoryData pData)
Notifies all the page listeners that the pages data have changed.
|
java.lang.String |
getElementName() |
abstract UnoFactoryData |
getEmptyTypeData()
Creates an empty factory data for the page UNO type.
|
protected abstract org.eclipse.jface.resource.ImageDescriptor |
getImageDescriptor() |
java.lang.String |
getPackage() |
java.lang.String |
getPackageRoot() |
IUnoidlProject |
getProject() |
abstract int |
getProvidedTypes() |
static UnoFactoryData |
getTypeData(UnoFactoryData pData) |
protected abstract java.lang.String |
getTypeLabel() |
boolean |
isPageComplete() |
boolean |
isPublished() |
void |
removePageListener(IPageListener pListener)
Remove the page listener.
|
void |
setName(java.lang.String pValue,
boolean pForced)
Sets the name of the element to create.
|
void |
setOOoInstance(IOOo pOOoInstance)
Set the OOo instance to query the types from.
|
void |
setPackage(java.lang.String pValue,
boolean pForced)
the container name of the type to create is composed of two parts: the package root and the package.
|
void |
setPackageRoot(java.lang.String pValue)
The container name of the type to create is composed of two parts: the package root and the package; this method
sets the first part.
|
void |
setPublished(boolean pValue,
boolean pForced)
Sets whether the type is published or not.
|
void |
setUnoidlProject(IUnoidlProject pUnoProject)
Sets the UNO project in which to create the scoped name type.
|
void |
setVisible(boolean pVisible) |
canFlipToNextPage, getContainer, getDialogSettings, getImage, getName, getNextPage, getPreviousPage, getShell, getWizard, isCurrentPage, setDescription, setErrorMessage, setImageDescriptor, setMessage, setPageComplete, setPreviousPage, setTitle, setWizard, toStringconvertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, getControl, getDescription, getDialogFontName, getErrorMessage, getFont, getMessage, getMessageType, getTitle, getToolTipText, initializeDialogUnits, isControlCreated, performHelp, setButtonLayoutData, setControl, setMessagepublic NewScopedElementWizardPage(java.lang.String pName)
pName - wizard page namepublic NewScopedElementWizardPage(java.lang.String pPageName,
IUnoidlProject pUnoProject)
pPageName - name of the pagepUnoProject - UNO project in which to create a scoped typepublic NewScopedElementWizardPage(java.lang.String pPageName,
IUnoidlProject pProject,
java.lang.String pRootName,
java.lang.String pElementName)
pPageName - name of the wizard pagepProject - UNO project in which to create a scoped typepRootName - scoped name of the module containing the typepElementName - name of the type, without any '.' or '::'public NewScopedElementWizardPage(java.lang.String pPageName,
IOOo pOOoInstance)
pPageName - name of the wizard pagepOOoInstance - the OOo instance to use to retrieve the typespublic NewScopedElementWizardPage(java.lang.String pPageName,
java.lang.String pRootName,
java.lang.String pElementName,
IOOo pOOoInstance)
pPageName - name of the wizard pagepRootName - scoped name of the module containing the typepElementName - name of the type, without any '.' or '::'pOOoInstance - the reference to the OOo to use for type selectionpublic IUnoidlProject getProject()
protected abstract java.lang.String getTypeLabel()
protected abstract org.eclipse.jface.resource.ImageDescriptor getImageDescriptor()
protected abstract void createSpecificControl(org.eclipse.swt.widgets.Composite pParent)
pParent - the composite parent where to put the controlspublic abstract int getProvidedTypes()
bit or
of the types defined in the UnoTypeProvider class.public void setOOoInstance(IOOo pOOoInstance)
pOOoInstance - OOo instance to use.public void setUnoidlProject(IUnoidlProject pUnoProject)
pUnoProject - the projet for which to create the UNO type.public java.lang.String getPackageRoot()
public java.lang.String getPackage()
public java.lang.String getElementName()
public void setPackageRoot(java.lang.String pValue)
pValue - the new package root to setpublic void setPackage(java.lang.String pValue,
boolean pForced)
pValue - the new package valuepForced - true will replace the current value, false will set the value only if the
current package is empty or null.public void setName(java.lang.String pValue,
boolean pForced)
pValue - the new package valuepForced - true will replace the current value, false will set the value only if the
current package is empty or null.public boolean isPublished()
public void setPublished(boolean pValue,
boolean pForced)
pValue - true if the type is published, false otherwisepForced - true to overwrite the existing value.public void dispose()
dispose in interface org.eclipse.jface.dialogs.IDialogPagedispose in class org.eclipse.jface.dialogs.DialogPagepublic void addPageListener(IPageListener pListener)
addPageListener in interface IListenablePagepListener - the page listener to addpublic void removePageListener(IPageListener pListener)
removePageListener in interface IListenablePagepListener - the listener to remove.protected void firePageChanged(UnoFactoryData pData)
pData - the new data of the page.public void createControl(org.eclipse.swt.widgets.Composite pParent)
createControl in interface org.eclipse.jface.dialogs.IDialogPagepublic void setVisible(boolean pVisible)
setVisible in interface org.eclipse.jface.dialogs.IDialogPagesetVisible in class org.eclipse.jface.dialogs.DialogPagepublic UnoFactoryData fillData(UnoFactoryData pData)
pData - the UNO data to completenull if the provided data is nullpublic abstract UnoFactoryData getEmptyTypeData()
public static UnoFactoryData getTypeData(UnoFactoryData pData)
pData - the data of the project for which to get the default type data.public void fieldChanged(FieldEvent pEvent)
fieldChanged in interface IFieldChangedListenerpEvent - the field event thrownpublic boolean isPageComplete()
isPageComplete in interface org.eclipse.jface.wizard.IWizardPageisPageComplete in class org.eclipse.jface.wizard.WizardPagepublic static boolean existsIdlFile(java.lang.String pIdlFullName,
IUnoidlProject pPrj)
Please note that this method behaves correctly only if the user is respecting the following design rules:
pIdlFullName - the full name of the IDL file checkpPrj - the project where to look for the IDL filetrue if the an IDL file corresponds to the searched type, false otherwise.