hasPolishNature = event.getResource().getProject().hasNature(PolishNature.ID);
IResource resource = event.getResource(); if(resource == null) { return; } IProject project = resource.getProject(); if(project == null){ return; } hasPolishNature = project.hasNature(PolishNature.ID);
    public void resourceChanged(IResourceChangeEvent event) {        boolean hasPolishNature = false;        try {            hasPolishNature = event.getResource().getProject().hasNature(PolishNature.ID);        } catch (CoreException exception1) {            return;        }        if(!hasPolishNature) {            return;        }        switch (event.getType()) {           case IResourceChangeEvent.POST_CHANGE:              try {                    event.getDelta().accept(new DeltaVisitor());                } catch (CoreException exception) {                    MeposePlugin.log(exception);                    return;                }              break;        }    }