@Override public void run(ITextSelection selection) { try { final IType type= SelectionConverter.getTypeAtOffset(fEditor); if (type != null) { if (!ElementValidator.check(type, getShell(), getDialogTitle(), false) || !ActionUtil.isEditable(fEditor, getShell(), type)) { notifyResult(false); return; } if (type.isAnnotation()) { MessageDialog.openInformation(getShell(), getDialogTitle(), ActionMessages.OverrideMethodsAction_annotation_not_applicable); notifyResult(false); return; } run(getShell(), type); } else { MessageDialog.openInformation(getShell(), getDialogTitle(), ActionMessages.OverrideMethodsAction_not_applicable); } } catch (JavaModelException e) { ExceptionHandler.handle(e, getShell(), getDialogTitle(), null); } catch (CoreException e) { ExceptionHandler.handle(e, getShell(), getDialogTitle(), ActionMessages.OverrideMethodsAction_error_actionfailed); } }
@Override public void run(ITextSelection selection) { try { final IType type= SelectionConverter.getTypeAtOffset(fEditor); if (type != null) { if (!ElementValidator.check(type, getShell(), getDialogTitle(), false) || !ActionUtil.isEditable(fEditor, getShell(), type)) { notifyResult(false); return; } if (type.isAnnotation()) { MessageDialog.openInformation(getShell(), getDialogTitle(), ActionMessages.OverrideMethodsAction_annotation_not_applicable); notifyResult(false); return; } run(getShell(), type); } else { MessageDialog.openInformation(getShell(), getDialogTitle(), ActionMessages.OverrideMethodsAction_not_applicable); } } catch (JavaModelException e) { ExceptionHandler.handle(e, getShell(), getDialogTitle(), null); } catch (CoreException e) { ExceptionHandler.handle(e, getShell(), getDialogTitle(), ActionMessages.OverrideMethodsAction_error_actionfailed); } }
public void run(IStructuredSelection selection) { try { final IType type= getSelectedType(selection); if (type == null) { MessageDialog.openInformation(getShell(), getDialogTitle(), ActionMessages.OverrideMethodsAction_not_applicable); notifyResult(false); return; } if (!ElementValidator.check(type, getShell(), getDialogTitle(), false) || !ActionUtil.isEditable(getShell(), type)) { notifyResult(false); return; } run(getShell(), type); } catch (CoreException exception) { ExceptionHandler.handle(exception, getShell(), getDialogTitle(), ActionMessages.OverrideMethodsAction_error_actionfailed); } }
@Override public void run(IStructuredSelection selection) { try { final IType type= getSelectedType(selection); if (type == null) { MessageDialog.openInformation(getShell(), getDialogTitle(), ActionMessages.OverrideMethodsAction_not_applicable); notifyResult(false); return; } if (!ElementValidator.check(type, getShell(), getDialogTitle(), false) || !ActionUtil.isEditable(getShell(), type)) { notifyResult(false); return; } run(getShell(), type); } catch (CoreException exception) { ExceptionHandler.handle(exception, getShell(), getDialogTitle(), ActionMessages.OverrideMethodsAction_error_actionfailed); } }
@Override public void run(IStructuredSelection selection) { try { final IType type= getSelectedType(selection); if (type == null) { MessageDialog.openInformation(getShell(), getDialogTitle(), ActionMessages.OverrideMethodsAction_not_applicable); notifyResult(false); return; } if (!ElementValidator.check(type, getShell(), getDialogTitle(), false) || !ActionUtil.isEditable(getShell(), type)) { notifyResult(false); return; } run(getShell(), type); } catch (CoreException exception) { ExceptionHandler.handle(exception, getShell(), getDialogTitle(), ActionMessages.OverrideMethodsAction_error_actionfailed); } }
public void run(ITextSelection selection) { try { final IType type= SelectionConverter.getTypeAtOffset(fEditor); if (type != null) { if (!ElementValidator.check(type, getShell(), getDialogTitle(), false) || !ActionUtil.isEditable(fEditor, getShell(), type)) { notifyResult(false); return; } if (type.isAnnotation()) { MessageDialog.openInformation(getShell(), getDialogTitle(), ActionMessages.OverrideMethodsAction_annotation_not_applicable); notifyResult(false); return; } if (type.isInterface()) { MessageDialog.openInformation(getShell(), getDialogTitle(), ActionMessages.OverrideMethodsAction_interface_not_applicable); notifyResult(false); return; } run(getShell(), type); } else { MessageDialog.openInformation(getShell(), getDialogTitle(), ActionMessages.OverrideMethodsAction_not_applicable); } } catch (JavaModelException e) { ExceptionHandler.handle(e, getShell(), getDialogTitle(), null); } catch (CoreException e) { ExceptionHandler.handle(e, getShell(), getDialogTitle(), ActionMessages.OverrideMethodsAction_error_actionfailed); } }
private void run(Shell shell, IType type) throws CoreException { final OverrideMethodDialog dialog= new OverrideMethodDialog(shell, fEditor, type, false); if (!dialog.hasMethodsToOverride()) { MessageDialog.openInformation(shell, getDialogTitle(), ActionMessages.OverrideMethodsAction_error_nothing_found); notifyResult(false); return; final String[] created= operation.getCreatedMethods(); if (created == null || created.length == 0) MessageDialog.openInformation(shell, getDialogTitle(), ActionMessages.OverrideMethodsAction_error_nothing_found); } catch (InvocationTargetException exception) { ExceptionHandler.handle(exception, shell, getDialogTitle(), null); } catch (InterruptedException exception) {
private void run(Shell shell, IType type) throws CoreException { final OverrideMethodDialog dialog= new OverrideMethodDialog(shell, fEditor, type, false); if (!dialog.hasMethodsToOverride()) { MessageDialog.openInformation(shell, getDialogTitle(), ActionMessages.OverrideMethodsAction_error_nothing_found); notifyResult(false); return; final String[] created= operation.getCreatedMethods(); if (created == null || created.length == 0) MessageDialog.openInformation(shell, getDialogTitle(), ActionMessages.OverrideMethodsAction_error_nothing_found); } catch (InvocationTargetException exception) { ExceptionHandler.handle(exception, shell, getDialogTitle(), null); } catch (InterruptedException exception) {
private void run(Shell shell, IType type) throws CoreException { final OverrideMethodDialog dialog= new OverrideMethodDialog(shell, fEditor, type, false); if (!dialog.hasMethodsToOverride()) { MessageDialog.openInformation(shell, getDialogTitle(), ActionMessages.OverrideMethodsAction_error_nothing_found); notifyResult(false); return; final String[] created= operation.getCreatedMethods(); if (created == null || created.length == 0) MessageDialog.openInformation(shell, getDialogTitle(), ActionMessages.OverrideMethodsAction_error_nothing_found); } catch (InvocationTargetException exception) { ExceptionHandler.handle(exception, shell, getDialogTitle(), null); } catch (InterruptedException exception) {