Home Ask Login Register

Developers Planet

Your answer is one click away!

Hengrui Jiang February 2016

Enable only Java working sets in IWorkingSetSelectionDialog

I am currently using a IWorkingSetSelectionDialog created by a IWorkingSetManager. By default, clicking on the "new..." button in this dialog asks the user which type of working set should be created. But I would like to restrict to Java working sets, as in Package Explorer. Anyone know how this could be achieved?


greg-449 February 2016

I think if you use the:

public IWorkingSetSelectionDialog createWorkingSetSelectionDialog(
        Shell parentShell, boolean multi, String[] workingsSetIds)

method and specify the Java working set id (org.eclipse.jdt.ui.JavaWorkingSetPage in the final parameter:

new String [] {"org.eclipse.jdt.ui.JavaWorkingSetPage"}

you will get what you want.

Post Status

Asked in February 2016
Viewed 1,844 times
Voted 6
Answered 1 times


Leave an answer

Quote of the day: live life