Package net.gereon.jloom.eclipse.core

Source Code of net.gereon.jloom.eclipse.core.JLoomPlugin

/*
This file is part of JLoom
Copyright (C) 2006  Gereon Fassbender
Homepage: jloom.sourceforge.net

JLoom is free software; you can redistribute it and/or modify it under the terms
of the GNU General Public License as published by the Free Software Foundation;
either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.

You can find a copy of the GNU General Public License along with this program
in a file called COPYING. Information can also be found at www.fsf.org or
www.gnu.org or write to the Free Software Foundation, Inc., 51 Franklin Street,
Fifth Floor, Boston, MA 02110-1301, USA
*/
/*
created: 01.01.2006  Gereon Fassbender

$Revision$
$Date$
$Log$
*/

package net.gereon.jloom.eclipse.core;

import net.gereon.jloom.eclipse.builder.MarkerTransferor;
import net.gereon.jloom.util.Log;

import org.eclipse.core.resources.*;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.*;



public class JLoomPlugin extends AbstractUIPlugin
{
  private static JLoomPlugin plugin;
 
 
  static
  {
    // enable assertions
    JLoomPlugin.class.getClassLoader().setDefaultAssertionStatus(true);
  }

 
  public JLoomPlugin()
  {
    synchronized (getClass())
    {
      Log.log.fine("Initializing JLoom plugin.");
      assert plugin == null : "JLoom plugin initialized twice.";
      plugin = this;
      IWorkspace workspace = ResourcesPlugin.getWorkspace();
      workspace.addResourceChangeListener(new MarkerTransferor(), IResourceChangeEvent.POST_CHANGE);
    }
  }
 
 
  public synchronized static JLoomPlugin getDefault()
  {
    assert plugin != null : "JLoom plugin not initialized.";
    return plugin;
  }


  public synchronized void start(BundleContext context) throws Exception
  {
    super.start(context);
    //String version = getDescriptor().getVersionIdentifier().toString();
    //Log.log.fine("JLoom Plugin started, version: " + version);
  }


  public synchronized void stop(BundleContext context) throws Exception
  {
    super.stop(context);
  }
}
TOP

Related Classes of net.gereon.jloom.eclipse.core.JLoomPlugin

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.