@@ -45,10 +45,9 @@ public class RunAnalysisDialog extends DialogWrapper {
4545 private JButton trainButton ;
4646 private JPanel trainingPanel ;
4747 private JCheckBox trainingPathCheckbox ;
48- private JCheckBox configurationPathCheckbox ;
49- private JTextField configFileTextbox ;
50- private JButton configButton ;
51- private JPanel configurationFilePanel ;
48+ private JRadioButton WEKARadioButton ;
49+ private JRadioButton MEKARadioButton ;
50+ private JPanel toolkitPanel ;
5251 private HashMap <String , String > parameters = new HashMap <String , String >();
5352 private ResourceBundle resourceBundle ;
5453 private Properties config ;
@@ -88,13 +87,13 @@ public RunAnalysisDialog(Project project, boolean modal) {
8887 File configurationFile = new File (JSONFileLoader .getConfigurationFile (true ));
8988
9089 //Use value for source path, if available. Otherwise set the default path
91- if (! PropertiesComponent .getInstance (project ).isValueSet (Constants .SOURCE_DIRECTORY ))
92- sourceDirTextbox .setText (project .getBasePath ());
90+ if (PropertiesComponent .getInstance (project ).isValueSet (Constants .SOURCE_DIRECTORY ))
91+ sourceDirTextbox .setText (project .getBasePath ()+ "/target" );
9392 else
9493 sourceDirTextbox .setText (PropertiesComponent .getInstance (project ).getValue (Constants .SOURCE_DIRECTORY ));
9594
9695 //Use value for the output path, if available. Otherwise set the default path
97- if (! PropertiesComponent .getInstance (project ).isValueSet (Constants .OUTPUT_DIRECTORY ))
96+ if (PropertiesComponent .getInstance (project ).isValueSet (Constants .OUTPUT_DIRECTORY ))
9897 outputDir .setText (project .getBasePath () + File .separator + config .getProperty ("output_dir_name" ));
9998 else
10099 outputDir .setText (PropertiesComponent .getInstance (project ).getValue (Constants .OUTPUT_DIRECTORY ));
@@ -107,20 +106,20 @@ public RunAnalysisDialog(Project project, boolean modal) {
107106 }
108107
109108 //Set value for using configuration file
110- configurationPathCheckbox .setSelected (PropertiesComponent .getInstance (project ).getBoolean (Constants .PROJECT_CONFIGURATION_FILE , false ));
111-
112- for (Component component : configurationFilePanel .getComponents ()) {
113- component .setEnabled (configurationPathCheckbox .isSelected ());
114- }
109+ // configurationPathCheckbox.setSelected(PropertiesComponent.getInstance(project).getBoolean(Constants.PROJECT_CONFIGURATION_FILE, false));
110+ //
111+ // for (Component component : configurationFilePanel.getComponents()) {
112+ // component.setEnabled(configurationPathCheckbox.isSelected());
113+ // }
115114
116115
117116 if (PropertiesComponent .getInstance (project ).isValueSet (Constants .TRAIN_DIRECTORY )) {
118117 trainingTextbox .setText (PropertiesComponent .getInstance (project ).getValue (Constants .TRAIN_DIRECTORY ));
119118 }
120119
121- if (PropertiesComponent .getInstance (project ).isValueSet (Constants .CONFIGURATION_FILE )) {
122- configFileTextbox .setText (PropertiesComponent .getInstance (project ).getValue (Constants .CONFIGURATION_FILE ));
123- }
120+ // if (PropertiesComponent.getInstance(project).isValueSet(Constants.CONFIGURATION_FILE)) {
121+ // configFileTextbox.setText(PropertiesComponent.getInstance(project).getValue(Constants.CONFIGURATION_FILE));
122+ // }
124123
125124 init ();
126125 /*
@@ -140,7 +139,7 @@ public void actionPerformed(ActionEvent e) {
140139 }
141140 });
142141
143- configurationPathCheckbox .addActionListener (new ActionListener () {
142+ /* configurationPathCheckbox.addActionListener(new ActionListener() {
144143 @Override
145144 public void actionPerformed(ActionEvent e) {
146145
@@ -150,7 +149,7 @@ public void actionPerformed(ActionEvent e) {
150149 component.setEnabled(configurationPathCheckbox.isSelected());
151150 }
152151 }
153- });
152+ }); */
154153
155154 sourceBtn .addActionListener (new ActionListener () {
156155 @ Override
@@ -176,13 +175,13 @@ public void actionPerformed(ActionEvent e) {
176175 }
177176 });
178177
179- configButton .addActionListener (new ActionListener () {
178+ /* configButton.addActionListener(new ActionListener() {
180179 @Override
181180 public void actionPerformed(ActionEvent e) {
182181
183182 configFileTextbox.setText(fileSelector(JFileChooser.FILES_ONLY, configFileTextbox.getText()));
184183 }
185- });
184+ });*/
186185 }
187186
188187 @ Override
@@ -221,11 +220,17 @@ private void setParameters() {
221220 }
222221
223222 //Check if option to use default configuration file is selected
224- if (configurationPathCheckbox .isSelected ()) {
223+ /* if (configurationPathCheckbox.isSelected()) {
225224 parameters.put(Constants.CONFIGURATION_FILE, configFileTextbox.getText());
226- } else
227- parameters .put (Constants .CONFIGURATION_FILE , config .getProperty ("swan_default_param_value" ));
228-
225+ } else */
226+ //set the configuration file to default
227+ parameters .put (Constants .CONFIGURATION_FILE , config .getProperty ("swan_default_param_value" ));
228+
229+ if (!MEKARadioButton .isSelected ()){
230+ parameters .put (Constants .TOOLKIT , MEKARadioButton .getText ());
231+ }else {
232+ parameters .put (Constants .TOOLKIT , WEKARadioButton .getText ());
233+ }
229234 parameters .put (Constants .SOURCE_DIRECTORY , sourceDirTextbox .getText ());
230235 parameters .put (Constants .OUTPUT_DIRECTORY , outputDir .getText ());
231236 parameters .put (Constants .OUTPUT_LOG , config .getProperty ("log_suffix" ));
0 commit comments