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


Java ITool类代码示例

本文整理汇总了Java中org.eclipse.cdt.managedbuilder.core.ITool的典型用法代码示例。如果您正苦于以下问题:Java ITool类的具体用法?Java ITool怎么用?Java ITool使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ITool类属于org.eclipse.cdt.managedbuilder.core包,在下文中一共展示了ITool类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: clearOptions

import org.eclipse.cdt.managedbuilder.core.ITool; //导入依赖的package包/类
public void clearOptions() throws CoreException {
	try {
		for (ITool tool : config.getToolsBySuperClassId(toolId)) {
			for (IOption option : tool.getOptions()) {
				switch (option.getValueType()) {
				case IOption.BOOLEAN:
					config.setOption(tool, option, false);
					break;
				case IOption.STRING:
					config.setOption(tool, option, (String) null);
					break;
				}
			}
		}
	} catch (BuildException e) {
		throw new CoreException(new Status(IStatus.ERROR, MavenNarPlugin.PLUGIN_ID, "Couldn't clear options", e));
	}
}
 
开发者ID:maven-nar,项目名称:m2e-nar,代码行数:19,代码来源:OptionSetter.java

示例2: fullSync

import org.eclipse.cdt.managedbuilder.core.ITool; //导入依赖的package包/类
@Override
public void fullSync(ICConfigurationDescription cfg, NarBuildArtifact artifactSettings) throws CoreException {
	BuildConfigurationData confData = (BuildConfigurationData) cfg.getConfigurationData();
	IConfiguration managedConf = confData.getConfiguration();
	for (final ITool tool : managedConf.getToolsBySuperClassId(getToolId())) {
		tool.setToolCommand(getCompilerSettings(artifactSettings).getName());
	}
	final OptionSetter optionSetter = new OptionSetter(managedConf, getToolId());

	setUndefinedSymbols(optionSetter, artifactSettings);
	setOptimization(optionSetter, artifactSettings);
	setDebug(optionSetter, artifactSettings);
	setOptions(optionSetter, artifactSettings);
}
 
开发者ID:maven-nar,项目名称:m2e-nar,代码行数:15,代码来源:AbstractGnuCompilerSynchroniser.java

示例3: fullSync

import org.eclipse.cdt.managedbuilder.core.ITool; //导入依赖的package包/类
@Override
public void fullSync(ICConfigurationDescription cfg, NarBuildArtifact artifactSettings) throws CoreException {
	final BuildConfigurationData confData = (BuildConfigurationData) cfg.getConfigurationData();
	final IConfiguration managedConf = confData.getConfiguration();
	for (final ITool tool : managedConf.getToolsBySuperClassId(getToolId())) {
		tool.setToolCommand(artifactSettings.getLinkerSettings().getName());
	}
}
 
开发者ID:maven-nar,项目名称:m2e-nar,代码行数:9,代码来源:AbstractGnuLinkerSynchroniser.java

示例4: setOption

import org.eclipse.cdt.managedbuilder.core.ITool; //导入依赖的package包/类
public void setOption(final String optionId, final String value) throws CoreException {
	try {
		for (final ITool tool : config.getToolsBySuperClassId(toolId)) {
			final IOption option = tool.getOptionBySuperClassId(optionId);
			config.setOption(tool, option, value);
		}
	} catch (BuildException e) {
		throw new CoreException(new Status(IStatus.ERROR, MavenNarPlugin.PLUGIN_ID, "Couldn't set " + optionId + " option", e));
	}
}
 
开发者ID:maven-nar,项目名称:m2e-nar,代码行数:11,代码来源:OptionSetter.java

示例5: getToolSettings

import org.eclipse.cdt.managedbuilder.core.ITool; //导入依赖的package包/类
private void getToolSettings()   {
	ITool cmakeTool = getCMakeTool();

	try {
		IOption toolchainfileOption = cmakeTool.getOptionBySuperClassId(CMAKE_OPTION_TOOLCHAINFILE);
		m_toolchainFile = toolchainfileOption.getStringValue();
		cmakeToolchainFileTextField.setText(m_toolchainFile);

		IOption builyTypeOption = cmakeTool.getOptionBySuperClassId(CMAKE_OPTION_BUILDTYPE);
		m_buildType = builyTypeOption.getStringValue();
		switch(m_buildType) 
		{
		case "Debug":          cmakeBuildTypeCombo.select(0);
		case "Release":        cmakeBuildTypeCombo.select(1);
		case "RelWithDebInfo": cmakeBuildTypeCombo.select(2);
		case "MinSizeRel":     cmakeBuildTypeCombo.select(3);
		default:               cmakeBuildTypeCombo.select(0);
		}					
		
		IOption debugOption = cmakeTool.getOptionBySuperClassId(CMAKE_OPTION_DEBUG);
		m_debug = debugOption.getBooleanValue();
		debugBtn.setSelection(m_debug);
		
		IOption traceOption = cmakeTool.getOptionBySuperClassId(CMAKE_OPTION_TRACE);
		m_trace = traceOption.getBooleanValue();
		traceBtn.setSelection(m_trace);
		
	} catch (BuildException e1) {
		// TODO Auto-generated catch block
		e1.printStackTrace();
	}
}
 
开发者ID:rungemar,项目名称:cmake4cdt,代码行数:33,代码来源:CPropertyTab.java

示例6: getCMakeTool

import org.eclipse.cdt.managedbuilder.core.ITool; //导入依赖的package包/类
private ITool getCMakeTool() {
	IConfiguration cfg = ManagedBuildManager.getConfigurationForDescription(cfgd);
	ITool[] cmakeTools = cfg.getToolsBySuperClassId(CMakeMakefileGenerator.CMAKE_TOOL_ID);
	ITool cmakeTool = null;
	if(cmakeTools.length > 0) {
		cmakeTool = cmakeTools[0];
	}
	return cmakeTool;
}
 
开发者ID:rungemar,项目名称:cmake4cdt,代码行数:10,代码来源:CPropertyTab.java

示例7: setToolSettings

import org.eclipse.cdt.managedbuilder.core.ITool; //导入依赖的package包/类
private void setToolSettings()  {
		
		
//		if( settingsChanged() ) {
			rmOutputDir();
//		}
		ITool cmakeTool = getCMakeTool();
		
		try {
	        // -- get resource info. (where things are saved to).
	        IResourceInfo resourceInfos[] = ManagedBuildManager.getConfigurationForDescription(cfgd).getResourceInfos();
	        IResourceInfo resourceInfo = resourceInfos[0];

	        IOption toolchainfileOptionTmpl = cmakeTool.getOptionById(CMAKE_OPTION_TOOLCHAINFILE);

	        IOption toolchainfileOption = cmakeTool.getOptionToSet(toolchainfileOptionTmpl, false);
			toolchainfileOption.setValue(m_toolchainFile);
	        ManagedBuildManager.setOption(resourceInfo, cmakeTool, toolchainfileOption, m_toolchainFile);

			IOption builyTypeOptionTmpl = cmakeTool.getOptionById(CMAKE_OPTION_BUILDTYPE);
			IOption builyTypeOption = cmakeTool.getOptionToSet(builyTypeOptionTmpl, false);
			builyTypeOption.setValue(m_buildType);
	        ManagedBuildManager.setOption(resourceInfo, cmakeTool, toolchainfileOption, m_toolchainFile);

			IOption debugOptionTmpl = cmakeTool.getOptionById(CMAKE_OPTION_DEBUG);
			IOption debugOption = cmakeTool.getOptionToSet(debugOptionTmpl, false);
			debugOption.setValue(m_debug);
	        ManagedBuildManager.setOption(resourceInfo, cmakeTool, toolchainfileOption, m_toolchainFile);
			
			IOption traceOptionTmpl = cmakeTool.getOptionById(CMAKE_OPTION_TRACE);
			IOption traceOption = cmakeTool.getOptionToSet(traceOptionTmpl, false);
			traceOption.setValue(m_trace);
	        ManagedBuildManager.setOption(resourceInfo, cmakeTool, toolchainfileOption, m_toolchainFile);
 
	        // ------ Save this business to disk.
	        ManagedBuildManager.saveBuildInfo(cfgd.getProjectDescription().getProject(), true);
			
		} catch (BuildException e1) {
			// TODO Auto-generated catch block
			e1.printStackTrace();
		}
		
	}
 
开发者ID:rungemar,项目名称:cmake4cdt,代码行数:44,代码来源:CPropertyTab.java


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