KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > ca > mcgill > sable > soot > ui > SootConfigManagerDialog


1 /* Soot - a J*va Optimization Framework
2  * Copyright (C) 2003 Jennifer Lhotak
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17  * Boston, MA 02111-1307, USA.
18  */

19
20 package ca.mcgill.sable.soot.ui;
21
22 import java.util.*;
23
24 import org.eclipse.jface.dialogs.IDialogSettings;
25 import org.eclipse.jface.dialogs.InputDialog;
26 import org.eclipse.jface.dialogs.TitleAreaDialog;
27 import org.eclipse.jface.viewers.ISelectionChangedListener;
28 import org.eclipse.jface.viewers.IStructuredSelection;
29 import org.eclipse.jface.viewers.SelectionChangedEvent;
30 import org.eclipse.jface.viewers.TreeViewer;
31 import org.eclipse.swt.custom.SashForm;
32 import org.eclipse.swt.events.KeyAdapter;
33 import org.eclipse.swt.events.KeyEvent;
34 import org.eclipse.swt.events.SelectionAdapter;
35 import org.eclipse.swt.events.SelectionEvent;
36 import org.eclipse.swt.layout.GridData;
37 import org.eclipse.swt.layout.GridLayout;
38 import org.eclipse.swt.widgets.Button;
39 import org.eclipse.swt.widgets.Composite;
40 import org.eclipse.swt.widgets.Control;
41 import org.eclipse.jface.dialogs.*;
42 import org.eclipse.swt.widgets.Label;
43 import org.eclipse.swt.widgets.Shell;
44 import org.eclipse.swt.*;
45
46 import ca.mcgill.sable.soot.SootPlugin;
47 import ca.mcgill.sable.soot.launching.*;
48 import ca.mcgill.sable.soot.ui.PhaseOptionsDialog;
49
50 public class SootConfigManagerDialog extends TitleAreaDialog implements ISelectionChangedListener {
51
52     private SashForm sashForm;
53     private Composite selectionArea;
54     private TreeViewer treeViewer;
55     private String JavaDoc selected;
56     private Composite buttonPanel;
57     private SootConfiguration treeRoot;
58     private HashMap editDefs;
59     private SootLauncher launcher;
60     
61     private void addEclipseDefsToDialog(PhaseOptionsDialog dialog) {
62         if (getEclipseDefList() == null) return;
63         Iterator it = getEclipseDefList().keySet().iterator();
64         while (it.hasNext()) {
65             String JavaDoc key = (String JavaDoc)it.next();
66             dialog.addToEclipseDefList(key, getEclipseDefList().get(key));
67         }
68     }
69     
70     private void setMainClassInDialog(PhaseOptionsDialog dialog, String JavaDoc mainClass){
71         dialog.addToEclipseDefList("sootMainClass", mainClass);
72     }
73     
74     private HashMap eclipseDefList;
75
76     /**
77      * Returns the eclipseDefList.
78      * @return HashMap
79      */

80     public HashMap getEclipseDefList() {
81         return eclipseDefList;
82     }
83
84     /**
85      * Sets the eclipseDefList.
86      * @param eclipseDefList The eclipseDefList to set
87      */

88     public void setEclipseDefList(HashMap eclipseDefList) {
89         this.eclipseDefList = eclipseDefList;
90     }
91     
92     public SootConfigManagerDialog(Shell parentShell) {
93         super(parentShell);
94         this.setShellStyle(SWT.RESIZE);
95     }
96     
97     protected void configureShell(Shell shell){
98         super.configureShell(shell);
99         shell.setText(Messages.getString("SootConfigManagerDialog.Manage_Configurations")); //$NON-NLS-1$
100
}
101     /**
102      * creates a sash form - one side for a selection tree
103      * and the other for the options
104      */

105     protected Control createDialogArea(Composite parent) {
106         GridData gd;
107         
108         Composite dialogComp = (Composite)super.createDialogArea(parent);
109         Composite topComp = new Composite(dialogComp, SWT.NONE);
110         
111         gd = new GridData(GridData.FILL_BOTH);
112         topComp.setLayoutData(gd);
113         GridLayout topLayout = new GridLayout();
114         topLayout.numColumns = 2;
115
116         topComp.setLayout(topLayout);
117         
118         // Set the things that TitleAreaDialog takes care of
119

120         setTitle(Messages.getString("SootConfigManagerDialog.Soot_Configurations_Manager")); //$NON-NLS-1$
121
setMessage(""); //$NON-NLS-1$
122

123                 
124         Composite selection = createSelectionArea(topComp);
125         gd = new GridData(GridData.FILL_BOTH);
126         gd.horizontalSpan = 1;
127         
128         selection.setLayoutData(gd);
129         
130         
131         Control specialButtons = createSpecialButtonBar(topComp);
132         gd = new GridData(GridData.FILL_BOTH);
133         
134         specialButtons.setLayoutData(gd);
135                 
136         Label separator = new Label(topComp, SWT.HORIZONTAL | SWT.SEPARATOR);
137         gd = new GridData(GridData.FILL_HORIZONTAL);
138         gd.horizontalSpan = 2;
139         separator.setLayoutData(gd);
140         
141         
142         dialogComp.layout(true);
143         return dialogComp;
144     }
145     
146         
147     /**
148      * creates the tree of options sections
149      */

150     private Composite createSelectionArea(Composite parent) {
151         Composite comp = new Composite(parent, SWT.NONE);
152         setSelectionArea(comp);
153         
154         GridLayout layout = new GridLayout();
155     
156         layout.numColumns = 1;
157     
158         
159         comp.setLayout(layout);
160         
161         GridData gd = new GridData();
162         
163         TreeViewer tree = new TreeViewer(comp);
164         gd = new GridData(GridData.FILL_BOTH);
165     
166         tree.getControl().setLayoutData(gd);
167         
168         tree.setContentProvider(new SootConfigContentProvider());
169         tree.setLabelProvider(new SootConfigLabelProvider());
170         tree.setInput(getInitialInput());
171     
172         setTreeViewer(tree);
173         
174         tree.addSelectionChangedListener(this);
175     
176         
177         tree.expandAll();
178         tree.getControl().addKeyListener(new KeyAdapter() {
179             public void keyPressed(KeyEvent e) {
180                 handleKeyPressed(e);
181             }
182         });
183          
184
185         return comp;
186     }
187
188     public void selectionChanged(SelectionChangedEvent event) {
189         IStructuredSelection selection = (IStructuredSelection)event.getSelection();
190         if (!selection.isEmpty()) {
191             Object JavaDoc elem = selection.getFirstElement();
192             if (elem instanceof SootConfiguration) {
193                 SootConfiguration sel = (SootConfiguration)elem;
194                 setSelected(sel.getLabel());
195             }
196             enableButtons();
197         }
198     }
199     
200     private void enableButtons(){
201         Iterator it = specialButtonList.iterator();
202         while (it.hasNext()){
203             ((Button)it.next()).setEnabled(true);
204         }
205     }
206     
207     protected void handleKeyPressed(KeyEvent e) {
208     }
209     
210     private SootConfiguration getInitialInput() {
211         
212         IDialogSettings settings = SootPlugin.getDefault().getDialogSettings();
213         int numConfig = 0;
214         try {
215             numConfig = settings.getInt(Messages.getString("SootConfigManagerDialog.config_count")); //$NON-NLS-1$
216
}
217         catch(NumberFormatException JavaDoc e) {
218         }
219
220         SootConfiguration root = new SootConfiguration(""); //$NON-NLS-1$
221

222         if (numConfig != 0) {
223             String JavaDoc [] configNames = new String JavaDoc[numConfig];
224             
225                 
226             for (int i = 0; i < numConfig; i++) {
227                 configNames[i] = settings.get(Messages.getString("SootConfigManagerDialog.soot_run_config")+(i+1)); //$NON-NLS-1$
228
root.addChild(new SootConfiguration(configNames[i]));
229             }
230         
231             
232         }
233         setTreeRoot(root);
234
235         return root;
236     }
237     
238     /*
239      * @see Dialog#createButtonBar(Composite)
240      */

241     protected Control createSpecialButtonBar(Composite parent) {
242         Composite composite= new Composite(parent, SWT.NULL);
243         GridLayout layout= new GridLayout();
244         layout.numColumns= 1;
245
246         composite.setLayout(layout);
247         composite.setLayoutData(new GridData(GridData.FILL_VERTICAL));
248     
249         
250         applyDialogFont(composite);
251         
252         composite.setLayout(layout);
253
254         GridData data =
255             new GridData(
256                 GridData.VERTICAL_ALIGN_END | GridData.HORIZONTAL_ALIGN_CENTER);
257         composite.setLayoutData(data);
258
259         // Add the buttons to the button bar.
260
createSpecialButtonsForButtonBar(composite);
261
262         return composite;
263     }
264     
265     ArrayList specialButtonList = new ArrayList();
266     
267     protected Button createSpecialButton(
268         Composite parent,
269         int id,
270         String JavaDoc label,
271         boolean defaultButton, boolean enabled) {
272     
273
274         Button button = new Button(parent, SWT.PUSH);
275         button.setText(label);
276
277         button.setData(new Integer JavaDoc(id));
278         button.addSelectionListener(new SelectionAdapter() {
279         public void widgetSelected(SelectionEvent event) {
280             buttonPressed(((Integer JavaDoc) event.widget.getData()).intValue());
281         }
282         });
283         if (defaultButton) {
284             Shell shell = parent.getShell();
285             if (shell != null) {
286                 shell.setDefaultButton(button);
287             }
288         }
289         button.setFont(parent.getFont());
290         if (!enabled){
291             button.setEnabled(false);
292         }
293
294         setButtonLayoutData(button);
295         specialButtonList.add(button);
296         return button;
297     }
298     
299     protected void createButtonsForButtonBar(Composite parent){
300         //run and close will close dialog
301
Button runButton = createButton(parent, 5, Messages.getString("SootConfigManagerDialog.Run"), false); //$NON-NLS-1$
302
runButton.setEnabled(false);
303         specialButtonList.add(runButton);
304         createButton(parent, 6, Messages.getString("SootConfigManagerDialog.Close"), true); //$NON-NLS-1$
305
}
306     protected void createSpecialButtonsForButtonBar(Composite parent) {
307         createSpecialButton(parent, 0, Messages.getString("SootConfigManagerDialog.New"), false, true); //$NON-NLS-1$
308
createSpecialButton(parent, 1, Messages.getString("SootConfigManagerDialog.Edit"), false, false); //$NON-NLS-1$
309
createSpecialButton(parent, 2, Messages.getString("SootConfigManagerDialog.Delete"), false, false); //$NON-NLS-1$
310
createSpecialButton(parent, 3, Messages.getString("SootConfigManagerDialog.Rename"), false, false); //$NON-NLS-1$
311
createSpecialButton(parent, 4, Messages.getString("SootConfigManagerDialog.Clone"), false, false); //$NON-NLS-1$
312

313     }
314     
315     protected void buttonPressed(int id) {
316         switch (id) {
317             case 0: {
318                 newPressed();
319                 break;
320             }
321             case 1: {
322                 editPressed();
323                 break;
324             }
325             case 2: {
326                 deletePressed();
327                 break;
328             }
329             case 3: {
330                 renamePressed();
331                 break;
332             }
333             case 4: {
334                 clonePressed();
335                 break;
336             }
337             case 5: {
338                 runPressed();
339                 break;
340             }
341             case 6: {
342                 cancelPressed();
343                 break;
344             }
345             case 7: {
346                 break;
347             }
348             case 8: {
349                 break;
350             }
351              
352         }
353     }
354     
355     // shows a phaseOptionsDialog with save and close buttons
356
// only and asks for a name first
357
private void newPressed() {
358         IDialogSettings settings = SootPlugin.getDefault().getDialogSettings();
359         
360         // gets current number of configurations before adding any
361
int config_count = 0;
362         try {
363             config_count = settings.getInt(Messages.getString("SootConfigManagerDialog.config_count")); //$NON-NLS-1$
364
}
365         catch (NumberFormatException JavaDoc e) {
366         }
367         
368         ArrayList currentNames = new ArrayList();
369         for (int i = 1; i <= config_count; i++) {
370             currentNames.add(settings.get(Messages.getString("SootConfigManagerDialog.soot_run_config")+i)); //$NON-NLS-1$
371
}
372         
373         // sets validator to know about already used names - but it doesn't use
374
// them because then editing a file cannot use same file name
375
SootConfigNameInputValidator validator = new SootConfigNameInputValidator();
376         validator.setAlreadyUsed(currentNames);
377         
378     
379         // create dialog to get name
380
InputDialog nameDialog = new InputDialog(this.getShell(), Messages.getString("SootConfigManagerDialog.Saving_Configuration_Name"), Messages.getString("SootConfigManagerDialog.Enter_name_to_save_configuration_with"), "", validator); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
381
nameDialog.open();
382         
383         if (nameDialog.getReturnCode() == Dialog.OK) {
384             setEditDefs(null);
385             int returnCode = displayOptions(nameDialog.getValue(), "soot.Main");
386             //handle selection of main class here
387

388             if (returnCode != Dialog.CANCEL) {
389                 getTreeRoot().addChild(new SootConfiguration(nameDialog.getValue()));
390                 refreshTree();
391                 
392             }
393         
394         }
395         else {
396             // cancel and do nothing
397
}
398     }
399         
400     // saves the main class to run with this configuration
401
private void saveMainClass(String JavaDoc configName, String JavaDoc mainClass){
402         IDialogSettings settings = SootPlugin.getDefault().getDialogSettings();
403         settings.put(configName+"_mainClass", mainClass);
404     }
405     
406     // returns the main class to run with this configuration
407
private String JavaDoc getMainClass(String JavaDoc configName){
408          IDialogSettings settings = SootPlugin.getDefault().getDialogSettings();
409          String JavaDoc mainClass = settings.get(configName+"_mainClass");
410          if ((mainClass == null) || (mainClass.length() == 0)){
411             return "soot.Main";
412          }
413          else {
414             return mainClass;
415          }
416      }
417         
418     
419     private ArrayList stringToList(String JavaDoc string){
420         StringTokenizer st = new StringTokenizer(string, ",");
421         ArrayList list = new ArrayList();
422         while (st.hasMoreTokens()){
423             list.add(st.nextToken());
424         }
425         return list;
426     }
427     
428     private void refreshTree() {
429         getTreeViewer().setInput(getTreeRoot());
430         getTreeViewer().setExpandedState(getTreeRoot(), true);
431         getTreeViewer().refresh(getTreeRoot(), false);
432     }
433     
434     private int displayOptions(String JavaDoc name) {
435         return displayOptions(name, "soot.Main");
436     }
437     
438     private int displayOptions(String JavaDoc name, String JavaDoc mainClass) {
439         
440         PhaseOptionsDialog dialog = new PhaseOptionsDialog(getShell());
441         addEclipseDefsToDialog(dialog);
442         setMainClassInDialog(dialog, mainClass);
443         if (getEditDefs() != null) {
444             Iterator it = getEditDefs().keySet().iterator();
445             while (it.hasNext()) {
446                 Object JavaDoc next = it.next();
447                 String JavaDoc key = (String JavaDoc)next;
448                 String JavaDoc val = (String JavaDoc)getEditDefs().get(key);
449                 if ((val.equals("true")) || (val.equals("false"))) { //$NON-NLS-1$ //$NON-NLS-2$
450
dialog.addToDefList(key, new Boolean JavaDoc(val));
451                 }
452                 else {
453                     dialog.addToDefList(key, val);
454                 }
455             }
456         }
457         
458         
459         dialog.setConfigName(name);
460         dialog.setCanRun(false);
461         dialog.open();
462         if (dialog.getReturnCode() == Dialog.OK){
463             //save main class
464
saveMainClass(name, dialog.getSootMainClass());
465         }
466         return dialog.getReturnCode();
467             // saved - should show up in tree
468

469         
470     }
471         
472     // same as newPressed except does not ask for name
473
private void editPressed() {
474         if (getSelected() == null) return;
475         
476         String JavaDoc result = this.getSelected();
477         IDialogSettings settings = SootPlugin.getDefault().getDialogSettings();
478         String JavaDoc [] saveArray = settings.getArray(result);
479         SootSavedConfiguration ssc = new SootSavedConfiguration(result, saveArray);
480         setEditDefs(ssc.toHashMapFromArray());
481         displayOptions(result, getMainClass(result));
482         
483                 
484     }
485     
486     // removes form tree
487
private void deletePressed() {
488         if (getSelected() == null) return;
489         
490         String JavaDoc result = this.getSelected();
491         
492         // maybe ask if they are sure here first
493
MessageDialog msgDialog = new MessageDialog(this.getShell(), Messages.getString("SootConfigManagerDialog.Soot_Configuration_Remove_Message"), null, Messages.getString("SootConfigManagerDialog.Are_you_sure_you_want_to_remove_this_configuration"), 0, new String JavaDoc [] {Messages.getString("SootConfigManagerDialog.Yes"), Messages.getString("SootConfigManagerDialog.No")}, 0); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
494
msgDialog.open();
495         if (msgDialog.getReturnCode() == 0) {
496                         
497             // do the delete
498
ArrayList toRemove = new ArrayList();
499             toRemove.add(result);
500             SavedConfigManager scm = new SavedConfigManager();
501             scm.setDeleteList(toRemove);
502             scm.handleDeletes();
503             
504             // remove also from tree
505
getTreeRoot().removeChild(result);
506             refreshTree();
507         }
508         
509         
510     }
511     
512     private void renamePressed(){
513         if (getSelected() == null) return;
514         
515         String JavaDoc result = this.getSelected();
516         
517         IDialogSettings settings = SootPlugin.getDefault().getDialogSettings();
518         
519         // gets current number of configurations
520
int config_count = 0;
521         int oldNameCount = 0;
522         try {
523             config_count = settings.getInt(Messages.getString("SootConfigManagerDialog.config_count")); //$NON-NLS-1$
524
}
525         catch (NumberFormatException JavaDoc e) {
526         }
527
528         ArrayList currentNames = new ArrayList();
529         for (int i = 1; i <= config_count; i++) {
530             currentNames.add(settings.get(Messages.getString("SootConfigManagerDialog.soot_run_config")+i)); //$NON-NLS-1$
531
if (((String JavaDoc)currentNames.get(i-1)).equals(result)){
532                 oldNameCount = i;
533             }
534         }
535
536         
537         // sets validator to know about already used names
538
SootConfigNameInputValidator validator = new SootConfigNameInputValidator();
539         validator.setAlreadyUsed(currentNames);
540         
541         InputDialog nameDialog = new InputDialog(this.getShell(), Messages.getString("SootConfigManagerDialog.Rename_Saved_Configuration"), Messages.getString("SootConfigManagerDialog.Enter_new_name"), "", validator); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
542
nameDialog.open();
543         if (nameDialog.getReturnCode() == Dialog.OK){
544             settings.put(Messages.getString("SootConfigManagerDialog.soot_run_config")+oldNameCount, nameDialog.getValue()); //$NON-NLS-1$
545
settings.put(nameDialog.getValue(), settings.getArray(result));
546             getTreeRoot().renameChild(result, nameDialog.getValue());
547             saveMainClass(nameDialog.getValue(), settings.get(result+"_mainClass"));
548         }
549         refreshTree();
550     }
551     
552     
553
554     private void clonePressed(){
555         if (getSelected() == null) return;
556         
557         String JavaDoc result = this.getSelected();
558         
559         IDialogSettings settings = SootPlugin.getDefault().getDialogSettings();
560         
561         // gets current number of configurations
562
int config_count = 0;
563         try {
564             config_count = settings.getInt(Messages.getString("SootConfigManagerDialog.config_count")); //$NON-NLS-1$
565
}
566         catch (NumberFormatException JavaDoc e) {
567         }
568         ArrayList currentNames = new ArrayList();
569         for (int i = 1; i <= config_count; i++) {
570             currentNames.add(settings.get(Messages.getString("SootConfigManagerDialog.soot_run_config")+i)); //$NON-NLS-1$
571

572         }
573
574         
575         // sets validator to know about already used names
576
SootConfigNameInputValidator validator = new SootConfigNameInputValidator();
577         validator.setAlreadyUsed(currentNames);
578         
579         InputDialog nameDialog = new InputDialog(this.getShell(), Messages.getString("SootConfigManagerDialog.Clone_Saved_Configuration"), Messages.getString("SootConfigManagerDialog.Enter_new_name"), result, validator); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
580
nameDialog.open();
581         if (nameDialog.getReturnCode() == Dialog.OK){
582             config_count++;
583             settings.put(Messages.getString("SootConfigManagerDialog.soot_run_config")+config_count, nameDialog.getValue()); //$NON-NLS-1$
584
settings.put(nameDialog.getValue(), settings.getArray(result));
585             settings.put(Messages.getString("SootConfigManagerDialog.config_count"), config_count); //$NON-NLS-1$
586
getTreeRoot().addChild(new SootConfiguration(nameDialog.getValue()));
587             saveMainClass(nameDialog.getValue(), settings.get(result+"_mainClass"));
588         }
589         refreshTree();
590     }
591
592     // runs the config
593
private void runPressed() {
594         super.okPressed();
595         if (getSelected() == null) return;
596         
597         IDialogSettings settings = SootPlugin.getDefault().getDialogSettings();
598         String JavaDoc mainClass = settings.get(getSelected()+"_mainClass");
599         
600         if (getLauncher() instanceof SootConfigProjectLauncher) {
601             ((SootConfigProjectLauncher)getLauncher()).launch(getSelected(), mainClass);
602         }
603         else if (getLauncher() instanceof SootConfigJavaProjectLauncher){
604             ((SootConfigJavaProjectLauncher)getLauncher()).launch(getSelected(), mainClass);
605         }
606         else if (getLauncher() instanceof SootConfigFileLauncher) {
607             ((SootConfigFileLauncher)getLauncher()).launch(getSelected(), mainClass);
608         }
609         else if (getLauncher() instanceof SootConfigFromJavaFileLauncher){
610             ((SootConfigFromJavaFileLauncher)getLauncher()).launch(getSelected(), mainClass);
611         }
612         
613         
614     }
615     
616     private void importPressed(){
617             
618     }
619     
620     /**
621      * Returns the sashForm.
622      * @return SashForm
623      */

624     public SashForm getSashForm() {
625         return sashForm;
626     }
627
628     /**
629      * Sets the sashForm.
630      * @param sashForm The sashForm to set
631      */

632     public void setSashForm(SashForm sashForm) {
633         this.sashForm = sashForm;
634     }
635
636     /**
637      * Returns the selectionArea.
638      * @return Composite
639      */

640     public Composite getSelectionArea() {
641         return selectionArea;
642     }
643
644     /**
645      * Returns the treeViewer.
646      * @return TreeViewer
647      */

648     public TreeViewer getTreeViewer() {
649         return treeViewer;
650     }
651
652     /**
653      * Sets the selectionArea.
654      * @param selectionArea The selectionArea to set
655      */

656     public void setSelectionArea(Composite selectionArea) {
657         this.selectionArea = selectionArea;
658     }
659
660     /**
661      * Sets the treeViewer.
662      * @param treeViewer The treeViewer to set
663      */

664     public void setTreeViewer(TreeViewer treeViewer) {
665         this.treeViewer = treeViewer;
666     }
667
668     /**
669      * Returns the selected.
670      * @return String
671      */

672     public String JavaDoc getSelected() {
673         return selected;
674     }
675
676     /**
677      * Sets the selected.
678      * @param selected The selected to set
679      */

680     public void setSelected(String JavaDoc selected) {
681         this.selected = selected;
682     }
683
684     /**
685      * Returns the buttonPanel.
686      * @return Composite
687      */

688     public Composite getButtonPanel() {
689         return buttonPanel;
690     }
691
692     /**
693      * Sets the buttonPanel.
694      * @param buttonPanel The buttonPanel to set
695      */

696     public void setButtonPanel(Composite buttonPanel) {
697         this.buttonPanel = buttonPanel;
698     }
699
700     
701     /**
702      * Returns the treeRoot.
703      * @return SootConfiguration
704      */

705     public SootConfiguration getTreeRoot() {
706         return treeRoot;
707     }
708
709     /**
710      * Sets the treeRoot.
711      * @param treeRoot The treeRoot to set
712      */

713     public void setTreeRoot(SootConfiguration treeRoot) {
714         this.treeRoot = treeRoot;
715     }
716
717     /**
718      * Returns the editDefs.
719      * @return HashMap
720      */

721     public HashMap getEditDefs() {
722         return editDefs;
723     }
724
725     /**
726      * Sets the editDefs.
727      * @param editDefs The editDefs to set
728      */

729     public void setEditDefs(HashMap editDefs) {
730         this.editDefs = editDefs;
731     }
732
733     /**
734      * Returns the launcher.
735      * @return SootLauncher
736      */

737     public SootLauncher getLauncher() {
738         return launcher;
739     }
740
741     /**
742      * Sets the launcher.
743      * @param launcher The launcher to set
744      */

745     public void setLauncher(SootLauncher launcher) {
746         this.launcher = launcher;
747     }
748
749 }
750
Popular Tags