Project

General

Profile

Download (1.25 KB) Statistics
| Branch: | Tag: | Revision:
1
// $Id$
2
/**
3
* Copyright (C) 2007 EDIT
4
* European Distributed Institute of Taxonomy 
5
* http://www.e-taxonomy.eu
6
* 
7
* The contents of this file are subject to the Mozilla Public License Version 1.1
8
* See LICENSE.TXT at the top of this package for the full license terms.
9
*/
10

    
11
package eu.etaxonomy.taxeditor.singlesource.editor.view.media;
12

    
13
import org.apache.log4j.Logger;
14
import org.eclipse.jface.viewers.ISelection;
15
import org.eclipse.jface.viewers.StructuredSelection;
16
import org.eclipse.ui.IEditorInput;
17
import org.eclipse.ui.IEditorPart;
18
import org.eclipse.ui.IWorkbenchPart;
19

    
20
import eu.etaxonomy.taxeditor.editor.EditorUtil;
21
import eu.etaxonomy.taxeditor.editor.MultiPageTaxonEditor;
22

    
23
/**
24
 * <p>MediaViewPart class.</p>
25
 *
26
 * @author n.hoffmann
27
 * @created Jun 15, 2010
28
 * @version 1.0
29
 */
30
public class MediaViewPartImpl extends MediaViewPart {
31
	private static final Logger logger = Logger.getLogger(MediaViewPartImpl.class);
32

    
33
	/** {@inheritDoc} */
34
	public void selectionChanged(IWorkbenchPart part, ISelection selection) {
35
		if(EditorUtil.getActiveEditor() == null){
36
			showEmptyPage();
37
			return;
38
		}
39
		
40
		if(part instanceof MultiPageTaxonEditor){
41
			IEditorInput input = ((IEditorPart) part).getEditorInput();
42
			showViewer(part, new StructuredSelection(input));
43
		}
44
	}
45
}
    (1-1/1)