1 12 package org.eclipse.core.resources; 13 14 import java.io.InputStream ; 15 import java.net.URI ; 16 import java.util.Map ; 17 import org.eclipse.core.resources.team.FileModificationValidationContext; 18 import org.eclipse.core.runtime.*; 19 import org.eclipse.core.runtime.jobs.ISchedulingRule; 20 import org.eclipse.core.runtime.jobs.LockListener; 21 22 72 public interface IWorkspace extends IAdaptable { 73 81 public static final int AVOID_UPDATE = 1; 82 83 90 public static final Object VALIDATE_PROMPT = FileModificationValidationContext.VALIDATE_PROMPT; 91 92 110 public void addResourceChangeListener(IResourceChangeListener listener); 111 112 143 public void addResourceChangeListener(IResourceChangeListener listener, int eventMask); 144 145 166 public ISavedState addSaveParticipant(Plugin plugin, ISaveParticipant participant) throws CoreException; 167 168 207 public void build(int kind, IProgressMonitor monitor) throws CoreException; 208 209 235 public void checkpoint(boolean build); 236 237 263 public IProject[][] computePrerequisiteOrder(IProject[] projects); 264 265 275 public final class ProjectOrder { 276 286 public ProjectOrder(IProject[] projects, boolean hasCycles, IProject[][] knots) { 287 this.projects = projects; 288 this.hasCycles = hasCycles; 289 this.knots = knots; 290 } 291 292 299 public IProject[] projects; 300 308 public boolean hasCycles; 309 316 public IProject[][] knots; 317 } 318 319 353 public ProjectOrder computeProjectOrder(IProject[] projects); 354 355 393 public IStatus copy(IResource[] resources, IPath destination, boolean force, IProgressMonitor monitor) throws CoreException; 394 395 473 public IStatus copy(IResource[] resources, IPath destination, int updateFlags, IProgressMonitor monitor) throws CoreException; 474 475 509 public IStatus delete(IResource[] resources, boolean force, IProgressMonitor monitor) throws CoreException; 510 511 557 public IStatus delete(IResource[] resources, int updateFlags, IProgressMonitor monitor) throws CoreException; 558 559 576 public void deleteMarkers(IMarker[] markers) throws CoreException; 577 578 595 public void forgetSavedTree(String pluginId); 596 597 604 public IProjectNatureDescriptor[] getNatureDescriptors(); 605 606 615 public IProjectNatureDescriptor getNatureDescriptor(String natureId); 616 617 628 public Map getDanglingReferences(); 629 630 641 public IWorkspaceDescription getDescription(); 642 643 648 public IWorkspaceRoot getRoot(); 649 650 658 public IResourceRuleFactory getRuleFactory(); 659 660 666 public ISynchronizer getSynchronizer(); 667 668 674 public boolean isAutoBuilding(); 675 676 686 public boolean isTreeLocked(); 687 688 709 public IProjectDescription loadProjectDescription(IPath projectDescriptionFile) throws CoreException; 710 711 734 public IProjectDescription loadProjectDescription(InputStream projectDescriptionFile) throws CoreException; 735 736 777 public IStatus move(IResource[] resources, IPath destination, boolean force, IProgressMonitor monitor) throws CoreException; 778 779 863 public IStatus move(IResource[] resources, IPath destination, int updateFlags, IProgressMonitor monitor) throws CoreException; 864 865 889 public IProjectDescription newProjectDescription(String projectName); 890 891 899 public void removeResourceChangeListener(IResourceChangeListener listener); 900 901 913 public void removeSaveParticipant(Plugin plugin); 914 915 976 public void run(IWorkspaceRunnable action, ISchedulingRule rule, int flags, IProgressMonitor monitor) throws CoreException; 977 978 996 public void run(IWorkspaceRunnable action, IProgressMonitor monitor) throws CoreException; 997 998 1194 public IStatus save(boolean full, IProgressMonitor monitor) throws CoreException; 1195 1196 1207 public void setDescription(IWorkspaceDescription description) throws CoreException; 1208 1209 1223 public void setWorkspaceLock(WorkspaceLock lock); 1224 1225 1241 public String [] sortNatureSet(String [] natureIds); 1242 1243 1324 public IStatus validateEdit(IFile[] files, Object context); 1325 1326 1370 public IStatus validateLinkLocation(IResource resource, IPath location); 1371 1372 1414 public IStatus validateLinkLocationURI(IResource resource, URI location); 1415 1416 1445 public IStatus validateName(String segment, int typeMask); 1446 1447 1471 public IStatus validateNatureSet(String [] natureIds); 1472 1473 1514 public IStatus validatePath(String path, int typeMask); 1515 1516 1544 public IStatus validateProjectLocation(IProject project, IPath location); 1545 1546 1573 public IStatus validateProjectLocationURI(IProject project, URI location); 1574 1575 1582 public IPathVariableManager getPathVariableManager(); 1583} 1584 | Popular Tags |