-// $Id$
/**
* Copyright (C) 2007 EDIT
* European Distributed Institute of Taxonomy
* <p>showEmptyPage</p>
*/
public void showEmptyPage(){
+ setPartName(createPartTitle(null));
pageBook.showPage(emptySelectionLabel);
}
this.part = part;
Object element = selection.getFirstElement();
+ //avoid widget is disposed exceptions
+ if (getViewer().getControl()==null || getViewer().getControl().isDisposed()){
+ return;
+ }
+ setPartName(createPartTitle(element));
getViewer().setInput(element);
-
showViewer();
}
}
@Override
- public List<CdmBase> getRootEntities() {
+ public List<? extends CdmBase> getRootEntities() {
return Arrays.asList((CdmBase)getViewer().getInput());
}
// TODO Auto-generated method stub
return null;
}
+
+ protected String createPartTitle(Object selectedObject){
+ if(selectedObject!=null){
+ return getViewName()+": "+selectedObject; //$NON-NLS-1$
+ }
+ return getViewName();
+ }
+
+ protected abstract String getViewName();
}