Jetbrains IDE plugin for MC68000 assembly language
Go to file
2021-07-26 20:02:20 +02:00
docs Added minimal docs and screenshot. 2021-07-20 12:54:44 +02:00
gradle/wrapper Initial basic framework. 2021-07-13 12:32:20 +02:00
src Minor fix for ExpressionsTest. 2021-07-26 20:02:20 +02:00
.gitignore Initial commit 2021-07-11 17:48:40 +02:00
.travis.yml Added JUnit5 framework. 2021-07-15 10:44:03 +02:00
build.gradle Added M68kGlobalLabelSymbolCompletionContributor to replace variants returned by M68kGlobalLabelSymbolReference, to have more control over resolution. Contributor also adds registers to code completion. Code tidying. 2021-07-26 19:52:48 +02:00
gradle.properties Initial basic framework. 2021-07-13 12:32:20 +02:00
gradlew Initial basic framework. 2021-07-13 12:32:20 +02:00
gradlew.bat Initial basic framework. 2021-07-13 12:32:20 +02:00
README.md Added M68kGlobalLabelSymbolCompletionContributor to replace variants returned by M68kGlobalLabelSymbolReference, to have more control over resolution. Contributor also adds registers to code completion. Code tidying. 2021-07-26 19:52:48 +02:00
settings.gradle Initial basic framework. 2021-07-13 12:32:20 +02:00

MC68000 Assembly Language Plugin Build Status Coverage Status

MC68000 Assembly Language Plugin is plugin for Jetbrains IDEs (CLion, IntelliJ, etc.).

Example Syntax Highlighting

Purpose

This plugin delivers support for MC68000 assembly language files (VAsm / DevPac-Style).

It adds a language parser with syntax highlighting, referencing and refactoring support, and a few more features.

I'm an Amiga retro democoder, and the lack of a plugin for M68k was the motivation to write one. Also, diving deep into custom language plugins has a steep learning curve.

When I started the plugin in July 2021, I was not aware of the M68k plugin efforts by Jetbrains employee Yann Cébron who has been working on the same topic for quite some time. At the time of writing, his plugin however, has not been release yet. Nevertheless, it has a lot of awesome features and is pretty advanced. Check it out. You can install both plugins at the same time and see what suits you more.

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 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
  • Syntax highlighting and Color Settings Page (you should really modify the color settings to your likings!)
  • Mnemonics code completion
  • Symbols / Labels code completion
  • References / Refactoring support for local and global labels, and symbol assignments.
  • Brace matching
  • Quote handler
  • Goto Symbol support
  • Structure view

Known issues

  • 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.
  • Macro invocations are not yet evaluated, thus no referencing to symbols defined via macros (e.g. STRUCT).
  • No support for includes. Scoping is for global symbols and labels is currently the whole project.
  • 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.
  • No support for other processor instructions, FPU or 68020+ address modes.
  • 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 definition and evaluation on invocation
    • Folding
    • Semantic inspections
    • Quick fixes
    • 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 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 using Grammar-Kit.

It is probably the only plugin (besides Cajon 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 make it work with JUnit 5. Feel free to use the code (in package de.platon42.intellij.jupiter) for your projects (with attribution).

Changelog

V0.2 (unreleased)

  • Cosmetics: 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.
  • Bugfix: No longer reports a syntax error when file lacks terminating End-Of-Line.
  • Enhancement: Registers are now offered for code completion, making editing less annoying.

V0.1 (20-Jul-21)

  • Initial public release.