/** * Important: Use this method always to obtain the configuration. Do not invoke this inside a constructor since the * returned {@link Configuration} instance would not be the project scoped one. * * @return The project scoped {@link Configuration} instance */ private Configuration getProjectConfiguration() { if (this.configuration == null) { this.configuration = configurationFactory.getProjectConfig(project); } return this.configuration; } }
/** * Returns a project-scoped configuration (if a project is in scope). Falls back to the user scope configuration if * no project is set in the shell * * @return * @throws ConfigurationException */ @Produces public Configuration getConfiguration(Shell shell) throws ConfigurationException { Project project = shell.getCurrentProject(); if (project == null) { return factory.getUserConfig(); } if (!project.hasFacet(ConfigurationFacet.class)) { // Installing manually ConfigurationFacet facet = new ConfigurationFacet(factory); project.installFacet(facet); } return project.getFacet(ConfigurationFacet.class).getConfiguration(); } }
/** * Important: Use this method always to obtain the configuration. Do not invoke this inside a constructor since the * returned {@link Configuration} instance would not be the project scoped one. * * @return The project scoped {@link Configuration} instance */ private Configuration getProjectConfiguration() { if (this.configuration == null) { this.configuration = configurationFactory.getProjectConfig(project); } return this.configuration; } }
/** * Important: Use this method always to obtain the configuration. Do not invoke this inside a constructor since the * returned {@link Configuration} instance would not be the project scoped one. * * @return The project scoped {@link Configuration} instance */ private Configuration getProjectConfiguration() { if (this.configuration == null) { this.configuration = configurationFactory.getProjectConfig(project); } return this.configuration; } }
@Override public boolean install() { if (projectConfiguration == null) { projectConfiguration = factory.getProjectConfig(getProject()); } return true; }