Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/providers/TabContentProvider.java')
-rw-r--r--incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/providers/TabContentProvider.java61
1 files changed, 0 insertions, 61 deletions
diff --git a/incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/providers/TabContentProvider.java b/incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/providers/TabContentProvider.java
deleted file mode 100644
index d13c7fbcf2f..00000000000
--- a/incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/providers/TabContentProvider.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 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.properties.customization.providers;
-
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.papyrus.properties.contexts.Context;
-import org.eclipse.papyrus.properties.contexts.Tab;
-import org.eclipse.papyrus.properties.runtime.ConfigurationManager;
-
-/**
- * A Content provider used to retrieve all tabs from the available contexts
- *
- * @author Camille Letavernier
- *
- */
-public class TabContentProvider extends AbstractContextualContentProvider {
-
- private boolean editableTabsOnly;
-
- /**
- * Constructor.
- *
- * @param source
- * The EObject used to retrieve the current context
- * @param editableTabsOnly
- * If true, only the tabs from editable contexts will be returned,
- * i.e. the plug-in contexts will be ignored
- */
- public TabContentProvider(EObject source, boolean editableTabsOnly) {
- super(source);
- }
-
- public Object[] getElements() {
- List<Tab> tabs = new LinkedList<Tab>();
- for(Context context : contexts) {
- if(isValidContext(context))
- tabs.addAll(context.getTabs());
- }
- return tabs.toArray();
- }
-
- private boolean isValidContext(Context context) {
- if(editableTabsOnly) {
- return !ConfigurationManager.instance.isPlugin(context);
- }
- return true;
- }
-
-}

Back to the top