JComponent () { Editor editor = getEditor(); JPanel parent = new JPanel(); parent.add(editor.getComponent()); DataManager.registerDataProvider(parent, dataId -> { return CommonDataKeys.PROJECT.is(dataId) ? getProject() : null; }); return editor.getContentComponent(); }