void (MouseEvent e) { if (myLastPoint.isNull() || myPressPoint.isNull() || myDragTracker.isNull()) return; //"Dock" modes, // for "Undock" mode processing see com.intellij.toolWindow.InternalDecoratorImpl.ResizeOrMoveDocketToolWindowMouseListener Point newMouseLocation = e.getLocationOnScreen(); Window window = SwingUtilities.windowForComponent(c); if (!(window instanceof IdeFrame)) { myDragTracker.get().updateLocationOnDrag(window, newMouseLocation); } myLastPoint.set(newMouseLocation); Component component = getActualSplitter(); if (isToolWindowDrag(e)) return;//it's drag, not resize! if (component instanceof ThreeComponentsSplitter) { ThreeComponentsSplitter splitter = (ThreeComponentsSplitter)component; if (myIsLastComponent.get() == Boolean.TRUE) { splitter.setLastSize(myInitialHeight.get() + myPressPoint.get().y - myLastPoint.get().y); } else { splitter.setFirstSize(myInitialHeight.get() + myLastPoint.get().y - myPressPoint.get().y); } } if (component instanceof Splitter) { Splitter splitter = (Splitter)component; splitter.setProportion(Math.max(0, Math.min(1, 1f - (float)(myInitialHeight.get() + myPressPoint.get().y - myLastPoint.get().y )/ splitter.getHeight()))); } if (component instanceof ToolWindowPane) { if (ui.window.getType() == ToolWindowType.SLIDING) { ui.window.getDecorator().updateBounds(e); } else { Dimension size = ui.window.getDecorator().getSize(); if (ui.window.getAnchor().isHorizontal()) { size.height = myInitialHeight.get() - myLastPoint.get().y + myPressPoint.get().y; } ui.window.getDecorator().setSize(size); } } }