01: /*****************************************************************************************
02: * Copyright (c) 2004 Andrei Loskutov. All rights reserved. This program and the
03: * accompanying materials are made available under the terms of the BSD License which
04: * accompanies this distribution, and is available at
05: * http://www.opensource.org/licenses/bsd-license.php Contributor: Andrei Loskutov -
06: * initial API and implementation
07: ****************************************************************************************/package de.loskutov.bco.ui.actions;
08:
09: import org.eclipse.jdt.core.IJavaElement;
10: import org.eclipse.jface.action.IAction;
11: import org.eclipse.ui.IObjectActionDelegate;
12:
13: import de.loskutov.bco.BytecodeOutlinePlugin;
14:
15: /**
16: * @author Andrei
17: */
18: public class CompareBytecodeAction extends BytecodeAction implements
19: 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 e) {
30: BytecodeOutlinePlugin.error("Failed to run Compare: "
31: + e.getMessage(), e);
32: }
33: }
34:
35: }
|