iSeries Remote Systems
v6.0.1

com.ibm.etools.iseries.editor
Class ISeriesEditorParserAction

java.lang.Object
  extended byorg.eclipse.jface.action.Action
      extended byorg.eclipse.ui.texteditor.ResourceAction
          extended byorg.eclipse.ui.texteditor.TextEditorAction
              extended bycom.ibm.etools.iseries.editor.ISeriesEditorParserAction
All Implemented Interfaces:
IAction, IUpdate, com.ibm.lpex.core.LpexAction
Direct Known Subclasses:
EnterKeyCOBOLAction, EnterKeyRPGAction, SelectFormatLineAction, ShowIndentationAction

public class ISeriesEditorParserAction
extends TextEditorAction
implements com.ibm.lpex.core.LpexAction


Field Summary
protected  boolean _bDisabledWhenOffline
          indicates whether or not the action should be disabled when work offline is selected
protected static ResourceBundle _bundle
           
protected  IISeriesEditorParser _parser
           
protected  String _strId
           
protected  String _strPrefix
           
static String copyright
           
protected  boolean m_enabled
           
protected  boolean m_enabledSet
           
 
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, IMAGE, RESULT, TEXT, TOOL_TIP_TEXT
 
Constructor Summary
ISeriesEditorParserAction(IISeriesEditorParser parser, String strId, String strPrefix, ITextEditor editor)
          Constructor.
ISeriesEditorParserAction(IISeriesEditorParser parser, String strId, String strPrefix, String strHelpContextId, ITextEditor editor)
          Constructor with Help ContextId.
 
Method Summary
 boolean available(com.ibm.lpex.core.LpexView view)
          If disableWhenOffline is set, the the action is available when not working offline.
 void doAction(com.ibm.lpex.core.LpexView view)
           
 int getAccelerator()
          Return "no accelerator" for this action.
 String getId()
          Returns the action identifier.
protected  void removeAccelerator(com.ibm.lpex.core.LpexView lpexView, int actionId)
          Method removeAccelerator.
 void run()
          Declared in Action.
 void setDisabledWhenOffline(boolean value)
          Method setDisabledWhenOffline.
 void setEnabled(boolean value)
           
 void update()
          If disableWhenOffline is set, the the action is enabled when not working offline.
 
Methods inherited from class org.eclipse.ui.texteditor.TextEditorAction
canModifyEditor, getTextEditor, setEditor, validateEditorInputState
 
Methods inherited from class org.eclipse.ui.texteditor.ResourceAction
getString, initialize, setHelpContextId
 
Methods inherited from class org.eclipse.jface.action.Action
addPropertyChangeListener, convertAccelerator, convertAccelerator, findKeyCode, findKeyString, findModifier, findModifierString, firePropertyChange, firePropertyChange, getActionDefinitionId, getDescription, getDisabledImageDescriptor, getHelpListener, getHoverImageDescriptor, getImageDescriptor, getMenuCreator, getStyle, getText, getToolTipText, isChecked, isEnabled, notifyResult, removeAcceleratorText, removeMnemonics, removePropertyChangeListener, runWithEvent, setAccelerator, setActionDefinitionId, setChecked, setDescription, setDisabledImageDescriptor, setHelpListener, setHoverImageDescriptor, setId, setImageDescriptor, setMenuCreator, setText, setToolTipText
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

copyright

public static final String copyright
See Also:
Constant Field Values

_bundle

protected static ResourceBundle _bundle

_parser

protected IISeriesEditorParser _parser

_strId

protected String _strId

_strPrefix

protected String _strPrefix

m_enabledSet

protected boolean m_enabledSet

m_enabled

protected boolean m_enabled

_bDisabledWhenOffline

protected boolean _bDisabledWhenOffline
indicates whether or not the action should be disabled when work offline is selected

Constructor Detail

ISeriesEditorParserAction

public ISeriesEditorParserAction(IISeriesEditorParser parser,
                                 String strId,
                                 String strPrefix,
                                 ITextEditor editor)
Constructor.


ISeriesEditorParserAction

public ISeriesEditorParserAction(IISeriesEditorParser parser,
                                 String strId,
                                 String strPrefix,
                                 String strHelpContextId,
                                 ITextEditor editor)
Constructor with Help ContextId.

Method Detail

getAccelerator

public int getAccelerator()
Return "no accelerator" for this action. Overrides org.eclipse.jface.action.Action's to circumvent a bug

Specified by:
getAccelerator in interface IAction
See Also:
com.ibm.lpex.core#LpexContextContributor.LpexEditorAction.getAccelerator()

removeAccelerator

protected void removeAccelerator(com.ibm.lpex.core.LpexView lpexView,
                                 int actionId)
Method removeAccelerator. Reformats the text for the action removing the accelerator.

Parameters:
lpexView - the LpexView for this action
actionId - the LPEX id for this action.

getId

public String getId()
Returns the action identifier.

Specified by:
getId in interface IAction

run

public void run()
Declared in Action.

Specified by:
run in interface IAction

doAction

public void doAction(com.ibm.lpex.core.LpexView view)
Specified by:
doAction in interface com.ibm.lpex.core.LpexAction
See Also:
LpexAction.doAction(LpexView)

available

public boolean available(com.ibm.lpex.core.LpexView view)
If disableWhenOffline is set, the the action is available when not working offline. Otherwise the action is always available.

Specified by:
available in interface com.ibm.lpex.core.LpexAction
See Also:
LpexAction.available(LpexView)

setDisabledWhenOffline

public void setDisabledWhenOffline(boolean value)
Method setDisabledWhenOffline. Use to set whether or not this action should be disabled when work offline is connection. Default is false.

Parameters:
value - true if the action should be enabled when working offline, false otherwise

update

public void update()
If disableWhenOffline is set, the the action is enabled when not working offline. Otherwise the action is always enabled.

Specified by:
update in interface IUpdate
See Also:
IUpdate.update()

setEnabled

public void setEnabled(boolean value)
Specified by:
setEnabled in interface IAction

iSeries Remote Systems
v6.0.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.