Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'target_explorer/plugins/org.eclipse.tcf.te.ui.views')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/build.properties4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/plugin.properties8
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/Managers.java80
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/ViewsUtil.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/actions/GoIntoActionProvider.java152
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/actions/NewActionProvider.java5
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/activator/UIPlugin.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/categories/Category.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/controls/AbstractContextSelectorControl.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/Editor.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/EditorEventListener.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/EditorInput.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/controls/ButtonPanelControl.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/pages/AbstractCustomFormToolkitEditorPage.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/pages/AbstractEditorPage.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/pages/AbstractTreeViewerExplorerEditorPage.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/events/AbstractEventListener.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/events/ViewerContentChangeEvent.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/expressions/PropertyTester.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/expressions/SelectionSourceProvider.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/extensions/CategoriesExtensionPointManager.java202
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/extensions/EditorPageBinding.java110
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/extensions/EditorPageBindingExtensionPointManager.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/extensions/EditorPageExtensionPointManager.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/extensions/EditorPageUnBinding.java36
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/extensions/EditorPageUnBindingExtensionPointManager.java328
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/extensions/LabelProviderDelegateExtensionPointManager.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/CategoryAddToContributionItem.java258
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/ConfigContentHandler.java500
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/ConfigFiltersHandler.java240
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/ContentDescriptorLabelProvider.java134
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/ContentMRUContribution.java198
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/EditorQuickFilterHandler.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/EditorQuickFilterResetHandler.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/EditorSearchHandler.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/FilterMRUContribution.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/MRUList.java156
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/NewWizardNodeHandler.java17
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/OpenEditorHandler.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/ShowInPropertiesHandler.java96
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/ShowInSystemManagementHandler.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/UpdateActiveExtensionsOperation.java13
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/UpdateActiveFiltersOperation.java13
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/ViewQuickFilterHandler.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/ViewQuickFilterResetHandler.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/ViewSearchHandler.java70
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/ICategory.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/IEditorPage.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/IEditorSaveAsAdapter.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/IRoot.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/IUIConstants.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/ImageConsts.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/categories/ICategorizable.java108
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/categories/ICategoryManager.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/tracing/ITraceIds.java42
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/AltDoubleClickEvent.java62
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/PropertyContributorLabelProvider.java144
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/RestoreDone.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/RestoreJob.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/RestoreStatus.java90
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/View.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/ViewExpandingState.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/ViewRoot.java76
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/ViewViewer.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/ViewViewerComparer.java152
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/ViewViewerDecoratingLabelProvider.java334
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/adapters/EditorAdapterFactory.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/adapters/ViewAdapterFactory.java90
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/categories/AbstractCategoryContributionItem.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/categories/CategoryFactory.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/categories/CategoryManager.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/categories/CategoryPropertyTester.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/extensions/AbstractEditorPageBindingsElement.java132
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/preferences/IPreferenceKeys.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/preferences/PreferencesInitializer.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/quickfilter/EditorQuickFilterTester.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/quickfilter/QuickFilterTester.java248
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/services/MenuService.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/listeners/AbstractWindowListener.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/listeners/WorkbenchPartListener.java228
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/listeners/WorkbenchPerspectiveListener.java54
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/listeners/WorkbenchWindowListener.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/navigator/DelegatingLabelProvider.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/navigator/LabelProviderDelegate.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/navigator/ViewerContentProvider.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/navigator/ViewerSorter.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/navigator/nodes/NewWizardNode.java17
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/nls/Messages.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/nls/Messages.properties4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/perspective/PerspectiveFactory.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/sections/AbstractContextSelectorSection.java4
91 files changed, 2310 insertions, 2315 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/build.properties b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/build.properties
index a0e89b042..c4951eca7 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/build.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/build.properties
@@ -1,11 +1,11 @@
###############################################################################
-# Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved.
+# Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
-# Wind River Systems - initial API and implementation
+# Wind River Systems - initial API and implementation
###############################################################################
source.. = src/
output.. = bin/
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/plugin.properties
index fc0f772fe..4fec40138 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/plugin.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/plugin.properties
@@ -1,12 +1,12 @@
-##################################################################################
-# Copyright (c) 2011, 2014 Wind River Systems, Inc. and others. All rights reserved.
+###############################################################################
+# Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
-# Wind River Systems - initial API and implementation
-##################################################################################
+# Wind River Systems - initial API and implementation
+###############################################################################
pluginName = Target Explorer, Common Views
providerName = Eclipse.org - Target Explorer
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/Managers.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/Managers.java
index ddb2f93f5..c0508f2f7 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/Managers.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/Managers.java
@@ -1,40 +1,40 @@
-/*******************************************************************************
- * Copyright (c) 2012 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tcf.te.ui.views;
-
-import org.eclipse.tcf.te.ui.views.interfaces.categories.ICategoryManager;
-import org.eclipse.tcf.te.ui.views.internal.categories.CategoryManager;
-
-/**
- * Provides access to singleton manager instances.
- */
-public class Managers {
- // The category manager instance
- private static volatile ICategoryManager categoryManager;
-
- /**
- * Dispose the manager instances.
- */
- public static void dispose() {
- if (categoryManager != null) { categoryManager.flush(); categoryManager = null; }
- }
-
- /**
- * Returns the category manager instance.
- *
- * @return The category manager instance.
- */
- public static ICategoryManager getCategoryManager() {
- if (categoryManager == null) {
- categoryManager = new CategoryManager();
- }
- return categoryManager;
- }
-}
+/*******************************************************************************
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.views;
+
+import org.eclipse.tcf.te.ui.views.interfaces.categories.ICategoryManager;
+import org.eclipse.tcf.te.ui.views.internal.categories.CategoryManager;
+
+/**
+ * Provides access to singleton manager instances.
+ */
+public class Managers {
+ // The category manager instance
+ private static volatile ICategoryManager categoryManager;
+
+ /**
+ * Dispose the manager instances.
+ */
+ public static void dispose() {
+ if (categoryManager != null) { categoryManager.flush(); categoryManager = null; }
+ }
+
+ /**
+ * Returns the category manager instance.
+ *
+ * @return The category manager instance.
+ */
+ public static ICategoryManager getCategoryManager() {
+ if (categoryManager == null) {
+ categoryManager = new CategoryManager();
+ }
+ return categoryManager;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/ViewsUtil.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/ViewsUtil.java
index 982f6779c..5024e966e 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/ViewsUtil.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/ViewsUtil.java
@@ -1,11 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2011, 2013 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
+ * Wind River Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.tcf.te.ui.views;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/actions/GoIntoActionProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/actions/GoIntoActionProvider.java
index 172c86127..55d40da7f 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/actions/GoIntoActionProvider.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/actions/GoIntoActionProvider.java
@@ -1,76 +1,76 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tcf.te.ui.views.actions;
-
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.IWorkbenchActionConstants;
-import org.eclipse.ui.internal.navigator.framelist.GoIntoAction;
-import org.eclipse.ui.navigator.CommonActionProvider;
-import org.eclipse.ui.navigator.CommonViewer;
-import org.eclipse.ui.navigator.ICommonActionExtensionSite;
-
-/**
- * The action provider to add Go Into action to the context menu of Target Explorer.
- * <p>
- * Copied and adapted from org.eclipse.navigator.resource.GoIntoActionProvider.
- */
-@SuppressWarnings("restriction")
-public class GoIntoActionProvider extends CommonActionProvider {
- // GoInto Action.
- private GoIntoAction goIntoAction;
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.navigator.CommonActionProvider#init(org.eclipse.ui.navigator.ICommonActionExtensionSite)
- */
- @Override
- public void init(ICommonActionExtensionSite anActionSite) {
- anActionSite.getViewSite().getShell();
- CommonViewer viewer = (CommonViewer) anActionSite.getStructuredViewer();
- goIntoAction = new GoIntoAction(viewer.getFrameList());
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.actions.ActionGroup#dispose()
- */
- @Override
- public void dispose() {
- goIntoAction.dispose();
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.actions.ActionGroup#fillActionBars(org.eclipse.ui.IActionBars)
- */
- @Override
- public void fillActionBars(IActionBars actionBars) {
- actionBars.setGlobalActionHandler(IWorkbenchActionConstants.GO_INTO, goIntoAction);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.actions.ActionGroup#fillContextMenu(org.eclipse.jface.action.IMenuManager)
- */
- @Override
- public void fillContextMenu(IMenuManager menu) {
- menu.appendToGroup("group.goto", goIntoAction); //$NON-NLS-1$
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.actions.ActionGroup#updateActionBars()
- */
- @Override
- public void updateActionBars() {
- goIntoAction.update();
- }
-}
+/*******************************************************************************
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.views.actions;
+
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.ui.IActionBars;
+import org.eclipse.ui.IWorkbenchActionConstants;
+import org.eclipse.ui.internal.navigator.framelist.GoIntoAction;
+import org.eclipse.ui.navigator.CommonActionProvider;
+import org.eclipse.ui.navigator.CommonViewer;
+import org.eclipse.ui.navigator.ICommonActionExtensionSite;
+
+/**
+ * The action provider to add Go Into action to the context menu of Target Explorer.
+ * <p>
+ * Copied and adapted from org.eclipse.navigator.resource.GoIntoActionProvider.
+ */
+@SuppressWarnings("restriction")
+public class GoIntoActionProvider extends CommonActionProvider {
+ // GoInto Action.
+ private GoIntoAction goIntoAction;
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.navigator.CommonActionProvider#init(org.eclipse.ui.navigator.ICommonActionExtensionSite)
+ */
+ @Override
+ public void init(ICommonActionExtensionSite anActionSite) {
+ anActionSite.getViewSite().getShell();
+ CommonViewer viewer = (CommonViewer) anActionSite.getStructuredViewer();
+ goIntoAction = new GoIntoAction(viewer.getFrameList());
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.actions.ActionGroup#dispose()
+ */
+ @Override
+ public void dispose() {
+ goIntoAction.dispose();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.actions.ActionGroup#fillActionBars(org.eclipse.ui.IActionBars)
+ */
+ @Override
+ public void fillActionBars(IActionBars actionBars) {
+ actionBars.setGlobalActionHandler(IWorkbenchActionConstants.GO_INTO, goIntoAction);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.actions.ActionGroup#fillContextMenu(org.eclipse.jface.action.IMenuManager)
+ */
+ @Override
+ public void fillContextMenu(IMenuManager menu) {
+ menu.appendToGroup("group.goto", goIntoAction); //$NON-NLS-1$
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.actions.ActionGroup#updateActionBars()
+ */
+ @Override
+ public void updateActionBars() {
+ goIntoAction.update();
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/actions/NewActionProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/actions/NewActionProvider.java
index 526961cb0..6976c9b21 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/actions/NewActionProvider.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/actions/NewActionProvider.java
@@ -1,12 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2011, 2013 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
- * Tobias Schwarz (Wind River) - [368243] [UI] Allow dynamic new wizard contributions
+ * Wind River Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.tcf.te.ui.views.actions;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/activator/UIPlugin.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/activator/UIPlugin.java
index 8a8445687..e1b8e3bf4 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/activator/UIPlugin.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/activator/UIPlugin.java
@@ -1,11 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2011, 2013 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
+ * Wind River Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.tcf.te.ui.views.activator;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/categories/Category.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/categories/Category.java
index 544758387..41b21b824 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/categories/Category.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/categories/Category.java
@@ -1,11 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2012, 2014 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
+ * Wind River Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.tcf.te.ui.views.categories;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/controls/AbstractContextSelectorControl.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/controls/AbstractContextSelectorControl.java
index 97dea24be..90cc282a2 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/controls/AbstractContextSelectorControl.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/controls/AbstractContextSelectorControl.java
@@ -1,11 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2012, 2014 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
+ * Wind River Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.tcf.te.ui.views.controls;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/Editor.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/Editor.java
index 7a45a6e9d..c217e1494 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/Editor.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/Editor.java
@@ -1,11 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2011, 2013 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
+ * Wind River Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.tcf.te.ui.views.editor;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/EditorEventListener.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/EditorEventListener.java
index d8b2e57a6..33ce984c8 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/EditorEventListener.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/EditorEventListener.java
@@ -1,11 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2011, 2014 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
+ * Wind River Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.tcf.te.ui.views.editor;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/EditorInput.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/EditorInput.java
index fd7e2eb72..b1f16f8ee 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/EditorInput.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/EditorInput.java
@@ -1,11 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2011, 2013 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
+ * Wind River Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.tcf.te.ui.views.editor;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/controls/ButtonPanelControl.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/controls/ButtonPanelControl.java
index 0960767d0..a02388ecc 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/controls/ButtonPanelControl.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/controls/ButtonPanelControl.java
@@ -1,11 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2012, 2014 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
+ * Wind River Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.tcf.te.ui.views.editor.controls;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/pages/AbstractCustomFormToolkitEditorPage.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/pages/AbstractCustomFormToolkitEditorPage.java
index 66c817938..56941414c 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/pages/AbstractCustomFormToolkitEditorPage.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/pages/AbstractCustomFormToolkitEditorPage.java
@@ -1,11 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2011, 2014 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
+ * Wind River Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.tcf.te.ui.views.editor.pages;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/pages/AbstractEditorPage.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/pages/AbstractEditorPage.java
index dcbfaf7b1..91d1a518d 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/pages/AbstractEditorPage.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/pages/AbstractEditorPage.java
@@ -1,11 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2011, 2013 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
+ * Wind River Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.tcf.te.ui.views.editor.pages;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/pages/AbstractTreeViewerExplorerEditorPage.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/pages/AbstractTreeViewerExplorerEditorPage.java
index 370ea63da..402074877 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/pages/AbstractTreeViewerExplorerEditorPage.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/pages/AbstractTreeViewerExplorerEditorPage.java
@@ -1,11 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2011, 2014 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
+ * Wind River Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.tcf.te.ui.views.editor.pages;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/events/AbstractEventListener.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/events/AbstractEventListener.java
index 29e01c61b..ca98d43e2 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/events/AbstractEventListener.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/events/AbstractEventListener.java
@@ -1,11 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2011, 2014 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
+ * Wind River Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.tcf.te.ui.views.events;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/events/ViewerContentChangeEvent.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/events/ViewerContentChangeEvent.java
index a28276106..83babc075 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/events/ViewerContentChangeEvent.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/events/ViewerContentChangeEvent.java
@@ -1,11 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2011, 2013 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
+ * Wind River Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.tcf.te.ui.views.events;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/expressions/PropertyTester.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/expressions/PropertyTester.java
index 776990519..f11786469 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/expressions/PropertyTester.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/expressions/PropertyTester.java
@@ -1,11 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2011, 2014 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
+ * Wind River Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.tcf.te.ui.views.expressions;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/expressions/SelectionSourceProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/expressions/SelectionSourceProvider.java
index 4b3c9c0f7..1e50ff694 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/expressions/SelectionSourceProvider.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/expressions/SelectionSourceProvider.java
@@ -1,11 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2012, 2013 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
+ * Wind River Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.tcf.te.ui.views.expressions;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/extensions/CategoriesExtensionPointManager.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/extensions/CategoriesExtensionPointManager.java
index f661532b2..624b38049 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/extensions/CategoriesExtensionPointManager.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/extensions/CategoriesExtensionPointManager.java
@@ -1,101 +1,101 @@
-/*******************************************************************************
- * Copyright (c) 2012 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tcf.te.ui.views.extensions;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager;
-import org.eclipse.tcf.te.runtime.extensions.ExecutableExtensionProxy;
-import org.eclipse.tcf.te.ui.views.interfaces.ICategory;
-
-/**
- * Categories extension point manager implementation.
- */
-public class CategoriesExtensionPointManager extends AbstractExtensionPointManager<ICategory> {
- /*
- * Thread save singleton instance creation.
- */
- private static class LazyInstance {
- public static CategoriesExtensionPointManager instance = new CategoriesExtensionPointManager();
- }
-
- /**
- * Constructor.
- */
- /* default */ CategoriesExtensionPointManager() {
- super();
- }
-
- /**
- * Returns the singleton instance of the extension point manager.
- */
- public static CategoriesExtensionPointManager getInstance() {
- return LazyInstance.instance;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#getExtensionPointId()
- */
- @Override
- protected String getExtensionPointId() {
- return "org.eclipse.tcf.te.ui.views.categories"; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#getConfigurationElementName()
- */
- @Override
- protected String getConfigurationElementName() {
- return "category"; //$NON-NLS-1$
- }
-
- /**
- * Returns the list of all contributed categories.
- *
- * @param unique If <code>true</code>, the method returns new instances for each
- * contributed category.
- *
- * @return The list of contributed categories, or an empty array.
- */
- public ICategory[] getCategories(boolean unique) {
- List<ICategory> contributions = new ArrayList<ICategory>();
- Collection<ExecutableExtensionProxy<ICategory>> editorPages = getExtensions().values();
- for (ExecutableExtensionProxy<ICategory> editorPage : editorPages) {
- ICategory instance = unique ? editorPage.newInstance() : editorPage.getInstance();
- if (instance != null && !contributions.contains(instance)) {
- contributions.add(instance);
- }
- }
-
- return contributions.toArray(new ICategory[contributions.size()]);
- }
-
- /**
- * Returns the category identified by its unique id. If no category
- * with the specified id is registered, <code>null</code> is returned.
- *
- * @param id The unique id of the category or <code>null</code>
- * @param unique If <code>true</code>, the method returns new instances of the category contribution.
- *
- * @return The category instance or <code>null</code>.
- */
- public ICategory getCategory(String id, boolean unique) {
- ICategory contribution = null;
- if (getExtensions().containsKey(id)) {
- ExecutableExtensionProxy<ICategory> proxy = getExtensions().get(id);
- // Get the extension instance
- contribution = unique ? proxy.newInstance() : proxy.getInstance();
- }
-
- return contribution;
- }
-}
+/*******************************************************************************
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.views.extensions;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager;
+import org.eclipse.tcf.te.runtime.extensions.ExecutableExtensionProxy;
+import org.eclipse.tcf.te.ui.views.interfaces.ICategory;
+
+/**
+ * Categories extension point manager implementation.
+ */
+public class CategoriesExtensionPointManager extends AbstractExtensionPointManager<ICategory> {
+ /*
+ * Thread save singleton instance creation.
+ */
+ private static class LazyInstance {
+ public static CategoriesExtensionPointManager instance = new CategoriesExtensionPointManager();
+ }
+
+ /**
+ * Constructor.
+ */
+ /* default */ CategoriesExtensionPointManager() {
+ super();
+ }
+
+ /**
+ * Returns the singleton instance of the extension point manager.
+ */
+ public static CategoriesExtensionPointManager getInstance() {
+ return LazyInstance.instance;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#getExtensionPointId()
+ */
+ @Override
+ protected String getExtensionPointId() {
+ return "org.eclipse.tcf.te.ui.views.categories"; //$NON-NLS-1$
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#getConfigurationElementName()
+ */
+ @Override
+ protected String getConfigurationElementName() {
+ return "category"; //$NON-NLS-1$
+ }
+
+ /**
+ * Returns the list of all contributed categories.
+ *
+ * @param unique If <code>true</code>, the method returns new instances for each
+ * contributed category.
+ *
+ * @return The list of contributed categories, or an empty array.
+ */
+ public ICategory[] getCategories(boolean unique) {
+ List<ICategory> contributions = new ArrayList<ICategory>();
+ Collection<ExecutableExtensionProxy<ICategory>> editorPages = getExtensions().values();
+ for (ExecutableExtensionProxy<ICategory> editorPage : editorPages) {
+ ICategory instance = unique ? editorPage.newInstance() : editorPage.getInstance();
+ if (instance != null && !contributions.contains(instance)) {
+ contributions.add(instance);
+ }
+ }
+
+ return contributions.toArray(new ICategory[contributions.size()]);
+ }
+
+ /**
+ * Returns the category identified by its unique id. If no category
+ * with the specified id is registered, <code>null</code> is returned.
+ *
+ * @param id The unique id of the category or <code>null</code>
+ * @param unique If <code>true</code>, the method returns new instances of the category contribution.
+ *
+ * @return The category instance or <code>null</code>.
+ */
+ public ICategory getCategory(String id, boolean unique) {
+ ICategory contribution = null;
+ if (getExtensions().containsKey(id)) {
+ ExecutableExtensionProxy<ICategory> proxy = getExtensions().get(id);
+ // Get the extension instance
+ contribution = unique ? proxy.newInstance() : proxy.getInstance();
+ }
+
+ return contribution;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/extensions/EditorPageBinding.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/extensions/EditorPageBinding.java
index 5f977d931..80d824c08 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/extensions/EditorPageBinding.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/extensions/EditorPageBinding.java
@@ -1,55 +1,55 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2013 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tcf.te.ui.views.extensions;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.tcf.te.ui.views.internal.extensions.AbstractEditorPageBindingsElement;
-
-/**
- * Editor page binding implementation.
- */
-public class EditorPageBinding extends AbstractEditorPageBindingsElement {
- // The insertBefore element
- private String insertBefore;
- // The insertAfter element
- private String insertAfter;
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.extensions.ExecutableExtension#doSetInitializationData(org.eclipse.core.runtime.IConfigurationElement, java.lang.String, java.lang.Object)
- */
- @Override
- public void doSetInitializationData(IConfigurationElement config, String propertyName, Object data) throws CoreException {
- super.doSetInitializationData(config, propertyName, data);
-
- // Read the "insertBefore" attribute
- insertBefore = config != null ? config.getAttribute("insertBefore") : null; //$NON-NLS-1$
- // Read the "insertAfter" attribute
- insertAfter = config != null ? config.getAttribute("insertAfter") : null; //$NON-NLS-1$
- }
-
- /**
- * Returns the &quot;insertBefore&quot; property for this binding.
- *
- * @return The &quot;insertBefore&quot; property or an empty string.
- */
- public String getInsertBefore() {
- return insertBefore != null ? insertBefore.trim() : ""; //$NON-NLS-1$
- }
-
- /**
- * Returns the &quot;insertAfter&quot; property for this binding.
- *
- * @return The &quot;insertAfter&quot; property or an empty string.
- */
- public String getInsertAfter() {
- return insertAfter != null ? insertAfter.trim() : ""; //$NON-NLS-1$
- }
-}
+/*******************************************************************************
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.views.extensions;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.tcf.te.ui.views.internal.extensions.AbstractEditorPageBindingsElement;
+
+/**
+ * Editor page binding implementation.
+ */
+public class EditorPageBinding extends AbstractEditorPageBindingsElement {
+ // The insertBefore element
+ private String insertBefore;
+ // The insertAfter element
+ private String insertAfter;
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.extensions.ExecutableExtension#doSetInitializationData(org.eclipse.core.runtime.IConfigurationElement, java.lang.String, java.lang.Object)
+ */
+ @Override
+ public void doSetInitializationData(IConfigurationElement config, String propertyName, Object data) throws CoreException {
+ super.doSetInitializationData(config, propertyName, data);
+
+ // Read the "insertBefore" attribute
+ insertBefore = config != null ? config.getAttribute("insertBefore") : null; //$NON-NLS-1$
+ // Read the "insertAfter" attribute
+ insertAfter = config != null ? config.getAttribute("insertAfter") : null; //$NON-NLS-1$
+ }
+
+ /**
+ * Returns the &quot;insertBefore&quot; property for this binding.
+ *
+ * @return The &quot;insertBefore&quot; property or an empty string.
+ */
+ public String getInsertBefore() {
+ return insertBefore != null ? insertBefore.trim() : ""; //$NON-NLS-1$
+ }
+
+ /**
+ * Returns the &quot;insertAfter&quot; property for this binding.
+ *
+ * @return The &quot;insertAfter&quot; property or an empty string.
+ */
+ public String getInsertAfter() {
+ return insertAfter != null ? insertAfter.trim() : ""; //$NON-NLS-1$
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/extensions/EditorPageBindingExtensionPointManager.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/extensions/EditorPageBindingExtensionPointManager.java
index ff26ad511..4d90e0bb0 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/extensions/EditorPageBindingExtensionPointManager.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/extensions/EditorPageBindingExtensionPointManager.java
@@ -1,11 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2011, 2013 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
+ * Wind River Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.tcf.te.ui.views.extensions;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/extensions/EditorPageExtensionPointManager.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/extensions/EditorPageExtensionPointManager.java
index 04b52e989..cbec0d974 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/extensions/EditorPageExtensionPointManager.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/extensions/EditorPageExtensionPointManager.java
@@ -1,11 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2011, 2013 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
+ * Wind River Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.tcf.te.ui.views.extensions;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/extensions/EditorPageUnBinding.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/extensions/EditorPageUnBinding.java
index dc4169636..682311abf 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/extensions/EditorPageUnBinding.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/extensions/EditorPageUnBinding.java
@@ -1,18 +1,18 @@
-/*******************************************************************************
- * Copyright (c) 2013 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tcf.te.ui.views.extensions;
-
-import org.eclipse.tcf.te.ui.views.internal.extensions.AbstractEditorPageBindingsElement;
-
-/**
- * Editor page unbinding implementation.
- */
-public class EditorPageUnBinding extends AbstractEditorPageBindingsElement {
-}
+/*******************************************************************************
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.views.extensions;
+
+import org.eclipse.tcf.te.ui.views.internal.extensions.AbstractEditorPageBindingsElement;
+
+/**
+ * Editor page unbinding implementation.
+ */
+public class EditorPageUnBinding extends AbstractEditorPageBindingsElement {
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/extensions/EditorPageUnBindingExtensionPointManager.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/extensions/EditorPageUnBindingExtensionPointManager.java
index c86922902..7b136404c 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/extensions/EditorPageUnBindingExtensionPointManager.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/extensions/EditorPageUnBindingExtensionPointManager.java
@@ -1,164 +1,164 @@
-/*******************************************************************************
- * Copyright (c) 2013 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tcf.te.ui.views.extensions;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.core.expressions.EvaluationContext;
-import org.eclipse.core.expressions.EvaluationResult;
-import org.eclipse.core.expressions.Expression;
-import org.eclipse.core.expressions.IEvaluationContext;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager;
-import org.eclipse.tcf.te.runtime.extensions.ExecutableExtensionProxy;
-import org.eclipse.tcf.te.ui.views.activator.UIPlugin;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.ISources;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.handlers.IHandlerService;
-
-
-/**
- * Editor page unbinding extension point manager implementation.
- */
-public class EditorPageUnBindingExtensionPointManager extends AbstractExtensionPointManager<EditorPageUnBinding> {
-
- /*
- * Thread save singleton instance creation.
- */
- private static class LazyInstance {
- public static EditorPageUnBindingExtensionPointManager instance = new EditorPageUnBindingExtensionPointManager();
- }
-
- /**
- * Constructor.
- */
- EditorPageUnBindingExtensionPointManager() {
- super();
- }
-
- /**
- * Returns the singleton instance of the extension point manager.
- */
- public static EditorPageUnBindingExtensionPointManager getInstance() {
- return LazyInstance.instance;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#getExtensionPointId()
- */
- @Override
- protected String getExtensionPointId() {
- return "org.eclipse.tcf.te.ui.views.editorPageBindings"; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#getConfigurationElementName()
- */
- @Override
- protected String getConfigurationElementName() {
- return "editorPageUnBinding"; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#doCreateExtensionProxy(org.eclipse.core.runtime.IConfigurationElement)
- */
- @Override
- protected ExecutableExtensionProxy<EditorPageUnBinding> doCreateExtensionProxy(IConfigurationElement element) throws CoreException {
- return new ExecutableExtensionProxy<EditorPageUnBinding>(element) {
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.extensions.ExecutableExtensionProxy#newInstance()
- */
- @Override
- public EditorPageUnBinding newInstance() {
- EditorPageUnBinding instance = new EditorPageUnBinding();
- try {
- instance.setInitializationData(getConfigurationElement(), null, null);
- } catch (CoreException e) {
- IStatus status = new Status(IStatus.ERROR, UIPlugin.getUniqueIdentifier(),
- e.getLocalizedMessage(), e);
- UIPlugin.getDefault().getLog().log(status);
- }
- return instance;
- }
- };
- }
-
- /**
- * Returns the applicable editor page unbindings for the given data source model node..
- *
- * @param input The active editor input or <code>null</code>.
- * @return The list of applicable editor page unbindings or an empty array.
- */
- public EditorPageUnBinding[] getApplicableEditorPageUnBindings(IEditorInput input) {
- List<EditorPageUnBinding> applicable = new ArrayList<EditorPageUnBinding>();
-
- for (EditorPageUnBinding binding : getEditorPageUnBindings()) {
- Expression enablement = binding.getEnablement();
-
- // The page binding is applicable by default if no expression
- // is specified.
- boolean isApplicable = enablement == null;
-
- if (enablement != null && input != null) {
- // Extract the node from the editor input
- Object node = input.getAdapter(Object.class);
- if (node != null) {
- // Set the default variable to the data source model node instance.
- IEvaluationContext currentState = ((IHandlerService)PlatformUI.getWorkbench().getService(IHandlerService.class)).getCurrentState();
- EvaluationContext context = new EvaluationContext(currentState, node);
- // Set the "activeEditorInput" variable to the data source model node instance.
- context.addVariable(ISources.ACTIVE_EDITOR_INPUT_NAME, node);
- // Allow plugin activation
- context.setAllowPluginActivation(true);
- // Evaluate the expression
- try {
- isApplicable = enablement.evaluate(context).equals(EvaluationResult.TRUE);
- } catch (CoreException e) {
- IStatus status = new Status(IStatus.ERROR, UIPlugin.getUniqueIdentifier(), e.getLocalizedMessage(), e);
- UIPlugin.getDefault().getLog().log(status);
- }
- } else {
- // The enablement is false by definition if we cannot
- // determine the data source model node.
- isApplicable = false;
- }
- }
-
- // Add the page if applicable
- if (isApplicable) applicable.add(binding);
- }
-
- return applicable.toArray(new EditorPageUnBinding[applicable.size()]);
- }
-
- /**
- * Returns the list of all contributed editor page unbindings.
- *
- * @return The list of contributed editor page unbindings, or an empty array.
- */
- public EditorPageUnBinding[] getEditorPageUnBindings() {
- List<EditorPageUnBinding> contributions = new ArrayList<EditorPageUnBinding>();
- Collection<ExecutableExtensionProxy<EditorPageUnBinding>> editorPageUnBindings = getExtensions().values();
- for (ExecutableExtensionProxy<EditorPageUnBinding> editorPageUnBinding : editorPageUnBindings) {
- EditorPageUnBinding instance = editorPageUnBinding.getInstance();
- if (instance != null && !contributions.contains(instance)) {
- contributions.add(instance);
- }
- }
-
- return contributions.toArray(new EditorPageUnBinding[contributions.size()]);
- }
-}
+/*******************************************************************************
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.views.extensions;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.core.expressions.EvaluationContext;
+import org.eclipse.core.expressions.EvaluationResult;
+import org.eclipse.core.expressions.Expression;
+import org.eclipse.core.expressions.IEvaluationContext;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager;
+import org.eclipse.tcf.te.runtime.extensions.ExecutableExtensionProxy;
+import org.eclipse.tcf.te.ui.views.activator.UIPlugin;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.ISources;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.handlers.IHandlerService;
+
+
+/**
+ * Editor page unbinding extension point manager implementation.
+ */
+public class EditorPageUnBindingExtensionPointManager extends AbstractExtensionPointManager<EditorPageUnBinding> {
+
+ /*
+ * Thread save singleton instance creation.
+ */
+ private static class LazyInstance {
+ public static EditorPageUnBindingExtensionPointManager instance = new EditorPageUnBindingExtensionPointManager();
+ }
+
+ /**
+ * Constructor.
+ */
+ EditorPageUnBindingExtensionPointManager() {
+ super();
+ }
+
+ /**
+ * Returns the singleton instance of the extension point manager.
+ */
+ public static EditorPageUnBindingExtensionPointManager getInstance() {
+ return LazyInstance.instance;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#getExtensionPointId()
+ */
+ @Override
+ protected String getExtensionPointId() {
+ return "org.eclipse.tcf.te.ui.views.editorPageBindings"; //$NON-NLS-1$
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#getConfigurationElementName()
+ */
+ @Override
+ protected String getConfigurationElementName() {
+ return "editorPageUnBinding"; //$NON-NLS-1$
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#doCreateExtensionProxy(org.eclipse.core.runtime.IConfigurationElement)
+ */
+ @Override
+ protected ExecutableExtensionProxy<EditorPageUnBinding> doCreateExtensionProxy(IConfigurationElement element) throws CoreException {
+ return new ExecutableExtensionProxy<EditorPageUnBinding>(element) {
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.extensions.ExecutableExtensionProxy#newInstance()
+ */
+ @Override
+ public EditorPageUnBinding newInstance() {
+ EditorPageUnBinding instance = new EditorPageUnBinding();
+ try {
+ instance.setInitializationData(getConfigurationElement(), null, null);
+ } catch (CoreException e) {
+ IStatus status = new Status(IStatus.ERROR, UIPlugin.getUniqueIdentifier(),
+ e.getLocalizedMessage(), e);
+ UIPlugin.getDefault().getLog().log(status);
+ }
+ return instance;
+ }
+ };
+ }
+
+ /**
+ * Returns the applicable editor page unbindings for the given data source model node..
+ *
+ * @param input The active editor input or <code>null</code>.
+ * @return The list of applicable editor page unbindings or an empty array.
+ */
+ public EditorPageUnBinding[] getApplicableEditorPageUnBindings(IEditorInput input) {
+ List<EditorPageUnBinding> applicable = new ArrayList<EditorPageUnBinding>();
+
+ for (EditorPageUnBinding binding : getEditorPageUnBindings()) {
+ Expression enablement = binding.getEnablement();
+
+ // The page binding is applicable by default if no expression
+ // is specified.
+ boolean isApplicable = enablement == null;
+
+ if (enablement != null && input != null) {
+ // Extract the node from the editor input
+ Object node = input.getAdapter(Object.class);
+ if (node != null) {
+ // Set the default variable to the data source model node instance.
+ IEvaluationContext currentState = ((IHandlerService)PlatformUI.getWorkbench().getService(IHandlerService.class)).getCurrentState();
+ EvaluationContext context = new EvaluationContext(currentState, node);
+ // Set the "activeEditorInput" variable to the data source model node instance.
+ context.addVariable(ISources.ACTIVE_EDITOR_INPUT_NAME, node);
+ // Allow plugin activation
+ context.setAllowPluginActivation(true);
+ // Evaluate the expression
+ try {
+ isApplicable = enablement.evaluate(context).equals(EvaluationResult.TRUE);
+ } catch (CoreException e) {
+ IStatus status = new Status(IStatus.ERROR, UIPlugin.getUniqueIdentifier(), e.getLocalizedMessage(), e);
+ UIPlugin.getDefault().getLog().log(status);
+ }
+ } else {
+ // The enablement is false by definition if we cannot
+ // determine the data source model node.
+ isApplicable = false;
+ }
+ }
+
+ // Add the page if applicable
+ if (isApplicable) applicable.add(binding);
+ }
+
+ return applicable.toArray(new EditorPageUnBinding[applicable.size()]);
+ }
+
+ /**
+ * Returns the list of all contributed editor page unbindings.
+ *
+ * @return The list of contributed editor page unbindings, or an empty array.
+ */
+ public EditorPageUnBinding[] getEditorPageUnBindings() {
+ List<EditorPageUnBinding> contributions = new ArrayList<EditorPageUnBinding>();
+ Collection<ExecutableExtensionProxy<EditorPageUnBinding>> editorPageUnBindings = getExtensions().values();
+ for (ExecutableExtensionProxy<EditorPageUnBinding> editorPageUnBinding : editorPageUnBindings) {
+ EditorPageUnBinding instance = editorPageUnBinding.getInstance();
+ if (instance != null && !contributions.contains(instance)) {
+ contributions.add(instance);
+ }
+ }
+
+ return contributions.toArray(new EditorPageUnBinding[contributions.size()]);
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/extensions/LabelProviderDelegateExtensionPointManager.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/extensions/LabelProviderDelegateExtensionPointManager.java
index 36ae87b35..a8f0298ce 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/extensions/LabelProviderDelegateExtensionPointManager.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/extensions/LabelProviderDelegateExtensionPointManager.java
@@ -1,11 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2012, 2013 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
+ * Wind River Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.tcf.te.ui.views.extensions;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/CategoryAddToContributionItem.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/CategoryAddToContributionItem.java
index be21e2ee9..59787fd02 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/CategoryAddToContributionItem.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/CategoryAddToContributionItem.java
@@ -1,129 +1,129 @@
-/*******************************************************************************
- * Copyright (c) 2012 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tcf.te.ui.views.handler;
-
-import java.util.Iterator;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.tcf.te.ui.views.Managers;
-import org.eclipse.tcf.te.ui.views.interfaces.ICategory;
-import org.eclipse.tcf.te.ui.views.interfaces.categories.ICategorizable;
-import org.eclipse.tcf.te.ui.views.internal.categories.AbstractCategoryContributionItem;
-import org.eclipse.tcf.te.ui.views.nls.Messages;
-
-
-/**
- * Dynamic menu contribution: Add To &lt;Category&gt;
- */
-public class CategoryAddToContributionItem extends AbstractCategoryContributionItem {
-
- /**
- * Category action implementation.
- */
- protected static class AddToCategoryAction extends AbstractCategoryAction {
-
- /**
- * Constructor.
- *
- * @param item The parent contribution item. Must not be <code>null</code>:
- * @param selection The selection. Must not be <code>null</code>.
- * @param category The category. Must not be <code>null</code>.
- * @param single <code>True</code> if the action is the only item added, <code>false</code> otherwise.
- */
- public AddToCategoryAction(AbstractCategoryContributionItem item, ISelection selection, ICategory category, boolean single) {
- super(item, selection, category, single);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.ui.views.internal.categories.AbstractCategoryContributionItem.AbstractCategoryAction#makeSingleText(java.lang.String)
- */
- @Override
- protected String makeSingleText(String text) {
- Assert.isNotNull(text);
- return NLS.bind(Messages.AddToCategoryAction_single_text, text);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.ui.views.internal.categories.AbstractCategoryContributionItem.AbstractCategoryAction#execute(java.lang.Object, org.eclipse.tcf.te.ui.views.interfaces.ICategory)
- */
- @Override
- protected boolean execute(Object element, ICategory category) {
- Assert.isNotNull(element);
- Assert.isNotNull(category);
-
- boolean refresh = false;
-
- ICategorizable categorizable = getCategorizable(element);
- Assert.isNotNull(categorizable);
-
- if (!Managers.getCategoryManager().belongsTo(category.getId(), categorizable.getId())) {
- Managers.getCategoryManager().add(category.getId(), categorizable.getId());
- refresh = true;
- }
-
- return refresh;
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.ui.views.internal.categories.AbstractCategoryContributionItem#createAction(org.eclipse.tcf.te.ui.views.internal.categories.AbstractCategoryContributionItem, org.eclipse.jface.viewers.ISelection, org.eclipse.tcf.te.ui.views.interfaces.ICategory, boolean)
- */
- @Override
- protected IAction createAction(AbstractCategoryContributionItem item, ISelection selection, ICategory category, boolean single) {
- return new AddToCategoryAction(item, selection, category, single);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.ui.views.internal.categories.AbstractCategoryContributionItem#isValid(org.eclipse.tcf.te.ui.views.interfaces.ICategory, java.lang.Object, org.eclipse.tcf.te.ui.views.interfaces.ICategory)
- */
- @Override
- protected boolean isValid(ICategory parentCategory, Object element, ICategory category) {
- Assert.isNotNull(element);
- Assert.isNotNull(category);
-
- // Delegate to the categorizable element
- ICategorizable categorizable = getCategorizable(element);
- Assert.isNotNull(categorizable);
-
- return categorizable.isValid(ICategorizable.OPERATION.ADD, parentCategory, category);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.ui.views.internal.categories.AbstractCategoryContributionItem#isEnabled(org.eclipse.jface.viewers.ISelection, org.eclipse.tcf.te.ui.views.interfaces.ICategory)
- */
- @Override
- protected boolean isEnabled(ISelection selection, ICategory category) {
- Assert.isNotNull(selection);
- Assert.isNotNull(category);
-
- boolean enabled = false;
-
- if (selection instanceof IStructuredSelection && !selection.isEmpty()) {
- enabled = true;
- Iterator<?> iterator = ((IStructuredSelection)selection).iterator();
- while (iterator.hasNext()) {
- Object element = iterator.next();
-
- // Delegate to the categorizable element
- ICategorizable categorizable = getCategorizable(element);
- enabled &= categorizable != null && categorizable.isEnabled(ICategorizable.OPERATION.ADD, category);
- if (!enabled) {
- break;
- }
- }
- }
-
- return enabled;
- }
-}
+/*******************************************************************************
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.views.handler;
+
+import java.util.Iterator;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.tcf.te.ui.views.Managers;
+import org.eclipse.tcf.te.ui.views.interfaces.ICategory;
+import org.eclipse.tcf.te.ui.views.interfaces.categories.ICategorizable;
+import org.eclipse.tcf.te.ui.views.internal.categories.AbstractCategoryContributionItem;
+import org.eclipse.tcf.te.ui.views.nls.Messages;
+
+
+/**
+ * Dynamic menu contribution: Add To &lt;Category&gt;
+ */
+public class CategoryAddToContributionItem extends AbstractCategoryContributionItem {
+
+ /**
+ * Category action implementation.
+ */
+ protected static class AddToCategoryAction extends AbstractCategoryAction {
+
+ /**
+ * Constructor.
+ *
+ * @param item The parent contribution item. Must not be <code>null</code>:
+ * @param selection The selection. Must not be <code>null</code>.
+ * @param category The category. Must not be <code>null</code>.
+ * @param single <code>True</code> if the action is the only item added, <code>false</code> otherwise.
+ */
+ public AddToCategoryAction(AbstractCategoryContributionItem item, ISelection selection, ICategory category, boolean single) {
+ super(item, selection, category, single);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.views.internal.categories.AbstractCategoryContributionItem.AbstractCategoryAction#makeSingleText(java.lang.String)
+ */
+ @Override
+ protected String makeSingleText(String text) {
+ Assert.isNotNull(text);
+ return NLS.bind(Messages.AddToCategoryAction_single_text, text);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.views.internal.categories.AbstractCategoryContributionItem.AbstractCategoryAction#execute(java.lang.Object, org.eclipse.tcf.te.ui.views.interfaces.ICategory)
+ */
+ @Override
+ protected boolean execute(Object element, ICategory category) {
+ Assert.isNotNull(element);
+ Assert.isNotNull(category);
+
+ boolean refresh = false;
+
+ ICategorizable categorizable = getCategorizable(element);
+ Assert.isNotNull(categorizable);
+
+ if (!Managers.getCategoryManager().belongsTo(category.getId(), categorizable.getId())) {
+ Managers.getCategoryManager().add(category.getId(), categorizable.getId());
+ refresh = true;
+ }
+
+ return refresh;
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.views.internal.categories.AbstractCategoryContributionItem#createAction(org.eclipse.tcf.te.ui.views.internal.categories.AbstractCategoryContributionItem, org.eclipse.jface.viewers.ISelection, org.eclipse.tcf.te.ui.views.interfaces.ICategory, boolean)
+ */
+ @Override
+ protected IAction createAction(AbstractCategoryContributionItem item, ISelection selection, ICategory category, boolean single) {
+ return new AddToCategoryAction(item, selection, category, single);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.views.internal.categories.AbstractCategoryContributionItem#isValid(org.eclipse.tcf.te.ui.views.interfaces.ICategory, java.lang.Object, org.eclipse.tcf.te.ui.views.interfaces.ICategory)
+ */
+ @Override
+ protected boolean isValid(ICategory parentCategory, Object element, ICategory category) {
+ Assert.isNotNull(element);
+ Assert.isNotNull(category);
+
+ // Delegate to the categorizable element
+ ICategorizable categorizable = getCategorizable(element);
+ Assert.isNotNull(categorizable);
+
+ return categorizable.isValid(ICategorizable.OPERATION.ADD, parentCategory, category);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.views.internal.categories.AbstractCategoryContributionItem#isEnabled(org.eclipse.jface.viewers.ISelection, org.eclipse.tcf.te.ui.views.interfaces.ICategory)
+ */
+ @Override
+ protected boolean isEnabled(ISelection selection, ICategory category) {
+ Assert.isNotNull(selection);
+ Assert.isNotNull(category);
+
+ boolean enabled = false;
+
+ if (selection instanceof IStructuredSelection && !selection.isEmpty()) {
+ enabled = true;
+ Iterator<?> iterator = ((IStructuredSelection)selection).iterator();
+ while (iterator.hasNext()) {
+ Object element = iterator.next();
+
+ // Delegate to the categorizable element
+ ICategorizable categorizable = getCategorizable(element);
+ enabled &= categorizable != null && categorizable.isEnabled(ICategorizable.OPERATION.ADD, category);
+ if (!enabled) {
+ break;
+ }
+ }
+ }
+
+ return enabled;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/ConfigContentHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/ConfigContentHandler.java
index 4acec9466..4b811abc9 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/ConfigContentHandler.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/ConfigContentHandler.java
@@ -1,250 +1,250 @@
-/*******************************************************************************
- * Copyright (c) 2012 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tcf.te.ui.views.handler;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtension;
-import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.IRegistryEventListener;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.preferences.InstanceScope;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.tcf.te.ui.dialogs.FilteredCheckedListDialog;
-import org.eclipse.tcf.te.ui.views.nls.Messages;
-import org.eclipse.ui.handlers.HandlerUtil;
-import org.eclipse.ui.navigator.CommonNavigator;
-import org.eclipse.ui.navigator.CommonViewer;
-import org.eclipse.ui.navigator.INavigatorContentDescriptor;
-import org.eclipse.ui.navigator.INavigatorContentService;
-import org.eclipse.ui.preferences.ScopedPreferenceStore;
-
-/**
- * The handler to configure content extensions in Target Explorer.
- */
-public class ConfigContentHandler extends AbstractHandler implements IRegistryEventListener{
- // The extension point id to access navigator content extensions.
- private static final String EXTENSION_POINT_ID = "org.eclipse.ui.navigator.navigatorContent"; //$NON-NLS-1$
- // The map to store the visibility data of content extensions.
- private Map<String, Boolean> visibleContentMap;
- // The preference store cached for each plug-ins that declares content extensions.
- private Map<String, IPreferenceStore> prefMap;
-
- /**
- * Constructor
- */
- public ConfigContentHandler() {
- initVisibleMap();
- Platform.getExtensionRegistry().addListener(this, EXTENSION_POINT_ID);
- }
-
- /**
- * Initialize the visibility map of content extensions.
- */
- private void initVisibleMap() {
- visibleContentMap = Collections.synchronizedMap(new HashMap<String, Boolean>());
- prefMap = Collections.synchronizedMap(new HashMap<String, IPreferenceStore>());
- IExtensionPoint exPoint = Platform.getExtensionRegistry().getExtensionPoint(EXTENSION_POINT_ID);
- IExtension[] extensions = exPoint.getExtensions();
- if(extensions != null) {
- addExtensions(extensions);
- }
- }
-
- /**
- * Add the extensions that define "navigatorContent" elements and retrieve
- * the visibility data from its contributed plug-in.
- *
- * @param extensions The extensions that define "navigatorContent" elements.
- */
- private void addExtensions(IExtension[] extensions) {
- for(IExtension extension : extensions) {
- IConfigurationElement[] elements = extension.getConfigurationElements();
- for(IConfigurationElement element : elements) {
- if("navigatorContent".equals(element.getName())) { //$NON-NLS-1$
- String extensionId = element.getAttribute("id"); //$NON-NLS-1$
- String pluginId = element.getContributor().getName();
- IPreferenceStore prefStore = prefMap.get(pluginId);
- if(prefStore == null) {
- prefStore = new ScopedPreferenceStore(InstanceScope.INSTANCE,pluginId);
- prefMap.put(pluginId, prefStore);
- }
- String prefHide = extensionId + ".hide"; //$NON-NLS-1$
- visibleContentMap.put(extensionId, Boolean.valueOf(prefStore.getBoolean(prefHide)));
- }
- }
- }
- }
-
- /**
- * Remove the visibility data when the extensions that define "navigatorContent" elements
- * are removed from the extension registry.
- *
- * @param extensions The extensions that define "navigatorContent" elements.
- */
- private void removeExtensions(IExtension[] extensions) {
- for(IExtension extension : extensions) {
- IConfigurationElement[] elements = extension.getConfigurationElements();
- for(IConfigurationElement element : elements) {
- if("navigatorContent".equals(element.getName())) { //$NON-NLS-1$
- String extensionId = element.getAttribute("id"); //$NON-NLS-1$
- visibleContentMap.remove(extensionId);
- }
- }
- }
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.runtime.IRegistryEventListener#added(org.eclipse.core.runtime.IExtension[])
- */
- @Override
- public void added(IExtension[] extensions) {
- addExtensions(extensions);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.runtime.IRegistryEventListener#removed(org.eclipse.core.runtime.IExtension[])
- */
- @Override
- public void removed(IExtension[] extensions) {
- removeExtensions(extensions);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.runtime.IRegistryEventListener#added(org.eclipse.core.runtime.IExtensionPoint[])
- */
- @Override
- public void added(IExtensionPoint[] extensionPoints) {
- // Ignore on purpose
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.runtime.IRegistryEventListener#removed(org.eclipse.core.runtime.IExtensionPoint[])
- */
- @Override
- public void removed(IExtensionPoint[] extensionPoints) {
- // Ignore on purpose
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
- */
- @Override
- public Object execute(ExecutionEvent event) throws ExecutionException {
- Shell shell = HandlerUtil.getActiveShellChecked(event);
- CommonNavigator navigator = (CommonNavigator) HandlerUtil.getActivePartChecked(event);
- FilteredCheckedListDialog contentDialog = new FilteredCheckedListDialog(shell);
- contentDialog.setTitle(Messages.ConfigContentHandler_DialogTitle);
- contentDialog.setFilterText(Messages.ConfigContentHandler_InitialFilter);
- contentDialog.setMessage(Messages.ConfigContentHandler_PromptMessage);
- contentDialog.setStatusLineAboveButtons(true);
- contentDialog.setLabelProvider(ContentDescriptorLabelProvider.instance);
- INavigatorContentService contentService = navigator.getNavigatorContentService();
- if (contentService != null) {
- INavigatorContentDescriptor[] visibleExtensions = getExtensionsVisibleInUI(contentService);
- if (visibleExtensions != null && visibleExtensions.length > 0) {
- contentDialog.setElements(visibleExtensions);
- List<INavigatorContentDescriptor> activeExtensions = new ArrayList<INavigatorContentDescriptor>();
- for (INavigatorContentDescriptor extension : visibleExtensions) {
- if (contentService.isActive(extension.getId())) {
- activeExtensions.add(extension);
- }
- }
- contentDialog.setInitialElementSelections(activeExtensions);
- if (contentDialog.open() == Window.OK) {
- Object[] result = contentDialog.getResult();
- if (result != null) {
- INavigatorContentDescriptor[] hiddenActives = getHiddenActiveExtensions(contentService);
- INavigatorContentDescriptor[] total = new INavigatorContentDescriptor[result.length + hiddenActives.length];
- System.arraycopy(result, 0, total, 0, result.length);
- System.arraycopy(hiddenActives, 0, total, result.length, hiddenActives.length);
- activateExtensions(navigator.getCommonViewer(), total);
- }
- }
- }
- }
- return null;
- }
-
- /**
- * Get hidden extensions that are active from the content service.
- *
- * @param contentService The content service.
- * @return The hidden yet active content descriptors.
- */
- private INavigatorContentDescriptor[] getHiddenActiveExtensions(INavigatorContentService contentService) {
- INavigatorContentDescriptor[] visibleExtensions = contentService.getVisibleExtensions();
- List<INavigatorContentDescriptor> hiddenActives = new ArrayList<INavigatorContentDescriptor>();
- if(visibleExtensions != null) {
- for(INavigatorContentDescriptor visibleExtension : visibleExtensions) {
- String extensionId = visibleExtension.getId();
- Boolean value = visibleContentMap.get(extensionId);
- boolean hide = value != null && value.booleanValue();
- if (hide && contentService.isActive(extensionId)) hiddenActives.add(visibleExtension);
- }
- }
- return hiddenActives.toArray(new INavigatorContentDescriptor[hiddenActives.size()]);
- }
-
- /**
- * Get the content extensions that are configured to be visible in the "Available Extensions" dialog.
- * The visibility data are retrieved from the preference store of the plug-ins that contribute content
- * extensions.
- *
- * @param contentService The content service.
- * @return The content extensions visible in the configuration UI.
- */
- private INavigatorContentDescriptor[] getExtensionsVisibleInUI(INavigatorContentService contentService) {
- INavigatorContentDescriptor[] visibleExtensions = contentService.getVisibleExtensions();
- List<INavigatorContentDescriptor> visibleInUIs = new ArrayList<INavigatorContentDescriptor>();
- if(visibleExtensions != null) {
- for(INavigatorContentDescriptor visibleExtension : visibleExtensions) {
- String extensionId = visibleExtension.getId();
- Boolean value = visibleContentMap.get(extensionId);
- boolean hide = value != null && value.booleanValue();
- if (!hide) visibleInUIs.add(visibleExtension);
- }
- }
- return visibleInUIs.toArray(new INavigatorContentDescriptor[visibleInUIs.size()]);
- }
-
- /**
- * Activate the specified navigator content descriptor.
- *
- * @param commonViewer The common viewer of the navigator.
- * @param contentDescriptors The content descriptor to be activated.
- */
- private void activateExtensions(CommonViewer commonViewer, INavigatorContentDescriptor[] contentDescriptors) {
- Set<String> toActivate = new HashSet<String>();
- for (int i=0;i<contentDescriptors.length;i++) {
- INavigatorContentDescriptor contentDescriptor = contentDescriptors[i];
- toActivate.add(contentDescriptor.getId());
- }
- UpdateActiveExtensionsOperation updateExtensions = new UpdateActiveExtensionsOperation (commonViewer, toActivate.toArray(new String[toActivate.size()]));
- updateExtensions.execute(null, null);
- }
-}
+/*******************************************************************************
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.views.handler;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtension;
+import org.eclipse.core.runtime.IExtensionPoint;
+import org.eclipse.core.runtime.IRegistryEventListener;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.preferences.InstanceScope;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.window.Window;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.tcf.te.ui.dialogs.FilteredCheckedListDialog;
+import org.eclipse.tcf.te.ui.views.nls.Messages;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.eclipse.ui.navigator.CommonNavigator;
+import org.eclipse.ui.navigator.CommonViewer;
+import org.eclipse.ui.navigator.INavigatorContentDescriptor;
+import org.eclipse.ui.navigator.INavigatorContentService;
+import org.eclipse.ui.preferences.ScopedPreferenceStore;
+
+/**
+ * The handler to configure content extensions in Target Explorer.
+ */
+public class ConfigContentHandler extends AbstractHandler implements IRegistryEventListener{
+ // The extension point id to access navigator content extensions.
+ private static final String EXTENSION_POINT_ID = "org.eclipse.ui.navigator.navigatorContent"; //$NON-NLS-1$
+ // The map to store the visibility data of content extensions.
+ private Map<String, Boolean> visibleContentMap;
+ // The preference store cached for each plug-ins that declares content extensions.
+ private Map<String, IPreferenceStore> prefMap;
+
+ /**
+ * Constructor
+ */
+ public ConfigContentHandler() {
+ initVisibleMap();
+ Platform.getExtensionRegistry().addListener(this, EXTENSION_POINT_ID);
+ }
+
+ /**
+ * Initialize the visibility map of content extensions.
+ */
+ private void initVisibleMap() {
+ visibleContentMap = Collections.synchronizedMap(new HashMap<String, Boolean>());
+ prefMap = Collections.synchronizedMap(new HashMap<String, IPreferenceStore>());
+ IExtensionPoint exPoint = Platform.getExtensionRegistry().getExtensionPoint(EXTENSION_POINT_ID);
+ IExtension[] extensions = exPoint.getExtensions();
+ if(extensions != null) {
+ addExtensions(extensions);
+ }
+ }
+
+ /**
+ * Add the extensions that define "navigatorContent" elements and retrieve
+ * the visibility data from its contributed plug-in.
+ *
+ * @param extensions The extensions that define "navigatorContent" elements.
+ */
+ private void addExtensions(IExtension[] extensions) {
+ for(IExtension extension : extensions) {
+ IConfigurationElement[] elements = extension.getConfigurationElements();
+ for(IConfigurationElement element : elements) {
+ if("navigatorContent".equals(element.getName())) { //$NON-NLS-1$
+ String extensionId = element.getAttribute("id"); //$NON-NLS-1$
+ String pluginId = element.getContributor().getName();
+ IPreferenceStore prefStore = prefMap.get(pluginId);
+ if(prefStore == null) {
+ prefStore = new ScopedPreferenceStore(InstanceScope.INSTANCE,pluginId);
+ prefMap.put(pluginId, prefStore);
+ }
+ String prefHide = extensionId + ".hide"; //$NON-NLS-1$
+ visibleContentMap.put(extensionId, Boolean.valueOf(prefStore.getBoolean(prefHide)));
+ }
+ }
+ }
+ }
+
+ /**
+ * Remove the visibility data when the extensions that define "navigatorContent" elements
+ * are removed from the extension registry.
+ *
+ * @param extensions The extensions that define "navigatorContent" elements.
+ */
+ private void removeExtensions(IExtension[] extensions) {
+ for(IExtension extension : extensions) {
+ IConfigurationElement[] elements = extension.getConfigurationElements();
+ for(IConfigurationElement element : elements) {
+ if("navigatorContent".equals(element.getName())) { //$NON-NLS-1$
+ String extensionId = element.getAttribute("id"); //$NON-NLS-1$
+ visibleContentMap.remove(extensionId);
+ }
+ }
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.runtime.IRegistryEventListener#added(org.eclipse.core.runtime.IExtension[])
+ */
+ @Override
+ public void added(IExtension[] extensions) {
+ addExtensions(extensions);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.runtime.IRegistryEventListener#removed(org.eclipse.core.runtime.IExtension[])
+ */
+ @Override
+ public void removed(IExtension[] extensions) {
+ removeExtensions(extensions);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.runtime.IRegistryEventListener#added(org.eclipse.core.runtime.IExtensionPoint[])
+ */
+ @Override
+ public void added(IExtensionPoint[] extensionPoints) {
+ // Ignore on purpose
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.runtime.IRegistryEventListener#removed(org.eclipse.core.runtime.IExtensionPoint[])
+ */
+ @Override
+ public void removed(IExtensionPoint[] extensionPoints) {
+ // Ignore on purpose
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+ */
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ Shell shell = HandlerUtil.getActiveShellChecked(event);
+ CommonNavigator navigator = (CommonNavigator) HandlerUtil.getActivePartChecked(event);
+ FilteredCheckedListDialog contentDialog = new FilteredCheckedListDialog(shell);
+ contentDialog.setTitle(Messages.ConfigContentHandler_DialogTitle);
+ contentDialog.setFilterText(Messages.ConfigContentHandler_InitialFilter);
+ contentDialog.setMessage(Messages.ConfigContentHandler_PromptMessage);
+ contentDialog.setStatusLineAboveButtons(true);
+ contentDialog.setLabelProvider(ContentDescriptorLabelProvider.instance);
+ INavigatorContentService contentService = navigator.getNavigatorContentService();
+ if (contentService != null) {
+ INavigatorContentDescriptor[] visibleExtensions = getExtensionsVisibleInUI(contentService);
+ if (visibleExtensions != null && visibleExtensions.length > 0) {
+ contentDialog.setElements(visibleExtensions);
+ List<INavigatorContentDescriptor> activeExtensions = new ArrayList<INavigatorContentDescriptor>();
+ for (INavigatorContentDescriptor extension : visibleExtensions) {
+ if (contentService.isActive(extension.getId())) {
+ activeExtensions.add(extension);
+ }
+ }
+ contentDialog.setInitialElementSelections(activeExtensions);
+ if (contentDialog.open() == Window.OK) {
+ Object[] result = contentDialog.getResult();
+ if (result != null) {
+ INavigatorContentDescriptor[] hiddenActives = getHiddenActiveExtensions(contentService);
+ INavigatorContentDescriptor[] total = new INavigatorContentDescriptor[result.length + hiddenActives.length];
+ System.arraycopy(result, 0, total, 0, result.length);
+ System.arraycopy(hiddenActives, 0, total, result.length, hiddenActives.length);
+ activateExtensions(navigator.getCommonViewer(), total);
+ }
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Get hidden extensions that are active from the content service.
+ *
+ * @param contentService The content service.
+ * @return The hidden yet active content descriptors.
+ */
+ private INavigatorContentDescriptor[] getHiddenActiveExtensions(INavigatorContentService contentService) {
+ INavigatorContentDescriptor[] visibleExtensions = contentService.getVisibleExtensions();
+ List<INavigatorContentDescriptor> hiddenActives = new ArrayList<INavigatorContentDescriptor>();
+ if(visibleExtensions != null) {
+ for(INavigatorContentDescriptor visibleExtension : visibleExtensions) {
+ String extensionId = visibleExtension.getId();
+ Boolean value = visibleContentMap.get(extensionId);
+ boolean hide = value != null && value.booleanValue();
+ if (hide && contentService.isActive(extensionId)) hiddenActives.add(visibleExtension);
+ }
+ }
+ return hiddenActives.toArray(new INavigatorContentDescriptor[hiddenActives.size()]);
+ }
+
+ /**
+ * Get the content extensions that are configured to be visible in the "Available Extensions" dialog.
+ * The visibility data are retrieved from the preference store of the plug-ins that contribute content
+ * extensions.
+ *
+ * @param contentService The content service.
+ * @return The content extensions visible in the configuration UI.
+ */
+ private INavigatorContentDescriptor[] getExtensionsVisibleInUI(INavigatorContentService contentService) {
+ INavigatorContentDescriptor[] visibleExtensions = contentService.getVisibleExtensions();
+ List<INavigatorContentDescriptor> visibleInUIs = new ArrayList<INavigatorContentDescriptor>();
+ if(visibleExtensions != null) {
+ for(INavigatorContentDescriptor visibleExtension : visibleExtensions) {
+ String extensionId = visibleExtension.getId();
+ Boolean value = visibleContentMap.get(extensionId);
+ boolean hide = value != null && value.booleanValue();
+ if (!hide) visibleInUIs.add(visibleExtension);
+ }
+ }
+ return visibleInUIs.toArray(new INavigatorContentDescriptor[visibleInUIs.size()]);
+ }
+
+ /**
+ * Activate the specified navigator content descriptor.
+ *
+ * @param commonViewer The common viewer of the navigator.
+ * @param contentDescriptors The content descriptor to be activated.
+ */
+ private void activateExtensions(CommonViewer commonViewer, INavigatorContentDescriptor[] contentDescriptors) {
+ Set<String> toActivate = new HashSet<String>();
+ for (int i=0;i<contentDescriptors.length;i++) {
+ INavigatorContentDescriptor contentDescriptor = contentDescriptors[i];
+ toActivate.add(contentDescriptor.getId());
+ }
+ UpdateActiveExtensionsOperation updateExtensions = new UpdateActiveExtensionsOperation (commonViewer, toActivate.toArray(new String[toActivate.size()]));
+ updateExtensions.execute(null, null);
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/ConfigFiltersHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/ConfigFiltersHandler.java
index bd5606b69..fdead1b4e 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/ConfigFiltersHandler.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/ConfigFiltersHandler.java
@@ -1,120 +1,120 @@
-/*******************************************************************************
- * Copyright (c) 2012 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tcf.te.ui.views.handler;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.tcf.te.ui.dialogs.FilteredCheckedListDialog;
-import org.eclipse.tcf.te.ui.views.nls.Messages;
-import org.eclipse.ui.handlers.HandlerUtil;
-import org.eclipse.ui.internal.navigator.NavigatorFilterService;
-import org.eclipse.ui.navigator.CommonNavigator;
-import org.eclipse.ui.navigator.CommonViewer;
-import org.eclipse.ui.navigator.ICommonFilterDescriptor;
-import org.eclipse.ui.navigator.IDescriptionProvider;
-import org.eclipse.ui.navigator.INavigatorContentService;
-
-/**
- * The handler to configure filters in Target Explorer.
- */
-@SuppressWarnings("restriction")
-public class ConfigFiltersHandler extends AbstractHandler {
-
- /**
- * The label provider for common filter descriptors to provide labels, images, and descriptions for
- * a common filter descriptor.
- */
- class CommonFilterDescriptorLabelProvider extends LabelProvider implements IDescriptionProvider {
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.navigator.IDescriptionProvider#getDescription(java.lang.Object)
- */
- @Override
- public String getDescription(Object element) {
- if (element instanceof ICommonFilterDescriptor) {
- return ((ICommonFilterDescriptor) element).getDescription();
- }
- return null;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.LabelProvider#getText(java.lang.Object)
- */
- @Override
- public String getText(Object element) {
- if (element instanceof ICommonFilterDescriptor) {
- return ((ICommonFilterDescriptor) element).getName();
- }
- return null;
- }
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
- */
- @Override
- public Object execute(ExecutionEvent event) throws ExecutionException {
- Shell shell = HandlerUtil.getActiveShellChecked(event);
- CommonNavigator navigator = (CommonNavigator) HandlerUtil.getActivePartChecked(event);
- FilteredCheckedListDialog filterDialog = new FilteredCheckedListDialog(shell);
- filterDialog.setTitle(Messages.ConfigFiltersHandler_DialogTitle);
- filterDialog.setFilterText(Messages.ConfigFiltersHandler_InitialFilter);
- filterDialog.setMessage(Messages.ConfigFiltersHandler_PromptMessage);
- filterDialog.setStatusLineAboveButtons(true);
- filterDialog.setLabelProvider(new CommonFilterDescriptorLabelProvider());
- INavigatorContentService contentService = navigator.getNavigatorContentService();
- if (contentService != null) {
- NavigatorFilterService filterService = (NavigatorFilterService) contentService.getFilterService();
- ICommonFilterDescriptor[] visibleFilters = filterService.getVisibleFilterDescriptorsForUI();
- if (visibleFilters != null && visibleFilters.length > 0) {
- filterDialog.setElements(visibleFilters);
- List<ICommonFilterDescriptor> activeFilters = new ArrayList<ICommonFilterDescriptor>();
- for (ICommonFilterDescriptor filter : visibleFilters) {
- if (filterService.isActive(filter.getId())) {
- activeFilters.add(filter);
- }
- }
- filterDialog.setInitialElementSelections(activeFilters);
- if (filterDialog.open() == Window.OK) {
- Object[] result = filterDialog.getResult();
- if (result != null) {
- activateFilters(navigator.getCommonViewer(), result);
- }
- }
- }
- }
- return null;
- }
-
- /**
- * Activate the specified common filters specified in the element array.
- *
- * @param commonViewer The common viewer to be updated with the viewer filters.
- * @param elements The common filters to be activated.
- */
- private void activateFilters(CommonViewer commonViewer, Object[] elements) {
- String[] filterIdsToActivate = new String[elements.length];
- for (int i=0;i<elements.length;i++) {
- ICommonFilterDescriptor descriptor = (ICommonFilterDescriptor) elements[i];
- filterIdsToActivate[i] = descriptor.getId();
- }
- UpdateActiveFiltersOperation updateFilters = new UpdateActiveFiltersOperation(commonViewer, filterIdsToActivate);
- updateFilters.execute(null, null);
- }
-}
+/*******************************************************************************
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.views.handler;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.window.Window;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.tcf.te.ui.dialogs.FilteredCheckedListDialog;
+import org.eclipse.tcf.te.ui.views.nls.Messages;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.eclipse.ui.internal.navigator.NavigatorFilterService;
+import org.eclipse.ui.navigator.CommonNavigator;
+import org.eclipse.ui.navigator.CommonViewer;
+import org.eclipse.ui.navigator.ICommonFilterDescriptor;
+import org.eclipse.ui.navigator.IDescriptionProvider;
+import org.eclipse.ui.navigator.INavigatorContentService;
+
+/**
+ * The handler to configure filters in Target Explorer.
+ */
+@SuppressWarnings("restriction")
+public class ConfigFiltersHandler extends AbstractHandler {
+
+ /**
+ * The label provider for common filter descriptors to provide labels, images, and descriptions for
+ * a common filter descriptor.
+ */
+ class CommonFilterDescriptorLabelProvider extends LabelProvider implements IDescriptionProvider {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.navigator.IDescriptionProvider#getDescription(java.lang.Object)
+ */
+ @Override
+ public String getDescription(Object element) {
+ if (element instanceof ICommonFilterDescriptor) {
+ return ((ICommonFilterDescriptor) element).getDescription();
+ }
+ return null;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.LabelProvider#getText(java.lang.Object)
+ */
+ @Override
+ public String getText(Object element) {
+ if (element instanceof ICommonFilterDescriptor) {
+ return ((ICommonFilterDescriptor) element).getName();
+ }
+ return null;
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+ */
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ Shell shell = HandlerUtil.getActiveShellChecked(event);
+ CommonNavigator navigator = (CommonNavigator) HandlerUtil.getActivePartChecked(event);
+ FilteredCheckedListDialog filterDialog = new FilteredCheckedListDialog(shell);
+ filterDialog.setTitle(Messages.ConfigFiltersHandler_DialogTitle);
+ filterDialog.setFilterText(Messages.ConfigFiltersHandler_InitialFilter);
+ filterDialog.setMessage(Messages.ConfigFiltersHandler_PromptMessage);
+ filterDialog.setStatusLineAboveButtons(true);
+ filterDialog.setLabelProvider(new CommonFilterDescriptorLabelProvider());
+ INavigatorContentService contentService = navigator.getNavigatorContentService();
+ if (contentService != null) {
+ NavigatorFilterService filterService = (NavigatorFilterService) contentService.getFilterService();
+ ICommonFilterDescriptor[] visibleFilters = filterService.getVisibleFilterDescriptorsForUI();
+ if (visibleFilters != null && visibleFilters.length > 0) {
+ filterDialog.setElements(visibleFilters);
+ List<ICommonFilterDescriptor> activeFilters = new ArrayList<ICommonFilterDescriptor>();
+ for (ICommonFilterDescriptor filter : visibleFilters) {
+ if (filterService.isActive(filter.getId())) {
+ activeFilters.add(filter);
+ }
+ }
+ filterDialog.setInitialElementSelections(activeFilters);
+ if (filterDialog.open() == Window.OK) {
+ Object[] result = filterDialog.getResult();
+ if (result != null) {
+ activateFilters(navigator.getCommonViewer(), result);
+ }
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Activate the specified common filters specified in the element array.
+ *
+ * @param commonViewer The common viewer to be updated with the viewer filters.
+ * @param elements The common filters to be activated.
+ */
+ private void activateFilters(CommonViewer commonViewer, Object[] elements) {
+ String[] filterIdsToActivate = new String[elements.length];
+ for (int i=0;i<elements.length;i++) {
+ ICommonFilterDescriptor descriptor = (ICommonFilterDescriptor) elements[i];
+ filterIdsToActivate[i] = descriptor.getId();
+ }
+ UpdateActiveFiltersOperation updateFilters = new UpdateActiveFiltersOperation(commonViewer, filterIdsToActivate);
+ updateFilters.execute(null, null);
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/ContentDescriptorLabelProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/ContentDescriptorLabelProvider.java
index da1761936..1afafcf2d 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/ContentDescriptorLabelProvider.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/ContentDescriptorLabelProvider.java
@@ -1,67 +1,67 @@
-/*******************************************************************************
- * Copyright (c) 2012 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tcf.te.ui.views.handler;
-
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.tcf.te.ui.views.nls.Messages;
-import org.eclipse.ui.internal.navigator.extensions.NavigatorContentDescriptorManager;
-import org.eclipse.ui.navigator.IDescriptionProvider;
-import org.eclipse.ui.navigator.INavigatorContentDescriptor;
-
-/**
- * The label provider for navigator content descriptors providing labels, images and descriptive
- * texts for content descriptors.
- */
-@SuppressWarnings("restriction")
-class ContentDescriptorLabelProvider extends LabelProvider implements IDescriptionProvider {
- // The shared instance
- static ContentDescriptorLabelProvider instance = new ContentDescriptorLabelProvider();
- // Used to acquire images for specified navigator content descriptors.
- private static final NavigatorContentDescriptorManager CONTENT_DESCRIPTOR_REGISTRY = NavigatorContentDescriptorManager .getInstance();
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.navigator.IDescriptionProvider#getDescription(java.lang.Object)
- */
- @Override
- public String getDescription(Object element) {
- if (element instanceof INavigatorContentDescriptor) {
- INavigatorContentDescriptor ncd = (INavigatorContentDescriptor) element;
- String desc = NLS.bind(Messages.CommonFilterDescriptorLabelProvider_ContentExtensionDescription, new Object[] { ncd.getName() });
- return desc;
- }
- return null;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.LabelProvider#getImage(java.lang.Object)
- */
- @Override
- public Image getImage(Object element) {
- if (element instanceof INavigatorContentDescriptor) {
- return CONTENT_DESCRIPTOR_REGISTRY.getImage(((INavigatorContentDescriptor) element).getId());
- }
- return null;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.LabelProvider#getText(java.lang.Object)
- */
- @Override
- public String getText(Object element) {
- if (element instanceof INavigatorContentDescriptor) {
- return ((INavigatorContentDescriptor) element).getName();
- }
- return null;
- }
-}
+/*******************************************************************************
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.views.handler;
+
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.tcf.te.ui.views.nls.Messages;
+import org.eclipse.ui.internal.navigator.extensions.NavigatorContentDescriptorManager;
+import org.eclipse.ui.navigator.IDescriptionProvider;
+import org.eclipse.ui.navigator.INavigatorContentDescriptor;
+
+/**
+ * The label provider for navigator content descriptors providing labels, images and descriptive
+ * texts for content descriptors.
+ */
+@SuppressWarnings("restriction")
+class ContentDescriptorLabelProvider extends LabelProvider implements IDescriptionProvider {
+ // The shared instance
+ static ContentDescriptorLabelProvider instance = new ContentDescriptorLabelProvider();
+ // Used to acquire images for specified navigator content descriptors.
+ private static final NavigatorContentDescriptorManager CONTENT_DESCRIPTOR_REGISTRY = NavigatorContentDescriptorManager .getInstance();
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.navigator.IDescriptionProvider#getDescription(java.lang.Object)
+ */
+ @Override
+ public String getDescription(Object element) {
+ if (element instanceof INavigatorContentDescriptor) {
+ INavigatorContentDescriptor ncd = (INavigatorContentDescriptor) element;
+ String desc = NLS.bind(Messages.CommonFilterDescriptorLabelProvider_ContentExtensionDescription, new Object[] { ncd.getName() });
+ return desc;
+ }
+ return null;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.LabelProvider#getImage(java.lang.Object)
+ */
+ @Override
+ public Image getImage(Object element) {
+ if (element instanceof INavigatorContentDescriptor) {
+ return CONTENT_DESCRIPTOR_REGISTRY.getImage(((INavigatorContentDescriptor) element).getId());
+ }
+ return null;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.LabelProvider#getText(java.lang.Object)
+ */
+ @Override
+ public String getText(Object element) {
+ if (element instanceof INavigatorContentDescriptor) {
+ return ((INavigatorContentDescriptor) element).getName();
+ }
+ return null;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/ContentMRUContribution.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/ContentMRUContribution.java
index f44552d42..61aaf7549 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/ContentMRUContribution.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/ContentMRUContribution.java
@@ -1,99 +1,99 @@
-/*******************************************************************************
- * Copyright (c) 2012 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tcf.te.ui.views.handler;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.ActionContributionItem;
-import org.eclipse.jface.action.IContributionItem;
-import org.eclipse.tcf.te.ui.views.ViewsUtil;
-import org.eclipse.tcf.te.ui.views.interfaces.IUIConstants;
-import org.eclipse.tcf.te.ui.views.internal.preferences.IPreferenceKeys;
-import org.eclipse.ui.actions.CompoundContributionItem;
-import org.eclipse.ui.navigator.CommonNavigator;
-import org.eclipse.ui.navigator.CommonViewer;
-import org.eclipse.ui.navigator.INavigatorContentDescriptor;
-import org.eclipse.ui.navigator.INavigatorContentService;
-
-/**
- * The dynamic contribution of content extension MRU menu list.
- */
-public class ContentMRUContribution extends CompoundContributionItem {
-
- /**
- * A MRU item action to enable or disable specified content extension.
- */
- static class ContentMRUAction extends Action {
- // The content service of the navigator.
- private INavigatorContentService contentService;
- // The content extension descriptor to be configured by this action.
- private INavigatorContentDescriptor contentDescriptor;
- // The common viewer of the navigator.
- private CommonViewer commonViewer;
-
- /**
- * Constructor
- */
- public ContentMRUAction(int order, INavigatorContentDescriptor contentDescriptor, INavigatorContentService contentService, CommonViewer commonViewer) {
- super("" + order + " " + contentDescriptor.getName(), AS_CHECK_BOX); //$NON-NLS-1$//$NON-NLS-2$
- this.contentDescriptor = contentDescriptor;
- this.contentService = contentService;
- this.commonViewer = commonViewer;
- setChecked(contentService.isActive(contentDescriptor.getId()));
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.action.Action#run()
- */
- @Override
- public void run() {
- Set<String> activeIds = new HashSet<String>();
- String[] visibleIds = contentService.getVisibleExtensionIds();
- if (visibleIds != null) {
- for (String visibleId : visibleIds) {
- if (contentService.isActive(visibleId)) activeIds.add(visibleId);
- }
- }
- if (isChecked()) activeIds.add(contentDescriptor.getId());
- else activeIds.remove(contentDescriptor.getId());
- String[] idsToActivate = activeIds.toArray(new String[activeIds.size()]);
- UpdateActiveExtensionsOperation updateExtensions = new UpdateActiveExtensionsOperation(commonViewer, idsToActivate);
- updateExtensions.execute(null, null);
- }
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.actions.CompoundContributionItem#getContributionItems()
- */
- @Override
- protected IContributionItem[] getContributionItems() {
- CommonNavigator navigator = (CommonNavigator) ViewsUtil.getPart(IUIConstants.ID_EXPLORER);
- if (navigator == null) return new IContributionItem[0];
-
- INavigatorContentService contentService = navigator.getNavigatorContentService();
- List<IContributionItem> items = new ArrayList<IContributionItem>();
- List<String> extensionSet = new MRUList(IPreferenceKeys.PREF_CONTENT_MRU_LIST);
- CommonViewer commonViewer = navigator.getCommonViewer();
- for (int i = 0; i < extensionSet.size(); i++) {
- String extensionId = extensionSet.get(i);
- INavigatorContentDescriptor contentDescriptor = contentService.getContentDescriptorById(extensionId);
- if (contentDescriptor != null) {
- items.add(new ActionContributionItem(new ContentMRUAction((i + 1), contentDescriptor, contentService, commonViewer)));
- }
- }
- return items.toArray(new IContributionItem[items.size()]);
- }
-}
+/*******************************************************************************
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.views.handler;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.ActionContributionItem;
+import org.eclipse.jface.action.IContributionItem;
+import org.eclipse.tcf.te.ui.views.ViewsUtil;
+import org.eclipse.tcf.te.ui.views.interfaces.IUIConstants;
+import org.eclipse.tcf.te.ui.views.internal.preferences.IPreferenceKeys;
+import org.eclipse.ui.actions.CompoundContributionItem;
+import org.eclipse.ui.navigator.CommonNavigator;
+import org.eclipse.ui.navigator.CommonViewer;
+import org.eclipse.ui.navigator.INavigatorContentDescriptor;
+import org.eclipse.ui.navigator.INavigatorContentService;
+
+/**
+ * The dynamic contribution of content extension MRU menu list.
+ */
+public class ContentMRUContribution extends CompoundContributionItem {
+
+ /**
+ * A MRU item action to enable or disable specified content extension.
+ */
+ static class ContentMRUAction extends Action {
+ // The content service of the navigator.
+ private INavigatorContentService contentService;
+ // The content extension descriptor to be configured by this action.
+ private INavigatorContentDescriptor contentDescriptor;
+ // The common viewer of the navigator.
+ private CommonViewer commonViewer;
+
+ /**
+ * Constructor
+ */
+ public ContentMRUAction(int order, INavigatorContentDescriptor contentDescriptor, INavigatorContentService contentService, CommonViewer commonViewer) {
+ super("" + order + " " + contentDescriptor.getName(), AS_CHECK_BOX); //$NON-NLS-1$//$NON-NLS-2$
+ this.contentDescriptor = contentDescriptor;
+ this.contentService = contentService;
+ this.commonViewer = commonViewer;
+ setChecked(contentService.isActive(contentDescriptor.getId()));
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.action.Action#run()
+ */
+ @Override
+ public void run() {
+ Set<String> activeIds = new HashSet<String>();
+ String[] visibleIds = contentService.getVisibleExtensionIds();
+ if (visibleIds != null) {
+ for (String visibleId : visibleIds) {
+ if (contentService.isActive(visibleId)) activeIds.add(visibleId);
+ }
+ }
+ if (isChecked()) activeIds.add(contentDescriptor.getId());
+ else activeIds.remove(contentDescriptor.getId());
+ String[] idsToActivate = activeIds.toArray(new String[activeIds.size()]);
+ UpdateActiveExtensionsOperation updateExtensions = new UpdateActiveExtensionsOperation(commonViewer, idsToActivate);
+ updateExtensions.execute(null, null);
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.actions.CompoundContributionItem#getContributionItems()
+ */
+ @Override
+ protected IContributionItem[] getContributionItems() {
+ CommonNavigator navigator = (CommonNavigator) ViewsUtil.getPart(IUIConstants.ID_EXPLORER);
+ if (navigator == null) return new IContributionItem[0];
+
+ INavigatorContentService contentService = navigator.getNavigatorContentService();
+ List<IContributionItem> items = new ArrayList<IContributionItem>();
+ List<String> extensionSet = new MRUList(IPreferenceKeys.PREF_CONTENT_MRU_LIST);
+ CommonViewer commonViewer = navigator.getCommonViewer();
+ for (int i = 0; i < extensionSet.size(); i++) {
+ String extensionId = extensionSet.get(i);
+ INavigatorContentDescriptor contentDescriptor = contentService.getContentDescriptorById(extensionId);
+ if (contentDescriptor != null) {
+ items.add(new ActionContributionItem(new ContentMRUAction((i + 1), contentDescriptor, contentService, commonViewer)));
+ }
+ }
+ return items.toArray(new IContributionItem[items.size()]);
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/EditorQuickFilterHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/EditorQuickFilterHandler.java
index 4d8cbe0cb..b96adbbd0 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/EditorQuickFilterHandler.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/EditorQuickFilterHandler.java
@@ -1,11 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2011, 2014 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
+ * Wind River Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.tcf.te.ui.views.handler;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/EditorQuickFilterResetHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/EditorQuickFilterResetHandler.java
index 5ae2cfac9..61b4676b9 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/EditorQuickFilterResetHandler.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/EditorQuickFilterResetHandler.java
@@ -1,11 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2011, 2014 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
+ * Wind River Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.tcf.te.ui.views.handler;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/EditorSearchHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/EditorSearchHandler.java
index 67673216c..31b46d8b9 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/EditorSearchHandler.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/EditorSearchHandler.java
@@ -1,11 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2011, 2014 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
+ * Wind River Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.tcf.te.ui.views.handler;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/FilterMRUContribution.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/FilterMRUContribution.java
index a57630965..52c613ebc 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/FilterMRUContribution.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/FilterMRUContribution.java
@@ -1,11 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2012, 2013 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
+ * Wind River Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.tcf.te.ui.views.handler;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/MRUList.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/MRUList.java
index 9fc70722a..2e3a58694 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/MRUList.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/MRUList.java
@@ -1,78 +1,78 @@
-/*******************************************************************************
- * Copyright (c) 2012 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tcf.te.ui.views.handler;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.StringTokenizer;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.tcf.te.ui.views.activator.UIPlugin;
-import org.eclipse.tcf.te.ui.views.internal.preferences.IPreferenceKeys;
-
-/**
- * The list implementation for MRU items for a specified preference key which is used
- * to retrieve the list from a preference store. It also provide a function to update the MRU
- * list from a delta set.
- */
-public class MRUList extends ArrayList<String> {
- private static final long serialVersionUID = 1L;
- // The preference key used to access the MRU list.
- private String prefKey;
-
- /**
- * Construct the MRU list using a preference key.
- * @param prefKey The preference key.
- */
- public MRUList(String prefKey) {
- this.prefKey = prefKey;
- initData();
- }
-
- /**
- * Initialize the list using its preference key.
- */
- private void initData() {
- IPreferenceStore prefStore = UIPlugin.getDefault().getPreferenceStore();
- String mruList = prefStore.getString(prefKey);
- if (mruList != null) {
- StringTokenizer st = new StringTokenizer(mruList, "|"); //$NON-NLS-1$
- while (st.hasMoreTokens()) {
- add(st.nextToken());
- }
- }
- }
-
- /**
- * Update the MRU list preference with the specified delta set.
- *
- * @param deltaList The delta list to update the MRU preference with.
- */
- public void updateMRUList(List<String> deltaList) {
- for (String id : deltaList) {
- if (!contains(id)) add(id);
- }
- IPreferenceStore prefStore = UIPlugin.getDefault().getPreferenceStore();
- int max = prefStore.getInt(prefKey+".max"); //$NON-NLS-1$
- if(max == 0) max = IPreferenceKeys.DEFAULT_MAX_MRU;
- int length = size();
- List<String> newList = this;
- if(length>max) {
- newList = subList(length-max, length);
- }
- StringBuilder builder = new StringBuilder();
- for(int i=0;i<newList.size();i++) {
- String id = newList.get(i);
- if(i>0) builder.append("|"); //$NON-NLS-1$
- builder.append(id);
- }
- prefStore.setValue(prefKey, builder.toString());
- }
-}
+/*******************************************************************************
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.views.handler;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.StringTokenizer;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.tcf.te.ui.views.activator.UIPlugin;
+import org.eclipse.tcf.te.ui.views.internal.preferences.IPreferenceKeys;
+
+/**
+ * The list implementation for MRU items for a specified preference key which is used
+ * to retrieve the list from a preference store. It also provide a function to update the MRU
+ * list from a delta set.
+ */
+public class MRUList extends ArrayList<String> {
+ private static final long serialVersionUID = 1L;
+ // The preference key used to access the MRU list.
+ private String prefKey;
+
+ /**
+ * Construct the MRU list using a preference key.
+ * @param prefKey The preference key.
+ */
+ public MRUList(String prefKey) {
+ this.prefKey = prefKey;
+ initData();
+ }
+
+ /**
+ * Initialize the list using its preference key.
+ */
+ private void initData() {
+ IPreferenceStore prefStore = UIPlugin.getDefault().getPreferenceStore();
+ String mruList = prefStore.getString(prefKey);
+ if (mruList != null) {
+ StringTokenizer st = new StringTokenizer(mruList, "|"); //$NON-NLS-1$
+ while (st.hasMoreTokens()) {
+ add(st.nextToken());
+ }
+ }
+ }
+
+ /**
+ * Update the MRU list preference with the specified delta set.
+ *
+ * @param deltaList The delta list to update the MRU preference with.
+ */
+ public void updateMRUList(List<String> deltaList) {
+ for (String id : deltaList) {
+ if (!contains(id)) add(id);
+ }
+ IPreferenceStore prefStore = UIPlugin.getDefault().getPreferenceStore();
+ int max = prefStore.getInt(prefKey+".max"); //$NON-NLS-1$
+ if(max == 0) max = IPreferenceKeys.DEFAULT_MAX_MRU;
+ int length = size();
+ List<String> newList = this;
+ if(length>max) {
+ newList = subList(length-max, length);
+ }
+ StringBuilder builder = new StringBuilder();
+ for(int i=0;i<newList.size();i++) {
+ String id = newList.get(i);
+ if(i>0) builder.append("|"); //$NON-NLS-1$
+ builder.append(id);
+ }
+ prefStore.setValue(prefKey, builder.toString());
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/NewWizardNodeHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/NewWizardNodeHandler.java
index 040385a3e..2521bcdc5 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/NewWizardNodeHandler.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/NewWizardNodeHandler.java
@@ -1,13 +1,12 @@
-/**
- * NewWizardNodeHandler.java
- * Created on Jul 12, 2012
- *
- * Copyright (c) 2012, 2014 Wind River Systems, Inc.
+/*******************************************************************************
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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
*
- * The right to copy, distribute, modify, or otherwise make use
- * of this software may be licensed only pursuant to the terms
- * of an applicable Wind River license agreement.
- */
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
package org.eclipse.tcf.te.ui.views.handler;
import java.util.Iterator;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/OpenEditorHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/OpenEditorHandler.java
index 17a3543c9..6b54169a1 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/OpenEditorHandler.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/OpenEditorHandler.java
@@ -1,11 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2011, 2014 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
+ * Wind River Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.tcf.te.ui.views.handler;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/ShowInPropertiesHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/ShowInPropertiesHandler.java
index 772af1823..e5a68d5ab 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/ShowInPropertiesHandler.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/ShowInPropertiesHandler.java
@@ -1,48 +1,48 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tcf.te.ui.views.handler;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.SafeRunner;
-import org.eclipse.jface.util.SafeRunnable;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.handlers.HandlerUtil;
-
-/**
- * The handler to show the selected object in Properties view.
- */
-public class ShowInPropertiesHandler extends AbstractHandler {
-
- // The id of Properties view.
- private static final String PROP_VIEW_ID = "org.eclipse.ui.views.PropertySheet"; //$NON-NLS-1$
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
- */
- @Override
- public Object execute(ExecutionEvent event) throws ExecutionException {
- IWorkbenchWindow workbench = HandlerUtil.getActiveWorkbenchWindowChecked(event);
- final IWorkbenchPage activePage = workbench.getActivePage();
- SafeRunner.run(new SafeRunnable(){
- @Override
- public void handleException(Throwable e) {
- // Ignore exception
- }
- @Override
- public void run() throws Exception {
- activePage.showView(PROP_VIEW_ID);
- }});
- return null;
- }
-}
+/*******************************************************************************
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.views.handler;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.SafeRunner;
+import org.eclipse.jface.util.SafeRunnable;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+/**
+ * The handler to show the selected object in Properties view.
+ */
+public class ShowInPropertiesHandler extends AbstractHandler {
+
+ // The id of Properties view.
+ private static final String PROP_VIEW_ID = "org.eclipse.ui.views.PropertySheet"; //$NON-NLS-1$
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+ */
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ IWorkbenchWindow workbench = HandlerUtil.getActiveWorkbenchWindowChecked(event);
+ final IWorkbenchPage activePage = workbench.getActivePage();
+ SafeRunner.run(new SafeRunnable(){
+ @Override
+ public void handleException(Throwable e) {
+ // Ignore exception
+ }
+ @Override
+ public void run() throws Exception {
+ activePage.showView(PROP_VIEW_ID);
+ }});
+ return null;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/ShowInSystemManagementHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/ShowInSystemManagementHandler.java
index 1b46bb4f2..27c753445 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/ShowInSystemManagementHandler.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/ShowInSystemManagementHandler.java
@@ -1,11 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2012, 2014 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
+ * Wind River Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.tcf.te.ui.views.handler;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/UpdateActiveExtensionsOperation.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/UpdateActiveExtensionsOperation.java
index 606a46a07..3ac9a42b0 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/UpdateActiveExtensionsOperation.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/UpdateActiveExtensionsOperation.java
@@ -1,13 +1,12 @@
/*******************************************************************************
- * Copyright (c) 2006, 2014 IBM Corporation and others.
- * 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
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
package org.eclipse.tcf.te.ui.views.handler;
import java.util.ArrayList;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/UpdateActiveFiltersOperation.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/UpdateActiveFiltersOperation.java
index c7a328549..3c846a929 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/UpdateActiveFiltersOperation.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/UpdateActiveFiltersOperation.java
@@ -1,13 +1,12 @@
/*******************************************************************************
- * Copyright (c) 2006, 2014 IBM Corporation and others.
- * 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
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
package org.eclipse.tcf.te.ui.views.handler;
import java.util.ArrayList;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/ViewQuickFilterHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/ViewQuickFilterHandler.java
index 489832a14..d86269498 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/ViewQuickFilterHandler.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/ViewQuickFilterHandler.java
@@ -1,11 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2011, 2014 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
+ * Wind River Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.tcf.te.ui.views.handler;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/ViewQuickFilterResetHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/ViewQuickFilterResetHandler.java
index 2d433388d..4c1f4bb9b 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/ViewQuickFilterResetHandler.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/ViewQuickFilterResetHandler.java
@@ -1,11 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2011, 2014 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
+ * Wind River Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.tcf.te.ui.views.handler;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/ViewSearchHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/ViewSearchHandler.java
index 08e4b0ab5..f602aacbc 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/ViewSearchHandler.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/ViewSearchHandler.java
@@ -1,35 +1,35 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tcf.te.ui.views.handler;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.tcf.te.ui.utils.TreeViewerUtil;
-import org.eclipse.tcf.te.ui.views.internal.View;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.handlers.HandlerUtil;
-
-/**
- * The search handler to search elements in the tree of Target Explorer view.
- */
-public class ViewSearchHandler extends AbstractHandler {
- @Override
- public Object execute(ExecutionEvent event) throws ExecutionException {
- IWorkbenchPart part = HandlerUtil.getActivePartChecked(event);
- if (part instanceof View) {
- View view = (View) part;
- TreeViewer viewer = view.getCommonViewer();
- TreeViewerUtil.doSearch(viewer);
- }
- return null;
- }
-}
+/*******************************************************************************
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.views.handler;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.tcf.te.ui.utils.TreeViewerUtil;
+import org.eclipse.tcf.te.ui.views.internal.View;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+/**
+ * The search handler to search elements in the tree of Target Explorer view.
+ */
+public class ViewSearchHandler extends AbstractHandler {
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ IWorkbenchPart part = HandlerUtil.getActivePartChecked(event);
+ if (part instanceof View) {
+ View view = (View) part;
+ TreeViewer viewer = view.getCommonViewer();
+ TreeViewerUtil.doSearch(viewer);
+ }
+ return null;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/ICategory.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/ICategory.java
index 05e31427b..2c7d57303 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/ICategory.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/ICategory.java
@@ -1,11 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2012, 2013 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
+ * Wind River Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.tcf.te.ui.views.interfaces;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/IEditorPage.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/IEditorPage.java
index 39370a261..137576c71 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/IEditorPage.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/IEditorPage.java
@@ -1,11 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2011, 2013 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
+ * Wind River Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.tcf.te.ui.views.interfaces;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/IEditorSaveAsAdapter.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/IEditorSaveAsAdapter.java
index 09eee796e..3ac3e7fa7 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/IEditorSaveAsAdapter.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/IEditorSaveAsAdapter.java
@@ -1,11 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2012, 2013 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
+ * Wind River Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.tcf.te.ui.views.interfaces;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/IRoot.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/IRoot.java
index 6550d31ec..733038c22 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/IRoot.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/IRoot.java
@@ -1,11 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2011, 2013 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
+ * Wind River Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.tcf.te.ui.views.interfaces;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/IUIConstants.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/IUIConstants.java
index de4bb2628..dc0cb83c4 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/IUIConstants.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/IUIConstants.java
@@ -1,11 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2011, 2013 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
+ * Wind River Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.tcf.te.ui.views.interfaces;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/ImageConsts.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/ImageConsts.java
index d24b6785b..5a822f7a3 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/ImageConsts.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/ImageConsts.java
@@ -1,11 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2011, 2013 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
+ * Wind River Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.tcf.te.ui.views.interfaces;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/categories/ICategorizable.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/categories/ICategorizable.java
index 781db82f9..476c461a8 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/categories/ICategorizable.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/categories/ICategorizable.java
@@ -1,54 +1,54 @@
-/*******************************************************************************
- * Copyright (c) 2012 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tcf.te.ui.views.interfaces.categories;
-
-import org.eclipse.tcf.te.ui.views.interfaces.ICategory;
-
-/**
- * Interface to be implemented by categorizable element adapters.
- */
-public interface ICategorizable {
-
- /**
- * Defines the possible category operations.
- */
- public enum OPERATION { ADD, REMOVE }
-
- /**
- * Returns the unique categorizable id for the adapted element. The id
- * must not change once queried and must be the same across session.
- *
- * @return The unique categorizable element id, or <code>null</code>.
- */
- public String getId();
-
- /**
- * Returns if or if not the given operation is valid for the given parent
- * category and destination category.
- *
- * @param operation The operation. Must not be <code>null</code>.
- * @param parentCategory The parent category or <code>null</code>.
- * @param category The destination category. Must not be <code>null</code>.
- *
- * @return <code>True</code> if the operation is valid, <code>false</code> otherwise.
- */
- public boolean isValid(OPERATION operation, ICategory parentCategory, ICategory category);
-
- /**
- * Returns if or if not the given operation is enabled for the given
- * destination category.
- *
- * @param operation The operation. Must not be <code>null</code>.
- * @param category The destination category. Must not be <code>null</code>.
- *
- * @return <code>True</code> if the operation is valid, <code>false</code> otherwise.
- */
- public boolean isEnabled(OPERATION operation, ICategory category);
-}
+/*******************************************************************************
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.views.interfaces.categories;
+
+import org.eclipse.tcf.te.ui.views.interfaces.ICategory;
+
+/**
+ * Interface to be implemented by categorizable element adapters.
+ */
+public interface ICategorizable {
+
+ /**
+ * Defines the possible category operations.
+ */
+ public enum OPERATION { ADD, REMOVE }
+
+ /**
+ * Returns the unique categorizable id for the adapted element. The id
+ * must not change once queried and must be the same across session.
+ *
+ * @return The unique categorizable element id, or <code>null</code>.
+ */
+ public String getId();
+
+ /**
+ * Returns if or if not the given operation is valid for the given parent
+ * category and destination category.
+ *
+ * @param operation The operation. Must not be <code>null</code>.
+ * @param parentCategory The parent category or <code>null</code>.
+ * @param category The destination category. Must not be <code>null</code>.
+ *
+ * @return <code>True</code> if the operation is valid, <code>false</code> otherwise.
+ */
+ public boolean isValid(OPERATION operation, ICategory parentCategory, ICategory category);
+
+ /**
+ * Returns if or if not the given operation is enabled for the given
+ * destination category.
+ *
+ * @param operation The operation. Must not be <code>null</code>.
+ * @param category The destination category. Must not be <code>null</code>.
+ *
+ * @return <code>True</code> if the operation is valid, <code>false</code> otherwise.
+ */
+ public boolean isEnabled(OPERATION operation, ICategory category);
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/categories/ICategoryManager.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/categories/ICategoryManager.java
index 896b27274..3b5297d4a 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/categories/ICategoryManager.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/categories/ICategoryManager.java
@@ -1,11 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2012, 2014 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
+ * Wind River Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.tcf.te.ui.views.interfaces.categories;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/tracing/ITraceIds.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/tracing/ITraceIds.java
index 4d4de5b8a..5bfe58e3d 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/tracing/ITraceIds.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/tracing/ITraceIds.java
@@ -1,21 +1,21 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tcf.te.ui.views.interfaces.tracing;
-
-/**
- * TCF core plug-in trace slot identifiers.
- */
-public interface ITraceIds {
-
- /**
- * If activated, tracing information about the editor event listeners is printed out.
- */
- public static String TRACE_EDITOR_EVENT_LISTENER = "trace/editor/eventListener"; //$NON-NLS-1$
-}
+/*******************************************************************************
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.views.interfaces.tracing;
+
+/**
+ * TCF core plug-in trace slot identifiers.
+ */
+public interface ITraceIds {
+
+ /**
+ * If activated, tracing information about the editor event listeners is printed out.
+ */
+ public static String TRACE_EDITOR_EVENT_LISTENER = "trace/editor/eventListener"; //$NON-NLS-1$
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/AltDoubleClickEvent.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/AltDoubleClickEvent.java
index 4a2fc72f9..72c846a8b 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/AltDoubleClickEvent.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/AltDoubleClickEvent.java
@@ -1,31 +1,31 @@
-/*******************************************************************************
- * Copyright (c) 2012 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tcf.te.ui.views.internal;
-
-import org.eclipse.jface.viewers.DoubleClickEvent;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.Viewer;
-
-/**
- * Special double click event denoting a double click with pressed ALT key.
- */
-public class AltDoubleClickEvent extends DoubleClickEvent {
- private static final long serialVersionUID = 4214922560003128633L;
-
- /**
- * Constructor.
- *
- * @param source The viewer.
- * @param selection The selection.
- */
- public AltDoubleClickEvent(Viewer source, ISelection selection) {
- super(source, selection);
- }
-}
+/*******************************************************************************
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.views.internal;
+
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.Viewer;
+
+/**
+ * Special double click event denoting a double click with pressed ALT key.
+ */
+public class AltDoubleClickEvent extends DoubleClickEvent {
+ private static final long serialVersionUID = 4214922560003128633L;
+
+ /**
+ * Constructor.
+ *
+ * @param source The viewer.
+ * @param selection The selection.
+ */
+ public AltDoubleClickEvent(Viewer source, ISelection selection) {
+ super(source, selection);
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/PropertyContributorLabelProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/PropertyContributorLabelProvider.java
index f26edfb29..8ea48499f 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/PropertyContributorLabelProvider.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/PropertyContributorLabelProvider.java
@@ -1,72 +1,72 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tcf.te.ui.views.internal;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * The label provider used by propertyContributor to provide a title bar.
- */
-public class PropertyContributorLabelProvider extends LabelProvider {
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.LabelProvider#getImage(java.lang.Object)
- */
- @Override
- public Image getImage(Object element) {
- if(element instanceof IStructuredSelection) {
- IStructuredSelection selection = (IStructuredSelection) element;
- Object object = selection.getFirstElement();
- ILabelProvider labelProvider = adapt(object);
- if(labelProvider != null) return labelProvider.getImage(object);
- }
- return super.getImage(element);
- }
-
- /**
- * Adapt the object to a label provider if it is adaptable.
- *
- * @param object The object to be adapted.
- * @return The label provider for it.
- */
- private ILabelProvider adapt(Object object) {
- ILabelProvider labelProvider = null;
- if(object instanceof ILabelProvider) {
- labelProvider = (ILabelProvider) object;
- } else if(object instanceof IAdaptable) {
- labelProvider = (ILabelProvider) ((IAdaptable)object).getAdapter(ILabelProvider.class);
- }
- if(object != null && labelProvider == null) {
- labelProvider = (ILabelProvider) Platform.getAdapterManager().getAdapter(object, ILabelProvider.class);
- }
- return labelProvider;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.LabelProvider#getText(java.lang.Object)
- */
- @Override
- public String getText(Object element) {
- if(element instanceof IStructuredSelection) {
- IStructuredSelection selection = (IStructuredSelection) element;
- Object object = selection.getFirstElement();
- ILabelProvider labelProvider = adapt(object);
- if(labelProvider != null) return labelProvider.getText(object);
- }
- return super.getText(element);
- }
-}
+/*******************************************************************************
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.views.internal;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.graphics.Image;
+
+/**
+ * The label provider used by propertyContributor to provide a title bar.
+ */
+public class PropertyContributorLabelProvider extends LabelProvider {
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.LabelProvider#getImage(java.lang.Object)
+ */
+ @Override
+ public Image getImage(Object element) {
+ if(element instanceof IStructuredSelection) {
+ IStructuredSelection selection = (IStructuredSelection) element;
+ Object object = selection.getFirstElement();
+ ILabelProvider labelProvider = adapt(object);
+ if(labelProvider != null) return labelProvider.getImage(object);
+ }
+ return super.getImage(element);
+ }
+
+ /**
+ * Adapt the object to a label provider if it is adaptable.
+ *
+ * @param object The object to be adapted.
+ * @return The label provider for it.
+ */
+ private ILabelProvider adapt(Object object) {
+ ILabelProvider labelProvider = null;
+ if(object instanceof ILabelProvider) {
+ labelProvider = (ILabelProvider) object;
+ } else if(object instanceof IAdaptable) {
+ labelProvider = (ILabelProvider) ((IAdaptable)object).getAdapter(ILabelProvider.class);
+ }
+ if(object != null && labelProvider == null) {
+ labelProvider = (ILabelProvider) Platform.getAdapterManager().getAdapter(object, ILabelProvider.class);
+ }
+ return labelProvider;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.LabelProvider#getText(java.lang.Object)
+ */
+ @Override
+ public String getText(Object element) {
+ if(element instanceof IStructuredSelection) {
+ IStructuredSelection selection = (IStructuredSelection) element;
+ Object object = selection.getFirstElement();
+ ILabelProvider labelProvider = adapt(object);
+ if(labelProvider != null) return labelProvider.getText(object);
+ }
+ return super.getText(element);
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/RestoreDone.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/RestoreDone.java
index 6a1f244c8..60f1c2ab9 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/RestoreDone.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/RestoreDone.java
@@ -1,11 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2012, 2014 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
+ * Wind River Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.tcf.te.ui.views.internal;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/RestoreJob.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/RestoreJob.java
index 0b65d1cef..7dbcbfbc4 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/RestoreJob.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/RestoreJob.java
@@ -1,11 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2012, 2014 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
+ * Wind River Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.tcf.te.ui.views.internal;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/RestoreStatus.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/RestoreStatus.java
index 3d92d9d80..c41bbe72a 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/RestoreStatus.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/RestoreStatus.java
@@ -1,46 +1,46 @@
-/*******************************************************************************
- * Copyright (c) 2012 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tcf.te.ui.views.internal;
-
-import java.util.List;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.viewers.TreePath;
-import org.eclipse.tcf.te.ui.views.activator.UIPlugin;
-
-/**
- * A status used to return the expanded paths after the
- * restoring job is done.
- */
-public class RestoreStatus extends Status {
- // The expanded paths to be restored.
- private List<TreePath> paths;
-
- /**
- * Create an restore status with IStatus.OK and
- * the expanded paths.
- *
- * @param paths The expanded paths.
- */
- public RestoreStatus(List<TreePath> paths) {
- super(IStatus.OK, UIPlugin.getUniqueIdentifier(), null);
- this.paths = paths;
- }
-
- /**
- * Get the expanded paths array.
- *
- * @return The expanded paths array.
- */
- public TreePath[] getExpandedPaths() {
- return paths.toArray(new TreePath[paths.size()]);
- }
+/*******************************************************************************
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.views.internal;
+
+import java.util.List;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.viewers.TreePath;
+import org.eclipse.tcf.te.ui.views.activator.UIPlugin;
+
+/**
+ * A status used to return the expanded paths after the
+ * restoring job is done.
+ */
+public class RestoreStatus extends Status {
+ // The expanded paths to be restored.
+ private List<TreePath> paths;
+
+ /**
+ * Create an restore status with IStatus.OK and
+ * the expanded paths.
+ *
+ * @param paths The expanded paths.
+ */
+ public RestoreStatus(List<TreePath> paths) {
+ super(IStatus.OK, UIPlugin.getUniqueIdentifier(), null);
+ this.paths = paths;
+ }
+
+ /**
+ * Get the expanded paths array.
+ *
+ * @return The expanded paths array.
+ */
+ public TreePath[] getExpandedPaths() {
+ return paths.toArray(new TreePath[paths.size()]);
+ }
} \ No newline at end of file
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/View.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/View.java
index 8a8b39178..7eaee19c7 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/View.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/View.java
@@ -1,11 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2011, 2013 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
+ * Wind River Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.tcf.te.ui.views.internal;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/ViewExpandingState.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/ViewExpandingState.java
index e2124befe..faae4ba25 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/ViewExpandingState.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/ViewExpandingState.java
@@ -1,11 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2012, 2014 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
+ * Wind River Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.tcf.te.ui.views.internal;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/ViewRoot.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/ViewRoot.java
index 716d4dfe2..670d5cb90 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/ViewRoot.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/ViewRoot.java
@@ -1,39 +1,39 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tcf.te.ui.views.internal;
-
-import org.eclipse.core.runtime.PlatformObject;
-import org.eclipse.tcf.te.ui.views.interfaces.IRoot;
-
-/**
- * View root node implementation
- */
-public class ViewRoot extends PlatformObject implements IRoot {
-
- /*
- * Thread save singleton instance creation.
- */
- private static class LazyInstance {
- public static ViewRoot instance = new ViewRoot();
- }
-
- /**
- * Returns the singleton view root instance.
- */
- public static ViewRoot getInstance() {
- return LazyInstance.instance;
- }
-
- /**
- * Constructor.
- */
- /* default */ ViewRoot() {
- }
+/*******************************************************************************
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.views.internal;
+
+import org.eclipse.core.runtime.PlatformObject;
+import org.eclipse.tcf.te.ui.views.interfaces.IRoot;
+
+/**
+ * View root node implementation
+ */
+public class ViewRoot extends PlatformObject implements IRoot {
+
+ /*
+ * Thread save singleton instance creation.
+ */
+ private static class LazyInstance {
+ public static ViewRoot instance = new ViewRoot();
+ }
+
+ /**
+ * Returns the singleton view root instance.
+ */
+ public static ViewRoot getInstance() {
+ return LazyInstance.instance;
+ }
+
+ /**
+ * Constructor.
+ */
+ /* default */ ViewRoot() {
+ }
} \ No newline at end of file
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/ViewViewer.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/ViewViewer.java
index afab05672..33112f5ee 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/ViewViewer.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/ViewViewer.java
@@ -1,11 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2011, 2013 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
+ * Wind River Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.tcf.te.ui.views.internal;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/ViewViewerComparer.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/ViewViewerComparer.java
index 73d33b00f..f1b64dd76 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/ViewViewerComparer.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/ViewViewerComparer.java
@@ -1,76 +1,76 @@
-/*******************************************************************************
- * Copyright (c) 2012 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tcf.te.ui.views.internal;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.viewers.IElementComparer;
-
-/**
- * The comparer implementation for ViewViewer in order customize
- * the comparison of tree nodes.
- */
-public class ViewViewerComparer implements IElementComparer {
- // If the current comparison is by default.
- private boolean byDefault;
-
- /**
- * Constructor
- */
- public ViewViewerComparer() {
- byDefault = true;
- }
-
- /**
- * Set if the current comparison should follow default one.
- *
- * @param value The new value.
- */
- public void setByDefault(boolean value) {
- byDefault = value;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.IElementComparer#equals(java.lang.Object, java.lang.Object)
- */
- @Override
- public boolean equals(Object a, Object b) {
- if(a == b) return true;
- if(byDefault) {
- return a.equals(b);
- }
- IElementComparer comparer = (IElementComparer) Platform.getAdapterManager().getAdapter(a, IElementComparer.class);
- if(comparer == null) {
- comparer = (IElementComparer) Platform.getAdapterManager().getAdapter(b, IElementComparer.class);
- }
- if(comparer != null) {
- return comparer.equals(a, b);
- }
- return a.equals(b);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.IElementComparer#hashCode(java.lang.Object)
- */
- @Override
- public int hashCode(Object element) {
- if (element != null) {
- if(byDefault)
- return element.hashCode();
- IElementComparer comparer = (IElementComparer) Platform.getAdapterManager().getAdapter(element, IElementComparer.class);
- if(comparer != null) {
- return comparer.hashCode(element);
- }
- return element.hashCode();
- }
- return 0;
- }
-}
+/*******************************************************************************
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.views.internal;
+
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.viewers.IElementComparer;
+
+/**
+ * The comparer implementation for ViewViewer in order customize
+ * the comparison of tree nodes.
+ */
+public class ViewViewerComparer implements IElementComparer {
+ // If the current comparison is by default.
+ private boolean byDefault;
+
+ /**
+ * Constructor
+ */
+ public ViewViewerComparer() {
+ byDefault = true;
+ }
+
+ /**
+ * Set if the current comparison should follow default one.
+ *
+ * @param value The new value.
+ */
+ public void setByDefault(boolean value) {
+ byDefault = value;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.IElementComparer#equals(java.lang.Object, java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object a, Object b) {
+ if(a == b) return true;
+ if(byDefault) {
+ return a.equals(b);
+ }
+ IElementComparer comparer = (IElementComparer) Platform.getAdapterManager().getAdapter(a, IElementComparer.class);
+ if(comparer == null) {
+ comparer = (IElementComparer) Platform.getAdapterManager().getAdapter(b, IElementComparer.class);
+ }
+ if(comparer != null) {
+ return comparer.equals(a, b);
+ }
+ return a.equals(b);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.IElementComparer#hashCode(java.lang.Object)
+ */
+ @Override
+ public int hashCode(Object element) {
+ if (element != null) {
+ if(byDefault)
+ return element.hashCode();
+ IElementComparer comparer = (IElementComparer) Platform.getAdapterManager().getAdapter(element, IElementComparer.class);
+ if(comparer != null) {
+ return comparer.hashCode(element);
+ }
+ return element.hashCode();
+ }
+ return 0;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/ViewViewerDecoratingLabelProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/ViewViewerDecoratingLabelProvider.java
index 8d506532d..fd81ded1d 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/ViewViewerDecoratingLabelProvider.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/ViewViewerDecoratingLabelProvider.java
@@ -1,167 +1,167 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tcf.te.ui.views.internal;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.StyledCellLabelProvider;
-import org.eclipse.jface.viewers.StyledString;
-import org.eclipse.jface.viewers.TreePath;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.ViewerCell;
-import org.eclipse.jface.viewers.StyledString.Styler;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.tcf.te.core.interfaces.IFilterable;
-import org.eclipse.tcf.te.ui.utils.TreeViewerUtil;
-import org.eclipse.ui.internal.navigator.NavigatorDecoratingLabelProvider;
-
-/**
- * An wrapping decorating label provider to replace the default navigator decorating label provider
- * in order to provide the filtering decoration.
- */
-@SuppressWarnings("restriction")
-public class ViewViewerDecoratingLabelProvider extends NavigatorDecoratingLabelProvider {
- // The navigator's tree viewer to be decorated.
- private TreeViewer viewer;
- private TreePath path;
- /**
- * Create an instance with the tree viewer and a common label provider.
- *
- * @param viewer The navigator's tree viewer.
- * @param commonLabelProvider The navigator's common label provider.
- */
- public ViewViewerDecoratingLabelProvider(TreeViewer viewer, ILabelProvider commonLabelProvider) {
- super(commonLabelProvider);
- this.viewer = viewer;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.DecoratingStyledCellLabelProvider#update(org.eclipse.jface.viewers.ViewerCell)
- */
- @Override
- public void update(ViewerCell cell) {
- path = cell.getViewerRow().getTreePath();
- super.update(cell);
- path = null;
- }
-
- /**
- * Returns the element label with no decoration applied.
- *
- * @param element The element.
- * @return The label.
- */
- public String getTextNoDecoration(Object element) {
- IStyledLabelProvider provider = getStyledStringProvider();
- StyledString styledString = provider.getStyledText(element);
- String text = styledString != null ? styledString.toString() : super.getText(element);
- return text;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.internal.navigator.NavigatorDecoratingLabelProvider#getText(java.lang.Object)
- */
- @Override
- public String getText(Object element) {
- StyledString styledString = super.getStyledText(element);
- String text = styledString != null ? styledString.toString() : super.getText(element);
- IFilterable decorator = adaptFilterable(element);
- if (text != null && decorator != null && path != null && TreeViewerUtil.isFiltering(viewer, path)) {
- return TreeViewerUtil.getDecoratedText(text, viewer, path);
- }
- return text;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.DecoratingStyledCellLabelProvider#getImage(java.lang.Object)
- */
- @Override
- public Image getImage(Object element) {
- Image image = super.getImage(element);
- IFilterable decorator = adaptFilterable(element);
- if (image != null && decorator != null && path != null && TreeViewerUtil.isFiltering(viewer, path)) {
- return TreeViewerUtil.getDecoratedImage(image, viewer, path);
- }
- return image;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.DecoratingStyledCellLabelProvider#getStyledText(java.lang.Object)
- */
- @Override
- protected StyledString getStyledText(Object element) {
- StyledString styledString = super.getStyledText(element);
- IFilterable decorator = adaptFilterable(element);
- String text = styledString.getString();
- if (text != null && decorator != null && path != null && TreeViewerUtil.isFiltering(viewer, path)) {
- String decorated = TreeViewerUtil.getDecoratedText(text, viewer, path);
- Styler style = getDecorationStyle(element);
- return StyledCellLabelProvider.styleDecoratedString(decorated, style, styledString);
- }
- return styledString;
- }
-
- /**
- * Get an adapter of IFilteringLabelProvider from the specified element.
- *
- * @param element The element to get the adapter from.
- * @return The element's adapter or null if does not adapt to IFilteringLabelProvider.
- */
- private IFilterable adaptFilterable(Object element) {
- IFilterable decorator = null;
- if(element instanceof IFilterable) {
- decorator = (IFilterable) element;
- }
- if(decorator == null && element instanceof IAdaptable) {
- decorator = (IFilterable) ((IAdaptable)element).getAdapter(IFilterable.class);
- }
- if(decorator == null) {
- decorator = (IFilterable) Platform.getAdapterManager().getAdapter(element, IFilterable.class);
- }
- return decorator;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.internal.navigator.NavigatorDecoratingLabelProvider#getColumnImage(java.lang.Object, int)
- */
- @Override
- public Image getColumnImage(Object element, int columnIndex) {
- Image image = super.getColumnImage(element, columnIndex);
- if (columnIndex == 0) {
- IFilterable decorator = adaptFilterable(element);
- if (image != null && decorator != null && path != null && TreeViewerUtil.isFiltering(viewer, path)) {
- return TreeViewerUtil.getDecoratedImage(image, viewer, path);
- }
- }
- return image;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.internal.navigator.NavigatorDecoratingLabelProvider#getColumnText(java.lang.Object, int)
- */
- @Override
- public String getColumnText(Object element, int columnIndex) {
- String text = super.getColumnText(element, columnIndex);
- if (columnIndex == 0) {
- IFilterable decorator = adaptFilterable(element);
- if (text != null && decorator != null && path != null && TreeViewerUtil.isFiltering(viewer, path)) {
- return TreeViewerUtil.getDecoratedText(text, viewer, path);
- }
- }
- return text;
- }
-}
+/*******************************************************************************
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.views.internal;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.StyledCellLabelProvider;
+import org.eclipse.jface.viewers.StyledString;
+import org.eclipse.jface.viewers.TreePath;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.ViewerCell;
+import org.eclipse.jface.viewers.StyledString.Styler;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.tcf.te.core.interfaces.IFilterable;
+import org.eclipse.tcf.te.ui.utils.TreeViewerUtil;
+import org.eclipse.ui.internal.navigator.NavigatorDecoratingLabelProvider;
+
+/**
+ * An wrapping decorating label provider to replace the default navigator decorating label provider
+ * in order to provide the filtering decoration.
+ */
+@SuppressWarnings("restriction")
+public class ViewViewerDecoratingLabelProvider extends NavigatorDecoratingLabelProvider {
+ // The navigator's tree viewer to be decorated.
+ private TreeViewer viewer;
+ private TreePath path;
+ /**
+ * Create an instance with the tree viewer and a common label provider.
+ *
+ * @param viewer The navigator's tree viewer.
+ * @param commonLabelProvider The navigator's common label provider.
+ */
+ public ViewViewerDecoratingLabelProvider(TreeViewer viewer, ILabelProvider commonLabelProvider) {
+ super(commonLabelProvider);
+ this.viewer = viewer;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.DecoratingStyledCellLabelProvider#update(org.eclipse.jface.viewers.ViewerCell)
+ */
+ @Override
+ public void update(ViewerCell cell) {
+ path = cell.getViewerRow().getTreePath();
+ super.update(cell);
+ path = null;
+ }
+
+ /**
+ * Returns the element label with no decoration applied.
+ *
+ * @param element The element.
+ * @return The label.
+ */
+ public String getTextNoDecoration(Object element) {
+ IStyledLabelProvider provider = getStyledStringProvider();
+ StyledString styledString = provider.getStyledText(element);
+ String text = styledString != null ? styledString.toString() : super.getText(element);
+ return text;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.internal.navigator.NavigatorDecoratingLabelProvider#getText(java.lang.Object)
+ */
+ @Override
+ public String getText(Object element) {
+ StyledString styledString = super.getStyledText(element);
+ String text = styledString != null ? styledString.toString() : super.getText(element);
+ IFilterable decorator = adaptFilterable(element);
+ if (text != null && decorator != null && path != null && TreeViewerUtil.isFiltering(viewer, path)) {
+ return TreeViewerUtil.getDecoratedText(text, viewer, path);
+ }
+ return text;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.DecoratingStyledCellLabelProvider#getImage(java.lang.Object)
+ */
+ @Override
+ public Image getImage(Object element) {
+ Image image = super.getImage(element);
+ IFilterable decorator = adaptFilterable(element);
+ if (image != null && decorator != null && path != null && TreeViewerUtil.isFiltering(viewer, path)) {
+ return TreeViewerUtil.getDecoratedImage(image, viewer, path);
+ }
+ return image;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.DecoratingStyledCellLabelProvider#getStyledText(java.lang.Object)
+ */
+ @Override
+ protected StyledString getStyledText(Object element) {
+ StyledString styledString = super.getStyledText(element);
+ IFilterable decorator = adaptFilterable(element);
+ String text = styledString.getString();
+ if (text != null && decorator != null && path != null && TreeViewerUtil.isFiltering(viewer, path)) {
+ String decorated = TreeViewerUtil.getDecoratedText(text, viewer, path);
+ Styler style = getDecorationStyle(element);
+ return StyledCellLabelProvider.styleDecoratedString(decorated, style, styledString);
+ }
+ return styledString;
+ }
+
+ /**
+ * Get an adapter of IFilteringLabelProvider from the specified element.
+ *
+ * @param element The element to get the adapter from.
+ * @return The element's adapter or null if does not adapt to IFilteringLabelProvider.
+ */
+ private IFilterable adaptFilterable(Object element) {
+ IFilterable decorator = null;
+ if(element instanceof IFilterable) {
+ decorator = (IFilterable) element;
+ }
+ if(decorator == null && element instanceof IAdaptable) {
+ decorator = (IFilterable) ((IAdaptable)element).getAdapter(IFilterable.class);
+ }
+ if(decorator == null) {
+ decorator = (IFilterable) Platform.getAdapterManager().getAdapter(element, IFilterable.class);
+ }
+ return decorator;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.internal.navigator.NavigatorDecoratingLabelProvider#getColumnImage(java.lang.Object, int)
+ */
+ @Override
+ public Image getColumnImage(Object element, int columnIndex) {
+ Image image = super.getColumnImage(element, columnIndex);
+ if (columnIndex == 0) {
+ IFilterable decorator = adaptFilterable(element);
+ if (image != null && decorator != null && path != null && TreeViewerUtil.isFiltering(viewer, path)) {
+ return TreeViewerUtil.getDecoratedImage(image, viewer, path);
+ }
+ }
+ return image;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.internal.navigator.NavigatorDecoratingLabelProvider#getColumnText(java.lang.Object, int)
+ */
+ @Override
+ public String getColumnText(Object element, int columnIndex) {
+ String text = super.getColumnText(element, columnIndex);
+ if (columnIndex == 0) {
+ IFilterable decorator = adaptFilterable(element);
+ if (text != null && decorator != null && path != null && TreeViewerUtil.isFiltering(viewer, path)) {
+ return TreeViewerUtil.getDecoratedText(text, viewer, path);
+ }
+ }
+ return text;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/adapters/EditorAdapterFactory.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/adapters/EditorAdapterFactory.java
index 48ff89d19..e8d52f957 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/adapters/EditorAdapterFactory.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/adapters/EditorAdapterFactory.java
@@ -1,11 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2011, 2014 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
+ * Wind River Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.tcf.te.ui.views.internal.adapters;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/adapters/ViewAdapterFactory.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/adapters/ViewAdapterFactory.java
index 1fd903366..693edf603 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/adapters/ViewAdapterFactory.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/adapters/ViewAdapterFactory.java
@@ -1,45 +1,45 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tcf.te.ui.views.internal.adapters;
-
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.tcf.te.ui.views.internal.View;
-import org.eclipse.ui.navigator.CommonViewer;
-
-/**
- * The adapter factory that adapts the target explorer view to its common viewer.
- */
-public class ViewAdapterFactory implements IAdapterFactory {
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
- */
- @Override
- public Object getAdapter(Object adaptableObject, Class adapterType) {
- if(adaptableObject instanceof View) {
- if(CommonViewer.class.equals(adapterType)) {
- View view = (View) adaptableObject;
- return view.getAdapter(CommonViewer.class);
- }
- }
- return null;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdapterFactory#getAdapterList()
- */
- @Override
- public Class[] getAdapterList() {
- return new Class[]{CommonViewer.class};
- }
-
-}
+/*******************************************************************************
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.views.internal.adapters;
+
+import org.eclipse.core.runtime.IAdapterFactory;
+import org.eclipse.tcf.te.ui.views.internal.View;
+import org.eclipse.ui.navigator.CommonViewer;
+
+/**
+ * The adapter factory that adapts the target explorer view to its common viewer.
+ */
+public class ViewAdapterFactory implements IAdapterFactory {
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.runtime.IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
+ */
+ @Override
+ public Object getAdapter(Object adaptableObject, Class adapterType) {
+ if(adaptableObject instanceof View) {
+ if(CommonViewer.class.equals(adapterType)) {
+ View view = (View) adaptableObject;
+ return view.getAdapter(CommonViewer.class);
+ }
+ }
+ return null;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.runtime.IAdapterFactory#getAdapterList()
+ */
+ @Override
+ public Class[] getAdapterList() {
+ return new Class[]{CommonViewer.class};
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/categories/AbstractCategoryContributionItem.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/categories/AbstractCategoryContributionItem.java
index f54d967ec..a297ecafa 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/categories/AbstractCategoryContributionItem.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/categories/AbstractCategoryContributionItem.java
@@ -1,11 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2012, 2013 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
+ * Wind River Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.tcf.te.ui.views.internal.categories;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/categories/CategoryFactory.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/categories/CategoryFactory.java
index cb9f998ab..83b777ab1 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/categories/CategoryFactory.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/categories/CategoryFactory.java
@@ -1,11 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2012, 2013 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
+ * Wind River Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.tcf.te.ui.views.internal.categories;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/categories/CategoryManager.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/categories/CategoryManager.java
index 173461c46..60b7f7813 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/categories/CategoryManager.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/categories/CategoryManager.java
@@ -1,11 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2012, 2013 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
+ * Wind River Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.tcf.te.ui.views.internal.categories;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/categories/CategoryPropertyTester.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/categories/CategoryPropertyTester.java
index d61218544..9b17a1a2f 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/categories/CategoryPropertyTester.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/categories/CategoryPropertyTester.java
@@ -1,11 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2011, 2013 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
+ * Wind River Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.tcf.te.ui.views.internal.categories;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/extensions/AbstractEditorPageBindingsElement.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/extensions/AbstractEditorPageBindingsElement.java
index 470d7ac2a..ac0662c5e 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/extensions/AbstractEditorPageBindingsElement.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/extensions/AbstractEditorPageBindingsElement.java
@@ -1,66 +1,66 @@
-/*******************************************************************************
- * Copyright (c) 2013 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tcf.te.ui.views.internal.extensions;
-
-import org.eclipse.core.expressions.Expression;
-import org.eclipse.core.expressions.ExpressionConverter;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.tcf.te.runtime.extensions.ExecutableExtension;
-
-/**
- * Abstract page bindings element implementation.
- */
-public class AbstractEditorPageBindingsElement extends ExecutableExtension {
- // The mandatory page identifier
- private String pageId;
- // The converted expression
- private Expression expression;
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.extensions.ExecutableExtension#doSetInitializationData(org.eclipse.core.runtime.IConfigurationElement, java.lang.String, java.lang.Object)
- */
- @Override
- public void doSetInitializationData(IConfigurationElement config, String propertyName, Object data) throws CoreException {
- super.doSetInitializationData(config, propertyName, data);
-
- // Initialize the page id field by reading the <pageId> extension attribute.
- // Throws an exception if the id is empty or null.
- pageId = config != null ? config.getAttribute("pageId") : null; //$NON-NLS-1$
- if (pageId == null || "".equals(pageId.trim())) { //$NON-NLS-1$
- throw createMissingMandatoryAttributeException("pageId", config.getContributor().getName()); //$NON-NLS-1$
- }
-
- // Read the sub elements of the extension
- IConfigurationElement[] children = config != null ? config.getChildren() : null;
- // The "enablement" element is the only expected one
- if (children != null && children.length > 0) {
- expression = ExpressionConverter.getDefault().perform(children[0]);
- }
- }
-
- /**
- * Returns the editor page id which is associated with this binding.
- *
- * @return The editor page id.
- */
- public String getPageId() {
- return pageId;
- }
-
- /**
- * Returns the enablement expression which is associated with this binding.
- *
- * @return The enablement expression or <code>null</code>.
- */
- public Expression getEnablement() {
- return expression;
- }
-}
+/*******************************************************************************
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.views.internal.extensions;
+
+import org.eclipse.core.expressions.Expression;
+import org.eclipse.core.expressions.ExpressionConverter;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.tcf.te.runtime.extensions.ExecutableExtension;
+
+/**
+ * Abstract page bindings element implementation.
+ */
+public class AbstractEditorPageBindingsElement extends ExecutableExtension {
+ // The mandatory page identifier
+ private String pageId;
+ // The converted expression
+ private Expression expression;
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.extensions.ExecutableExtension#doSetInitializationData(org.eclipse.core.runtime.IConfigurationElement, java.lang.String, java.lang.Object)
+ */
+ @Override
+ public void doSetInitializationData(IConfigurationElement config, String propertyName, Object data) throws CoreException {
+ super.doSetInitializationData(config, propertyName, data);
+
+ // Initialize the page id field by reading the <pageId> extension attribute.
+ // Throws an exception if the id is empty or null.
+ pageId = config != null ? config.getAttribute("pageId") : null; //$NON-NLS-1$
+ if (pageId == null || "".equals(pageId.trim())) { //$NON-NLS-1$
+ throw createMissingMandatoryAttributeException("pageId", config.getContributor().getName()); //$NON-NLS-1$
+ }
+
+ // Read the sub elements of the extension
+ IConfigurationElement[] children = config != null ? config.getChildren() : null;
+ // The "enablement" element is the only expected one
+ if (children != null && children.length > 0) {
+ expression = ExpressionConverter.getDefault().perform(children[0]);
+ }
+ }
+
+ /**
+ * Returns the editor page id which is associated with this binding.
+ *
+ * @return The editor page id.
+ */
+ public String getPageId() {
+ return pageId;
+ }
+
+ /**
+ * Returns the enablement expression which is associated with this binding.
+ *
+ * @return The enablement expression or <code>null</code>.
+ */
+ public Expression getEnablement() {
+ return expression;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/preferences/IPreferenceKeys.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/preferences/IPreferenceKeys.java
index 0fc6705bb..658b1e205 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/preferences/IPreferenceKeys.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/preferences/IPreferenceKeys.java
@@ -1,11 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2012, 2013 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
+ * Wind River Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.tcf.te.ui.views.internal.preferences;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/preferences/PreferencesInitializer.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/preferences/PreferencesInitializer.java
index 3bbbc79c9..f39eb80c3 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/preferences/PreferencesInitializer.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/preferences/PreferencesInitializer.java
@@ -1,11 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2012, 2013 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
+ * Wind River Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.tcf.te.ui.views.internal.preferences;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/quickfilter/EditorQuickFilterTester.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/quickfilter/EditorQuickFilterTester.java
index 2fde1982b..dee583987 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/quickfilter/EditorQuickFilterTester.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/quickfilter/EditorQuickFilterTester.java
@@ -1,11 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2011, 2013 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
+ * Wind River Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.tcf.te.ui.views.internal.quickfilter;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/quickfilter/QuickFilterTester.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/quickfilter/QuickFilterTester.java
index 4a01c126e..a3f8368fa 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/quickfilter/QuickFilterTester.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/quickfilter/QuickFilterTester.java
@@ -1,124 +1,124 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tcf.te.ui.views.internal.quickfilter;
-
-import org.eclipse.core.expressions.PropertyTester;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.TreePath;
-import org.eclipse.jface.viewers.TreeSelection;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.tcf.te.core.interfaces.IFilterable;
-import org.eclipse.tcf.te.ui.utils.TreeViewerUtil;
-
-/**
- * The property tester to test if the current tree viewer is filterable/filtering.
- */
-public class QuickFilterTester extends PropertyTester {
-
- public QuickFilterTester() {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.expressions.IPropertyTester#test(java.lang.Object, java.lang.String, java.lang.Object[], java.lang.Object)
- */
- @Override
- public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
- if(receiver instanceof TreeViewer) {
- TreeViewer viewer = (TreeViewer) receiver;
- if(property.equals("isFilterable")) { //$NON-NLS-1$
- return isFilterable(viewer);
- }
- if(property.equals("isFiltering")) { //$NON-NLS-1$
- return TreeViewerUtil.isFiltering(viewer);
- }
- }
- return false;
- }
-
- /**
- * If the current the tree viewer is filterable.
- *
- * @param viewer The tree viewer.
- * @return true if it is filterable.
- */
- private boolean isFilterable(TreeViewer viewer) {
- ISelection obj = viewer.getSelection();
- if(!obj.isEmpty() && obj instanceof TreeSelection) {
- TreeSelection selection = (TreeSelection) obj;
- if(selection.size() == 1) {
- TreePath[] paths = selection.getPaths();
- TreePath path = paths[0];
- Object element = path.getLastSegment();
- if(element != null && adaptFilterable(element) != null) {
- return isEligible(path, viewer);
- }
- }
- }
- return false;
- }
-
- /**
- * Test if the root for the tree viewer is eligible as a root path
- * of a quick filter.
- *
- * @param root The root path to be tested.
- * @param viewer The tree viewer to be filtered.
- * @return true if it is eligible as a root path or else false.
- */
- private boolean isEligible(TreePath root, TreeViewer viewer) {
- if (viewer.getExpandedState(root)) {
- return hasChildren(root, viewer);
- }
- return false;
- }
-
- /**
- * If the root path has children visible.
- *
- * @param root The root path.
- * @param viewer The tree viewer.
- * @return true if it has children visible.
- */
- private boolean hasChildren(TreePath root, TreeViewer viewer) {
- ITreeContentProvider contentProvider = (ITreeContentProvider) viewer.getContentProvider();
- Object rootElement = root.getLastSegment();
- Object[] children = contentProvider.getChildren(rootElement);
- if (children != null && children.length > 0) {
- ViewerFilter[] filters = viewer.getFilters();
- if (filters != null && filters.length > 0) {
- for (ViewerFilter filter : filters) {
- children = filter.filter(viewer, rootElement, children);
- if (children == null || children.length == 0) break;
- }
- }
- return children != null && children.length > 0;
- }
- return false;
- }
-
- private IFilterable adaptFilterable(Object element) {
- IFilterable decorator = null;
- if(element instanceof IFilterable) {
- decorator = (IFilterable) element;
- }
- if(decorator == null && element instanceof IAdaptable) {
- decorator = (IFilterable) ((IAdaptable)element).getAdapter(IFilterable.class);
- }
- if(decorator == null) {
- decorator = (IFilterable) Platform.getAdapterManager().getAdapter(element, IFilterable.class);
- }
- return decorator;
- }
-}
+/*******************************************************************************
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.views.internal.quickfilter;
+
+import org.eclipse.core.expressions.PropertyTester;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.TreePath;
+import org.eclipse.jface.viewers.TreeSelection;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.tcf.te.core.interfaces.IFilterable;
+import org.eclipse.tcf.te.ui.utils.TreeViewerUtil;
+
+/**
+ * The property tester to test if the current tree viewer is filterable/filtering.
+ */
+public class QuickFilterTester extends PropertyTester {
+
+ public QuickFilterTester() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.expressions.IPropertyTester#test(java.lang.Object, java.lang.String, java.lang.Object[], java.lang.Object)
+ */
+ @Override
+ public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
+ if(receiver instanceof TreeViewer) {
+ TreeViewer viewer = (TreeViewer) receiver;
+ if(property.equals("isFilterable")) { //$NON-NLS-1$
+ return isFilterable(viewer);
+ }
+ if(property.equals("isFiltering")) { //$NON-NLS-1$
+ return TreeViewerUtil.isFiltering(viewer);
+ }
+ }
+ return false;
+ }
+
+ /**
+ * If the current the tree viewer is filterable.
+ *
+ * @param viewer The tree viewer.
+ * @return true if it is filterable.
+ */
+ private boolean isFilterable(TreeViewer viewer) {
+ ISelection obj = viewer.getSelection();
+ if(!obj.isEmpty() && obj instanceof TreeSelection) {
+ TreeSelection selection = (TreeSelection) obj;
+ if(selection.size() == 1) {
+ TreePath[] paths = selection.getPaths();
+ TreePath path = paths[0];
+ Object element = path.getLastSegment();
+ if(element != null && adaptFilterable(element) != null) {
+ return isEligible(path, viewer);
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Test if the root for the tree viewer is eligible as a root path
+ * of a quick filter.
+ *
+ * @param root The root path to be tested.
+ * @param viewer The tree viewer to be filtered.
+ * @return true if it is eligible as a root path or else false.
+ */
+ private boolean isEligible(TreePath root, TreeViewer viewer) {
+ if (viewer.getExpandedState(root)) {
+ return hasChildren(root, viewer);
+ }
+ return false;
+ }
+
+ /**
+ * If the root path has children visible.
+ *
+ * @param root The root path.
+ * @param viewer The tree viewer.
+ * @return true if it has children visible.
+ */
+ private boolean hasChildren(TreePath root, TreeViewer viewer) {
+ ITreeContentProvider contentProvider = (ITreeContentProvider) viewer.getContentProvider();
+ Object rootElement = root.getLastSegment();
+ Object[] children = contentProvider.getChildren(rootElement);
+ if (children != null && children.length > 0) {
+ ViewerFilter[] filters = viewer.getFilters();
+ if (filters != null && filters.length > 0) {
+ for (ViewerFilter filter : filters) {
+ children = filter.filter(viewer, rootElement, children);
+ if (children == null || children.length == 0) break;
+ }
+ }
+ return children != null && children.length > 0;
+ }
+ return false;
+ }
+
+ private IFilterable adaptFilterable(Object element) {
+ IFilterable decorator = null;
+ if(element instanceof IFilterable) {
+ decorator = (IFilterable) element;
+ }
+ if(decorator == null && element instanceof IAdaptable) {
+ decorator = (IFilterable) ((IAdaptable)element).getAdapter(IFilterable.class);
+ }
+ if(decorator == null) {
+ decorator = (IFilterable) Platform.getAdapterManager().getAdapter(element, IFilterable.class);
+ }
+ return decorator;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/services/MenuService.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/services/MenuService.java
index 09a13efda..7d74cae18 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/services/MenuService.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/services/MenuService.java
@@ -1,11 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2012, 2013 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
+ * Wind River Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.tcf.te.ui.views.internal.services;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/listeners/AbstractWindowListener.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/listeners/AbstractWindowListener.java
index 8addd6a99..dc534b017 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/listeners/AbstractWindowListener.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/listeners/AbstractWindowListener.java
@@ -1,11 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2013 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
+ * Wind River Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.tcf.te.ui.views.listeners;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/listeners/WorkbenchPartListener.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/listeners/WorkbenchPartListener.java
index 7e8b38a69..150294147 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/listeners/WorkbenchPartListener.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/listeners/WorkbenchPartListener.java
@@ -1,114 +1,114 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tcf.te.ui.views.listeners;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.tcf.te.ui.views.interfaces.IUIConstants;
-import org.eclipse.ui.IPartListener2;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchPartReference;
-import org.eclipse.ui.contexts.IContextActivation;
-import org.eclipse.ui.contexts.IContextService;
-
-/**
- * The part listener implementation. Takes care of
- * activation and deactivation of key binding contexts.
- */
-public class WorkbenchPartListener implements IPartListener2 {
-
- // The context activations per workbench part reference
- private final Map<IWorkbenchPartReference, IContextActivation> activations = new HashMap<IWorkbenchPartReference, IContextActivation>();
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IPartListener2#partBroughtToTop(org.eclipse.ui.IWorkbenchPartReference)
- */
- @Override
- public void partBroughtToTop(IWorkbenchPartReference partRef) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IPartListener2#partOpened(org.eclipse.ui.IWorkbenchPartReference)
- */
- @Override
- public void partOpened(IWorkbenchPartReference partRef) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IPartListener2#partClosed(org.eclipse.ui.IWorkbenchPartReference)
- */
- @Override
- public void partClosed(IWorkbenchPartReference partRef) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IPartListener2#partVisible(org.eclipse.ui.IWorkbenchPartReference)
- */
- @Override
- public void partVisible(IWorkbenchPartReference partRef) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IPartListener2#partHidden(org.eclipse.ui.IWorkbenchPartReference)
- */
- @Override
- public void partHidden(IWorkbenchPartReference partRef) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IPartListener2#partActivated(org.eclipse.ui.IWorkbenchPartReference)
- */
- @Override
- public void partActivated(IWorkbenchPartReference partRef) {
- if (IUIConstants.ID_EXPLORER.equals(partRef.getId()) ||
- IUIConstants.ID_EDITOR.equals(partRef.getId())) {
- IWorkbenchPart part = partRef.getPart(false);
- if (part != null && part.getSite() != null) {
- IContextService service = (IContextService)part.getSite().getService(IContextService.class);
- if (service != null) {
- IContextActivation activation = service.activateContext(partRef.getId());
- if (activation != null) {
- activations.put(partRef, activation);
- } else {
- activations.remove(partRef);
- }
- }
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IPartListener2#partDeactivated(org.eclipse.ui.IWorkbenchPartReference)
- */
- @Override
- public void partDeactivated(IWorkbenchPartReference partRef) {
- if (IUIConstants.ID_EXPLORER.equals(partRef.getId())) {
- IWorkbenchPart part = partRef.getPart(false);
- if (part != null && part.getSite() != null) {
- IContextService service = (IContextService)part.getSite().getService(IContextService.class);
- if (service != null) {
- IContextActivation activation = activations.remove(partRef);
- if (activation != null) {
- service.deactivateContext(activation);
- }
- }
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IPartListener2#partInputChanged(org.eclipse.ui.IWorkbenchPartReference)
- */
- @Override
- public void partInputChanged(IWorkbenchPartReference partRef) {
- }
-
-}
+/*******************************************************************************
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.views.listeners;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.tcf.te.ui.views.interfaces.IUIConstants;
+import org.eclipse.ui.IPartListener2;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchPartReference;
+import org.eclipse.ui.contexts.IContextActivation;
+import org.eclipse.ui.contexts.IContextService;
+
+/**
+ * The part listener implementation. Takes care of
+ * activation and deactivation of key binding contexts.
+ */
+public class WorkbenchPartListener implements IPartListener2 {
+
+ // The context activations per workbench part reference
+ private final Map<IWorkbenchPartReference, IContextActivation> activations = new HashMap<IWorkbenchPartReference, IContextActivation>();
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IPartListener2#partBroughtToTop(org.eclipse.ui.IWorkbenchPartReference)
+ */
+ @Override
+ public void partBroughtToTop(IWorkbenchPartReference partRef) {
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IPartListener2#partOpened(org.eclipse.ui.IWorkbenchPartReference)
+ */
+ @Override
+ public void partOpened(IWorkbenchPartReference partRef) {
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IPartListener2#partClosed(org.eclipse.ui.IWorkbenchPartReference)
+ */
+ @Override
+ public void partClosed(IWorkbenchPartReference partRef) {
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IPartListener2#partVisible(org.eclipse.ui.IWorkbenchPartReference)
+ */
+ @Override
+ public void partVisible(IWorkbenchPartReference partRef) {
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IPartListener2#partHidden(org.eclipse.ui.IWorkbenchPartReference)
+ */
+ @Override
+ public void partHidden(IWorkbenchPartReference partRef) {
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IPartListener2#partActivated(org.eclipse.ui.IWorkbenchPartReference)
+ */
+ @Override
+ public void partActivated(IWorkbenchPartReference partRef) {
+ if (IUIConstants.ID_EXPLORER.equals(partRef.getId()) ||
+ IUIConstants.ID_EDITOR.equals(partRef.getId())) {
+ IWorkbenchPart part = partRef.getPart(false);
+ if (part != null && part.getSite() != null) {
+ IContextService service = (IContextService)part.getSite().getService(IContextService.class);
+ if (service != null) {
+ IContextActivation activation = service.activateContext(partRef.getId());
+ if (activation != null) {
+ activations.put(partRef, activation);
+ } else {
+ activations.remove(partRef);
+ }
+ }
+ }
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IPartListener2#partDeactivated(org.eclipse.ui.IWorkbenchPartReference)
+ */
+ @Override
+ public void partDeactivated(IWorkbenchPartReference partRef) {
+ if (IUIConstants.ID_EXPLORER.equals(partRef.getId())) {
+ IWorkbenchPart part = partRef.getPart(false);
+ if (part != null && part.getSite() != null) {
+ IContextService service = (IContextService)part.getSite().getService(IContextService.class);
+ if (service != null) {
+ IContextActivation activation = activations.remove(partRef);
+ if (activation != null) {
+ service.deactivateContext(activation);
+ }
+ }
+ }
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IPartListener2#partInputChanged(org.eclipse.ui.IWorkbenchPartReference)
+ */
+ @Override
+ public void partInputChanged(IWorkbenchPartReference partRef) {
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/listeners/WorkbenchPerspectiveListener.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/listeners/WorkbenchPerspectiveListener.java
index 88a5ac628..2fbcaade1 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/listeners/WorkbenchPerspectiveListener.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/listeners/WorkbenchPerspectiveListener.java
@@ -1,27 +1,27 @@
-/*******************************************************************************
- * Copyright (c) 2012 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tcf.te.ui.views.listeners;
-
-import org.eclipse.ui.IPerspectiveDescriptor;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PerspectiveAdapter;
-
-/**
- * The perspective listener implementation.
- */
-public class WorkbenchPerspectiveListener extends PerspectiveAdapter {
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.PerspectiveAdapter#perspectiveActivated(org.eclipse.ui.IWorkbenchPage, org.eclipse.ui.IPerspectiveDescriptor)
- */
- @Override
- public void perspectiveActivated(IWorkbenchPage page, IPerspectiveDescriptor perspective) {
- }
-}
+/*******************************************************************************
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.views.listeners;
+
+import org.eclipse.ui.IPerspectiveDescriptor;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PerspectiveAdapter;
+
+/**
+ * The perspective listener implementation.
+ */
+public class WorkbenchPerspectiveListener extends PerspectiveAdapter {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.PerspectiveAdapter#perspectiveActivated(org.eclipse.ui.IWorkbenchPage, org.eclipse.ui.IPerspectiveDescriptor)
+ */
+ @Override
+ public void perspectiveActivated(IWorkbenchPage page, IPerspectiveDescriptor perspective) {
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/listeners/WorkbenchWindowListener.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/listeners/WorkbenchWindowListener.java
index a89aad722..9c4e5dd9e 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/listeners/WorkbenchWindowListener.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/listeners/WorkbenchWindowListener.java
@@ -1,11 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2011, 2013 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
+ * Wind River Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.tcf.te.ui.views.listeners;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/navigator/DelegatingLabelProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/navigator/DelegatingLabelProvider.java
index bd5f276a5..8959ec13d 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/navigator/DelegatingLabelProvider.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/navigator/DelegatingLabelProvider.java
@@ -1,11 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2011, 2013 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
+ * Wind River Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.tcf.te.ui.views.navigator;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/navigator/LabelProviderDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/navigator/LabelProviderDelegate.java
index b1a19922c..978ec10cc 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/navigator/LabelProviderDelegate.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/navigator/LabelProviderDelegate.java
@@ -1,11 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2012, 2013 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
+ * Wind River Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.tcf.te.ui.views.navigator;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/navigator/ViewerContentProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/navigator/ViewerContentProvider.java
index 4a35b7036..e84908225 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/navigator/ViewerContentProvider.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/navigator/ViewerContentProvider.java
@@ -1,11 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2012, 2013 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
+ * Wind River Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.tcf.te.ui.views.navigator;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/navigator/ViewerSorter.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/navigator/ViewerSorter.java
index 136ebd5ce..00f259a21 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/navigator/ViewerSorter.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/navigator/ViewerSorter.java
@@ -1,11 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2012, 2014 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
+ * Wind River Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.tcf.te.ui.views.navigator;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/navigator/nodes/NewWizardNode.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/navigator/nodes/NewWizardNode.java
index 6fd578290..99a2eaa8a 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/navigator/nodes/NewWizardNode.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/navigator/nodes/NewWizardNode.java
@@ -1,13 +1,12 @@
-/**
- * NewWizardNode.java
- * Created on 28.06.2012
- *
- * Copyright (c) 2012, 2013 Wind River Systems, Inc.
+/*******************************************************************************
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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
*
- * The right to copy, distribute, modify, or otherwise make use
- * of this software may be licensed only pursuant to the terms
- * of an applicable Wind River license agreement.
- */
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
package org.eclipse.tcf.te.ui.views.navigator.nodes;
import org.eclipse.core.runtime.Assert;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/nls/Messages.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/nls/Messages.java
index 1f513ba59..401a83751 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/nls/Messages.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/nls/Messages.java
@@ -1,11 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2011, 2014 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
+ * Wind River Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.tcf.te.ui.views.nls;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/nls/Messages.properties b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/nls/Messages.properties
index 9497bb25f..11c3b45a5 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/nls/Messages.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/nls/Messages.properties
@@ -1,11 +1,11 @@
###############################################################################
-# Copyright (c) 2012, 2014 Wind River Systems, Inc. and others. All rights reserved.
+# Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
-# Wind River Systems - initial API and implementation
+# Wind River Systems - initial API and implementation
###############################################################################
# ***** Action Provider *****
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/perspective/PerspectiveFactory.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/perspective/PerspectiveFactory.java
index 8ac85753d..d62e45a93 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/perspective/PerspectiveFactory.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/perspective/PerspectiveFactory.java
@@ -1,11 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2011, 2013 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
+ * Wind River Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.tcf.te.ui.views.perspective;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/sections/AbstractContextSelectorSection.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/sections/AbstractContextSelectorSection.java
index bc266bdc2..d96273ed8 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/sections/AbstractContextSelectorSection.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/sections/AbstractContextSelectorSection.java
@@ -1,11 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2012, 2013 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
+ * Wind River Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.tcf.te.ui.views.sections;

Back to the top