Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ptp-dev] Checking if a project is synchronized

Hi Wyatt

You can check if the project has the sync nature as follows:

if (RemoteSyncNature.hasNature(project)) {
...
}

where RemoteSyncNature is imported from:

org.eclipse.ptp.rdt.sync.core.resources.RemoteSyncNature


John

On May 31, 2012, at 9:50 PM, Wyatt Spear wrote:

Greetings,

I need to check if an IProject is synchronized or not.  Formerly I was doing so with:

isSyncProject=BuildConfigurationManager.getInstance().isInitialized(thisProject);

But this doesn't work in the Juno build.  At least for non-synchronized projects it fails with the error 'Unable to read template service configuration' thrown by  getTemplateServiceConfigurationId in org.eclipse.ptp.rdt.sync.core.BuildConfiguration.

Outside of catching the exception, is there a good way to make this check now?

Thanks,
Wyatt
_______________________________________________
ptp-dev mailing list
ptp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-dev


Back to the top