public Path getPath() { return logicalPath.getPath(); }
/** * Indicates whether this path contains Java source code * * @return see above */ public boolean isSource() { return logicalPath.getPath().isJavaSource(); }
public String getRoot(final LogicalPath logicalPath) { Validate.notNull(logicalPath, "Path required"); final PhysicalPath pathInfo = rootModulePaths.get(logicalPath.getPath()); Validate.notNull(pathInfo, "Unable to determine information for path '" + logicalPath + "'"); final File root = pathInfo.getLocation(); return FileUtils.getCanonicalPath(root); }
public String getIdentifier(final LogicalPath path, final String relativePath) { return FileUtils.ensureTrailingSeparator(rootModulePaths.get(path.getPath()).getLocationPath()) + relativePath; }
public LogicalPath convertFromText(final String value, final Class<?> targetType, final String optionContext) { LogicalPath logicalPath = LogicalPath.getInstance(value); if (logicalPath.getModule().equals("FOCUSED")) { logicalPath = LogicalPath.getInstance(logicalPath.getPath(), projectOperations.getFocusedModuleName()); } return logicalPath; }
public String getRoot(final LogicalPath modulePathId) { final Pom pom = pomManagementService.getPomFromModuleName(modulePathId.getModule()); return pom.getPhysicalPath(modulePathId.getPath()).getLocationPath(); }
public String getPhysicalTypeCanonicalPath(final String physicalTypeId) { final LogicalPath logicalPath = PhysicalTypeIdentifier.getPath(physicalTypeId); final JavaType javaType = PhysicalTypeIdentifier.getJavaType(physicalTypeId); final Pom pom = getProjectOperations().getPomFromModuleName(logicalPath.getModule()); final String canonicalFilePath = pom.getPathLocation(logicalPath.getPath()) + javaType.getRelativeFileName(); if (getFileManager().exists(canonicalFilePath)) { getTypeCache().cacheTypeAgainstModule(pom, javaType); getTypeCache().cacheFilePathAgainstTypeIdentifier(canonicalFilePath, physicalTypeId); } return canonicalFilePath; }
@Override protected String getGovernorPhysicalTypeIdentifier( String metadataIdentificationString) { JavaType javaType = StringTrimmerBinderMetadata .getJavaType(metadataIdentificationString); LogicalPath path = StringTrimmerBinderMetadata .getPath(metadataIdentificationString); return PhysicalTypeIdentifier.createIdentifier(javaType, LogicalPath .getInstance(path.getPath(), getProjectOperations() .getFocusedModuleName())); }
public String getPhysicalTypeCanonicalPath(final String physicalTypeId) { final LogicalPath logicalPath = PhysicalTypeIdentifier.getPath(physicalTypeId); final JavaType javaType = PhysicalTypeIdentifier.getJavaType(physicalTypeId); final Pom pom = getProjectOperations().getPomFromModuleName(logicalPath.getModule()); final String canonicalFilePath = pom.getPathLocation(logicalPath.getPath()) + javaType.getRelativeFileName(); if (getFileManager().exists(canonicalFilePath)) { getTypeCache().cacheTypeAgainstModule(pom, javaType); getTypeCache().cacheFilePathAgainstTypeIdentifier(canonicalFilePath, physicalTypeId); } return canonicalFilePath; }