Remote Systems
v6.4.1

com.ibm.etools.systems.core.ui.actions
Class SystemSelectFileTypesAction

java.lang.Object
  extended byAction
      extended bycom.ibm.etools.systems.core.ui.actions.SystemBaseAction
          extended bycom.ibm.etools.systems.core.ui.actions.SystemBaseDialogAction
              extended bycom.ibm.etools.systems.core.ui.actions.SystemSelectFileTypesAction
All Implemented Interfaces:
ISystemAction, ISystemDialogAction, ISystemFileConstants
Direct Known Subclasses:
SystemSearchSelectFileTypesAction

public class SystemSelectFileTypesAction
extends SystemBaseDialogAction
implements ISystemFileConstants

The action for allowing the user to select one or more file types, using the Eclipse dialog for this. The types are from the file editor registry, as specified in the Workbench preferences.

To set preselected types, use setTypes(List) or setTypes(String[]). Or, if you have single string of comma-separated types, call setTypes(String).

After running, and checking wasCancelled(), you can query the selected types using one of:

  1. getTypes() to retrieve the selected types as a List
  2. getTypesArray() to retrieve the selected types as a String array
  3. getTypesString() to retrieve the selected types as a single String of comma-delimited selections

    Note the types are remembered after running, so a subsequent run will result in the previous types being preselected, assuming you re-use the same instance of this class.

    See Also:
    SystemSelectFileTypesDialog, Serialized Form

    Field Summary
    static String copyright
               
    protected  List types
               
     
    Fields inherited from class com.ibm.etools.systems.core.ui.actions.SystemBaseDialogAction
    cancelled, dlgHelpId, needsProgressMonitor, needsProgressMonitorSet, processAll, value
     
    Fields inherited from class com.ibm.etools.systems.core.ui.actions.SystemBaseAction
    allowOnMultipleSelection, arrowCursor, helpId, selectionSensitive, shell, sSelection, traceSelections, traceTarget, viewer, waitCursor
     
    Fields inherited from interface com.ibm.etools.systems.files.ui.ISystemFileConstants
    ACTION_ADDFILEFILTERSTRING, ACTION_ID, ACTION_NEWFILEFILTER, ACTION_NEWFILEFILTERSTRING, ACTION_NEWNESTEDFILEFILTER, ACTION_SELECTFILETYPES, ACTION_UPDATEFILEFILTER, ACTION_UPDATEFILEFILTERSTRING, ICON_DIR, ICON_EXT, ICON_PATH, ICON_SUFFIX, PLUGIN_ID, PREFIX, RESID_CHGFILEFILTER_TITLE, RESID_CHGFILEFILTERSTRING_TITLE, RESID_ENTER_OR_SELECT_FILE_ENTER_LABEL, RESID_ENTER_OR_SELECT_FILE_ENTER_TOOLTIP, RESID_ENTER_OR_SELECT_FILE_FILE_LABEL, RESID_ENTER_OR_SELECT_FILE_FILE_TOOLTIP, RESID_ENTER_OR_SELECT_FILE_PREFIX, RESID_ENTER_OR_SELECT_FILE_SELECT_TOOLTIP, RESID_ENTER_OR_SELECT_FILE_TITLE, RESID_ENTER_OR_SELECT_FILE_VERBAGE_LABEL, RESID_FILEFILTER_FILE_ROOT, RESID_FILEFILTER_FOLDER_ROOT, RESID_FILEFILTER_NAME_ROOT, RESID_FILEFILTER_ROOT, RESID_FILEFILTER_STRING_ROOT, RESID_FILEFILTERSTRING_BYFILENAME_ROOT, RESID_FILEFILTERSTRING_BYFILETYPES_ROOT, RESID_FILEFILTERSTRING_FILE_ROOT, RESID_FILEFILTERSTRING_FOLDER_ROOT, RESID_FILEFILTERSTRING_INCFILES_ROOT, RESID_FILEFILTERSTRING_INCFILESONLY_ROOT, RESID_FILEFILTERSTRING_INCFOLDERS_ROOT, RESID_FILEFILTERSTRING_ROOT, RESID_FILEFILTERSTRING_SELECTTYPES_ROOT, RESID_FILEFILTERSTRING_TEST_ROOT, RESID_FILEFILTERSTRING_TYPES_ROOT, RESID_FILTER_DRIVES, RESID_FILTER_HOME, RESID_FILTER_MYHOME, RESID_FILTER_ROOTFILES, RESID_FILTER_ROOTFOLDERS, RESID_FILTER_ROOTS, RESID_FILTER_USERHOME, RESID_HOMEPROMPT_PROMPT_ROOT, RESID_HOMEPROMPT_TITLE, RESID_HOMEPROMPT_VERBAGE, RESID_NEWFILEFILTER_PAGE1_DESCRIPTION, RESID_NEWFILEFILTER_PAGE1_TITLE, RESID_NEWFILTERSTRING_PAGE1_DESCRIPTION, RESID_NEWFILTERSTRING_PAGE1_TITLE, RESID_NEWFILTERSTRING_TITLE, RESID_PP_FILE_HIDDEN_ROOT, RESID_PP_FILE_MODIFIED_ROOT, RESID_PP_FILE_NAME_ROOT, RESID_PP_FILE_PATH_ROOT, RESID_PP_FILE_READABLE_ROOT, RESID_PP_FILE_READONLY_ROOT, RESID_PP_FILE_ROOT, RESID_PP_FILE_SIZE_ROOT, RESID_PP_FILE_SIZE_VALUE, RESID_PP_FILE_TITLE, RESID_PP_FILE_TYPE_FILE_VALUE, RESID_PP_FILE_TYPE_FOLDER_VALUE, RESID_PP_FILE_TYPE_ROOT, RESID_PP_FILE_TYPE_ROOT_VALUE, RESID_PP_FILE_WRITABLE_ROOT, RESID_PREFIX, RESID_PROPERTY_FILE_FILTER_VALUE, RESID_SELECTDIRECTORY_SELECT, RESID_SELECTDIRECTORY_TITLE, RESID_SELECTDIRECTORY_VERBAGE, RESID_SELECTFILE_SELECT, RESID_SELECTFILE_TITLE, RESID_SELECTFILE_VERBAGE, WIDGET_BROWSE_ROOT, WIDGET_FOLDER_ROOT, WIDGET_ID
     
    Constructor Summary
    SystemSelectFileTypesAction(Shell shell)
              Constructor To set preselected types, use setTypes(List) or setTypes(String[]).
     
    Method Summary
     Dialog createDialog(Shell parent)
              Create and return the dialog
     Object getDialogValue(Dialog dlg)
              Parent abstract method.
     List getTypes()
              Get the selected file types after running the action.
     String[] getTypesArray()
              Get the selected file types after running the action.
     String getTypesString()
              Get the selected file types as a concatenated list of strings, comma-separated
     void setTypes(List types)
              Set the current input types as a java.util List, such as ArrayList Each type is a file name extension, without the dot, as in "java" or "class"
     void setTypes(String typeString)
              Set the current input types given a comma-separated list as a single String.
     void setTypes(String[] types)
              Set the current input types as a String array.
     boolean wasCancelled()
              Return true if the dialog was cancelled by the user.
     
    Methods inherited from class com.ibm.etools.systems.core.ui.actions.SystemBaseDialogAction
    getDialogHelpContextId, getNeedsProgressMonitor, getProcessAllSelections, getValue, run, setDialogHelp, setNeedsProgressMonitor, setProcessAllSelections, setValue, wasNeedsProgressMonitorSet
     
    Methods inherited from class com.ibm.etools.systems.core.ui.actions.SystemBaseAction
    allowOnMultipleSelection, checkObjectType, getAdapter, getContextMenuGroup, getCurrentTreeView, getDescription, getFirstSelection, getHelpContextId, getLabel, getNextSelection, getRemoteAdapter, getSelection, getSelectionProvider, getShell, getShell, getString, getStringOrNull, getSystemConnection, getToolTip, getViewer, isDummy, isEnabled, isSelectionSensitive, issueTraceMessage, selectionChanged, setAvailableOffline, setBusyCursor, setContextMenuGroup, setDisplayCursor, setDisplayCursor, setHelp, setInputs, setSelection, setSelectionProvider, setSelectionSensitive, setShell, setSystemConnection, setTracing, setTracing, setViewer, updateSelection
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     
    Methods inherited from interface com.ibm.etools.systems.core.ui.actions.ISystemAction
    allowOnMultipleSelection, getContextMenuGroup, getHelpContextId, getSelection, getShell, getViewer, isDummy, isSelectionSensitive, setContextMenuGroup, setHelp, setInputs, setSelection, setSelectionSensitive, setShell, setViewer
     

    Field Detail

    copyright

    public static final String copyright
    See Also:
    Constant Field Values

    types

    protected List types
    Constructor Detail

    SystemSelectFileTypesAction

    public SystemSelectFileTypesAction(Shell shell)
    Constructor To set preselected types, use setTypes(List) or setTypes(String[]). Note the types are remember after running, so a subsequent run will result in the previous types being preselected.

    Method Detail

    setTypes

    public void setTypes(String[] types)
    Set the current input types as a String array. Each type is a file name extension, without the dot, as in "java" or "class"


    setTypes

    public void setTypes(List types)
    Set the current input types as a java.util List, such as ArrayList Each type is a file name extension, without the dot, as in "java" or "class"


    setTypes

    public void setTypes(String typeString)
    Set the current input types given a comma-separated list as a single String.


    getTypes

    public List getTypes()
    Get the selected file types after running the action. Returns an ArrayList


    getTypesArray

    public String[] getTypesArray()
    Get the selected file types after running the action. Returns a String array


    getTypesString

    public String getTypesString()
    Get the selected file types as a concatenated list of strings, comma-separated


    wasCancelled

    public boolean wasCancelled()
    Return true if the dialog was cancelled by the user. Only valid after calling run().

    Specified by:
    wasCancelled in interface ISystemDialogAction
    Overrides:
    wasCancelled in class SystemBaseDialogAction

    createDialog

    public Dialog createDialog(Shell parent)
    Create and return the dialog

    Specified by:
    createDialog in class SystemBaseDialogAction
    See Also:
    SystemBaseDialogAction.run()

    getDialogValue

    public Object getDialogValue(Dialog dlg)
    Parent abstract method. Called after dialog runs, to retrieve the value from the dialog. Will return null if dialog cancelled.

    Specified by:
    getDialogValue in class SystemBaseDialogAction
    Parameters:
    dlg - The dialog object, after it has returned from open.

    Remote Systems
    v6.4.1

    Copyright © 2005 IBM Corp. All Rights Reserved.

    Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.