[jbosstools-issues] [JBoss JIRA] (JBIDE-10702) Editor for JCR Compact Node Definition (CND) files

Dan Florian (JIRA) jira-events at lists.jboss.org
Fri Feb 10 08:56:50 EST 2012


    [ https://issues.jboss.org/browse/JBIDE-10702?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12665631#comment-12665631 ] 

Dan Florian commented on JBIDE-10702:
-------------------------------------

Thanks for all the good comments Randall. I'm good with adding a collapsable namespaces section to the GUI editor tab. That means, instead of 3 tabs, there will now only be the 2 tabs (GUI editor & text editor). I had put namespaces on its own tab because I thought that would be a low-frequency/low-effort part of editing a CND and didn't want that being the first thing the user looked at. However, that section can start off collapsed if we want and won't take up much space when it is collapsed (I can limit the number of visible rows). It also keeps the GUI editor format in-line with the CND format.

I'm also good with adding more detail to the property definitions and child node definitions tables. Double-clicks in the namespaces, property definitions, and child node definitions tables will display an dialog editor.

I like the vertical orientation (one on top of the other) of the property definitions and child node definitions section. That will allow more of their data to be seen. However, I think extending those sections horizontally to the entire width of the editor would be even better. This would make the node types section not as tall (but don't think that is a bad thing). Seems like there is a lot of wasted space in the node types table if it extends to the full height of the editor.

As far as variants go, I included that concept in the design because it is in the spec. I've already added that concept to the business objects I've created. If we truly want to be a JCR 2.0 CND editor I think we need to/should include this concept. I've made each attribute a set of 2 radio buttons, versus just a checkbox, to make it clear to the user what it means if that attribute is not selected and what the default value is. It still only "costs" the user one click.

I will need to more information on the "Show inherited" feature. How will that work? How will the editor find the referenced node type definitions? Is the feature something that you want to go out with the first version of the editor or can it be added later?

I also need more information on the CndTokenizer. I have moved that code over to the new plugins I've created. I have those new plugins dependent on the ModeShape client jar. Does the tokenizer fail on the first error it finds? Or does it just keep track of the errors as it tries parsing the input? Does the tokenizer return user-friendly error messages? How can I turn the tokenizer-created tokens into my business objects that the editor will use?

                
> Editor for JCR Compact Node Definition (CND) files
> --------------------------------------------------
>
>                 Key: JBIDE-10702
>                 URL: https://issues.jboss.org/browse/JBIDE-10702
>             Project: Tools (JBoss Tools)
>          Issue Type: Feature Request
>          Components: modeshape
>            Reporter: Randall Hauch
>            Assignee: Dan Florian
>             Fix For: 3.3.x, 3.4.x
>
>         Attachments: Alternate Editor Tab Strawman (RMH).bmml, Alternate Editor Tab Strawman (RMH).png, ChildNodeDefinitionDialog.bmml, ChildNodeDefinitionDialog.bmml, ChildNodeDefinitionDialog.bmml, ChildNodeDefinitionDialog.png, NamespacesEditorTab.bmml, NamespacesEditorTab.bmml, NamespacesEditorTab.png, NodeTypesEditorTab.bmml, NodeTypesEditorTab.bmml, NodeTypesEditorTab.bmml, NodeTypesEditorTab.bmml, NodeTypesEditorTab.bmml, NodeTypesEditorTab.bmml, NodeTypesEditorTab.bmml, NodeTypesEditorTab.bmml, NodeTypesEditorTab.bmml, NodeTypesEditorTab.bmml, NodeTypesEditorTab.bmml, NodeTypesEditorTab.png, PropertyDefinitionDialog.bmml, PropertyDefinitionDialog.bmml, PropertyDefinitionDialog.bmml, PropertyDefinitionDialog.bmml, PropertyDefinitionDialog.bmml, PropertyDefinitionDialog.bmml, PropertyDefinitionDialog.bmml, PropertyDefinitionDialog.png
>
>
> JSR-283 (aka, JCR 2.0) includes a standard format called 'Compact Node Definition' that is used to declare node types, property definitions, and child node definitions. 
> *Resources*
> The official grammar of the CND format is defined in [Section 25.2|http://www.day.com/specs/jcr/2.0/25_Appendix.html#25.2%20Compact%20Node%20Type%20Definition%20Notation] of the JCR 2.0 specification. The ModeShape project has in its documentation a [tutorial|https://docs.jboss.org/author/display/MODE/Defining+custom+node+types] for working with CND files.
> The ModeShape project also has code to parse a CND file, and it's probably better to simply copy this code and simplify/customize it to the editor's needs rather than have the editor depend on the ModeShape project for just these classes (which probably aren't perfectly usable as is for the editor).
> There are also example CNDs in the ModeShape codebase.
> *Requirements*
> # Edit any .cnd file in the workspace _(Priority 1)_
> # View the file source, with support for select/copy _(Priority 1)_
> # Edit the file source, with support for paste _(Priority 3)_
> # Syntax highlighting (color keywords, quoted strings, comments) of file source would be a nice-to-have _(Priority 2)_
> # Problem markers (in file source, Problems view) would be a nice-to-have _(Priority 3)_
> # Form-based editor:
> ## view/edit/add/remove namespace declarations _(Priority 1)_
> ## view/edit/add/remove node type and its attributes and supertypes _(Priority 1)_
> ## view/edit/add/remove property definition (and its attributes) for a selected node type _(Priority 1)_
> ## view/edit/add/remove child node definition (and its attributes) for a selected node type _(Priority 1)_
> # Preferences for
> ## using long, medium, or short forms of attributes (e.g., "abstract" vs "abs" vs "a") _(Priority 2, start out w/ long)_
> *Other ideas*
> # It would be nice if the user doesn't have to scroll in the form editor when working on a node type.
> # Is it possible to optionally see the both inherited and explicit property definitions and child node definitions? Perhaps the inherited definitions might be grey-ed out and non-editable. One issue might be how to know which node type it came from (without cluttering up the UI).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbosstools-issues mailing list