Class ModuleNature

  • All Implemented Interfaces:
    org.eclipse.core.resources.IProjectNature

    public class ModuleNature
    extends java.lang.Object
    implements org.eclipse.core.resources.IProjectNature
    The iizi Module Project nature.
    Author:
    Christopher Mindus
    • Field Summary

      Fields 
      Modifier and TypeFieldDescription
      static java.lang.StringNATURE_ID
      The nature ID.
    • Constructor Summary

      Constructors 
      ConstructorDescription
      ModuleNature()
      Default Eclipse constructor.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static voidassociateNature​(org.eclipse.core.resources.IProject project, PluginDescriptor[] plugins, org.eclipse.core.runtime.IProgressMonitor monitor)
      Associating the iizi-nature with a project.
      voidconfigure()
      Configures the iizi Module Project nature for its project.
      voiddeconfigure()
      De-configures this nature for its project.
      ModuleModelgetModel()
      Gets the model for the project.
      org.eclipse.core.resources.IProjectgetProject()
      Returns the project to which this project nature applies.
      voidsetProject​(org.eclipse.core.resources.IProject project)
      Sets the project to which this nature applies.
      • Methods inherited from class java.lang.Object

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

    • Constructor Detail

      • ModuleNature

        public ModuleNature()
        Default Eclipse constructor.
    • Method Detail

      • associateNature

        public static void associateNature​(org.eclipse.core.resources.IProject project,
                                           PluginDescriptor[] plugins,
                                           org.eclipse.core.runtime.IProgressMonitor monitor)
                                    throws org.eclipse.core.runtime.CoreException
        Associating the iizi-nature with a project.
        Parameters:
        project - The project.
        plugins - The plug-ins for the project.
        monitor - The progress monitor.
        Throws:
        org.eclipse.core.runtime.CoreException - If this method doesn't complete.
      • setProject

        public void setProject​(org.eclipse.core.resources.IProject project)
        Sets the project to which this nature applies. Used when instantiating this project nature runtime. This is called by IProject.create() or IProject.setDescription() and should not be called directly by clients.
        Specified by:
        setProject in interface org.eclipse.core.resources.IProjectNature
        Parameters:
        project - Project the project to which this nature applies.
      • getProject

        public org.eclipse.core.resources.IProject getProject()
        Returns the project to which this project nature applies.
        Specified by:
        getProject in interface org.eclipse.core.resources.IProjectNature
        Returns:
        The project handle.
      • configure

        public void configure()
                       throws org.eclipse.core.runtime.CoreException
        Configures the iizi Module Project nature for its project. This is called by the workspace when natures are added to the project using IProject.setDescription and should not be called directly by clients. The nature extension id is added to the list of natures before this method is called, and need not be added here.

        Exceptions thrown by this method will be propagated back to the caller of IProject.setDescription, but the nature will remain in the project description.

        Specified by:
        configure in interface org.eclipse.core.resources.IProjectNature
        Throws:
        org.eclipse.core.runtime.CoreException - If this method fails.
      • deconfigure

        public void deconfigure()
                         throws org.eclipse.core.runtime.CoreException
        De-configures this nature for its project. This is called by the workspace when natures are removed from the project using IProject.setDescription and should not be called directly by clients. The nature extension id is removed from the list of natures before this method is called, and need not be removed here.

        Exceptions thrown by this method will be propagated back to the caller of IProject.setDescription, but the nature will still be removed from the project description.

        Specified by:
        deconfigure in interface org.eclipse.core.resources.IProjectNature
        Throws:
        org.eclipse.core.runtime.CoreException - If this method fails.
      • getModel

        public ModuleModel getModel()
        Gets the model for the project.
        Returns:
        The model, or null if not initialized/configured yet.