String title = InMemoryCoverageLoader_msgTitle;
String desc = MessageFormat.format(InMemoryCoverageLoader_message, resource
.getIdentifier(), finalHeap);
String[] buttons = {InMemoryCoverageLoader_restart_button,
InMemoryCoverageLoader_close_button};
MessageDialog dialog = new MessageDialog(shell, title, null, desc, QUESTION,
buttons, 0){
@Override
protected void buttonPressed( int buttonId ) {
if (buttonId == 0) {
try {
UiPlugin.setMaxHeapSize(String.valueOf(finalHeap));
PlatformUI.getWorkbench().restart();
} catch (IOException e) {
throw (RuntimeException) new RuntimeException().initCause(e);
}
}
super.buttonPressed(buttonId);
}
};
dialog.open();
}
});
}