Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 296adcfe8f4296c2f889da74ce74ef4aaee3ddc3 (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
/*******************************************************************************
 *  Copyright (c) 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.properties;

import java.util.Map;
import java.util.Set;

import org.eclipse.cdt.dsf.concurrent.RequestMonitor;
import org.eclipse.cdt.dsf.ui.viewmodel.VMViewerUpdate;

/**
 * Properties update used as to collect property data from the provider.
 * 
 * @since 2.0
 */
public class VMDelegatingPropertiesUpdate extends VMViewerUpdate implements IPropertiesUpdate {

    /**
     * Update to write the properties to.
     */
    private final IPropertiesUpdate fParentUpdate;
    
    public VMDelegatingPropertiesUpdate(IPropertiesUpdate parentUpdate, RequestMonitor rm) {
        super(parentUpdate, rm);
        fParentUpdate = parentUpdate;
    }

    public Set<String> getProperties() {
        return fParentUpdate.getProperties();
    }

    public void setProperty(String property, Object value) {
        fParentUpdate.setProperty(property, value);
    }
    
    public void setAllProperties(Map<String, Object> properties) {
        fParentUpdate.setAllProperties(properties);
    }
    
    @Override
    public String toString() {
        return "VMDelegatingPropertiesUpdate -> " + fParentUpdate; //$NON-NLS-1$ 
    }
}

Back to the top