void (MouseEvent event) { boolean isLeftMouseButton = SwingUtilities.isLeftMouseButton(event); boolean isControlDown = event.isControlDown(); if (!isControlDown && isLeftMouseButton) { ListPluginComponent component = findParent(event); int index = getIndex(component); if (event.isShiftDown()) { int end = mySelectionIndex + mySelectionLength + (mySelectionLength > 0 ? -1 : 1); if (index != end) { moveOrResizeSelection(index < end, false, Math.abs(end - index)); } } else if (event.isMetaDown()) { myMixSelection = true; myAllSelected = false; mySelectionIndex = index; mySelectionLength = 1; component.setSelection(component.getSelection() == SelectionType.SELECTION ? SelectionType.NONE : SelectionType.SELECTION, true); fireSelectionEvent(); } else { clearSelectionWithout(index); singleSelection(component, index); } } else if (SwingUtilities.isRightMouseButton(event) || isControlDown && isLeftMouseButton) { ListPluginComponent component = findParent(event); if (myAllSelected || myMixSelection) { int size = getSelection().size(); if (size == 0) { singleSelection(component, getIndex(component)); } else if (size == 1) { ensureMoveSingleSelection(component); } } else if (mySelectionLength == 0 || mySelectionLength == 1) { ensureMoveSingleSelection(component); } DefaultActionGroup group = new DefaultActionGroup(); component.createPopupMenu(group, getSelection()); if (group.getChildrenCount() == 0) { return; } PluginsViewCustomizerKt.getListPluginComponentCustomizer().processCreatePopupMenu(component, group, getSelection()); ActionPopupMenu popupMenu = ActionManager.getInstance().createActionPopupMenu("PluginManagerConfigurable", group); popupMenu.setTargetComponent(component); popupMenu.getComponent().show(event.getComponent(), event.getX(), event.getY()); event.consume(); } }