1 | package com.jsql.view.swing.action; | |
2 | ||
3 | import com.jsql.util.I18nUtil; | |
4 | import com.jsql.view.swing.tab.TabHeader; | |
5 | import com.jsql.view.swing.util.MediatorHelper; | |
6 | ||
7 | import javax.swing.*; | |
8 | import java.awt.*; | |
9 | import java.awt.event.ActionEvent; | |
10 | ||
11 | public class ActionCloseTabResult extends AbstractAction { | |
12 | | |
13 | @Override | |
14 | public void actionPerformed(ActionEvent e) { | |
15 |
1
1. actionPerformed : removed call to com/jsql/view/swing/action/ActionCloseTabResult::perform → NO_COVERAGE |
ActionCloseTabResult.perform(MediatorHelper.tabResults().getSelectedIndex()); |
16 | } | |
17 | | |
18 | public static void perform(int closeTabNumber) { | |
19 |
2
1. perform : negated conditional → NO_COVERAGE 2. perform : changed conditional boundary → NO_COVERAGE |
if (MediatorHelper.tabResults().getTabCount() > 0) { |
20 | | |
21 | var tab = MediatorHelper.tabResults().getTabComponentAt(closeTabNumber); | |
22 | | |
23 | // Stop syntax color highlighter | |
24 |
1
1. perform : negated conditional → NO_COVERAGE |
if ( |
25 | tab instanceof TabHeader | |
26 |
1
1. perform : negated conditional → NO_COVERAGE |
&& ((TabHeader) tab).getCleanableTab() != null |
27 | ) { | |
28 |
1
1. perform : removed call to com/jsql/view/swing/tab/TabHeader$Cleanable::clean → NO_COVERAGE |
((TabHeader) tab).getCleanableTab().clean(); |
29 | } | |
30 | ||
31 |
1
1. perform : removed call to com/jsql/view/swing/tab/TabResults::removeTabAt → NO_COVERAGE |
MediatorHelper.tabResults().removeTabAt(closeTabNumber); |
32 | | |
33 |
1
1. perform : removed call to com/jsql/view/swing/action/ActionCloseTabResult::displayPlaceholder → NO_COVERAGE |
ActionCloseTabResult.displayPlaceholder(); |
34 | } | |
35 | } | |
36 | | |
37 | private static void displayPlaceholder() { | |
38 |
1
1. displayPlaceholder : negated conditional → NO_COVERAGE |
if (MediatorHelper.tabResults().getTabCount() == 0) { |
39 | | |
40 | var splitPaneTopBottom = MediatorHelper.frame().getSplitHorizontalTopBottom(); | |
41 | JSplitPane splitPaneLeftRight = splitPaneTopBottom.getSplitVerticalLeftRight(); | |
42 | | |
43 | int i = splitPaneLeftRight.getDividerLocation(); | |
44 | | |
45 |
1
1. displayPlaceholder : negated conditional → NO_COVERAGE |
if (ComponentOrientation.LEFT_TO_RIGHT.equals(ComponentOrientation.getOrientation(I18nUtil.getLocaleDefault()))) { |
46 |
1
1. displayPlaceholder : removed call to javax/swing/JSplitPane::setRightComponent → NO_COVERAGE |
splitPaneLeftRight.setRightComponent( |
47 | splitPaneTopBottom.getLabelPlaceholderResult() | |
48 | ); | |
49 | } else { | |
50 |
1
1. displayPlaceholder : removed call to javax/swing/JSplitPane::setLeftComponent → NO_COVERAGE |
splitPaneLeftRight.setLeftComponent( |
51 | splitPaneTopBottom.getLabelPlaceholderResult() | |
52 | ); | |
53 | } | |
54 | | |
55 |
1
1. displayPlaceholder : removed call to javax/swing/JSplitPane::setDividerLocation → NO_COVERAGE |
splitPaneLeftRight.setDividerLocation(i); |
56 | } | |
57 | } | |
58 | } | |
Mutations | ||
15 |
1.1 |
|
19 |
1.1 2.2 |
|
24 |
1.1 |
|
26 |
1.1 |
|
28 |
1.1 |
|
31 |
1.1 |
|
33 |
1.1 |
|
38 |
1.1 |
|
45 |
1.1 |
|
46 |
1.1 |
|
50 |
1.1 |
|
55 |
1.1 |