blob: 7802ef562c5f541ead014a1fe088618fa15155ab (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
/*******************************************************************************
* Copyright (c) 2006, 2012 Obeo.
* 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:
* Obeo - initial API and implementation
*******************************************************************************/
package org.eclipse.emf.compare.diagram.ide.ecoretools;
import org.eclipse.emf.compare.diagram.provider.AbstractLabelProvider;
import org.eclipse.emf.ecoretools.diagram.edit.parts.EcoreEditPartFactory;
import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
import org.eclipse.gmf.runtime.notation.View;
/**
* The provider for EcoreTools diagram kind.
*
* @author Cedric Notot <a href="mailto:cedric.notot@obeo.fr">cedric.notot@obeo.fr</a>
*/
public class EcoreToolsViewLabelProvider extends AbstractLabelProvider {
/**
* EcoreEditPartFactory.
*/
private static final EcoreEditPartFactory EDIT_PART_FACTORY = new EcoreEditPartFactory();
/**
* {@inheritDoc}
*
* @see org.eclipse.emf.compare.diagram.provider.IViewLabelProvider#isManaged(org.eclipse.gmf.runtime.notation.View)
*/
public boolean isManaged(View view) {
return EDIT_PART_FACTORY.createEditPart(null, view) instanceof ITextAwareEditPart;
}
}
|