Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Use multiple Eclipse Activities on the same UI element
Use multiple Eclipse Activities on the same UI element [message #1738462] Wed, 20 July 2016 06:39 Go to next message
Alexander Fichtinger is currently offline Alexander FichtingerFriend
Messages: 62
Registered: January 2013
Hey guys,

we have the following scenario:

We are enabling a certain wizard only when a resource is selected.

Therefore, we have implemented the following activity:

		<activity id="activity.enableonresourceselected" name="enableonresourceselected">
	   			<with variable="selection">
	           		<iterate ifEmpty="false">
	            			<adapt type="org.eclipse.core.resources.IProject">
	           					<test property="" value="true"/>
	           				<adapt type="org.eclipse.core.resources.IFile"/>
	           				<adapt type="org.eclipse.core.resources.IFolder"/>

And of course the activityPatternBinding:

   <extension point="org.eclipse.ui.activities">
   		<activityPatternBinding activityId="activity.enableonresourceselected"  pattern=".*/ui.wizard.NewInterfaceObjectWizard"/>

With this code, the wizard only appears, when a resource is selected, so everythings fine until now...

Now our customer wants to create his own plugin, where he wants to hide the same wizard.
So we are creating a sample plugin for him, where we want to do this.

This is our activity + activityPatternBinding:

		<activity id="activity.disabledOnStart" name="disable">
				<with variable="true">
         			<equals value="false"/>

<activityPatternBinding	activityId="activity.disabledOnStart" pattern=".*/ui.wizard.NewInterfaceObjectWizard" />

The problem is, that the wizard is still enabled, and it is not hided.

Apparently our activity.enableonresourceselected activity overrules the activity.disabledOnStart.

What happens if two different activities are used on the same UI element?
And what could we do, to achieve the behavior that we want.

Thanks for any help =)


Re: Use multiple Eclipse Activities on the same UI element [message #1739109 is a reply to message #1738462] Wed, 27 July 2016 14:45 Go to previous message
Brian de Alwis is currently offline Brian de AlwisFriend
Messages: 788
Registered: January 2012
Senior Member

Thee's no way to override expressions. I wondered about including a reference to a defined expression, but a reference to an undefined definition is treated like an undefined variable and causes the expression to be aborted. I think the only solution is to use a systemTest to test a property or define a custom property tester where you can provide some additional logic.


Eclipse Platform committer. Ask me about Eclipse support, training, and consulting.
Previous Topic:RCP exception Could not resolve module
Next Topic:Help Menu: About [Application] Icon
Goto Forum:

Current Time: Sun Nov 18 21:30:46 GMT 2018

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

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

Back to the top