[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform] Re: retrieving local history of an IFile

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 écrit :
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).getFileSystemManager();


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

begin:vcard
fn:Laurent Goubet
n:Goubet;Laurent
org:<a href="http://www.obeo.fr/";>Obeo</a>
email;internet:laurent.goubet@xxxxxxx
url:http://www.obeo.fr
version:2.1
end:vcard