Skip to content

Commit

Permalink
[OpenLiberty#222]Added hover info to entries in the Liberty Tool window
Browse files Browse the repository at this point in the history
  • Loading branch information
Rahul-Biju committed Oct 13, 2023
1 parent 586068e commit 94055d8
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -305,8 +305,11 @@ public Component getTreeCellRendererComponent(
boolean leaf,
int row,
boolean hasFocus) {
/**
* modification to get tooltiptext for liberty module tree
*/
tree.setToolTipText(getBuildPath(value));
super.getTreeCellRendererComponent(tree, value, sel, expanded, leaf, row, hasFocus);

// assign gear icon to action nodes
if (leaf) {
setIcon(LibertyPluginIcons.IntelliJGear);
Expand All @@ -326,6 +329,11 @@ public Component getTreeCellRendererComponent(
return this;
}
}

private static String getBuildPath(Object value) {
LibertyModuleNode node = (LibertyModuleNode) value;
return node.getFilePath().toString().replace("file://", "");
}

private static void executeAction(Tree tree) {
final TreePath path = tree.getSelectionPath();
Expand Down

0 comments on commit 94055d8

Please sign in to comment.