@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); } }