org.eclipse.emf.edit.ui.action
Class ControlAction.ControlResourceDialog

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.ControlAction.ControlResourceDialog
All Implemented Interfaces:
IShellProvider
Enclosing class:
ControlAction

protected static class ControlAction.ControlResourceDialog
extends ResourceDialog

A save-type resource dialog that attempts to create the specified resource and load it, if it already exists.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.jface.window.Window
Window.IExceptionHandler
 
Field Summary
protected  Resource currentResource
           
protected  EditingDomain domain
           
protected  Resource resource
           
 
Fields inherited from class org.eclipse.emf.common.ui.dialogs.ResourceDialog
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
 
Constructor Summary
ControlAction.ControlResourceDialog(Shell parent, EditingDomain domain, Resource currentResource)
           
 
Method Summary
 Resource getResource()
           
protected  boolean processResources()
          Creates and, if it already exists, loads the specified resource.
 
Methods inherited from class org.eclipse.emf.common.ui.dialogs.ResourceDialog
configureShell, createDialogArea, 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, getShell, 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

domain

protected EditingDomain domain

resource

protected Resource resource

currentResource

protected Resource currentResource
Constructor Detail

ControlAction.ControlResourceDialog

public ControlAction.ControlResourceDialog(Shell parent,
                                           EditingDomain domain,
                                           Resource currentResource)
Method Detail

processResources

protected boolean processResources()
Creates and, if it already exists, loads the specified resource. This implementation verifies that a resource can be opened for that URI, that the resource is not the object's current container, and that it is not read-only in the editing domain. If there is an existing resource with that URI, it prompts before overriding or adding to it.

Overrides:
processResources in class ResourceDialog
Returns:
true if the dialog can be closed, false if URI(s) must be re-entered

getResource

public Resource getResource()

Copyright 2001-2006 IBM Corporation and others.
All Rights Reserved.