KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > debug > internal > ui > viewers > AddRequestMonitor


1 /*******************************************************************************
2  * Copyright (c) 2005, 2006 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 package org.eclipse.debug.internal.ui.viewers;
12
13 import org.eclipse.jface.viewers.TreePath;
14
15
16
17 /**
18  * Request to add an item to a tree.
19  *
20  * @since 3.2
21  */

22 class AddRequestMonitor extends AbstractAddRemoveRequestMonitor {
23
24     /**
25      * Adds the given child to the specified parent.
26      *
27      * @param parent parent node
28      * @param path path to the child in the tree@param child
29      * @param viewer
30      *
31      */

32     AddRequestMonitor(ModelNode parent, TreePath path, AsynchronousModel model) {
33         super(parent, path, model);
34     }
35     /* (non-Javadoc)
36      * @see org.eclipse.debug.internal.ui.viewers.AsynchronousModelRequestMonitor#performUpdate()
37      */

38     protected void performUpdate() {
39         ((AsynchronousTreeModel)getModel()).add(getNode(), getPath().getLastSegment());
40     }
41
42 }
43
Popular Tags