pluginInterface.getUIManager().addUIListener(new UIManagerListener() {
public void UIAttached(UIInstance instance) {
if (instance instanceof UISWTInstance) {
swtInstance = (UISWTInstance)instance;
display = swtInstance.getDisplay();
myView = new View(pluginInterface);
swtInstance.addView(UISWTInstance.VIEW_MAIN, View.VIEWID, myView);
if(isPluginAutoOpen()){
swtInstance.openMainView(View.VIEWID,myView,null);
}
}