<?xml version="1.0"?>

<plugin
    name= "Hyades Trace Core UI"
    id="org.eclipse.hyades.trace.ui"
    version="1.2.0"
    provider-name="Eclipse.org"
    class="org.eclipse.hyades.trace.ui.UIPlugin">

   <requires>
      <import plugin="org.eclipse.hyades.ui" export="true"/>  
      <import plugin="org.eclipse.hyades.security" export="true"/>
      <import plugin="org.eclipse.hyades.execution.local" export="true"/>                         
      <import plugin="org.eclipse.hyades.models.hierarchy"/>       
      <import plugin="org.eclipse.ui"/>
      <import plugin="org.eclipse.swt"/>
      <import plugin="org.eclipse.core.resources"/>
      <import plugin="org.eclipse.jdt.ui"/>
      <import plugin="org.eclipse.jdt.launching"/> 
      <import plugin="org.eclipse.jdt.core"/>                  
      <import plugin="org.eclipse.debug.core"/>   
      <import plugin="org.eclipse.core.boot"/>                   
    </requires>

   <runtime>
      <library name="core_ui.jar">
            <export name="*"/>
			<packages prefixes="org.eclipse.hyades.trace.internal.ui, org.eclipse.hyades.trace.ui.internal,org.eclipse.hyades.trace.ui"/>              
      </library>
   </runtime>

  <extension-point id="agentType" name="%agentType" schema="schema/agentType.exsd"/>

<!-- ==================================================================== -->
   <extension point="org.eclipse.hyades.ui.typeDescriptions">
      <typeDescription
            extension="trace"
      		type="Profiler"
      		name="%PROFILING_AGENT_TITLE"
      		icon="icons/full/obj16/agent_prof_obj.gif"/>
       <typeDescription
            extension="trace"
      		type="Logging"
      		name="%LOG_AGENT_TITLE"
      		icon="icons/full/obj16/agent_log_obj.gif"/>      		
      <typeDescription
            extension="trace"
      		type="Host"
      		name="%NODE_TITLE"
      		icon="icons/full/obj16/node_obj.gif"/>
      <typeDescription
            extension="trace"
      		type="Monitor"
      		name="%MONITOR_PROPERTIES_TITLE"
      		icon="icons/full/obj16/monitor_obj.gif"/>
      		
   </extension>

<!-- ==================================================================== -->
  <extension point="org.eclipse.ui.views">
	<category 
	   id="org.eclipse.hyades.trace.internal.ui.trace"
	   name="%STR_TRACE_CATEGORY">
	</category>

    <view
      id="org.eclipse.hyades.trace.internal.ui.PDProjectExplorer"
      name="%STR_TRACE_PROJ_TITLE"
      icon="icons/full/cview16/trace_view.gif"
      category="org.eclipse.hyades.trace.internal.ui.trace"
      class="org.eclipse.hyades.trace.internal.ui.PDProjectExplorer">
    </view>
    <view
	id="org.eclipse.hyades.trace.ui.internal.console.TraceConsoleView"
	name="%STR_TRACE_CONSOLE"
	category="org.eclipse.hyades.trace.internal.ui.trace"
	class="org.eclipse.hyades.trace.ui.internal.console.TraceConsoleView"
	icon="icons/full/obj16/console_view.gif">
     </view>
  </extension>

<extension point = "org.eclipse.ui.viewActions">
<!-- Contributions to Monitors View Toolbar -->
	<viewContribution
		id = "org.eclipse.hyades.trace.ui.internal.monitorsview.toolbar"
		targetID = "org.eclipse.hyades.trace.internal.ui.PDProjectExplorer">
<!-- Profile Group -->
		<action
			id = "org.eclipse.hyades.trace.ui.internal.monitorsview.toolbar.stopMonitoring"
			toolbarPath = "monitoringGroup"
			icon = "icons/full/elcl16/suspend_co.gif"
			disabledIcon="icons/full/dlcl16/suspend_co.gif"
            hoverIcon="icons/full/clcl16/suspend_co.gif"						
			helpContextId = "stop_monitoring_action_context"
			class = "org.eclipse.hyades.trace.ui.internal.actions.StopTraceActionDelegate"
			tooltip="%STOP_TRACE"			
			label="%STOP_MONITOR">
		</action>		
		<action
			id = "org.eclipse.hyades.trace.ui.internal.monitorsview.toolbar.startMonitoring"
			toolbarPath = "monitoringGroup"
			icon = "icons/full/elcl16/resume_co.gif"
			disabledIcon="icons/full/dlcl16/resume_co.gif"
            hoverIcon="icons/full/clcl16/resume_co.gif"						
			helpContextId = "start_monitoring_action_context"
			class = "org.eclipse.hyades.trace.ui.internal.actions.StartTraceActionDelegate"
			tooltip="%START_TRACE"			
			label="%START_MONITOR">
		</action>
<!-- GC group-->
	   <action id="org.eclipse.hyades.trace.ui.internal.monitorsview.toolbar.runGC"        
		   toolbarPath="gcGroup"
		   label="%RUN_GC_ACTION"
		   tooltip="%RUN_GC_ACTION_TIP"
		   icon="icons/full/elcl16/rungc_co.gif"
		   disabledIcon="icons/full/dlcl16/rungc_co.gif"
           hoverIcon="icons/full/clcl16/rungc_co.gif"								   		   
		   class="org.eclipse.hyades.trace.ui.internal.actions.RunGCActionDelegate">
	   </action>
	   				
		<action
			id = "org.eclipse.hyades.trace.ui.internal.monitorsview.toolbar.refreshViews"
			toolbarPath = "refreshGroup"
			icon = "icons/full/elcl16/updateviews_co.gif"
			disabledIcon="icons/full/dlcl16/updateviews_co.gif"
            hoverIcon="icons/full/clcl16/updateviews_co.gif"						
			helpContextId = "refresh_views_action_context"
			class = "org.eclipse.hyades.trace.ui.internal.actions.RefreshViewsActionDelegate"
			tooltip="%REFRESH_VIEWS"			
			label="%REFRESH_VIEWS">
		</action>
		
	</viewContribution>
</extension>


<extension point = "org.eclipse.ui.popupMenus">
<!-- Contributions to Monitors View Popup Menu -->
	<objectContribution
		id = "org.eclipse.hyades.models.hierarchy.TRCAgentProxy"
		objectClass = "org.eclipse.hyades.models.hierarchy.TRCAgentProxy">
<!-- Monitoring Group -->
		<action
			id = "org.eclipse.hyades.trace.ui.internal.popupMenu.stopMonitoring"
			icon = "icons/full/clcl16/suspend_co.gif"
			menubarPath = "monitoringGroup"						
			helpContextId = "start_monitoring_action_context"
			class = "org.eclipse.hyades.trace.ui.internal.actions.StopTraceAction"
			label="%STOP_MONITOR">
		</action>
				
		<action
			id = "org.eclipse.hyades.trace.ui.internal.monitorsview.popupMenu.startMonitoring"
			icon = "icons/full/clcl16/resume_co.gif"
			menubarPath = "monitoringGroup"
			helpContextId = "start_monitoring_action_context"
			class = "org.eclipse.hyades.trace.ui.internal.actions.StartTraceAction"
			tooltip="START_TRACE"			
			label="%START_MONITOR">
		</action>
<!-- Attach Group -->		
 		<action id="org.eclipse.hyades.trace.ui.internal.popupMenu.DetachAction" 
  			label="%DETACH"
  			tooltip="DETACH_AGT_PROCESS"  			 
  			class="org.eclipse.hyades.trace.ui.internal.actions.DetachAction" 
  			menubarPath="attachGroup"/>
 		<action id="org.eclipse.hyades.trace.ui.internal.popupMenu.AttachAction" 
  			label="%ATTACH_AGENT_MENU" 
  			tooltip="ATTACH_AGT_PROCESS"  			
  			class="org.eclipse.hyades.trace.ui.internal.actions.AttachAction" 
  			menubarPath="attachGroup"/>

<!--New snapshot Group -->			   
 		<action id="org.eclipse.hyades.trace.ui.internal.popupMenu.NewSnapshot" 
  			label="%NEW_SNAPSHOT_MENU"
  			tooltip="NEW_SNAPSHOT_TOOLTIP"  			 
  			class="org.eclipse.hyades.trace.ui.internal.actions.NewSnapshotAction" 
  			menubarPath="newSnapshotGroup"/>
  			
<!--GC Group -->			   
		<action
			id = "org.eclipse.hyades.trace.ui.monitorsview.popupMenu.GC"
			menubarPath = "gcGroup"
			icon = "icons/full/clcl16/rungc_co.gif"
			helpContextId = "run_gc_action_context"
			class = "org.eclipse.hyades.trace.ui.internal.actions.RunGCAction"
		   label="%RUN_GC_ACTION"
		   tooltip="%RUN_GC_ACTION_TIP">
		</action>				
		  			
<!-- Terminate Group -->		  			
 		<action id="org.eclipse.hyades.trace.ui.internal.popupMenu.TerminateAction" 
  			label="%TERMINATE" 
  			tooltip="%TERMINATE" 
			icon = "icons/full/clcl16/terminate_co.gif"  			 			
  			class="org.eclipse.hyades.trace.ui.internal.actions.TerminateProcessAction" 
  			menubarPath="terminateGroup"/>
  			
<!-- Refresh Group -->		
		<action
			id = "org.eclipse.hyades.trace.ui.internal.monitorsview.popupMenu.refreshViews"
			menubarPath = "refreshGroup"
			icon = "icons/full/clcl16/updateviews_co.gif"
			helpContextId = "refresh_views_action_context"
			class = "org.eclipse.hyades.trace.ui.internal.actions.RefreshViewsAction"
			tooltip="REFRESH_VIEWS"			
			label="%REFRESH_VIEWS">
		</action>				

	</objectContribution>
	
	<objectContribution
		id = "org.eclipse.hyades.models.hierarchy.TRCMonitor"
		objectClass = "org.eclipse.hyades.models.hierarchy.TRCMonitor">
		<action
			id = "org.eclipse.hyades.trace.ui.internal.monitorsview.popupMenu.refreshViews"
			menubarPath = "refreshGroup"
			icon = "icons/full/clcl16/updateviews_co.gif"
			helpContextId = "refresh_views_action_context"
			class = "org.eclipse.hyades.trace.ui.internal.actions.RefreshViewsAction"
			tooltip="REFRESH_VIEWS"			
			label="%REFRESH_VIEWS">
		</action>		
	</objectContribution>

	<objectContribution
		id = "org.eclipse.hyades.models.hierarchy.TRCNode"
		objectClass = "org.eclipse.models.hyades.hierarchy.TRCNode">
		<action
			id = "org.eclipse.hyades.trace.ui.internal.monitorsview.popupMenu.refreshViews"
			menubarPath = "refreshGroup"
			icon = "icons/full/clcl16/updateviews_co.gif"
			helpContextId = "refresh_views_action_context"
			class = "org.eclipse.hyades.trace.ui.internal.actions.RefreshViewsAction"
			tooltip="REFRESH_VIEWS"			
			label="%REFRESH_VIEWS">
		</action>		
	</objectContribution>
	
	<objectContribution
		id = "org.eclipse.hyades.models.hierarchy.TRCProcessProxy"
		objectClass = "org.eclipse.hyades.models.hierarchy.TRCProcessProxy">
		<action
			id = "org.eclipse.hyades.trace.ui.internal.monitorsview.popupMenu.refreshViews"
			menubarPath = "refreshGroup"
			icon = "icons/full/clcl16/updateviews_co.gif"
			helpContextId = "refresh_views_action_context"
			class = "org.eclipse.hyades.trace.ui.internal.actions.RefreshViewsAction"
			tooltip="REFRESH_VIEWS"			
			label="%REFRESH_VIEWS">
		</action>		

<!--GC Group -->
		<action
			id = "org.eclipse.hyades.trace.ui.monitorsview.popupMenu.GC"
			menubarPath = "gcGroup"
			icon = "icons/full/clcl16/rungc_co.gif"
			helpContextId = "run_gc_action_context"
			class = "org.eclipse.hyades.trace.ui.internal.actions.RunGCAction"
		   label="%RUN_GC_ACTION"
		   tooltip="%RUN_GC_ACTION_TIP">
		</action>				

<!-- Terminate Group -->		  			
 		<action id="org.eclipse.hyades.trace.ui.internal.popupMenu.TerminateAction" 
  			label="%TERMINATE" 
  			tooltip="%TERMINATE" 
			icon = "icons/full/clcl16/terminate_co.gif"  			 			
  			class="org.eclipse.hyades.trace.ui.internal.actions.TerminateProcessAction" 
  			menubarPath="terminateGroup"/>
		
	</objectContribution>
		
</extension>


  <!-- ============================================================================= -->
  <!-- Trace Perspective -->
  <!-- ============================================================================= -->
<extension point="org.eclipse.ui.perspectives">
  <perspective id="org.eclipse.hyades.trace.internal.ui.tracePerspective"
        name="%STR_TRACE_PERSP"
        icon="icons/full/cview16/trace_persp.gif"
        class="org.eclipse.hyades.trace.internal.ui.PDPerspective"/>
</extension>

<extension point="org.eclipse.ui.perspectiveExtensions">
	<perspectiveExtension 
		targetID="org.eclipse.ui.resourcePerspective">
		<perspectiveShortcut id="org.eclipse.hyades.trace.internal.ui.tracePerspective"/>
	</perspectiveExtension>
	<perspectiveExtension 
		targetID="org.eclipse.jdt.ui.JavaPerspective">
		<perspectiveShortcut id="org.eclipse.hyades.trace.internal.ui.tracePerspective"/>
	</perspectiveExtension>
	<perspectiveExtension 
		targetID="org.eclipse.debug.ui.DebugPerspective">
		<perspectiveShortcut id="org.eclipse.hyades.trace.internal.ui.tracePerspective"/>
	</perspectiveExtension>
	<perspectiveExtension 
		targetID="org.eclipse.hyades.trace.internal.ui.tracePerspective">
		<perspectiveShortcut id="org.eclipse.jdt.ui.JavaPerspective"/>
	</perspectiveExtension>
	<perspectiveExtension 
		targetID="org.eclipse.hyades.trace.internal.ui.tracePerspective">
		<perspectiveShortcut id="org.eclipse.debug.ui.DebugPerspective"/>
	</perspectiveExtension>
	<perspectiveExtension 
		targetID="org.eclipse.debug.ui.DebugPerspective">
		<actionSet id="org.eclipse.hyades.trace.ui.internal.traceActionSet"/>
	</perspectiveExtension>
	<perspectiveExtension 
		targetID="org.eclipse.jdt.ui.JavaPerspective">
		<actionSet id="org.eclipse.hyades.trace.ui.internal.traceActionSet"/>
	</perspectiveExtension>
	<perspectiveExtension 
		targetID="org.eclipse.jdt.ui.JavaHierarchyPerspective">
		<actionSet id="org.eclipse.hyades.trace.ui.internal.traceActionSet"/>
	</perspectiveExtension>


  <perspectiveExtension 
	targetID="org.eclipse.hyades.trace.internal.ui.tracePerspective">
	<actionSet id="org.eclipse.hyades.trace.ui.internal.traceActionSet"/>
  </perspectiveExtension> 
</extension>

<extension point = "org.eclipse.ui.actionSets">
   <actionSet id="org.eclipse.hyades.trace.ui.internal.traceActionSet"
	   label="%STR_TRACE_ACTION_SET"
	   visible="false">

		<menu id="Profile" 
			label="%Profiling.menu.label"
			path="additions">
			<separator name="Attach" /> 			
			<separator name="Monitoring" /> 
			<separator name="GC" /> 									
			<separator name="Refresh" /> 									
		</menu>
		
		<menu id="AttachMenu" 
			label="%AttachMenu.label"
			path="Profile/Profiles">
			<separator name="AttachActions" /> 
		</menu>
		<menu id="LaunchMenu" 
			label="%LaunchMenu.label"
			path="Profile/Profiles">
			<separator name="LaunchActions" /> 
		</menu>
  		
  		<action id="org.eclipse.hyades.trace.ui.internal.launcher.AttachRemoteAction" 
  			label="%Attach.remote.menu.label" 
  			icon="icons/full/ctool16/attachtrace_wiz.gif" 
  			class="org.eclipse.hyades.trace.ui.internal.launcher.AttachRemoteAction" 
  			menubarPath="Profile/AttachMenu/AttachActions" /> 
  		<action 
  			id="org.eclipse.hyades.trace.ui.internal.launcher.AttachLocalAction" 
  			label="%Attach.local.menu.label" 
  			icon="icons/full/ctool16/attachtrace_wiz.gif" 
  			class="org.eclipse.hyades.trace.ui.internal.launcher.AttachLocalAction" 
  			menubarPath="Profile/AttachMenu/AttachActions" /> 

	  	<action 
	  		id="org.eclipse.hyades.trace.ui.internal.launcher.TraceRemoteAction" 
	  		label="%Launch.remote.menu.label" 
	  		icon="icons/full/ctool16/launchtrace_wiz.gif" 
	  		class="org.eclipse.hyades.trace.ui.internal.launcher.TraceRemoteAction" 
	  		menubarPath="Profile/LaunchMenu/LaunchActions" /> 
  		<action 
  			id="org.eclipse.hyades.trace.ui.internal.launcher.TraceLocalAction" 
  			label="%Launch.local.menu.label" 
  			icon="icons/full/ctool16/launchtrace_wiz.gif" 
  			class="org.eclipse.hyades.trace.ui.internal.launcher.TraceLocalAction" 
  			menubarPath="Profile/LaunchMenu/LaunchActions" /> 

 		<action id="org.eclipse.hyades.trace.ui.internal.actions.RefreshViewsAction" 
  			label="%REFRESH_VIEWS" 
  			class="org.eclipse.hyades.trace.ui.internal.actions.RefreshViewsActionDelegate" 
  			menubarPath="Profile/Refresh"
			icon = "icons/full/elcl16/updateviews_co.gif"
			disabledIcon= "icons/full/dlcl16/updateviews_co.gif"
            hoverIcon= "icons/full/clcl16/updateviews_co.gif"/> 

 		<action id="org.eclipse.hyades.trace.ui.internal.actions.DetachViewsAction" 
  			label="%DETACH"
  			tooltip="DETACH_AGT_PROCESS"  			 
  			class="org.eclipse.hyades.trace.ui.internal.actions.DetachActionDelegate" 
  			menubarPath="Profile/Attach"/>

 		<action id="org.eclipse.hyades.trace.ui.internal.actions.AttachAction" 
  			label="%ATTACH_AGENT_MENU" 
  			tooltip="ATTACH_AGT_PROCESS"  			
  			class="org.eclipse.hyades.trace.ui.internal.actions.AttachActionDelegate" 
  			menubarPath="Profile/Attach"/>
  			 
 		<action id="org.eclipse.hyades.trace.ui.internal.actions.StopTraceAction" 
  			label="%STOP_MONITOR" 
  			class="org.eclipse.hyades.trace.ui.internal.actions.StopTraceActionDelegate" 
  			menubarPath="Profile/Monitoring"
			icon = "icons/full/elcl16/suspend_co.gif"
			disabledIcon= "icons/full/dlcl16/suspend_co.gif"
            hoverIcon= "icons/full/clcl16/suspend_co.gif"/> 

 		<action id="org.eclipse.hyades.trace.ui.internal.actions.StartTraceAction" 
  			label="%START_MONITOR" 
  			class="org.eclipse.hyades.trace.ui.internal.actions.StartTraceActionDelegate" 
  			menubarPath="Profile/Monitoring"
			icon = "icons/full/elcl16/resume_co.gif"
			disabledIcon= "icons/full/dlcl16/resume_co.gif"
            hoverIcon= "icons/full/clcl16/resume_co.gif"/> 

	   <action id="org.eclipse.hyades.trace.ui.internal.actions.traceDropDownAction"        
		   toolbarPath="group.trace"
		   pulldown="true"
		   label="%TRACE_MENU_ACTION"
		   tooltip="%TRACE_MENU_ACTION_TIP"
		   icon="icons/full/ctool16/launchtrace_wiz.gif"
		   class="org.eclipse.hyades.trace.ui.internal.actions.TraceDropDownAction">
	   </action>

   </actionSet>
</extension>


<extension
	point="org.eclipse.ui.preferencePages">
	<page name="%STR_PREF_TRACE"
		id="org.eclipse.hyades.trace.ui.internal.preferences.TraceBasePreferencePage"
		class="org.eclipse.hyades.trace.ui.internal.preferences.TraceBasePreferencePage">
	</page>
	<page name="%STR_PREF_TRACE_VIEW"
		id="org.eclipse.hyades.trace.ui.internal.preferences.TraceViewPreferencePage"
		class="org.eclipse.hyades.trace.ui.internal.preferences.TraceViewPreferencePage"
		category= "org.eclipse.hyades.trace.ui.internal.preferences.TraceBasePreferencePage">
	</page>
	<page name="%STR_PREF_NODE_PAGE"
		id="org.eclipse.hyades.trace.ui.internal.preferences.HostPreferencePage"
		class="org.eclipse.hyades.trace.ui.internal.preferences.HostPreferencePage"
		category= "org.eclipse.hyades.trace.ui.internal.preferences.TraceBasePreferencePage">
	</page>
   <page
         name="%ConsolePreferencePage"
         category="org.eclipse.hyades.trace.ui.internal.preferences.TraceViewPreferencePage"
         class="org.eclipse.hyades.trace.ui.internal.preferences.TraceConsolePreferencePage"
         id="org.eclipse.hyades.trace.ui.internal.preferences.TraceConsolePreferencePage">
   </page>
   <page name="%TRACE_ASSOC_PAGE"
			id="org.eclipse.hyades.trace.ui.internal.preferences.TraceViewMappingPreferencePage"
            category="org.eclipse.hyades.trace.ui.internal.preferences.TraceBasePreferencePage"			
			class="org.eclipse.hyades.trace.ui.internal.preferences.TraceViewMappingPreferencePage">
	</page>	
	<page
		name="%LOGGING_AGENTS_PREF_PAGE"
		id="org.eclipse.hyades.trace.ui.internal.preferences.LoggingAgentsPreferencePage"
		class="org.eclipse.hyades.trace.ui.internal.preferences.LoggingAgentsPreferencePage"
		category="org.eclipse.hyades.trace.ui.internal.preferences.TraceBasePreferencePage">
	</page>
			   
</extension>

<!-- - - - - - - - - - - - - - - - - - - - - - - -->
<!-- Editors for the following Perftrace objects -->
<!-- TRCMonitor, TRCNode, TRCProcessProxy, TRCAgentProxy-->
<!-- - - - - - - - - - - - - - - - - - - - - - - -->

<extension point = "org.eclipse.ui.editors">
    <editor
      id = "org.eclipse.hyades.trace.ui.internal.editors.TRCMonitorEditor"
      name = "%STR_MONITOR_EDITOR"
      icon = "icons/full/obj16/monitor_obj.gif"
      extensions = "trcmxmi"
      class = "org.eclipse.hyades.trace.ui.internal.editors.TRCMonitorEditor">
    </editor>
    <editor
      id = "org.eclipse.hyades.trace.ui.internal.editors.TRCNodeEditor"
      name = "%STR_NODE_EDITOR"
      icon = "icons/full/obj16/node_obj.gif"
      extensions = "trcnxmi"
      class = "org.eclipse.hyades.trace.ui.internal.editors.TRCNodeEditor">
    </editor>
    <editor
      id = "org.eclipse.hyades.trace.ui.internal.editors.TRCProcessEditor"
      name = "%STR_PROCESS_EDITOR"
      icon = "icons/full/obj16/process_obj.gif"
      extensions = "trcpxmi"
      class = "org.eclipse.hyades.trace.ui.internal.editors.TRCProcessEditor">
    </editor>
    <editor
      id = "org.eclipse.hyades.trace.ui.internal.editors.TRCAgentEditor"
      name = "%STR_AGENT_EDITOR"
      icon = "icons/full/obj16/agent_prof_obj.gif"
      extensions = "trcaxmi"
      class = "org.eclipse.hyades.trace.ui.internal.editors.TRCAgentEditor">
    </editor>

</extension>

   <extension 
       point="org.eclipse.ui.importWizards"> 
      <wizard  
         id="ImportTraceXMLWizard" 
         name="%STR_IMPORT_XML_TITLE" 
         class="org.eclipse.hyades.trace.ui.internal.wizard.ImportXMLTraceWizard" 
         icon="icons/full/ctool16/launchtrace_wiz.gif"> 
         <description> 
            %STR_IMPORT_XML_DESC 
         </description> 
         <selection class="org.eclipse.core.resources.IResource"/> 
      </wizard> 
   </extension> 

   <extension
         point="org.eclipse.ui.newWizards">

		<category
			id = "org.eclipse.hyades.trace_log.newWizard"
			name="%TRACE_LOG_NEWWIZ">
		</category>
   </extension>
</plugin>
