本文整理汇总了Java中org.eclipse.cdt.managedbuilder.core.IOption类的典型用法代码示例。如果您正苦于以下问题:Java IOption类的具体用法?Java IOption怎么用?Java IOption使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IOption类属于org.eclipse.cdt.managedbuilder.core包,在下文中一共展示了IOption类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: clearOptions
import org.eclipse.cdt.managedbuilder.core.IOption; //导入依赖的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));
}
}
示例2: setOption
import org.eclipse.cdt.managedbuilder.core.IOption; //导入依赖的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));
}
}
示例3: getToolSettings
import org.eclipse.cdt.managedbuilder.core.IOption; //导入依赖的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();
}
}
示例4: createOption
import org.eclipse.cdt.managedbuilder.core.IOption; //导入依赖的package包/类
@Override
public IOption createOption(IOption superClass, String Id, String name,
boolean isExtensionElement) {
return this.delegate.createOption(superClass, Id, name,
isExtensionElement);
}
示例5: removeOption
import org.eclipse.cdt.managedbuilder.core.IOption; //导入依赖的package包/类
@Override
public void removeOption(IOption option) {
this.delegate.removeOption(option);
}
示例6: getOption
import org.eclipse.cdt.managedbuilder.core.IOption; //导入依赖的package包/类
@SuppressWarnings("deprecation")
@Override
public IOption getOption(String id) {
return this.delegate.getOption(id);
}
示例7: getOptionById
import org.eclipse.cdt.managedbuilder.core.IOption; //导入依赖的package包/类
@Override
public IOption getOptionById(String id) {
return this.delegate.getOptionById(id);
}
示例8: getOptionBySuperClassId
import org.eclipse.cdt.managedbuilder.core.IOption; //导入依赖的package包/类
@Override
public IOption getOptionBySuperClassId(String id) {
return this.delegate.getOptionBySuperClassId(id);
}
示例9: getOptions
import org.eclipse.cdt.managedbuilder.core.IOption; //导入依赖的package包/类
@Override
public IOption[] getOptions() {
return this.delegate.getOptions();
}
示例10: getOptionToSet
import org.eclipse.cdt.managedbuilder.core.IOption; //导入依赖的package包/类
@Override
public IOption getOptionToSet(IOption option, boolean adjustExtension)
throws BuildException {
return this.delegate.getOptionToSet(option, adjustExtension);
}
示例11: setToolSettings
import org.eclipse.cdt.managedbuilder.core.IOption; //导入依赖的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();
}
}