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

Resource properties

Resources have properties that can be used to store meta-information about the resource. Your plug-in can use these properties to hold information about a resource that is specific to your purpose. Resource properties are declared, accessed, and maintained by various plug-ins, and are not interpreted by the platform. When a resource is deleted from the workspace, its properties are also deleted.

There are two kinds of resource properties:

  • Session properties allow your plug-ins to easily cache information about a resource in key-value pairs. The values are arbitrary objects.  These properties are maintained in memory and lost when a resource is deleted from the workspace, or when the project or workspace is closed.
  • Persistent properties are used to store resource-specific information on disk. The value of a persistent property is an arbitrary string. Your plug-in decides how to interpret the string. The strings are intended to be short (under 2KB). Persistent properties are stored on disk with the platform metadata and maintained across platform shutdown and restart.

If you follow the convention of qualifying property key names with the unique id of your plug-in, you won't have to worry about your property names colliding with those of other plug-ins.

If your plug-in needs to store persistent information about a project that is much larger than 2 KB, then these properties should be exposed as resources in their own right, rather than using the persistent properties API.

See IResource for a description of the API for getting and setting the different kinds of resource properties.


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