Skip to content

Projects and Project items

Marián Labuda edited this page Aug 6, 2015 · 1 revision

Project and Package explorer provide capabilities to work with Projects and their items. Projects and project items are not meant to be instantiated directly. They are supposed to be obtained via Project/Package explorer and themselves.

Hierarchy

Project and project items are both descendants of ExplorerItem. Project add more functionality on top by checking in nature and deletion. Project item allows users e.g. to work with executable items and handle deletion. For more information about extending Project see Custom-Project.

Usage

To get a project with name "project01" from project explorer and selecting its src folder, you can use following code:

PackageExplorer explorer = new PackageExplorer();
explorer.open();
Project javaProject = explorer.getProject("project01");
ProjectItem srcProjectItem = javaProject.getProjectItem("src");
srcProjectItem.select();
// Some stuff
Clone this wiki locally