Skip to content
This repository was archived by the owner on Apr 15, 2023. It is now read-only.

Commit c4edd12

Browse files
Use tagmycode-sdk v1.3.1
1 parent 2fdf189 commit c4edd12

File tree

6 files changed

+23
-24
lines changed

6 files changed

+23
-24
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
<properties>
1414
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
15-
<tagmycode-sdk.version>1.3.0-SNAPSHOT</tagmycode-sdk.version>
15+
<tagmycode-sdk.version>1.3.1</tagmycode-sdk.version>
1616
<buildDate>${maven.build.timestamp}</buildDate>
1717
<maven.build.timestamp.format>yyyy-MM-dd</maven.build.timestamp.format>
1818
</properties>

src/main/java/com/tagmycode/plugin/AbstractVersion.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,5 @@ public String getFrameworkBuildDate() {
3030

3131
public abstract String getPluginVersion();
3232

33-
public String getPluginTitle() {
34-
return "";
35-
}
33+
public abstract String getPluginTitle();
3634
}

src/main/java/com/tagmycode/plugin/UserPreferences.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66
public class UserPreferences {
77
public static final String TOGGLE_FILTER_BUTTON_SELECTED = "toggle_filter_button_selected";
8-
private Properties properties;
9-
private File propertyFile;
8+
private final Properties properties;
9+
private final File propertyFile;
1010

1111
public UserPreferences(File propertyFile) {
1212
properties = new Properties();

src/test/java/acceptance/SyncSnippetsAcceptanceTest.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,4 @@ private void enableNetworking() {
249249
framework.getMainWindow().getSnippetsPanel().setNetworkingEnabled(true);
250250
}
251251

252-
private void showFrameworkGui() throws Exception {
253-
showComponentInFrame(framework.getMainWindow().getMainComponent());
254-
}
255252
}

src/test/java/com/tagmycode/plugin/gui/form/SnippetsPanelTest.java

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
import javax.swing.*;
1111
import java.awt.*;
1212

13-
import static org.junit.Assert.assertEquals;
14-
import static org.junit.Assert.assertTrue;
13+
import static org.junit.Assert.*;
1514
import static org.mockito.Mockito.spy;
1615

1716
public class SnippetsPanelTest extends AbstractTestBase {
@@ -34,11 +33,11 @@ public void testSelection() throws Exception {
3433
Framework framework = createFramework();
3534
framework.restoreData();
3635

37-
SnippetsPanel snippetsTab = new SnippetsPanel(framework);
38-
SnippetsTable snippetsTable = snippetsTab.getSnippetsTable();
36+
SnippetsPanel snippetsPanel = new SnippetsPanel(framework);
37+
SnippetsTable snippetsTable = snippetsPanel.getSnippetsTable();
3938

4039
snippetsTable.fireSnippetsChanged();
41-
JPanel snippetViewFormPanel = snippetsTab.getSnippetViewFormPane();
40+
JPanel snippetViewFormPanel = snippetsPanel.getSnippetViewFormPane();
4241
JTable jTable = snippetsTable.getJTable();
4342

4443
assertEquals(1, snippetViewFormPanel.getComponentCount());
@@ -54,11 +53,11 @@ public void testSelection() throws Exception {
5453

5554
@Test
5655
public void disableEnableButtonsForSnippet() throws Exception {
57-
SnippetsPanel snippetsTab = new SnippetsPanel(createFramework(createStorageEngineWithData()));
58-
snippetsTab.disableButtonsForSnippet();
59-
assertSnippetButtonsEnabledAre(snippetsTab, false);
60-
snippetsTab.enableButtonsForSnippet();
61-
assertSnippetButtonsEnabledAre(snippetsTab, true);
56+
SnippetsPanel snippetsPanel = new SnippetsPanel(createFramework(createStorageEngineWithData()));
57+
snippetsPanel.disableButtonsForSnippet();
58+
assertSnippetButtonsEnabledAre(snippetsPanel, false);
59+
snippetsPanel.enableButtonsForSnippet();
60+
assertSnippetButtonsEnabledAre(snippetsPanel, true);
6261
}
6362

6463
@Test
@@ -72,11 +71,11 @@ public void testCreateEmptySnippet() throws Exception {
7271
assertEquals(expectedSnippet, framework.getData().createEmptySnippetWithLastLanguage());
7372
}
7473

75-
private void assertSnippetButtonsEnabledAre(SnippetsPanel snippetsTab, boolean flag) {
76-
assertEquals(flag, snippetsTab.editSnippetButton.isEnabled());
77-
assertEquals(flag, snippetsTab.deleteSnippetButton.isEnabled());
78-
assertEquals(flag, snippetsTab.copyButton.isEnabled());
79-
assertEquals(flag, snippetsTab.openInBrowser.isEnabled());
74+
private void assertSnippetButtonsEnabledAre(SnippetsPanel snippetsPanel, boolean flag) {
75+
assertEquals(flag, snippetsPanel.editSnippetButton.isEnabled());
76+
assertEquals(flag, snippetsPanel.deleteSnippetButton.isEnabled());
77+
assertEquals(flag, snippetsPanel.copyButton.isEnabled());
78+
assertEquals(flag, snippetsPanel.openInBrowser.isEnabled());
8079
}
8180

8281
}

src/test/java/support/FakeVersion.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,9 @@ public class FakeVersion extends AbstractVersion {
88
public String getPluginVersion() {
99
return "FAKE";
1010
}
11+
12+
@Override
13+
public String getPluginTitle() {
14+
return "Fake title";
15+
}
1116
}

0 commit comments

Comments
 (0)