use of org.gradle.plugins.ide.eclipse.model.FileReference in project gradle by gradle.
the class WtpComponentFactory method createWbDependentModuleEntry.
private WbDependentModule createWbDependentModuleEntry(File file, FileReferenceFactory fileReferenceFactory, String deployPath) {
FileReference ref = fileReferenceFactory.fromFile(file);
String handleSnippet = ref.isRelativeToPathVariable() ? "var/" + ref.getPath() : "lib/" + ref.getPath();
return new WbDependentModule(deployPath, "module:/classpath/" + handleSnippet);
}
use of org.gradle.plugins.ide.eclipse.model.FileReference in project gradle by gradle.
the class EclipseDependenciesCreator method createLibraryEntry.
private static AbstractLibrary createLibraryEntry(File binary, File source, File javadoc, EclipseClasspath classpath, ModuleVersionIdentifier id) {
FileReferenceFactory referenceFactory = classpath.getFileReferenceFactory();
FileReference binaryRef = referenceFactory.fromFile(binary);
FileReference sourceRef = referenceFactory.fromFile(source);
FileReference javadocRef = referenceFactory.fromFile(javadoc);
final AbstractLibrary out = binaryRef.isRelativeToPathVariable() ? new Variable(binaryRef) : new Library(binaryRef);
out.setJavadocPath(javadocRef);
out.setSourcePath(sourceRef);
out.setExported(false);
out.setModuleVersion(id);
return out;
}
Aggregations