Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'incoming/org.eclipse.papyrus.infra.services.labelprovider/src/org/eclipse/papyrus/infra/services/labelprovider/service/ContextualLabelProvider.java')
-rw-r--r--incoming/org.eclipse.papyrus.infra.services.labelprovider/src/org/eclipse/papyrus/infra/services/labelprovider/service/ContextualLabelProvider.java31
1 files changed, 31 insertions, 0 deletions
diff --git a/incoming/org.eclipse.papyrus.infra.services.labelprovider/src/org/eclipse/papyrus/infra/services/labelprovider/service/ContextualLabelProvider.java b/incoming/org.eclipse.papyrus.infra.services.labelprovider/src/org/eclipse/papyrus/infra/services/labelprovider/service/ContextualLabelProvider.java
new file mode 100644
index 00000000000..e99f7ab2779
--- /dev/null
+++ b/incoming/org.eclipse.papyrus.infra.services.labelprovider/src/org/eclipse/papyrus/infra/services/labelprovider/service/ContextualLabelProvider.java
@@ -0,0 +1,31 @@
+/*****************************************************************************
+ * Copyright (c) 2012 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:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.services.labelprovider.service;
+
+import org.eclipse.jface.viewers.ILabelProvider;
+
+/**
+ * A LabelProvider which may use a context element to compute its labels.
+ * It can be used to compute e.g. relative paths from a base namespace
+ *
+ * @author Camille Letavernier
+ */
+public interface ContextualLabelProvider extends ILabelProvider {
+
+ /**
+ * Sets the context element against which the labels will be computed
+ *
+ * @param contextElement
+ * the context element against which the labels will be computed (e.g. base namespace for relative paths)
+ */
+ public void setContext(Object contextElement);
+}

Back to the top