Skip to main content



      Home
Home » Modeling » UML2 » Popup menu enabling for a specific named UML package?
Popup menu enabling for a specific named UML package? [message #1691796] Thu, 09 April 2015 12:49 Go to next message
Eclipse UserFriend
<html>
<head>

<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
I’ve created some popup menus in Rational Software Architect (v9)
that are active based on the type of UML element selected in the
Project Explorer (to invoke appropriate BIRT reports). Below is a
fragment from the popupMenus extension point specification. Is is
possible to modify the action specification below to be enabled for
a UML package of a specific name, say “Normalized Data Objects”?<br>
 <br>
         &lt;action<br>
                       
class="gov.va.birt.datadictionary.reports.PackageDictionaryReport"<br>
                        enablesFor="1"<br>
                        icon="icons/report.gif"<br>
                       
id="gov.va.birt.datadictionary.packageDictionary"<br>
                        label="Dictionary Report for Package"<br>
                       
menubarPath="gov.va.birt.datadictionary.menu1/ReportGroup"<br>
                        tooltip="Dictionary report for a model or
package"&gt;<br>
                           &lt;enablement&gt;<br>
                           &lt;and&gt;<br>
                                  &lt;objectState name="@umlType"
value="Package"/&gt;<br>
                                  <font color="#ff0000">…what here
for a package named “Normalized Data Objects”?</font><br>
                           &lt;/and&gt;<br>
                           &lt;/enablement&gt;<br>
         &lt;/action&gt;<br>
<br>
<img src="https://www.eclipse.org/forums/index.php?t=getfile&amp;id=21497" alt=""><br>
</body>
</html>
  • Attachment: becfbidg.png
    (Size: 30.89KB, Downloaded 312 times)
Re: Popup menu enabling for a specific named UML package? [message #1691803 is a reply to message #1691796] Thu, 09 April 2015 15:04 Go to previous message
Eclipse UserFriend
Hi,

Obviously, we cannot help with commercial products outside of our
experience in this Eclipse UML2 forum, but I can suggest an alternative
approach that may give you the flexibility that you need.

Assuming that the selection either contains the actual UML model
elements, or some kind of viewer objects that are adaptable to them,
you could use the org.eclipse.ui.menus extension point with its more
flexible XML enablement expressions. These expressions let you test
arbitrary properties of objects, provided that some PropertyTester is
contributed on the org.eclipse.core.expressions.propertyTesters
extension point to implement that property. If necessary, you can
contribute such properties in your own plug-in in its own namespace.
That would let you make menu contributions conditional on the element
name or anything else that you could imagine.

have a look through the documentation of these extension points for
more information and examples:

org.eclipse.core.expressions.propertyTesters
org.eclipse.ui.menus
org.eclipse.ui.commands
org.eclipse.ui.handlers

HTH,

Christian
Previous Topic:Empty comments in imported XMI-based UML
Next Topic:Sequence Diagrams Repository
Goto Forum:
  


Current Time: Wed Jul 23 13:45:22 EDT 2025

Powered by FUDForum. Page generated in 0.05141 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top