X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.db.indexing%2Fsrc%2Forg%2Fsimantics%2Fdb%2Findexing%2FIndexedRelationsInitializer.java;fp=bundles%2Forg.simantics.db.indexing%2Fsrc%2Forg%2Fsimantics%2Fdb%2Findexing%2FIndexedRelationsInitializer.java;h=a2e5cd05cf1131ae4280290bbd132b8788b8acfb;hb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;hp=257332f477987ae690d68a0f82c8a6fa22308666;hpb=24e2b34260f219f0d1644ca7a138894980e25b14;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.db.indexing/src/org/simantics/db/indexing/IndexedRelationsInitializer.java b/bundles/org.simantics.db.indexing/src/org/simantics/db/indexing/IndexedRelationsInitializer.java index 257332f47..a2e5cd05c 100644 --- a/bundles/org.simantics.db.indexing/src/org/simantics/db/indexing/IndexedRelationsInitializer.java +++ b/bundles/org.simantics.db.indexing/src/org/simantics/db/indexing/IndexedRelationsInitializer.java @@ -1,31 +1,31 @@ -/******************************************************************************* - * Copyright (c) 2007, 2010 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.db.indexing; - -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Status; -import org.simantics.db.Session; -import org.simantics.db.layer0.genericrelation.IndexedRelations; -import org.simantics.db.services.ServiceInitializer; - -public class IndexedRelationsInitializer implements ServiceInitializer { - - @Override - public IStatus initialize(Session s) { - IndexedRelations srv = s.peekService(IndexedRelations.class); - if (srv == null || srv.getClass() != IndexedRelations.class) - s.registerService(IndexedRelations.class, new IndexedRelationsImpl()); - - return Status.OK_STATUS; - } - -} +/******************************************************************************* + * Copyright (c) 2007, 2010 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.db.indexing; + +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Status; +import org.simantics.db.Session; +import org.simantics.db.layer0.genericrelation.IndexedRelations; +import org.simantics.db.services.ServiceInitializer; + +public class IndexedRelationsInitializer implements ServiceInitializer { + + @Override + public IStatus initialize(Session s) { + IndexedRelations srv = s.peekService(IndexedRelations.class); + if (srv == null || srv.getClass() != IndexedRelations.class) + s.registerService(IndexedRelations.class, new IndexedRelationsImpl()); + + return Status.OK_STATUS; + } + +}