public class PsiMethodFavoriteNodeProvider extends FavoriteNodeProvider
EP_NAME
Constructor and Description |
---|
PsiMethodFavoriteNodeProvider() |
Modifier and Type | Method and Description |
---|---|
AbstractTreeNode |
createNode(Project project,
java.lang.Object element,
ViewSettings viewSettings) |
java.lang.Object[] |
createPathFromUrl(Project project,
java.lang.String url,
java.lang.String moduleName)
Returns the path of node objects to be added to the favorites tree for the specified persisted URL and module name.
|
boolean |
elementContainsFile(java.lang.Object element,
VirtualFile vFile)
Checks if the specified project view node element (the value of
AbstractTreeNode ) contains
the specified virtual file as one of its children. |
java.lang.String |
getElementLocation(java.lang.Object element)
Returns the location text (grey text in parentheses) to display in the Favorites view for the specified element.
|
java.lang.String |
getElementModuleName(java.lang.Object element)
Returns the name of the module containing the specified element.
|
java.lang.String |
getElementUrl(java.lang.Object element)
Returns the persistable URL for the specified element.
|
int |
getElementWeight(java.lang.Object value,
boolean isSortByType)
Returns the weight of the specified project view node element to use when sorting the favorites list.
|
java.util.Collection<AbstractTreeNode<?>> |
getFavoriteNodes(DataContext context,
ViewSettings viewSettings) |
java.lang.String |
getFavoriteTypeId()
Returns the identifier used to persist favorites for this provider.
|
boolean |
isInvalidElement(java.lang.Object element)
Checks if the specified element is invalid and needs to be removed from the tree.
|
getPsiElement
public java.util.Collection<AbstractTreeNode<?>> getFavoriteNodes(DataContext context, ViewSettings viewSettings)
getFavoriteNodes
in class FavoriteNodeProvider
public AbstractTreeNode createNode(Project project, java.lang.Object element, ViewSettings viewSettings)
createNode
in class FavoriteNodeProvider
public boolean elementContainsFile(java.lang.Object element, VirtualFile vFile)
FavoriteNodeProvider
AbstractTreeNode
) contains
the specified virtual file as one of its children.elementContainsFile
in class FavoriteNodeProvider
element
- the value element of a project view node.vFile
- the file to check.element
is not an element supported by this provider.public int getElementWeight(java.lang.Object value, boolean isSortByType)
FavoriteNodeProvider
getElementWeight
in class FavoriteNodeProvider
value
- the element for which the weight is requested.element
is not an element supported by this provider.public java.lang.String getElementLocation(java.lang.Object element)
FavoriteNodeProvider
getElementLocation
in class FavoriteNodeProvider
element
- the element for which the location is requested.element
is not an element supported by this provider.public boolean isInvalidElement(java.lang.Object element)
FavoriteNodeProvider
isInvalidElement
in class FavoriteNodeProvider
element
- the element to check.public java.lang.String getFavoriteTypeId()
FavoriteNodeProvider
getFavoriteTypeId
in class FavoriteNodeProvider
public java.lang.String getElementUrl(java.lang.Object element)
FavoriteNodeProvider
getElementUrl
in class FavoriteNodeProvider
public java.lang.String getElementModuleName(java.lang.Object element)
FavoriteNodeProvider
getElementModuleName
in class FavoriteNodeProvider
public java.lang.Object[] createPathFromUrl(Project project, java.lang.String url, java.lang.String moduleName)
FavoriteNodeProvider
createPathFromUrl
in class FavoriteNodeProvider
project
- the project to which the favorite is related.url
- the loaded URL (initially returned from FavoriteNodeProvider.getElementUrl(java.lang.Object)
).moduleName
- the name of the module containing the element (initially returned from FavoriteNodeProvider.getElementModuleName(java.lang.Object)
)