Skip to content

Commit

Permalink
fix: removed PopupHandlerAdapter
Browse files Browse the repository at this point in the history
Signed-off-by: Andre Dietisheim <[email protected]>
  • Loading branch information
adietish committed Jul 9, 2024
1 parent 2d84e21 commit ce276ad
Showing 1 changed file with 2 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,16 @@
import com.intellij.ui.tree.AsyncTreeModel;
import com.intellij.ui.tree.StructureTreeModel;
import com.intellij.ui.treeStructure.Tree;
import com.redhat.devtools.intellij.common.compat.PopupHandlerAdapter;
import com.redhat.devtools.intellij.common.listener.TreePopupMenuListener;
import com.redhat.devtools.intellij.common.tree.MutableModelSynchronizer;
import com.redhat.devtools.intellij.common.utils.IDEAContentFactory;
import com.redhat.devtools.intellij.knative.Constants;
import com.redhat.devtools.intellij.knative.listener.KnTreeDoubleClickListener;
import com.redhat.devtools.intellij.knative.tree.AbstractKnTreeStructure;
import com.redhat.devtools.intellij.knative.tree.KnNodeComparator;
import com.redhat.devtools.intellij.knative.tree.KnTreeStructure;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.swing.Icon;

import java.lang.reflect.InvocationTargetException;

import static com.redhat.devtools.intellij.knative.Constants.FUNCTIONS_ACTION_GROUP_ID;
import static com.redhat.devtools.intellij.knative.Constants.KNATIVE_TOOLBAR_ACTION_GROUP_ID;
import javax.swing.*;

public abstract class KnBaseWindowTool<T extends AbstractKnTreeStructure> {

Expand Down Expand Up @@ -82,11 +74,7 @@ protected void createToolWindowContent(ToolWindow toolWindow, T structure, Strin
Content content = createContent(toolWindow, panel, toolbarActionGroup);

Tree tree = createTree(content, structure, true);
try {
PopupHandlerAdapter.install(tree, actionGroup, ActionPlaces.MAIN_MENU);
} catch (IllegalAccessException | InvocationTargetException e) {
LOGGER.error(e.getMessage(), e);
}
PopupHandler.installPopupMenu(tree, actionGroup, ActionPlaces.MAIN_MENU);
panel.setContent(new JBScrollPane(tree));
new KnTreeDoubleClickListener(tree);
}
Expand Down

0 comments on commit ce276ad

Please sign in to comment.