org.eclipse.ocl.examples.xtext.base.ui.wizards
Class AbstractFileDialog

java.lang.Object
  extended by org.eclipse.jface.window.Window
      extended by org.eclipse.jface.dialogs.Dialog
          extended by org.eclipse.emf.common.ui.dialogs.ResourceDialog
              extended by org.eclipse.emf.edit.ui.action.LoadResourceAction.LoadResourceDialog
                  extended by org.eclipse.emf.ecore.presentation.EcoreActionBarContributor.ExtendedLoadResourceAction.ExtendedLoadResourceDialog
                      extended by org.eclipse.ocl.examples.xtext.base.ui.wizards.AbstractFileDialog
All Implemented Interfaces:
org.eclipse.jface.window.IShellProvider
Direct Known Subclasses:
CompleteOCLFileDialog, EcoreWithOCLFileDialog, OCLinEcoreFileDialog, OCLstdlibFileDialog

public abstract class AbstractFileDialog
extends org.eclipse.emf.ecore.presentation.EcoreActionBarContributor.ExtendedLoadResourceAction.ExtendedLoadResourceDialog


Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.jface.window.Window
org.eclipse.jface.window.Window.IExceptionHandler
 
Field Summary
protected  org.eclipse.core.resources.IResource initialSelection
           
static java.lang.String PREFIX
           
protected  AbstractFileNewWizard wizard
           
 
Fields inherited from class org.eclipse.emf.ecore.presentation.EcoreActionBarContributor.ExtendedLoadResourceAction.ExtendedLoadResourceDialog
registeredPackages
 
Fields inherited from class org.eclipse.emf.edit.ui.action.LoadResourceAction.LoadResourceDialog
domain
 
Fields inherited from class org.eclipse.emf.common.ui.dialogs.ResourceDialog
context, CONTROL_OFFSET, style, title, uriField, uriText
 
Fields inherited from class org.eclipse.jface.dialogs.Dialog
blockedHandler, buttonBar, DIALOG_DEFAULT_BOUNDS, DIALOG_PERSISTLOCATION, DIALOG_PERSISTSIZE, dialogArea, DLG_IMG_ERROR, DLG_IMG_HELP, DLG_IMG_INFO, DLG_IMG_MESSAGE_ERROR, DLG_IMG_MESSAGE_INFO, DLG_IMG_MESSAGE_WARNING, DLG_IMG_QUESTION, DLG_IMG_WARNING, ELLIPSIS
 
Fields inherited from class org.eclipse.jface.window.Window
CANCEL, OK, resizeHasOccurred
 
Constructor Summary
AbstractFileDialog(AbstractFileNewWizard wizard, AbstractFileNewWizardPage wizardPage, org.eclipse.core.resources.IResource initialSelection)
          Creates an extended new complete OCL file creation dialog.
 
Method Summary
 org.eclipse.swt.widgets.Composite createDialogArea(org.eclipse.swt.widgets.Composite parent)
           
protected  void createMetamodelsArea(org.eclipse.swt.widgets.Composite topLevel)
           
protected  ResourceAndContainerGroup createResourceAndContainerArea(org.eclipse.swt.widgets.Composite parent)
           
 java.lang.String getFileName()
          Returns the current file name as entered by the user, or its anticipated initial value.
protected  ResourceAndContainerGroup getGroup()
           
 org.eclipse.core.resources.IFile getNewFile()
           
 org.eclipse.core.runtime.IPath getNewFilePath()
           
 org.eclipse.swt.widgets.Shell getShell()
           
 void initSelection(org.eclipse.core.resources.IResource initialSelection)
           
protected  boolean isFilteredByParent()
          Returns true if this selected resource would be filtered from view.
 boolean isURIFieldValid()
           
 boolean validateGroup()
           
 
Methods inherited from class org.eclipse.emf.ecore.presentation.EcoreActionBarContributor.ExtendedLoadResourceAction.ExtendedLoadResourceDialog
getAllPackages, getRegisteredPackages, prepareBrowseRegisteredPackagesButton, prepareBrowseTargetPlatformPackagesButton, processResource
 
Methods inherited from class org.eclipse.emf.edit.ui.action.LoadResourceAction.LoadResourceDialog
processResources
 
Methods inherited from class org.eclipse.emf.common.ui.dialogs.ResourceDialog
configureShell, getURIs, getURIText, isMulti, isSave, normalizeStyle, okPressed, prepareBrowseFileSystemButton, prepareBrowseWorkspaceButton
 
Methods inherited from class org.eclipse.jface.dialogs.Dialog
applyDialogFont, buttonPressed, cancelPressed, close, convertHeightInCharsToPixels, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, convertWidthInCharsToPixels, create, createButton, createButtonBar, createButtonsForButtonBar, createContents, dialogFontIsDefault, getBlockedHandler, getButton, getButtonBar, getCancelButton, getDialogArea, getDialogBoundsSettings, getDialogBoundsStrategy, getImage, getInitialLocation, getInitialSize, getOKButton, initializeBounds, initializeDialogUnits, isResizable, setBlockedHandler, setButtonLayoutData, setButtonLayoutFormData, shortenText
 
Methods inherited from class org.eclipse.jface.window.Window
canHandleShellCloseEvent, constrainShellSize, createShell, getConstrainedShellBounds, getContents, getDefaultImage, getDefaultImages, getDefaultOrientation, getLayout, getParentShell, getReturnCode, getShellListener, getShellStyle, getWindowManager, handleFontChange, handleShellCloseEvent, open, setBlockOnOpen, setDefaultImage, setDefaultImages, setDefaultModalParent, setDefaultOrientation, setExceptionHandler, setParentShell, setReturnCode, setShellStyle, setWindowManager
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PREFIX

public static final java.lang.String PREFIX
See Also:
Constant Field Values

initialSelection

@Nullable
protected final org.eclipse.core.resources.IResource initialSelection

wizard

@NonNull
protected final AbstractFileNewWizard wizard
Constructor Detail

AbstractFileDialog

public AbstractFileDialog(@NonNull
                          AbstractFileNewWizard wizard,
                          @NonNull
                          AbstractFileNewWizardPage wizardPage,
                          @Nullable
                          org.eclipse.core.resources.IResource initialSelection)
Creates an extended new complete OCL file creation dialog. If the initial resource selection contains exactly one container resource then it will be used as the default container resource.

Method Detail

createDialogArea

public org.eclipse.swt.widgets.Composite createDialogArea(org.eclipse.swt.widgets.Composite parent)
Overrides:
createDialogArea in class org.eclipse.emf.ecore.presentation.EcoreActionBarContributor.ExtendedLoadResourceAction.ExtendedLoadResourceDialog

createMetamodelsArea

protected void createMetamodelsArea(org.eclipse.swt.widgets.Composite topLevel)

createResourceAndContainerArea

@Nullable
protected ResourceAndContainerGroup createResourceAndContainerArea(org.eclipse.swt.widgets.Composite parent)

getFileName

public java.lang.String getFileName()
Returns the current file name as entered by the user, or its anticipated initial value.

The current file name will include the file extension if the preconditions are met.

Returns:
the file name, its anticipated initial value, or null if no file name is known
See Also:
WizardNewFileCreationPage.setFileExtension(String)

getGroup

@NonNull
protected ResourceAndContainerGroup getGroup()
Returns:
the resource group

getNewFile

public org.eclipse.core.resources.IFile getNewFile()

getNewFilePath

public org.eclipse.core.runtime.IPath getNewFilePath()

getShell

public org.eclipse.swt.widgets.Shell getShell()
Specified by:
getShell in interface org.eclipse.jface.window.IShellProvider
Overrides:
getShell in class org.eclipse.jface.window.Window

initSelection

public void initSelection(org.eclipse.core.resources.IResource initialSelection)

isFilteredByParent

protected boolean isFilteredByParent()
Returns true if this selected resource would be filtered from view. IWorkspace.validateFiltered(IResource)


isURIFieldValid

public boolean isURIFieldValid()

validateGroup

public boolean validateGroup()