Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/dialogs/PortLabelProvider.java')
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/dialogs/PortLabelProvider.java80
1 files changed, 0 insertions, 80 deletions
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/dialogs/PortLabelProvider.java b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/dialogs/PortLabelProvider.java
deleted file mode 100644
index b94bcf1bfca..00000000000
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/dialogs/PortLabelProvider.java
+++ /dev/null
@@ -1,80 +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:
- * Ansgar Radermacher ansgar.radermacher@cea.fr
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.qompass.designer.ui.dialogs;
-
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.uml2.uml.Port;
-
-/**
- * A label provider for either UML or FCM ports
- *
- * @author ansgar
- *
- */
-public class PortLabelProvider extends LabelProvider implements ITableLabelProvider {
-
- /**
- * small helper function: simply retrieval of port (element might be either a port or an FCM port)
- *
- * @param element
- * @return
- */
- private Port getUMLport(Object element) {
- if (element instanceof org.eclipse.papyrus.FCM.Port) {
- org.eclipse.papyrus.FCM.Port port = (org.eclipse.papyrus.FCM.Port) element;
- if (port != null) {
- return port.getBase_Port();
- }
- } else if (element instanceof Port) {
- return (Port) element;
- }
- return null;
- }
-
- @Override
- public String getText(Object element) {
- Port umlPort = getUMLport(element);
- if (umlPort != null) {
- return umlPort.getName();
- }
- return "";
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnText(java.lang.Object, int)
- */
- @Override
- public String getColumnText(Object element, int columnIndex) {
- if (columnIndex == 0) {
- return getText(element);
- } else if (columnIndex == 1) {
- Port umlPort = getUMLport(element);
- if (umlPort != null) {
- return umlPort.getType().getName();
- }
- }
- return "";
- }
-
- @Override
- public Image getColumnImage(Object element, int columnIndex) {
- // TODO Auto-generated method stub
- return null;
- }
-};

Back to the top