org.ocleditor.internal.core.nature_builder
Class OclBuilder

java.lang.Object
  extended byorg.eclipse.core.internal.events.InternalBuilder
      extended byorg.eclipse.core.resources.IncrementalProjectBuilder
          extended byorg.ocleditor.internal.core.nature_builder.OclBuilder
All Implemented Interfaces:
org.eclipse.core.runtime.IExecutableExtension

public class OclBuilder
extends org.eclipse.core.resources.IncrementalProjectBuilder

Builder for .ocl files.

The builder will process files in the current project, and register its intent to process files in any referenced project. This means that even though the builder is not associated to a project, the fact that a project with this builder has a project reference means that the target project will also be processed.

See Also:
IncrementalProjectBuilder, IResourceDelta

Field Summary
 
Fields inherited from class org.eclipse.core.resources.IncrementalProjectBuilder
AUTO_BUILD, FULL_BUILD, INCREMENTAL_BUILD
 
Constructor Summary
OclBuilder()
          Default constructor.
 
Method Summary
 void checkBuildType(int kind)
          Prints builder kind trace messages to the console.
 void processDelta(org.eclipse.core.resources.IResourceDelta delta)
          The IResourceDelta passed is processed by a IResourceDeltaVisitor when the delta contains information about changes in OCL files.
 void processDelta4ReferencedProjects(org.eclipse.core.resources.IProject[] refedProjects)
          Attempts to process OCL changes in another project where the builder is not registered.
 void processFull(org.eclipse.core.resources.IProject project)
          Performs a FULL_BUILD by visiting all nodes in the resource tree for the specified project.
 void processFull4ReferencedProjects(org.eclipse.core.resources.IProject[] refedProjects)
          Performs a full buils on any referenced projects.
 void setInitializationData(org.eclipse.core.runtime.IConfigurationElement config, java.lang.String propertyName, java.lang.Object data)
          Finds builder parameters defined in the plugin.xml.
 org.eclipse.core.resources.IProject[] watchReferecedProjects()
          Returns an array of projects that are of interest for the next build.
 
Methods inherited from class org.eclipse.core.resources.IncrementalProjectBuilder
forgetLastBuiltState, getDelta, getProject, hasBeenBuilt, isInterrupted, needRebuild
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OclBuilder

public OclBuilder()
Default constructor.

Method Detail

setInitializationData

public void setInitializationData(org.eclipse.core.runtime.IConfigurationElement config,
                                  java.lang.String propertyName,
                                  java.lang.Object data)
                           throws org.eclipse.core.runtime.CoreException
Finds builder parameters defined in the plugin.xml.

Throws:
org.eclipse.core.runtime.CoreException
See Also:
IExecutableExtension.setInitializationData(IConfigurationElement, String, Object)

checkBuildType

public void checkBuildType(int kind)
Prints builder kind trace messages to the console.


watchReferecedProjects

public org.eclipse.core.resources.IProject[] watchReferecedProjects()
Returns an array of projects that are of interest for the next build. If this array is returned by the build method, the build can get a delta for these projects during the next build cycle. The projects returned are those referenced by the current project, if none are referenced a null is returned.


processFull

public void processFull(org.eclipse.core.resources.IProject project)
Performs a FULL_BUILD by visiting all nodes in the resource tree for the specified project. The OclFileDeltaVisitor class is used to process the .ocl files.


processFull4ReferencedProjects

public void processFull4ReferencedProjects(org.eclipse.core.resources.IProject[] refedProjects)
Performs a full buils on any referenced projects.


processDelta

public void processDelta(org.eclipse.core.resources.IResourceDelta delta)
                  throws org.eclipse.core.runtime.CoreException
The IResourceDelta passed is processed by a IResourceDeltaVisitor when the delta contains information about changes in OCL files.

A null delta exists when the project is created.

Multiple visit invocation statements are included for the different resource visitors provided in this resource programming demonstration package. You may wish to invoke other visitors to further explore the IResourceDelta.

Throws:
org.eclipse.core.runtime.CoreException
See Also:
IResourceDelta

processDelta4ReferencedProjects

public void processDelta4ReferencedProjects(org.eclipse.core.resources.IProject[] refedProjects)
                                     throws org.eclipse.core.runtime.CoreException
Attempts to process OCL changes in another project where the builder is not registered. Other projects are those referenced by the current project.

Throws:
org.eclipse.core.runtime.CoreException