void toggleRectangularSelectionEnabled() { setRectangularSelectionEnabled(!rectangularSelectionMode); if(view.getStatus() != null) { view.getStatus().setMessageAndClear( jEdit.getProperty("view.status.rect-select-changed", new Integer[] { new Integer(rectangularSelectionMode ? 1 : 0) })); } } //}}} //{{{ setRectangularSelectionEnabled() method /** * Set rectangular selection on or off according to the value of * <code>rectangularSelectionMode</code>. This only affects the ability * to make multiple selections from the keyboard. A rectangular * selection can always be created by dragging with the mouse by holding * down <b>Control</b>, regardless of the state of this flag. * * @param rectangularSelectionMode Should rectangular selection be * enabled? * @since jEdit 4.2pre1 */ public final void setRectangularSelectionEnabled( boolean rectangularSelectionMode) { this.rectangularSelectionMode = rectangularSelectionMode; if(view.getStatus() != null) view.getStatus().updateMiscStatus(); painter.repaint(); }
void toggleMultipleSelectionEnabled() { setMultipleSelectionEnabled(!multi); if(view.getStatus() != null) { view.getStatus().setMessageAndClear( jEdit.getProperty("view.status.multi-changed", new Integer[] { new Integer(multi ? 1 : 0) })); } } //}}} //{{{ setMultipleSelectionEnabled() method /** * Set multiple selection on or off according to the value of * <code>multi</code>. This only affects the ability to * make multiple selections in the user interface; macros and plugins * can manipulate them regardless of the setting of this flag. In fact, * in most cases, calling this method should not be necessary. * * @param multi Should multiple selection be enabled? * @since jEdit 3.2pre1 */ public final void setMultipleSelectionEnabled(boolean multi) { this.multi = multi; if(view.getStatus() != null) view.getStatus().updateMiscStatus(); painter.repaint(); }
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/textarea/JEditTextArea.java File path: /jEdit-4.2/src/org/gjt/sp/jedit/textarea/JEditTextArea.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
void toggleRectangularSelectionEnabled()
1
void toggleMultipleSelectionEnabled()
2
	{
2
	{
3
		setRectangularSelectionEnabled(!rectangularSelectionMode);
3
		setMultipleSelectionEnabled(!multi);
4
		if(view.getStatus() != null)
4
		if(view.getStatus() != null)
5
		{
5
		{
6
			view.getStatus().setMessageAndClear(
6
			view.getStatus().setMessageAndClear(
7
				jEdit.getProperty("view.status.rect-select-changed",
7
				jEdit.getProperty("view.status.multi-changed",
8
				new Integer[] { new Integer(rectangularSelectionMode ? 1 : 0) }));
8
				new Integer[] { new Integer(multi ? 1 : 0) }));
9
		}
9
		}
10
	} //}}}
10
	} //}}}
11
	//{{{ setRectangularSelectionEnabled() method
11
	//{{{ setMultipleSelectionEnabled() method
12
	/**
12
	/**
13
	 * Set rectangular selection on or off according to the value of
13
	 * Set multiple selection on or off according to the value of
14
	 * <code>rectangularSelectionMode</code>. This only affects the ability
14
	 * <code>multi</code>. This only affects the ability to
15
	 * to make multiple selections from the keyboard. A rectangular
15
	 * make multiple selections in the 
16
	 * selection can always be created by dragging with the mouse by holding
17
	 * down <b>Control</b>, regardless of the state of this flag.
18
	 *
19
	 * @param rectangularSelectionMode Should rectangular
16
user interface; macros and plugins
17
	 * can manipulate them regardless of the setting of this flag. In fact,
18
	 * in most cases, calling this method should not be necessary.
19
	 *
20
 selection be
20
	 * @param multi Should multiple selection be
21
	 * enabled?
21
 enabled?
22
	 * @since jEdit 4.2pre1
22
	 * @since jEdit 3.2pre1
23
	 */
23
	 */
24
	public final void setRectangularSelectionEnabled(
24
	public final void setMultipleSelectionEnabled(
25
		boolean rectangularSelectionMode)
25
boolean 
26
	{
27
		this.rectangularSelectionMode = rectangularSelectionMode
26
multi)
27
	{
28
;
28
		this.multi = multi;
29
		if(view.getStatus() != null)
29
		if(view.getStatus() != null)
30
			view.getStatus().updateMiscStatus();
30
			view.getStatus().updateMiscStatus();
31
		painter.repaint();
31
		painter.repaint();
32
	}
32
	}
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones location
Number of node comparisons0