Git Product home page Git Product logo

git-appraise-eclipse's Introduction

Google Appraise Eclipse Plugin

Git Appraise is a code review system that uses git-notes as a data store. The Google Appraise Eclipse Plugin supports an Appraise-based code reveiw workflow inside Eclipse. It is implemented as a Mylyn Task Repository connector and leverages the Egit plugin.

Screenshots

Displaying a single review, with details and highlighted diffs for the changed files: Displaying a single review

Adding an inline comment to the current review: Adding an inline comment

Displaying the comments in a review: Displaying the comments in a review

Links

  • Git Appraise -- for the Git Appraise command-line tool and more information about Git Appraise in general.

User documentation

Prerequisites

  • Install Egit.
  • Install the Appraise Eclipse Plugin. For now, this means using the update site archive file from one of the releases.
    • Help | Install New Software...
    • Add...
    • Archive...
    • Browse to the site.zip file you downloaded.
    • OK.
    • Turn off "Group items by category" if it is selected.
    • Choose "Appraise" and Next, Finish.
    • Note that this will fail if you did not already install Egit.
  • In the Git perspective in Eclipse, add a repository for the project you want to work with.
  • Import or create an Eclipse project connected to the Git repository. None of what follows will work otherwise.

Adding an Appraise Task Repository

  • Window | Show View | Mylyn | Task Repositories.
  • Click on "Add a Task Repository...".
  • Select "Appraise Reviews".
  • Under "Server", you should see an item for each Git-connected Eclipse project in your workspace. Choose the one you want. Verify that your User ID is correct for that Git repo and click "Finish".
  • You will now have the option to add a query.

Creating a review query

  • In the Task List view, select (from the toolbar or right-click) "New Query...".
  • Select the Appraise repository and click "Next".
  • Enter a title for your query. (This will show up in the Task List).
  • You may choose to filter for reviews where you are the requestor or reviewer, or filter by a specific review commit hash prefix.
  • You can refresh the query (to see new reviews from your collaborators, for example) with "Synchronize" or "Synchronize Automatically".

Requesting a code review

Note that the Appraise workflow model expects you to request a review from a working branch, and the Eclipse Plugin assumes that you currently have that branch checked out. (You can confirm this by looking at the project node name in the Package Explorer.)

  • In the Task List view, select (from the toolbar or right-click) "New Task...".
  • Select the Appraise repository and click "Finish".
  • The Task Editor appears:
    • The Review Ref should be pre-filled with the name of your current branch.
    • The Target Ref (where your review will be submitted) defaults to refs/heads/master. You can change this if necessary.
    • You should select some code reviewers by filling in their User ID's as a comma-separated list in the "Reviewers" text box.
    • Your commited changes are listed, and you can view the diffs.
  • When you are satisfied, request the review by clicking the "Submit" button for the task. (Underneath the hood, this will create git-notes on the refs/notes/devtools/reviews ref and push them.)

Reviewing code

The code review workflow for Appraise in Eclipse is based around Mylyn's task activation model.

  • Right-click a review task in the Task List and choose "Activate".
  • You will be given the option to checkout the review branch.
  • Double-click the task to open the task editor where you can:
    • See the changes with diffs.
    • See the comments.
    • Make new comments.
    • Add or remove reviewers.
  • Window | Show View | Other | Other and select "Appraise Review Tasks" to open the "Appraise Review Tasks" view.
    • There, you can view all the review comments and, if there is a location associated with the comment, double-click to open the relevant source file.
  • Open a source file.
    • If there are any comments from the active review associated with that source file, they will appear as markers in the gutter.
    • Right-click any existing marker and select a comment from the "Appraise Review Comments" menu to reply to the comment.
    • Right-click anywhere in the source editor and select "Appraise Review Comments" to create a new comment associated with the file the file, the location clicked, or the overall review.
  • After making all comments, return to the task editor to:
    • Submit comments with the "Submit" button. (This has the effect of merging git-notes for the review commit on the refs/notes/devtools/discuss ref.)

Releases

Releases will be tagged in the repository and an announcement will be made on our Github page. We have no strict timetable but aim to do this every three months or whenever a more urgent need arises.

Roadmap

  • Improved UI for creating and responding to comments (e.g. inline with the source).
  • Smoother Mylyn integration.

How to develop

Import the following projects into Eclipse:

  • com.google.appraise.eclipse.core
  • com.google.appraise.eclipse.ui
  • feature
  • site

To debug, right-click the "core" project and Run As...Eclipse Application.

To build the update site archive (site/target/site_assembly.zip): mvn package

Please send pull requests.

git-appraise-eclipse's People

Contributors

jlleitschuh avatar ojarjur avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

git-appraise-eclipse's Issues

NPE AppraiseReviewTaskActivationListener.taskActivated

I have no defined Apppraise Mylyn Repository

image

I added our JIRA as Mylyn Repository ... search for an issue try to activate the issue ... baem :) I got this in my eclipse error log ...

The following will be send to: Eclipse

REPORT

anonymousId 1271478a-1f36-479a-b160-c540d61e4781
name Andreas Höhmann
email XXXXXX
comment
eclipseBuildId 4.6.1.M20160907-1200
eclipseProduct org.eclipse.epp.package.jee.product
javaRuntimeVersion 1.8.0_92-b14
osgiWs win32
osgiOs Windows7
osgiOsVersion 6.1.0
osgiArch x86_64
severity UNKNOWN

STATUS

pluginId org.eclipse.mylyn.tasks.core
pluginVersion 3.20.2.v20160630-1642
code 0
severity 4
message Task activity listener failed: com.google.appraise.eclipse.ui.editor.AppraiseReviewTaskActivationListener@9ae2b4f
fingerprint ef2219a65dcd59bf460f8af28cc47f1e

Exception:java.lang.NullPointerException: null
at com.google.appraise.eclipse.ui.editor.AppraiseReviewTaskActivationListener.taskActivated(AppraiseReviewTaskActivationListener.java:59)
at org.eclipse.mylyn.internal.tasks.core.TaskActivityManager.activateTask(TaskActivityManager.java:488)
at org.eclipse.mylyn.internal.tasks.ui.commands.ActivateTaskHandler.execute(ActivateTaskHandler.java:30)
at org.eclipse.mylyn.internal.tasks.ui.commands.AbstractTaskHandler.execute(AbstractTaskHandler.java:145)
at org.eclipse.mylyn.internal.tasks.ui.commands.AbstractTaskHandler.process(AbstractTaskHandler.java:83)
at org.eclipse.mylyn.internal.tasks.ui.commands.AbstractTaskHandler.process(AbstractTaskHandler.java:71)
at org.eclipse.mylyn.internal.tasks.ui.commands.AbstractTaskHandler.execute(AbstractTaskHandler.java:53)
at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:295)
at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:90)
at sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java:-2)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55)
at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:282)
at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:264)
at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:152)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:494)
at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:488)
at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:210)
at org.eclipse.ui.internal.handlers.LegacyHandlerService.executeCommandInContext(LegacyHandlerService.java:405)
at org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal.executeCommand(TasksUiInternal.java:1304)
at org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal.activateTaskThroughCommand(TasksUiInternal.java:1340)
at org.eclipse.mylyn.internal.tasks.ui.actions.ToggleTaskActivationAction.run(ToggleTaskActivationAction.java:64)
at org.eclipse.mylyn.tasks.ui.editors.TaskEditor$13.run(TaskEditor.java:1005)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:473)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:565)
at org.eclipse.jface.action.ActionContributionItem.lambda$5(ActionContributionItem.java:436)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4410)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4228)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3816)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:687)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:604)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
at sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java:-2)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)
at org.eclipse.equinox.launcher.Main.run(Main.java:1519)
at org.eclipse.equinox.launcher.Main.main(Main.java:1492)

BUNDLES

name com.google.appraise.eclipse.ui
version 1.0.0.201511062209

name org.eclipse.core.commands
version 3.8.0.v20160316-1921

name org.eclipse.core.databinding.observable
version 1.6.0.v20160511-1747

name org.eclipse.core.databinding
version 1.6.0.v20160412-0910

name org.eclipse.core.runtime
version 3.12.0.v20160606-1342

name org.eclipse.e4.core.commands
version 0.11.100.v20160506-0804

name org.eclipse.e4.core.contexts
version 1.5.0.v20160504-0909

name org.eclipse.e4.core.di
version 1.6.1.v20160712-0927

name org.eclipse.e4.ui.workbench
version 1.4.0.v20160517-1624

name org.eclipse.e4.ui.workbench.swt
version 0.14.1.v20160829-0832

name org.eclipse.equinox.app
version 1.3.400.v20150715-1528

name org.eclipse.equinox.launcher
version 1.3.200.v20160318-1642

name org.eclipse.jface
version 3.12.0.v20160518-1929

name org.eclipse.mylyn.tasks.core
version 3.20.2.v20160630-1642

name org.eclipse.mylyn.tasks.ui
version 3.20.2.v20160630-1858

name org.eclipse.swt
version 3.105.1.v20160907-0248

name org.eclipse.ui
version 3.108.0.v20160518-1929

name org.eclipse.ui.ide.application
version 1.1.101.v20160829-0827

name org.eclipse.ui.ide
version 3.12.1.v20160823-0925

New created ReviewTask using a very old commit - why?

image

As you can see in the screenshot the picked commit is 5 month old and it is not the first one in the whole history of that repo.

  • how select appraise this commit?
  • it would be cool to create new code reviews from the git history log itself? I would like to contribute such extension (if this is technical possible g) - what would be good starting point for development?

kind regards
Andreas

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.