/** Finds help context for a generic object. Right now checks * for HelpCtx.Provider and handles java.awt.Component in a * special way compatible with JavaHelp. * Also {@link BeanDescriptor}'s are checked for a string-valued attribute * <code>helpID</code>, as per the JavaHelp specification (but no help sets * will be loaded). * * @param instance to search help for * @return the help for the object or <code>HelpCtx.DEFAULT_HELP</code> if HelpCtx cannot be found * * @since 4.3 */ public static HelpCtx findHelp(Object instance) { if (instance instanceof java.awt.Component) { return findHelp((java.awt.Component) instance); } if (instance instanceof HelpCtx.Provider) { return ((HelpCtx.Provider) instance).getHelpCtx(); } try { BeanDescriptor d = Introspector.getBeanInfo(instance.getClass()).getBeanDescriptor(); String v = (String) d.getValue("helpID"); // NOI18N if (v != null) { return new HelpCtx(v); } } catch (IntrospectionException e) { err.log(Level.FINE, "findHelp on {0}: {1}", new Object[]{instance, e}); } return HelpCtx.DEFAULT_HELP; }
@Override public HelpCtx getHelpCtx() { HelpCtx h = HelpCtx.findHelp(bean); if (h != HelpCtx.DEFAULT_HELP) { return h; } else { return new HelpCtx(BeanNode.class); } }
/** Finds help context for a generic object. Right now checks * for HelpCtx.Provider and handles java.awt.Component in a * special way compatible with JavaHelp. * Also {@link BeanDescriptor}'s are checked for a string-valued attribute * <code>helpID</code>, as per the JavaHelp specification (but no help sets * will be loaded). * * @param instance to search help for * @return the help for the object or <code>HelpCtx.DEFAULT_HELP</code> if HelpCtx cannot be found * * @since 4.3 */ public static HelpCtx findHelp(Object instance) { if (instance instanceof java.awt.Component) { return findHelp((java.awt.Component) instance); } if (instance instanceof HelpCtx.Provider) { return ((HelpCtx.Provider) instance).getHelpCtx(); } try { BeanDescriptor d = Introspector.getBeanInfo(instance.getClass()).getBeanDescriptor(); String v = (String) d.getValue("helpID"); // NOI18N if (v != null) { return new HelpCtx(v); } } catch (IntrospectionException e) { err.log(Level.FINE, "findHelp on {0}: {1}", new Object[]{instance, e}); } return HelpCtx.DEFAULT_HELP; }
@Override public HelpCtx getHelpCtx() { if (currentConfigurationNode != null) { return HelpCtx.findHelp(currentConfigurationNode); } else { return null; } }
public HelpCtx getHelpCtx() { HelpCtx h = HelpCtx.findHelp(bean); if (h != HelpCtx.DEFAULT_HELP) { return h; } else { return new HelpCtx(BeanNode.class); } }
public HelpCtx getHelpCtx() { HelpCtx h = HelpCtx.findHelp(bean); if (h != HelpCtx.DEFAULT_HELP) { return h; } else { return new HelpCtx(BeanNode.class); } }
/** Get context help for this editor pane. * If the registered editor kit provides a help ID in bean info * according to the protocol described for {@link HelpCtx#findHelp}, * then that it used, else general help on the editor is provided. * @return context help */ public HelpCtx getHelpCtx() { HelpCtx fromKit = HelpCtx.findHelp (support.kit ()); if (fromKit != null) return fromKit; else return new HelpCtx (HELP_ID); }
/** Get context help for this editor pane. * If the registered editor kit provides a help ID in bean info * according to the protocol described for {@link HelpCtx#findHelp}, * then that it used, else general help on the editor is provided. * @return context help */ public HelpCtx getHelpCtx() { HelpCtx fromKit = HelpCtx.findHelp (support.kit ()); if (fromKit != null) return fromKit; else return new HelpCtx (HELP_ID); }
/** Get context help for this editor pane. * If the registered editor kit provides a help ID in bean info * according to the protocol described for {@link HelpCtx#findHelp}, * then that it used, else general help on the editor is provided. * @return context help */ @Override public HelpCtx getHelpCtx() { Object kit = support.cesKit(); HelpCtx fromKit = kit == null ? null : HelpCtx.findHelp(kit); if (fromKit != null) { return fromKit; } else { return new HelpCtx(HELP_ID); } }
/** Finds help context for a generic object. Right now checks * for HelpCtx.Provider and handles java.awt.Component in a * special way compatible with JavaHelp. * Also {@link BeanDescriptor}'s are checked for a string-valued attribute * <code>helpID</code>, as per the JavaHelp specification (but no help sets * will be loaded). * * @param instance to search help for * @return the help for the object or <code>HelpCtx.DEFAULT_HELP</code> if HelpCtx cannot be found * * @since 4.3 */ public static HelpCtx findHelp(Object instance) { if (instance instanceof java.awt.Component) { return findHelp((java.awt.Component) instance); } if (instance instanceof HelpCtx.Provider) { return ((HelpCtx.Provider) instance).getHelpCtx(); } try { BeanDescriptor d = Introspector.getBeanInfo(instance.getClass()).getBeanDescriptor(); String v = (String) d.getValue("helpID"); // NOI18N if (v != null) { return new HelpCtx(v); } } catch (IntrospectionException e) { err.fine("findHelp on " + instance + ": " + e); } return HelpCtx.DEFAULT_HELP; }
/** Finds help context for a generic object. Right now checks * for HelpCtx.Provider and handles java.awt.Component in a * special way compatible with JavaHelp. * Also {@link BeanDescriptor}'s are checked for a string-valued attribute * <code>helpID</code>, as per the JavaHelp specification (but no help sets * will be loaded). * * @param instance to search help for * @return the help for the object or <code>HelpCtx.DEFAULT_HELP</code> if HelpCtx cannot be found * * @since 4.3 */ public static HelpCtx findHelp(Object instance) { if (instance instanceof java.awt.Component) { return findHelp((java.awt.Component) instance); } if (instance instanceof HelpCtx.Provider) { return ((HelpCtx.Provider) instance).getHelpCtx(); } try { BeanDescriptor d = Introspector.getBeanInfo(instance.getClass()).getBeanDescriptor(); String v = (String) d.getValue("helpID"); // NOI18N if (v != null) { return new HelpCtx(v); } } catch (IntrospectionException e) { err.log(Level.FINE, "findHelp on {0}: {1}", new Object[]{instance, e}); } return HelpCtx.DEFAULT_HELP; }
HelpCtx h = HelpCtx.findHelp(o); if (h != HelpCtx.DEFAULT_HELP) { return h;
dialogDescriptor.setHelpCtx(HelpCtx.findHelp(currentConfigurationNode));
return findHelp ((java.awt.Component)instance);
return findHelp ((java.awt.Component)instance);
)) }); HelpCtx helpCtx = HelpCtx.findHelp (c); if (helpCtx == null) helpCtx = new HelpCtx ("debug.add.breakpoint");;
DialogDescriptor dd = new DialogDescriptor((Object) constructOuterPanel(tp), getTitle(), true, new Object[] { jOK, DialogDescriptor.CANCEL_OPTION}, DialogDescriptor.OK_OPTION, DialogDescriptor.DEFAULT_ALIGN, HelpCtx.findHelp(tp), null); Dialog dialog = DialogDisplayer.getDefault().createDialog(dd);
DialogDescriptor dd = new DialogDescriptor((Object) constructOuterPanel(tp), getTitle(), true, new Object[] { jOK, DialogDescriptor.CANCEL_OPTION}, DialogDescriptor.OK_OPTION, DialogDescriptor.DEFAULT_ALIGN, HelpCtx.findHelp(tp), null); Dialog dialog = DialogDisplayer.getDefault().createDialog(dd);
HelpCtx helpCtx = HelpCtx.findHelp (c); if (helpCtx == null) { helpCtx = new HelpCtx ("debug.add.breakpoint"); // NOI18N
@NbBundle.Messages("CTL_Breakpoint_Customizer_Title=Breakpoint Properties") private static void customize(JSLineBreakpoint lb) { JComponent c = JSLineBreakpointCustomizer.getCustomizerComponent(lb); HelpCtx helpCtx = HelpCtx.findHelp (c); if (helpCtx == null) { helpCtx = new HelpCtx ("debug.add.breakpoint"); // NOI18N