KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > debug > internal > ui > views > memory > IMemoryBlockViewSynchronizer


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

11
12 package org.eclipse.debug.internal.ui.views.memory;
13
14 import org.eclipse.debug.core.model.IMemoryBlock;
15
16
17 /**
18  * Allows for synchronization for any view that displays a memory block with
19  * the Memory View. When a view needs to be synchronized, the view
20  * needs to implement ISynchronizedMemoryBlockView interface and adds itself
21  * to the synchronizer. The view can define properties for synchronization.
22  * It is up to the view to handle synchronized properties changed events.
23  *
24  * @since 3.0
25  */

26 public interface IMemoryBlockViewSynchronizer
27 {
28     /**
29      * Add the view to the synchronizer. The view will
30      * be notified when one of the synchronization properties has changed.
31      * @param view - the view listening for property changed events.
32      * @param filters - list of properties the view tab is interested in.
33      * Null if view tab is interested in all events.
34      */

35     public void addView(ISynchronizedMemoryBlockView view, String JavaDoc[] filters);
36     
37     /**
38      * Remove the view from the synchronizer. The view
39      * will no longer be notified about changes in synchronization properties.
40      * @param view
41      */

42     public void removeView(ISynchronizedMemoryBlockView view);
43     
44     /**
45      * Sets a property to the synchronizer to be synchronized.
46      * A change event will be fired if the value provided is different from the
47      * value stored in the synchronizer. Otherwise, no change event will be
48      * fired.
49      * @param memoryBlock
50      * @param propertyId
51      * @param value
52      */

53     public void setSynchronizedProperty(IMemoryBlock memoryBlock, String JavaDoc propertyId, Object JavaDoc value);
54     
55     /**
56      * Get the property from the synchronizer for a memory block
57      * @param memoryBlock
58      * @param propertyId
59      * @return
60      */

61     public Object JavaDoc getSynchronizedProperty(IMemoryBlock memoryBlock, String JavaDoc propertyId);
62     
63     /**
64      * Set up a list of properties that the view wishes to be notified about when the properties
65      * have changed.
66      * @param view - view listening for property changed events.
67      * @param filters - properties that the view are interested in. Synchronizer will filter
68      * out events not listed in the filters. Enter null when the view wishes to listen to all events.
69      */

70     public void setPropertyFilters(ISynchronizedMemoryBlockView view, String JavaDoc[] filters);
71 }
72
73
74
Popular Tags