Humboldt Alignment Editor 2.5.0

eu.esdihumboldt.hale.ui.firststeps
Class LoadProjectAction

java.lang.Object
  extended by org.eclipse.core.commands.common.EventManager
      extended by org.eclipse.jface.action.AbstractAction
          extended by org.eclipse.jface.action.Action
              extended by eu.esdihumboldt.hale.ui.firststeps.LoadProjectAction
All Implemented Interfaces:
Runnable, org.eclipse.help.ILiveHelpAction, org.eclipse.jface.action.IAction, org.eclipse.ui.cheatsheets.ICheatSheetAction, org.eclipse.ui.intro.config.IIntroAction

public class LoadProjectAction
extends org.eclipse.jface.action.Action
implements org.eclipse.ui.intro.config.IIntroAction, org.eclipse.ui.cheatsheets.ICheatSheetAction, org.eclipse.help.ILiveHelpAction

An IIntroAction, ILiveHelpAction and ICheatSheetAction to open a project.
Parameters are closeIntro (or param1 in case of a cheatsheet/live help), path (param2), type (param3) and bundle (param4). All are optional.
Parameters for live help are to be separated by "||".

If closeIntro is set to "true" an opened intro is closed when the action is run.

If path is specified the given path gets opened instead of showing a dialog to choose the project.
By default the path will be interpreted as a local file path.

type can change this. Valid types are "file", "uri" and "bundle". "uri" will interpret the path as a URI, nothing happens if the given path is not a correct URI.
"bundle" will interpret the path relative to the given Bundle ( bundle parameter).

Author:
Kai Schwierczek

Field Summary
static String TYPE_BUNDLE
          Value for type parameter, specifying that the path is a bundle internal path.
static String TYPE_FILE
          Value for type parameter, specifying that the path is a file path.
static String TYPE_URI
          Value for type parameter, specifying that the path is an uri.
 
Fields inherited from interface org.eclipse.jface.action.IAction
AS_CHECK_BOX, AS_DROP_DOWN_MENU, AS_PUSH_BUTTON, AS_RADIO_BUTTON, AS_UNSPECIFIED, CHECKED, DESCRIPTION, ENABLED, HANDLED, IMAGE, RESULT, TEXT, TOOL_TIP_TEXT
 
Constructor Summary
LoadProjectAction()
           
 
Method Summary
 void execute(boolean closeIntro)
          Executes the action.
 void execute(boolean closeIntro, String path)
          Executes the action.
 void execute(boolean closeIntro, String path, String type)
          Executes the action.
 void execute(boolean closeIntro, String path, String type, String bundle)
          Executes the action.
 void run()
           
 void run(org.eclipse.ui.intro.IIntroSite site, Properties params)
           
 void run(String[] params, org.eclipse.ui.cheatsheets.ICheatSheetManager manager)
           
 void setInitializationString(String data)
           
 
Methods inherited from class org.eclipse.jface.action.Action
convertAccelerator, convertAccelerator, findKeyCode, findKeyString, findModifier, findModifierString, getAccelerator, getActionDefinitionId, getDescription, getDisabledImageDescriptor, getHelpListener, getHoverImageDescriptor, getId, getImageDescriptor, getMenuCreator, getStyle, getText, getToolTipText, isChecked, isEnabled, isHandled, notifyResult, removeAcceleratorText, removeMnemonics, runWithEvent, setAccelerator, setActionDefinitionId, setChecked, setDescription, setDisabledImageDescriptor, setEnabled, setHelpListener, setHoverImageDescriptor, setId, setImageDescriptor, setMenuCreator, setText, setToolTipText
 
Methods inherited from class org.eclipse.jface.action.AbstractAction
addPropertyChangeListener, firePropertyChange, firePropertyChange, removePropertyChangeListener
 
Methods inherited from class org.eclipse.core.commands.common.EventManager
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.jface.action.IAction
addPropertyChangeListener, removePropertyChangeListener
 

Field Detail

TYPE_FILE

public static final String TYPE_FILE
Value for type parameter, specifying that the path is a file path.

See Also:
Constant Field Values

TYPE_URI

public static final String TYPE_URI
Value for type parameter, specifying that the path is an uri.

See Also:
Constant Field Values

TYPE_BUNDLE

public static final String TYPE_BUNDLE
Value for type parameter, specifying that the path is a bundle internal path.

See Also:
Constant Field Values
Constructor Detail

LoadProjectAction

public LoadProjectAction()
Method Detail

run

public void run()
Specified by:
run in interface Runnable
Specified by:
run in interface org.eclipse.jface.action.IAction
Overrides:
run in class org.eclipse.jface.action.Action
See Also:
Action.run()

run

public void run(org.eclipse.ui.intro.IIntroSite site,
                Properties params)
Specified by:
run in interface org.eclipse.ui.intro.config.IIntroAction
See Also:
IIntroAction.run(org.eclipse.ui.intro.IIntroSite, java.util.Properties)

run

public void run(String[] params,
                org.eclipse.ui.cheatsheets.ICheatSheetManager manager)
Specified by:
run in interface org.eclipse.ui.cheatsheets.ICheatSheetAction
See Also:
ICheatSheetAction.run(java.lang.String[], org.eclipse.ui.cheatsheets.ICheatSheetManager)

setInitializationString

public void setInitializationString(String data)
Specified by:
setInitializationString in interface org.eclipse.help.ILiveHelpAction
See Also:
ILiveHelpAction.setInitializationString(java.lang.String)

execute

public void execute(boolean closeIntro)
Executes the action.

Parameters:
closeIntro - whether to close the intro if a project was opened/loaded or not

execute

public void execute(boolean closeIntro,
                    String path)
Executes the action.

Parameters:
closeIntro - whether to close the intro if a project was opened/loaded or not
path - the file to load, a dialog is shown if fileName is null

execute

public void execute(boolean closeIntro,
                    String path,
                    String type)
Executes the action.

Parameters:
closeIntro - whether to close the intro if a project was opened/loaded or not
path - the file to load, a dialog is shown if fileName is null
type - the type of the path

execute

public void execute(boolean closeIntro,
                    String path,
                    String type,
                    String bundle)
Executes the action.

Parameters:
closeIntro - whether to close the intro if a project was opened/loaded or not
path - the file to load, a dialog is shown if fileName is null
type - the type of the path
bundle - the bundle in which to locate the path if it is a bundle type path

Humboldt Alignment Editor 2.5.0

Build 2012-12-03_12-30-59
Revision 9d2dd4b0318cda9f1393b1ddd390f7f792d70a2d