Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7883539
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T04:33:32+00:00 2026-06-03T04:33:32+00:00

I have view that extends ViewPart . In this view, I want to add

  • 0

I have view that extends ViewPart. In this view, I want to add toolbar menu.

What I know, we can add toolbar menu by using ActionContributionItem or Action, and add it to ToolBarMenu from createPartControl method in ViewPart.

But what I don’t know is this: How can we disable/enable the toolbar menu programmatically?

So basically, I want to add Play, Stop, and Pause button to toolbar view. So at first, the Play button is on enabled mode, and the others are disabled. When I pressed Play button, it is disabled, and others will be enabled.

For more details, what I want to achieve is something like the following image.

In the red circle are disabled button, and in the blue circle are enabled button.

View

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T04:33:34+00:00Added an answer on June 3, 2026 at 4:33 am

    Instead of using Actions, have a look at Eclipse commands (they are the replacement for actions and function in a cleaner way): http://help.eclipse.org/indigo/topic/org.eclipse.platform.doc.isv/guide/workbench_cmd.htm

    You will see in the documentation that you can enable and disable a command and all places where it’s used will properly update their state automatically.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a view that I want to add some custom drawing to. I
I have a class that extends View. This class has the member variable mCanvas
I have a class that extends View and overrides the onDraw(Canvas canvas) method. This
I have a simple class, BoundedView that extends View . I'm doing this primarily
I have a LinearLayout view that already contains several elements. I want to add
I have a View class (extends ViewPart ) that contains a ScrolledForm created from
I have a custom-made view that extends the View class. I would like 2
I have a class that extends View. I override the onDraw method and allow
I have a view that is rendered with ContentType of application/msword. For users this
I have a View that can vary significantly, depending on the 'mode' a particular

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.