public class BuilderParticipant extends java.lang.Object implements IXtextBuilderParticipant
IXtextBuilderParticipant.BuildType, IXtextBuilderParticipant.IBuildContext
Constructor and Description |
---|
BuilderParticipant() |
Modifier and Type | Method and Description |
---|---|
protected void |
addMarkerAndLogError(org.eclipse.emf.common.util.URI uri,
java.lang.Throwable e) |
void |
build(IXtextBuilderParticipant.IBuildContext context,
org.eclipse.core.runtime.IProgressMonitor monitor)
Allows clients to perform additional steps in the build process such as code generation.
|
protected void |
cleanDerivedResources(IResourceDescription.Delta delta,
java.util.Set<org.eclipse.core.resources.IFile> derivedResources,
IXtextBuilderParticipant.IBuildContext context,
EclipseResourceFileSystemAccess2 access,
org.eclipse.core.runtime.IProgressMonitor deleteMonitor) |
protected void |
cleanOutput(IXtextBuilderParticipant.IBuildContext ctx,
OutputConfiguration config,
EclipseResourceFileSystemAccess2 access,
org.eclipse.core.runtime.IProgressMonitor monitor) |
protected void |
cleanOutput(IXtextBuilderParticipant.IBuildContext ctx,
OutputConfiguration config,
org.eclipse.core.runtime.IProgressMonitor monitor) |
protected void |
clearResourceSet(org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
Clears the content of the resource set without sending notifications.
|
protected void |
doBuild(java.util.List<IResourceDescription.Delta> deltas,
java.util.Map<java.lang.String,OutputConfiguration> outputConfigurations,
java.util.Map<OutputConfiguration,java.lang.Iterable<org.eclipse.core.resources.IMarker>> generatorMarkers,
IXtextBuilderParticipant.IBuildContext context,
EclipseResourceFileSystemAccess2 access,
org.eclipse.core.runtime.IProgressMonitor progressMonitor) |
protected boolean |
doGenerate(IResourceDescription.Delta delta,
IXtextBuilderParticipant.IBuildContext context,
IFileSystemAccess access) |
BuilderPreferenceAccess |
getBuilderPreferenceAccess() |
protected java.lang.String |
getCurrentSourceFolder(IXtextBuilderParticipant.IBuildContext context,
IResourceDescription.Delta delta) |
protected IDerivedResourceMarkers |
getDerivedResourceMarkers() |
protected java.util.Set<org.eclipse.core.resources.IFile> |
getDerivedResources(IResourceDescription.Delta delta,
java.util.Map<java.lang.String,OutputConfiguration> outputConfigurations,
java.util.Map<OutputConfiguration,java.lang.Iterable<org.eclipse.core.resources.IMarker>> generatorMarkers) |
IGenerator |
getGenerator() |
protected DerivedResourceMarkers.GeneratorIdProvider |
getGeneratorIdProvider() |
protected java.util.Map<OutputConfiguration,java.lang.Iterable<org.eclipse.core.resources.IMarker>> |
getGeneratorMarkers(org.eclipse.core.resources.IProject builtProject,
java.util.Collection<OutputConfiguration> outputConfigurations) |
EclipseOutputConfigurationProvider |
getOutputConfigurationProvider() |
protected java.util.Map<java.lang.String,OutputConfiguration> |
getOutputConfigurations(IXtextBuilderParticipant.IBuildContext context) |
protected java.util.Set<org.eclipse.core.resources.IContainer> |
getOutputs(org.eclipse.core.resources.IProject project,
OutputConfiguration outputConfiguration) |
protected EclipseResourceFileSystemAccess2.IFileCallback |
getPostProcessor(IResourceDescription.Delta delta,
IXtextBuilderParticipant.IBuildContext context,
java.util.Set<org.eclipse.core.resources.IFile> derivedResources) |
protected java.util.List<IResourceDescription.Delta> |
getRelevantDeltas(IXtextBuilderParticipant.IBuildContext context) |
IResourceServiceProvider |
getResourceServiceProvider() |
IStorage2UriMapper |
getStorage2UriMapper() |
protected void |
handleChangedContents(IResourceDescription.Delta delta,
IXtextBuilderParticipant.IBuildContext context,
EclipseResourceFileSystemAccess2 fileSystemAccess) |
protected void |
handleChangedContents(IResourceDescription.Delta delta,
IXtextBuilderParticipant.IBuildContext context,
IFileSystemAccess access) |
protected boolean |
isEnabled(IXtextBuilderParticipant.IBuildContext context) |
protected void |
refreshOutputFolders(IXtextBuilderParticipant.IBuildContext ctx,
java.util.Map<java.lang.String,OutputConfiguration> outputConfigurations,
org.eclipse.core.runtime.IProgressMonitor monitor) |
protected void |
registerCurrentSourceFolder(IXtextBuilderParticipant.IBuildContext context,
IResourceDescription.Delta delta,
EclipseResourceFileSystemAccess2 fileSystemAccess) |
protected void |
saveResourceStorage(org.eclipse.emf.ecore.resource.Resource resource,
IFileSystemAccess access) |
void |
setBuilderPreferenceAccess(BuilderPreferenceAccess builderPreferenceAccess) |
void |
setOutputConfigurationProvider(EclipseOutputConfigurationProvider outputConfigurationProvider) |
protected boolean |
shouldGenerate(org.eclipse.emf.ecore.resource.Resource resource,
IXtextBuilderParticipant.IBuildContext context) |
public IStorage2UriMapper getStorage2UriMapper()
protected IDerivedResourceMarkers getDerivedResourceMarkers()
protected DerivedResourceMarkers.GeneratorIdProvider getGeneratorIdProvider()
public BuilderPreferenceAccess getBuilderPreferenceAccess()
@Inject public void setBuilderPreferenceAccess(BuilderPreferenceAccess builderPreferenceAccess)
public EclipseOutputConfigurationProvider getOutputConfigurationProvider()
public IGenerator getGenerator()
public IResourceServiceProvider getResourceServiceProvider()
@Inject public void setOutputConfigurationProvider(EclipseOutputConfigurationProvider outputConfigurationProvider)
protected java.util.Map<OutputConfiguration,java.lang.Iterable<org.eclipse.core.resources.IMarker>> getGeneratorMarkers(org.eclipse.core.resources.IProject builtProject, java.util.Collection<OutputConfiguration> outputConfigurations) throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException
public void build(IXtextBuilderParticipant.IBuildContext context, org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.CoreException
IXtextBuilderParticipant
build
in interface IXtextBuilderParticipant
monitor
- the progress monitor to use for reporting progress to the user. It is the caller's responsibility
to call done() on the given monitor. Accepts null, indicating that no progress should be
reported and that the operation cannot be cancelled.org.eclipse.core.runtime.CoreException
protected void doBuild(java.util.List<IResourceDescription.Delta> deltas, java.util.Map<java.lang.String,OutputConfiguration> outputConfigurations, java.util.Map<OutputConfiguration,java.lang.Iterable<org.eclipse.core.resources.IMarker>> generatorMarkers, IXtextBuilderParticipant.IBuildContext context, EclipseResourceFileSystemAccess2 access, org.eclipse.core.runtime.IProgressMonitor progressMonitor) throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException
protected void clearResourceSet(org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
protected void addMarkerAndLogError(org.eclipse.emf.common.util.URI uri, java.lang.Throwable e)
protected void cleanDerivedResources(IResourceDescription.Delta delta, java.util.Set<org.eclipse.core.resources.IFile> derivedResources, IXtextBuilderParticipant.IBuildContext context, EclipseResourceFileSystemAccess2 access, org.eclipse.core.runtime.IProgressMonitor deleteMonitor) throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException
protected EclipseResourceFileSystemAccess2.IFileCallback getPostProcessor(IResourceDescription.Delta delta, IXtextBuilderParticipant.IBuildContext context, java.util.Set<org.eclipse.core.resources.IFile> derivedResources)
protected java.util.Set<org.eclipse.core.resources.IFile> getDerivedResources(IResourceDescription.Delta delta, java.util.Map<java.lang.String,OutputConfiguration> outputConfigurations, java.util.Map<OutputConfiguration,java.lang.Iterable<org.eclipse.core.resources.IMarker>> generatorMarkers)
protected boolean isEnabled(IXtextBuilderParticipant.IBuildContext context)
protected java.util.List<IResourceDescription.Delta> getRelevantDeltas(IXtextBuilderParticipant.IBuildContext context)
protected void refreshOutputFolders(IXtextBuilderParticipant.IBuildContext ctx, java.util.Map<java.lang.String,OutputConfiguration> outputConfigurations, org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException
protected void cleanOutput(IXtextBuilderParticipant.IBuildContext ctx, OutputConfiguration config, org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException
protected void cleanOutput(IXtextBuilderParticipant.IBuildContext ctx, OutputConfiguration config, EclipseResourceFileSystemAccess2 access, org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException
protected boolean doGenerate(IResourceDescription.Delta delta, IXtextBuilderParticipant.IBuildContext context, IFileSystemAccess access)
protected void handleChangedContents(IResourceDescription.Delta delta, IXtextBuilderParticipant.IBuildContext context, IFileSystemAccess access) throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException
protected void handleChangedContents(IResourceDescription.Delta delta, IXtextBuilderParticipant.IBuildContext context, EclipseResourceFileSystemAccess2 fileSystemAccess) throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException
protected void registerCurrentSourceFolder(IXtextBuilderParticipant.IBuildContext context, IResourceDescription.Delta delta, EclipseResourceFileSystemAccess2 fileSystemAccess)
protected java.lang.String getCurrentSourceFolder(IXtextBuilderParticipant.IBuildContext context, IResourceDescription.Delta delta)
protected boolean shouldGenerate(org.eclipse.emf.ecore.resource.Resource resource, IXtextBuilderParticipant.IBuildContext context)
protected java.util.Map<java.lang.String,OutputConfiguration> getOutputConfigurations(IXtextBuilderParticipant.IBuildContext context)
protected java.util.Set<org.eclipse.core.resources.IContainer> getOutputs(org.eclipse.core.resources.IProject project, OutputConfiguration outputConfiguration)
protected void saveResourceStorage(org.eclipse.emf.ecore.resource.Resource resource, IFileSystemAccess access)