JIDE 3.5.15

com.jidesoft.diff
Class CodeEditorDiffPane

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by com.jidesoft.diff.AbstractDiffPane
                      extended by com.jidesoft.diff.BasicDiffPane<CharSequence>
                          extended by com.jidesoft.diff.CodeEditorDiffPane
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class CodeEditorDiffPane
extends BasicDiffPane<CharSequence>

CodeEditorDiffPane is a diff pane based on CodeEditor component in JIDE Code Editor product. It can be used to compare two block of multiple line texts. The text will be displayed in a CodeEditor to have syntax coloring. It also uses the highlight features provided by CodeEditor to make it easy to see the differences.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
protected  CodeEditor _fromEditor
           
protected  CodeEditor _toEditor
           
protected static char[] separators
           
 
Fields inherited from class com.jidesoft.diff.BasicDiffPane
_diffed, _differences, _fromComponent, _fromDiffLineNumberMargin, _fromDiffMargin, _fromMarginArea, _fromMarkerArea, _fromRowMarginSupport, _fromScrollPane, _fromTitle, _fromToDivider, _toComponent, _toDiffLineNumberMargin, _toDiffMargin, _toMarginArea, _toMarkerArea, _toRowMarginSupport, _toScrollPane, _toTitle, GAP_TITLE_PANE, POSITION_AFTER_LAST, POSITION_BEFORE_FIRST, POSITION_IN_THE_MIDDLE, POSITION_ON_FIRST, POSITION_ON_FIRST_AND_LAST, POSITION_ON_LAST
 
Fields inherited from class com.jidesoft.diff.AbstractDiffPane
_actions, _changedColor, _deletedColor, _insertedColor, COMMAND_FIRST, COMMAND_LAST, COMMAND_NEXT, COMMAND_PREVIOUS
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
CodeEditorDiffPane()
          Creates a CodeEditorDiffPane.
CodeEditorDiffPane(CharSequence fromText, CharSequence toText)
           
 
Method Summary
protected  List<Difference> acceptDifference(List<Difference> differences, Difference c)
          Accepts the specified Difference and return a new list of Differences.
protected  void adjustDividerOffset(DiffDivider divider, int index)
          Adjusts the DiffDivider's left and right offset.
 void clearHighlights()
           
 JComponent createComponent(Object item, int index)
          Creates the component to display the content for the diff.
protected  CodeEditor createEditor()
           
protected  CodeEditor createEditor(int index)
          Creates the code editor.
 Diff<?> createLinesDiff(int fromStartOffset, int fromEndOffset, int toStartOffset, int toEndOffset)
          Creates multiple lines diff.
protected  MarkerSupport createMarkerSupport(JComponent component)
           
 JComponent createPane(Object item, int index)
          Subclass implements it to use a different component to display the objects to be compared.
protected  RowMarginSupport createRowMarginSupport(JComponent component, JScrollPane scrollPane)
           
protected  void customizeEditor(CodeEditor editor, int index)
           
protected  void customizePane(JComponent pane, int index)
          Customizes the pane.
 boolean delete(int toLine, int toNumberOfLines, boolean runDiffAfterward)
          Deletes number of lines from the specified started line in the toEditor.
 void endHighlights()
           
protected  DiffTokens getDiffTokens(Segment text)
           
 CharSequence[] getFromItems()
          Gets the from items that is used for Diff to compare the lines.
protected  Segment getFromSegment(int startLineIndex, int endLineIndex)
           
 String getFromText()
           
protected  Character[] getFromText(int startLineIndex, int endLineIndex)
          Gets the from text for line difference to compare.
protected  CharSequence getLineCharSequence(CodeEditor editor, int lineIndex)
          Creates the line char sequence for the code editor in the designated line.
protected  Segment getSegment(CodeEditor editor, int startLineIndex, int endLineIndex)
           
protected  int getSelectedIndex(int paneIndex)
           
 CharSequence[] getToItems()
          Gets the to items that is used for Diff to compare the lines.
protected  Segment getToSegment(int startLineIndex, int endLineIndex)
           
 String getToText()
           
protected  Character[] getToText(int startLineIndex, int endLineIndex)
          Gets the from text for line difference to compare.
 void highlightChanged(int fromStartOffset, int fromEndOffset, int toStartOffset, int toEndOffset, Color c, Color separatorColor, String changeToolTip)
           
 void highlightChangedExactly(List<Difference> lineDiff, int fromStartLine, int fromEndLine, int toStartLine, int toEndLine, Color c, Color separatorColor, String changeToolTip)
           
 void highlightDeleted(int fromStartLine, int fromEndLine, int toStartLine, Color c, Color separatorColor, String changeToolTip)
           
 void highlightInserted(int fromStartLine, int toStartLine, int toEndLine, Color c, Color separatorColor, String changeToolTip)
           
 boolean insert(int toLine, int fromLine, int fromNumberOfLines, boolean runDiffAfterward)
          Inserts some lines from the fromEditor to the toEditor.
protected  void installListeners()
          Installs the listeners.
 boolean is_caseSensitive()
           
 boolean isIgnoreLeadingTrailingSpaces()
          Deprecated. replaced by isIgnoreWhitespaces()
 boolean isIgnoreWhitespaces()
           
 void set_caseSensitive(boolean caseSensitive)
           
 void setFromText(String fromText)
          Sets the text for the from editor.
 void setIgnoreLeadingTrailingSpaces(boolean ignoreLeadingTrailingSpaces)
          Deprecated. replaced by setIgnoreWhitespaces(boolean)
 void setIgnoreWhitespaces(boolean ignoreWhitespaces)
           
 void setReadOnly(boolean readOnly)
          Sets the read only flag.
 void setToText(String toText)
          Sets the text for the to editor.
protected  String[] splitString(String string, String lineBreak)
          Deprecated. replaced by getLineCharSequence(com.jidesoft.editor.CodeEditor, int).
 void startHighlights()
           
protected  void synchronizeViewport(DiffDivider diffDivider, boolean startFrom)
           
protected  void uninstallListeners()
          Uninstalls the listeners.
 
Methods inherited from class com.jidesoft.diff.BasicDiffPane
binarySearchAdded, binarySearchDeleted, clearDiff, createDiff, createDiffMargin, createDivider, createFromRowConverter, createFromTitle, createLineDiff, createToRowConverter, createToTitle, customizeDivider, customizeLinesDiff, diff, diff, differencesUpdated, firstChange, flip, getCaretPosition, getDifferences, getDifferencesForDiff, getFromComponent, getFromMatchingRow, getFromTitle, getToComponent, getToMatchingRow, getToTitle, isHighlightExactChange, isReadOnly, isSelectOnNavigation, lastChange, nextChange, previousChange, replace, runDiff, scrollTo, setChangedColor, setDeletedColor, setFromTitle, setHighlightExactChange, setInsertedColor, setSelectOnNavigation, setToTitle, synchronizeViewport, updateActions
 
Methods inherited from class com.jidesoft.diff.AbstractDiffPane
createActions, createButton, createContentArea, createLegendBar, createStatusBar, createToolBar, customizeAction, customizePanes, customizeToolBar, getChangedColor, getDeletedColor, getInsertedColor, getMessage, getResourceString, initLayout, setMessage
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_fromEditor

protected CodeEditor _fromEditor

_toEditor

protected CodeEditor _toEditor

separators

protected static char[] separators
Constructor Detail

CodeEditorDiffPane

public CodeEditorDiffPane()
Creates a CodeEditorDiffPane. The text to be compared can be set using setFromText(String) and setToText(String) methods.


CodeEditorDiffPane

public CodeEditorDiffPane(CharSequence fromText,
                          CharSequence toText)
Method Detail

createComponent

public JComponent createComponent(Object item,
                                  int index)
Description copied from class: BasicDiffPane
Creates the component to display the content for the diff.

Specified by:
createComponent in class BasicDiffPane<CharSequence>
Parameters:
item - the content to be displayed in the component.
index - the index of the component.
Returns:
the component.

createPane

public JComponent createPane(Object item,
                             int index)
Description copied from class: AbstractDiffPane
Subclass implements it to use a different component to display the objects to be compared.

Overrides:
createPane in class BasicDiffPane<CharSequence>
Parameters:
item - item to be compared. The component should be able to display the item.
index - the index of the pane. For example, for a type diff pane to compare two items before and after modification, the index 0 will be the original item before modification, the index 1 will be the item after modification.
Returns:
the component to display the item to be compared.

customizePane

protected void customizePane(JComponent pane,
                             int index)
Description copied from class: AbstractDiffPane
Customizes the pane. The index will tell you which pane to customize. Subclass can override this method to customize the pane. Please limit the customization to this pane only because at this point, depending on the order, other panes may not be created yet. If a customization involves several panes, please do it in the overridden AbstractDiffPane.customizePanes(JComponent[]).

Overrides:
customizePane in class AbstractDiffPane
Parameters:
pane - the pane.
index - the index of the pane.

createMarkerSupport

protected MarkerSupport createMarkerSupport(JComponent component)
Specified by:
createMarkerSupport in class BasicDiffPane<CharSequence>

createRowMarginSupport

protected RowMarginSupport createRowMarginSupport(JComponent component,
                                                  JScrollPane scrollPane)
Specified by:
createRowMarginSupport in class BasicDiffPane<CharSequence>

adjustDividerOffset

protected void adjustDividerOffset(DiffDivider divider,
                                   int index)
Description copied from class: AbstractDiffPane
Adjusts the DiffDivider's left and right offset.

Overrides:
adjustDividerOffset in class BasicDiffPane<CharSequence>
Parameters:
divider - the DiffDivider.
index - the index of the DiffDivider.

createEditor

protected CodeEditor createEditor(int index)
Creates the code editor.

By default, it invokes createEditor() to create a CodeEditor instance.

Parameters:
index - the code editor index
Returns:
the CodeEditor instance.
Since:
3.4.0

createEditor

protected CodeEditor createEditor()

customizeEditor

protected void customizeEditor(CodeEditor editor,
                               int index)

getFromItems

public CharSequence[] getFromItems()
Gets the from items that is used for Diff to compare the lines.

If the line difference is to be highlighted, this method is not invoked. Instead, getFromText(int, int) is used.

Specified by:
getFromItems in class BasicDiffPane<CharSequence>
Returns:
the CharSequence array.
See Also:
getFromText(int, int)

getToItems

public CharSequence[] getToItems()
Gets the to items that is used for Diff to compare the lines.

If the line difference is to be highlighted, this method is not invoked. Instead, getToText(int, int) is used.

Specified by:
getToItems in class BasicDiffPane<CharSequence>
Returns:
the CharSequence array.
See Also:
getToText(int, int)

getLineCharSequence

protected CharSequence getLineCharSequence(CodeEditor editor,
                                           int lineIndex)
Creates the line char sequence for the code editor in the designated line.

By default, a CodeEditorCharSequence is created.

Parameters:
editor - the code editor
lineIndex - the line number
Returns:
the CharSequence instance.
Since:
3.4.1

getFromSegment

protected Segment getFromSegment(int startLineIndex,
                                 int endLineIndex)

getToSegment

protected Segment getToSegment(int startLineIndex,
                               int endLineIndex)

getSegment

protected Segment getSegment(CodeEditor editor,
                             int startLineIndex,
                             int endLineIndex)

isIgnoreWhitespaces

public boolean isIgnoreWhitespaces()

setIgnoreWhitespaces

public void setIgnoreWhitespaces(boolean ignoreWhitespaces)

is_caseSensitive

public boolean is_caseSensitive()

set_caseSensitive

public void set_caseSensitive(boolean caseSensitive)

setFromText

public void setFromText(String fromText)
Sets the text for the from editor.

Parameters:
fromText - the new text for the from editor.

getFromText

public String getFromText()

createLinesDiff

public Diff<?> createLinesDiff(int fromStartOffset,
                               int fromEndOffset,
                               int toStartOffset,
                               int toEndOffset)
Creates multiple lines diff.

The string inside the diff instance is only the related rows. The method highlightChangedExactly(java.util.List, int, int, int, int, java.awt.Color, java.awt.Color, String) will consider the offset and get the correct position

Overrides:
createLinesDiff in class BasicDiffPane<CharSequence>
Parameters:
fromStartOffset - from start offset
fromEndOffset - from end offset
toStartOffset - to start offset
toEndOffset - to end offset
Returns:
the Diff instance.
Since:
3.4.0

getFromText

protected Character[] getFromText(int startLineIndex,
                                  int endLineIndex)
Gets the from text for line difference to compare.

Parameters:
startLineIndex - the start line index
endLineIndex - the end line index
Returns:
the Character array for diff.
Since:
3.4.1

getToText

protected Character[] getToText(int startLineIndex,
                                int endLineIndex)
Gets the from text for line difference to compare.

Parameters:
startLineIndex - the start line index
endLineIndex - the end line index
Returns:
the Character array for diff.
Since:
3.4.1

setToText

public void setToText(String toText)
Sets the text for the to editor.

Parameters:
toText - the new text for the to editor.

getToText

public String getToText()

synchronizeViewport

protected void synchronizeViewport(DiffDivider diffDivider,
                                   boolean startFrom)

getSelectedIndex

protected int getSelectedIndex(int paneIndex)
Specified by:
getSelectedIndex in class BasicDiffPane<CharSequence>

installListeners

protected void installListeners()
Description copied from class: AbstractDiffPane
Installs the listeners. Subclass can override this method to install the necessary listeners. This method is called only in the constructor.

Overrides:
installListeners in class BasicDiffPane<CharSequence>

uninstallListeners

protected void uninstallListeners()
Description copied from class: AbstractDiffPane
Uninstalls the listeners. Subclass can override this method to uninstall the necessary listeners. This method has to be invoked explicitly by customers to uninstall all the listeners installed by AbstractDiffPane.installListeners()

Overrides:
uninstallListeners in class BasicDiffPane<CharSequence>

splitString

@Deprecated
protected String[] splitString(String string,
                                          String lineBreak)
Deprecated. replaced by getLineCharSequence(com.jidesoft.editor.CodeEditor, int).

Splits the string with the line break.

This method is no longer being invoked since 3.4.1.

Parameters:
string - the string
lineBreak - the line break

setReadOnly

public void setReadOnly(boolean readOnly)
Sets the read only flag. A read only diff pane will not show the buttons to apply changes.

Overrides:
setReadOnly in class BasicDiffPane<CharSequence>
Parameters:
readOnly - the new read only flag.

clearHighlights

public void clearHighlights()
Overrides:
clearHighlights in class BasicDiffPane<CharSequence>

startHighlights

public void startHighlights()
Overrides:
startHighlights in class BasicDiffPane<CharSequence>

endHighlights

public void endHighlights()
Overrides:
endHighlights in class BasicDiffPane<CharSequence>

highlightChangedExactly

public void highlightChangedExactly(List<Difference> lineDiff,
                                    int fromStartLine,
                                    int fromEndLine,
                                    int toStartLine,
                                    int toEndLine,
                                    Color c,
                                    Color separatorColor,
                                    String changeToolTip)
Overrides:
highlightChangedExactly in class BasicDiffPane<CharSequence>

getDiffTokens

protected DiffTokens getDiffTokens(Segment text)

highlightChanged

public void highlightChanged(int fromStartOffset,
                             int fromEndOffset,
                             int toStartOffset,
                             int toEndOffset,
                             Color c,
                             Color separatorColor,
                             String changeToolTip)
Overrides:
highlightChanged in class BasicDiffPane<CharSequence>

highlightInserted

public void highlightInserted(int fromStartLine,
                              int toStartLine,
                              int toEndLine,
                              Color c,
                              Color separatorColor,
                              String changeToolTip)
Overrides:
highlightInserted in class BasicDiffPane<CharSequence>

highlightDeleted

public void highlightDeleted(int fromStartLine,
                             int fromEndLine,
                             int toStartLine,
                             Color c,
                             Color separatorColor,
                             String changeToolTip)
Overrides:
highlightDeleted in class BasicDiffPane<CharSequence>

acceptDifference

protected List<Difference> acceptDifference(List<Difference> differences,
                                            Difference c)
Accepts the specified Difference and return a new list of Differences.

Overrides:
acceptDifference in class BasicDiffPane<CharSequence>
Parameters:
differences - the list of Differences.
c - the Difference to be accepted.
Returns:
a new list of Differences.

delete

public boolean delete(int toLine,
                      int toNumberOfLines,
                      boolean runDiffAfterward)
Deletes number of lines from the specified started line in the toEditor.

Specified by:
delete in class BasicDiffPane<CharSequence>
Parameters:
toLine - the starting line
toNumberOfLines - the number of lines to be deleted.
runDiffAfterward - true of run the diff() again after deleting the lines.
Returns:
true or false. True means the operation is successful.

insert

public boolean insert(int toLine,
                      int fromLine,
                      int fromNumberOfLines,
                      boolean runDiffAfterward)
Inserts some lines from the fromEditor to the toEditor.

Specified by:
insert in class BasicDiffPane<CharSequence>
Parameters:
toLine - the insersion line in the toEditor
fromLine - the starting line in the fromEditor
fromNumberOfLines - the number of lines in the fromEditor to be inserted to the toEditor.
runDiffAfterward - true of run the diff() again after inserting the lines.
Returns:
true or false. True means the operation is successful.

isIgnoreLeadingTrailingSpaces

@Deprecated
public boolean isIgnoreLeadingTrailingSpaces()
Deprecated. replaced by isIgnoreWhitespaces()

Gets the flag indicating if the leading and trailing spaces should be ignored when comparing two texts.

Returns:
true if leading and trailing spaces should be ignored. Otherwise false.
Since:
3.4.1
See Also:
setIgnoreLeadingTrailingSpaces(boolean)

setIgnoreLeadingTrailingSpaces

@Deprecated
public void setIgnoreLeadingTrailingSpaces(boolean ignoreLeadingTrailingSpaces)
Deprecated. replaced by setIgnoreWhitespaces(boolean)

Sets the flag indicating if the leading and trailing spaces should be ignored when comparing two texts.

By default, the value is false to keep the original behavior.

Parameters:
ignoreLeadingTrailingSpaces - the flag
Since:
3.4.1

JIDE 3.5.15