For last three weeks I was working on including non-workspace files in Workspace presentation model in Synchronize View. This idea can sounds weird since the Workspace presentation model was designed to show only changed files that are in Eclipse workspace … but there are some use cases in which such behavior seams to be reasonable (eg. EGit and JGit projects doesn’t import repository root into workspace only projects are imported and files like master pom.xml, README, LICENCE and so on are left outside workspace).
If you don’t import all data into Eclipse workspace you won’t see any incoming nor outgoing changes. Even more, after merge/rebase actions changes in non-workspace files will magically appear in those resources and can even brake something (eg. massed up in master pom.xml file).
So, what is current status ? First of all I want to point that I’m describing here current situation in my working copy, described here changes currently are not available in public. After hours of debugging, code analysis and rewriting my code I’ve manage to show some indication in synchornize view that there are some non-workspace chagnes. The next step will be to show what particular file was changed and then enable all operations like overwrite, mark as merged, etc.
Here is a screenshot showing current status:
As you can see there is home folder in sync results. It even have expand indicator (but after expanding it there is nothing inside). I suppose that on windows this folder will correspond to drive letter, but I’m not sure here. Now I only need to tell Team Framework that there are some files inside home node …
This seams to be quite easy task, since parent folder is already included in view … but this isn’t that easy. First of all Workspace model is based on IResource‘s with are manageable by Eclipse platform. Of course I can create such resource using IWorkspaceRoot.getFolder() and IWorkspaceRoot.getFile(). Unfortunately non-workspace resources created by those two methods will return theirs first segment (on unix system it will be usually /home) as theirs project. Of course such project doesn’t exist in workspace therefore this node is empty.
Honestly speaking I currently don’t have any good ides how to move things forward … as usually I’ll dive into debugging and code analysis …
Any hints and ideas from the community are kindly welcome!
Pingback: Dariusz Luksza: Progress on non-workspace files in Workspace presentation model
Some time ago I’ve started some work for MercurialEclipse  plugin in the 1.9 (head) branch. The idea is to create and manage a “dummy” project as a “root” for *all* external resources. You just create it “on the fly” and hide from users.
Please check either (not finished state with further comments) in MercurialEclipse  code, or try to debug in already existing (far more complex but working) implementation of ExternalFoldersManager in JDT.
Thank you Andrey for that suggestions. Including non-workspace files in hidden project seams to be easier then hacking whole Team Framework and Eclipse Platform to such changes without importing it in workspace.
Honestly speaking I would never come with such approach for this issue, once again thank you!