org.eclipse.emf.common.ui.dialogs
Class WorkspaceResourceDialog

java.lang.Object
  extended byorg.eclipse.jface.window.Window
      extended byorg.eclipse.jface.dialogs.Dialog
          extended byorg.eclipse.jface.dialogs.TrayDialog
              extended byorg.eclipse.ui.dialogs.SelectionDialog
                  extended byorg.eclipse.ui.dialogs.SelectionStatusDialog
                      extended byorg.eclipse.ui.dialogs.ElementTreeSelectionDialog
                          extended byorg.eclipse.emf.common.ui.dialogs.WorkspaceResourceDialog
All Implemented Interfaces:
ISelectionStatusValidator, IShellProvider

public class WorkspaceResourceDialog
extends ElementTreeSelectionDialog
implements ISelectionStatusValidator

Since:
2.2.0

Nested Class Summary
 
Nested classes inherited from class org.eclipse.jface.window.Window
Window.IExceptionHandler
 
Field Summary
protected  Text fileText
           
protected  String fileTextContent
           
protected  Button newFolderButton
           
protected  IContainer selectedContainer
           
protected  boolean showFileControl
           
protected  boolean showFiles
           
protected  boolean showNewFolderControl
           
 
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
WorkspaceResourceDialog(Shell parent, ILabelProvider labelProvider, ITreeContentProvider contentProvider)
           
 
Method Summary
 ViewerFilter createDefaultViewerFilter(boolean showFiles)
           
protected  Control createDialogArea(Composite parent)
           
protected  void createFileControl(Composite parent)
           
protected  void createNewFolderControl(Composite parent)
           
protected  void fileTextModified(String text)
           
 IFile getFile()
           
 String getFileText()
           
 IContainer[] getSelectedContainers()
           
 IFile[] getSelectedFiles()
           
 boolean isShowFileControl()
           
 boolean isShowNewFolderControl()
           
 void loadContents()
           
protected  void newFolderButtonPressed()
           
static IFile[] openFileSelection(Shell parent, String title, String message, boolean allowMultipleSelection, Object[] initialSelection, List viewerFilters)
           
static IContainer[] openFolderSelection(Shell parent, String title, String message, boolean allowMultipleSelection, Object[] initialSelection, List viewerFilters)
           
static IFile openNewFile(Shell parent, String title, String message, IPath suggestedFile, List viewerFilters)
           
 void setFileText(String text)
           
 void setShowFileControl(boolean showFileControl)
           
 void setShowNewFolderControl(boolean showNewFolderControl)
           
protected  void updateNewFolderButtonState()
           
 IStatus validate(Object[] selectedElements)
           
 
Methods inherited from class org.eclipse.ui.dialogs.ElementTreeSelectionDialog
access$setResult, access$superButtonPressed, addFilter, cancelPressed, computeResult, create, createTreeViewer, getTreeViewer, handleShellCloseEvent, open, setAllowMultiple, setDoubleClickSelects, setEmptyListMessage, setInitialSelection, setInput, setSize, setSorter, setValidator, updateOKStatus
 
Methods inherited from class org.eclipse.ui.dialogs.SelectionStatusDialog
configureShell, createButtonBar, getFirstResult, okPressed, setImage, setResult, setStatusLineAboveButtons, updateButtonsEnableState, updateStatus
 
Methods inherited from class org.eclipse.ui.dialogs.SelectionDialog
createButtonsForButtonBar, createMessageArea, getDialogBoundsSettings, getDialogBoundsStrategy, getInitialElementSelections, getInitialSelections, getMessage, getOkButton, getResult, setDialogBoundsSettings, setInitialElementSelections, setInitialSelections, setMessage, setResult, setSelectionResult, setTitle
 
Methods inherited from class org.eclipse.jface.dialogs.TrayDialog
close, closeTray, createHelpControl, getLayout, getTray, isDialogHelpAvailable, isHelpAvailable, openTray, setDialogHelpAvailable, setHelpAvailable
 
Methods inherited from class org.eclipse.jface.dialogs.Dialog
applyDialogFont, buttonPressed, convertHeightInCharsToPixels, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, convertWidthInCharsToPixels, createButton, createContents, dialogFontIsDefault, getBlockedHandler, getButton, getButtonBar, getCancelButton, getDialogArea, getImage, getInitialLocation, getInitialSize, getOKButton, initializeBounds, initializeDialogUnits, setBlockedHandler, setButtonLayoutData, setButtonLayoutFormData, shortenText
 
Methods inherited from class org.eclipse.jface.window.Window
canHandleShellCloseEvent, constrainShellSize, createShell, getConstrainedShellBounds, getContents, getDefaultImage, getDefaultImages, getDefaultOrientation, getParentShell, getReturnCode, getShell, getShellListener, getShellStyle, getWindowManager, handleFontChange, 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

showNewFolderControl

protected boolean showNewFolderControl

showFileControl

protected boolean showFileControl

showFiles

protected boolean showFiles

newFolderButton

protected Button newFolderButton

fileText

protected Text fileText

fileTextContent

protected String fileTextContent

selectedContainer

protected IContainer selectedContainer
Constructor Detail

WorkspaceResourceDialog

public WorkspaceResourceDialog(Shell parent,
                               ILabelProvider labelProvider,
                               ITreeContentProvider contentProvider)
Method Detail

openFolderSelection

public static IContainer[] openFolderSelection(Shell parent,
                                               String title,
                                               String message,
                                               boolean allowMultipleSelection,
                                               Object[] initialSelection,
                                               List viewerFilters)

openFileSelection

public static IFile[] openFileSelection(Shell parent,
                                        String title,
                                        String message,
                                        boolean allowMultipleSelection,
                                        Object[] initialSelection,
                                        List viewerFilters)

openNewFile

public static IFile openNewFile(Shell parent,
                                String title,
                                String message,
                                IPath suggestedFile,
                                List viewerFilters)

loadContents

public void loadContents()

createDefaultViewerFilter

public ViewerFilter createDefaultViewerFilter(boolean showFiles)

createDialogArea

protected Control createDialogArea(Composite parent)

createNewFolderControl

protected void createNewFolderControl(Composite parent)

updateNewFolderButtonState

protected void updateNewFolderButtonState()

newFolderButtonPressed

protected void newFolderButtonPressed()

createFileControl

protected void createFileControl(Composite parent)

fileTextModified

protected void fileTextModified(String text)

validate

public IStatus validate(Object[] selectedElements)
Specified by:
validate in interface ISelectionStatusValidator

getSelectedContainers

public IContainer[] getSelectedContainers()

getSelectedFiles

public IFile[] getSelectedFiles()

getFile

public IFile getFile()

setFileText

public void setFileText(String text)

getFileText

public String getFileText()

isShowNewFolderControl

public boolean isShowNewFolderControl()

setShowNewFolderControl

public void setShowNewFolderControl(boolean showNewFolderControl)

isShowFileControl

public boolean isShowFileControl()

setShowFileControl

public void setShowFileControl(boolean showFileControl)

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