Additional Blogs by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member

This is a follow-up to my previous blog ABAP Syntax Highlighting in Notepad++

I have modified the UDL file to make code look more like New ABAP Editor.

I'll soon try out similar thing in jEdit text editor.

The modified UDL file might be useful for followers of ABAP Development space.

Before and After

I had previously covered the steps required to apply the ABAP UDL configuration in fresh installation of Notepad++.

By following those steps, we could get ABAP code to look like this:

By using the modified UDL file given in this post, you could get ABAP code to look like this:

The UDL file contents can be found at end of this post.

Overview of changes done

  1. By comparing screenshots, you can see that the color scheme looks more like New ABAP Editor.
  2. Code folding (the expand/collapse icon on left) is enabled for comments
  3. Typing a single quote was disturbing the entire the look of entire code to follow. This is because the highlighter tried to search for next occurrence of single quote, and color the multiple lines in between as literal. ABAP comments and literals always single-line. Similar issue is totally ruining the experience of ABAP highlighter in New SCN Wiki platform. New UDL fixes this.
  4. Line comment should work only when * is at beginning of line. There is a special character in UDL to specify that.
  5. Identifying the literals as literals, both for single quote and backticks.

See this screenshot from SCN Wiki page using ABAP highlighting. Code following double quote across multiple lines is treated as comment. :cry:

Wiki platform provider Atlassian does not know that ABAP does not have multi-line comments.

Modified UDL file

Below is the xml code for UDL file.

You can copy it and save as abap2.xml.

Then follow the same old steps to import the new UDL into Notepad++ and see the difference.

It appears personal blog does not have the luxury to attach file. This is the reason why I have given the content in xml highlighter.


<NotepadPlus>
    <UserLang name="abap2" ext="abap" udlVersion="2.1">
        <Settings>
            <Global caseIgnored="yes" allowFoldOfComments="yes" foldCompact="no" forcePureLC="1" decimalSeparator="0" />
            <Prefix Keywords1="no" Keywords2="no" Keywords3="no" Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" />
        </Settings>
        <KeywordLists>
            <Keywords name="Comments">00* 01 02 03&quot; 04((EOL))</Keywords>
            <Keywords name="Numbers, prefix1"></Keywords>
            <Keywords name="Numbers, prefix2"></Keywords>
            <Keywords name="Numbers, extras1"></Keywords>
            <Keywords name="Numbers, extras2"></Keywords>
            <Keywords name="Numbers, suffix1"></Keywords>
            <Keywords name="Numbers, suffix2"></Keywords>
            <Keywords name="Numbers, range"></Keywords>
            <Keywords name="Operators1">( ) , . :</Keywords>
            <Keywords name="Operators2"></Keywords>
            <Keywords name="Folders in code1, open"></Keywords>
            <Keywords name="Folders in code1, middle"></Keywords>
            <Keywords name="Folders in code1, close"></Keywords>
            <Keywords name="Folders in code2, open">if form loop</Keywords>
            <Keywords name="Folders in code2, middle"></Keywords>
            <Keywords name="Folders in code2, close">endif endform endloop</Keywords>
            <Keywords name="Folders in comment, open"></Keywords>
            <Keywords name="Folders in comment, middle"></Keywords>
            <Keywords name="Folders in comment, close"></Keywords>
            <Keywords name="Keywords1">&lt;icon&gt; &lt;itab&gt; ABBREVIATED ABSTRACT ABSTRACTFINAL ACCEPT ACCEPTING ACCORDING ACTUAL ADD ADD-CORRESPONDING ADDITIONS ADJACENT ALIASES ALL ALLOCATE ANALYZER AND APPEND APPENDING AS ASCENDING ASCENDINGDESCENDING AT ATTRIBUTE AUTHORITY-CHECK BACKGOUND BEFORE BEGIN BETWEEN BIGLITTLE BINARY BIT BLANK BLOCK BREAK-POINT BY BYPASSING BYTE BYTECHARACTER CASE CASERESPECTING CASTING CENTERED CHAIN CHANGE CHANGING CHARACTER CHECK CHECKBOX CHECKBOXSYMBOLICONLINE CLASS CLASS-DATA CLASS-EVENTS CLASS-METHODS CLEANUP CLEAR CLIENT CLOCK CODE COL_BACKGROUND COL_HEADING COL_NORMAL COL_TOTAL COLLECT COLOR COLUMN COMMENT COMMIT COMMON COMMUNICATION COMPARING COMPONENTS COMPUTE CONCATENATE CONDENSE CONSTANTS CONTEXT CONTEXTS CONTINUE CONTROL CONTROLS CONVERSION CONVERT COUNTRY COUNTY CURRENT CURSOR CUSTOMER-FUNCTION DATA DATABASE DATASET DATE DEALLOCATE DECIMALS DEFAULT DEFAULTUTF-8NON-UNICODE DEFERRED DEFINE DEFINING DEFINITION DELETE DELETING DEMAND DESCENDING DESCRIBE DESTINATION DIALOG DIRECTORY DISTANCE DISTINCT DIVIDE-CORRESPONDING DO DUPLICATE DUPLICATES DURING DYNAMIC EDIT EDITOR-CALL ELSE ELSEIF ENCODING END ENDAT ENDCASE ENDCATCH ENDCHAIN ENDCLASS ENDDO ENDEXEC ENDFORM ENDFUNCTION ENDIAN ENDIF ENDING ENDINTERFACE ENDLOOP ENDMETHOD ENDMODULE ENDON ENDPROVIDE ENDSELECT ENDTRY ENDWHILE END-OF_FILE END-OF-DEFINITION END-OF-PAGE END-OF-SELECTION ENTRIES EQ ERRORS EVENT EVENTS EXCEPTION EXCEPTIONS EXCEPTION-TABLE EXCLUDE EXCLUDING EXEC EXIT EXIT-COMMAND EXPORT EXPORTING EXTENDED EXTRACT FETCH FIELD FIELD-GROUPS FIELDSNO FIELD-SYMBOLS FILTER FINAL FIND FIRST FOR FORM FORMAT FORWARDBACKWARD FOUND FRAME FREE FRIENDS FROM FUNCTION FUNCTION-POOL GE GET GIVING GROUP GT HANDLER HASHED HAVING HEADER HEADING HELP-ID HIDE HIGHLOW HOLD HOTSPOT ID IF IGNORING IMMEDIATELY IMPLEMENTATION IMPORT IMPORTING IN INCREMENT INDEX INDEX-LINE INHERITING INIT INITIAL INITIALIZATION INNER INNERLEFT INSERT INSTANCES INTENSIFIED INTERFACE INTERFACES INTERVALS INTO INTOAPPENDING INVERTED-DATE IS ITAB JOIN KEEPING KEY KEYS KIND LANGUAGE LAST LE LEAVE LEFT LEFT-JUSTIFIED LEFTRIGHT LEFTRIGHTCIRCULAR LEGACY LENGTH LIKE LINE LINE-COUNT LINES LINES LINE-SELECTION LINE-SIZE LIST LIST-PROCESSING LOAD LOAD-OF-PROGRAM LOCAL LOCALE LOOP LT MARGIN MARK MASK MATCH MAXIMUM MEMORY MESSAGE MESSAGE-ID MESSAGES METHOD METHODS MOD MODE MODEIN MODIF MODIFIER MODIFY MODULE MOVE MOVE-CORRESPONDING MULTIPLY-CORRESPONDING NE NEW NEW-LINE NEW-PAGE NEXT NODES NODETABLE NO-DISPLAY NO-EXTENSION NO-GAP NO-GAPS NO-HEADINGWITH-HEADING NON NO-SCROLLING NO-SCROLLINGSCROLLING NOT NO-TITLEWITH-TITLE NO-ZERO NUMBER OBJECT OBLIGATORY OCCURENCE OCCURENCES OCCURS OF OFF OFFSET ON ONLY ONOFF OPEN OPTION OPTIONAL OR ORDER OTHERS OUTPUT-LENGTH OVERLAY PACK PACKAGE PAGE PAGELAST PAGEOF PAGEPAGE PAGES PARAMETER PARAMETERS PARAMETER-TABLE PART PERFORM PERFORMING PFN PF-STATUS PLACES POS_HIGH POS_LOW POSITION POSITIONS PRIMARY PRINT PRINT-CONTROL PRIVATE PROCESS PROGRAM PROPERTY PROTECTED PROVIDE PUBLIC PUBLICPROTECTEDPRIVATE PUSHBUTTON PUT QUICKINFO RADIOBUTTON RAISE RAISING RANGE RANGES READ RECEIVE RECEIVING REDEFINITION REFERENCE REFRESH REJECT RENAMING REPLACE REPLACEMENT REPORT RESERVE RESET RESOLUTION RESULTS RETURN RETURNING RIGHT RIGHT-JUSTIFIED ROLLBACK ROWS RUN SCAN SCREEN SCREEN-GROUP1 SCREEN-GROUP2 SCREEN-GROUP3 SCREEN-GROUP4 SCREEN-GROUP5 SCREEN-INPUT SCREEN-INTENSIFIED SCROLL SCROLL-BOUNDARY SEARCH SECTION SELECT SELECTION SELECTIONS SELECTION-SCREEN SELECTION-SET SELECTION-TABLE SELECT-OPTIONS SEND SEPARATED SET SHARED SHIFT SIGN SINGLE SINGLEDISTINCT SIZE SKIP SORT SORTABLE SPACE SPECIFIED SPLIT SQL STABLE STAMP STANDARD START STARTING START-OF-SELECTION STATICS STEP-LOOP STOP STRLEN STRUCTURE SUBMIT SUBTRACT SUBTRACT-CORRESPONDING SUFFIX SUPPLY SUPPRESS SYMBOLS SYSTEM-EXCEPTIONS TABLE TABLES TABLEVIEW TASK TEXT THEN TIME TIMES TITLE TITLEBAR TO TOPIC TOP-OF-PAGE TRAILING TRANSACTION TRANSFER TRANSLATE TRY TYPE TYPELIKE TYPE-POOL TYPE-POOLS TYPES ULINE UNION UNIQUE UNIT UNTIL UP UPDATE UPPERLOWER USER-COMMAND USING VALUE VALUES VARY VARYING VERSION VIA WAIT WHEN WHERE WHILE WINDOW WITH WORK WRITE ZONE</Keywords>
            <Keywords name="Keywords2">ADD ADD-CORRESPONDING APPEND ASSIGN AVG BACK CALL CATCH CHANGE CHECK CLEAR CLOSE COMMIT COMPUTE COUNT CREATE DATASET DELETE DESCRIBE DIVIDE DO ELSE ELSEIF EXIT FIND FOR FORMAT GET IF INCLUDE LOOP MAX MESSAGE METHOD MIN MODIFY MOVE MULTIPLY NEW-PAGE OBJECT OPEN ORDER READ SORT SUM TRANSLATE ULINE WORK WRITE XSTRLEN</Keywords>
            <Keywords name="Keywords3">ABS ACOS AFTER ALL AND AS ASIN ASSIGNING AT ATAN BEGIN BUFFER BY CA CEIL CENTERED CN CO COLOR COMPARING COMPONENT COS COSH CP CS CURRENCY DEFAULT END EQ EXP FLOOR FRAC GE GROUP GT ICON IN INDEX INNER INTENSIFIED INTO IS JOIN LE LEADING LEAVE LEFT LIKE LOG LOG10 LOWER LT M MOD NA NE NOT NP NS O OF OFF ON OR OTHERS OUTER REF RIGHT SIGN SIN SINH SQRT TABLE TABLENAME TAN TANH TITLE TO TRAILING TRUNC TYPE UPPER USING VALUE WITH</Keywords>
            <Keywords name="Keywords4"></Keywords>
            <Keywords name="Keywords5"></Keywords>
            <Keywords name="Keywords6"></Keywords>
            <Keywords name="Keywords7"></Keywords>
            <Keywords name="Keywords8"></Keywords>
            <Keywords name="Delimiters">00&apos; 01&apos;&apos; 02((&apos; EOL)) 03` 04`` 05` 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23</Keywords>
        </KeywordLists>
        <Styles>
            <WordsStyle name="DEFAULT" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="COMMENTS" fgColor="808080" bgColor="FFFFFF" fontName="" fontStyle="2" nesting="0" />
            <WordsStyle name="LINE COMMENTS" fgColor="808080" bgColor="FFFFFF" fontName="" fontStyle="2" fontSize="10" nesting="0" />
            <WordsStyle name="NUMBERS" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="KEYWORDS1" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="KEYWORDS2" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="KEYWORDS3" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="KEYWORDS4" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="KEYWORDS5" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="KEYWORDS6" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="KEYWORDS7" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="KEYWORDS8" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="OPERATORS" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" />
            <WordsStyle name="FOLDER IN CODE1" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="FOLDER IN CODE2" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="FOLDER IN COMMENT" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="DELIMITERS1" fgColor="4DA619" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="DELIMITERS2" fgColor="4DA619" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="DELIMITERS3" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="DELIMITERS4" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="DELIMITERS5" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="DELIMITERS6" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="DELIMITERS7" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="DELIMITERS8" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
        </Styles>
    </UserLang>
</NotepadPlus>

/.

4 Comments