author | wpaul |
Thu, 05 Aug 2010 14:19:23 -0500 | |
changeset 1773 | 8d51e542dce4 |
parent 1377 | 40401ea8b1fd |
child 1888 | fc9d5d520518 |
permissions | -rw-r--r-- |
9 | 1 |
/* |
2 |
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 |
* All rights reserved. |
|
4 |
* This component and the accompanying materials are made available |
|
5 |
* under the terms of the License "Eclipse Public License v1.0" |
|
6 |
* which accompanies this distribution, and is available |
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 |
* |
|
9 |
* Initial Contributors: |
|
10 |
* Nokia Corporation - initial contribution. |
|
11 |
* |
|
12 |
* Contributors: |
|
13 |
* |
|
14 |
* Description: |
|
15 |
* |
|
16 |
*/ |
|
2 | 17 |
package com.nokia.carbide.cpp; |
18 |
||
19 |
import org.eclipse.jface.resource.ImageDescriptor; |
|
1377
40401ea8b1fd
move p2 policy code to discovery plugin for now + add system property for disabling unsigned check
dadubrow
parents:
1373
diff
changeset
|
20 |
import org.eclipse.ui.plugin.AbstractUIPlugin; |
2 | 21 |
import org.osgi.framework.BundleContext; |
22 |
||
1773
8d51e542dce4
starting using IDE feature when product plugin loads.
wpaul
parents:
1377
diff
changeset
|
23 |
import com.nokia.carbide.cpp.internal.featureTracker.FeatureUseTrackerConsts; |
8d51e542dce4
starting using IDE feature when product plugin loads.
wpaul
parents:
1377
diff
changeset
|
24 |
import com.nokia.carbide.cpp.internal.featureTracker.FeatureUseTrackerPlugin; |
8d51e542dce4
starting using IDE feature when product plugin loads.
wpaul
parents:
1377
diff
changeset
|
25 |
|
2 | 26 |
/** |
27 |
* The main plugin class to be used in the desktop. |
|
28 |
*/ |
|
29 |
public class ProductPlugin extends AbstractUIPlugin { |
|
30 |
||
31 |
//The shared instance. |
|
32 |
private static ProductPlugin plugin; |
|
33 |
||
34 |
/** |
|
35 |
* The constructor. |
|
36 |
*/ |
|
37 |
public ProductPlugin() { |
|
38 |
plugin = this; |
|
39 |
} |
|
40 |
||
41 |
/** |
|
42 |
* This method is called upon plug-in activation |
|
43 |
*/ |
|
44 |
public void start(BundleContext context) throws Exception { |
|
45 |
super.start(context); |
|
1773
8d51e542dce4
starting using IDE feature when product plugin loads.
wpaul
parents:
1377
diff
changeset
|
46 |
|
8d51e542dce4
starting using IDE feature when product plugin loads.
wpaul
parents:
1377
diff
changeset
|
47 |
FeatureUseTrackerPlugin.getFeatureUseProxy().startUsingFeature(FeatureUseTrackerConsts.CARBIDE_IDE); |
2 | 48 |
} |
49 |
||
50 |
/** |
|
51 |
* This method is called when the plug-in is stopped |
|
52 |
*/ |
|
53 |
public void stop(BundleContext context) throws Exception { |
|
54 |
super.stop(context); |
|
55 |
plugin = null; |
|
56 |
} |
|
57 |
||
58 |
/** |
|
59 |
* Returns the shared instance. |
|
60 |
*/ |
|
61 |
public static ProductPlugin getDefault() { |
|
62 |
return plugin; |
|
63 |
} |
|
64 |
||
65 |
/** |
|
66 |
* Returns an image descriptor for the image file at the given |
|
67 |
* plug-in relative path. |
|
68 |
* |
|
69 |
* @param path the path |
|
70 |
* @return the image descriptor |
|
71 |
*/ |
|
72 |
public static ImageDescriptor getImageDescriptor(String path) { |
|
73 |
return AbstractUIPlugin.imageDescriptorFromPlugin("com.nokia.carbide.cpp", path); //$NON-NLS-1$ |
|
74 |
} |
|
75 |
} |