public void customizeDocumentCommand(IDocument d, DocumentCommand c) {
if (c.length == 0 && c.text != null) {
- if(c.text.equals("(")) {
- c.text = "()";
+ if(c.text.equals("(")) { //$NON-NLS-1$
+ c.text = "()"; //$NON-NLS-1$
justAddedClosingBracket = ')';
}
- else if(c.text.equals("[")) {
- c.text = "[]";
+ else if(c.text.equals("[")) { //$NON-NLS-1$
+ c.text = "[]"; //$NON-NLS-1$
justAddedClosingBracket = ']';
}
else {
if(c.text.length() == 1 && c.text.charAt(0) == justAddedClosingBracket) {
- c.text = "";
+ c.text = ""; //$NON-NLS-1$
c.shiftsCaret = false;
c.caretOffset = c.offset+1;
}