Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » How to change menu item's text from still not activated plugin?
How to change menu item's text from still not activated plugin? [message #153803] Thu, 06 November 2003 16:00 Go to next message
Eclipse UserFriend
Originally posted by: meshcheryakovsemen.hotmail.com

?
Re: How to change menu item's text from still not activated plugin? [message #153980 is a reply to message #153803] Fri, 07 November 2003 03:35 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse.tkilla.ch

You can't - choose a sensible default and change it once your plugin is
loaded.
-tom
Re: How to change menu item's text from still not activated plugin? [message #154012 is a reply to message #153980] Fri, 07 November 2003 10:19 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: meshcheryakovsemen.hotmail.com

Thanks,
how about 'item is not visible if plugin is not activated' ?

-- Sam
It's better to view source code than comments to it.

"Tom Eicher" <eclipse@tkilla.ch> wrote in message
news:boflcv$233$2@eclipse.org...
> You can't - choose a sensible default and change it once your plugin is
> loaded.
> -tom
>
Re: How to change menu item's text from still not activated plugin? [message #154028 is a reply to message #154012] Fri, 07 November 2003 11:07 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.NO.SPAM.us.ibm.com

visibility is not determined by plugin activation. Visibility is
determined by the "visibility" criteria set up in the plugin.xml where
the entry is declared.

The plugin won't be activated by the action until a run() is executed
(i.e. the menu entry was selected). At that point in time, if the plugin
was not already active, it will be activated and the action delegate
will be created.

If however, the plugin is already active at the time the action is
created, then the action delegate will be created too, and it will be
given a chance to change the text.

--
Thanks, Rich Kulp

Re: How to change menu item's text from still not activated plugin? [message #154066 is a reply to message #154028] Fri, 07 November 2003 11:21 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: meshcheryakovsemen.hotmail.com

I apologize for unclear formulation. Here is an excerpt from the
"plugin.xml":

<extension point="org.eclipse.ui.popupMenus">
<objectContribution objectClass="org.eclipse.core.resources.IProject">
<action label="Sensible default" icon="Sensible default" />
<visibility>
<pluginState value="activated"/>
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
</visibility>
</objectContribution>
</extension>

Thanks,
-- Sam
It's better to view source code than comments to it.

"Rich Kulp" <richkulp@NO.SPAM.us.ibm.com> wrote in message
news:bogft4$2vt$1@eclipse.org...
> visibility is not determined by plugin activation. Visibility is
> determined by the "visibility" criteria set up in the plugin.xml where
> the entry is declared.
>
> The plugin won't be activated by the action until a run() is executed
> (i.e. the menu entry was selected). At that point in time, if the plugin
> was not already active, it will be activated and the action delegate
> will be created.
>
> If however, the plugin is already active at the time the action is
> created, then the action delegate will be created too, and it will be
> given a chance to change the text.
>
> --
> Thanks, Rich Kulp
> 
>
Re: How to change menu item's text from still not activated plugin? [message #154074 is a reply to message #154066] Fri, 07 November 2003 11:25 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.NO.SPAM.us.ibm.com

That's a different story, your criteria explicitly stated only visible
if plugin is activated. So until you activate the plugin through some
other mechanism then the item will be not visible. Using that criteria
you will have an action delegate created when it becomes visible and so
your action delegate can change the text at that time.

Is this really what you wanted, to not be visible until plugin is activated?

--
Thanks, Rich Kulp

Re: How to change menu item's text from still not activated plugin? [message #154136 is a reply to message #154074] Fri, 07 November 2003 12:36 Go to previous message
Eclipse UserFriend
Originally posted by: meshcheryakovsemen.hotmail.com

I only wanted to have selection-dependent-menu-text.

Thanks,
-- Sam
Previous Topic:How to uninstall a plugin?
Next Topic:Editor for Non-File Input
Goto Forum:
  


Current Time: Sat May 10 06:53:36 EDT 2025

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

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

Back to the top