X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.modeling.template2d.ui%2Fsrc%2Forg%2Fsimantics%2Fmodeling%2Ftemplate2d%2Fui%2Factions%2FNewFlagTableRowNumberColumn.java;fp=bundles%2Forg.simantics.modeling.template2d.ui%2Fsrc%2Forg%2Fsimantics%2Fmodeling%2Ftemplate2d%2Fui%2Factions%2FNewFlagTableRowNumberColumn.java;h=4e3d9d05e08f27876532950458e2952eab74d11e;hb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;hp=30e34f2d04515494d3992a685a9e0ee5198eedfc;hpb=24e2b34260f219f0d1644ca7a138894980e25b14;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.modeling.template2d.ui/src/org/simantics/modeling/template2d/ui/actions/NewFlagTableRowNumberColumn.java b/bundles/org.simantics.modeling.template2d.ui/src/org/simantics/modeling/template2d/ui/actions/NewFlagTableRowNumberColumn.java index 30e34f2d0..4e3d9d05e 100644 --- a/bundles/org.simantics.modeling.template2d.ui/src/org/simantics/modeling/template2d/ui/actions/NewFlagTableRowNumberColumn.java +++ b/bundles/org.simantics.modeling.template2d.ui/src/org/simantics/modeling/template2d/ui/actions/NewFlagTableRowNumberColumn.java @@ -1,37 +1,37 @@ -/******************************************************************************* - * 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.modeling.template2d.ui.actions; - -import org.simantics.databoard.Bindings; -import org.simantics.db.Resource; -import org.simantics.db.WriteGraph; -import org.simantics.db.common.utils.NameUtils; -import org.simantics.db.exception.DatabaseException; -import org.simantics.layer0.Layer0; -import org.simantics.modeling.template2d.ontology.Template2dResource; - -/** - * @author Teemu Matasniemi - */ -public class NewFlagTableRowNumberColumn extends NewFlagTableColumn { - - @Override - protected void claimColumn(WriteGraph g, Resource column, Resource parent) throws DatabaseException { - Layer0 L0 = Layer0.getInstance(g); - Template2dResource TEMPLATE2D = Template2dResource.getInstance(g); - - g.claim(column, L0.InstanceOf, null, TEMPLATE2D.FlagTable_RowNumberColumn); - String name = NameUtils.findFreshName(g, "RowNumberColumn", parent, L0.ConsistsOf); - g.addLiteral(column, L0.HasName, L0.NameOf, L0.String, name, Bindings.STRING); - } - -} +/******************************************************************************* + * 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.modeling.template2d.ui.actions; + +import org.simantics.databoard.Bindings; +import org.simantics.db.Resource; +import org.simantics.db.WriteGraph; +import org.simantics.db.common.utils.NameUtils; +import org.simantics.db.exception.DatabaseException; +import org.simantics.layer0.Layer0; +import org.simantics.modeling.template2d.ontology.Template2dResource; + +/** + * @author Teemu Matasniemi + */ +public class NewFlagTableRowNumberColumn extends NewFlagTableColumn { + + @Override + protected void claimColumn(WriteGraph g, Resource column, Resource parent) throws DatabaseException { + Layer0 L0 = Layer0.getInstance(g); + Template2dResource TEMPLATE2D = Template2dResource.getInstance(g); + + g.claim(column, L0.InstanceOf, null, TEMPLATE2D.FlagTable_RowNumberColumn); + String name = NameUtils.findFreshName(g, "RowNumberColumn", parent, L0.ConsistsOf); + g.addLiteral(column, L0.HasName, L0.NameOf, L0.String, name, Bindings.STRING); + } + +}