Search in sources :

Example 1 with StringFileSpecification

use of org.apache.flex.compiler.internal.filespecs.StringFileSpecification in project vscode-nextgenas by BowlerHatLLC.

the class LanguageServerFileSpecGetter method getFileSpecification.

public IFileSpecification getFileSpecification(String filePath) {
    Path path = Paths.get(filePath);
    if (sourceByPath.containsKey(path)) {
        String code = sourceByPath.get(path);
        if (path.endsWith(MXML_FILE_EXTENSION)) {
            code = fixUnclosedXMLComment(code);
            code = fixUnclosedScriptCDATA(code);
        }
        return new StringFileSpecification(filePath, code);
    }
    return new FileSpecification(filePath);
}
Also used : Path(java.nio.file.Path) StringFileSpecification(org.apache.flex.compiler.internal.filespecs.StringFileSpecification) StringFileSpecification(org.apache.flex.compiler.internal.filespecs.StringFileSpecification) IFileSpecification(org.apache.flex.compiler.filespecs.IFileSpecification) FileSpecification(org.apache.flex.compiler.filespecs.FileSpecification)

Aggregations

Path (java.nio.file.Path)1 FileSpecification (org.apache.flex.compiler.filespecs.FileSpecification)1 IFileSpecification (org.apache.flex.compiler.filespecs.IFileSpecification)1 StringFileSpecification (org.apache.flex.compiler.internal.filespecs.StringFileSpecification)1