Page MenuHomePhabricator

DataManager's segmentation context menu only available while segmentation view exists
Closed, ResolvedPublic

Assigned To
None
Authored By
maleike
Feb 4 2010, 12:40 AM
Referenced Files
F450: 3281_failure.jpg
Sep 29 2010, 7:14 PM
F449: 3281_ExtensionPointsForContextMenu.patch
Sep 29 2010, 7:14 PM
Subscribers

Description

The segmentation view (QmitkSegmentationView.cpp) adds context menu entries to DataManager to offer additional actions for segmentations. These menu items are removed when the view is closed.

It would be nicer if the context menu items would always be there: before, while and after the view is loaded.

Currently my only idea would be to implement the menu is a separate bundle which is marked as "eager" for loading, i.e. it is loaded on application startup if it exists.

Event Timeline

likely solution: make the segmentation bundle itself eager. register actions in a segmentation activator

wont work as the bundle needs the selection service of the workbench which is not available when loaded right at startup
next solution: create an extension point which can supply nodedescriptors information via xml

[SVN revision 26442]
FIX (#3281): used extension points from BlueBerry to integrate context menu

[SVN revision 26443]
COMP (#3281): removed unused variables and fixed case sensitive include in manifest.cpp

[SVN revision 26444]
COMP (#3281): moved critical include to the top of the class and changed include order in manifest.cpp

[SVN revision 26453]
COMP (#3281): changed include order, poco classes at the very top

[SVN revision 26457]
COMP (#3281): changed include order

[SVN revision 26460]
COMP (#3281): forced poco include before any other include

[SVN revision 26461]
COMP (#3281): reverted manifest.cpp to remove build warnings in linux

[SVN revision 26466]
COMP (#3281): reverted all changes because of poco error

This patch includes all changes that will be needed to change the problem of the context menu being only available when the segmentation view is open.

It works fine on the local client. However, on the Dart XP Client it triggers the error, that is attached in the next comment.

I tried to solve the problem by changing include orders and also by including a Poco class before anything else is included. Those two options however did not work.

[SVN revision 26617]
FIX (#3281): adding autocrop action only with extension point contextmenu

[SVN revision 26623]
COMP (#3281): changed include order in contextmenuaction.h and autocropaction

[SVN revision 26631]
FIX (#3281): restored postprocessing functionality as long as the context menu is not fully integrated through extension points

[SVN revision 26819]
FIX (#3281): added Thresholdaction with Extension Points and change include order

[SVN revision 27014]
FIX (#3281): added CreatePolygonModelAction with Extension Points and changed include order

[SVN revision 27020]
FIX (#3281): added StatisticsAction with Extension Points and changed include order

[SVN revision 27024]
FIX (#3281): deactivated postprocessing class and activated extension point functionality

[SVN revision 27026]
COMP (#3281): reactivated postprocessing and deactivated extension points functionality

[SVN revision 27027]
FIX (#3281): fixed problem with case sensitivity and activated extension point context menu

[SVN revision 27029]
FIX (#3281): removed unused variable

As proposed the nodedescriptors are now provided through extension points. The class QmitkSegmentationPostProcessing was splitted in several classes to be accessible separately. The functions are now available without the segmentation view being open and also work as they did before.

For further information review the patch or the code directly.