Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

first draft of Effective tab for BndEditor #6406

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

chrisrueger
Copy link
Contributor

adds a first draft of an readonly "Effective Source view" of a Bnd Editor based on comment #6401 (comment)

It shows you all the effective properties with inheritance and includes.

  • supports find text via CMD+F
  • add Syntax highlighting (same as Source view)

image

This is a nice additional debugging tool, because it makes things visible to the human eye, which were previously hidden.

Comment about code: I reused some code of the JarEditor (JarPrintPage.java) and added search-dialog and syntax highlighting. Sorry if this is not state-of-the-art Eclipse JFace code.

@chrisrueger chrisrueger force-pushed the bndeditmodel-effective-ui branch from 426c073 to 9c48429 Compare December 15, 2024 16:26
@chrisrueger chrisrueger changed the title first draft of Bnd Effective Source tab first draft of Effective tab for BndEditor Dec 15, 2024
@chrisrueger chrisrueger force-pushed the bndeditmodel-effective-ui branch from 18e94ee to 52ea878 Compare December 20, 2024 05:28
@chrisrueger
Copy link
Contributor Author

chrisrueger commented Dec 20, 2024

@pkriens this is the current status of the "Effective" tab in the BndEditor

image
  • shows readOnly source
  • and a TableViewer
  • side by side (we can remove this in the future. I found it just handy at the moment during development, for easy finding and copypasting of stuff)
  • both can be resized with drag handle in the middle (SashForm)
  • TableViewer supports doubleClick which opens BndEditor for the property. e.g. if you are viewing /myproject/build.bnd when you dclick on a row of a property which was inherited from /cnf/build.bnd then BndEditor of cnf/build.bnd

Further TODOs could be:

  • filter and Copy-To-Clipboard for the TableViewer

Let me know when you want to take over for more magic :)

@pkriens
Copy link
Member

pkriens commented Dec 20, 2024

I might take a stab in the next 2 weeks when I am not allowed to sit in my office :-)

@chrisrueger chrisrueger force-pushed the bndeditmodel-effective-ui branch from ce00b37 to a3623f7 Compare December 22, 2024 22:26
Signed-off-by: Christoph Rueger <[email protected]>

add find text via CMD+F

Signed-off-by: Christoph Rueger <[email protected]>

add Syntax highlighting via SourceViewer

remove unnecessary code

remove some code which came in from JarPrintPage.java

Signed-off-by: Christoph Rueger <[email protected]>

fix resource bundle

found in org.eclipse.ui.texteditor.EditorMessages.BUNDLE_FOR_CONSTRUCTED_KEYS which is unfortunatelly not accessible (private)

Signed-off-by: Christoph Rueger <[email protected]>

add line numbers

Signed-off-by: Christoph Rueger <[email protected]>

rename tab just "Effective"

Signed-off-by: Christoph Rueger <[email protected]>
Signed-off-by: Christoph Rueger <[email protected]>

remove file
Signed-off-by: Christoph Rueger <[email protected]>
use resizable SashForm
Signed-off-by: Christoph Rueger <[email protected]>
and finally fix the scrolling issues by borrowing StackLayout from JARPrintPage.java

Signed-off-by: Christoph Rueger <[email protected]>
Signed-off-by: Christoph Rueger <[email protected]>
Signed-off-by: Christoph Rueger <[email protected]>
this gives more flexibility when working with the values since we just don't have strings only

Signed-off-by: Christoph Rueger <[email protected]>
Signed-off-by: Christoph Rueger <[email protected]>
@chrisrueger chrisrueger force-pushed the bndeditmodel-effective-ui branch from 42e19c5 to 6286697 Compare December 23, 2024 09:30
@chrisrueger
Copy link
Contributor Author

I might take a stab in the next 2 weeks when I am not allowed to sit in my office :-)

Thanks. I have pushed some improvements. Hope that might be a good place to takeover.

  • there is a button at the top to toggle between table and source view (button position can be improved, I was just too lazy to mess around with positioning at the moment)
  • double clicking on a row opens the editor of the .bnd / bnd.run file if it is not in the current file)
  • path is only filled if it is from a property file. So if path is empty, the property is coming from somewhere else

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants