updateProfile command

Use the updateProfile command to update the current document view's profile.

 

Syntax

updateProfile [ all ] 

 

Parameters

all Use the optional parameter all to indicate that you want to update the profiles of all of the document views that are currently open.  Note that if updateProfile has never been issued for a document view, issuing updateProfile all will not affect that document view.

 

Status

The status parameter is not affected by this command.

 

Description

The updateProfile command is normally issued when a document view is created, but it may be issued at any time to allow the document view to reflect changes to the profile.

The following is the sequence of events that occur when the updateProfile command is issued against a document view:

  1. The readonly parameter is set to off.
  2. The includedClasses parameter is set such that all classes are included.
  3. The excludedClasses parameter is set such that no classes are excluded.
  4. Any registered classes are deregistered.
  5. The style characters set by the styleAttributes parameter are cleared.
  6. The popup parameter is reset to default.
  7. The expandTabs parameter is reset to default.
  8. The fields parameter is reset such that there are no editing fields.
  9. The tabs parameter is reset to default.
  10. The base profile is set to the value returned by current.updateProfile.baseProfile.
  11. If the base profile is ispf, seu, or xedit, then:

    • prefixArea is set to on
    • prefixProtect is set to off.

    Otherwise:

    • prefixArea is reset to default
    • prefixProtect is set to on
    • any lines excluded by prefix commands in a previous base profile are shown.

  12. If the base profile is vi, then:

    • commandLine is set to off
    • autoCheck is set to off.

    Otherwise:

    • commandLine is reset to default
    • autoCheck is set to on.

  13. All of the show elements for this view are deleted.
  14. The style parameter for the current view's view of all of the document's elements is reset.
  15. The elementClasses parameter for the current view's view of all of the document's elements is reset.
  16. The color palette is set to the value returned by current.updateProfile.palette.
  17. The built-in styles are assigned style attributes based on the values returned by current.updateProfile.paletteAttributes.style.palette, where style is substituted for each of the built-in styles and palette is the value returned by the palette parameter.  Refer to the styleAttributes parameter for information on the built-in styles.
  18. All of the keys settings are cleared.
  19. All of the mouseEvents settings are cleared.
  20. All of the actions settings are cleared.
  21. New keys settings based on baseProfile are set.
  22. New mouseEvents settings based on baseProfile are set.
  23. New actions settings based on current.updateProfile.userActions are set.
  24. Additional keys settings based on current.updateProfile.userKeyActions are set.
  25. Additional mouseEvents settings based on current.updateProfile.userMouseActions are set.
  26. All of the commands settings are cleared.
  27. New commands settings based on current.updateProfile.userCommands are set.
  28. The user profile from current.updateProfile.userProfile is issued.
  29. If the current view has a parser, the resetParser method of the LpexParser interface is issued, and the parser is discarded.
  30. The parse pending list is cleared.
  31. If current.updateProfile.noParser is set to off, the new parser name is retrieved from current.updateProfile.parser.
  32. If the parser name is associated, the parser name is retrieved from the current.updateProfile.parserAssociation.extension parameter.
  33. The parser class is retrieved from current.updateProfile.parserClass.parserName.
  34. An instance of the parser is created.
  35. The totalParse method of the LpexParser interface is issued.
  36. If the document has a name, the readonly attribute of the underlying file is queried.  If the file is readonly, the readonly parameter for this document view is set to on.
  37. If there are any LpexViewListener objects listening to this view, the updateProfile method is issued.

The updateProfile command must be issued after any change to one or more of the updateProfile. parameters in order to have the change reflected in any of the active document views.

Note that if you are constructing your own LpexView object and you customize it by adding actions, commands, key settings, or mouse event settings, the updateProfile command will eliminate these settings unless you perform these customizations within the updateProfile method of an LpexViewListener.

 

Examples

updateProfile all 
The following sequence changes the base profile of the current document view to xedit:
set updateProfile.baseProfile xedit
updateProfile 

Related concepts
Editor commands, actions, and parameters

Related reference
load command
parse command
actionClass parameter
actions parameter
autoCheck parameter
baseProfile parameter
class parameter
classes parameter
commandClass parameter
commandLine parameter
commands parameter
elementClasses parameter
expandTabs parameter
fields parameter
keyAction parameter
keys parameter
mouseAction parameter
mouseEvents parameter
name parameter
palette parameter
parser parameter
popup parameter
prefixArea parameter
prefixAreaText parameter
prefixProtect parameter
readonly parameter
show parameter
style parameter
styleAttributes parameter
tabs parameter
setParser action
Default editor commands

updateProfile.baseProfile parameter
updateProfile.extensions parameter
updateProfile.noParser parameter
updateProfile.palette parameter
updateProfile.paletteAttributes parameter
updateProfile.palettes parameter
updateProfile.parser parameter
updateProfile.parserAssociation parameter
updateProfile.parserClass parameter
updateProfile.parsers parameter
updateProfile.userActions parameter
updateProfile.userCommands parameter
updateProfile.userKeyActions parameter
updateProfile.userMouseActions parameter