Index: openide/src/org/openide/text/CloneableEditor.java =================================================================== @@ -115,7 +115,13 @@ * @return context help */ public HelpCtx getHelpCtx() { - HelpCtx fromKit = HelpCtx.findHelp (support.kit ()); +// <> NPE when this method called before document loaded or after document closed, +// i.e. when support.kit() returns null. +// HelpCtx fromKit = HelpCtx.findHelp (support.kit ()); +// ==== + Object kit = support.kit(); + HelpCtx fromKit = (kit == null ? null : HelpCtx.findHelp(kit)); +// if (fromKit != null) return fromKit; else