Package org.eclipse.core.runtime.jobs

Examples of org.eclipse.core.runtime.jobs.ISchedulingRule


  /* (non-Javadoc)
   * @see IResource#deleteMarkers(String, boolean, int)
   */
  public void deleteMarkers(String type, boolean includeSubtypes, int depth) throws CoreException {
    final ISchedulingRule rule = workspace.getRuleFactory().markerRule(this);
    try {
      workspace.prepareOperation(rule, null);
      ResourceInfo info = getResourceInfo(false, false);
      checkAccessible(getFlags(info));

View Full Code Here


      monitor.beginTask(message, Policy.totalWork);
      Policy.checkCanceled(monitor);
      destination = makePathAbsolute(destination);
      checkValidPath(destination, getType(), false);
      Resource destResource = workspace.newResource(destination, getType());
      final ISchedulingRule rule = workspace.getRuleFactory().moveRule(this, destResource);
      try {
        workspace.prepareOperation(rule, monitor);
        // The following assert method throws CoreExceptions as stated in the IResource.move API
        // and assert for programming errors. See checkMoveRequirements for more information.
        assertMoveRequirements(destination, getType(), updateFlags);
View Full Code Here

      boolean isRoot = getType() == ROOT;
      String message = isRoot ? Messages.resources_refreshingRoot : NLS.bind(Messages.resources_refreshing, getFullPath());
      monitor.beginTask("", Policy.totalWork); //$NON-NLS-1$
      monitor.subTask(message);
      boolean build = false;
      final ISchedulingRule rule = workspace.getRuleFactory().refreshRule(this);
      try {
        workspace.prepareOperation(rule, monitor);
        if (!isRoot && !getProject().isAccessible())
          return;
        workspace.beginOperation(true);
View Full Code Here

  public void touch(IProgressMonitor monitor) throws CoreException {
    monitor = Policy.monitorFor(monitor);
    try {
      String message = NLS.bind(Messages.resources_touch, getFullPath());
      monitor.beginTask(message, Policy.totalWork);
      final ISchedulingRule rule = workspace.getRuleFactory().modifyRule(this);
      try {
        workspace.prepareOperation(rule, monitor);
        ResourceInfo info = getResourceInfo(false, false);
        int flags = getFlags(info);
        checkAccessible(flags);
View Full Code Here

        return Status.CANCEL_STATUS;
      try {
        monitor.beginTask("", Policy.opWork); //$NON-NLS-1$
        //note that even though we are running in a workspace job, we
        //must do a begin/endOperation to re-acquire the workspace lock
        final ISchedulingRule rule = workspace.getRoot();
        try {
          workspace.prepareOperation(rule, monitor);
          workspace.beginOperation(true);
          //don't do anything if the system is shutting down or has been shut down
          //it is too late to change the workspace at this point anyway
View Full Code Here

  /**
   * @see IMarker#delete()
   */
  public void delete() throws CoreException {
    final ISchedulingRule rule = getWorkspace().getRuleFactory().markerRule(resource);
    try {
      getWorkspace().prepareOperation(rule, null);
      getWorkspace().beginOperation(true);
      getWorkspace().getMarkerManager().removeMarker(getResource(), getId());
    } finally {
View Full Code Here

    protected IStatus run(IProgressMonitor monitor) {
      MultiStatus result = new MultiStatus(ResourcesPlugin.PI_RESOURCES, IResourceStatus.FAILED_SETTING_CHARSET, Messages.resources_updatingEncoding, null);
      monitor = Policy.monitorFor(monitor);
      try {
        monitor.beginTask(Messages.resources_charsetUpdating, Policy.totalWork);
        final ISchedulingRule rule = workspace.getRuleFactory().modifyRule(workspace.getRoot());
        try {
          workspace.prepareOperation(rule, monitor);
          workspace.beginOperation(true);
          IProject next;
          while ((next = getNextChange()) != null) {
View Full Code Here

    try {
      String message = NLS.bind(Messages.resources_settingDefaultCharsetContainer, getFullPath());
      monitor.beginTask(message, Policy.totalWork);
      // need to get the project as a scheduling rule because we might be
      // creating a new folder/file to hold the project settings
      final ISchedulingRule rule = workspace.getRuleFactory().charsetRule(this);
      try {
        workspace.prepareOperation(rule, monitor);
        checkAccessible(getFlags(getResourceInfo(false, false)));
        workspace.beginOperation(true);
        workspace.getCharsetManager().setCharsetFor(getFullPath(), newCharset);
View Full Code Here

  /* (non-Javadoc)
   * @see IWorkspace#build(int, IProgressMonitor)
   */
  public void build(int trigger, IProgressMonitor monitor) throws CoreException {
    monitor = Policy.monitorFor(monitor);
    final ISchedulingRule rule = getRuleFactory().buildRule();
    try {
      monitor.beginTask("", Policy.opWork); //$NON-NLS-1$
      try {
        prepareOperation(rule, monitor);
        beginOperation(true);
View Full Code Here

  /* (non-Javadoc)
   * @see IWorkspace#checkpoint(boolean)
   */
  public void checkpoint(boolean build) {
    try {
      final ISchedulingRule rule = getWorkManager().getNotifyRule();
      try {
        prepareOperation(rule, null);
        beginOperation(true);
        broadcastPostChange();
      } finally {
View Full Code Here

TOP

Related Classes of org.eclipse.core.runtime.jobs.ISchedulingRule

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.