Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » How to get SyncInfo
How to get SyncInfo [message #314733] Sat, 21 April 2007 03:10 Go to next message
Eclipse UserFriend
Hi,
while implementing a new feature for the Eclipse Checkstyle Plugin I was
looking for a way to get the SyncInfo object of a workspace file.

My naive approach was:

SyncInfo synchInfo = (SyncInfo) ((IFile)
element).getAdapter(SyncInfo.class);

- which of course didn't work.

Is there a way to get the SyncInfo independently from the actual team
provider implementation?

Thanks,
Lars
Re: How to get SyncInfo [message #314734 is a reply to message #314733] Sat, 21 April 2007 03:43 Go to previous messageGo to next message
Eclipse UserFriend
Hi Lars.

It's quite simple:

import org.eclipse.team.core.RepositoryProvider;
import org.eclipse.team.core.subscribers.Subscriber;
.......
RepositoryProvider provider = RepositoryProvider.getProvider(myProject);
Subscriber subscriber = prodider.getSubscriber();
SyncInfo info = subscriber.getSyncInfo(myFile);

Enjoy!

Lars Ködderitzsch wrote:
> Hi,
> while implementing a new feature for the Eclipse Checkstyle Plugin I was
> looking for a way to get the SyncInfo object of a workspace file.
>
> My naive approach was:
>
> SyncInfo synchInfo = (SyncInfo) ((IFile)
> element).getAdapter(SyncInfo.class);
>
> - which of course didn't work.
>
> Is there a way to get the SyncInfo independently from the actual team
> provider implementation?
>
> Thanks,
> Lars
>
Re: How to get SyncInfo [message #314736 is a reply to message #314734] Sat, 21 April 2007 07:17 Go to previous message
Eclipse UserFriend
Hi Ilya,
thank you very much for your help!
Works like a charm :-)

Regards,
Lars
Previous Topic:Creating /Registering a Local Update Site
Next Topic:[DataBinding] Model objects as JavaBeans question
Goto Forum:
  


Current Time: Mon Nov 10 06:30:44 EST 2025

Powered by FUDForum. Page generated in 0.07634 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top