use of org.eclipse.cdt.core.settings.model.ICConfigExtensionReference in project linuxtools by eclipse.
the class CProjectHelper method addDefaultBinaryParser.
/**
* Add the default binary parser if no binary parser configured.
*
* @param project
* @throws CoreException
*/
private static boolean addDefaultBinaryParser(IProject project) throws CoreException {
ICConfigExtensionReference[] binaryParsers = CCorePlugin.getDefault().getDefaultBinaryParserExtensions(project);
if (binaryParsers == null || binaryParsers.length == 0) {
ICProjectDescription desc = CCorePlugin.getDefault().getProjectDescription(project);
if (desc == null) {
return false;
}
desc.getDefaultSettingConfiguration().create(CCorePlugin.BINARY_PARSER_UNIQ_ID, CCorePlugin.DEFAULT_BINARY_PARSER_UNIQ_ID);
CCorePlugin.getDefault().setProjectDescription(project, desc);
}
return true;
}
use of org.eclipse.cdt.core.settings.model.ICConfigExtensionReference in project linuxtools by eclipse.
the class CProjectHelper method addDefaultBinaryParser.
/**
* Add the default binary parser if no binary parser configured.
*
* @param project
* @throws CoreException
*/
private static boolean addDefaultBinaryParser(IProject project) throws CoreException {
ICConfigExtensionReference[] binaryParsers = CCorePlugin.getDefault().getDefaultBinaryParserExtensions(project);
if (binaryParsers == null || binaryParsers.length == 0) {
ICProjectDescription desc = CCorePlugin.getDefault().getProjectDescription(project);
if (desc == null) {
return false;
}
desc.getDefaultSettingConfiguration().create(CCorePlugin.BINARY_PARSER_UNIQ_ID, CCorePlugin.DEFAULT_BINARY_PARSER_UNIQ_ID);
CCorePlugin.getDefault().setProjectDescription(project, desc);
}
return true;
}
Aggregations