net.bpelunit.framework.client.eclipse.dialog.field
Class FileSelector

java.lang.Object
  extended by net.bpelunit.framework.client.eclipse.dialog.field.FileSelector

public class FileSelector
extends Object

Provides methods for selecting a file in the workspace.

Version:
$Id$
Author:
Philip Mayer

Constructor Summary
FileSelector()
           
 
Method Summary
static String getFile(org.eclipse.swt.widgets.Shell shell, String preSelectFile, org.eclipse.ui.dialogs.ISelectionStatusValidator validator, org.eclipse.jface.viewers.ViewerFilter filter, org.eclipse.core.resources.IProject project, org.eclipse.core.resources.IContainer directory)
          Opens a dialog and lets the user select a file from the current project.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileSelector

public FileSelector()
Method Detail

getFile

public static String getFile(org.eclipse.swt.widgets.Shell shell,
                             String preSelectFile,
                             org.eclipse.ui.dialogs.ISelectionStatusValidator validator,
                             org.eclipse.jface.viewers.ViewerFilter filter,
                             org.eclipse.core.resources.IProject project,
                             org.eclipse.core.resources.IContainer directory)
Opens a dialog and lets the user select a file from the current project. The code attempts to find the file "currentFile" which is assumed to be relative to the current directory and select it. The returned file name is relative to the current directory.

Parameters:
shell - shell
preSelectFile - a file path and name to preselect
validator - file validator for the file dialog
filter - filters objects in the selection dialog
project - project to be displayed in selection dialog
directory - directory to be pre-selected in the selection dialog
Returns:


Copyright © 2013 Leibniz Universität Hannover. All Rights Reserved.