Search in sources :

Example 21 with IOption

use of org.eclipse.cdt.managedbuilder.core.IOption in project m2e-nar by maven-nar.

the class OptionSetter method setOption.

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));
    }
}
Also used : IStatus(org.eclipse.core.runtime.IStatus) Status(org.eclipse.core.runtime.Status) CoreException(org.eclipse.core.runtime.CoreException) IOption(org.eclipse.cdt.managedbuilder.core.IOption) BuildException(org.eclipse.cdt.managedbuilder.core.BuildException) ITool(org.eclipse.cdt.managedbuilder.core.ITool)

Example 22 with IOption

use of org.eclipse.cdt.managedbuilder.core.IOption in project m2e-nar by maven-nar.

the class OptionSetter method setOption.

public void setOption(final String optionId, final String[] values) throws CoreException {
    try {
        for (final ITool tool : config.getToolsBySuperClassId(toolId)) {
            final IOption option = tool.getOptionBySuperClassId(optionId);
            config.setOption(tool, option, values);
        }
    } catch (BuildException e) {
        throw new CoreException(new Status(IStatus.ERROR, MavenNarPlugin.PLUGIN_ID, "Couldn't set " + optionId + " option", e));
    }
}
Also used : IStatus(org.eclipse.core.runtime.IStatus) Status(org.eclipse.core.runtime.Status) CoreException(org.eclipse.core.runtime.CoreException) IOption(org.eclipse.cdt.managedbuilder.core.IOption) BuildException(org.eclipse.cdt.managedbuilder.core.BuildException) ITool(org.eclipse.cdt.managedbuilder.core.ITool)

Aggregations

IOption (org.eclipse.cdt.managedbuilder.core.IOption)22 BuildException (org.eclipse.cdt.managedbuilder.core.BuildException)11 IToolChain (org.eclipse.cdt.managedbuilder.core.IToolChain)10 IConfiguration (org.eclipse.cdt.managedbuilder.core.IConfiguration)9 ITool (org.eclipse.cdt.managedbuilder.core.ITool)8 ArrayList (java.util.ArrayList)5 ToolInformationData (net.sourceforge.usbdm.constants.ToolInformationData)5 CoreException (org.eclipse.core.runtime.CoreException)5 IStatus (org.eclipse.core.runtime.IStatus)5 Status (org.eclipse.core.runtime.Status)5 UsbdmSharedSettings (net.sourceforge.usbdm.constants.UsbdmSharedSettings)4 IPath (org.eclipse.core.runtime.IPath)4 List (java.util.List)3 IFolderInfo (org.eclipse.cdt.managedbuilder.core.IFolderInfo)3 BuildMacroException (org.eclipse.cdt.managedbuilder.macros.BuildMacroException)3 Vector (java.util.Vector)2 ProcessFailureException (org.eclipse.cdt.core.templateengine.process.ProcessFailureException)2 IInputType (org.eclipse.cdt.managedbuilder.core.IInputType)2 IManagedBuildInfo (org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo)2 IManagedOutputNameProvider (org.eclipse.cdt.managedbuilder.core.IManagedOutputNameProvider)2