@Override public void run(ITextSelection selection) { if (!ActionUtil.isProcessable(fEditor)) return; try { Shell shell= getShell(); IType type= SelectionConverter.getTypeAtOffset(fEditor); if (type != null) run(shell, type, true); else MessageDialog.openInformation(shell, getDialogTitle(), ActionMessages.AddUnimplementedConstructorsAction_not_applicable); } catch (JavaModelException e) { ExceptionHandler.handle(e, getShell(), getDialogTitle(), null); } catch (CoreException e) { ExceptionHandler.handle(e, getShell(), getDialogTitle(), null); } }
@Override public void run(ITextSelection selection) { if (!ActionUtil.isProcessable(fEditor)) return; try { Shell shell= getShell(); IType type= SelectionConverter.getTypeAtOffset(fEditor); if (type != null) run(shell, type, true); else MessageDialog.openInformation(shell, getDialogTitle(), ActionMessages.AddUnimplementedConstructorsAction_not_applicable); } catch (JavaModelException e) { ExceptionHandler.handle(e, getShell(), getDialogTitle(), null); } catch (CoreException e) { ExceptionHandler.handle(e, getShell(), getDialogTitle(), null); } }
public void run(ITextSelection selection) { if (!ActionUtil.isProcessable(fEditor)) return; try { Shell shell= getShell(); IType type= SelectionConverter.getTypeAtOffset(fEditor); if (type != null) run(shell, type, true); else MessageDialog.openInformation(shell, getDialogTitle(), ActionMessages.AddUnimplementedConstructorsAction_not_applicable); } catch (JavaModelException e) { ExceptionHandler.handle(e, getShell(), getDialogTitle(), null); } catch (CoreException e) { ExceptionHandler.handle(e, getShell(), getDialogTitle(), null); } }
@Override public void run(IStructuredSelection selection) { Shell shell= getShell(); try { IType type= getSelectedType(selection); if (type == null) { MessageDialog.openInformation(getShell(), getDialogTitle(), ActionMessages.AddUnimplementedConstructorsAction_not_applicable); return; } if (type.isAnnotation()) { MessageDialog.openInformation(getShell(), getDialogTitle(), ActionMessages.AddUnimplementedConstructorsAction_annotation_not_applicable); return; } else if (type.isInterface()) { MessageDialog.openInformation(getShell(), getDialogTitle(), ActionMessages.AddUnimplementedConstructorsAction_interface_not_applicable); return; } else if (type.isEnum()) { MessageDialog.openInformation(getShell(), getDialogTitle(), ActionMessages.AddUnimplementedConstructorsAction_enum_not_applicable); return; } run(shell, type, false); } catch (CoreException e) { ExceptionHandler.handle(e, shell, getDialogTitle(), null); } }
public void run(IStructuredSelection selection) { Shell shell= getShell(); try { IType type= getSelectedType(selection); if (type == null) { MessageDialog.openInformation(getShell(), getDialogTitle(), ActionMessages.AddUnimplementedConstructorsAction_not_applicable); return; } if (type.isAnnotation()) { MessageDialog.openInformation(getShell(), getDialogTitle(), ActionMessages.AddUnimplementedConstructorsAction_annotation_not_applicable); return; } else if (type.isInterface()) { MessageDialog.openInformation(getShell(), getDialogTitle(), ActionMessages.AddUnimplementedConstructorsAction_interface_not_applicable); return; } else if (type.isEnum()) { MessageDialog.openInformation(getShell(), getDialogTitle(), ActionMessages.AddUnimplementedConstructorsAction_enum_not_applicable); return; } run(shell, type, false); } catch (CoreException e) { ExceptionHandler.handle(e, shell, getDialogTitle(), null); } }
@Override public void run(IStructuredSelection selection) { Shell shell= getShell(); try { IType type= getSelectedType(selection); if (type == null) { MessageDialog.openInformation(getShell(), getDialogTitle(), ActionMessages.AddUnimplementedConstructorsAction_not_applicable); return; } if (type.isAnnotation()) { MessageDialog.openInformation(getShell(), getDialogTitle(), ActionMessages.AddUnimplementedConstructorsAction_annotation_not_applicable); return; } else if (type.isInterface()) { MessageDialog.openInformation(getShell(), getDialogTitle(), ActionMessages.AddUnimplementedConstructorsAction_interface_not_applicable); return; } else if (type.isEnum()) { MessageDialog.openInformation(getShell(), getDialogTitle(), ActionMessages.AddUnimplementedConstructorsAction_enum_not_applicable); return; } run(shell, type, false); } catch (CoreException e) { ExceptionHandler.handle(e, shell, getDialogTitle(), null); } }
private void run(Shell shell, IType type, boolean activatedFromEditor) throws CoreException { if (!ElementValidator.check(type, getShell(), getDialogTitle(), activatedFromEditor)) { notifyResult(false); return; Object[] constructors= provider.getElements(null); if (constructors.length == 0) { MessageDialog.openInformation(getShell(), getDialogTitle(), ActionMessages.AddUnimplementedConstructorsAction_error_nothing_found); notifyResult(false); return; String[] created= operation.getCreatedConstructors(); if (created == null || created.length == 0) MessageDialog.openInformation(shell, getDialogTitle(), ActionMessages.AddUnimplementedConstructorsAction_error_nothing_found); } catch (InvocationTargetException e) { ExceptionHandler.handle(e, shell, getDialogTitle(), null); } catch (InterruptedException e) {
private void run(Shell shell, IType type, boolean activatedFromEditor) throws CoreException { if (!ElementValidator.check(type, getShell(), getDialogTitle(), activatedFromEditor)) { notifyResult(false); return; Object[] constructors= provider.getElements(null); if (constructors.length == 0) { MessageDialog.openInformation(getShell(), getDialogTitle(), ActionMessages.AddUnimplementedConstructorsAction_error_nothing_found); notifyResult(false); return; String[] created= operation.getCreatedConstructors(); if (created == null || created.length == 0) MessageDialog.openInformation(shell, getDialogTitle(), ActionMessages.AddUnimplementedConstructorsAction_error_nothing_found); } catch (InvocationTargetException e) { ExceptionHandler.handle(e, shell, getDialogTitle(), null); } catch (InterruptedException e) {
private void run(Shell shell, IType type, boolean activatedFromEditor) throws CoreException { if (!ElementValidator.check(type, getShell(), getDialogTitle(), activatedFromEditor)) { notifyResult(false); return; Object[] constructors= provider.getElements(null); if (constructors.length == 0) { MessageDialog.openInformation(getShell(), getDialogTitle(), ActionMessages.AddUnimplementedConstructorsAction_error_nothing_found); notifyResult(false); return; String[] created= operation.getCreatedConstructors(); if (created == null || created.length == 0) MessageDialog.openInformation(shell, getDialogTitle(), ActionMessages.AddUnimplementedConstructorsAction_error_nothing_found); } catch (InvocationTargetException e) { ExceptionHandler.handle(e, shell, getDialogTitle(), null); } catch (InterruptedException e) {