Skip to content
Draft
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion src/main/java/io/openliberty/tools/intellij/LibertyExplorer.java
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,14 @@ public Component getTreeCellRendererComponent(
return this;
}
}

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

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