X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.browsing.ui.swt%2Fsrc%2Forg%2Fsimantics%2Fbrowsing%2Fui%2Fswt%2Fwidgets%2FVariableStringPropertyTextModifier.java;h=bffefd5c5c36fc4f4423c84cbe28bbb4ea78a799;hp=e14c4ae08c093909c522e1670740e016adde2fbe;hb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;hpb=24e2b34260f219f0d1644ca7a138894980e25b14 diff --git a/bundles/org.simantics.browsing.ui.swt/src/org/simantics/browsing/ui/swt/widgets/VariableStringPropertyTextModifier.java b/bundles/org.simantics.browsing.ui.swt/src/org/simantics/browsing/ui/swt/widgets/VariableStringPropertyTextModifier.java index e14c4ae08..bffefd5c5 100644 --- a/bundles/org.simantics.browsing.ui.swt/src/org/simantics/browsing/ui/swt/widgets/VariableStringPropertyTextModifier.java +++ b/bundles/org.simantics.browsing.ui.swt/src/org/simantics/browsing/ui/swt/widgets/VariableStringPropertyTextModifier.java @@ -1,36 +1,36 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.browsing.ui.swt.widgets; - -import org.simantics.browsing.ui.swt.widgets.impl.TextModifyListenerImpl; -import org.simantics.databoard.Bindings; -import org.simantics.db.WriteGraph; -import org.simantics.db.exception.DatabaseException; -import org.simantics.db.layer0.variable.Variable; - - -public class VariableStringPropertyTextModifier extends TextModifyListenerImpl { - - final private String property; - - public VariableStringPropertyTextModifier(String property) { - this.property = property; - } - - @Override - public void applyText(WriteGraph graph, Variable variable, String text) throws DatabaseException { - - variable.setPropertyValue(graph, property, text, Bindings.STRING); - - } - +/******************************************************************************* + * Copyright (c) 2007, 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.browsing.ui.swt.widgets; + +import org.simantics.browsing.ui.swt.widgets.impl.TextModifyListenerImpl; +import org.simantics.databoard.Bindings; +import org.simantics.db.WriteGraph; +import org.simantics.db.exception.DatabaseException; +import org.simantics.db.layer0.variable.Variable; + + +public class VariableStringPropertyTextModifier extends TextModifyListenerImpl { + + final private String property; + + public VariableStringPropertyTextModifier(String property) { + this.property = property; + } + + @Override + public void applyText(WriteGraph graph, Variable variable, String text) throws DatabaseException { + + variable.setPropertyValue(graph, property, text, Bindings.STRING); + + } + } \ No newline at end of file