From 025236be6b52186d84ca8a24d366a4398b660cc0 Mon Sep 17 00:00:00 2001 From: Oirfeodent Date: Thu, 20 Jun 2019 13:59:31 +0530 Subject: [PATCH] Enhance BaanC language support Changes for BaanC based on new Scintilla Version. Close #5807 --- .../src/ScitillaComponent/ScintillaEditView.h | 11 +++++++++-- PowerEditor/src/langs.model.xml | 10 ++++++++++ PowerEditor/src/stylers.model.xml | 17 +++++++++++++++-- 3 files changed, 34 insertions(+), 4 deletions(-) diff --git a/PowerEditor/src/ScitillaComponent/ScintillaEditView.h b/PowerEditor/src/ScitillaComponent/ScintillaEditView.h index 4a404b8c8..0382c6907 100644 --- a/PowerEditor/src/ScitillaComponent/ScintillaEditView.h +++ b/PowerEditor/src/ScitillaComponent/ScintillaEditView.h @@ -876,8 +876,15 @@ protected: }; void setBaanCLexer() { - setLexer(SCLEX_BAAN, L_BAANC, LIST_0 | LIST_1); - execute(SCI_SETPROPERTY, reinterpret_cast("styling.within.preprocessor"), reinterpret_cast("1")); + setLexer(SCLEX_BAAN, L_BAANC, LIST_0 | LIST_1 | LIST_2 | LIST_3 | LIST_4 | LIST_5 | LIST_6); + execute(SCI_SETPROPERTY, reinterpret_cast("lexer.baan.styling.within.preprocessor"), reinterpret_cast("1")); + execute(SCI_SETWORDCHARS, 0, reinterpret_cast("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$:")); + execute(SCI_SETPROPERTY, reinterpret_cast("fold.preprocessor"), reinterpret_cast("1")); + execute(SCI_SETPROPERTY, reinterpret_cast("fold.baan.syntax.based"), reinterpret_cast("1")); + execute(SCI_SETPROPERTY, reinterpret_cast("fold.baan.keywords.based"), reinterpret_cast("1")); + execute(SCI_SETPROPERTY, reinterpret_cast("fold.baan.sections"), reinterpret_cast("1")); + execute(SCI_SETPROPERTY, reinterpret_cast("fold.baan.inner.level"), reinterpret_cast("1")); + execute(SCI_STYLESETEOLFILLED, SCE_BAAN_STRINGEOL, true); }; void setSrecLexer() { diff --git a/PowerEditor/src/langs.model.xml b/PowerEditor/src/langs.model.xml index bbace26e2..9b4f4f832 100644 --- a/PowerEditor/src/langs.model.xml +++ b/PowerEditor/src/langs.model.xml @@ -49,6 +49,16 @@ alike all and array as asc at avg base based between boolean both break bset buffer by call case cast chart clear clearunref common const continue count cross current_date current_timestamp date date.num date.to.num debug default delete deleteempty deleteerror desc dim distinct dll dllusage domain double else empty end endcase enddelete enddllusage endfor endfunctionusage endif endselect endupdate endwhile enum_description eq escape exists extern false fatal fetching field first fixed for from full function functionusage ge global goto group gt having hint hints if in include index inner input inrange integer is join label last le leading left like long lt max mb menu message min multibyte ne no nodebug not notransactions nowarnings null on or order ordered outer path pi prepared print prompt question raw real ref reference refers repeat retry return right row rows select selectbind selectdo selectempty selecteos selecterror session set setunref size skip static step sticky stop strict_boolean string subhint sum table text_content then timestamp to trailing trim true union unref until update updateempty updateerror use used void warning warnings when where wherebind whereused while with abort abort.io db.after.delete db.after.insert db.after.update xmlSetData zoom.to$ + + ~.is.mandatory + + after.choice: after.delete: after.display: after.field: after.form: after.group: after.input: after.layout: after.read: after.rewrite: after.skip.delete: after.skip.rewrite: after.skip.write: after.write: after.zoom: before.checks: before.choice: before.delete: before.display: before.field: before.form: before.group: before.input: before.layout: before.print: before.read: before.rewrite: before.write: before.zoom: check.input: domain.error: init.field: init.form: init.group: on.choice: on.entry: on.exit: on.input: read.view: ref.display: ref.input: selection.filter: when.field.changes: + + after.~: before.~: choice.~: choice.abort.program: choice.abort.work: choice.add.set: choice.ask.helpinfo: choice.attachments: choice.bms: choice.calculator: choice.calender: choice.cancel.work: choice.change.frm: choice.change.order: choice.cmd.about.baan: choice.cmd.copy: choice.cmd.cut: choice.cmd.options: choice.cmd.paste: choice.cont.process: choice.create.job: choice.current.work: choice.cust.grid: choice.def.find: choice.display.set: choice.dupl.occur: choice.end.program: choice.field.browse: choice.field.help: choice.find.data: choice.first.frm: choice.first.set: choice.first.view: choice.freeze.columns: choice.get.defaults: choice.global.copy: choice.global.delete: choice.glossary: choice.help.index: choice.hide.fields: choice.interrupt: choice.last.frm: choice.last.set: choice.last.view: choice.mark.delete: choice.mark.occur: choice.modify.set: choice.next.frm: choice.next.set: choice.next.view: choice.next.work: choice.prev.frm: choice.prev.set: choice.prev.view: choice.print.data: choice.processes: choice.recover.set: choice.reference: choice.resize.frm: choice.rotate.curr: choice.run.job: choice.save.defaults: choice.select.all: choice.send.data: choice.sendto.desktop: choice.sendto.editor: choice.sendto.mail: choice.sendto.tasklst: choice.start.chart: choice.start.query: choice.start.set: choice.suspend.work: choice.switch.windows: choice.synchronize: choice.text.manager: choice.to.clipboard: choice.unfreeze.colum: choice.update.db: choice.user.0: choice.user.1: choice.user.2: choice.user.3: choice.user.4: choice.user.5: choice.user.6: choice.user.7: choice.user.8: choice.user.9: choice.using.help: choice.zoom: declaration: detail.~: field.~: footer.~: form.~: functions: group.~: header.~: main.table.io: on.display.total.line: on.error: zoom.from.~: + + actual.occ zoomreturn$ + + __file__ z.session 7z adduser alias apt-get ar as asa autoconf automake awk banner base64 basename bash bc bdiff blkid break bsdcpio bsdtar bunzip2 bzcmp bzdiff bzegrep bzfgrep bzgrep bzip2 bzip2recover bzless bzmore c++ cal calendar case cat cc cd cfdisk chattr chgrp chmod chown chroot chvt cksum clang clang++ clear cmp col column comm compgen compress continue convert cp cpio crontab crypt csplit ctags curl cut date dc dd deallocvt declare deluser depmod deroff df dialog diff diff3 dig dircmp dirname disown dmesg do done dpkg dpkg-deb du echo ed egrep elif else env esac eval ex exec exit expand export expr fakeroot false fc fdisk ffmpeg fgrep fi file find flex flock fmt fold for fsck function functions fuser fusermount g++ gas gawk gcc gdb genisoimage getconf getopt getopts git gpg gpgsplit gpgv grep gres groff groups gunzip gzexe hash hd head help hexdump hg history httpd iconv id if ifconfig ifdown ifquery ifup in insmod integer inxi ip ip6tables ip6tables-save ip6tables-restore iptables iptables-save iptables-restore ip jobs join kill killall killall5 lc ld ldd let lex line ln local logname look ls lsattr lsb_release lsblk lscpu lshw lslocks lsmod lsusb lzcmp lzegrep lzfgrep lzgrep lzless lzma lzmainfo lzmore m4 mail mailx make man mkdir mkfifo mkswap mktemp modinfo modprobe mogrify more mount msgfmt mt mv nameif nasm nc ndisasm netcat newgrp nl nm nohup ntps objdump od openssl p7zip pacman passwd paste patch pathchk pax pcat pcregrep pcretest perl pg ping ping6 pivot_root poweroff pr print printf ps pwd python python2 python3 ranlib read readlink readonly reboot reset return rev rm rmdir rmmod rpm rsync sed select service set sh sha1sum sha224sum sha256sum sha3sum sha512sum shift shred shuf shutdown size sleep sort spell split start stop strings strip stty su sudo sum suspend switch_root sync systemctl tac tail tar tee test then time times touch tr trap troff true tsort tty type typeset ulimit umask umount unalias uname uncompress unexpand uniq unlink unlzma unset until unzip unzipsfx useradd userdel uudecode uuencode vi vim wait wc wget whence which while who wpaste wstart xargs xdotool xxd xz xzcat xzcmp xzdiff xzfgrep xzgrep xzless xzmore yes yum zcat zcmp zdiff zegrep zfgrep zforce zgrep zless zmore znew zsh diff --git a/PowerEditor/src/stylers.model.xml b/PowerEditor/src/stylers.model.xml index 3cf6b9949..6838d0756 100644 --- a/PowerEditor/src/stylers.model.xml +++ b/PowerEditor/src/stylers.model.xml @@ -109,16 +109,29 @@ - - + + + + + + + + + + + + + + +