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

Use new designer bindings #42

Merged
merged 13 commits into from
May 18, 2020
Merged

Conversation

oowekyala
Copy link
Member

@oowekyala oowekyala commented Apr 26, 2020

Refs pmd/pmd#2363, #33


Now the "main attribute" of nodes is displayed in the tree like so:

Capture d’écran de 2020-05-01 16-03-34

I think over time this will payoff as we're not dependent on the image anymore to have a "grokkable" tree.

Nodes can be folded by default (the behavior is implemented by the designer) but this is not opted in by any language module yet. A couple of observations on the java tree:

  • the "main attribute" of ImportDeclaration in java is @ImportedName and it could be folded by default
  • the main attr of VariableDeclaratorId is @Name and not @Image
  • we could fold Type nodes by default
  • Annotation could be folded by default, it needs a main attribute. Currently there is @AnnotationName, we could expose rather a @SimpleName at least, and @BinaryName based on the type resolution result (and on java-grammar, on the disambiguation result - which makes me realize I forgot to implement disambiguation for annotations)

The XPath attributes panel is revamped to a table, "extra info" is listed at the bottom (this includes the type):

Capture d’écran de 2020-04-26 01-42-23

As you can see there are now visual cues for deprecated attributes, there is even a tooltip:

Capture d’écran de 2020-04-26 01-42-59

Note that those two screenshots were taken on an earlier version, now the attributes are also sorted alphabetically


This is a draft because I'm thinking about adding some styling to the treeview to make it more readable. I think this is ready now. Suggestions are welcome

@oowekyala oowekyala added this to the 6.24.0 milestone May 1, 2020
@oowekyala oowekyala marked this pull request as ready for review May 1, 2020 14:04
@oowekyala oowekyala merged commit 8f52bfa into pmd:master May 18, 2020
@oowekyala oowekyala deleted the use-designer-bindings branch May 25, 2020 17:22
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.

1 participant