Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Q: how to control checked menuitem for an objectcontribution
Q: how to control checked menuitem for an objectcontribution [message #69620] Tue, 10 June 2003 13:15 Go to next message
Eclipse UserFriend
I currently have a menu in an objectcontribution for IJavaProject
with an enable and a disable MenuItem. I want to replace that with
a single checked menuitem (style CHECKED) with label "Enabled".
However, what I can't figure out is where and how I control whether
it appears checked or not. Has anybody done this? How does it work?

Thanks,


Frank Sauer
Re: Q: how to control checked menuitem for an objectcontribution [message #69683 is a reply to message #69620] Tue, 10 June 2003 14:41 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.NOSPAM.us.ibm.com

If you are creating the Action yourself, then create it with style
IAction.AS_CHECK_BOX.

If you are using plugin.xml extension point for Object Contribution,
then use style="toggle" on the action definition in the xml.

Rich
Re: Q: how to control checked menuitem for an objectcontribution [message #69810 is a reply to message #69683] Tue, 10 June 2003 15:43 Go to previous messageGo to next message
Eclipse UserFriend
Thanks, that's part of the answer, but where do I hook into to control
whether it appears as checked or not? I need to see whether the project
has a given project nature or not. The check should appear if it does, in
which case selection removes it, and it should not be checked if it does
not,
in which case selection should add it.

Frank

"Richard L. Kulp" <richkulp@NOSPAM.us.ibm.com> wrote in message
news:bc58r2$4ct$1@rogue.oti.com...
> If you are creating the Action yourself, then create it with style
> IAction.AS_CHECK_BOX.
>
> If you are using plugin.xml extension point for Object Contribution,
> then use style="toggle" on the action definition in the xml.
>
> Rich
>
Re: Q: how to control checked menuitem for an objectcontribution [message #69849 is a reply to message #69810] Tue, 10 June 2003 16:17 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.NOSPAM.us.ibm.com

Use setValue() with Boolean.TRUE or Boolean.FALSE to set/unset the
checkmark.

Rich
Previous Topic:Tree View for workspace
Next Topic:servlets
Goto Forum:
  


Current Time: Thu Jul 17 15:19:23 EDT 2025

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

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

Back to the top