当前位置: 首页>>代码示例>>Java>>正文


Java IWorkspaceDescription.isAutoBuilding方法代码示例

本文整理汇总了Java中org.eclipse.core.resources.IWorkspaceDescription.isAutoBuilding方法的典型用法代码示例。如果您正苦于以下问题:Java IWorkspaceDescription.isAutoBuilding方法的具体用法?Java IWorkspaceDescription.isAutoBuilding怎么用?Java IWorkspaceDescription.isAutoBuilding使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.core.resources.IWorkspaceDescription的用法示例。


在下文中一共展示了IWorkspaceDescription.isAutoBuilding方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: toggleAutobuild

import org.eclipse.core.resources.IWorkspaceDescription; //导入方法依赖的package包/类
private void toggleAutobuild(final boolean enable) {
	if (isWorkbenchRunning()) {
		final IWorkspaceDescription workspaceDescription = getWorkspace().getDescription();
		if (null != workspaceDescription) {
			if (workspaceDescription.isAutoBuilding() != enable) {
				workspaceDescription.setAutoBuilding(enable);
				try {
					getWorkspace().setDescription(workspaceDescription);
				} catch (final CoreException e) {
					throw new IllegalStateException("Error while trying to turn workspace autobuild "
							+ (enable ? "on" : "off") + ".", e);
				}
			}
		}

	}
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:18,代码来源:AbstractBuilderTest.java

示例2: setAutobuild

import org.eclipse.core.resources.IWorkspaceDescription; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override
public boolean setAutobuild(final boolean autoBuildStatus) {
  synchronized (autoBuildMutex) {
    IWorkspace workspace = ResourcesPlugin.getWorkspace();
    IWorkspaceDescription description = workspace.getDescription();
    boolean oldAutoBuildStatus = description.isAutoBuilding();
    if (oldAutoBuildStatus != autoBuildStatus) {
      description.setAutoBuilding(autoBuildStatus);
      try {
        workspace.setDescription(description);
      } catch (CoreException e) {
        throw new WrappedException("Failed to set workspace description", e);
      }
    }
    return oldAutoBuildStatus;
  }
}
 
开发者ID:dsldevkit,项目名称:dsl-devkit,代码行数:19,代码来源:XtextTestProjectManager.java

示例3: setUpSuite

import org.eclipse.core.resources.IWorkspaceDescription; //导入方法依赖的package包/类
@Override
public void setUpSuite() throws Exception {
	// ensure auto-building is turned off
       IWorkspaceDescription descr = getWorkspace().getDescription();
       if (descr.isAutoBuilding()) {
           descr.setAutoBuilding(false);
           getWorkspace().setDescription(descr);
       }
       try {
       	if (testProjects != null) {
       		for (String curPrj : testProjects) {
       			setUpJavaProject(curPrj);
			}
       	}
	}
       catch (NullPointerException ex) {
		throw new IllegalStateException("Test project has not been set properly!");
	}

	super.setUpSuite();
}
 
开发者ID:jwloka,项目名称:reflectify,代码行数:22,代码来源:FileBasedTest.java

示例4: isAutoBuilding

import org.eclipse.core.resources.IWorkspaceDescription; //导入方法依赖的package包/类
/**
 * @return
 */
public static boolean isAutoBuilding() {
	IWorkspace workspace = ResourcesPlugin.getWorkspace();
	IWorkspaceDescription desc = workspace.getDescription();
	return desc.isAutoBuilding();

}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:10,代码来源:ResourceManager.java

示例5: turnOffAutoBuildIfOn

import org.eclipse.core.resources.IWorkspaceDescription; //导入方法依赖的package包/类
/**
 * Turns off the automatic build feature of the workbench if it is currently switched on and
 * returns {@code true} when this was the case.
 * 
 * @return whether autobuild was on
 * @throws CoreException
 *             if the feature could not be set
 */
public static boolean turnOffAutoBuildIfOn() throws CoreException {
    final IWorkspace workspace = ResourcesPlugin.getWorkspace();
    final IWorkspaceDescription description = workspace.getDescription();
    if (description.isAutoBuilding()) {
        description.setAutoBuilding(false);
        workspace.setDescription(description);
        return true;
    } else {
        return false;
    }
}
 
开发者ID:vitruv-tools,项目名称:Vitruv,代码行数:20,代码来源:EclipseBridge.java

示例6: turnOnAutoBuild

import org.eclipse.core.resources.IWorkspaceDescription; //导入方法依赖的package包/类
/**
 * Turns on the automatic build feature of the workbench.
 * 
 * @throws CoreException
 *             if the feature could not be set
 */
public static void turnOnAutoBuild() throws CoreException {
    final IWorkspace workspace = ResourcesPlugin.getWorkspace();
    final IWorkspaceDescription description = workspace.getDescription();
    if (!description.isAutoBuilding()) {
        description.setAutoBuilding(true);
        workspace.setDescription(description);
    }
}
 
开发者ID:vitruv-tools,项目名称:Vitruv,代码行数:15,代码来源:EclipseBridge.java

示例7: disableAutoBuild

import org.eclipse.core.resources.IWorkspaceDescription; //导入方法依赖的package包/类
private void disableAutoBuild() throws CoreException {
	IWorkspaceDescription desc = workspace.getDescription();
	if (desc.isAutoBuilding()) {
		isAutoBuildActivated = true;
		desc.setAutoBuilding(false);
		workspace.setDescription(desc);
	}
}
 
开发者ID:turnus,项目名称:turnus.orcc,代码行数:9,代码来源:OrccCodeAnalysisCli.java

示例8: setAutoBuilding

import org.eclipse.core.resources.IWorkspaceDescription; //导入方法依赖的package包/类
public boolean setAutoBuilding(boolean enable) throws CoreException {
	IWorkspace workspace = ResourcesPlugin.getWorkspace();
	IWorkspaceDescription description = workspace.getDescription();
	boolean changed = description.isAutoBuilding() != enable;
	if (changed) {
		description.setAutoBuilding(enable);
		workspace.setDescription(description);
	}
	return changed;
}
 
开发者ID:eclipse,项目名称:eclipse.jdt.ls,代码行数:11,代码来源:ProjectsManager.java

示例9: setAutoBuilding

import org.eclipse.core.resources.IWorkspaceDescription; //导入方法依赖的package包/类
public static void setAutoBuilding(boolean enabled) throws CoreException {
	IWorkspaceDescription wsd = getWorkspace().getDescription();
	if (!wsd.isAutoBuilding() == enabled) {
		wsd.setAutoBuilding(enabled);
		getWorkspace().setDescription(wsd);
	}
}
 
开发者ID:eclipse,项目名称:cft,代码行数:8,代码来源:StsTestUtil.java

示例10: setAutoBuilding

import org.eclipse.core.resources.IWorkspaceDescription; //导入方法依赖的package包/类
/**
 * Enables or disables automatic building of projects.
 */
public static void setAutoBuilding(boolean enable) throws CoreException {
  IWorkspaceDescription desc = ResourcesPlugin.getWorkspace().getDescription();
  if (desc.isAutoBuilding() != enable) {
    desc.setAutoBuilding(enable);
    ResourcesPlugin.getWorkspace().setDescription(desc);
  }
}
 
开发者ID:gwt-plugins,项目名称:gwt-eclipse-plugin,代码行数:11,代码来源:ProjectTestUtil.java

示例11: setAutoBuilding

import org.eclipse.core.resources.IWorkspaceDescription; //导入方法依赖的package包/类
/**
* Sets whether building automatically is enabled in the workspace or not and returns the old
* value.
* 
* @param state <code>true</code> if automatically building is enabled, <code>false</code>
*            otherwise
* @return the old state
* @throws CoreException thrown if the operation failed
*/
  public static boolean setAutoBuilding(boolean state) throws CoreException {
      IWorkspace workspace= ResourcesPlugin.getWorkspace();
      IWorkspaceDescription desc= workspace.getDescription();
      boolean isAutoBuilding= desc.isAutoBuilding();
      if (isAutoBuilding != state) {
          desc.setAutoBuilding(state);
          workspace.setDescription(desc);
      }
      return isAutoBuilding;
  }
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:20,代码来源:CoreUtility.java

示例12: run

import org.eclipse.core.resources.IWorkspaceDescription; //导入方法依赖的package包/类
@Override
public void run(final IAction action) {
    if (selection == null || selection.isEmpty()) {
        return;
    }
    IWorkspace workspace = ResourcesPlugin.getWorkspace();
    IWorkspaceDescription description = workspace.getDescription();
    if (!description.isAutoBuilding() && getClass().equals(FindBugsAction.class)) {
        boolean confirm = MessageDialog.openConfirm(null, "Project -> 'Build Automatically' disabled",
                "You are going to run FindBugs analysis on a not compiled or partially compiled project.\n\n"
                        + "To get reliable analysis results, you should make sure that project is compiled first.\n\n"
                        + "Continue with FindBugs analysis?");
        if (!confirm) {
            return;
        }
    }

    if (selection instanceof IStructuredSelection) {
        IStructuredSelection sSelection = (IStructuredSelection) selection;

        dialogAlreadyShown = false;
        Map<IProject, List<WorkItem>> projectMap = ResourceUtils.getResourcesPerProject(sSelection);
        for (Map.Entry<IProject, List<WorkItem>> e : projectMap.entrySet()) {
            work(targetPart, e.getKey(), e.getValue());
        }
        targetPart = null;
        selection = null;
    }
}
 
开发者ID:OpenNTF,项目名称:FindBug-for-Domino-Designer,代码行数:30,代码来源:FindBugsAction.java

示例13: setAutoBuilding

import org.eclipse.core.resources.IWorkspaceDescription; //导入方法依赖的package包/类
/**
* Sets whether building automatically is enabled in the workspace or not and returns the old
* value.
*
* @param state <code>true</code> if automatically building is enabled, <code>false</code>
*            otherwise
* @return the old state
* @throws CoreException thrown if the operation failed
*/
  public static boolean setAutoBuilding(boolean state) throws CoreException {
      IWorkspace workspace= ResourcesPlugin.getWorkspace();
      IWorkspaceDescription desc= workspace.getDescription();
      boolean isAutoBuilding= desc.isAutoBuilding();
      if (isAutoBuilding != state) {
          desc.setAutoBuilding(state);
          workspace.setDescription(desc);
      }
      return isAutoBuilding;
  }
 
开发者ID:fabioz,项目名称:eclipse.spellchecker,代码行数:20,代码来源:CoreUtility.java

示例14: setUpSuite

import org.eclipse.core.resources.IWorkspaceDescription; //导入方法依赖的package包/类
public void setUpSuite() throws Exception {
	super.setUpSuite();

	// ensure autobuilding is turned off
	IWorkspaceDescription description = getWorkspace().getDescription();
	if (description.isAutoBuilding()) {
		description.setAutoBuilding(false);
		getWorkspace().setDescription(description);
	}
}
 
开发者ID:jwloka,项目名称:reflectify,代码行数:11,代码来源:AbstractJavaModelTests.java

示例15: isWorkspaceAutoBuildEnabled

import org.eclipse.core.resources.IWorkspaceDescription; //导入方法依赖的package包/类
public static boolean isWorkspaceAutoBuildEnabled() throws CoreException {
	IWorkspace workspace = getWorkspace();
	IWorkspaceDescription description = workspace.getDescription();
	return description.isAutoBuilding();
}
 
开发者ID:de-jcup,项目名称:egradle,代码行数:6,代码来源:IDEUtil.java


注:本文中的org.eclipse.core.resources.IWorkspaceDescription.isAutoBuilding方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。