Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 338669

Summary: [api] Include workspace resource info in ScmArtifact
Product: z_Archived Reporter: Alvaro Sanchez-Leon <alvaro.sanchez-leon>
Component: MylynAssignee: Alvaro Sanchez-Leon <alvaro.sanchez-leon>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: kilian.matt, steffen.pingel
Version: unspecified   
Target Milestone: 0.9   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 330616    

Description Alvaro Sanchez-Leon CLA 2011-03-02 09:11:15 EST
Once a changeset is resolved via specific SCM connectors, the application receiving the list of changes may need to serialise the information e.g. another user willing to open the same determined changeset, 
It's desired to open a workspace instance if it matches the one serialised. this is the normal case for the target version of the comparison, however having the original workspace path of the base version is also desirable for information purposes.
  This information may be quite hard to determine outside of the connector, 

It's therefore proposed to include the following workspace information in the ScmArtifact element, either by abstract methods (derived) or actual instance variables with corresponding getters.
   1) Project name
   2) path relative to project
   
An initial draft implementation will be performed under the "versionsIntegration" branch.
Comment 1 Alvaro Sanchez-Leon CLA 2011-03-02 09:40:38 EST
temporary class ScmArtifactX created and to be used while the issue is being discussed as well as to allow migration from existing connectors
  branch "versionsIntegration"
Comment 2 Alvaro Sanchez-Leon CLA 2011-03-11 08:52:36 EST
The actual change was implemented with new  instance variables within ScmArtifact with corresponding getters and setters, 
so the connectors can fill this information if it is at all possible to resolve within the users workspace. 

If the artifact is not resolved within the workspace the values are defaulted to null.

Getters and setters keep backward compatibility with connectors who don't need to hold this information.
Comment 3 Alvaro Sanchez-Leon CLA 2011-03-11 09:38:23 EST
The GitConnector has been updated to resolve the workspace information

A new helper class was also introduced in the framework: ScmResoruceUtils
this shall enable the different connector implementations to re-use common methods to help resolve a file revision to a corresponding IResource.
Comment 4 Alvaro Sanchez-Leon CLA 2011-08-12 14:26:41 EDT
This was actually part of 0.8
Comment 5 Alvaro Sanchez-Leon CLA 2011-08-12 14:27:07 EDT
-