| Summary: | The CommandStack class has to mark some methods as deprecated | ||
|---|---|---|---|
| Product: | [Tools] GEF | Reporter: | Jose M Beleta <jose> |
| Component: | GEF-Legacy GEF (MVC) | Assignee: | Alexander Nyßen <nyssen> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | jose, nyssen |
| Version: | 3.10.1 | ||
| Target Milestone: | 4.0.0 / 3.11.0 (Neon) M4 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Jose M Beleta
Well, CommandStackEventListener is not a complete replacement for CommandStackListener, as it will not be notified when flush() or markSaveLocation() is called. (In reply to Alexander Nyßen from comment #1) > Well, CommandStackEventListener is not a complete replacement for > CommandStackListener, as it will not be notified when flush() or > markSaveLocation() is called. Yes, this is in the code but not in the documentation, so I think that this is a bug. Even more notifyListeners() is deprecated what suggests that CommandStackEventListener is the way to go. > Yes, this is in the code but not in the documentation, so I think that this > is a bug. The code is the truth :-). We might need to update the documentation. > Even more notifyListeners() is deprecated what suggests that > CommandStackEventListener is the way to go. I am not sure if this conclusion can really be made here. Deprecating the protected notifyListeners() just means that other framework classes (and subclasses) should not use it to fire notifications. It does not mean that the listener mechanism should no longer be used by clients. Anyway, I think we cannot simply deprecate the listener mechanism without providing the same functionality to clients. Pushed the following changes to origin/master: - Ensured CommandStack now fires PRE_FLUSH, POST_FLUSH, PRE_MARK_SAVE, and POST_MARK_SAVE events via the CommandStackEventListener interface in addition to the command-based events. - Deprecated CommandStackListener and replaced its usages (except for TreeContentProvider, which is deprecated as well, and GraphicalEditor, which implements the interface directly) with CommandStackEventListener, using a POST_MASK filter. - Added CommandStackTest to ensure notification events are properly fired. - Increased version of gef bundles and features to 3.11.0 because API was extended. Resolving as fixed in 3.11.0 M4. |