A project (represented by the IProject
interface) is a top-level unit in the workspace (which is represented by the IWorkspaceRoot
interface). These can contain resources (represented by the IResource
interface), which are either folders or files (represented by the IFolder
or IFile
interfaces). They can be iterated with the members
method, but this will result in the creation of IResource
objects for every element processed, even if they aren't relevant. Instead, defer to the platform's internal tree by passing it a visitor that will step through each element required.
Create a class
MinimarkVisitor
in thecom.packtpub.e4.minimark.ui
package that implements theIResourceProxyVisitor
andIResourceDeltaVisitor
interfaces.Implement the
visit(IResourceProxy)
method to get the name of the resource, and display a message if it finds a file whose name ends with.minimark
. It should returntrue
to allow child resources to be processed:public boolean...