Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Schwarz2013-08-14 08:00:53 -0400
committerTobias Schwarz2013-08-14 08:00:53 -0400
commit6667513805082cb40b15d4b45194617e29b76a53 (patch)
tree5e5b63da1a345ddee1833f086c20586d5a97d2c8
parentee9b181ea290f19ad5c918edc8ec5a9150b05449 (diff)
downloadorg.eclipse.tcf-6667513805082cb40b15d4b45194617e29b76a53.tar.gz
org.eclipse.tcf-6667513805082cb40b15d4b45194617e29b76a53.tar.xz
org.eclipse.tcf-6667513805082cb40b15d4b45194617e29b76a53.zip
Target Explorer: rework label provider delegate handling
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/interfaces/IDecoratable.java18
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/handler/EditorHandlerDelegate.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/wizards/TargetPatternFilter.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/wizards/TargetSelectionPage.java6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/nodes/IPeerModel.java3
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/plugin.xml2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/editor/tree/ContentProvider.java9
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/handler/EditorHandlerDelegate.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/navigator/runtime/ContentProvider.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/navigator/runtime/ContentProviderDelegate.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/META-INF/MANIFEST.MF3
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/PeerAction.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/plugin.xml25
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/controls/ContextSelectorSectionControl.java6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/dialogs/AgentSelectionDialog.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/adapters/AdapterFactory.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/ContentProvider.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/ContentProviderDelegate.java)8
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/PeerLabelProviderDelegate.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/DelegatingLabelProvider.java)99
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/wizards/pages/PeerExportWizardPage.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/wizards/pages/PeerImportWizardPage.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/plugin.xml1975
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/schema/labelProviderDelegates.exsd7
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/extensions/LabelProviderDelegateExtensionPointManager.java34
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/navigator/DelegatingLabelProvider.java104
23 files changed, 1223 insertions, 1094 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/interfaces/IDecoratable.java b/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/interfaces/IDecoratable.java
new file mode 100644
index 000000000..aa19356d1
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/interfaces/IDecoratable.java
@@ -0,0 +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.core.interfaces;
+
+/**
+ * Interface to mark a node as decoratable by the DelegatingLabelProvider.
+ */
+public interface IDecoratable {
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/handler/EditorHandlerDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/handler/EditorHandlerDelegate.java
index 41e8953d3..53f28f5f2 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/handler/EditorHandlerDelegate.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/handler/EditorHandlerDelegate.java
@@ -61,7 +61,7 @@ public class EditorHandlerDelegate implements IEditorHandlerDelegate {
viewer.setSelection(new StructuredSelection(element), true);
}
}
- else if (formEditor instanceof Editor) {
+ else if (page == null && formEditor instanceof Editor) {
((Editor)formEditor).setActivePage(0);
}
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/wizards/TargetPatternFilter.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/wizards/TargetPatternFilter.java
index 32d7a10b7..148d55b61 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/wizards/TargetPatternFilter.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/wizards/TargetPatternFilter.java
@@ -12,7 +12,7 @@ package org.eclipse.tcf.te.tcf.filesystem.ui.internal.wizards;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
-import org.eclipse.tcf.te.tcf.ui.navigator.DelegatingLabelProvider;
+import org.eclipse.tcf.te.ui.views.navigator.DelegatingLabelProvider;
import org.eclipse.ui.dialogs.PatternFilter;
/**
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/wizards/TargetSelectionPage.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/wizards/TargetSelectionPage.java
index 555d77e5d..1bb6c1056 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/wizards/TargetSelectionPage.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/wizards/TargetSelectionPage.java
@@ -40,10 +40,10 @@ import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.ILocatorModel;
import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
import org.eclipse.tcf.te.tcf.locator.interfaces.services.ILocatorModelPeerNodeQueryService;
import org.eclipse.tcf.te.tcf.locator.model.Model;
-import org.eclipse.tcf.te.tcf.ui.navigator.ContentProviderDelegate;
-import org.eclipse.tcf.te.tcf.ui.navigator.DelegatingLabelProvider;
+import org.eclipse.tcf.te.tcf.ui.navigator.ContentProvider;
import org.eclipse.tcf.te.ui.activator.UIPlugin;
import org.eclipse.tcf.te.ui.interfaces.IUIConstants;
+import org.eclipse.tcf.te.ui.views.navigator.DelegatingLabelProvider;
import org.eclipse.tcf.te.ui.wizards.pages.AbstractValidatingWizardPage;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.dialogs.FilteredTree;
@@ -171,7 +171,7 @@ public class TargetSelectionPage extends AbstractValidatingWizardPage {
filteredTree.setLayoutData(layoutData);
treeViewer = filteredTree.getViewer();
- treeViewer.setContentProvider(new ContentProviderDelegate());
+ treeViewer.setContentProvider(new ContentProvider());
IBaseLabelProvider labelProvider = new DecoratingStyledCellLabelProvider(new TargetStyledLabelProvider(), new DelegatingLabelProvider(), null);
treeViewer.setLabelProvider(labelProvider);
treeViewer.setComparator(new TargetViewerComparator());
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/nodes/IPeerModel.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/nodes/IPeerModel.java
index 45b88afce..310dd1b5d 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/nodes/IPeerModel.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/nodes/IPeerModel.java
@@ -10,6 +10,7 @@
package org.eclipse.tcf.te.tcf.locator.interfaces.nodes;
import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.te.core.interfaces.IDecoratable;
import org.eclipse.tcf.te.runtime.model.interfaces.IContainerModelNode;
/**
@@ -19,7 +20,7 @@ import org.eclipse.tcf.te.runtime.model.interfaces.IContainerModelNode;
* <p>
* <b>Note:</b> Read and write access to the peer model must happen within the TCF dispatch thread.
*/
-public interface IPeerModel extends IContainerModelNode {
+public interface IPeerModel extends IContainerModelNode, IDecoratable {
/**
* Returns the parent locator model instance.
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/plugin.xml
index b619957a0..192d1fc11 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/plugin.xml
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/plugin.xml
@@ -64,7 +64,7 @@
<extension point="org.eclipse.ui.navigator.navigatorContent">
<navigatorContent
activeByDefault="false"
- contentProvider="org.eclipse.tcf.te.tcf.processes.ui.navigator.runtime.ContentProviderDelegate"
+ contentProvider="org.eclipse.tcf.te.tcf.processes.ui.navigator.runtime.ContentProvider"
icon="icons/obj16/process_root.gif"
id="org.eclipse.tcf.te.tcf.processes.ui.navigator.content"
labelProvider="org.eclipse.tcf.te.tcf.processes.ui.navigator.runtime.LabelProviderDelegate"
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/editor/tree/ContentProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/editor/tree/ContentProvider.java
index a557ac2b2..b26f13340 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/editor/tree/ContentProvider.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/editor/tree/ContentProvider.java
@@ -13,17 +13,16 @@ import org.eclipse.jface.viewers.Viewer;
import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
import org.eclipse.tcf.te.tcf.processes.core.model.ModelManager;
import org.eclipse.tcf.te.tcf.processes.core.model.interfaces.runtime.IRuntimeModel;
-import org.eclipse.tcf.te.tcf.processes.ui.navigator.runtime.ContentProviderDelegate;
/**
* Process tree control content provider implementation.
*/
-public class ContentProvider extends ContentProviderDelegate {
+public class ContentProvider extends org.eclipse.tcf.te.tcf.processes.ui.navigator.runtime.ContentProvider {
// The target's peer model.
private IPeerModel peerModel;
/* (non-Javadoc)
- * @see org.eclipse.tcf.te.tcf.processes.ui.navigator.runtime.ContentProviderDelegate#dispose()
+ * @see org.eclipse.tcf.te.tcf.processes.ui.navigator.runtime.ContentProvider#dispose()
*/
@Override
public void dispose() {
@@ -38,7 +37,7 @@ public class ContentProvider extends ContentProviderDelegate {
}
/* (non-Javadoc)
- * @see org.eclipse.tcf.te.tcf.processes.ui.navigator.runtime.ContentProviderDelegate#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
+ * @see org.eclipse.tcf.te.tcf.processes.ui.navigator.runtime.ContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
*/
@Override
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
@@ -49,7 +48,7 @@ public class ContentProvider extends ContentProviderDelegate {
}
/* (non-Javadoc)
- * @see org.eclipse.tcf.te.tcf.processes.ui.navigator.runtime.ContentProviderDelegate#isRuntimeModelNodeVisible()
+ * @see org.eclipse.tcf.te.tcf.processes.ui.navigator.runtime.ContentProvider#isRuntimeModelNodeVisible()
*/
@Override
protected boolean isRuntimeModelNodeVisible() {
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/handler/EditorHandlerDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/handler/EditorHandlerDelegate.java
index efd9674b7..10d56d09d 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/handler/EditorHandlerDelegate.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/handler/EditorHandlerDelegate.java
@@ -45,7 +45,7 @@ public class EditorHandlerDelegate extends AbstractPeerModelEditorHandlerDelegat
viewer.setSelection(new StructuredSelection(element), true);
}
}
- else if (formEditor instanceof Editor) {
+ else if (page == null && formEditor instanceof Editor) {
((Editor)formEditor).setActivePage(0);
}
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/navigator/runtime/ContentProviderDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/navigator/runtime/ContentProvider.java
index 7f7243dbc..841478d96 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/navigator/runtime/ContentProviderDelegate.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/navigator/runtime/ContentProvider.java
@@ -42,7 +42,7 @@ import org.eclipse.tcf.te.tcf.processes.ui.navigator.events.TreeViewerListener;
/**
* Runtime model content provider delegate implementation.
*/
-public class ContentProviderDelegate implements ITreeContentProvider {
+public class ContentProvider implements ITreeContentProvider {
private final static Object[] NO_ELEMENTS = new Object[0];
// Reference to the tree listener
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/META-INF/MANIFEST.MF
index ef1f0b69e..49cfca07a 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/META-INF/MANIFEST.MF
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/META-INF/MANIFEST.MF
@@ -18,7 +18,8 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="3.8.0",
org.eclipse.tcf.te.tcf.ui;bundle-version="1.1.0",
org.eclipse.tcf.te.tcf.ui.console;bundle-version="1.1.0",
org.eclipse.tcf.te.ui;bundle-version="1.1.0",
- org.eclipse.tcf.te.ui.swt;bundle-version="1.1.0"
+ org.eclipse.tcf.te.ui.swt;bundle-version="1.1.0",
+ org.eclipse.tcf.te.ui.views;bundle-version="1.1.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Bundle-Localization: plugin
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/PeerAction.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/PeerAction.java
index 7c01be8f6..7882de782 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/PeerAction.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/PeerAction.java
@@ -12,8 +12,8 @@ package org.eclipse.tcf.te.tcf.ui.views.scriptpad.actions;
import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.action.Action;
import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
-import org.eclipse.tcf.te.tcf.ui.navigator.DelegatingLabelProvider;
import org.eclipse.tcf.te.tcf.ui.views.scriptpad.ScriptPad;
+import org.eclipse.tcf.te.ui.views.navigator.DelegatingLabelProvider;
import org.eclipse.ui.IViewPart;
/**
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/plugin.xml
index 71ddaea38..a40e396f7 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/plugin.xml
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/plugin.xml
@@ -86,10 +86,10 @@
<extension point="org.eclipse.ui.navigator.navigatorContent">
<navigatorContent
activeByDefault="true"
- contentProvider="org.eclipse.tcf.te.tcf.ui.navigator.ContentProviderDelegate"
+ contentProvider="org.eclipse.tcf.te.tcf.ui.navigator.ContentProvider"
icon="icons/obj16/rootNode_obj.gif"
id="org.eclipse.tcf.te.tcf.ui.navigator.content"
- labelProvider="org.eclipse.tcf.te.tcf.ui.navigator.DelegatingLabelProvider"
+ labelProvider="org.eclipse.tcf.te.ui.views.navigator.DelegatingLabelProvider"
name="%navigatorContent.name"
priority="normal">
<triggerPoints>
@@ -159,17 +159,30 @@
</commonFilter>
</extension>
+<!-- Label provider delegates -->
+ <extension point="org.eclipse.tcf.te.ui.views.labelProviderDelegates">
+ <labelProviderDelegate
+ class="org.eclipse.tcf.te.tcf.ui.navigator.PeerLabelProviderDelegate"
+ id="org.eclipse.tcf.te.tcf.ui.peerLabelProviderDelegate">
+ <enablement>
+ <or>
+ <instanceof value="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel"/>
+ <instanceof value="org.eclipse.tcf.protocol.IPeer"/>
+ <instanceof value="org.eclipse.tcf.te.tcf.ui.navigator.nodes.PeerRedirectorGroupNode"/>
+ </or>
+ </enablement>
+ </labelProviderDelegate>
+ </extension>
+
<!-- Decorator contributions -->
<extension point="org.eclipse.ui.decorators">
<decorator
- class="org.eclipse.tcf.te.tcf.ui.navigator.DelegatingLabelProvider"
+ class="org.eclipse.tcf.te.ui.views.navigator.DelegatingLabelProvider"
id="org.eclipse.tcf.te.tcf.ui.decorators.peerHost"
label="%peerhost.decorator.label"
state="true">
<enablement>
- <objectClass
- name="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel">
- </objectClass>
+ <objectClass name="org.eclipse.tcf.te.core.interfaces.IDecoratable"/>
</enablement>
</decorator>
</extension>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/controls/ContextSelectorSectionControl.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/controls/ContextSelectorSectionControl.java
index bec8576aa..85fad0345 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/controls/ContextSelectorSectionControl.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/controls/ContextSelectorSectionControl.java
@@ -15,9 +15,9 @@ import org.eclipse.jface.dialogs.IDialogPage;
import org.eclipse.jface.viewers.DecoratingLabelProvider;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.tcf.te.tcf.locator.model.Model;
-import org.eclipse.tcf.te.tcf.ui.navigator.ContentProviderDelegate;
-import org.eclipse.tcf.te.tcf.ui.navigator.DelegatingLabelProvider;
+import org.eclipse.tcf.te.tcf.ui.navigator.ContentProvider;
import org.eclipse.tcf.te.ui.views.controls.AbstractContextSelectorControl;
+import org.eclipse.tcf.te.ui.views.navigator.DelegatingLabelProvider;
import org.eclipse.tcf.te.ui.views.sections.AbstractContextSelectorSection;
/**
@@ -61,7 +61,7 @@ public class ContextSelectorSectionControl extends AbstractContextSelectorContro
*/
@Override
protected void doConfigureTreeContentAndLabelProvider(TreeViewer viewer) {
- viewer.setContentProvider(new ContentProviderDelegate(true));
+ viewer.setContentProvider(new ContentProvider(true));
DelegatingLabelProvider labelProvider = new DelegatingLabelProvider();
viewer.setLabelProvider(new DecoratingLabelProvider(labelProvider, labelProvider));
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/dialogs/AgentSelectionDialog.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/dialogs/AgentSelectionDialog.java
index 6e7cde58c..5bae72b8c 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/dialogs/AgentSelectionDialog.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/dialogs/AgentSelectionDialog.java
@@ -47,10 +47,10 @@ import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModelProperties;
import org.eclipse.tcf.te.tcf.locator.interfaces.services.ILocatorModelLookupService;
import org.eclipse.tcf.te.tcf.locator.model.Model;
import org.eclipse.tcf.te.tcf.ui.help.IContextHelpIds;
-import org.eclipse.tcf.te.tcf.ui.navigator.DelegatingLabelProvider;
import org.eclipse.tcf.te.tcf.ui.nls.Messages;
import org.eclipse.tcf.te.ui.jface.dialogs.CustomTitleAreaDialog;
import org.eclipse.tcf.te.ui.swt.SWTControlUtil;
+import org.eclipse.tcf.te.ui.views.navigator.DelegatingLabelProvider;
/**
* TCF agent selection dialog implementation.
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/adapters/AdapterFactory.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/adapters/AdapterFactory.java
index 27e8edd05..232c654eb 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/adapters/AdapterFactory.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/adapters/AdapterFactory.java
@@ -12,10 +12,10 @@ package org.eclipse.tcf.te.tcf.ui.internal.adapters;
import org.eclipse.core.runtime.IAdapterFactory;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
-import org.eclipse.tcf.te.tcf.ui.navigator.DelegatingLabelProvider;
import org.eclipse.tcf.te.ui.views.editor.EditorInput;
import org.eclipse.tcf.te.ui.views.interfaces.IEditorSaveAsAdapter;
import org.eclipse.tcf.te.ui.views.interfaces.categories.ICategorizable;
+import org.eclipse.tcf.te.ui.views.navigator.DelegatingLabelProvider;
import org.eclipse.ui.IPersistableElement;
/**
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/ContentProviderDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/ContentProvider.java
index e9b15b507..8e475f313 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/ContentProviderDelegate.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/ContentProvider.java
@@ -55,10 +55,10 @@ import org.eclipse.ui.navigator.INavigatorFilterService;
/**
- * Content provider delegate implementation.
+ * Content provider implementation.
*/
@SuppressWarnings("restriction")
-public class ContentProviderDelegate implements ICommonContentProvider, ITreePathContentProvider {
+public class ContentProvider implements ICommonContentProvider, ITreePathContentProvider {
private final static Object[] NO_ELEMENTS = new Object[0];
// The "Redirected Peers" filter id
@@ -84,7 +84,7 @@ public class ContentProviderDelegate implements ICommonContentProvider, ITreePat
/**
* Constructor.
*/
- public ContentProviderDelegate() {
+ public ContentProvider() {
this(false);
}
@@ -93,7 +93,7 @@ public class ContentProviderDelegate implements ICommonContentProvider, ITreePat
*
* @param showInvisible If <code>true</code>, {@link #getChildren(Object)} will include invisible nodes too.
*/
- public ContentProviderDelegate(boolean showInvisible) {
+ public ContentProvider(boolean showInvisible) {
super();
this.showInvisible = showInvisible;
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/DelegatingLabelProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/PeerLabelProviderDelegate.java
index d70571d3f..161dfb4ca 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/DelegatingLabelProvider.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/PeerLabelProviderDelegate.java
@@ -16,7 +16,6 @@ import java.util.concurrent.atomic.AtomicInteger;
import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.viewers.ILabelDecorator;
-import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.swt.graphics.Image;
import org.eclipse.tcf.protocol.IPeer;
@@ -32,28 +31,17 @@ import org.eclipse.tcf.te.tcf.ui.navigator.images.PeerImageDescriptor;
import org.eclipse.tcf.te.tcf.ui.navigator.nodes.PeerRedirectorGroupNode;
import org.eclipse.tcf.te.tcf.ui.nls.Messages;
import org.eclipse.tcf.te.ui.jface.images.AbstractImageDescriptor;
-import org.eclipse.tcf.te.ui.views.extensions.LabelProviderDelegateExtensionPointManager;
-
/**
* Label provider implementation.
*/
-public class DelegatingLabelProvider extends LabelProvider implements ILabelDecorator {
+public class PeerLabelProviderDelegate extends LabelProvider implements ILabelDecorator {
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.LabelProvider#getText(java.lang.Object)
*/
@Override
public String getText(final Object element) {
- ILabelProvider[] delegates = LabelProviderDelegateExtensionPointManager.getInstance().getDelegates(element, false);
-
- if (delegates != null && delegates.length > 0) {
- String text = delegates[0].getText(element);
- if (text != null) {
- return text;
- }
- }
-
if (element instanceof IPeerModel || element instanceof IPeer) {
StringBuilder builder = new StringBuilder();
@@ -111,7 +99,7 @@ public class DelegatingLabelProvider extends LabelProvider implements ILabelDeco
return Messages.RemotePeerDiscoveryRootNode_label;
}
- return ""; //$NON-NLS-1$
+ return super.getText(element);
}
/**
@@ -153,15 +141,6 @@ public class DelegatingLabelProvider extends LabelProvider implements ILabelDeco
*/
@Override
public Image getImage(final Object element) {
- ILabelProvider[] delegates = LabelProviderDelegateExtensionPointManager.getInstance().getDelegates(element, false);
-
- if (delegates != null && delegates.length > 0) {
- Image image = delegates[0].getImage(element);
- if (image != null) {
- return image;
- }
- }
-
if (element instanceof IPeerModel || element instanceof IPeer) {
final AtomicBoolean isStatic = new AtomicBoolean();
@@ -199,24 +178,14 @@ public class DelegatingLabelProvider extends LabelProvider implements ILabelDeco
*/
@Override
public Image decorateImage(Image image, Object element) {
- Image decoratedImage = null;
-
- if (image != null && element instanceof IPeerModel) {
- ILabelProvider[] delegates = LabelProviderDelegateExtensionPointManager.getInstance().getDelegates(element, false);
- if (delegates != null && delegates.length > 0) {
- if (delegates[0] instanceof ILabelDecorator) {
- Image candidate = ((ILabelDecorator)delegates[0]).decorateImage(image, element);
- if (candidate != null) image = candidate;
- }
- }
-
- boolean isStatic = ((IPeerModel)element).isStatic();
- if (!isStatic) {
- AbstractImageDescriptor descriptor = new PeerImageDescriptor(UIPlugin.getDefault().getImageRegistry(),
- image,
- (IPeerModel)element);
- decoratedImage = UIPlugin.getSharedImage(descriptor);
- }
+ Image decoratedImage = image;
+
+ if (image != null && element instanceof IPeerModel && !((IPeerModel)element).isStatic()) {
+ AbstractImageDescriptor descriptor = new PeerImageDescriptor(
+ UIPlugin.getDefault().getImageRegistry(),
+ image,
+ (IPeerModel)element);
+ decoratedImage = UIPlugin.getSharedImage(descriptor);
}
return decoratedImage;
@@ -229,21 +198,24 @@ public class DelegatingLabelProvider extends LabelProvider implements ILabelDeco
public String decorateText(final String text, final Object element) {
String label = text;
- ILabelProvider[] delegates = LabelProviderDelegateExtensionPointManager.getInstance().getDelegates(element, false);
- if (delegates != null && delegates.length > 0) {
- if (delegates[0] instanceof ILabelDecorator) {
- String candidate = ((ILabelDecorator)delegates[0]).decorateText(label, element);
- if (candidate != null) label = candidate;
- }
- }
-
if (element instanceof IPeerModel) {
final StringBuilder builder = new StringBuilder(label != null && !"".equals(label.trim()) ? label.trim() : "<noname>"); //$NON-NLS-1$ //$NON-NLS-2$
Runnable runnable = new Runnable() {
@Override
public void run() {
- doDecorateText(builder, (IPeerModel)element);
+ boolean isStatic = ((IPeerModel)element).isStatic();
+
+ int state = ((IPeerModel)element).getIntProperty(IPeerModelProperties.PROP_STATE);
+ if (state > IPeerModelProperties.STATE_UNKNOWN
+ && (!isStatic
+ || state == IPeerModelProperties.STATE_REACHABLE
+ || state == IPeerModelProperties.STATE_CONNECTED
+ || state == IPeerModelProperties.STATE_WAITING_FOR_READY)) {
+ builder.append(" ["); //$NON-NLS-1$
+ builder.append(Messages.getString("LabelProviderDelegate_state_" + state)); //$NON-NLS-1$
+ builder.append("]"); //$NON-NLS-1$
+ }
}
};
@@ -258,31 +230,4 @@ public class DelegatingLabelProvider extends LabelProvider implements ILabelDeco
}
return null;
}
-
- /**
- * Decorate the text with some peer attributes.
- * <p>
- * <b>Note:</b> Must be called with the TCF event dispatch thread.
- *
- * @param builder The string builder to decorate. Must not be <code>null</code>.
- * @param peerModel The peer model node. Must not be <code>null</code>.
- */
- /* default */ void doDecorateText(StringBuilder builder, IPeerModel peerModel) {
- Assert.isNotNull(builder);
- Assert.isNotNull(peerModel);
- Assert.isTrue(Protocol.isDispatchThread());
-
- boolean isStatic = peerModel.isStatic();
-
- int state = peerModel.getIntProperty(IPeerModelProperties.PROP_STATE);
- if (state > IPeerModelProperties.STATE_UNKNOWN
- && (!isStatic
- || state == IPeerModelProperties.STATE_REACHABLE
- || state == IPeerModelProperties.STATE_CONNECTED
- || state == IPeerModelProperties.STATE_WAITING_FOR_READY)) {
- builder.append(" ["); //$NON-NLS-1$
- builder.append(Messages.getString("LabelProviderDelegate_state_" + state)); //$NON-NLS-1$
- builder.append("]"); //$NON-NLS-1$
- }
- }
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/wizards/pages/PeerExportWizardPage.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/wizards/pages/PeerExportWizardPage.java
index 51ee33ba5..35acdc10e 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/wizards/pages/PeerExportWizardPage.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/wizards/pages/PeerExportWizardPage.java
@@ -54,8 +54,8 @@ import org.eclipse.tcf.te.tcf.core.interfaces.IExportPersistenceService;
import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.ILocatorModel;
import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
import org.eclipse.tcf.te.tcf.locator.model.Model;
-import org.eclipse.tcf.te.tcf.ui.navigator.DelegatingLabelProvider;
import org.eclipse.tcf.te.tcf.ui.nls.Messages;
+import org.eclipse.tcf.te.ui.views.navigator.DelegatingLabelProvider;
import org.eclipse.ui.progress.UIJob;
/**
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/wizards/pages/PeerImportWizardPage.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/wizards/pages/PeerImportWizardPage.java
index fdf607b3c..8fc219182 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/wizards/pages/PeerImportWizardPage.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/wizards/pages/PeerImportWizardPage.java
@@ -61,8 +61,8 @@ import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
import org.eclipse.tcf.te.tcf.locator.interfaces.services.ILocatorModelLookupService;
import org.eclipse.tcf.te.tcf.locator.interfaces.services.ILocatorModelRefreshService;
import org.eclipse.tcf.te.tcf.locator.model.Model;
-import org.eclipse.tcf.te.tcf.ui.navigator.DelegatingLabelProvider;
import org.eclipse.tcf.te.tcf.ui.nls.Messages;
+import org.eclipse.tcf.te.ui.views.navigator.DelegatingLabelProvider;
import org.eclipse.ui.progress.UIJob;
/**
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/plugin.xml
index 7ff058cb1..f31c2a2fb 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/plugin.xml
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/plugin.xml
@@ -1,980 +1,995 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
-
-<!-- Extension Points -->
- <extension-point id="editorPageBindings" name="%ExtensionPoint.editorPageBindings.name" schema="schema/editorPageBindings.exsd"/>
- <extension-point id="editorPages" name="%ExtensionPoint.editorPages.name" schema="schema/editorPages.exsd"/>
- <extension-point id="categories" name="%ExtensionPoint.categories.name" schema="schema/categories.exsd"/>
- <extension-point id="labelProviderDelegates" name="%ExtensionPoint.labelProviderDelegates.name" schema="schema/labelProviderDelegates.exsd"/>
-
-<!-- Common Navigator contributions -->
- <extension point="org.eclipse.ui.navigator.viewer">
- <viewer
- helpContext="org.eclipse.tcf.te.ui.views.View"
- viewerId="org.eclipse.tcf.te.ui.views.View">
- <popupMenu
- id="org.eclipse.tcf.te.ui.views.View#Popup"
- allowsPlatformContributions="true">
- <insertionPoint name="group.new" separator="true"/>
- <insertionPoint name="group.goto"/>
- <insertionPoint name="group.expandto" separator="true"/>
- <insertionPoint name="group.expand"/>
- <insertionPoint name="group.open" separator="true"/>
- <insertionPoint name="group.openWith"/>
- <insertionPoint name="group.showIn"/>
- <insertionPoint name="group.connect" separator="true"/>
- <insertionPoint name="group.redirect" separator="true"/>
- <insertionPoint name="group.symbols" separator="true"/>
- <insertionPoint name="group.symbols.rd"/>
- <insertionPoint name="group.symbols.loadunload"/>
- <insertionPoint name="group.symbols.additions"/>
- <insertionPoint name="group.launch" separator="true"/>
- <insertionPoint name="group.launch.rundebug"/>
- <insertionPoint name="group.launch.modes"/>
- <insertionPoint name="group.launch.additions"/>
- <insertionPoint name="group.show" separator="true"/>
- <insertionPoint name="group.edit" separator="true"/>
- <insertionPoint name="group.delete"/>
- <insertionPoint name="group.build" separator="true"/>
- <insertionPoint name="group.importexport" separator="true"/>
- <insertionPoint name="group.refresh" separator="true"/>
- <insertionPoint name="group.syncop"/>
- <insertionPoint name="group.categories" separator="true"/>
- <insertionPoint name="group.reorganize"/>
- <insertionPoint name="group.reorder"/>
- <insertionPoint name="group.port"/>
- <insertionPoint name="group.generate" separator="true"/>
- <insertionPoint name="group.search" separator="true"/>
- <insertionPoint name="group.connection" separator="true"/>
- <insertionPoint name="group.operations" separator="true"/>
- <insertionPoint name="group.analysis" separator="true"/>
- <insertionPoint name="group.filter" separator="true"/>
- <insertionPoint name="additions" separator="true"/>
- <insertionPoint name="group.properties" separator="true"/>
- </popupMenu>
- <options>
- <property
- name="org.eclipse.ui.navigator.hideLinkWithEditorAction"
- value="true">
- </property>
- <property
- name="org.eclipse.ui.navigator.hideAvailableCustomizationsDialog"
- value="true">
- </property>
- <property
- name="org.eclipse.ui.navigator.enforceHasChildren"
- value="true">
- </property>
- </options>
- </viewer>
-
- <viewerContentBinding viewerId="org.eclipse.tcf.te.ui.views.View">
- <includes>
- <contentExtension
- pattern="org.eclipse.tcf.te.ui.views.navigator.*">
- </contentExtension>
-
- </includes>
- </viewerContentBinding>
-
- <viewerActionBinding
- viewerId="org.eclipse.tcf.te.ui.views.View">
- <includes>
- <actionExtension
- pattern="org.eclipse.tcf.te.ui.views.navigator.actions.*">
- </actionExtension>
- </includes>
- </viewerActionBinding>
- </extension>
-
-<!-- Common navigator contributions -->
- <extension point="org.eclipse.ui.navigator.navigatorContent">
-
-<!-- Default navigator content contibutions -->
- <navigatorContent
- activeByDefault="true"
- contentProvider="org.eclipse.tcf.te.ui.views.navigator.ViewerContentProvider"
- icon="icons/eview16/targets_view.gif"
- id="org.eclipse.tcf.te.ui.views.navigator.content"
- labelProvider="org.eclipse.tcf.te.ui.views.navigator.LabelProviderDelegate"
- name="%navigatorContent.name"
- priority="highest">
- <triggerPoints>
- <or>
- <instanceof value="org.eclipse.tcf.te.ui.views.interfaces.IRoot"/>
- <instanceof value="org.eclipse.tcf.te.ui.views.interfaces.ICategory"/>
- </or>
- </triggerPoints>
- <possibleChildren>
- <or>
- <instanceof value="org.eclipse.tcf.te.ui.views.interfaces.ICategory"/>
- <instanceof value="org.eclipse.tcf.te.ui.views.navigator.nodes.NewWizardNode"/>
- </or>
- </possibleChildren>
- <commonSorter
- class="org.eclipse.tcf.te.ui.views.navigator.ViewerSorter"
- id="org.eclipse.tcf.te.ui.views.navigator.sorter"/>
- </navigatorContent>
-
-<!-- Default navigator action contributions -->
- <actionProvider
- class="org.eclipse.tcf.te.ui.views.actions.NewActionProvider"
- id="org.eclipse.tcf.te.ui.views.navigator.actions.NewActionProvider">
- <enablement>
- <or>
- <not>
- <test
- forcePluginActivation="true"
- property="org.eclipse.tcf.te.runtime.services.hasService"
- value="org.eclipse.tcf.te.runtime.services.interfaces.IMenuService"/>
- </not>
- <test
- property="org.eclipse.tcf.te.runtime.services.menu.isVisible"
- args="org.eclipse.tcf.te.ui.views.navigator.actions.NewActionProvider"
- value="true"/>
- </or>
- </enablement>
- </actionProvider>
-
- <actionProvider
- class="org.eclipse.tcf.te.ui.views.actions.GoIntoActionProvider"
- id="org.eclipse.tcf.te.ui.views.navigator.actions.GoIntoActionProvider">
- <enablement>
- <or>
- <not>
- <test
- forcePluginActivation="true"
- property="org.eclipse.tcf.te.runtime.services.hasService"
- value="org.eclipse.tcf.te.runtime.services.interfaces.IMenuService"/>
- </not>
- <test
- property="org.eclipse.tcf.te.runtime.services.menu.isVisible"
- args="org.eclipse.tcf.te.ui.views.navigator.actions.GoIntoActionProvider"
- value="true"/>
- </or>
- </enablement>
- </actionProvider>
-
- </extension>
-
-<!-- View contributions -->
- <extension point="org.eclipse.ui.views">
- <view
- category="org.eclipse.tcf.te.ui.views.category"
- class="org.eclipse.tcf.te.ui.views.internal.View"
- icon="icons/eview16/targets_view.gif"
- id="org.eclipse.tcf.te.ui.views.View"
- name="%View.name"
- restorable="true">
- </view>
- </extension>
-
-<!-- View categories contributions -->
- <extension point="org.eclipse.tcf.te.ui.views.categories">
- <category
- class="org.eclipse.tcf.te.ui.views.categories.Category"
- icon="icons/obj16/favorites.gif"
- id="org.eclipse.tcf.te.ui.views.category.favorites"
- label="%category.favorites.name"
- rank="1">
- <enablement>
- <test property="org.eclipse.tcf.te.ui.views.isHiddenByPreferences" value="false"/>
- </enablement>
- </category>
-
- <category
- class="org.eclipse.tcf.te.ui.views.categories.Category"
- icon="icons/obj16/targets.gif"
- id="org.eclipse.tcf.te.ui.views.category.mytargets"
- label="%category.mytargets.name"
- rank="10">
- <enablement>
- <test property="org.eclipse.tcf.te.ui.views.isHiddenByPreferences" value="false"/>
- </enablement>
- </category>
-
- <category
- class="org.eclipse.tcf.te.ui.views.categories.Category"
- icon="icons/obj16/neighborhood.gif"
- id="org.eclipse.tcf.te.ui.views.category.neighborhood"
- label="%category.neighborhood.name"
- rank="20">
- <enablement>
- <test property="org.eclipse.tcf.te.ui.views.isHiddenByPreferences" value="false"/>
- </enablement>
- </category>
- </extension>
-
-<!-- Perspective -->
- <extension point="org.eclipse.ui.perspectives">
- <perspective
- class="org.eclipse.tcf.te.ui.views.perspective.PerspectiveFactory"
- icon="icons/eview16/editor.gif"
- id="org.eclipse.tcf.te.ui.perspective"
- name="%Perspective.name">
- </perspective>
- </extension>
-
-<!-- Perspective contributions -->
- <extension point="org.eclipse.ui.perspectiveExtensions">
- <perspectiveExtension targetID="org.eclipse.tcf.te.ui.perspective">
- <!-- Run/Debug actions should be available -->
- <actionSet id="org.eclipse.debug.ui.launchActionSet"/>
- <!-- Register the view shortcuts -->
- <viewShortcut id="org.eclipse.tcf.te.ui.views.View"/>
- <viewShortcut id="org.eclipse.debug.ui.DebugView"/>
- <viewShortcut id="org.eclipse.ui.views.PropertySheet"/>
- <!-- Register the perspective shortcuts -->
- <perspectiveShortcut id="org.eclipse.debug.ui.DebugPerspective"/>
- </perspectiveExtension>
-
- <perspectiveExtension targetID="org.eclipse.ui.resourcePerspective">
- <!-- Run/Debug actions should be available -->
- <actionSet id="org.eclipse.debug.ui.launchActionSet"/>
- <!-- Register the view shortcuts -->
- <viewShortcut id="org.eclipse.tcf.te.ui.views.View"/>
- <!-- Register the perspective shortcuts -->
- <perspectiveShortcut id="org.eclipse.tcf.te.ui.perspective"/>
- <!-- System management view is placed relative to the Project Explorer -->
- <view
- id="org.eclipse.tcf.te.ui.views.View"
- minimized="false"
- relationship="stack"
- relative="org.eclipse.ui.navigator.ProjectExplorer"
- visible="false">
- </view>
- </perspectiveExtension>
-
- <perspectiveExtension targetID="org.eclipse.debug.ui.DebugPerspective">
- <!-- Register the view shortcuts -->
- <viewShortcut id="org.eclipse.tcf.te.ui.views.View"/>
- <!-- Register the perspective shortcuts -->
- <perspectiveShortcut id="org.eclipse.tcf.te.ui.perspective"/>
- <!-- System management view is placed relative to the Debug View -->
- <view
- id="org.eclipse.tcf.te.ui.views.View"
- minimized="false"
- relationship="stack"
- relative="org.eclipse.debug.ui.DebugView"
- visible="false">
- </view>
- </perspectiveExtension>
-
- <perspectiveExtension targetID="org.eclipse.cdt.ui.CPerspective">
- <!-- Register the view shortcuts -->
- <viewShortcut id="org.eclipse.tcf.te.ui.views.View"/>
- <!-- Register the perspective shortcuts -->
- <perspectiveShortcut id="org.eclipse.tcf.te.ui.perspective"/>
- <!-- System management view is placed relative to the C/C++ View -->
- <view
- id="org.eclipse.tcf.te.ui.views.View"
- minimized="false"
- relationship="stack"
- relative="org.eclipse.cdt.ui.CView"
- visible="false">
- </view>
- </perspectiveExtension>
- </extension>
-
-<!-- Editor contributions -->
- <extension point="org.eclipse.ui.editors">
- <editor
- class="org.eclipse.tcf.te.ui.views.editor.Editor"
- default="false"
- icon="icons/eview16/prop_ps.gif"
- id="org.eclipse.tcf.te.ui.views.Editor"
- name="%Editor.name">
- </editor>
- </extension>
-
-<!-- Tabbed properties view contributions -->
- <extension point="org.eclipse.ui.views.properties.tabbed.propertyContributor">
- <propertyContributor
- contributorId="org.eclipse.tcf.te.ui"
- labelProvider="org.eclipse.tcf.te.ui.views.internal.PropertyContributorLabelProvider">
- <propertyCategory category="org.eclipse.tcf.te"/>
- </propertyContributor>
- </extension>
-
-<!-- Service contributions -->
- <extension point="org.eclipse.tcf.te.runtime.services.services">
- <service
- class="org.eclipse.tcf.te.ui.views.internal.services.MenuService"
- id="org.eclipse.tcf.te.ui.views.services.MenuService">
- <serviceType
- bundleId="org.eclipse.tcf.te.runtime.services"
- class="org.eclipse.tcf.te.runtime.services.interfaces.IMenuService"/>
- <enablement>
- <instanceof value="org.eclipse.tcf.te.ui.views.interfaces.ICategory"/>
- </enablement>
- </service>
- </extension>
-
-<!-- Menu contributions -->
- <extension point="org.eclipse.ui.menus">
- <menuContribution locationURI="popup:org.eclipse.tcf.te.ui.views.View#Popup?after=group.open">
- <command
- commandId="org.eclipse.ui.navigator.Open"
- helpContextId="org.eclipse.tcf.te.ui.views.command_Open"
- id="properties"
- label="%command.open.label"
- mnemonic="%command.open.mnemonic"
- tooltip="%command.openroperties.tooltip">
- <visibleWhen>
- <with variable="selection">
- <count value="1"/>
- <iterate operator="and" ifEmpty="false">
- <test property="org.eclipse.tcf.te.ui.views.hasApplicableEditorBindings" value="true"/>
- </iterate>
- </with>
- </visibleWhen>
- </command>
- </menuContribution>
-
- <menuContribution locationURI="popup:org.eclipse.tcf.te.ui.views.View#Popup?after=group.importexport">
- <command
- commandId="org.eclipse.ui.file.import">
- <visibleWhen checkEnabled="false">
- <with variable="selection">
- <iterate operator="and" ifEmpty="false">
- <or>
- <not>
- <test
- forcePluginActivation="true"
- property="org.eclipse.tcf.te.runtime.services.hasService"
- value="org.eclipse.tcf.te.runtime.services.interfaces.IMenuService"/>
- </not>
- <test
- property="org.eclipse.tcf.te.runtime.services.menu.isVisible"
- args="org.eclipse.ui.file.import"
- value="true"/>
- </or>
- </iterate>
- </with>
- </visibleWhen>
- </command>
- <command
- commandId="org.eclipse.ui.file.export">
- <visibleWhen checkEnabled="false">
- <with variable="selection">
- <iterate operator="and" ifEmpty="false">
- <or>
- <not>
- <test
- forcePluginActivation="true"
- property="org.eclipse.tcf.te.runtime.services.hasService"
- value="org.eclipse.tcf.te.runtime.services.interfaces.IMenuService"/>
- </not>
- <test
- property="org.eclipse.tcf.te.runtime.services.menu.isVisible"
- args="org.eclipse.ui.file.export"
- value="true"/>
- </or>
- </iterate>
- </with>
- </visibleWhen>
- </command>
- </menuContribution>
-
- <menuContribution locationURI="popup:org.eclipse.tcf.te.ui.views.View#Popup?after=group.showIn">
- <menu
- commandId="org.eclipse.tcf.te.ui.views.command.ShowInGroup"
- id="org.eclipse.tcf.te.ui.views.View.menu.showIn"
- label="%menu.showIn.label">
- <visibleWhen checkEnabled="false">
- <with variable="selection">
- <iterate operator="and" ifEmpty="false">
- <or>
- <not>
- <test
- forcePluginActivation="true"
- property="org.eclipse.tcf.te.runtime.services.hasService"
- value="org.eclipse.tcf.te.runtime.services.interfaces.IMenuService"/>
- </not>
- <test
- property="org.eclipse.tcf.te.runtime.services.menu.isVisible"
- args="org.eclipse.tcf.te.ui.views.View.menu.showIn"
- value="true"/>
- </or>
- </iterate>
- </with>
- </visibleWhen>
-
- <command
- commandId="org.eclipse.tcf.te.ui.views.command.ShowInProperties"
- icon="icons/eview16/prop_ps.gif"
- label="%menu.properties.label"
- style="push">
- </command>
- </menu>
- </menuContribution>
-
- <menuContribution locationURI="menu:org.eclipse.tcf.te.ui.views.View?after=additions">
- <separator
- name="group.filters"
- visible="true">
- </separator>
- <dynamic
- class="org.eclipse.tcf.te.ui.views.handler.FilterMRUContribution"
- id="org.eclipse.tcf.te.ui.views.dynamic.filterMRU">
- </dynamic>
- <command
- commandId="org.eclipse.tcf.te.ui.views.command.filters"
- icon="platform:/plugin/org.eclipse.ui.navigator/icons/full/elcl16/filter_ps.gif"
- id="org.eclipse.tcf.te.ui.views.command.filters"
- label="%command.filters.label"
- style="push">
- </command>
- <separator
- name="group.content"
- visible="true">
- </separator>
- <dynamic
- class="org.eclipse.tcf.te.ui.views.handler.ContentMRUContribution"
- id="org.eclipse.tcf.te.ui.views.dynamic.contentMRU">
- </dynamic>
- <command
- commandId="org.eclipse.tcf.te.ui.views.command.content"
- icon="platform:/plugin/org.eclipse.ui.navigator/icons/full/elcl16/content.gif"
- id="org.eclipse.tcf.te.ui.views.command.content"
- label="%command.content.label"
- style="push">
- </command>
- </menuContribution>
-
- <menuContribution locationURI="popup:org.eclipse.tcf.te.ui.views.View#Popup?after=group.categories">
- <menu
- id="org.eclipse.tcf.te.ui.views.menu.categories.add"
- label="%menu.categories.addto.label">
- <dynamic
- id="org.eclipse.tcf.te.ui.views.dynamic.categories.add.multi"
- class="org.eclipse.tcf.te.ui.views.handler.CategoryAddToContributionItem">
- </dynamic>
- <visibleWhen checkEnabled="false">
- <with variable="selection">
- <test property="org.eclipse.tcf.te.ui.views.validAddToCategoriesCount" value="(1-"/>
- <iterate operator="and" ifEmpty="false">
- <adapt type="org.eclipse.tcf.te.ui.views.interfaces.categories.ICategorizable"/>
- </iterate>
- </with>
- </visibleWhen>
- </menu>
-
- <dynamic
- id="org.eclipse.tcf.te.ui.views.dynamic.categories.add.single"
- class="org.eclipse.tcf.te.ui.views.handler.CategoryAddToContributionItem">
- <visibleWhen checkEnabled="false">
- <with variable="selection">
- <test property="org.eclipse.tcf.te.ui.views.validAddToCategoriesCount" value="1"/>
- <iterate operator="and" ifEmpty="false">
- <adapt type="org.eclipse.tcf.te.ui.views.interfaces.categories.ICategorizable"/>
- </iterate>
- </with>
- </visibleWhen>
- </dynamic>
- </menuContribution>
-
- <menuContribution locationURI="popup:org.eclipse.tcf.te.ui.views.View#Popup?after=group.filter">
- <command
- commandId="org.eclipse.tcf.te.ui.views.command.quickfilter"
- label="%menu.filter.label"
- mnemonic="%menu.filter.mnemonic"
- style="push">
- <visibleWhen checkEnabled="false">
- <with variable="selection">
- <iterate>
- <adapt type="org.eclipse.tcf.te.core.interfaces.IFilterable">
- <instanceof value="org.eclipse.tcf.te.core.interfaces.IFilterable"/>
- </adapt>
- </iterate>
- </with>
- </visibleWhen>
- </command>
- <command
- commandId="org.eclipse.tcf.te.ui.views.command.resetfilter"
- label="%menu.reset.label"
- mnemonic="%menu.reset.mnemonic"
- style="push">
- <visibleWhen checkEnabled="false">
- <with variable="selection">
- <iterate>
- <adapt type="org.eclipse.tcf.te.core.interfaces.IFilterable">
- <instanceof value="org.eclipse.tcf.te.core.interfaces.IFilterable"/>
- </adapt>
- </iterate>
- </with>
- </visibleWhen>
- </command>
- </menuContribution>
-
- <menuContribution locationURI="popup:org.eclipse.tcf.te.ui.views.View#Popup?after=group.search">
- <command
- commandId="org.eclipse.tcf.te.ui.views.command.find"
- label="%menu.find.label"
- mnemonic="%menu.find.mnemonic"
- style="push">
- <visibleWhen checkEnabled="false">
- <with variable="selection">
- <iterate>
- <adapt type="org.eclipse.tcf.te.ui.interfaces.ISearchable">
- <instanceof value="org.eclipse.tcf.te.ui.interfaces.ISearchable"/>
- </adapt>
- </iterate>
- </with>
- </visibleWhen>
- </command>
- </menuContribution>
-
- </extension>
-
-<!-- Command contributions -->
- <extension point="org.eclipse.ui.commands">
- <!-- Definition of the Common Navigator global retargetable open
- action id as command.
- -->
- <command
- categoryId="org.eclipse.tcf.te.ui.commands.category"
- helpContextId="org.eclipse.ui.navigator.Open"
- id="org.eclipse.ui.navigator.Open"
- name="%command.open.name">
- </command>
- <command
- categoryId="org.eclipse.tcf.te.ui.commands.category"
- helpContextId="org.eclipse.tcf.te.ui.views.command_ShowInGroup"
- id="org.eclipse.tcf.te.ui.views.command.ShowInGroup"
- name="%command.showin.name">
- </command>
-
- <command
- categoryId="org.eclipse.tcf.te.ui.commands.category"
- helpContextId="org.eclipse.tcf.te.ui.views.command_ShowInProperties"
- id="org.eclipse.tcf.te.ui.views.command.ShowInProperties"
- name="%command.showInProperties.label">
- </command>
- <command
- categoryId="org.eclipse.tcf.te.ui.commands.category"
- helpContextId="org.eclipse.tcf.te.ui.views.command_Filters"
- id="org.eclipse.tcf.te.ui.views.command.filters"
- name="%command.filters.name">
- </command>
- <command
- categoryId="org.eclipse.tcf.te.ui.commands.category"
- helpContextId="org.eclipse.tcf.te.ui.views.command_Content"
- id="org.eclipse.tcf.te.ui.views.command.content"
- name="%command.content.name">
- </command>
- <command
- categoryId="org.eclipse.tcf.te.ui.commands.category"
- description="%command.find.description"
- id="org.eclipse.tcf.te.ui.views.command.find"
- name="%command.find.name">
- </command>
- <command
- categoryId="org.eclipse.tcf.te.ui.commands.category"
- description="%command.filter.description"
- id="org.eclipse.tcf.te.ui.views.command.quickfilter"
- name="%command.filter.name">
- </command>
- <command
- categoryId="org.eclipse.tcf.te.ui.commands.category"
- description="%command.reset.description"
- id="org.eclipse.tcf.te.ui.views.command.resetfilter"
- name="%command.reset.name">
- </command>
- <command
- categoryId="org.eclipse.tcf.te.ui.commands.category"
- description="%command.showInSM.description"
- id="org.eclipse.tcf.te.ui.command.showIn.systemManagement"
- name="%command.showInSM.name">
- </command>
- <command
- categoryId="org.eclipse.tcf.te.ui.commands.category"
- description="%command.apply.description"
- id="org.eclipse.tcf.te.ui.views.command.apply"
- name="%command.apply.name">
- </command>
- </extension>
-
- <extension point="org.eclipse.ui.commandImages">
- <image
- commandId="org.eclipse.tcf.te.ui.command.showIn.systemManagement"
- icon="icons/eview16/targets_view.gif">
- </image>
- <image
- commandId="org.eclipse.tcf.te.ui.views.command.find"
- icon="icons/obj16/search.gif">
- </image>
- <image
- commandId="org.eclipse.tcf.te.ui.views.command.quickfilter"
- icon="platform:/plugin/org.eclipse.ui.navigator/icons/full/elcl16/filter_ps.gif">
- </image>
- <image
- commandId="org.eclipse.tcf.te.ui.views.command.apply"
- disabledIcon="platform:/plugin/org.eclipse.ui/icons/full/dtool16/save_edit.gif"
- icon="platform:/plugin/org.eclipse.ui/icons/full/etool16/save_edit.gif">
- </image>
- </extension>
-
- <extension point="org.eclipse.ui.bindings">
- <key
- commandId="org.eclipse.tcf.te.ui.views.command.ShowInGroup"
- contextId="org.eclipse.tcf.te.ui.views.View"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="M3+M2+W">
- </key>
- <key
- commandId="org.eclipse.tcf.te.ui.views.command.find"
- contextId="org.eclipse.tcf.te.ui.views.View"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="M1+F">
- </key>
- <key
- commandId="org.eclipse.tcf.te.ui.views.command.find"
- contextId="org.eclipse.tcf.te.ui.views.Editor"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="M1+F">
- </key>
- <key
- commandId="org.eclipse.tcf.te.ui.views.command.quickfilter"
- contextId="org.eclipse.tcf.te.ui.views.View"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="M1+T">
- </key>
- <key
- commandId="org.eclipse.tcf.te.ui.views.command.quickfilter"
- contextId="org.eclipse.tcf.te.ui.views.Editor"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="M1+T">
- </key>
- <key
- commandId="org.eclipse.tcf.te.ui.views.command.resetfilter"
- contextId="org.eclipse.tcf.te.ui.views.View"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="ESC">
- </key>
- <key
- commandId="org.eclipse.tcf.te.ui.views.command.resetfilter"
- contextId="org.eclipse.tcf.te.ui.views.Editor"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="ESC">
- </key>
- </extension>
-
-<!-- Handler contributions -->
- <extension point="org.eclipse.ui.handlers">
- <handler
- commandId="org.eclipse.ui.file.properties"
- class="org.eclipse.tcf.te.ui.views.handler.OpenEditorHandler">
- <activeWhen>
- <with variable="activePartId">
- <equals value="org.eclipse.tcf.te.ui.views.View"/>
- </with>
- </activeWhen>
- <enabledWhen>
- <with variable="selection">
- <iterate operator="and" ifEmpty="false">
- <test property="org.eclipse.tcf.te.ui.views.hasApplicableEditorBindings" value="true"/>
- </iterate>
- </with>
- </enabledWhen>
- </handler>
-
- <handler
- commandId="org.eclipse.ui.navigator.Open"
- class="org.eclipse.tcf.te.ui.views.handler.NewWizardHandler">
- <activeWhen>
- <and>
- <with variable="activePartId">
- <equals value="org.eclipse.tcf.te.ui.views.View"/>
- </with>
- <with variable="selection">
- <count value="1"/>
- <iterate operator="and" ifEmpty="false">
- <instanceof value="org.eclipse.tcf.te.ui.views.navigator.nodes.NewWizardNode"/>
- </iterate>
- </with>
- </and>
- </activeWhen>
- <enabledWhen>
- <with variable="selection">
- <count value="1"/>
- <iterate operator="and" ifEmpty="false">
- <instanceof value="org.eclipse.tcf.te.ui.views.navigator.nodes.NewWizardNode"/>
- </iterate>
- </with>
- </enabledWhen>
- </handler>
-
- <handler
- commandId="org.eclipse.ui.navigator.Open"
- class="org.eclipse.tcf.te.ui.views.handler.OpenEditorHandler">
- <activeWhen>
- <and>
- <with variable="activePartId">
- <equals value="org.eclipse.tcf.te.ui.views.View"/>
- </with>
- <with variable="selection">
- <iterate operator="and" ifEmpty="false">
- <test property="org.eclipse.tcf.te.ui.views.hasApplicableEditorBindings" value="true"/>
- </iterate>
- </with>
- </and>
- </activeWhen>
- <enabledWhen>
- <with variable="selection">
- <iterate operator="and" ifEmpty="false">
- <test property="org.eclipse.tcf.te.ui.views.hasApplicableEditorBindings" value="true"/>
- </iterate>
- </with>
- </enabledWhen>
- </handler>
-
- <handler
- class="org.eclipse.tcf.te.ui.views.handler.ShowInPropertiesHandler"
- commandId="org.eclipse.tcf.te.ui.views.command.ShowInProperties">
- <activeWhen>
- <with variable="activePartId">
- <equals value="org.eclipse.tcf.te.ui.views.View"/>
- </with>
- </activeWhen>
- </handler>
-
- <handler
- class="org.eclipse.tcf.te.ui.views.handler.ShowInSystemManagementHandler"
- commandId="org.eclipse.tcf.te.ui.command.showIn.systemManagement">
- </handler>
-
- <handler
- class="org.eclipse.tcf.te.ui.views.handler.ConfigFiltersHandler"
- commandId="org.eclipse.tcf.te.ui.views.command.filters">
- <activeWhen>
- <with variable="activePartId">
- <equals value="org.eclipse.tcf.te.ui.views.View"/>
- </with>
- </activeWhen>
- </handler>
-
- <handler
- class="org.eclipse.tcf.te.ui.views.handler.ConfigContentHandler"
- commandId="org.eclipse.tcf.te.ui.views.command.content">
- <activeWhen>
- <with variable="activePartId">
- <equals value="org.eclipse.tcf.te.ui.views.View"/>
- </with>
- </activeWhen>
- </handler>
-
- <handler
- class="org.eclipse.tcf.te.ui.views.handler.ViewQuickFilterHanlder"
- commandId="org.eclipse.tcf.te.ui.views.command.quickfilter">
- <activeWhen>
- <with variable="activePartId">
- <equals value="org.eclipse.tcf.te.ui.views.View"/>
- </with>
- </activeWhen>
- <enabledWhen>
- <with variable="activePart">
- <adapt type="org.eclipse.ui.navigator.CommonViewer">
- <test property="org.eclipse.tcf.te.ui.views.isFilterable"/>
- </adapt>
- </with>
- </enabledWhen>
- </handler>
-
- <handler
- class="org.eclipse.tcf.te.ui.views.handler.ViewQuickFilterResetHanlder"
- commandId="org.eclipse.tcf.te.ui.views.command.resetfilter">
- <activeWhen>
- <with variable="activePartId">
- <equals value="org.eclipse.tcf.te.ui.views.View"/>
- </with>
- </activeWhen>
- <enabledWhen>
- <with variable="activePart">
- <adapt type="org.eclipse.ui.navigator.CommonViewer">
- <test property="org.eclipse.tcf.te.ui.views.isFiltering"/>
- </adapt>
- </with>
- </enabledWhen>
- </handler>
-
- <handler
- class="org.eclipse.tcf.te.ui.views.handler.EditorQuickFilterHanlder"
- commandId="org.eclipse.tcf.te.ui.views.command.quickfilter">
- <activeWhen>
- <with variable="activePartId">
- <equals value="org.eclipse.tcf.te.ui.views.Editor"/>
- </with>
- </activeWhen>
- <enabledWhen>
- <with variable="activeEditor">
- <test property="org.eclipse.tcf.te.ui.views.isEditorFilterable"/>
- </with>
- </enabledWhen>
- </handler>
-
- <handler
- class="org.eclipse.tcf.te.ui.views.handler.EditorQuickFilterResetHanlder"
- commandId="org.eclipse.tcf.te.ui.views.command.resetfilter">
- <activeWhen>
- <with variable="activePartId">
- <equals value="org.eclipse.tcf.te.ui.views.Editor"/>
- </with>
- </activeWhen>
- <enabledWhen>
- <with variable="activeEditor">
- <adapt type="org.eclipse.jface.viewers.TreeViewer">
- <test property="org.eclipse.tcf.te.ui.views.isFiltering"/>
- </adapt>
- </with>
- </enabledWhen>
- </handler>
-
- <handler
- class="org.eclipse.tcf.te.ui.views.handler.ViewSearchHandler"
- commandId="org.eclipse.tcf.te.ui.views.command.find">
- <activeWhen>
- <with variable="activePartId">
- <equals value="org.eclipse.tcf.te.ui.views.View"/>
- </with>
- </activeWhen>
- <enabledWhen>
- <with variable="selection">
- <count value="1"/>
- <iterate>
- <adapt type="org.eclipse.tcf.te.ui.interfaces.ISearchable">
- </adapt>
- </iterate>
- </with>
- </enabledWhen>
- </handler>
-
- <handler
- class="org.eclipse.tcf.te.ui.views.handler.EditorSearchHandler"
- commandId="org.eclipse.tcf.te.ui.views.command.find">
- <activeWhen>
- <with variable="activePartId">
- <equals value="org.eclipse.tcf.te.ui.views.Editor"/>
- </with>
- </activeWhen>
- <enabledWhen>
- <with variable="selection">
- <count value="1"/>
- <iterate>
- <adapt type="org.eclipse.tcf.te.ui.interfaces.ISearchable">
- </adapt>
- </iterate>
- </with>
- </enabledWhen>
- </handler>
- </extension>
-
-<!-- Eclipse core expressions property tester -->
- <extension point="org.eclipse.core.expressions.propertyTesters">
- <propertyTester
- class="org.eclipse.tcf.te.ui.views.expressions.PropertyTester"
- id="org.eclipse.tcf.te.ui.views.PropertyTester"
- namespace="org.eclipse.tcf.te.ui.views"
- properties="isDirty,hasApplicableEditorBindings"
- type="java.lang.Object">
- </propertyTester>
-
- <propertyTester
- class="org.eclipse.tcf.te.ui.views.internal.categories.CategoryPropertyTester"
- id="org.eclipse.tcf.te.ui.views.categories.CategoryPropertyTester"
- namespace="org.eclipse.tcf.te.ui.views"
- properties="isCategoryEnabled"
- type="java.lang.Object">
- </propertyTester>
-
- <propertyTester
- class="org.eclipse.tcf.te.ui.views.internal.categories.CategoryPropertyTester"
- id="org.eclipse.tcf.te.ui.views.categories.CategoryPropertyTester"
- namespace="org.eclipse.tcf.te.ui.views"
- properties="isCategoryID,belongsTo,isHiddenByPreferences,isVisibleNavigatorContent"
- type="org.eclipse.tcf.te.ui.views.interfaces.ICategory">
- </propertyTester>
-
- <propertyTester
- class="org.eclipse.tcf.te.ui.views.internal.categories.CategoryPropertyTester"
- id="org.eclipse.tcf.te.ui.views.categories.CategoryPropertyTester"
- namespace="org.eclipse.tcf.te.ui.views"
- properties="belongsTo"
- type="org.eclipse.tcf.te.ui.views.interfaces.categories.ICategorizable">
- </propertyTester>
-
- <propertyTester
- class="org.eclipse.tcf.te.ui.views.internal.categories.CategoryPropertyTester"
- id="org.eclipse.tcf.te.ui.views.categories.CategoryPropertyTester"
- namespace="org.eclipse.tcf.te.ui.views"
- properties="parentCategoryId,validAddToCategoriesCount"
- type="org.eclipse.jface.viewers.ISelection">
- </propertyTester>
-
- <propertyTester
- class="org.eclipse.tcf.te.ui.views.internal.quickfilter.QuickFilterTester"
- id="org.eclipse.tcf.te.ui.views.quickfilter.QuickFilterTester"
- namespace="org.eclipse.tcf.te.ui.views"
- properties="isFilterable,isFiltering"
- type="org.eclipse.jface.viewers.TreeViewer">
- </propertyTester>
-
- <propertyTester
- class="org.eclipse.tcf.te.ui.views.internal.quickfilter.EditorQuickFilterTester"
- id="org.eclipse.tcf.te.ui.views.quickfilter.EditorQuickFilterTester"
- namespace="org.eclipse.tcf.te.ui.views"
- properties="isEditorFilterable"
- type="org.eclipse.tcf.te.ui.views.editor.Editor">
- </propertyTester>
-
- </extension>
-
-<!-- Preference contributions -->
- <extension point="org.eclipse.core.runtime.preferences">
- <initializer class="org.eclipse.tcf.te.ui.views.internal.preferences.PreferencesInitializer"/>
- </extension>
-
-<!-- Element factory contributions -->
- <extension point="org.eclipse.ui.elementFactories">
- <factory
- class="org.eclipse.tcf.te.ui.views.internal.categories.CategoryFactory"
- id="org.eclipse.tcf.te.ui.views.categoryFactory">
- </factory>
- </extension>
-
-<!-- Adapter factory contributions -->
- <extension point="org.eclipse.core.runtime.adapters">
- <factory
- adaptableType="org.eclipse.tcf.te.ui.views.internal.View"
- class="org.eclipse.tcf.te.ui.views.internal.adapters.ViewAdapterFactory">
- <adapter type="org.eclipse.ui.navigator.CommonViewer"/>
- </factory>
- <factory
- adaptableType="org.eclipse.tcf.te.ui.views.editor.Editor"
- class="org.eclipse.tcf.te.ui.views.internal.adapters.EditorAdapterFactory">
- <adapter type="org.eclipse.jface.viewers.TreeViewer"/>
- </factory>
- <factory
- adaptableType="org.eclipse.tcf.te.ui.views.editor.EditorInput"
- class="org.eclipse.tcf.te.ui.views.internal.adapters.EditorAdapterFactory">
- <adapter type="org.eclipse.tcf.te.runtime.model.interfaces.IModelNode"/>
- </factory>
- </extension>
-
-<!-- Source provider contributions -->
- <extension point="org.eclipse.ui.services">
- <sourceProvider
- provider="org.eclipse.tcf.te.ui.views.expressions.SelectionSourceProvider">
- <variable
- name="systemManagerViewSelection"
- priorityLevel="workbench">
- </variable>
- <variable
- name="debugViewSelection"
- priorityLevel="workbench">
- </variable>
- </sourceProvider>
- </extension>
-
-</plugin>
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+
+<!-- Extension Points -->
+ <extension-point id="editorPageBindings" name="%ExtensionPoint.editorPageBindings.name" schema="schema/editorPageBindings.exsd"/>
+ <extension-point id="editorPages" name="%ExtensionPoint.editorPages.name" schema="schema/editorPages.exsd"/>
+ <extension-point id="categories" name="%ExtensionPoint.categories.name" schema="schema/categories.exsd"/>
+ <extension-point id="labelProviderDelegates" name="%ExtensionPoint.labelProviderDelegates.name" schema="schema/labelProviderDelegates.exsd"/>
+
+<!-- Common Navigator contributions -->
+ <extension point="org.eclipse.ui.navigator.viewer">
+ <viewer
+ helpContext="org.eclipse.tcf.te.ui.views.View"
+ viewerId="org.eclipse.tcf.te.ui.views.View">
+ <popupMenu
+ id="org.eclipse.tcf.te.ui.views.View#Popup"
+ allowsPlatformContributions="true">
+ <insertionPoint name="group.new" separator="true"/>
+ <insertionPoint name="group.goto"/>
+ <insertionPoint name="group.expandto" separator="true"/>
+ <insertionPoint name="group.expand"/>
+ <insertionPoint name="group.open" separator="true"/>
+ <insertionPoint name="group.openWith"/>
+ <insertionPoint name="group.showIn"/>
+ <insertionPoint name="group.connect" separator="true"/>
+ <insertionPoint name="group.redirect" separator="true"/>
+ <insertionPoint name="group.symbols" separator="true"/>
+ <insertionPoint name="group.symbols.rd"/>
+ <insertionPoint name="group.symbols.loadunload"/>
+ <insertionPoint name="group.symbols.additions"/>
+ <insertionPoint name="group.launch" separator="true"/>
+ <insertionPoint name="group.launch.rundebug"/>
+ <insertionPoint name="group.launch.modes"/>
+ <insertionPoint name="group.launch.additions"/>
+ <insertionPoint name="group.show" separator="true"/>
+ <insertionPoint name="group.edit" separator="true"/>
+ <insertionPoint name="group.delete"/>
+ <insertionPoint name="group.build" separator="true"/>
+ <insertionPoint name="group.importexport" separator="true"/>
+ <insertionPoint name="group.refresh" separator="true"/>
+ <insertionPoint name="group.syncop"/>
+ <insertionPoint name="group.categories" separator="true"/>
+ <insertionPoint name="group.reorganize"/>
+ <insertionPoint name="group.reorder"/>
+ <insertionPoint name="group.port"/>
+ <insertionPoint name="group.generate" separator="true"/>
+ <insertionPoint name="group.search" separator="true"/>
+ <insertionPoint name="group.connection" separator="true"/>
+ <insertionPoint name="group.operations" separator="true"/>
+ <insertionPoint name="group.analysis" separator="true"/>
+ <insertionPoint name="group.filter" separator="true"/>
+ <insertionPoint name="additions" separator="true"/>
+ <insertionPoint name="group.properties" separator="true"/>
+ </popupMenu>
+ <options>
+ <property
+ name="org.eclipse.ui.navigator.hideLinkWithEditorAction"
+ value="true">
+ </property>
+ <property
+ name="org.eclipse.ui.navigator.hideAvailableCustomizationsDialog"
+ value="true">
+ </property>
+ <property
+ name="org.eclipse.ui.navigator.enforceHasChildren"
+ value="true">
+ </property>
+ </options>
+ </viewer>
+
+ <viewerContentBinding viewerId="org.eclipse.tcf.te.ui.views.View">
+ <includes>
+ <contentExtension
+ pattern="org.eclipse.tcf.te.ui.views.navigator.*">
+ </contentExtension>
+
+ </includes>
+ </viewerContentBinding>
+
+ <viewerActionBinding
+ viewerId="org.eclipse.tcf.te.ui.views.View">
+ <includes>
+ <actionExtension
+ pattern="org.eclipse.tcf.te.ui.views.navigator.actions.*">
+ </actionExtension>
+ </includes>
+ </viewerActionBinding>
+ </extension>
+
+<!-- Common navigator contributions -->
+ <extension point="org.eclipse.ui.navigator.navigatorContent">
+
+ <!-- Default navigator content contibutions -->
+ <navigatorContent
+ activeByDefault="true"
+ contentProvider="org.eclipse.tcf.te.ui.views.navigator.ViewerContentProvider"
+ icon="icons/eview16/targets_view.gif"
+ id="org.eclipse.tcf.te.ui.views.navigator.content"
+ labelProvider="org.eclipse.tcf.te.ui.views.navigator.DelegatingLabelProvider"
+ name="%navigatorContent.name"
+ priority="highest">
+ <triggerPoints>
+ <or>
+ <instanceof value="org.eclipse.tcf.te.ui.views.interfaces.IRoot"/>
+ <instanceof value="org.eclipse.tcf.te.ui.views.interfaces.ICategory"/>
+ </or>
+ </triggerPoints>
+ <possibleChildren>
+ <or>
+ <instanceof value="org.eclipse.tcf.te.ui.views.interfaces.ICategory"/>
+ <instanceof value="org.eclipse.tcf.te.ui.views.navigator.nodes.NewWizardNode"/>
+ </or>
+ </possibleChildren>
+ <commonSorter
+ class="org.eclipse.tcf.te.ui.views.navigator.ViewerSorter"
+ id="org.eclipse.tcf.te.ui.views.navigator.sorter"/>
+ </navigatorContent>
+
+ <!-- Default navigator action contributions -->
+ <actionProvider
+ class="org.eclipse.tcf.te.ui.views.actions.NewActionProvider"
+ id="org.eclipse.tcf.te.ui.views.navigator.actions.NewActionProvider">
+ <enablement>
+ <or>
+ <not>
+ <test
+ forcePluginActivation="true"
+ property="org.eclipse.tcf.te.runtime.services.hasService"
+ value="org.eclipse.tcf.te.runtime.services.interfaces.IMenuService"/>
+ </not>
+ <test
+ property="org.eclipse.tcf.te.runtime.services.menu.isVisible"
+ args="org.eclipse.tcf.te.ui.views.navigator.actions.NewActionProvider"
+ value="true"/>
+ </or>
+ </enablement>
+ </actionProvider>
+
+ <actionProvider
+ class="org.eclipse.tcf.te.ui.views.actions.GoIntoActionProvider"
+ id="org.eclipse.tcf.te.ui.views.navigator.actions.GoIntoActionProvider">
+ <enablement>
+ <or>
+ <not>
+ <test
+ forcePluginActivation="true"
+ property="org.eclipse.tcf.te.runtime.services.hasService"
+ value="org.eclipse.tcf.te.runtime.services.interfaces.IMenuService"/>
+ </not>
+ <test
+ property="org.eclipse.tcf.te.runtime.services.menu.isVisible"
+ args="org.eclipse.tcf.te.ui.views.navigator.actions.GoIntoActionProvider"
+ value="true"/>
+ </or>
+ </enablement>
+ </actionProvider>
+
+ </extension>
+
+
+<!-- Label provider delegates -->
+ <extension point="org.eclipse.tcf.te.ui.views.labelProviderDelegates">
+ <labelProviderDelegate
+ class="org.eclipse.tcf.te.ui.views.navigator.LabelProviderDelegate"
+ id="org.eclipse.tcf.te.ui.views.labelProviderDelegate">
+ <enablement>
+ <or>
+ <instanceof value="org.eclipse.tcf.te.ui.views.interfaces.ICategory"/>
+ <instanceof value="org.eclipse.tcf.te.ui.views.navigator.nodes.NewWizardNode"/>
+ </or>
+ </enablement>
+ </labelProviderDelegate>
+ </extension>
+
+<!-- View contributions -->
+ <extension point="org.eclipse.ui.views">
+ <view
+ category="org.eclipse.tcf.te.ui.views.category"
+ class="org.eclipse.tcf.te.ui.views.internal.View"
+ icon="icons/eview16/targets_view.gif"
+ id="org.eclipse.tcf.te.ui.views.View"
+ name="%View.name"
+ restorable="true">
+ </view>
+ </extension>
+
+<!-- View categories contributions -->
+ <extension point="org.eclipse.tcf.te.ui.views.categories">
+ <category
+ class="org.eclipse.tcf.te.ui.views.categories.Category"
+ icon="icons/obj16/favorites.gif"
+ id="org.eclipse.tcf.te.ui.views.category.favorites"
+ label="%category.favorites.name"
+ rank="1">
+ <enablement>
+ <test property="org.eclipse.tcf.te.ui.views.isHiddenByPreferences" value="false"/>
+ </enablement>
+ </category>
+
+ <category
+ class="org.eclipse.tcf.te.ui.views.categories.Category"
+ icon="icons/obj16/targets.gif"
+ id="org.eclipse.tcf.te.ui.views.category.mytargets"
+ label="%category.mytargets.name"
+ rank="10">
+ <enablement>
+ <test property="org.eclipse.tcf.te.ui.views.isHiddenByPreferences" value="false"/>
+ </enablement>
+ </category>
+
+ <category
+ class="org.eclipse.tcf.te.ui.views.categories.Category"
+ icon="icons/obj16/neighborhood.gif"
+ id="org.eclipse.tcf.te.ui.views.category.neighborhood"
+ label="%category.neighborhood.name"
+ rank="20">
+ <enablement>
+ <test property="org.eclipse.tcf.te.ui.views.isHiddenByPreferences" value="false"/>
+ </enablement>
+ </category>
+ </extension>
+
+<!-- Perspective -->
+ <extension point="org.eclipse.ui.perspectives">
+ <perspective
+ class="org.eclipse.tcf.te.ui.views.perspective.PerspectiveFactory"
+ icon="icons/eview16/editor.gif"
+ id="org.eclipse.tcf.te.ui.perspective"
+ name="%Perspective.name">
+ </perspective>
+ </extension>
+
+<!-- Perspective contributions -->
+ <extension point="org.eclipse.ui.perspectiveExtensions">
+ <perspectiveExtension targetID="org.eclipse.tcf.te.ui.perspective">
+ <!-- Run/Debug actions should be available -->
+ <actionSet id="org.eclipse.debug.ui.launchActionSet"/>
+ <!-- Register the view shortcuts -->
+ <viewShortcut id="org.eclipse.tcf.te.ui.views.View"/>
+ <viewShortcut id="org.eclipse.debug.ui.DebugView"/>
+ <viewShortcut id="org.eclipse.ui.views.PropertySheet"/>
+ <!-- Register the perspective shortcuts -->
+ <perspectiveShortcut id="org.eclipse.debug.ui.DebugPerspective"/>
+ </perspectiveExtension>
+
+ <perspectiveExtension targetID="org.eclipse.ui.resourcePerspective">
+ <!-- Run/Debug actions should be available -->
+ <actionSet id="org.eclipse.debug.ui.launchActionSet"/>
+ <!-- Register the view shortcuts -->
+ <viewShortcut id="org.eclipse.tcf.te.ui.views.View"/>
+ <!-- Register the perspective shortcuts -->
+ <perspectiveShortcut id="org.eclipse.tcf.te.ui.perspective"/>
+ <!-- System management view is placed relative to the Project Explorer -->
+ <view
+ id="org.eclipse.tcf.te.ui.views.View"
+ minimized="false"
+ relationship="stack"
+ relative="org.eclipse.ui.navigator.ProjectExplorer"
+ visible="false">
+ </view>
+ </perspectiveExtension>
+
+ <perspectiveExtension targetID="org.eclipse.debug.ui.DebugPerspective">
+ <!-- Register the view shortcuts -->
+ <viewShortcut id="org.eclipse.tcf.te.ui.views.View"/>
+ <!-- Register the perspective shortcuts -->
+ <perspectiveShortcut id="org.eclipse.tcf.te.ui.perspective"/>
+ <!-- System management view is placed relative to the Debug View -->
+ <view
+ id="org.eclipse.tcf.te.ui.views.View"
+ minimized="false"
+ relationship="stack"
+ relative="org.eclipse.debug.ui.DebugView"
+ visible="false">
+ </view>
+ </perspectiveExtension>
+
+ <perspectiveExtension targetID="org.eclipse.cdt.ui.CPerspective">
+ <!-- Register the view shortcuts -->
+ <viewShortcut id="org.eclipse.tcf.te.ui.views.View"/>
+ <!-- Register the perspective shortcuts -->
+ <perspectiveShortcut id="org.eclipse.tcf.te.ui.perspective"/>
+ <!-- System management view is placed relative to the C/C++ View -->
+ <view
+ id="org.eclipse.tcf.te.ui.views.View"
+ minimized="false"
+ relationship="stack"
+ relative="org.eclipse.cdt.ui.CView"
+ visible="false">
+ </view>
+ </perspectiveExtension>
+ </extension>
+
+<!-- Editor contributions -->
+ <extension point="org.eclipse.ui.editors">
+ <editor
+ class="org.eclipse.tcf.te.ui.views.editor.Editor"
+ default="false"
+ icon="icons/eview16/prop_ps.gif"
+ id="org.eclipse.tcf.te.ui.views.Editor"
+ name="%Editor.name">
+ </editor>
+ </extension>
+
+<!-- Tabbed properties view contributions -->
+ <extension point="org.eclipse.ui.views.properties.tabbed.propertyContributor">
+ <propertyContributor
+ contributorId="org.eclipse.tcf.te.ui"
+ labelProvider="org.eclipse.tcf.te.ui.views.internal.PropertyContributorLabelProvider">
+ <propertyCategory category="org.eclipse.tcf.te"/>
+ </propertyContributor>
+ </extension>
+
+<!-- Service contributions -->
+ <extension point="org.eclipse.tcf.te.runtime.services.services">
+ <service
+ class="org.eclipse.tcf.te.ui.views.internal.services.MenuService"
+ id="org.eclipse.tcf.te.ui.views.services.MenuService">
+ <serviceType
+ bundleId="org.eclipse.tcf.te.runtime.services"
+ class="org.eclipse.tcf.te.runtime.services.interfaces.IMenuService"/>
+ <enablement>
+ <instanceof value="org.eclipse.tcf.te.ui.views.interfaces.ICategory"/>
+ </enablement>
+ </service>
+ </extension>
+
+<!-- Menu contributions -->
+ <extension point="org.eclipse.ui.menus">
+ <menuContribution locationURI="popup:org.eclipse.tcf.te.ui.views.View#Popup?after=group.open">
+ <command
+ commandId="org.eclipse.ui.navigator.Open"
+ helpContextId="org.eclipse.tcf.te.ui.views.command_Open"
+ id="properties"
+ label="%command.open.label"
+ mnemonic="%command.open.mnemonic"
+ tooltip="%command.openroperties.tooltip">
+ <visibleWhen>
+ <with variable="selection">
+ <count value="1"/>
+ <iterate operator="and" ifEmpty="false">
+ <test property="org.eclipse.tcf.te.ui.views.hasApplicableEditorBindings" value="true"/>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+
+ <menuContribution locationURI="popup:org.eclipse.tcf.te.ui.views.View#Popup?after=group.importexport">
+ <command
+ commandId="org.eclipse.ui.file.import">
+ <visibleWhen checkEnabled="false">
+ <with variable="selection">
+ <iterate operator="and" ifEmpty="false">
+ <or>
+ <not>
+ <test
+ forcePluginActivation="true"
+ property="org.eclipse.tcf.te.runtime.services.hasService"
+ value="org.eclipse.tcf.te.runtime.services.interfaces.IMenuService"/>
+ </not>
+ <test
+ property="org.eclipse.tcf.te.runtime.services.menu.isVisible"
+ args="org.eclipse.ui.file.import"
+ value="true"/>
+ </or>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.ui.file.export">
+ <visibleWhen checkEnabled="false">
+ <with variable="selection">
+ <iterate operator="and" ifEmpty="false">
+ <or>
+ <not>
+ <test
+ forcePluginActivation="true"
+ property="org.eclipse.tcf.te.runtime.services.hasService"
+ value="org.eclipse.tcf.te.runtime.services.interfaces.IMenuService"/>
+ </not>
+ <test
+ property="org.eclipse.tcf.te.runtime.services.menu.isVisible"
+ args="org.eclipse.ui.file.export"
+ value="true"/>
+ </or>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+
+ <menuContribution locationURI="popup:org.eclipse.tcf.te.ui.views.View#Popup?after=group.showIn">
+ <menu
+ commandId="org.eclipse.tcf.te.ui.views.command.ShowInGroup"
+ id="org.eclipse.tcf.te.ui.views.View.menu.showIn"
+ label="%menu.showIn.label">
+ <visibleWhen checkEnabled="false">
+ <with variable="selection">
+ <iterate operator="and" ifEmpty="false">
+ <or>
+ <not>
+ <test
+ forcePluginActivation="true"
+ property="org.eclipse.tcf.te.runtime.services.hasService"
+ value="org.eclipse.tcf.te.runtime.services.interfaces.IMenuService"/>
+ </not>
+ <test
+ property="org.eclipse.tcf.te.runtime.services.menu.isVisible"
+ args="org.eclipse.tcf.te.ui.views.View.menu.showIn"
+ value="true"/>
+ </or>
+ </iterate>
+ </with>
+ </visibleWhen>
+
+ <command
+ commandId="org.eclipse.tcf.te.ui.views.command.ShowInProperties"
+ icon="icons/eview16/prop_ps.gif"
+ label="%menu.properties.label"
+ style="push">
+ </command>
+ </menu>
+ </menuContribution>
+
+ <menuContribution locationURI="menu:org.eclipse.tcf.te.ui.views.View?after=additions">
+ <separator
+ name="group.filters"
+ visible="true">
+ </separator>
+ <dynamic
+ class="org.eclipse.tcf.te.ui.views.handler.FilterMRUContribution"
+ id="org.eclipse.tcf.te.ui.views.dynamic.filterMRU">
+ </dynamic>
+ <command
+ commandId="org.eclipse.tcf.te.ui.views.command.filters"
+ icon="platform:/plugin/org.eclipse.ui.navigator/icons/full/elcl16/filter_ps.gif"
+ id="org.eclipse.tcf.te.ui.views.command.filters"
+ label="%command.filters.label"
+ style="push">
+ </command>
+ <separator
+ name="group.content"
+ visible="true">
+ </separator>
+ <dynamic
+ class="org.eclipse.tcf.te.ui.views.handler.ContentMRUContribution"
+ id="org.eclipse.tcf.te.ui.views.dynamic.contentMRU">
+ </dynamic>
+ <command
+ commandId="org.eclipse.tcf.te.ui.views.command.content"
+ icon="platform:/plugin/org.eclipse.ui.navigator/icons/full/elcl16/content.gif"
+ id="org.eclipse.tcf.te.ui.views.command.content"
+ label="%command.content.label"
+ style="push">
+ </command>
+ </menuContribution>
+
+ <menuContribution locationURI="popup:org.eclipse.tcf.te.ui.views.View#Popup?after=group.categories">
+ <menu
+ id="org.eclipse.tcf.te.ui.views.menu.categories.add"
+ label="%menu.categories.addto.label">
+ <dynamic
+ id="org.eclipse.tcf.te.ui.views.dynamic.categories.add.multi"
+ class="org.eclipse.tcf.te.ui.views.handler.CategoryAddToContributionItem">
+ </dynamic>
+ <visibleWhen checkEnabled="false">
+ <with variable="selection">
+ <test property="org.eclipse.tcf.te.ui.views.validAddToCategoriesCount" value="(1-"/>
+ <iterate operator="and" ifEmpty="false">
+ <adapt type="org.eclipse.tcf.te.ui.views.interfaces.categories.ICategorizable"/>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </menu>
+
+ <dynamic
+ id="org.eclipse.tcf.te.ui.views.dynamic.categories.add.single"
+ class="org.eclipse.tcf.te.ui.views.handler.CategoryAddToContributionItem">
+ <visibleWhen checkEnabled="false">
+ <with variable="selection">
+ <test property="org.eclipse.tcf.te.ui.views.validAddToCategoriesCount" value="1"/>
+ <iterate operator="and" ifEmpty="false">
+ <adapt type="org.eclipse.tcf.te.ui.views.interfaces.categories.ICategorizable"/>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </dynamic>
+ </menuContribution>
+
+ <menuContribution locationURI="popup:org.eclipse.tcf.te.ui.views.View#Popup?after=group.filter">
+ <command
+ commandId="org.eclipse.tcf.te.ui.views.command.quickfilter"
+ label="%menu.filter.label"
+ mnemonic="%menu.filter.mnemonic"
+ style="push">
+ <visibleWhen checkEnabled="false">
+ <with variable="selection">
+ <iterate>
+ <adapt type="org.eclipse.tcf.te.core.interfaces.IFilterable">
+ <instanceof value="org.eclipse.tcf.te.core.interfaces.IFilterable"/>
+ </adapt>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.tcf.te.ui.views.command.resetfilter"
+ label="%menu.reset.label"
+ mnemonic="%menu.reset.mnemonic"
+ style="push">
+ <visibleWhen checkEnabled="false">
+ <with variable="selection">
+ <iterate>
+ <adapt type="org.eclipse.tcf.te.core.interfaces.IFilterable">
+ <instanceof value="org.eclipse.tcf.te.core.interfaces.IFilterable"/>
+ </adapt>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+
+ <menuContribution locationURI="popup:org.eclipse.tcf.te.ui.views.View#Popup?after=group.search">
+ <command
+ commandId="org.eclipse.tcf.te.ui.views.command.find"
+ label="%menu.find.label"
+ mnemonic="%menu.find.mnemonic"
+ style="push">
+ <visibleWhen checkEnabled="false">
+ <with variable="selection">
+ <iterate>
+ <adapt type="org.eclipse.tcf.te.ui.interfaces.ISearchable">
+ <instanceof value="org.eclipse.tcf.te.ui.interfaces.ISearchable"/>
+ </adapt>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+
+ </extension>
+
+<!-- Command contributions -->
+ <extension point="org.eclipse.ui.commands">
+ <!-- Definition of the Common Navigator global retargetable open
+ action id as command.
+ -->
+ <command
+ categoryId="org.eclipse.tcf.te.ui.commands.category"
+ helpContextId="org.eclipse.ui.navigator.Open"
+ id="org.eclipse.ui.navigator.Open"
+ name="%command.open.name">
+ </command>
+ <command
+ categoryId="org.eclipse.tcf.te.ui.commands.category"
+ helpContextId="org.eclipse.tcf.te.ui.views.command_ShowInGroup"
+ id="org.eclipse.tcf.te.ui.views.command.ShowInGroup"
+ name="%command.showin.name">
+ </command>
+
+ <command
+ categoryId="org.eclipse.tcf.te.ui.commands.category"
+ helpContextId="org.eclipse.tcf.te.ui.views.command_ShowInProperties"
+ id="org.eclipse.tcf.te.ui.views.command.ShowInProperties"
+ name="%command.showInProperties.label">
+ </command>
+ <command
+ categoryId="org.eclipse.tcf.te.ui.commands.category"
+ helpContextId="org.eclipse.tcf.te.ui.views.command_Filters"
+ id="org.eclipse.tcf.te.ui.views.command.filters"
+ name="%command.filters.name">
+ </command>
+ <command
+ categoryId="org.eclipse.tcf.te.ui.commands.category"
+ helpContextId="org.eclipse.tcf.te.ui.views.command_Content"
+ id="org.eclipse.tcf.te.ui.views.command.content"
+ name="%command.content.name">
+ </command>
+ <command
+ categoryId="org.eclipse.tcf.te.ui.commands.category"
+ description="%command.find.description"
+ id="org.eclipse.tcf.te.ui.views.command.find"
+ name="%command.find.name">
+ </command>
+ <command
+ categoryId="org.eclipse.tcf.te.ui.commands.category"
+ description="%command.filter.description"
+ id="org.eclipse.tcf.te.ui.views.command.quickfilter"
+ name="%command.filter.name">
+ </command>
+ <command
+ categoryId="org.eclipse.tcf.te.ui.commands.category"
+ description="%command.reset.description"
+ id="org.eclipse.tcf.te.ui.views.command.resetfilter"
+ name="%command.reset.name">
+ </command>
+ <command
+ categoryId="org.eclipse.tcf.te.ui.commands.category"
+ description="%command.showInSM.description"
+ id="org.eclipse.tcf.te.ui.command.showIn.systemManagement"
+ name="%command.showInSM.name">
+ </command>
+ <command
+ categoryId="org.eclipse.tcf.te.ui.commands.category"
+ description="%command.apply.description"
+ id="org.eclipse.tcf.te.ui.views.command.apply"
+ name="%command.apply.name">
+ </command>
+ </extension>
+
+ <extension point="org.eclipse.ui.commandImages">
+ <image
+ commandId="org.eclipse.tcf.te.ui.command.showIn.systemManagement"
+ icon="icons/eview16/targets_view.gif">
+ </image>
+ <image
+ commandId="org.eclipse.tcf.te.ui.views.command.find"
+ icon="icons/obj16/search.gif">
+ </image>
+ <image
+ commandId="org.eclipse.tcf.te.ui.views.command.quickfilter"
+ icon="platform:/plugin/org.eclipse.ui.navigator/icons/full/elcl16/filter_ps.gif">
+ </image>
+ <image
+ commandId="org.eclipse.tcf.te.ui.views.command.apply"
+ disabledIcon="platform:/plugin/org.eclipse.ui/icons/full/dtool16/save_edit.gif"
+ icon="platform:/plugin/org.eclipse.ui/icons/full/etool16/save_edit.gif">
+ </image>
+ </extension>
+
+ <extension point="org.eclipse.ui.bindings">
+ <key
+ commandId="org.eclipse.tcf.te.ui.views.command.ShowInGroup"
+ contextId="org.eclipse.tcf.te.ui.views.View"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="M3+M2+W">
+ </key>
+ <key
+ commandId="org.eclipse.tcf.te.ui.views.command.find"
+ contextId="org.eclipse.tcf.te.ui.views.View"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="M1+F">
+ </key>
+ <key
+ commandId="org.eclipse.tcf.te.ui.views.command.find"
+ contextId="org.eclipse.tcf.te.ui.views.Editor"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="M1+F">
+ </key>
+ <key
+ commandId="org.eclipse.tcf.te.ui.views.command.quickfilter"
+ contextId="org.eclipse.tcf.te.ui.views.View"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="M1+T">
+ </key>
+ <key
+ commandId="org.eclipse.tcf.te.ui.views.command.quickfilter"
+ contextId="org.eclipse.tcf.te.ui.views.Editor"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="M1+T">
+ </key>
+ <key
+ commandId="org.eclipse.tcf.te.ui.views.command.resetfilter"
+ contextId="org.eclipse.tcf.te.ui.views.View"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="ESC">
+ </key>
+ <key
+ commandId="org.eclipse.tcf.te.ui.views.command.resetfilter"
+ contextId="org.eclipse.tcf.te.ui.views.Editor"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="ESC">
+ </key>
+ </extension>
+
+<!-- Handler contributions -->
+ <extension point="org.eclipse.ui.handlers">
+ <handler
+ commandId="org.eclipse.ui.file.properties"
+ class="org.eclipse.tcf.te.ui.views.handler.OpenEditorHandler">
+ <activeWhen>
+ <with variable="activePartId">
+ <equals value="org.eclipse.tcf.te.ui.views.View"/>
+ </with>
+ </activeWhen>
+ <enabledWhen>
+ <with variable="selection">
+ <iterate operator="and" ifEmpty="false">
+ <test property="org.eclipse.tcf.te.ui.views.hasApplicableEditorBindings" value="true"/>
+ </iterate>
+ </with>
+ </enabledWhen>
+ </handler>
+
+ <handler
+ commandId="org.eclipse.ui.navigator.Open"
+ class="org.eclipse.tcf.te.ui.views.handler.NewWizardHandler">
+ <activeWhen>
+ <and>
+ <with variable="activePartId">
+ <equals value="org.eclipse.tcf.te.ui.views.View"/>
+ </with>
+ <with variable="selection">
+ <count value="1"/>
+ <iterate operator="and" ifEmpty="false">
+ <instanceof value="org.eclipse.tcf.te.ui.views.navigator.nodes.NewWizardNode"/>
+ </iterate>
+ </with>
+ </and>
+ </activeWhen>
+ <enabledWhen>
+ <with variable="selection">
+ <count value="1"/>
+ <iterate operator="and" ifEmpty="false">
+ <instanceof value="org.eclipse.tcf.te.ui.views.navigator.nodes.NewWizardNode"/>
+ </iterate>
+ </with>
+ </enabledWhen>
+ </handler>
+
+ <handler
+ commandId="org.eclipse.ui.navigator.Open"
+ class="org.eclipse.tcf.te.ui.views.handler.OpenEditorHandler">
+ <activeWhen>
+ <and>
+ <with variable="activePartId">
+ <equals value="org.eclipse.tcf.te.ui.views.View"/>
+ </with>
+ <with variable="selection">
+ <iterate operator="and" ifEmpty="false">
+ <test property="org.eclipse.tcf.te.ui.views.hasApplicableEditorBindings" value="true"/>
+ </iterate>
+ </with>
+ </and>
+ </activeWhen>
+ <enabledWhen>
+ <with variable="selection">
+ <iterate operator="and" ifEmpty="false">
+ <test property="org.eclipse.tcf.te.ui.views.hasApplicableEditorBindings" value="true"/>
+ </iterate>
+ </with>
+ </enabledWhen>
+ </handler>
+
+ <handler
+ class="org.eclipse.tcf.te.ui.views.handler.ShowInPropertiesHandler"
+ commandId="org.eclipse.tcf.te.ui.views.command.ShowInProperties">
+ <activeWhen>
+ <with variable="activePartId">
+ <equals value="org.eclipse.tcf.te.ui.views.View"/>
+ </with>
+ </activeWhen>
+ </handler>
+
+ <handler
+ class="org.eclipse.tcf.te.ui.views.handler.ShowInSystemManagementHandler"
+ commandId="org.eclipse.tcf.te.ui.command.showIn.systemManagement">
+ </handler>
+
+ <handler
+ class="org.eclipse.tcf.te.ui.views.handler.ConfigFiltersHandler"
+ commandId="org.eclipse.tcf.te.ui.views.command.filters">
+ <activeWhen>
+ <with variable="activePartId">
+ <equals value="org.eclipse.tcf.te.ui.views.View"/>
+ </with>
+ </activeWhen>
+ </handler>
+
+ <handler
+ class="org.eclipse.tcf.te.ui.views.handler.ConfigContentHandler"
+ commandId="org.eclipse.tcf.te.ui.views.command.content">
+ <activeWhen>
+ <with variable="activePartId">
+ <equals value="org.eclipse.tcf.te.ui.views.View"/>
+ </with>
+ </activeWhen>
+ </handler>
+
+ <handler
+ class="org.eclipse.tcf.te.ui.views.handler.ViewQuickFilterHanlder"
+ commandId="org.eclipse.tcf.te.ui.views.command.quickfilter">
+ <activeWhen>
+ <with variable="activePartId">
+ <equals value="org.eclipse.tcf.te.ui.views.View"/>
+ </with>
+ </activeWhen>
+ <enabledWhen>
+ <with variable="activePart">
+ <adapt type="org.eclipse.ui.navigator.CommonViewer">
+ <test property="org.eclipse.tcf.te.ui.views.isFilterable"/>
+ </adapt>
+ </with>
+ </enabledWhen>
+ </handler>
+
+ <handler
+ class="org.eclipse.tcf.te.ui.views.handler.ViewQuickFilterResetHanlder"
+ commandId="org.eclipse.tcf.te.ui.views.command.resetfilter">
+ <activeWhen>
+ <with variable="activePartId">
+ <equals value="org.eclipse.tcf.te.ui.views.View"/>
+ </with>
+ </activeWhen>
+ <enabledWhen>
+ <with variable="activePart">
+ <adapt type="org.eclipse.ui.navigator.CommonViewer">
+ <test property="org.eclipse.tcf.te.ui.views.isFiltering"/>
+ </adapt>
+ </with>
+ </enabledWhen>
+ </handler>
+
+ <handler
+ class="org.eclipse.tcf.te.ui.views.handler.EditorQuickFilterHanlder"
+ commandId="org.eclipse.tcf.te.ui.views.command.quickfilter">
+ <activeWhen>
+ <with variable="activePartId">
+ <equals value="org.eclipse.tcf.te.ui.views.Editor"/>
+ </with>
+ </activeWhen>
+ <enabledWhen>
+ <with variable="activeEditor">
+ <test property="org.eclipse.tcf.te.ui.views.isEditorFilterable"/>
+ </with>
+ </enabledWhen>
+ </handler>
+
+ <handler
+ class="org.eclipse.tcf.te.ui.views.handler.EditorQuickFilterResetHanlder"
+ commandId="org.eclipse.tcf.te.ui.views.command.resetfilter">
+ <activeWhen>
+ <with variable="activePartId">
+ <equals value="org.eclipse.tcf.te.ui.views.Editor"/>
+ </with>
+ </activeWhen>
+ <enabledWhen>
+ <with variable="activeEditor">
+ <adapt type="org.eclipse.jface.viewers.TreeViewer">
+ <test property="org.eclipse.tcf.te.ui.views.isFiltering"/>
+ </adapt>
+ </with>
+ </enabledWhen>
+ </handler>
+
+ <handler
+ class="org.eclipse.tcf.te.ui.views.handler.ViewSearchHandler"
+ commandId="org.eclipse.tcf.te.ui.views.command.find">
+ <activeWhen>
+ <with variable="activePartId">
+ <equals value="org.eclipse.tcf.te.ui.views.View"/>
+ </with>
+ </activeWhen>
+ <enabledWhen>
+ <with variable="selection">
+ <count value="1"/>
+ <iterate>
+ <adapt type="org.eclipse.tcf.te.ui.interfaces.ISearchable">
+ </adapt>
+ </iterate>
+ </with>
+ </enabledWhen>
+ </handler>
+
+ <handler
+ class="org.eclipse.tcf.te.ui.views.handler.EditorSearchHandler"
+ commandId="org.eclipse.tcf.te.ui.views.command.find">
+ <activeWhen>
+ <with variable="activePartId">
+ <equals value="org.eclipse.tcf.te.ui.views.Editor"/>
+ </with>
+ </activeWhen>
+ <enabledWhen>
+ <with variable="selection">
+ <count value="1"/>
+ <iterate>
+ <adapt type="org.eclipse.tcf.te.ui.interfaces.ISearchable">
+ </adapt>
+ </iterate>
+ </with>
+ </enabledWhen>
+ </handler>
+ </extension>
+
+<!-- Eclipse core expressions property tester -->
+ <extension point="org.eclipse.core.expressions.propertyTesters">
+ <propertyTester
+ class="org.eclipse.tcf.te.ui.views.expressions.PropertyTester"
+ id="org.eclipse.tcf.te.ui.views.PropertyTester"
+ namespace="org.eclipse.tcf.te.ui.views"
+ properties="isDirty,hasApplicableEditorBindings"
+ type="java.lang.Object">
+ </propertyTester>
+
+ <propertyTester
+ class="org.eclipse.tcf.te.ui.views.internal.categories.CategoryPropertyTester"
+ id="org.eclipse.tcf.te.ui.views.categories.CategoryPropertyTester"
+ namespace="org.eclipse.tcf.te.ui.views"
+ properties="isCategoryEnabled"
+ type="java.lang.Object">
+ </propertyTester>
+
+ <propertyTester
+ class="org.eclipse.tcf.te.ui.views.internal.categories.CategoryPropertyTester"
+ id="org.eclipse.tcf.te.ui.views.categories.CategoryPropertyTester"
+ namespace="org.eclipse.tcf.te.ui.views"
+ properties="isCategoryID,belongsTo,isHiddenByPreferences,isVisibleNavigatorContent"
+ type="org.eclipse.tcf.te.ui.views.interfaces.ICategory">
+ </propertyTester>
+
+ <propertyTester
+ class="org.eclipse.tcf.te.ui.views.internal.categories.CategoryPropertyTester"
+ id="org.eclipse.tcf.te.ui.views.categories.CategoryPropertyTester"
+ namespace="org.eclipse.tcf.te.ui.views"
+ properties="belongsTo"
+ type="org.eclipse.tcf.te.ui.views.interfaces.categories.ICategorizable">
+ </propertyTester>
+
+ <propertyTester
+ class="org.eclipse.tcf.te.ui.views.internal.categories.CategoryPropertyTester"
+ id="org.eclipse.tcf.te.ui.views.categories.CategoryPropertyTester"
+ namespace="org.eclipse.tcf.te.ui.views"
+ properties="parentCategoryId,validAddToCategoriesCount"
+ type="org.eclipse.jface.viewers.ISelection">
+ </propertyTester>
+
+ <propertyTester
+ class="org.eclipse.tcf.te.ui.views.internal.quickfilter.QuickFilterTester"
+ id="org.eclipse.tcf.te.ui.views.quickfilter.QuickFilterTester"
+ namespace="org.eclipse.tcf.te.ui.views"
+ properties="isFilterable,isFiltering"
+ type="org.eclipse.jface.viewers.TreeViewer">
+ </propertyTester>
+
+ <propertyTester
+ class="org.eclipse.tcf.te.ui.views.internal.quickfilter.EditorQuickFilterTester"
+ id="org.eclipse.tcf.te.ui.views.quickfilter.EditorQuickFilterTester"
+ namespace="org.eclipse.tcf.te.ui.views"
+ properties="isEditorFilterable"
+ type="org.eclipse.tcf.te.ui.views.editor.Editor">
+ </propertyTester>
+
+ </extension>
+
+<!-- Preference contributions -->
+ <extension point="org.eclipse.core.runtime.preferences">
+ <initializer class="org.eclipse.tcf.te.ui.views.internal.preferences.PreferencesInitializer"/>
+ </extension>
+
+<!-- Element factory contributions -->
+ <extension point="org.eclipse.ui.elementFactories">
+ <factory
+ class="org.eclipse.tcf.te.ui.views.internal.categories.CategoryFactory"
+ id="org.eclipse.tcf.te.ui.views.categoryFactory">
+ </factory>
+ </extension>
+
+<!-- Adapter factory contributions -->
+ <extension point="org.eclipse.core.runtime.adapters">
+ <factory
+ adaptableType="org.eclipse.tcf.te.ui.views.internal.View"
+ class="org.eclipse.tcf.te.ui.views.internal.adapters.ViewAdapterFactory">
+ <adapter type="org.eclipse.ui.navigator.CommonViewer"/>
+ </factory>
+ <factory
+ adaptableType="org.eclipse.tcf.te.ui.views.editor.Editor"
+ class="org.eclipse.tcf.te.ui.views.internal.adapters.EditorAdapterFactory">
+ <adapter type="org.eclipse.jface.viewers.TreeViewer"/>
+ </factory>
+ <factory
+ adaptableType="org.eclipse.tcf.te.ui.views.editor.EditorInput"
+ class="org.eclipse.tcf.te.ui.views.internal.adapters.EditorAdapterFactory">
+ <adapter type="org.eclipse.tcf.te.runtime.model.interfaces.IModelNode"/>
+ </factory>
+ </extension>
+
+<!-- Source provider contributions -->
+ <extension point="org.eclipse.ui.services">
+ <sourceProvider
+ provider="org.eclipse.tcf.te.ui.views.expressions.SelectionSourceProvider">
+ <variable
+ name="systemManagerViewSelection"
+ priorityLevel="workbench">
+ </variable>
+ <variable
+ name="debugViewSelection"
+ priorityLevel="workbench">
+ </variable>
+ </sourceProvider>
+ </extension>
+
+</plugin>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/schema/labelProviderDelegates.exsd b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/schema/labelProviderDelegates.exsd
index 8207394d8..35cc07301 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/schema/labelProviderDelegates.exsd
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/schema/labelProviderDelegates.exsd
@@ -77,6 +77,13 @@ Label provider delegates are used to customize entries in the System Management
</appinfo>
</annotation>
</attribute>
+ <attribute name="rank" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
</complexType>
</element>
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 01be98f61..36ae87b35 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
@@ -11,6 +11,8 @@ package org.eclipse.tcf.te.ui.views.extensions;
import java.util.ArrayList;
import java.util.Collection;
+import java.util.Collections;
+import java.util.Comparator;
import java.util.List;
import org.eclipse.core.expressions.EvaluationContext;
@@ -82,6 +84,7 @@ public class LabelProviderDelegateExtensionPointManager extends AbstractExtensio
public ILabelProvider[] getDelegates(Object context, boolean unique) {
List<ILabelProvider> contributions = new ArrayList<ILabelProvider>();
Collection<ExecutableExtensionProxy<ILabelProvider>> delegates = getExtensions().values();
+ List<ExecutableExtensionProxy<ILabelProvider>> applicableDelegates = new ArrayList<ExecutableExtensionProxy<ILabelProvider>>();
for (ExecutableExtensionProxy<ILabelProvider> delegate : delegates) {
Expression enablement = null;
// Read the sub elements of the extension
@@ -119,12 +122,35 @@ public class LabelProviderDelegateExtensionPointManager extends AbstractExtensio
}
if (isApplicable) {
- ILabelProvider instance = unique ? delegate.newInstance() : delegate.getInstance();
- if (instance != null && !contributions.contains(instance)) {
- contributions.add(instance);
- }
+ applicableDelegates.add(delegate);
}
}
+ Collections.sort(applicableDelegates, new Comparator<ExecutableExtensionProxy<ILabelProvider>>() {
+ @Override
+ public int compare(ExecutableExtensionProxy<ILabelProvider> o1, ExecutableExtensionProxy<ILabelProvider> o2) {
+ String rank1Str = o1.getConfigurationElement().getAttribute("rank"); //$NON-NLS-1$
+ int rank1 = 0;
+ try{
+ rank1 = rank1Str != null ? Integer.parseInt(rank1Str) : 0;
+ }
+ catch (Exception e) {
+ }
+ String rank2Str = o2.getConfigurationElement().getAttribute("rank"); //$NON-NLS-1$
+ int rank2 = 0;
+ try{
+ rank2 = rank2Str != null ? Integer.parseInt(rank2Str) : 0;
+ }
+ catch (Exception e) {
+ }
+ return rank2-rank1;
+ }
+ });
+ for (ExecutableExtensionProxy<ILabelProvider> delegate : applicableDelegates) {
+ ILabelProvider instance = unique ? delegate.newInstance() : delegate.getInstance();
+ if (instance != null && !contributions.contains(instance)) {
+ contributions.add(instance);
+ }
+ }
return contributions.toArray(new ILabelProvider[contributions.size()]);
}
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
new file mode 100644
index 000000000..ba54e3b36
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/navigator/DelegatingLabelProvider.java
@@ -0,0 +1,104 @@
+/*******************************************************************************
+ * 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.navigator;
+
+import org.eclipse.jface.viewers.ILabelDecorator;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.tcf.te.runtime.services.interfaces.delegates.ILabelProviderDelegate;
+import org.eclipse.tcf.te.ui.views.extensions.LabelProviderDelegateExtensionPointManager;
+
+
+/**
+ * Label provider implementation.
+ */
+public class DelegatingLabelProvider extends LabelProvider implements ILabelDecorator, ILabelProviderDelegate {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.LabelProvider#getText(java.lang.Object)
+ */
+ @Override
+ public String getText(final Object element) {
+ ILabelProvider[] delegates = LabelProviderDelegateExtensionPointManager.getInstance().getDelegates(element, false);
+
+ if (delegates != null && delegates.length > 0) {
+ for (ILabelProvider delegate : delegates) {
+ String text = delegate.getText(element);
+ if (text != null) {
+ return text;
+ }
+ }
+ }
+
+ return super.getText(element);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.LabelProvider#getImage(java.lang.Object)
+ */
+ @Override
+ public Image getImage(final Object element) {
+ ILabelProvider[] delegates = LabelProviderDelegateExtensionPointManager.getInstance().getDelegates(element, false);
+
+ if (delegates != null && delegates.length > 0) {
+ for (ILabelProvider delegate : delegates) {
+ Image image = delegate.getImage(element);
+ if (image != null) {
+ return image;
+ }
+ }
+ }
+
+ return super.getImage(element);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ILabelDecorator#decorateImage(org.eclipse.swt.graphics.Image, java.lang.Object)
+ */
+ @Override
+ public Image decorateImage(Image image, Object element) {
+ ILabelProvider[] delegates = LabelProviderDelegateExtensionPointManager.getInstance().getDelegates(element, false);
+
+ if (delegates != null && delegates.length > 0) {
+ for (ILabelProvider delegate : delegates) {
+ if (delegate instanceof ILabelDecorator) {
+ Image candidate = ((ILabelDecorator)delegate).decorateImage(image, element);
+ if (candidate != null) {
+ return candidate;
+ }
+ }
+ }
+ }
+
+ return image;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ILabelDecorator#decorateText(java.lang.String, java.lang.Object)
+ */
+ @Override
+ public String decorateText(final String text, final Object element) {
+ ILabelProvider[] delegates = LabelProviderDelegateExtensionPointManager.getInstance().getDelegates(element, false);
+
+ if (delegates != null && delegates.length > 0) {
+ for (ILabelProvider delegate : delegates) {
+ if (delegate instanceof ILabelDecorator) {
+ String candidate = ((ILabelDecorator)delegate).decorateText(text, element);
+ if (candidate != null) {
+ return candidate;
+ }
+ }
+ }
+ }
+
+ return text;
+ }
+}

Back to the top