Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Eclipse GMF Guide
Previous Page Home Next Page

Global Action Handler Providers Extension Point

Identifier:
org.eclipse.gmf.runtime.common.ui.services.action.globalActionHandlerProviders

Description:

This extension point is used to configure providers for the global action handler service (org.eclipse.gmf.runtime.common.ui.services.action.global.GlobalActionHandlerService).

This service provides an extensible way to handle commonly used (global) actions in different views and editors. These global actions may appear in a view part context menu or may be predefined retargetable actions. The service allows different handlers to be used depending on the nature of the element(s) selected in the workbench part. Each global action handler provider registers itself for actions against a specific element type within a view part.

Configuration Markup:

<!ELEMENT extension ( GlobalActionHandlerProvider)+>

<!ATTLIST extension

point CDATA #REQUIRED

id    CDATA #IMPLIED

name  CDATA #IMPLIED

>

  • point - a fully qualified identifier of the target extension point, in this case, org.eclipse.gmf.runtime.common.ui.services.action.globalActionHandlerProviders.
  • id - an optional identifier of the extension instance
  • name - an optional human readable name of the extension instance

<!ELEMENT GlobalActionHandlerProvider ( Priority , Policy? , ViewId+)>

<!ATTLIST GlobalActionHandlerProvider

id    CDATA #REQUIRED

class CDATA #REQUIRED

>

This element is used to describe a global action handler provider that will contribute handlers to a given view or views for one or more retargetable actions.


  • id - a unique identifier used to reference this provider
  • class - the name of a fully qualified class that implements the org.eclipse.gmf.runtime.common.ui.services.action.global.IGlobalActionHandlerProvider and org.eclipse.gmf.runtime.common.core.service.IProvider interfaces.

<!ELEMENT Priority EMPTY>

<!ATTLIST Priority

name (Lowest|Low|Medium|High|Highest)

>

This element is used to specify the priority that this provider has relative to other global action handler providers that are registered to handle the same global action for the kind of element in the same view. When such a conflict occurs, the provider with the highest priority will be selected to provide the global action handler.


  • name - the name of the provider priority, one of Lowest, Low, Medium, High, or Highest

<!ELEMENT ViewId ( ElementType+)>

<!ATTLIST ViewId

id CDATA #REQUIRED

>

This element is used to specify a group of global actions that this provider handles for the specified view and element types.


  • id - a unique identifier of a registered view

<!ELEMENT ElementType ( GlobalActionId+)>

<!ATTLIST ElementType

class CDATA #IMPLIED

>

This element is used to define the set of global actions that are handled by this provider when objects of the specified type are selected.


  • class - a fully qualified name of the class or interface that at least one object in the selection must subclass or implement in order for this provider to be asked to handle the action(s)

<!ELEMENT GlobalActionId EMPTY>

<!ATTLIST GlobalActionId

actionId CDATA #REQUIRED

>

This element is used to describe a global action that will be handled by this provider.


  • actionId - the name of a global action handled by this provider. Global action names are specified in org.eclipse.gmf.runtime.common.ui.action.global.GlobalActionId.

<!ELEMENT Policy EMPTY>

<!ATTLIST Policy

class CDATA #REQUIRED

>

This element is used to optionally specify a policy to use to further determine if this provider should be considered to provide a handler for a global action, given that the view, element type and action ID all match the specified criteria. To delay plugin loading, the recommended strategy for policies is to define them in a separate package and add the package to the Eclipse-LazyStart in the Manifest.MF so that loading the policy class does not load the plug-in.


  • class - the fully qualified name of the class that implements org.eclipse.gmf.runtime.common.core.service.IProviderPolicy

Examples:
The following is an example of the global action handler provider extension:

   <extension
         id=
"globalActionHandlerProviders"

         name=
"%ext.globalActionHandlerProviders"

         point=
"org.eclipse.gmf.runtime.common.ui.services.action.globalActionHandlerProviders"
>
      <GlobalActionHandlerProvider
            class=
"org.eclipse.test.common.ui.views.internal.providers.GlobalActionHandlerProvider"

            id=
"ContainerResourceGlobalActionHandlerProvider"
>
         <Priority
               name=
"Lowest"
>
         </Priority>
         <ViewId
               id=
"org.eclipse.test.common.ui.views.DiagramNavigator"
>
            <ElementType
                  class=
"org.eclipse.test.common.ui.views.internal.providers.ContainerViewerElement"
>
               <GlobalActionId
                     actionId=
"open"
>
               </GlobalActionId>
               <GlobalActionId
                     actionId=
"openProject"
>
               </GlobalActionId>
               <GlobalActionId
                     actionId=
"rename"
>
               </GlobalActionId>
               <GlobalActionId
                     actionId=
"delete"
>
               </GlobalActionId>
               <GlobalActionId
                     actionId=
"move"
>
               </GlobalActionId>
               <GlobalActionId
                     actionId=
"closeProject"
>
               </GlobalActionId>
               <GlobalActionId
                     actionId=
"copy"
>
               </GlobalActionId>
               <GlobalActionId
                     actionId=
"paste"
>
               </GlobalActionId>
               <GlobalActionId
                     actionId=
"properties"
>
               </GlobalActionId>
            </ElementType>
         </ViewId>
      </GlobalActionHandlerProvider>
   </extension>


Copyright (c) 2003, 2005 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 https://www.eclipse.org/legal/epl-v10.html


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire