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

Bug 360648

Summary: [GMF Editor Socket] BasicDocumentProvider should expose method for customizing load options
Product: [Automotive] Sphinx Reporter: Stephan Eberle <stephaneberle9>
Component: CoreAssignee: Stephan Eberle <stephaneberle9>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: niranjan.babu
Version: 0.7.0   
Target Milestone: 0.7.0   
Hardware: All   
OS: All   
Whiteboard:

Description Stephan Eberle CLA 2011-10-12 07:17:14 EDT
= Problem description =
Currently GMF diagrams are always loaded using default load options as per GMFResourceFactory#getLoadOptions() (see BasicDocumentProvider#setDocumentContent(IDocument, IEditorInput) for details). Clients which need to load GMF diagrams using custom load options have not choice but overriding the complete BasicDocumentProvider#setDocumentContent() which creates a whole bunch of redundant code and not very elegant.

= Proposed resolution =
* Introduce a new protected getLoadOptions() method (just like the already existing getSaveOptions() method
* Let it return an empty map by default
* Call it from BasicDocumentProvider#setDocumentContent() and use the returned options for loading GMF diagrams
Comment 1 Stephan Eberle CLA 2011-10-12 07:36:06 EDT
Fixed as proposed in description.
Comment 2 Balazs Grill CLA 2021-07-14 02:14:37 EDT
Mass-closing Resolved tickets