boolean (DnDEvent event) { Object o = event.getAttachedObject(); boolean dropPossible = o instanceof ServiceViewDragBean && event.getPointOn(decorator).y < decorator.getHeaderHeight(); event.setDropPossible(dropPossible, ""); if (dropPossible) { if (contentManager.getIndexOfContent(dropTargetContent) < 0) { contentManager.addContent(dropTargetContent); } ServiceViewDragBean dragBean = (ServiceViewDragBean)o; ItemPresentation presentation; if (dragBean.getItems().size() > 1 && dragBean.getContributor() != null) { presentation = dragBean.getContributor().getViewDescriptor(project).getPresentation(); } else { ServiceViewItem item = dragBean.getItems().get(0); presentation = item.getViewDescriptor().getPresentation(); dropTargetContent.setTabColor(item.getColor()); } dropTargetContent.setDisplayName(getDisplayName(presentation)); dropTargetContent.setIcon(presentation.getIcon(false)); } else if (contentManager.getIndexOfContent(dropTargetContent) >= 0) { contentManager.removeContent(dropTargetContent, false); } return true; }