branch develop updated (b3d6b88 -> d2698ac)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository jtimer. See https://gitlab.nuiton.org/chorem/jtimer.git from b3d6b88 Prepare 1.6-alpha-1 release new d2698ac Cleanup The 1 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 d2698acfb6f4a09948ed4c2b0398846e3f611b97 Author: Eric Chatellier <chatellier@codelutin.com> Date: Mon Jul 25 16:09:58 2016 +0200 Cleanup Summary of changes: src/main/java/org/chorem/jtimer/JTimer.java | 1 + .../org/chorem/jtimer/data/DataEventListener.java | 10 +- .../java/org/chorem/jtimer/entities/TimerTask.java | 104 +++++++++++---------- .../chorem/jtimer/io/GTimerIncrementalSaver.java | 1 - src/main/java/org/chorem/jtimer/ui/StatusBar.java | 4 +- .../chorem/jtimer/ui/systray/SystrayManager.java | 5 - .../jtimer/ui/treetable/ProjectsAndTasksModel.java | 3 - .../jtimer/io/GTimerIncrementalSaverTest.java | 1 + 8 files changed, 59 insertions(+), 70 deletions(-) -- 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 develop in repository jtimer. See https://gitlab.nuiton.org/chorem/jtimer.git commit d2698acfb6f4a09948ed4c2b0398846e3f611b97 Author: Eric Chatellier <chatellier@codelutin.com> Date: Mon Jul 25 16:09:58 2016 +0200 Cleanup --- src/main/java/org/chorem/jtimer/JTimer.java | 1 + .../org/chorem/jtimer/data/DataEventListener.java | 10 +- .../java/org/chorem/jtimer/entities/TimerTask.java | 104 +++++++++++---------- .../chorem/jtimer/io/GTimerIncrementalSaver.java | 1 - src/main/java/org/chorem/jtimer/ui/StatusBar.java | 4 +- .../chorem/jtimer/ui/systray/SystrayManager.java | 5 - .../jtimer/ui/treetable/ProjectsAndTasksModel.java | 3 - .../jtimer/io/GTimerIncrementalSaverTest.java | 1 + 8 files changed, 59 insertions(+), 70 deletions(-) diff --git a/src/main/java/org/chorem/jtimer/JTimer.java b/src/main/java/org/chorem/jtimer/JTimer.java index 5ca6508..3981915 100644 --- a/src/main/java/org/chorem/jtimer/JTimer.java +++ b/src/main/java/org/chorem/jtimer/JTimer.java @@ -661,6 +661,7 @@ public class JTimer extends SingleFrameApplication implements TimerTaskEditor editor = new TimerTaskEditor(this, task, core); show(editor); } + /** * Update task. * Enabled when a task is selected diff --git a/src/main/java/org/chorem/jtimer/data/DataEventListener.java b/src/main/java/org/chorem/jtimer/data/DataEventListener.java index a14f25f..8d20530 100644 --- a/src/main/java/org/chorem/jtimer/data/DataEventListener.java +++ b/src/main/java/org/chorem/jtimer/data/DataEventListener.java @@ -190,6 +190,7 @@ public interface DataEventListener extends EventListener { default void dataLoaded(Collection<TimerProject> projects) { } + /** * SyncInfo changed * @param task TimerTask @@ -205,14 +206,7 @@ public interface DataEventListener extends EventListener { * @param syncInfo SyncInfo */ default void syncInfoDeleted(TimerTask task, SyncInfo syncInfo) { + } -// /** -// * Task synchronized -// * @param task TimerTask -// * @param syncInfo SyncInfo -// */ -// default void taskSynchronized(TimerTask task, SyncInfo syncInfo) { -// -// } } diff --git a/src/main/java/org/chorem/jtimer/entities/TimerTask.java b/src/main/java/org/chorem/jtimer/entities/TimerTask.java index 839e793..91fd2f3 100644 --- a/src/main/java/org/chorem/jtimer/entities/TimerTask.java +++ b/src/main/java/org/chorem/jtimer/entities/TimerTask.java @@ -34,10 +34,10 @@ import org.chorem.jtimer.utils.DailySortedMap; /** * Represents a task. - * + * * @author chatellier * @version $Revision$ - * + * * Last update : $Date$ * By : $Author$ */ @@ -73,12 +73,12 @@ public class TimerTask implements Cloneable, */ protected SortedMap<Date, Long> allDaysTimes; - /** + /** * Map date -> annotation text. */ protected SortedMap<Date, String> allDaysAnnotations; - /** + /** * Sub tasks. */ protected List<TimerTask> subTasks; @@ -92,6 +92,7 @@ public class TimerTask implements Cloneable, * Synchronization Info */ protected List<SyncInfo> synchronisingInfoList; + /** * Constructor. */ @@ -108,7 +109,7 @@ public class TimerTask implements Cloneable, /** * Constructor with name. - * + * * @param name task name */ public TimerTask(String name) { @@ -118,7 +119,7 @@ public class TimerTask implements Cloneable, /** * Get task number. - * + * * @return the number */ public int getNumber() { @@ -127,7 +128,7 @@ public class TimerTask implements Cloneable, /** * Set task number. - * + * * @param number the number to set */ public void setNumber(int number) { @@ -136,7 +137,7 @@ public class TimerTask implements Cloneable, /** * Get task name. - * + * * @return the name */ public String getName() { @@ -145,7 +146,7 @@ public class TimerTask implements Cloneable, /** * Set task name. - * + * * @param name the name to set */ public void setName(String name) { @@ -154,7 +155,7 @@ public class TimerTask implements Cloneable, /** * Get task creation date. - * + * * @return task creation date */ public Date getCreationDate() { @@ -163,7 +164,7 @@ public class TimerTask implements Cloneable, /** * Set task creation date. - * + * * @param creationDate creation date */ public void setCreationDate(Date creationDate) { @@ -172,7 +173,7 @@ public class TimerTask implements Cloneable, /** * Get closed task state. - * + * * @return <tt>true</tt> if task is closed */ public boolean isClosed() { @@ -181,7 +182,7 @@ public class TimerTask implements Cloneable, /** * Set closed. - * + * * @param closed closed */ public void setClosed(boolean closed) { @@ -190,9 +191,9 @@ public class TimerTask implements Cloneable, /** * Get parent. - * + * * Can be null if there is no parent. - * + * * @return the parent */ public TimerTask getParent() { @@ -201,7 +202,7 @@ public class TimerTask implements Cloneable, /** * Set parent. - * + * * @param parent the parent to set */ protected void setParent(TimerTask parent) { @@ -215,7 +216,7 @@ public class TimerTask implements Cloneable, /** * Get task's subtasks. - * + * * @return the subTasks */ public List<TimerTask> getSubTasks() { @@ -225,31 +226,33 @@ public class TimerTask implements Cloneable, /** * Get task's last sync time associated to the url * If there is no last sync, will return a very far past time + * * @param urlString the url to get the last sync from * @return the date of the sync */ public Date getLastSync(String urlString) { //to avoid null, a default time to return if errors Date resultTime = new Date(0); - if (!synchronisingInfoList.isEmpty()) { - for(SyncInfo sync : synchronisingInfoList) { - if (urlString.equals(sync.getSyncURL())) { - resultTime = sync.lastSync; - } + if (!synchronisingInfoList.isEmpty()) { + for (SyncInfo sync : synchronisingInfoList) { + if (urlString.equals(sync.getSyncURL())) { + resultTime = sync.lastSync; } } - return resultTime; } + return resultTime; + } /** * Sets task's last sync time on one url * (if the url doesn't exist in the task's sync info, adds it) + * * @param syncDate : date of the sync - * @param syncURL : the url that has a change of syncdate + * @param syncURL : the url that has a change of syncdate */ public void setLastSync(Date syncDate, String syncURL) { boolean urlinList = false; - if(!synchronisingInfoList.isEmpty()) { + if (!synchronisingInfoList.isEmpty()) { for (SyncInfo sync : synchronisingInfoList) { if (sync.syncURL.equals(syncURL)) { sync.setLastSync(syncDate); @@ -265,6 +268,7 @@ public class TimerTask implements Cloneable, /** * Get task's sync URL List * returns an empty list if there is no info + * * @return the URL List */ public List<String> getSynchronizingURLList() { @@ -279,6 +283,7 @@ public class TimerTask implements Cloneable, /** * Returns only the URLs that are active + * * @return a List<String> with only active urls */ public List<String> getActiveSynchronizingURLList() { @@ -296,24 +301,29 @@ public class TimerTask implements Cloneable, /** * Adds a new synchronization info if the url isn't already present in the list * sync activity true by default, annotations false by default - * @param url a string + * + * @param url a string * @param time a LocalDateTime */ public void addSyncInfo(String url, Date time) { if (!url.isEmpty() && !getSynchronizingURLList().contains(url)) { - synchronisingInfoList.add(new SyncInfo(url, time, true, false)); + synchronisingInfoList.add(new SyncInfo(url, time, true, false)); } } /** * Adds a new synchronization info with just url provided * (default isActive = true and isWithAnnotations false) + * * @param url a String */ - public void addSyncInfo(String url) { addSyncInfo(url, new Date(0)); } + public void addSyncInfo(String url) { + addSyncInfo(url, new Date(0)); + } /** * Adds a SyncInfo to the task + * * @param info a SyncInfo */ @@ -326,8 +336,8 @@ public class TimerTask implements Cloneable, /** * Removes a synchronization info attached to a url if it exists - * @param info : the sync info to remove * + * @param info : the sync info to remove */ public void removeSyncInfo(SyncInfo info) { synchronisingInfoList.remove(info); @@ -335,6 +345,7 @@ public class TimerTask implements Cloneable, /** * Returns all the synchronization info as a List + * * @return a list of TimerTask.SyncInfo */ public List<SyncInfo> getSynchronizingInfoList() { @@ -345,6 +356,7 @@ public class TimerTask implements Cloneable, /** * Returns the sync info matching a url * (if the url is not in the list, returns a new SyncInfo with the url and adds it to the list) + * * @param urlString * @return a SyncInfo matching the url */ @@ -362,6 +374,7 @@ public class TimerTask implements Cloneable, /** * sets the activity of a sync info + * * @param isActive a boolean * @param syncInfo the SyncInfo */ @@ -371,9 +384,9 @@ public class TimerTask implements Cloneable, /** * Add task's subtask. - * + * * Also add parent reference. - * + * * @param t the task to add * @return success flag */ @@ -387,7 +400,7 @@ public class TimerTask implements Cloneable, /** * Add time. - * + * * @param date date * @param time time in ms */ @@ -397,7 +410,7 @@ public class TimerTask implements Cloneable, /** * Get time at date. - * + * * @param date date * @return time at specified date in ms */ @@ -414,7 +427,7 @@ public class TimerTask implements Cloneable, /** * Return all data. Sorted on date. - * + * * @return total duration of all projects */ public SortedMap<Date, Long> getAllDaysAndTimes() { @@ -423,7 +436,7 @@ public class TimerTask implements Cloneable, /** * Add annotation. - * + * * @param date date * @param note note text */ @@ -433,7 +446,7 @@ public class TimerTask implements Cloneable, /** * Return all annotation, sorted on date. - * + * * @return annotations */ public SortedMap<Date, String> getAllDaysAnnotations() { @@ -442,7 +455,7 @@ public class TimerTask implements Cloneable, /** * Add alert. - * + * * @param alert */ public void addAlert(TimerAlert alert) { @@ -451,7 +464,7 @@ public class TimerTask implements Cloneable, /** * Get alert list. - * + * * @return alerts */ public List<TimerAlert> getAlerts() { @@ -460,24 +473,18 @@ public class TimerTask implements Cloneable, /** * Set alert. - * + * * @param alerts new alerts list */ public void setAlert(List<TimerAlert> alerts) { this.alerts = alerts; } - /* - * @see java.lang.Object#toString() - */ @Override public String toString() { return name + subTasks.toString(); } - /* - * @see java.lang.Object#hashCode() - */ @Override public int hashCode() { int result = uuid.hashCode(); @@ -491,12 +498,12 @@ public class TimerTask implements Cloneable, return false; } - return uuid.equals(((TimerTask)o).uuid); + return uuid.equals(((TimerTask) o).uuid); } /** * Clone task. - * + * * @return task copy */ @Override @@ -522,9 +529,6 @@ public class TimerTask implements Cloneable, return task; } - /* - * @see java.lang.Comparable#compareTo(java.lang.Object) - */ @Override public int compareTo(TimerTask o) { diff --git a/src/main/java/org/chorem/jtimer/io/GTimerIncrementalSaver.java b/src/main/java/org/chorem/jtimer/io/GTimerIncrementalSaver.java index 5bfdb50..7e5c741 100644 --- a/src/main/java/org/chorem/jtimer/io/GTimerIncrementalSaver.java +++ b/src/main/java/org/chorem/jtimer/io/GTimerIncrementalSaver.java @@ -1269,7 +1269,6 @@ public class GTimerIncrementalSaver extends AbstractSaver implements Saver, return foundProjectNumber; } - @Override public void deleteProject(TimerProject project) { deleteTaskOrProject(project, GTIMER_PROJECT_EXTENSION); diff --git a/src/main/java/org/chorem/jtimer/ui/StatusBar.java b/src/main/java/org/chorem/jtimer/ui/StatusBar.java index d8b82d6..193bcfd 100644 --- a/src/main/java/org/chorem/jtimer/ui/StatusBar.java +++ b/src/main/java/org/chorem/jtimer/ui/StatusBar.java @@ -134,9 +134,7 @@ public class StatusBar extends JPanel implements DataEventListener { // and call modifyTask modifyTask(null); } - /* - * @see org.chorem.jtimer.data.event.DataEventListener#deleteProject(org.chorem.jtimer.entities.TimerProject) - */ + @Override public void deleteProject(TimerProject project) { updateTodayTime(); diff --git a/src/main/java/org/chorem/jtimer/ui/systray/SystrayManager.java b/src/main/java/org/chorem/jtimer/ui/systray/SystrayManager.java index 322ffca..5de58e3 100644 --- a/src/main/java/org/chorem/jtimer/ui/systray/SystrayManager.java +++ b/src/main/java/org/chorem/jtimer/ui/systray/SystrayManager.java @@ -192,11 +192,6 @@ public class SystrayManager extends WindowAdapter implements ActionListener, Dat } } - - - /* - * @see org.chorem.jtimer.ui.systray.SystrayManager#startTask(org.chorem.jtimer.entities.TimerTask) - */ @Override public void startTask(TimerTask task) { startStopTask(task, true); diff --git a/src/main/java/org/chorem/jtimer/ui/treetable/ProjectsAndTasksModel.java b/src/main/java/org/chorem/jtimer/ui/treetable/ProjectsAndTasksModel.java index 230db7e..edfff82 100644 --- a/src/main/java/org/chorem/jtimer/ui/treetable/ProjectsAndTasksModel.java +++ b/src/main/java/org/chorem/jtimer/ui/treetable/ProjectsAndTasksModel.java @@ -371,9 +371,6 @@ public class ProjectsAndTasksModel extends AbstractTreeTableModel implements }); } - /* - * @see org.chorem.jtimer.data.event.DataEventListener#deleteProject(org.chorem.jtimer.entities.TimerProject) - */ @Override public void deleteProject(TimerProject project) { notifyTaskChanged(project, OPERATION_DELETE); diff --git a/src/test/java/org/chorem/jtimer/io/GTimerIncrementalSaverTest.java b/src/test/java/org/chorem/jtimer/io/GTimerIncrementalSaverTest.java index 04c6eba..6dc4d8f 100644 --- a/src/test/java/org/chorem/jtimer/io/GTimerIncrementalSaverTest.java +++ b/src/test/java/org/chorem/jtimer/io/GTimerIncrementalSaverTest.java @@ -346,6 +346,7 @@ public class GTimerIncrementalSaverTest extends AbstractJTimerTest { } }*/ } + /** * Test que les lignes avec 0 ne sont pas chargées dans les fichiers de temps. * -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm