Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
af3
AF3
Commits
ed9f3140
Commit
ed9f3140
authored
Nov 14, 2019
by
Alexander Diewald
Browse files
CR: RED
Issue-Ref: 3815 Signed-off-by:
Alexander Diewald
<
diewald@fortiss.org
>
parent
58de23f0
Changes
9
Hide whitespace changes
Inline
Side-by-side
org.fortiss.af3.component.ui/src/org/fortiss/af3/component/ui/editor/fx/.ratings
View file @
ed9f3140
ComponentStructureFXEditor.java d097c17a4ebc5bc2a87659544d3dd15f2afde254 YELLOW
ComponentStructureFXEditorBinding.java 230337d9526109ee2a9df599c370b0b3f2ec0b40 YELLOW
ControllerFactory.java
0adaa
2e7
a
b2e
3bc73bae21aec736842a5abeb9a1 YELLOW
FXComponentEditorUtils.java
6aa86b3c28b6a8a68844d251c961378d83df7710 YELLOW
ModelFactory.java
0eed7ac8d4a6b961b220f0fb7ebaa517c6712112
YELLOW
ControllerFactory.java
c123c538
2e7b2e
2e38c89655455443df08ec4de9 RED
FXComponentEditorUtils.java
acf8c3009a97543a5ed8d9dd24e80ba44d2f2e31 RED
ModelFactory.java
d97242e6b8c69ccaad9fbb6adf80ffdb40520f80
YELLOW
VisualFactory.java c3f9acf01cb627f07dca673631a4c8f632d2c4a9 YELLOW
org.fortiss.af3.component.ui/src/org/fortiss/af3/component/ui/editor/fx/ControllerFactory.java
View file @
ed9f3140
...
...
@@ -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
...
...
org.fortiss.af3.component.ui/src/org/fortiss/af3/component/ui/editor/fx/FXComponentEditorUtils.java
View file @
ed9f3140
...
...
@@ -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
,
...
...
org.fortiss.af3.component.ui/src/org/fortiss/af3/component/ui/editor/fx/ModelFactory.java
View file @
ed9f3140
...
...
@@ -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. */
...
...
org.fortiss.af3.component.ui/src/org/fortiss/af3/component/ui/editor/fx/visual/.ratings
View file @
ed9f3140
ChannelVisual.java
1
f2
e539d25326fa1bbcedf32362f5d643582dff1 YELLOW
ChannelVisual.java
8
f2
b33ad5709d3586c0302a26f2a43f742c85097 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
org.fortiss.af3.component.ui/src/org/fortiss/af3/component/ui/editor/fx/visual/ChannelVisual.java
View file @
ed9f3140
...
...
@@ -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
();
...
...
org.fortiss.af3.component.ui/src/org/fortiss/af3/component/ui/editor/fx/visual/DiagramComponentPortVisual.java
View file @
ed9f3140
...
...
@@ -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
();
...
...
org.fortiss.af3.component.ui/src/org/fortiss/af3/component/ui/editor/fx/visual/SubComponentPortVisual.java
View file @
ed9f3140
...
...
@@ -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
();
...
...
org.fortiss.af3.component.ui/src/org/fortiss/af3/component/ui/editor/fx/visual/SubComponentVisual.java
View file @
ed9f3140
...
...
@@ -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
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment