private String getTopLevelPackage(final Pom module) { if (projectOperations.isProjectAvailable(module.getModuleName())) { return typeLocationService.getTopLevelPackageForModule(module); } // Shouldn't happen if there's a project, i.e. most of the time return ""; }
@Override protected void notifyForGenericListener(final String upstreamDependency) { if (projectOperations == null) { projectOperations = getProjectOperations(); } Validate.notNull(projectOperations, "ProjectOperations is required"); // If the upstream dependency is null or invalid do not continue if (StringUtils.isBlank(upstreamDependency) || !MetadataIdentificationUtils.isValid(upstreamDependency)) { return; } // If the upstream dependency isn't ProjectMetadata do not continue if (!ProjectMetadata.isValid(upstreamDependency)) { return; } // If the project isn't valid do not continue if (projectOperations.isProjectAvailable(ProjectMetadata.getModuleName(upstreamDependency))) { final boolean isGaeEnabled = projectOperations.isFeatureInstalled(FeatureNames.GAE); // We need to determine if the persistence state has changed, we do // this by comparing the last known state to the current state final boolean hasGaeStateChanged = wasGaeEnabled == null || isGaeEnabled != wasGaeEnabled; if (hasGaeStateChanged) { wasGaeEnabled = isGaeEnabled; for (final String producedMid : producedMids) { getMetadataService().evictAndGet(producedMid); } } } }
if (projectOperations.isProjectAvailable(moduleName)) {
@Override protected ItdTypeDetailsProvidingMetadataItem getMetadata( final String metadataIdentificationString, final JavaType aspectName, final PhysicalTypeMetadata governorPhysicalTypeMetadata, final String itdFilename) { if (projectOperations == null) { projectOperations = getProjectOperations(); } Validate.notNull(projectOperations, "ProjectOperations is required"); final IdentifierAnnotationValues annotationValues = new IdentifierAnnotationValues(governorPhysicalTypeMetadata); if (!annotationValues.isAnnotationFound()) { return null; } // We know governor type details are non-null and can be safely cast final JavaType javaType = IdentifierMetadata.getJavaType(metadataIdentificationString); final List<Identifier> identifierServiceResult = getIdentifiersForType(javaType); final LogicalPath path = PhysicalTypeIdentifierNamingUtils.getPath(metadataIdentificationString); if (projectOperations.isProjectAvailable(path.getModule())) { // If the project itself changes, we want a chance to refresh this // item getMetadataDependencyRegistry().registerDependency( ProjectMetadata.getProjectIdentifier(path.getModule()), metadataIdentificationString); } return new IdentifierMetadata(metadataIdentificationString, aspectName, governorPhysicalTypeMetadata, annotationValues, identifierServiceResult); }
if (projectOperations.isProjectAvailable(moduleNme) || !projectOperations.isFeatureInstalled(FeatureNames.GAE)) { return null;
/** {@inheritDoc} */ public boolean isCommandAvailable() { // Check if a project has been created return projectOperations.isProjectAvailable(projectOperations .getFocusedModuleName()); }
/** {@inheritDoc} */ public boolean isProjectAvailable() { // Check if a project has been created return projectOperations.isProjectAvailable(projectOperations .getFocusedModuleName()); }
/** {@inheritDoc} */ public boolean isStringTrimmerAvailable() { return projectOperations.isProjectAvailable(projectOperations .getFocusedModuleName()) && OperationUtils.isSpringMvcProject(metadataService, fileManager, projectOperations); }
final String moduleName = ProjectMetadata.getModuleName(upstreamDependency); if (!projectOperations.isProjectAvailable(moduleName)) { return;
/** * {@inheritDoc} * <p> * Note the project isn't available when you start a new project (emtpy * project dir) because the project metadata doesn't exist yet. */ public boolean isProjectAvailable() { // Check if a project has been created return getProjectOperations().isProjectAvailable( getProjectOperations().getFocusedModuleName()); }
@Override protected void notifyForGenericListener(final String upstreamDependency) { if (projectOperations == null) { projectOperations = getProjectOperations(); } Validate.notNull(projectOperations, "ProjectOperations is required"); // If the upstream dependency is null or invalid do not continue if (StringUtils.isBlank(upstreamDependency) || !MetadataIdentificationUtils.isValid(upstreamDependency)) { return; } // If the upstream dependency isn't ProjectMetadata do not continue if (!ProjectMetadata.isValid(upstreamDependency)) { return; } // If the project isn't valid do not continue if (projectOperations.isProjectAvailable(ProjectMetadata.getModuleName(upstreamDependency))) { final boolean isGaeEnabled = projectOperations.isFeatureInstalled(FeatureNames.GAE); // We need to determine if the persistence state has changed, we do // this by comparing the last known state to the current state final boolean hasGaeStateChanged = wasGaeEnabled == null || isGaeEnabled != wasGaeEnabled; if (hasGaeStateChanged) { wasGaeEnabled = isGaeEnabled; for (final String producedMid : producedMids) { getMetadataService().evictAndGet(producedMid); } } } }
if (projectOperations.isProjectAvailable(moduleName)) {
@Override protected ItdTypeDetailsProvidingMetadataItem getMetadata( final String metadataIdentificationString, final JavaType aspectName, final PhysicalTypeMetadata governorPhysicalTypeMetadata, final String itdFilename) { if (projectOperations == null) { projectOperations = getProjectOperations(); } Validate.notNull(projectOperations, "ProjectOperations is required"); final IdentifierAnnotationValues annotationValues = new IdentifierAnnotationValues(governorPhysicalTypeMetadata); if (!annotationValues.isAnnotationFound()) { return null; } // We know governor type details are non-null and can be safely cast final JavaType javaType = IdentifierMetadata.getJavaType(metadataIdentificationString); final List<Identifier> identifierServiceResult = getIdentifiersForType(javaType); final LogicalPath path = PhysicalTypeIdentifierNamingUtils.getPath(metadataIdentificationString); if (projectOperations.isProjectAvailable(path.getModule())) { // If the project itself changes, we want a chance to refresh this // item getMetadataDependencyRegistry().registerDependency( ProjectMetadata.getProjectIdentifier(path.getModule()), metadataIdentificationString); } return new IdentifierMetadata(metadataIdentificationString, aspectName, governorPhysicalTypeMetadata, annotationValues, identifierServiceResult); }
if (projectOperations.isProjectAvailable(moduleNme) || !projectOperations.isFeatureInstalled(FeatureNames.GAE)) { return null;