de-jcup / eclipse-hijson-editor

Highspeed JSON editor
https://marketplace.eclipse.org/content/hijson-editor
Apache License 2.0
8 stars 1 forks source link

Any place in the UI to show the full-path (dot notation) of currently selected item #25

Closed gurcei closed 1 year ago

gurcei commented 2 years ago

Given:

{
  A: {
    B: {
      C: {
      }
    }

If I've selected C item in the editor, it'd be nice if there was some place within the UI to display the full dot-notation path A.B.C

de-jcup commented 2 years ago

Hm... at the yaml editor I implemented a similar feature: At the outline view toolbar there is a icon where you can copy the dot-notation path of the (inside outline) selected element:

image

The copied path in the picture when selecting c was : a.b.c.

If I would adopt it the same way for HiJson editor, would this fulfill your request as well?

gurcei commented 2 years ago

Yeah, I reckon it'll be sufficient for me, especially if you've already got the existing solution handy that you can port across and save you too much stress :-)

Just for the backstory on how it came on my radar, a colleague showed me how it looks in his vscode ide, a nice bar at the top of the editor that is always updated in realtime (I think they call it the breadcrumb bar there), and I inevitably got very jealous that eclipse didn't have something like this :-D

I guess having something similar for eclipse would be a tonne of work, so I'm happy for any modest, incremental update like you suggest that could get us the same info.

Then again, if you know of some quick/easy place to throw such a string of text into a visible place on the ide and update in realtime (in a console window? or in the status bar?), that'd be awesome too.

de-jcup commented 2 years ago

Sorry for answering so late - I will add the described feature into the HiJSON editor in next release. Maybe I will try to listen to line changes (cursor) and show the key inside the status line (bottom, like for line numbers , columns etc.). But I am not sure how difficult it will be to implement.

de-jcup commented 1 year ago

@gurcei : I have just released Version 1.3.0 on eclipse marketplace. It contains your wanted feature.

de-jcup commented 1 year ago

Video for the features is available at https://youtu.be/ljYvULscFGA

gurcei commented 1 year ago

Very nice, thank you! :)