Package org.eclipse.core.runtime.jobs

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


    //    KEEP_HISTORY means capture .project file in local history
    //    FORCE means overwrite any existing .project file
    monitor = Policy.monitorFor(monitor);
    try {
      monitor.beginTask(Messages.resources_setDesc, Policy.totalWork);
      final ISchedulingRule rule = workspace.getRoot();
      try {
        //need to use root rule because nature configuration calls third party code
        workspace.prepareOperation(rule, monitor);
        ResourceInfo info = getResourceInfo(false, false);
        checkAccessible(getFlags(info));
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);
        workspace.broadcastEvent(LifecycleEvent.newEvent(LifecycleEvent.PRE_PROJECT_CHANGE, this));
        workspace.beginOperation(true);
        super.touch(Policy.subMonitorFor(monitor, Policy.opWork));
View Full Code Here

    /* (non-Javadoc)
   * @see IResource#createMarker(String)
   */
  public IMarker createMarker(String type) throws CoreException {
    EclipseAssert.isNotNull(type,"ExternalFile::createMarker()");
    final ISchedulingRule rule = workspace.getRuleFactory().markerRule(this);
    try {
      workspace.prepareOperation(rule, null);
      checkAccessible(getFlags(getResourceInfo(false, false)));
      workspace.beginOperation(true);
      MarkerInfo info = new MarkerInfo();
View Full Code Here

  }
 
  public static void setupLangProject(IProject project, boolean requireWsLock) throws CoreException {
    assertTrue(project.exists());
    if(requireWsLock) {
      ISchedulingRule currentRule = Job.getJobManager().currentRule();
      assertTrue(currentRule != null && currentRule.contains(project));
    }
    EclipseUtils.addNature(project, LangNature.NATURE_ID);
  }
View Full Code Here

    } else {
      fireResumeEvent(evaluationDetail);
    }
    // save and restore current breakpoint information - bug 30837
    IBreakpoint[] breakpoints = getBreakpoints();
    ISchedulingRule rule = null;
    if (evaluationDetail == DebugEvent.EVALUATION_IMPLICIT) {
      rule = getThreadRule();
    }
    try {
      if (rule != null) {
View Full Code Here

     *                DebugException's status code contains the underlying
     *                exception responsible for the failure.</li>
     *                </ul>
     */
    protected void step() throws DebugException {
      ISchedulingRule rule = getThreadRule();
      try {
        Job.getJobManager().beginRule(rule, null);
        JDIStackFrame top = (JDIStackFrame) getTopStackFrame();
        if (top == null) {
          return;
View Full Code Here

    }
    Job currentJob = Job.getJobManager().currentJob();
    if (currentJob == null) {
      return;
    }
    ISchedulingRule currentRule = currentJob.getRule();
    if (currentRule == null) {
      return;
    }
    throw new IllegalStateException("Cannot fork a thread from a thread owning a rule"); //$NON-NLS-1$
  }
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.