Bug 471900 - Support quick navigation to service method implementation
Summary: Support quick navigation to service method implementation
Status: CLOSED FIXED
Alias: None
Product: Sirius
Classification: Modeling
Component: Core (show other bugs)
Version: 3.0.0   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 6.0.0   Edit
Assignee: Pierre Guilet CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2015-07-06 05:07 EDT by Pierre-Charles David CLA
Modified: 2018-06-27 11:55 EDT (History)
3 users (show)

See Also:


Attachments
Use case (68.24 KB, application/zip)
2018-05-24 09:17 EDT, Florian Barbin CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pierre-Charles David CLA 2015-07-06 05:07:34 EDT
When editing an interpreted expression which invokes a Java service, it should be possible to navigate directly to the service implementation(s) using a simple key binding and/or menu action.

This should work at least for service: invocation. For the other languages which embed service calls possibly deep inside complex expressions, we would probably need to add new APIs.

Ideally, when I have the cursor inside an interpreted expression of the form "service:myServiceCall", hitting F3 should open the Java editor on the source of the myServiceCall method.

Some open questions:
* service calls support polymorphism, so there is not always *one* unambiguous Java method to go to.
* the source of the service method may not be available.


Some JDT methods that can be useful entry points:
* JavaCore.createCompilationUnitFrom(IFile)
* ICompilationUnit.getPrimary()
* IType.getMethods()
* IEditorPart org.eclipse.jdt.ui.JavaUI.openInEditor(IJavaElement element)

Basically, from an IFile representing a Java source file in the workspace, chaining these can be used to open a Java editor on a specific method in that file.
Comment 1 Eclipse Genie CLA 2015-07-29 09:52:26 EDT
New Gerrit change created: https://git.eclipse.org/r/52797
Comment 2 Eclipse Genie CLA 2015-07-30 07:04:42 EDT
New Gerrit change created: https://git.eclipse.org/r/52846
Comment 3 Pierre-Charles David CLA 2015-12-15 04:11:26 EST
Moving out of the 4.0 scope for now, along with all the other issues which were there "by default". This does not mean some of these will not be re-integrated at some point, but for now these issues are not part of the roadmap for 4.0.

If you feel strongly about this removal from 4.0 and/or are ready to sponsor the corresponding work, feel free to comment.
Comment 4 Eclipse Genie CLA 2017-12-14 10:23:27 EST
New Gerrit change created: https://git.eclipse.org/r/113426
Comment 6 Pierre-Charles David CLA 2018-01-23 05:04:40 EST
The feature itself is merged, with automated tests. What remains before we can close this:
* add release notes & proper documentation;
* add validation tests in the ticket itself.
Comment 7 Eclipse Genie CLA 2018-01-26 05:49:59 EST
New Gerrit change created: https://git.eclipse.org/r/116096
Comment 8 Eclipse Genie CLA 2018-01-26 10:02:00 EST
New Gerrit change created: https://git.eclipse.org/r/116117
Comment 9 Eclipse Genie CLA 2018-01-29 09:53:20 EST
New Gerrit change created: https://git.eclipse.org/r/116241
Comment 12 Pierre-Charles David CLA 2018-01-30 04:54:33 EST
Fixed, and available in Sirius 6.0M5.
Comment 13 Eclipse Genie CLA 2018-02-12 04:18:08 EST
New Gerrit change created: https://git.eclipse.org/r/117139
Comment 15 Florian Barbin CLA 2018-05-24 09:16:03 EDT
The documentation does not mention that the feature works only with aql or service:
Comment 16 Florian Barbin CLA 2018-05-24 09:17:32 EDT
Created attachment 274176 [details]
Use case
Comment 17 Florian Barbin CLA 2018-05-24 09:20:07 EDT
With the attached project:
* open the ecore.odesign
* Select the Bi-directional EC_Reference edge mapping (Design > Entities > Default)
* Click on getEOppositeEReferences in the Semantic Candidates Expression
* Press F3 -> it should navigate toward the service method in the Java Class.
Comment 18 Eclipse Genie CLA 2018-05-28 11:56:50 EDT
New Gerrit change created: https://git.eclipse.org/r/123470
Comment 19 Pierre Guilet CLA 2018-05-28 11:59:48 EDT
@Florian, the functionality works only for service: and aql:
Documentation has been updated.
Comment 21 Pierre-Charles David CLA 2018-05-29 03:01:15 EDT
Fixed by 8c8830b0cf085dfabcff4310c6790ca7ec74f021.
Comment 22 Laurent Redor CLA 2018-06-27 11:55:36 EDT
Available in Sirius 6.0.0, see https://wiki.eclipse.org/Sirius/6.0.0 for details