OvermindDL1

OvermindDL1

Oh that is cool, I usually just do that manually by using the raw erlang calls, I may have to take a look at this now, though eclipse uses up so much memory that it is hard to run here… ^.^;

0
Post #22
LawJolla

LawJolla

Thank you and all of the contributors for their hard work! I had switched to VS Code, but I like WebStorm more for JS. I’m hoping this update brings me back to WS.

0
Post #23
KronicDeth

KronicDeth OP

Thanks

  • For reporting when scope.isEquivalentTo(lastParent.getParent()) is false in processDeclarationsInPreviousSibling

Changelog

v5.1.0

Enhancements

Bug Fixes

  • #669 - Replace assert scope.isEquivalentTo(lastParent.getParent()) with an if and log what lastParent was when condition is false, so root cause can be traced. - @KronicDeth

README Updates

Debugger

IntelliJ Elixir allows for graphical debugging of *.ex files using line breakpoints.

Line breakpoints for debugger can be set in gutter of editor tab.
Line breakpoints can added by clicking in the left-hand gutter of an editor tab. A red dot will appear marking the breakpoint. When a Run Configuration is Run with the Debug (bug) instead of Run (arrow) button, execution will stop at the breakpoint and you can view the local variables (with Erlang names) and the stackframes.

Steps

  1. Define a run/debug configuration
  2. Create breakpoints in the *.ex files
  3. Launch a debugging session
  4. During the debugger session, step through the breakpoints, examine suspended program, and explore frames.

Basics

After you have configured a run configuration for your project, you can launch it in debug mode by pressing Ctrl+D.

Keyboard Shortcuts
Action Keyword Shortcut
Toggle Breakpoint Cmd+F8
Resume Program Alt+Cmd+R
Step Over F8
Step Into F7
View breakpoint details/all breakpoints Shift+Cmd+F8

Breakpoints

When a breakpoint is set, the editor displays a breakpoint icon in the gutter area to the left of the affected source code. A breakpoint icon denotes status of a breakpoint, and provides useful information about its type, location, and action.

The icons serve as convenient shortcuts for managing breakpoints. Clicking an icon removes the breakpoint. Successive use of Alt - click on an icon toggles its state between enabled and disabled. The settings of a breakpoint are shown in a tooltip when a mouse pointer hovers over a breakpoint icon in the gutter area of the editor.

Status Icon Description
Enabled Red dot Indicates the debugger will stop at this line when the breakpoint is hit.
Disabled Red dot with green dot in center Indicates that nothing happens when the breakpoint is hit.
Conditionally Disabled Red dot with green dot in top-left corner This state is assigned to breakpoints when they depend on another breakpoint to be activated.

When the button Red dot surrounded by crossed-out circle is pressed in the toolbar of the Debug tool window, all the breakpoints in a project are muted, and their icons become grey: Grey dot.

Accessing Breakpoint Properties
Viewing all breakpoints

To view the list of all breakpoints and their properties, do one of the following:

  • Run > View Breakpoints
  • Shift+Cmd+F8
  • Click the Two red dots layered vertically on top of each other with smaller grey rings to right of the red dots
  • Breakpoints are visible in the Favorites tool window.
Viewing a single breakpoint

To view properties of a single breakpoint

Configuring Breakpoints

To configure actions, suspend policy and dependencies of a breakpoint

  1. Open the Breakpoint Properties
    • Right-click a breakpoint in the left gutter, then click the More link or press Shift+Cmd+F8
    • Open the Breakpoints dialog box and select the breakpoint from the list
    • In the Favorites tool window, select the desired breakpoint, and click the pencil icon.
  2. Define the actions to be performed by IntelliJ IDEA on hitting breakpoint:
    • To notify about the reaching of a breakpoint with a text message in the debugging console, check the “Log message to console” check box. A message of the format *DBG* 'Elixir.IntellijElixir.DebugServer' got cast {breakpoint_reached, PID} will appear in the console.
    • To set a breakpoint the current one depends on, select it from the “Disabled until selected breakpoint hit” drop-down list. Once dependency has been set, the current breakpoint is disabled until selected one is hit.
      • Choose the “Disable again” radio button to disable the current breakpoint after selected breakpoint was hit.
      • Choose the “Leave enabled” radio button to keep the current breakpoint enabled after selected breakpoint was hit.
    • Enable suspending an application upon reaching a breakpoint by checking the “Suspend” check box.
Creating Line Breakpoints

A line breakpoint is a breakpoint assigned to a specific line in the source code.

Line breakpoints can be set on executable lines. Comments, declarations and empty lines are not valid locations for the line breakpoints.

  1. Place the caret on the desired line of the source code.
  2. Do one of the following:
    • Click the left gutter area at a line where you want to toggle a breakpoint
    • Run > Toggle Line Breakpoint
    • Cmd+F8
Describing Line Breakpoints
  1. Open the Breakpoints dialog
  2. Right-click the breakpoint you want to describe
  3. Select “Edit description” from the context menu
  4. In the “Edit Description” dialog box, type the desired description.
Searching for Line Breakpoints
  1. Open the Breakpoints dialog
  2. Start typing the description of the desired breakpoint
Jump to Breakpoint Source
  • To view the selected breakpoint without closing the dialog box, use the preview pane.
  • To open the file with the selected breakpoint for editing, double-click the desired breakpoint.
  • To close Breakpoints dialog, press Cmd+Down. The caret will be placed at the line marked with the breakpoint in question.
Disabling Line Breakpoints

When you temporarily disable or enable a breakpoint, its icon changes from to and vice versa.

  1. Place the caret at the desired line with a breakpoint.
  2. Do one of the following:
    • Run > Toggle Breakpoint Enable
    • Right-click the desired breakpoint icon, select or deselect the enabled check box, and then click Done.
    • Alt-click the breakpoint icon
Deleting Line Breakpoints

Do one of he following:

  • In the Breakpoints dialog box, select the desired line breakpoint, and click the red minus sign.
  • In the editor, locate the line with the line breakpoint to be deleted, and click its icon in the left gutter.
  • Place caret on the desired line and press Cmd+F8.

Starting the Debugger Session

  1. Select the run/debug configuration to execute
  2. Do one of the following
    • Click Bug on the toolbar
    • Run > Debug
    • Ctrl+D

OR

Debug quick menu

  1. Ctrl+Alt+D
  2. Select the configuration from the pop-up menu
  3. Hit Enter

Examining Suspended Program

Processes
Processes.png796×528 71 KB

The "Thread" drop-down lists the current processes in the local node. Only the current process is suspended. The rest of the processes are still running.
Frames
Frames.png766×102 12.9 KB

The Frames for the current process can be navigated up and down using the arrow keys or clicking on the frame.
  • Press Up or Down to change frames
  • Click the frame from the list
Jump to Current Execution Point

When changing frames or jumping to definitions, you can lose track of where the debugger is paused. To get back to the current execution point, do one of the following:

  1. Run > Show Execution Point.
  2. Alt+F10
  3. Click on the stepping toolbar of the Debug tool window.
Variables

Variables.png2316×516 79.2 KB

While Elixir allows rebinding variable names, Erlang does not, so when viewed in the Variables pane, variables will have an @VERSION after their name indicating which rebinding of a the variable is. Even if there is no variable reuse, the first variable will still have @1 in its name.

Stepping

Action Icon Shortcut Description
Show Execution Point Alt+F10 Click this button to highlight the current execution point in the editor and show the corresponding stack frame in the Frames pane.
Step Over F8 Click this button to execute the program until the next line in the current function or file, skipping the function referenced at the current execution point (if any). If the current line is the last one in the function, execution steps to the line executed right after this function.
Step Into F7 Click this button to have the debugger step into the function called at the current execution point.
Step Out Shift+F8 Click this button to have the debugger step out of the current function, to the line executed right after it.

Installation

Inside IDE using JetBrains repository

  1. Preferences
  2. Plugins
  3. Browse Repositories
  4. Select Elixir
  5. Install plugin
  6. Apply
  7. Restart the IDE

Inside IDE using Github releases

In browser

  1. Go to releases.
  2. Download the lastest zip.

In IDE

  1. Preferences
  2. Plugins
  3. Install plugin from disk…
  4. Select the downloaded zip.
  5. Apply
  6. Restart the IDE.

Donations

If you would like to make a donation you can use Paypal:

Donate

If you’d like to use a different donation mechanism (such as Patreon), please open an issue.

11
Post #24
jwarlander

jwarlander

Great stuff! Almost feels like I need to try IntelliJ soon.. :smiling_face_with_sunglasses:

1
Post #25
OvermindDL1

OvermindDL1

Likewise, this is shaping up and developing fast!

0
Post #26
svsdehh

svsdehh

great enhancements!

this makes it really easier to develop in elixir.

0
Post #27
KronicDeth

KronicDeth OP

Thanks

  • For reporting SmartHashSet null errors
  • For building their own test versions of 6.0.0 and reporting pre-release bugs
  • For reporting Kernel.SpecialForms colors were wrong after merging the Kernel and Callable annotator
  • For reporting wrong indentation inside of stab (do block body)
  • Decompilation not working for OTP 20 beams using AtU8 instead of Atom chunk
  • Indexing problems with 6.0.0
  • For needling me into testing NixOS
  • Reporting me bundling intellij-erlang’s templates because it was a hard-dependency instead of optional
  • For explaining how to make intellij-erlang a soft-dependency correctly
  • For reporting error inserting completion at end of file
  • For reporting UnmatchedAtUnqualifiedBracketOperation could not be checked to be a parameter
  • For both reporting the debugger crashes and designing how to blacklist bad modules
  • For reporting trailing spaces not being stripped before the formatter was implemented
  • For reporting the dependency on JUnit code in non-test code
  • For reporting "" being sent when ExUnit run configuration had no parameters
  • Chad Woolley (@thewoolleyman)
  • For reporting Absinthe parsing error
  • For reporting ElixirMatchedUnqualifiedNoParenthesesCallImpl parameter name set could not be determined
  • For reporting ModuleAttribute.typeTypeParameterNameSet should assume Aliases are incorrectly capitalized parameter names
  • For reporting the poor choice of background color for sigil in the Default Theme
  • For reporting incorrect highlighting of defmodule
  • For reporting problems decompiling CORBA modules from Erlang
  • For reporting debugger errors
  • For reporting that "'" was being parsed as a heredoc promoter instead of a single quote inside double quotes
  • Decompilation errors with rebar3_hex_config.beam
  • For reporting unhelpful decompilation error messages
  • For a full example to produce an ElixirVariable to trigger isVariable bug
  • For reporting the mix deps.get can hang prompting for if the user wants to mix local.hex --force
  • For reporting mix path quoting problems on Windows
  • For reporting the poor feedback when the bin is selected as the SDK home instead of the parent of bin and lib
  • For reporting double quote balancing issues
  • For reporting that link to file goes to wrong file when multiple files share same filenames
  • For reporting compilations errors do not mark entire test run as failed
  • For reporting inconsistent coloring of defs
  • For asking for Nix/NixOS support

Changelog

v6.0.0

Enhancements

  • #724 - @KronicDeth
    • Code Formatter
      • do block lines are indented
      • do blocks end as the last argument of a no parentheses call unindents to the start of the call
      • If one clause of a multi-clause anonymous function wraps, all clauses wrap.
      • Indent after else
      • Indent map and struct keys
      • All keys wrap if any key wraps
      • No spaces around…
        • .
      • Spaces around…
        • and
        • in
        • or
        • when
      • Configure spaces around…
        • =
        • <- and \\
        • !=, ==, =~, !==, and ===
        • <, <=, >=, and >
        • + and -
        • * and /
        • Unary +, -, !, ^, and ~~~
        • ->
        • ::
        • |
        • || and |||
        • && and &&&
        • <~, |>, ~>, <<<, <<~, <|>, <~>, >>>, and ~>>
        • ..
        • ^^^
        • ++, --, .., <>
        • =>
      • Configure spaces before…
        • ,
      • No space after…
        • @
      • Spaces after…
        • not
        • fn
        • after
        • catch
        • rescue
        • key:
      • Configure space after…
        • &
        • ,
      • Configure spaces within…
        • { }
        • << >>
        • [ ]
        • ( )
      • No space around / in &NAME/ARITY and &QUALIFIER.NAME/ARITY
      • when wraps when its right operand wraps, so that guards start with when on a newline when they are too long.
      • Align |> at start of indented line for pipelines
      • Align end with start of call instead of start of line for do blocks in pipelines
      • Indent list elements when wrapped
      • Indent tuple elements when wrapped
      • Align type definition to right of ::
      • Align guard to right of when when guards span multiple lines
      • Align two operator (++, --, .., <>) operands, so that <> binaries are multiple lines align their starts instead of using continuation indent and being indented relative to first operand.
      • Align pipe | operands, so that alternates in types and specs are aligned instead of continuation indented relative to the first operand.
      • Comments in spec (that is above operands to | align with the operands
      • Remove newlines from pipelines, so that all pipelines start with an initial value or call and each |> is the start of a successive line.
      • Key exclusivity: if an association operation or keyword key is already on a line, the container value automatically has it’s elements wrapped if there is nested associations or keyword pairs, so that two levels of keys are not on the same line.
      • Indent bit string (<< >>) elements when wrapped
  • #732 - @KronicDeth
    • Update IntelliJ IDEA version to latest in each MINOR version:
      • 2017.1.12017.1.5
      • 2016.3.52016.3.7
    • Update Elixir version 1.4.21.4.5
  • #738 - @KronicDeth
    • TeamCityExUnitFormatting.put_event
    • Always match on %__MODULE__{} for state in clauses to prevent state update errors
    • Match on :suite_finished and :suite_started events, so that only events added to the interface will be unknown and IO.warn can be used tell anyone spotting the new event to file an issue.
  • #741 - Instead of pinning position (1 for lines or 3 for heredocs), pin *_PROMOTER token, so it’s more obvious the pattern is that the promoter is pinned. - @KronicDeth
  • #747 - Regression test for #659 - @KronicDeth
  • #629 - Search for Elixir SDKs in /nix/store on Mac if homebrew path does not exist - @KronicDeth
  • #751 - @KronicDeth
    • Regression test for #683
    • Store expected decompilation in files to shrink DecompilerTest length
  • #754 - Update to org.jetbrains.intellij 0.2.15 - @KronicDeth
  • #760 - Use Elixir.LDAPEx.ELDAPv3.beam as regression test for #703 - @KronicDeth
  • #764 - Show quotes in list in macros in Structure View - @KronicDeth
  • #768 - References will be cached until the file containing the PSI element changes, so that results from Callable#multiResolve, CallDefinitionClause#multiResolve, Module#multiResolve, and ModuleAttribute#multiResolve, which are all the extant references, can be cached and invalidated correctly. - @KronicDeth
  • #769 - Use ParameterLists to support Path Variables in program parameters. - @KronicDeth
  • #774 - @KronicDeth
    • Adjust SDK home path when bin, lib, or src to parent directory.
    • Format ElixirSdkType.
  • #775 - Regression test for #354 - @KronicDeth
  • #777 - @KronicDeth

    • Include specific message for each decompilation error reason.

    • Regression test for #772

    • AtU8 UTF8 atoms chunk decompilation to support OTP 20 compiled .beam files.

    • Regression test for Elixir 1.5.0 announcement to ensure that unicode from AtU8 chunk can be read from beam file produced by following Elixir code:
      ```elixir
      defmodule AtU8Test do
      def こんにちは世界 do
      :こんにちは世界

           saudação = "Bom dia!"

    saudação
  end
end
```
  • #771 - Guard against read/write mismatch in stubs - @KronicDeth
  • #782 - Always install IdeaVIM in the gradle sandbox because it got annoying having to reinstall it when the sandbox reset. - @KronicDeth
  • #786 - @KronicDeth
    • Merge both homebrew and nix store on Mac
    • Merge default and nix store on Linux
  • #789 - Format MixRunningStateUtil and fix warnings. - @KronicDeth

Bug Fixes

  • #726 - @KronicDeth
    • Treat :: the same as : in key: after when in type specifications as it’s a realistic error.
    • Change . to # when referring to constants in javadocs
    • Remove @param without descriptions
    • Remove explicit type from generics when the type can be inferred.
    • Check if atNonNumericOperation reference is non-null before resolving
    • Swap empty branches to inverted conditions for final else.
    • Check if Type leftOperand is null before using it.
    • Remove empty highlightTypesAndTypeParameterUsages(When...)
    • Remove unused highlightTypesAndSpecificationTypeParameterDeclarations
    • Flip equals to eliminate need for null check
    • Remove redundant type arguments (<...>)
    • Change Collections.EMPTY_SET to Collections.emptySet() to prevent uncheck cast warnings.
    • Inline constant argument for errors.
    • Check if when rightOperand is non-null before scanning it for parameter names.
    • Fix typos
  • #732 - @KronicDeth
    • When compilation error is detected during mix test, it will be turned into a test failure.
      • Compilation errors are any stacktraces to stderr that end in (elixir) lib/kernel/parallel_require.ex:.
      • The test failure for the compilation will be attributed to either mix test or the inferred module name of test file.
        • If the first line of the stacktrace contains test/.*_test.exs:\d+: \(module\)
          • The file and line from that line will be used as the location of failure
          • The test/ and .exs will be stripped from the file and it will be camelized to produce the derived test module name of the failure
        • Otherwise, mix test is used
    • Rearrange doc test names to emphasize the function being tested: "test doc at MODULE.FUNCTION/ARITY (COUNT)" becomes "MODULE.FUNCTION/ARITY doc (COUNT)"
      • If MODULE is the same as the test case without the Test suffix, then MODULE. is stripped too and the test name becomes only FUNCTION/ARITY doc (COUNT)
    • Fix parallel test cases nesting under each other due to asynchronous reporting from formatter. ##teamCity testSuiteStarted messages automatically nest, so switched to using nodeId and parentNodeId system, so that nesting is explicit. This will allow multiple parallel tests to show up in GUI too.
    • Elixir. prefix is stripped from test case names.
  • #728 - Handle Elixir versions with non-numeric parts - @pazustep
  • #734 - Use a separate formatter, one GenEvent-based and one GenServer-based, depending on whether the SDK is >= 1.4.0 as that’s when GenEvent was deprecated and GenServer was preferred. - @KronicDeth
  • #736 - @KronicDeth
    • Merge Callable and Kernel annotators
    • Use PsiElementVisitor instead of PsiRecursiveElementVisitor, so that macros in defmodule block don’t get double annotated.
    • Instead of erasing and then applying multiple TextAttributeKey, erase as before, but then merge the TextAttributeKey’s TextAttributes and apply as single setEnforcedTextAttributes. For some reason, this fixes the inconsistency of whether PREDEFINED_CALL or MACRO_CALL is applied first.
    • In case of multiple resolveds, make those that need PREDEFINED_CALL to win.
  • #738 - @KronicDeth
    • TeamCityExUnitFormatting.new should return struct only because none of the formatters expects an :ok tuple.
    • Fix order of TeamCityExUnitFormatting.put_Event catchall parameters.
    • FileReferenceFilter
      • Add .exs to pattern for stacktrace linking.
      • Highlight only stacktrace path and line umber instead of entire line
      • Better path match in stacktraces
        • Only accept VirtualFile if it has a suffix matching the stacktrace’s path instead of accepting the first index file with a matching basename.
        • Allow multiple VirtualFiles to be linked if it turns out there is a true file path collision between two OTP apps in the Project or Libraries.
      • Format and fix warnings
  • #741 - @KronicDeth
    • Pin promoter for all quotes, including the previously missing stringLine and charListLine.
    • Only insert closing quote if previous token was an opening quote.
  • #742 - @KronicDeth
    • On unquote, include argument in name of call definition clause
    • Look outside tuple containing quote for enclosingMacroCall, which allows going to Phoenix.Template.compile’s quote’s defp
    • Treat Module.create as `Modular
    • Or interface to unify Matched and Unmatched Ors.
    • Look at both side of Or operation for nested child calls for Structure view.
    • Make unquote(ARG1) name for getName and indexing
  • #744 - @KronicDeth
    • ElementDescription for ElixirVariable
    • Mark UnqualifiedParenthesesCalls as call instead of variable.
  • #745 - @KronicDeth
    • mix local.hex --force before mix deps.get during project import to prevent prompt for hex update when local hex is earlier than that required by mix.
    • Fix warnings and format MixProjectRootStep
  • #746 - @KronicDeth
    • Mark ElixirDecimalFloat as error in types.
      • If in a Range: “Floats aren’t allowed in Ranges”
      • Otherwise: “Float literals are not allowed in types. Use float() instead”.
  • #747 - @KronicDeth
    • Ignore jps-*/out directories.
    • Look at parent for isParameter for AtUnqualifiedBracketOperation.
    • Treat AtUnqualifiedBracketOperation the same as UnqualifiedBracketOperation for isVariable.
  • #748 - Include path in error messages from buildFileStub - @KronicDeth
  • #749 - Erlang allows do as a function name, but it’s a keyword in Elixir, so wrap it as unquote(:do). The SpecialForm decompiler already did this unquote(...) wrapping, but do is a keyword and not a special form, so rename the decompiler to Unquoted. - @KronicDeth
  • #750 - @KronicDeth

    • Move {3} inside | for SIGIL PROMOTER and TERMINATOR:

      SIGIL_HEREDOC_PROMOTER = ({SIGIL_DOUBLE_QUOTES_PROMOTER}|>
{SIGIL_SINGLE_QUOTES_PROMOTER}){3}
SIGIL_HEREDOC_TERMINATOR = ({SIGIL_DOUBLE_QUOTES_TERMINATOR}|>
{SIGIL_SINGLE_QUOTES_TERMINATOR}){3}

      intellij-elixir/src/org/elixir_lang/Elixir.flex at v5.1.0 · KronicDeth/intellij-elixir · GitHub

      The | is inside group that is then {3}'d, so it allows either ' or " in groups of three. This is only applies to the sigils. It’s correct for normal string and charlist heredocs:

      CHAR_LIST_HEREDOC_PROMOTER = {CHAR_LIST_PROMOTER}{3}
CHAR_LIST_HEREDOC_TERMINATOR = {CHAR_LIST_TERMINATOR}{3}

STRING_HEREDOC_PROMOTER = {STRING_PROMOTER}{3}
STRING_HEREDOC_TERMINATOR = {STRING_TERMINATOR}{3}

QUOTE_HEREDOC_PROMOTER = {CHAR_LIST_HEREDOC_PROMOTER} | {STRING_HEREDOC_PROMOTER}
QUOTE_HEREDOC_TERMINATOR = {CHAR_LIST_HEREDOC_TERMINATOR} | {STRING_HEREDOC_TERMINATOR}

      intellij-elixir/src/org/elixir_lang/Elixir.flex at v5.1.0 · KronicDeth/intellij-elixir · GitHub

  • #751 - Unquote function names that start with an uppercase codepoint, so that they aren’t parsed as Aliases. These function names occur in the CORBA modules in OTP. - @KronicDeth
  • #754 - @KronicDeth
    • Using intellij.plugins will prevent packaging intellij-erlang as a runtime dependency, which leads to duplicate templates.
    • Don’t use the JPS type for jps-* projects because their deps become incompatible with other projects.
  • #755 - Add missing breaks to case statement in processDeclarations(Match, ...) that caused the logic of whether to check left, right, or both operand based on the whether the treeWalkUp came from always fell through to the RIGHT case, so it was only, always checking the right operand of the match and never the left operand. - @KronicDeth
  • #756 - Skip processDeclarationsInPreviousSibling when lastParent is ElixirFile - @KronicDeth
  • #757 - Remove background color from sigils because it stands out really badly in the Default theme where it’s black on white and while it doesn’t in Darcula, it’s unnecessary there because it’s so close to the editor background color in Darcula. - @KronicDeth
  • #758 - Treat Alias as miscapitalized type parameter. @KronicDeth
  • #759 - Ignore call definition clauses after when in type specifications as it is a common occurrence when typing a specification above a pre-existing call definition clause. - @KronicDeth
  • #761 - Use THashSet instead of the more specific SmartHashSet because THashSet allows null keys, which are expected for the canonicalNameSet. - @KronicDeth
  • #764 - @KronicDeth
    • Look above List for enclosing modular macro.
    • Look above ElixirNoParenthesesManyStrictNoParenthesesExpression for enclosing modular macro.
  • #765 - Remove background color from Sigil Color Scheme Design to match changes in #757. - @KronicDeth
  • #769 - @KronicDeth
    • Check if program parameters is blank before splitting into mix args.
    • Use ParametersList to properly parse quote program parameters.
  • #773 - @KronicDeth
    • Move Quoter into test directory, so it and its dependency on JUnit is only used for test compilation and runtime and not the shipped runtime.
    • Fix Quoter warnings and format.
  • #774 - @KronicDeth
  • #775 - Always check if resolution result is right operand of match. - @KronicDeth
  • #776 - CallDefinitionClause InsertHandler always assumed there was a character after the insert location, but when inserting at the very end of the file, there isn’t, which caused an IndexOutOfBoundsException. Only check if the following character is not a space, (, or [ when the document is longer than the tail offset to prevent the IndexOutOfBoundsException. If the insertion is at the end of the file, then the () will always be inserted. - @KronicDeth
  • #777 - DecompilatedDecompilation - @KronicDeth
  • #771 - The lower-level Data(Output|IntputStream (write|read)Int don’t work correctly with sizes, so use the JetBrains (write|read)VarInt ones instead. - @KronicDeth
  • #782 - Delegate ChildAttributes to previous child when available: Block.getChildAttributes is used when Enter is pressed to determine the indentation and alignment. Using the default implementation, newlines in stabs look overly indented, but there is a constant, DELEGATE_TO_PREV_CHILD that can be used to just use the last child’s indent as long as there is one, which appears to work well for stabs (do block bodies, etc). - @KronicDeth
  • #783 - @KronicDeth
    • Increase suspect nameSetSize from 4 to 10 because a Poison.Encoder has an impl module for 4 types, and so has 4 canonical names.
    • Only read-ahead if guard length is non-zero; otherwise, only warn the nameSetSize may be suspect and don’t read-ahead as this can mess up OK namesets.
  • #784 - @KronicDeth
    • Override Kernel.SpecialFroms arity intervals
      • alias overridden from 2 to 1-2 to support without :as option.
      • import overridden from 2 to 1-2 to support without :except or :only options.
      • quote overridden from 2 to 1-2 to support block without options.
      • require overridden from 2 to 1-2 to support without :as option.
      • super overridden from 1 to 0- to support calling any super method.
  • #789 - elixir.bat in at least Elixir 1.5.1, will not properly parse a mix path with spaces in it on Windows even when the path has outer quotes (see elixir-lang/elixir#6455). It is not possible to use inner quotes, as you can do in cmd.exe, using the JetBrains and Java libraries hat auto-matically quote, so instead bypass the bad quoting in elixir.bat by doing what elixir.bat does: call erl.exe with all the SDK ebin paths added with -pa, then -noshell -s elixir start_cli to run Elixir and-extra to run requires (-r), mix and its tasks. - @KronicDeth

Incompatible Changes

  • #732 - @KronicDeth
    • Drop 14.1.X support because it does not have support for nodeId test output, so it’s not possible to handle the ExUnit test output in a safe manner while still allowing concurrent output for asynchronous tests.

README Updates

Formatting

IntelliJ Elixir can reformat code to follow a consistent style.

  • do block lines are indented
  • do blocks end as the last argument of a no parentheses call unindents to the start of the call
  • If one clause of a multi-clause anonymous function wraps, all clauses wrap.
  • Indent after else
  • Indent map and struct keys
  • All keys wrap if any key wraps
  • No spaces around…
    • .
  • Spaces around…
    • and
    • in
    • or
    • when
  • Configure spaces around…
    • =
    • <- and \\
    • !=, ==, =~, !==, and ===
    • <, <=, >=, and >
    • + and -
    • * and /
    • Unary +, -, !, ^, and ~~~
    • ->
    • ::
    • |
    • || and |||
    • && and &&&
    • <~, |>, ~>, <<<, <<~, <|>, <~>, >>>, and ~>>
    • ..
    • ^^^
    • ++, --, .., <>
    • =>
  • Configure spaces before…
    • ,
  • No space after…
    • @
  • Spaces after…
    • not
    • fn
    • after
    • catch
    • rescue
    • key:
  • Configure space after…
    • &
    • ,
  • Configure spaces within…
    • { }
    • << >>
    • [ ]
    • ( )
  • No space around / in &NAME/ARITY and &QUALIFIER.NAME/ARITY
  • when wraps when its right operand wraps, so that guards start with when on a newline when they are too long.
  • Align |> at start of indented line for pipelines
  • Align end with start of call instead of start of line for do blocks in pipelines
  • Indent list elements when wrapped
  • Indent tuple elements when wrapped
  • Align type definition to right of ::
  • Align guard to right of when when guards span multiple lines
  • Align two operator (++, --, .., <>) operands, so that <> binaries are multiple lines align their starts instead of using continuation indent and being indented relative to first operand.
  • Align pipe | operands, so that alternates in types and specs are aligned instead of continuation indented relative to the first operand.
  • Comments in spec (that is above operands to | align with the operands
  • Remove newlines from pipelines, so that all pipelines start with an initial value or call and each |> is the start of a successive line.
  • Key exclusivity: if an association operation or keyword key is already on a line, the container value automatically has it’s elements wrapped if there is nested associations or keyword pairs, so that two levels of keys are not on the same line.
  • Indent bit string (<< >>) elements when wrapped

Installation

Installation Instructions

6
Post #28
KronicDeth

KronicDeth OP

Version 6.1.0

Thanks

  • For reporting the original failure to setup debugger environment
  • For reporting the failure to setup debugger environment persisted in 6.0.0 the same day as a the release

Changelog

v6.1.0

Enhancements

  • #792 - @KronicDeth
    • Since the process of requiring resource files is the same, org.elixir_lang.ElixirModules has static methods for copying resources out to a temporary directory and adding the -r <temporary_path> for one or more resource files to a new or existing ParametersList. These are now shared for the Mix ExUnit and Debugger code paths.
    • Format class
      • ElixirXDebugProcess
      • MixExUnitRunningState
      • MIxRunningState

Bug Fixes

  • #792 - The compiled .beam files were removed in 58e7d4a, which was before v5.1.0, but not all users had problems with using the debugger. #739 persisted (as reported by @erikreedstrom) when 6.0.0 was released; I retried reproducing on a clean VM and I got it. I’m not sure why it worked for some people in prior releases since the .beam don’t exist that were being copied, but now the debugger uses the same system of copying .ex files and requiring them with -r instead of copying .beam and using -pa to add the ebin directory. Fix was verified local under macOS and in Windows VM that reproduced #739. - @KronicDeth

Installation

Installation Instructions

1
Post #29
KronicDeth

KronicDeth OP

Version 6.1.1

Thanks

  • For reporting the need to install intellij-erlang to get icons to resolve
  • For reporting formatter didn’t indent first line of a new do ... end block
  • For reporting still unhelpful errors from beam decoder

Changelog

v6.1.1

Bug Fixes

  • #795 - When #754 made intellij-erlang a soft-dependency, it broke the debugger’s icons that referenced ErlangIcons, but it turns out all the icon constants were aliases to AllIcons.Debugger constants, so by using the AllIcons.Debugger icons directly, the dependency on ErlangIcons can be removed without the need to copy the image files into intellij-elixir. - @KronicDeth
  • #796 - When do ... end template is inserted, it did not have a previous child whose attributes to use, so it used the default, which left the cursor unindented. To get the cursor indented by default, When the ElementType is DO, apply the stabChildrenIndent rules: indent normal and determine whether to indent relative to direct parent using code style setting. - @KronicDeth
  • #797 - Include VirtualFile path in Beam read errors - @KronicDeth

Installation

Installation Instructions

2
Post #30
michalmuskala

michalmuskala

Seeing all the work on the plugin I decided to give it a go.

I managed to set it up and it works just fine. Great job, @KronicDeth. I don’t like how my code looks, though. I find the built-in dark theme a bit too colourful for my liking - I enjoy rather toned-down colours (I’m using zenburn theme in emacs).
I tried some other colour schemes from http://color-themes.com/ but most of them looked hideous (dark purple and almost illegible module names seem to be a common issue). Any suggestions on some good dark, not-too-colourful schemes?

0
Post #31