Select project to Debug dialog box pops up when debugging middle tier release701
authorSubhashini Sooriarachchi <subslk@netbeans.org>
Fri, 13 Jul 2012 11:11:53 +0530
branchrelease701
changeset 255ab42a180b26b
parent 254 839f1d0bf26f
child 256 6a4e706933eb
Select project to Debug dialog box pops up when debugging middle tier
PLSQL/Debugging/src/org/netbeans/modules/plsql/debug/PlsqlEditorContext.java
     1.1 --- a/PLSQL/Debugging/src/org/netbeans/modules/plsql/debug/PlsqlEditorContext.java	Tue Jul 10 16:07:59 2012 +0200
     1.2 +++ b/PLSQL/Debugging/src/org/netbeans/modules/plsql/debug/PlsqlEditorContext.java	Fri Jul 13 11:11:53 2012 +0530
     1.3 @@ -496,20 +496,24 @@
     1.4          String debugProj = null;
     1.5          Breakpoint[] breakpoints = DebuggerManager.getDebuggerManager().getBreakpoints();
     1.6          ArrayList<String> projNames = new ArrayList<String>();
     1.7 -       
     1.8 +        
     1.9          for(Breakpoint breakpoint : breakpoints){
    1.10             if(projNames.indexOf(breakpoint.getGroupName()) == -1)
    1.11                  projNames.add(breakpoint.getGroupName());
    1.12          }
    1.13 -        String[] nameArry = new String[projNames.size()];
    1.14 -
    1.15 -        nameArry = projNames.toArray(nameArry);
    1.16 -        if (!projNames.isEmpty()) {
    1.17 -            GetProjectDialog projDialog = new GetProjectDialog(null, nameArry, true);
    1.18 -            projDialog.setVisible(true);
    1.19 -            debugProj = projDialog.getValue();
    1.20 +        if (projNames.isEmpty()) {
    1.21 +            debugProj = null;
    1.22 +        } else if (projNames.size() == 1) {
    1.23 +            debugProj = projNames.get(0);
    1.24 +        } else {
    1.25 +            String[] nameArry = new String[projNames.size()];
    1.26 +            nameArry = projNames.toArray(nameArry);
    1.27 +            if (!projNames.isEmpty()) {
    1.28 +                GetProjectDialog projDialog = new GetProjectDialog(null, nameArry, true);
    1.29 +                projDialog.setVisible(true);
    1.30 +                debugProj = projDialog.getValue();
    1.31 +            }
    1.32          }
    1.33 -
    1.34          if (debugProj != null) {
    1.35              DataObject dataObject = null;
    1.36              for (Breakpoint breakpoint : breakpoints) {