Synatx Highlighting

Topics: Developer Forum
Jul 29, 2012 at 4:38 PM

Hi,

I'm building myself a small editor to work with Progress 4GL/OpenEdge based on the SCide example.

I've defined the following xml as a stating point to try and get something working

<?xml version="1.0" encoding="utf-8"?>
<ScintillaNET>
  <Language Name="OpenEdge">
    <Lexer LexerName="progress" LineCommentPrefix="/*" StreamCommentPrefix="/* " StreamCommentSuffix=" */" >
      <Properties>
        <Property Name="fold.comment" Value="1" />
      </Properties>

      <Keywords List="0">
        absolute accelerator accumulate across active-window add add-buffer add-calc-column add-columns-from add-events-procedure add-fields-from add-first add-index-field add-last add-like-column add-like-field add-like-index add-new-field add-new-index add-super-procedure adm-data advise alert-box alias all allow-column-searching allow-replication alter alternate-key always-on-top ambiguous and ansi-only any anywhere append append-child appl-alert-boxes application apply appserver-info appserver-password appserver-userid array-message as as-cursor ascending ask-overwrite assign async-request-count async-request-handle asynchronous at attachment attr-space attribute-names attribute-type authorization auto-completion auto-delete-xml auto-end-key auto-endkey auto-go auto-indent auto-resize auto-return auto-validate auto-zap automatic available available-formats average avg background backwards base-ade base-key batch-mode before-hide begins bell between bgcolor big-endian binary bind-where blank block-iteration-display border-bottom border-bottom-chars border-bottom-pixels border-left border-left-chars border-left-pixels border-right border-right-chars border-right-pixels border-top border-top-chars border-top-pixels both bottom box box-selectable break browse browse-column-data-types browse-column-formats browse-column-labels browse-header btos buffer buffer-chars buffer-compare buffer-copy buffer-create buffer-delete buffer-field buffer-handle buffer-lines buffer-name buffer-release buffer-value button buttons by by-pointer by-variant-pointer byte bytes-read bytes-written cache cache-size call call-name call-type can-create can-delete can-do can-find can-query can-read can-set can-write cancel-break cancel-button cancel-requests cancelled caps careful-paint case case-sensitive cdecl centered chained char character character_length charset check checked child-num choose chr clear clear-selection client-connection-id client-type clipboard clone-node close code codebase-locator codepage codepage-convert col col-of collate colon colon-aligned color color-table column column-bgcolor column-dcolor column-fgcolor column-font column-label column-label-bgcolor column-label-dcolor column-label-fgcolor column-label-font column-label-height-chars column-label-height-pixels column-movable column-of column-pfcolor column-read-only column-resizable column-scrolling columns com-handle com-self combo-box command compares compile compiler complete component-handle component-self config-name connect connected constrained contains contents context context-help context-help-file context-help-id context-popup control control-box control-container control-frame convert convert-3d-colors convert-to-offset count count-of coverage cpcase cpcoll cpinternal cplog cpprint cprcodein cprcodeout cpstream cpterm crc-value create create-like create-node create-node-namespace create-on-add create-result-list-entry create-test-file ctos current current-changed current-column current-environment current-iteration current-language current-result-row current-row-modified current-value current-window current_date cursor cursor-char cursor-line cursor-offset data-bind data-entry-return data-type database dataservers date date-format day db-references dbcodepage dbcollation dbname dbparam dbrestrictions dbtaskid dbtype dbversion dcolor dde dde-error dde-id dde-item dde-name dde-topic deblank debug debug-alert debug-list debugger dec decimal decimals declare def default default-buffer-handle default-button default-commit default-extension default-noxlate default-window defer-lob-fetch define defined delete delete-char delete-current-row delete-line delete-node delete-result-list-entry delete-selected-row delete-selected-rows delimiter descending description deselect-focused-row deselect-rows deselect-selected-row detach dialog-box dialog-help dictionary dir directory disable disable-auto-zap disable-connections disable-dump-triggers disable-load-triggers disabled disconnect disp display display-message display-type distinct do dos double down drag-enabled drop drop-down drop-down-list drop-target dump dynamic dynamic-function each echo edge edge-chars edge-pixels edit-can-paste edit-can-undo edit-clear edit-copy edit-cut edit-paste edit-undo editing editor else empty empty-temp-table enable enable-connections enabled encode encoding end end-file-drop end-key end-user-prompt endif endkey entered entry eq error error-column error-row error-status escape etime event-procedure event-procedure-context event-type events except exclusive exclusive-id exclusive-lock exclusive-web-user execute execution-log exists exp expand expandable explicit export extended extent external extract false fetch fetch-selected-row fgcolor field fields file file-access-date file-access-time file-create-date file-create-time file-information file-mod-date file-mod-time file-name file-offset file-size file-type filename fill fill-in filled filters find find-by-rowid find-case-sensitive find-current find-first find-global find-last find-next-occurrence find-prev-occurrence find-select find-unique find-wrap-around finder first first-async-request first-buffer first-child first-column first-of first-procedure first-server first-server-socket first-socket first-tab-item fit-last-column fixed-only flat-button float focus focused-row focused-row-selected font font-table for force-file foreground form form-input format forward forwards frame frame-col frame-db frame-down frame-field frame-file frame-index frame-line frame-name frame-row frame-spacing frame-value frame-x frame-y frequency from from-chars from-current from-pixels fromnoreorder full-height full-height-chars full-height-pixels full-pathname full-width full-width-chars full-width-pixels function function-call-type gateways ge generate-md5 get get-attr-call-type get-attribute get-attribute-node get-bits get-blue-value get-browse-column get-buffer-handle get-byte get-byte-order get-bytes get-bytes-available get-cgi-list get-cgi-value get-child get-codepages get-collations get-config-value get-current get-document-element get-double get-dropped-file get-dynamic get-file get-first get-float get-green-value get-index-by-namespace-name get-index-by-qname get-iteration get-key-value get-last get-localname-by-index get-long get-message get-next get-number get-parent get-pointer-value get-prev get-printers get-qname-by-index get-red-value get-repositioned-row get-rgb-value get-selected-widget get-short get-signature get-size get-socket-option get-string get-tab-item get-text-height get-text-height-chars get-text-height-pixels get-text-width get-text-width-chars get-text-width-pixels get-type-by-index get-type-by-namespace-name get-type-by-qname get-unsigned-short get-uri-by-index get-value-by-index get-value-by-namespace-name get-value-by-qname get-wait-state getbyte global go-on go-pending grant graphic-edge grayed grid-factor-horizontal grid-factor-vertical grid-set grid-snap grid-unit-height grid-unit-height-chars grid-unit-height-pixels grid-unit-width grid-unit-width-chars grid-unit-width-pixels grid-visible group gt handle handler has-records having header height height-chars height-pixels help help-context help-topic helpfile-name hidden hide hint horizontal host-byte-order html-charset html-end-of-line html-end-of-page html-frame-begin html-frame-end html-header-begin html-header-end html-title-begin html-title-end hwnd icfparameter icon if image image-down image-insensitive image-size image-size-chars image-size-pixels image-up immediate-display import import-node in in-handle increment-exclusive-id index index-hint index-information indexed-reposition indicator information init initial initial-dir initial-filter initialize-document-type initiate inner inner-chars inner-lines input input-output input-value insert insert-backtab insert-before insert-file insert-row insert-string insert-tab int integer internal-entries into invoke is is-attr-space is-lead-byte is-open is-parameter-set is-row-selected is-selected is-xml item items-per-row join join-by-sqldb kblabel keep-connection-open keep-frame-z-order keep-messages keep-security-cache keep-tab-order key key-code key-function key-label keycode keyfunction keylabel keys keyword keyword-all label label-bgcolor label-dcolor label-fgcolor label-font label-pfcolor labels landscape languages large large-to-small last last-async-request last-child last-event last-key last-of last-procedure last-server last-server-socket last-socket last-tab-item lastkey lc ldbname le leading leave left left-aligned left-trim length library like line line-counter list-events list-item-pairs list-items list-query-attrs list-set-attrs list-widgets listing listings literal-question little-endian load load-from load-icon load-image load-image-down load-image-insensitive load-image-up load-mouse-pointer load-picture load-small-icon local-host local-name local-port locator-column-number locator-line-number locator-public-id locator-system-id locator-type locked log log-id log logical long lookahead lookup lower lt machine-class mandatory manual-highlight map margin-extra margin-height margin-height-chars margin-height-pixels margin-width margin-width-chars margin-width-pixels matches max max-button max-chars max-data-guess max-height max-height-chars max-height-pixels max-rows max-size max-value max-width max-width-chars max-width-pixels maximize maximum member memptr memptr-to-node-value menu menu-bar menu-item menu-key menu-mouse menubar message message-area message-area-font message-line message-lines min min-button min-column-width-chars min-column-width-pixels min-height min-height-chars min-height-pixels min-row-height min-row-height-chars min-row-height-pixels min-size min-value min-width min-width-chars min-width-pixels minimum mod modified modulo month mouse mouse-pointer movable move-after-tab-item move-before-tab-item move-column move-to-bottom move-to-eof move-to-top mpe multiple multiple-key multitasking-interval must-exist name namespace-prefix namespace-uri native ne needs-appserver-prompt needs-prompt new new-row next next-column next-prompt next-sibling next-tab-item next-value no no-apply no-array-message no-assign no-attr no-attr-list no-attr-space no-auto-validate no-bind-where no-box no-column-scrolling no-console no-convert no-convert-3d-colors no-current-value no-debug no-drag no-echo no-empty-space no-error no-fill no-focus no-help no-hide no-index-hint no-join-by-sqldb no-labels no-lock no-lookahead no-map no-message no-pause no-prefetch no-return-value no-row-markers no-scrollbar-vertical no-scrolling no-separate-connection no-separators no-tab-stop no-underline no-undo no-validate no-wait no-word-wrap node-type node-value node-value-to-memptr none normalize not null num-aliases num-buffers num-buttons num-children num-columns num-copies num-dbs num-dropped-files num-entries num-fields num-formats num-items num-iterations num-lines num-locked-columns num-messages num-parameters num-replaced num-results num-selected num-selected-rows num-selected-widgets num-tabs num-to-retain num-visible-columns numeric numeric-decimal-point numeric-format numeric-separator object octet_length of off ok ok-cancel old ole-invoke-locale ole-names-locale on on-frame-border open opsys option or ordered-join ordinal orientation os-append os-command os-copy os-create-dir os-delete os-dir os-drives os-error os-getenv os-rename os2 os400 otherwise outer outer-join output overlay override owner owner-document page page-bottom page-number page-size page-top page-width paged parameter parent parse-status partial-key pascal pathname pause pdbname performance persistent persistent-cache-disabled persistent-procedure pfcolor pixels pixels-per-column pixels-per-row popup-menu popup-only portrait position precision prepare-string prepared preprocess preselect prev prev-column prev-sibling prev-tab-item primary printer printer-control-handle printer-hdc printer-name printer-port printer-setup private private-data privileges proc-handle proc-status procedure procedure-call-type procedure-name process profile-file profiler profiling program-name progress progress-source prompt prompt-for promsgs propath proversion proxy proxy-password proxy-userid public-id publish published-events put put-bits put-byte put-bytes put-double put-float put-key-value put-long put-short put-string put-unsigned-short putbyte query query-close query-off-end query-open query-prepare query-tuning question quit quoter r-index radio-buttons radio-set random raw raw-transfer rcode-information read read-available read-exact-num read-file read-only readkey real recid record-length rectangle recursive refresh refreshable release remote remote-host remote-port remove-attribute remove-child remove-events-procedure remove-super-procedure repeat replace replace-child replace-selection-text replication-create replication-delete replication-write reposition reposition-backwards reposition-forwards reposition-to-row reposition-to-rowid request resizable resize result retain retain-shape retry retry-cancel return return-inserted return-to-start-dir return-value return-value-data-type returns reverse-from revert revoke rgb-value right right-aligned right-trim round row row-height row-height-chars row-height-pixels row-markers row-of row-resizable rowid rule rule-row rule-y run run-procedure save save-as save-file sax-attributes sax-complete sax-parse sax-parse-first sax-parse-next sax-parser-error sax-reader sax-running sax-uninitialized sax-xml schema schema-path screen screen-io screen-lines screen-value scroll scroll-bars scroll-to-current-row scroll-to-item scroll-to-selected-row scrollable scrollbar-horizontal scrollbar-vertical scrolled-row-position scrolling sdbname search search-self search-target section seek select select-all select-focused-row select-next-row select-prev-row select-repositioned-row select-row selectable selected selected-items selection-end selection-list selection-start selection-text self send sensitive separate-connection separator-fgcolor separators server server-connection-bound server-connection-bound-request server-connection-context server-connection-id server-operating-mode server-socket session session-end set set-attr-call-type set-attribute set-attribute-node set-blue-value set-break set-buffers set-byte-order set-cell-focus set-commit set-connect-procedure set-contents set-dynamic set-green-value set-input-source set-numeric-format set-parameter set-pointer-value set-read-response-procedure set-red-value set-repositioned-row set-rgb-value set-rollback set-selection set-size set-socket-option set-wait-state setuserid share-lock shared short show-in-taskbar show-stats side-label side-label-handle side-labels silent simple single size size-chars size-pixels skip skip-deleted-record skip-schema-check slider small-icon small-title smallint socket some sort source source-procedure space sql sqrt start status status-area status-area-font stdcall stop stop-parsing stopped stored-procedure stream stream-io stretch-to-fit string string-value string-xref sub-average sub-count sub-maximum sub-menu sub-menu-help sub-minimum sub-total subscribe substitute substring subtype sum summary super super-procedures suppress-namespace-processing suppress-warnings system-alert-boxes system-dialog system-help system-id tab-position tab-stop table table-handle table-number target target-procedure temp-directory temp-table temp-table-prepare term terminal terminate text text-cursor text-seg-growth text-selected then this-procedure three-d through thru tic-marks time time-source title title-bgcolor title-dcolor title-fgcolor title-font to to-rowid today toggle-box tooltip tooltips top top-only topic total trace-filter tracing trailing trans trans-init-procedure transaction transaction-mode transparent trigger triggers trim true truncate type unbuffered underline undo unformatted union unique unique-id unique-match unix unless-hidden unload unsigned-short unsubscribe up update upper url url-decode url-encode url-password url-userid use use-dict-exps use-filename use-index use-revvideo use-text use-underline user user-data userid using utc-offset v6display v6frame valid-event valid-handle validate validate-expression validate-message validate-xml validation-enabled value values var variable verbose vertical view view-as view-first-column-on-reopen virtual-height virtual-height-chars virtual-height-pixels virtual-width virtual-width-chars virtual-width-pixels visible vms wait wait-for warning web-context weekday when where while widget widget-enter widget-handle widget-leave widget-pool width width-chars width-pixels window window-delayed-minimize window-maximized window-minimized window-name window-normal window-state window-system with word-index word-wrap work-area-height-pixels work-area-width-pixels work-area-x work-area-y work-table workfile write write-data x x-document x-noderef x-of xcode xml-schema-path xml-suppress-namespace-processing xref y y-of year year-offset yes yes-no yes-no-cancel _cbit _control _dcm _list _memory _msg _pcontrol _serial-num _trace
      </Keywords>

      <Keywords List="1">
        case class for function interface method procedure repeat
      </Keywords>
      
      <Keywords List="2">
        do editing triggers
      </Keywords>

      
    </Lexer>
    <Styles>
      <Style Name="DOCUMENT_DEFAULT"  />
      
      <!-- Keylist 1 -->
      <Style Name="STATEMENT" ForeColor="Blue" />

      <!-- Keylist 2 -->
      <Style Name="DATATYPE"	ForeColor="teal" />

      <!--Comments,operators etc  -->
      <Style Name="QUOTEDIDENTIFIER"	ForeColor="blue" />
      <Style Name="STRING"	ForeColor="blue" />
      <Style Name="OPERATOR"	ForeColor="#ff00ff" />
      <Style Name="NUMBER"	ForeColor="#ff00ff" bold="true" />
      <Style Name="COMMENTLINE"	ForeColor="green" bold="true" italic="true" />
      <Style Name="COMMENTDOC"	ForeColor="green" bold="true" italic="true" />
      <Style Name="COMMENT"	ForeColor="green" bold="true" italic="true" />

    </Styles>
  </Language>
</ScintillaNET>

I'm struggling to get my editor to highlight my code.

I've added the following into the DocumentForm constructor

Scintilla.ConfigurationManager.Language = "OpenEdge";
Scintilla.Lexing.LexerLanguageMap["OpenEdge"] = "progress";
Scintilla.ConfigurationManager.CustomLocation = System.IO.Path.GetFullPath("Configuration/OpenEdge.xml");
Scintilla.ConfigurationManager.Configure();

Not quiet sure where I'm going wrong.

Regards,

Paul

Coordinator
Jul 30, 2012 at 8:07 PM

Couple of things: First set the Language after setting the LexerLanguageMap and CustomLocation.

Scintilla.Lexing.LexerLanguageMap["OpenEdge"] = "progress";
Scintilla.ConfigurationManager.CustomLocation = System.IO.Path.GetFullPath("Configuration/OpenEdge.xml");
Scintilla.ConfigurationManager.Language = "OpenEdge";
Scintilla.ConfigurationManager.Configure();

Second the style names for the progress lexer are kind of odd. Look here for the list of supported style names

http://scintillanet.codeplex.com/SourceControl/changeset/view/98226#1051161

I don't know what they all mean since I don't know progress. Hopefully they make sense to you. It may also help to look through the lexer's source

http://scintilla.hg.sourceforge.net/hgweb/scintilla/scintilla/file/928661c9cdce/lexers/LexProgress.cxx

Jul 31, 2012 at 12:06 PM

Thanks for the reply Chris.

I've had a read of the above and have changed my xml to the below

 

<?xml version="1.0" encoding="utf-8"?>
<ScintillaNET>
  <Language Name="OpenEdge">
    <Lexer LexerName="progress" LineCommentPrefix="/*" StreamCommentPrefix="/* " StreamCommentSuffix=" */" >

      <Keywords List="0">
        absolute accelerator accumulate across active-window add add-buffer add-calc-column add-columns-from add-events-procedure add-fields-from add-first add-index-field add-last add-like-column add-like-field add-like-index add-new-field add-new-index add-super-procedure adm-data advise alert-box alias all allow-column-searching allow-replication alter alternate-key always-on-top ambiguous and ansi-only any anywhere append append-child appl-alert-boxes application apply appserver-info appserver-password appserver-userid array-message as as-cursor ascending ask-overwrite assign async-request-count async-request-handle asynchronous at attachment attr-space attribute-names attribute-type authorization auto-completion auto-delete-xml auto-end-key auto-endkey auto-go auto-indent auto-resize auto-return auto-validate auto-zap automatic available available-formats average avg background backwards base-ade base-key batch-mode before-hide begins bell between bgcolor big-endian binary bind-where blank block-iteration-display border-bottom border-bottom-chars border-bottom-pixels border-left border-left-chars border-left-pixels border-right border-right-chars border-right-pixels border-top border-top-chars border-top-pixels both bottom box box-selectable break browse browse-column-data-types browse-column-formats browse-column-labels browse-header btos buffer buffer-chars buffer-compare buffer-copy buffer-create buffer-delete buffer-field buffer-handle buffer-lines buffer-name buffer-release buffer-value button buttons by by-pointer by-variant-pointer byte bytes-read bytes-written cache cache-size call call-name call-type can-create can-delete can-do can-find can-query can-read can-set can-write cancel-break cancel-button cancel-requests cancelled caps careful-paint case case-sensitive cdecl centered chained char character character_length charset check checked child-num choose chr clear clear-selection client-connection-id client-type clipboard clone-node close code codebase-locator codepage codepage-convert col col-of collate colon colon-aligned color color-table column column-bgcolor column-dcolor column-fgcolor column-font column-label column-label-bgcolor column-label-dcolor column-label-fgcolor column-label-font column-label-height-chars column-label-height-pixels column-movable column-of column-pfcolor column-read-only column-resizable column-scrolling columns com-handle com-self combo-box command compares compile compiler complete component-handle component-self config-name connect connected constrained contains contents context context-help context-help-file context-help-id context-popup control control-box control-container control-frame convert convert-3d-colors convert-to-offset count count-of coverage cpcase cpcoll cpinternal cplog cpprint cprcodein cprcodeout cpstream cpterm crc-value create create-like create-node create-node-namespace create-on-add create-result-list-entry create-test-file ctos current current-changed current-column current-environment current-iteration current-language current-result-row current-row-modified current-value current-window current_date cursor cursor-char cursor-line cursor-offset data-bind data-entry-return data-type database dataservers date date-format day db-references dbcodepage dbcollation dbname dbparam dbrestrictions dbtaskid dbtype dbversion dcolor dde dde-error dde-id dde-item dde-name dde-topic deblank debug debug-alert debug-list debugger dec decimal decimals declare def default default-buffer-handle default-button default-commit default-extension default-noxlate default-window defer-lob-fetch define defined delete delete-char delete-current-row delete-line delete-node delete-result-list-entry delete-selected-row delete-selected-rows delimiter descending description deselect-focused-row deselect-rows deselect-selected-row detach dialog-box dialog-help dictionary dir directory disable disable-auto-zap disable-connections disable-dump-triggers disable-load-triggers disabled disconnect disp display display-message display-type distinct do dos double down drag-enabled drop drop-down drop-down-list drop-target dump dynamic dynamic-function each echo edge edge-chars edge-pixels edit-can-paste edit-can-undo edit-clear edit-copy edit-cut edit-paste edit-undo editing editor else empty empty-temp-table enable enable-connections enabled encode encoding end end-file-drop end-key end-user-prompt endif endkey entered entry eq error error-column error-row error-status escape etime event-procedure event-procedure-context event-type events except exclusive exclusive-id exclusive-lock exclusive-web-user execute execution-log exists exp expand expandable explicit export extended extent external extract false fetch fetch-selected-row fgcolor field fields file file-access-date file-access-time file-create-date file-create-time file-information file-mod-date file-mod-time file-name file-offset file-size file-type filename fill fill-in filled filters find find-by-rowid find-case-sensitive find-current find-first find-global find-last find-next-occurrence find-prev-occurrence find-select find-unique find-wrap-around finder first first-async-request first-buffer first-child first-column first-of first-procedure first-server first-server-socket first-socket first-tab-item fit-last-column fixed-only flat-button float focus focused-row focused-row-selected font font-table for force-file foreground form form-input format forward forwards frame frame-col frame-db frame-down frame-field frame-file frame-index frame-line frame-name frame-row frame-spacing frame-value frame-x frame-y frequency from from-chars from-current from-pixels fromnoreorder full-height full-height-chars full-height-pixels full-pathname full-width full-width-chars full-width-pixels function function-call-type gateways ge generate-md5 get get-attr-call-type get-attribute get-attribute-node get-bits get-blue-value get-browse-column get-buffer-handle get-byte get-byte-order get-bytes get-bytes-available get-cgi-list get-cgi-value get-child get-codepages get-collations get-config-value get-current get-document-element get-double get-dropped-file get-dynamic get-file get-first get-float get-green-value get-index-by-namespace-name get-index-by-qname get-iteration get-key-value get-last get-localname-by-index get-long get-message get-next get-number get-parent get-pointer-value get-prev get-printers get-qname-by-index get-red-value get-repositioned-row get-rgb-value get-selected-widget get-short get-signature get-size get-socket-option get-string get-tab-item get-text-height get-text-height-chars get-text-height-pixels get-text-width get-text-width-chars get-text-width-pixels get-type-by-index get-type-by-namespace-name get-type-by-qname get-unsigned-short get-uri-by-index get-value-by-index get-value-by-namespace-name get-value-by-qname get-wait-state getbyte global go-on go-pending grant graphic-edge grayed grid-factor-horizontal grid-factor-vertical grid-set grid-snap grid-unit-height grid-unit-height-chars grid-unit-height-pixels grid-unit-width grid-unit-width-chars grid-unit-width-pixels grid-visible group gt handle handler has-records having header height height-chars height-pixels help help-context help-topic helpfile-name hidden hide hint horizontal host-byte-order html-charset html-end-of-line html-end-of-page html-frame-begin html-frame-end html-header-begin html-header-end html-title-begin html-title-end hwnd icfparameter icon if image image-down image-insensitive image-size image-size-chars image-size-pixels image-up immediate-display import import-node in in-handle increment-exclusive-id index index-hint index-information indexed-reposition indicator information init initial initial-dir initial-filter initialize-document-type initiate inner inner-chars inner-lines input input-output input-value insert insert-backtab insert-before insert-file insert-row insert-string insert-tab int integer internal-entries into invoke is is-attr-space is-lead-byte is-open is-parameter-set is-row-selected is-selected is-xml item items-per-row join join-by-sqldb kblabel keep-connection-open keep-frame-z-order keep-messages keep-security-cache keep-tab-order key key-code key-function key-label keycode keyfunction keylabel keys keyword keyword-all label label-bgcolor label-dcolor label-fgcolor label-font label-pfcolor labels landscape languages large large-to-small last last-async-request last-child last-event last-key last-of last-procedure last-server last-server-socket last-socket last-tab-item lastkey lc ldbname le leading leave left left-aligned left-trim length library like line line-counter list-events list-item-pairs list-items list-query-attrs list-set-attrs list-widgets listing listings literal-question little-endian load load-from load-icon load-image load-image-down load-image-insensitive load-image-up load-mouse-pointer load-picture load-small-icon local-host local-name local-port locator-column-number locator-line-number locator-public-id locator-system-id locator-type locked log log-id log logical long lookahead lookup lower lt machine-class mandatory manual-highlight map margin-extra margin-height margin-height-chars margin-height-pixels margin-width margin-width-chars margin-width-pixels matches max max-button max-chars max-data-guess max-height max-height-chars max-height-pixels max-rows max-size max-value max-width max-width-chars max-width-pixels maximize maximum member memptr memptr-to-node-value menu menu-bar menu-item menu-key menu-mouse menubar message message-area message-area-font message-line message-lines min min-button min-column-width-chars min-column-width-pixels min-height min-height-chars min-height-pixels min-row-height min-row-height-chars min-row-height-pixels min-size min-value min-width min-width-chars min-width-pixels minimum mod modified modulo month mouse mouse-pointer movable move-after-tab-item move-before-tab-item move-column move-to-bottom move-to-eof move-to-top mpe multiple multiple-key multitasking-interval must-exist name namespace-prefix namespace-uri native ne needs-appserver-prompt needs-prompt new new-row next next-column next-prompt next-sibling next-tab-item next-value no no-apply no-array-message no-assign no-attr no-attr-list no-attr-space no-auto-validate no-bind-where no-box no-column-scrolling no-console no-convert no-convert-3d-colors no-current-value no-debug no-drag no-echo no-empty-space no-error no-fill no-focus no-help no-hide no-index-hint no-join-by-sqldb no-labels no-lock no-lookahead no-map no-message no-pause no-prefetch no-return-value no-row-markers no-scrollbar-vertical no-scrolling no-separate-connection no-separators no-tab-stop no-underline no-undo no-validate no-wait no-word-wrap node-type node-value node-value-to-memptr none normalize not null num-aliases num-buffers num-buttons num-children num-columns num-copies num-dbs num-dropped-files num-entries num-fields num-formats num-items num-iterations num-lines num-locked-columns num-messages num-parameters num-replaced num-results num-selected num-selected-rows num-selected-widgets num-tabs num-to-retain num-visible-columns numeric numeric-decimal-point numeric-format numeric-separator object octet_length of off ok ok-cancel old ole-invoke-locale ole-names-locale on on-frame-border open opsys option or ordered-join ordinal orientation os-append os-command os-copy os-create-dir os-delete os-dir os-drives os-error os-getenv os-rename os2 os400 otherwise outer outer-join output overlay override owner owner-document page page-bottom page-number page-size page-top page-width paged parameter parent parse-status partial-key pascal pathname pause pdbname performance persistent persistent-cache-disabled persistent-procedure pfcolor pixels pixels-per-column pixels-per-row popup-menu popup-only portrait position precision prepare-string prepared preprocess preselect prev prev-column prev-sibling prev-tab-item primary printer printer-control-handle printer-hdc printer-name printer-port printer-setup private private-data privileges proc-handle proc-status procedure procedure-call-type procedure-name process profile-file profiler profiling program-name progress progress-source prompt prompt-for promsgs propath proversion proxy proxy-password proxy-userid public-id publish published-events put put-bits put-byte put-bytes put-double put-float put-key-value put-long put-short put-string put-unsigned-short putbyte query query-close query-off-end query-open query-prepare query-tuning question quit quoter r-index radio-buttons radio-set random raw raw-transfer rcode-information read read-available read-exact-num read-file read-only readkey real recid record-length rectangle recursive refresh refreshable release remote remote-host remote-port remove-attribute remove-child remove-events-procedure remove-super-procedure repeat replace replace-child replace-selection-text replication-create replication-delete replication-write reposition reposition-backwards reposition-forwards reposition-to-row reposition-to-rowid request resizable resize result retain retain-shape retry retry-cancel return return-inserted return-to-start-dir return-value return-value-data-type returns reverse-from revert revoke rgb-value right right-aligned right-trim round row row-height row-height-chars row-height-pixels row-markers row-of row-resizable rowid rule rule-row rule-y run run-procedure save save-as save-file sax-attributes sax-complete sax-parse sax-parse-first sax-parse-next sax-parser-error sax-reader sax-running sax-uninitialized sax-xml schema schema-path screen screen-io screen-lines screen-value scroll scroll-bars scroll-to-current-row scroll-to-item scroll-to-selected-row scrollable scrollbar-horizontal scrollbar-vertical scrolled-row-position scrolling sdbname search search-self search-target section seek select select-all select-focused-row select-next-row select-prev-row select-repositioned-row select-row selectable selected selected-items selection-end selection-list selection-start selection-text self send sensitive separate-connection separator-fgcolor separators server server-connection-bound server-connection-bound-request server-connection-context server-connection-id server-operating-mode server-socket session session-end set set-attr-call-type set-attribute set-attribute-node set-blue-value set-break set-buffers set-byte-order set-cell-focus set-commit set-connect-procedure set-contents set-dynamic set-green-value set-input-source set-numeric-format set-parameter set-pointer-value set-read-response-procedure set-red-value set-repositioned-row set-rgb-value set-rollback set-selection set-size set-socket-option set-wait-state setuserid share-lock shared short show-in-taskbar show-stats side-label side-label-handle side-labels silent simple single size size-chars size-pixels skip skip-deleted-record skip-schema-check slider small-icon small-title smallint socket some sort source source-procedure space sql sqrt start status status-area status-area-font stdcall stop stop-parsing stopped stored-procedure stream stream-io stretch-to-fit string string-value string-xref sub-average sub-count sub-maximum sub-menu sub-menu-help sub-minimum sub-total subscribe substitute substring subtype sum summary super super-procedures suppress-namespace-processing suppress-warnings system-alert-boxes system-dialog system-help system-id tab-position tab-stop table table-handle table-number target target-procedure temp-directory temp-table temp-table-prepare term terminal terminate text text-cursor text-seg-growth text-selected then this-procedure three-d through thru tic-marks time time-source title title-bgcolor title-dcolor title-fgcolor title-font to to-rowid today toggle-box tooltip tooltips top top-only topic total trace-filter tracing trailing trans trans-init-procedure transaction transaction-mode transparent trigger triggers trim true truncate type unbuffered underline undo unformatted union unique unique-id unique-match unix unless-hidden unload unsigned-short unsubscribe up update upper url url-decode url-encode url-password url-userid use use-dict-exps use-filename use-index use-revvideo use-text use-underline user user-data userid using utc-offset v6display v6frame valid-event valid-handle validate validate-expression validate-message validate-xml validation-enabled value values var variable verbose vertical view view-as view-first-column-on-reopen virtual-height virtual-height-chars virtual-height-pixels virtual-width virtual-width-chars virtual-width-pixels visible vms wait wait-for warning web-context weekday when where while widget widget-enter widget-handle widget-leave widget-pool width width-chars width-pixels window window-delayed-minimize window-maximized window-minimized window-name window-normal window-state window-system with word-index word-wrap work-area-height-pixels work-area-width-pixels work-area-x work-area-y work-table workfile write write-data x x-document x-noderef x-of xcode xml-schema-path xml-suppress-namespace-processing xref y y-of year year-offset yes yes-no yes-no-cancel _cbit _control _dcm _list _memory _msg _pcontrol _serial-num _trace
      </Keywords>

      <Keywords List="1">
        case class for function interface method procedure repeat
      </Keywords>
      
      <Keywords List="2">
        do editing triggers
      </Keywords>
            
    </Lexer>
    
    <Styles>
      
      <Style Name="DOCUMENT_DEFAULT" ForeColor="black" />
      <Style Name="NUMBER" ForeColor="orange" />
      <Style Name="WORD" ForeColor="blue" />
      <Style Name="STRING" ForeColor="pink" />
      <Style Name="CHARACTER" ForeColor="pink" />
      <Style Name="PREPROCESSOR" ForeColor="brown" />
      <Style Name="OPERATOR" ForeColor="gray" />
      <Style Name="IDENTIFIER" ForeColor="black" />
      <Style Name="BLOCK" ForeColor="blue" />
      <Style Name="END" ForeColor="blue" />
      <Style Name="COMMENT1" ForeColor="green" />
      <Style Name="COMMENT2" ForeColor="green" />
      <Style Name="COMMENT3" ForeColor="green" />
      <Style Name="COMMENT4" ForeColor="green" />
      <Style Name="COMMENT5" ForeColor="green" />
      <Style Name="COMMENT6" ForeColor="green" />
      
    </Styles>
    
  </Language>
</ScintillaNET>

 

I also changed the code in my DockContent form constructor to

 public DocumentForm()
 {
     InitializeComponent();

     this.scintilla.Lexing.Lexer = ScintillaNET.Lexer.Progress;
     this.scintilla.Lexing.LexerLanguageMap["OpenEdge"] = "progress";
     this.scintilla.ConfigurationManager.CustomLocation = System.IO.Path.GetFullPath("Configuration/OpenEdge.xml");
     this.scintilla.ConfigurationManager.Language = "OpenEdge";                       
     this.scintilla.ConfigurationManager.Configure();            
}

Is there anything else I need to do to force the syntax highlighting to work?

Thanks

Aug 2, 2012 at 9:28 PM

I managed to get it to work. My xml was wrong. I wasn't defining all of the available options in the Progress Lexar