~ubuntu-branches/ubuntu/utopic/eclipse-linuxtools/utopic

« back to all changes in this revision

Viewing changes to lttng/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/Activator.java

  • Committer: Package Import Robot
  • Author(s): Jakub Adam
  • Date: 2014-05-12 18:11:40 UTC
  • mfrom: (3.1.2 sid)
  • Revision ID: package-import@ubuntu.com-20140512181140-w237r3vsah1tmybz
Tags: 2.2.1-1
* New upstream release.
* Refreshed d/patches.
* Removed eclipse-cdt-valgrind-remote package, all its functionality
  is now provided by eclipse-cdt-profiling-framework-remote.
* Added remove-license-feature.patch.
* Bump Standards-Version to 3.9.5.
* Enable eclipse-changelog package.
* Enable eclipse-rpm-editor package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*******************************************************************************
2
 
 * Copyright (c) 2012 Ericsson
3
 
 * 
 
2
 * Copyright (c) 2012, 2013 Ericsson
 
3
 *
4
4
 * All rights reserved. This program and the accompanying materials are
5
5
 * made available under the terms of the Eclipse Public License v1.0 which
6
6
 * accompanies this distribution, and is available at
7
7
 * http://www.eclipse.org/legal/epl-v10.html
8
 
 * 
 
8
 *
9
9
 * Contributors:
10
10
 *   Francois Chouinard - Initial API and implementation
11
11
 *******************************************************************************/
69
69
    // AbstractUIPlugin
70
70
    // ------------------------------------------------------------------------
71
71
 
72
 
    /* (non-Javadoc)
73
 
     * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
74
 
     */
75
72
    @Override
76
73
    public void start(BundleContext context) throws Exception {
77
74
        super.start(context);
79
76
        ControlPreferences.getInstance().init(getPreferenceStore());
80
77
    }
81
78
 
82
 
    /* (non-Javadoc)
83
 
     * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
84
 
     */
85
79
    @Override
86
80
    public void stop(BundleContext context) throws Exception {
87
81
        ControlPreferences.getInstance().dispose();
89
83
        super.stop(context);
90
84
    }
91
85
 
92
 
    /* (non-Javadoc)
93
 
     * @see org.eclipse.ui.plugin.AbstractUIPlugin#initializeImageRegistry(org.eclipse.jface.resource.ImageRegistry)
94
 
     */
95
86
    @Override
96
87
    protected void initializeImageRegistry(ImageRegistry reg) {
97
88
    }
102
93
 
103
94
    /**
104
95
     * Gets an image object using given path within plug-in.
105
 
     *  
 
96
     *
106
97
     * @param path path to image file
107
 
     * 
 
98
     *
108
99
     * @return image object
109
100
     */
110
101
    public Image getImageFromPath(String path) {
113
104
 
114
105
    /**
115
106
     * Gets an image descriptor using given path within plug-in.
116
 
     *  
117
 
     * @param path path to image file 
118
 
     * 
 
107
     *
 
108
     * @param path path to image file
 
109
     *
119
110
     * @return image descriptor object
120
111
     */
121
112
    public ImageDescriptor getImageDescripterFromPath(String path) {
124
115
 
125
116
    /**
126
117
     * Gets a image object from the image registry based on the given path.
127
 
     * If the image is not in the registry it will be registered.  
128
 
     *  
129
 
     * @param path to the image file 
 
118
     * If the image is not in the registry it will be registered.
 
119
     *
 
120
     * @param path to the image file
130
121
     * @return image object
131
122
     */
132
123
    public Image getImageFromImageRegistry(String path) {
137
128
        }
138
129
        return icon;
139
130
    }
140
 
    
 
131
 
141
132
    /**
142
133
     * Loads the image in the plug-ins image registry (if necessary) and returns the image
143
134
     * @param url - URL relative to the Bundle
154
145
        }
155
146
        return icon;
156
147
    }
157
 
    
 
148
 
158
149
    /**
159
150
     * Logs a message with severity INFO in the runtime log of the plug-in.
160
 
     * 
 
151
     *
161
152
     * @param message A message to log
162
153
     */
163
154
    public void logInfo(String message) {
164
155
        getLog().log(new Status(IStatus.INFO, PLUGIN_ID, message));
165
156
    }
166
 
    
 
157
 
167
158
    /**
168
159
     * Logs a message and exception with severity INFO in the runtime log of the plug-in.
169
 
     * 
 
160
     *
170
161
     * @param message A message to log
171
162
     * @param exception A exception to log
172
163
     */
176
167
 
177
168
    /**
178
169
     * Logs a message and exception with severity WARNING in the runtime log of the plug-in.
179
 
     * 
 
170
     *
180
171
     * @param message A message to log
181
172
     */
182
173
    public void logWarning(String message) {
183
174
        getLog().log(new Status(IStatus.WARNING, PLUGIN_ID, message));
184
175
    }
185
 
    
 
176
 
186
177
    /**
187
178
     * Logs a message and exception with severity WARNING in the runtime log of the plug-in.
188
 
     * 
 
179
     *
189
180
     * @param message A message to log
190
181
     * @param exception A exception to log
191
182
     */
195
186
 
196
187
    /**
197
188
     * Logs a message and exception with severity ERROR in the runtime log of the plug-in.
198
 
     * 
 
189
     *
199
190
     * @param message A message to log
200
191
     */
201
192
    public void logError(String message) {
202
193
        getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message));
203
194
    }
204
 
    
 
195
 
205
196
    /**
206
197
     * Logs a message and exception with severity ERROR in the runtime log of the plug-in.
207
 
     * 
 
198
     *
208
199
     * @param message A message to log
209
200
     * @param exception A exception to log
210
201
     */