|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.cdt.internal.ui.wizards.classwizard.NewClassWizardUtil
public class NewClassWizardUtil
Field Summary | |
---|---|
static int |
SEARCH_MATCH_ERROR
|
static int |
SEARCH_MATCH_FOUND_ANOTHER_NAMESPACE
|
static int |
SEARCH_MATCH_FOUND_ANOTHER_TYPE
|
static int |
SEARCH_MATCH_FOUND_EXACT
|
static int |
SEARCH_MATCH_FOUND_EXACT_ANOTHER_TYPE
|
static int |
SEARCH_MATCH_NOTFOUND
|
Constructor Summary | |
---|---|
NewClassWizardUtil()
|
Method Summary | |
---|---|
static java.lang.String |
createHeaderFileName(java.lang.String className)
Creates a header file name from the given class name. |
static java.lang.String |
createSourceFileName(java.lang.String className)
Creates a source file name from the given class name. |
static org.eclipse.cdt.core.model.ICElement |
getCElementFromEditor()
Returns the C Element which corresponds to the active editor. |
static org.eclipse.cdt.core.model.ICElement |
getCElementFromSelection(org.eclipse.jface.viewers.IStructuredSelection selection)
Returns the C Element which corresponds to the given selection. |
static org.eclipse.cdt.core.model.ISourceRoot |
getFirstSourceRoot(org.eclipse.cdt.core.model.ICProject cproject)
Returns the first source root in the given project. |
static org.eclipse.cdt.core.model.ICElement |
getNamespace(org.eclipse.cdt.core.model.ICElement element)
Returns the parent namespace for the given element. |
static org.eclipse.cdt.core.browser.ITypeInfo[] |
getReachableClasses(org.eclipse.cdt.core.model.ICProject cProject)
Returns all classes/structs which are accessible from the include paths of the given project. |
static org.eclipse.cdt.core.model.ICContainer |
getSourceFolder(org.eclipse.cdt.core.model.ICElement element)
Returns the parent source folder of the given element. |
static org.eclipse.cdt.core.model.ICContainer |
getSourceFolder(org.eclipse.core.runtime.IPath path)
Returns the parent source folder for the given path. |
static org.eclipse.cdt.core.model.ICContainer |
getSourceFolder(org.eclipse.core.resources.IResource resource)
Returns the parent source folder for the given resource. |
static org.eclipse.core.resources.IWorkspaceRoot |
getWorkspaceRoot()
Returns the workspace root. |
static boolean |
isTypeReachable(org.eclipse.cdt.core.browser.ITypeInfo type,
org.eclipse.cdt.core.model.ICProject project,
java.lang.String[] includePaths)
Checks whether the given type can be found in the given project or the given include paths. |
static org.eclipse.cdt.core.browser.ITypeReference |
resolveClassLocation(org.eclipse.cdt.core.browser.ITypeInfo type,
org.eclipse.jface.operation.IRunnableContext context)
Resolve the location of the given class. |
static int |
searchForCppType(org.eclipse.cdt.core.browser.IQualifiedTypeName typeName,
org.eclipse.cdt.core.model.ICProject project,
java.lang.Class queryType)
Search for the given qualified name of the give |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int SEARCH_MATCH_ERROR
public static final int SEARCH_MATCH_NOTFOUND
public static final int SEARCH_MATCH_FOUND_EXACT
public static final int SEARCH_MATCH_FOUND_EXACT_ANOTHER_TYPE
public static final int SEARCH_MATCH_FOUND_ANOTHER_NAMESPACE
public static final int SEARCH_MATCH_FOUND_ANOTHER_TYPE
Constructor Detail |
---|
public NewClassWizardUtil()
Method Detail |
---|
public static org.eclipse.cdt.core.model.ICContainer getSourceFolder(org.eclipse.cdt.core.model.ICElement element)
element
- the C Element
public static org.eclipse.cdt.core.model.ICContainer getSourceFolder(org.eclipse.core.runtime.IPath path)
path
- the path
public static org.eclipse.cdt.core.model.ICContainer getSourceFolder(org.eclipse.core.resources.IResource resource)
resource
- the resource
public static org.eclipse.cdt.core.model.ISourceRoot getFirstSourceRoot(org.eclipse.cdt.core.model.ICProject cproject)
cproject
-
public static org.eclipse.cdt.core.model.ICElement getCElementFromSelection(org.eclipse.jface.viewers.IStructuredSelection selection)
selection
- the selection to be inspected
null
if no C element exists in the given selectionpublic static org.eclipse.cdt.core.model.ICElement getCElementFromEditor()
null
if no C element can be foundpublic static org.eclipse.cdt.core.model.ICElement getNamespace(org.eclipse.cdt.core.model.ICElement element)
element
- the given C Element
null
if not foundpublic static java.lang.String createHeaderFileName(java.lang.String className)
className
- the class name
public static java.lang.String createSourceFileName(java.lang.String className)
className
- the class name
public static org.eclipse.core.resources.IWorkspaceRoot getWorkspaceRoot()
public static org.eclipse.cdt.core.browser.ITypeReference resolveClassLocation(org.eclipse.cdt.core.browser.ITypeInfo type, org.eclipse.jface.operation.IRunnableContext context)
type
- the class to resolvecontext
- the runnable context
null
if not foundpublic static org.eclipse.cdt.core.browser.ITypeInfo[] getReachableClasses(org.eclipse.cdt.core.model.ICProject cProject)
cProject
- the given project
public static boolean isTypeReachable(org.eclipse.cdt.core.browser.ITypeInfo type, org.eclipse.cdt.core.model.ICProject project, java.lang.String[] includePaths)
type
- the typeproject
- the projectincludePaths
- the include paths
true
if the given type is foundpublic static int searchForCppType(org.eclipse.cdt.core.browser.IQualifiedTypeName typeName, org.eclipse.cdt.core.model.ICProject project, java.lang.Class queryType)
typeName
- qualified name of the type to searchproject
- queryType
- Class of interface type to search for (e.g. ICPPClassType.class)
SEARCH_MATCH_ERROR
,
SEARCH_MATCH_FOUND_ANOTHER_NAMESPACE
,
SEARCH_MATCH_FOUND_ANOTHER_TYPE
,
SEARCH_MATCH_FOUND_EXACT_ANOTHER_TYPE
,
SEARCH_MATCH_FOUND_EXACT
or
SEARCH_MATCH_NOTFOUND
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |