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.internal.provisional.views.markers;
11:
12: import org.eclipse.core.commands.AbstractHandler;
13: import org.eclipse.core.commands.ExecutionEvent;
14: import org.eclipse.ui.IWorkbenchPart;
15: import org.eclipse.ui.handlers.HandlerUtil;
16:
17: /**
18: * MarkerViewHandler is the abstract class of the handlers for the
19: * {@link ExtendedMarkersView}
20: * @since 3.4
21: *
22: */
23: abstract class MarkerViewHandler extends AbstractHandler {
24:
25: /**
26: * Get the view this event occurred on.
27: * @param arg0
28: * @return ExtendedMarkersView or <code>null</code>
29: */
30: protected ExtendedMarkersView getView(ExecutionEvent arg0) {
31: IWorkbenchPart part = HandlerUtil.getActivePart(arg0);
32: if (part == null)
33: return null;
34: return (ExtendedMarkersView) part;
35: }
36:
37: }
|