* @exception IllegalArgumentExcpetion if the name does not end with ".java"
*/
public ICompilationUnit getCompilationUnit(String cuName) {
- if (! PHPFileUtil.isPHPFileName(cuName)) {
+ if (! PHPFileUtil.isValidPHPUnitName(cuName)) {
throw new IllegalArgumentException(Util.bind("convention.unit.notJavaName")); //$NON-NLS-1$
}
return new CompilationUnit(this, cuName, DefaultWorkingCopyOwner.PRIMARY);
if (root.isArchive()) {
return root.getPath();
} else {
- return root.getPath().append(this.getElementName().replace('.', '/'));
+// return root.getPath().append(this.getElementName().replace('.', '/'));
+ return root.getPath().append(this.getElementName());
}
}
/**
if (elementName.length() == 0) {
return root.getResource();
} else {
- return ((IContainer)root.getResource()).getFolder(new Path(this.getElementName().replace('.', '/')));
+// return ((IContainer)root.getResource()).getFolder(new Path(this.getElementName().replace('.', '/')));
+ return ((IContainer)root.getResource()).getFolder(new Path(this.getElementName()));
}
}
}