Time for action – iterating through resources

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.

  1. Create a class MinimarkVisitor in the com.packtpub.e4.minimark.ui package that implements the IResourceProxyVisitor and IResourceDeltaVisitor ...

Get Eclipse Plug-in Development Beginner's Guide - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.