<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2006, 2009 IBM Corporation and others. All rights reserved.
This program and the accompanying materials are made available under the terms
of the Eclipse Public License v1.0 which accompanies this distribution, and is 
available at http://www.eclipse.org/legal/epl-v10.html

Initial Contributors:
The following IBM employees contributed to the Remote System Explorer
component that contains this file: David McKnight, Kushal Munir, 
Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, 
Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.

Contributors:
Martin Oberhuber (Wind River) - [185554] Remove dynamicPopupMenuExtensions extension point
Martin Oberhuber (Wind River) - [186525] Move keystoreProviders to core
Martin Oberhuber (Wind River) - [186523] Move subsystemConfigurations from UI to core
Martin Oberhuber (Wind River) - [185552] Remove remoteSystemsViewPreferencesActions extension point
Anna Dushistova  (MontaVista) - [227535] [rseterminal][api] terminals.ui should not depend on files.core
Anna Dushistova  (MontaVista) - [234274][api] Launch Shell / Terminal commands menu placement and category
David McKnight   (IBM)        - [160105] [usability] Universal action needed to locate a resource in the Remote Systems View        
David McKnight   (IBM)        - [260792] Default prompt text color/background color for Remote Shell view is difficult to see
Uwe Stieber      (Wind River) - [245039] [contributions][api] Provide property tester implementations in parallel to the older action filters
David Dykstal    (IBM)        - [397995] RSEInitJob runs too early
-->
<?eclipse version="3.1"?>
<plugin>
<!-- ============================================ -->
<!-- Define a RemoteSystems project nature        -->
<!-- ============================================ -->
   <extension
         id="remotesystemsnature"
         name="%Nature.RemoteSystemsNature"
         point="org.eclipse.core.resources.natures">
      <runtime>
         <run
               class="org.eclipse.rse.internal.core.RemoteSystemsProject">
         </run>
      </runtime>
   </extension>

<!-- ============================================ -->
<!-- Define a RemoteSystemsTempFiles project      -->
<!-- nature to enable debugging                   -->
<!-- ============================================ -->
   <extension
         id="remoteSystemsTempNature"
         name="%Nature.RemoteSystemsTempNature"
         point="org.eclipse.core.resources.natures">
      <runtime>
         <run
         	class="org.eclipse.rse.core.RemoteSystemsTempProjectNature">
         </run>
      </runtime>
   </extension>
   
   <extension point="org.eclipse.ui.startup">
     <startup class="org.eclipse.rse.internal.ui.RSEUIStartup"/>
   </extension>

<!-- ============================================ -->
<!-- Define a RemoteSystems preference page        -->
<!-- ============================================ -->
   <extension
         point="org.eclipse.ui.preferencePages">
      <page
            name="%PreferencePage.RemoteSystems"
            class="org.eclipse.rse.internal.ui.propertypages.RemoteSystemsPreferencePage"
            id="org.eclipse.rse.ui.preferences.RemoteSystemsPreferencePage">
      </page>
      <page
            name="%PreferencePage.Logging"
            category="org.eclipse.rse.ui.preferences.RemoteSystemsPreferencePage"
            class="org.eclipse.rse.internal.ui.propertypages.SystemLoggingPreferencePage"
            id="org.eclipse.rse.ui.LoggingPreferences">
      </page>
      <page
            name="%PreferencePage.Signon"
            category="org.eclipse.rse.ui.preferences.RemoteSystemsPreferencePage"
            class="org.eclipse.rse.ui.propertypages.SignonPreferencePage"
            id="org.eclipse.rse.ui.preferences.SignonPreferencePage">
      </page>
   </extension>
   
   <extension
         point="org.eclipse.core.runtime.preferences">
      <initializer class="org.eclipse.rse.internal.ui.propertypages.SystemPreferenceInitializer"/>   
   </extension>
   
<!-- ============================================ -->
<!-- Define Workbench Properties Pages            -->
<!-- ============================================ -->
   <extension
         point="org.eclipse.ui.propertyPages">
      <page
            name="%PropertyPage.SubSystem"
            class="org.eclipse.rse.ui.propertypages.SystemSubSystemPropertyPageCore"
            id="org.eclipse.rse.SubSystemsPropertyPage">
         <enabledWhen>
            <instanceof value="org.eclipse.rse.core.subsystems.ISubSystem"/>
         </enabledWhen>
      </page>
      <page
            name="%PropertyPage.Connection"
            class="org.eclipse.rse.internal.ui.propertypages.SystemConnectionPropertyPage"
            id="org.eclipse.rse.SystemPropertyPage">
         <enabledWhen>
            <instanceof value="org.eclipse.rse.core.model.IHost"/>
         </enabledWhen>
      </page>
      <!-- with move to services this should disappear
      <page
            objectClass="org.eclipse.rse.ui.model.IHost"
            name="%PropertyPage.Connection.SubSystems"
            class="org.eclipse.rse.ui.propertypages.SystemConnectionSubSystemsPropertyPage"
            id="org.eclipse.rse.SystemConnectionSubSystemsPropertyPage">
      </page>
      -->
      <page
            name="%PropertyPage.Connection.ConnectorServices"
            class="org.eclipse.rse.internal.ui.propertypages.SystemConnectorServicesPropertyPage"
            id="org.eclipse.rse.ui.propertypages.SystemConnectorServicesPropertyPage">
         <enabledWhen>
            <instanceof value="org.eclipse.rse.core.model.IHost"/>
         </enabledWhen>
      </page>
      <page
            name="%PropertyPage.FilterPool"
            class="org.eclipse.rse.internal.ui.propertypages.SystemFilterPoolPropertyPage"
            id="org.eclipse.rse.SystemFilterPoolPropertyPage">
         <enabledWhen>
            <instanceof value="org.eclipse.rse.core.filters.ISystemFilterPool"/>
         </enabledWhen>
      </page>
      <page
            name="%PropertyPage.Reference"
            class="org.eclipse.rse.internal.ui.propertypages.SystemFilterPoolReferencePropertyPage"
            id="org.eclipse.rse.SystemFilterPoolReferencePropertyPage">
         <enabledWhen>
            <instanceof value="org.eclipse.rse.core.filters.ISystemFilterPoolReference"/>
         </enabledWhen>
      </page>
      <page
            name="%PropertyPage.ReferencedFilterPool"
            class="org.eclipse.rse.internal.ui.propertypages.SystemFilterPoolPropertyPage"
            id="org.eclipse.rse.SystemFilterPoolReferencePropertyPage2">
         <enabledWhen>
            <instanceof value="org.eclipse.rse.core.filters.ISystemFilterPoolReference"/>
         </enabledWhen>
      </page>
      <page
            name="%PropertyPage.Filter"
            class="org.eclipse.rse.internal.ui.propertypages.SystemFilterPropertyPage"
            id="org.eclipse.rse.SystemFilterPropertyPage">
         <enabledWhen>
         	<or>
            	<instanceof value="org.eclipse.rse.core.filters.ISystemFilter"/>
	            <instanceof value="org.eclipse.rse.core.filters.ISystemFilterReference"/>
         	</or>
         </enabledWhen>
      </page>
      <page
            name="%PropertyPage.ChangeFilter"
            class="org.eclipse.rse.ui.propertypages.SystemChangeFilterPropertyPage"
            id="org.eclipse.rse.SystemChangeFilterPropertyPage">
            <filter name="showChangeFilterStringPropertyPage" value="true"/>
         <enabledWhen>
         	<or>
            	<instanceof value="org.eclipse.rse.core.filters.ISystemFilter"/>
	            <instanceof value="org.eclipse.rse.core.filters.ISystemFilterReference"/>
         	</or>
         </enabledWhen>
      </page>
      <page
            name="%PropertyPage.FilterString"
            class="org.eclipse.rse.ui.propertypages.SystemFilterStringPropertyPage"
            id="org.eclipse.rse.SystemFilterStringPropertyPage">
         <enabledWhen>
            <instanceof value="org.eclipse.rse.core.filters.ISystemFilterString"/>
         </enabledWhen>
      </page>
      <page
            name="%PropertyPage.TeamViewCategoryNode"
            class="org.eclipse.rse.ui.propertypages.SystemTeamViewCategoryPropertyPage"
            id="org.eclipse.rse.SystemTeamViewCategoryPropertyPage">
         <enabledWhen>
            <instanceof value="org.eclipse.rse.internal.ui.view.team.SystemTeamViewCategoryNode"/>
         </enabledWhen>
      </page>
      <page
            name="%PropertyPage.Profile"
            class="org.eclipse.rse.internal.ui.propertypages.SystemTeamViewProfilePropertyPage"
            id="org.eclipse.rse.SystemProfilePropertyPage">
         <enabledWhen>
            <instanceof value="org.eclipse.rse.core.model.ISystemProfile"/>
         </enabledWhen>
      </page>
      <page
            name="%PropertyPage.TeamViewSubSystemFactoryNode"
            class="org.eclipse.rse.internal.ui.propertypages.SystemTeamViewSubSystemConfigurationPropertyPage"
            id="org.eclipse.rse.SystemTeamViewSubSystemFactoryPropertyPage">
         <enabledWhen>
            <instanceof value="org.eclipse.rse.internal.ui.view.team.SystemTeamViewSubSystemConfigurationNode"/>
         </enabledWhen>
      </page>
      
   </extension>
<!-- ============================================ -->
<!-- Define Help Context                          -->
<!-- ============================================ -->
   <extension
         point="org.eclipse.help.contexts">
      <contexts
            file="HelpContexts.xml">
      </contexts>
   </extension>
<!-- ============================================ -->
<!-- Define Remote System Explorer Views         -->
<!-- ============================================ -->
   <extension
         point="org.eclipse.ui.views">
      <category
            name="%View.Category.RemoteSystems"
            id="org.eclipse.rse.ui.view">
      </category>
      <view
            name="%View.RemoteSystems"
            icon="icons/full/cview16/system_view.gif"
            category="org.eclipse.rse.ui.view"
            class="org.eclipse.rse.internal.ui.view.SystemViewPart"
            id="org.eclipse.rse.ui.view.systemView">
      </view>
      <view
            name="%View.Team"
            icon="icons/full/cview16/team_view.gif"
            category="org.eclipse.rse.ui.view"
            class="org.eclipse.rse.internal.ui.view.team.SystemTeamViewPart"
            id="org.eclipse.rse.ui.view.teamView">
      </view>
      <view
            name="%View.RemoteSystemsDetails"
            icon="icons/full/cview16/system_view.gif"
            category="org.eclipse.rse.ui.view"
            class="org.eclipse.rse.internal.ui.view.SystemTableViewPart"
            id="org.eclipse.rse.ui.view.systemTableView">
      </view>
      <!-- Remote Search View                                     -->
      <view
			name="%View.Search"
			icon="icons/full/obj16/system_search.gif"
			category="org.eclipse.rse.ui.view"
			class="org.eclipse.rse.internal.ui.view.search.SystemSearchViewPart"
			id="org.eclipse.rse.ui.view.SystemSearchView">
      </view>
      <!-- Remote Scratchpad View                                 -->
      <view
			name="%View.Scratchpad"
			icon="icons/full/view16/scratchpad_view.gif"
			category="org.eclipse.rse.ui.view"
			class="org.eclipse.rse.internal.ui.view.scratchpad.SystemScratchpadViewPart"
			id="org.eclipse.rse.ui.view.scratchpad.SystemScratchpadViewPart">
      </view>
      <!-- Remote Monitor View                                 -->
      <view
			name="%View.Monitor"
			icon="icons/full/view16/system_view.gif"
			category="org.eclipse.rse.ui.view"
			class="org.eclipse.rse.internal.ui.view.monitor.SystemMonitorViewPart"
			id="org.eclipse.rse.ui.view.monitorView">
      </view>

   </extension>

<!-- ================================================================================= -->
<!-- Define Remote System Explorer view pulldown menu submenu for preferences actions -->
<!-- ================================================================================= -->
<!-- FIXME this is hardcoded for now, but will be migrated to command/handler -->
<!-- Clients can add their actions already if they create their own handler   -->
<!-- See the patch on https://bugs.eclipse.org/bugs/show_bug.cgi?id=186769    -->
<!--
	<extension point="org.eclipse.rse.ui.remoteSystemsViewPreferencesActions">
 		<action	
			id="org.eclipse.rse.ui.preferences.actions.rse"
			label="%PreferencePageAction.rse.label"
			preferencePageId="org.eclipse.rse.ui.preferences.RemoteSystemsPreferencePage"
			preferencePageCategory=""
			icon=""
            tooltip="%PreferencePageAction.rse.tooltip"
            helpContextId="org.eclipse.rse.ui.aprefrse"
		/>
	</extension>
-->

<!-- ============================================ -->
<!-- Define Remote Systems Perspective            -->
<!-- ============================================ -->
   <extension
         point="org.eclipse.ui.perspectives">
      <perspective
            name="%Perspective.Explorer"
            icon="icons/full/cview16/system_persp.gif"
            class="org.eclipse.rse.internal.ui.view.SystemPerspectiveLayout"
            id="org.eclipse.rse.ui.view.SystemPerspective">
      </perspective>
   </extension>
<!-- ================================================================== -->
<!--                                                                    -->
<!--  for the Open In New Perspective RSE perspectives                  -->
<!-- Element Factory for Restoring Input Objects from mementos,         -->
<!--                                                                    -->
<!-- ================================================================== -->
   <extension
         point="org.eclipse.ui.elementFactories">
      <factory
            class="org.eclipse.rse.internal.ui.view.SystemViewPart"
            id="org.eclipse.rse.systemview.elementfactory">
      </factory>
   </extension>

<!-- ================================================================= -->
<!-- 		Define Mount Path Mappers extension point				   -->
<!-- ================================================================= -->
   <extension-point id="mountPathMappers" name="%extPoint.mountPathMappers" schema="schema/mountPathMappers.exsd"/>

<!-- ================================================================= -->
<!-- 		Define newConnectionWizards extension point				   -->
<!-- ================================================================= -->
   <extension-point id="newConnectionWizards" name="%extPoint.newConnectionWizards" schema="schema/newConnectionWizards.exsd"/>

<!-- ================================================================= -->
<!-- Define the Drop Actions                                           -->
<!-- ================================================================= -->
	<extension point="org.eclipse.ui.dropActions">
		<action
	      id="org.eclipse.rse.ui.view.DropActions"
		  class="org.eclipse.rse.internal.ui.view.SystemDropActionDelegate">
        </action>	
	</extension>


<!-- ========================================================================= -->
<!-- Themes                                                                    -->
<!-- ========================================================================= -->
 <extension
       point="org.eclipse.ui.themes">
       <themeElementCategory
			label="%RSEPresentation.label"
			id="org.eclipse.rse.ui.presentation">
		  <description>%RSEPresentation.description</description>
	   </themeElementCategory>	
       <themeElementCategory
			label="%MessagesPresentation.label"
			parentId="org.eclipse.rse.ui.presentation"
			id="org.eclipse.rse.ui.messages.presentation">
		  <description>%MessagesPresentation.description</description>
	   </themeElementCategory>
      <colorDefinition
            label="%ErrorMessage.label"
            categoryId="org.eclipse.rse.ui.messages.presentation"
            value="COLOR_RED"
            id="MESSAGE_ERROR_COLOR">
         <description>
            %ErrorMessage.description
         </description>
      </colorDefinition>
      <colorDefinition
            label="%WarningMessage.label"
            categoryId="org.eclipse.rse.ui.messages.presentation"
            value="255,80,0"
            id="MESSAGE_WARNING_COLOR">
         <description>
            %WarningMessage.description
         </description>
      </colorDefinition>
      <colorDefinition
            label="%InfoMessage.label"
            categoryId="org.eclipse.rse.ui.messages.presentation"
            value="COLOR_BLUE"
            id="MESSAGE_INFORMATION_COLOR">
         <description>
            %InfoMessage.description
         </description>
      </colorDefinition>
       <themeElementCategory
			label="%RemoteCommandsViewPresentation.label"
			parentId="org.eclipse.rse.ui.presentation"
			id="org.eclipse.rse.ui.remotecommandsview.presentation">
		  <description>%RemoteCommandsViewPresentation.description</description>
	   </themeElementCategory>
         <fontDefinition
            label="%RemoteCommandsViewFontDefinition.label"
            defaultsTo="org.eclipse.jface.textfont"
            categoryId="org.eclipse.rse.ui.remotecommandsview.presentation"
            id="REMOTE_COMMANDS_VIEW_FONT">
         <description>
            %RemoteCommandsViewFontDefinition.description
         </description>
      </fontDefinition>
      <colorDefinition
            label="%RemoteCommandsForeground.label"
            categoryId="org.eclipse.rse.ui.remotecommandsview.presentation"
            value="COLOR_BLACK"
            id="REMOTE_COMMANDS_VIEW_FG_COLOR">
         <description>
            %RemoteCommandsForeground.description
         </description>
      </colorDefinition>
       <colorDefinition
            label="%RemoteCommandsBackground.label"
            categoryId="org.eclipse.rse.ui.remotecommandsview.presentation"
            value="COLOR_WHITE"
            id="REMOTE_COMMANDS_VIEW_BG_COLOR">
         <description>
            %RemoteCommandsBackground.description
         </description>
      </colorDefinition>
      <colorDefinition
            label="%RemoteCommandsPrompt.label"
            categoryId="org.eclipse.rse.ui.remotecommandsview.presentation"
            value="COLOR_DARK_GREEN"
            id="REMOTE_COMMANDS_VIEW_PROMPT_COLOR">
         <description>
            %RemoteCommandsPrompt.description
         </description>
      </colorDefinition>
   </extension>
   
 


 	<extension point="org.eclipse.ui.decorators"> 
         <decorator
            id="org.eclipse.rse.subsystems.error.decorator" 
            label="%SubSystemErrorDecorator.label" 
            state="true" 
            lightweight="true" 
            icon="icons/full/ovr16/error_ovr.gif" 
            location="BOTTOM_RIGHT"> 
            <enablement>
            	<and>
                	<objectClass name="org.eclipse.rse.core.subsystems.ISubSystem"/>
                	<objectState name="isConnectionError" value="true"/>
                </and> 
            </enablement>
        </decorator>
     </extension>
  <extension
        point="org.eclipse.rse.ui.newConnectionWizards">
		<category id="org.eclipse.rse.ui.wizards.newconnection.default.category"
				name="%Connection.default.category.name"/>
		<newConnectionWizard
	        id="org.eclipse.rse.ui.wizards.newconnection.RSEDefaultNewConnectionWizard"
        	class="org.eclipse.rse.ui.wizards.newconnection.RSEDefaultNewConnectionWizard"
	        name="%DefaultRSENewConnectionWizard.name"
			canFinishEarly="false"
    	    categoryId="org.eclipse.rse.ui.wizards.newconnection.default.category"
        	hasPages="true">
		</newConnectionWizard>
  </extension>


<!-- ================================================================= -->
<!-- RSE Creation Wizards from File -> New 							   -->
<!-- ================================================================= -->
	<extension point="org.eclipse.ui.newWizards">
		<category id="org.eclipse.rse.ui.newWizards.rseCategory"
				name="%Creation.category.name"/>
		<wizard
        canFinishEarly="false"
        category="org.eclipse.rse.ui.newWizards.rseCategory"
        class="org.eclipse.rse.ui.wizards.newconnection.RSEMainNewConnectionWizard"
        finalPerspective="org.eclipse.rse.ui.view.SystemPerspective"
        hasPages="true"
        icon="icons/full/etool16/newconnection_wiz.gif"
        id="org.eclipse.rse.ui.newWizards.connection"
        name="%Creation.connection.name"
        preferredPerspectives="org.eclipse.rse.ui.view.SystemPerspective">
			<description>
				%Creation.connection.description
			</description>
		</wizard>
	</extension>
	
    <extension point="org.eclipse.ui.navigator.navigatorContent">
        <commonFilter
            id="org.eclipse.rse.project.filters.RemoteSystemsProjects"
            name="%ProjectFilter.label"
            description="%ProjectFilter.description"
            activeByDefault="true">
            <filterExpression>
                <and>
                    <instanceof value="org.eclipse.core.resources.IProject"/>
                    <test property="org.eclipse.core.resources.name" value="RemoteSystems*"/>
                </and>
            </filterExpression>
        </commonFilter>
    </extension>
   
    <extension point="org.eclipse.ui.navigator.viewer">
        <viewerContentBinding viewerId="org.eclipse.ui.navigator.ProjectExplorer">
            <includes>
                <contentExtension pattern="org.eclipse.rse.project.filters.*"/>
            </includes>
        </viewerContentBinding>
    </extension>
	
<!-- ================================================================= -->
<!-- RSE Property Tester contributions   							   -->
<!-- ================================================================= -->
	<extension point="org.eclipse.core.expressions.propertyTesters">
        <propertyTester
             id="org.eclipse.rse.ui.SubSystemPropertyTester"
             type="org.eclipse.core.runtime.IAdaptable"
             namespace="org.eclipse.rse.core"
             properties="hasSubSystemCategory, isOffline"
             class="org.eclipse.rse.internal.ui.subsystems.SubSystemPropertyTester">
        </propertyTester>
        <propertyTester
             class="org.eclipse.rse.internal.ui.view.SystemViewPropertyTester"
             id="org.eclipse.rse.internal.ui.view.SystemViewPropertyTester"
             namespace="org.eclipse.rse.ui"           
             properties="name,type,hasChildren,connected,offline,systemType,systemTypeId,subsystemConfigurationId,subsystemConfigurationCategory,isRemote"
             type="org.eclipse.rse.ui.view.ISystemViewElementAdapter">
        </propertyTester>
    </extension>

     <extension point="org.eclipse.ui.commands">
        <category
              id="org.eclipse.rse.ui.commands.category"
              name="%View.Category.RemoteSystems">
        </category>
      </extension>  
      
   <extension point="org.eclipse.ui.popupMenus">
     <!-- from details view -->
      <viewerContribution
        id="org.eclipse.rse.ui.showInRemoteSystemsView"
        targetID="org.eclipse.rse.ui.view.systemTableView">
	    <action id="org.eclipse.rse.ui.showInRemoteSystemsViewAction"
	       label="%ShowInRSEView.label"
	       tooltip="%ShowInRSEView.tooltip"
	       icon="icons/full/cview16/system_view.gif"
	       menubarPath="group.goto"
	       class="org.eclipse.rse.internal.ui.actions.ShowInSystemsViewDelegate">	
	    </action>
       </viewerContribution>
       <!-- from search view -->
       <viewerContribution
        id="org.eclipse.rse.ui.showInRemoteSystemsView"
        targetID="org.eclipse.rse.ui.view.SystemSearchView">
	    <action id="org.eclipse.rse.ui.showInRemoteSystemsViewAction"
	       label="%ShowInRSEView.label"
	       tooltip="%ShowInRSEView.tooltip"
	       icon="icons/full/cview16/system_view.gif"
	       menubarPath="group.goto"
	       class="org.eclipse.rse.internal.ui.actions.ShowInSystemsViewDelegate">	
	    </action>
       </viewerContribution>
       <!-- from scratchpad view -->
       <viewerContribution
        id="org.eclipse.rse.ui.showInRemoteSystemsView"
        targetID="org.eclipse.rse.ui.view.scratchpad.SystemScratchpadViewPart">
	    <action id="org.eclipse.rse.ui.showInRemoteSystemsViewAction"
	       label="%ShowInRSEView.label"
	       tooltip="%ShowInRSEView.tooltip"
	       icon="icons/full/cview16/system_view.gif"
	       menubarPath="group.goto"
	       class="org.eclipse.rse.internal.ui.actions.ShowInSystemsViewDelegate">	
	    </action>
       </viewerContribution>
       <!-- from monitor view -->
       <viewerContribution       
        id="org.eclipse.rse.ui.showInRemoteSystemsView"
        targetID="org.eclipse.rse.ui.view.monitorView">
	    <action id="org.eclipse.rse.ui.view.monitorView"
	       label="%ShowInRSEView.label"
	       tooltip="%ShowInRSEView.tooltip"
	       icon="icons/full/cview16/system_view.gif"
	       menubarPath="group.goto"
	       class="org.eclipse.rse.internal.ui.actions.ShowInSystemsViewDelegate">	
	    </action>
       </viewerContribution>
   </extension>
</plugin>
