Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 325285 - [content assist] Add unique/key/keyref XSD identity constraint aware proposals to XML editor, please
Summary: [content assist] Add unique/key/keyref XSD identity constraint aware proposal...
Status: NEW
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: wst.xsd (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 enhancement (vote)
Target Milestone: Future   Edit
Assignee: wst.xsd-triaged CLA
QA Contact: Keith Chong CLA
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2010-09-14 15:35 EDT by warping.drum CLA
Modified: 2011-02-24 17:31 EST (History)
1 user (show)

See Also:


Attachments
Adds keyref proposals (108.71 KB, patch)
2010-09-14 15:41 EDT, warping.drum CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description warping.drum CLA 2010-09-14 15:35:35 EDT
Build Identifier: I20100608-0911

Could you please add reference proposals based on XML schema identity constraints (unique/key/keyref) to XML editor(s)? I just want foreign key suggested where appropriate, due to those constraints. I added some of such  functionality myself to cover my current needs, though I'm totally new to all technologies involved, but I believe my patch may give you a better idea of what I mean.

Reproducible: Always
Comment 1 warping.drum CLA 2010-09-14 15:41:28 EDT
Created attachment 178870 [details]
Adds keyref proposals

Some crude effort to implement foreign key suggestions. Affects org.eclipse.wst.xml.ui and org.eclipse.wst.xsd.core
Comment 2 Nitin Dahyabhai CLA 2011-02-15 16:36:03 EST
Comment on attachment 178870 [details]
Adds keyref proposals

Rejecting patch.  Aside from difficulties consuming it due to extraneous reformatting, it assumes that all CMElementDeclarations extend XSDElementDeclaration.

This might actually be a better fit adding the proposal(s) through the org.eclipse.wst.sse.ui.completionProposal extension point--plus it would be free to use any dependencies (org.eclipse.xsd package) it needs.
Comment 3 warping.drum CLA 2011-02-15 20:35:29 EST
(In reply to comment #2)
> difficulties consuming it due to extraneous reformatting

Mea culpa.

> it assumes that all CMElementDeclarations extend
> XSDElementDeclaration.

Sorry if it assumes so. Though it was meant to cast and check for null instead.

> This might actually be a better fit adding the proposal(s) through the
> org.eclipse.wst.sse.ui.completionProposal extension point--plus it would be
> free to use any dependencies (org.eclipse.xsd package) it needs.

Thanks a lot. See if I can access the whole document from there.
Comment 4 warping.drum CLA 2011-02-16 14:19:49 EST
(In reply to comment #2)
> org.eclipse.wst.sse.ui.completionProposal 

Use of org.eclipse.wst.xml.ui.internal.contentassist.AbstractXMLCompletionProposalComputer
class I was previously using is discouraged in my brand new plugin, it looks like https://bugs.eclipse.org/bugs/show_bug.cgi?id=310696 is in my way.