< prev index next >

src/com/sun/javatest/exec/RunTestsHandler.java

Print this page
rev 145 : 7902237: Fixing raw use of parameterized class
Reviewed-by: jjg


 268         startAction.setEnabled(false);
 269         Parameters params = config.getParameters();
 270         // if we reach this point, we have a usable interview which
 271         // we can now alter it
 272         Object[] items = {params.getEnv().getName(),
 273                 TestTreePanel.createNodeListString(TestTreePanel.createNodeList(paths))};
 274         int option = 0;
 275         if (paths[0].equals(""))
 276             option = uif.showYesNoDialog("rh.confirmQuickAll",
 277                         new Object[] {params.getEnv().getName()});
 278         else {
 279             JPanel p = uif.createPanel("rh.confirmPanel", false);
 280             JTextArea msg = uif.createMessageArea("rh.confirmQuick",
 281                         new Object[] {params.getEnv().getName()});
 282             p.setLayout(new BorderLayout());
 283             p.add(msg, BorderLayout.NORTH);
 284             DefaultListModel<String> model = new DefaultListModel<>();
 285             for (int i = paths.length; i > 0; i--)
 286                 model.add(model.getSize(), paths[model.getSize()]);
 287 
 288             JList list = uif.createList("rh.confirmList", model);
 289             p.add(uif.createScrollPane(list,
 290                 ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED,
 291                 ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED), BorderLayout.CENTER);
 292 
 293             option = uif.showCustomYesNoDialog("rh.confirmQuick", p);
 294         }
 295 
 296         if (option != JOptionPane.YES_OPTION) {
 297             startAction.setEnabled(true);
 298             return;
 299         }
 300 
 301         // copy interview
 302         if (localParams != null && (localParams instanceof InterviewParameters)) {
 303             ((InterviewParameters)localParams).dispose();
 304         }
 305 
 306         try {
 307             localParams = BasicSessionControl.clone(params);
 308         } catch (Session.Fault e) {




 268         startAction.setEnabled(false);
 269         Parameters params = config.getParameters();
 270         // if we reach this point, we have a usable interview which
 271         // we can now alter it
 272         Object[] items = {params.getEnv().getName(),
 273                 TestTreePanel.createNodeListString(TestTreePanel.createNodeList(paths))};
 274         int option = 0;
 275         if (paths[0].equals(""))
 276             option = uif.showYesNoDialog("rh.confirmQuickAll",
 277                         new Object[] {params.getEnv().getName()});
 278         else {
 279             JPanel p = uif.createPanel("rh.confirmPanel", false);
 280             JTextArea msg = uif.createMessageArea("rh.confirmQuick",
 281                         new Object[] {params.getEnv().getName()});
 282             p.setLayout(new BorderLayout());
 283             p.add(msg, BorderLayout.NORTH);
 284             DefaultListModel<String> model = new DefaultListModel<>();
 285             for (int i = paths.length; i > 0; i--)
 286                 model.add(model.getSize(), paths[model.getSize()]);
 287 
 288             JList<?> list = uif.createList("rh.confirmList", model);
 289             p.add(uif.createScrollPane(list,
 290                 ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED,
 291                 ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED), BorderLayout.CENTER);
 292 
 293             option = uif.showCustomYesNoDialog("rh.confirmQuick", p);
 294         }
 295 
 296         if (option != JOptionPane.YES_OPTION) {
 297             startAction.setEnabled(true);
 298             return;
 299         }
 300 
 301         // copy interview
 302         if (localParams != null && (localParams instanceof InterviewParameters)) {
 303             ((InterviewParameters)localParams).dispose();
 304         }
 305 
 306         try {
 307             localParams = BasicSessionControl.clone(params);
 308         } catch (Session.Fault e) {


< prev index next >