org.jupe.plugin.dialogs.resourcetree
Class FileChooseDialog

java.lang.Object
  extended by org.jupe.plugin.dialogs.resourcetree.FileChooseDialog

public class FileChooseDialog
extends java.lang.Object

Class opens a dialog that presents system file elements (folder, files) in a tree.

Author:
Roman Wolf

Field Summary
static int SHOW_PROJECT_RESOURCES
          flag to show project itself and all subfolder in a project that contains files with specified file extension
static int SHOW_PROJECT_SUBFOLDERS_ONLY
          flag to show project itself and project subfolders only, no file will be displayed
static int SHOW_SUBFOLDERS_ONLY
          flag to show project subfolders only, no file will be diplayed
static int SHOW_SUBFOLDERS_RESOURCES
          flag to show all subfolder in a project that contains files with specified file extension
static int SHOW_WORKSPACE_PROJECT_RESOURCES
          flag to show complete workspace including all projects, subfolders and files
static int SHOW_WORKSPACE_PROJECTS_ONLY
          flag to show all projects regardless their nature, no subfolder or files will be displayed
 
Constructor Summary
FileChooseDialog(java.lang.String dialogTitle, java.lang.String dialogMessage)
          Constructor
 
Method Summary
 org.eclipse.core.resources.IResource openDialogForAllResourcesInAProject(org.eclipse.core.resources.IProject project)
          Method opens file choose dialog on the specified project to show all the subfolders and resources in the specified project.
 org.eclipse.core.resources.IResource openDialogForProjectAndSubFoldersInAProject(org.eclipse.core.resources.IProject currentProject)
          Method opens file choose dialog on the specified project to show all the subfolders in the specified project and the project itself.
 org.eclipse.core.resources.IResource openDialogForProjectsOnly(java.lang.String natureId)
          Method opens file choose dialog on workspace to show all projects with given nature.
 org.eclipse.core.resources.IResource openDialogForResourcesInAProject(org.eclipse.core.resources.IProject project, java.lang.String[] fileExtensions, boolean isFolderSelectable)
          Method opens file choose dialog on workspace to show all projects with given nature.
 org.eclipse.core.resources.IResource openDialogForSubFoldersInAProject(org.eclipse.core.resources.IProject project)
          Method opens file choose dialog on the specified project to show the all subfolders in the specified project.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SHOW_WORKSPACE_PROJECTS_ONLY

public static final int SHOW_WORKSPACE_PROJECTS_ONLY
flag to show all projects regardless their nature, no subfolder or files will be displayed

See Also:
Constant Field Values

SHOW_SUBFOLDERS_ONLY

public static final int SHOW_SUBFOLDERS_ONLY
flag to show project subfolders only, no file will be diplayed

See Also:
Constant Field Values

SHOW_PROJECT_SUBFOLDERS_ONLY

public static final int SHOW_PROJECT_SUBFOLDERS_ONLY
flag to show project itself and project subfolders only, no file will be displayed

See Also:
Constant Field Values

SHOW_SUBFOLDERS_RESOURCES

public static final int SHOW_SUBFOLDERS_RESOURCES
flag to show all subfolder in a project that contains files with specified file extension

See Also:
Constant Field Values

SHOW_WORKSPACE_PROJECT_RESOURCES

public static final int SHOW_WORKSPACE_PROJECT_RESOURCES
flag to show complete workspace including all projects, subfolders and files

See Also:
Constant Field Values

SHOW_PROJECT_RESOURCES

public static final int SHOW_PROJECT_RESOURCES
flag to show project itself and all subfolder in a project that contains files with specified file extension

See Also:
Constant Field Values
Constructor Detail

FileChooseDialog

public FileChooseDialog(java.lang.String dialogTitle,
                        java.lang.String dialogMessage)
Constructor

Parameters:
dialogTitle - dialog title
dialogMessage - dialog message
Method Detail

openDialogForAllResourcesInAProject

public org.eclipse.core.resources.IResource openDialogForAllResourcesInAProject(org.eclipse.core.resources.IProject project)
Method opens file choose dialog on the specified project to show all the subfolders and resources in the specified project.

Parameters:
project - project to use
Returns:
selected resource or null if dialog was canceled

openDialogForProjectAndSubFoldersInAProject

public org.eclipse.core.resources.IResource openDialogForProjectAndSubFoldersInAProject(org.eclipse.core.resources.IProject currentProject)
Method opens file choose dialog on the specified project to show all the subfolders in the specified project and the project itself.

Parameters:
currentProject - project to use
Returns:
selected resource or null if dialog was canceled

openDialogForProjectsOnly

public org.eclipse.core.resources.IResource openDialogForProjectsOnly(java.lang.String natureId)
Method opens file choose dialog on workspace to show all projects with given nature.

Parameters:
natureId - nature of projects to show
Returns:
selected project resource or null if dialog was cancled

openDialogForResourcesInAProject

public org.eclipse.core.resources.IResource openDialogForResourcesInAProject(org.eclipse.core.resources.IProject project,
                                                                             java.lang.String[] fileExtensions,
                                                                             boolean isFolderSelectable)
Method opens file choose dialog on workspace to show all projects with given nature.

Parameters:
project - project to use
fileExtensions - file extensions of resource to show
isFolderSelectable - if true folder can be selected as project resource
Returns:
selected project resource or null if dialog was cancled

openDialogForSubFoldersInAProject

public org.eclipse.core.resources.IResource openDialogForSubFoldersInAProject(org.eclipse.core.resources.IProject project)
Method opens file choose dialog on the specified project to show the all subfolders in the specified project.

Parameters:
project - project to use
Returns:
selected resource or null if dialog was cancled