This repository was archived by the owner on Apr 15, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +21
-10
lines changed
src/main/java/com/tagmycode/plugin/gui/form Expand file tree Collapse file tree 4 files changed +21
-10
lines changed Original file line number Diff line number Diff line change 11language : java
22
33before_install :
4+ - ./install_dependencies.sh
45 - " export DISPLAY=:99.0"
56 - " sh -e /etc/init.d/xvfb start"
67
@@ -14,6 +15,7 @@ notifications:
1415branches :
1516 only :
1617 - master
18+ - develop
1719
1820after_success :
1921 - mvn clean cobertura:cobertura coveralls:report
Original file line number Diff line number Diff line change 2323 <artifactId >maven-compiler-plugin</artifactId >
2424 <version >3.1</version >
2525 <configuration >
26- <source >1.7 </source >
27- <target >1.7 </target >
26+ <source >1.8 </source >
27+ <target >1.8 </target >
2828 </configuration >
2929 </plugin >
3030 </plugins >
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ set -e
3+
4+ sdk_project=" tagmycode-java-sdk"
5+ branch=$( git branch | grep \* | cut -d ' ' -f2)
6+
7+ rm -fr ${sdk_project}
8+
9+ echo " Installing ${sdk_project} , branch ${branch} "
10+
11+ git clone https://github.com/massimozappino/${sdk_project} .git
12+ cd ${sdk_project}
13+ git checkout ${branch}
14+ mvn install -DskipTests
Original file line number Diff line number Diff line change 77import com .tagmycode .sdk .model .Snippet ;
88
99import javax .swing .*;
10- import java .io . UnsupportedEncodingException ;
10+ import java .nio . charset . StandardCharsets ;
1111import java .text .DateFormat ;
1212import java .util .Date ;
1313import java .util .Locale ;
@@ -25,7 +25,7 @@ public class PropertiesForm extends Windowable {
2525 private JCheckBox synchronizedCheckBox ;
2626 private Snippet snippet ;
2727
28- public PropertiesForm (Framework framework , Snippet snippet ) {
28+ PropertiesForm (Framework framework , Snippet snippet ) {
2929 super (framework , framework .getParentFrame ());
3030 this .snippet = snippet ;
3131 defaultInitWindow ();
@@ -40,15 +40,10 @@ private void populateFields() {
4040 createdAtTextField .setText (dateAndTime (snippet .getCreationDate ()));
4141 modifiedAtTextField .setText (dateAndTime (snippet .getUpdateDate ()));
4242 snippetUrlTextField .setText (snippet .getUrl ());
43- int bytes = 0 ;
44- try {
45- bytes = snippet .getCode ().getBytes ("UTF-8" ).length ;
46- } catch (UnsupportedEncodingException ignored ) {
47- }
43+ int bytes = snippet .getCode ().getBytes (StandardCharsets .UTF_8 ).length ;
4844 codeSizeTextField .setText (FileSize .toHumanReadable (bytes ));
4945 privateCheckBox .setSelected (snippet .isPrivate ());
5046 synchronizedCheckBox .setSelected (!snippet .isDirty ());
51-
5247 }
5348
5449 private String dateAndTime (Date date ) {
You can’t perform that action at this time.
0 commit comments