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.
Summary: | Dev-rev for schema aware code completion (xml/schema/completion) | ||
---|---|---|---|
Product: | xml | Reporter: | Samaresh Panda <samaresh> |
Component: | Schema Tools | Assignee: | Samaresh Panda <samaresh> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | CC: | apireviews, cwebster, mkleint |
Priority: | P2 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | TASK | Exception Reporter: | |
Bug Depends on: | |||
Bug Blocks: | 98410 |
Description
Samaresh Panda
2007-03-21 20:49:21 UTC
MK1: what is the time schedule for making the existing CC in xml/core obsolete? MK2: the current xml/core API allows me to do completion on xml docs that are not strictly based on schema, and are at least partly dynamic. a. I can do element completion based on schema or some other arbitrary source for a given subtree. (in maven's pom.xml, the configuration of a plugin is free-form basically) b. I can query the existing document for values up in the doc and adjust the completion appropriately (when doing completion for a given plugin, I can crawl up the document and find out it's IDs to give completions) c. I can recognize the document as mine based just on filename or location within the document, even if the user doesn't specify schema. d. I can do completion on element text value or parts of it (well, this one is currently broken in 5.5 and 6.0, but was working before) Are these usecases to be supported when the old code gets removed? I would also like to know the plans for deprecating CC from xml/core (used in ant/grammar which I sort of maintain), as well as deprecation of xml/tax (used in apisupport/project). The plan is NOT to make anything obsolete, nor deprecated at this point. If I understand correctly, the CC APIs in xml/core can be used for xml based on DTD. Netbeans do not provide CC on XML documents that conform to a schema. The plan is to provide a core module (SACC) that provides CC wrt schema that can be used across the IDE. If the document declares the conformance to a schema, by default, the IDE will use the SACC. If you do not want this, you can hide this in your module's layer file. If the document doesn't declare the conformance to a schema (e.g. WSDL), you have two choices to provide CC: 1. Take advantage of SACC and get CC for free. In this case, all you need to do is, implement a CompletionModelProvider (see spi package) and pass in your schema(s). The idea is to do this for something like wsdl or build.xml. 2. Not use SACC. Implement your own completion provider and SACC doesn't come in the picture. Answer to a and b) Sounds like some special use-case. Closest thing SACC have, is, schema wildcard substitution. Answer to c) You can get a lot of imformation from CompletionContext. See spi package in xml/schema/completion. Answer to d) Not available but is possible. > The plan is NOT to make anything obsolete, nor deprecated at this point. If I
> understand correctly, the CC APIs in xml/core can be used for xml based on DTD.
That's a wrong assumption. The API in xml/core has nothing to do with DTDs, it
is reasonably general and it's only missing an implementation of CC that is
based on schema (because noone wrote it).
In my code I've written a simple schema walking provider for the schemas I knew
and cared about.
anyway, here is the link to what i'm doing: http://fisheye.codehaus.org/browse/mevenide/trunk/mevenide2/netbeans/grammar/src/main/java/org/codehaus/mevenide/grammar but that's irrelevant to this issue. Fixed, integrated. |