Class ValidationBuilder

  • All Implemented Interfaces:
    org.eclipse.core.runtime.IExecutableExtension
    Direct Known Subclasses:
    ViewModelBuilder

    public class ValidationBuilder
    extends org.eclipse.core.resources.IncrementalProjectBuilder
    Incremental builder that triggers validation on view models in the workspace.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String BUILDER_ID
      identifier of the builder, similar to plugin.xml value.
      static java.lang.String MARKER_ID
      identifier of the marker, similar to plugin.xml value.
      • Fields inherited from class org.eclipse.core.resources.IncrementalProjectBuilder

        AUTO_BUILD, CLEAN_BUILD, FULL_BUILD, INCREMENTAL_BUILD
    • Constructor Summary

      Constructors 
      Constructor Description
      ValidationBuilder()
      Initializes me.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected org.eclipse.core.resources.IProject[] build​(int kind, java.util.Map<java.lang.String,​java.lang.String> args, org.eclipse.core.runtime.IProgressMonitor monitor)  
      protected void clean​(org.eclipse.core.runtime.IProgressMonitor monitor)  
      protected Bazaar.Builder<org.eclipse.emf.common.ui.MarkerHelper> configureMarkers​(Bazaar.Builder<org.eclipse.emf.common.ui.MarkerHelper> bazaarBuilder)
      Configure the marker helper bazaar builder.
      protected Bazaar.Builder<ValidationDelegate> configureValidation​(Bazaar.Builder<ValidationDelegate> bazaarBuilder)
      Configure the validation delegate bazaar builder.
      protected <T> Bazaar.Builder<T> createBazaarBuilder​(Vendor<? extends T> defaultVendor)
      Create the core bazaar builder for a bazaar that has a default vendor.
      protected BazaarContext createContext​(org.eclipse.core.resources.IFile file)
      Create the bazaar vendor injection context for a file.
      protected void fullBuild​(org.eclipse.core.runtime.IProgressMonitor monitor)
      Runs a full build on the project.
      protected org.eclipse.core.runtime.content.IContentType getContentType​(org.eclipse.core.resources.IFile file)
      Get the content-type of a file.
      protected void incrementalBuild​(org.eclipse.core.resources.IResourceDelta delta, org.eclipse.core.runtime.IProgressMonitor monitor)
      Runs an incremental build on the project.
      • Methods inherited from class org.eclipse.core.resources.IncrementalProjectBuilder

        forgetLastBuiltState, getBuildConfig, getCommand, getContext, getDelta, getProject, getRule, hasBeenBuilt, isInterrupted, needRebuild, rememberLastBuiltState, requestProjectRebuild, requestProjectsRebuild, setInitializationData, startupOnInitialize
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • BUILDER_ID

        public static final java.lang.String BUILDER_ID
        identifier of the builder, similar to plugin.xml value.
        See Also:
        Constant Field Values
      • MARKER_ID

        public static final java.lang.String MARKER_ID
        identifier of the marker, similar to plugin.xml value.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ValidationBuilder

        public ValidationBuilder()
        Initializes me.
    • Method Detail

      • build

        protected org.eclipse.core.resources.IProject[] build​(int kind,
                                                              java.util.Map<java.lang.String,​java.lang.String> args,
                                                              org.eclipse.core.runtime.IProgressMonitor monitor)
                                                       throws org.eclipse.core.runtime.CoreException
        Specified by:
        build in class org.eclipse.core.resources.IncrementalProjectBuilder
        Throws:
        org.eclipse.core.runtime.CoreException
      • createBazaarBuilder

        protected <T> Bazaar.Builder<T> createBazaarBuilder​(Vendor<? extends T> defaultVendor)
        Create the core bazaar builder for a bazaar that has a default vendor. The default vendor should lose all auctions in which it is not the only bidder.
        Type Parameters:
        T - the product type of the bazaar
        Parameters:
        defaultVendor - the default vendor of the bazaar's product type
        Returns:
        the bazaar builder
      • configureValidation

        protected Bazaar.Builder<ValidationDelegate> configureValidation​(Bazaar.Builder<ValidationDelegate> bazaarBuilder)
        Configure the validation delegate bazaar builder. Subclasses may extend or override to add vendors or context functions.
        Parameters:
        bazaarBuilder - the validation delegate bazaar builder
        Returns:
        the same bazaarBuilder
      • configureMarkers

        protected Bazaar.Builder<org.eclipse.emf.common.ui.MarkerHelper> configureMarkers​(Bazaar.Builder<org.eclipse.emf.common.ui.MarkerHelper> bazaarBuilder)
        Configure the marker helper bazaar builder. Subclasses may extend or override to add vendors or context functions.
        Parameters:
        bazaarBuilder - the marker helper bazaar builder
        Returns:
        the same bazaarBuilder
      • clean

        protected void clean​(org.eclipse.core.runtime.IProgressMonitor monitor)
                      throws org.eclipse.core.runtime.CoreException
        Overrides:
        clean in class org.eclipse.core.resources.IncrementalProjectBuilder
        Throws:
        org.eclipse.core.runtime.CoreException
      • fullBuild

        protected void fullBuild​(org.eclipse.core.runtime.IProgressMonitor monitor)
                          throws org.eclipse.core.runtime.CoreException
        Runs a full build on the project.
        Parameters:
        monitor - the progress monitor to track the build
        Throws:
        org.eclipse.core.runtime.CoreException - exception in case of issues
      • incrementalBuild

        protected void incrementalBuild​(org.eclipse.core.resources.IResourceDelta delta,
                                        org.eclipse.core.runtime.IProgressMonitor monitor)
                                 throws org.eclipse.core.runtime.CoreException
        Runs an incremental build on the project.
        Parameters:
        delta - the delta on the resource that triggers this incremental build
        monitor - the progress monitor to track the build
        Throws:
        org.eclipse.core.runtime.CoreException - exception in case of issues
      • createContext

        protected BazaarContext createContext​(org.eclipse.core.resources.IFile file)
        Create the bazaar vendor injection context for a file.
        Parameters:
        file - a file to be validated
        Returns:
        the injection context
      • getContentType

        protected org.eclipse.core.runtime.content.IContentType getContentType​(org.eclipse.core.resources.IFile file)
        Get the content-type of a file.
        Parameters:
        file - a file
        Returns:
        the content type, or null if it cannot be determined for some reason