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 |
} |