From 929ddb1ae3a4d68dc995808d324a3c387b4d63c9 Mon Sep 17 00:00:00 2001
From: Simon Barner <barner@fortiss.org>
Date: Tue, 7 Jun 2016 09:18:55 +0000
Subject: [PATCH] - Start & initialize services implemented in
 org.fortiss.tooling.base refs 2590

---
 .../org/fortiss/tooling/base/ToolingBase.java | 41 +++++++++++++++
 .../annotation/AnnotationValueService.java    |  6 +--
 .../base/internal/ToolingBaseInternal.java    | 52 +++++++++++++++++++
 3 files changed, 96 insertions(+), 3 deletions(-)
 create mode 100644 org.fortiss.tooling.base/trunk/src/org/fortiss/tooling/base/ToolingBase.java
 create mode 100644 org.fortiss.tooling.base/trunk/src/org/fortiss/tooling/base/internal/ToolingBaseInternal.java

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 000000000..2b9866a9e
--- /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 ac262c413..e283830b8 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 000000000..1db3b0e0f
--- /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.");
+	}
+}
-- 
GitLab