This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
* Copyright 1997-2010 Sun Microsystems, Inc. All rights reserved.
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common
@Override
public void defaultAction(JTextComponent component) {
int charsToRemove = (typedChars==null)?0:typedChars.length();
int substOffset;
int substOffset = component.getCaretPosition() - charsToRemove;
int charsToRemove;
if (component.getSelectedText() == null) {
charsToRemove = (typedChars == null) ? 0 : typedChars.length();
substOffset = component.getCaretPosition() - charsToRemove;
} else {
charsToRemove = component.getSelectedText().length();
substOffset = component.getSelectionStart();
}
if(!shift) Completion.get().hideAll();
if(getReplacementText().equals(typedChars))
return;