org.ocleditor.internal.core.nature_builder
Class OclNature

java.lang.Object
  extended byorg.ocleditor.internal.core.nature_builder.OclNature
All Implemented Interfaces:
org.eclipse.core.resources.IProjectNature

public class OclNature
extends java.lang.Object
implements org.eclipse.core.resources.IProjectNature

Simple implementation of a nature that customizes a project by adding the OclBuilder to the list of builders found in a project description.


Constructor Summary
OclNature()
          Default constructor.
 
Method Summary
 void configure()
          Customizes the project by adding the OCL builder.
 void deconfigure()
          Removes any nature customization and private resources as may be required.
 org.eclipse.core.resources.IProject getProject()
          Returns local reference to associated project.
 void setProject(org.eclipse.core.resources.IProject pr)
          Saves local reference to associated project.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OclNature

public OclNature()
Default constructor.

Method Detail

configure

public void configure()
               throws org.eclipse.core.runtime.CoreException
Customizes the project by adding the OCL builder.

Specified by:
configure in interface org.eclipse.core.resources.IProjectNature
Throws:
org.eclipse.core.runtime.CoreException
See Also:
IProjectNature.configure()

deconfigure

public void deconfigure()
                 throws org.eclipse.core.runtime.CoreException
Removes any nature customization and private resources as may be required.

The OCL Builder is not removed here, but is removed automatically by the platform as the plugin.xml definition links the builder to the nature.

This works when the nature identifies the builder using a entry and the builder states that it has a nature using a ... entry.

Specified by:
deconfigure in interface org.eclipse.core.resources.IProjectNature
Throws:
org.eclipse.core.runtime.CoreException
See Also:
IProjectNature.deconfigure()

getProject

public org.eclipse.core.resources.IProject getProject()
Returns local reference to associated project.

Specified by:
getProject in interface org.eclipse.core.resources.IProjectNature
See Also:
IProjectNature.getProject()

setProject

public void setProject(org.eclipse.core.resources.IProject pr)
Saves local reference to associated project.

Specified by:
setProject in interface org.eclipse.core.resources.IProjectNature
See Also:
IProjectNature.setProject(IProject)