How to listen for projects to be opened/closed?

Specific for a project-type

Implement a ProjectOpenedHook and register it to a project-type

    service =ProjectOpenedHook.class,
    projectType = {"org-netbeans-modules-web-project"}
public class MyProjectOpenedHook extends ProjectOpenedHook {

    private final Project project;

    public MyProjectOpenedHook(Project project) {
        this.project = project;

    protected void projectOpened() {

    protected void projectClosed() {

Inspired by

For all project-types


Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo