/** * Experimental API subject to change * * @return String form of the ejbModule folder path relative to the full path. * @throws CoreException */ public String getEjbModuleRelative(String fullPath) throws CoreException { if (fullPath != null) { if (getDeploymentDescriptorFolder() != null) { String modulePath; if (fullPath.indexOf('/') == 0) modulePath = getDeploymentDescriptorFolder().getProjectRelativePath().removeTrailingSeparator().removeLastSegments(1).toOSString(); else modulePath = getDeploymentDescriptorFolder().getProjectRelativePath().removeTrailingSeparator().removeLastSegments(1).makeRelative().toOSString(); int indx = (fullPath.indexOf(modulePath) + modulePath.length() + 1); if (fullPath.indexOf(modulePath) != -1) return fullPath.substring(indx); } } return fullPath; }