Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 27522 Details for
Bug 110635
Delay configuration of services
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
org.eclipse.gmf.runtime.common.ui.services-patch.txt
org.eclipse.gmf.runtime.common.ui.services-patch.txt (text/plain), 14.99 KB, created by
Keith W. Campbell
on 2005-09-26 12:50:52 EDT
(
hide
)
Description:
org.eclipse.gmf.runtime.common.ui.services-patch.txt
Filename:
MIME Type:
Creator:
Keith W. Campbell
Created:
2005-09-26 12:50:52 EDT
Size:
14.99 KB
patch
obsolete
>Index: src/org/eclipse/gmf/runtime/common/ui/services/editor/EditorService.java >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.runtime.common.ui.services/src/org/eclipse/gmf/runtime/common/ui/services/editor/EditorService.java,v >retrieving revision 1.3 >diff -u -r1.3 EditorService.java >--- src/org/eclipse/gmf/runtime/common/ui/services/editor/EditorService.java 22 Sep 2005 20:06:55 -0000 1.3 >+++ src/org/eclipse/gmf/runtime/common/ui/services/editor/EditorService.java 26 Sep 2005 16:43:42 -0000 >@@ -24,6 +24,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.common.ui.services.internal.CommonUIServicesPlugin; > > /** > * A service for manipulating editors >@@ -39,6 +40,10 @@ > */ > private final static EditorService instance = new EditorService(); > >+ static { >+ instance.configureProviders(CommonUIServicesPlugin.getPluginId(), "editorProviders"); //$NON-NLS-1$ >+ } >+ > /** > * Constructs a new editor service. > */ >Index: src/org/eclipse/gmf/runtime/common/ui/services/elementselection/ElementSelectionService.java >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.runtime.common.ui.services/src/org/eclipse/gmf/runtime/common/ui/services/elementselection/ElementSelectionService.java,v >retrieving revision 1.1 >diff -u -r1.1 ElementSelectionService.java >--- src/org/eclipse/gmf/runtime/common/ui/services/elementselection/ElementSelectionService.java 23 Sep 2005 14:43:53 -0000 1.1 >+++ src/org/eclipse/gmf/runtime/common/ui/services/elementselection/ElementSelectionService.java 26 Sep 2005 16:43:42 -0000 >@@ -14,6 +14,7 @@ > > import org.eclipse.gmf.runtime.common.core.service.ExecutionStrategy; > import org.eclipse.gmf.runtime.common.core.service.Service; >+import org.eclipse.gmf.runtime.common.ui.services.internal.CommonUIServicesPlugin; > > /** > * The element selection service. >@@ -30,6 +31,10 @@ > */ > private final static ElementSelectionService instance = new ElementSelectionService(); > >+ static { >+ instance.configureProviders(CommonUIServicesPlugin.getPluginId(), "elementSelectionProviders"); //$NON-NLS-1$ >+ } >+ > /** > * Constructs a new type selection service. > */ >Index: src/org/eclipse/gmf/runtime/common/ui/services/icon/IconService.java >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.runtime.common.ui.services/src/org/eclipse/gmf/runtime/common/ui/services/icon/IconService.java,v >retrieving revision 1.2 >diff -u -r1.2 IconService.java >--- src/org/eclipse/gmf/runtime/common/ui/services/icon/IconService.java 12 Sep 2005 21:27:15 -0000 1.2 >+++ src/org/eclipse/gmf/runtime/common/ui/services/icon/IconService.java 26 Sep 2005 16:43:42 -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 >@@ -11,17 +11,14 @@ > > package org.eclipse.gmf.runtime.common.ui.services.icon; > >-import java.util.List; >- > import org.eclipse.core.runtime.IAdaptable; > import org.eclipse.core.runtime.IConfigurationElement; >-import org.eclipse.swt.graphics.Image; >- > 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.common.ui.services.internal.icon.IconOperation; >+import org.eclipse.gmf.runtime.common.ui.services.internal.CommonUIServicesPlugin; > import org.eclipse.gmf.runtime.common.ui.services.internal.icon.IconServiceProviderConfiguration; >+import org.eclipse.swt.graphics.Image; > > /** > * Service which handles icon operations. >@@ -29,11 +26,11 @@ > * @author Michael Yee > */ > public class IconService extends Service implements IIconProvider { >- >+ > /** The singleton instance of the icon service. */ > private final static IconService _instance = new IconService(); > >- /** >+ /** > * A descriptor for <code>IIconProvider</code> defined > * by a configuration element. > * >@@ -56,7 +53,6 @@ > > this.providerConfiguration = > IconServiceProviderConfiguration.parse(element); >- assert null != element : "NULL configuration element"; //$NON-NLS-1$ > } > > /** >@@ -94,7 +90,8 @@ > * The IconService constructor > */ > private IconService() { >- /* empty method body */ >+ super(); >+ configureProviders(CommonUIServicesPlugin.getPluginId(), "iconProviders"); //$NON-NLS-1$ > } > > /** >@@ -107,21 +104,10 @@ > } > > /** >- * Executes the operation using the FIRST strategy. >- * >- * @param operation the operation >- * @return Object the result >- */ >- private Object execute(IconOperation operation) { >- List results = execute(ExecutionStrategy.FIRST, operation); >- return results.isEmpty() ? null : results.get(0); >- } >- >- /** > * @see org.eclipse.gmf.runtime.common.ui.services.icon.IIconProvider#getIcon(IAdaptable, int) > */ > public Image getIcon(IAdaptable hint, int flags) { >- return (Image) execute(new GetIconOperation(hint, flags)); >+ return (Image)executeUnique(ExecutionStrategy.FIRST, new GetIconOperation(hint, flags)); > } > > /** >@@ -140,5 +126,4 @@ > protected Service.ProviderDescriptor newProviderDescriptor(IConfigurationElement element) { > return new ProviderDescriptor(element); > } >- > } >Index: src/org/eclipse/gmf/runtime/common/ui/services/internal/CommonUIServicesPlugin.java >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.runtime.common.ui.services/src/org/eclipse/gmf/runtime/common/ui/services/internal/CommonUIServicesPlugin.java,v >retrieving revision 1.3 >diff -u -r1.3 CommonUIServicesPlugin.java >--- src/org/eclipse/gmf/runtime/common/ui/services/internal/CommonUIServicesPlugin.java 23 Sep 2005 14:43:53 -0000 1.3 >+++ src/org/eclipse/gmf/runtime/common/ui/services/internal/CommonUIServicesPlugin.java 26 Sep 2005 16:43:42 -0000 >@@ -11,15 +11,8 @@ > > package org.eclipse.gmf.runtime.common.ui.services.internal; > >-import org.eclipse.core.runtime.Platform; >- > import org.eclipse.gmf.runtime.common.core.l10n.AbstractResourceManager; > import org.eclipse.gmf.runtime.common.ui.plugin.XToolsUIPlugin; >-import org.eclipse.gmf.runtime.common.ui.services.editor.EditorService; >-import org.eclipse.gmf.runtime.common.ui.services.elementselection.ElementSelectionService; >-import org.eclipse.gmf.runtime.common.ui.services.icon.IconService; >-import org.eclipse.gmf.runtime.common.ui.services.marker.MarkerNavigationService; >-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserService; > > /** > * The Common UI Services plug-in. >@@ -30,31 +23,6 @@ > extends XToolsUIPlugin { > > /** >- * Extension point name for the editor providers extension point. >- */ >- protected final static String EDITOR_PROVIDERS_EXT_P_NAME = "editorProviders"; //$NON-NLS-1$ >- >- /** >- * Extension point name for the marker navigation providers extension point. >- */ >- protected static final String MARKER_NAVIGATION_PROVIDERS_EXT_P_NAME = "markerNavigationProviders"; //$NON-NLS-1$ >- >- /** >- * Extension point name for the icon decriptor providers extension point. >- */ >- protected static final String ICON_PROVIDERS_EXT_P_NAME = "iconProviders"; //$NON-NLS-1$ >- >- /** >- * Extension point name for the parser providers extension point. >- */ >- protected static final String PARSER_PROVIDERS_EXT_P_NAME = "parserProviders"; //$NON-NLS-1$ >- >- /** >- * Extension point name for the element selection extension point. >- */ >- protected static final String ELEMENT_SELECTION_PROVIDERS_EXT_P_NAME = "elementSelectionProviders"; //$NON-NLS-1$ >- >- /** > * This plug-in's shared instance. > */ > private static CommonUIServicesPlugin plugin; >@@ -83,7 +51,7 @@ > * @return A non-empty string which is unique within the plug-in registry. > */ > public static String getPluginId() { >- return getDefault().getBundle().getSymbolicName(); >+ return getDefault().getSymbolicName(); > } > > /** >@@ -94,74 +62,7 @@ > * @see org.eclipse.gmf.runtime.common.ui.plugin.XToolsUIPlugin#getResourceManager() > */ > public AbstractResourceManager getResourceManager() { >- // TODO ResourceManager.getInstance(); >+ //TODO ResourceManager.getInstance(); > return null; > } >- >- /** >- * Starts up this plug-in. >- */ >- protected void doStartup() { >- configureEditorProviders(); >- configureMarkerNavigationProviders(); >- configureIconProviders(); >- configureParserProviders(); >- configureElementSelectionProviders(); >- } >- >- /** >- * Configures editor providers based on editor provider extension >- * configurations. >- * >- */ >- private void configureEditorProviders() { >- EditorService.getInstance().configureProviders( >- Platform.getExtensionRegistry().getExtensionPoint(getPluginId(), >- EDITOR_PROVIDERS_EXT_P_NAME).getConfigurationElements()); >- >- } >- >- /** >- * Configures marker navigation providers based on marker navigation >- * provider extension configurations. >- * >- */ >- private void configureMarkerNavigationProviders() { >- MarkerNavigationService.getInstance().configureProviders( >- Platform.getExtensionRegistry().getExtensionPoint(getPluginId(), >- MARKER_NAVIGATION_PROVIDERS_EXT_P_NAME) >- .getConfigurationElements()); >- } >- >- /** >- * Configures icon providers based on icon provider extension >- */ >- private void configureIconProviders() { >- IconService.getInstance().configureProviders( >- Platform.getExtensionRegistry().getExtensionPoint(getPluginId(), >- ICON_PROVIDERS_EXT_P_NAME).getConfigurationElements()); >- } >- >- /** >- * Configures parser providers based on parser provider extension >- * configurations. >- * >- */ >- private void configureParserProviders() { >- ParserService.getInstance().configureProviders( >- Platform.getExtensionRegistry().getExtensionPoint(getPluginId(), >- PARSER_PROVIDERS_EXT_P_NAME).getConfigurationElements()); >- } >- >- /** >- * Configures element selection providers based on element selection >- * provider extension configurations. >- * >- */ >- private void configureElementSelectionProviders() { >- ElementSelectionService.getInstance().configureProviders( >- Platform.getExtensionRegistry().getExtensionPoint(getPluginId(), >- ELEMENT_SELECTION_PROVIDERS_EXT_P_NAME) >- .getConfigurationElements()); >- } > } >\ No newline at end of file >Index: src/org/eclipse/gmf/runtime/common/ui/services/marker/MarkerNavigationService.java >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.runtime.common.ui.services/src/org/eclipse/gmf/runtime/common/ui/services/marker/MarkerNavigationService.java,v >retrieving revision 1.2 >diff -u -r1.2 MarkerNavigationService.java >--- src/org/eclipse/gmf/runtime/common/ui/services/marker/MarkerNavigationService.java 12 Sep 2005 21:27:15 -0000 1.2 >+++ src/org/eclipse/gmf/runtime/common/ui/services/marker/MarkerNavigationService.java 26 Sep 2005 16:43:42 -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 >@@ -15,9 +15,6 @@ > > import org.eclipse.core.resources.IMarker; > import org.eclipse.core.runtime.IConfigurationElement; >-import org.eclipse.swt.widgets.Display; >-import org.eclipse.ui.IEditorPart; >- > 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; >@@ -27,6 +24,8 @@ > import org.eclipse.gmf.runtime.common.ui.services.internal.CommonUIServicesPlugin; > import org.eclipse.gmf.runtime.common.ui.services.internal.CommonUIServicesStatusCodes; > import org.eclipse.gmf.runtime.common.ui.services.internal.marker.IMarkerNavigationProvider; >+import org.eclipse.swt.widgets.Display; >+import org.eclipse.ui.IEditorPart; > > /** > * This service is the distribution point for "gotoMarker" requests made by >@@ -44,6 +43,10 @@ > > /** Remember the single instance of this service. */ > private final static MarkerNavigationService instance = new MarkerNavigationService(); >+ >+ static { >+ instance.configureProviders(CommonUIServicesPlugin.getPluginId(), "markerNavigationProviders"); //$NON-NLS-1$ >+ } > > /** > * Marker Navigation Provider Descriptor. >Index: src/org/eclipse/gmf/runtime/common/ui/services/parser/ParserService.java >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.runtime.common.ui.services/src/org/eclipse/gmf/runtime/common/ui/services/parser/ParserService.java,v >retrieving revision 1.2 >diff -u -r1.2 ParserService.java >--- src/org/eclipse/gmf/runtime/common/ui/services/parser/ParserService.java 12 Sep 2005 21:27:15 -0000 1.2 >+++ src/org/eclipse/gmf/runtime/common/ui/services/parser/ParserService.java 26 Sep 2005 16:43:42 -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 >@@ -12,10 +12,10 @@ > package org.eclipse.gmf.runtime.common.ui.services.parser; > > import org.eclipse.core.runtime.IAdaptable; >- > import org.eclipse.gmf.runtime.common.core.service.ExecutionStrategy; > import org.eclipse.gmf.runtime.common.core.service.Service; > import org.eclipse.gmf.runtime.common.core.util.StringStatics; >+import org.eclipse.gmf.runtime.common.ui.services.internal.CommonUIServicesPlugin; > > /** > * The parser service which returns a parser for an IAdaptable. >@@ -31,6 +31,10 @@ > */ > private final static ParserService service = new ParserService(); > >+ static { >+ service.configureProviders(CommonUIServicesPlugin.getPluginId(), "parserProviders"); //$NON-NLS-1$ >+ } >+ > /** > * Retrieves the singleton instance of the parser service. > *
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 110635
: 27522 |
27523
|
27524
|
27525
|
27526
|
27527
|
27528
|
27529
|
28681
|
28682