blob: 0966644b4c7169e3c1c5f9ebc4ac0142bbf00706 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2010, 2011 Mia-Software.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Nicolas Bros (Mia-Software) - initial API and implementation
*
*******************************************************************************/
package org.eclipse.gmt.modisco.infra.browser.editors;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionProvider;
/**
* Unwraps the MetaclassViewer elements (see
* {@link org.eclipse.emf.edit.ui.provider.UnwrappingSelectionProvider}, from
* which this class is derived).
*
*/
public class MetaclassUnwrappingSelectionProvider extends
org.eclipse.emf.edit.ui.provider.UnwrappingSelectionProvider {
public MetaclassUnwrappingSelectionProvider(final ISelectionProvider selectionProvider) {
super(selectionProvider);
}
@Override
public void setSelection(final ISelection selection) {
// unwrap InstancesForMetaclass wrappers
final ISelection selection2 = MetaclassViewer.unwrapSelection(selection);
super.setSelection(selection2);
}
}