diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/CoreModel.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/CoreModel.java index 64d4dcf10eb..58085573c37 100644 --- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/CoreModel.java +++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/CoreModel.java @@ -12,8 +12,7 @@ import org.eclipse.core.resources.IFolder; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.IPath; - -// This should be done in the Plugin. +import org.eclipse.core.runtime.IProgressMonitor; public class CoreModel { @@ -72,91 +71,91 @@ public class CoreModel { /** * Return true if IFile is a shared library, i.e. libxx.so */ - public static boolean isSharedLib(IFile file) { + public boolean isSharedLib(IFile file) { return manager.isSharedLib(file); } /** * Return true if IFile is a an object(ELF), i.e. *.o */ - public static boolean isObject(IFile file) { + public boolean isObject(IFile file) { return manager.isObject(file); } /** * Return true if IFile is an ELF executable */ - public static boolean isExecutable(IFile file) { + public boolean isExecutable(IFile file) { return manager.isExecutable(file); } /** * Return true if IFile is an ELF. */ - public static boolean isBinary(IFile file) { + public boolean isBinary(IFile file) { return manager.isBinary(file); } /** * Return true if IFile is an Achive, *.a */ - public static boolean isArchive(IFile file) { + public boolean isArchive(IFile file) { return manager.isArchive(file); } /** * Return true if IFile is a TranslationUnit. */ - public static boolean isTranslationUnit(IFile file) { + public boolean isTranslationUnit(IFile file) { return manager.isTranslationUnit(file); } /** * Return true if name is a valid name for a translation unit. */ - public static boolean isValidTranslationUnitName(String name){ + public boolean isValidTranslationUnitName(String name){ return manager.isValidTranslationUnitName(name); } /** * Return true if project has C nature. */ - public static boolean hasCNature(IProject project){ + public boolean hasCNature(IProject project){ return manager.hasCNature(project); } - public static boolean hasCCNature(IProject project){ + public boolean hasCCNature(IProject project){ return manager.hasCCNature(project); } /** - * Return the the binaryParser of the Project. + * Return the binaryParser of the Project. */ - public static IBinaryParser getBinaryParser(IProject project) { - return manager.getBinaryParser(project); - } - - /** - * Return all the known binaryParsers formats. - */ - public static String[] getBinaryParserFormats() { - return CCorePlugin.getDefault().getBinaryParserFormats(); + public String getBinaryParserFormat(IProject project) { + return manager.getBinaryParserFormat(project); } /** - * Save the binary parser for the project. + * Set the binaryParser of the Project. */ - public static void setBinaryParser(IProject project, String format) { - manager.setBinaryParser(project, format); + public void setBinaryParserFormat(IProject project, String format, IProgressMonitor monitor) { + manager.setBinaryParserFormat(project, format, monitor); } - + /** - * Return the BinaryParser corresponding to this format. + * Return the default BinaryParser format */ - public static IBinaryParser getBinaryParser(String format) { - return CCorePlugin.getDefault().getBinaryParser(format); + public String getDefaultBinaryParserFormat() { + return manager.getDefaultBinaryParserFormat(); } - + + /** + * Set the default binaryParser. + */ + public void setDefaultBinaryParserFormat(String format) { + manager.setDefaultBinaryParserFormat(format); + } + /** * Return the singleton. */