use of com.redhat.qute.commons.ProjectInfo in project quarkus-ls by redhat-developer.
the class QuteIndexerTest method createProject.
private static QuteProject createProject() {
ProjectInfo projectInfo = new ProjectInfo("test-qute", "src/test/resources/templates");
MockQuteProjectRegistry registry = new MockQuteProjectRegistry();
return new QuteProject(projectInfo, registry, registry);
}
use of com.redhat.qute.commons.ProjectInfo in project quarkus-ls by redhat-developer.
the class QuteGenerateTemplateContentCommandHandlerTest method createJavaDataModelCache.
private JavaDataModelCache createJavaDataModelCache() {
QuteProjectRegistry projectRegistry = new MockQuteProjectRegistry();
projectRegistry.getProject(new ProjectInfo(PROJECT_URI, TEMPLATE_BASE_DIR));
return new JavaDataModelCache(projectRegistry);
}
use of com.redhat.qute.commons.ProjectInfo in project quarkus-ls by redhat-developer.
the class JDTQuteProjectUtils method getProjectInfo.
public static ProjectInfo getProjectInfo(IJavaProject javaProject) {
IProject project = javaProject.getProject();
String projectUri = getProjectURI(project);
String templateBaseDir = project.getFile(TEMPLATES_BASE_DIR).getLocationURI().toString();
return new ProjectInfo(projectUri, templateBaseDir);
}
use of com.redhat.qute.commons.ProjectInfo in project quarkus-ls by redhat-developer.
the class QuteTextDocument method getProjectInfoFuture.
public CompletableFuture<ProjectInfo> getProjectInfoFuture() {
if (projectInfoFuture == null || projectInfoFuture.isCompletedExceptionally() || projectInfoFuture.isCancelled()) {
QuteProjectParams params = new QuteProjectParams(super.getUri());
projectInfoFuture = //
projectInfoProvider.getProjectInfo(params).thenApply(projectInfo -> {
if (projectInfo != null && this.projectUri == null) {
QuteProject project = projectRegistry.getProject(projectInfo);
this.projectUri = projectInfo.getUri();
this.templateId = project.getTemplateId(templatePath);
projectRegistry.onDidOpenTextDocument(this);
}
return projectInfo;
});
}
return projectInfoFuture;
}
use of com.redhat.qute.commons.ProjectInfo in project quarkus-ls by redhat-developer.
the class QuteAssert method createTemplate.
private static Template createTemplate(String value, String fileUri, String projectUri, String templateBaseDir, QuteProjectRegistry projectRegistry) {
Template template = TemplateParser.parse(value, fileUri != null ? fileUri : FILE_URI);
template.setProjectUri(projectUri);
projectRegistry.getProject(new ProjectInfo(projectUri, templateBaseDir));
template.setProjectRegistry(projectRegistry);
return template;
}
Aggregations