blob: 997092b8c7f1dc1e0e18f1f84ea4081599453e13 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
/**
* Copyright (c) 2014, 2015 Christian W. Damus and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Christian W. Damus - Initial API and implementation
*/
package org.eclipse.papyrus.uml.profile.assistants.generator.ui.internal;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.papyrus.infra.core.log.LogHelper;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
/**
* This is the central singleton for the UML Profile Modeling Assistants ElementTypesGenerator UI plugin.
*/
public final class Activator extends AbstractUIPlugin {
public static final String PLUGIN_ID = "org.eclipse.papyrus.uml.profile.assistants.generator.ui"; //$NON-NLS-1$
/**
* Keep track of the singleton.
*/
private static Activator INSTANCE;
/** Logging helper */
public static LogHelper log = new LogHelper();
public Activator() {
super();
}
public static Activator getInstance() {
return INSTANCE;
}
@Override
public void start(BundleContext context) throws Exception {
INSTANCE = this;
log.setPlugin(this);
super.start(context);
}
public ImageDescriptor getIcon(String path) {
if (!path.startsWith("/")) {
path = "$nl$/icons/full/" + path; //$NON-NLS-1$
}
return imageDescriptorFromPlugin(PLUGIN_ID, path);
}
}
|