private String getPathString(IPath[] paths) { StringBuilder buf= new StringBuilder(); for (int i= 0; i < paths.length; i++) { if (buf.length() != 0) { buf.append(File.pathSeparatorChar); } buf.append(getPathString(paths[i])); } if (buf.length() == 0) { buf.append('.'); } return buf.toString(); }
private String getPathString(IPath[] paths) { StringBuffer buf= new StringBuffer(); for (int i= 0; i < paths.length; i++) { if (buf.length() != 0) { buf.append(File.pathSeparatorChar); } buf.append(getPathString(paths[i])); } if (buf.length() == 0) { buf.append('.'); } return buf.toString(); }
private String getPathString(IPath[] paths) { StringBuffer buf= new StringBuffer(); for (int i= 0; i < paths.length; i++) { if (buf.length() != 0) { buf.append(File.pathSeparatorChar); } buf.append(getPathString(paths[i])); } if (buf.length() == 0) { buf.append('.'); } return buf.toString(); }
private void sortSourceElement(IJavaElement[] iJavaElements, List sourcefiles, List packages) { for (int i= 0; i < iJavaElements.length; i++) { IJavaElement element= iJavaElements[i]; IPath p= element.getResource().getLocation(); if (p == null) continue; if (element instanceof ICompilationUnit) { String relative= getPathString(p); sourcefiles.add(relative); } else if (element instanceof IPackageFragment) { packages.add(element.getElementName()); } } }
private void sortSourceElement(IJavaElement[] iJavaElements, List<String> sourcefiles, List<String> packages) { for (int i= 0; i < iJavaElements.length; i++) { IJavaElement element= iJavaElements[i]; IPath p= element.getResource().getLocation(); if (p == null) continue; if (element instanceof ICompilationUnit) { String relative= getPathString(p); sourcefiles.add(relative); } else if (element instanceof IPackageFragment) { packages.add(element.getElementName()); } } }
private void sortSourceElement(IJavaElement[] iJavaElements, List<String> sourcefiles, List<String> packages) { for (int i= 0; i < iJavaElements.length; i++) { IJavaElement element= iJavaElements[i]; IPath p= element.getResource().getLocation(); if (p == null) continue; if (element instanceof ICompilationUnit) { String relative= getPathString(p); sourcefiles.add(relative); } else if (element instanceof IPackageFragment) { packages.add(element.getElementName()); } } }
private void xmlWriteDoclet(JavadocOptionsManager store, Document document, Element xmlJavadocDesc) throws DOMException { //set the packages and source files List<String> packages= new ArrayList<>(); List<String> sourcefiles= new ArrayList<>(); sortSourceElement(store.getSourceElements(), sourcefiles, packages); if (!packages.isEmpty()) xmlJavadocDesc.setAttribute(store.PACKAGENAMES, toSeparatedList(packages)); if (!sourcefiles.isEmpty()) xmlJavadocDesc.setAttribute(store.SOURCEFILES, toSeparatedList(sourcefiles)); xmlJavadocDesc.setAttribute(store.SOURCEPATH, getPathString(store.getSourcepath())); xmlJavadocDesc.setAttribute(store.CLASSPATH, getPathString(store.getClasspath())); xmlJavadocDesc.setAttribute(store.VISIBILITY, store.getAccess()); Element doclet= document.createElement("doclet"); //$NON-NLS-1$ xmlJavadocDesc.appendChild(doclet); doclet.setAttribute(store.NAME, store.getDocletName()); doclet.setAttribute(store.PATH, store.getDocletPath()); String str= store.getOverview(); if (str.length() > 0) xmlJavadocDesc.setAttribute(store.OVERVIEW, str); str= store.getAdditionalParams(); if (str.length() > 0) xmlJavadocDesc.setAttribute(store.EXTRAOPTIONS, str); }
private void xmlWriteDoclet(JavadocOptionsManager store, Document document, Element xmlJavadocDesc) throws DOMException { //set the packages and source files List packages= new ArrayList(); List sourcefiles= new ArrayList(); sortSourceElement(store.getSourceElements(), sourcefiles, packages); if (!packages.isEmpty()) xmlJavadocDesc.setAttribute(store.PACKAGENAMES, toSeparatedList(packages)); if (!sourcefiles.isEmpty()) xmlJavadocDesc.setAttribute(store.SOURCEFILES, toSeparatedList(sourcefiles)); xmlJavadocDesc.setAttribute(store.SOURCEPATH, getPathString(store.getSourcepath())); xmlJavadocDesc.setAttribute(store.CLASSPATH, getPathString(store.getClasspath())); xmlJavadocDesc.setAttribute(store.VISIBILITY, store.getAccess()); Element doclet= document.createElement("doclet"); //$NON-NLS-1$ xmlJavadocDesc.appendChild(doclet); doclet.setAttribute(store.NAME, store.getDocletName()); doclet.setAttribute(store.PATH, store.getDocletPath()); String str= store.getOverview(); if (str.length() > 0) xmlJavadocDesc.setAttribute(store.OVERVIEW, str); str= store.getAdditionalParams(); if (str.length() > 0) xmlJavadocDesc.setAttribute(store.EXTRAOPTIONS, str); }
private void xmlWriteDoclet(JavadocOptionsManager store, Document document, Element xmlJavadocDesc) throws DOMException { //set the packages and source files List<String> packages= new ArrayList<>(); List<String> sourcefiles= new ArrayList<>(); sortSourceElement(store.getSourceElements(), sourcefiles, packages); if (!packages.isEmpty()) xmlJavadocDesc.setAttribute(store.PACKAGENAMES, toSeparatedList(packages)); if (!sourcefiles.isEmpty()) xmlJavadocDesc.setAttribute(store.SOURCEFILES, toSeparatedList(sourcefiles)); xmlJavadocDesc.setAttribute(store.SOURCEPATH, getPathString(store.getSourcepath())); xmlJavadocDesc.setAttribute(store.CLASSPATH, getPathString(store.getClasspath())); xmlJavadocDesc.setAttribute(store.VISIBILITY, store.getAccess()); Element doclet= document.createElement("doclet"); //$NON-NLS-1$ xmlJavadocDesc.appendChild(doclet); doclet.setAttribute(store.NAME, store.getDocletName()); doclet.setAttribute(store.PATH, store.getDocletPath()); String str= store.getOverview(); if (str.length() > 0) xmlJavadocDesc.setAttribute(store.OVERVIEW, str); str= store.getAdditionalParams(); if (str.length() > 0) xmlJavadocDesc.setAttribute(store.EXTRAOPTIONS, str); }
private void xmlWriteJavadocStandardParams(JavadocOptionsManager store, Document document, Element xmlJavadocDesc) throws DOMException { String destination= getPathString(Path.fromOSString(store.getDestination())); xmlJavadocDesc.setAttribute(store.SOURCEFILES, toSeparatedList(sourcefiles)); xmlJavadocDesc.setAttribute(store.SOURCEPATH, getPathString(store.getSourcepath())); xmlJavadocDesc.setAttribute(store.CLASSPATH, getPathString(store.getClasspath()));
private void xmlWriteJavadocStandardParams(JavadocOptionsManager store, Document document, Element xmlJavadocDesc) throws DOMException { String destination= getPathString(Path.fromOSString(store.getDestination())); xmlJavadocDesc.setAttribute(store.SOURCEFILES, toSeparatedList(sourcefiles)); xmlJavadocDesc.setAttribute(store.SOURCEPATH, getPathString(store.getSourcepath())); xmlJavadocDesc.setAttribute(store.CLASSPATH, getPathString(store.getClasspath()));
private void xmlWriteJavadocStandardParams(JavadocOptionsManager store, Document document, Element xmlJavadocDesc) throws DOMException { String destination= getPathString(Path.fromOSString(store.getDestination())); xmlJavadocDesc.setAttribute(store.SOURCEFILES, toSeparatedList(sourcefiles)); xmlJavadocDesc.setAttribute(store.SOURCEPATH, getPathString(store.getSourcepath())); xmlJavadocDesc.setAttribute(store.CLASSPATH, getPathString(store.getClasspath()));