@Override
public void init(IWorkbench workbench, IStructuredSelection selection) {
this.workbench = workbench;
if (selection != null && selection instanceof TreeSelection){
TreeSelection tselection = (TreeSelection)selection;
if (tselection.getFirstElement() instanceof IResource){
IResource resource = (IResource)tselection.getFirstElement();
project = resource.getProject();
}
} else {
MessageDialog.openError(Display.getDefault().getActiveShell(), "Project Error", "No project resource selected");