mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 17:56:01 +02:00
Remove the static qualifiers add getBinaryParserFormat()
setBinaryParserFormat()
This commit is contained in:
parent
3589bf402a
commit
fef6269388
1 changed files with 28 additions and 29 deletions
|
@ -12,8 +12,7 @@ import org.eclipse.core.resources.IFolder;
|
||||||
import org.eclipse.core.resources.IProject;
|
import org.eclipse.core.resources.IProject;
|
||||||
import org.eclipse.core.resources.IResource;
|
import org.eclipse.core.resources.IResource;
|
||||||
import org.eclipse.core.runtime.IPath;
|
import org.eclipse.core.runtime.IPath;
|
||||||
|
import org.eclipse.core.runtime.IProgressMonitor;
|
||||||
// This should be done in the Plugin.
|
|
||||||
|
|
||||||
public class CoreModel {
|
public class CoreModel {
|
||||||
|
|
||||||
|
@ -72,89 +71,89 @@ public class CoreModel {
|
||||||
/**
|
/**
|
||||||
* Return true if IFile is a shared library, i.e. libxx.so
|
* 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 manager.isSharedLib(file);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return true if IFile is a an object(ELF), i.e. *.o
|
* 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 manager.isObject(file);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return true if IFile is an ELF executable
|
* Return true if IFile is an ELF executable
|
||||||
*/
|
*/
|
||||||
public static boolean isExecutable(IFile file) {
|
public boolean isExecutable(IFile file) {
|
||||||
return manager.isExecutable(file);
|
return manager.isExecutable(file);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return true if IFile is an ELF.
|
* Return true if IFile is an ELF.
|
||||||
*/
|
*/
|
||||||
public static boolean isBinary(IFile file) {
|
public boolean isBinary(IFile file) {
|
||||||
return manager.isBinary(file);
|
return manager.isBinary(file);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return true if IFile is an Achive, *.a
|
* Return true if IFile is an Achive, *.a
|
||||||
*/
|
*/
|
||||||
public static boolean isArchive(IFile file) {
|
public boolean isArchive(IFile file) {
|
||||||
return manager.isArchive(file);
|
return manager.isArchive(file);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return true if IFile is a TranslationUnit.
|
* Return true if IFile is a TranslationUnit.
|
||||||
*/
|
*/
|
||||||
public static boolean isTranslationUnit(IFile file) {
|
public boolean isTranslationUnit(IFile file) {
|
||||||
return manager.isTranslationUnit(file);
|
return manager.isTranslationUnit(file);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return true if name is a valid name for a translation unit.
|
* 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 manager.isValidTranslationUnitName(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return true if project has C nature.
|
* Return true if project has C nature.
|
||||||
*/
|
*/
|
||||||
public static boolean hasCNature(IProject project){
|
public boolean hasCNature(IProject project){
|
||||||
return manager.hasCNature(project);
|
return manager.hasCNature(project);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean hasCCNature(IProject project){
|
public boolean hasCCNature(IProject project){
|
||||||
return manager.hasCCNature(project);
|
return manager.hasCCNature(project);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the the binaryParser of the Project.
|
* Return the binaryParser of the Project.
|
||||||
*/
|
*/
|
||||||
public static IBinaryParser getBinaryParser(IProject project) {
|
public String getBinaryParserFormat(IProject project) {
|
||||||
return manager.getBinaryParser(project);
|
return manager.getBinaryParserFormat(project);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return all the known binaryParsers formats.
|
* Set the binaryParser of the Project.
|
||||||
*/
|
*/
|
||||||
public static String[] getBinaryParserFormats() {
|
public void setBinaryParserFormat(IProject project, String format, IProgressMonitor monitor) {
|
||||||
return CCorePlugin.getDefault().getBinaryParserFormats();
|
manager.setBinaryParserFormat(project, format, monitor);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Save the binary parser for the project.
|
* Return the default BinaryParser format
|
||||||
*/
|
*/
|
||||||
public static void setBinaryParser(IProject project, String format) {
|
public String getDefaultBinaryParserFormat() {
|
||||||
manager.setBinaryParser(project, format);
|
return manager.getDefaultBinaryParserFormat();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the BinaryParser corresponding to this format.
|
* Set the default binaryParser.
|
||||||
*/
|
*/
|
||||||
public static IBinaryParser getBinaryParser(String format) {
|
public void setDefaultBinaryParserFormat(String format) {
|
||||||
return CCorePlugin.getDefault().getBinaryParser(format);
|
manager.setDefaultBinaryParserFormat(format);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue