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
Answertopia.com

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

  




 

 

Eclipse Plug-in Developer Guide
Previous Page Home Next Page

Adapters

Identifier:
org.eclipse.core.runtime.adapters

Since:
3.0

Description:
The adapters extension point allows plug-ins to declaratively register adapter factories. This information is used to by the runtime XML expression language to determine existence of adapters without causing plug-ins to be loaded. Registration of adapter factories via extension point eliminates the need to manually register adapter factories when a plug-in starts up.

Configuration Markup:

<!ELEMENT extension ( factory+)>

<!ATTLIST extension

point CDATA #REQUIRED

id    CDATA #IMPLIED

name  CDATA #IMPLIED

>


<!ELEMENT factory ( adapter+)>

<!ATTLIST factory

adaptableType CDATA #REQUIRED

class         CDATA #REQUIRED

>

  • adaptableType - The fully qualified name of a class (typically implementing IAdaptable) that this factory provides adapters for.
  • class - The fully qualified name of the adapter factory class. Must implement org.eclipse.core.runtime.IAdapterFactory.

<!ELEMENT adapter EMPTY>

<!ATTLIST adapter

type CDATA #REQUIRED

>

  • type - The fully qualified name of a Java class or interface that this factory can adapt to.

Examples:
Following is an example of an adapter declaration. This example declares that this plug-in will provide an adapter factory that will adapt objects of type IFile to objects of type MyFile.


      <extension point=
"org.eclipse.core.runtime.adapters"
>
         <factory 
            class=
"com.xyz.MyFileAdapterFactory"
 
            adaptableType=
"org.eclipse.core.resources.IFile"
>
            <adapter type=
"com.xyz.MyFile"
/>
         </factory>
      </extension>
   

Supplied Implementation:
Several plug-ins in the platform provide adapters for a number of different IAdaptable objects.


Copyright (c) 2004, 2007 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