/** * Closes the current editing command and opens a new one. */ private void commit() { // if fCurrent has never been placed on the command stack, do so now. // this can happen when there are multiple programmatically commits in a single // document change. if (fLastAddedCommand != fCurrent) { fCurrent.pretendCommit(); if (fCurrent.isValid()) addToCommandStack(fCurrent); } fCurrent.commit(); }
/** * Closes the current editing command and opens a new one. */ private void commit() { // if fCurrent has never been placed on the command stack, do so now. // this can happen when there are multiple programmatically commits in a single // document change. if (fLastAddedCommand != fCurrent) { fCurrent.pretendCommit(); if (fCurrent.isValid()) addToCommandStack(fCurrent); } fCurrent.commit(); }