diff options
author | Uwe Stieber | 2013-04-30 12:20:11 +0000 |
---|---|---|
committer | Uwe Stieber | 2013-04-30 12:20:11 +0000 |
commit | eade832e0345596d9da905d22c400773dba2b13a (patch) | |
tree | 9615c7a6c988151ba72ef9fc44b8f8992ba2487a /target_explorer | |
parent | a648946d7a8bc9d5b3ef6fe337b971e3b9c20210 (diff) | |
download | org.eclipse.tcf-eade832e0345596d9da905d22c400773dba2b13a.tar.gz org.eclipse.tcf-eade832e0345596d9da905d22c400773dba2b13a.tar.xz org.eclipse.tcf-eade832e0345596d9da905d22c400773dba2b13a.zip |
Target Explorer: Fix sorting in tree should be case insensitive
Diffstat (limited to 'target_explorer')
6 files changed, 685 insertions, 634 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/controls/FSTreeViewerSorter.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/controls/FSTreeViewerSorter.java index 657dc9378..1f548ab3a 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/controls/FSTreeViewerSorter.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/controls/FSTreeViewerSorter.java @@ -3,7 +3,7 @@ * 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 *******************************************************************************/ @@ -12,12 +12,12 @@ package org.eclipse.tcf.te.tcf.filesystem.ui.controls; import org.eclipse.jface.viewers.Viewer; import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode; import org.eclipse.tcf.te.tcf.filesystem.ui.internal.columns.FSTreeElementComparator; -import org.eclipse.tcf.te.ui.trees.TreeViewerSorter; +import org.eclipse.tcf.te.ui.trees.TreeViewerSorterCaseInsensitive; /** * File system tree control viewer sorter implementation. */ -public class FSTreeViewerSorter extends TreeViewerSorter { +public class FSTreeViewerSorter extends TreeViewerSorterCaseInsensitive { private final FSTreeElementComparator comparator; /** 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 c8139601f..04bb35434 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 @@ -104,7 +104,7 @@ </or> </possibleChildren> <commonSorter - class="org.eclipse.tcf.te.ui.trees.TreeViewerSorter"> + class="org.eclipse.tcf.te.ui.trees.TreeViewerSorterCaseInsensitive"> </commonSorter> </navigatorContent> 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 bc33b3b03..5c85661e6 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 @@ -1,591 +1,591 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
-
-<!-- Adapter factory contributions -->
- <extension point="org.eclipse.core.runtime.adapters">
- <factory
- adaptableType="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel"
- class="org.eclipse.tcf.te.tcf.ui.internal.adapters.AdapterFactory">
- <adapter type="org.eclipse.jface.viewers.ILabelProvider"/>
- <adapter type="org.eclipse.ui.IPersistableElement"/>
- <adapter type="org.eclipse.tcf.te.ui.views.interfaces.categories.ICategorizable"/>
- </factory>
-
- <factory
- adaptableType="org.eclipse.tcf.te.ui.views.editor.EditorInput"
- class="org.eclipse.tcf.te.tcf.ui.internal.adapters.AdapterFactory">
- <adapter type="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel"/>
- <adapter type="org.eclipse.tcf.te.ui.views.interfaces.IEditorSaveAsAdapter"/>
- </factory>
- </extension>
-
-<!-- Element factory contributions -->
- <extension point="org.eclipse.ui.elementFactories">
- <factory
- class="org.eclipse.tcf.te.tcf.ui.internal.adapters.PeerModelFactory"
- id="org.eclipse.tcf.te.ui.views.peerFactory">
- </factory>
- </extension>
-
-<!-- Eclipse core expressions property tester -->
- <extension point="org.eclipse.core.expressions.propertyTesters">
- <propertyTester
- class="org.eclipse.tcf.te.tcf.ui.internal.PropertyTester"
- id="org.eclipse.tcf.te.tcf.ui.propertyTester"
- namespace="org.eclipse.tcf.te.tcf.ui"
- properties="canDelete,canMakeAvailableOffline"
- type="org.eclipse.jface.viewers.ISelection">
- </propertyTester>
- </extension>
-
-<!-- Preference contributions -->
- <extension point="org.eclipse.core.runtime.preferences">
- <initializer class="org.eclipse.tcf.te.tcf.ui.internal.preferences.PreferencesInitializer"/>
- </extension>
-
-<!-- Event listener contributions -->
- <extension point="org.eclipse.tcf.te.runtime.eventListeners">
- <eventListener
- class="org.eclipse.tcf.te.tcf.ui.navigator.events.EventListener">
- <eventSourceType
- bundleId="org.eclipse.tcf.te.tcf.locator"
- class="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel">
- </eventSourceType>
- </eventListener>
- </extension>
-
-<!-- Common navigator contributions -->
- <extension point="org.eclipse.ui.navigator.viewer">
- <viewerContentBinding viewerId="org.eclipse.tcf.te.ui.views.View">
- <includes>
- <contentExtension
- pattern="org.eclipse.tcf.te.tcf.ui.navigator.*"/>
- </includes>
- </viewerContentBinding>
- <dragAssistant
- class="org.eclipse.tcf.te.tcf.ui.navigator.dnd.DragAssistant"
- viewerId="org.eclipse.tcf.te.ui.views.View">
- </dragAssistant>
- </extension>
-
- <extension point="org.eclipse.ui.navigator.navigatorContent">
- <navigatorContent
- activeByDefault="true"
- contentProvider="org.eclipse.tcf.te.tcf.ui.navigator.ContentProviderDelegate"
- icon="icons/obj16/rootNode_obj.gif"
- id="org.eclipse.tcf.te.tcf.ui.navigator.content"
- labelProvider="org.eclipse.tcf.te.tcf.ui.navigator.DelegatingLabelProvider"
- name="%navigatorContent.name"
- priority="normal">
- <triggerPoints>
- <or>
- <instanceof value="org.eclipse.tcf.te.ui.views.interfaces.IRoot"/>
- <instanceof value="org.eclipse.tcf.te.ui.views.interfaces.ICategory"/>
- <instanceof value="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel"/>
- <instanceof value="org.eclipse.tcf.te.tcf.ui.navigator.nodes.PeerRedirectorGroupNode"/>
- </or>
- </triggerPoints>
- <possibleChildren>
- <or>
- <instanceof value="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel"/>
- <instanceof value="org.eclipse.tcf.te.tcf.ui.navigator.nodes.PeerRedirectorGroupNode"/>
- </or>
- </possibleChildren>
- <commonSorter
- class="org.eclipse.tcf.te.ui.trees.TreeViewerSorter"
- id="org.eclipse.tcf.te.tcf.ui.navigator.sorter"/>
- <commonWizard
- type="new"
- wizardId="org.eclipse.tcf.te.tcf.ui.wizards.NewTargetWizard">
- <enablement>
- <or>
- <and>
- <instanceof value="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel"/>
- <test property="org.eclipse.tcf.te.tcf.locator.isOfType" value="null"/>
- </and>
- <and>
- <instanceof value="org.eclipse.tcf.te.ui.views.interfaces.ICategory"/>
- <test property="org.eclipse.tcf.te.ui.views.isCategoryID" value="org.eclipse.tcf.te.ui.views.category.mytargets"/>
- </and>
- </or>
- </enablement>
- </commonWizard>
- <dropAssistant
- class="org.eclipse.tcf.te.tcf.ui.navigator.dnd.DropAssistant"
- id="org.eclipse.tcf.te.tcf.ui.navigator.dnd">
- <possibleDropTargets>
- <or>
- <instanceof value="org.eclipse.tcf.te.ui.views.interfaces.ICategory"/>
- <instanceof value="org.eclipse.tcf.te.ui.views.interfaces.IRoot"/>
- </or>
- </possibleDropTargets>
- </dropAssistant>
- </navigatorContent>
- <commonFilter
- activeByDefault="false"
- class="org.eclipse.tcf.te.tcf.ui.filter.UnreachablePeersFilter"
- id="org.eclipse.tcf.te.tcf.ui.navigator.UnreachablePeersFilter"
- name="%UnreachablePeersFilter.name"
- visibleInUI="true">
- </commonFilter>
- <commonFilter
- activeByDefault="true"
- class="org.eclipse.tcf.te.tcf.ui.filter.RedirectPeersFilter"
- id="org.eclipse.tcf.te.tcf.ui.navigator.RedirectPeersFilter"
- name="%RedirectPeersFilter.name"
- visibleInUI="false">
- </commonFilter>
- <commonFilter
- activeByDefault="false"
- class="org.eclipse.tcf.te.tcf.ui.filter.PeersByCurrentUserFilter"
- id="org.eclipse.tcf.te.tcf.ui.navigator.PeersByCurrentUserFilter"
- name="%PeersByCurrentUserFilter.name"
- visibleInUI="true">
- </commonFilter>
- </extension>
-
-<!-- Decorator contributions -->
- <extension point="org.eclipse.ui.decorators">
- <decorator
- class="org.eclipse.tcf.te.tcf.ui.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>
- </enablement>
- </decorator>
- </extension>
-
-<!-- New target wizard contributions -->
- <extension point="org.eclipse.tcf.te.ui.newWizards">
- <category
- id="org.eclipse.tcf.te.tcf.ui.newWizards.category"
- name="%NewWizards.category.name">
- </category>
- <wizard
- canFinishEarly="true"
- category="org.eclipse.tcf.te.tcf.ui.newWizards.category"
- class="org.eclipse.tcf.te.tcf.ui.wizards.NewTargetWizard"
- hasPages="true"
- icon="icons/elcl16/newTarget_wiz.gif"
- id="org.eclipse.tcf.te.tcf.ui.wizards.NewTargetWizard"
- name="%NewTargetWizard.name">
- <description>
- %NewTargetWizard.description
- </description>
- </wizard>
- </extension>
-
-<!-- Import/Export wizard contributions -->
- <extension point="org.eclipse.ui.importWizards">
- <category
- name="%ImportWizards.Category.TCF"
- id="org.eclipse.tcf.te.tcf.ui.wizard.category.import.tcf">
- </category>
-
- <wizard
- name="%ImportWizards.Peer"
- icon="icons/obj16/peer.gif"
- id="org.eclipse.tcf.te.tcf.ui.wizards.import.tcf"
- category="org.eclipse.tcf.te.tcf.ui.wizard.category.import.tcf"
- class="org.eclipse.tcf.te.tcf.ui.wizards.PeerImportWizard">
- <description>
- %ImportWizards.PeerDescription
- </description>
- </wizard>
- </extension>
-
- <extension point="org.eclipse.ui.exportWizards">
- <category
- name="%ExportWizards.Category.TCF"
- id="org.eclipse.tcf.te.tcf.ui.wizard.category.export.tcf">
- </category>
-
- <wizard
- name="%ExportWizards.Peer"
- icon="icons/obj16/peer.gif"
- id="org.eclipse.tcf.te.tcf.ui.wizards.export.tcf"
- category="org.eclipse.tcf.te.tcf.ui.wizard.category.export.tcf"
- class="org.eclipse.tcf.te.tcf.ui.wizards.PeerExportWizard">
- <description>
- %ExportWizards.PeerDescription
- </description>
- </wizard>
- </extension>
-
-<!-- Editor page contributions -->
- <extension point="org.eclipse.tcf.te.ui.views.editorPages">
- <editorPage
- class="org.eclipse.tcf.te.tcf.ui.editor.OverviewEditorPage"
- name="%OverviewEditorPage.name"
- id="org.eclipse.tcf.te.tcf.ui.OverviewEditorPage">
- </editorPage>
- </extension>
-
-<!-- Editor page binding contributions -->
- <extension point="org.eclipse.tcf.te.ui.views.editorPageBindings">
- <editorPageBinding
- id="org.eclipse.tcf.te.tcf.ui.binding.OverviewEditorPage"
- pageId="org.eclipse.tcf.te.tcf.ui.OverviewEditorPage"
- insertBefore="first">
- <enablement>
- <with variable="activeEditorInput">
- <adapt type="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel">
- <test property="org.eclipse.tcf.te.tcf.locator.isOfType" value="null"/>
- </adapt>
- </with>
- </enablement>
- </editorPageBinding>
- </extension>
-
-<!-- Preference page contributions -->
- <extension point="org.eclipse.ui.preferencePages">
- <page
- category="org.eclipse.tcf.te.ui.preferences.general"
- class="org.eclipse.tcf.te.tcf.ui.preferences.LoggingPreferencePage"
- id="org.eclipse.tcf.te.ui.preferences.tcf.logging"
- name="%preference.page.name">
- </page>
- </extension>
-
-<!-- Menu contributions -->
- <extension point="org.eclipse.ui.menus">
-
- <!-- View context menu contributions -->
- <menuContribution locationURI="popup:org.eclipse.tcf.te.ui.views.View#Popup?after=group.delete">
- <command
- commandId="org.eclipse.ui.edit.delete"
- disabledIcon="platform:/plugin/org.eclipse.ui/icons/full/dtool16/delete.gif"
- helpContextId="org.eclipse.tcf.te.ui.command_Delete"
- icon="platform:/plugin/org.eclipse.ui/icons/full/etool16/delete.gif"
- id="org.eclipse.tcf.te.ui.commands.delete"
- label="%command.delete.label"
- mnemonic="%command.delete.mnemonic"
- tooltip="%command.delete.tooltip">
- <visibleWhen checkEnabled="false">
- <with variable="selection">
- <count value="+"/>
- <iterate operator="and" ifEmpty="false">
- <instanceof value="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel"/>
- </iterate>
- </with>
- </visibleWhen>
- </command>
- <command
- commandId="org.eclipse.ui.edit.rename"
- helpContextId="org.eclipse.tcf.te.tcf.ui.command_Rename"
- icon="icons/elcl16/rename.gif"
- id="org.eclipse.tcf.te.tcf.ui.commands.rename"
- label="%command.rename.label"
- mnemonic="%command.rename.mnemonic"
- tooltip="%command.rename.tooltip">
- <visibleWhen checkEnabled="false">
- <with variable="selection">
- <count value="1"/>
- <iterate operator="and" ifEmpty="false">
- <and>
- <instanceof value="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel"/>
- <test property="org.eclipse.tcf.te.tcf.locator.isStaticPeer" value="true"/>
- </and>
- </iterate>
- </with>
- </visibleWhen>
- </command>
- </menuContribution>
- <menuContribution locationURI="popup:org.eclipse.tcf.te.ui.views.View#Popup?after=group.categories">
- <command
- commandId="org.eclipse.tcf.te.tcf.ui.command.offline"
- helpContextId="org.eclipse.tcf.te.tcf.ui.command_Offline"
- id="org.eclipse.tcf.te.tcf.ui.commands.offline"
- mnemonic="%command.offline.mnemonic">
- <visibleWhen checkEnabled="true">
- <with variable="selection">
- <count value="+"/>
- <iterate operator="and" ifEmpty="false">
- <and>
- <instanceof value="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel"/>
- <test property="org.eclipse.tcf.te.tcf.locator.isStaticPeer" value="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.tcf.ui.command.offline"
- value="true"/>
- </or>
- </and>
- </iterate>
- </with>
- </visibleWhen>
- </command>
- </menuContribution>
- <menuContribution locationURI="popup:org.eclipse.tcf.te.ui.views.View#Popup?after=group.refresh">
- <command
- commandId="org.eclipse.tcf.te.ui.command.refresh"
- label="%command.refresh.label"
- style="push"
- tooltip="%command.refresh.tooltip">
- <visibleWhen checkEnabled="false">
- <with variable="selection">
- <count value="+"/>
- <iterate operator="and" ifEmpty="false">
- <and>
- <instanceof value="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel"/>
- <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.command.refresh"
- value="true"/>
- </or>
- </and>
- </iterate>
- </with>
- </visibleWhen>
- </command>
- </menuContribution>
- <menuContribution locationURI="popup:org.eclipse.tcf.te.ui.views.View#Popup?after=group.launch.rundebug">
- <command commandId="org.eclipse.tcf.te.tcf.ui.command.debug">
- <visibleWhen checkEnabled="false">
- <with variable="selection">
- <count value="1"/>
- <iterate operator="and" ifEmpty="false">
- <adapt type="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel">
- <or>
- <test property="org.eclipse.tcf.te.tcf.locator.hasRemoteService" value="RunControl"/>
- <test property="org.eclipse.tcf.te.tcf.locator.hasOfflineService" value="RunControl"/>
- <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.tcf.ui.command.debug"
- value="true"/>
- </or>
- </adapt>
- </iterate>
- </with>
- </visibleWhen>
- </command>
- </menuContribution>
-
- <menuContribution locationURI="toolbar:org.eclipse.tcf.te.tcf.ui.OverviewEditorPage?after=group.launch.rundebug">
- <command commandId="org.eclipse.tcf.te.tcf.ui.editor.command.debug"/>
- </menuContribution>
-
- </extension>
-
-<!-- Command contributions -->
- <extension point="org.eclipse.ui.commands">
- <command
- id="org.eclipse.tcf.te.tcf.ui.command.offline"
- categoryId="org.eclipse.tcf.te.ui.commands.category"
- helpContextId="org.eclipse.tcf.te.tcf.ui.command_Offline"
- name="%command.offline.label"
- description="%command.offline.tooltip">
- </command>
- <command
- id="org.eclipse.tcf.te.tcf.ui.command.debug"
- categoryId="org.eclipse.tcf.te.ui.commands.category"
- helpContextId="org.eclipse.tcf.te.tcf.ui.command_Debug"
- name="%command.debug.label"
- description="%command.debug.tooltip">
- </command>
- <command
- id="org.eclipse.tcf.te.tcf.ui.editor.command.debug"
- categoryId="org.eclipse.tcf.te.ui.commands.category"
- helpContextId="org.eclipse.tcf.te.tcf.ui.command_Debug"
- name="%command.debug.label"
- description="%command.debug.tooltip">
- </command>
- </extension>
-
-<!-- Command image contributions -->
- <extension point="org.eclipse.ui.commandImages">
- <image
- commandId="org.eclipse.tcf.te.tcf.ui.command.debug"
- icon="icons/etool16/debug_exc.gif">
- </image>
- <image
- commandId="org.eclipse.tcf.te.tcf.ui.editor.command.debug"
- icon="icons/etool16/debug_exc.gif">
- </image>
- </extension>
-
-<!-- Handler contributions -->
- <extension point="org.eclipse.ui.handlers">
- <handler
- commandId="org.eclipse.ui.edit.delete"
- class="org.eclipse.tcf.te.tcf.ui.handler.DeleteHandler">
- <activeWhen>
- <and>
- <with variable="activePartId">
- <equals value="org.eclipse.tcf.te.ui.views.View"/>
- </with>
- <with variable="selection">
- <iterate operator="and" ifEmpty="false">
- <instanceof value="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel"/>
- </iterate>
- </with>
- </and>
- </activeWhen>
- <enabledWhen>
- <with variable="selection">
- <test property="org.eclipse.tcf.te.tcf.ui.canDelete" value="true"/>
- </with>
- </enabledWhen>
- </handler>
-
- <handler
- commandId="org.eclipse.ui.edit.rename"
- class="org.eclipse.tcf.te.tcf.ui.handler.RenameHandler">
- <activeWhen>
- <and>
- <with variable="activePartId">
- <equals value="org.eclipse.tcf.te.ui.views.View"/>
- </with>
- <with variable="selection">
- <iterate operator="and" ifEmpty="false">
- <instanceof value="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel"/>
- </iterate>
- </with>
- </and>
- </activeWhen>
- <enabledWhen>
- <with variable="selection">
- <count value="1"/>
- <iterate operator="and" ifEmpty="false">
- <and>
- <instanceof value="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel"/>
- <test property="org.eclipse.tcf.te.tcf.locator.isStaticPeer" value="true"/>
- </and>
- </iterate>
- </with>
- </enabledWhen>
- </handler>
-
- <handler
- class="org.eclipse.tcf.te.tcf.ui.handler.OfflineCommandHandler"
- commandId="org.eclipse.tcf.te.tcf.ui.command.offline">
- <activeWhen>
- <with variable="activePartId">
- <equals value="org.eclipse.tcf.te.ui.views.View"/>
- </with>
- </activeWhen>
- <enabledWhen>
- <with variable="selection">
- <test property="org.eclipse.tcf.te.tcf.ui.canMakeAvailableOffline" value="true"/>
- </with>
- </enabledWhen>
- </handler>
-
- <handler
- commandId="org.eclipse.tcf.te.ui.command.refresh"
- class="org.eclipse.tcf.te.tcf.ui.handler.RefreshHandler">
- <activeWhen>
- <and>
- <with variable="activePartId">
- <or>
- <equals value="org.eclipse.tcf.te.ui.views.View"/>
- <equals value="org.eclipse.tcf.te.ui.views.Editor"/>
- </or>
- </with>
- <with variable="selection">
- <iterate operator="and" ifEmpty="false">
- <instanceof value="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel"/>
- </iterate>
- </with>
- </and>
- </activeWhen>
- <enabledWhen>
- <with variable="selection">
- <iterate operator="and" ifEmpty="false">
- <and>
- <instanceof value="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel"/>
- <adapt type="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.ILocatorModel"/>
- </and>
- </iterate>
- </with>
- </enabledWhen>
- </handler>
-
- <handler
- commandId="org.eclipse.tcf.te.tcf.ui.command.debug"
- class="org.eclipse.tcf.te.tcf.ui.handler.StartDebugCommandHandler">
- <activeWhen>
- <with variable="systemManagerViewSelection">
- <iterate operator="and" ifEmpty="false">
- <instanceof value="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel"/>
- </iterate>
- </with>
- </activeWhen>
- <enabledWhen>
- <with variable="systemManagerViewSelection">
- <count value="1"/>
- <iterate operator="and" ifEmpty="false">
- <adapt type="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel">
- <test property="org.eclipse.tcf.te.tcf.locator.hasRemoteService" value="RunControl"/>
- <test property="org.eclipse.tcf.te.launch.core.isLaunched" value="false"/>
- </adapt>
- </iterate>
- </with>
- </enabledWhen>
- </handler>
- <handler
- commandId="org.eclipse.tcf.te.tcf.ui.editor.command.debug"
- class="org.eclipse.tcf.te.tcf.ui.handler.StartDebugCommandHandler">
- <activeWhen>
- <with variable="activeEditorInput">
- <adapt type="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel"/>
- </with>
- </activeWhen>
- <enabledWhen>
- <with variable="activeEditorInput">
- <adapt type="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel">
- <test property="org.eclipse.tcf.te.tcf.locator.hasRemoteService" value="RunControl"/>
- <test property="org.eclipse.tcf.te.launch.core.isLaunched" value="false"/>
- </adapt>
- </with>
- </enabledWhen>
- </handler>
- </extension>
-
-<!-- Tabbed properties view contributions -->
- <extension point="org.eclipse.ui.views.properties.tabbed.propertyTabs">
- <propertyTabs contributorId="org.eclipse.tcf.te.ui">
- <propertyTab
- category="org.eclipse.tcf.te"
- id="org.eclipse.tcf.te.ui.views.propertyTab.peer.general"
- label="%propertyTab.general.label">
- </propertyTab>
- </propertyTabs>
- </extension>
-
- <extension point="org.eclipse.ui.views.properties.tabbed.propertySections">
- <propertySections contributorId="org.eclipse.tcf.te.ui">
- <propertySection
- class="org.eclipse.tcf.te.tcf.ui.internal.tabbed.PeerGeneralSection"
- enablesFor="1"
- filter="org.eclipse.tcf.te.tcf.ui.internal.tabbed.PeerGeneralSectionFilter"
- id="org.eclipse.tcf.te.ui.views.propertysections.peer.general"
- tab="org.eclipse.tcf.te.ui.views.propertyTab.peer.general">
- </propertySection>
- </propertySections>
- </extension>
-</plugin>
+<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.4"?> +<plugin> + +<!-- Adapter factory contributions --> + <extension point="org.eclipse.core.runtime.adapters"> + <factory + adaptableType="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel" + class="org.eclipse.tcf.te.tcf.ui.internal.adapters.AdapterFactory"> + <adapter type="org.eclipse.jface.viewers.ILabelProvider"/> + <adapter type="org.eclipse.ui.IPersistableElement"/> + <adapter type="org.eclipse.tcf.te.ui.views.interfaces.categories.ICategorizable"/> + </factory> + + <factory + adaptableType="org.eclipse.tcf.te.ui.views.editor.EditorInput" + class="org.eclipse.tcf.te.tcf.ui.internal.adapters.AdapterFactory"> + <adapter type="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel"/> + <adapter type="org.eclipse.tcf.te.ui.views.interfaces.IEditorSaveAsAdapter"/> + </factory> + </extension> + +<!-- Element factory contributions --> + <extension point="org.eclipse.ui.elementFactories"> + <factory + class="org.eclipse.tcf.te.tcf.ui.internal.adapters.PeerModelFactory" + id="org.eclipse.tcf.te.ui.views.peerFactory"> + </factory> + </extension> + +<!-- Eclipse core expressions property tester --> + <extension point="org.eclipse.core.expressions.propertyTesters"> + <propertyTester + class="org.eclipse.tcf.te.tcf.ui.internal.PropertyTester" + id="org.eclipse.tcf.te.tcf.ui.propertyTester" + namespace="org.eclipse.tcf.te.tcf.ui" + properties="canDelete,canMakeAvailableOffline" + type="org.eclipse.jface.viewers.ISelection"> + </propertyTester> + </extension> + +<!-- Preference contributions --> + <extension point="org.eclipse.core.runtime.preferences"> + <initializer class="org.eclipse.tcf.te.tcf.ui.internal.preferences.PreferencesInitializer"/> + </extension> + +<!-- Event listener contributions --> + <extension point="org.eclipse.tcf.te.runtime.eventListeners"> + <eventListener + class="org.eclipse.tcf.te.tcf.ui.navigator.events.EventListener"> + <eventSourceType + bundleId="org.eclipse.tcf.te.tcf.locator" + class="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel"> + </eventSourceType> + </eventListener> + </extension> + +<!-- Common navigator contributions --> + <extension point="org.eclipse.ui.navigator.viewer"> + <viewerContentBinding viewerId="org.eclipse.tcf.te.ui.views.View"> + <includes> + <contentExtension + pattern="org.eclipse.tcf.te.tcf.ui.navigator.*"/> + </includes> + </viewerContentBinding> + <dragAssistant + class="org.eclipse.tcf.te.tcf.ui.navigator.dnd.DragAssistant" + viewerId="org.eclipse.tcf.te.ui.views.View"> + </dragAssistant> + </extension> + + <extension point="org.eclipse.ui.navigator.navigatorContent"> + <navigatorContent + activeByDefault="true" + contentProvider="org.eclipse.tcf.te.tcf.ui.navigator.ContentProviderDelegate" + icon="icons/obj16/rootNode_obj.gif" + id="org.eclipse.tcf.te.tcf.ui.navigator.content" + labelProvider="org.eclipse.tcf.te.tcf.ui.navigator.DelegatingLabelProvider" + name="%navigatorContent.name" + priority="normal"> + <triggerPoints> + <or> + <instanceof value="org.eclipse.tcf.te.ui.views.interfaces.IRoot"/> + <instanceof value="org.eclipse.tcf.te.ui.views.interfaces.ICategory"/> + <instanceof value="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel"/> + <instanceof value="org.eclipse.tcf.te.tcf.ui.navigator.nodes.PeerRedirectorGroupNode"/> + </or> + </triggerPoints> + <possibleChildren> + <or> + <instanceof value="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel"/> + <instanceof value="org.eclipse.tcf.te.tcf.ui.navigator.nodes.PeerRedirectorGroupNode"/> + </or> + </possibleChildren> + <commonSorter + class="org.eclipse.tcf.te.ui.trees.TreeViewerSorterCaseInsensitive" + id="org.eclipse.tcf.te.tcf.ui.navigator.sorter"/> + <commonWizard + type="new" + wizardId="org.eclipse.tcf.te.tcf.ui.wizards.NewTargetWizard"> + <enablement> + <or> + <and> + <instanceof value="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel"/> + <test property="org.eclipse.tcf.te.tcf.locator.isOfType" value="null"/> + </and> + <and> + <instanceof value="org.eclipse.tcf.te.ui.views.interfaces.ICategory"/> + <test property="org.eclipse.tcf.te.ui.views.isCategoryID" value="org.eclipse.tcf.te.ui.views.category.mytargets"/> + </and> + </or> + </enablement> + </commonWizard> + <dropAssistant + class="org.eclipse.tcf.te.tcf.ui.navigator.dnd.DropAssistant" + id="org.eclipse.tcf.te.tcf.ui.navigator.dnd"> + <possibleDropTargets> + <or> + <instanceof value="org.eclipse.tcf.te.ui.views.interfaces.ICategory"/> + <instanceof value="org.eclipse.tcf.te.ui.views.interfaces.IRoot"/> + </or> + </possibleDropTargets> + </dropAssistant> + </navigatorContent> + <commonFilter + activeByDefault="false" + class="org.eclipse.tcf.te.tcf.ui.filter.UnreachablePeersFilter" + id="org.eclipse.tcf.te.tcf.ui.navigator.UnreachablePeersFilter" + name="%UnreachablePeersFilter.name" + visibleInUI="true"> + </commonFilter> + <commonFilter + activeByDefault="true" + class="org.eclipse.tcf.te.tcf.ui.filter.RedirectPeersFilter" + id="org.eclipse.tcf.te.tcf.ui.navigator.RedirectPeersFilter" + name="%RedirectPeersFilter.name" + visibleInUI="false"> + </commonFilter> + <commonFilter + activeByDefault="false" + class="org.eclipse.tcf.te.tcf.ui.filter.PeersByCurrentUserFilter" + id="org.eclipse.tcf.te.tcf.ui.navigator.PeersByCurrentUserFilter" + name="%PeersByCurrentUserFilter.name" + visibleInUI="true"> + </commonFilter> + </extension> + +<!-- Decorator contributions --> + <extension point="org.eclipse.ui.decorators"> + <decorator + class="org.eclipse.tcf.te.tcf.ui.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> + </enablement> + </decorator> + </extension> + +<!-- New target wizard contributions --> + <extension point="org.eclipse.tcf.te.ui.newWizards"> + <category + id="org.eclipse.tcf.te.tcf.ui.newWizards.category" + name="%NewWizards.category.name"> + </category> + <wizard + canFinishEarly="true" + category="org.eclipse.tcf.te.tcf.ui.newWizards.category" + class="org.eclipse.tcf.te.tcf.ui.wizards.NewTargetWizard" + hasPages="true" + icon="icons/elcl16/newTarget_wiz.gif" + id="org.eclipse.tcf.te.tcf.ui.wizards.NewTargetWizard" + name="%NewTargetWizard.name"> + <description> + %NewTargetWizard.description + </description> + </wizard> + </extension> + +<!-- Import/Export wizard contributions --> + <extension point="org.eclipse.ui.importWizards"> + <category + name="%ImportWizards.Category.TCF" + id="org.eclipse.tcf.te.tcf.ui.wizard.category.import.tcf"> + </category> + + <wizard + name="%ImportWizards.Peer" + icon="icons/obj16/peer.gif" + id="org.eclipse.tcf.te.tcf.ui.wizards.import.tcf" + category="org.eclipse.tcf.te.tcf.ui.wizard.category.import.tcf" + class="org.eclipse.tcf.te.tcf.ui.wizards.PeerImportWizard"> + <description> + %ImportWizards.PeerDescription + </description> + </wizard> + </extension> + + <extension point="org.eclipse.ui.exportWizards"> + <category + name="%ExportWizards.Category.TCF" + id="org.eclipse.tcf.te.tcf.ui.wizard.category.export.tcf"> + </category> + + <wizard + name="%ExportWizards.Peer" + icon="icons/obj16/peer.gif" + id="org.eclipse.tcf.te.tcf.ui.wizards.export.tcf" + category="org.eclipse.tcf.te.tcf.ui.wizard.category.export.tcf" + class="org.eclipse.tcf.te.tcf.ui.wizards.PeerExportWizard"> + <description> + %ExportWizards.PeerDescription + </description> + </wizard> + </extension> + +<!-- Editor page contributions --> + <extension point="org.eclipse.tcf.te.ui.views.editorPages"> + <editorPage + class="org.eclipse.tcf.te.tcf.ui.editor.OverviewEditorPage" + name="%OverviewEditorPage.name" + id="org.eclipse.tcf.te.tcf.ui.OverviewEditorPage"> + </editorPage> + </extension> + +<!-- Editor page binding contributions --> + <extension point="org.eclipse.tcf.te.ui.views.editorPageBindings"> + <editorPageBinding + id="org.eclipse.tcf.te.tcf.ui.binding.OverviewEditorPage" + pageId="org.eclipse.tcf.te.tcf.ui.OverviewEditorPage" + insertBefore="first"> + <enablement> + <with variable="activeEditorInput"> + <adapt type="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel"> + <test property="org.eclipse.tcf.te.tcf.locator.isOfType" value="null"/> + </adapt> + </with> + </enablement> + </editorPageBinding> + </extension> + +<!-- Preference page contributions --> + <extension point="org.eclipse.ui.preferencePages"> + <page + category="org.eclipse.tcf.te.ui.preferences.general" + class="org.eclipse.tcf.te.tcf.ui.preferences.LoggingPreferencePage" + id="org.eclipse.tcf.te.ui.preferences.tcf.logging" + name="%preference.page.name"> + </page> + </extension> + +<!-- Menu contributions --> + <extension point="org.eclipse.ui.menus"> + + <!-- View context menu contributions --> + <menuContribution locationURI="popup:org.eclipse.tcf.te.ui.views.View#Popup?after=group.delete"> + <command + commandId="org.eclipse.ui.edit.delete" + disabledIcon="platform:/plugin/org.eclipse.ui/icons/full/dtool16/delete.gif" + helpContextId="org.eclipse.tcf.te.ui.command_Delete" + icon="platform:/plugin/org.eclipse.ui/icons/full/etool16/delete.gif" + id="org.eclipse.tcf.te.ui.commands.delete" + label="%command.delete.label" + mnemonic="%command.delete.mnemonic" + tooltip="%command.delete.tooltip"> + <visibleWhen checkEnabled="false"> + <with variable="selection"> + <count value="+"/> + <iterate operator="and" ifEmpty="false"> + <instanceof value="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel"/> + </iterate> + </with> + </visibleWhen> + </command> + <command + commandId="org.eclipse.ui.edit.rename" + helpContextId="org.eclipse.tcf.te.tcf.ui.command_Rename" + icon="icons/elcl16/rename.gif" + id="org.eclipse.tcf.te.tcf.ui.commands.rename" + label="%command.rename.label" + mnemonic="%command.rename.mnemonic" + tooltip="%command.rename.tooltip"> + <visibleWhen checkEnabled="false"> + <with variable="selection"> + <count value="1"/> + <iterate operator="and" ifEmpty="false"> + <and> + <instanceof value="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel"/> + <test property="org.eclipse.tcf.te.tcf.locator.isStaticPeer" value="true"/> + </and> + </iterate> + </with> + </visibleWhen> + </command> + </menuContribution> + <menuContribution locationURI="popup:org.eclipse.tcf.te.ui.views.View#Popup?after=group.categories"> + <command + commandId="org.eclipse.tcf.te.tcf.ui.command.offline" + helpContextId="org.eclipse.tcf.te.tcf.ui.command_Offline" + id="org.eclipse.tcf.te.tcf.ui.commands.offline" + mnemonic="%command.offline.mnemonic"> + <visibleWhen checkEnabled="true"> + <with variable="selection"> + <count value="+"/> + <iterate operator="and" ifEmpty="false"> + <and> + <instanceof value="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel"/> + <test property="org.eclipse.tcf.te.tcf.locator.isStaticPeer" value="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.tcf.ui.command.offline" + value="true"/> + </or> + </and> + </iterate> + </with> + </visibleWhen> + </command> + </menuContribution> + <menuContribution locationURI="popup:org.eclipse.tcf.te.ui.views.View#Popup?after=group.refresh"> + <command + commandId="org.eclipse.tcf.te.ui.command.refresh" + label="%command.refresh.label" + style="push" + tooltip="%command.refresh.tooltip"> + <visibleWhen checkEnabled="false"> + <with variable="selection"> + <count value="+"/> + <iterate operator="and" ifEmpty="false"> + <and> + <instanceof value="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel"/> + <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.command.refresh" + value="true"/> + </or> + </and> + </iterate> + </with> + </visibleWhen> + </command> + </menuContribution> + <menuContribution locationURI="popup:org.eclipse.tcf.te.ui.views.View#Popup?after=group.launch.rundebug"> + <command commandId="org.eclipse.tcf.te.tcf.ui.command.debug"> + <visibleWhen checkEnabled="false"> + <with variable="selection"> + <count value="1"/> + <iterate operator="and" ifEmpty="false"> + <adapt type="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel"> + <or> + <test property="org.eclipse.tcf.te.tcf.locator.hasRemoteService" value="RunControl"/> + <test property="org.eclipse.tcf.te.tcf.locator.hasOfflineService" value="RunControl"/> + <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.tcf.ui.command.debug" + value="true"/> + </or> + </adapt> + </iterate> + </with> + </visibleWhen> + </command> + </menuContribution> + + <menuContribution locationURI="toolbar:org.eclipse.tcf.te.tcf.ui.OverviewEditorPage?after=group.launch.rundebug"> + <command commandId="org.eclipse.tcf.te.tcf.ui.editor.command.debug"/> + </menuContribution> + + </extension> + +<!-- Command contributions --> + <extension point="org.eclipse.ui.commands"> + <command + id="org.eclipse.tcf.te.tcf.ui.command.offline" + categoryId="org.eclipse.tcf.te.ui.commands.category" + helpContextId="org.eclipse.tcf.te.tcf.ui.command_Offline" + name="%command.offline.label" + description="%command.offline.tooltip"> + </command> + <command + id="org.eclipse.tcf.te.tcf.ui.command.debug" + categoryId="org.eclipse.tcf.te.ui.commands.category" + helpContextId="org.eclipse.tcf.te.tcf.ui.command_Debug" + name="%command.debug.label" + description="%command.debug.tooltip"> + </command> + <command + id="org.eclipse.tcf.te.tcf.ui.editor.command.debug" + categoryId="org.eclipse.tcf.te.ui.commands.category" + helpContextId="org.eclipse.tcf.te.tcf.ui.command_Debug" + name="%command.debug.label" + description="%command.debug.tooltip"> + </command> + </extension> + +<!-- Command image contributions --> + <extension point="org.eclipse.ui.commandImages"> + <image + commandId="org.eclipse.tcf.te.tcf.ui.command.debug" + icon="icons/etool16/debug_exc.gif"> + </image> + <image + commandId="org.eclipse.tcf.te.tcf.ui.editor.command.debug" + icon="icons/etool16/debug_exc.gif"> + </image> + </extension> + +<!-- Handler contributions --> + <extension point="org.eclipse.ui.handlers"> + <handler + commandId="org.eclipse.ui.edit.delete" + class="org.eclipse.tcf.te.tcf.ui.handler.DeleteHandler"> + <activeWhen> + <and> + <with variable="activePartId"> + <equals value="org.eclipse.tcf.te.ui.views.View"/> + </with> + <with variable="selection"> + <iterate operator="and" ifEmpty="false"> + <instanceof value="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel"/> + </iterate> + </with> + </and> + </activeWhen> + <enabledWhen> + <with variable="selection"> + <test property="org.eclipse.tcf.te.tcf.ui.canDelete" value="true"/> + </with> + </enabledWhen> + </handler> + + <handler + commandId="org.eclipse.ui.edit.rename" + class="org.eclipse.tcf.te.tcf.ui.handler.RenameHandler"> + <activeWhen> + <and> + <with variable="activePartId"> + <equals value="org.eclipse.tcf.te.ui.views.View"/> + </with> + <with variable="selection"> + <iterate operator="and" ifEmpty="false"> + <instanceof value="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel"/> + </iterate> + </with> + </and> + </activeWhen> + <enabledWhen> + <with variable="selection"> + <count value="1"/> + <iterate operator="and" ifEmpty="false"> + <and> + <instanceof value="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel"/> + <test property="org.eclipse.tcf.te.tcf.locator.isStaticPeer" value="true"/> + </and> + </iterate> + </with> + </enabledWhen> + </handler> + + <handler + class="org.eclipse.tcf.te.tcf.ui.handler.OfflineCommandHandler" + commandId="org.eclipse.tcf.te.tcf.ui.command.offline"> + <activeWhen> + <with variable="activePartId"> + <equals value="org.eclipse.tcf.te.ui.views.View"/> + </with> + </activeWhen> + <enabledWhen> + <with variable="selection"> + <test property="org.eclipse.tcf.te.tcf.ui.canMakeAvailableOffline" value="true"/> + </with> + </enabledWhen> + </handler> + + <handler + commandId="org.eclipse.tcf.te.ui.command.refresh" + class="org.eclipse.tcf.te.tcf.ui.handler.RefreshHandler"> + <activeWhen> + <and> + <with variable="activePartId"> + <or> + <equals value="org.eclipse.tcf.te.ui.views.View"/> + <equals value="org.eclipse.tcf.te.ui.views.Editor"/> + </or> + </with> + <with variable="selection"> + <iterate operator="and" ifEmpty="false"> + <instanceof value="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel"/> + </iterate> + </with> + </and> + </activeWhen> + <enabledWhen> + <with variable="selection"> + <iterate operator="and" ifEmpty="false"> + <and> + <instanceof value="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel"/> + <adapt type="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.ILocatorModel"/> + </and> + </iterate> + </with> + </enabledWhen> + </handler> + + <handler + commandId="org.eclipse.tcf.te.tcf.ui.command.debug" + class="org.eclipse.tcf.te.tcf.ui.handler.StartDebugCommandHandler"> + <activeWhen> + <with variable="systemManagerViewSelection"> + <iterate operator="and" ifEmpty="false"> + <instanceof value="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel"/> + </iterate> + </with> + </activeWhen> + <enabledWhen> + <with variable="systemManagerViewSelection"> + <count value="1"/> + <iterate operator="and" ifEmpty="false"> + <adapt type="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel"> + <test property="org.eclipse.tcf.te.tcf.locator.hasRemoteService" value="RunControl"/> + <test property="org.eclipse.tcf.te.launch.core.isLaunched" value="false"/> + </adapt> + </iterate> + </with> + </enabledWhen> + </handler> + <handler + commandId="org.eclipse.tcf.te.tcf.ui.editor.command.debug" + class="org.eclipse.tcf.te.tcf.ui.handler.StartDebugCommandHandler"> + <activeWhen> + <with variable="activeEditorInput"> + <adapt type="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel"/> + </with> + </activeWhen> + <enabledWhen> + <with variable="activeEditorInput"> + <adapt type="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel"> + <test property="org.eclipse.tcf.te.tcf.locator.hasRemoteService" value="RunControl"/> + <test property="org.eclipse.tcf.te.launch.core.isLaunched" value="false"/> + </adapt> + </with> + </enabledWhen> + </handler> + </extension> + +<!-- Tabbed properties view contributions --> + <extension point="org.eclipse.ui.views.properties.tabbed.propertyTabs"> + <propertyTabs contributorId="org.eclipse.tcf.te.ui"> + <propertyTab + category="org.eclipse.tcf.te" + id="org.eclipse.tcf.te.ui.views.propertyTab.peer.general" + label="%propertyTab.general.label"> + </propertyTab> + </propertyTabs> + </extension> + + <extension point="org.eclipse.ui.views.properties.tabbed.propertySections"> + <propertySections contributorId="org.eclipse.tcf.te.ui"> + <propertySection + class="org.eclipse.tcf.te.tcf.ui.internal.tabbed.PeerGeneralSection" + enablesFor="1" + filter="org.eclipse.tcf.te.tcf.ui.internal.tabbed.PeerGeneralSectionFilter" + id="org.eclipse.tcf.te.ui.views.propertysections.peer.general" + tab="org.eclipse.tcf.te.ui.views.propertyTab.peer.general"> + </propertySection> + </propertySections> + </extension> +</plugin> diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/navigator/ViewerSorter.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/navigator/ViewerSorter.java index 4ed28b38c..e957a385a 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/navigator/ViewerSorter.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/navigator/ViewerSorter.java @@ -1,37 +1,37 @@ -/*******************************************************************************
- * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tcf.te.ui.views.navigator;
-
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.tcf.te.ui.trees.TreeViewerSorter;
-import org.eclipse.tcf.te.ui.views.interfaces.ICategory;
-
-/**
- * Category viewer sorter implementation.
- */
-public class ViewerSorter extends TreeViewerSorter {
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.ui.trees.TreeViewerSorter#doCompare(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object, java.lang.String, int, int)
- */
- @Override
- protected int doCompare(Viewer viewer, Object node1, Object node2, String sortColumn, int index, int inverter) {
- if (node1 instanceof ICategory && node2 instanceof ICategory) {
- int rank1 = ((ICategory)node1).getRank();
- int rank2 = ((ICategory)node2).getRank();
-
- if (rank1 != -1 && rank2 != -1 && rank1 != rank2) {
- return (rank1 - rank2) * inverter;
- }
- }
-
- return super.doCompare(viewer, node1, node2, sortColumn, index, inverter);
- }
-}
+/******************************************************************************* + * Copyright (c) 2012, 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.Viewer; +import org.eclipse.tcf.te.ui.trees.TreeViewerSorterCaseInsensitive; +import org.eclipse.tcf.te.ui.views.interfaces.ICategory; + +/** + * Category viewer sorter implementation. + */ +public class ViewerSorter extends TreeViewerSorterCaseInsensitive { + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.ui.trees.TreeViewerSorter#doCompare(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object, java.lang.String, int, int) + */ + @Override + protected int doCompare(Viewer viewer, Object node1, Object node2, String sortColumn, int index, int inverter) { + if (node1 instanceof ICategory && node2 instanceof ICategory) { + int rank1 = ((ICategory)node1).getRank(); + int rank2 = ((ICategory)node2).getRank(); + + if (rank1 != -1 && rank2 != -1 && rank1 != rank2) { + return (rank1 - rank2) * inverter; + } + } + + return super.doCompare(viewer, node1, node2, sortColumn, index, inverter); + } +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeViewerSorter.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeViewerSorter.java index 3e6dd2217..f6bd0d998 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeViewerSorter.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeViewerSorter.java @@ -28,9 +28,23 @@ import org.eclipse.swt.widgets.Tree; /** * Common sorter implementation. + * <p> + * <b>Note:</b> The default implementation is implementing a case sensitive sorting. Numbers comes + * first, than uppercase before lowercase. */ public class TreeViewerSorter extends TreePathViewerSorter { + /** + * If or if not the sorting should happen case sensitive. + * <p> + * The default implementation returns <code>true</code>. + * + * @return <code>True</code> if the sorting is case sensitive, <code>false</code> otherwise. + */ + protected boolean isCaseSensitve() { + return true; + } + /* (non-Javadoc) * @see org.eclipse.jface.viewers.ViewerComparator#compare(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object) */ @@ -147,13 +161,24 @@ public class TreeViewerSorter extends TreePathViewerSorter { */ protected int doCompare(Viewer viewer, Object node1, Object node2, String sortColumn, int index, int inverter) { if (node1 == null && node2 == null) return 0; - if (node1 != null && node2 == null) return 1; - if (node1 == null && node2 != null) return -1; + if (node1 != null && node2 == null) return 1 * inverter; + if (node1 == null && node2 != null) return -1 * inverter; // Get the labels String text1 = doGetText(viewer, node1, index); String text2 = doGetText(viewer, node2, index); + // If we fail to determine the labels, we cannot continue + if (text1 == null && text2 == null) return 0; + if (text1 != null && text2 == null) return 1 * inverter; + if (text1 == null && text2 != null) return -1 * inverter; + + // Convert the labels to compare to lowercase if the sorting is case-insensitive + if (!isCaseSensitve()) { + text1 = text1.toLowerCase(); + text2 = text2.toLowerCase(); + } + // The tree sorts not strictly alphabetical. First comes entries starting with numbers, // second entries starting with uppercase and than all the rest. Additional, if a label contains // uppercase characters, it is sorted in before any labels being lowercase only. diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeViewerSorterCaseInsensitive.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeViewerSorterCaseInsensitive.java new file mode 100644 index 000000000..b28955ef2 --- /dev/null +++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeViewerSorterCaseInsensitive.java @@ -0,0 +1,26 @@ +/******************************************************************************* + * Copyright (c) 2013 Wind River Systems, Inc. and others. All rights reserved. + * This program and the accompanying materials are made available under the terms + * of the Eclipse Public License v1.0 which accompanies this distribution, and is + * available at http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Wind River Systems - initial API and implementation + *******************************************************************************/ +package org.eclipse.tcf.te.ui.trees; + + +/** + * Case insensitive common sorter implementation. + */ +public class TreeViewerSorterCaseInsensitive extends TreeViewerSorter { + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.ui.trees.TreeViewerSorter#isCaseSensitve() + */ + @Override + protected boolean isCaseSensitve() { + return false; + } + +} |