package eu.etaxonomy.taxeditor;
+import org.apache.http.NoHttpResponseException;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.ui.application.IWorkbenchConfigurer;
import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
+import eu.etaxonomy.taxeditor.store.CdmAuthenticationException;
}
previousT = t;
+ if (t != null && (t.getCause() instanceof RemoteAccessException || t instanceof NoHttpResponseException || t.getCause() instanceof CdmAuthenticationException || t.getMessage().contains("status code = 403"))){
+ MessagingUtils.errorDialog("Access denied",
+ null,
+ MessagingUtils.ACCESS_DENIED,
+ statusAdapter.getStatus().getPlugin(),
+ t.getCause(),
+ false);
+ }else
// NOTE : Currently we only allow RuntimeExceptions since
// allowing all kinds of exceptions would also include
return true;
}
if(t instanceof RemoteAccessException ||
- t.getCause() instanceof RemoteAccessException) {
+ t.getCause() instanceof RemoteAccessException ) {
MessagingUtils.errorDialog("Remote Access Error",
null,
MessagingUtils.REMOTE_ACCESS_FAILURE_MESSAGE + System.getProperty("line.separator"),
true);
return true;
}
+ if (t instanceof CdmAuthenticationException){
+ MessagingUtils.info("You are logged in now but you are not permitted to use the TaxEditor with the selected data source");
+ }
return false;
}
}
ConversationHolder conversation, TaxonNode entity, IWizardPageListener closeOnEnterListener, boolean isCreateNew) {
super(formFactory, conversation, entity);
this.wizardPageListener = closeOnEnterListener;
- setTitle("Edit taxon node");
+ if (isCreateNew){
+ setTitle("New Taxon");
+ }else{
+ setTitle("Edit Taxon Node");
+ }
this.isCreateNew = isCreateNew;