Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 327438 - [Menu Diagram] Initial State for the actions
Summary: [Menu Diagram] Initial State for the actions
Status: ASSIGNED
Alias: None
Product: Papyrus
Classification: Modeling
Component: Core (show other bugs)
Version: 0.7.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Vincent Lorenzo CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-11 08:32 EDT by Vincent Lorenzo CLA
Modified: 2017-02-23 16:14 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vincent Lorenzo CLA 2010-10-11 08:32:03 EDT
When the actions were in the oepd.common, the initial state of the actions was disable (just after starting eclipse), because nothing was selected (common, r2910).

In the new plugin org.eclipse.papyrus.diagram.menu, all actions are enable because the plugin is not launched.
Ideas : 
	- Activator could implements org.eclipse.ui.IStartup and we could use this extension point in the plugin...
	- add refreshMenu() in ParametricAndListeningHandler.setInitializationData
	
	-> doesn't resolve all problems : autosize is always to true after the startup.
Comment 1 Vincent Lorenzo CLA 2010-10-19 06:14:14 EDT
in r2921 : add IStartup + an enableWHen for the autoSize in the toolbar.
Comment 2 Vincent Lorenzo CLA 2013-03-13 10:04:13 EDT
I think that we should remove the IStartup and find another way to correct this bug.
Comment 3 Vincent Lorenzo CLA 2013-03-13 10:04:36 EDT
This bug must not be closed!
Comment 4 Camille Letavernier CLA 2014-03-25 15:33:53 EDT
The enable state is never computed for Java-based property testers (Unless force activation is set to true in the plugin.xml, which is not recommended)

Possible solutions:

- Implement a *lightweight* property tester in a *low level* Papyrus plug-in (With as few dependencies as possible, to avoid starting N plug-ins)
- Implement the "isEnabled" state with XML-based Eclipse Expressions (Which are properly executed)

In all cases, it is important that testing the Actions enablement/visibility does not require to start any leaf Papyrus plug-in (Which takes time and memory, because all dependencies are loaded, and it is intrusive for non-Papyrus users)