Ignore:
Timestamp:
11/09/05 17:43:12 (19 years ago)
Author:
remar
Message:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/org.modelica.mdt/src/org/modelica/mdt/ui/ModelicaNature.java

    r89 r130  
    22 * This file is part of Modelica Development Tooling.
    33 *
    4  * Copyright (c) 2005, Linköpings universitet, Department of
     4 * Copyright (c) 2005, Linkpings universitet, Department of
    55 * Computer and Information Science, PELAB
    66 *
     
    2323 *   distribution.
    2424 *
    25  * * Neither the name of Linköpings universitet nor the names of its
     25 * * Neither the name of Linkpings universitet nor the names of its
    2626 *   contributors may be used to endorse or promote products derived from
    2727 *   this software without specific prior written permission.
     
    4545import org.eclipse.core.resources.IProjectNature;
    4646import org.eclipse.core.runtime.CoreException;
     47import org.eclipse.core.runtime.IProgressMonitor;
     48import org.eclipse.core.runtime.IStatus;
     49import org.eclipse.core.runtime.Status;
     50import org.eclipse.core.runtime.jobs.Job;
     51import org.modelica.mdt.builder.ModelicaBuilder;
    4752
    4853public class ModelicaNature implements IProjectNature
     
    5257    public void configure() throws CoreException
    5358    {
     59        // TODO Install builder here
     60        ModelicaBuilder.addBuilderToProject(project);
     61       
     62        new Job("Modelica Build")
     63        {
     64            protected IStatus run(IProgressMonitor monitor)
     65            {
     66                try
     67                {
     68                    project.build(ModelicaBuilder.FULL_BUILD,
     69                                  ModelicaBuilder.BUILDER_ID,
     70                                  null,
     71                                  monitor);
     72                }
     73                catch(CoreException e)
     74                {
     75                   
     76                }
     77                return Status.OK_STATUS;
     78            }
     79        }.schedule();
    5480    }
    5581
    5682    public void deconfigure() throws CoreException
    5783    {
     84        ModelicaBuilder.removeBuilderFromProject(project);
     85        // ModelicaBuilder.deleteBuildMarkers(project);
    5886    }
    5987
Note: See TracChangeset for help on using the changeset viewer.