editorContext = LayoutEditorContextFactory.getDefaultInstance().
createLayoutEditorContext(this, file);
// Register listener to handle project/resource being closed,
// moved or deleted
resourceCloseListener = new ResourceCloseListener(this);
resourceCloseListener.startListener();
} catch (PolicyFileAccessException ce) {
String errorMessage = file.exists() ? LOAD_ERROR_MESSAGE :
MISSING_FILE_MESSAGE;
throw new PartInitException(errorMessage);