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

Bug 487718

Summary: Make org.eclipse.sirius.table.ui.tools.internal.editor.action.RefreshAction API
Product: [Modeling] Sirius Reporter: Felix Dorner <felix.dorner>
Component: TableAssignee: Pierre Guilet <pierre.guilet>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: laurent.fasani, laurent.redor, pierre-charles.david, stephane.thibaudeau, steve.monnier
Version: 3.1.0Keywords: triaged
Target Milestone: 5.0.0M7   
Hardware: PC   
OS: Windows NT   
See Also: https://git.eclipse.org/r/93423
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=e236175a1fd189d405f14e242de4ed892c844b02
https://git.eclipse.org/r/94478
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=96c76f319efea52852791c0ef61eca14014e7140
https://git.eclipse.org/r/96668
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=09de10564816fc9a8c538fa4b9e5b31dda749775
Whiteboard:

Description Felix Dorner CLA 2016-02-12 05:36:34 EST
Hi,

I have added a few popup contributions to a DTable. These contributions need to to execute a refresh action on the table afterwards. For this I use 

org.eclipse.sirius.table.ui.tools.internal.editor.action.RefreshAction

which is not public API. I hereby kindly ask if this could be public API in a next major version?
Comment 1 Steve Monnier CLA 2016-02-17 05:25:21 EST
Hi Felix,

You should be able to refresh a DTable using the API "DialectManager.INSTANCE.refresh()" or by executing a RefreshRepresentationsCommand which is also API and called by the RefreshAction.

Regards,
Steve
Comment 2 Stéphane Thibaudeau CLA 2016-02-26 09:06:23 EST
I've just had the same thing to do.

The RefreshRepresentationsCommand is OK, but it's always a bit verbose to execute the command.

Something along the lines of :

DialectUIManager.INSTANCE.refreshEditor(DialectEditor, IProgressMonitor)

would be perfect.

(Credits to Pierre-Charles for the suggestion)
Comment 3 Felix Dorner CLA 2016-02-26 15:49:30 EST
(In reply to Stéphane  Thibaudeau from comment #2)
> I've just had the same thing to do.
> 
> The RefreshRepresentationsCommand is OK, but it's always a bit verbose to
> execute the command.
> 
> Something along the lines of :
> 
> DialectUIManager.INSTANCE.refreshEditor(DialectEditor, IProgressMonitor)

If I only execute the RefreshRepresentationsCommand, I would miss the 
tableEditor.enablePropertiesUpdate(false/true) that is executed around it in the Action. Is this of importance? Will this also be called for DialectUIManager.refreshEditor?
Comment 4 Eclipse Genie CLA 2017-03-20 10:30:25 EDT
New Gerrit change created: https://git.eclipse.org/r/93423
Comment 6 Pierre-Charles David CLA 2017-04-05 10:45:31 EDT
Fixed by e236175a1fd189d405f14e242de4ed892c844b02.
Comment 7 Eclipse Genie CLA 2017-04-05 11:55:27 EDT
New Gerrit change created: https://git.eclipse.org/r/94478
Comment 9 Eclipse Genie CLA 2017-05-09 11:29:34 EDT
New Gerrit change created: https://git.eclipse.org/r/96668
Comment 11 Pierre-Charles David CLA 2017-06-29 03:32:25 EDT
Available in Sirius 5.0.0, see https://wiki.eclipse.org/Sirius/5.0.0 for details.