Skip to content
Snippets Groups Projects
Commit a716bb3a authored by Florian Hölzl's avatar Florian Hölzl
Browse files

singleton implementation for kernel 2.0 changed

parent 425011c3
No related branches found
No related tags found
No related merge requests found
Showing
with 106 additions and 171 deletions
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Tooling Kernel
Bundle-SymbolicName: org.fortiss.tooling.kernel
Bundle-SymbolicName: org.fortiss.tooling.kernel;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: org.fortiss.tooling.kernel.ToolingKernelActivator
Bundle-Vendor: fortiss
Require-Bundle: org.eclipse.ui;visibility:=reexport,
org.eclipse.core.runtime;visibility:=reexport,
org.unicase.emfstore;bundle-version="0.6.2";visibility:=reexport
org.unicase.emfstore;visibility:=reexport,
org.unicase.ecpemfstorebridge;visibility:=reexport,
org.unicase.ui.meeditor;visibility:=reexport
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
......@@ -2,4 +2,5 @@ source.. = src/,\
generated-src/
output.. = build/
bin.includes = META-INF/,\
.
.,\
plugin.xml
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
</plugin>
/*--------------------------------------------------------------------------+
$Id$
| |
| Copyright 2005-2010 Technische Universitaet Muenchen |
| |
| 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.kernel;
import org.fortiss.tooling.kernel.interfaces.ICommandStackService;
import org.fortiss.tooling.kernel.interfaces.ICompositorService;
import org.fortiss.tooling.kernel.interfaces.IConnectorService;
import org.fortiss.tooling.kernel.interfaces.IConstraintService;
import org.fortiss.tooling.kernel.interfaces.IContextMenuService;
import org.fortiss.tooling.kernel.interfaces.IEditorService;
import org.fortiss.tooling.kernel.interfaces.IExecutionService;
import org.fortiss.tooling.kernel.interfaces.ILibraryService;
import org.fortiss.tooling.kernel.interfaces.IMarkerService;
import org.fortiss.tooling.kernel.interfaces.IModelElementService;
import org.fortiss.tooling.kernel.interfaces.IMultiUserService;
import org.fortiss.tooling.kernel.interfaces.INavigatorService;
import org.fortiss.tooling.kernel.interfaces.IPersistencyService;
import org.fortiss.tooling.kernel.interfaces.IPropertiesService;
import org.fortiss.tooling.kernel.interfaces.IPrototypeService;
import org.fortiss.tooling.kernel.interfaces.IServiceManager;
import org.fortiss.tooling.kernel.interfaces.ITransformationService;
/**
* This class provides access to all kernel services.
*
* @author hoelzlf
* @author $Author$
* @version $Rev$
* @levd.rating RED Rev:
*/
public class ServiceManager implements IServiceManager {
/** Singleton instance. */
private static final IServiceManager singleton = new ServiceManager();
/** Returns the singleton. */
public static IServiceManager getInstance() {
return singleton;
}
/** {@inheritDoc} */
@Override
public ICommandStackService getCommandStackService() {
// TODO Auto-generated method stub
return null;
}
/** {@inheritDoc} */
@Override
public ICompositorService getCompositorService() {
// TODO Auto-generated method stub
return null;
}
/** {@inheritDoc} */
@Override
public IConnectorService getConnectorService() {
// TODO Auto-generated method stub
return null;
}
/** {@inheritDoc} */
@Override
public IConstraintService getConstraintService() {
// TODO Auto-generated method stub
return null;
}
/** {@inheritDoc} */
@Override
public IContextMenuService getContextMenuService() {
// TODO Auto-generated method stub
return null;
}
/** {@inheritDoc} */
@Override
public IEditorService getEditorService() {
// TODO Auto-generated method stub
return null;
}
/** {@inheritDoc} */
@Override
public IExecutionService getExecutionService() {
// TODO Auto-generated method stub
return null;
}
/** {@inheritDoc} */
@Override
public ILibraryService getLibraryService() {
// TODO Auto-generated method stub
return null;
}
/** {@inheritDoc} */
@Override
public IMarkerService getMarkerService() {
// TODO Auto-generated method stub
return null;
}
/** {@inheritDoc} */
@Override
public IModelElementService getModelElementService() {
// TODO Auto-generated method stub
return null;
}
/** {@inheritDoc} */
@Override
public IMultiUserService getMultiUserService() {
// TODO Auto-generated method stub
return null;
}
/** {@inheritDoc} */
@Override
public INavigatorService getNavigatorService() {
// TODO Auto-generated method stub
return null;
}
/** {@inheritDoc} */
@Override
public IPersistencyService getPersistencyService() {
// TODO Auto-generated method stub
return null;
}
/** {@inheritDoc} */
@Override
public IPropertiesService getPropertiesService() {
// TODO Auto-generated method stub
return null;
}
/** {@inheritDoc} */
@Override
public IPrototypeService getPrototypeService() {
// TODO Auto-generated method stub
return null;
}
/** {@inheritDoc} */
@Override
public ITransformationService getTransformationService() {
// TODO Auto-generated method stub
return null;
}
}
package org.fortiss.tooling.kernel;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.fortiss.tooling.kernel.internal.ServiceManager;
import org.osgi.framework.BundleContext;
/**
......@@ -24,11 +25,15 @@ public class ToolingKernelActivator extends AbstractUIPlugin {
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
ServiceManager.start();
}
/** {@inheritDoc} */
@Override
public void stop(BundleContext context) throws Exception {
ServiceManager.stop();
plugin = null;
super.stop(context);
}
......
......@@ -17,6 +17,8 @@ $Id$
+--------------------------------------------------------------------------*/
package org.fortiss.tooling.kernel.interfaces;
import org.fortiss.tooling.kernel.internal.CommandStackService;
/**
* The command stack service manages the access to the command stack and editing
* domain.
......@@ -27,5 +29,9 @@ package org.fortiss.tooling.kernel.interfaces;
* @levd.rating RED Rev:
*/
public interface ICommandStackService {
/** Returns the singleton instance of the service. */
public static final ICommandStackService INSTANCE = new CommandStackService();
// TODO (FH): define
}
......@@ -17,6 +17,8 @@ $Id$
+--------------------------------------------------------------------------*/
package org.fortiss.tooling.kernel.interfaces;
import org.fortiss.tooling.kernel.internal.CompositorService;
/**
* The compositor service provides registration and access to model element
* compositors.
......@@ -27,5 +29,9 @@ package org.fortiss.tooling.kernel.interfaces;
* @levd.rating RED Rev:
*/
public interface ICompositorService {
/** Returns the singleton instance of the service. */
public static final ICompositorService INSTANCE = new CompositorService();
// TODO (FH): define
}
......@@ -17,6 +17,8 @@ $Id$
+--------------------------------------------------------------------------*/
package org.fortiss.tooling.kernel.interfaces;
import org.fortiss.tooling.kernel.internal.ConnectorService;
/**
* The connector service provides registration and access to model element
* connectors.
......@@ -27,5 +29,9 @@ package org.fortiss.tooling.kernel.interfaces;
* @levd.rating RED Rev:
*/
public interface IConnectorService {
/** Returns the singleton instance of the service. */
public static final IConnectorService INSTANCE = new ConnectorService();
// TODO (FH): define
}
......@@ -17,6 +17,8 @@ $Id$
+--------------------------------------------------------------------------*/
package org.fortiss.tooling.kernel.interfaces;
import org.fortiss.tooling.kernel.internal.ConstraintService;
/**
* The constraint service manages registration and execution of model element
* constraints.
......@@ -27,5 +29,9 @@ package org.fortiss.tooling.kernel.interfaces;
* @levd.rating RED Rev:
*/
public interface IConstraintService {
/** Returns the singleton instance of the service. */
public static final IConstraintService INSTANCE = new ConstraintService();
// TODO (FH): define
}
......@@ -17,6 +17,8 @@ $Id$
+--------------------------------------------------------------------------*/
package org.fortiss.tooling.kernel.interfaces;
import org.fortiss.tooling.kernel.internal.ContextMenuService;
/**
* The context menu service allows registration for model element specific
* context menus.
......@@ -27,5 +29,9 @@ package org.fortiss.tooling.kernel.interfaces;
* @levd.rating RED Rev:
*/
public interface IContextMenuService {
/** Returns the singleton instance of the service. */
public static final IContextMenuService INSTANCE = new ContextMenuService();
// TODO (FH): define
}
......@@ -17,6 +17,8 @@ $Id$
+--------------------------------------------------------------------------*/
package org.fortiss.tooling.kernel.interfaces;
import org.fortiss.tooling.kernel.internal.EditorService;
/**
* The editor service handles editor registration and double-click support
*
......@@ -26,5 +28,9 @@ package org.fortiss.tooling.kernel.interfaces;
* @levd.rating RED Rev:
*/
public interface IEditorService {
/** Returns the singleton instance of the service. */
public static final IEditorService INSTANCE = new EditorService();
// TODO (FH): define
}
......@@ -17,6 +17,8 @@ $Id$
+--------------------------------------------------------------------------*/
package org.fortiss.tooling.kernel.interfaces;
import org.fortiss.tooling.kernel.internal.ExecutionService;
/**
* This service provides run configurations and target execution for specific
* model elements and execution targets.
......@@ -27,5 +29,9 @@ package org.fortiss.tooling.kernel.interfaces;
* @levd.rating RED Rev:
*/
public interface IExecutionService {
/** Returns the singleton instance of the service. */
public static final IExecutionService INSTANCE = new ExecutionService();
// TODO (FH): define
}
......@@ -17,6 +17,8 @@ $Id$
+--------------------------------------------------------------------------*/
package org.fortiss.tooling.kernel.interfaces;
import org.fortiss.tooling.kernel.internal.LibraryService;
/**
* The library service manages the display of elements in the model element
* view. It gathers elements from prototypes and the common and user specific
......@@ -28,5 +30,9 @@ package org.fortiss.tooling.kernel.interfaces;
* @levd.rating RED Rev:
*/
public interface ILibraryService {
/** Returns the singleton instance of the service. */
public static final ILibraryService INSTANCE = new LibraryService();
// TODO (FH): define
}
......@@ -17,6 +17,8 @@ $Id$
+--------------------------------------------------------------------------*/
package org.fortiss.tooling.kernel.interfaces;
import org.fortiss.tooling.kernel.internal.MarkerService;
/**
* The marker service manages model element specific markers.
*
......@@ -26,5 +28,9 @@ package org.fortiss.tooling.kernel.interfaces;
* @levd.rating RED Rev:
*/
public interface IMarkerService {
/** Returns the singleton instance of the service. */
public static final IMarkerService INSTANCE = new MarkerService();
// TODO (FH): define
}
......@@ -17,6 +17,8 @@ $Id$
+--------------------------------------------------------------------------*/
package org.fortiss.tooling.kernel.interfaces;
import org.fortiss.tooling.kernel.internal.ModelElementService;
/**
* The model context service provides information about registered model
* elements.
......@@ -27,5 +29,9 @@ package org.fortiss.tooling.kernel.interfaces;
* @levd.rating RED Rev:
*/
public interface IModelElementService {
/** Returns the singleton instance of the service. */
public static final IModelElementService INSTANCE = new ModelElementService();
// TODO (FH): define
}
......@@ -17,6 +17,8 @@ $Id$
+--------------------------------------------------------------------------*/
package org.fortiss.tooling.kernel.interfaces;
import org.fortiss.tooling.kernel.internal.MultiUserService;
/**
* This service provides support for multi-user environments. This service is
* only active for EMFStore based repsoitories.
......@@ -27,5 +29,9 @@ package org.fortiss.tooling.kernel.interfaces;
* @levd.rating RED Rev:
*/
public interface IMultiUserService {
/** Returns the singleton instance of the service. */
public static final IMultiUserService INSTANCE = new MultiUserService();
// TODO (FH): define
}
......@@ -17,6 +17,8 @@ $Id$
+--------------------------------------------------------------------------*/
package org.fortiss.tooling.kernel.interfaces;
import org.fortiss.tooling.kernel.internal.NavigatorService;
/**
* The navigator service provides model navigation support.
*
......@@ -26,5 +28,9 @@ package org.fortiss.tooling.kernel.interfaces;
* @levd.rating RED Rev:
*/
public interface INavigatorService {
/** Returns the singleton instance of the service. */
public static final INavigatorService INSTANCE = new NavigatorService();
// TODO (FH): define
}
......@@ -17,6 +17,8 @@ $Id$
+--------------------------------------------------------------------------*/
package org.fortiss.tooling.kernel.interfaces;
import org.fortiss.tooling.kernel.internal.PersistencyService;
/**
* The persistency service provides the access to the different persistency
* options, namely an EMFStore or local XML files within an Eclipse project.
......@@ -27,5 +29,9 @@ package org.fortiss.tooling.kernel.interfaces;
* @levd.rating RED Rev:
*/
public interface IPersistencyService {
/** Returns the singleton instance of the service. */
public static final IPersistencyService INSTANCE = new PersistencyService();
// TODO (FH): define
}
......@@ -17,6 +17,8 @@ $Id$
+--------------------------------------------------------------------------*/
package org.fortiss.tooling.kernel.interfaces;
import org.fortiss.tooling.kernel.internal.PropertiesService;
/**
* The properties service manages model element specific properties.
*
......@@ -26,5 +28,9 @@ package org.fortiss.tooling.kernel.interfaces;
* @levd.rating RED Rev:
*/
public interface IPropertiesService {
/** Returns the singleton instance of the service. */
public static final IPropertiesService INSTANCE = new PropertiesService();
// TODO (FH): define
}
......@@ -17,6 +17,8 @@ $Id$
+--------------------------------------------------------------------------*/
package org.fortiss.tooling.kernel.interfaces;
import org.fortiss.tooling.kernel.internal.PrototypeService;
/**
* The prototype service provides registration and access to model element
* prototypes.
......@@ -27,5 +29,9 @@ package org.fortiss.tooling.kernel.interfaces;
* @levd.rating RED Rev:
*/
public interface IPrototypeService {
/** Returns the singleton instance of the service. */
public static final IPrototypeService INSTANCE = new PrototypeService();
// TODO (FH): define
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment