public class NewModelFromExistingModelPage extends AbstractNewModelPage
Modifier and Type | Field and Description |
---|---|
protected boolean |
isFileNameRedefined |
protected static int |
MAX_RECENTLY_USED |
protected boolean |
modelSelectionValid |
protected static java.lang.String |
RECENTLY_USED_MODELS |
protected java.util.List<java.lang.String> |
recentlyOpenedModels |
protected org.eclipse.swt.widgets.Combo |
recentlyUsedModelsCombo |
protected java.lang.String |
setFilename |
protected org.eclipse.core.resources.IFile |
sourceModel |
browseButton, containerControl, DESCRIPTION_MINIMUM_WIDTH, fileNameControl, helpID, IMAGE_MAX_HEIGHT, IMAGE_MAX_WIDTH, resourceContainer, selection
Constructor and Description |
---|
NewModelFromExistingModelPage(java.lang.String pageName,
org.eclipse.jface.viewers.IStructuredSelection selection) |
Modifier and Type | Method and Description |
---|---|
void |
createControl(org.eclipse.swt.widgets.Composite parent) |
protected FilteredFileSelectionDialog |
createFileSelectionDialog()
Create a FilderedFileSelectionDialog to browse for valid model files.
|
protected boolean |
finishPage(org.eclipse.core.runtime.IProgressMonitor monitor)
Creates the model template from the valid user input
|
protected java.lang.String[] |
getFileExtensions()
Return the array of valid file extensions to used to filter elements out
of the browse dialog.
|
protected java.lang.String |
getModelFileExtension()
Lazily instantiates the EXTENSION field to avoid premature plugin
loading.
|
org.eclipse.jface.wizard.IWizardPage |
getNextPage()
Returns the first next page.
|
protected org.eclipse.core.resources.IFile |
getSourceModelResource(java.lang.String relativePath)
Gets the IFile object for the relativePath
|
protected void |
handleBrowseModel()
Solicits model file from user
|
protected void |
handleNewModelSelected(java.lang.String relativePath)
Called whenever a new model file is being selected as a source.
|
protected void |
handleNewRelativePath(java.lang.String relativePath) |
protected boolean |
isModelSelectionValid() |
protected void |
readPageSettings()
Read the wizard page settings for the recently used models.
|
protected void |
savePageSettings()
Save the wizard page settings for the recently used models.
|
protected void |
setModelSelectionValid(boolean modelSelectionValid) |
static java.lang.String |
toAbsolutePath(java.lang.String relativePath)
Converts a relative workspace path into an absolute workspace path
|
static java.lang.String |
toRelativePath(java.lang.String absolutePath)
Converts an absolute workspace path into a relative workspace path
|
protected boolean |
validateModelSelection() |
protected boolean |
validatePage()
A page is considered validated if both the filename and container are OK.
|
createContainerControlGroup, createFileNameLabel, createProject, getContainerPath, getContainerText, getContainingProjectName, getDefaultDirectoryName, getFileName, handleBrowse, initialPopulateContainerNameField, isProjectWizard, makeAndAppendFilename, makeFilename, preFinishPage, removeProject, setHelpID, setVisible, updateContainer, validateContainer, validateFilename
canFlipToNextPage, getContainer, getDialogSettings, getImage, getName, getPreviousPage, getShell, getWizard, isCurrentPage, isPageComplete, setDescription, setErrorMessage, setImageDescriptor, setMessage, setPageComplete, setPreviousPage, setTitle, setWizard, toString
convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, dispose, getControl, getDescription, getDialogFontName, getErrorMessage, getFont, getMessage, getMessageType, getTitle, getToolTipText, initializeDialogUnits, isControlCreated, performHelp, setButtonLayoutData, setControl, setMessage
protected static final java.lang.String RECENTLY_USED_MODELS
protected static final int MAX_RECENTLY_USED
protected java.util.List<java.lang.String> recentlyOpenedModels
protected boolean modelSelectionValid
protected org.eclipse.swt.widgets.Combo recentlyUsedModelsCombo
protected org.eclipse.core.resources.IFile sourceModel
protected boolean isFileNameRedefined
protected java.lang.String setFilename
public NewModelFromExistingModelPage(java.lang.String pageName, org.eclipse.jface.viewers.IStructuredSelection selection)
public org.eclipse.jface.wizard.IWizardPage getNextPage()
getNextPage
in interface org.eclipse.jface.wizard.IWizardPage
getNextPage
in class org.eclipse.jface.wizard.WizardPage
protected void readPageSettings()
protected void savePageSettings()
public void createControl(org.eclipse.swt.widgets.Composite parent)
createControl
in interface org.eclipse.jface.dialogs.IDialogPage
createControl
in class AbstractNewModelPage
protected java.lang.String[] getFileExtensions()
protected FilteredFileSelectionDialog createFileSelectionDialog()
protected void handleBrowseModel()
protected void handleNewRelativePath(java.lang.String relativePath)
protected void handleNewModelSelected(java.lang.String relativePath)
relativePath
- a source model relative pathprotected org.eclipse.core.resources.IFile getSourceModelResource(java.lang.String relativePath)
protected boolean finishPage(org.eclipse.core.runtime.IProgressMonitor monitor)
finishPage
in class AbstractNewModelPage
true
if successful, otherwise
false
protected boolean isModelSelectionValid()
protected void setModelSelectionValid(boolean modelSelectionValid)
modelSelectionValid
- The modelSelectionValid to set.protected boolean validateModelSelection()
protected boolean validatePage()
AbstractNewModelPage
validatePage
in class AbstractNewModelPage
public static java.lang.String toAbsolutePath(java.lang.String relativePath)
relativePath
- the relative workspace pathpublic static java.lang.String toRelativePath(java.lang.String absolutePath)
absolutePath
- the absolute workspace pathprotected java.lang.String getModelFileExtension()
AbstractNewModelPage
getModelFileExtension
in class AbstractNewModelPage