]> git.uio.no Git - ifi-stolz-refaktor.git/blob - case-study/jdt-after/ui/org/eclipse/jdt/internal/ui/javaeditor/selectionactions/StructureSelectHistoryAction.java
Case Study: adding data and statistics
[ifi-stolz-refaktor.git] / case-study / jdt-after / ui / org / eclipse / jdt / internal / ui / javaeditor / selectionactions / StructureSelectHistoryAction.java
1 /*******************************************************************************
2  * Copyright (c) 2000, 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.javaeditor.selectionactions;
12
13 import org.eclipse.core.runtime.Assert;
14
15 import org.eclipse.jface.action.Action;
16
17 import org.eclipse.ui.texteditor.IUpdate;
18
19 import org.eclipse.jdt.internal.ui.javaeditor.JavaEditor;
20
21 public class StructureSelectHistoryAction extends Action implements IUpdate {
22         public JavaEditor fEditor;
23         public SelectionHistory fHistory;
24
25         public StructureSelectHistoryAction(JavaEditor editor, SelectionHistory history) {
26                 super(SelectionActionMessages.StructureSelectHistory_label);
27                 setToolTipText(SelectionActionMessages.StructureSelectHistory_tooltip);
28                 setDescription(SelectionActionMessages.StructureSelectHistory_description);
29                 Assert.isNotNull(history);
30                 editor.generated_4167654306010166538(this, history);
31         }
32
33         public void update() {
34                 setEnabled(!fHistory.isEmpty());
35         }
36
37         @Override
38         public void run() {
39                 fHistory.generated_6937700129590923868(this);
40         }
41
42         public void generated_8244435553183390360(SelectionHistory selectionhistory) {
43                 Assert.isNotNull(this);
44                 selectionhistory.fHistoryAction= this;
45         }
46 }