Package ghidra.framework.model
Class DefaultDomainFileFilter
java.lang.Object
ghidra.framework.model.DefaultDomainFileFilter
- All Implemented Interfaces:
DomainFileFilter,DomainFolderFilter
DefaultDomainFileFilter provides a simple default domain file filter which accepts
files for a specified domain object interface class.-
Field Summary
Fields inherited from interface ghidra.framework.model.DomainFileFilter
ALL_FILES_FILTER, ALL_FILES_NO_EXTERNAL_FOLDERS_FILTER, ALL_INTERNAL_FILES_FILTER, NON_LINKED_FILE_FILTERFields inherited from interface ghidra.framework.model.DomainFolderFilter
ALL_FOLDERS_FILTER, ALL_INTERNAL_FOLDERS_FILTER, NON_LINKED_FOLDER_FILTER -
Constructor Summary
ConstructorsConstructorDescriptionDefaultDomainFileFilter(Class<? extends DomainObject> domainObjectClass, boolean ignoreExternalLinks) Construct aDomainFileFilterwhich accepts a specific domain object interface class and either shows or hides external links. -
Method Summary
Modifier and TypeMethodDescriptionbooleanaccept(DomainFile file) Tests whether or not the specified domain file should be included in a domain file list.booleanCheck if link-files should be ignored if the link is external (i.e., Ghidra-URL).Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ghidra.framework.model.DomainFileFilter
followExternallyLinkedFoldersMethods inherited from interface ghidra.framework.model.DomainFolderFilter
ignoreBrokenLinks, ignoreFolderLinks
-
Constructor Details
-
DefaultDomainFileFilter
public DefaultDomainFileFilter(Class<? extends DomainObject> domainObjectClass, boolean ignoreExternalLinks) Construct aDomainFileFilterwhich accepts a specific domain object interface class and either shows or hides external links. If external links are not ignored the filter will allow following external folder-links into other projects or server repositories. Note that this should be enabled carefully since it may required proper repository authentication support to facilitate access. Broken links are always ignored and all internal linked-folders and linked-files will be followed/processed.- Parameters:
domainObjectClass- domain object interface class. May be null to disallow all files (i.e., only folders and folder-links are shown).ignoreExternalLinks- true to ignore/skip external links, else they will be shown/processed and opening/following such links will be supported.
-
-
Method Details
-
accept
Description copied from interface:DomainFileFilterTests whether or not the specified domain file should be included in a domain file list. Since link-files will also be subject to this constraint the ability to handle or follow such links must be considered.NOTE: File-links have the same
DomainFile.getDomainObjectClass()as the file they refer to, while theirDomainFile.getContentType()is specific to theirLinkHandlerimplementation.- Specified by:
acceptin interfaceDomainFileFilter- Parameters:
file- The domain file to be tested- Returns:
trueif and only ifdf
-
ignoreExternalLinks
public boolean ignoreExternalLinks()Description copied from interface:DomainFolderFilterCheck if link-files should be ignored if the link is external (i.e., Ghidra-URL). Multi-level internal links are followed within the same project before a determination is made.If this method is not implemented the default behavior will ignore external links. This method should be ignored for folder-links if
DomainFolderFilter.ignoreFolderLinks()returns true.- Specified by:
ignoreExternalLinksin interfaceDomainFolderFilter- Returns:
- true if external links should be ignored (i.e., not displayed)
-