01: /*******************************************************************************
02: * Copyright (c) 2000, 2005 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.pde.internal.ui.tests.macro;
11:
12: import org.eclipse.jface.window.Window;
13: import org.eclipse.swt.widgets.Widget;
14:
15: public class WindowCommandTarget extends CommandTarget {
16: /**
17: * @param widget
18: * @param context
19: */
20: public WindowCommandTarget(Widget widget, Window window) {
21: super (widget, window);
22: }
23:
24: Window getWindow() {
25: return (Window) getContext();
26: }
27:
28: /* (non-Javadoc)
29: * @see org.eclipse.ui.macro.CommandTarget#ensureVisible()
30: */
31: public void ensureVisible() {
32: Window window = getWindow();
33: window.getShell().setActive();
34: }
35: }
|