NotePad++ ユーザー定義言語では条件文が表示されない

NotePad++ ユーザー定義言語では条件文が表示されない

NotePad+ で Powerbuilder のユーザー定義言語をダウンロードしました。条件文がハイライト表示されない点を除けば、すべて正常に動作します。XML を確認しましたが、ハイライト表示されるはずなので、問題は見つかりませんでした。

ここで何が問題なのか、何かアイデアはありますか? 以下は、NotePad++ でどのように表示されるかのスクリーンショットです:

条件文のユーザー定義言語

PowerBuilder.xml <- ユーザー定義言語

<NotepadPlus>
    <UserLang name="PowerBuilder" ext="srw sru srs srm">
        <Settings>
            <Global caseIgnored="yes"/>
            <TreatAsSymbol comment="yes" commentLine="yes"/>
            <Prefix words1="no" words2="no" words3="no" words4="no"/>
        </Settings>
            <KeywordLists>
                <Keywords name="Delimiters">"00"00</Keywords>
                <Keywords name="Folder+">if choose subroutine type</Keywords>
                <Keywords name="Folder-">end</Keywords>
                <Keywords name="Operators">( ) . ;</Keywords>
                <Keywords name="Comment">1/* 2*/ 0//</Keywords>
                <Keywords name="Words1">
                alias and autoinstantiate call case catch choose close commit connect constant continue create cursor declare delete describe descriptor destory disconnect do dynamic else elseif end enumerated event execute exit external false fetch finally first for forward from function global goto halt if immediate indirect insert into intrinsic is last library loop namespace native next not of on open or parent post prepare prior private privateread privatewrite procedure protected protectedread protectedwrite prototypes public readonly ref return rollback rpcfunc select selectblob shared static step subroutine super system systemread systemwrite then this throw throws to trigger true try type until update updateblob using variables while with within xor _debug
                </Keywords>
                <Keywords name="Words2">
                any Blob Boolean Byte Char Character Date DateTime Decimal Dec Double Integer Int Long LongLong Real String Time UnsignedInteger UnsignedInt UInt UnsignedLong ULong
                </Keywords>
                <Keywords name="Words3">this parent super</Keywords>
                <Keywords name="Words4"/>
            </KeywordLists>
        <Styles>
            <WordsStyle name="DEFAULT" styleID="11" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0"/>
            <WordsStyle name="FOLDEROPEN" styleID="12" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0"/>
            <WordsStyle name="FOLDERCLOSE" styleID="13" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0"/>
            <WordsStyle name="KEYWORD1" styleID="5" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="1"/>
            <WordsStyle name="KEYWORD2" styleID="6" fgColor="800080" bgColor="FFFFFF" fontName="" fontStyle="0"/>
            <WordsStyle name="KEYWORD3" styleID="7" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="1"/>
            <WordsStyle name="KEYWORD4" styleID="8" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="0"/>
            <WordsStyle name="COMMENT" styleID="1" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="0"/>
            <WordsStyle name="COMMENT LINE" styleID="2" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="0"/>
            <WordsStyle name="NUMBER" styleID="4" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0"/>
            <WordsStyle name="OPERATOR" styleID="10" fgColor="000000" bgColor="FFFFFF" fontName="@Arial Unicode MS" fontStyle="0"/>
            <WordsStyle name="DELIMINER1" styleID="14" fgColor="959595" bgColor="FFFFFF" fontName="" fontStyle="0"/>
            <WordsStyle name="DELIMINER2" styleID="15" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0"/>
            <WordsStyle name="DELIMINER3" styleID="16" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0"/>
        </Styles>
    </UserLang>
</NotepadPlus>

答え1

コメントではXMLでFolder+から削除しようとしたと書かれていますがif、UDLダイアログを使用して設定を変更すると、ifコード1スタイルでの折りたたみそれが犯人です:

  • UDL 定義があったので、示したものと似ていると思います:
  • もし私がスタイラーのためにコード1スタイルでの折りたたみChooseおよびifend折り畳み色に従います。
  • 次にifコード1スタイルでの折りたたみifピンク色から青色に変化します。

「folding」と「keyword」の両方としてリストされている単語がある場合、「folding」スタイルの書式設定が適用されます。これは、UDL レクサーが「keyword」の強調表示を行う前に「folding」を検索し、見つかったら停止するためです。

(また、私はelseif「中間」セクションに追加することをお勧めしますコード1スタイルでの折りたたみ(キーワードではなく、折りたたみとして残す場合if)。

関連情報