@Override public void actionPerformed( ActionEvent event ) { JTextComponent comp = (JTextComponent) event.getSource(); if (!performCdiAction(comp)) { Action actions[] = ImplementationProvider.getDefault(). getGlyphGutterActions(comp); if (actions == null) return ; int nextIndex = 0; while (nextIndex < actions.length && actions[nextIndex] != this) { nextIndex++; } nextIndex++; if (actions.length > nextIndex) { Action action = actions[nextIndex]; if (action!=null && action.isEnabled()){ action.actionPerformed(event); } } } }
/** Getter for Description property * @return localized description of the annotation type */ public String getDescription() { String desc = (String)getProp(PROP_DESCRIPTION); if (desc == null) { String localizer = (String)getProp(PROP_LOCALIZING_BUNDLE); String key = (String)getProp(PROP_DESCRIPTION_KEY); ResourceBundle bundle = ImplementationProvider.getDefault().getResourceBundle(localizer); desc = bundle.getString(key); setDescription(desc); // cache it } return desc; }
public static void requestFocus(JTextComponent c) { if (c != null) { if (!ImplementationProvider.getDefault().activateComponent(c)) { Frame f = EditorUI.getParentFrame(c); if (f != null) { f.requestFocus(); } c.requestFocus(); } } }
Action a = ImplementationProvider.getDefault().getToggleBreakpointAction(); if (a != null) { int line = (int) ((float) e.getY() / (float) lineHeight);
@Override public void actionPerformed(ActionEvent e) { if (!invokeDefaultAction((JTextComponent) e.getSource())) { // sorry, don't know how to do without deprecated ImplementationProvider @SuppressWarnings("deprecation") Action actions[] = org.netbeans.editor.ImplementationProvider.getDefault().getGlyphGutterActions((JTextComponent) e.getSource()); if (actions == null) { return ; } int nextAction = 0; while (nextAction < actions.length && actions[nextAction] != this) { nextAction++; } nextAction++; if (actions.length > nextAction) { Action a = actions[nextAction]; if (a!=null && a.isEnabled()){ a.actionPerformed(e); } } } }
/** Getter for TooltipText property * @return localized TooltipText of the annotation type */ public String getTooltipText() { String text = (String)getProp(PROP_TOOLTIP_TEXT); if (text == null) { String localizer = (String)getProp(PROP_LOCALIZING_BUNDLE); String key = (String)getProp(PROP_COMBINATION_TOOLTIP_TEXT_KEY); ResourceBundle bundle = ImplementationProvider.getDefault().getResourceBundle(localizer); text = bundle.getString(key); setTooltipText(text); // cache it } return text; }
annos.activateNextAnnotation(line); } else { Action actions[] = ImplementationProvider.getDefault().getGlyphGutterActions(editorUI.getComponent()); if (actions != null && actions.length >0) { Action a = actions[0]; //TODO - create GUI chooser
/** * Getter for Description property * * @return localized description of the annotation type */ public String getDescription() { String desc = (String) getProp(PROP_DESCRIPTION); if (desc == null) { String localizer = (String) getProp(PROP_LOCALIZING_BUNDLE); String key = (String) getProp(PROP_DESCRIPTION_KEY); ResourceBundle bundle = ImplementationProvider.getDefault().getResourceBundle(localizer); desc = bundle.getString(key); setDescription(desc); // cache it } return desc; }
/** * Getter for TooltipText property * * @return localized TooltipText of the annotation type */ public String getTooltipText() { String text = (String) getProp(PROP_TOOLTIP_TEXT); if (text == null) { String localizer = (String) getProp(PROP_LOCALIZING_BUNDLE); String key = (String) getProp(PROP_COMBINATION_TOOLTIP_TEXT_KEY); ResourceBundle bundle = ImplementationProvider.getDefault().getResourceBundle(localizer); text = bundle.getString(key); setTooltipText(text); // cache it } return text; }