KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > debug > internal > ui > memory > IPersistableDebugElement


1 /*******************************************************************************
2  * Copyright (c) 2005 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11
12 package org.eclipse.debug.internal.ui.memory;
13
14 import org.eclipse.core.runtime.CoreException;
15 import org.eclipse.core.runtime.Preferences.IPropertyChangeListener;
16
17 /**
18  * Represents an element that is capable of persisting properties.
19  * @since 3.2
20  */

21 public interface IPersistableDebugElement {
22
23     /**
24      * Return the property with the specified propertyId.
25      * @param context is the context who is asking for this property.
26      * @param propertyId is the property id of the property.
27      * @return the value of the specified property
28      * @throws CoreException when an error has occurred getting this property
29      */

30     public Object JavaDoc getProperty(Object JavaDoc context, String JavaDoc propertyId) throws CoreException;
31     
32     /**
33      * Sets the property with the specified propertyId. Clients are expected
34      * to save the properties specified.
35      * @param context is the context who is asking for this property to be saved.
36      * @param propertyId is the id of the property to be saved
37      * @param value is the value of the property
38      * @throws CoreException when an error has occurred setting this property
39      */

40     public void setProperty(Object JavaDoc context, String JavaDoc propertyId, Object JavaDoc value) throws CoreException;
41     
42     /**
43      * @param context is the contex who is asking if this property is supported
44      * @param propertyId
45      * @return true if the peristable debug element wishes to handle persistence of
46      * the specified property.
47      */

48     public boolean supportsProperty(Object JavaDoc context, String JavaDoc propertyId);
49     
50     /**
51      * Add the property change listener to the persistable. The listener will
52      * be notified when properties have changed from the peristable element.
53      * @param listener is the listener to add
54      */

55     public void addPropertyChangeListener(IPropertyChangeListener listener);
56     
57     /**
58      * Remove the property change listener from the persistable. The listener will
59      * no longer be notified when properties are changed from the persistable element.
60      * @param listener is the listener to remove
61      */

62     public void removePropertyChangeListener(IPropertyChangeListener listener);
63 }
64
Popular Tags