Rational Developer for Power Systems Software
V7.6

com.ibm.etools.systems.editor
Class SystemTextEditorProfileDefault

java.lang.Object
  extended by com.ibm.etools.systems.editor.SystemTextEditorProfileDefault
All Implemented Interfaces:
com.ibm.etools.systems.editor.internal.ISystemTextEditorConstants, ISystemTextEditorProfile
Direct Known Subclasses:
QSYSEditorProfile, SystemTextEditorProfileUniversal

public class SystemTextEditorProfileDefault
extends Object
implements ISystemTextEditorProfile, com.ibm.etools.systems.editor.internal.ISystemTextEditorConstants

Default profile used if no profile is defined for a file.


Field Summary
static String Copyright
           
static String DEFAULT_COMPILE_MESSAGE_CLASS_NAME
           
static int SEQUENCE_FALSE
           
static int SEQUENCE_TRUE
           
static int SEQUENCE_UNKNOWN
           
 
Fields inherited from interface com.ibm.etools.systems.editor.internal.ISystemTextEditorConstants
AUTOSAVE_FREQ_ERROR, AUTOSAVE_FREQ_LABEL, AUTOSAVE_FREQ_TOOLTIP, AUTOSAVE_LABEL, AUTOSAVE_PROGRESS, AUTOSAVE_PROGRESS_JOBNAME, AUTOSAVE_TOOLTIP, copyright, PLUGIN_ID, PREFIX, RESID_PREFIX, RESID_PREFIX_PREFERENCES, RESID_PREFIX_PROGRESS, SYSTEM_TEXT_BROWSER_ID, SYSTEM_TEXT_EDITOR_ID
 
Constructor Summary
SystemTextEditorProfileDefault()
           
 
Method Summary
 void addDebugEditorMenuActions(IMenuManager menu, boolean isDebuggable, int currentElement)
          Add debug editor menu actions associated with this profile.
 void addDebugEditorRulerActions(IMenuManager menu, boolean isDebuggable, int currentElement)
          Add debug editor ruler actions associated with this profile.
 MenuManager createContextMenuManager(String text, String id)
          The default implementation returns null.
 void createDebugMenuActions(LpexTextEditor editor)
          Create debug menu actions associated with this profile
 void createDebugRulerActions(LpexTextEditor editor, IVerticalRuler ruler)
          Create debug ruler actions associated with this profile.
 void doSave(LpexTextEditor editor, IProgressMonitor progressMonitor)
          Refreshes the Lpex text area before saving.
 void editorContextMenuAboutToShow(LpexTextEditor editor, IMenuManager menu)
          Called when JLpex's editorContextMenuAboutToShow is called
static int fileHasSequenceNumbers(IFile file)
          Determines whether an IFile has sequence numbers
 IAction getBreakpointRulerAction(LpexTextEditor editor)
          Returns the appropriate breakpoint ruler action associated with this profile.
 long getCompileMessageClassBitMask()
          Get the bit mask for compile message class
 String getCompileMessageClassName()
          Returns the compile message class name.
 IAnnotationModel getDebuggerMarkerAnnotationModel(IResource resource, IEditorInput input)
          Get the debugger marker annotation model for this resource in this profile.
 String getTitle(LpexTextEditor editor)
          Get the title to display in the editor
protected  int hasSequenceNumbers(IFile file)
          Determines whether an IFile has sequence numbers
static int hasSequenceNumbers(InputStream inputStream, String encoding)
          Inspects the content of a stream in order to determine whether the stream contains sequence numbers.
protected  void initializeAsSEU(LpexView lpexView)
          Sets editor sequence numbers
 void initializeLpexView(LpexTextEditor editor, LpexView lpexView)
          Called when JLpex's initializeLpexView is called.
 boolean isEditorInputIncludedInContextMenu()
          Returns whether or not Editor Input actions should be included in the context menu.
 boolean isLocal()
          Queries if the profile is for local resources or remote resources.
 boolean isTargetDebuggable(IDebugTarget dbgtarget)
          Determine if the specified target is debuggable.
 boolean isUniqueContextMenuManagerRequired()
          The default implementation returns false.
 boolean performSaveAs(LpexTextEditor editor, IProgressMonitor progressMonitor)
          The editor's default save as is done by returning true.
 boolean performSaveAs(LpexTextEditor editor, IProgressMonitor progressMonitor, String strFilename)
          The editor's default save as is done by returning true.
 void resetMarkers(LpexTextEditor editor)
          Reset markers associated with the resource being edited.
 void setCompileMessageClassBitMask(long bitMask)
          Set the bit mask for compile message class
 void setCompileMessageClassName(String compileMessageClassName)
          Sets the compile message class name.
 void updateProfile(LpexTextEditor editor)
          Called when JLpex's updateProfile is called.
 void updateProfile(LpexTextEditor editr, LpexView lpexView)
          Called when JLpex's updateProfile is called.
 
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

SEQUENCE_UNKNOWN

public static final int SEQUENCE_UNKNOWN
See Also:
Constant Field Values

SEQUENCE_FALSE

public static final int SEQUENCE_FALSE
See Also:
Constant Field Values

SEQUENCE_TRUE

public static final int SEQUENCE_TRUE
See Also:
Constant Field Values

DEFAULT_COMPILE_MESSAGE_CLASS_NAME

public static final String DEFAULT_COMPILE_MESSAGE_CLASS_NAME
See Also:
Constant Field Values
Constructor Detail

SystemTextEditorProfileDefault

public SystemTextEditorProfileDefault()
Method Detail

doSave

public void doSave(LpexTextEditor editor,
                   IProgressMonitor progressMonitor)
Refreshes the Lpex text area before saving.

Specified by:
doSave in interface ISystemTextEditorProfile

editorContextMenuAboutToShow

public void editorContextMenuAboutToShow(LpexTextEditor editor,
                                         IMenuManager menu)
Description copied from interface: ISystemTextEditorProfile
Called when JLpex's editorContextMenuAboutToShow is called

Specified by:
editorContextMenuAboutToShow in interface ISystemTextEditorProfile
See Also:
The default implementation of this method does nothing.

hasSequenceNumbers

protected int hasSequenceNumbers(IFile file)
Determines whether an IFile has sequence numbers


fileHasSequenceNumbers

public static int fileHasSequenceNumbers(IFile file)
Determines whether an IFile has sequence numbers


hasSequenceNumbers

public static int hasSequenceNumbers(InputStream inputStream,
                                     String encoding)
Inspects the content of a stream in order to determine whether the stream contains sequence numbers. The first four lines are used. The encoding must be a valid non-null String specifying the character encoding of the stream.


initializeAsSEU

protected void initializeAsSEU(LpexView lpexView)
Sets editor sequence numbers


getCompileMessageClassBitMask

public long getCompileMessageClassBitMask()
Get the bit mask for compile message class

Specified by:
getCompileMessageClassBitMask in interface ISystemTextEditorProfile

getCompileMessageClassName

public String getCompileMessageClassName()
Returns the compile message class name.

Returns:
the compile message class name.

setCompileMessageClassName

public void setCompileMessageClassName(String compileMessageClassName)
Sets the compile message class name.

Parameters:
compileMessageClassName - the compile message class name.

getTitle

public String getTitle(LpexTextEditor editor)
Get the title to display in the editor

Specified by:
getTitle in interface ISystemTextEditorProfile
Returns:
the default implementation returns null to let the editor display its default title

initializeLpexView

public void initializeLpexView(LpexTextEditor editor,
                               LpexView lpexView)
Description copied from interface: ISystemTextEditorProfile
Called when JLpex's initializeLpexView is called.

Specified by:
initializeLpexView in interface ISystemTextEditorProfile

isLocal

public boolean isLocal()
Description copied from interface: ISystemTextEditorProfile
Queries if the profile is for local resources or remote resources.

Specified by:
isLocal in interface ISystemTextEditorProfile
Returns:
true if resource is local, false if resource is remote
See Also:
com.ibm.etools.systems.core.edit.ISystemTextEditorProfile#isLocal()

performSaveAs

public boolean performSaveAs(LpexTextEditor editor,
                             IProgressMonitor progressMonitor,
                             String strFilename)
The editor's default save as is done by returning true.

Specified by:
performSaveAs in interface ISystemTextEditorProfile

performSaveAs

public boolean performSaveAs(LpexTextEditor editor,
                             IProgressMonitor progressMonitor)
The editor's default save as is done by returning true.

Specified by:
performSaveAs in interface ISystemTextEditorProfile

setCompileMessageClassBitMask

public void setCompileMessageClassBitMask(long bitMask)
Set the bit mask for compile message class


updateProfile

public void updateProfile(LpexTextEditor editor)
Description copied from interface: ISystemTextEditorProfile
Called when JLpex's updateProfile is called.

Specified by:
updateProfile in interface ISystemTextEditorProfile

updateProfile

public void updateProfile(LpexTextEditor editr,
                          LpexView lpexView)
Description copied from interface: ISystemTextEditorProfile
Called when JLpex's updateProfile is called.

Specified by:
updateProfile in interface ISystemTextEditorProfile

resetMarkers

public void resetMarkers(LpexTextEditor editor)
Reset markers associated with the resource being edited.

Specified by:
resetMarkers in interface ISystemTextEditorProfile

getBreakpointRulerAction

public IAction getBreakpointRulerAction(LpexTextEditor editor)
Returns the appropriate breakpoint ruler action associated with this profile.

Specified by:
getBreakpointRulerAction in interface ISystemTextEditorProfile
Returns:
the breakpoint ruler action, null if there is no such action

createDebugRulerActions

public void createDebugRulerActions(LpexTextEditor editor,
                                    IVerticalRuler ruler)
Create debug ruler actions associated with this profile.

Specified by:
createDebugRulerActions in interface ISystemTextEditorProfile

createDebugMenuActions

public void createDebugMenuActions(LpexTextEditor editor)
Create debug menu actions associated with this profile

Specified by:
createDebugMenuActions in interface ISystemTextEditorProfile

addDebugEditorMenuActions

public void addDebugEditorMenuActions(IMenuManager menu,
                                      boolean isDebuggable,
                                      int currentElement)
Add debug editor menu actions associated with this profile. If the source is not debuggable, leave out the debug actions

Specified by:
addDebugEditorMenuActions in interface ISystemTextEditorProfile

addDebugEditorRulerActions

public void addDebugEditorRulerActions(IMenuManager menu,
                                       boolean isDebuggable,
                                       int currentElement)
Add debug editor ruler actions associated with this profile. If the source is not debuggable, leave out the debug actions

Specified by:
addDebugEditorRulerActions in interface ISystemTextEditorProfile

isTargetDebuggable

public boolean isTargetDebuggable(IDebugTarget dbgtarget)
Determine if the specified target is debuggable. Returns true if the target is debuggable.

Specified by:
isTargetDebuggable in interface ISystemTextEditorProfile

getDebuggerMarkerAnnotationModel

public IAnnotationModel getDebuggerMarkerAnnotationModel(IResource resource,
                                                         IEditorInput input)
Get the debugger marker annotation model for this resource in this profile. Returns an annotation model

Specified by:
getDebuggerMarkerAnnotationModel in interface ISystemTextEditorProfile

isEditorInputIncludedInContextMenu

public boolean isEditorInputIncludedInContextMenu()
Description copied from interface: ISystemTextEditorProfile
Returns whether or not Editor Input actions should be included in the context menu. Example: Run As, Debug As, Team, etc.

Specified by:
isEditorInputIncludedInContextMenu in interface ISystemTextEditorProfile
Returns:
true if editor input actions are to be included in context menu, otherwise false

isUniqueContextMenuManagerRequired

public boolean isUniqueContextMenuManagerRequired()
The default implementation returns false. Subclasses may override.

Specified by:
isUniqueContextMenuManagerRequired in interface ISystemTextEditorProfile
Returns:
true if a unique context menu manager will be provided by this editor profile, false otherwise.
See Also:
ISystemTextEditorProfile.isUniqueContextMenuManagerRequired()

createContextMenuManager

public MenuManager createContextMenuManager(String text,
                                            String id)
The default implementation returns null. Subclasses may override.

Specified by:
createContextMenuManager in interface ISystemTextEditorProfile
Parameters:
text - the text of the menu manager.
id - the id of the menu manager.
Returns:
a menu manager.
See Also:
ISystemTextEditorProfile.createContextMenuManager(java.lang.String, java.lang.String)

Rational Developer for Power Systems Software
V7.6

Copyright 2011 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.