Project

General

Profile

« Previous | Next » 

Revision 2abe4473

Added by Katja Luther almost 7 years ago

workaround to show media and facts view for derivateView

View differences:

eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/handler/CreateDescriptionHandler.java
8 8
*/
9 9
package eu.etaxonomy.taxeditor.editor.view.descriptive.handler;
10 10

  
11
import java.util.Collection;
12

  
11 13
import org.eclipse.core.commands.AbstractHandler;
12 14
import org.eclipse.core.commands.ExecutionEvent;
13 15
import org.eclipse.core.commands.ExecutionException;
......
51 53
		IPostOperationEnabled postOperationEnabled = (part instanceof IPostOperationEnabled) ? (IPostOperationEnabled) part : null;
52 54

  
53 55
		IEditorPart editor = HandlerUtil.getActiveEditor(event);
56
		
54 57
		if (editor instanceof FormEditor) {
55 58
			editor = ((FormEditor) editor).getActiveEditor();
56 59
		}
57
		IEditorInput input = editor.getEditorInput();
60
		Object input;
61
		if (editor == null && part instanceof DescriptiveViewPart){
62
			input =  ((DescriptiveViewPart)part).getViewer().getInput();
63
		}else{
64
			input = editor.getEditorInput();
65
		}
58 66
		AbstractPostOperation<?> operation;
59 67

  
60 68
		// taxon description

Also available in: Unified diff