java - Hiding and showing Eclipse view programmatically -


i showing , hiding eclipse view code below. works eclipse 3.3, eclipse juno (version 4.3) it's not showing first time showing when fire event second time.

iworkbenchpage page = platformui.getworkbench().getactiveworkbenchwindow()     .getactivepage(); page.showview(userview.id); page.hideview(page.findview(userview.id)); 

is come across situation before?

i not sure why not getting first time. check see if dont have null pointer errors when fire first time.

platformui.getworkbench().getactiveworkbenchwindow().getactivepage() 

can return null if workbench not yet loaded.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -