|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.cdt.internal.corext.util.CModelUtil
public class CModelUtil
Constructor Summary | |
---|---|
CModelUtil()
|
Method Summary | |
---|---|
static org.eclipse.cdt.core.model.ICContainer |
getSourceFolder(org.eclipse.cdt.core.model.ICElement element)
Returns the source folder of ICElement . |
static org.eclipse.cdt.core.model.ISourceRoot |
getSourceRoot(org.eclipse.cdt.core.model.ICElement element)
Returns the source root of ICElement . |
static org.eclipse.cdt.core.model.ITranslationUnit |
getTranslationUnit(org.eclipse.cdt.core.model.ICElement elem)
Returns the translation unit the element belongs to or null if it does not. |
static boolean |
isReferenced(org.eclipse.cdt.core.model.ISourceRoot root)
Returns true if the given source root is
referenced. |
static org.eclipse.cdt.core.model.ITranslationUnit |
toOriginal(org.eclipse.cdt.core.model.ITranslationUnit unit)
|
static org.eclipse.cdt.core.model.ITranslationUnit |
toWorkingCopy(org.eclipse.cdt.core.model.ITranslationUnit unit)
Returns the working copy CU of the given CU. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CModelUtil()
Method Detail |
---|
public static org.eclipse.cdt.core.model.ITranslationUnit toWorkingCopy(org.eclipse.cdt.core.model.ITranslationUnit unit)
public static org.eclipse.cdt.core.model.ITranslationUnit toOriginal(org.eclipse.cdt.core.model.ITranslationUnit unit)
public static org.eclipse.cdt.core.model.ISourceRoot getSourceRoot(org.eclipse.cdt.core.model.ICElement element)
ICElement
. If the given
element is already a source root, the element itself is returned.
public static org.eclipse.cdt.core.model.ICContainer getSourceFolder(org.eclipse.cdt.core.model.ICElement element)
ICElement
. If the given
element is already a source folder, the element itself is returned.
public static boolean isReferenced(org.eclipse.cdt.core.model.ISourceRoot root)
true
if the given source root is
referenced. This means it is own by a different project but is referenced
by the root's parent. Returns false
if the given root
doesn't have an underlying resource.
public static org.eclipse.cdt.core.model.ITranslationUnit getTranslationUnit(org.eclipse.cdt.core.model.ICElement elem)
null
if it does not.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |