Skip to content

Latest commit

 

History

History
66 lines (47 loc) · 2.73 KB

README.md

File metadata and controls

66 lines (47 loc) · 2.73 KB

KiWi Power Squirrel Idea plugin

KiWi Power fork of Shvetsgroup's Squirrel plugin for IntelliJ

Adds support for Electric Imp’s impWorks™ Builder

Original README.md

Installation

Features

  • Enhances navigation using Ctrl+B ⌘+B, Ctrl+Click ⌘+Click for
    • parameters
    • variables
    • constants
    • functions
    • methods
    • classes
    • class members
    • enum constants
    • @include and @include once
    • Electric Imp agent.ondevice.send and agent.send → device.on

Local development

Prerequisites

  • Java 8+
  • IntelliJ

Plugin development environment

  • Install Grammar-Kit for *.bnf and *.flex file support
    • Adds BNF Grammars and JFlex files editing support including parser/PSI code generator
  • Clone repository
  • Follow instructions on the plugin development environment setup page
    • Enable the Gradle plugin
    • Enable the Plugin DevKit
  • Use File | New… | Project from Existing Sources and open the cloned repository directory

Test

  • Run ./gradlew test from the command line or execute the gradle test task

Build

  • To manually recreate the generated src from IntelliJ use the context menu in the Squirrel.bnf file, Ctrl+⇧+G or ⌘+⇧+G (the build will do this automatically)
  • From the context menu in the Squirrel.bnf file, select Live Preview to test the grammar before building
  • Running ./gradlew buildPlugin from the command line or executing the gradle build task produces a zip file under build/distributions

Testing the plugin locally

  • Either drag & drop the zip file into the running IntelliJ, which will need restarting to apply
  • Alternatively run the Gradle runIde task which will start a new IntelliJ instance with the plugin installed

Known issues

  • For performance file and element resolution is cached
    • New files/usages will need a restart to start appearing
  • Synthetic semi-colon detection is broken in some cases
    • Add semi-colons to includes and local variables if IntelliJ shows red
    • It sometimes stops the references from being resolved