public class GeneratorService extends AbstractCachedService<GeneratorService.GeneratedArtifacts>
Results of this service are cached in the session state. However, the service is not invoked automatically after a document change (in contrast to e.g. validation), but only after an explicit request.
| Modifier and Type | Class and Description |
|---|---|
static class |
GeneratorService.GeneratedArtifacts
This service result class is just a wrapper to store all generated documents.
|
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFAULT_ARTIFACT
The default artifact name that is accessed when no specific artifact is requested.
|
| Constructor and Description |
|---|
GeneratorService() |
| Modifier and Type | Method and Description |
|---|---|
GeneratorService.GeneratedArtifacts |
compute(IXtextWebDocument it,
org.eclipse.xtext.util.CancelIndicator cancelIndicator)
Generate artifacts for the given document.
|
GeneratorResult |
getArtifact(XtextWebDocumentAccess document,
java.lang.String artifactId)
Retrieve the generated artifact with given identifier.
|
GeneratorResult |
getArtifact(XtextWebDocumentAccess document,
java.lang.String artifactId,
boolean includeContent)
Retrieve the generated artifact with given identifier.
|
GeneratorService.GeneratedArtifacts |
getResult(XtextWebDocumentAccess document,
boolean includeContent)
Returns a
GeneratorService.GeneratedArtifacts result with or without content. |
getResultpublic static final java.lang.String DEFAULT_ARTIFACT
public GeneratorService.GeneratedArtifacts compute(IXtextWebDocument it, org.eclipse.xtext.util.CancelIndicator cancelIndicator)
AbstractCachedService.getResult(XtextWebDocumentAccess).compute in class AbstractCachedService<GeneratorService.GeneratedArtifacts>public GeneratorResult getArtifact(XtextWebDocumentAccess document, java.lang.String artifactId)
InMemoryFileSystemAccess.getFileName(String,String)). If artifactId is null,
DEFAULT_ARTIFACT is used as identifier. If the requested artifact is in IFileSystemAccess.DEFAULT_OUTPUT,
the output configuration prefix may be omitted.public GeneratorResult getArtifact(XtextWebDocumentAccess document, java.lang.String artifactId, boolean includeContent)
includeContent is false,
only the metadata is included in the service result.public GeneratorService.GeneratedArtifacts getResult(XtextWebDocumentAccess document, boolean includeContent)
GeneratorService.GeneratedArtifacts result with or without content. If includeContent is false,
only the metadata is included in the service result, which is useful to explore the generated artifacts.