
soot.options.options_dialog.xsl Maven / Gradle / Ivy
/*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
* This class is generated automajically from xml - DO NO EDIT - as
* changes will be over written
*
* The purpose of this class is to automajically generate a options
* dialog in the event that options change
*
* Taking options away - should not damage the dialog
* Adding new sections of options - should not damage the dialog
* Adding new otpions to sections (of known option type) - should not
* damage the dialog
*
* Adding new option types will break the dialog (option type widgets
* will need to be created)
*
*/
package ca.mcgill.sable.soot.testing;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.swt.widgets.*;
import org.eclipse.swt.*;
import org.eclipse.swt.layout.*;
import ca.mcgill.sable.soot.SootPlugin;
public class OptionsDialog extends AbstractOptionsDialog {
public OptionsDialog(Shell parentShell) {
super(parentShell);
}
/**
* each section gets initialize as a stack layer in pageContainer
* the area containing the options
*/
protected void initializePageContainer() {
Composite Child = Create(getPageContainer());
}
/**
* all options get saved as <alias, value> pair
*/
protected void okPressed() {
IDialogSettings settings = SootPlugin.getDefault().getDialogSettings();
Control [] elements;
settings.put(get _widget().getAlias(), get _widget().getButton().getSelection());
settings.put(get _widget().getAlias(), get _widget().getButton().getSelection());
settings.put(get _widget().getAlias(), get _widget().getText().getText());
settings.put(get _widget().getAlias(), get _widget().getText().getText());
settings.put(get _widget().getAlias(), get _widget().getSelectedAlias());
super.okPressed();
}
/**
* the initial input of selection tree corresponds to each section
* at some point sections will have sub-sections which will be
* children of branches (ie phase - options)
*/
protected SootOption getInitialInput() {
SootOption root = new SootOption("");
SootOption _branch = new SootOption(" ");
root.addChild( _branch);
return root;
}
/**
* each setion gets initalized with a composite
* containing widgets of option type
*/
private BooleanOptionWidget _widget;
private void set _widget(BooleanOptionWidget widget) {
_widget = widget;
}
private BooleanOptionWidget get _widget() {
return _widget;
}
private PathOptionWidget _widget;
private void set _widget(PathOptionWidget widget) {
_widget = widget;
}
private PathOptionWidget get _widget() {
return _widget;
}
private StringOptionWidget _widget;
private void set _widget(StringOptionWidget widget) {
_widget = widget;
}
private StringOptionWidget get _widget() {
return _widget;
}
private BooleanOptionWidget _widget;
private void set _widget(BooleanOptionWidget widget) {
_widget = widget;
}
private BooleanOptionWidget get _widget() {
return _widget;
}
MultiOptionWidget _widget;
private void set _widget(MultiOptionWidget widget) {
_widget = widget;
}
private MultiOptionWidget get _widget() {
return _widget;
}
private Composite Create(Composite parent) {
Group editGroup = new Group(parent, SWT.NONE);
GridLayout layout = new GridLayout();
editGroup.setLayout(layout);
editGroup.setText(" ");
set _widget(new BooleanOptionWidget(editGroup, SWT.NONE, new OptionData(" ", " ", " ")));
OptionData [] data = new OptionData [] {
new OptionData(" ",
" ",
" ",
true),
false),
};
set _widget(new MultiOptionWidget(editGroup, SWT.NONE, data, new OptionData(" ", " ", " ")));
set _widget(new PathOptionWidget(editGroup, SWT.NONE, new OptionData(" ", " ", " ")));
set _widget(new StringOptionWidget(editGroup, SWT.NONE, new OptionData(" ", " ", " ")));
set _widget(new BooleanOptionWidget(editGroup, SWT.NONE, new OptionData(" ", " ", " ")));
return editGroup;
}
}
ARG
© 2015 - 2025 Weber Informatics LLC | Privacy Policy