]> git.uio.no Git - ifi-stolz-refaktor.git/blob - case-study/jdt-after/ui/org/eclipse/jdt/internal/ui/workingsets/ConfigureWorkingSetAction.java
Case Study: adding data and statistics
[ifi-stolz-refaktor.git] / case-study / jdt-after / ui / org / eclipse / jdt / internal / ui / workingsets / ConfigureWorkingSetAction.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.workingsets;
12
13 import org.eclipse.jface.action.Action;
14 import org.eclipse.jface.action.IMenuManager;
15
16 import org.eclipse.ui.IWorkbenchPartSite;
17 import org.eclipse.ui.PlatformUI;
18
19 import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
20 import org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart;
21
22
23 public class ConfigureWorkingSetAction extends Action {
24
25         final IWorkbenchPartSite fSite;
26         WorkingSetModel fWorkingSetModel;
27
28         public ConfigureWorkingSetAction(IWorkbenchPartSite site) {
29                 super(WorkingSetMessages.ConfigureWorkingSetAction_label);
30                 fSite= site;
31                 PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJavaHelpContextIds.CONFIGURE_WORKING_SETS_ACTION);
32         }
33
34         public void setWorkingSetModel(WorkingSetModel model) {
35                 fWorkingSetModel= model;
36         }
37
38         /**
39          * {@inheritDoc}
40          */
41         @Override
42         public void run() {
43                 fWorkingSetModel.generated_2943605995411120557(this);
44         }
45
46         public void generated_4842104281134880937(PackageExplorerPart packageexplorerpart) {
47                 setWorkingSetModel(packageexplorerpart.fWorkingSetModel);
48                 run();
49         }
50
51         public void generated_3054241903483832007(WorkingSetShowActionGroup workingsetshowactiongroup, IMenuManager menuManager) {
52                 if (workingsetshowactiongroup.fWorkingSetModel != null)
53                         setWorkingSetModel(workingsetshowactiongroup.fWorkingSetModel);
54                 workingsetshowactiongroup.addAction(menuManager, this);
55         }
56 }