Bug 581541 - EcoreUIUtil.openEditor() with OpenStrategy.OPEN_ON_RESOURCE strategy uses OpenStrategy.OPEN_ON_OBJECT instead
Summary: EcoreUIUtil.openEditor() with OpenStrategy.OPEN_ON_RESOURCE strategy uses Ope...
Status: NEW
Alias: None
Product: Sphinx
Classification: Automotive
Component: Core (show other bugs)
Version: 0.13.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 0.13.1   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-16 12:57 EST by Andras Janko CLA
Modified: 2024-05-07 01:00 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 Andras Janko CLA 2023-02-16 12:57:19 EST
EcoreUIUtil.openEditor(...) methods could be a very useful utility to find and open the related editor for a model element (EObject). The OpenStrategy.OPEN_ON_RESOURCE is supposed to open the editor of the resource of the model element and select the selection to the model element in that editor.

However, the int values of org.eclipse.sphinx.emf.ui.util.OpenStrategy#OPEN_ON_RESOURCE and OpenStrategy#OPEN_ON_OBJECT are both 0. Because of this, the EcoreUIUtil.openEditor() will always use the OPEN_ON_OBJECT strategy, even when the OPEN_ON_RESOURCE strategy is passed as parameter.

I recommend to set distinct values for the two strategies, which would fix this issue.
Comment 1 Balazs Grill CLA 2024-05-07 01:00:31 EDT
This issue will be migrated to gitlab.