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

Change the location where we store the data #166

Closed vazexqi closed 13 years ago

vazexqi commented 13 years ago

Right now we are piggy-backing onto org.eclipse.ltk.core.refactoring. It would be better for us to have our own directory.

vazexqi commented 13 years ago

I have created a plug-in called edu.illinois.codingspectator.data and relocated all data (including CodingTracker's) to that location. I have also updated the feature.xml file to include this plug-in for packaging.

See 34d06fcc9cec66f3b78290ce70a1ab3f95f2ed3f

reprogrammer commented 13 years ago

2de3a9be930e0292a09e0c693fe51e38e0c9f901 updated the license and copyright notices in feature.xml.

reprogrammer commented 13 years ago

CodingSpectator does no longer capture ".metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/", does it?

Eclipse captures more kinds of refactorings than CodingSpectator, which could provide us more context. Besides, we could compare the refactorings captured by Eclipse to those captured by CodingSpectator as a sanity check. So, I think it's a good idea to store the refactorings logged by Eclipse into the watched directory of CodingSpectator.

I can think of two ways to capture the refactorings logged by Eclipse.

  1. Hack LTK such that it logs the refactorings in two places org.eclipse.ltk.core.refactoring and edu.illinois.codingspectator.data.
  2. Copy the refactorings logged by Eclipse from org.eclipse.ltk.core.refactoring to edu.illinois.codingspectator.data whenever Eclipse starts up. This technique is similar to how CodingSpectator copies UDC data into the watched directory (see issue #55).

I prefer the second solution because it requires fewer changes to third-party code. What do you think?

vazexqi commented 13 years ago

Yes I agree with the second method. Please create another issue as a follow-up.

Let's have this issue deal exclusively with the migration. Once Stas double-checks that everything in CodingTracker is not affected we can close this issue.

reprogrammer commented 13 years ago

I've created issue #167 for capturing the refactorings logged by Eclipse.

Wanderer777 commented 13 years ago

CodingTracker part looks good. But I noticed that UDC data is still copied into "org.eclipse.ltk.core.refactoring".

vazexqi commented 13 years ago

Good catch!

Added UDC data to the edu.illinois.codingspectator.data folder in b9ddef69a228c7beadc041a5efd27cf021ba6709

reprogrammer commented 13 years ago

8565174282747ba87f5e0d2f0954857aa4481f3f changed RefactoringLog to find the watched directory from CodingSpectatorDataPlugin.

reprogrammer commented 13 years ago

a6216b47ae6e85c0aa1a10d9230ef5b35c502966 used methods of CodingSpectatorDataPlugin to compute paths involving the version number.