diff options
Diffstat (limited to 'sandbox/Alf/org.eclipse.papyrus.alf.ui/src/org/eclipse/papyrus/alf/ui/labeling/AlfLabelProvider.java')
-rw-r--r-- | sandbox/Alf/org.eclipse.papyrus.alf.ui/src/org/eclipse/papyrus/alf/ui/labeling/AlfLabelProvider.java | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/sandbox/Alf/org.eclipse.papyrus.alf.ui/src/org/eclipse/papyrus/alf/ui/labeling/AlfLabelProvider.java b/sandbox/Alf/org.eclipse.papyrus.alf.ui/src/org/eclipse/papyrus/alf/ui/labeling/AlfLabelProvider.java new file mode 100644 index 00000000000..7987b12916e --- /dev/null +++ b/sandbox/Alf/org.eclipse.papyrus.alf.ui/src/org/eclipse/papyrus/alf/ui/labeling/AlfLabelProvider.java @@ -0,0 +1,44 @@ +/***************************************************************************** + * 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: + * CEA LIST - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.alf.ui.labeling; + +import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider; +import org.eclipse.xtext.ui.label.DefaultEObjectLabelProvider; + +import com.google.inject.Inject; + +/** + * Provides labels for a EObjects. + * + * see http://www.eclipse.org/Xtext/documentation/latest/xtext.html#labelProvider + */ +public class AlfLabelProvider extends DefaultEObjectLabelProvider { + + @Inject + public AlfLabelProvider(AdapterFactoryLabelProvider delegate) { + super(delegate); + } + +/* + //Labels and icons can be computed like this: + + String text(MyModel ele) { + return "my "+ele.getName(); + } + + String image(MyModel ele) { + return "MyModel.gif"; + } +*/ +} |