Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-patch] Update to CProjectHelper.

2002-10-18 Peter Graves
   src/org/eclipse/cdt/testplugin/CProjectHelper.jada
Cleanup of the CProjectHelper file to remove unused imports, commeted out code etc. Index: CProjectHelper.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/testplugin/CProjectHelper.java,v
retrieving revision 1.4
diff -u -r1.4 CProjectHelper.java
--- CProjectHelper.java    30 Sep 2002 19:43:26 -0000    1.4
+++ CProjectHelper.java    30 Oct 2002 21:21:17 -0000
@@ -1,12 +1,10 @@
package org.eclipse.cdt.testplugin;

-import java.io.File;
import java.lang.reflect.InvocationTargetException;
import java.util.zip.ZipFile;

import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.core.CProjectNature;
-import org.eclipse.cdt.core.model.CModelException;
import org.eclipse.cdt.core.model.IArchiveContainer;
import org.eclipse.cdt.core.model.IBinaryContainer;
import org.eclipse.cdt.core.model.ICFolder;
@@ -26,22 +24,15 @@
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Path;
import org.eclipse.ui.dialogs.IOverwriteQuery;
import org.eclipse.ui.wizards.datatransfer.ImportOperation;
import org.eclipse.ui.wizards.datatransfer.ZipFileStructureProvider;

/**
- * Helper methods to set up a IJavaProject.
+ * Helper methods to set up a ICProject.
 */
public class CProjectHelper {
- public static final IPath RT_STUBS= new Path("testresources/rtstubs.jar"); - public static final IPath JUNIT_SRC= new Path("testresources/junit37-noUI-src.zip"); - - public static final IPath MYLIB= new Path("testresources/mylib.jar"); - -
    /**
     * Creates a ICProject.
*/ @@ -72,24 +63,9 @@
     * Removes a ICProject.
*/ public static void delete(ICProject cproject) throws CoreException {
-        performDummySearch();
        cproject.getProject().delete(true, true, null);
    }

-    public static void performDummySearch() throws CModelException {
-        /*  SearchEngine().searchAllTypeNames(
-             ResourcesPlugin.getWorkspace(),
-            null,
-            null,
-            IJavaSearchConstants.EXACT_MATCH,
-            IJavaSearchConstants.CASE_SENSITIVE,
-            IJavaSearchConstants.CLASS,
-            SearchEngine.createJavaSearchScope(new IJavaElement[0]),
-            new Requestor(),
-            IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH,
-            null); */
-    }
-

    /**
     * Adds a source container to a ICProject.
@@ -121,7 +97,7 @@
    }

    /**
-     * Removes a source folder from a IJavaProject.
+     * Removes a source folder from a ICProject.
*/ public static void removeSourceContainer(ICProject cproject, String containerName) throws CoreException {
        IFolder folder= cproject.getProject().getFolder(containerName);
@@ -129,13 +105,6 @@
    }


-    /**
-     * Adds a required project entry.
- */ - public static void addRequiredProject(ICProject cproject, ICProject required) throws CModelException { - //IClasspathEntry cpe= JavaCore.newProjectEntry(required.getProject().getFullPath());
-        //addToClasspath(cproject, cpe);
- }
    /**
     * Attempts to find an archive with the given name in the workspace
@@ -243,35 +212,6 @@
        }
        return(null);
} - - - /**
-     * Try to find rt.jar
-     */
-    public static IPath[] findRtJar() {
-        File rtStubs= CTestPlugin.getDefault().getFileInPlugin(RT_STUBS);
-        if (rtStubs != null && rtStubs.exists()) {
-            return new IPath[] {
-                new Path(rtStubs.getPath()),
-                null,
-                null
-            };
-        }
- - /*
-        IVMInstall vmInstall= JavaRuntime.getDefaultVMInstall();
-        if (vmInstall != null) {
- LibraryLocation loc= vmInstall.getVMInstallType().getDefaultLibraryLocation(vmInstall.getInstallLocation());
-            if (loc != null) {
-                return new IPath[] {
-                       new Path(loc.getSystemLibrary().getPath()),
-                    new Path(loc.getSystemLibrarySource().getPath()),
-                    loc.getPackageRootPath()
-                };
-            }
-        }*/
-        return null;
-    }
private static void addNatureToProject(IProject proj, String natureId, IProgressMonitor monitor) throws CoreException {
        IProjectDescription description = proj.getDescription();




Back to the top