0
votes

Assume that I have three views A,B,C. How can I assure that they will be always opened in that given order. At the moment I have a problem that if B,C are open and A closed, after opening A it is appended at the end. So I have B,C,A visible.

to open a new view I use following method:

IWorkbenchPage.showView(viewId, secondardId, IWorkbenchPage.VIEW_ACTIVATE);

It seems that existing placeholders for those views are ignored.

1

1 Answers

0
votes

The short answer is: rather not possible.

The Eclipse workbench with its background as an IDE leaves the control over which part is shown how and where mostly with the user and does not give you full programmatic control over the workbench parts. While I think this policy is a good fit for IDEs, some RCP apps may have reason to be more restrictive with their users.

However, you might get away with a hack and first close all views in question (if they are open) and then open them in the desired order. But this will likely cause flicker and you also may loose state in the opened views (depending on how complete they save and restore their state).

A rather drastic approach - but it might work from a technical POV - are fixed views and/or perspectives

If it is important to have those views in a specific order, why don't you merge them into one?