[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [ptp-dev] Forcing a synchronization
|
Check for the RemoteSyncNature:
if (RemoteSyncNature.hasNature(project)) {
...
}
where RemoteSyncNature is imported from:
org.eclipse.ptp.rdt.sync.core.resources.RemoteSyncNature
John
On Wed, Jul 18, 2012 at 12:39 PM, Brian Watt
<bwatt@xxxxxxxxxx> wrote:
Thanks John,
Oh, And what was the technique to query if the project is of type synchronized?
Bri
> From: John Eblen <jeblen@xxxxxxx>
> To: Parallel Tools Platform general developers <ptp-dev@xxxxxxxxxxx>,
> Date: 07/18/2012 11:35 AM
> Subject: Re: [ptp-dev] Forcing a synchronization
> Sent by: ptp-dev-bounces@xxxxxxxxxxx
>
> Hi Brian
>
> There is not yet an exported API for doing a sync, but unofficially
> you can use the public methods in:
>
> org.eclipse.ptp.rdt.sync.core.SyncManager
>
> For example, to do a forced, non-blocking sync on an IProject called"project":
>
> SyncManager.sync(null, project, SyncFlag.FORCE, null);
>
> The last argument is an ISyncExceptionHandler, which you can
> optionally define for handling sync exceptions.
>
> An example handler can be found at:
>
> org.eclipse.ptp.rdt.sync.ui.CommonSyncExceptionHandler
>
> There is also a blocking sync call, SyncManager.syncBlocking(),
> which comes in two flavors.
> One will throw sync exceptions and the other again takes an exception handler.
>
> Confusingly, the two calls which take handlers also claim to throw
> CoreException, but this should
> never happen. So a simple assert or log message should be sufficient
> for the corresponding catch block.
>
> John
> On Wed, Jul 18, 2012 at 11:26 AM, Brian Watt <bwatt@xxxxxxxxxx> wrote:
> Hi John,
>
> I have a plugin that converts an executable into an instrumented
> executable on my remote system through a menu selection. Afterwards
> I want to have the instrumented executable appear in my synchronized
> project. Today I do a synchronization > sync active now to get it to
> appear. What is the recommended programming technique (code idiom)
> to force a synchronization in a plugin.
>
> Brian Watt, Eclipse IBM
>
> _______________________________________________
> ptp-dev mailing list
> ptp-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/ptp-dev
> _______________________________________________
> ptp-dev mailing list
> ptp-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/ptp-dev
_______________________________________________
ptp-dev mailing list
ptp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-dev