KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > de > loskutov > bco > ui > actions > CompareBytecodeAction


1 /*****************************************************************************************
2  * Copyright (c) 2004 Andrei Loskutov. All rights reserved. This program and the
3  * accompanying materials are made available under the terms of the BSD License which
4  * accompanies this distribution, and is available at
5  * http://www.opensource.org/licenses/bsd-license.php Contributor: Andrei Loskutov -
6  * initial API and implementation
7  ****************************************************************************************/

8 package de.loskutov.bco.ui.actions;
9
10 import org.eclipse.jdt.core.IJavaElement;
11 import org.eclipse.jface.action.IAction;
12 import org.eclipse.ui.IObjectActionDelegate;
13
14 import de.loskutov.bco.BytecodeOutlinePlugin;
15
16 /**
17  * @author Andrei
18  */

19 public class CompareBytecodeAction extends BytecodeAction implements IObjectActionDelegate {
20
21     /**
22      * (non-Javadoc)
23      * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
24      */

25     public void run(IAction action) {
26         IJavaElement[] resources = getSelectedResources();
27         try {
28             exec(resources[0], resources[1]);
29         } catch (Exception JavaDoc e) {
30             BytecodeOutlinePlugin.error("Failed to run Compare: "
31                 + e.getMessage(), e);
32         }
33     }
34
35 }
Popular Tags