66import javafx .scene .Cursor ;
77import javafx .scene .Node ;
88import javafx .scene .control .ContextMenu ;
9+ import javafx .scene .control .MenuItem ;
910import javafx .scene .layout .HBox ;
1011import org .slf4j .Logger ;
1112import software .coley .recaf .analytics .logging .Logging ;
@@ -99,9 +100,9 @@ public void apply(@Nonnull LineContainer container, int paragraph) {
99100 boolean isInterface = Objects .requireNonNull (parents .getFirst ().path ().getParent ()).getValue ().hasInterfaceModifier ();
100101 Node node = SVG .ofIconFile (isInterface ? SVG .METHOD_IMPLEMENTING : SVG .METHOD_OVERRIDING );
101102 node .setCursor (Cursor .HAND );
102- box .getChildren ().add (node );
103- box .setOnMousePressed (e -> {
103+ node .setOnMousePressed (e -> {
104104 ContextMenu menu = new ContextMenu ();
105+ menu .getItems ().add (new MenuItem ("Parents:" ));
105106 menu .setAutoHide (true );
106107 for (Inheritance .Parent parent : parents ) {
107108 ClassMemberPathNode parentPath = parent .path ();
@@ -115,14 +116,15 @@ public void apply(@Nonnull LineContainer container, int paragraph) {
115116 }
116117 menu .show (box , e .getScreenX (), e .getScreenY ());
117118 });
119+ box .getChildren ().add (node );
118120 }
119121 if (!children .isEmpty ()) {
120122 boolean isInterface = Objects .requireNonNull (children .getFirst ().path ().getParent ()).getValue ().hasInterfaceModifier ();
121123 Node node = SVG .ofIconFile (isInterface ? SVG .METHOD_IMPLEMENTED : SVG .METHOD_OVERRIDDEN );
122124 node .setCursor (Cursor .HAND );
123- box .getChildren ().add (node );
124- box .setOnMousePressed (e -> {
125+ node .setOnMousePressed (e -> {
125126 ContextMenu menu = new ContextMenu ();
127+ menu .getItems ().add (new MenuItem ("Children:" ));
126128 menu .setAutoHide (true );
127129 for (Inheritance .Child child : children ) {
128130 ClassMemberPathNode childPath = child .path ();
@@ -136,6 +138,7 @@ public void apply(@Nonnull LineContainer container, int paragraph) {
136138 }
137139 menu .show (box , e .getScreenX (), e .getScreenY ());
138140 });
141+ box .getChildren ().add (node );
139142 }
140143
141144 container .addHorizontal (box );
0 commit comments