public String getIdentifier(final LogicalPath path, final String relativePath) { return FileUtils.ensureTrailingSeparator(rootModulePaths.get(path.getPath()).getLocationPath()) + relativePath; }
/** * Returns the canonical path of the given {@link Path} within this module, * plus a trailing separator if found * * @param path the path for which to get the canonical location (required) * @return <code>null</code> if this module has no such path */ public String getPathLocation(final Path path) { final PhysicalPath modulePath = getPhysicalPath(path); if (modulePath == null) { return null; } return FileUtils.ensureTrailingSeparator(modulePath.getLocationPath()); }
public String getRoot(final LogicalPath modulePathId) { final Pom pom = pomManagementService.getPomFromModuleName(modulePathId.getModule()); return pom.getPhysicalPath(modulePathId.getPath()).getLocationPath(); }
private PhysicalPath getPhysicalPath(final JavaType javaType) { Validate.notNull(javaType, "Java type required"); final String parentPath = getParentPath(javaType); if (parentPath == null) { return null; } for (final Pom pom : getProjectOperations().getPoms()) { for (final PhysicalPath physicalPath : pom.getPhysicalPaths()) { if (physicalPath.isSource()) { final String pathLocation = FileUtils.ensureTrailingSeparator(physicalPath.getLocationPath()); if (pathLocation.startsWith(parentPath)) { getTypeCache().cacheTypeAgainstModule(pom, javaType); return physicalPath; } } } } return null; }
private void initTypeMap() { for (final Pom pom : getProjectOperations().getPoms()) { for (final PhysicalPath path : pom.getPhysicalPaths()) { if (path.isSource()) { final String allJavaFiles = FileUtils.ensureTrailingSeparator(path.getLocationPath()) + JAVA_FILES_ANT_PATH; for (final FileDetails file : getFileManager().findMatchingAntPath(allJavaFiles)) { cacheType(file.getCanonicalPath()); } } } } }
if (physicalPath.getLocationPath().startsWith(reducedPath)) { final LogicalPath path = physicalPath.getLogicalPath(); physicalTypeIdentifier =
private PhysicalPath getPhysicalPath(final JavaType javaType) { Validate.notNull(javaType, "Java type required"); final String parentPath = getParentPath(javaType); if (parentPath == null) { return null; } for (final Pom pom : getProjectOperations().getPoms()) { for (final PhysicalPath physicalPath : pom.getPhysicalPaths()) { if (physicalPath.isSource()) { final String pathLocation = FileUtils.ensureTrailingSeparator(physicalPath.getLocationPath()); if (pathLocation.startsWith(parentPath)) { getTypeCache().cacheTypeAgainstModule(pom, javaType); return physicalPath; } } } } return null; }
if (physicalPath.getLocationPath().startsWith(reducedPath)) { final LogicalPath path = physicalPath.getLogicalPath(); physicalTypeIdentifier =
private void initTypeMap() { for (final Pom pom : getProjectOperations().getPoms()) { for (final PhysicalPath path : pom.getPhysicalPaths()) { if (path.isSource()) { final String allJavaFiles = FileUtils.ensureTrailingSeparator(path.getLocationPath()) + JAVA_FILES_ANT_PATH; for (final FileDetails file : getFileManager().findMatchingAntPath(allJavaFiles)) { cacheType(file.getCanonicalPath()); } } } } }