001 /*
002 * Copyright (c) 2009 IBM Corporation and others.
003 * All rights reserved. This program and the accompanying materials
004 * are made available under the terms of the Eclipse Public License v1.0
005 * which accompanies this distribution, and is available at
006 * http://www.eclipse.org/legal/epl-v10.html
007 *
008 * Contributors:
009 * IBM - initial API and implementation
010 *
011 * $Id: CommonPlugin.java,v 1.2 2009/03/13 19:54:31 jbruck Exp $
012 */
013 package org.eclipse.uml2.common;
014
015 import org.eclipse.emf.common.EMFPlugin;
016 import org.eclipse.emf.common.util.ResourceLocator;
017
018 /**
019 * @since 1.5
020 */
021 public class CommonPlugin
022 extends EMFPlugin {
023
024 /**
025 * The singleton instance of the plugin.
026 */
027 public static final CommonPlugin INSTANCE = new CommonPlugin();
028
029 /**
030 * The one instance of this class.
031 */
032 private static Implementation plugin;
033
034 /**
035 * Creates the singleton instance.
036 */
037 private CommonPlugin() {
038 super(new ResourceLocator[]{});
039 }
040
041 /**
042 * Returns the singleton instance of the plugin.
043 *
044 * @return the singleton instance.
045 */
046 @Override
047 public ResourceLocator getPluginResourceLocator() {
048 return plugin;
049 }
050
051 /**
052 * The actual implementation of the <b>Plugin</b>.
053 */
054 public static class Implementation
055 extends EclipsePlugin {
056
057 public Implementation() {
058 super();
059
060 plugin = this;
061 }
062 }
063
064 }