if((jcpPanel.get2DHub().getRGroupHandler()==null)) {
JOptionPane.showMessageDialog(jcpPanel, GT.get("Please define an R-group (root and substituent) first."));
return;
}
jcpPanel.get2DHub().getRGroupHandler().cleanUpRGroup(jcpPanel.get2DHub().getChemModel().getMoleculeSet());
ChemObjectEditor editor = new RGroupEditor(hub);
editor.setChemObject((org.openscience.cdk.ChemObject)hub.getRGroupHandler().getrGroupQuery());
ChemObjectPropertyDialog frame = new ChemObjectPropertyDialog(JOptionPane.getFrameForComponent(editor), jcpPanel.get2DHub(),editor);
frame.pack();
frame.setVisible(true);
jcpPanel.get2DHub().updateView();
}