Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 325285

Summary: [content assist] Add unique/key/keyref XSD identity constraint aware proposals to XML editor, please
Product: [WebTools] WTP Source Editing Reporter: warping.drum
Component: wst.xsdAssignee: wst.xsd-triaged <wst.xsd-triaged>
Status: NEW --- QA Contact: Keith Chong <keith.chong.ca>
Severity: enhancement    
Priority: P3 CC: warping.drum
Version: unspecifiedKeywords: helpwanted
Target Milestone: Future   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Adds keyref proposals none

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.