Examples of IWorkspaceRunnable


Examples of org.eclipse.core.resources.IWorkspaceRunnable

      String newVersionNumber = Byte.toString(State.VERSION);
      if (!newVersionNumber.equals(versionNumber)) {
        // build state version number has changed: touch every projects to force a rebuild
        if (JavaBuilder.DEBUG)
          System.out.println("Build state version number has changed"); //$NON-NLS-1$
        IWorkspaceRunnable runnable = new IWorkspaceRunnable() {
          public void run(IProgressMonitor progressMonitor2) throws CoreException {
            for (int i = 0, length = projects.length; i < length; i++) {
              IJavaProject project = projects[i];
              try {
                if (JavaBuilder.DEBUG)
View Full Code Here

Examples of org.eclipse.core.resources.IWorkspaceRunnable

          }
          else {
            // touch the projects to force them to be recompiled while taking the workspace lock
            //   so that there is no concurrency with the Java builder
            // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=96575
            IWorkspaceRunnable runnable = new IWorkspaceRunnable() {
              public void run(IProgressMonitor progressMonitor) throws CoreException {
                for (int i = 0; i < projectsToTouch.length; i++) {
                  IProject project = projectsToTouch[i];

                  // touch to force a build of this project
View Full Code Here

Examples of org.eclipse.core.resources.IWorkspaceRunnable

  protected void handleFinishException(Shell shell, InvocationTargetException e) {
  }

  public boolean performFinish() {
    IWorkspaceRunnable op = new IWorkspaceRunnable() {
      public void run(IProgressMonitor monitor) throws CoreException, OperationCanceledException {
        try {
          finishPage(monitor);
        } catch (InterruptedException e) {
          VisualSwingPlugin.getLogger().error(e);
View Full Code Here

Examples of org.eclipse.core.resources.IWorkspaceRunnable

    if (value == null)
      return;
   
    boolean save= force || fDocumentProvider.mustSaveDocument(value.input);
    if (save) {
      IWorkspaceRunnable action= new IWorkspaceRunnable() {
        public void run(IProgressMonitor pm) throws CoreException {
          fDocumentProvider.aboutToChange(value.input);
          fDocumentProvider.saveDocument(pm, value.input, value.document, true);
        }
      };
View Full Code Here

Examples of org.eclipse.core.resources.IWorkspaceRunnable

 
  public static IScriptProject setupStandardDeeProject(final IProject project, String installTypeId,
      String installId) throws CoreException {
    final String libraryBuildpathEntry = installTypeId + "/" + installId;
    EnvironmentManager.setEnvironmentId(project, null, false);
    ResourceUtils.getWorkspace().run(new IWorkspaceRunnable() {
      @Override
      public void run(IProgressMonitor monitor) throws CoreException {
        setupDeeProject(project, libraryBuildpathEntry);
      }
    }, null);
View Full Code Here

Examples of org.eclipse.core.resources.IWorkspaceRunnable

    }
  }

  public void dispose() throws CoreException {
    if(project == null || !project.exists()) return;
    ResourcesPlugin.getWorkspace().run(new IWorkspaceRunnable() {
      public void run(IProgressMonitor monitor) throws CoreException {
        IPath loc = project.getLocation();
        project.close(new NullProgressMonitor());
        project.delete(false, true, new NullProgressMonitor());
        if(makeCopy) {
View Full Code Here

Examples of org.eclipse.core.resources.IWorkspaceRunnable

    testProject=new TestProject();
   
  }
 
  public void testBuggyClassGetsProblemMarker() throws CoreException, OperationCanceledException, InterruptedException{
    IWorkspaceRunnable runnable=new IWorkspaceRunnable(){
      public void run(IProgressMonitor monitor) throws CoreException {
        IPackageFragment pack = testProject.createPackage("paket1") ;
        IType type= testProject.createType(pack, "AClass.java", "public class AClass {public voi m(){}}");
      }
    };
View Full Code Here

Examples of org.eclipse.core.resources.IWorkspaceRunnable

    IMarker[] markers = workspace.getRoot().findMarkers(IJavaModelMarker.JAVA_MODEL_PROBLEM_MARKER, true, IResource.DEPTH_INFINITE);
    assertEquals(1, markers.length);
  }  

  public void testCorrectClassHasNoProblemMarkers() throws CoreException, OperationCanceledException, InterruptedException{
    IWorkspaceRunnable runnable=new IWorkspaceRunnable(){   
      public void run(IProgressMonitor monitor) throws CoreException {
        IPackageFragment pack = testProject.createPackage("paket1") ;
        IType type= testProject.createType(pack, "AClass.java", "public class AClass {public void m(){}}")
      }
    };
View Full Code Here

Examples of org.eclipse.core.resources.IWorkspaceRunnable

  }

 
  public void testUsingJBehaveJar() throws CoreException, OperationCanceledException, InterruptedException, MalformedURLException, IOException{
    testProject.addJar("org.jbehave", "lib/jbehave.jar");
    IWorkspaceRunnable runnable=new IWorkspaceRunnable(){   
      public void run(IProgressMonitor monitor) throws CoreException {
       
        IPackageFragment pack = testProject.createPackage("paket1") ;
        IType type= testProject.createType(pack, "AClass.java", "public class AClass {public void m(){}}")
        IType testClass = testProject.createType(pack, "AClassBehaviour.java", "public class AClassBehaviour extends org.jbehave.core.mock.UsingMatchers{public void shouldAddUp(){ensureThat(2,eq(1+1));}}");
View Full Code Here

Examples of org.eclipse.core.resources.IWorkspaceRunnable

    assertEquals(0, markers.length);
  }

  public void testLaunchingTestCase() throws CoreException, OperationCanceledException, InterruptedException, MalformedURLException, IOException{
    testProject.addJar("org.jbehave", "lib/jbehave.jar");
    IWorkspaceRunnable runnable=new IWorkspaceRunnable(){   
      public void run(IProgressMonitor monitor) throws CoreException {
        IPackageFragment pack = testProject.createPackage("paket1") ;
        IType type= testProject.createType(pack, "AClass.java", "public class AClass {public void m(){}}")
        IType testClass = testProject.createType(pack, "AClassBehaviour.java", "public class AClassBehaviour extends org.jbehave.core.mock.UsingMatchers{public void shouldAddUp(){ensureThat(2,eq(1+1));}}");
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.