當前位置: 首頁>>代碼示例>>Java>>正文


Java IWorkspace.getDescription方法代碼示例

本文整理匯總了Java中org.eclipse.core.resources.IWorkspace.getDescription方法的典型用法代碼示例。如果您正苦於以下問題:Java IWorkspace.getDescription方法的具體用法?Java IWorkspace.getDescription怎麽用?Java IWorkspace.getDescription使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.eclipse.core.resources.IWorkspace的用法示例。


在下文中一共展示了IWorkspace.getDescription方法的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: setAutobuild

import org.eclipse.core.resources.IWorkspace; //導入方法依賴的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

示例2: toggleAutobuild

import org.eclipse.core.resources.IWorkspace; //導入方法依賴的package包/類
private static void toggleAutobuild(final boolean enabled) {
	final IWorkspace workspace = getWorkspace();
	final IWorkspaceDescription description = workspace.getDescription();
	description.setAutoBuilding(enabled);
	try {
		LOGGER.info("Turning auto-build " + (enabled ? "on" : "off") + "...");
		workspace.setDescription(description);
		LOGGER.info("Auto-build was successfully turned " + (enabled ? "on" : "off") + ".");
	} catch (final CoreException e) {
		throw new RuntimeException("Error while toggling auto-build", e);
	}
}
 
開發者ID:eclipse,項目名稱:n4js,代碼行數:13,代碼來源:AbstractIDEBUG_Test.java

示例3: setAutobuild

import org.eclipse.core.resources.IWorkspace; //導入方法依賴的package包/類
/** Sets workspace auto-build according to the provided flag. Thrown exceptions are handled by logging. */
private static void setAutobuild(boolean on) {
	try {
		final IWorkspace workspace = getWorkspace();
		final IWorkspaceDescription description = workspace.getDescription();
		description.setAutoBuilding(on);
		workspace.setDescription(description);
	} catch (CoreException e) {
		LOGGER.debug("Organize imports cannot set auto build to " + on + ".");
	}
}
 
開發者ID:eclipse,項目名稱:n4js,代碼行數:12,代碼來源:N4JSOrganizeImportsHandler.java

示例4: setAutoBuilding

import org.eclipse.core.resources.IWorkspace; //導入方法依賴的package包/類
/**
 * @param value
 */
public static void setAutoBuilding(boolean value) {
	IWorkspace workspace = ResourcesPlugin.getWorkspace();
	if (workspace.isAutoBuilding() == value)
		return;
	IWorkspaceDescription desc = workspace.getDescription();
	desc.setAutoBuilding(value);
	try {
		workspace.setDescription(desc);
	} catch (CoreException e) {
		ResourceManager.logException(e);
	}
}
 
開發者ID:gw4e,項目名稱:gw4e.project,代碼行數:16,代碼來源:ResourceManager.java

示例5: isAutoBuilding

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

}
 
開發者ID:gw4e,項目名稱:gw4e.project,代碼行數:10,代碼來源:ResourceManager.java

示例6: configWorkspace

import org.eclipse.core.resources.IWorkspace; //導入方法依賴的package包/類
private void configWorkspace(IWorkspace workspace) {
	IWorkspaceDescription workspaceDesc = workspace.getDescription();
	workspaceDesc.setAutoBuilding(false); // we do not want the workspace to rebuild the project every time a new resource is added
	try {
		workspace.setDescription(workspaceDesc);
	} catch (CoreException exc) {
		Activator.log(IStatus.ERROR, "Error trying to set workspace description: " + exc.getMessage());
	}

}
 
開發者ID:Synectique,項目名稱:VerveineC-Cpp,代碼行數:11,代碼來源:VerveineCParser.java

示例7: turnOffAutoBuildIfOn

import org.eclipse.core.resources.IWorkspace; //導入方法依賴的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

示例8: turnOnAutoBuild

import org.eclipse.core.resources.IWorkspace; //導入方法依賴的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

示例9: setAutoBuilding

import org.eclipse.core.resources.IWorkspace; //導入方法依賴的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

示例10: setWorkspaceAutoBuild

import org.eclipse.core.resources.IWorkspace; //導入方法依賴的package包/類
public static void setWorkspaceAutoBuild(boolean flag) throws CoreException {
	IWorkspace workspace = getWorkspace();
	IWorkspaceDescription description = workspace.getDescription();
	description.setAutoBuilding(flag);
	workspace.setDescription(description);
}
 
開發者ID:de-jcup,項目名稱:egradle,代碼行數:7,代碼來源:IDEUtil.java

示例11: isWorkspaceAutoBuildEnabled

import org.eclipse.core.resources.IWorkspace; //導入方法依賴的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.IWorkspace.getDescription方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。