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

Bug 499885

Summary: Operations defined in the context of properties view do not have access to the UiCallback
Product: [Modeling] Sirius Reporter: Pierre-Charles David <pierre-charles.david>
Component: PropertiesAssignee: Pierre-Charles David <pierre-charles.david>
Status: CLOSED FIXED QA Contact: Julien Dupont <julien.dupont>
Severity: critical    
Priority: P3 CC: julien.dupont, steve.monnier
Version: 3.1.0Keywords: triaged
Target Milestone: 4.1.0   
Hardware: All   
OS: All   
See Also: https://git.eclipse.org/r/79248
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=aa51d4c1b575c56bd2c6d9351bed5d8467a96f6b
https://git.eclipse.org/r/80217
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=5f9f627b45b3adfc2d40c583f90befb021cb7f44
Whiteboard: backport
Bug Depends on:    
Bug Blocks: 499886    
Attachments:
Description Flags
Example project none

Description Pierre-Charles David CLA 2016-08-18 03:50:39 EDT
Operations defined in the context of a properties view description (e.g. a behavior associated to a widget) are currently given a NoUICallback instance, which prevents any operation that opens an editor, a dialog or anything else that depends on a user interaction to work correctly.

See the forum message at https://www.eclipse.org/forums/index.php/mv/msg/1080168/1740665/#msg_1740665 for an example of a concrete issue this causes: navigation operations are ineffective because NavigationTask.openRepresentation(EObject) relies on the UiCallback it was given to try and open the representation, but SiriusToolServices.executeOperation(EObject, String) uses a dummy NoUiCallback.
Comment 1 Pierre-Charles David CLA 2016-08-18 03:53:01 EDT
This should be backported in 4.0.1 if the fix is isolated enough to allow it.
Comment 2 Pierre-Charles David CLA 2016-08-18 04:10:56 EDT
Created attachment 263643 [details]
Example project

Steps to reproduce:

1. Import the attached project.
2. Open the session in the hyperlink-sample.design/sample folder, and open the diagram on the top-level package.
3. Select the diagram itself, and in the properies view you should have an hyperlink widget which is configured to navigate on the diagram for the subpackage.
4. Click on the hyperlink: nothing occurs (not even an error in the error log).
Comment 3 Eclipse Genie CLA 2016-08-18 04:11:23 EDT
New Gerrit change created: https://git.eclipse.org/r/79248
Comment 5 Eclipse Genie CLA 2016-09-01 09:34:33 EDT
New Gerrit change created: https://git.eclipse.org/r/80217
Comment 7 Pierre-Charles David CLA 2016-09-01 11:56:22 EDT
Fixed. The corresponding non-regression test is in the RCPTT suite.
Comment 8 Pierre-Charles David CLA 2016-10-18 11:08:07 EDT
Available in Sirius 4.1.0, see https://wiki.eclipse.org/Sirius/4.1.0 for details.