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

Bug 273413

Summary: [Usability][Navigation] Papyrus shall enable diagram navigation history with back and next buttons
Product: [Modeling] Papyrus Reporter: Raphael Faudou <raphael.faudou>
Component: CoreAssignee: Tristan Faure <faure.tristan>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P4 CC: arthur.daussy, cedric.dumoulin, faure.tristan, papyrus-bugs
Version: unspecifiedKeywords: plan
Target Milestone: ---Flags: sebastien.gerard: indigo+
Hardware: All   
OS: All   
See Also: https://git.eclipse.org/r/63132
Whiteboard: Usability
Bug Depends on:    
Bug Blocks: 361630    
Attachments:
Description Flags
patch fixing the bug of navigation
none
a little missing fixed
none
adding listener to catch more page changes and add them to the history stack
none
patch containing all the changes
none
patch deleting the useless dependencie to org.eclipse.gmf.runtime.notation none

Description Raphael Faudou CLA 2009-04-23 08:03:42 EDT
when navigating between diagrams (through diagram navigation links), it would be useful to save the history so that the user can go back to the previous diagram and then go to the next diagram (in terms of history).
remark: the behavior is the same as expected with web browsers.
Comment 1 Raphael Faudou CLA 2011-08-17 07:45:00 EDT
Really important for industrial usage.
In addition to "previous" and "next", add "parent" and "root" as in TOPCASED.
Comment 2 RADOUANI anass CLA 2011-09-01 11:51:41 EDT
A minimal specification for navigation buttons that I will develop to fix the bug.

Previous button: open the previous diagram in the stack

Next button: go to the next model if there is one

Parent button: 
  - if the parent has more than one diagram
   o show a popup to suggest all the diagrams with a pre-selection :
     The pre-selection algorithm:
      1. the opened diagram if there is one
      2. the last opened diagram
      3. or the first of the list
  - if the parent has one diagram, open the diagram or focus on it if it’s already opened

Root button: 
  - Open the root diagram if there is just one (or the popup if there is more than one)
 Or
  - Focus on the tab if the parent is already opened
Comment 3 Mathieu Velten CLA 2011-09-13 08:02:28 EDT
fixed on trunk and branch.
Comment 4 Mathieu Velten CLA 2011-09-13 08:03:22 EDT
nevermind, wrong bug.
Comment 5 RADOUANI anass CLA 2011-09-19 09:57:48 EDT
Created attachment 203592 [details]
patch fixing the bug of navigation

I, Anass Radouani, have written 100% of the code contributed to fix this bug.
I have the right to contribute this code and have filled the headers with the appropriate License.
This contribution has been checked by and committed under the responsibility of Tristan Faure.

A bug remains on the refresh of the navigation buttons to disable or enable them. The refresh is performed after each selection change so the refresh is mage after adding or removing a page from the history.

IMultiEditorManager, SashContainerEventListener and SashWindowsContainer has been moved to a public package because there used in a public Interface. And methods which are part of the API have been changed to public.
Comment 6 RADOUANI anass CLA 2011-09-19 10:17:04 EDT
Created attachment 203596 [details]
a little missing fixed

a little missing fixed
Comment 7 RADOUANI anass CLA 2011-09-21 08:37:05 EDT
Created attachment 203757 [details]
adding listener to catch more page changes and add them to the history stack
Comment 8 RADOUANI anass CLA 2011-09-22 09:52:45 EDT
Created attachment 203842 [details]
patch containing all the changes
Comment 9 Tristan Faure CLA 2011-09-23 09:22:08 EDT
commited to trunk and branch 0.8.X
modifications in page manger
perspective extension for displaying buttons
commands implementation
Comment 10 Camille Letavernier CLA 2011-10-03 10:28:49 EDT
This patch has added a useless dependency from oep.sasheditor.di to org.eclipse.gmf.runtime.notation

Can you please check that this dependency is unused, and remove it ?

This problem exists on both the branch and trunk.
Comment 11 RADOUANI anass CLA 2011-10-03 10:39:22 EDT
I will check this as soon as possible
Comment 12 RADOUANI anass CLA 2011-10-03 11:43:52 EDT
Created attachment 204454 [details]
patch deleting the useless dependencie to org.eclipse.gmf.runtime.notation

The patch remove the unused dependence to org.eclipse.gmf.runtime.notation
Comment 13 Cedric Dumoulin CLA 2011-10-21 07:42:28 EDT
The provided implemention has several problems and should be rollback asap.
The problems are:
 - code reformating on existing code
 - code formating that do not follow Papyrus formating
 - move of hidden classes from private packages to public packages
 - Addition of a functionality (command history) that should not be in the sashwindow plugin. This functionality should be handle by the command stack, like all other command history.
Comment 14 Cedric Dumoulin CLA 2011-10-21 07:46:18 EDT
The modifications from the provided patches introduce errors in the JUnit tests.
Comment 15 Remi Schnekenburger CLA 2012-02-13 10:21:12 EST
closing this task
Comment 16 Raphael Faudou CLA 2012-03-20 16:13:06 EDT
verified OK
Closed
Comment 17 Eclipse Genie CLA 2015-12-22 05:11:46 EST
New Gerrit change created: https://git.eclipse.org/r/63132