Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/TableLabelProvider.java')
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/TableLabelProvider.java68
1 files changed, 0 insertions, 68 deletions
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/TableLabelProvider.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/TableLabelProvider.java
deleted file mode 100644
index 73db2e6b047..00000000000
--- a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/TableLabelProvider.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
- *
- * 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:
- * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.infra.nattable.provider;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.papyrus.infra.emf.providers.EMFLabelProvider;
-import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
-import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
-import org.eclipse.papyrus.infra.services.labelprovider.service.IFilteredLabelProvider;
-import org.eclipse.papyrus.infra.widgets.Activator;
-import org.eclipse.swt.graphics.Image;
-
-/**
- *
- * This labelprovider provides icon and text for tables to display them in treeviewer
- *
- */
-public class TableLabelProvider extends EMFLabelProvider implements IFilteredLabelProvider {
-
- @Override
- public String getText(Object table) {
- Object el = table;
- if(table instanceof IAdaptable) {
- el = ((IAdaptable)table).getAdapter(EObject.class);
- }
- if(el != null && el instanceof Table) {
- return ((Table)el).getName();
- }
- return ""; //$NON-NLS-1$
- }
-
- @Override
- public Image getImage(Object table) {
- if(table instanceof IAdaptable) {
- table = ((IAdaptable)table).getAdapter(EObject.class);
- }
- if(table instanceof Table) {
- final String iconPath = ((Table)table).getTableConfiguration().getIconPath();
- if(iconPath != null) {
- return Activator.getDefault().getImage(iconPath);
- }
- }
- return null;
- }
-
- public boolean accept(Object table) {
- Object el = table;
- if(table instanceof IAdaptable) {
- el = EMFHelper.getEObject(table);
- }
- if(el != null) {
- return el instanceof Table;
- }
-
- return false;
- }
-
-}

Back to the top