本文整理汇总了Java中org.eclipse.jdt.internal.ui.util.CoreUtility.setAutoBuilding方法的典型用法代码示例。如果您正苦于以下问题:Java CoreUtility.setAutoBuilding方法的具体用法?Java CoreUtility.setAutoBuilding怎么用?Java CoreUtility.setAutoBuilding使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.jdt.internal.ui.util.CoreUtility
的用法示例。
在下文中一共展示了CoreUtility.setAutoBuilding方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: performFinish
import org.eclipse.jdt.internal.ui.util.CoreUtility; //导入方法依赖的package包/类
/**
* Called from the wizard on finish.
*
* @param monitor the progress monitor
* @throws CoreException thrown when the project creation or configuration failed
* @throws InterruptedException thrown when the user cancelled the project creation
*/
public void performFinish(IProgressMonitor monitor) throws CoreException, InterruptedException {
try {
monitor.beginTask(NewWizardMessages.NewJavaProjectWizardPageTwo_operation_create, 3);
if (fCurrProject == null) {
updateProject(new SubProgressMonitor(monitor, 1));
}
String newProjectCompliance= fKeepContent ? null : fFirstPage.getCompilerCompliance();
configureJavaProject(newProjectCompliance, new SubProgressMonitor(monitor, 2));
} finally {
monitor.done();
fCurrProject= null;
if (fIsAutobuild != null) {
CoreUtility.setAutoBuilding(fIsAutobuild.booleanValue());
fIsAutobuild= null;
}
}
}
示例2: doRemoveProject
import org.eclipse.jdt.internal.ui.util.CoreUtility; //导入方法依赖的package包/类
private final void doRemoveProject(IProgressMonitor monitor) throws InvocationTargetException {
final boolean noProgressMonitor= (fCurrProjectLocation == null); // inside workspace
if (monitor == null || noProgressMonitor) {
monitor= new NullProgressMonitor();
}
monitor.beginTask(NewWizardMessages.NewJavaProjectWizardPageTwo_operation_remove, 3);
try {
try {
URI projLoc= fCurrProject.getLocationURI();
boolean removeContent= !fKeepContent && fCurrProject.isSynchronized(IResource.DEPTH_INFINITE);
if (!removeContent) {
restoreExistingFolders(projLoc);
}
fCurrProject.delete(removeContent, false, new SubProgressMonitor(monitor, 2));
restoreExistingFiles(projLoc, new SubProgressMonitor(monitor, 1));
} finally {
CoreUtility.setAutoBuilding(fIsAutobuild.booleanValue()); // fIsAutobuild must be set
fIsAutobuild= null;
}
} catch (CoreException e) {
throw new InvocationTargetException(e);
} finally {
monitor.done();
fCurrProject= null;
fKeepContent= false;
}
}
示例3: aboutToPerformHistory
import org.eclipse.jdt.internal.ui.util.CoreUtility; //导入方法依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
protected RefactoringStatus aboutToPerformHistory(final IProgressMonitor monitor) {
final RefactoringStatus status= new RefactoringStatus();
try {
fJavaProject= null;
fSourceFolder= null;
fProcessedFragments.clear();
monitor.beginTask(JarImportMessages.JarImportWizard_prepare_import, 520);
status.merge(super.aboutToPerformHistory(new SubProgressMonitor(monitor, 10, SubProgressMonitor.SUPPRESS_SUBTASK_LABEL)));
if (!status.hasFatalError()) {
final IPackageFragmentRoot root= getPackageFragmentRoot();
if (root != null) {
status.merge(checkPackageFragmentRoots(root, new SubProgressMonitor(monitor, 90, SubProgressMonitor.SUPPRESS_SUBTASK_LABEL)));
if (!status.hasFatalError()) {
status.merge(checkSourceAttachmentRefactorings(new SubProgressMonitor(monitor, 20, SubProgressMonitor.SUPPRESS_SUBTASK_LABEL)));
if (!status.hasFatalError()) {
final IJavaProject project= root.getJavaProject();
if (project != null) {
final IFolder folder= project.getProject().getFolder(SOURCE_FOLDER + String.valueOf(System.currentTimeMillis()));
try {
fAutoBuild= CoreUtility.setAutoBuilding(false);
final RefactoringHistory history= getRefactoringHistory();
if (history != null && !history.isEmpty())
configureClasspath(project, root, folder, new SubProgressMonitor(monitor, 300, SubProgressMonitor.SUPPRESS_SUBTASK_LABEL));
} catch (CoreException exception) {
status.merge(RefactoringStatus.createFatalErrorStatus(exception.getLocalizedMessage()));
try {
project.setRawClasspath(project.readRawClasspath(), false, new SubProgressMonitor(monitor, 100, SubProgressMonitor.SUPPRESS_SUBTASK_LABEL));
} catch (CoreException throwable) {
JavaPlugin.log(throwable);
}
} finally {
if (!status.hasFatalError()) {
fJavaProject= project;
fSourceFolder= folder;
}
}
}
}
}
}
}
} finally {
monitor.done();
}
return status;
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:51,代码来源:BinaryRefactoringHistoryWizard.java