Get and add an action for Eclipse main toolbar's items in code [message #1810435] |
Mon, 12 August 2019 02:16  |
Eclipse User |
|
|
|
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!
|
|
|
|
Powered by
FUDForum. Page generated in 0.03593 seconds