Commit b82f050e authored by Alexander Diewald's avatar Alexander Diewald
Browse files

JFX editors: Do not create platform editors twice

Issue-Ref: 3883
Issue-Url: https://af3-developer.fortiss.org/issues/3883

Signed-off-by: Alexander Diewald's avatarAlexander Diewald <diewald@fortiss.org>
parent 4719f937
PlatformArchitectureControllerFactory.java c49e4fb96ca1cbb796163cf0dcd6da97b650c13b GREEN
PlatformArchitectureFXEditorBinding.java a0d5fae2d2e375ec1c4daf9431a5068fc737f1dc GREEN
PlatformArchitectureFXEditorBinding.java ad2e055c12b537fd812f01c316ac5a0e595f0215 YELLOW
PlatformComponentControllerFactory.java b9e09906c0d5428d507d3affd879f30d9ed7d697 GREEN
PlatformComponentFXEditor.java 579bda140d6d490e40c49386957bf63af345f373 GREEN
PlatformComponentFXEditorBinding.java 549c4185a92f1edcbbd9f48c885dd240e4795ae1 YELLOW
......
......@@ -15,14 +15,11 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.platform.hierarchic.ui.editor.fx;
import static org.fortiss.tooling.kernel.utils.EcoreUtils.getInterfaceType;
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.af3.platform.model.PlatformArchitecture;
import org.fortiss.af3.platform.ui.editor.fx.PlatformArchitectureFXEditor;
import org.fortiss.tooling.kernel.ui.extension.IModelEditorBinding;
import org.fortiss.tooling.kernel.ui.extension.base.ModelEditorBindingBase;
......@@ -38,7 +35,10 @@ public class PlatformArchitectureFXEditorBinding<T extends PlatformArchitecture>
/** {@inheritDoc} */
@Override
public Class<? extends IEditorPart> getEditorClass() {
return PlatformArchitectureFXEditor.class;
// Return null when extending an existing editor: This avoids creating editors twice while
// the remaining bindings remain legit.
// NOTE: getLabelText is irrelevant in such cases.
return null;
}
/** {@inheritDoc} */
......@@ -59,12 +59,6 @@ public class PlatformArchitectureFXEditorBinding<T extends PlatformArchitecture>
return PlatformArchitectureControllerFactory.class;
}
/** {@inheritDoc} */
@Override
public String getLabel(T object) {
return getInterfaceType(object).getSimpleName() + " Structure (FX)";
}
/** {@inheritDoc} */
@Override
public int getPriority() {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment