Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 360648 - [GMF Editor Socket] BasicDocumentProvider should expose method for customizing load options
Summary: [GMF Editor Socket] BasicDocumentProvider should expose method for customizin...
Status: CLOSED FIXED
Alias: None
Product: Sphinx
Classification: Automotive
Component: Core (show other bugs)
Version: 0.7.0   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 0.7.0   Edit
Assignee: Stephan Eberle CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-12 07:17 EDT by Stephan Eberle CLA
Modified: 2021-07-14 02:14 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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