TamperingMouseAdapter.java

1
package com.jsql.view.swing.panel.preferences.listener;
2
3
import com.jsql.util.tampering.TamperingType;
4
import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea;
5
6
import java.awt.event.MouseAdapter;
7
import java.awt.event.MouseEvent;
8
9
public class TamperingMouseAdapter extends MouseAdapter {
10
    
11
    private final TamperingType tampering;
12
    private final RSyntaxTextArea textPaneEval;
13
    private String eval = null;
14
    
15
    public TamperingMouseAdapter(TamperingType tampering, RSyntaxTextArea textPaneEval) {
16
        this.tampering = tampering;
17
        this.textPaneEval = textPaneEval;
18
    }
19
    
20
    @Override
21
    public void mouseEntered(MouseEvent me) {
22
        this.eval = this.textPaneEval.getText();
23 1 1. mouseEntered : removed call to org/fife/ui/rsyntaxtextarea/RSyntaxTextArea::setText → NO_COVERAGE
        this.textPaneEval.setText(this.tampering.instance().getJavascript().trim());
24 1 1. mouseEntered : removed call to org/fife/ui/rsyntaxtextarea/RSyntaxTextArea::setCaretPosition → NO_COVERAGE
        this.textPaneEval.setCaretPosition(0);
25
    }
26
27
    @Override
28
    public void mouseExited(MouseEvent e) {
29 1 1. mouseExited : removed call to org/fife/ui/rsyntaxtextarea/RSyntaxTextArea::setText → NO_COVERAGE
        this.textPaneEval.setText(this.eval);
30 1 1. mouseExited : removed call to org/fife/ui/rsyntaxtextarea/RSyntaxTextArea::setCaretPosition → NO_COVERAGE
        this.textPaneEval.setCaretPosition(0);
31
    }
32
    
33
    @Override
34
    public void mouseClicked(MouseEvent e) {
35
        this.eval = this.tampering.instance().getJavascript().trim();
36 1 1. mouseClicked : removed call to org/fife/ui/rsyntaxtextarea/RSyntaxTextArea::setText → NO_COVERAGE
        this.textPaneEval.setText(this.eval);
37 1 1. mouseClicked : removed call to org/fife/ui/rsyntaxtextarea/RSyntaxTextArea::setCaretPosition → NO_COVERAGE
        this.textPaneEval.setCaretPosition(0);
38
    }
39
}

Mutations

23

1.1
Location : mouseEntered
Killed by : none
removed call to org/fife/ui/rsyntaxtextarea/RSyntaxTextArea::setText → NO_COVERAGE

24

1.1
Location : mouseEntered
Killed by : none
removed call to org/fife/ui/rsyntaxtextarea/RSyntaxTextArea::setCaretPosition → NO_COVERAGE

29

1.1
Location : mouseExited
Killed by : none
removed call to org/fife/ui/rsyntaxtextarea/RSyntaxTextArea::setText → NO_COVERAGE

30

1.1
Location : mouseExited
Killed by : none
removed call to org/fife/ui/rsyntaxtextarea/RSyntaxTextArea::setCaretPosition → NO_COVERAGE

36

1.1
Location : mouseClicked
Killed by : none
removed call to org/fife/ui/rsyntaxtextarea/RSyntaxTextArea::setText → NO_COVERAGE

37

1.1
Location : mouseClicked
Killed by : none
removed call to org/fife/ui/rsyntaxtextarea/RSyntaxTextArea::setCaretPosition → NO_COVERAGE

Active mutators

Tests examined


Report generated by PIT 1.19.1