boolean () { if (isCaretOutsideCurrentSegment(null)) { return false; } if (myLiveTemplateProcessor.isLookupShown()) { final Lookup lookup = LookupManager.getActiveLookup(getEditor()); if (lookup != null && !lookup.isFocused()) { return true; } } return !myLiveTemplateProcessor.isLookupShown(); }