From 3165d99fc226445481f7c7d0d36e066ca262487e Mon Sep 17 00:00:00 2001 From: chrisly42 Date: Mon, 26 Jul 2021 10:50:22 +0200 Subject: [PATCH] Changed LookupUtil to use stub indexes instead of iterating over global labels and symbol definitions. Added basic test for Structure View. --- README.md | 14 +++- build.gradle | 6 ++ .../plugins/m68k/psi/M68kLookupUtil.kt | 82 +++++++++++++------ .../structureview/M68kStructureViewElement.kt | 7 +- .../structureview/M68kStructureViewTest.kt | 37 +++++++++ .../resources/structureview/basic_example.asm | 25 ++++++ 6 files changed, 141 insertions(+), 30 deletions(-) create mode 100644 src/test/java/de/platon42/intellij/plugins/m68k/structureview/M68kStructureViewTest.kt create mode 100644 src/test/resources/structureview/basic_example.asm diff --git a/README.md b/README.md index 2120f90..b1574cd 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,6 @@ it's "good enough" to get started, and I can return to demo coding with its curr ## Known issues -- Performance is not optimal yet (no stub index). - No referencing of macro invocations and macro definitions. - `Find Usages` always shows _"Unclassified"_ though it shouldn't. - Macro definitions may cause syntax errors when using backslash arguments. @@ -55,9 +54,14 @@ it's "good enough" to get started, and I can return to demo coding with its curr - Formatter + Code Style Settings - Register use analysis (but this only makes sense after macro evaluation) +## Recommendations + +Currently, I would suggest using the fabulous [Browse Word at Caret Plugin](https://plugins.jetbrains.com/plugin/201-browsewordatcaret) +to highlight the same address and data registers while editing (see new `View -> Highlight Word at Caret` menu item). + ## Development notice -This plugin has been written in Kotlin 1.5. +This plugin has been written in Kotlin 1.5 using Grammar-Kit. It is probably the only plugin (besides [Cajon](https://github.com/chrisly42/cajon-plugin) from the same author) that uses JUnit 5 Jupiter for unit testing so far (or at least the only one I'm aware of ;) ). The IntelliJ framework actually uses the JUnit 3 TestCase for plugin testing, and it took me quite a while to @@ -65,6 +69,12 @@ make it work with JUnit 5. Feel free to use the code (in package ```de.platon42. ## Changelog +### V0.2 (unreleased) + +- Added (same) icon for plugin as for file type. +- Performance improvement: Use Word-Index for global labels and symbols instead of iterating over the file. +- Performance improvement: Use Stub-Index for global labels and symbols. + ### V0.1 (20-Jul-21) - Initial public release. \ No newline at end of file diff --git a/build.gradle b/build.gradle index 658fe0d..43c6367 100644 --- a/build.gradle +++ b/build.gradle @@ -46,6 +46,12 @@ intellij { patchPluginXml { setChangeNotes(""" +

V0.2 (xx-Jul-21)

+

V0.1 (20-Jul-21)