Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • af3/kernel
  • diewald/kernel
2 results
Show changes
Showing
with 294 additions and 38 deletions
/*-------------------------------------------------------------------------+
| Copyright 2019 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.ui.editor.fx.visual;
import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.mvc.IContentAnchorageMVCBundle;
import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.visual.IVisual;
import org.fortiss.tooling.base.model.element.IConnector;
import org.fortiss.tooling.base.model.layout.ILayoutedModelElement;
import org.fortiss.tooling.kernel.model.INamedElement;
/**
* {@link IVisual} for layouted and named {@link IConnector}s of some content element within a
* diagram (sticky connectors).
*
* @author diewald
*/
public class NamedLayoutedCircularAnchorageContentVisual<T extends ILayoutedModelElement & INamedElement>
extends LayoutedCircularAnchorageContentVisualBase<T> {
/** Constructor. */
public NamedLayoutedCircularAnchorageContentVisual(IContentAnchorageMVCBundle mvcb, Class<T> modelType) {
super(mvcb, modelType);
}
/** {@inheritDoc} */
@Override
protected String getHoverText() {
return getModelElement().getName();
}
}
/*-------------------------------------------------------------------------+
| Copyright 2019 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.ui.editor.fx.visual;
import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.mvc.IDiagramAnchorageMVCBundle;
import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.visual.IVisual;
import org.fortiss.tooling.base.model.element.IConnector;
import org.fortiss.tooling.base.model.layout.ILayoutedModelElement;
import org.fortiss.tooling.kernel.model.INamedElement;
/**
* {@link IVisual} for layouted and named {@link IConnector}s within a diagram (free connectors).
*
* @author diewald
*/
public class NamedLayoutedCircularAnchorageDiagramVisual<T extends ILayoutedModelElement & INamedElement>
extends LayoutedCircularAnchorageDiagramVisualBase<T> {
/** Constructor. */
public NamedLayoutedCircularAnchorageDiagramVisual(IDiagramAnchorageMVCBundle mvcb, Class<T> modelType) {
super(mvcb, modelType);
}
/** {@inheritDoc} */
@Override
protected String getHoverText() {
return getModelElement().getName();
}
}
/*-------------------------------------------------------------------------+
| Copyright 2019 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.ui.editor.fx.visual;
import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.mvc.ILinkMVCBundle;
import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.visual.IVisual;
import org.fortiss.tooling.base.model.element.IConnection;
import org.fortiss.tooling.base.model.layout.ILayoutedModelElement;
import org.fortiss.tooling.kernel.model.INamedElement;
/**
* {@link IVisual} for layouted and named links within a diagram. Typically, those are
* {@link IConnection}s.
*
* @author diewald
*/
// TODO (TM): See comment in LayoutedLineLinkVisual
public class NamedLayoutedLineLinkVisual<T extends INamedElement & ILayoutedModelElement>
extends LayoutedLineLinkVisual<T> {
/** Constructor. */
public NamedLayoutedLineLinkVisual(ILinkMVCBundle mvcb, Class<T> modelType) {
super(mvcb, modelType);
}
/** {@inheritDoc} */
@Override
protected String getLabelText(int currentSegment, int lastSegment) {
if(currentSegment == 0) {
return getModelElement().getName();
}
return null;
}
}
/*-------------------------------------------------------------------------+
| Copyright 2019 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.ui.editor.fx.visual;
import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.mvc.IContentMVCBundle;
import org.fortiss.tooling.base.model.layout.ILayoutedModelElement;
import org.fortiss.tooling.kernel.model.INamedElement;
/**
* {@link LayoutedRectangularContentVisualBase} that defines its name.
*
* @author diewald
*/
public class NamedLayoutedRectangularContentVisual<T extends INamedElement & ILayoutedModelElement>
extends LayoutedRectangularContentVisualBase<T> {
/** Constructor. */
public NamedLayoutedRectangularContentVisual(IContentMVCBundle mvcb, Class<T> modelType) {
super(mvcb, modelType);
}
/** {@inheritDoc} */
@Override
protected String getName() {
return getModelElement().getName();
}
}
CoordinateCorrections.java f78a936ba49c5fc4daf29237ecb4e86a446316d4 GREEN
LayoutedCircularContentAnchorageVisualBase.java aa546c0c9d975972a33cf22682b5d6634e56d271 GREEN
LayoutedCircularDiagramAnchorageVisualBase.java c5cc5fb41777166bc169011324585e51acda04c3 GREEN
LayoutedLineLinkVisualBase.java 429483c1222a26345fbc3bf5c9b2dbe41c6ad5f1 GREEN
LayoutedRectangularContentVisualBase.java d4cd07a8056df99927b160f2d4ce1cf4778d1dfa GREEN
AddMissingAnnotationsMigrationProvider.java a3f2b3cbcd39f85e15bc998650f899f55d9f563e GREEN
RemoveDuplicatedAnnotationsMigrationProvider.java f1bdb4733d5b9c6003a2b7fee59b89240a0a3b61 GREEN
RemoveOutdatedAnnotationInstanceMigrationProvider.java 29c29f2bb7515cad1de45a30ffc185001b47a016 GREEN
AddMissingAnnotationsMigrationProvider.java ebc5b9348b61ffb23493942949ecccf1c1fa2ae1 GREEN
RemoveDuplicatedAnnotationsMigrationProvider.java 6920909f8f211b9c5b5990644b5abcd8c4abaa3a GREEN
RemoveOutdatedAnnotationInstanceMigrationProvider.java 245530d6026f9ff29ffc577983d9de03ae5e75e5 GREEN
......@@ -15,6 +15,7 @@
+--------------------------------------------------------------------------*/
package org.fortiss.tooling.base.migration;
import static java.util.Collections.emptyMap;
import static org.fortiss.tooling.base.utils.AnnotationUtils.instantiateAnnotationsRecursive;
import java.util.ArrayList;
......@@ -49,9 +50,11 @@ public class AddMissingAnnotationsMigrationProvider implements IMigrationProvide
/** {@inheritDoc} */
@Override
public void migrate(ITopLevelElement modelElement, Map<EObject, AnyType> unknownFeatures) {
public Map<EObject, AnyType> migrate(ITopLevelElement modelElement,
Map<EObject, AnyType> unknownFeatures) {
EObject rootElement = modelElement.getRootModelElement();
instantiateAnnotationsRecursive(rootElement);
migratedProjects.add(modelElement);
return emptyMap();
}
}
......@@ -15,6 +15,7 @@
+--------------------------------------------------------------------------*/
package org.fortiss.tooling.base.migration;
import static java.util.Collections.emptyMap;
import static org.fortiss.tooling.kernel.utils.EcoreUtils.getChildrenWithType;
import static org.fortiss.tooling.kernel.utils.EcoreUtils.pickInstanceOf;
import static org.fortiss.tooling.kernel.utils.LoggingUtils.error;
......@@ -87,7 +88,8 @@ public class RemoveDuplicatedAnnotationsMigrationProvider implements IMigrationP
/** {@inheritDoc} */
@Override
public void migrate(ITopLevelElement topLevelElement, Map<EObject, AnyType> unknownFeatures) {
public Map<EObject, AnyType> migrate(ITopLevelElement topLevelElement,
Map<EObject, AnyType> unknownFeatures) {
doInternal(topLevelElement, true);
......@@ -95,5 +97,6 @@ public class RemoveDuplicatedAnnotationsMigrationProvider implements IMigrationP
error(ToolingBaseActivator.getDefault(),
"Duplicate annotations have been removed from \"" + uri.lastSegment() +
"\". Please report this incident since it indicates an internal problem.");
return emptyMap();
}
}
......@@ -15,6 +15,7 @@
+--------------------------------------------------------------------------*/
package org.fortiss.tooling.base.migration;
import static java.util.Collections.emptyMap;
import static org.eclipse.emf.ecore.util.EcoreUtil.delete;
import static org.fortiss.tooling.common.util.LambdaUtils.isAssignableFromAny;
import static org.fortiss.tooling.kernel.utils.EcoreUtils.getChildrenWithType;
......@@ -67,12 +68,14 @@ public abstract class RemoveOutdatedAnnotationInstanceMigrationProvider<T extend
/** {@inheritDoc} */
@Override
public void migrate(ITopLevelElement modelElement, Map<EObject, AnyType> unknownFeatures) {
public Map<EObject, AnyType> migrate(ITopLevelElement modelElement,
Map<EObject, AnyType> unknownFeatures) {
EObject rootModelElement = modelElement.getRootModelElement();
for(T annotation : getChildrenWithType(rootModelElement, annotationType)) {
if(!isAssignableFromAny(modelElementTypes, annotation.getSpecificationOf())) {
delete(annotation);
}
}
return emptyMap();
}
}
......@@ -3,8 +3,8 @@
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="external-src"/>
<classpathentry kind="src" path="res"/>
<classpathentry exported="true" kind="lib" path="lib/org.eclipse.systemfocus.kernel.common_0.0.5.20191213.jar"/>
<classpathentry exported="true" kind="lib" path="lib/org.eclipse.systemfocus.kernel.common.ui_0.0.5.20191213.jar"/>
<classpathentry exported="true" kind="lib" path="lib/org.eclipse.systemfocus.kernel.common_0.0.5.20191219.jar"/>
<classpathentry exported="true" kind="lib" path="lib/org.eclipse.systemfocus.kernel.common.ui_0.0.5.20191219.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
<attributes>
<attribute name="module" value="true"/>
......
......@@ -25,8 +25,8 @@ Bundle-ClassPath: .,
lib/org.conqat.ide.commons.gef.jar,
lib/org.conqat.ide.commons.ui.jar,
lib/swt-grouplayout.jar,
lib/org.eclipse.systemfocus.kernel.common_0.0.5.20191213.jar,
lib/org.eclipse.systemfocus.kernel.common.ui_0.0.5.20191213.jar
lib/org.eclipse.systemfocus.kernel.common_0.0.5.20191219.jar,
lib/org.eclipse.systemfocus.kernel.common.ui_0.0.5.20191219.jar
Export-Package: aerofx,
aquafx,
jfxtras,
......
......@@ -6,8 +6,8 @@ bin.includes = .,\
lib/org.conqat.ide.commons.ui.jar,\
lib/swt-grouplayout.jar,\
res/,\
lib/org.eclipse.systemfocus.kernel.common_0.0.5.20191213.jar,\
lib/org.eclipse.systemfocus.kernel.common.ui_0.0.5.20191213.jar
lib/org.eclipse.systemfocus.kernel.common_0.0.5.20191219.jar,\
lib/org.eclipse.systemfocus.kernel.common.ui_0.0.5.20191219.jar
jars.compile.order = .
source.. = src/,\
res/,\
......
......@@ -4,11 +4,12 @@ Bundle-Name: Tooling Kernel UI
Bundle-SymbolicName: org.fortiss.tooling.kernel.ui;singleton:=true
Bundle-Version: 2.16.0.qualifier
Bundle-Activator: org.fortiss.tooling.kernel.ui.ToolingKernelUIActivator
Require-Bundle: org.fortiss.tooling.common.ui;bundle-version="2.16.0";visibility:=reexport,
org.fortiss.tooling.kernel;bundle-version="2.16.0";visibility:=reexport,
Require-Bundle: org.fortiss.tooling.common.ui;visibility:=reexport,
org.fortiss.tooling.kernel;visibility:=reexport,
org.eclipse.core.resources;visibility:=reexport,
org.eclipse.emf.databinding;visibility:=reexport,
org.eclipse.core.databinding.property;visibility:=reexport
org.eclipse.core.databinding.property;visibility:=reexport,
com.google.guava;visibility:=reexport
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-Vendor: fortiss GmbH
......
......@@ -4,7 +4,7 @@ IContextMenuContributor.java 0f09c76662c154cf52ddab61b417e82a42854162 GREEN
IContextMenuMultiSelectionContributor.java 125b31dd38009bc2095b7e6bc860e946e39f58c4 GREEN
IEditPartFactory.java 5729715847f553d95a5bad4a9211c7e6f458badd GREEN
IModelEditor.java 962d7f7758abc88bbc6064c8b4eb32da00abf8e8 GREEN
IModelEditorBinding.java a3d5c344f61fa6f12ab944a4e933a557d6e7011b GREEN
IModelEditorBinding.java d6896569cfe7eb0d7f0b8e4a71573c50e8c75329 GREEN
IModelElementHandler.java 21b4a96251e0267f156b4b8f2b95a97f6e81e646 GREEN
ITutorialStepUI.java b8aee2b95857484ab6ad9ecd55b5de9f0ea158e5 GREEN
ITutorialUIProvider.java aa0ff5db4d7ba0953e34edeb99f3e8279567e18f GREEN
......
......@@ -16,6 +16,9 @@
package org.fortiss.tooling.kernel.ui.extension;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.controller.IControllerFactory;
import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.model.IModelFactory;
import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.visual.IVisualFactory;
import org.eclipse.ui.IEditorPart;
import org.fortiss.tooling.kernel.service.base.IEObjectAware;
import org.fortiss.tooling.kernel.ui.service.IModelEditorBindingService;
......@@ -24,12 +27,16 @@ import org.fortiss.tooling.kernel.ui.service.IModelEditorBindingService;
* Interface for editor bindings. An editor binding a defines a model element
* editor. Usually, an editor (in the Eclipse interpretation) is a view (in the
* model-based development interpretation) on the underlying model.
*
* <P>
* <p>
* This interface also specifies bindings to those MVC factories that are responsible for the
* interaction of the editor with the model, its presentation, and behavior.
* <p>
* Each editor provided by some binding becomes part of an Eclipse multi-page editor. Its page
* carries the name delivered by {@link #getLabel}. The {@link IModelEditorBindingService} sorts the
* provided editors according to their priority returned by {@link #getPriority} with higher values
* having lower priority.
* <b>NOTE:</b>: The priority reported by {@link #getPriority()} is also used to define the order in
* which the factories are traversed.
*
* @see IModelEditorBindingService
*
......@@ -40,6 +47,15 @@ public interface IModelEditorBinding<T extends EObject> extends IEObjectAware<EO
/** Returns the class of the editor registered by this binding. */
Class<? extends IEditorPart> getEditorClass(T object);
/** Returns the {@link IModelFactory} to instantiate for the {@link IEditorPart}. */
Class<? extends IModelFactory> getModelFactory();
/** Returns the {@link IVisualFactory} to instantiate for the {@link IEditorPart}. */
Class<? extends IVisualFactory> getVisualFactory();
/** Returns the {@link IControllerFactory} to instantiate for the {@link IEditorPart}. */
Class<? extends IControllerFactory> getControllerFactory();
/** Returns the label of the editor. */
String getLabel(T object);
......
......@@ -7,8 +7,8 @@ EReferencePropertySectionBase.java 0548da6778516003257f59d0b4c2b60d458be3b6 GREE
EditorBase.java 9c09fff92945256bb8680992ae7bb2c78f47b150 GREEN
FXEditorBase.java 2e520be0bbae7d0aebdff70218a124dbe0896ce2 GREEN
IListPropertySection.java 8bb00fe7959583e794ff9437b7a77404c9a9e70f GREEN
LWFXEFEditorBase.java 0b8e6af85d83d0542dcd908974e52c618bc22a08 GREEN
ModelEditorBindingBase.java 4c5ac569c0b6e7678fc8191096b26dfd09fdcb98 GREEN
LWFXEFEditorBase.java 2bd06235f20c18dc2e7d433700b2ad74a16664e2 GREEN
ModelEditorBindingBase.java c258cb0ea28d74440856cd2abf367408fbbc1279 GREEN
ModelElementHandlerBase.java 384727748f125c9d43f19d9c0eba4ba1be5a7a26 GREEN
MultiEObjectActionBase.java 9e237d8ea640c4194e4877af4a9cfce88698e543 GREEN
NamedCommentedModelElementHandlerBase.java 681b98b50b362f01abb7a36f108f4f11b9e51829 GREEN
......
......@@ -15,8 +15,11 @@
+--------------------------------------------------------------------------*/
package org.fortiss.tooling.kernel.ui.extension.base;
import static java.util.stream.Collectors.toList;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.jface.viewers.ISelection;
......@@ -32,14 +35,21 @@ import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.controller.IContro
import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.model.IModelFactory;
import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.mvc.IMVCBundle;
import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.visual.IVisualFactory;
import org.eclipse.ui.IEditorPart;
import org.fortiss.tooling.kernel.service.ICommandStackService;
import org.fortiss.tooling.kernel.ui.extension.IModelEditorBinding;
import org.fortiss.tooling.kernel.ui.extension.base.factory.DelegatingControllerFactory;
import org.fortiss.tooling.kernel.ui.extension.base.factory.DelegatingModelFactory;
import org.fortiss.tooling.kernel.ui.extension.base.factory.DelegatingVisualFactory;
import org.fortiss.tooling.kernel.ui.service.IModelEditorBindingService;
import javafx.scene.Parent;
/**
* Base implementation of model element editors which are using LWFXEF DiaViewer.
* Base class for JavaFX-based {@link IEditorPart}s that display diagrams of {@link EObject}s.
*
* @author hoelzlf
* @author hoelzl
* @author diewald
*/
public abstract class LWFXEFEditorBase<T extends EObject> extends FXEditorBase<T>
implements ISelectionProvider {
......@@ -48,30 +58,55 @@ public abstract class LWFXEFEditorBase<T extends EObject> extends FXEditorBase<T
/** The list of {@link ISelectionChangedListener}s. */
private final List<ISelectionChangedListener> selectionListeners = new ArrayList<>();
/** References the delegating {@link IModelFactory} of this JavaFX {@link IEditorPart}. */
private IModelFactory delegatingModelFactory;
/** References the delegating {@link IModelFactory} of this JavaFX {@link IEditorPart}. */
private IVisualFactory delegatingVisualFactory;
/** References the delegating {@link IModelFactory} of this JavaFX {@link IEditorPart}. */
private IControllerFactory delegatingControllerFactory;
/** {@inheritDoc} */
@Override
protected final Parent createSceneRoot() {
viewer = new DiagramViewer(createModelFactory(), createVisualFactory(),
createControllerFactory(), cb -> modelSelected(), chg -> applyModelChange(chg));
constructMVCFactories();
viewer = new DiagramViewer(delegatingModelFactory, delegatingVisualFactory,
delegatingControllerFactory, cb -> modelSelected(), chg -> applyModelChange(chg));
customizeViewer();
getSite().setSelectionProvider(this);
return viewer.getVisualNode();
}
/**
* Constructs delegating factories that wrap all factories registered by
* {@link IModelEditorBinding}s for the edited type. Delegating factories are used for extending
* editors of the same type.
*/
protected void constructMVCFactories() {
List<IModelEditorBinding<EObject>> bindings =
IModelEditorBindingService.getInstance().getBindings(editedObject);
bindings.removeIf(b -> (b.getEditorClass(editedObject) != null) &&
(!LWFXEFEditorBase.class.isAssignableFrom(b.getEditorClass(editedObject))));
List<Class<? extends IModelFactory>> modelFactories = bindings.stream()
.map(b -> b.getModelFactory()).filter(Objects::nonNull).collect(toList());
List<Class<? extends IVisualFactory>> visualFactories = bindings.stream()
.map(b -> b.getVisualFactory()).filter(Objects::nonNull).collect(toList());
List<Class<? extends IControllerFactory>> controllerFactories = bindings.stream()
.map(b -> b.getControllerFactory()).filter(Objects::nonNull).collect(toList());
delegatingModelFactory = new DelegatingModelFactory(modelFactories, editedObject);
delegatingVisualFactory = new DelegatingVisualFactory(visualFactories);
delegatingControllerFactory = new DelegatingControllerFactory(controllerFactories);
}
/** Customize the viewer after it is created. The default implementation changes nothing. */
protected void customizeViewer() {
// the default does nothing
}
/** Create the {@link IModelFactory}. */
protected abstract IModelFactory createModelFactory();
/** Create the {@link IVisualFactory}. */
protected abstract IVisualFactory createVisualFactory();
/** Create the {@link IControllerFactory}. */
protected abstract IControllerFactory createControllerFactory();
/** Called when a model element is selected in the diagram viewer. */
protected void modelSelected() {
getSite().getSelectionProvider().setSelection(createSelection());
......
......@@ -16,6 +16,9 @@
package org.fortiss.tooling.kernel.ui.extension.base;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.controller.IControllerFactory;
import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.model.IModelFactory;
import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.visual.IVisualFactory;
import org.fortiss.tooling.kernel.service.base.IEObjectAware;
import org.fortiss.tooling.kernel.ui.extension.IModelEditorBinding;
import org.fortiss.tooling.kernel.ui.service.IModelEditorBindingService;
......@@ -34,6 +37,7 @@ import org.fortiss.tooling.kernel.ui.service.IModelEditorBindingService;
* @see IModelEditorBindingService
*
* @author hoelzl
* @author diewald
*/
public abstract class ModelEditorBindingBase<T extends EObject>
implements IEObjectAware<EObject>, IModelEditorBinding<T> {
......@@ -48,6 +52,30 @@ public abstract class ModelEditorBindingBase<T extends EObject>
return getEditorClass(null);
}
/** {@inheritDoc} */
@Override
public Class<? extends IModelFactory> getModelFactory() {
throw new UnsupportedOperationException("This method shall only be called from FX" +
" editors. Ensure to define the model factory in the editor binding. Remove" +
" this method when the ediors are migrated to JavaFX.");
}
/** {@inheritDoc} */
@Override
public Class<? extends IVisualFactory> getVisualFactory() {
throw new UnsupportedOperationException("This method shall only be called from FX" +
" editors. Ensure to define the visual factory in the editor binding. Remove" +
" this method when the ediors are migrated to JavaFX.");
}
/** {@inheritDoc} */
@Override
public Class<? extends IControllerFactory> getControllerFactory() {
throw new UnsupportedOperationException("This method shall only be called from FX" +
" editors. Ensure to define the controller factory in the editor binding. Remove" +
" this method when the ediors are migrated to JavaFX.");
}
/** Returns the label of editor */
@Override
public String getLabel(T object) {
......