Finish button does not close the window, in file open window for some plsql files.
authorSubhashini Sooriarachchi <subslk@netbeans.org>
Thu, 06 Oct 2011 10:21:20 +0530
changeset 59781495e5020e
parent 58 2144fa534996
child 60 90bf0726cfd1
Finish button does not close the window, in file open window for some plsql files.
PLSQL/Formatter/src/org/netbeans/modules/plsql/format/PlsqlFormatter.java
     1.1 --- a/PLSQL/Formatter/src/org/netbeans/modules/plsql/format/PlsqlFormatter.java	Thu Oct 06 08:39:53 2011 +0530
     1.2 +++ b/PLSQL/Formatter/src/org/netbeans/modules/plsql/format/PlsqlFormatter.java	Thu Oct 06 10:21:20 2011 +0530
     1.3 @@ -984,12 +984,14 @@
     1.4                      }
     1.5                  } else if (previousNWS.getImage().trim().equalsIgnoreCase(">")) {
     1.6                      //This will be useful for only the placeholders inside a template
     1.7 -                    String previousKeyword = getPreviousKeyword(previousNWS).getImage().trim();
     1.8 +	if (getPreviousKeyword(previousNWS) != null) {
     1.9 +	    String previousKeyword = getPreviousKeyword(previousNWS).getImage().trim();
    1.10  
    1.11 -                    if ((previousKeyword.equalsIgnoreCase("SELECT"))
    1.12 -                            || (previousKeyword.equalsIgnoreCase("UPDATE"))) {
    1.13 -                        return getTabSize();
    1.14 -                    }
    1.15 +	    if ((previousKeyword.equalsIgnoreCase("SELECT"))
    1.16 +	            || (previousKeyword.equalsIgnoreCase("UPDATE"))) {
    1.17 +	        return getTabSize();
    1.18 +	    }
    1.19 +	}
    1.20                  } else if (previousNWS.getImage().trim().equalsIgnoreCase(",")) {
    1.21                      //This will be useful for SELECT , UPDATE , INTO variables
    1.22                      TokenItem first = findLineFirstNonWhitespace(getPosition(previousNWS, 0)).getToken();