GuiAbapEditor Object

Methods

The GuiAbapEditor object represents the new ABAP editor control available as of SAP_BASIS release 6.20 (see also SAP Note 930742). GuiAbapEditor extends GuiShell.

Method

Syntax

Description

All methods of the GuiVComponent Object:
  • DumpState
  • SetFocus
  • Visualize

All methods of the GuiContainer Object:

  • FindById

All methods of the GuiVContainer Object:

  • FindAllByName
  • FindAllByNameEx
  • FindByName
  • FindByNameEx

All methods of the GuiShell Object:

  • SelectContextMenuItem
  • SelectContextMenuItemByPosition
  • SelectContextMenuItemByText
AutoBraceEnabled
Public Function AutoBraceEnabled() As Byte

Returns True if the auto brace facility is currently switched on.

AutoComplete
Public Sub AutoComplete()

Invokes the auto complete list box.

AutoCorrectEnabled
Public Function AutoCorrectEnabled() As Byte

Returns True if the auto correct facility is currently switched on.

AutoExpand
Public Sub AutoExpand()

Invokes the auto expand code template mechanism.

AutoIndentEnabled
Public Function AutoIndentEnabled() As Byte

Returns True if the auto indent facility is currently switched on.

Capitalize
Public Sub Capitalize()

Makes the first alphabetic character of each word in the selected text uppercase. All other characters are made lower case.

ClipboardCopy
Public Sub ClipboardCopy()

Performs a clipboard copy operation on the currently selected text.

ClipboardCut
Public Sub ClipboardCut()

Performs a clipboard cut operation on the currently selected text.

ClipboardPaste
Public Sub ClipboardPaste()

Pastes the current contents of the clipboard beginning from the current cursor position.

ClipboardRingPaste
Public Sub ClipboardRingPaste( _ 
ByVal Index As Long _
 )

Pastes an entry from the editor's clipboard ring to the editor. Index : One-based index of the clipboard entry as it appears in the ABAP editor context menu.

CodeHintsEnabled
Public Function CodeHintsEnabled() As Byte

Returns True if code hints are currently enabled.

CommentSelectedLines
Public Sub CommentSelectedLines()

Encloses the selected lines in comments.

CorrectCapsEnabled
Public Function CorrectCapsEnabled() As Byte

Returns True if the correct caps function is currently switched on.

Delete
Public Sub Delete()

Deletes the character, which proceeds the current cursor position. Equivalent to pressing the <DEL> key.

DeleteBack
Public Sub DeleteBack()

Moves the cursor to the previous column, deleting the character currently residing there. Equivalent to pressing the backspace key.

DeleteRange
Public Sub DeleteRange( _ 
   ByVal LineStart As Long, _
   ByVal ColumnStart As Long, _
   ByVal LineEnd As Long, _
   ByVal ColumnEnd As Long _ 
)
Defines a region of text for deletion.
  • LineStart specifies the line number from where deletion is to begin.
  • ColumnStart (p2) specifies the number of the column from where deletion is to begin.
  • LineEnd (p3) specifies the number of the line where deletion will end.
  • ColumnEnd (p4) specifies the number of the column where deletion will end.
DeleteSelection
Public Sub DeleteSelection()

Deletes the currently selected text.

DeleteWord
Public Sub DeleteWord()

Deletes the word, which proceeds the current character position.

DeleteWordBack
Public Sub DeleteWordBack()

Deletes the word, which precedes the current cursor position.

DuplicateLine
Public Sub DuplicateLine()

Takes the contents of the line upon which the cursor currently resides and inserts a copy of the line contents on the line below the cursor.

FormatSelectedLines
Public Sub FormatSelectedLines()

Formats the selected lines according to "Pretty Printer" and "Formatting" settings e.g. Auto Indent, Smart Tab.

GetAutoCompleteEntryCount
Public Function GetAutoCompleteEntryCount() As Long

Returns the number of available entries displayed in the auto completion list box.

GetAutoCompleteEntryText
Public Function GetAutoCompleteEntryText( _
   ByVal Index As Long _
) As String

Returns a string representing the auto completion list box entry corresponding to the index supplied as a parameter.

GetAutoCompleteIconType
Public Function GetAutoCompleteIconType( _
   ByVal Index As Long _
) As String

Returns the index of the image associated with the auto complete entry specified in Index. Returns -1 if no image is associated.

GetAutoCompleteSubIconType
Public Function GetAutoCompleteSubIconType( _
   ByVal Index As Long _
) As String

Returns the index of the sub image associated with the auto complete entry specified in Index. Returns -1 if no sub image is associated.

GetAutoCompleteToolbarButtonToolTip
Public Function GetAutoCompleteToolbarButtonToolTip( _
   ByVal Index As Long _
) As String

Returns the tooltip text, which is displayed by the autocomplete toolbar button specified in Index.

GetAutoCompleteToolTipDelay
Public Function GetAutoCompleteToolTipDelay() As Long

Returns the number of milliseconds, which elapse between highlighting an entry in the autocomplete listbox and the appearance of the corresponding tooltip window.

GetCurrentToolTipText
Public Function GetCurrentToolTipText() As String

Retrieves the text in the currently displayed code hint or autocomplete listbox tooltip window. Multiple lines are separated with \n characters.

GetCursorColumnPosition
Public Function GetCursorColumnPosition() As Long

Returns the column number in which the cursor currently resides.

GetCursorLinePosition
Public Function GetCursorLinePosition() As Long

Returns the number of the line upon which the cursor currently resides.

GetFirstVisibleLine
Public Function GetFirstVisibleLine() As Long

Returns the line number of the top-most visible line in the current editor session.

GetHTMLClipboardContents
Public Function GetHTMLClipboardContents() As String

Returns a string containing the current contents of the clipboard in HTML format. Returns an empty string if the clipboard does not contain anything in HTML format.

GetLastVisibleLine
Public Function GetLastVisibleLine() As Long

Returns the line number of the bottom-most visible line in the current editor session.

GetLineCount
Public Function GetLineCount() As Long

Returns the total number of lines contained in the document in the current session.

GetLineText
Public Function GetLineText( _
   ByVal Line As Long _
) As String

Returns a string containing the contents of the line number specified as a parameter.

GetNumberedBookmarks
Public Function GetNumberedBookmarks( _
   ByVal Line As Long _
) As Object

Returns a collection of bookmark numbers assigned to the line number passed as a parameter. The number of the bookmark can range from 0 to 9. If no numbered bookmark is assigned then the collection is empty.

GetRTFClipboardContents
Public Function GetRTFClipboardContents() As String

Returns a string containing the current contents of the clipboard in Rich Text format. Returns an empty string if the clipboard does not contain anything in Rich Text format.

GetSelectedAutoComplete
Public Function GetSelectedAutoComplete() As Long

Returns the zero based index of the currently selected entry in the auto completion list box. The method will return -1 if no entry is selected.

GetSelectedText
Public Function GetSelectedText() As String

Returns a string containing the text currently highlighted or selected in the editor session. If the selected text spans more than one line then any line terminator characters will be included in the string returned by this method.

GetStructureBlockEndLine
Public Function GetStructureBlockEndLine( _
   ByVal Line As Long _
) As Long

Returns the end line of the structure block relevant to the line number passed to the method. If the line does not reside within a structure block at all then the method returns -1.

GetStructureBlockStartLine
Public Function GetStructureBlockStartLine( _
   ByVal Line As Long _
) As Long

Returns the start line of the structure block relevant to the line number passed to the method. If the line resides within a nested block then the start line of the innermost block will be returned. If the line does not reside within a structure block at all then the method returns -1.

GetUndoPosition
Public Function GetUndoPosition() As Long

Returns the current position of the document in the undo/redo buffer.

GetWordWrapMode
Public Function GetWordWrapMode() As Long
Returns an integer corresponding to the currently set Word wrap mode:
  • 0 - Word wrap disabled.

  • 1 - Wrap at edge of window.
  • 2 - Wrap by page width.
  • 3 - Wrap by page width inserting hard break.
GetWordWrapPosition
Public Function GetWordWrapPosition() As Long

Returns the current page width assigned to word wrap. The number returned is the number of columns after which word wrap will be applied.

GoNextBookMark
Public Sub GoNextBookMark()

Navigates to the line where the next none numbered bookmark is set.

GoNumberedBookmark
Public Sub GoNumberedBookmark( _
    ByVal Mark As Long _ 
)

Navigates to the line where the bookmark numbered Mark resides.

GoPreviousBookMark
Public Sub GoPreviousBookMark()

Navigates to the line where the previous none numbered bookmark is set.

InsertTab
Public Sub InsertTab()

Inserts a TAB at the current cursor position. Equivalent to pressing the TAB key.

InsertText
Public Sub InsertText( _
    ByVal Text As String, _
    ByVal Line As Long, _
    ByVal Column As Long _ 
)

Places the text specified in Text at the position specified in Line and Column as if the text had been typed into the editor from the keyboard.

IsAutoCompleteEntryBold
Public Function IsAutoCompleteEntryBold( _
   ByVal Index As Long _
) As Byte

Returns True if the auto complete entry specified in Index is bold.

IsAutoCompleteOpen
Public Function IsAutoCompleteOpen() As Byte

Returns True if the auto completion list box is currently open.

IsAutoCompleteToolbarButtonPressed
Public Function IsAutoCompleteToolbarButtonPressed( _
   ByVal Index As Long _
) As Byte

Returns True if the autocomplete toolbar button specified in Index is currently pressed. Otherwise False is returned.

IsAutoCompleteToolTipVisible
Public Function IsAutoCompleteToolTipVisible() As Byte

Returns True if the tooltip corresponding to an entry in the auto complete listbox is currently visible.

IsBookmark
Public Function IsBookmark( _
   ByVal Line As Long _
) As Byte

Returns True if the line is bookmarked with a standard bookmark which is not numbered. The method does not provide information about whether the line is marked using a numbered bookmark.

IsBreakpointSet
Public Function IsBreakpointSet( _
   ByVal Line As Long _
) As Byte

Returns True if a breakpoint is set on the line number passed in as a parameter.

IsLineCollapsed
Public Function IsLineCollapsed( _
   ByVal Line As Long _
) As Byte

Returns True if the line number passed to it corresponds to a line, which signifies the beginning of a collapsible block, which is currently in the collapsed state.

IsLineComment
Public Function IsLineComment( _
   ByVal Line As Long _
) As Byte

Returns True if the line number specified in Line contains comments. Otherwise False is returned.

IsLineModified
Public Function IsLineModified( _
   ByVal Line As Long _
) As Byte

Returns True if the line has been modified during the course of the current editor session.

IsModified
Public Function IsModified() As Byte

Returns True if any part of the current document has been modified during \ the course of the current editor session.

JoinSelectedLines
Public Sub JoinSelectedLines()

Merges currently selected lines of text into a single line of text.

LowerCase
Public Sub LowerCase()

Forces selected text into lower case.

MoveCursorDocumentEnd
Public Sub MoveCursorDocumentEnd()

Positions the cursor in the last column of the very last line of the document.

MoveCursorLineDown
Public Sub MoveCursorLineDown()

Moves the cursor down one line from its current position.

MoveCursorLineEnd
Public Sub MoveCursorLineEnd()

Positions the cursor in the last column of the current line.

MoveCursorLineHome
Public Sub MoveCursorLineHome()

Positions the cursor in the first column of the current line.

MoveCursorLineUp
Public Sub MoveCursorLineUp()

Moves the cursor up one line from its current position.

MoveLineDown
Public Sub MoveLineDown()

Moves the contents of the line where the cursor resides to the line below and moves the contents of the line below the cursor up one line.

MoveLineUp
Public Sub MoveLineUp()

Moves the contents of the line where the cursor resides to the line above and moves the contents of the line above the cursor down one line.

MoveWordLeft
Public Sub MoveWordLeft()

Moves the cursor to the column preceding the next word found to the left of the cursor's current position.

MoveWordRight
Public Sub MoveWordRight()

Moves the cursor to the column preceding the next word found to the right of the cursor's current position.

OverwriteModeEnabled
Public Function OverwriteModeEnabled() As Byte

Returns True if Overwrite mode is enabled, False if in Insert mode.

RemoveAllBookmarks
Public Sub RemoveAllBookmarks()

Removes all types of bookmarks from the document. Both numbered and none numbered bookmarks are removed.

RemoveAllBreakpoints
Public Sub RemoveAllBreakpoints()

Removes all breakpoints from the current document.

RemoveBookmarks
Public Sub RemoveBookmarks( _
    ByVal Bookmarks As String _
)

Removes all bookmarks specified in the supplied string.

RemoveBreakpoint
Public Sub RemoveBreakpoint( _
    ByVal Line As Long _
)

Removes the breakpoint on line number Line.

ReplaceSelection
Public Sub ReplaceSelection( _
    ByVal Text As String _
)

Replaces the currently selected text with the text contained in the Text parameter.

SaveToFile
Public Sub SaveToFile( _
    ByVal p1 As String _
)

ScrollToLine
Public Sub ScrollToLine( _
    ByVal Line As Long _
)

Scrolls to the line number specified in Line if not already visible on the screen.

SelectAll
Public Sub SelectAll()

Highlights all text in the current document for selection.

SelectBlockRange
Public Sub SelectBlockRange( _
    ByVal LineStart As Long, _
    ByVal ColumnStart As Long, _
    ByVal LineEnd As Long, _
    ByVal ColumnEnd As
    Long _ 
)
Highlights a region of text in block mode for selection. Equivalent to holding down the ALT key while dragging the mouse over the text.
  • LineStart specifies the line number from where selection is to begin.

  • ColumnStart specifies the number of the column from where selection is to begin.
  • LineEnd specifies the number of the line where selection will end.
  • ColumnEnd specifies the number of the column where selection will end.
SelectRange
Public Sub SelectRange( _
    ByVal LineStart As Long, _
    ByVal ColumnStart As Long, _
    ByVal LineEnd As Long, _
    ByVal ColumnEnd As
    Long _ 
)
Highlights a region of text for selection.
  • LineStart specifies the line number from where selection is to begin.

  • ColumnStart specifies the number of the column from where selection is to begin.
  • LineEnd specifies the number of the line where selection will end.
  • ColumnEnd specifies the number of the column where selection will end.
SelectWordLeft
Public Sub SelectWordLeft()

Selects the word to the left of the current cursor position.

SelectWordRight
Public Sub SelectWordRight()

Selects the word to the right of the current cursor position.

Sentencize
Public Sub Sentencize()

Makes the first character of each sentence upper case. Sentences are delimited by "." characters. All other characters are made lower case.

SetAutoBrace
Public Sub SetAutoBrace( _
    ByVal Status As Byte _
)

Switches the auto brace facility on or off.

SetAutoCorrect
Public Sub SetAutoCorrect( _
    ByVal Status As Byte _
)

Switches the auto complete facility on or off.

SetAutoIndent
Public Sub SetAutoIndent( _
    ByVal Status As Byte _ 
)

Switches the auto indent facility on or off.

SetBookmarks
Public Sub SetBookmarks( _
    ByVal Bookmarks As String _ 
)

Set bookmarks.

Takes a string of the following format:

<line>[(<no>)][,<line>] e.g. "10(1),22(2),33,42", <line>={1,...,n}, <no>={1,...

SetBreakpoint
Public Sub SetBreakpoint( _
    ByVal Line As Long _ 
)

Sets a breakpoint on line number Line.

SetCodeHints
Public Sub SetCodeHints( _
    ByVal Status As Byte _ )

Switches code hints on or off.

SetCorrectCaps
Public Sub SetCorrectCaps( _
    ByVal Status As Byte _ 
)

Switches the caps correction feature on or off.

SetLineFeedStyle
Public Sub SetLineFeedStyle( _
    ByVal p1 As Long _ 
)

SetOverwriteMode
Public Sub SetOverwriteMode( _
    ByVal Status As Byte _ 
)

Switches between Insert and Overwrite modes. If called with True then Overwrite mode is enabled. Otherwise the editor is in Insert mode.

SetSelectionPosInLine
Public Sub SetSelectionPosInLine( _
    ByVal Line As Long, _
    ByVal Column As
    Long _ 
)

Places the cursor on line <Line> and column <Column>.

SetSmartTab
Public Sub SetSmartTab( _
    ByVal Status As Byte _ 
)

Switches the smart tab facility on or off.

SetWordWrapMode
Public Sub SetWordWrapMode( _
    ByVal Mode As Long _ 
)

Sets the word wrap mode according to the number supplied in Mode:

  • 0 - Word wrap disabled.

  • 1 - Wrap at edge of window.
  • 2 - Wrap by page width.
  • 3 - Wrap by page width inserting hard break.
SetWordWrapPosition
Public Sub SetWordWrapPosition( _
    ByVal Pos As Long _ 
)

Pos specifies the number of columns to be displayed before word wrap is applied.

SmartTabEnabled
Public Function SmartTabEnabled() As Byte

Switches the smart tab facility on or off.

SortSelectedLines
Public Sub SortSelectedLines()

Rearranges the selected lines in alphanumeric order.

SwapCase
Public Sub SwapCase()

Inverts the case setting for the selected text. Upper case characters are switched to lower case and vice versa.

ToggleCapsLock
Public Sub ToggleCapsLock()

Switches caps lock on or off.

ToggleNumberedBookmark
Public Sub ToggleNumberedBookmark( _
    ByVal Mark As Long, _
    ByVal Line As
    Long _ 
)

Toggles the state of the numbered bookmark Mark on line Line. If a book mark with the number Mark already exists on Line then it will be removed. Otherwise it will be added.

ToggleStructureBlock
Public Sub ToggleStructureBlock( _
    ByVal Line As Long _ 
)

If the line number specified in Line is the first line of a collapsible block of code then this method will toggle the expanded/collapsed status of the block.

TransposeLine
Public Sub TransposeLine()

Swaps the contents of the line where the cursor currently resides with the contents of the line above the current cursor position.

UncommentSelectedLines
Public Sub UncommentSelectedLines()

Removes comments from the selected lines.

Undo
Public Sub Undo( _
    ByVal UndoPosition As Long _ 
)

Performs either an undo or a redo depending on UndoPosition. UndoPosition specifies a zero based position in the undo/redo buffer. If -1 is passed then a single step undo is preformed.

UnTab
Public Sub UnTab()

Removes a TAB at the current cursor position. Equivalent to pressing <SHIFT> + <TAB>.

UpperCase
Public Sub UpperCase()

Forces selected text into upper case.

Properties

Property

Syntax

Description

All properties of the GuiComponent Object:
  • ContainerType
  • Id
  • Name
  • Parent
  • Type
  • TypeAsNumber
All properties of the GuiVComponent Object:
  • AccLabelCollection
  • AccText
  • AccTextOnRequest
  • AccTooltip
  • Changeable
  • DefaultTooltip
  • Height
  • IconName
  • IsSymbolFont
  • Left
  • Modified
  • ParentFrame
  • ScreenLeft
  • ScreenTop
  • Text
  • Tooltip
  • Top
  • Width

All properties of the GuiContainer Object:

  • Children

All properties of the GuiShell Object:

  • AccDescription
  • DragDropSupported
  • Handle
  • OcxEvents
  • SubType