~ubuntu-branches/debian/sid/eclipse-cdt/sid

« back to all changes in this revision

Viewing changes to results/plugins/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/IVMNode.java

  • Committer: Package Import Robot
  • Author(s): Jakub Adam
  • Date: 2011-10-06 21:15:04 UTC
  • mfrom: (1.1.4)
  • Revision ID: package-import@ubuntu.com-20111006211504-8dutmljjih0zikfv
Tags: 8.0.1-1
* New upstream release.
* Split the JNI packages into a separate architecture dependent
  package and made eclipse-cdt architecture independent.
* Install JNI libraries into multiarch aware location
* Bumped Standards-Version to 3.9.2.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*******************************************************************************
2
 
 * Copyright (c) 2006, 2008 Wind River Systems 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
 
 *     Wind River Systems - initial API and implementation
10
 
 *******************************************************************************/
11
 
package org.eclipse.cdt.dsf.ui.viewmodel;
12
 
 
13
 
import org.eclipse.cdt.dsf.concurrent.ConfinedToDsfExecutor;
14
 
import org.eclipse.cdt.dsf.concurrent.DataRequestMonitor;
15
 
import org.eclipse.cdt.dsf.concurrent.RequestMonitor;
16
 
import org.eclipse.cdt.dsf.service.IDsfService;
17
 
import org.eclipse.cdt.dsf.ui.viewmodel.datamodel.AbstractDMVMProvider;
18
 
import org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenCountUpdate;
19
 
import org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenUpdate;
20
 
import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementContentProvider;
21
 
import org.eclipse.debug.internal.ui.viewers.model.provisional.IHasChildrenUpdate;
22
 
import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta;
23
 
 
24
 
/**
25
 
 * View model nodes are configured with a view model provider to collectively 
26
 
 * define the layout of a view.  Each layout node generates elements of type 
27
 
 * {@link IVMContext} which are then stored in the viewer.
28
 
 * 
29
 
 * <p/>
30
 
 * NOTE: This interface extends <code>IElementContentProvider</code> but it has 
31
 
 * slightly different parameter requirements.  For the 
32
 
 * {@link IElementContentProvider#update(IChildrenUpdate[])} method, this class 
33
 
 * can accept an update where {@link IChildrenUpdate#getOffset()}  and 
34
 
 * {@link IChildrenUpdate#getLength()} may return -1. In this case the 
35
 
 * implementation should return all available elements for the given parent.<br>
36
 
 * Also the for the {@link IElementContentProvider#update(IHasChildrenUpdate[])} and 
37
 
 * {@link IElementContentProvider#update(IChildrenCountUpdate[])} methods, the 
38
 
 * implementation may return an error with an error code of {@link IDsfService#NOT_SUPPORTED}.  
39
 
 * In this case the caller of this update should call 
40
 
 * {@link IElementContentProvider#update(IChildrenUpdate[])}
41
 
 * instead.
42
 
 * 
43
 
 * @see AbstractDMVMProvider
44
 
 * @see IElementContentProvider
45
 
 * 
46
 
 * @since 1.0
47
 
 */
48
 
@ConfinedToDsfExecutor("")
49
 
public interface IVMNode extends IElementContentProvider
50
 
{
51
 
    /**
52
 
     * Retrieves the view model provider that this node is configured with.
53
 
     */
54
 
    public IVMProvider getVMProvider();
55
 
    
56
 
    /**
57
 
     * Returns the potential delta flags that would be generated by this node 
58
 
     * for the given event.  
59
 
     * @param event Event to process.
60
 
     * @return IModelDelta flags
61
 
     * @see #buildDelta(Object, VMDelta, int, RequestMonitor)
62
 
     * @see IModelDelta
63
 
     */
64
 
    public int getDeltaFlags(Object event);
65
 
    
66
 
    /**
67
 
     * Builds model delta information based on the given event.  
68
 
     * <p>
69
 
     * Model deltas, which are used to control the state of elements in the viewer, are 
70
 
     * generated by the layout nodes by recursively calling this method on all the nodes 
71
 
     * in the layout tree.  Each node implements two methods: {@link #getDeltaFlags(Object)}, 
72
 
     * and <code>buildDelta()</code>.  A parent node which is processing a 
73
 
     * <code>buildDelta</code> operation needs to determine which of its elements are
74
 
     * affected by a given event, set appropriate flags on these elements, and then 
75
 
     * it needs to call its child nodes with those elements to give the child nodes a 
76
 
     * chance to add onto the delta.  
77
 
     * </p>
78
 
     * <p>
79
 
     * The <code>getDeltaFlags()</code> is a synchronous
80
 
     * call which tells the parent node whether on not to call the child node's 
81
 
     * <code>buildDelta</code> with the given event.  If a child node return 
82
 
     * <code>true</code>, it only indicates that the node may add delta flags, but it
83
 
     * does not require it to do so.
84
 
     * </p>  
85
 
     * 
86
 
     * @param event Event to process.
87
 
     * @param parent Parent model delta node that this object should add delta
88
 
     * data to.
89
 
     * @param nodeOffset The offset of the first element in this node.  This offset
90
 
     * depends on the elements returned by the siblings of this layout node.
91
 
     * @param requestMonitor Return token, which notifies the caller that the calculation is
92
 
     * complete.
93
 
     */
94
 
    public void buildDelta(Object event, VMDelta parent, int nodeOffset, RequestMonitor requestMonitor);
95
 
 
96
 
    /**
97
 
     * Retireves the view model elements for the given data model event.  This method 
98
 
     * is optional and it allows the view model provider to optimize event processing
99
 
     * by avoiding the need to retrieve all possible elements for the given node.
100
 
     * </p>
101
 
     * For example:  If a threads node implementation is given a thread stopped event in 
102
 
     * this method, and the stopped event included a reference to the thread.  Then
103
 
     * the implementation should create a view model context for that thread and return it
104
 
     * here.
105
 
     *   
106
 
     * @param parentDelta The parent delta in the processing of this event.
107
 
     * @param event The event to check for the data model object.
108
 
     * @param Request monitor for the array of elements corresponding to the 
109
 
     * given event.
110
 
     */
111
 
    public void getContextsForEvent(VMDelta parentDelta, Object event, DataRequestMonitor<IVMContext[]> rm);
112
 
 
113
 
    /**
114
 
     * Releases the resources held by this node.
115
 
     */
116
 
    public void dispose();
117
 
}
 
 
b'\\ No newline at end of file'