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 6985275
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:39:34+00:00 2026-05-27T18:39:34+00:00

In my plugin I created an editor and EditorActionBarContributor which adds some Actions to

  • 0

In my plugin I created an editor and EditorActionBarContributor which adds some Actions to the editor. I added the actions to the context menu of the editor programmatically. In the seletionChanged() I control which actions should be enabled in the context menu depending on the state of the editor, e.g. selections or the type of the file.

Now I want to move those actions to the eclipse toolbar as well. For this, I created an extension for the extension point org.eclipse.ui.editorActions and added an action for each action in the editor, with an IEditorActionDelegate for each action, which gets the correspondent action form the editor and runs it.

I want to control the enable/disable the buttons in the toolbar for these actions like I do in the editor, but I have no idea how I can do that. For example, I want a button to be only enabled if there is text selected in the editor.

How can I do that?

  • 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-05-27T18:39:35+00:00Added an answer on May 27, 2026 at 6:39 pm

    This is not a direct answer to your question, but I would consider using Eclipse commands instead. They are more cleanly separated so that you can have one place that indicates the command is enabled/disabled and then that automatically manifests in the menu/toolbar/bound keys, etc.

    Also, Actions are effectively deprecated, as commands has been the preferred mechanism since about Eclipse 3.5.

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

Sidebar

Related Questions

I have created an Eclipse plugin which creates a view in Eclipse. Currently it
I had a plugin installed in Visual Studio 2008, and it created some extra
I have created a plugin for tinyMCE to insert in the editor mathematical formulas
I am writing a plugin to an old IE-only WYSIWYG-editor which resides in an
I have istalled ErlIDE plugin to Eclipse, and created project. In project I added
I have successfully created a GMF editor which draws models based on my EMF
I want to create an eclipse plugin which appears in the new menu like
I´ve worked on the text editor and there are one plugin that was created
So I've created a plugin for windows working in IE Chrome etc (there is
I created a simple netbeans plugin (see this tutorial ) and now i wanna

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.