Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to show properties page programatically when clicking the customized icon on the toolbar in Eclipse Plugin development?

I am new to Eclipse Plugin development. I have already customized my main menu and toolbar, as well as properties page. Now I want to have something like: whenever the user clicks the customized icon on the toolbar, it will show the properties page as if the user selects the project and right-clicks on properties and show it, anyone knows how to do it?

like image 891
jianinz Avatar asked Jan 18 '26 20:01

jianinz


1 Answers

You can try using org.eclipse.ui.dialogs.PreferencesUtil.createPropertyDialogOn(Shell, IAdaptable, String, String[], Object) to open a property dialog:

IProject project = ...;
PreferenceDialog createPropertyDialogOn(window.getShell(), project, 
    myPropertyPageId, new String[] { myPropertyPageId }, Collections.EMPTY_MAP);
like image 151
Paul Webster Avatar answered Jan 22 '26 12:01

Paul Webster



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!