View | Details | Raw Unified | Return to bug 110635 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/gmf/runtime/emf/ui/internal/MslUIPlugin.java (-31 / +5 lines)
Lines 1-5 Link Here
1
/******************************************************************************
1
/******************************************************************************
2
 * Copyright (c) 2002, 2004 IBM Corporation and others.
2
 * Copyright (c) 2002, 2005 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 11-25 Link Here
11
11
12
package org.eclipse.gmf.runtime.emf.ui.internal;
12
package org.eclipse.gmf.runtime.emf.ui.internal;
13
13
14
import org.eclipse.core.runtime.Platform;
15
import org.eclipse.ui.IWorkbenchPage;
16
import org.eclipse.ui.IWorkbenchWindow;
17
import org.eclipse.ui.PlatformUI;
18
19
import org.eclipse.gmf.runtime.common.core.l10n.AbstractResourceManager;
14
import org.eclipse.gmf.runtime.common.core.l10n.AbstractResourceManager;
20
import org.eclipse.gmf.runtime.common.ui.plugin.XToolsUIPlugin;
15
import org.eclipse.gmf.runtime.common.ui.plugin.XToolsUIPlugin;
21
import org.eclipse.gmf.runtime.emf.ui.internal.l10n.ResourceManager;
16
import org.eclipse.gmf.runtime.emf.ui.internal.l10n.ResourceManager;
22
import org.eclipse.gmf.runtime.emf.ui.services.modelingassistant.ModelingAssistantService;
17
import org.eclipse.ui.IWorkbenchPage;
18
import org.eclipse.ui.IWorkbenchWindow;
19
import org.eclipse.ui.PlatformUI;
23
20
24
/**
21
/**
25
 * The MSL UI plug-in.
22
 * The MSL UI plug-in.
Lines 36-46 Link Here
36
	private static MslUIPlugin plugin;
33
	private static MslUIPlugin plugin;
37
34
38
	/**
35
	/**
39
	 * The modeling assistant service extension point id
40
	 */
41
	private final static String MODELING_ASSISTANT_SERVICE_EXTENSION_POINT = "modelingAssistantProviders"; //$NON-NLS-1$ 
42
43
	/**
44
	 * Creates a new plug-in runtime object.
36
	 * Creates a new plug-in runtime object.
45
	 */
37
	 */
46
	public MslUIPlugin() {
38
	public MslUIPlugin() {
Lines 64-70 Link Here
64
	 * @return A non-empty string which is unique within the plug-in registry.
56
	 * @return A non-empty string which is unique within the plug-in registry.
65
	 */
57
	 */
66
	public static String getPluginId() {
58
	public static String getPluginId() {
67
		return getDefault().getBundle().getSymbolicName();
59
		return getDefault().getSymbolicName();
68
	}
60
	}
69
61
70
	/**
62
	/**
Lines 100-121 Link Here
100
		}
92
		}
101
		return window.getActivePage();
93
		return window.getActivePage();
102
	}
94
	}
103
104
	/**
105
	 * Starts up this plug-in.
106
	 */
107
	protected void doStartup() {
108
		configureModelingAssistantProviders();
109
	}
110
111
	/**
112
	 * Configures modeling assistant providers based on modeling assistant
113
	 * provider extension configurations.
114
	 */
115
	private void configureModelingAssistantProviders() {
116
		ModelingAssistantService.getInstance().configureProviders(
117
			Platform.getExtensionRegistry().getExtensionPoint(getPluginId(),
118
				MODELING_ASSISTANT_SERVICE_EXTENSION_POINT)
119
				.getConfigurationElements());
120
	}
121
}
95
}
(-)src/org/eclipse/gmf/runtime/emf/ui/services/modelingassistant/ModelingAssistantService.java (+6 lines)
Lines 23-28 Link Here
23
import org.eclipse.gmf.runtime.common.core.service.Service;
23
import org.eclipse.gmf.runtime.common.core.service.Service;
24
import org.eclipse.gmf.runtime.common.ui.services.util.ActivityFilterProviderDescriptor;
24
import org.eclipse.gmf.runtime.common.ui.services.util.ActivityFilterProviderDescriptor;
25
import org.eclipse.gmf.runtime.emf.type.core.IElementType;
25
import org.eclipse.gmf.runtime.emf.type.core.IElementType;
26
import org.eclipse.gmf.runtime.emf.ui.internal.MslUIPlugin;
26
27
27
/**
28
/**
28
 * This service is used to assist the user with modeling gestures.
29
 * This service is used to assist the user with modeling gestures.
Lines 66-71 Link Here
66
			}
67
			}
67
			if (getPolicy() != null)
68
			if (getPolicy() != null)
68
				return getPolicy().provides(operation);
69
				return getPolicy().provides(operation);
70
69
			return isSupportedInExtension(operation) ? getProvider().provides(
71
			return isSupportedInExtension(operation) ? getProvider().provides(
70
				operation) : false;
72
				operation) : false;
71
		}
73
		}
Lines 92-97 Link Here
92
	/** The singleton instance of the modeling assistant service. */
94
	/** The singleton instance of the modeling assistant service. */
93
	private final static ModelingAssistantService service = new ModelingAssistantService();
95
	private final static ModelingAssistantService service = new ModelingAssistantService();
94
96
97
	static {
98
		service.configureProviders(MslUIPlugin.getPluginId(), "modelingAssistantProviders"); //$NON-NLS-1$
99
	}
100
95
	/**
101
	/**
96
	 * @see org.eclipse.gmf.runtime.common.core.service.Service#newProviderDescriptor(org.eclipse.core.runtime.IConfigurationElement)
102
	 * @see org.eclipse.gmf.runtime.common.core.service.Service#newProviderDescriptor(org.eclipse.core.runtime.IConfigurationElement)
97
	 */
103
	 */

Return to bug 110635