KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > emf > importer > rose > RoseImporterPlugin


1 /**
2  * <copyright>
3  *
4  * Copyright (c) 2002-2004 IBM Corporation and others.
5  * All rights reserved. This program and the accompanying materials
6  * are made available under the terms of the Eclipse Public License v1.0
7  * which accompanies this distribution, and is available at
8  * http://www.eclipse.org/legal/epl-v10.html
9  *
10  * Contributors:
11  * IBM - Initial API and implementation
12  *
13  * </copyright>
14  *
15  * $Id: RoseImporterPlugin.java,v 1.2 2005/06/08 06:20:36 nickb Exp $
16  */

17 package org.eclipse.emf.importer.rose;
18
19 import org.eclipse.emf.common.EMFPlugin;
20 import org.eclipse.emf.common.util.ResourceLocator;
21 import org.eclipse.emf.importer.ImporterPlugin;
22
23
24 /**
25  * The <b>Plugin</b> for the EMF.CodeGen.Ecore.Rose library.
26  * @since 2.1.0
27  */

28 public final class RoseImporterPlugin extends EMFPlugin
29 {
30   /**
31    * The singleton instance of the plugin.
32    */

33   public static final RoseImporterPlugin INSTANCE = new RoseImporterPlugin();
34
35   /**
36    * The one instance of this class.
37    */

38   private static Implementation plugin;
39
40   /**
41    * Creates the singleton instance.
42    */

43   private RoseImporterPlugin()
44   {
45     super(new ResourceLocator [] { ImporterPlugin.INSTANCE });
46   }
47
48   /*
49    * Javadoc copied from base class.
50    */

51   public ResourceLocator getPluginResourceLocator()
52   {
53     return plugin;
54   }
55
56   /**
57    * Returns the singleton instance of the Eclipse plugin.
58    * @return the singleton instance.
59    */

60   public static Implementation getPlugin()
61   {
62     return plugin;
63   }
64
65   /**
66    * The actual implementation of the Eclipse <b>Plugin</b>.
67    */

68   public static class Implementation extends EclipsePlugin
69   {
70     /**
71      * Creates an instance.
72      */

73     public Implementation()
74     {
75       super();
76
77       // Remember the static instance.
78
//
79
plugin = this;
80     }
81   }
82 }
83
Popular Tags