]> git.uio.no Git - ifi-stolz-refaktor.git/blob - case-study/jdt-after/ui/org/eclipse/jdt/internal/ui/callhierarchy/ShowSearchInDialogAction.java
Case Study: adding data and statistics
[ifi-stolz-refaktor.git] / case-study / jdt-after / ui / org / eclipse / jdt / internal / ui / callhierarchy / ShowSearchInDialogAction.java
1 /*******************************************************************************
2  * Copyright (c) 2010, 2011 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 package org.eclipse.jdt.internal.ui.callhierarchy;
12
13 import org.eclipse.jface.action.Action;
14 import org.eclipse.jface.window.Window;
15
16 /**
17  * Action class to create and open the search in dialog.
18  * 
19  * @since 3.7
20  */
21 public class ShowSearchInDialogAction extends Action {
22         CallHierarchyViewPart fPart;
23
24         SearchInDialog fSearchInDialog;
25
26         /**
27          * Action to show the <code>SearchInDialog</code>.
28          * 
29          * @param part the call hierarchy view part
30          * @param viewer the call hierarchy viewer      
31          */
32         public ShowSearchInDialogAction(CallHierarchyViewPart part, CallHierarchyViewer viewer) {
33                 part.generated_3711762748227656486(this, viewer);
34         }
35
36         /**
37          * Returns the <code>SearchInDialog</code>.
38          * 
39          * @return the <code>searchInDialog</code>
40          */
41         public SearchInDialog getSearchInDialog() {
42                 return fSearchInDialog;
43         }
44
45         /* (non-Javadoc)
46          * @see org.eclipse.jface.action.Action#run()
47          */
48         @Override
49         public void run() {
50                 SearchInDialog dialog= getSearchInDialog();
51                 if (dialog.open() == Window.OK && dialog.isIncludeMaskChanged()) {
52                         fPart.generated_3401218808881467210();
53                 }
54         }
55 }