@@ -0,0 +1,2159 @@
+/*******************************************************************************%0A * File: RemoveSelectionOppositePartHandler.java%0A * %0A * Date: 27 %D0%B0%D0%B2%D0%B3. 2014 %D0%B3.%0A * Author: Mikhail Niedre%0A * %0A * Copyright (c) 2014 Original authors and others.%0A * %0A * All rights reserved. This program and the accompanying materials%0A * are made available under the terms of the Eclipse Public License v1.0%0A * which accompanies this distribution, and is available at%0A * %3Ca href=%22http://www.eclipse.org/legal/epl-v10.html%22%3Eepl-v1.0%3C/a%3E%0A *%0A * Contributors:%0A * Mikhail Niedre - initial API and implementation%0A *******************************************************************************/%0Apackage cane.brothers.e4.commander.handlers;%0A%0Aimport java.nio.file.Path;%0A%0Aimport javax.inject.Inject;%0Aimport javax.inject.Named;%0A%0Aimport org.eclipse.e4.core.di.annotations.Execute;%0Aimport org.eclipse.e4.core.di.annotations.Optional;%0Aimport org.eclipse.e4.ui.di.UIEventTopic;%0Aimport org.eclipse.e4.ui.model.application.MApplication;%0Aimport org.eclipse.e4.ui.model.application.ui.basic.MPart;%0Aimport org.eclipse.e4.ui.services.IServiceConstants;%0Aimport org.eclipse.e4.ui.workbench.modeling.EModelService;%0Aimport org.eclipse.e4.ui.workbench.modeling.EPartService;%0A%0Aimport cane.brothers.e4.commander.PathEvents;%0Aimport cane.brothers.e4.commander.utils.PartUtils;%0A%0A/**%0A * remove selection on opposite part by event.%0A */%0Apublic class RemoveSelectionOppositePartHandler %7B%0A%0A    @Inject%0A    MApplication application;%0A%0A    @Inject%0A    EModelService modelService;%0A%0A    @Inject%0A    private EPartService partService;%0A%0A    @Inject%0A    @Named(IServiceConstants.ACTIVE_PART)%0A    private MPart activePart;%0A%0A    @Inject%0A    @Optional%0A    @Execute%0A    public void execute(@UIEventTopic(PathEvents.TAB_REMOVE_SELECTION) Path p) %7B%0A%0A%09// update label of current tab%0A%09if (activePart != null) %7B%0A%0A%09    MPart oppositePart = PartUtils.getVisibleOppositePart(application,%0A%09%09    modelService, partService, activePart);%0A%0A%09    // TODO will be not necessary after #31%0A%09    // clear opposite part selection%0A%09    PartUtils.clearSelection(oppositePart);%0A%09    System.out.println(%22remove selection from opposite tab%22);%0A%09%7D%0A    %7D%0A%0A%7D%0A

switch focus to another tab