Project

General

Profile

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

    
11
import javax.inject.Named;
12

    
13
import org.eclipse.e4.core.di.annotations.Execute;
14
import org.eclipse.e4.ui.model.application.ui.basic.MPart;
15
import org.eclipse.e4.ui.services.IServiceConstants;
16

    
17
import eu.etaxonomy.cdm.model.common.CdmBase;
18
import eu.etaxonomy.taxeditor.bulkeditor.e4.BulkEditorE4;
19
import eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput;
20

    
21
/**
22
 *
23
 * @author pplitzner
24
 * @date 12.09.2017
25
 *
26
 */
27
public class SetMergeTargetHandlerE4 {
28

    
29
    @Execute
30
    public void execute(@Named(IServiceConstants.ACTIVE_SELECTION)CdmBase selection,
31
            @Named(IServiceConstants.ACTIVE_PART)MPart activePart) {
32
        BulkEditorE4 editor = (BulkEditorE4) activePart.getObject();
33
        AbstractBulkEditorInput input = editor.getEditorInput();
34
        input.setMergeTarget(selection);
35
        editor.refresh();
36
	}
37
}
(9-9/9)