diff --git a/org.fortiss.tooling.base/trunk/src/org/fortiss/tooling/base/ToolingBase.java b/org.fortiss.tooling.base/trunk/src/org/fortiss/tooling/base/ToolingBase.java new file mode 100644 index 0000000000000000000000000000000000000000..2b9866a9e25b3fa97a343be485f707d7496f68b7 --- /dev/null +++ b/org.fortiss.tooling.base/trunk/src/org/fortiss/tooling/base/ToolingBase.java @@ -0,0 +1,41 @@ +/*--------------------------------------------------------------------------+ +$Id$ +| | +| Copyright 2016 fortiss GmbH | +| | +| Licensed under the Apache License, Version 2.0 (the "License"); | +| you may not use this file except in compliance with the License. | +| You may obtain a copy of the License at | +| | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | +| See the License for the specific language governing permissions and | +| limitations under the License. | ++--------------------------------------------------------------------------*/ +package org.fortiss.tooling.base; + +import static org.fortiss.tooling.base.internal.ToolingBaseInternal.initializeToolingBase; +import static org.fortiss.tooling.base.internal.ToolingBaseInternal.startToolingBase; + +/** + * Class for centrally initializing and starting the tooling base services. + * + * @author barner + * @author $Author$ + * @version $Rev$ + * @ConQAT.Rating RED Hash: + */ +public final class ToolingBase { + /** Initialize the kernel. */ + public static void initialize() { + initializeToolingBase(); + } + + /** Start the kernel. */ + public static void start() { + startToolingBase(); + } +} diff --git a/org.fortiss.tooling.base/trunk/src/org/fortiss/tooling/base/annotation/AnnotationValueService.java b/org.fortiss.tooling.base/trunk/src/org/fortiss/tooling/base/annotation/AnnotationValueService.java index ac262c4132a6af5bbaa3a1371df6fe3bda405076..e283830b8cebf8a2d36e28ff2fc839f202cad328 100644 --- a/org.fortiss.tooling.base/trunk/src/org/fortiss/tooling/base/annotation/AnnotationValueService.java +++ b/org.fortiss.tooling.base/trunk/src/org/fortiss/tooling/base/annotation/AnnotationValueService.java @@ -68,9 +68,9 @@ public class AnnotationValueService extends Map<IModelElement, AnnotationEntry> annotationEntryCache = new HashMap<IModelElement, AnnotationEntry>(); - /** Constructs a new {@link AnnotationValueService}. */ - public AnnotationValueService() { - super(); + /** {@inheritDoc} */ + @Override + public void startService() { KernelIntrospectionSystemService.getInstance().registerService(this); } diff --git a/org.fortiss.tooling.base/trunk/src/org/fortiss/tooling/base/internal/ToolingBaseInternal.java b/org.fortiss.tooling.base/trunk/src/org/fortiss/tooling/base/internal/ToolingBaseInternal.java new file mode 100644 index 0000000000000000000000000000000000000000..1db3b0e0f865c55349c285d9e23a862c452bbb47 --- /dev/null +++ b/org.fortiss.tooling.base/trunk/src/org/fortiss/tooling/base/internal/ToolingBaseInternal.java @@ -0,0 +1,52 @@ +/*--------------------------------------------------------------------------+ +$Id$ +| | +| Copyright 2016 fortiss GmbH | +| | +| Licensed under the Apache License, Version 2.0 (the "License"); | +| you may not use this file except in compliance with the License. | +| You may obtain a copy of the License at | +| | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | +| See the License for the specific language governing permissions and | +| limitations under the License. | ++--------------------------------------------------------------------------*/ +package org.fortiss.tooling.base.internal; + +import org.fortiss.tooling.base.annotation.AnnotationValueService; +import org.fortiss.tooling.base.annotation.IAnnotationValueService; + +/** + * Implementation of tooling base initialization and startup. + * + * @author barner + * @author $Author$ + * @version $Rev$ + * @ConQAT.Rating RED Hash: + */ +public class ToolingBaseInternal { + /** Initialize tooling base services. */ + public static void initializeToolingBase() { + System.out.println("Tooling Base initializing ..."); + + ((AnnotationValueService)IAnnotationValueService.getInstance()).initializeService(); + // TODO Initialization of ModelElementLibraryService needed? (Is not a + // ObjectAwareServiceBase) + + System.out.println("Tooling Base initialized."); + } + + /** Start tooling base services. */ + public static void startToolingBase() { + System.out.println("Tooling Base starting ..."); + + ((AnnotationValueService)IAnnotationValueService.getInstance()).startService(); + // TODO Start of ModelElementLibraryService needed? (Is not a ObjectAwareServiceBase) + + System.out.println("Tooling Base started."); + } +}