Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Get and add an action for Eclipse main toolbar's items in code
Get and add an action for Eclipse main toolbar's items in code [message #1810435] Mon, 12 August 2019 02:16 Go to next message
Kien Minh Quan is currently offline Kien Minh QuanFriend
Messages: 7
Registered: July 2019
Junior Member
Hi folks,

Recently, I have been managing how to get Eclipse main toolbar's items and simulate a click action on these items in code. I successfully retrieved the id of toolbar's item, but after that I don't know to use it to simulate a click action.

Below is the code that I have tried to find the solution:

wb = jvm.PlatformUI.getWorkbench()

if (wb.getWorkbenchWindowCount() == 1):
toolbar = wb.getWorkbenchWindows()[0].getCoolBarManager2()
for item in toolbar.getItems():
print(item.getId())

Note: I am working with the project that need to be used Python script to control Eclipse IDE (execute some actions in Eclipse IDE runtime through using Python script)

So appreciate your help.

Many thanks!
Re: Get and add an action for Eclipse main toolbar's items in code [message #1810439 is a reply to message #1810435] Mon, 12 August 2019 04:36 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 30896
Registered: July 2009
Senior Member
I answered on your original thread on the newcomers forum.
Previous Topic:integrating custom help on click of next and previous in custom spring boot wizard
Next Topic:MAC Voice Over does not read MessageDialog message
Goto Forum:
  


Current Time: Sat Feb 22 19:39:56 GMT 2020

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

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

Back to the top