protected char[] writeClassFile(ClassFile classFile, SourceFile compilationUnit, boolean isTopLevelType) throws CoreException { String fileName = new String(classFile.fileName()); // the qualified type name "p1/p2/A" IPath filePath = new Path(fileName); IContainer outputFolder = compilationUnit.sourceLocation.binaryFolder; IContainer container = outputFolder; if (filePath.segmentCount() > 1) { container = createFolder(filePath.removeLastSegments(1), outputFolder); filePath = new Path(filePath.lastSegment()); } IFile file = container.getFile(filePath.addFileExtension(SuffixConstants.EXTENSION_class)); writeClassFileContents(classFile, file, fileName, isTopLevelType, compilationUnit); // answer the name of the class file as in Y or Y$M return filePath.lastSegment().toCharArray(); }
protected char[] writeClassFile(ClassFile classFile, SourceFile compilationUnit, boolean isTopLevelType) throws CoreException { String fileName = new String(classFile.fileName()); // the qualified type name "p1/p2/A" IPath filePath = new Path(fileName); IContainer outputFolder = compilationUnit.sourceLocation.binaryFolder; IContainer container = outputFolder; if (filePath.segmentCount() > 1) { container = createFolder(filePath.removeLastSegments(1), outputFolder); filePath = new Path(filePath.lastSegment()); } IFile file = container.getFile(filePath.addFileExtension(SuffixConstants.EXTENSION_class)); writeClassFileContents(classFile, file, fileName, isTopLevelType, compilationUnit); // answer the name of the class file as in Y or Y$M return filePath.lastSegment().toCharArray(); }
protected char[] writeClassFile(ClassFile classFile, SourceFile compilationUnit, boolean isTopLevelType) throws CoreException { String fileName = new String(classFile.fileName()); // the qualified type name "p1/p2/A" IPath filePath = new Path(fileName); IContainer outputFolder = compilationUnit.sourceLocation.binaryFolder; IContainer container = outputFolder; if (filePath.segmentCount() > 1) { container = createFolder(filePath.removeLastSegments(1), outputFolder); filePath = new Path(filePath.lastSegment()); } IFile file = container.getFile(filePath.addFileExtension(SuffixConstants.EXTENSION_class)); writeClassFileContents(classFile, file, fileName, isTopLevelType, compilationUnit); // answer the name of the class file as in Y or Y$M return filePath.lastSegment().toCharArray(); }
protected char[] writeClassFile(ClassFile classFile, SourceFile compilationUnit, boolean isTopLevelType) throws CoreException { String fileName = new String(classFile.fileName()); // the qualified type name "p1/p2/A" IPath filePath = new Path(fileName); IContainer outputFolder = compilationUnit.sourceLocation.binaryFolder; IContainer container = outputFolder; if (filePath.segmentCount() > 1) { container = createFolder(filePath.removeLastSegments(1), outputFolder); filePath = new Path(filePath.lastSegment()); } IFile file = container.getFile(filePath.addFileExtension(SuffixConstants.EXTENSION_class)); writeClassFileContents(classFile, file, fileName, isTopLevelType, compilationUnit); // answer the name of the class file as in Y or Y$M return filePath.lastSegment().toCharArray(); }
protected char[] writeClassFile(ClassFile classFile, SourceFile compilationUnit, boolean isTopLevelType) throws CoreException { String fileName = new String(classFile.fileName()); // the qualified type name "p1/p2/A" IPath filePath = new Path(fileName); IContainer outputFolder = compilationUnit.sourceLocation.binaryFolder; IContainer container = outputFolder; if (filePath.segmentCount() > 1) { container = createFolder(filePath.removeLastSegments(1), outputFolder); filePath = new Path(filePath.lastSegment()); } IFile file = container.getFile(filePath.addFileExtension(SuffixConstants.EXTENSION_class)); writeClassFileContents(classFile, file, fileName, isTopLevelType, compilationUnit); // answer the name of the class file as in Y or Y$M return filePath.lastSegment().toCharArray(); }
protected char[] writeClassFile(ClassFile classFile, SourceFile compilationUnit, boolean isTopLevelType) throws CoreException { String fileName = new String(classFile.fileName()); // the qualified type name "p1/p2/A" IPath filePath = new Path(fileName); IContainer outputFolder = compilationUnit.sourceLocation.binaryFolder; IContainer container = outputFolder; if (filePath.segmentCount() > 1) { container = createFolder(filePath.removeLastSegments(1), outputFolder); filePath = new Path(filePath.lastSegment()); } IFile file = container.getFile(filePath.addFileExtension(SuffixConstants.EXTENSION_class)); writeClassFileContents(classFile, file, fileName, isTopLevelType, compilationUnit); // answer the name of the class file as in Y or Y$M return filePath.lastSegment().toCharArray(); }
protected IContainer createFolder(IPath packagePath, IContainer outputFolder) throws CoreException { if (packagePath.isEmpty()) return outputFolder; IFolder folder = outputFolder.getFolder(packagePath); if (!folder.exists()) { createFolder(packagePath.removeLastSegments(1), outputFolder); folder.create(IResource.FORCE | IResource.DERIVED, true, null); } return folder; }
protected IContainer createFolder(IPath packagePath, IContainer outputFolder) throws CoreException { if (packagePath.isEmpty()) return outputFolder; IFolder folder = outputFolder.getFolder(packagePath); if (!folder.exists()) { createFolder(packagePath.removeLastSegments(1), outputFolder); folder.create(IResource.FORCE | IResource.DERIVED, true, null); } return folder; }
protected IContainer createFolder(IPath packagePath, IContainer outputFolder) throws CoreException { if (packagePath.isEmpty()) return outputFolder; IFolder folder = outputFolder.getFolder(packagePath); if (!folder.exists()) { createFolder(packagePath.removeLastSegments(1), outputFolder); folder.create(IResource.FORCE | IResource.DERIVED, true, null); } return folder; }
protected IContainer createFolder(IPath packagePath, IContainer outputFolder) throws CoreException { if (packagePath.isEmpty()) return outputFolder; IFolder folder = outputFolder.getFolder(packagePath); if (!folder.exists()) { createFolder(packagePath.removeLastSegments(1), outputFolder); folder.create(IResource.FORCE | IResource.DERIVED, true, null); } return folder; }
protected IContainer createFolder(IPath packagePath, IContainer outputFolder) throws CoreException { if (packagePath.isEmpty()) return outputFolder; IFolder folder = outputFolder.getFolder(packagePath); if (!folder.exists()) { createFolder(packagePath.removeLastSegments(1), outputFolder); folder.create(IResource.FORCE | IResource.DERIVED, true, null); } return folder; }
protected IContainer createFolder(IPath packagePath, IContainer outputFolder) throws CoreException { if (packagePath.isEmpty()) return outputFolder; IFolder folder = outputFolder.getFolder(packagePath); if (!folder.exists()) { createFolder(packagePath.removeLastSegments(1), outputFolder); folder.create(IResource.FORCE | IResource.DERIVED, true, null); } return folder; }
String complianceLevel = AbstractImageBuilder.this.javaBuilder.javaProject.getOption(JavaCore.COMPILER_COMPLIANCE, true); if (JavaConventions.validatePackageName(packageName, sourceLevel, complianceLevel).getSeverity() != IStatus.ERROR) createFolder(folderPath.removeFirstSegments(segmentCount), outputFolder);
String complianceLevel = AbstractImageBuilder.this.javaBuilder.javaProject.getOption(JavaCore.COMPILER_COMPLIANCE, true); if (JavaConventions.validatePackageName(packageName, sourceLevel, complianceLevel).getSeverity() != IStatus.ERROR) createFolder(folderPath.removeFirstSegments(segmentCount), outputFolder);
String complianceLevel = AbstractImageBuilder.this.javaBuilder.javaProject.getOption(JavaCore.COMPILER_COMPLIANCE, true); if (JavaConventions.validatePackageName(packageName, sourceLevel, complianceLevel).getSeverity() != IStatus.ERROR) createFolder(folderPath.removeFirstSegments(segmentCount), outputFolder);
String complianceLevel = AbstractImageBuilder.this.javaBuilder.javaProject.getOption(JavaCore.COMPILER_COMPLIANCE, true); if (JavaConventions.validatePackageName(packageName, sourceLevel, complianceLevel).getSeverity() != IStatus.ERROR) createFolder(folderPath.removeFirstSegments(segmentCount), outputFolder);
String complianceLevel = AbstractImageBuilder.this.javaBuilder.javaProject.getOption(JavaCore.COMPILER_COMPLIANCE, true); if (JavaConventions.validatePackageName(packageName, sourceLevel, complianceLevel).getSeverity() != IStatus.ERROR) createFolder(folderPath.removeFirstSegments(segmentCount), outputFolder);
String complianceLevel = AbstractImageBuilder.this.javaBuilder.javaProject.getOption(JavaCore.COMPILER_COMPLIANCE, true); if (JavaConventions.validatePackageName(packageName, sourceLevel, complianceLevel).getSeverity() != IStatus.ERROR) createFolder(folderPath.removeFirstSegments(segmentCount), outputFolder);