diff options
author | Pierre-Charles David | 2016-08-25 07:16:47 +0000 |
---|---|---|
committer | Pierre-Charles David | 2016-08-26 12:19:02 +0000 |
commit | 0e4e25404f21d26012f2598f098570b130fb758b (patch) | |
tree | 7a9d33a5d96ce12e41b92416780a08b86908609c | |
parent | 093cc6c77932558e6642db05d221f8ff9de3c644 (diff) | |
download | org.eclipse.sirius-0e4e25404f21d26012f2598f098570b130fb758b.tar.gz org.eclipse.sirius-0e4e25404f21d26012f2598f098570b130fb758b.tar.xz org.eclipse.sirius-0e4e25404f21d26012f2598f098570b130fb758b.zip |
[465952] Remove obsolete classes
These are no longer needed now that all dialects use the generic
HierarchyLabelProvider.
Bug: 465952
Change-Id: Ie3b2247fa9d3b97b74ec2ec41ee28730a17a3537
Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
2 files changed, 0 insertions, 169 deletions
diff --git a/plugins/org.eclipse.sirius.table.ui/src/org/eclipse/sirius/table/ui/business/internal/dialect/HierarchyLabelTableProvider.java b/plugins/org.eclipse.sirius.table.ui/src/org/eclipse/sirius/table/ui/business/internal/dialect/HierarchyLabelTableProvider.java deleted file mode 100644 index 0899736df1..0000000000 --- a/plugins/org.eclipse.sirius.table.ui/src/org/eclipse/sirius/table/ui/business/internal/dialect/HierarchyLabelTableProvider.java +++ /dev/null @@ -1,90 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009, 2015 THALES GLOBAL SERVICES. - * 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.sirius.table.ui.business.internal.dialect; - -import org.eclipse.emf.ecore.EObject; -import org.eclipse.jface.viewers.ILabelProvider; -import org.eclipse.jface.viewers.LabelProvider; -import org.eclipse.sirius.business.api.query.IdentifiedElementQuery; -import org.eclipse.sirius.table.metamodel.table.description.TableDescription; -import org.eclipse.sirius.table.metamodel.table.description.TableMapping; -import org.eclipse.sirius.table.metamodel.table.description.TableNavigationDescription; -import org.eclipse.sirius.table.metamodel.table.provider.Messages; -import org.eclipse.sirius.viewpoint.description.Group; -import org.eclipse.sirius.viewpoint.description.IdentifiedElement; -import org.eclipse.sirius.viewpoint.description.RepresentationExtensionDescription; -import org.eclipse.sirius.viewpoint.description.tool.ToolEntry; -import org.eclipse.swt.graphics.Image; - -/** - * A label provider for mappings to display their hierarchy. - * - * @author jdupont - */ -public class HierarchyLabelTableProvider extends LabelProvider { - - private static final String DELIMITER = " > "; //$NON-NLS-1$ - - private ILabelProvider wrappedProvider; - - /** - * Create a new instance with wrapped label provider as base type. - * - * @param wrappedLabelProvider - * the wrapped label provider - */ - public HierarchyLabelTableProvider(final ILabelProvider wrappedLabelProvider) { - this.wrappedProvider = wrappedLabelProvider; - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.jface.viewers.LabelProvider#getImage(java.lang.Object) - */ - @Override - public Image getImage(final Object element) { - return wrappedProvider != null ? wrappedProvider.getImage(element) : super.getImage(element); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.jface.viewers.LabelProvider#getText(java.lang.Object) - */ - @Override - public String getText(final Object element) { - if (element instanceof TableMapping || element instanceof TableDescription || element instanceof TableNavigationDescription || element instanceof ToolEntry) { - final IdentifiedElement mapping = (IdentifiedElement) element; - String text = mapping.getName(); - EObject container = mapping.eContainer(); - while (container != null && !(container instanceof Group)) { - text = getLabel(container) + DELIMITER + text; - container = container.eContainer(); - } - return text; - } - return wrappedProvider != null ? wrappedProvider.getText(element) : super.getText(element); - } - - private String getLabel(final EObject eObject) { - - String label = null; - - if (eObject instanceof IdentifiedElement) { - label = new IdentifiedElementQuery((IdentifiedElement) eObject).getLabel(); - } else if (eObject instanceof RepresentationExtensionDescription) { - label = ((RepresentationExtensionDescription) eObject).getName(); - } - return label != null ? label : Messages.HierarchyLabelTableProvider_elementWithoutName; - } - -} diff --git a/plugins/org.eclipse.sirius.tree.ui/src/org/eclipse/sirius/tree/ui/business/internal/dialect/HierarchyLabelTreeProvider.java b/plugins/org.eclipse.sirius.tree.ui/src/org/eclipse/sirius/tree/ui/business/internal/dialect/HierarchyLabelTreeProvider.java deleted file mode 100644 index 3f0d6ca171..0000000000 --- a/plugins/org.eclipse.sirius.tree.ui/src/org/eclipse/sirius/tree/ui/business/internal/dialect/HierarchyLabelTreeProvider.java +++ /dev/null @@ -1,79 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009, 2015 THALES GLOBAL SERVICES. - * 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.sirius.tree.ui.business.internal.dialect; - -import org.eclipse.emf.ecore.EObject; -import org.eclipse.jface.viewers.ILabelProvider; -import org.eclipse.jface.viewers.LabelProvider; -import org.eclipse.sirius.business.api.query.IdentifiedElementQuery; -import org.eclipse.sirius.tree.description.TreeDescription; -import org.eclipse.sirius.tree.description.TreeMapping; -import org.eclipse.sirius.tree.description.TreeNavigationDescription; -import org.eclipse.sirius.tree.ui.provider.Messages; -import org.eclipse.sirius.viewpoint.description.Group; -import org.eclipse.sirius.viewpoint.description.IdentifiedElement; -import org.eclipse.sirius.viewpoint.description.RepresentationExtensionDescription; -import org.eclipse.swt.graphics.Image; - -/** - * A label provider for mappings to display their hierarchy. - * - * @author jdupont - */ -public class HierarchyLabelTreeProvider extends LabelProvider { - - private static final String DELIMITER = " > "; //$NON-NLS-1$ - - private ILabelProvider wrappedProvider; - - /** - * Create a new instance with wrapped label provider as base type. - * - * @param wrappedLabelProvider - * the wrapped label provider - */ - public HierarchyLabelTreeProvider(final ILabelProvider wrappedLabelProvider) { - this.wrappedProvider = wrappedLabelProvider; - } - - @Override - public Image getImage(final Object element) { - return wrappedProvider != null ? wrappedProvider.getImage(element) : super.getImage(element); - } - - @Override - public String getText(final Object element) { - if (element instanceof TreeMapping || element instanceof TreeDescription || element instanceof TreeNavigationDescription) { - final IdentifiedElement mapping = (IdentifiedElement) element; - String text = mapping.getName(); - EObject container = mapping.eContainer(); - while (container != null && !(container instanceof Group)) { - text = getLabel(container) + DELIMITER + text; - container = container.eContainer(); - } - return text; - } - return wrappedProvider != null ? wrappedProvider.getText(element) : super.getText(element); - } - - private String getLabel(final EObject eObject) { - - String label = null; - - if (eObject instanceof IdentifiedElement) { - label = new IdentifiedElementQuery((IdentifiedElement) eObject).getLabel(); - } else if (eObject instanceof RepresentationExtensionDescription) { - label = ((RepresentationExtensionDescription) eObject).getName(); - } - return label != null ? label : Messages.HierarchyLabelTreeProvider_elementWithoutName; - } - -} |