From 89fbe578a3deb358de8cda4be6b96c4853d25e07 Mon Sep 17 00:00:00 2001 From: Florian Hoelzl <hoelzl@fortiss.org> Date: Tue, 15 Feb 2011 13:59:09 +0000 Subject: [PATCH] implemented model element handler service and part of navigator view --- .../trunk/META-INF/MANIFEST.MF | 4 +- .../trunk/icons/project.png | Bin 0 -> 416 bytes .../trunk/icons/unknown.png | Bin 0 -> 2907 bytes org.fortiss.tooling.kernel/trunk/plugin.xml | 10 +- .../trunk/schema/modelElementHandler.exsd | 112 ++++++++++++++++++ .../kernel/ToolingKernelActivator.java | 6 + .../kernel/base/ModelElementHandlerBase.java | 95 +++++++++++++++ .../interfaces/IModelElementHandler.java | 59 +++++++++ .../kernel/internal/CommandStackService.java | 2 +- .../kernel/internal/CompositorService.java | 2 +- .../kernel/internal/ConnectorService.java | 2 +- .../kernel/internal/ConstraintService.java | 2 +- .../kernel/internal/ContextMenuService.java | 2 +- .../kernel/internal/EditorService.java | 2 +- .../kernel/internal/ExecutionService.java | 2 +- .../kernel/internal/LibraryService.java | 2 +- .../kernel/internal/MarkerService.java | 2 +- .../kernel/internal/ModelElementService.java | 68 ++++++++++- .../kernel/internal/MultiUserService.java | 2 +- .../kernel/internal/NavigatorService.java | 2 +- .../kernel/internal/PersistencyService.java | 2 +- .../kernel/internal/PropertiesService.java | 2 +- .../kernel/internal/PrototypeService.java | 2 +- .../internal/TransformationService.java | 2 +- .../ECPProjectModelElementHandler.java | 71 +++++++++++ .../NavigatorTreeContentProvider.java | 85 +++++++++++++ .../navigator/NavigatorTreeLabelProvider.java | 63 ++++++++++ .../internal/navigator/NavigatorViewPart.java | 99 +++++++++++++++- .../ICommandStackService.java | 2 +- .../ICompositorService.java | 2 +- .../IConnectorService.java | 2 +- .../IConstraintService.java | 2 +- .../IContextMenuService.java | 2 +- .../IEditorService.java | 2 +- .../IExecutionService.java | 2 +- .../ILibraryService.java | 2 +- .../IMarkerService.java | 2 +- .../IModelElementService.java | 7 +- .../IMultiUserService.java | 2 +- .../INavigatorService.java | 5 +- .../IPersistencyService.java | 2 +- .../IPropertiesService.java | 2 +- .../IPrototypeService.java | 2 +- .../ITransformationService.java | 2 +- 44 files changed, 703 insertions(+), 39 deletions(-) create mode 100644 org.fortiss.tooling.kernel/trunk/icons/project.png create mode 100644 org.fortiss.tooling.kernel/trunk/icons/unknown.png create mode 100644 org.fortiss.tooling.kernel/trunk/schema/modelElementHandler.exsd create mode 100644 org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/base/ModelElementHandlerBase.java create mode 100644 org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/interfaces/IModelElementHandler.java create mode 100644 org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/handler/ECPProjectModelElementHandler.java create mode 100644 org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/navigator/NavigatorTreeContentProvider.java create mode 100644 org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/navigator/NavigatorTreeLabelProvider.java rename org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/{interfaces => services}/ICommandStackService.java (97%) rename org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/{interfaces => services}/ICompositorService.java (97%) rename org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/{interfaces => services}/IConnectorService.java (97%) rename org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/{interfaces => services}/IConstraintService.java (97%) rename org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/{interfaces => services}/IContextMenuService.java (97%) rename org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/{interfaces => services}/IEditorService.java (97%) rename org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/{interfaces => services}/IExecutionService.java (97%) rename org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/{interfaces => services}/ILibraryService.java (97%) rename org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/{interfaces => services}/IMarkerService.java (97%) rename org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/{interfaces => services}/IModelElementService.java (84%) rename org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/{interfaces => services}/IMultiUserService.java (97%) rename org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/{interfaces => services}/INavigatorService.java (89%) rename org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/{interfaces => services}/IPersistencyService.java (97%) rename org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/{interfaces => services}/IPropertiesService.java (97%) rename org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/{interfaces => services}/IPrototypeService.java (97%) rename org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/{interfaces => services}/ITransformationService.java (97%) diff --git a/org.fortiss.tooling.kernel/trunk/META-INF/MANIFEST.MF b/org.fortiss.tooling.kernel/trunk/META-INF/MANIFEST.MF index 882bdac3c..fd68a2c85 100644 --- a/org.fortiss.tooling.kernel/trunk/META-INF/MANIFEST.MF +++ b/org.fortiss.tooling.kernel/trunk/META-INF/MANIFEST.MF @@ -15,7 +15,9 @@ Require-Bundle: org.eclipse.ui;visibility:=reexport, Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Bundle-ActivationPolicy: lazy Export-Package: org.fortiss.tooling.kernel, + org.fortiss.tooling.kernel.base, org.fortiss.tooling.kernel.interfaces, org.fortiss.tooling.kernel.model, org.fortiss.tooling.kernel.model.impl, - org.fortiss.tooling.kernel.model.util + org.fortiss.tooling.kernel.model.util, + org.fortiss.tooling.kernel.services diff --git a/org.fortiss.tooling.kernel/trunk/icons/project.png b/org.fortiss.tooling.kernel/trunk/icons/project.png new file mode 100644 index 0000000000000000000000000000000000000000..87a02f12f5be5b4c6b7967723664178b592875c0 GIT binary patch literal 416 zcmV;R0bl-!P)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00009a7bBm000XU z000XU0RWnu7ytkPQb|NXR5*>LlRHZTK@^3*+3Y43K|umWkZ7kxN((`-NMU2GkiyzV zEcDL^BG_43h@GvClC&DIkYE)N4QpPzv%51EyNTJnh~zZGT;_cD-UB1fPtTY|#!PO& z995jpF6jRIPt6un1Cp6VeNfy3Km<)xrNU*+*1$-J2_Vx;8Us-9wsp)&Sz^~c>`w># zdl^UWaG1H(Lv9rTZeG^d-QOm^nPt@kt>zHM;QPO@bpX$ICGH>ILqIY2Bwimsw3k1E z#JFwa`l^;F=BlEXf!$8xNfosKe{5`EYG}4nknRhy;aIqC5Ka()n$X=dpzfM+K+{X% zc6<PofT0Km<oL;Onr@*bEnMkOcJ-;@SaCpGCh$EUB8Hxj0T#5R83(vt0@+a*I$FU1 zrGRAgK!%5*K}m4j0l>!k3Rf59saNQJqaL7OT#G{fAO09-2K@rCPkI=;YksEy0000< KMNUMnLSTY@ma$y` literal 0 HcmV?d00001 diff --git a/org.fortiss.tooling.kernel/trunk/icons/unknown.png b/org.fortiss.tooling.kernel/trunk/icons/unknown.png new file mode 100644 index 0000000000000000000000000000000000000000..c0566b2742c049219c71ef4477baf97a36947abf GIT binary patch literal 2907 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 FV1mp)U<&{M literal 0 HcmV?d00001 diff --git a/org.fortiss.tooling.kernel/trunk/plugin.xml b/org.fortiss.tooling.kernel/trunk/plugin.xml index 3dc449572..8d113b694 100644 --- a/org.fortiss.tooling.kernel/trunk/plugin.xml +++ b/org.fortiss.tooling.kernel/trunk/plugin.xml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <?eclipse version="3.4"?> <plugin> + <extension-point id="modelElementHandler" name="Model Element Handler" schema="schema/modelElementHandler.exsd"/> <extension point="org.eclipse.ui.views"> <view @@ -13,10 +14,17 @@ <extension point="org.eclipse.emf.ecore.generated_package"> <package - class="org.fortiss.tooling.kernel.model.KernelPackage" + class="org.fortiss.tooling.kernel.model.FortissToolingKernelPackage" genModel="model/kernel.genmodel" uri="http://www.fortiss.org/tooling/kernel"> </package> </extension> + <extension + point="org.fortiss.tooling.kernel.modelElementHandler"> + <modelElementHandler + handler="org.fortiss.tooling.kernel.internal.handler.ECPProjectModelElementHandler" + modelElementClass="org.unicase.ecp.model.workSpaceModel.ECPProject"> + </modelElementHandler> + </extension> </plugin> diff --git a/org.fortiss.tooling.kernel/trunk/schema/modelElementHandler.exsd b/org.fortiss.tooling.kernel/trunk/schema/modelElementHandler.exsd new file mode 100644 index 000000000..667ffd97e --- /dev/null +++ b/org.fortiss.tooling.kernel/trunk/schema/modelElementHandler.exsd @@ -0,0 +1,112 @@ +<?xml version='1.0' encoding='UTF-8'?> +<!-- Schema file written by PDE --> +<schema targetNamespace="org.fortiss.tooling.kernel" xmlns="http://www.w3.org/2001/XMLSchema"> +<annotation> + <appinfo> + <meta.schema plugin="org.fortiss.tooling.kernel" id="modelElementHandler" name="Model Element Handler"/> + </appinfo> + <documentation> + Extension point for model element handlers. + </documentation> + </annotation> + + <element name="extension"> + <annotation> + <appinfo> + <meta.element /> + </appinfo> + </annotation> + <complexType> + <sequence> + <element ref="modelElementHandler" minOccurs="1" maxOccurs="unbounded"/> + </sequence> + <attribute name="point" type="string" use="required"> + <annotation> + <documentation> + + </documentation> + </annotation> + </attribute> + <attribute name="id" type="string"> + <annotation> + <documentation> + + </documentation> + </annotation> + </attribute> + <attribute name="name" type="string"> + <annotation> + <documentation> + + </documentation> + <appinfo> + <meta.attribute translatable="true"/> + </appinfo> + </annotation> + </attribute> + </complexType> + </element> + + <element name="modelElementHandler"> + <complexType> + <attribute name="modelElementClass" type="string" use="required"> + <annotation> + <documentation> + + </documentation> + <appinfo> + <meta.attribute kind="java" basedOn=":org.eclipse.emf.ecore.EObject"/> + </appinfo> + </annotation> + </attribute> + <attribute name="handler" type="string" use="required"> + <annotation> + <documentation> + + </documentation> + <appinfo> + <meta.attribute kind="java" basedOn=":org.fortiss.tooling.kernel.interfaces.IModelElementHandler"/> + </appinfo> + </annotation> + </attribute> + </complexType> + </element> + + <annotation> + <appinfo> + <meta.section type="since"/> + </appinfo> + <documentation> + [Enter the first release in which this extension point appears.] + </documentation> + </annotation> + + <annotation> + <appinfo> + <meta.section type="examples"/> + </appinfo> + <documentation> + [Enter extension point usage example here.] + </documentation> + </annotation> + + <annotation> + <appinfo> + <meta.section type="apiinfo"/> + </appinfo> + <documentation> + [Enter API information here.] + </documentation> + </annotation> + + <annotation> + <appinfo> + <meta.section type="implementation"/> + </appinfo> + <documentation> + [Enter information about supplied implementation of this extension point.] + </documentation> + </annotation> + + +</schema> diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/ToolingKernelActivator.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/ToolingKernelActivator.java index 119eb71c2..3919bac20 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/ToolingKernelActivator.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/ToolingKernelActivator.java @@ -17,6 +17,7 @@ $Id$ +--------------------------------------------------------------------------*/ package org.fortiss.tooling.kernel; +import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.ui.plugin.AbstractUIPlugin; import org.fortiss.tooling.kernel.internal.ServiceManager; import org.osgi.framework.BundleContext; @@ -64,4 +65,9 @@ public class ToolingKernelActivator extends AbstractUIPlugin { public static ToolingKernelActivator getDefault() { return plugin; } + + /** Returns image descriptor of the image in the kernel plugin. */ + public static ImageDescriptor getImageDescriptor(String iconPath) { + return imageDescriptorFromPlugin(PLUGIN_ID, iconPath); + } } diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/base/ModelElementHandlerBase.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/base/ModelElementHandlerBase.java new file mode 100644 index 000000000..ee42b3b60 --- /dev/null +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/base/ModelElementHandlerBase.java @@ -0,0 +1,95 @@ +/*--------------------------------------------------------------------------+ +$Id$ +| | +| Copyright 2011 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.kernel.base; + +import java.util.Collections; +import java.util.List; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.swt.graphics.Image; +import org.fortiss.tooling.kernel.ToolingKernelActivator; +import org.fortiss.tooling.kernel.interfaces.IModelElementHandler; + +/** + * Base implementation for {@link IModelElementHandler}s. + * + * @author hoelzlf + * @author $Author$ + * @version $Rev$ + * @levd.rating RED Rev: + */ +public abstract class ModelElementHandlerBase<T extends EObject> implements + IModelElementHandler<T> { + + /** Stores the singleton of the icon image. */ + private Image iconImage; + + /** {@inheritDoc} */ + @Override + public String getDescription(T element) { + return ""; + } + + /** {@inheritDoc} */ + @Override + public final Image getIcon(T element) { + if (iconImage == null) { + ImageDescriptor descr = getImageDescriptor(); + if (descr != null) { + iconImage = descr.createImage(); + } + } + return iconImage; + } + + /** Returns image descriptor to be used as icon image. */ + protected ImageDescriptor getImageDescriptor() { + return ToolingKernelActivator.getImageDescriptor("icons/unknown.png"); + } + + /** {@inheritDoc} */ + @Override + public List<EObject> getSubnodes(T element) { + return Collections.emptyList(); + } + + /** {@inheritDoc} */ + @Override + public List<EObject> getConnectors(T element) { + return Collections.emptyList(); + } + + /** {@inheritDoc} */ + @Override + public List<EObject> getIncomingConnections(T element) { + return Collections.emptyList(); + } + + /** {@inheritDoc} */ + @Override + public List<EObject> getOutgoingConnections(T element) { + return Collections.emptyList(); + } + + /** {@inheritDoc} */ + @Override + public List<EObject> getSpecifications(T element) { + return Collections.emptyList(); + } +} diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/interfaces/IModelElementHandler.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/interfaces/IModelElementHandler.java new file mode 100644 index 000000000..b752acde1 --- /dev/null +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/interfaces/IModelElementHandler.java @@ -0,0 +1,59 @@ +/*--------------------------------------------------------------------------+ +$Id$ +| | +| Copyright 2011 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.kernel.interfaces; + +import java.util.List; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.swt.graphics.Image; + +/** + * A model element handler provides information about a specific type of model + * elements. + * + * @author hoelzlf + * @author $Author$ + * @version $Rev$ + * @levd.rating RED Rev: + */ +public interface IModelElementHandler<T extends EObject> { + + /** Returns the name of the model element (if any). */ + String getName(T element); + + /** Returns a description of the model element (if any). */ + String getDescription(T element); + + /** Returns the icon of the model element. */ + Image getIcon(T element); + + /** Returns all children acting as nodes. */ + List<EObject> getSubnodes(T element); + + /** Returns all children acting as connectors. */ + List<EObject> getConnectors(T element); + + /** Returns all connections entering this element. */ + List<EObject> getIncomingConnections(T element); + + /** Returns all connections leaving this element. */ + List<EObject> getOutgoingConnections(T element); + + /** Returns all children acting as a (visible) specification. */ + List<EObject> getSpecifications(T element); +} diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/CommandStackService.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/CommandStackService.java index 4397eec69..2b2d2b881 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/CommandStackService.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/CommandStackService.java @@ -17,7 +17,7 @@ $Id$ +--------------------------------------------------------------------------*/ package org.fortiss.tooling.kernel.internal; -import org.fortiss.tooling.kernel.interfaces.ICommandStackService; +import org.fortiss.tooling.kernel.services.ICommandStackService; /** * This class implements the {@link ICommandStackService} interface. diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/CompositorService.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/CompositorService.java index 874baa7d1..3e0cc1375 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/CompositorService.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/CompositorService.java @@ -17,7 +17,7 @@ $Id$ +--------------------------------------------------------------------------*/ package org.fortiss.tooling.kernel.internal; -import org.fortiss.tooling.kernel.interfaces.ICompositorService; +import org.fortiss.tooling.kernel.services.ICompositorService; /** * This class implements the {@link ICompositorService} interface. diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/ConnectorService.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/ConnectorService.java index c8d19c6b3..b3cc2e1d1 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/ConnectorService.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/ConnectorService.java @@ -17,7 +17,7 @@ $Id$ +--------------------------------------------------------------------------*/ package org.fortiss.tooling.kernel.internal; -import org.fortiss.tooling.kernel.interfaces.IConnectorService; +import org.fortiss.tooling.kernel.services.IConnectorService; /** * This class implements the {@link IConnectorService} interface. diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/ConstraintService.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/ConstraintService.java index 14ccc4ab2..12c11d756 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/ConstraintService.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/ConstraintService.java @@ -17,7 +17,7 @@ $Id$ +--------------------------------------------------------------------------*/ package org.fortiss.tooling.kernel.internal; -import org.fortiss.tooling.kernel.interfaces.IConstraintService; +import org.fortiss.tooling.kernel.services.IConstraintService; /** * This class implements the {@link IConstraintService} interface. diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/ContextMenuService.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/ContextMenuService.java index 10d91c5e6..d9945d0b0 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/ContextMenuService.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/ContextMenuService.java @@ -17,7 +17,7 @@ $Id$ +--------------------------------------------------------------------------*/ package org.fortiss.tooling.kernel.internal; -import org.fortiss.tooling.kernel.interfaces.IContextMenuService; +import org.fortiss.tooling.kernel.services.IContextMenuService; /** * This class implements the {@link IContextMenuService} interface. diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/EditorService.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/EditorService.java index 4cf5d1cda..ef889a25a 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/EditorService.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/EditorService.java @@ -17,7 +17,7 @@ $Id$ +--------------------------------------------------------------------------*/ package org.fortiss.tooling.kernel.internal; -import org.fortiss.tooling.kernel.interfaces.IEditorService; +import org.fortiss.tooling.kernel.services.IEditorService; /** * This class implements the {@link IEditorService} interface. diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/ExecutionService.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/ExecutionService.java index 905616250..4b51efe14 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/ExecutionService.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/ExecutionService.java @@ -17,7 +17,7 @@ $Id$ +--------------------------------------------------------------------------*/ package org.fortiss.tooling.kernel.internal; -import org.fortiss.tooling.kernel.interfaces.IExecutionService; +import org.fortiss.tooling.kernel.services.IExecutionService; /** * This class implements the {@link IExecutionService} interface. diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/LibraryService.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/LibraryService.java index 5d78a11d1..8da356cf4 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/LibraryService.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/LibraryService.java @@ -17,7 +17,7 @@ $Id$ +--------------------------------------------------------------------------*/ package org.fortiss.tooling.kernel.internal; -import org.fortiss.tooling.kernel.interfaces.ILibraryService; +import org.fortiss.tooling.kernel.services.ILibraryService; /** * This class implements the {@link ILibraryService} interface. diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/MarkerService.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/MarkerService.java index 3b4352f06..f3ee9a0de 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/MarkerService.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/MarkerService.java @@ -17,7 +17,7 @@ $Id$ +--------------------------------------------------------------------------*/ package org.fortiss.tooling.kernel.internal; -import org.fortiss.tooling.kernel.interfaces.IMarkerService; +import org.fortiss.tooling.kernel.services.IMarkerService; /** * This class implements the {@link IMarkerService} interface. diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/ModelElementService.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/ModelElementService.java index 9baf1ae6d..dc0ff60be 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/ModelElementService.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/ModelElementService.java @@ -17,7 +17,18 @@ $Id$ +--------------------------------------------------------------------------*/ package org.fortiss.tooling.kernel.internal; -import org.fortiss.tooling.kernel.interfaces.IModelElementService; +import java.util.HashMap; +import java.util.Map; + +import org.conqat.ide.commons.ui.extension.ExtensionPointUtils; +import org.conqat.ide.commons.ui.logging.LoggingUtils; +import org.conqat.lib.commons.reflect.ReflectionUtils; +import org.eclipse.core.runtime.IConfigurationElement; +import org.eclipse.emf.ecore.EObject; +import org.fortiss.tooling.kernel.ToolingKernelActivator; +import org.fortiss.tooling.kernel.interfaces.IModelElementHandler; +import org.fortiss.tooling.kernel.services.IModelElementService; +import org.osgi.framework.Bundle; /** * This class implements the {@link IModelElementService} interface. @@ -29,4 +40,59 @@ import org.fortiss.tooling.kernel.interfaces.IModelElementService; */ public class ModelElementService implements IModelElementService { + /** The model element handler extension point ID. */ + private static final String HANDLER_EXTENSION_POINT_NAME = "org.fortiss.tooling.kernel.modelElementHandler"; + + /** The model element handler configuration element name. */ + private static final String HANDLER_CONFIGURATION_ELEMENT_NAME = "modelElementHandler"; + + /** Stores the model element handler for each model element class. */ + private Map<Class<?>, IModelElementHandler<EObject>> handlerMap; + + /** Constructor. */ + public ModelElementService() { + setupHandlerMap(); + } + + /** Initializes the handler map from plugin extensions. */ + @SuppressWarnings({ "unchecked", "rawtypes" }) + private void setupHandlerMap() { + handlerMap = new HashMap<Class<?>, IModelElementHandler<EObject>>(); + for (IConfigurationElement ce : ExtensionPointUtils + .getConfigurationElements(HANDLER_EXTENSION_POINT_NAME, + HANDLER_CONFIGURATION_ELEMENT_NAME)) { + Bundle bundle = ExtensionPointUtils.getBundle(ce); + try { + Class<?> modelElementClass = ExtensionPointUtils.loadClass( + ce.getAttribute("modelElementClass"), bundle); + Class<?> handlerClass = ExtensionPointUtils.loadClass( + ce.getAttribute("handler"), bundle); + IModelElementHandler<EObject> handler = (IModelElementHandler) handlerClass + .getConstructor().newInstance(); + handlerMap.put(modelElementClass, handler); + } catch (Exception ex) { + LoggingUtils.error(ToolingKernelActivator.getDefault(), + ex.getMessage(), ex); + } + } + + } + + /** {@inheritDoc} */ + @Override + public IModelElementHandler<EObject> getModelElementHandler( + EObject modelElement) { + Class<? extends EObject> clazz = modelElement.getClass(); + IModelElementHandler<EObject> handler = handlerMap.get(clazz); + if (handler == null) { + handler = ReflectionUtils.performNearestClassLookup(clazz, + handlerMap); + if (handler == null) { + LoggingUtils.error(ToolingKernelActivator.getDefault(), + "No matching model element handler found for " + clazz, + null); + } + } + return handler; + } } diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/MultiUserService.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/MultiUserService.java index 99e3bcc03..080595155 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/MultiUserService.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/MultiUserService.java @@ -17,7 +17,7 @@ $Id$ +--------------------------------------------------------------------------*/ package org.fortiss.tooling.kernel.internal; -import org.fortiss.tooling.kernel.interfaces.IMultiUserService; +import org.fortiss.tooling.kernel.services.IMultiUserService; /** * This class implements the {@link IMultiUserService} interface. diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/NavigatorService.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/NavigatorService.java index e8f24f96b..2b36fe1d6 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/NavigatorService.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/NavigatorService.java @@ -17,7 +17,7 @@ $Id$ +--------------------------------------------------------------------------*/ package org.fortiss.tooling.kernel.internal; -import org.fortiss.tooling.kernel.interfaces.INavigatorService; +import org.fortiss.tooling.kernel.services.INavigatorService; /** * This class implements the {@link INavigatorService} interface. diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/PersistencyService.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/PersistencyService.java index 63292f612..1231b3ea9 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/PersistencyService.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/PersistencyService.java @@ -17,7 +17,7 @@ $Id$ +--------------------------------------------------------------------------*/ package org.fortiss.tooling.kernel.internal; -import org.fortiss.tooling.kernel.interfaces.IPersistencyService; +import org.fortiss.tooling.kernel.services.IPersistencyService; /** * This class implements the {@link IPersistencyService} interface. diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/PropertiesService.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/PropertiesService.java index 845d213a7..d5d8012b6 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/PropertiesService.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/PropertiesService.java @@ -17,7 +17,7 @@ $Id$ +--------------------------------------------------------------------------*/ package org.fortiss.tooling.kernel.internal; -import org.fortiss.tooling.kernel.interfaces.IPropertiesService; +import org.fortiss.tooling.kernel.services.IPropertiesService; /** * This class implements the {@link IPropertiesService} interface. diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/PrototypeService.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/PrototypeService.java index 0701ebe56..6cd03d430 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/PrototypeService.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/PrototypeService.java @@ -17,7 +17,7 @@ $Id$ +--------------------------------------------------------------------------*/ package org.fortiss.tooling.kernel.internal; -import org.fortiss.tooling.kernel.interfaces.IPrototypeService; +import org.fortiss.tooling.kernel.services.IPrototypeService; /** * This class implements the {@link IPrototypeService} interface. diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/TransformationService.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/TransformationService.java index 1e7cfce27..22cf8bad0 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/TransformationService.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/TransformationService.java @@ -17,7 +17,7 @@ $Id$ +--------------------------------------------------------------------------*/ package org.fortiss.tooling.kernel.internal; -import org.fortiss.tooling.kernel.interfaces.ITransformationService; +import org.fortiss.tooling.kernel.services.ITransformationService; /** * This class implements the {@link ITransformationService} interface. diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/handler/ECPProjectModelElementHandler.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/handler/ECPProjectModelElementHandler.java new file mode 100644 index 000000000..3c5dfa14d --- /dev/null +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/handler/ECPProjectModelElementHandler.java @@ -0,0 +1,71 @@ +/*--------------------------------------------------------------------------+ +$Id$ +| | +| Copyright 2011 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.kernel.internal.handler; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.jface.resource.ImageDescriptor; +import org.fortiss.tooling.kernel.ToolingKernelActivator; +import org.fortiss.tooling.kernel.base.ModelElementHandlerBase; +import org.fortiss.tooling.kernel.interfaces.IModelElementHandler; +import org.fortiss.tooling.kernel.model.IProjectRootElement; +import org.unicase.ecp.model.workSpaceModel.ECPProject; + +/** + * {@link IModelElementHandler} for {@link ECPProject}s. + * + * @author hoelzlf + * @author $Author$ + * @version $Rev$ + * @levd.rating RED Rev: + */ +public final class ECPProjectModelElementHandler extends + ModelElementHandlerBase<ECPProject> { + + /** {@inheritDoc} */ + @Override + public String getName(ECPProject element) { + return "Project"; + } + + /** {@inheritDoc} */ + @Override + public String getDescription(ECPProject element) { + return "EMFStore Project"; + } + + /** {@inheritDoc} */ + @Override + protected ImageDescriptor getImageDescriptor() { + return ToolingKernelActivator.getImageDescriptor("icons/project.png"); + } + + /** {@inheritDoc} */ + @Override + public List<EObject> getSubnodes(ECPProject element) { + List<EObject> projectRootElements = new ArrayList<EObject>(); + for (EObject pContent : element.eContents()) { + if (pContent instanceof IProjectRootElement) { + projectRootElements.add(pContent); + } + } + return projectRootElements; + } +} diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/navigator/NavigatorTreeContentProvider.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/navigator/NavigatorTreeContentProvider.java new file mode 100644 index 000000000..fbe50590f --- /dev/null +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/navigator/NavigatorTreeContentProvider.java @@ -0,0 +1,85 @@ +/*--------------------------------------------------------------------------+ +$Id$ +| | +| Copyright 2011 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.kernel.internal.navigator; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.jface.viewers.ITreeContentProvider; +import org.eclipse.jface.viewers.Viewer; +import org.fortiss.tooling.kernel.interfaces.IModelElementHandler; +import org.fortiss.tooling.kernel.services.IModelElementService; +import org.unicase.ecp.model.workSpaceModel.ECPWorkspace; + +/** + * Content provider for the model navigator tree viewer. + * + * @author hoelzlf + * @author $Author$ + * @version $Rev$ + * @levd.rating RED Rev: + */ +public class NavigatorTreeContentProvider implements ITreeContentProvider { + + /** {@inheritDoc} */ + @Override + public Object[] getElements(Object inputElement) { + if (inputElement instanceof ECPWorkspace) { + return ((ECPWorkspace) inputElement).getProjects().toArray(); + } + return null; + } + + /** {@inheritDoc} */ + @Override + public Object[] getChildren(Object parentElement) { + if (parentElement instanceof EObject) { + IModelElementHandler<EObject> handler = IModelElementService.INSTANCE + .getModelElementHandler((EObject) parentElement); + if (handler != null) { + return handler.getSubnodes((EObject) parentElement).toArray(); + } + } + return new Object[0]; + } + + /** {@inheritDoc} */ + @Override + public Object getParent(Object element) { + if (element instanceof EObject) { + return ((EObject) element).eContainer(); + } + return null; + } + + /** {@inheritDoc} */ + @Override + public boolean hasChildren(Object element) { + return getChildren(element).length > 0; + } + + /** {@inheritDoc} */ + @Override + public void dispose() { + // nothing to do + } + + /** {@inheritDoc} */ + @Override + public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { + // FIXME (FH): ignore? + } +} diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/navigator/NavigatorTreeLabelProvider.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/navigator/NavigatorTreeLabelProvider.java new file mode 100644 index 000000000..04ddff01a --- /dev/null +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/navigator/NavigatorTreeLabelProvider.java @@ -0,0 +1,63 @@ +/*--------------------------------------------------------------------------+ +$Id$ +| | +| Copyright 2011 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.kernel.internal.navigator; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.jface.viewers.BaseLabelProvider; +import org.eclipse.jface.viewers.ILabelProvider; +import org.eclipse.swt.graphics.Image; +import org.fortiss.tooling.kernel.interfaces.IModelElementHandler; +import org.fortiss.tooling.kernel.services.IModelElementService; + +/** + * {@link ILabelProvider} for the model navigator tree. + * + * @author hoelzlf + * @author $Author$ + * @version $Rev$ + * @levd.rating RED Rev: + */ +public final class NavigatorTreeLabelProvider extends BaseLabelProvider + implements ILabelProvider { + + /** {@inheritDoc} */ + @Override + public Image getImage(Object element) { + if (element instanceof EObject) { + IModelElementHandler<EObject> handler = IModelElementService.INSTANCE + .getModelElementHandler((EObject) element); + if (handler != null) { + return handler.getIcon((EObject) element); + } + } + return null; + } + + /** {@inheritDoc} */ + @Override + public String getText(Object element) { + if (element instanceof EObject) { + IModelElementHandler<EObject> handler = IModelElementService.INSTANCE + .getModelElementHandler((EObject) element); + if (handler != null) { + return handler.getName((EObject) element); + } + } + return ""; + } +} diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/navigator/NavigatorViewPart.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/navigator/NavigatorViewPart.java index da858a391..8eb9ee1c0 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/navigator/NavigatorViewPart.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/navigator/NavigatorViewPart.java @@ -18,16 +18,27 @@ $Id$ package org.fortiss.tooling.kernel.internal.navigator; import org.conqat.ide.commons.ui.logging.LoggingUtils; +import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Status; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.impl.AdapterImpl; +import org.eclipse.emf.ecore.EObject; import org.eclipse.jface.viewers.TreeViewer; +import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.part.ViewPart; +import org.eclipse.ui.progress.UIJob; import org.fortiss.tooling.kernel.ToolingKernelActivator; import org.unicase.ecp.model.ECPWorkspaceManager; import org.unicase.ecp.model.NoWorkspaceException; +import org.unicase.ecp.model.workSpaceModel.ECPProject; +import org.unicase.ecp.model.workSpaceModel.ECPProjectListener; import org.unicase.ecp.model.workSpaceModel.ECPWorkspace; +import org.unicase.ecp.model.workSpaceModel.WorkSpaceModelPackage; /** + * {@link ViewPart} of the model navigator provided by the tooling kernel. * * @author hoelzlf * @author $Author$ @@ -42,6 +53,12 @@ public final class NavigatorViewPart extends ViewPart { /** Stores the EmfStore workspace. */ private ECPWorkspace workspace; + /** Stores the workspace listener. */ + private AdapterImpl workspaceListener; + + /** Stores the project listener. */ + private ECPProjectListener projectListener; + /** Constructor. */ public NavigatorViewPart() { try { @@ -51,20 +68,94 @@ public final class NavigatorViewPart extends ViewPart { e.getMessage(), IStatus.ERROR, e); return; } + + createProjectListener(); + for (ECPProject project : workspace.getProjects()) { + project.addECPProjectListener(projectListener); + } + + createWorkspaceListener(); + workspace.eAdapters().add(workspaceListener); + } + + /** + * Creates the workspace listener, which registers the project listener on + * added projects. It also unregisters the project listener from removed + * projects. + */ + private void createWorkspaceListener() { + workspaceListener = new AdapterImpl() { + + @Override + public void notifyChanged(Notification msg) { + if ((msg.getFeatureID(ECPWorkspace.class)) == WorkSpaceModelPackage.ECP_WORKSPACE__PROJECTS) { + if (msg.getEventType() == Notification.ADD + && WorkSpaceModelPackage.eINSTANCE.getECPProject() + .isInstance(msg.getNewValue())) { + ECPProject projectSpace = (ECPProject) msg + .getNewValue(); + projectSpace.addECPProjectListener(projectListener); + } else if (msg.getEventType() == Notification.REMOVE + && WorkSpaceModelPackage.eINSTANCE.getECPProject() + .isInstance(msg.getOldValue())) { + ECPProject projectSpace = (ECPProject) msg + .getOldValue(); + projectSpace.removeECPProjectListener(projectListener); + } + } + super.notifyChanged(msg); + } + }; + } + + /** + * Creates the project listener, which refreshes the viewer upon any + * changes. + */ + private void createProjectListener() { + projectListener = new ECPProjectListener() { + @Override + public void projectDeleted() { + // ignore + } + + @Override + public void projectChanged() { + new UIJob("Update Model Navigator") { + + @Override + public IStatus runInUIThread(IProgressMonitor monitor) { + viewer.refresh(); + return Status.OK_STATUS; + } + }.schedule(); + } + + @Override + public void modelelementDeleted(EObject eobject) { + // ignore + } + }; } /** {@inheritDoc} */ @Override public void createPartControl(Composite parent) { - // TODO Auto-generated method stub + viewer = new TreeViewer(parent, SWT.MULTI); + + if (workspace != null) { + // TODO (FH): DecoratorManager + viewer.setLabelProvider(new NavigatorTreeLabelProvider()); + viewer.setContentProvider(new NavigatorTreeContentProvider()); + viewer.setInput(workspace); + } + // TODO (FH): SelectionProvider } /** {@inheritDoc} */ @Override public void setFocus() { - // TODO Auto-generated method stub - + viewer.getControl().setFocus(); } - } diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/interfaces/ICommandStackService.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/services/ICommandStackService.java similarity index 97% rename from org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/interfaces/ICommandStackService.java rename to org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/services/ICommandStackService.java index 83db7e8bc..6f1451f61 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/interfaces/ICommandStackService.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/services/ICommandStackService.java @@ -15,7 +15,7 @@ $Id$ | See the License for the specific language governing permissions and | | limitations under the License. | +--------------------------------------------------------------------------*/ -package org.fortiss.tooling.kernel.interfaces; +package org.fortiss.tooling.kernel.services; import org.fortiss.tooling.kernel.internal.CommandStackService; diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/interfaces/ICompositorService.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/services/ICompositorService.java similarity index 97% rename from org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/interfaces/ICompositorService.java rename to org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/services/ICompositorService.java index 08f2ccbc7..8048dfb7a 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/interfaces/ICompositorService.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/services/ICompositorService.java @@ -15,7 +15,7 @@ $Id$ | See the License for the specific language governing permissions and | | limitations under the License. | +--------------------------------------------------------------------------*/ -package org.fortiss.tooling.kernel.interfaces; +package org.fortiss.tooling.kernel.services; import org.fortiss.tooling.kernel.internal.CompositorService; diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/interfaces/IConnectorService.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/services/IConnectorService.java similarity index 97% rename from org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/interfaces/IConnectorService.java rename to org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/services/IConnectorService.java index 39d1b8fb2..8a46e814b 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/interfaces/IConnectorService.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/services/IConnectorService.java @@ -15,7 +15,7 @@ $Id$ | See the License for the specific language governing permissions and | | limitations under the License. | +--------------------------------------------------------------------------*/ -package org.fortiss.tooling.kernel.interfaces; +package org.fortiss.tooling.kernel.services; import org.fortiss.tooling.kernel.internal.ConnectorService; diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/interfaces/IConstraintService.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/services/IConstraintService.java similarity index 97% rename from org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/interfaces/IConstraintService.java rename to org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/services/IConstraintService.java index 33ca2f17f..e42e4ce88 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/interfaces/IConstraintService.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/services/IConstraintService.java @@ -15,7 +15,7 @@ $Id$ | See the License for the specific language governing permissions and | | limitations under the License. | +--------------------------------------------------------------------------*/ -package org.fortiss.tooling.kernel.interfaces; +package org.fortiss.tooling.kernel.services; import org.fortiss.tooling.kernel.internal.ConstraintService; diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/interfaces/IContextMenuService.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/services/IContextMenuService.java similarity index 97% rename from org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/interfaces/IContextMenuService.java rename to org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/services/IContextMenuService.java index 09d7edd51..e5a94923e 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/interfaces/IContextMenuService.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/services/IContextMenuService.java @@ -15,7 +15,7 @@ $Id$ | See the License for the specific language governing permissions and | | limitations under the License. | +--------------------------------------------------------------------------*/ -package org.fortiss.tooling.kernel.interfaces; +package org.fortiss.tooling.kernel.services; import org.fortiss.tooling.kernel.internal.ContextMenuService; diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/interfaces/IEditorService.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/services/IEditorService.java similarity index 97% rename from org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/interfaces/IEditorService.java rename to org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/services/IEditorService.java index a378a0953..84097c756 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/interfaces/IEditorService.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/services/IEditorService.java @@ -15,7 +15,7 @@ $Id$ | See the License for the specific language governing permissions and | | limitations under the License. | +--------------------------------------------------------------------------*/ -package org.fortiss.tooling.kernel.interfaces; +package org.fortiss.tooling.kernel.services; import org.fortiss.tooling.kernel.internal.EditorService; diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/interfaces/IExecutionService.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/services/IExecutionService.java similarity index 97% rename from org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/interfaces/IExecutionService.java rename to org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/services/IExecutionService.java index 1af907c54..31b2772f6 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/interfaces/IExecutionService.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/services/IExecutionService.java @@ -15,7 +15,7 @@ $Id$ | See the License for the specific language governing permissions and | | limitations under the License. | +--------------------------------------------------------------------------*/ -package org.fortiss.tooling.kernel.interfaces; +package org.fortiss.tooling.kernel.services; import org.fortiss.tooling.kernel.internal.ExecutionService; diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/interfaces/ILibraryService.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/services/ILibraryService.java similarity index 97% rename from org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/interfaces/ILibraryService.java rename to org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/services/ILibraryService.java index 53eda3d23..bfcaa7010 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/interfaces/ILibraryService.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/services/ILibraryService.java @@ -15,7 +15,7 @@ $Id$ | See the License for the specific language governing permissions and | | limitations under the License. | +--------------------------------------------------------------------------*/ -package org.fortiss.tooling.kernel.interfaces; +package org.fortiss.tooling.kernel.services; import org.fortiss.tooling.kernel.internal.LibraryService; diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/interfaces/IMarkerService.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/services/IMarkerService.java similarity index 97% rename from org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/interfaces/IMarkerService.java rename to org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/services/IMarkerService.java index 6ec27d520..17ac86630 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/interfaces/IMarkerService.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/services/IMarkerService.java @@ -15,7 +15,7 @@ $Id$ | See the License for the specific language governing permissions and | | limitations under the License. | +--------------------------------------------------------------------------*/ -package org.fortiss.tooling.kernel.interfaces; +package org.fortiss.tooling.kernel.services; import org.fortiss.tooling.kernel.internal.MarkerService; diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/interfaces/IModelElementService.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/services/IModelElementService.java similarity index 84% rename from org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/interfaces/IModelElementService.java rename to org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/services/IModelElementService.java index 3f3b04c42..5af9ac0d5 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/interfaces/IModelElementService.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/services/IModelElementService.java @@ -15,8 +15,10 @@ $Id$ | See the License for the specific language governing permissions and | | limitations under the License. | +--------------------------------------------------------------------------*/ -package org.fortiss.tooling.kernel.interfaces; +package org.fortiss.tooling.kernel.services; +import org.eclipse.emf.ecore.EObject; +import org.fortiss.tooling.kernel.interfaces.IModelElementHandler; import org.fortiss.tooling.kernel.internal.ModelElementService; /** @@ -33,5 +35,6 @@ public interface IModelElementService { /** Returns the singleton instance of the service. */ public static final IModelElementService INSTANCE = new ModelElementService(); - // TODO (FH): define + /** Returns the model element handler for the given model element. */ + IModelElementHandler<EObject> getModelElementHandler(EObject modelElement); } diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/interfaces/IMultiUserService.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/services/IMultiUserService.java similarity index 97% rename from org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/interfaces/IMultiUserService.java rename to org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/services/IMultiUserService.java index c90a2befe..d96acac02 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/interfaces/IMultiUserService.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/services/IMultiUserService.java @@ -15,7 +15,7 @@ $Id$ | See the License for the specific language governing permissions and | | limitations under the License. | +--------------------------------------------------------------------------*/ -package org.fortiss.tooling.kernel.interfaces; +package org.fortiss.tooling.kernel.services; import org.fortiss.tooling.kernel.internal.MultiUserService; diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/interfaces/INavigatorService.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/services/INavigatorService.java similarity index 89% rename from org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/interfaces/INavigatorService.java rename to org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/services/INavigatorService.java index 2eb49f521..abc85cd04 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/interfaces/INavigatorService.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/services/INavigatorService.java @@ -15,7 +15,7 @@ $Id$ | See the License for the specific language governing permissions and | | limitations under the License. | +--------------------------------------------------------------------------*/ -package org.fortiss.tooling.kernel.interfaces; +package org.fortiss.tooling.kernel.services; import org.fortiss.tooling.kernel.internal.NavigatorService; @@ -32,5 +32,8 @@ public interface INavigatorService { /** Returns the singleton instance of the service. */ public static final INavigatorService INSTANCE = new NavigatorService(); + /** Returns view id of the navigator view. */ + public static final String NAVIGATOR_VIEW = "org.fortiss.tooling.kernel.model.navigator"; + // TODO (FH): define } diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/interfaces/IPersistencyService.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/services/IPersistencyService.java similarity index 97% rename from org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/interfaces/IPersistencyService.java rename to org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/services/IPersistencyService.java index d86a569b1..6f90f1efc 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/interfaces/IPersistencyService.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/services/IPersistencyService.java @@ -15,7 +15,7 @@ $Id$ | See the License for the specific language governing permissions and | | limitations under the License. | +--------------------------------------------------------------------------*/ -package org.fortiss.tooling.kernel.interfaces; +package org.fortiss.tooling.kernel.services; import org.fortiss.tooling.kernel.internal.PersistencyService; diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/interfaces/IPropertiesService.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/services/IPropertiesService.java similarity index 97% rename from org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/interfaces/IPropertiesService.java rename to org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/services/IPropertiesService.java index e793c34a5..d5fdebf85 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/interfaces/IPropertiesService.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/services/IPropertiesService.java @@ -15,7 +15,7 @@ $Id$ | See the License for the specific language governing permissions and | | limitations under the License. | +--------------------------------------------------------------------------*/ -package org.fortiss.tooling.kernel.interfaces; +package org.fortiss.tooling.kernel.services; import org.fortiss.tooling.kernel.internal.PropertiesService; diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/interfaces/IPrototypeService.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/services/IPrototypeService.java similarity index 97% rename from org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/interfaces/IPrototypeService.java rename to org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/services/IPrototypeService.java index a28b8a6c3..005450ca5 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/interfaces/IPrototypeService.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/services/IPrototypeService.java @@ -15,7 +15,7 @@ $Id$ | See the License for the specific language governing permissions and | | limitations under the License. | +--------------------------------------------------------------------------*/ -package org.fortiss.tooling.kernel.interfaces; +package org.fortiss.tooling.kernel.services; import org.fortiss.tooling.kernel.internal.PrototypeService; diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/interfaces/ITransformationService.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/services/ITransformationService.java similarity index 97% rename from org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/interfaces/ITransformationService.java rename to org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/services/ITransformationService.java index 9d4bae75e..fd7cd862c 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/interfaces/ITransformationService.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/services/ITransformationService.java @@ -15,7 +15,7 @@ $Id$ | See the License for the specific language governing permissions and | | limitations under the License. | +--------------------------------------------------------------------------*/ -package org.fortiss.tooling.kernel.interfaces; +package org.fortiss.tooling.kernel.services; import org.fortiss.tooling.kernel.internal.TransformationService; -- GitLab