This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
This is a requirement from the Monrovia team. They have a feature targeted for Kenai release, that requires a custom AppInfo provider in Schema tools. Here is a brief description of the use-case: 1. The user should be able to add and remove AppInfo customization providers. 2. Once a customization is added, there will be one line added to the annotation of the schema information item (xsd:schema), as illustrated below: <xsd:schema ...> <xsd:annotation> <xsd:appinfo source=”urn:com.sun:xsdeditor-customization” xmlns:xec=”urn:com.sun:xsdeditor-customization”> <xec:customization xec:name=”urn:com.sun:custom-encoder-ui-1.0”/> <xec:customization xec:name=”urn:com.foo:other.customization”/> </xsd:appinfo> </xsd:annotation> ... ... </xsd:schema> The tool at runtime, finds the active customization provider and queries it to get the special (appInfo customizer) property sheet for the selected Node. A two-page document describing the requirement has been attached for reference.
Created attachment 36225 [details] AppInfo customization provider
As a part of this feature requirement, we (SchemaTool) need to provide an interface (possible name may be AppInfoCustomizationProvider) that must be implemented by whoever wants to provide the customization. At runtime, the tool will lookup various customization providers available for the schema, get the active one(perhaps) and be able to display the property sheet (appinfo customizer) for the selected node. This sheet will be provided by the customization provider. Next we're going to define the interface.
class AppInfoProvider.java is added to a new package org.netbeans.modules.xml.schema.ui.basic.spi and the package has been made public. Checking in AppInfoProvider.java; /cvs/xml/schema/schemaui/src/org/netbeans/modules/xml/schema/ui/basic/spi/Attic/AppInfoProvider.java,v <-- AppInfoProvider.java new revision: 1.1.2.2; previous revision: 1.1.2.1 Checking in project.xml; /cvs/xml/schema/schemaui/nbproject/project.xml,v <-- project.xml new revision: 1.1.2.12.22.1; previous revision: 1.1.2.12
I don't see any information about the use cases. This is a necessary first step. I don't think the UI proposal works, for several reasons. In particular, the SPI that it implies is problematic. Let's see the use cases, then discuss a proper SPI to make those possible.
The originating use case is described here: http://www.netbeans.org/nonav/issues/showattachment.cgi/36225/CustomizeXSDEditor.odt The intention is to support this case in the form of a provider for app info information. The appinfo of schema is the extension point for the language similar to the way annotation support allows Java to be extended. The initial proposal is to support custom Node injection into the schema view. Given this functionality the following would be supported: * The ability to add an action to the Data Node -- this is supported by the Data System infrastructure and is already present. This feature supports a custom language to be generated into the schema (using the existing schema model). Since this supports a set of arbitrary actions, any action can be attached to the schema Data Node. * The provider supports the ability to inject Nodes under the AppInfo node and thus into the schema tree. Since the nodes are custom, all the capabilities provided by Nodes such as actions and properties are available. * Another possibility is that a set of new types could be supplied by the provider, which would be visible on the App Info node. In terms of Use Cases: A custom language defined in terms of the schema App Info node could be created by extended the current schema editor. The extension would allow top level wizards via Data Object Extension (similar to the apply design pattern feature) as well as visibility and editing capabilities in the node tree. This provides some first class support for extension languages. A more tightly coupled unified vision would provide better usability but require custom changes for each new language supported.
The is now available in release551 code base. Marking this as fixed. No QE needed.
Following are the links pointing to the encoder wiki pages, which show how the feature is used. http://www.glassfishwiki.org/jbiwiki/Wiki.jsp?page=Introduction http://www.glassfishwiki.org/jbiwiki/Wiki.jsp?page=CustomDefined Please contact j.xu@Sun.COM or Ching.Lai.Meng@Sun.COM for questions.