Index: /applications/editors/josm/plugins/josm-tofix-plugin/.classpath
===================================================================
--- /applications/editors/josm/plugins/josm-tofix-plugin/.classpath	(revision 31614)
+++ /applications/editors/josm/plugins/josm-tofix-plugin/.classpath	(revision 31614)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="src" path="test/src"/>
+	<!-- <classpathentry exported="true" kind="con" path="GROOVY_SUPPORT"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
+	<classpathentry kind="lib" path="/JOSM/dist/josm-custom.jar" sourcepath="/JOSM/src"/>
+	<classpathentry kind="lib" path="/JOSM/test/build" sourcepath="/JOSM/test/functional"/>
+	<classpathentry kind="lib" path="test/config"/>
+	<classpathentry kind="output" path="build"/> -->
+</classpath>
Index: /applications/editors/josm/plugins/josm-tofix-plugin/.git/HEAD
===================================================================
--- /applications/editors/josm/plugins/josm-tofix-plugin/.git/HEAD	(revision 31614)
+++ /applications/editors/josm/plugins/josm-tofix-plugin/.git/HEAD	(revision 31614)
@@ -0,0 +1,1 @@
+ref: refs/heads/master
Index: /applications/editors/josm/plugins/josm-tofix-plugin/.git/config
===================================================================
--- /applications/editors/josm/plugins/josm-tofix-plugin/.git/config	(revision 31614)
+++ /applications/editors/josm/plugins/josm-tofix-plugin/.git/config	(revision 31614)
@@ -0,0 +1,11 @@
+[core]
+	repositoryformatversion = 0
+	filemode = true
+	bare = false
+	logallrefupdates = true
+[remote "origin"]
+	url = git@github.com:osmlab/josm-tofix-plugin.git
+	fetch = +refs/heads/*:refs/remotes/origin/*
+[branch "master"]
+	remote = origin
+	merge = refs/heads/master
Index: /applications/editors/josm/plugins/josm-tofix-plugin/.git/description
===================================================================
--- /applications/editors/josm/plugins/josm-tofix-plugin/.git/description	(revision 31614)
+++ /applications/editors/josm/plugins/josm-tofix-plugin/.git/description	(revision 31614)
@@ -0,0 +1,1 @@
+Unnamed repository; edit this file 'description' to name the repository.
Index: /applications/editors/josm/plugins/josm-tofix-plugin/.git/hooks/applypatch-msg.sample
===================================================================
--- /applications/editors/josm/plugins/josm-tofix-plugin/.git/hooks/applypatch-msg.sample	(revision 31614)
+++ /applications/editors/josm/plugins/josm-tofix-plugin/.git/hooks/applypatch-msg.sample	(revision 31614)
@@ -0,0 +1,15 @@
+#!/bin/sh
+#
+# An example hook script to check the commit log message taken by
+# applypatch from an e-mail message.
+#
+# The hook should exit with non-zero status after issuing an
+# appropriate message if it wants to stop the commit.  The hook is
+# allowed to edit the commit message file.
+#
+# To enable this hook, rename this file to "applypatch-msg".
+
+. git-sh-setup
+test -x "$GIT_DIR/hooks/commit-msg" &&
+	exec "$GIT_DIR/hooks/commit-msg" ${1+"$@"}
+:
Index: /applications/editors/josm/plugins/josm-tofix-plugin/.git/hooks/commit-msg.sample
===================================================================
--- /applications/editors/josm/plugins/josm-tofix-plugin/.git/hooks/commit-msg.sample	(revision 31614)
+++ /applications/editors/josm/plugins/josm-tofix-plugin/.git/hooks/commit-msg.sample	(revision 31614)
@@ -0,0 +1,24 @@
+#!/bin/sh
+#
+# An example hook script to check the commit log message.
+# Called by "git commit" with one argument, the name of the file
+# that has the commit message.  The hook should exit with non-zero
+# status after issuing an appropriate message if it wants to stop the
+# commit.  The hook is allowed to edit the commit message file.
+#
+# To enable this hook, rename this file to "commit-msg".
+
+# Uncomment the below to add a Signed-off-by line to the message.
+# Doing this in a hook is a bad idea in general, but the prepare-commit-msg
+# hook is more suited to it.
+#
+# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
+# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1"
+
+# This example catches duplicate Signed-off-by lines.
+
+test "" = "$(grep '^Signed-off-by: ' "$1" |
+	 sort | uniq -c | sed -e '/^[ 	]*1[ 	]/d')" || {
+	echo >&2 Duplicate Signed-off-by lines.
+	exit 1
+}
Index: /applications/editors/josm/plugins/josm-tofix-plugin/.git/hooks/post-update.sample
===================================================================
--- /applications/editors/josm/plugins/josm-tofix-plugin/.git/hooks/post-update.sample	(revision 31614)
+++ /applications/editors/josm/plugins/josm-tofix-plugin/.git/hooks/post-update.sample	(revision 31614)
@@ -0,0 +1,8 @@
+#!/bin/sh
+#
+# An example hook script to prepare a packed repository for use over
+# dumb transports.
+#
+# To enable this hook, rename this file to "post-update".
+
+exec git update-server-info
Index: /applications/editors/josm/plugins/josm-tofix-plugin/.git/hooks/pre-applypatch.sample
===================================================================
--- /applications/editors/josm/plugins/josm-tofix-plugin/.git/hooks/pre-applypatch.sample	(revision 31614)
+++ /applications/editors/josm/plugins/josm-tofix-plugin/.git/hooks/pre-applypatch.sample	(revision 31614)
@@ -0,0 +1,14 @@
+#!/bin/sh
+#
+# An example hook script to verify what is about to be committed
+# by applypatch from an e-mail message.
+#
+# The hook should exit with non-zero status after issuing an
+# appropriate message if it wants to stop the commit.
+#
+# To enable this hook, rename this file to "pre-applypatch".
+
+. git-sh-setup
+test -x "$GIT_DIR/hooks/pre-commit" &&
+	exec "$GIT_DIR/hooks/pre-commit" ${1+"$@"}
+:
Index: /applications/editors/josm/plugins/josm-tofix-plugin/.git/hooks/pre-commit.sample
===================================================================
--- /applications/editors/josm/plugins/josm-tofix-plugin/.git/hooks/pre-commit.sample	(revision 31614)
+++ /applications/editors/josm/plugins/josm-tofix-plugin/.git/hooks/pre-commit.sample	(revision 31614)
@@ -0,0 +1,49 @@
+#!/bin/sh
+#
+# An example hook script to verify what is about to be committed.
+# Called by "git commit" with no arguments.  The hook should
+# exit with non-zero status after issuing an appropriate message if
+# it wants to stop the commit.
+#
+# To enable this hook, rename this file to "pre-commit".
+
+if git rev-parse --verify HEAD >/dev/null 2>&1
+then
+	against=HEAD
+else
+	# Initial commit: diff against an empty tree object
+	against=4b825dc642cb6eb9a060e54bf8d69288fbee4904
+fi
+
+# If you want to allow non-ASCII filenames set this variable to true.
+allownonascii=$(git config --bool hooks.allownonascii)
+
+# Redirect output to stderr.
+exec 1>&2
+
+# Cross platform projects tend to avoid non-ASCII filenames; prevent
+# them from being added to the repository. We exploit the fact that the
+# printable range starts at the space character and ends with tilde.
+if [ "$allownonascii" != "true" ] &&
+	# Note that the use of brackets around a tr range is ok here, (it's
+	# even required, for portability to Solaris 10's /usr/bin/tr), since
+	# the square bracket bytes happen to fall in the designated range.
+	test $(git diff --cached --name-only --diff-filter=A -z $against |
+	  LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0
+then
+	cat <<\EOF
+Error: Attempt to add a non-ASCII file name.
+
+This can cause problems if you want to work with people on other platforms.
+
+To be portable it is advisable to rename the file.
+
+If you know what you are doing you can disable this check using:
+
+  git config hooks.allownonascii true
+EOF
+	exit 1
+fi
+
+# If there are whitespace errors, print the offending file names and fail.
+exec git diff-index --check --cached $against --
Index: /applications/editors/josm/plugins/josm-tofix-plugin/.git/hooks/pre-push.sample
===================================================================
--- /applications/editors/josm/plugins/josm-tofix-plugin/.git/hooks/pre-push.sample	(revision 31614)
+++ /applications/editors/josm/plugins/josm-tofix-plugin/.git/hooks/pre-push.sample	(revision 31614)
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+# An example hook script to verify what is about to be pushed.  Called by "git
+# push" after it has checked the remote status, but before anything has been
+# pushed.  If this script exits with a non-zero status nothing will be pushed.
+#
+# This hook is called with the following parameters:
+#
+# $1 -- Name of the remote to which the push is being done
+# $2 -- URL to which the push is being done
+#
+# If pushing without using a named remote those arguments will be equal.
+#
+# Information about the commits which are being pushed is supplied as lines to
+# the standard input in the form:
+#
+#   <local ref> <local sha1> <remote ref> <remote sha1>
+#
+# This sample shows how to prevent push of commits where the log message starts
+# with "WIP" (work in progress).
+
+remote="$1"
+url="$2"
+
+z40=0000000000000000000000000000000000000000
+
+IFS=' '
+while read local_ref local_sha remote_ref remote_sha
+do
+	if [ "$local_sha" = $z40 ]
+	then
+		# Handle delete
+		:
+	else
+		if [ "$remote_sha" = $z40 ]
+		then
+			# New branch, examine all commits
+			range="$local_sha"
+		else
+			# Update to existing branch, examine new commits
+			range="$remote_sha..$local_sha"
+		fi
+
+		# Check for WIP commit
+		commit=`git rev-list -n 1 --grep '^WIP' "$range"`
+		if [ -n "$commit" ]
+		then
+			echo "Found WIP commit in $local_ref, not pushing"
+			exit 1
+		fi
+	fi
+done
+
+exit 0
Index: /applications/editors/josm/plugins/josm-tofix-plugin/.git/hooks/pre-rebase.sample
===================================================================
--- /applications/editors/josm/plugins/josm-tofix-plugin/.git/hooks/pre-rebase.sample	(revision 31614)
+++ /applications/editors/josm/plugins/josm-tofix-plugin/.git/hooks/pre-rebase.sample	(revision 31614)
@@ -0,0 +1,169 @@
+#!/bin/sh
+#
+# Copyright (c) 2006, 2008 Junio C Hamano
+#
+# The "pre-rebase" hook is run just before "git rebase" starts doing
+# its job, and can prevent the command from running by exiting with
+# non-zero status.
+#
+# The hook is called with the following parameters:
+#
+# $1 -- the upstream the series was forked from.
+# $2 -- the branch being rebased (or empty when rebasing the current branch).
+#
+# This sample shows how to prevent topic branches that are already
+# merged to 'next' branch from getting rebased, because allowing it
+# would result in rebasing already published history.
+
+publish=next
+basebranch="$1"
+if test "$#" = 2
+then
+	topic="refs/heads/$2"
+else
+	topic=`git symbolic-ref HEAD` ||
+	exit 0 ;# we do not interrupt rebasing detached HEAD
+fi
+
+case "$topic" in
+refs/heads/??/*)
+	;;
+*)
+	exit 0 ;# we do not interrupt others.
+	;;
+esac
+
+# Now we are dealing with a topic branch being rebased
+# on top of master.  Is it OK to rebase it?
+
+# Does the topic really exist?
+git show-ref -q "$topic" || {
+	echo >&2 "No such branch $topic"
+	exit 1
+}
+
+# Is topic fully merged to master?
+not_in_master=`git rev-list --pretty=oneline ^master "$topic"`
+if test -z "$not_in_master"
+then
+	echo >&2 "$topic is fully merged to master; better remove it."
+	exit 1 ;# we could allow it, but there is no point.
+fi
+
+# Is topic ever merged to next?  If so you should not be rebasing it.
+only_next_1=`git rev-list ^master "^$topic" ${publish} | sort`
+only_next_2=`git rev-list ^master           ${publish} | sort`
+if test "$only_next_1" = "$only_next_2"
+then
+	not_in_topic=`git rev-list "^$topic" master`
+	if test -z "$not_in_topic"
+	then
+		echo >&2 "$topic is already up-to-date with master"
+		exit 1 ;# we could allow it, but there is no point.
+	else
+		exit 0
+	fi
+else
+	not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"`
+	/usr/bin/perl -e '
+		my $topic = $ARGV[0];
+		my $msg = "* $topic has commits already merged to public branch:\n";
+		my (%not_in_next) = map {
+			/^([0-9a-f]+) /;
+			($1 => 1);
+		} split(/\n/, $ARGV[1]);
+		for my $elem (map {
+				/^([0-9a-f]+) (.*)$/;
+				[$1 => $2];
+			} split(/\n/, $ARGV[2])) {
+			if (!exists $not_in_next{$elem->[0]}) {
+				if ($msg) {
+					print STDERR $msg;
+					undef $msg;
+				}
+				print STDERR " $elem->[1]\n";
+			}
+		}
+	' "$topic" "$not_in_next" "$not_in_master"
+	exit 1
+fi
+
+<<\DOC_END
+
+This sample hook safeguards topic branches that have been
+published from being rewound.
+
+The workflow assumed here is:
+
+ * Once a topic branch forks from "master", "master" is never
+   merged into it again (either directly or indirectly).
+
+ * Once a topic branch is fully cooked and merged into "master",
+   it is deleted.  If you need to build on top of it to correct
+   earlier mistakes, a new topic branch is created by forking at
+   the tip of the "master".  This is not strictly necessary, but
+   it makes it easier to keep your history simple.
+
+ * Whenever you need to test or publish your changes to topic
+   branches, merge them into "next" branch.
+
+The script, being an example, hardcodes the publish branch name
+to be "next", but it is trivial to make it configurable via
+$GIT_DIR/config mechanism.
+
+With this workflow, you would want to know:
+
+(1) ... if a topic branch has ever been merged to "next".  Young
+    topic branches can have stupid mistakes you would rather
+    clean up before publishing, and things that have not been
+    merged into other branches can be easily rebased without
+    affecting other people.  But once it is published, you would
+    not want to rewind it.
+
+(2) ... if a topic branch has been fully merged to "master".
+    Then you can delete it.  More importantly, you should not
+    build on top of it -- other people may already want to
+    change things related to the topic as patches against your
+    "master", so if you need further changes, it is better to
+    fork the topic (perhaps with the same name) afresh from the
+    tip of "master".
+
+Let's look at this example:
+
+		   o---o---o---o---o---o---o---o---o---o "next"
+		  /       /           /           /
+		 /   a---a---b A     /           /
+		/   /               /           /
+	       /   /   c---c---c---c B         /
+	      /   /   /             \         /
+	     /   /   /   b---b C     \       /
+	    /   /   /   /             \     /
+    ---o---o---o---o---o---o---o---o---o---o---o "master"
+
+
+A, B and C are topic branches.
+
+ * A has one fix since it was merged up to "next".
+
+ * B has finished.  It has been fully merged up to "master" and "next",
+   and is ready to be deleted.
+
+ * C has not merged to "next" at all.
+
+We would want to allow C to be rebased, refuse A, and encourage
+B to be deleted.
+
+To compute (1):
+
+	git rev-list ^master ^topic next
+	git rev-list ^master        next
+
+	if these match, topic has not merged in next at all.
+
+To compute (2):
+
+	git rev-list master..topic
+
+	if this is empty, it is fully merged to "master".
+
+DOC_END
Index: /applications/editors/josm/plugins/josm-tofix-plugin/.git/hooks/prepare-commit-msg.sample
===================================================================
--- /applications/editors/josm/plugins/josm-tofix-plugin/.git/hooks/prepare-commit-msg.sample	(revision 31614)
+++ /applications/editors/josm/plugins/josm-tofix-plugin/.git/hooks/prepare-commit-msg.sample	(revision 31614)
@@ -0,0 +1,36 @@
+#!/bin/sh
+#
+# An example hook script to prepare the commit log message.
+# Called by "git commit" with the name of the file that has the
+# commit message, followed by the description of the commit
+# message's source.  The hook's purpose is to edit the commit
+# message file.  If the hook fails with a non-zero status,
+# the commit is aborted.
+#
+# To enable this hook, rename this file to "prepare-commit-msg".
+
+# This hook includes three examples.  The first comments out the
+# "Conflicts:" part of a merge commit.
+#
+# The second includes the output of "git diff --name-status -r"
+# into the message, just before the "git status" output.  It is
+# commented because it doesn't cope with --amend or with squashed
+# commits.
+#
+# The third example adds a Signed-off-by line to the message, that can
+# still be edited.  This is rarely a good idea.
+
+case "$2,$3" in
+  merge,)
+    /usr/bin/perl -i.bak -ne 's/^/# /, s/^# #/#/ if /^Conflicts/ .. /#/; print' "$1" ;;
+
+# ,|template,)
+#   /usr/bin/perl -i.bak -pe '
+#      print "\n" . `git diff --cached --name-status -r`
+#	 if /^#/ && $first++ == 0' "$1" ;;
+
+  *) ;;
+esac
+
+# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
+# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1"
Index: /applications/editors/josm/plugins/josm-tofix-plugin/.git/hooks/update.sample
===================================================================
--- /applications/editors/josm/plugins/josm-tofix-plugin/.git/hooks/update.sample	(revision 31614)
+++ /applications/editors/josm/plugins/josm-tofix-plugin/.git/hooks/update.sample	(revision 31614)
@@ -0,0 +1,128 @@
+#!/bin/sh
+#
+# An example hook script to blocks unannotated tags from entering.
+# Called by "git receive-pack" with arguments: refname sha1-old sha1-new
+#
+# To enable this hook, rename this file to "update".
+#
+# Config
+# ------
+# hooks.allowunannotated
+#   This boolean sets whether unannotated tags will be allowed into the
+#   repository.  By default they won't be.
+# hooks.allowdeletetag
+#   This boolean sets whether deleting tags will be allowed in the
+#   repository.  By default they won't be.
+# hooks.allowmodifytag
+#   This boolean sets whether a tag may be modified after creation. By default
+#   it won't be.
+# hooks.allowdeletebranch
+#   This boolean sets whether deleting branches will be allowed in the
+#   repository.  By default they won't be.
+# hooks.denycreatebranch
+#   This boolean sets whether remotely creating branches will be denied
+#   in the repository.  By default this is allowed.
+#
+
+# --- Command line
+refname="$1"
+oldrev="$2"
+newrev="$3"
+
+# --- Safety check
+if [ -z "$GIT_DIR" ]; then
+	echo "Don't run this script from the command line." >&2
+	echo " (if you want, you could supply GIT_DIR then run" >&2
+	echo "  $0 <ref> <oldrev> <newrev>)" >&2
+	exit 1
+fi
+
+if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then
+	echo "usage: $0 <ref> <oldrev> <newrev>" >&2
+	exit 1
+fi
+
+# --- Config
+allowunannotated=$(git config --bool hooks.allowunannotated)
+allowdeletebranch=$(git config --bool hooks.allowdeletebranch)
+denycreatebranch=$(git config --bool hooks.denycreatebranch)
+allowdeletetag=$(git config --bool hooks.allowdeletetag)
+allowmodifytag=$(git config --bool hooks.allowmodifytag)
+
+# check for no description
+projectdesc=$(sed -e '1q' "$GIT_DIR/description")
+case "$projectdesc" in
+"Unnamed repository"* | "")
+	echo "*** Project description file hasn't been set" >&2
+	exit 1
+	;;
+esac
+
+# --- Check types
+# if $newrev is 0000...0000, it's a commit to delete a ref.
+zero="0000000000000000000000000000000000000000"
+if [ "$newrev" = "$zero" ]; then
+	newrev_type=delete
+else
+	newrev_type=$(git cat-file -t $newrev)
+fi
+
+case "$refname","$newrev_type" in
+	refs/tags/*,commit)
+		# un-annotated tag
+		short_refname=${refname##refs/tags/}
+		if [ "$allowunannotated" != "true" ]; then
+			echo "*** The un-annotated tag, $short_refname, is not allowed in this repository" >&2
+			echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2
+			exit 1
+		fi
+		;;
+	refs/tags/*,delete)
+		# delete tag
+		if [ "$allowdeletetag" != "true" ]; then
+			echo "*** Deleting a tag is not allowed in this repository" >&2
+			exit 1
+		fi
+		;;
+	refs/tags/*,tag)
+		# annotated tag
+		if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1
+		then
+			echo "*** Tag '$refname' already exists." >&2
+			echo "*** Modifying a tag is not allowed in this repository." >&2
+			exit 1
+		fi
+		;;
+	refs/heads/*,commit)
+		# branch
+		if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then
+			echo "*** Creating a branch is not allowed in this repository" >&2
+			exit 1
+		fi
+		;;
+	refs/heads/*,delete)
+		# delete branch
+		if [ "$allowdeletebranch" != "true" ]; then
+			echo "*** Deleting a branch is not allowed in this repository" >&2
+			exit 1
+		fi
+		;;
+	refs/remotes/*,commit)
+		# tracking branch
+		;;
+	refs/remotes/*,delete)
+		# delete tracking branch
+		if [ "$allowdeletebranch" != "true" ]; then
+			echo "*** Deleting a tracking branch is not allowed in this repository" >&2
+			exit 1
+		fi
+		;;
+	*)
+		# Anything else (is there anything else?)
+		echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2
+		exit 1
+		;;
+esac
+
+# --- Finished
+exit 0
Index: /applications/editors/josm/plugins/josm-tofix-plugin/.git/info/exclude
===================================================================
--- /applications/editors/josm/plugins/josm-tofix-plugin/.git/info/exclude	(revision 31614)
+++ /applications/editors/josm/plugins/josm-tofix-plugin/.git/info/exclude	(revision 31614)
@@ -0,0 +1,6 @@
+# git ls-files --others --exclude-from=.git/info/exclude
+# Lines that start with '#' are comments.
+# For a project mostly in C, the following would be a good set of
+# exclude patterns (uncomment them if you want to use them):
+# *.[oa]
+# *~
Index: /applications/editors/josm/plugins/josm-tofix-plugin/.git/logs/HEAD
===================================================================
--- /applications/editors/josm/plugins/josm-tofix-plugin/.git/logs/HEAD	(revision 31614)
+++ /applications/editors/josm/plugins/josm-tofix-plugin/.git/logs/HEAD	(revision 31614)
@@ -0,0 +1,1 @@
+0000000000000000000000000000000000000000 e339a37900cdebb9743385da60e206774b0e400e Rub21 <ruben@mapbox.com> 1444684541 -0500	clone: from git@github.com:osmlab/josm-tofix-plugin.git
Index: /applications/editors/josm/plugins/josm-tofix-plugin/.git/logs/refs/heads/master
===================================================================
--- /applications/editors/josm/plugins/josm-tofix-plugin/.git/logs/refs/heads/master	(revision 31614)
+++ /applications/editors/josm/plugins/josm-tofix-plugin/.git/logs/refs/heads/master	(revision 31614)
@@ -0,0 +1,1 @@
+0000000000000000000000000000000000000000 e339a37900cdebb9743385da60e206774b0e400e Rub21 <ruben@mapbox.com> 1444684541 -0500	clone: from git@github.com:osmlab/josm-tofix-plugin.git
Index: /applications/editors/josm/plugins/josm-tofix-plugin/.git/logs/refs/remotes/origin/HEAD
===================================================================
--- /applications/editors/josm/plugins/josm-tofix-plugin/.git/logs/refs/remotes/origin/HEAD	(revision 31614)
+++ /applications/editors/josm/plugins/josm-tofix-plugin/.git/logs/refs/remotes/origin/HEAD	(revision 31614)
@@ -0,0 +1,1 @@
+0000000000000000000000000000000000000000 e339a37900cdebb9743385da60e206774b0e400e Rub21 <ruben@mapbox.com> 1444684541 -0500	clone: from git@github.com:osmlab/josm-tofix-plugin.git
Index: /applications/editors/josm/plugins/josm-tofix-plugin/.git/packed-refs
===================================================================
--- /applications/editors/josm/plugins/josm-tofix-plugin/.git/packed-refs	(revision 31614)
+++ /applications/editors/josm/plugins/josm-tofix-plugin/.git/packed-refs	(revision 31614)
@@ -0,0 +1,7 @@
+# pack-refs with: peeled fully-peeled 
+055c353fe3781aabd0ebeaf3968ca9a2b50c9af3 refs/remotes/origin/dev
+5a083ccd847e7d5906d255e93cda83ef5fa8d038 refs/remotes/origin/download
+13ef9e37cc05e2724e0d8b6756da4f4807d3c101 refs/remotes/origin/language
+e339a37900cdebb9743385da60e206774b0e400e refs/remotes/origin/master
+3f53b9c890f66ed44cf150e5eee33e678eac85d0 refs/remotes/origin/thread
+cc162343acf1a711c9b6621cc148f375b57c79c6 refs/remotes/origin/upload
Index: /applications/editors/josm/plugins/josm-tofix-plugin/.git/refs/heads/master
===================================================================
--- /applications/editors/josm/plugins/josm-tofix-plugin/.git/refs/heads/master	(revision 31614)
+++ /applications/editors/josm/plugins/josm-tofix-plugin/.git/refs/heads/master	(revision 31614)
@@ -0,0 +1,1 @@
+e339a37900cdebb9743385da60e206774b0e400e
Index: /applications/editors/josm/plugins/josm-tofix-plugin/.git/refs/remotes/origin/HEAD
===================================================================
--- /applications/editors/josm/plugins/josm-tofix-plugin/.git/refs/remotes/origin/HEAD	(revision 31614)
+++ /applications/editors/josm/plugins/josm-tofix-plugin/.git/refs/remotes/origin/HEAD	(revision 31614)
@@ -0,0 +1,1 @@
+ref: refs/remotes/origin/master
Index: /applications/editors/josm/plugins/josm-tofix-plugin/.gitignore
===================================================================
--- /applications/editors/josm/plugins/josm-tofix-plugin/.gitignore	(revision 31614)
+++ /applications/editors/josm/plugins/josm-tofix-plugin/.gitignore	(revision 31614)
@@ -0,0 +1,4 @@
+# Some Files #
+###################
+nbproject
+build
Index: /applications/editors/josm/plugins/josm-tofix-plugin/LICENSE.txt
===================================================================
--- /applications/editors/josm/plugins/josm-tofix-plugin/LICENSE.txt	(revision 31614)
+++ /applications/editors/josm/plugins/josm-tofix-plugin/LICENSE.txt	(revision 31614)
@@ -0,0 +1,81 @@
+Copyright (c) 2014, Mapbox
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright notice,
+      this list of conditions and the following disclaimer in the documentation
+      and/or other materials provided with the distribution.
+    * Neither the name of Mapbox GL JS nor the names of its contributors
+      may be used to endorse or promote products derived from this software
+      without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------------------
+
+Contains glmatrix.js
+
+Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+  * Redistributions of source code must retain the above copyright notice, this
+    list of conditions and the following disclaimer.
+  * Redistributions in binary form must reproduce the above copyright notice,
+    this list of conditions and the following disclaimer in the documentation
+    and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------------------
+
+Contains Hershey Simplex Font: http://paulbourke.net/dataformats/hershey/
+
+-------------------------------------------------------------------------------
+
+Contains code from glfx.js
+
+Copyright (C) 2011 by Evan Wallace
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
Index: /applications/editors/josm/plugins/josm-tofix-plugin/README.md
===================================================================
--- /applications/editors/josm/plugins/josm-tofix-plugin/README.md	(revision 31614)
+++ /applications/editors/josm/plugins/josm-tofix-plugin/README.md	(revision 31614)
@@ -0,0 +1,42 @@
+# JOSM To-Fix Plugin
+
+Make [To-Fix](http://osmlab.github.io/to-fix) OpenStreetMap microtasking challenges available in [JOSM](http://josm.openstreetmap.de/) editor.
+
+
+![josm](https://cloud.githubusercontent.com/assets/1152236/8237989/9c48c41a-15b8-11e5-8fd5-a35735db43c9.gif)
+
+## Installation
+
+*Download*
+
+- Download: https://github.com/osmlab/josm-tofix-plugin/blob/master/dist/tofix.jar?raw=true
+- or clone from GitHub: `git clone https://github.com/Rub21/josm-tofix-plugin.git`
+
+*Copy to plugins directory*
+
+- Ubuntu: `cp tofix.jar ~/.josm/plugins/`
+- Mac OSX: `cp tofix.jar ~/Library/JOSM/plugins`
+- Windows :  Copy in `C:\Users\(Windows user)\AppData\Roaming\JOSM\plugins`
+
+*Activate plugin*
+
+![image](https://cloud.githubusercontent.com/assets/1152236/8236632/3e4e4352-15af-11e5-88d3-e348b78b62d2.png)
+
+![screenshot from 2015-10-12 11 33 04](https://cloud.githubusercontent.com/assets/1152236/10433104/2f8df796-70d5-11e5-8f77-43b18a01d96e.png)
+
+## Configuration
+
+#### Shortcuts
+
+Default shortcuts:
+
+- **Skip button:** ALT + SHIFT + S
+- **Not a error button :** ALT + SHIFT + N
+- **Fixed button :** ALT + SHIFT + S
+
+Example to configure your own shortcuts:
+
+
+![screenshot from 2015-06-18 09 30 05](https://cloud.githubusercontent.com/assets/1152236/8237229/6268a12a-15b3-11e5-8496-d67fdc1fc4b8.png)
+
+
Index: /applications/editors/josm/plugins/josm-tofix-plugin/build.xml
===================================================================
--- /applications/editors/josm/plugins/josm-tofix-plugin/build.xml	(revision 31614)
+++ /applications/editors/josm/plugins/josm-tofix-plugin/build.xml	(revision 31614)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<project name="tofix" default="dist" basedir=".">
+    <property name="commit.message" value="Tofix plugin"/>
+    <property name="plugin.main.version" value="8151"/>
+    <property name="plugin.version" value="v0.0.1"/>
+    <property name="plugin.author" value="Rub21"/>
+    <property name="plugin.class" value="org.openstreetmap.josm.plugins.tofix.TofixPlugin"/>
+    <property name="plugin.description" value="Integrate to-fix http://osmlab.github.io/to-fix/ into JOSM to repair errors in OpenStreetMap"/>
+    <property name="plugin.icon" value="images/icontofix.png"/>
+    <property name="plugin.link" value="https://github.com/osmlab/josm-tofix-plugin"/>
+    <import file="../build-common.xml"/>
+</project>
Index: /applications/editors/josm/plugins/josm-tofix-plugin/build/LICENSE.txt
===================================================================
--- /applications/editors/josm/plugins/josm-tofix-plugin/build/LICENSE.txt	(revision 31614)
+++ /applications/editors/josm/plugins/josm-tofix-plugin/build/LICENSE.txt	(revision 31614)
@@ -0,0 +1,81 @@
+Copyright (c) 2014, Mapbox
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright notice,
+      this list of conditions and the following disclaimer in the documentation
+      and/or other materials provided with the distribution.
+    * Neither the name of Mapbox GL JS nor the names of its contributors
+      may be used to endorse or promote products derived from this software
+      without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------------------
+
+Contains glmatrix.js
+
+Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+  * Redistributions of source code must retain the above copyright notice, this
+    list of conditions and the following disclaimer.
+  * Redistributions in binary form must reproduce the above copyright notice,
+    this list of conditions and the following disclaimer in the documentation
+    and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------------------
+
+Contains Hershey Simplex Font: http://paulbourke.net/dataformats/hershey/
+
+-------------------------------------------------------------------------------
+
+Contains code from glfx.js
+
+Copyright (C) 2011 by Evan Wallace
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
Index: /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/TofixDialog.java
===================================================================
--- /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/TofixDialog.java	(revision 31614)
+++ /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/TofixDialog.java	(revision 31614)
@@ -0,0 +1,353 @@
+package org.openstreetmap.josm.plugins.tofix;
+
+import java.awt.Cursor;
+import java.awt.GridLayout;
+import java.awt.Label;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.KeyEvent;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Hashtable;
+import javax.swing.AbstractAction;
+import static javax.swing.Action.NAME;
+import static javax.swing.Action.SHORT_DESCRIPTION;
+import static javax.swing.Action.SMALL_ICON;
+import javax.swing.JComboBox;
+import javax.swing.JLabel;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JSlider;
+import javax.swing.JTabbedPane;
+import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.gui.JosmUserIdentityManager;
+import org.openstreetmap.josm.gui.MapView;
+import org.openstreetmap.josm.gui.SideButton;
+import org.openstreetmap.josm.gui.dialogs.ToggleDialog;
+import org.openstreetmap.josm.plugins.tofix.bean.AccessToTask;
+import org.openstreetmap.josm.plugins.tofix.bean.FixedBean;
+import org.openstreetmap.josm.plugins.tofix.bean.ListTaskBean;
+import org.openstreetmap.josm.plugins.tofix.bean.TrackBean;
+import org.openstreetmap.josm.plugins.tofix.bean.items.Item;
+import org.openstreetmap.josm.plugins.tofix.controller.ItemController;
+import org.openstreetmap.josm.plugins.tofix.controller.ItemTrackController;
+import org.openstreetmap.josm.plugins.tofix.controller.ListTaskController;
+import org.openstreetmap.josm.plugins.tofix.util.*;
+import org.openstreetmap.josm.plugins.tofix.util.Config;
+import static org.openstreetmap.josm.tools.I18n.tr;
+import org.openstreetmap.josm.tools.ImageProvider;
+import org.openstreetmap.josm.tools.OpenBrowser;
+import org.openstreetmap.josm.tools.Shortcut;
+
+/**
+ *
+ * @author ruben
+ */
+public class TofixDialog extends ToggleDialog implements ActionListener {
+
+    // private final SideButton editButton;
+    private final SideButton skipButton;
+    private final SideButton fixedButton;
+    private final SideButton noterrorButton;
+    private Shortcut skipShortcut = null;
+    private Shortcut fixedShortcut = null;
+    private Shortcut noterrorButtonShortcut = null;
+    JSlider slider = new JSlider(JSlider.HORIZONTAL, 1, 5, 1);
+
+    //size to download
+    double zise = 0.001; //per default
+
+    AccessToTask mainAccessToTask = null;
+    // Task list
+    ListTaskBean listTaskBean = null;
+    ListTaskController listTaskController = new ListTaskController();
+
+    //Item
+    Item item = new Item();
+    ItemController itemController = new ItemController();
+
+    // To-Fix layer
+    MapView mv = Main.map.mapView;
+
+    ItemTrackController itemTrackController = new ItemTrackController();
+
+    JTabbedPane TabbedPanel = new javax.swing.JTabbedPane();
+
+    JPanel jcontenTasks = new JPanel(new GridLayout(2, 1));
+    JPanel valuePanel = new JPanel(new GridLayout(1, 1));
+
+    JPanel jcontenConfig = new JPanel(new GridLayout(2, 1));
+    JPanel panelslide = new JPanel(new GridLayout(1, 1));
+
+    JosmUserIdentityManager josmUserIdentityManager = JosmUserIdentityManager.getInstance();
+
+    TofixTask tofixTask = new TofixTask();
+    UploadAction upload = new UploadAction();
+
+    public TofixDialog() {
+
+        super(tr("To-fix"), "icontofix", tr("Open to-fix window."),
+                Shortcut.registerShortcut("Tool:To-fix", tr("Toggle: {0}", tr("Tool:To-fix")),
+                        KeyEvent.VK_T, Shortcut.ALT_CTRL_SHIFT), 170);
+
+        // "Skip" button
+        skipButton = new SideButton(new AbstractAction() {
+            {
+                putValue(NAME, tr("Skip"));
+                putValue(SMALL_ICON, ImageProvider.get("mapmode", "skip.png"));
+                putValue(SHORT_DESCRIPTION, tr("Skip Error"));
+            }
+
+            @Override
+            public void actionPerformed(ActionEvent e) {
+                skip();
+            }
+        });
+        skipButton.setEnabled(false);
+
+        // "Fixed" button
+        fixedButton = new SideButton(new AbstractAction() {
+            {
+                putValue(NAME, tr("Fixed"));
+                putValue(SMALL_ICON, ImageProvider.get("mapmode", "fixed.png"));
+                putValue(SHORT_DESCRIPTION, tr("Fixed Error"));
+            }
+
+            @Override
+            public void actionPerformed(ActionEvent e) {
+                upload.setCustomized_comment("#to-fix:" + mainAccessToTask.getTask_id());
+                upload.actionPerformed(e);
+                fixed();
+            }
+        });
+
+        fixedButton.setEnabled(false);
+
+        // "Not a error" button
+        noterrorButton = new SideButton(new AbstractAction() {
+            {
+                putValue(NAME, tr("Not an error"));
+                putValue(SMALL_ICON, ImageProvider.get("mapmode", "noterror.png"));
+                putValue(SHORT_DESCRIPTION, tr("Not an error"));
+            }
+
+            @Override
+            public void actionPerformed(ActionEvent e) {
+                noterror();
+            }
+        });
+
+        noterrorButton.setEnabled(false);
+
+        //add tittle for To-fix task
+        JLabel title_tasks = new javax.swing.JLabel();
+        title_tasks.setText("<html><a href=\"\">List of To-fix tasks</a></html>");
+        title_tasks.setCursor(new Cursor(Cursor.HAND_CURSOR));
+        title_tasks.addMouseListener(new MouseAdapter() {
+            @Override
+            public void mouseClicked(MouseEvent e) {
+                OpenBrowser.displayUrl(Config.URL_TOFIX);
+            }
+        });
+        jcontenTasks.add(title_tasks);
+
+        // JComboBox for each task
+        ArrayList<String> tasksList = new ArrayList<String>();
+        tasksList.add("Select a task ...");
+
+        if (Status.isInternetReachable()) { //checkout  internet connection
+            listTaskBean = listTaskController.getListTasksBean();
+            for (int i = 0; i < listTaskBean.getTasks().size(); i++) {
+                tasksList.add(listTaskBean.getTasks().get(i).getTitle());
+            }
+            JComboBox jcomboBox = new JComboBox(tasksList.toArray());
+            valuePanel.add(jcomboBox);
+            jcomboBox.addActionListener(this);
+
+            jcontenTasks.add(valuePanel);
+
+            //add title to download
+            jcontenConfig.add(new Label(tr("Size to download in Sq.m")));
+
+            //Add Slider to download
+            slider.setMinorTickSpacing(2);
+            slider.setMajorTickSpacing(5);
+            slider.setPaintTicks(true);
+            slider.setPaintLabels(true);
+            //slider.setLabelTable((slider.createStandardLabels(1)));
+            Hashtable<Integer, JLabel> table = new Hashtable<Integer, JLabel>();
+            table.put(1, new JLabel(tr("~.02")));
+            table.put(3, new JLabel("~.20"));
+            table.put(5, new JLabel("~.40"));
+            slider.setLabelTable(table);
+
+            slider.addChangeListener(new javax.swing.event.ChangeListener() {
+                public void stateChanged(javax.swing.event.ChangeEvent evt) {
+                    zise = (slider.getValue() * 0.001);
+                }
+            });
+            panelslide.add(slider);
+            jcontenConfig.add(panelslide);
+
+            //PANEL TASKS
+            valuePanel.setBorder(javax.swing.BorderFactory.createEtchedBorder());
+            //jcontenTasks.setBorder(javax.swing.BorderFactory.createEtchedBorder());
+            panelslide.setBorder(javax.swing.BorderFactory.createEtchedBorder());
+
+            TabbedPanel.addTab("Tasks", jcontenTasks);
+            TabbedPanel.addTab("Config", jcontenConfig);
+
+            //add panels in JOSM
+            createLayout(TabbedPanel, false, Arrays.asList(new SideButton[]{
+                skipButton, noterrorButton, fixedButton
+            }));
+
+            if (!Status.server()) {
+                jcomboBox.setEnabled(false);
+                skipButton.setEnabled(false);
+                fixedButton.setEnabled(false);
+                noterrorButton.setEnabled(false);
+            } else {
+                // Request data
+                mainAccessToTask = new AccessToTask("mixedlayer", "keepright", false);//start mixedlayer task by default
+                //Shortcuts
+                skipShortcut = Shortcut.registerShortcut("tofix:skip", tr("tofix:Skip item"), KeyEvent.VK_S, Shortcut.ALT_SHIFT);
+                Main.registerActionShortcut(new Skip_key_Action(), skipShortcut);
+
+                fixedShortcut = Shortcut.registerShortcut("tofix:fixed", tr("tofix:Fixed item"), KeyEvent.VK_F, Shortcut.ALT_SHIFT);
+                Main.registerActionShortcut(new Fixed_key_Action(), fixedShortcut);
+
+                noterrorButtonShortcut = Shortcut.registerShortcut("tofix:noterror", tr("tofix:Not a Error item"), KeyEvent.VK_N, Shortcut.ALT_SHIFT);
+                Main.registerActionShortcut(new NotError_key_Action(), noterrorButtonShortcut);
+            }
+        }
+    }
+
+    public class Skip_key_Action extends AbstractAction {
+
+        @Override
+        public void actionPerformed(ActionEvent e) {
+            skip();
+        }
+    }
+
+    public class Fixed_key_Action extends AbstractAction {
+
+        @Override
+        public void actionPerformed(ActionEvent e) {
+            upload.actionPerformed(e);
+            fixed();
+        }
+    }
+
+    public class NotError_key_Action extends AbstractAction {
+
+        @Override
+        public void actionPerformed(ActionEvent e) {
+            noterror();
+        }
+    }
+
+    @Override
+    public void actionPerformed(ActionEvent e) {
+        JComboBox cb = (JComboBox) e.getSource();
+        if (cb.getSelectedIndex() != 0) {
+            mainAccessToTask.setTask_name(listTaskBean.getTasks().get(cb.getSelectedIndex() - 1).getTitle());
+            mainAccessToTask.setTask_id(listTaskBean.getTasks().get(cb.getSelectedIndex() - 1).getId());
+            mainAccessToTask.setTask_source(listTaskBean.getTasks().get(cb.getSelectedIndex() - 1).getSource());
+            get_new_item();
+            skipButton.setEnabled(true);
+            fixedButton.setEnabled(true);
+            noterrorButton.setEnabled(true);
+        } else {
+            skipButton.setEnabled(false);
+            fixedButton.setEnabled(false);
+            noterrorButton.setEnabled(false);
+        }
+    }
+
+    public void edit() {
+        if (mainAccessToTask.isAccess()) {
+            TrackBean trackBean = new TrackBean();
+            trackBean.getAttributes().setAction("edit");
+            trackBean.getAttributes().setEditor("josm");
+            trackBean.getAttributes().setUser(josmUserIdentityManager.getUserName());
+            trackBean.getAttributes().setKey(mainAccessToTask.getKey());
+            itemTrackController.send_track_edit(mainAccessToTask.getTrack_url(), trackBean);
+        }
+    }
+
+    public void skip() {
+        if (mainAccessToTask.isAccess()) {
+            TrackBean trackBean = new TrackBean();
+            trackBean.getAttributes().setAction("skip");
+            trackBean.getAttributes().setEditor("josm");
+            trackBean.getAttributes().setUser(josmUserIdentityManager.getUserName());
+            trackBean.getAttributes().setKey(mainAccessToTask.getKey());
+            itemTrackController.send_track_skip(mainAccessToTask.getTrack_url(), trackBean);
+        }
+        get_new_item();
+    }
+
+    public void fixed() {
+        if (mainAccessToTask.isAccess()) {
+            FixedBean fixedBean = new FixedBean();
+            fixedBean.setUser(josmUserIdentityManager.getUserName());
+            fixedBean.setKey(mainAccessToTask.getKey());
+            itemTrackController.send_track_fix(mainAccessToTask.getFixed_url(), fixedBean);
+        }
+        get_new_item();
+    }
+
+    public void noterror() {
+        if (mainAccessToTask.isAccess()) {
+
+            FixedBean NoterrorBean = new FixedBean();
+            NoterrorBean.setUser(josmUserIdentityManager.getUserName());
+            NoterrorBean.setKey(mainAccessToTask.getKey());
+            itemTrackController.send_track_noterror(mainAccessToTask.getNoterror_url(), NoterrorBean);
+
+        }
+        get_new_item();
+    }
+
+    private void get_new_item() {
+        item.setStatus(0);
+        itemController.setAccessToTask(mainAccessToTask);
+        item = itemController.getItem();
+        switch (item.getStatus()) {
+            case 200:
+                mainAccessToTask.setAccess(true);
+                mainAccessToTask = tofixTask.work(item, mainAccessToTask, zise);
+                edit();
+                break;
+            case 410:
+                mainAccessToTask.setAccess(false);
+                tofixTask.task_complete(item, mainAccessToTask);
+                break;
+            case 503:
+                mainAccessToTask.setAccess(false);
+                JOptionPane.showMessageDialog(Main.panel, tr("Maintenance server"), tr("Warning"), JOptionPane.WARNING_MESSAGE);
+                break;
+            case 520:
+                mainAccessToTask.setAccess(false);
+                JLabel text = new javax.swing.JLabel();
+                text.setText(tr("<html>Somethig went wrong, please update Tofix plugin  or open a ticket in <a href=\"\">josm-tofix-plugin/issues</a></html>"));
+                text.setCursor(new Cursor(Cursor.HAND_CURSOR));
+                text.addMouseListener(new MouseAdapter() {
+                    @Override
+                    public void mouseClicked(MouseEvent e) {
+                        OpenBrowser.displayUrl(Config.URL_TOFIX_ISSUES);
+                    }
+                });
+                JOptionPane.showMessageDialog(Main.panel, text, tr("Warning"), JOptionPane.WARNING_MESSAGE);
+                break;
+            default:
+                mainAccessToTask.setAccess(false);
+                JOptionPane.showMessageDialog(Main.panel, tr("Somethig went wrong, try to again.,"), tr("Warning"), JOptionPane.WARNING_MESSAGE);
+        }
+    }
+
+}
Index: /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/TofixDraw.java
===================================================================
--- /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/TofixDraw.java	(revision 31614)
+++ /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/TofixDraw.java	(revision 31614)
@@ -0,0 +1,77 @@
+package org.openstreetmap.josm.plugins.tofix;
+
+import java.util.List;
+import javax.swing.JOptionPane;
+import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.data.Bounds;
+import org.openstreetmap.josm.data.coor.LatLon;
+import org.openstreetmap.josm.data.osm.Node;
+import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor;
+import org.openstreetmap.josm.gui.MapView;
+import org.openstreetmap.josm.plugins.tofix.bean.items.ItemUnconnectedBean;
+import static org.openstreetmap.josm.tools.I18n.tr;
+
+/**
+ *
+ * @author ruben
+ */
+
+public class TofixDraw {
+
+    ItemUnconnectedBean itemBean = null;
+
+    public static void draw_Node(final TofixLayer tofixLayer, LatLon latLon) {
+        MapView mv = Main.map.mapView;
+        Bounds bounds = null;
+        if (latLon.isOutSideWorld()) {
+            JOptionPane.showMessageDialog(Main.parent, tr("Can not find outside of the world."));
+            return;
+        }
+        BoundingXYVisitor v = new BoundingXYVisitor();
+
+        v.visit(new Bounds(latLon.toBBox(0.0007).toRectangle()));
+        Main.map.mapView.zoomTo(v);
+        if (!Main.map.mapView.hasLayer(tofixLayer)) {
+            mv.addLayer(tofixLayer);
+            tofixLayer.add_Node(latLon);
+        } else {
+            tofixLayer.add_Node(latLon);
+        }
+    }
+
+    public static void draw_line(final TofixLayer tofixLayer, LatLon latLon, List<List<Node>> list_nodes) {
+        MapView mv = Main.map.mapView;
+        Bounds bounds = null;
+        if (latLon.isOutSideWorld()) {
+            JOptionPane.showMessageDialog(Main.parent, tr("Can not find outside of the world."));
+            return;
+        }
+        BoundingXYVisitor v = new BoundingXYVisitor();
+        v.visit(new Bounds(latLon.toBBox(0.0007).toRectangle()));
+        Main.map.mapView.zoomTo(v);
+        if (!Main.map.mapView.hasLayer(tofixLayer)) {
+            mv.addLayer(tofixLayer);
+            tofixLayer.add_Line(list_nodes);
+        } else {
+            tofixLayer.add_Line(list_nodes);
+        }
+    }
+
+    public static void draw_nodes(final TofixLayer tofixLayer, LatLon latLon, List<Node> list_nodes) {
+        MapView mv = Main.map.mapView;
+        Bounds bounds = null;
+        if (latLon.isOutSideWorld()) {
+            JOptionPane.showMessageDialog(Main.parent, tr("Can not find outside of the world."));
+            return;
+        }
+        BoundingXYVisitor v = new BoundingXYVisitor();
+        v.visit(new Bounds(latLon.toBBox(0.0007).toRectangle()));
+        Main.map.mapView.zoomTo(v);
+        if (!Main.map.mapView.hasLayer(tofixLayer)) {
+            mv.addLayer(tofixLayer);
+            tofixLayer.add_Nodes(list_nodes);
+        } else {
+            tofixLayer.add_Nodes(list_nodes);
+        }
+    }
+}
Index: /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/TofixLayer.java
===================================================================
--- /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/TofixLayer.java	(revision 31614)
+++ /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/TofixLayer.java	(revision 31614)
@@ -0,0 +1,125 @@
+package org.openstreetmap.josm.plugins.tofix;
+
+import java.awt.BasicStroke;
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.Point;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.Collection;
+import java.util.List;
+import javax.swing.Action;
+import javax.swing.Icon;
+import javax.swing.JOptionPane;
+import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.data.Bounds;
+import org.openstreetmap.josm.data.coor.LatLon;
+import org.openstreetmap.josm.data.osm.Node;
+import org.openstreetmap.josm.data.osm.OsmPrimitive;
+import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor;
+import org.openstreetmap.josm.gui.MapView;
+import org.openstreetmap.josm.gui.dialogs.LayerListDialog;
+import org.openstreetmap.josm.gui.dialogs.LayerListPopup;
+import org.openstreetmap.josm.gui.layer.Layer;
+import static org.openstreetmap.josm.tools.I18n.tr;
+import org.openstreetmap.josm.tools.ImageProvider;
+
+public class TofixLayer extends Layer implements ActionListener {
+
+    LatLon latLon;
+    List<List<Node>> list_list_nodes;
+    List<Node> list_nodes;
+    String type = "";
+
+    public TofixLayer(String name) {
+        super(name);
+    }
+    // private static final Icon icon = new ImageIcon("icontofix.png");
+    final Collection<OsmPrimitive> points = Main.main.getInProgressSelection();
+
+    @Override
+    public Icon getIcon() {
+        return ImageProvider.get("layer", "marker_small");
+    }
+
+    @Override
+    public String getToolTipText() {
+        return tr("Layer to draw OSM error");
+    }
+
+    @Override
+    public boolean isMergable(Layer other) {
+        return false;
+    }
+
+    public void add_Node(LatLon latLon) {
+        type = "draw_node";
+        this.latLon = latLon;
+        Main.map.mapView.repaint();
+    }
+
+    public void add_Line(List<List<Node>> list_nodes) {
+        type = "draw_line";
+        this.list_list_nodes = list_nodes;
+        Main.map.mapView.repaint();
+    }
+
+    public void add_Nodes(List<Node> list_nodes) {
+        type = "draw_nodes";
+        this.list_nodes = list_nodes;
+        Main.map.mapView.repaint();
+    }
+
+    @Override
+    public void paint(Graphics2D g, final MapView mv, Bounds bounds) {
+        g.setColor(new Color(254, 30, 123));
+        g.setStroke(new BasicStroke((float) 5));
+        if (type.equals("draw_node")) {
+            Point pnt = mv.getPoint(latLon);
+            g.drawOval(pnt.x - 25, pnt.y - 25, 50, 50);
+        } else if (type.equals("draw_line")) {
+            for (List<Node> l_nodes : list_list_nodes) {
+                for (int i = 0; i < l_nodes.size() - 1; i++) {
+                    Point pnt1 = mv.getPoint(l_nodes.get(i).getCoor());
+                    Point pnt2 = mv.getPoint(l_nodes.get(i + 1).getCoor());
+                    g.drawLine(pnt1.x, pnt1.y, pnt2.x, pnt2.y);
+                }
+            }
+        } else if (type.equals("draw_nodes")) {
+            for (Node node : list_nodes) {
+                Point pnt = mv.getPoint(node.getCoor());
+                g.drawOval(pnt.x - 5, pnt.y - 5, 10, 10);
+            }
+        }
+
+//add for others ways
+    }
+
+    @Override
+    public void visitBoundingBox(BoundingXYVisitor v) {
+        // nothing to do here
+    }
+
+    @Override
+    public Object getInfoComponent() {
+        return getToolTipText();
+    }
+
+    @Override
+    public Action[] getMenuEntries() {
+        return new Action[]{
+            LayerListDialog.getInstance().createShowHideLayerAction(),
+            SeparatorLayerAction.INSTANCE,
+            SeparatorLayerAction.INSTANCE,
+            new LayerListPopup.InfoAction(this)};
+    }
+
+    @Override
+    public void actionPerformed(ActionEvent e) {
+        JOptionPane.showConfirmDialog(null, e.getSource());
+    }
+
+    @Override
+    public void mergeFrom(Layer layer) {
+    }
+}
Index: /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/TofixPlugin.java
===================================================================
--- /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/TofixPlugin.java	(revision 31614)
+++ /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/TofixPlugin.java	(revision 31614)
@@ -0,0 +1,23 @@
+package org.openstreetmap.josm.plugins.tofix;
+
+import org.openstreetmap.josm.gui.IconToggleButton;
+import org.openstreetmap.josm.gui.MapFrame;
+import org.openstreetmap.josm.plugins.Plugin;
+import org.openstreetmap.josm.plugins.PluginInformation;
+
+public class TofixPlugin extends Plugin {
+
+    private IconToggleButton btn;
+    protected static TofixDialog tofixDialog;
+ 
+    public TofixPlugin(PluginInformation info) {
+        super(info);
+    }
+
+    @Override
+    public void mapFrameInitialized(MapFrame oldFrame, MapFrame newFrame) {
+        if (newFrame != null) {
+            newFrame.addToggleDialog(tofixDialog = new TofixDialog());
+        }
+    }
+}
Index: /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/TofixTask.java
===================================================================
--- /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/TofixTask.java	(revision 31614)
+++ /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/TofixTask.java	(revision 31614)
@@ -0,0 +1,140 @@
+package org.openstreetmap.josm.plugins.tofix;
+
+import java.text.DecimalFormat;
+import java.util.List;
+import javax.swing.JOptionPane;
+import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.actions.downloadtasks.DownloadOsmTask;
+import org.openstreetmap.josm.data.Bounds;
+import org.openstreetmap.josm.data.coor.LatLon;
+import org.openstreetmap.josm.data.osm.Node;
+import org.openstreetmap.josm.gui.io.UploadDialog;
+import org.openstreetmap.josm.plugins.tofix.bean.AccessToTask;
+import org.openstreetmap.josm.plugins.tofix.bean.items.Item;
+import org.openstreetmap.josm.plugins.tofix.bean.items.ItemKeeprightBean;
+import org.openstreetmap.josm.plugins.tofix.bean.items.ItemKrakatoaBean;
+import org.openstreetmap.josm.plugins.tofix.bean.items.ItemSmallcomponents;
+import org.openstreetmap.josm.plugins.tofix.bean.items.ItemStrava;
+import org.openstreetmap.josm.plugins.tofix.bean.items.ItemTigerdeltaBean;
+import org.openstreetmap.josm.plugins.tofix.bean.items.ItemUnconnectedBean;
+import org.openstreetmap.josm.plugins.tofix.bean.items.ItemUsaBuildingsBean;
+import org.openstreetmap.josm.plugins.tofix.controller.ItemController;
+import org.openstreetmap.josm.plugins.tofix.util.Download;
+import static org.openstreetmap.josm.tools.I18n.tr;
+
+/**
+ *
+ * @author ruben
+ */
+public class TofixTask {
+
+    ItemController itemController = new ItemController();
+    Bounds bounds = null;
+    DownloadOsmTask downloadOsmTask = new DownloadOsmTask();
+    Node node = null;
+    TofixLayer tofixLayer = new TofixLayer("Tofix-layer");
+
+    public AccessToTask work(Item item, AccessToTask accessToTask, double size) { //size to download
+
+        if (accessToTask.getTask_source().equals("unconnected")) {
+            accessToTask = work_unconnected(item.getItemUnconnectedBean(), accessToTask, size);
+        }
+        if (accessToTask.getTask_source().equals("keepright")) {
+            accessToTask = work_keepright(item.getItemKeeprightBean(), accessToTask, size);
+        }
+        if (accessToTask.getTask_source().equals("tigerdelta")) {
+            accessToTask = work_tigerdelta(item.getItemTigerdeltaBean(), accessToTask, size);
+        }
+        if (accessToTask.getTask_source().equals("nycbuildings")) {
+            accessToTask = work_nycbuildings(item.getItemUsabuildingsBean(), accessToTask, size);
+        }
+        if (accessToTask.getTask_source().equals("krakatoa")) {
+            accessToTask = work_krakatoa(item.getItemKrakatoaBean(), accessToTask, size);
+        }
+        if (accessToTask.getTask_source().equals("strava")) {
+            accessToTask = work_strava(item.getItemStrava(), accessToTask, size);
+        }
+        if (accessToTask.getTask_source().equals("components")) {
+            accessToTask = work_smallcomponents(item.getItemSmallcomponents(), accessToTask, size);
+        }
+
+        UploadDialog.getUploadDialog().getChangeset().getCommentsCount();
+        return accessToTask;
+    }
+
+    private AccessToTask work_unconnected(ItemUnconnectedBean itemUnconnectedBean, AccessToTask accessToTask, double size) {
+        accessToTask.setKey(itemUnconnectedBean.getKey());
+        node = itemUnconnectedBean.get_node();
+        bounds = new Bounds(node.getCoor().toBBox(size).toRectangle());
+        TofixDraw.draw_Node(tofixLayer, node.getCoor());
+        Download.Download(downloadOsmTask, bounds, itemUnconnectedBean.getNode_id());
+        return accessToTask;
+    }
+
+    private AccessToTask work_keepright(ItemKeeprightBean itemKeeprightBean, AccessToTask accessToTask, double size) {
+        accessToTask.setKey(itemKeeprightBean.getKey());
+        node = itemKeeprightBean.get_node();
+        bounds = new Bounds(node.getCoor().toBBox(size).toRectangle());
+        TofixDraw.draw_Node(tofixLayer, node.getCoor());
+        Download.Download(downloadOsmTask, bounds, itemKeeprightBean.getObject_id());
+        return accessToTask;
+
+    }
+
+    private AccessToTask work_nycbuildings(ItemUsaBuildingsBean itemNycbuildingsBean, AccessToTask accessToTask, double size) {
+        accessToTask.setKey(itemNycbuildingsBean.getKey());
+        node = itemNycbuildingsBean.get_node();
+        bounds = new Bounds(node.getCoor().toBBox(size).toRectangle());
+        TofixDraw.draw_Node(tofixLayer, node.getCoor());
+        Download.Download(downloadOsmTask, bounds, itemNycbuildingsBean.osm_obj_id());
+        return accessToTask;
+    }
+
+    private AccessToTask work_tigerdelta(ItemTigerdeltaBean itemTigerdeltaBean, AccessToTask accessToTask, double size) {
+        accessToTask.setKey(itemTigerdeltaBean.getKey());
+        List<List<Node>> list = itemTigerdeltaBean.get_nodes();
+        node = new Node(new LatLon(list.get(0).get(0).getCoor().lat(), list.get(0).get(0).getCoor().lon()));
+        bounds = new Bounds(node.getCoor().toBBox(size).toRectangle());
+        TofixDraw.draw_line(tofixLayer, node.getCoor(), list);
+        Download.Download(downloadOsmTask, bounds, 0x0L);//0x0L = null porque no exixte el id del objeto
+        return accessToTask;
+    }
+
+    private AccessToTask work_krakatoa(ItemKrakatoaBean itemkrakatoaBean, AccessToTask accessToTask, double size) {
+        accessToTask.setKey(itemkrakatoaBean.getKey());
+        List<Node> list = itemkrakatoaBean.get_nodes();
+        node = new Node(new LatLon(list.get(0).getCoor().lat(), list.get(0).getCoor().lon()));
+        bounds = new Bounds(node.getCoor().toBBox(size).toRectangle());
+        TofixDraw.draw_nodes(tofixLayer, node.getCoor(), list);
+        Download.Download(downloadOsmTask, bounds, 0x0L);//0x0L = null porque no exixte el id del objeto
+        return accessToTask;
+    }
+
+    private AccessToTask work_strava(ItemStrava itemStrava, AccessToTask accessToTask, double size) {
+        accessToTask.setKey(itemStrava.getKey());
+        node = itemStrava.get_node();
+        bounds = new Bounds(node.getCoor().toBBox(size).toRectangle());
+        TofixDraw.draw_Node(tofixLayer, node.getCoor());
+        Download.Download(downloadOsmTask, bounds, 0x0L);
+        return accessToTask;
+    }
+
+    private AccessToTask work_smallcomponents(ItemSmallcomponents itemSmallcomponents, AccessToTask accessToTask, double size) {
+        accessToTask.setKey(itemSmallcomponents.getKey());
+        List<List<Node>> list = itemSmallcomponents.get_nodes();
+        node = new Node(new LatLon(list.get(0).get(0).getCoor().lat(), list.get(0).get(0).getCoor().lon()));
+        bounds = new Bounds(node.getCoor().toBBox(size).toRectangle());
+        TofixDraw.draw_line(tofixLayer, node.getCoor(), list);
+        Download.Download(downloadOsmTask, bounds, 0x0L);//0x0L = null porque no exixte el id del objeto
+        return accessToTask;
+    }
+
+    public void task_complete(Item item, AccessToTask accessToTask) {
+        DecimalFormat myFormatter = new DecimalFormat("#,###");
+        String num = myFormatter.format(item.getTaskCompleteBean().getTotal());
+        String message = "Task : " + accessToTask.getTask_name() + " was completed\n"
+                + "Total items : " + num;
+        JOptionPane.showMessageDialog(Main.panel, tr(message));
+    }
+
+}
Index: /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/bean/AccessToTask.java
===================================================================
--- /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/bean/AccessToTask.java	(revision 31614)
+++ /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/bean/AccessToTask.java	(revision 31614)
@@ -0,0 +1,98 @@
+package org.openstreetmap.josm.plugins.tofix.bean;
+
+import org.openstreetmap.josm.plugins.tofix.util.Config;
+
+/**
+ *
+ * @author ruben
+ */
+public class AccessToTask {
+
+    private String host = Config.HOST;
+    private String task_id;
+    private String task_source;
+    private String task_name;
+    private boolean access;
+    private Long osm_obj_id;
+    private String key;
+
+    public AccessToTask(String task_id, String task_source, boolean access) {
+        this.task_id = task_id;
+        this.task_source = task_source;
+        this.access = access;
+    }
+
+    public String getHost() {
+        return host;
+    }
+
+    public void setHost(String host) {
+        this.host = host;
+    }
+
+    public String getTask_url() {
+        String url = this.getHost() + "task/" + this.getTask_id();
+        return url;
+    }
+
+    public String getTask_id() {
+        return task_id;
+    }
+
+    public void setTask_id(String task) {
+        this.task_id = task;
+    }
+
+    public String getTask_source() {
+        return task_source;
+    }
+
+    public void setTask_source(String task_source) {
+        this.task_source = task_source;
+    }
+
+    public boolean isAccess() {
+        return access;
+    }
+
+    public void setAccess(boolean access) {
+        this.access = access;
+    }
+
+    public String getTrack_url() {
+        return getHost() + "track/" + getTask_id();
+    }
+
+    public String getFixed_url() {
+        return getHost() + "fixed/" + getTask_id();
+    }
+
+    public String getNoterror_url() {
+        return getHost() + "noterror/" + getTask_id();
+    }
+
+    public Long getOsm_obj_id() {
+        return osm_obj_id;
+    }
+
+    public void setOsm_obj_id(Long osm_obj_id) {
+        this.osm_obj_id = osm_obj_id;
+    }
+
+    public String getKey() {
+        return key;
+    }
+
+    public void setKey(String key) {
+        this.key = key;
+    }
+
+    public String getTask_name() {
+        return task_name;
+    }
+
+    public void setTask_name(String task_name) {
+        this.task_name = task_name;
+    }
+
+}
Index: /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/bean/FixedBean.java
===================================================================
--- /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/bean/FixedBean.java	(revision 31614)
+++ /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/bean/FixedBean.java	(revision 31614)
@@ -0,0 +1,28 @@
+package org.openstreetmap.josm.plugins.tofix.bean;
+
+/**
+ *
+ * @author ruben
+ */
+public class FixedBean {
+    private String user;
+    private String key;
+    //private String editor;
+
+    public String getUser() {
+        return user;
+    }
+
+    public void setUser(String user) {
+        this.user = user;
+    }
+
+    public String getKey() {
+        return key;
+    }
+
+    public void setKey(String key) {
+        this.key = key;
+    }
+    
+}
Index: /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/bean/ListTaskBean.java
===================================================================
--- /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/bean/ListTaskBean.java	(revision 31614)
+++ /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/bean/ListTaskBean.java	(revision 31614)
@@ -0,0 +1,20 @@
+package org.openstreetmap.josm.plugins.tofix.bean;
+
+import java.util.List;
+
+/**
+ *
+ * @author ruben
+ */
+public class ListTaskBean {
+
+    private List<TaskBean> tasks;
+
+    public List<TaskBean> getTasks() {
+        return tasks;
+    }
+
+    public void setTasks(List<TaskBean> tasks) {
+        this.tasks = tasks;
+    }
+}
Index: /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/bean/ResponseBean.java
===================================================================
--- /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/bean/ResponseBean.java	(revision 31614)
+++ /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/bean/ResponseBean.java	(revision 31614)
@@ -0,0 +1,30 @@
+package org.openstreetmap.josm.plugins.tofix.bean;
+
+/**
+ * 
+ *
+ * @author ruben
+ */
+public class ResponseBean {
+
+    private int status;
+    private String value;//String from server response 
+
+    public int getStatus() {
+        return status;
+    }
+
+    public void setStatus(int status) {
+        this.status = status;
+    }
+
+    public String getValue() {
+        return value;
+    }
+
+    public void setValue(String value) {
+        this.value = value;
+    }
+    
+    
+}
Index: /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/bean/StatusBean.java
===================================================================
--- /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/bean/StatusBean.java	(revision 31614)
+++ /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/bean/StatusBean.java	(revision 31614)
@@ -0,0 +1,23 @@
+package org.openstreetmap.josm.plugins.tofix.bean;
+
+/**
+ *
+ * @author ruben
+ */
+public class StatusBean {
+
+    private String status;
+
+    public StatusBean(String status) {
+        this.status = status;
+    }
+
+    public String getStatus() {
+        return status;
+    }
+
+    public void setStatus(String status) {
+        this.status = status;
+    }
+
+}
Index: /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/bean/TaskBean.java
===================================================================
--- /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/bean/TaskBean.java	(revision 31614)
+++ /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/bean/TaskBean.java	(revision 31614)
@@ -0,0 +1,36 @@
+package org.openstreetmap.josm.plugins.tofix.bean;
+/**
+ *
+ * @author ruben
+ */
+public class TaskBean {
+
+    private String id;
+    private String title;
+    private String source;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    public String getSource() {
+        return source;
+    }
+
+    public void setSource(String source) {
+        this.source = source;
+    }
+
+}
Index: /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/bean/TaskCompleteBean.java
===================================================================
--- /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/bean/TaskCompleteBean.java	(revision 31614)
+++ /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/bean/TaskCompleteBean.java	(revision 31614)
@@ -0,0 +1,19 @@
+package org.openstreetmap.josm.plugins.tofix.bean;
+
+/**
+ *
+ * @author ruben
+ */
+public class TaskCompleteBean {
+
+    int total;
+
+    public int getTotal() {
+        return total;
+    }
+
+    public void setTotal(int total) {
+        this.total = total;
+    }
+
+}
Index: /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/bean/TrackBean.java
===================================================================
--- /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/bean/TrackBean.java	(revision 31614)
+++ /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/bean/TrackBean.java	(revision 31614)
@@ -0,0 +1,61 @@
+package org.openstreetmap.josm.plugins.tofix.bean;
+
+/**
+ *
+ * @author ruben
+ */
+public class TrackBean {
+
+    AttributesBean attributes = new AttributesBean();
+
+    public AttributesBean getAttributes() {
+        return attributes;
+    }
+
+    public void setAttributes(AttributesBean attributes) {
+        this.attributes = attributes;
+    }
+   
+    //Atributos
+    public class AttributesBean {
+
+        String user;
+        String action;
+        String key;
+        String editor;
+
+        public String getUser() {
+            return user;
+        }
+
+        public void setUser(String user) {
+            this.user = user;
+        }
+
+        public String getAction() {
+            return action;
+        }
+
+        public void setAction(String action) {
+            this.action = action;
+        }
+
+        public String getKey() {
+            return key;
+        }
+
+        public void setKey(String key) {
+            this.key = key;
+        }
+
+        public String getEditor() {
+            return editor;
+        }
+
+        public void setEditor(String editor) {
+            this.editor = editor;
+        }
+
+    }
+
+}
Index: /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/bean/UserBean.java
===================================================================
--- /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/bean/UserBean.java	(revision 31614)
+++ /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/bean/UserBean.java	(revision 31614)
@@ -0,0 +1,18 @@
+package org.openstreetmap.josm.plugins.tofix.bean;
+
+/**
+ *
+ * @author ruben
+ */
+public class UserBean {
+    String user;
+
+    public String getUser() {
+        return user;
+    }
+
+    public void setUser(String user) {
+        this.user = user;
+    }
+    
+}
Index: /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/bean/items/Item.java
===================================================================
--- /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/bean/items/Item.java	(revision 31614)
+++ /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/bean/items/Item.java	(revision 31614)
@@ -0,0 +1,93 @@
+package org.openstreetmap.josm.plugins.tofix.bean.items;
+
+import org.openstreetmap.josm.plugins.tofix.bean.TaskCompleteBean;
+
+/**
+ *
+ * @author ruben
+ */
+public class Item {
+
+    private int status;
+    private ItemKeeprightBean itemKeeprightBean;
+    private ItemKrakatoaBean itemKrakatoaBean;
+    private ItemUsaBuildingsBean itemUsabuildingsBean;
+    private ItemTigerdeltaBean itemTigerdeltaBean;
+    private ItemUnconnectedBean itemUnconnectedBean;
+    private TaskCompleteBean taskCompleteBean;
+    private ItemStrava itemStrava;
+    private ItemSmallcomponents itemSmallcomponents;
+
+    public int getStatus() {
+        return status;
+    }
+
+    public void setStatus(int status) {
+        this.status = status;
+    }
+
+    public TaskCompleteBean getTaskCompleteBean() {
+        return taskCompleteBean;
+    }
+
+    public void setTaskCompleteBean(TaskCompleteBean taskCompleteBean) {
+        this.taskCompleteBean = taskCompleteBean;
+    }
+
+    public ItemKeeprightBean getItemKeeprightBean() {
+        return itemKeeprightBean;
+    }
+
+    public void setItemKeeprightBean(ItemKeeprightBean itemKeeprightBean) {
+        this.itemKeeprightBean = itemKeeprightBean;
+    }
+
+    public ItemKrakatoaBean getItemKrakatoaBean() {
+        return itemKrakatoaBean;
+    }
+
+    public void setItemKrakatoaBean(ItemKrakatoaBean itemKrakatoaBean) {
+        this.itemKrakatoaBean = itemKrakatoaBean;
+    }
+
+    public ItemUsaBuildingsBean getItemUsabuildingsBean() {
+        return itemUsabuildingsBean;
+    }
+
+    public void setItemUsabuildingsBean(ItemUsaBuildingsBean itemNycbuildingsBean) {
+        this.itemUsabuildingsBean = itemNycbuildingsBean;
+    }
+
+    public ItemTigerdeltaBean getItemTigerdeltaBean() {
+        return itemTigerdeltaBean;
+    }
+
+    public void setItemTigerdeltaBean(ItemTigerdeltaBean itemTigerdeltaBean) {
+        this.itemTigerdeltaBean = itemTigerdeltaBean;
+    }
+
+    public ItemUnconnectedBean getItemUnconnectedBean() {
+        return itemUnconnectedBean;
+    }
+
+    public void setItemUnconnectedBean(ItemUnconnectedBean itemUnconnectedBean) {
+        this.itemUnconnectedBean = itemUnconnectedBean;
+    }
+
+    public ItemStrava getItemStrava() {
+        return itemStrava;
+    }
+
+    public void setItemStrava(ItemStrava itemStrava) {
+        this.itemStrava = itemStrava;
+    }
+
+    public ItemSmallcomponents getItemSmallcomponents() {
+        return itemSmallcomponents;
+    }
+
+    public void setItemSmallcomponents(ItemSmallcomponents itemSmallcomponents) {
+        this.itemSmallcomponents = itemSmallcomponents;
+    }
+
+}
Index: /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/bean/items/ItemKeeprightBean.java
===================================================================
--- /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/bean/items/ItemKeeprightBean.java	(revision 31614)
+++ /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/bean/items/ItemKeeprightBean.java	(revision 31614)
@@ -0,0 +1,50 @@
+package org.openstreetmap.josm.plugins.tofix.bean.items;
+
+import java.util.Arrays;
+import org.openstreetmap.josm.data.coor.LatLon;
+import org.openstreetmap.josm.data.osm.Node;
+
+/**
+ *
+ * @author ruben
+ */
+public class ItemKeeprightBean extends ItemTask {
+
+    String object_type;
+    Long object_id;
+    String st_astext;
+
+    public String getObject_type() {
+        return object_type;
+    }
+
+    public void setObject_type(String object_type) {
+        this.object_type = object_type;
+    }
+
+    public Long getObject_id() {
+        return object_id;
+    }
+
+    public void setObject_id(Long object_id) {
+        this.object_id = object_id;
+    }
+
+    public String getSt_astext() {
+        return st_astext;
+    }
+
+    public void setSt_astext(String st_astext) {
+        this.st_astext = st_astext;
+    }
+
+    public Node get_node() {
+        String str = getSt_astext().replaceAll("[^-?0-9.]+", " ");
+        Double lat = Double.parseDouble(Arrays.asList(str.trim().split(" ")).get(1));
+        Double lon = Double.parseDouble(Arrays.asList(str.trim().split(" ")).get(0));
+        LatLon coor = new LatLon(lat, lon);
+        Node node = new Node(coor);
+        return node;
+    }
+
+}
Index: /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/bean/items/ItemKrakatoaBean.java
===================================================================
--- /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/bean/items/ItemKrakatoaBean.java	(revision 31614)
+++ /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/bean/items/ItemKrakatoaBean.java	(revision 31614)
@@ -0,0 +1,52 @@
+package org.openstreetmap.josm.plugins.tofix.bean.items;
+
+import java.util.LinkedList;
+import java.util.List;
+import org.openstreetmap.josm.data.coor.LatLon;
+import org.openstreetmap.josm.data.osm.Node;
+
+/**
+ *
+ * @author ruben
+ */
+public class ItemKrakatoaBean extends ItemTask {
+
+    private String geom;
+
+    public String getGeom() {
+        return geom;
+    }
+
+    public void setGeom(String geom) {
+        this.geom = geom;
+    }
+
+    public List<Node> get_nodes() {
+        String geoString = getGeom();
+        List<Node> list = new LinkedList<Node>();
+        String multipoint = geoString.substring(0, 10);
+        if (multipoint.equalsIgnoreCase("MULTIPOINT")) {
+            geoString = geoString.replace("MULTIPOINT(", "").replace(")", "");
+            String[] arr = geoString.split(",");
+            for (int i = 0; i < arr.length; i++) {
+                String[] latlon = arr[i].split(" ");
+                LatLon latLon = new LatLon(Double.parseDouble(arr[i].split(" ")[1]), Double.parseDouble(arr[i].split(" ")[0]));
+                Node node = new Node(latLon);
+                list.add(node);
+            }
+        }
+        multipoint = geoString.substring(0, 5);
+        if (multipoint.equalsIgnoreCase("POINT")) {
+            geoString = geoString.replace("POINT(", "").replace(")", "");
+            String[] arr = geoString.split(",");
+            for (int i = 0; i < arr.length; i++) {
+                String[] latlon = arr[i].split(" ");
+                LatLon latLon = new LatLon(Double.parseDouble(arr[i].split(" ")[1]), Double.parseDouble(arr[i].split(" ")[0]));
+                Node node = new Node(latLon);
+                list.add(node);
+            }
+        }
+        return list;
+    }
+
+}
Index: /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/bean/items/ItemSmallcomponents.java
===================================================================
--- /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/bean/items/ItemSmallcomponents.java	(revision 31614)
+++ /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/bean/items/ItemSmallcomponents.java	(revision 31614)
@@ -0,0 +1,68 @@
+package org.openstreetmap.josm.plugins.tofix.bean.items;
+
+import java.util.LinkedList;
+import java.util.List;
+import org.openstreetmap.josm.data.coor.LatLon;
+import org.openstreetmap.josm.data.osm.Node;
+
+/**
+ *
+ * @author ruben
+ */
+public class ItemSmallcomponents extends ItemTask {
+
+    private String nothing;
+    private String geom;
+
+    public String getNothing() {
+        return nothing;
+    }
+
+    public void setNothing(String nothing) {
+        this.nothing = nothing;
+    }
+
+    public String getGeom() {
+        return geom;
+    }
+
+    public void setGeom(String geom) {
+        this.geom = geom;
+    }
+
+    public List<List<Node>> get_nodes() {
+        String geostring = getGeom();
+        geostring = geostring.replace("MULTILINESTRING (", "").replace("))", ")").replace(", ", ",");
+        geostring = geostring.replace("LINESTRING (", "(");
+        Double[][] cordinates;
+
+        List<List<Node>> list = new LinkedList<List<Node>>();
+        String[] array;
+        if (geostring.contains("), (")) {
+            geostring = geostring.replace(")", "").replace("(", "");
+            array = geostring.split(",\\(");
+            for (int i = 0; i < array.length; i++) {
+                List<Node> l = new LinkedList<Node>();
+                String[] a = array[i].split(",");
+                for (int j = 0; j < a.length; j++) {
+                    LatLon latLon = new LatLon(Double.parseDouble(a[j].split(" ")[1]), Double.parseDouble(a[j].split(" ")[0]));
+                    Node node = new Node(latLon);
+                    l.add(node);
+                }
+                list.add(l);
+            }
+        } else {
+            geostring = geostring.replace(")", "").replace("(", "");
+            array = geostring.split(",");
+            List<Node> l = new LinkedList<Node>();
+            for (int i = 0; i < array.length; i++) {
+                LatLon latLon = new LatLon(Double.parseDouble(array[i].split(" ")[1]), Double.parseDouble(array[i].split(" ")[0]));
+                Node node = new Node(latLon);
+                l.add(node);
+            }
+            list.add(l);
+        }
+        return list;
+    }
+
+}
Index: /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/bean/items/ItemStrava.java
===================================================================
--- /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/bean/items/ItemStrava.java	(revision 31614)
+++ /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/bean/items/ItemStrava.java	(revision 31614)
@@ -0,0 +1,27 @@
+package org.openstreetmap.josm.plugins.tofix.bean.items;
+
+import org.openstreetmap.josm.data.coor.LatLon;
+import org.openstreetmap.josm.data.osm.Node;
+
+public class ItemStrava extends ItemTask {
+
+    private String geom;
+
+    public String getGeom() {
+        return geom;
+    }
+
+    public void setGeom(String geom) {
+        this.geom = geom;
+    }
+
+    public Node get_node() {
+        String geoString = getGeom();
+        geoString = geoString.replace("POINT(", "").replace(")", "");
+        String[] array = geoString.split(" ");
+        LatLon latLon = new LatLon(Double.parseDouble(array[1]), Double.parseDouble(array[0]));
+        Node node = new Node(latLon);
+        return node;
+    }
+
+}
Index: /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/bean/items/ItemTask.java
===================================================================
--- /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/bean/items/ItemTask.java	(revision 31614)
+++ /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/bean/items/ItemTask.java	(revision 31614)
@@ -0,0 +1,20 @@
+
+package org.openstreetmap.josm.plugins.tofix.bean.items;
+
+/**
+ *
+ * @author ruben
+ */
+public class ItemTask {
+
+    private String key;
+
+    public String getKey() {
+        return key;
+    }
+
+    public void setKey(String key) {
+        this.key = key;
+    }
+
+}
Index: /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/bean/items/ItemTigerdeltaBean.java
===================================================================
--- /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/bean/items/ItemTigerdeltaBean.java	(revision 31614)
+++ /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/bean/items/ItemTigerdeltaBean.java	(revision 31614)
@@ -0,0 +1,60 @@
+package org.openstreetmap.josm.plugins.tofix.bean.items;
+
+import java.util.LinkedList;
+import java.util.List;
+import org.openstreetmap.josm.data.coor.LatLon;
+import org.openstreetmap.josm.data.osm.Node;
+
+/**
+ *
+ * @author ruben
+ */
+public class ItemTigerdeltaBean extends ItemTask{
+
+    private String geom;
+
+
+    public String getGeom() {
+        return geom;
+    }
+
+    public void setGeom(String geom) {
+        this.geom = geom;
+    }
+
+    public List<List<Node>> get_nodes() {
+        String geostring = getGeom();
+        geostring = geostring.replace("MULTILINESTRING (", "").replace("))", ")").replace(", ", ",");
+        geostring = geostring.replace("LINESTRING (", "(");
+        Double[][] cordinates;
+
+        List<List<Node>> list = new LinkedList<List<Node>>();
+        String[] array;
+        if (geostring.contains("), (")) {
+            geostring = geostring.replace(")", "").replace("(", "");
+            array = geostring.split(",\\(");
+            for (int i = 0; i < array.length; i++) {
+                List<Node> l = new LinkedList<Node>();
+                String[] a = array[i].split(",");
+                for (int j = 0; j < a.length; j++) {
+                    LatLon latLon = new LatLon(Double.parseDouble(a[j].split(" ")[1]), Double.parseDouble(a[j].split(" ")[0]));
+                    Node node = new Node(latLon);
+                    l.add(node);
+                }
+                list.add(l);
+            }
+        } else {
+            geostring = geostring.replace(")", "").replace("(", "");
+            array = geostring.split(",");
+            List<Node> l = new LinkedList<Node>();
+            for (int i = 0; i < array.length; i++) {
+                LatLon latLon = new LatLon(Double.parseDouble(array[i].split(" ")[1]), Double.parseDouble(array[i].split(" ")[0]));
+                Node node = new Node(latLon);
+                l.add(node);
+            }
+            list.add(l);
+        }
+        return list;
+    }
+
+}
Index: /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/bean/items/ItemUnconnectedBean.java
===================================================================
--- /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/bean/items/ItemUnconnectedBean.java	(revision 31614)
+++ /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/bean/items/ItemUnconnectedBean.java	(revision 31614)
@@ -0,0 +1,48 @@
+package org.openstreetmap.josm.plugins.tofix.bean.items;
+
+import org.openstreetmap.josm.data.coor.LatLon;
+import org.openstreetmap.josm.data.osm.Node;
+
+/**
+ *
+ * @author ruben
+ */
+public class ItemUnconnectedBean extends ItemTask {
+    Long way_id;
+    Long node_id;
+    String st_astext;
+    
+    public Long getWay_id() {
+        return way_id;
+    }
+
+    public void setWay_id(Long way_id) {
+        this.way_id = way_id;
+    }
+
+    public Long getNode_id() {
+        return node_id;
+    }
+
+    public void setNode_id(Long node_id) {
+        this.node_id = node_id;
+    }
+
+    public String getSt_astext() {
+        return st_astext;
+    }
+
+    public void setSt_astext(String st_astext) {
+        this.st_astext = st_astext;
+    }
+
+    public Node get_node() {
+        String geoString = getSt_astext();
+        geoString = geoString.replace("POINT(", "").replace(")", "");
+        String[] array = geoString.split(" ");
+        LatLon latLon = new LatLon(Double.parseDouble(array[1]), Double.parseDouble(array[0]));
+        Node node = new Node(latLon);
+        return node;
+    }
+
+}
Index: /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/bean/items/ItemUsaBuildingsBean.java
===================================================================
--- /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/bean/items/ItemUsaBuildingsBean.java	(revision 31614)
+++ /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/bean/items/ItemUsaBuildingsBean.java	(revision 31614)
@@ -0,0 +1,50 @@
+package org.openstreetmap.josm.plugins.tofix.bean.items;
+
+import org.openstreetmap.josm.data.coor.LatLon;
+import org.openstreetmap.josm.data.osm.Node;
+
+/**
+ *
+ * @author ruben
+ */
+public class ItemUsaBuildingsBean extends ItemTask {
+
+    private Double lat;
+    private Double lon;
+    private String elems;
+
+    public Double getLat() {
+        return lat;
+    }
+
+    public void setLat(Double lat) {
+        this.lat = lat;
+    }
+
+    public Double getLon() {
+        return lon;
+    }
+
+    public void setLon(Double lon) {
+        this.lon = lon;
+    }
+
+    public String getElems() {
+        return elems;
+    }
+
+    public void setElems(String elems) {
+        this.elems = elems;
+    }
+
+    public Long osm_obj_id() {
+        String[] arr = getElems().replace("way", "").split("_");
+        return Long.valueOf(arr[0]);
+    }
+
+    public Node get_node() {
+        Node node = new Node(new LatLon(getLat(), getLon()));
+        return node;
+    }
+
+}
Index: /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/controller/ItemController.java
===================================================================
--- /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/controller/ItemController.java	(revision 31614)
+++ /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/controller/ItemController.java	(revision 31614)
@@ -0,0 +1,175 @@
+package org.openstreetmap.josm.plugins.tofix.controller;
+
+import com.google.gson.Gson;
+import java.io.StringReader;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import javax.json.Json;
+import javax.json.JsonObject;
+import javax.json.JsonReader;
+import org.openstreetmap.josm.plugins.tofix.bean.AccessToTask;
+import org.openstreetmap.josm.plugins.tofix.bean.ResponseBean;
+import org.openstreetmap.josm.plugins.tofix.bean.TaskCompleteBean;
+import org.openstreetmap.josm.plugins.tofix.bean.items.Item;
+import org.openstreetmap.josm.plugins.tofix.bean.items.ItemKeeprightBean;
+import org.openstreetmap.josm.plugins.tofix.bean.items.ItemKrakatoaBean;
+import org.openstreetmap.josm.plugins.tofix.bean.items.ItemUsaBuildingsBean;
+import org.openstreetmap.josm.plugins.tofix.bean.items.ItemSmallcomponents;
+import org.openstreetmap.josm.plugins.tofix.bean.items.ItemStrava;
+import org.openstreetmap.josm.plugins.tofix.bean.items.ItemTigerdeltaBean;
+import org.openstreetmap.josm.plugins.tofix.bean.items.ItemUnconnectedBean;
+
+import org.openstreetmap.josm.plugins.tofix.util.Request;
+import org.openstreetmap.josm.plugins.tofix.util.Util;
+
+/**
+ *
+ * @author ruben
+ */
+public class ItemController {
+
+    Gson gson = new Gson();
+    Item item = new Item();
+    ResponseBean responseBean = new ResponseBean();
+
+    AccessToTask accessToTask;
+
+    public AccessToTask getAccessToTask() {
+        return accessToTask;
+    }
+
+    public void setAccessToTask(AccessToTask accessToTask) {
+        this.accessToTask = accessToTask;
+    }
+
+    public Item getItem() {
+
+        try {
+            responseBean = Request.sendPOST(accessToTask.getTask_url());
+            item.setStatus(responseBean.getStatus());
+            Util.print(responseBean.getValue());
+            JsonReader reader = Json.createReader(new StringReader(responseBean.getValue()));
+            JsonObject object = reader.readObject();
+            //if the structure change , we need to customize this site, to easy resolve , but we need to standardize the source in each task.
+            switch (responseBean.getStatus()) {
+                case 200:
+                    if (accessToTask.getTask_source().equals("unconnected")) {
+                        //https://github.com/osmlab/to-fix/wiki/Task%20sources#unconnected-minor
+                        ItemUnconnectedBean iub = new ItemUnconnectedBean();
+                        iub.setKey(object.getString("key"));
+                        JsonObject value = object.getJsonObject("value");
+                        if (value.containsKey("way_id") && value.containsKey("node_id") && value.containsKey("st_astext")) {
+                            iub.setNode_id(Long.parseLong(value.getString("node_id")));
+                            iub.setWay_id(Long.parseLong(value.getString("way_id")));
+                            iub.setSt_astext(value.getString("st_astext"));
+                            item.setItemUnconnectedBean(iub);
+                        } else if (value.containsKey("X") && value.containsKey("Y") && value.containsKey("way_id") && value.containsKey("node_id")) {
+                            //Format from Arun https://github.com/osmlab/to-fix/wiki/Task%20sources#unconnected-major                           
+                            String st_astext = "POINT(" + value.getString("X") + " " + value.getString("Y") + ")";
+                            iub.setNode_id(Long.parseLong(value.getString("node_id")));
+                            iub.setWay_id(Long.parseLong(value.getString("way_id")));
+                            iub.setSt_astext(st_astext);
+                            item.setItemUnconnectedBean(iub);
+                        } else {
+                            item.setStatus(520);// response 520 Unknown Error                            
+                        }
+                    }
+                    if (accessToTask.getTask_source().equals("keepright")) {
+                        //https://github.com/osmlab/to-fix/wiki/Task%20sources#broken-polygons
+                        ItemKeeprightBean ikb = new ItemKeeprightBean();
+                        ikb.setKey(object.getString("key"));
+                        JsonObject value = object.getJsonObject("value");
+                        if (value.containsKey("object_type") && value.containsKey("object_id") && value.containsKey("st_astext")) {
+                            ikb.setObject_id(Long.parseLong(value.getString("object_id")));
+                            ikb.setObject_type(value.getString("object_type"));
+                            ikb.setSt_astext(value.getString("st_astext"));
+                            item.setItemKeeprightBean(ikb);
+                        } else {
+                            item.setStatus(520);
+                        }
+                    }
+                    if (accessToTask.getTask_source().equals("tigerdelta")) {
+                        //https://github.com/osmlab/to-fix/wiki/Task%20sources#tiger-delta
+                        ItemTigerdeltaBean itb = new ItemTigerdeltaBean();
+                        itb.setKey(object.getString("key"));
+                        JsonObject value = object.getJsonObject("value");
+                        if (value.containsKey("geom")) {
+                            itb.setGeom(value.getString("geom"));
+                            item.setItemTigerdeltaBean(itb);
+                        } else {
+                            item.setStatus(520);
+                        }
+                    }
+                    if (accessToTask.getTask_source().equals("nycbuildings")) {
+                        //https://github.com/osmlab/to-fix/wiki/Task%20sources#usa-overlapping-buildings
+                        ItemUsaBuildingsBean inb = new ItemUsaBuildingsBean();
+                        inb.setKey(object.getString("key"));
+                        JsonObject value = object.getJsonObject("value");
+                        if (value.containsKey("lat") && value.containsKey("lon") && value.containsKey("elems")) {
+                            inb.setLat(Double.parseDouble(value.getString("lat")));
+                            inb.setLon(Double.parseDouble(value.getString("lon")));
+                            inb.setElems(value.getString("elems"));
+                            item.setItemUsabuildingsBean(inb);
+                        } else {
+                            item.setStatus(520);
+                        }
+                    }
+                    if (accessToTask.getTask_source().equals("krakatoa")) {
+                        //https://github.com/osmlab/to-fix/wiki/Task%20sources#krakatoa
+                        ItemKrakatoaBean ikb = new ItemKrakatoaBean();
+                        ikb.setKey(object.getString("key"));
+                        JsonObject value = object.getJsonObject("value");
+                        if (value.containsKey("geom")) {
+                            ikb.setGeom(value.getString("geom"));
+                            item.setItemKrakatoaBean(ikb);
+                        } else {
+                            item.setStatus(520);
+                        }
+                    }
+                    if (accessToTask.getTask_source().equals("strava")) {
+                        //https://github.com/osmlab/to-fix/wiki/Task%20sources#strava
+                        ItemStrava istrava = new ItemStrava();
+                        istrava.setKey(object.getString("key"));
+                        JsonObject value = object.getJsonObject("value");
+                        if (value.containsKey("geom")) {
+                            istrava.setGeom(value.getString("geom"));
+                            item.setItemStrava(istrava);
+                        } else {
+                            item.setStatus(520);
+                        }
+                    }
+                    if (accessToTask.getTask_source().equals("components")) {
+                        //https://github.com/osmlab/to-fix/wiki/Task%20sources#small-components
+                        ItemSmallcomponents isc = new ItemSmallcomponents();
+                        isc.setKey(object.getString("key"));
+                        JsonObject value = object.getJsonObject("value");
+                        if (value.containsKey("nothing") && value.containsKey("geom")) {
+                            isc.setGeom(value.getString("geom"));
+                            isc.setNothing(value.getString("nothing"));
+                            item.setItemSmallcomponents(isc);
+                        } else {
+                            item.setStatus(520);
+                        }
+                    }
+                    break;
+                case 410:
+                    TaskCompleteBean taskCompleteBean = new TaskCompleteBean();
+                    taskCompleteBean.setTotal(0);                   
+                    String total = responseBean.getValue().replaceAll("[^0-9]+", " ");
+                    if (total.trim().split(" ")[1] != null) {
+                        taskCompleteBean.setTotal(Integer.parseInt(total.trim().split(" ")[1]));
+                    }
+                     item.setTaskCompleteBean(taskCompleteBean);
+                    break;
+                case 503:
+                    //Servidor en mantenimiento
+                    break;
+            }
+
+        } catch (Exception ex) {
+            Util.alert(ex);
+            Logger.getLogger(ItemController.class.getName()).log(Level.SEVERE, null, ex);
+        }
+        return item;
+    }
+}
Index: /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/controller/ItemTrackController.java
===================================================================
--- /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/controller/ItemTrackController.java	(revision 31614)
+++ /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/controller/ItemTrackController.java	(revision 31614)
@@ -0,0 +1,52 @@
+package org.openstreetmap.josm.plugins.tofix.controller;
+
+import com.google.gson.Gson;
+import java.io.IOException;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import org.openstreetmap.josm.plugins.tofix.bean.FixedBean;
+import org.openstreetmap.josm.plugins.tofix.bean.TrackBean;
+import org.openstreetmap.josm.plugins.tofix.util.Request;
+
+public class ItemTrackController {
+    public void send_track_edit(String url, TrackBean trackBean) {
+        Gson gson = new Gson();
+        String string_obj = gson.toJson(trackBean);
+        try {
+            Request.sendPOST_Json(url, string_obj);
+        } catch (IOException ex) {
+            Logger.getLogger(ItemTrackController.class.getName()).log(Level.SEVERE, null, ex);
+        }
+    }
+
+    public void send_track_skip(String url, TrackBean trackBean) {
+        Gson gson = new Gson();
+        String string_obj = gson.toJson(trackBean);
+        try {
+            Request.sendPOST_Json(url, string_obj);
+        } catch (IOException ex) {
+            Logger.getLogger(ItemTrackController.class.getName()).log(Level.SEVERE, null, ex);
+        }
+    }
+
+    public void send_track_fix(String url, FixedBean fixedBean) {
+        Gson gson = new Gson();
+        String string_obj = gson.toJson(fixedBean);
+        try {
+            Request.sendPOST_Json(url, string_obj);
+        } catch (IOException ex) {
+            Logger.getLogger(ItemTrackController.class.getName()).log(Level.SEVERE, null, ex);
+        }
+    }
+
+    public void send_track_noterror(String url, FixedBean NoterrorBean) {
+        Gson gson = new Gson();
+        String string_obj = gson.toJson(NoterrorBean);
+        try {
+            Request.sendPOST_Json(url, string_obj);
+        } catch (IOException ex) {
+            Logger.getLogger(ItemTrackController.class.getName()).log(Level.SEVERE, null, ex);
+        }
+
+    }
+}
Index: /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/controller/ListTaskController.java
===================================================================
--- /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/controller/ListTaskController.java	(revision 31614)
+++ /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/controller/ListTaskController.java	(revision 31614)
@@ -0,0 +1,38 @@
+package org.openstreetmap.josm.plugins.tofix.controller;
+
+import com.google.gson.Gson;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import org.openstreetmap.josm.plugins.tofix.bean.ListTaskBean;
+import org.openstreetmap.josm.plugins.tofix.bean.TrackBean;
+import org.openstreetmap.josm.plugins.tofix.util.Config;
+import org.openstreetmap.josm.plugins.tofix.util.Request;
+
+/**
+ *
+ * @author ruben
+ */
+public class ListTaskController {
+
+    private ListTaskBean listTasksBean = null;
+    private String url;
+
+    public ListTaskController() {
+        this.url = Config.HOST + "tasks";
+    }
+
+    public ListTaskBean getListTasksBean() {
+        Gson gson = new Gson();
+        String stringListTaskBean = null;
+        try {
+            stringListTaskBean = Request.sendGET(url);
+
+        } catch (Exception ex) {
+            Logger.getLogger(StatusController.class.getName()).log(Level.SEVERE, null, ex);
+        }
+        listTasksBean = gson.fromJson(stringListTaskBean, ListTaskBean.class);
+        return listTasksBean;
+
+    }
+
+}
Index: /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/controller/StatusController.java
===================================================================
--- /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/controller/StatusController.java	(revision 31614)
+++ /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/controller/StatusController.java	(revision 31614)
@@ -0,0 +1,33 @@
+package org.openstreetmap.josm.plugins.tofix.controller;
+
+import com.google.gson.Gson;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import org.openstreetmap.josm.plugins.tofix.bean.StatusBean;
+import org.openstreetmap.josm.plugins.tofix.util.Request;
+
+/**
+ *
+ * @author ruben
+ */
+public class StatusController {
+
+    private StatusBean statusBean;
+    private final String url;
+    Gson gson = new Gson();
+
+    public StatusController(String url) {
+        this.url = url;
+    }
+
+    public StatusBean getStatusBean() {
+        String stringStatusBean = null;
+        try {
+            stringStatusBean = Request.sendGET(url);
+        } catch (Exception ex) {
+            Logger.getLogger(StatusController.class.getName()).log(Level.SEVERE, null, ex);
+        }
+        statusBean = gson.fromJson(stringStatusBean, StatusBean.class);
+        return statusBean;
+    }
+}
Index: /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/util/Config.java
===================================================================
--- /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/util/Config.java	(revision 31614)
+++ /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/util/Config.java	(revision 31614)
@@ -0,0 +1,9 @@
+package org.openstreetmap.josm.plugins.tofix.util;
+
+public class Config {
+
+    public static final String HOST = "http://54.173.75.173:8000/";
+    public static final String URL_TOFIX = "http://osmlab.github.io/to-fix/";
+    public static final String URL_OSM = "http://www.openstreetmap.org";
+    public static final String URL_TOFIX_ISSUES = "https://github.com/osmlab/josm-tofix-plugin/issues";
+}
Index: /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/util/Download.java
===================================================================
--- /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/util/Download.java	(revision 31614)
+++ /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/util/Download.java	(revision 31614)
@@ -0,0 +1,59 @@
+package org.openstreetmap.josm.plugins.tofix.util;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.Future;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.actions.downloadtasks.DownloadOsmTask;
+import org.openstreetmap.josm.data.Bounds;
+import org.openstreetmap.josm.data.osm.Node;
+import org.openstreetmap.josm.data.osm.OsmPrimitive;
+import org.openstreetmap.josm.data.osm.Relation;
+import org.openstreetmap.josm.data.osm.Way;
+import org.openstreetmap.josm.gui.progress.ProgressMonitor;
+import org.openstreetmap.josm.plugins.tofix.TofixDialog;
+
+/**
+ *
+ * @author ruben
+ */
+public class Download {
+
+    private static Future<?> future;
+
+    public static void Download(final DownloadOsmTask task, Bounds bounds, final Long osm_obj_id) {
+        ProgressMonitor monitor = null;
+        final Future<?> future = task.download(true, bounds, monitor);
+        Runnable runAfterTask = new Runnable() {
+
+            @Override
+            public void run() {
+                try {
+                    if (osm_obj_id != 0) {
+                        future.get();
+                        //create object
+                        Node node = new Node(osm_obj_id);
+                        Relation relation = new Relation(osm_obj_id);
+                        Way way = new Way(osm_obj_id);
+                        //create list of objects
+                        List<OsmPrimitive> selection = new ArrayList<>();
+                        selection.add(way);
+                        selection.add(node);
+                        selection.add(relation);
+                        //make selection ob objects
+                        Main.main.getCurrentDataSet().setSelected(selection);
+                    }
+                } catch (InterruptedException ex) {
+                    Logger.getLogger(TofixDialog.class.getName()).log(Level.SEVERE, null, ex);
+                } catch (ExecutionException ex) {
+                    Logger.getLogger(TofixDialog.class.getName()).log(Level.SEVERE, null, ex);
+                }
+            }
+        };
+
+        Main.worker.submit(runAfterTask);
+    }
+}
Index: /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/util/Request.java
===================================================================
--- /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/util/Request.java	(revision 31614)
+++ /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/util/Request.java	(revision 31614)
@@ -0,0 +1,106 @@
+package org.openstreetmap.josm.plugins.tofix.util;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import org.openstreetmap.josm.plugins.tofix.bean.ResponseBean;
+
+/**
+ *
+ * @author ruben
+ */
+public class Request {
+
+    public static ResponseBean sendPOST(String url) throws Exception {
+        URL obj = new URL(url);
+        HttpURLConnection con = (HttpURLConnection) obj.openConnection();
+        con.setRequestMethod("POST");
+        //START - POST
+        con.setDoOutput(true);
+        OutputStream os = con.getOutputStream();
+        os.flush();
+        os.close();
+        //POST - END
+        int responseCode = con.getResponseCode();
+
+        //Crear un ResponseBean para que regrese el String y el status de la peticion.
+        ResponseBean responseBean = new ResponseBean();
+
+        responseBean.setStatus(responseCode);//agregar el estatus
+
+        if (responseCode == HttpURLConnection.HTTP_OK) {
+
+            BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
+            String inputLine;
+            StringBuffer response = new StringBuffer();
+            while ((inputLine = in.readLine()) != null) {
+                response.append(inputLine);
+            }
+            in.close();
+            //Util.print(response.toString());
+            responseBean.setValue(response.toString());//agrega el valor de la respuesta
+
+        } else if (responseCode == HttpURLConnection.HTTP_GONE) {
+
+            BufferedReader in = new BufferedReader(new InputStreamReader(con.getErrorStream()));
+            String inputLine;
+            StringBuffer response_error = new StringBuffer();
+            while ((inputLine = in.readLine()) != null) {
+                response_error.append(inputLine);
+            }
+            in.close();
+
+            responseBean.setValue(response_error.toString());// agregar respuesta de complete task
+
+        } else {
+
+            responseBean.setValue("error");
+
+        }
+        con.disconnect();
+        return responseBean;
+    }
+
+    public static void sendPOST_Json(String url, String object) throws IOException {
+        HttpURLConnection con = (HttpURLConnection) ((new URL(url).openConnection()));
+        con.setDoOutput(true);
+        con.setRequestProperty("Content-Type", "application/json");
+        con.setRequestProperty("Accept", "application/json");
+        con.setRequestMethod("POST");
+        con.connect();
+        byte[] outputBytes = object.getBytes("UTF-8");
+        OutputStream os = con.getOutputStream();
+        os.write(outputBytes);
+        os.close();
+        int responseCode = con.getResponseCode();
+
+    }
+
+    public static String sendGET(String url) throws IOException {
+        URL obj = new URL(url);
+        HttpURLConnection con = (HttpURLConnection) obj.openConnection();
+        con.setRequestMethod("GET");
+        // con.setRequestProperty("User-Agent", USER_AGENT);
+        int responseCode = con.getResponseCode();
+        if (responseCode == HttpURLConnection.HTTP_OK) {
+            BufferedReader in = new BufferedReader(new InputStreamReader(
+                    con.getInputStream()));
+            String inputLine;
+            StringBuffer response = new StringBuffer();
+            while ((inputLine = in.readLine()) != null) {
+                response.append(inputLine);
+            }
+            in.close();
+            return response.toString();
+
+        } else {
+            System.out.println("GET request not worked");
+            return null;
+        }
+
+    }
+
+}
Index: /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/util/Status.java
===================================================================
--- /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/util/Status.java	(revision 31614)
+++ /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/util/Status.java	(revision 31614)
@@ -0,0 +1,38 @@
+package org.openstreetmap.josm.plugins.tofix.util;
+
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import org.openstreetmap.josm.plugins.tofix.controller.StatusController;
+
+/**
+ *
+ * @author ruben
+ */
+public class Status {
+
+    final static String host = Config.HOST + "status";
+
+    public static boolean server() {
+        StatusController statusController = new StatusController(host);
+        if (statusController.getStatusBean().getStatus().equals("a ok")) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    public static boolean isInternetReachable() {
+        HttpURLConnection activeConnection = null;
+        try {
+            URL url = new URL(Config.URL_OSM);
+            activeConnection = (HttpURLConnection) url.openConnection();
+            activeConnection.connect();
+            return true;
+        } catch (IOException e) {
+            System.err.println("Couldn't connect to the osm server. Please check your internet connection.");
+            return false;
+        }
+    }
+
+}
Index: /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/util/UploadAction.java
===================================================================
--- /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/util/UploadAction.java	(revision 31614)
+++ /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/util/UploadAction.java	(revision 31614)
@@ -0,0 +1,317 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.plugins.tofix.util;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.KeyEvent;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import javax.swing.JOptionPane;
+import javax.swing.SwingUtilities;
+import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.actions.JosmAction;
+import org.openstreetmap.josm.actions.upload.ApiPreconditionCheckerHook;
+import org.openstreetmap.josm.actions.upload.DiscardTagsHook;
+import org.openstreetmap.josm.actions.upload.FixDataHook;
+import org.openstreetmap.josm.actions.upload.RelationUploadOrderHook;
+import org.openstreetmap.josm.actions.upload.UploadHook;
+import org.openstreetmap.josm.actions.upload.ValidateUploadHook;
+import org.openstreetmap.josm.data.APIDataSet;
+import org.openstreetmap.josm.data.conflict.ConflictCollection;
+import org.openstreetmap.josm.gui.HelpAwareOptionPane;
+import org.openstreetmap.josm.gui.help.HelpUtil;
+import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
+import org.openstreetmap.josm.gui.io.UploadDialog;
+import org.openstreetmap.josm.gui.io.UploadPrimitivesTask;
+import org.openstreetmap.josm.gui.layer.AbstractModifiableLayer;
+import org.openstreetmap.josm.gui.layer.OsmDataLayer;
+import org.openstreetmap.josm.gui.util.GuiHelper;
+import static org.openstreetmap.josm.tools.I18n.tr;
+import org.openstreetmap.josm.tools.ImageProvider;
+import org.openstreetmap.josm.tools.Shortcut;
+
+/**
+ * Action that opens a connection to the osm server and uploads all changes.
+ *
+ * An dialog is displayed asking the user to specify a rectangle to grab. The
+ * url and account settings from the preferences are used.
+ *
+ * If the upload fails this action offers various options to resolve conflicts.
+ *
+ * @author imi
+ */
+public class UploadAction extends JosmAction {
+
+    /**
+     * The list of upload hooks. These hooks will be called one after the other
+     * when the user wants to upload data. Plugins can insert their own hooks
+     * here if they want to be able to veto an upload.
+     *
+     * Be default, the standard upload dialog is the only element in the list.
+     * Plugins should normally insert their code before that, so that the upload
+     * dialog is the last thing shown before upload really starts; on occasion
+     * however, a plugin might also want to insert something after that.
+     */
+    private static final List<UploadHook> uploadHooks = new LinkedList<>();
+    private static final List<UploadHook> lateUploadHooks = new LinkedList<>();
+
+    static {
+        /**
+         * Calls validator before upload.
+         */
+        uploadHooks.add(new ValidateUploadHook());
+
+        /**
+         * Fixes database errors
+         */
+        uploadHooks.add(new FixDataHook());
+
+        /**
+         * Checks server capabilities before upload.
+         */
+        uploadHooks.add(new ApiPreconditionCheckerHook());
+
+        /**
+         * Adjusts the upload order of new relations
+         */
+        uploadHooks.add(new RelationUploadOrderHook());
+
+        /**
+         * Removes discardable tags like created_by on modified objects
+         */
+        lateUploadHooks.add(new DiscardTagsHook());
+    }
+
+    /**
+     * Registers an upload hook. Adds the hook at the first position of the
+     * upload hooks.
+     *
+     * @param hook the upload hook. Ignored if null.
+     */
+    public static void registerUploadHook(UploadHook hook) {
+        registerUploadHook(hook, false);
+    }
+
+    /**
+     * Registers an upload hook. Adds the hook at the first position of the
+     * upload hooks.
+     *
+     * @param hook the upload hook. Ignored if null.
+     * @param late true, if the hook should be executed after the upload dialog
+     * has been confirmed. Late upload hooks should in general succeed and not
+     * abort the upload.
+     */
+    public static void registerUploadHook(UploadHook hook, boolean late) {
+        if (hook == null) {
+            return;
+        }
+        if (late) {
+            if (!lateUploadHooks.contains(hook)) {
+                lateUploadHooks.add(0, hook);
+            }
+        } else {
+            if (!uploadHooks.contains(hook)) {
+                uploadHooks.add(0, hook);
+            }
+        }
+    }
+
+    /**
+     * Unregisters an upload hook. Removes the hook from the list of upload
+     * hooks.
+     *
+     * @param hook the upload hook. Ignored if null.
+     */
+    public static void unregisterUploadHook(UploadHook hook) {
+        if (hook == null) {
+            return;
+        }
+        if (uploadHooks.contains(hook)) {
+            uploadHooks.remove(hook);
+        }
+        if (lateUploadHooks.contains(hook)) {
+            lateUploadHooks.remove(hook);
+        }
+    }
+
+    private String customized_comment;
+
+    public UploadAction() {
+        super(tr("Upload data"), "upload", tr("Upload all changes in the active data layer to the OSM server"),
+                Shortcut.registerShortcut("file:upload", tr("File: {0}", tr("Upload data")), KeyEvent.VK_UP, Shortcut.CTRL_SHIFT), true);
+        putValue("help", ht("/Action/Upload"));
+    }
+
+    /**
+     * Refreshes the enabled state
+     *
+     */
+    @Override
+    protected void updateEnabledState() {
+        setEnabled(getEditLayer() != null);
+    }
+
+    public static boolean checkPreUploadConditions(AbstractModifiableLayer layer) {
+        return checkPreUploadConditions(layer,
+                layer instanceof OsmDataLayer ? new APIDataSet(((OsmDataLayer) layer).data) : null);
+    }
+
+    protected static void alertUnresolvedConflicts(OsmDataLayer layer) {
+        HelpAwareOptionPane.showOptionDialog(
+                Main.parent,
+                tr("<html>The data to be uploaded participates in unresolved conflicts of layer ''{0}''.<br>"
+                        + "You have to resolve them first.</html>", layer.getName()
+                ),
+                tr("Warning"),
+                JOptionPane.WARNING_MESSAGE,
+                HelpUtil.ht("/Action/Upload#PrimitivesParticipateInConflicts")
+        );
+    }
+
+    /**
+     * returns true if the user wants to cancel, false if they want to continue
+     */
+    public static boolean warnUploadDiscouraged(AbstractModifiableLayer layer) {
+        return GuiHelper.warnUser(tr("Upload discouraged"),
+                "<html>"
+                + tr("You are about to upload data from the layer ''{0}''.<br /><br />"
+                        + "Sending data from this layer is <b>strongly discouraged</b>. If you continue,<br />"
+                        + "it may require you subsequently have to revert your changes, or force other contributors to.<br /><br />"
+                        + "Are you sure you want to continue?", layer.getName())
+                + "</html>",
+                ImageProvider.get("upload"), tr("Ignore this hint and upload anyway"));
+    }
+
+    /**
+     * Check whether the preconditions are met to upload data in
+     * <code>apiData</code>. Makes sure upload is allowed, primitives in
+     * <code>apiData</code> don't participate in conflicts and runs the
+     * installed {@link UploadHook}s.
+     *
+     * @param layer the source layer of the data to be uploaded
+     * @param apiData the data to be uploaded
+     * @return true, if the preconditions are met; false, otherwise
+     */
+    public static boolean checkPreUploadConditions(AbstractModifiableLayer layer, APIDataSet apiData) {
+        if (layer.isUploadDiscouraged()) {
+            if (warnUploadDiscouraged(layer)) {
+                return false;
+            }
+        }
+        if (layer instanceof OsmDataLayer) {
+            OsmDataLayer osmLayer = (OsmDataLayer) layer;
+            ConflictCollection conflicts = osmLayer.getConflicts();
+            if (apiData.participatesInConflict(conflicts)) {
+                alertUnresolvedConflicts(osmLayer);
+                return false;
+            }
+        }
+        // Call all upload hooks in sequence.
+        // FIXME: this should become an asynchronous task
+        //
+        if (apiData != null) {
+            for (UploadHook hook : uploadHooks) {
+                if (!hook.checkUpload(apiData)) {
+                    return false;
+                }
+            }
+        }
+
+        return true;
+    }
+
+    /**
+     * Uploads data to the OSM API.
+     *
+     * @param layer the source layer for the data to upload
+     * @param apiData the primitives to be added, updated, or deleted
+     */
+    public void uploadData(final OsmDataLayer layer, APIDataSet apiData) {
+        if (apiData.isEmpty()) {
+            JOptionPane.showMessageDialog(
+                    Main.parent,
+                    tr("No changes to upload."),
+                    tr("Warning"),
+                    JOptionPane.INFORMATION_MESSAGE
+            );
+            return;
+        }
+        if (!checkPreUploadConditions(layer, apiData)) {
+            return;
+        }
+
+        final UploadDialog dialog = UploadDialog.getUploadDialog();
+        // If we simply set the changeset comment here, it would be
+        // overridden by subsequent events in EDT that are caused by
+        // dialog creation. The current solution is to queue this operation
+        // after these events.
+        // TODO: find better way to initialize the comment field
+        SwingUtilities.invokeLater(new Runnable() {
+            @Override
+            public void run() {
+                final Map<String, String> tags = new HashMap<>(layer.data.getChangeSetTags());
+                if (!tags.containsKey("source")) {
+                    tags.put("source", dialog.getLastChangesetSourceFromHistory());
+                }
+                if (!tags.containsKey("comment")) {
+                    String comment = dialog.getLastChangesetCommentFromHistory();
+                    if (!comment.contains(getCustomized_comment())) {
+                        comment = getCustomized_comment();
+                    }
+                    tags.put("comment", comment);
+                }
+
+                dialog.setDefaultChangesetTags(tags);
+            }
+        });
+        dialog.setUploadedPrimitives(apiData);
+        dialog.setVisible(true);
+        if (dialog.isCanceled()) {
+            return;
+        }
+        dialog.rememberUserInput();
+
+        for (UploadHook hook : lateUploadHooks) {
+            if (!hook.checkUpload(apiData)) {
+                return;
+            }
+        }
+
+        Main.worker.execute(
+                new UploadPrimitivesTask(
+                        UploadDialog.getUploadDialog().getUploadStrategySpecification(),
+                        layer,
+                        apiData,
+                        UploadDialog.getUploadDialog().getChangeset()
+                )
+        );
+    }
+
+    @Override
+    public void actionPerformed(ActionEvent e) {
+        if (!isEnabled()) {
+            return;
+        }
+        if (Main.map == null) {
+            JOptionPane.showMessageDialog(
+                    Main.parent,
+                    tr("Nothing to upload. Get some data first."),
+                    tr("Warning"),
+                    JOptionPane.WARNING_MESSAGE
+            );
+            return;
+        }
+        APIDataSet apiData = new APIDataSet(Main.main.getCurrentDataSet());
+        uploadData(Main.main.getEditLayer(), apiData);
+    }
+
+    public String getCustomized_comment() {
+        return customized_comment;
+    }
+
+    public void setCustomized_comment(String customized_comment) {
+        this.customized_comment = customized_comment;
+    }
+
+}
Index: /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/util/Util.java
===================================================================
--- /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/util/Util.java	(revision 31614)
+++ /applications/editors/josm/plugins/josm-tofix-plugin/src/org/openstreetmap/josm/plugins/tofix/util/Util.java	(revision 31614)
@@ -0,0 +1,18 @@
+package org.openstreetmap.josm.plugins.tofix.util;
+
+import javax.swing.JOptionPane;
+
+
+/**
+ *
+ * @author ruben
+ */
+public class Util {
+    public static void alert(Object object) {
+        JOptionPane.showMessageDialog(null, object);
+    }
+
+    public static void print(Object object) {
+        System.err.println(object);
+    }
+}
Index: /applications/editors/josm/plugins/josm-tofix-plugin/svn.log
===================================================================
--- /applications/editors/josm/plugins/josm-tofix-plugin/svn.log	(revision 31614)
+++ /applications/editors/josm/plugins/josm-tofix-plugin/svn.log	(revision 31614)
@@ -0,0 +1,29 @@
+svn, version 1.8.8 (r1568071)
+   compiled Aug 20 2015, 12:51:30 on x86_64-pc-linux-gnu
+
+Copyright (C) 2013 The Apache Software Foundation.
+This software consists of contributions made by many people;
+see the NOTICE file for more information.
+Subversion is open source software, see http://subversion.apache.org/
+
+The following repository access (RA) modules are available:
+
+* ra_svn : Module for accessing a repository using the svn network protocol.
+  - with Cyrus SASL authentication
+  - handles 'svn' scheme
+* ra_local : Module for accessing a repository on local disk.
+  - handles 'file' scheme
+* ra_serf : Module for accessing a repository via WebDAV protocol using serf.
+  - using serf 1.3.3
+  - handles 'http' scheme
+  - handles 'https' scheme
+
+svn: E200009: Commit failed (details follow):
+svn: E200009: '/home/ruben/apps/josm/plugins/josm-tofix-plugin' is not under version control
+Updating '.':
+At revision 31613.
+Skipped '../dist/home/ruben/apps/josm/dist/tofix.jar'
+Summary of conflicts:
+  Skipped paths: 1
+svn: E200009: Commit failed (details follow):
+svn: E200009: '/home/ruben/apps/josm/dist/tofix.jar' is not under version control
