| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML> |
| <HEAD> |
| <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1"> |
| <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"> |
| |
| <LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css"> |
| <TITLE> |
| Resource properties |
| </TITLE> |
| |
| <link rel="stylesheet" type="text/css" HREF="../book.css"> |
| </HEAD> |
| <BODY BGCOLOR="#ffffff"> |
| <H2> |
| Resource properties</H2> |
| <P > |
| Resources can have properties that hold state information defined by your tool. 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.</P> |
| <P > |
| There are two kinds of resource properties:</P> |
| <ul> |
| <li> |
| |
| <b> |
| Session properties</b> allow your plug-ins to cache information 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.</li> |
| <li> |
| |
| <b> |
| Persistent properties</b> 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.</li> |
| </ul> |
| <i><blockquote> |
| Note: If you have large persistent properties, you should expose these as resources in their own right rather than using the persistent properties API.</blockquote></i> |
| <i><blockquote> |
| Note: 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.</blockquote></i> |
| <P > |
| <b><a href="../reference/api/org/eclipse/core/resources/IResource.html"> |
| IResource</a></b> provides protocol (<b>getSessionProperty</b>, |
| <b>setSessionProperty</b>, <b>getPersistentProperty</b>, |
| <b>setPersistentProperty</b>) for using properties.</P> |
| <p><a href="../hglegal.htm"><img border="0" src="../ngibmcpy.gif" alt="Copyright IBM Corporation and others 2000, 2003." border="0" width="324" height="14"></a></p> |
| </BODY> |
| </HTML> |