| /* | |
| * (c) Copyright IBM Corp. 2000, 2001. | |
| * All Rights Reserved. | |
| */ | |
| package org.eclipse.jdt.testplugin; | |
| import org.eclipse.core.resources.IWorkspace; | |
| import org.eclipse.core.resources.IWorkspaceDescription; | |
| import org.eclipse.core.resources.ResourcesPlugin; | |
| import org.eclipse.core.runtime.CoreException; | |
| import org.eclipse.core.runtime.IPluginDescriptor; | |
| import org.eclipse.core.runtime.Plugin; | |
| public class JavaTestPlugin extends Plugin { | |
| private static JavaTestPlugin fgDefault; | |
| public JavaTestPlugin(IPluginDescriptor descriptor) { | |
| super(descriptor); | |
| fgDefault= this; | |
| } | |
| public static JavaTestPlugin getDefault() { | |
| return fgDefault; | |
| } | |
| public static IWorkspace getWorkspace() { | |
| return ResourcesPlugin.getWorkspace(); | |
| } | |
| public static void enableAutobuild(boolean enable) throws CoreException { | |
| // disable auto build | |
| IWorkspace workspace= fgDefault.getWorkspace(); | |
| IWorkspaceDescription desc= workspace.getDescription(); | |
| desc.setAutoBuilding(enable); | |
| workspace.setDescription(desc); | |
| } | |
| } |