soot.options.options_dialog_handler.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 handler
* for the options dialog the event that options change
*
* Taking options away - should not damage the handler
* Adding new sections of options - should not damage the handler
* Adding new otpions to sections (of known option type) - should not
* damage the handler
*
* Adding new option types may cause the handler to produce
* incorrect results
*
*/
package ca.mcgill.sable.soot.testing;
import java.util.*;
import org.eclipse.jface.dialogs.IDialogSettings;
import ca.mcgill.sable.soot.SootPlugin;
public class TestOptionsDialogHandler {
private final static String SPACE = " ";
private final static String DASH = "--";
private final static String COLON = ":";
public TestOptionsDialogHandler() {
}
public String getCmdLine() {
IDialogSettings settings = SootPlugin.getDefault().getDialogSettings();
StringBuffer cmd = new StringBuffer();
String path = null;
String defaultVal = null;
//String phaseOptsAlias = null;
//String phaseAlias = null;
//String subPhaseAlias = null;
String key = null;
boolean value = false;
//HashMap phasePairs = new HashMap();
boolean boolDefault = false;
return cmd.toString();
}
}
key = " "+" "+" "+" "+" ";
value = settings.getBoolean(key.trim());
boolDefault = ;
boolDefault = false;
if (value != boolDefault) {
cmd.append(DASH);
cmd.append(key.trim());
cmd.append(SPACE);
}
key = " "+" "+" "+" "+" ";
path = settings.get(key.trim());
if ((path != null) && (path.length() != 0)) {
StringTokenizer st = new StringTokenizer(path);
while (st.hasMoreTokens()) {
cmd.append(DASH);
cmd.append(key.trim());
cmd.append(SPACE);
cmd.append(st.nextToken());
cmd.append(SPACE);
}
}
key = " "+" "+" "+" "+" ";
defaultVal = " ";
path = settings.get(key.trim());
if ((path != null) && (path.length() != 0) && (!path.equals(defaultVal)) ) {
cmd.append(DASH);
cmd.append(key.trim());
cmd.append(SPACE);
cmd.append(path);
cmd.append(SPACE);
}
key = " "+" "+" "+" "+" ";
path = settings.get(key.trim());
defaultVal = " ";
if ((path != null) && (path.length() != 0) && (!path.equals(defaultVal))) {
cmd.append(DASH);
cmd.append(key.trim());
cmd.append(SPACE);
cmd.append(path);
cmd.append(SPACE);
}
key = " "+" "+" "+" "+" ";
value = settings.getBoolean(key.trim());
boolDefault = ;
boolDefault = false;
if (value != boolDefault ) {
cmd.append(DASH);
cmd.append(key.trim());
cmd.append(SPACE);
}
key = " "+" "+" "+" "+" ";
defaultVal = " ";
path = settings.get(key.trim());
if ((path != null) && (path.length() != 0) && (!path.equals(defaultVal)) ) {
cmd.append(DASH);
cmd.append(key.trim());
cmd.append(COLON);
cmd.append(path);
cmd.append(SPACE);
}
key = " "+" "+" "+" "+" ";
path = settings.get(key.trim());
defaultVal = " ";
if ((path != null) && (path.length() != 0) && (!path.equals(defaultVal))) {
cmd.append(DASH);
cmd.append(key.trim());
cmd.append(COLON);
cmd.append(path);
cmd.append(SPACE);
}