Project

General

Profile

« Previous | Next » 

Revision b052c40f

Added by Andreas Kohlbecker about 10 years ago

adding warning dialog on unavailabel DefinedTermEditor

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/handler/OpenDefinedTermEditorHandler.java
5 5
import org.eclipse.core.commands.ExecutionEvent;
6 6
import org.eclipse.core.commands.ExecutionException;
7 7
import org.eclipse.core.commands.IHandler;
8
import org.eclipse.core.runtime.IStatus;
9
import org.eclipse.core.runtime.MultiStatus;
10
import org.eclipse.core.runtime.Status;
8 11
import org.eclipse.ui.IWorkbenchPage;
9 12
import org.eclipse.ui.PartInitException;
10 13

  
......
41 44
		try {
42 45
			activePage.openEditor(new TermEditorInput(TermType.getByUuid(UUID.fromString(termTypeUuid))), DefinedTermEditor.ID);
43 46
		} catch (PartInitException e) {
47
			
48
			String PID = "eu.etaxonomy.taxeditor.application";
49
			MultiStatus info = new MultiStatus(PID, 1, "You might be missing sufficient permissions to open the Defined Term Editor", null);
50
			info.add(new Status(IStatus.WARNING, PID, 1, e.getMessage(), null));
51
			StoreUtil.errorDialog("Cannot open Defined Term Editor", getClass(), info);
44 52
			StoreUtil.error(getClass(), e);
45 53
		}
46 54

  

Also available in: Unified diff