private void applyChangeForMethod(IDocument document, int offset) throws MalformedTreeException,
JavaModelException, IllegalArgumentException, BadLocationException {
MultiTextEdit edit = new MultiTextEdit();
String methodTypeString = null;
RequestMappingDialog dialog = new RequestMappingDialog(Display.getDefault().getActiveShell());
if (dialog.open() == Dialog.OK) {
TextEdit importEdit = JdtQuickfixUtils.getTextEditForImport(cu, REQUEST_MAPPING_IMPORT);
if (importEdit != null) {
edit.addChild(importEdit);
}
Method methodType = dialog.getMethodType();
if (methodType == Method.GET) {
methodTypeString = "GET";
}
else if (methodType == Method.POST) {
methodTypeString = "POST";