Project

General

Profile

Download (935 Bytes) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2017 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.workbench.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.taxeditor.workbench.part.ICollapsableExpandable;
18

    
19
/**
20
 * @author pplitzner
21
 * @since Oct 30, 2017
22
 *
23
 */
24
public class CollapseHandler {
25

    
26
    @Execute
27
    public void execute(@Named(IServiceConstants.ACTIVE_PART)MPart activePart) {
28
        Object object = activePart.getObject();
29
        if(object instanceof ICollapsableExpandable){
30
            ((ICollapsableExpandable) object).collapse();
31
        }
32
    }
33

    
34
}
(1-1/2)