Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* 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