public class RedoAction extends SquirrelAction
{
private UndoManager _undo;
public RedoAction(IApplication app, UndoManager undo)
{
super(app);
if(undo == null) throw new IllegalArgumentException("UndoManager == null");
_undo = undo;
}
/*
* @see ActionListener#actionPerformed(ActionEvent)
*/
public void actionPerformed(ActionEvent e)
{
if(_undo.canRedo()) _undo.redo()
public class UndoAction extends SquirrelAction
{
private UndoManager _undo;
public UndoAction(IApplication app, UndoManager undo)
{
super(app);
if (undo == null)
{
throw new IllegalArgumentException("UndoManager == null");
}
_undo = undo;
}
/*
* @see ActionListener#actionPerformed(ActionEvent)
*/
public void actionPerformed(ActionEvent e)
{
if (_undo.canUndo())
{
_undo.undo()
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/action/RedoAction.java
|
|
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/action/UndoAction.java
|
Method name:
|
|
Method name:
|
Number of AST nodes: 0
|
|
Number of AST nodes: 0
|
|
1 | public class RedoAction extends SquirrelAction↵ | | 1 | public class UndoAction extends SquirrelAction↵
|
2 | {↵ | | 2 | {↵
|
3 | private UndoManager _undo;↵ | | 3 | private UndoManager _undo;↵
|
|
4 | public RedoAction(IApplication app, UndoManager undo)↵ | | 4 | public UndoAction(IApplication app, UndoManager undo)↵
|
5 | {↵ | | 5 | {↵
|
6 | super(app);↵ | | 6 | super(app);↵
|
7 | if(undo == null) ↵ | | 7 | if (undo == null)↵
|
| | | 8 | {↵
|
8 | throw new IllegalArgumentException("UndoManager == null");↵ | | 9 | throw new IllegalArgumentException("UndoManager == null");↵
|
9 | ↵ | | 10 | }↵
|
10 | _undo = undo;↵ | | 11 | _undo = undo;↵
|
11 | }↵ | | 12 | }↵
|
12 | /*↵ | | 13 | /*↵
|
13 | * @see ActionListener#actionPerformed(ActionEvent)↵ | | 14 | * @see ActionListener#actionPerformed(ActionEvent)↵
|
14 | */↵ | | 15 | */↵
|
15 | public void actionPerformed(ActionEvent e)↵ | | 16 | public void actionPerformed(ActionEvent e)↵
|
16 | {↵ | | 17 | {↵
|
17 | if(_undo.canRedo()) ↵ | | 18 | if (_undo.canUndo())↵
|
| | | 19 | {↵
|
18 | _undo.redo() | | 20 | _undo.undo()
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 0 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | |
Number of node comparisons | 0 |