PTP
Release 7.0

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

java.lang.Object
  extended by org.eclipse.ptp.rdt.sync.core.resources.RemoteSyncNature

public class RemoteSyncNature
extends Object

Project nature for remote projects.

Since:
3.0

Field Summary
static String NATURE_ID
           
 
Constructor Summary
RemoteSyncNature()
           
 
Method Summary
static void addNature(IProject prj, IProgressMonitor monitor)
          Add the nature to a project
static void addNature(IProject project, String natureId, IProgressMonitor monitor)
          Utility method for adding a nature to a project.
 void configure()
           
 void deconfigure()
           
 IProject getProject()
           
static boolean hasNature(IProject project)
          Returns true if the given project has the remote nature.
static void removeNature(IProject project, String natureId, IProgressMonitor monitor)
          Utility method for removing a project nature from a project.
 void setProject(IProject project)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NATURE_ID

public static final String NATURE_ID
See Also:
Constant Field Values
Constructor Detail

RemoteSyncNature

public RemoteSyncNature()
Method Detail

addNature

public static void addNature(IProject prj,
                             IProgressMonitor monitor)
                      throws CoreException
Add the nature to a project

Parameters:
prj -
monitor -
Throws:
CoreException

addNature

public static void addNature(IProject project,
                             String natureId,
                             IProgressMonitor monitor)
                      throws CoreException
Utility method for adding a nature to a project.

Parameters:
project - the project to add the nature
natureId - the id of the nature to assign to the project
monitor - a progress monitor to indicate the duration of the operation, or null if progress reporting is not required.
Throws:
CoreException

hasNature

public static boolean hasNature(IProject project)
Returns true if the given project has the remote nature.

Throws:
NullPointerException - if project is null

removeNature

public static void removeNature(IProject project,
                                String natureId,
                                IProgressMonitor monitor)
                         throws CoreException
Utility method for removing a project nature from a project.

Parameters:
project - the project to remove the nature from
natureId - the nature id to remove
monitor - a progress monitor to indicate the duration of the operation, or null if progress reporting is not required.
Throws:
CoreException

configure

public void configure()
               throws CoreException
Throws:
CoreException

deconfigure

public void deconfigure()
                 throws CoreException
Throws:
CoreException

getProject

public IProject getProject()

setProject

public void setProject(IProject project)

PTP
Release 7.0

Copyright (c) 2011 IBM Corporation and others. All Rights Reserved.