01: /*******************************************************************************
02: * Copyright (c) 2007 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.ui.examples.contributions.view;
11:
12: import org.eclipse.core.commands.AbstractHandler;
13: import org.eclipse.core.commands.ExecutionEvent;
14: import org.eclipse.core.commands.ExecutionException;
15: import org.eclipse.ui.handlers.HandlerUtil;
16:
17: /**
18: * Request the view refresh from the model.
19: *
20: * @since 3.3
21: */
22: public class RefreshInfoHandler extends AbstractHandler {
23:
24: /*
25: * (non-Javadoc)
26: *
27: * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
28: */
29: public Object execute(ExecutionEvent event)
30: throws ExecutionException {
31: InfoView view = (InfoView) HandlerUtil
32: .getActivePartChecked(event);
33: view.refresh();
34: return null;
35: }
36:
37: }
|