~ubuntu-branches/ubuntu/utopic/eclipse-eclox/utopic

« back to all changes in this revision

Viewing changes to eclox.ui/src/eclox/ui/JobMonitor.java

  • Committer: Package Import Robot
  • Author(s): Graham Inggs
  • Date: 2013-07-07 20:33:10 UTC
  • Revision ID: package-import@ubuntu.com-20130707203310-a44yw80gqtc2s9ob
Tags: upstream-0.10.0
ImportĀ upstreamĀ versionĀ 0.10.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*******************************************************************************
 
2
 * Copyright (C) 2008, 2013, Guillaume Brocker
 
3
 * 
 
4
 * All rights reserved. This program and the accompanying materials
 
5
 * are made available under the terms of the Eclipse Public License v1.0
 
6
 * which accompanies this distribution, and is available at
 
7
 * http://www.eclipse.org/legal/epl-v10.html
 
8
 *
 
9
 * Contributors:
 
10
 *     Guillaume Brocker - Initial API and implementation
 
11
 *
 
12
 ******************************************************************************/ 
 
13
 
 
14
package eclox.ui;
 
15
 
 
16
import org.eclipse.core.runtime.jobs.IJobChangeEvent;
 
17
import org.eclipse.core.runtime.jobs.JobChangeAdapter;
 
18
import org.eclipse.swt.widgets.Display;
 
19
 
 
20
import eclox.core.doxygen.BuildJob;
 
21
 
 
22
/**
 
23
 * @brief       Monitors all doxygen build jobs and report errors
 
24
 *                      concerning doxygen invokation failures.
 
25
 * 
 
26
 * @author gbrocker
 
27
 */
 
28
public class JobMonitor extends JobChangeAdapter {
 
29
 
 
30
        /**
 
31
         * @see org.eclipse.core.runtime.jobs.JobChangeAdapter#done(org.eclipse.core.runtime.jobs.IJobChangeEvent)
 
32
         */
 
33
        public void done(IJobChangeEvent event) {
 
34
                
 
35
                if( event.getJob().belongsTo(BuildJob.FAMILY) && event.getResult().getCode() == BuildJob.ERROR_DOXYGEN_NOT_FOUND ) {
 
36
                                Display display = Plugin.getDefault().getWorkbench().getDisplay();
 
37
                                
 
38
                                display.asyncExec(
 
39
                                                new Runnable()
 
40
                                                {
 
41
                                                        public void run()
 
42
                                                        {
 
43
                                                                Plugin.editPreferencesAfterDoxygenInvocationFailed();           
 
44
                                                        }
 
45
                                                }
 
46
                                        );
 
47
                }
 
48
        }
 
49
 
 
50
}