branch sync-timebundle updated (44c6e82 -> 6649e66)
This is an automated email from the git hooks/post-receive script. New change to branch sync-timebundle in repository jtimer. See https://gitlab.nuiton.org/chorem/jtimer.git from 44c6e82 Remove default input new 1541579 Switch to logback new 4325cc8 Set hidden project visible new e97baf4 Extract json content for debug new 6649e66 Fix idle dialog init The 4 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit 6649e66fe07d80eaa195e35f550e11a68a2f4822 Author: Eric Chatellier <chatellier@codelutin.com> Date: Wed Mar 8 10:34:02 2017 +0100 Fix idle dialog init commit e97baf47b1dac293062793d6ca6618d310bb0380 Author: Eric Chatellier <chatellier@codelutin.com> Date: Wed Mar 8 10:33:47 2017 +0100 Extract json content for debug commit 4325cc85e21736a90eb0767704882bf8c0d6f6fc Author: Eric Chatellier <chatellier@codelutin.com> Date: Wed Mar 8 10:33:29 2017 +0100 Set hidden project visible commit 154157982302b3a6b454c0a2c2ef3ae71a24297f Author: Eric Chatellier <chatellier@codelutin.com> Date: Wed Mar 8 10:33:12 2017 +0100 Switch to logback Summary of changes: pom.xml | 22 +++++++------- .../plugins/timebundle/RemoteSynchronizer.java | 3 +- .../chorem/jtimer/plugins/timebundle/SyncView.java | 1 + .../jtimer/ui/tree/ProjectsAndTasksTree.java | 6 ++-- .../org/chorem/jtimer/ui/tree/TaskTreeModel.java | 14 ++++----- src/main/resources/{log4j2.xml => logback.xml} | 34 +++++++++++----------- 6 files changed, 41 insertions(+), 39 deletions(-) rename src/main/resources/{log4j2.xml => logback.xml} (56%) -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch sync-timebundle in repository jtimer. See https://gitlab.nuiton.org/chorem/jtimer.git commit 154157982302b3a6b454c0a2c2ef3ae71a24297f Author: Eric Chatellier <chatellier@codelutin.com> Date: Wed Mar 8 10:33:12 2017 +0100 Switch to logback --- pom.xml | 22 ++++++++--------- src/main/resources/{log4j2.xml => logback.xml} | 34 +++++++++++++------------- 2 files changed, 27 insertions(+), 29 deletions(-) diff --git a/pom.xml b/pom.xml index 77060af..867be8b 100644 --- a/pom.xml +++ b/pom.xml @@ -126,6 +126,10 @@ <artifactId>commons-primitives</artifactId> </exclusion> <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + <exclusion> <groupId>org.nuiton.i18n</groupId> <artifactId>nuiton-i18n</artifactId> </exclusion> @@ -170,15 +174,14 @@ <scope>compile</scope> </dependency> <dependency> - <groupId>org.apache.logging.log4j</groupId> - <artifactId>log4j-core</artifactId> - <version>2.8.1</version> - <scope>runtime</scope> + <groupId>org.slf4j</groupId> + <artifactId>jcl-over-slf4j</artifactId> + <version>1.7.24</version> </dependency> <dependency> - <groupId>org.apache.logging.log4j</groupId> - <artifactId>log4j-jcl</artifactId> - <version>2.8.1</version> + <groupId>ch.qos.logback</groupId> + <artifactId>logback-classic</artifactId> + <version>1.2.1</version> <scope>runtime</scope> </dependency> <dependency> @@ -207,11 +210,6 @@ <version>3.5</version> </dependency> <dependency> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - <version>1.2</version> - </dependency> - <dependency> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId> <version>2.5</version> diff --git a/src/main/resources/log4j2.xml b/src/main/resources/logback.xml similarity index 56% rename from src/main/resources/log4j2.xml rename to src/main/resources/logback.xml index dd8ab84..bea6507 100644 --- a/src/main/resources/log4j2.xml +++ b/src/main/resources/logback.xml @@ -3,37 +3,37 @@ #%L jTimer %% - Copyright (C) 2016 CodeLutin + Copyright (C) 2017 CodeLutin %% This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/gpl-3.0.html>. #L% --> -<Configuration> +<configuration> - <Appenders> - <Console name="Console" target="SYSTEM_OUT"> - <PatternLayout pattern="%d{yyyy/MM/dd HH:mm:ss} %5p (%c:%L) - %m%n"/> - </Console> - </Appenders> + <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> + <!-- encoders are assigned the type + ch.qos.logback.classic.encoder.PatternLayoutEncoder by default --> + <encoder> + <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern> + </encoder> + </appender> - <Loggers> - <Logger name="org.chorem.jtimer" level="info"/> - <Logger name="org.chorem.jtimer.plugins.timebundle" level="debug"/> + <Logger name="org.chorem.jtimer" level="info"/> + <Logger name="org.chorem.jtimer.plugins.timebundle" level="debug"/> - <Root level="warn"> - <AppenderRef ref="Console"/> - </Root> - </Loggers> -</Configuration> + <root level="warn"> + <appender-ref ref="STDOUT" /> + </root> +</configuration> \ No newline at end of file -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch sync-timebundle in repository jtimer. See https://gitlab.nuiton.org/chorem/jtimer.git commit 4325cc85e21736a90eb0767704882bf8c0d6f6fc Author: Eric Chatellier <chatellier@codelutin.com> Date: Wed Mar 8 10:33:29 2017 +0100 Set hidden project visible --- src/main/java/org/chorem/jtimer/plugins/timebundle/SyncView.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/org/chorem/jtimer/plugins/timebundle/SyncView.java b/src/main/java/org/chorem/jtimer/plugins/timebundle/SyncView.java index 898cabf..6aa348f 100644 --- a/src/main/java/org/chorem/jtimer/plugins/timebundle/SyncView.java +++ b/src/main/java/org/chorem/jtimer/plugins/timebundle/SyncView.java @@ -85,6 +85,7 @@ public class SyncView extends FrameView implements TreeSelectionListener, Window List<RemoteProject> timebundle = getRemoteProjects(); remoteProjectModel = new RemoteTaskTreeModel(timebundle); projectModel = new TaskTreeModel(Collections.singletonList(timerProject)); + projectModel.setShowClosed(true); setComponent(getMainComponent()); -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch sync-timebundle in repository jtimer. See https://gitlab.nuiton.org/chorem/jtimer.git commit e97baf47b1dac293062793d6ca6618d310bb0380 Author: Eric Chatellier <chatellier@codelutin.com> Date: Wed Mar 8 10:33:47 2017 +0100 Extract json content for debug --- .../java/org/chorem/jtimer/plugins/timebundle/RemoteSynchronizer.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/chorem/jtimer/plugins/timebundle/RemoteSynchronizer.java b/src/main/java/org/chorem/jtimer/plugins/timebundle/RemoteSynchronizer.java index 2d76ad5..cf9102d 100644 --- a/src/main/java/org/chorem/jtimer/plugins/timebundle/RemoteSynchronizer.java +++ b/src/main/java/org/chorem/jtimer/plugins/timebundle/RemoteSynchronizer.java @@ -135,7 +135,8 @@ public class RemoteSynchronizer { RemoteProject project = null; try { - JSONObject json = new JSONObject(IOUtils.toString(new URL(url), Charset.forName("UTF-8"))); + String source = IOUtils.toString(new URL(url), Charset.forName("UTF-8")); + JSONObject json = new JSONObject(source); JSONObject jsonProject = json.getJSONObject("project"); JSONObject jsonTasks = json.getJSONObject("tasks"); -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch sync-timebundle in repository jtimer. See https://gitlab.nuiton.org/chorem/jtimer.git commit 6649e66fe07d80eaa195e35f550e11a68a2f4822 Author: Eric Chatellier <chatellier@codelutin.com> Date: Wed Mar 8 10:34:02 2017 +0100 Fix idle dialog init --- .../org/chorem/jtimer/ui/tree/ProjectsAndTasksTree.java | 6 ++++-- src/main/java/org/chorem/jtimer/ui/tree/TaskTreeModel.java | 14 +++++++------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/main/java/org/chorem/jtimer/ui/tree/ProjectsAndTasksTree.java b/src/main/java/org/chorem/jtimer/ui/tree/ProjectsAndTasksTree.java index b77c02d..b53016e 100644 --- a/src/main/java/org/chorem/jtimer/ui/tree/ProjectsAndTasksTree.java +++ b/src/main/java/org/chorem/jtimer/ui/tree/ProjectsAndTasksTree.java @@ -27,6 +27,7 @@ import org.chorem.jtimer.entities.TimerTaskHelper; import javax.swing.JTree; import javax.swing.tree.TreePath; +import java.util.ArrayList; import java.util.List; /** @@ -50,8 +51,9 @@ public class ProjectsAndTasksTree extends JTree { */ public void setSelectedTask(TimerTask task) { // compute task tree path - List<TimerTask> components = TimerTaskHelper.getPathFromParent(task); - components.add(0, (TimerTask) getModel().getRoot()); + List<Object> components = new ArrayList<>(); + components.add(getModel().getRoot()); + components.addAll(TimerTaskHelper.getPathFromParent(task)); // select tree path in reverse order (from root to leaf) TreePath path = new TreePath(components.toArray()); diff --git a/src/main/java/org/chorem/jtimer/ui/tree/TaskTreeModel.java b/src/main/java/org/chorem/jtimer/ui/tree/TaskTreeModel.java index 8808349..8ef3be7 100644 --- a/src/main/java/org/chorem/jtimer/ui/tree/TaskTreeModel.java +++ b/src/main/java/org/chorem/jtimer/ui/tree/TaskTreeModel.java @@ -54,7 +54,7 @@ public class TaskTreeModel implements TreeModel { protected TreeModelSupport modelSupport; /** Tree data root. */ - protected List<TimerProject> root; + protected List<TimerProject> projects; /** Show closed tasks. */ protected boolean showClosed; @@ -70,7 +70,7 @@ public class TaskTreeModel implements TreeModel { } public TaskTreeModel(List<TimerProject> projects) { - root = projects; + this.projects = projects; modelSupport = new TreeModelSupport(this); } @@ -112,8 +112,8 @@ public class TaskTreeModel implements TreeModel { List<TimerTask> result = new ArrayList<>(); // get correct list - if (parent == root) { // case root node - result.addAll(root); + if (parent == getRoot()) { // case root node + result.addAll(projects); } else { // not root node TimerTask task = (TimerTask) parent; result.addAll(task.getSubTasks()); @@ -134,8 +134,8 @@ public class TaskTreeModel implements TreeModel { @Override public int getIndexOfChild(Object parent, Object child) { - int count = getChildrenFor(parent).indexOf(parent); - return count; + int index = getChildrenFor(parent).indexOf(parent); + return index; } @Override @@ -150,7 +150,7 @@ public class TaskTreeModel implements TreeModel { @Override public Object getRoot() { - return root; + return this; } @Override -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm