]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.diagram/src/org/simantics/diagram/synchronization/graph/TagChange.java
Fixed multiple issues causing dangling references to discarded queries
[simantics/platform.git] / bundles / org.simantics.diagram / src / org / simantics / diagram / synchronization / graph / TagChange.java
1 /*******************************************************************************
2  * Copyright (c) 2007, 2010 Association for Decentralized Information Management
3  * in Industry THTH ry.
4  * All rights reserved. This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License v1.0
6  * which accompanies this distribution, and is available at
7  * http://www.eclipse.org/legal/epl-v10.html
8  *
9  * Contributors:
10  *     VTT Technical Research Centre of Finland - initial API and implementation
11  *******************************************************************************/
12 package org.simantics.diagram.synchronization.graph;
13
14 import org.simantics.db.Resource;
15 import org.simantics.db.WriteGraph;
16 import org.simantics.diagram.synchronization.ModificationAdapter;
17
18 /**
19  * @author Tuukka Lehtonen
20  */
21 public class TagChange extends ModificationAdapter {
22
23     final Resource object;
24     final Resource tag;
25     final boolean  set;
26
27     public TagChange(Resource object, Resource tag, boolean set) {
28         super(LOW_PRIORITY);
29         this.object = object;
30         this.tag = tag;
31         this.set = set;
32     }
33
34     @Override
35     public void perform(WriteGraph g) throws Exception {
36         DiagramGraphUtil.tag(g, object, tag, set);
37     }
38
39 }