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

CR: RED



Issue-Ref: 3815
Signed-off-by: Alexander Diewald's avatarAlexander Diewald <diewald@fortiss.org>
parent 58de23f0
ComponentStructureFXEditor.java d097c17a4ebc5bc2a87659544d3dd15f2afde254 YELLOW
ComponentStructureFXEditorBinding.java 230337d9526109ee2a9df599c370b0b3f2ec0b40 YELLOW
ControllerFactory.java 0adaa2e7ab2e3bc73bae21aec736842a5abeb9a1 YELLOW
FXComponentEditorUtils.java 6aa86b3c28b6a8a68844d251c961378d83df7710 YELLOW
ModelFactory.java 0eed7ac8d4a6b961b220f0fb7ebaa517c6712112 YELLOW
ControllerFactory.java c123c5382e7b2e2e38c89655455443df08ec4de9 RED
FXComponentEditorUtils.java acf8c3009a97543a5ed8d9dd24e80ba44d2f2e31 RED
ModelFactory.java d97242e6b8c69ccaad9fbb6adf80ffdb40520f80 YELLOW
VisualFactory.java c3f9acf01cb627f07dca673631a4c8f632d2c4a9 YELLOW
......@@ -33,6 +33,8 @@ import org.fortiss.af3.component.ui.editor.fx.controller.SubComponentPortControl
*
* @author hoelzl
*/
// TODO(AD): Just as a general suggestion: Isn't the name IController a bit too broad? Would
// IDiagramController be a better match?
final class ControllerFactory implements IControllerFactory {
/** {@inheritDoc} */
@Override
......
......@@ -26,6 +26,9 @@ import javafx.geometry.Side;
*
* @author hoelzl
*/
// TODO(AD): Please move to the utils package.
// TODO(AD): Are the following methods only applicable to components? I guess it more specific to
// rectangles and should go to the kernel.
public final class FXComponentEditorUtils {
/** Computes the location of the link w.r.t. the given anchor bounds and target position. */
public static DiagramCoordinate computeLinkToAnchorLocation(Rectangle2D anchorBounds,
......
......@@ -17,9 +17,9 @@ package org.fortiss.af3.component.ui.editor.fx;
import static java.util.Collections.emptyList;
import static java.util.Objects.requireNonNull;
import static org.fortiss.tooling.common.util.LambdaUtils.filterList;
import java.util.List;
import java.util.stream.Collectors;
import org.eclipse.systemfocus.kernel.common.ui.javafx.lwfxef.model.IModelFactory;
import org.fortiss.af3.component.model.Channel;
......@@ -70,8 +70,8 @@ final class ModelFactory implements IModelFactory {
/** {@inheritDoc} */
@Override
public List<?> getLinkModels() {
return rootElement.getConnections().stream()
.filter(c -> filterPartiallyInitializedConnections(c)).collect(Collectors.toList());
return filterList(rootElement.getConnections(),
c -> filterPartiallyInitializedConnections(c));
}
/** Checks whether the given connection is only partially initialized. */
......
ChannelVisual.java 1f2e539d25326fa1bbcedf32362f5d643582dff1 YELLOW
ChannelVisual.java 8f2b33ad5709d3586c0302a26f2a43f742c85097 RED
CoordinateCorrections.java c676ffd7f26e4f29f6e3bbcbde7c26d4e4c21c4d YELLOW
DiagramComponentPortVisual.java 027a24874dbcf67559986a87620aefc21e8efc12 YELLOW
SubComponentPortVisual.java 6fa2c8b45f00ede720222d0de81e6d41d4264ac3 YELLOW
SubComponentVisual.java 026ef7e0dfd2a686728eaa71da5414805bda8995 YELLOW
DiagramComponentPortVisual.java c93f811243549c17e902e01647783aa2d3dfd228 RED
SubComponentPortVisual.java b28957d5d657a6d07b8c47ca1a62ae5071d594e9 RED
SubComponentVisual.java 44ce6c1279689c5d0f4b12def0d18d39502c4171 RED
......@@ -48,6 +48,8 @@ public final class ChannelVisual extends LineLinkVisualBase {
}
/** Returns the model element. */
// TODO(AD): (See comment in kernel): This wrapper could be eliminated by a parameterized
// IContentMVCBundle
public Channel getChannel() {
// wild cast works: see constructor
return (Channel)super.getModel();
......
......@@ -50,6 +50,8 @@ public final class DiagramComponentPortVisual extends CircularDiagramAnchorageVi
}
/** Returns the port model element. */
// TODO(AD): (See comment in kernel): This wrapper could be eliminated by a parameterized
// IContentMVCBundle
private Port getPort() {
// wild cast works: see constructor.
return (Port)super.getModel();
......
......@@ -58,6 +58,8 @@ public final class SubComponentPortVisual extends CircularContentAnchorageVisual
}
/** Returns the port model element. */
// TODO(AD): (See comment in kernel): This wrapper could be eliminated by a parameterized
// IContentMVCBundle
private Port getPort() {
// wild cast works: see constructor.
return (Port)super.getModel();
......
......@@ -75,6 +75,8 @@ public final class SubComponentVisual extends RectangularContentVisualBase {
}
/** Returns the component model element. */
// TODO(AD): (See comment in kernel): This wrapper could be eliminated by a parameterized
// IContentMVCBundle
private Component getComponent() {
// wild cast works: see constructor
return (Component)getModel();
......@@ -94,6 +96,8 @@ public final class SubComponentVisual extends RectangularContentVisualBase {
/** {@inheritDoc} */
@Override
// TODO(AD): Candidate for generalization: Replace getComponent() with generified getModel() and
// put to the base class.
public Rectangle2D getModelBounds() {
Rectangle r = getNodeBounds(getComponent());
double ix = COMPONENT_INSETS.getWidth();
......@@ -105,6 +109,7 @@ public final class SubComponentVisual extends RectangularContentVisualBase {
/** {@inheritDoc} */
@Override
// TODO(AD): Same as above.
public DiagramCoordinate getAnchorageLocation(IContentAnchorageVisual visual) {
Rectangle2D pb = getCurrentBounds();
Side side = visual.getLayout(ISideLayout.class).getSide();
......
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