Package org.eclipse.core.runtime.jobs

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


      String message = NLS.bind(Messages.resources_settingContents, getFullPath());
      monitor.beginTask(message, Policy.totalWork);
      Assert.isNotNull(content, "Content cannot be null."); //$NON-NLS-1$
      if (workspace.shouldValidate)
        workspace.validateSave(this);
      final ISchedulingRule rule = workspace.getRuleFactory().modifyRule(this);
      try {
        workspace.prepareOperation(rule, monitor);
        ResourceInfo info = getResourceInfo(false, false);
        checkAccessible(getFlags(info));
        workspace.beginOperation(true);
View Full Code Here


    monitor = Policy.monitorFor(monitor);
    try {
      String message = monitorNull ? "" : NLS.bind(Messages.resources_creating, getFullPath()); //$NON-NLS-1$
      monitor.beginTask(message, Policy.totalWork);
      checkValidPath(path, FILE, true);
      final ISchedulingRule rule = workspace.getRuleFactory().createRule(this);
      try {
        workspace.prepareOperation(rule, monitor);
        checkDoesNotExist();
        Container parent = (Container) getParent();
        ResourceInfo info = parent.getResourceInfo(false, false);
View Full Code Here

    try {
      String message = NLS.bind(Messages.resources_settingContents, getFullPath());
      monitor.beginTask(message, Policy.totalWork);
      if (workspace.shouldValidate)
        workspace.validateSave(this);
      final ISchedulingRule rule = workspace.getRuleFactory().modifyRule(this);
      try {
        workspace.prepareOperation(rule, monitor);
        ResourceInfo info = getResourceInfo(false, false);
        checkAccessible(getFlags(info));
        workspace.beginOperation(true);
View Full Code Here

    try {
      String message = NLS.bind(Messages.resources_settingCharset, 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);
        ResourceInfo info = getResourceInfo(false, false);
        checkAccessible(getFlags(info));
        workspace.beginOperation(true);
View Full Code Here

  public void close(IProgressMonitor monitor) throws CoreException {
    monitor = Policy.monitorFor(monitor);
    try {
      String msg = NLS.bind(Messages.resources_closing_1, getName());
      monitor.beginTask(msg, Policy.totalWork);
      final ISchedulingRule rule = workspace.getRuleFactory().modifyRule(this);
      try {
        // Do this before the prepare to allow lifecycle participants to change the tree.
        workspace.broadcastEvent(LifecycleEvent.newEvent(LifecycleEvent.PRE_PROJECT_CLOSE, this));
        workspace.prepareOperation(rule, monitor);
        ResourceInfo info = getResourceInfo(false, false);
View Full Code Here

  public void create(IProjectDescription description, IProgressMonitor monitor) throws CoreException {
    monitor = Policy.monitorFor(monitor);
    try {
      monitor.beginTask(Messages.resources_create, Policy.totalWork);
      checkValidPath(path, PROJECT, false);
      final ISchedulingRule rule = workspace.getRuleFactory().createRule(this);
      try {
        workspace.prepareOperation(rule, monitor);
        checkDoesNotExist();
        if (description != null)
          checkDescription(this, description, false);
View Full Code Here

  /**
   * Implements all build methods on IProject.
   */
  protected void internalBuild(int trigger, String builderName, Map args, IProgressMonitor monitor) throws CoreException {
    monitor = Policy.monitorFor(monitor);
    final ISchedulingRule rule = workspace.getRuleFactory().buildRule();
    try {
      monitor.beginTask("", Policy.opWork); //$NON-NLS-1$
      try {
        workspace.prepareOperation(rule, monitor);
        ResourceInfo info = getResourceInfo(false, false);
View Full Code Here

      String message = NLS.bind(Messages.resources_copying, getFullPath());
      monitor.beginTask(message, Policy.totalWork);
      String destName = destDesc.getName();
      IPath destPath = new Path(destName).makeAbsolute();
      Project destination = (Project) workspace.getRoot().getProject(destName);
      final ISchedulingRule rule = workspace.getRuleFactory().copyRule(this, destination);
      try {
        workspace.prepareOperation(rule, monitor);
        // The following assert method throws CoreExceptions as stated in the IProject.copy API
        // and assert for programming errors. See checkCopyRequirements for more information.
        assertCopyRequirements(destPath, IResource.PROJECT, updateFlags);
View Full Code Here

    monitor = Policy.monitorFor(monitor);
    try {
      String message = NLS.bind(Messages.resources_moving, getFullPath());
      monitor.beginTask(message, Policy.totalWork);
      IProject destination = workspace.getRoot().getProject(description.getName());
      final ISchedulingRule rule = workspace.getRuleFactory().moveRule(this, destination);
      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.
        if (!getName().equals(description.getName())) {
View Full Code Here

    monitor = Policy.monitorFor(monitor);
    try {
      String msg = NLS.bind(Messages.resources_opening_1, getName());
      monitor.beginTask(msg, Policy.totalWork);
      monitor.subTask(msg);
      final ISchedulingRule rule = workspace.getRuleFactory().modifyRule(this);
      try {
        workspace.prepareOperation(rule, monitor);
        ProjectInfo info = (ProjectInfo) getResourceInfo(false, false);
        int flags = getFlags(info);
        checkExists(flags, true);
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.