On Tue, Feb 2, 2010 at 23:33, David Withers
<[email protected]> wrote:
> I have a custom implementation of ActivityOutputPort for the SADI
> activity (so I can add contextual menus for the ports) but this doesn't
> work with the workflow explorer.
You should not need to make your own implementation for this.
As the port does not know its parent I know it would be a bit tedious,
but you can always do in the ContextualMenuComponent.isEnabled() that
does something like:
if (contextualSelection == null || !
(contextualSelection.getSelection() instanceof ActivityOutputPort)) {
return false;
}
ActivityOutputPort activityOut = (ActivityOutputPort)
contextualSelection.getSelection();
Processor proc = Tools.getFirstProcessorWithActivityOutputPort(activityOut);
for (Activity activity : proc.getActivities()) {
if (activity instanceof SADIActivity) {
return true;
}
}
return false;
(This is similar to what AbstractConfigureActivityMenuAction does to
configure activities)
Once we've moved to the workbench editing over the SCUFL2 API you
would much easier/more efficient be able to 'climb up' and check such
things.
--
Stian Soiland-Reyes, myGrid team
School of Computer Science
The University of Manchester
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
taverna-hackers mailing list
[email protected]
Web site: http://www.taverna.org.uk
Mailing lists: http://www.taverna.org.uk/taverna-mailing-lists/
Developers Guide: http://www.mygrid.org.uk/tools/developer-information