@Override public void actionPerformedImpl(ActionEvent e, RTextArea textArea) { Gutter gutter = RSyntaxUtilities.getGutter(textArea); if (gutter!=null) { int line = textArea.getCaretLineNumber(); try { gutter.toggleBookmark(line); } catch (BadLocationException ble) { // Never happens UIManager.getLookAndFeel(). provideErrorFeedback(textArea); ble.printStackTrace(); } } }
@Override public void actionPerformedImpl(ActionEvent e, RTextArea textArea) { if (!textArea.isEditable() || !textArea.isEnabled()) { UIManager.getLookAndFeel().provideErrorFeedback(textArea); return; } RSyntaxTextArea rsta = (RSyntaxTextArea)getTextComponent(e); RSyntaxDocument doc = (RSyntaxDocument)rsta.getDocument(); int line = textArea.getCaretLineNumber(); int type = doc.getLastTokenTypeOnLine(line); if (type<0) { type = doc.getClosestStandardTokenTypeForInternalType(type); } // Only in MLC's should we try this if (type==Token.COMMENT_DOCUMENTATION || type==Token.COMMENT_MULTILINE) { insertBreakInMLC(e, rsta, line); } else { handleInsertBreak(rsta, true); } }
int curLine = textArea.getCaretLineNumber();
@Override public void actionPerformedImpl(ActionEvent e, RTextArea textArea) { Gutter gutter = RSyntaxUtilities.getGutter(textArea); if (gutter!=null) { int line = textArea.getCaretLineNumber(); try { gutter.toggleBookmark(line); } catch (BadLocationException ble) { // Never happens UIManager.getLookAndFeel(). provideErrorFeedback(textArea); ble.printStackTrace(); } } }
public void actionPerformedImpl(ActionEvent e, RTextArea textArea) { Container parent = textArea.getParent(); if (parent instanceof JViewport) { parent = parent.getParent(); if (parent instanceof RTextScrollPane) { RTextScrollPane sp = (RTextScrollPane)parent; Gutter gutter = sp.getGutter(); int line = textArea.getCaretLineNumber(); try { gutter.toggleBookmark(line); } catch (BadLocationException ble) { // Never happens UIManager.getLookAndFeel(). provideErrorFeedback(textArea); ble.printStackTrace(); } } } }
public void actionPerformedImpl(ActionEvent e, RTextArea textArea) { Container parent = textArea.getParent(); if (parent instanceof JViewport) { parent = parent.getParent(); if (parent instanceof RTextScrollPane) { RTextScrollPane sp = (RTextScrollPane)parent; Gutter gutter = sp.getGutter(); int line = textArea.getCaretLineNumber(); try { gutter.toggleBookmark(line); } catch (BadLocationException ble) { // Never happens UIManager.getLookAndFeel(). provideErrorFeedback(textArea); ble.printStackTrace(); } } } }
@Override public void actionPerformedImpl(ActionEvent e, RTextArea textArea) { if (!textArea.isEditable() || !textArea.isEnabled()) { UIManager.getLookAndFeel().provideErrorFeedback(textArea); return; } RSyntaxTextArea rsta = (RSyntaxTextArea)getTextComponent(e); RSyntaxDocument doc = (RSyntaxDocument)rsta.getDocument(); int line = textArea.getCaretLineNumber(); int type = doc.getLastTokenTypeOnLine(line); if (type<0) { type = doc.getClosestStandardTokenTypeForInternalType(type); } // Only in MLC's should we try this if (type==Token.COMMENT_DOCUMENTATION || type==Token.COMMENT_MULTILINE) { insertBreakInMLC(e, rsta, line); } else { handleInsertBreak(rsta, true); } }
int curLine = textArea.getCaretLineNumber();
int curLine = textArea.getCaretLineNumber();
int curLine = textArea.getCaretLineNumber();