Index: src/org/eclipse/gmf/runtime/diagram/core/internal/DiagramPlugin.java =================================================================== RCS file: /cvsroot/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.runtime.diagram.core/src/org/eclipse/gmf/runtime/diagram/core/internal/DiagramPlugin.java,v retrieving revision 1.2 diff -u -r1.2 DiagramPlugin.java --- src/org/eclipse/gmf/runtime/diagram/core/internal/DiagramPlugin.java 12 Sep 2005 21:24:26 -0000 1.2 +++ src/org/eclipse/gmf/runtime/diagram/core/internal/DiagramPlugin.java 26 Sep 2005 16:23:32 -0000 @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright (c) 2002, 2003 IBM Corporation and others. + * Copyright (c) 2002, 2005 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,16 +9,11 @@ * IBM Corporation - initial API and implementation ****************************************************************************/ - package org.eclipse.gmf.runtime.diagram.core.internal; -import org.eclipse.core.runtime.Platform; - import org.eclipse.gmf.runtime.common.core.l10n.AbstractResourceManager; import org.eclipse.gmf.runtime.common.core.plugin.XToolsPlugin; import org.eclipse.gmf.runtime.diagram.core.internal.l10n.DiagramResourceManager; -import org.eclipse.gmf.runtime.diagram.core.internal.services.semantic.SemanticService; -import org.eclipse.gmf.runtime.diagram.core.internal.services.view.ViewService; /** * The main plugin class to be used in the desktop. @@ -28,16 +23,6 @@ public class DiagramPlugin extends XToolsPlugin { - /** - * The semantic service extension point id - */ - private final static String SEMANTIC_SERVICE_EXTENSION_POINT = "semanticProviders"; //$NON-NLS-1$ - - /** - * The view service extension point id - */ - private final static String VIEW_SERVICE_EXTENSION_POINT = "viewProviders"; //$NON-NLS-1$ - //The shared instance. private static DiagramPlugin plugin; @@ -62,7 +47,7 @@ * @return A non-empty string and is unique within the plug-in registry. */ public static String getPluginId() { - return getInstance().getBundle().getSymbolicName(); + return getInstance().getSymbolicName(); } /** @@ -75,32 +60,4 @@ public AbstractResourceManager getResourceManager() { return DiagramResourceManager.getInstance(); } - - /** - * Configures semantic providers for the presentation plug-in based on - * semantic provider extension configurations. - */ - private void configureSemanticProviders() { - SemanticService.getInstance().configureProviders( - Platform.getExtensionRegistry().getExtensionPoint(getPluginId(), - SEMANTIC_SERVICE_EXTENSION_POINT).getConfigurationElements()); - } - - /** - * Configures view providers for the presentation plug-in based on view - * provider extension configurations. - */ - private void configureViewProviders() { - ViewService.getInstance().configureProviders( - Platform.getExtensionRegistry().getExtensionPoint(getPluginId(), - VIEW_SERVICE_EXTENSION_POINT).getConfigurationElements()); - } - - /** Starts up this presentatuin plug-in. */ - protected void doStartup() { - super.doStartup(); - configureSemanticProviders(); - configureViewProviders(); - } - } \ No newline at end of file Index: src/org/eclipse/gmf/runtime/diagram/core/internal/services/semantic/SemanticService.java =================================================================== RCS file: /cvsroot/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.runtime.diagram.core/src/org/eclipse/gmf/runtime/diagram/core/internal/services/semantic/SemanticService.java,v retrieving revision 1.2 diff -u -r1.2 SemanticService.java --- src/org/eclipse/gmf/runtime/diagram/core/internal/services/semantic/SemanticService.java 12 Sep 2005 21:24:26 -0000 1.2 +++ src/org/eclipse/gmf/runtime/diagram/core/internal/services/semantic/SemanticService.java 26 Sep 2005 16:23:32 -0000 @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright (c) 2002, 2003 IBM Corporation and others. + * Copyright (c) 2002, 2005 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -14,11 +14,11 @@ import java.util.List; import org.eclipse.core.runtime.IConfigurationElement; - import org.eclipse.gmf.runtime.common.core.command.ICommand; import org.eclipse.gmf.runtime.common.core.service.ExecutionStrategy; import org.eclipse.gmf.runtime.common.core.service.IOperation; import org.eclipse.gmf.runtime.common.core.service.Service; +import org.eclipse.gmf.runtime.diagram.core.internal.DiagramPlugin; import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest; /** @@ -94,6 +94,10 @@ */ private final static SemanticService instance = new SemanticService(); + static { + instance.configureProviders(DiagramPlugin.getPluginId(), "semanticProviders"); //$NON-NLS-1$ + } + /** * Retrieves the singleton instance of the semantic service. * Index: src/org/eclipse/gmf/runtime/diagram/core/internal/services/view/ViewService.java =================================================================== RCS file: /cvsroot/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.runtime.diagram.core/src/org/eclipse/gmf/runtime/diagram/core/internal/services/view/ViewService.java,v retrieving revision 1.7 diff -u -r1.7 ViewService.java --- src/org/eclipse/gmf/runtime/diagram/core/internal/services/view/ViewService.java 23 Sep 2005 20:55:58 -0000 1.7 +++ src/org/eclipse/gmf/runtime/diagram/core/internal/services/view/ViewService.java 26 Sep 2005 16:23:32 -0000 @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright (c) 2002, 2004 IBM Corporation and others. + * Copyright (c) 2002, 2005 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -20,6 +20,7 @@ import org.eclipse.gmf.runtime.common.core.service.ExecutionStrategy; import org.eclipse.gmf.runtime.common.core.service.IOperation; import org.eclipse.gmf.runtime.common.core.service.Service; +import org.eclipse.gmf.runtime.diagram.core.internal.DiagramPlugin; import org.eclipse.gmf.runtime.diagram.core.internal.services.semantic.CreateElementRequest; import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint; import org.eclipse.gmf.runtime.diagram.core.providers.IViewProvider; @@ -119,6 +120,10 @@ */ private final static ViewService instance = new ViewService(); + static { + instance.configureProviders(DiagramPlugin.getPluginId(), "viewProviders"); //$NON-NLS-1$ + } + /** * Retrieves the singleton instance of the notation service. * @@ -213,7 +218,7 @@ } private boolean providerExistsFor(IOperation operation) { - return provides(ExecutionStrategy.FIRST, operation); + return provides(operation); } /**