Improved conditional highlighting + completion [v1.8.1]

Hi everyone,

just bumped a little improvement shortly after the 1.8 release yesterday. Now, those version and debug specifications receive attention as well
+ There’s a completion trigger when writing ‘version =’ or ‘debug =’ now
+ As shown in the figure below, currently set (debug) versions are shown in the completion. Dunno whether this is that useful but it still might be a nice hint :-)
mono-d.version.completionCheers mates,
Alex

 

Conditional code highlighting [v1.8]

Hi everyone,

after fixing a bunch of smaller completion things, I went back to implementing a rather useful Gui improvement – Conditional Code Highlighting.

What works: Specifying custom debug/version constants (+ debug level number) inside the [dub] project settings and selecting a non-debug build configuration affect the grayed-out code regions.
There are also some built-in constants like the one for Windows, Linux (Posix) available.

What’s not working: In-code version/debug specifications, static if’s.

And yes, there’s some little inconsistency between the entirely faded-out ‘else version(Posix)’ block and the else-blocks beneath. You’ll survive it.
mono-d.conditionalhighlighting

Again internal refactorings, less completion bugs [v1.7.2]

Hi everyone,

Just spent a couple of days on

  1. Refactoring the way how symbol resolution scopes are treated,
  2. Improving the way how declaration conditions (debug/version etc.) are treated,
  3. Adding a timeout for completion requests so that in too D-magic moments, as soon as the completion takes more than 200ms (this value can be changed in the options as well)
  4. Improving the IFTI another time when given template arguments are unresolvable but the actual symbol should still be resolvable for e.g. param insight/goto purposes
  5. Fixing completion on string literals

So, another bunch of legacy quick’n dirty codes got replaced by fresh architectures. Hopefully there won’t be that much exceptions occurring for now – I’ve already fixed a bunch of them even before the actual release ;)

At last, hopefully there will be a VisualD release so all these improvements will apply to it as well.

Cheers,
Alex

Mono-D v1.7 – Struct init member completion & massive parse improvements

Hi everyone,

Time for celebrating a new completion feature:
mono-d.structinit

There’s also a completion option in the global D options where you can decide whether it shall only show these items or all items available like when pressing Ctrl+Space.

Anyway there’s probably a way more important thing that has been featured in v1.6.16+:
Due to Orvid’s and my key improvements to the parser infrastructure, parsing the latest v2.065 phobos & druntime only takes 1 second including, 400 ms excluding IO – so a time far below the previous 2.5 seconds (I somehow still can’t put that much trust into this number though — it’s imho too fast to be true :-D ) ! Also, one big mem leakage and a bunch of null-ref exceptions got fixed.

Furthermore, I’ve refactored the completion context determination facilities once more for an even better & more sustainable completion behaviour (i.e. the code’s ready for being polluted again by eventually upcoming features :-D ).

Cheers,
Alex

 

v1.6.14: Hacked-in Tuple completion

Hi everyone,

I just hacked in some convenient AST node resolution bypass/hook which basically allows any symbol to be hardcoded – and as a first hook I chose/was recommended to take the Tuple template magic.
So instead of crawling through all those weird CTFE-using ongoings which may delay the completion entirely, I just take the given template arguments and build up a minimal artificial AST tree – which still could be used for further internal resolution proceeding!

mono-d.tuple1Access a tuple’s fields via indexing works.
mono-d.tuple2

Showing its items as well. Atm showing the fields’ base types is not possible – but this is only a question of resolving the respective field’s type on demand.

Mono-D v1.6.12: Internal refactorings, many bugs fixed, new ones may introduced

Hi everyone,

Just finished another refactoring phase on D_Parser and Mono-D. Results:

  • (Orvid) Added icons for the various instruction sets.
  • [Completion/ParamInsight] Fixed #77 – got vibe.d’s getOption param insight working
  • [Parser] Fixed aBothe/Mono-D#448 – couldn’t parse ‘int arr[];’ properly.
  • [Resolver] Resolved #91 – handling statement-scope-imported symbols via ufcs resolution properly
  • Reworked alias resolution, reworked way of treating ambiguous symbol overloads; Less clutter, less bug-attracting code.
  • Thanks to Rainer from VisualD: add completion for members of anonymous unions and structs
  • [Resolver] Made evaluate T.length where T is a (Type)Tuple properly
  • [Completion] aBothe/Mono-D#443 Prevent root package duplicates in ParseCacheViews
  • [Formatting/Indentation] Fixed #96 invalid indentation on if-else statement constructs

All in all, the code has been prepared for the future now. Hopefully I will not have to apply so many ugly hacks again..and even if..there will be further refactoring phases :)