ATGEditor atgEditor = (ATGEditor) HandlerUtil.getActiveEditor(event);
ISelection selection = HandlerUtil.getCurrentSelection(event);
if( selection != null && selection instanceof ITextSelection ) {
info = new ReformatInfo(atgEditor,
getTabWidth(),
((ITextSelection)selection).getOffset(),
((ITextSelection)selection).getLength());
if (((ITextSelection)selection).getLength() > 0) {
info.setReformatAllProductions(false);
}
} else {
info = new ReformatInfo(atgEditor,
getTabWidth());
}
if (saveAll()) {
openWizard();