From 44a4721d771e59188c5a876ba1e214d512272c84 Mon Sep 17 00:00:00 2001 From: chrisly42 Date: Sun, 1 Aug 2021 19:51:42 +0200 Subject: [PATCH] Added names for Adressing Modes. Added Documentation Provider for symbol definitions (shows assigned declaration). Added Documentation Provider for mnemonics (simple version, generated out of ISA information). Work in progress for Register Flow Documentation Provider. New minimum required version of IDE is now 2020.3. --- README.md | 8 +- build.gradle | 8 +- .../intellij/plugins/m68k/asm/M68kIsa.kt | 37 ++++--- .../M68kInstructionDocumentationProvider.kt | 102 ++++++++++++++++++ .../M68kRegisterFlowDocumentationProvider.kt | 39 +++++++ ...8kSymbolDefinitionDocumentationProvider.kt | 24 +++++ .../m68k/inspections/M68kSyntaxInspection.kt | 23 ++-- .../plugins/m68k/utils/M68kIsaUtil.kt | 64 +++++++++++ src/main/resources/META-INF/plugin.xml | 9 +- .../AbstractDocumentationProviderTest.kt | 20 ++++ ...68kInstructionDocumentationProviderTest.kt | 59 ++++++++++ ...8kRegisterFlowDocumentationProviderTest.kt | 31 ++++++ ...mbolDefinitionDocumentationProviderTest.kt | 24 +++++ 13 files changed, 416 insertions(+), 32 deletions(-) create mode 100644 src/main/java/de/platon42/intellij/plugins/m68k/documentation/M68kInstructionDocumentationProvider.kt create mode 100644 src/main/java/de/platon42/intellij/plugins/m68k/documentation/M68kRegisterFlowDocumentationProvider.kt create mode 100644 src/main/java/de/platon42/intellij/plugins/m68k/documentation/M68kSymbolDefinitionDocumentationProvider.kt create mode 100644 src/main/java/de/platon42/intellij/plugins/m68k/utils/M68kIsaUtil.kt create mode 100644 src/test/java/de/platon42/intellij/plugins/m68k/documentation/AbstractDocumentationProviderTest.kt create mode 100644 src/test/java/de/platon42/intellij/plugins/m68k/documentation/M68kInstructionDocumentationProviderTest.kt create mode 100644 src/test/java/de/platon42/intellij/plugins/m68k/documentation/M68kRegisterFlowDocumentationProviderTest.kt create mode 100644 src/test/java/de/platon42/intellij/plugins/m68k/documentation/M68kSymbolDefinitionDocumentationProviderTest.kt diff --git a/README.md b/README.md index 1e54b1a..5abc4b9 100644 --- a/README.md +++ b/README.md @@ -19,12 +19,13 @@ awesome features and is pretty advanced. Check it out. You can install both plug Big kudos to Yann -- a few features were _inspired_ by his code. -My plugin, on the other hand, is still pretty basic and is the result of about a week's effort. I released a really early first version it because I think +My plugin, on the other hand, is still pretty basic and is the result of about two weeks of work. I released a really early first version it because I think it's "good enough" to get started, and I can return to demo coding with its current state. ## Features - Parser / Lexer for MC68000 (yes, only 68000 right now!) assembly language files in VAsm / DevPac style +- Inspection for validating the syntax the 68000 ISA. - Syntax highlighting and Color Settings Page (you should really modify the color settings to your likings!) - Mnemonics code completion - Symbols / Labels / Macros code completion @@ -33,6 +34,7 @@ it's "good enough" to get started, and I can return to demo coding with its curr - Quote handler - Goto Symbol support - Structure view +- Documentation provider for symbol definitions and mnemonics (listing available addressing modes etc.). ## Known issues @@ -42,7 +44,6 @@ it's "good enough" to get started, and I can return to demo coding with its curr - No support for register replacement (e.g. registers replaced by `EQUR` or `EQURL` will cause syntax errors) - While the Lexer supports the -spaces option (where a space introduces a comment), this cannot be configured yet (default is off). - No support for other processor instructions, FPU or 68020+ address modes. -- For versions < V0.4: No semantic checking for allowed address modes or data widths yet. - Unit Test coverage is not as good as it could be (ahem). - Missing but planned features: - Macro evaluation on invocation @@ -70,11 +71,14 @@ make it work with JUnit 5. Feel free to use the code (in package ```de.platon42. ### V0.4 (unreleased) +- Notice: Due to major new API use, this plugin no longer works on IDEs >=2019.3.1, but rather requires >=2020.3. - Enhancement: Added Structure View filters. - New: Added inspection to validate the correctness of a MC68000 instruction regarding operation size and address modes. - Bugfix: Added several missing assembler directives (`opt`, `machine`, etc.). - Bugfix: Uppercase hexadecimal literals were not parsed (JFlex bug?). - Bugfix: Interpretation of register lists was wrong in BNF. +- New: Added Documentation Provider for symbol definitions (shows assigned declaration). +- New: Added Documentation Provider for mnemonics (simple version, generated out of ISA information). ### V0.3 (28-Jul-21) diff --git a/build.gradle b/build.gradle index a047980..417b648 100644 --- a/build.gradle +++ b/build.gradle @@ -48,10 +48,7 @@ intellij { } runPluginVerifier { - ideVersions = ["IC-193.5662.53", "IC-212.4746.92", // 2019.3.1 - 2021.2 - "CL-193.5233.103", "CL-193.7288.25", // 2019.3 - "CL-201.6668.126", "CL-201.8743.17", // 2020.1 - "CL-202.6397.106", "CL-202.8194.17", // 2020.2 + ideVersions = ["IC-203.6682.168", "IC-212.4746.92", // 2020.3 - 2021.2 "CL-203.5981.166", "CL-203.8084.11", // 2020.3 "CL-211.6693.114", "CL-211.7628.27", // 2021.1 "CL-212.4746.93"] // 2021.2 @@ -62,11 +59,14 @@ patchPluginXml { setChangeNotes("""

V0.4 (unreleased)

V0.3 (28-Jul-21)