vazexqi / CodingSpectator

Watches and analyzes code edits in the Eclipse IDE non-invasively
http://codingspectator.cs.illinois.edu
Other
20 stars 14 forks source link

Notify the user about a new version of CodingSpectator #173

Closed reprogrammer closed 13 years ago

reprogrammer commented 13 years ago

Our past experience has shown that asking participants to update their installations of CodingSpectator via e-mail is not effective. I think a more effective alternative is to notify the participants about a newer version of CodingSpectator in Eclipse. Perhaps, the easiest way to notify the participants about new releases of CodingSpectator is to go to Preferences -> Install/Update -> Automatic Updates and enable the check box "Automatically find new updates and notify me". We should be able to enable this check box programmatically. However, this check box notifies the participants about available updates for any of the installed plugin. It might be better to notify participants about the availability of CodingSpectator specifically.

vazexqi commented 13 years ago

8f05fb39f164bbdae802540b36af3f4349305e1b is an initial attempt and proof-of-concept at this.

For more information on how the update mechanism in Eclipse works, consult http://help.eclipse.org/helios/topic/org.eclipse.platform.doc.isv/guide/p2_overview.htm

Things to address:

  1. We are currently using an UpdateOperation which means that the plug-in will be updated if an update exists. Should we instead present the user with a UI?
  2. The checking for update operation can take a long time to run (fetch from update-site, check if updates are valid, etc). Currently it is handled in the start(BundleContext context) method which could stall the plug-in. Perhaps we need to move this into a job and schedule it after the bundle has started.

@reprogrammer: Let's test this on Tuesday by generating a new version of CodingSpectator locally.

vazexqi commented 13 years ago

f7600efc44f54a6fc0e98926795ab0fe840510df has a different approach where we set the auto-update preference of Eclipse. This will then check for updates (daily by default) using the Eclipse update mechanism.

Auto-update is not turned on by default, so we forced it to be turned on. However, we only do this once. If the user turns it off, we will never force it to be on again for that workspace.

Together with the approach of issue #188 this is a good way to tell the user about new versions of CodingSpectator.

reprogrammer commented 13 years ago

c2c4a97677cd1a9004484a6102b45b947c1cd460 fixed the dependencies and persisted the changes to the preference store of the automatic update plug-in.

vazexqi commented 13 years ago

Two important observations as we wrap this issue up:

reprogrammer commented 13 years ago

Merged the branch widen-feature-patch-ranges containing the fix for this issue into master.

reprogrammer commented 13 years ago

@vazexqi: Is it OK to delete the branch notify-codingspectator-update?

vazexqi commented 13 years ago

Usually I renamed old branches to archive/name_of_branch. I don't actually delete any branches.

But we can use the delete method if you think that's cleaner.

reprogrammer commented 13 years ago

We never merged notify-codingspectator-update into master because we decided to handle update notifications differently. This is why I asked if we can delete the branch. But, I agree with you and will archive the branch instead of deleting it for it is safer.

vazexqi commented 13 years ago

Please archive this branch. I think Jeff was asking about how to use the new P2 system and I have some code there that might be useful to him.