csalter | 47f8bd8 | 2006-01-23 05:53:23 +0000 | [diff] [blame] | 1 | /******************************************************************************* |
| 2 | * Copyright (c) 2005, 2006 IBM Corporation and others. |
| 3 | * All rights reserved. This program and the accompanying materials |
| 4 | * are made available under the terms of the Eclipse Public License v1.0 |
| 5 | * which accompanies this distribution, and is available at |
| 6 | * http://www.eclipse.org/legal/epl-v10.html |
| 7 | * |
| 8 | * Contributors: |
| 9 | * IBM Corporation - initial API and implementation |
| 10 | * |
| 11 | *******************************************************************************/ |
csalter | 7864d3c | 2006-01-23 04:54:10 +0000 | [diff] [blame] | 12 | package org.eclipse.wst.xsd.ui.internal.search.actions; |
| 13 | |
| 14 | import org.eclipse.swt.widgets.Menu; |
| 15 | import org.eclipse.ui.IEditorPart; |
| 16 | |
| 17 | //org.eclipse.wst.xsd.ui.internal.search.actions.XSDSearchGroupActionDelegate |
| 18 | public class XSDSearchReferencesGroupActionDelegate extends BaseGroupActionDelegate |
| 19 | { |
| 20 | protected void fillMenu(Menu menu) { |
| 21 | try |
| 22 | { |
| 23 | if (fSelection == null) { |
| 24 | return; |
| 25 | } |
| 26 | if (workbenchPart instanceof IEditorPart) |
| 27 | { |
| 28 | ReferencesSearchGroup referencesGroup = new ReferencesSearchGroup((IEditorPart)workbenchPart); |
| 29 | XSDSearchGroupSubMenu subMenu = new XSDSearchGroupSubMenu(referencesGroup); |
| 30 | subMenu.fill(menu, -1); |
| 31 | } |
| 32 | } |
| 33 | catch (Exception e) |
| 34 | { |
| 35 | e.printStackTrace(); |
| 36 | } |
| 37 | } |
| 38 | } |