Bug 572404 - synchronize access PerspectiveManager.fPerspectiveContexts

Creating a project while opening e.g. a console page can result in
concurrent PerspectiveManager.startup() and PerspectiveManager.saving().
This can cause a NullPointerException or a
ConcurrentModificationException, with bad timing.

This change moves the initPerspectives() call to before listeners are
registered in startup(). This avoids the race condition.

Change-Id: I1fc2300217a7b4832e8eb33bce14b0e4847112cb
Signed-off-by: Simeon Andreev <simeon.danailov.andreev@gmail.com>
1 file changed