retrieving local history of an IFile [message #334534] |
Mon, 16 February 2009 16:51 |
|
This is a multi-part message in MIME format.
--------------060206060303020808050007
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
hi,
I have found a way to retrieve the history of a given IFile when its
project is connected to a VCS repository through code as :
<snip>
final IProject project = file.getProject();
final RepositoryProvider provider = RepositoryProvider.getProvider(project);
final IFileHistoryProvider historyProvider =
provider.getFileHistoryProvider();
final IFileHistory history = historyProvider.getFileHistoryFor(target,
IFileHistoryProvider.NONE, new NullProgressMonitor());
</snip>
Though try as I might, I cannot find any API way of retrieving the same
information when the project is _not_ connected to a repository. All I
found was something like
<snip>
final FileSystemManager fsm =
((org.eclipse.core.internal.resources.Workspace)workspace).g etFileSystemManager();
final HistoryStore = fsm.getStates(file.getFullPath(), new
NullProgressMonitor());
</snip>
Which leads to a fair amount of discouraged access warnings. Isn't there
any open API I'd have missed while digging through the code?
Thanks
Laurent Goubet
Obeo
--------------060206060303020808050007
Content-Type: text/x-vcard; charset=utf-8;
name="laurent_goubet.vcf"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="laurent_goubet.vcf"
begin:vcard
fn:Laurent Goubet
n:Goubet;Laurent
org:<a href="http://www.obeo.fr/">Obeo</a>
email;internet:laurent.goubet@obeo.fr
url:http://www.obeo.fr
version:2.1
end:vcard
--------------060206060303020808050007--
|
|
|
Re: retrieving local history of an IFile [message #334535 is a reply to message #334534] |
Mon, 16 February 2009 17:30 |
|
This is a multi-part message in MIME format.
--------------090600000105000505090309
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
Sorry, went a little overboard on that one ... my IFile was not an IFile
(IResource :p) and I was too confident in the code completion.
Laurent Goubet
Obeo
laurent Goubet a
|
|
|
|
Powered by
FUDForum. Page generated in 0.05556 seconds