X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.diagram%2Fsrc%2Forg%2Fsimantics%2Fdiagram%2Fhandler%2FDiagramSelectionRepresentation.java;h=d72370839a62f7d2e80b3da8698b00f53427831d;hb=cb337ac8c87b7bdad11ffb8584f76610c51d3a75;hp=b745a406760290c5074cf0ec19ce0d79ad5288b9;hpb=969bd23cab98a79ca9101af33334000879fb60c5;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.diagram/src/org/simantics/diagram/handler/DiagramSelectionRepresentation.java b/bundles/org.simantics.diagram/src/org/simantics/diagram/handler/DiagramSelectionRepresentation.java index b745a4067..d72370839 100644 --- a/bundles/org.simantics.diagram/src/org/simantics/diagram/handler/DiagramSelectionRepresentation.java +++ b/bundles/org.simantics.diagram/src/org/simantics/diagram/handler/DiagramSelectionRepresentation.java @@ -1,49 +1,49 @@ -/******************************************************************************* - * Copyright (c) 2012 Association for Decentralized Information Management in - * Industry THTH ry. - * 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: - * VTT Technical Research Centre of Finland - initial API and implementation - *******************************************************************************/ -package org.simantics.diagram.handler; - -import java.util.Map; - -import org.simantics.db.RequestProcessor; -import org.simantics.db.layer0.util.SimanticsClipboard.Representation; -import org.simantics.utils.datastructures.hints.IHintContext.Key; -import org.simantics.utils.datastructures.hints.IHintContext.KeyOf; - -/** - * @author Tuukka Lehtonen - */ -public class DiagramSelectionRepresentation implements Representation { - - /** - * A key for describing a DiagramSelection representation for the Simantics - * clipboard. - */ - public static final Key KEY_DIAGRAM_SELECTION = new KeyOf(DiagramSelection.class); - - private DiagramSelection selection; - - public DiagramSelectionRepresentation(DiagramSelection selection) { - this.selection = selection; - } - - @Override - public Key getKey() { - return KEY_DIAGRAM_SELECTION; - } - - @SuppressWarnings("unchecked") - @Override - public T getValue(RequestProcessor processor, Map hints) { - return (T) selection; - } - -} +/******************************************************************************* + * Copyright (c) 2012 Association for Decentralized Information Management in + * Industry THTH ry. + * 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: + * VTT Technical Research Centre of Finland - initial API and implementation + *******************************************************************************/ +package org.simantics.diagram.handler; + +import java.util.Map; + +import org.simantics.db.RequestProcessor; +import org.simantics.db.layer0.util.SimanticsClipboard.Representation; +import org.simantics.utils.datastructures.hints.IHintContext.Key; +import org.simantics.utils.datastructures.hints.IHintContext.KeyOf; + +/** + * @author Tuukka Lehtonen + */ +public class DiagramSelectionRepresentation implements Representation { + + /** + * A key for describing a DiagramSelection representation for the Simantics + * clipboard. + */ + public static final Key KEY_DIAGRAM_SELECTION = new KeyOf(DiagramSelection.class); + + private DiagramSelection selection; + + public DiagramSelectionRepresentation(DiagramSelection selection) { + this.selection = selection; + } + + @Override + public Key getKey() { + return KEY_DIAGRAM_SELECTION; + } + + @SuppressWarnings("unchecked") + @Override + public T getValue(RequestProcessor processor, Map hints) { + return (T) selection; + } + +}