diff options
Diffstat (limited to 'subprojects/viatra-runtime-base/src/main/java/tools/refinery/viatra/runtime/base/ViatraBasePlugin.java')
-rw-r--r-- | subprojects/viatra-runtime-base/src/main/java/tools/refinery/viatra/runtime/base/ViatraBasePlugin.java | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/subprojects/viatra-runtime-base/src/main/java/tools/refinery/viatra/runtime/base/ViatraBasePlugin.java b/subprojects/viatra-runtime-base/src/main/java/tools/refinery/viatra/runtime/base/ViatraBasePlugin.java new file mode 100644 index 00000000..96b40825 --- /dev/null +++ b/subprojects/viatra-runtime-base/src/main/java/tools/refinery/viatra/runtime/base/ViatraBasePlugin.java | |||
@@ -0,0 +1,46 @@ | |||
1 | /******************************************************************************* | ||
2 | * Copyright (c) 2010-2012, Tamas Szabo, Gabor Bergmann, Istvan Rath and Daniel Varro | ||
3 | * This program and the accompanying materials are made available under the | ||
4 | * terms of the Eclipse Public License v. 2.0 which is available at | ||
5 | * http://www.eclipse.org/legal/epl-v20.html. | ||
6 | * | ||
7 | * SPDX-License-Identifier: EPL-2.0 | ||
8 | *******************************************************************************/ | ||
9 | |||
10 | package tools.refinery.viatra.runtime.base; | ||
11 | |||
12 | import org.eclipse.core.runtime.Plugin; | ||
13 | import tools.refinery.viatra.runtime.base.comprehension.WellbehavingDerivedFeatureRegistry; | ||
14 | import org.osgi.framework.BundleContext; | ||
15 | |||
16 | public class ViatraBasePlugin extends Plugin { | ||
17 | |||
18 | // The shared instance | ||
19 | private static ViatraBasePlugin plugin; | ||
20 | |||
21 | public static final String PLUGIN_ID = "tools.refinery.viatra.runtime.base"; | ||
22 | public static final String WELLBEHAVING_DERIVED_FEATURE_EXTENSION_POINT_ID = "tools.refinery.viatra.runtime.base.wellbehaving.derived.features"; | ||
23 | |||
24 | @Override | ||
25 | public void start(BundleContext context) throws Exception { | ||
26 | super.start(context); | ||
27 | plugin = this; | ||
28 | WellbehavingDerivedFeatureRegistry.initRegistry(); | ||
29 | } | ||
30 | |||
31 | @Override | ||
32 | public void stop(BundleContext context) throws Exception { | ||
33 | plugin = null; | ||
34 | super.stop(context); | ||
35 | } | ||
36 | |||
37 | /** | ||
38 | * Returns the shared instance | ||
39 | * | ||
40 | * @return the shared instance | ||
41 | */ | ||
42 | public static ViatraBasePlugin getDefault() { | ||
43 | return plugin; | ||
44 | } | ||
45 | |||
46 | } | ||