Search in sources :

Example 16 with SpecFile

use of org.eclipse.n4js.jsdoc2spec.SpecFile in project n4js by eclipse.

the class SummaryPageVisibilityListener method isVisibleChanged.

@Override
public void isVisibleChanged(boolean visible) {
    if (visible) {
        Set<SpecFile> specChangeSet = csp.getSpecChangeSet();
        if (specChangeSet == null || specChangeSet.isEmpty()) {
            summaryPage.setText("No files were changed");
        } else {
            StringBuilder strb = new StringBuilder("The following files will be updated on finish:\n");
            for (SpecFile specChange : specChangeSet) {
                strb.append("\n  ").append(specChange.getFileKey().toString());
            }
            summaryPage.setText(strb.toString());
        }
    }
}
Also used : SpecFile(org.eclipse.n4js.jsdoc2spec.SpecFile)

Example 17 with SpecFile

use of org.eclipse.n4js.jsdoc2spec.SpecFile in project n4js by eclipse.

the class IndexEntryWriter method getSpecFile.

/**
 * This method should be invoked after all entries were passed to this instance using {@link #serialize(ArrayList)}.
 * It returns a file including all contents ready to be written to the disk.
 */
public SpecFile getSpecFile(File rootDir) {
    String fileName = getFileName();
    String absFileName = rootDir + File.separator + FileSystem.DIR_ADOC_GEN + File.separator + fileName;
    File indexFile = new File(absFileName);
    String indexContent = strb.toString();
    SpecFile scf = createSpecFile(indexFile, indexContent);
    return scf;
}
Also used : SpecFile(org.eclipse.n4js.jsdoc2spec.SpecFile) File(java.io.File) SpecFile(org.eclipse.n4js.jsdoc2spec.SpecFile)

Example 18 with SpecFile

use of org.eclipse.n4js.jsdoc2spec.SpecFile in project n4js by eclipse.

the class WebContentFileWriter method generateAllPackagesFile.

private void generateAllPackagesFile(File rootDir, List<SpecFile> specFiles) {
    String fileName = "allPackages.adoc";
    String absFileName = rootDir + SEP + fileName;
    File indexFile = new File(absFileName);
    String indexContent = allPackagesStrb.toString();
    SpecFile scf = new SpecListingFile(indexFile, indexContent, "All Packages Overview");
    specFiles.add(scf);
}
Also used : SpecFile(org.eclipse.n4js.jsdoc2spec.SpecFile) File(java.io.File) SpecFile(org.eclipse.n4js.jsdoc2spec.SpecFile)

Aggregations

SpecFile (org.eclipse.n4js.jsdoc2spec.SpecFile)18 File (java.io.File)10 ArrayList (java.util.ArrayList)3 HashSet (java.util.HashSet)2 SubMonitorMsg (org.eclipse.n4js.jsdoc2spec.SubMonitorMsg)2 SpecIndexFile (org.eclipse.n4js.jsdoc2spec.adoc.SpecIndexFile)2 SpecModuleFile (org.eclipse.n4js.jsdoc2spec.adoc.SpecModuleFile)2 HashMap (java.util.HashMap)1 TreeMap (java.util.TreeMap)1 DiffNode (org.eclipse.compare.structuremergeviewer.DiffNode)1 URI (org.eclipse.emf.common.util.URI)1 FileBasedWorkspace (org.eclipse.n4js.internal.FileBasedWorkspace)1 N4JSModel (org.eclipse.n4js.internal.N4JSModel)1 N4JSRuntimeCore (org.eclipse.n4js.internal.N4JSRuntimeCore)1 SpecElementRef (org.eclipse.n4js.jsdoc2spec.SpecElementRef)1 SpecInfo (org.eclipse.n4js.jsdoc2spec.SpecInfo)1 IN4JSProject (org.eclipse.n4js.projectModel.IN4JSProject)1