Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: baec23ab766bf573f8a56a3e4ebcd11a9a549911 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/*******************************************************************************
 * Copyright (c) 2006, 2009 Wind River Systems and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 * 
 * Contributors:
 *     Wind River Systems - initial API and implementation
 *******************************************************************************/
package org.eclipse.cdt.dsf.ui.viewmodel;

import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxy;
import org.eclipse.jface.viewers.Viewer;

/**
 * Event generated by an IModelProxy implementation when it is installed 
 * into a viewer.
 * 
 * @since 1.0
 */
public class ModelProxyInstalledEvent {
    private final IModelProxy fProxy;
    private final Viewer fViewer;
    private final Object fRootElement;
    
    public ModelProxyInstalledEvent(IModelProxy proxy, Viewer viewer, Object rootElement) {
        fProxy = proxy;
        fViewer = viewer;
        fRootElement = rootElement;
    }
    
    /**
     * Returns the IModelProxy that generated this event.
     */
    public IModelProxy getModelProxy() {
        return fProxy;
    }

    /**
     * Returns the element that this model proxy was registered for.
     */
    public Object getRootElement() {
        return fRootElement;
    } 

    /**
     * Returns the viewer that installed this model proxy.
     */
    public Viewer getViewer() {
        return fViewer;
    }
}

Back to the top