Index: /applications/editors/josm/oldplugins/mapdust/.checkstyle
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/.checkstyle	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/.checkstyle	(revision 35962)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="false">
+  <local-check-config name="JOSM" location="/JOSM/tools/checkstyle/josm_checks.xml" type="project" description="">
+    <additional-data name="protect-config-file" value="false"/>
+  </local-check-config>
+  <fileset name="all" enabled="true" check-config-name="JOSM" local="true">
+    <file-match-pattern match-pattern="." include-pattern="true"/>
+  </fileset>
+  <filter name="DerivedFiles" enabled="true"/>
+  <filter name="FilesFromPackage" enabled="true">
+    <filter-data value="build"/>
+    <filter-data value="data"/>
+    <filter-data value="images"/>
+    <filter-data value="styles"/>
+    <filter-data value="resources"/>
+    <filter-data value="scripts"/>
+  </filter>
+</fileset-config>
Index: /applications/editors/josm/oldplugins/mapdust/.classpath
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/.classpath	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/.classpath	(revision 35962)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry excluding="build|data" including="resources/|null" kind="src" path=""/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+	<classpathentry combineaccessrules="false" kind="src" path="/JOSM"/>
+	<classpathentry combineaccessrules="false" kind="src" path="/JOSM-GSON"/>
+	<classpathentry kind="output" path="build/classes"/>
+</classpath>
Index: /applications/editors/josm/oldplugins/mapdust/.project
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/.project	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/.project	(revision 35962)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>JOSM-mapdust</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>net.sf.eclipsecs.core.CheckstyleBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>net.sf.eclipsecs.core.CheckstyleNature</nature>
+	</natures>
+</projectDescription>
Index: /applications/editors/josm/oldplugins/mapdust/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/.settings/org.eclipse.jdt.core.prefs	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/.settings/org.eclipse.jdt.core.prefs	(revision 35962)
@@ -0,0 +1,99 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=warning
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.8
Index: /applications/editors/josm/oldplugins/mapdust/GPL-v3.0.txt
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/GPL-v3.0.txt	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/GPL-v3.0.txt	(revision 35962)
@@ -0,0 +1,674 @@
+                    GNU GENERAL PUBLIC LICENSE
+                       Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                            Preamble
+
+  The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+  The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works.  By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.  We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors.  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+  To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights.  Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received.  You must make sure that they, too, receive
+or can get the source code.  And you must show them these terms so they
+know their rights.
+
+  Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+  For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software.  For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+  Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so.  This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software.  The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable.  Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products.  If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+  Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary.  To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                       TERMS AND CONDITIONS
+
+  0. Definitions.
+
+  "This License" refers to version 3 of the GNU General Public License.
+
+  "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+  "The Program" refers to any copyrightable work licensed under this
+License.  Each licensee is addressed as "you".  "Licensees" and
+"recipients" may be individuals or organizations.
+
+  To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy.  The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+  A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+  To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy.  Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+  To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies.  Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+  An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License.  If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+  1. Source Code.
+
+  The "source code" for a work means the preferred form of the work
+for making modifications to it.  "Object code" means any non-source
+form of a work.
+
+  A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+  The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form.  A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+  The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities.  However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work.  For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+  The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+  The Corresponding Source for a work in source code form is that
+same work.
+
+  2. Basic Permissions.
+
+  All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met.  This License explicitly affirms your unlimited
+permission to run the unmodified Program.  The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work.  This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+  You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force.  You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright.  Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+  Conveying under any other circumstances is permitted solely under
+the conditions stated below.  Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+  No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+  When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+  4. Conveying Verbatim Copies.
+
+  You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+  You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+  5. Conveying Modified Source Versions.
+
+  You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+    a) The work must carry prominent notices stating that you modified
+    it, and giving a relevant date.
+
+    b) The work must carry prominent notices stating that it is
+    released under this License and any conditions added under section
+    7.  This requirement modifies the requirement in section 4 to
+    "keep intact all notices".
+
+    c) You must license the entire work, as a whole, under this
+    License to anyone who comes into possession of a copy.  This
+    License will therefore apply, along with any applicable section 7
+    additional terms, to the whole of the work, and all its parts,
+    regardless of how they are packaged.  This License gives no
+    permission to license the work in any other way, but it does not
+    invalidate such permission if you have separately received it.
+
+    d) If the work has interactive user interfaces, each must display
+    Appropriate Legal Notices; however, if the Program has interactive
+    interfaces that do not display Appropriate Legal Notices, your
+    work need not make them do so.
+
+  A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit.  Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+  6. Conveying Non-Source Forms.
+
+  You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+    a) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by the
+    Corresponding Source fixed on a durable physical medium
+    customarily used for software interchange.
+
+    b) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by a
+    written offer, valid for at least three years and valid for as
+    long as you offer spare parts or customer support for that product
+    model, to give anyone who possesses the object code either (1) a
+    copy of the Corresponding Source for all the software in the
+    product that is covered by this License, on a durable physical
+    medium customarily used for software interchange, for a price no
+    more than your reasonable cost of physically performing this
+    conveying of source, or (2) access to copy the
+    Corresponding Source from a network server at no charge.
+
+    c) Convey individual copies of the object code with a copy of the
+    written offer to provide the Corresponding Source.  This
+    alternative is allowed only occasionally and noncommercially, and
+    only if you received the object code with such an offer, in accord
+    with subsection 6b.
+
+    d) Convey the object code by offering access from a designated
+    place (gratis or for a charge), and offer equivalent access to the
+    Corresponding Source in the same way through the same place at no
+    further charge.  You need not require recipients to copy the
+    Corresponding Source along with the object code.  If the place to
+    copy the object code is a network server, the Corresponding Source
+    may be on a different server (operated by you or a third party)
+    that supports equivalent copying facilities, provided you maintain
+    clear directions next to the object code saying where to find the
+    Corresponding Source.  Regardless of what server hosts the
+    Corresponding Source, you remain obligated to ensure that it is
+    available for as long as needed to satisfy these requirements.
+
+    e) Convey the object code using peer-to-peer transmission, provided
+    you inform other peers where the object code and Corresponding
+    Source of the work are being offered to the general public at no
+    charge under subsection 6d.
+
+  A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+  A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling.  In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage.  For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product.  A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+  "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source.  The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+  If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information.  But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+  The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed.  Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+  Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+  7. Additional Terms.
+
+  "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law.  If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+  When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it.  (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.)  You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+  Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+    a) Disclaiming warranty or limiting liability differently from the
+    terms of sections 15 and 16 of this License; or
+
+    b) Requiring preservation of specified reasonable legal notices or
+    author attributions in that material or in the Appropriate Legal
+    Notices displayed by works containing it; or
+
+    c) Prohibiting misrepresentation of the origin of that material, or
+    requiring that modified versions of such material be marked in
+    reasonable ways as different from the original version; or
+
+    d) Limiting the use for publicity purposes of names of licensors or
+    authors of the material; or
+
+    e) Declining to grant rights under trademark law for use of some
+    trade names, trademarks, or service marks; or
+
+    f) Requiring indemnification of licensors and authors of that
+    material by anyone who conveys the material (or modified versions of
+    it) with contractual assumptions of liability to the recipient, for
+    any liability that these contractual assumptions directly impose on
+    those licensors and authors.
+
+  All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10.  If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term.  If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+  If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+  Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+  8. Termination.
+
+  You may not propagate or modify a covered work except as expressly
+provided under this License.  Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+  However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+  Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+  Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License.  If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+  9. Acceptance Not Required for Having Copies.
+
+  You are not required to accept this License in order to receive or
+run a copy of the Program.  Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance.  However,
+nothing other than this License grants you permission to propagate or
+modify any covered work.  These actions infringe copyright if you do
+not accept this License.  Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+  10. Automatic Licensing of Downstream Recipients.
+
+  Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License.  You are not responsible
+for enforcing compliance by third parties with this License.
+
+  An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations.  If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+  You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License.  For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+  11. Patents.
+
+  A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based.  The
+work thus licensed is called the contributor's "contributor version".
+
+  A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version.  For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+  Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+  In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement).  To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+  If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients.  "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+  If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+  A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License.  You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+  Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+  12. No Surrender of Others' Freedom.
+
+  If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all.  For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+  13. Use with the GNU Affero General Public License.
+
+  Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work.  The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+  14. Revised Versions of this License.
+
+  The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+  Each version is given a distinguishing version number.  If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation.  If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+  If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+  Later license versions may give you additional or different
+permissions.  However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+  15. Disclaimer of Warranty.
+
+  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. Limitation of Liability.
+
+  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+  17. Interpretation of Sections 15 and 16.
+
+  If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+                     END OF TERMS AND CONDITIONS
+
+            How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+  If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+    <program>  Copyright (C) <year>  <name of author>
+    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+  You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+  The GNU General Public License does not permit incorporating your program
+into proprietary programs.  If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.  But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
Index: /applications/editors/josm/oldplugins/mapdust/LICENSE.txt
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/LICENSE.txt	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/LICENSE.txt	(revision 35962)
@@ -0,0 +1,26 @@
+Copyright (c) 2010, skobbler GmbH
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice,
+   this list of conditions and the following disclaimer.
+2. 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.
+3. Neither the name of the project 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.
Index: /applications/editors/josm/oldplugins/mapdust/README
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/README	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/README	(revision 35962)
@@ -0,0 +1,16 @@
+JOSM plugin for the MapDust Bug Reporter service. This plugin was created 
+in order to help to improve the Open Street Map.
+The MapDust plugin contains the following features:
+    - viewing the Bug Reports on the current area
+    - viewing the details of a given Bug report
+    - creating a new Bug Report
+    - commenting a new Bug Report
+    - closing a given Bug Report
+    - re-opening a given Bug Report
+    - invalidating a given Bug Report
+    - working in online and offline mode
+
+* This plugin was created by skobbler.com.
+* This plugin is licensed under the GNU GPL v3 or later. See GPL-v3,0.txt for 
+  more details.
+    
Index: /applications/editors/josm/oldplugins/mapdust/build.xml
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/build.xml	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/build.xml	(revision 35962)
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+<project name="mapdust" default="dist" basedir=".">
+    <!-- properties -->
+    <property name="commit.message" value="MapDust bug reporter plugin"/>
+    <property name="plugin.main.version" value="14153"/>
+    <property name="apidoc.dir" value="doc"/>
+
+    <property name="plugin.author" value="skobbler"/>
+    <property name="plugin.class" value="org.openstreetmap.josm.plugins.mapdust.MapdustPlugin"/>
+    <property name="plugin.description" value="The MapDust Plug-In shows the MapDust bug reports on the map. You can create, close,invalidate, re-open and comment bug reports by using this plugin."/>
+    <property name="plugin.icon" value="images/dialogs/mapdust_icon25.png"/>
+    <property name="plugin.link" value="https://wiki.openstreetmap.org/wiki/JOSM/Plugins/MapDust"/>
+    <property name="plugin.requires" value="gson"/>
+
+    <!--
+    **********************************************************
+    ** include targets that all plugins have in common
+    **********************************************************
+    -->
+    <import file="../build-common.xml"/>
+
+    <fileset id="plugin.requires.jars" dir="${plugin.dist.dir}">
+        <include name="gson.jar"/>
+    </fileset>
+
+    <target name="clean">
+        <delete dir="${plugin.build.dir}"/>
+        <delete dir="${apidoc.dir}"/>
+        <delete file="${plugin.jar}"/>
+    </target>
+
+    <target name="setup-dist">
+        <antcall target="setup-dist-default" />
+        <copy todir="${plugin.build.dir}">
+            <fileset dir="conf"/>
+        </copy>
+    </target>
+
+</project>
Index: /applications/editors/josm/oldplugins/mapdust/conf/mapdust.properties
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/conf/mapdust.properties	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/conf/mapdust.properties	(revision 35962)
@@ -0,0 +1,11 @@
+#the Mapdus url address
+mapdust.url=http://www.mapdust.com/api
+
+#the MapDust bug details site url
+mapdust.site=http://www.mapdust.com/detail/
+
+#the Mapdust api key
+mapdust.key=20a2790c8c8ba273ff7baa619b2cf638
+
+#the Mapdust wiki page
+mapdust.wiki=https://wiki.openstreetmap.org/wiki/JOSM/Plugins/MapDust
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/MapdustLayer.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/MapdustLayer.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/MapdustLayer.java	(revision 35962)
@@ -0,0 +1,359 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust;
+
+
+import static org.openstreetmap.josm.tools.I18n.tr;
+
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Font;
+import java.awt.Graphics2D;
+import java.awt.Image;
+import java.awt.Point;
+import java.awt.image.ImageObserver;
+import java.text.DateFormat;
+import java.util.List;
+import java.util.Locale;
+
+import javax.swing.Action;
+import javax.swing.Icon;
+import javax.swing.ImageIcon;
+import javax.swing.JToolTip;
+
+import org.openstreetmap.josm.actions.RenameLayerAction;
+import org.openstreetmap.josm.data.Bounds;
+import org.openstreetmap.josm.data.coor.LatLon;
+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 org.openstreetmap.josm.plugins.mapdust.gui.MapdustGUI;
+import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustBug;
+import org.openstreetmap.josm.tools.ImageProvider;
+
+
+/**
+ * Defines the MapDust JOSM layer main functionality.
+ *
+ * @author Bea
+ */
+public class MapdustLayer extends Layer {
+
+    /** The <code>MapdustGUI</code> object */
+    private MapdustGUI mapdustGUI;
+
+    /** The list of <code>MapdustBugList</code> objects */
+    private List<MapdustBug> mapdustBugList;
+
+    /** The selected <code>MapdustBug</code> object */
+    private MapdustBug bugSelected;
+
+    /**
+     * Builds a <code>MapdustLayer</code> object based on the given parameters.
+     *
+     * @param name The name of the layer
+     * @param mapdustGUI The <code>MapdustGUI</code> object
+     * @param mapdustBugList The list of <code>MapdustBug</code> objects
+     */
+    public MapdustLayer(String name, MapdustGUI mapdustGUI,
+            List<MapdustBug> mapdustBugList) {
+        super(name);
+        this.mapdustGUI = mapdustGUI;
+        this.mapdustBugList = mapdustBugList;
+        this.bugSelected = null;
+    }
+
+    /**
+     * Updates the <code>MapdustLayer</code> with the new
+     * <code>MapdustGUI</code> and <code>MapdustBug</code> list.
+     *
+     * @param mapdustGUI The <code>MapdustGUI</code>
+     * @param mapdustBugList The <code>MapdustBug</code> list
+     */
+    public void update(MapdustGUI mapdustGUI, List<MapdustBug> mapdustBugList) {
+        this.mapdustGUI = mapdustGUI;
+        this.mapdustBugList = mapdustBugList;
+        this.bugSelected = null;
+    }
+
+    /**
+     * Returns the icon of the MapDust layer.
+     *
+     * @return icon
+     */
+    @Override
+    public Icon getIcon() {
+        Icon layerIcon = ImageProvider.get("dialogs/mapdust_icon16.png");
+        return layerIcon;
+    }
+
+    /**
+     * Returns the info components of the MapDust layer.
+     *
+     * @return object
+     */
+    @Override
+    public Object getInfoComponent() {
+        String infoComponent = "Shows the Mapdust bug reporter issues.";
+        return tr(infoComponent);
+    }
+
+    /**
+     * Returns the menu entries of the MapDust layer.
+     *
+     * @return an array of <code>Action</code> objects.
+     */
+    @Override
+    public Action[] getMenuEntries() {
+        Action[] menuEntries = new Action[6];
+        menuEntries[0] =
+                LayerListDialog.getInstance().createShowHideLayerAction();
+        menuEntries[1] =
+                LayerListDialog.getInstance().createDeleteLayerAction();
+        menuEntries[2] = SeparatorLayerAction.INSTANCE;
+        menuEntries[3] = new RenameLayerAction(null, this);
+        menuEntries[4] = SeparatorLayerAction.INSTANCE;
+        menuEntries[5] = new LayerListPopup.InfoAction(this);
+        return menuEntries;
+    }
+
+    /**
+     * Returns the text of the tool tip of the MapDust layer.
+     *
+     * @return the tooltip text
+     */
+    @Override
+    public String getToolTipText() {
+        String toolTipText = "Shows Mapdust bug reporter issues.";
+        return tr(toolTipText);
+    }
+
+    /**
+     * Returns the image icon based on the given status and type.
+     *
+     * @param iconType The type of the bug
+     * @param status The status of the bug
+     * @param bugType The type of the bug
+     * @return A <code>ImageIcom</code> object
+     */
+    private ImageIcon getImageIcon(String iconType, String status,
+            String bugType) {
+        String iconName = "bugs/" + iconType + "/";
+        iconName += status.toLowerCase() + "_";
+        iconName += bugType;
+        iconName += ".png";
+        ImageIcon icon = ImageProvider.get(iconName);
+        return icon;
+    }
+
+    /**
+     * Draw the objects to the given map view. Also draws the MapDust bugs to
+     * the map, and the tool-tip for the selected MapDust bug.
+     *
+     * @param g The <code>Graphics2D</code> object
+     * @param mv The <code>MapView</code> object
+     * @param bounds The <code>Bounds</code> object
+     */
+    @Override
+    public void paint(Graphics2D g, MapView mv, Bounds bounds) {
+        JToolTip tooltip = new JToolTip();
+        if (mapdustBugList != null && mapdustBugList.size() > 0) {
+            /* draw the current visible bugs */
+            for (MapdustBug bug : mapdustBugList) {
+                LatLon ll = bug.getLatLon();
+                Point p = mv.getPoint(ll);
+                /* get the icon */
+                String status = bug.getStatus().getValue();
+                String type = bug.getType().getKey();
+                ImageIcon icon = getImageIcon("normal", status, type);
+                int width = icon.getIconWidth();
+                int height = icon.getIconHeight();
+                /*
+                 * need to do drawing 2 times, because in some areas the bug
+                 * image is invisible
+                 */
+                for (int i = 0; i < 2; i++) {
+                    g.drawImage(icon.getImage(), p.x - (width / 2), p.y
+                            - (height / 2), new ImageObserver() {
+                        @Override
+                        public boolean imageUpdate(Image img, int infoflags,
+                                int x, int y, int width, int height) {
+                            return false;
+                        }
+                    });
+                }
+            }
+
+            /* draw the selected bug description */
+            /* selected by clicking */
+            MapdustBug clickedBug = getBugSelected();
+            /* selected from the list */
+            MapdustBug bugSelected = getMapdustGUI().getSelectedBug();
+            if (bugSelected == null) {
+                bugSelected = clickedBug;
+            }
+            setBugSelected(bugSelected);
+            if (bugSelected != null) {
+                LatLon ll = bugSelected.getLatLon();
+                Point p = mv.getPoint(ll);
+                String status = bugSelected.getStatus().getValue();
+                String type = bugSelected.getType().getKey();
+                ImageIcon icon = getImageIcon("selected", status, type);
+                int width = icon.getIconWidth();
+                int height = icon.getIconHeight();
+                /* draw the icon */
+                g.drawImage(icon.getImage(), p.x - (width / 2), p.y
+                        - (height / 2), new ImageObserver() {
+                    @Override
+                    public boolean imageUpdate(Image img, int infoflags, int x,
+                            int y, int width, int height) {
+                        return false;
+                    }
+                });
+                /* draw description */
+                String text = buildTooltipText(bugSelected);
+                tooltip.setTipText(text);
+                tooltip.setFont(new Font("Times New Roman", Font.PLAIN, 13));
+                tooltip.setBackground(Color.WHITE);
+                tooltip.setForeground(Color.BLUE);
+                tooltip.setLocation(p);
+                tooltip.setFocusable(true);
+                int tx = p.x + (width / 4);
+                int ty = (p.y + height / 4);
+                g.translate(tx, ty);
+                Dimension d = tooltip.getUI().getPreferredSize(tooltip);
+                d.width = Math.min(d.width, (mv.getWidth() * 2 / 3));
+                tooltip.setSize(d);
+                tooltip.paint(g);
+                g.translate(-tx, -ty);
+            }
+        }
+    }
+
+    /**
+     * No need to implement this.
+     */
+    @Override
+    public boolean isMergable(Layer layer) {
+        return false;
+    }
+
+    /**
+     * No need to implement this.
+     */
+    @Override
+    public void mergeFrom(Layer layer) {}
+
+    /**
+     * Builds the text of the tool-tip containing a short description of the
+     * given <code>MapdustBug</code> object.
+     *
+     * @param bug The <code>MapdustBug</code> object
+     * @return A string containing the description text
+     */
+    private String buildTooltipText(MapdustBug bug) {
+        DateFormat df = DateFormat.getDateInstance(DateFormat.DEFAULT,
+                Locale.getDefault());
+        String text = "<html><b>Type:</b> " + bug.getType().getValue();
+        text += "<br/>";
+        text += "<b>Status:</b> " + bug.getStatus().getValue() + "<br/>";
+        text += "<b>Relevance:</b> " + bug.getRelevance().getName() + "<br/>";
+        text += "<b>Address:</b> " + bug.getAddress() + " <br/>";
+        text += "<b>Created by:</b> " + bug.getNickname() + "<br/>";
+        text += "<b>Created on:</b> " + df.format(bug.getDateCreated());
+        text += "<br/>";
+        text += "<b>Last modified on:</b> "+ df.format(bug.getDateUpdated());
+        text += "<br/>";
+        text += "<b>Comments:</b> " + bug.getNumberOfComments();
+        text += "</html>";
+        return text;
+    }
+
+    /**
+     * No need to implement this.
+     */
+    @Override
+    public void visitBoundingBox(BoundingXYVisitor arg0) {}
+
+    /**
+     * Returns the <code>MapdustGUI</code> object
+     *
+     * @return the mapdustGUI
+     */
+    public MapdustGUI getMapdustGUI() {
+        return mapdustGUI;
+    }
+
+    /**
+     * Sets the <code>MapdustGUI</code> object
+     *
+     * @param mapdustGUI the mapdustGUI to set
+     */
+    public void setMapdustGUI(MapdustGUI mapdustGUI) {
+        this.mapdustGUI = mapdustGUI;
+    }
+
+    /**
+     * Returns the list of <code>MapdustBug</code> objects
+     *
+     * @return the mapdustBugList
+     */
+    public List<MapdustBug> getMapdustBugList() {
+        return mapdustBugList;
+    }
+
+    /**
+     * Returns the selected bug
+     *
+     * @return the bugSelected
+     */
+    public MapdustBug getBugSelected() {
+        return bugSelected;
+    }
+
+    /**
+     * Sets the selected bug
+     *
+     * @param bugSelected the bugSelected to set
+     */
+    public void setBugSelected(MapdustBug bugSelected) {
+        this.bugSelected = bugSelected;
+    }
+
+    /**
+     * Sets the list of <code>MapdustBug</code> objects
+     *
+     * @param mapdustBugList the mapdustBugList to set
+     */
+    public void setMapdustBugList(List<MapdustBug> mapdustBugList) {
+        this.mapdustBugList = mapdustBugList;
+    }
+
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/MapdustPlugin.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/MapdustPlugin.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/MapdustPlugin.java	(revision 35962)
@@ -0,0 +1,694 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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
+ * INTERRTION) 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust;
+
+import static org.openstreetmap.josm.tools.I18n.tr;
+
+import java.awt.Point;
+import java.awt.event.KeyEvent;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.ArrayBlockingQueue;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
+
+import javax.swing.JOptionPane;
+import javax.swing.SwingUtilities;
+
+import org.openstreetmap.josm.data.Bounds;
+import org.openstreetmap.josm.data.UserIdentityManager;
+import org.openstreetmap.josm.gui.MainApplication;
+import org.openstreetmap.josm.gui.MapFrame;
+import org.openstreetmap.josm.gui.MapView;
+import org.openstreetmap.josm.gui.NavigatableComponent;
+import org.openstreetmap.josm.gui.NavigatableComponent.ZoomChangeListener;
+import org.openstreetmap.josm.gui.layer.LayerManager.LayerAddEvent;
+import org.openstreetmap.josm.gui.layer.LayerManager.LayerChangeListener;
+import org.openstreetmap.josm.gui.layer.LayerManager.LayerOrderChangeEvent;
+import org.openstreetmap.josm.gui.layer.LayerManager.LayerRemoveEvent;
+import org.openstreetmap.josm.plugins.Plugin;
+import org.openstreetmap.josm.plugins.PluginInformation;
+import org.openstreetmap.josm.plugins.mapdust.gui.MapdustGUI;
+import org.openstreetmap.josm.plugins.mapdust.gui.component.dialog.CreateBugDialog;
+import org.openstreetmap.josm.plugins.mapdust.gui.observer.MapdustBugObserver;
+import org.openstreetmap.josm.plugins.mapdust.gui.observer.MapdustUpdateObserver;
+import org.openstreetmap.josm.plugins.mapdust.gui.value.MapdustPluginState;
+import org.openstreetmap.josm.plugins.mapdust.service.MapdustServiceHandler;
+import org.openstreetmap.josm.plugins.mapdust.service.MapdustServiceHandlerException;
+import org.openstreetmap.josm.plugins.mapdust.service.value.BoundingBox;
+import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustBug;
+import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustBugFilter;
+import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustRelevance;
+import org.openstreetmap.josm.spi.preferences.Config;
+import org.openstreetmap.josm.spi.preferences.PreferenceChangeEvent;
+import org.openstreetmap.josm.spi.preferences.PreferenceChangedListener;
+import org.openstreetmap.josm.tools.Shortcut;
+
+/**
+ * This is the main class of the MapDust plug-in. Defines the MapDust plug-in
+ * main functionality.
+ *
+ * @author Bea
+ */
+public class MapdustPlugin extends Plugin implements LayerChangeListener,
+        ZoomChangeListener, PreferenceChangedListener, MouseListener,
+        MapdustUpdateObserver, MapdustBugObserver {
+
+    /** Executor that will run the updates. */
+    private static ThreadPoolExecutor executor = new ThreadPoolExecutor(
+      3, 5, 100, TimeUnit.SECONDS, new ArrayBlockingQueue<>(100), new ThreadPoolExecutor.DiscardPolicy());
+
+    /** The graphical user interface of the plug-in */
+    private MapdustGUI mapdustGUI;
+
+    /** The layer of the MapDust plug-in */
+    private MapdustLayer mapdustLayer;
+
+    /** The <code>CreateIssueDialog</code> object */
+    private CreateBugDialog dialog;
+
+    /** The list of <code>MapdustBug</code> objects */
+    private List<MapdustBug> mapdustBugList;
+
+    /** The bounding box from where the MapDust bugs are down-loaded */
+    private BoundingBox bBox;
+    
+    /** The shortcut to access MapDust GUI */
+    private Shortcut shortcut;
+
+    /**
+     * The <code>MapdustBugFilter</code> object representing the selected
+     * filters
+     */
+    private MapdustBugFilter filter;
+
+    /** Specifies if there was or not an error down-loading the data */
+    protected boolean wasError = false;
+
+    /**
+     * Builds a new <code>MapDustPlugin</code> object based on the given
+     * arguments.
+     *
+     * @param info The <code>MapDustPlugin</code> object
+     */
+    public MapdustPlugin(PluginInformation info) {
+        super(info);
+        this.filter = null;
+        this.bBox = null;
+        initializePlugin();
+    }
+
+    /**
+     * Initialize the <code>MapdustPlugin</code> object. Creates the
+     * <code>MapdustGUI</code> and initializes the following variables with
+     * default values: 'mapdust.pluginState', 'mapdust.nickname',
+     * 'mapdust.showError', 'mapdust.version' and 'mapdust.localVersion'.
+     */
+    private void initializePlugin() {
+        /* create MapDust Shortcut */
+        this.shortcut = Shortcut.registerShortcut("MapDust", tr("Toggle: {0}", tr("Open MapDust")),
+                KeyEvent.VK_0, Shortcut.ALT_SHIFT);
+        /* add default values for static variables */
+        Config.getPref().put("mapdust.pluginState", MapdustPluginState.ONLINE.getValue());
+        Config.getPref().put("mapdust.nickname", "");
+        Config.getPref().putBoolean("mapdust.showError", true);
+        Config.getPref().put("mapdust.version", getPluginInformation().version);
+        Config.getPref().put("mapdust.localVersion", getPluginInformation().localversion);
+        Config.getPref().addPreferenceChangeListener(this);
+    }
+
+    /**
+     * Initializes the new <code>MapFrame</code>. Adds the
+     * <code>MapdustGUI</code> to the new <code>MapFrame</code> and sets the
+     * observers/listeners.
+     *
+     * @param oldMapFrame The old <code>MapFrame</code> object
+     * @param newMapFrame The new <code>MapFrame</code> object
+     */
+    @Override
+    public void mapFrameInitialized(MapFrame oldMapFrame, MapFrame newMapFrame) {
+        if (newMapFrame != null) {
+            /* add MapDust dialog window */
+            mapdustGUI = new MapdustGUI(tr("MapDust bug reports"), "mapdust_icon.png", 
+                    tr("Activates the MapDust bug reporter plugin"), shortcut, 150, this);
+            /* add MapdustGUI */
+            mapdustGUI.setBounds(newMapFrame.getBounds());
+            mapdustGUI.addObserver(this);
+            newMapFrame.addToggleDialog(mapdustGUI);
+            /* add Listeners */
+            NavigatableComponent.addZoomChangeListener(this);
+            MainApplication.getLayerManager().addLayerChangeListener(this);
+            newMapFrame.mapView.addMouseListener(this);
+            /* put username to preferences */
+            Config.getPref().put("mapdust.josmUserName", UserIdentityManager.getInstance().getUserName());
+        } else {
+            /* if new MapFrame is null, remove listener */
+            oldMapFrame.mapView.removeMouseListener(this);
+            MainApplication.getLayerManager().removeLayerChangeListener(this);
+            NavigatableComponent.removeZoomChangeListener(this);
+            mapdustGUI.removeObserver(this);
+            mapdustGUI = null;
+        }
+    }
+
+    /**
+     * Listens for the events of type <code>PreferenceChangeEvent</code> . If
+     * the event key is 'osm-server.username' then if the user name was changed
+     * in Preferences and it was used as 'nickname'( the user did not changed
+     * this completed nickname to something else ) for submitting changes to
+     * MapDust , re-set the 'mapdust.josmUserName' and 'mapdust.nickname'
+     * properties.
+     *
+     * @param event The <code>PreferenceChangeEvent</code> object
+     */
+    @Override
+    public void preferenceChanged(PreferenceChangeEvent event) {
+        if (mapdustGUI != null && mapdustGUI.isShowing() && !wasError && mapdustLayer != null
+                && mapdustLayer.isVisible()) {
+            if (event.getKey().equals("osm-server.username")) {
+                String newUserName = UserIdentityManager.getInstance().getUserName();
+                String oldUserName = Config.getPref().get("mapdust.josmUserName");
+                String nickname = Config.getPref().get("mapdust.nickname");
+                if (nickname.isEmpty()) {
+                    /* nickname was not completed */
+                    Config.getPref().put("mapdust.josmUserName", newUserName);
+                    Config.getPref().put("mapdust.nickname", newUserName);
+                } else {
+                    if (nickname.equals(oldUserName)) {
+                        /* user name was used for nickname, and was not changed */
+                        Config.getPref().put("mapdust.josmUserName", newUserName);
+                        Config.getPref().put("mapdust.nickname", newUserName);
+                    } else {
+                        /* user name was used for nickname, and was changed */
+                        Config.getPref().put("mapdust.josmUserName", newUserName);
+                    }
+                }
+            }
+        }
+    }
+
+    /**
+     * Updates the map and the MapDust bugs list with the given
+     * <code>MapdustBug</code> object. If the bug is already contained in the
+     * list and map, then this object will be updated with the new properties.
+     * If the filter settings does not allow this new bug to be shown in the map
+     * and list, then it will be removed from the map and list.
+     *
+     * @param mapdustBug The <code>MapdustBug</code> object
+     */
+    @Override
+    public synchronized void changedData(MapdustBug mapdustBug) {
+        if (mapdustBugList == null) {
+            mapdustBugList = new ArrayList<>();
+        }
+        if (getMapdustGUI().isDialogShowing()) {
+            if (MainApplication.getMap() != null && MainApplication.getMap().mapView != null) {
+                MapdustBug oldBug = null;
+                for (MapdustBug bug : mapdustBugList) {
+                    if (bug.getId().equals(mapdustBug.getId())) {
+                        oldBug = bug;
+                    }
+                }
+                boolean showBug = shouldDisplay(mapdustBug);
+                if (oldBug != null) {
+                    /* remove, add */
+                    if (showBug) {
+                        mapdustBugList.remove(oldBug);
+                        mapdustBugList.add(0, mapdustBug);
+                    } else {
+                        mapdustBugList.remove(oldBug);
+                    }
+                } else {
+                    /* new add */
+                    if (showBug) {
+                        mapdustBugList.add(0, mapdustBug);
+                    }
+                }
+                mapdustGUI.update(mapdustBugList, this);
+                mapdustLayer.setMapdustGUI(mapdustGUI);
+                if (showBug) {
+                    mapdustGUI.setSelectedBug(mapdustBugList.get(0));
+                } else {
+                    mapdustLayer.setBugSelected(null);
+                    mapdustGUI.enableBtnPanel(true);
+                    MainApplication.getMap().mapView.repaint();
+                    String title = "MapDust";
+                    String message = "The operation was successful.";
+                    JOptionPane.showMessageDialog(MainApplication.getMainFrame(), message, title,
+                            JOptionPane.INFORMATION_MESSAGE);
+                }
+            }
+        }
+    }
+
+    /**
+     * Verifies if the given <code>MapdustBug</code> object should be displayed
+     * on the map and on the bugs list. A <code>MapdustBug</code> will be
+     * displayed on the map only if it is permitted by the selected filter
+     * settings (statuses, types, description and relevance filter).
+     *
+     * @param mapdustBug The <code>MapdustBug</code> object
+     * @return true if the given bug should be displayed false otherwise
+     */
+    private boolean shouldDisplay(MapdustBug mapdustBug) {
+        boolean result = true;
+        if (filter != null) {
+            boolean containsStatus = false;
+            if (filter.getStatuses() != null && !filter.getStatuses().isEmpty()) {
+                Integer statusKey = mapdustBug.getStatus().getKey();
+                if (filter.getStatuses().contains(statusKey)) {
+                    containsStatus = true;
+                }
+            } else {
+                containsStatus = true;
+            }
+            boolean containsType = false;
+            if (filter.getTypes() != null && !filter.getTypes().isEmpty()) {
+                String typeKey = mapdustBug.getType().getKey();
+                if (filter.getTypes().contains(typeKey)) {
+                    containsType = true;
+                }
+            } else {
+                containsType = true;
+            }
+            if (filter.getDescr() != null && filter.getDescr()) {
+                /* show only bugs with isDefaultDescription = false */
+                if (mapdustBug.getIsDefaultDescription()) {
+                    result = false;
+                } else {
+                    result = containsStatus && containsType;
+                }
+            } else {
+                result = containsStatus && containsType;
+            }
+            /* check relevance filter settings */
+            boolean containsMinRelevance = false;
+            if (filter.getMinRelevance() != null) {
+                MapdustRelevance minRel = filter.getMinRelevance();
+                MapdustRelevance bugRel = mapdustBug.getRelevance();
+                if (minRel.equals(bugRel)) {
+                    containsMinRelevance = true;
+                } else {
+                    if (bugRel.compareTo(minRel) == 1) {
+                        containsMinRelevance = true;
+                    }
+                }
+            }
+            boolean containsMaxRelevance = false;
+            if (filter.getMaxRelevance() != null) {
+                MapdustRelevance maxRel = filter.getMaxRelevance();
+                MapdustRelevance bugRel = mapdustBug.getRelevance();
+                if (maxRel.equals(bugRel)) {
+                    containsMaxRelevance = true;
+                } else {
+                    if (bugRel.compareTo(maxRel) == -1) {
+                        containsMaxRelevance = true;
+                    }
+                }
+                result = result && (containsMinRelevance && containsMaxRelevance);
+            }
+        }
+        return result;
+    }
+
+    /**
+     * No need to implement this.
+     */
+    @Override
+    public void mouseEntered(MouseEvent event) {}
+
+    /**
+     * No need to implement this.
+     */
+    @Override
+    public void mouseExited(MouseEvent arg0) {}
+
+    /**
+     * No need to implement this.
+     */
+    @Override
+    public void mousePressed(MouseEvent event) {}
+
+    /**
+     * No need to implement this.
+     */
+    @Override
+    public void mouseReleased(MouseEvent arg0) {}
+
+    /**
+     * At mouse click the following two actions can be done: adding a new bug,
+     * and selecting a bug from the map. A bug can be added if the plug-in is
+     * the only active plug-in and you double click on the map. You can select
+     * a bug from the map by clicking on it.
+     *
+     * @param event The <code>MouseEvent</code> object
+     */
+    @Override
+    public void mouseClicked(MouseEvent event) {
+        if (mapdustLayer != null && mapdustLayer.isVisible()) {
+            if (event.getButton() == MouseEvent.BUTTON1) {
+                if (event.getClickCount() == 2 && !event.isConsumed()) {
+                    if (MainApplication.getLayerManager().getActiveLayer() == getMapdustLayer()) {
+                        /* show add bug dialog */
+                        MapdustBug bug = mapdustGUI.getSelectedBug();
+                        if (bug != null) {
+                            Config.getPref().put("selectedBug.status", bug.getStatus()
+                                    .getValue());
+                        } else {
+                            Config.getPref().put("selectedBug.status", "create");
+                        }
+                        /* disable MapdustButtonPanel */
+                        mapdustGUI.getPanel().disableBtnPanel();
+                        /* create and show dialog */
+                        dialog = new CreateBugDialog(event.getPoint(), this);
+                        dialog.showDialog();
+                        event.consume();
+                        return;
+                    }
+                }
+                if (event.getClickCount() == 1 && !event.isConsumed()) {
+                    /* allow click on the bug icon on the map */
+                    Point p = event.getPoint();
+                    MapdustBug nearestBug = getNearestBug(p);
+                    if (nearestBug != null) {
+                        mapdustLayer.setBugSelected(nearestBug);
+                        /* set also in the list of bugs the element */
+                        mapdustGUI.setSelectedBug(nearestBug);
+                        MainApplication.getMap().mapView.repaint();
+                    }
+                    return;
+                }
+            }
+        }
+    }
+
+    /**
+     * Returns the nearest <code>MapdustBug</code> object to the given point on
+     * the map.
+     *
+     * @param p A <code>Point</code> object
+     * @return A <code>MapdustBug</code> object
+     */
+    private MapdustBug getNearestBug(Point p) {
+        double snapDistance = 10;
+        double minDistanceSq = Double.MAX_VALUE;
+        MapdustBug nearestBug = null;
+        for (MapdustBug bug : mapdustBugList) {
+            Point sp = MainApplication.getMap().mapView.getPoint(bug.getLatLon());
+            double dist = p.distanceSq(sp);
+            if (minDistanceSq > dist && p.distance(sp) < snapDistance) {
+                minDistanceSq = p.distanceSq(sp);
+                nearestBug = bug;
+            } else if (minDistanceSq == dist) {
+                nearestBug = bug;
+            }
+        }
+        return nearestBug;
+    }
+
+    @Override
+    public void layerOrderChanged(LayerOrderChangeEvent e) {
+    }
+
+    /**
+     * Adds the <code>MapdustLayer</code> to the JOSM editor. If the list of
+     * <code>MapdustBug</code>s is null then down-loads the data from the
+     * MapDust Service and updates the editor with this new data.
+     *
+     * @param e The new added layer event
+     */
+    @Override
+    public void layerAdded(LayerAddEvent e) {}
+
+    /**
+     * Removes the <code>MapdustLayer</code> from the JOSM editor. Also closes
+     * the MapDust plug-in window.
+     *
+     * @param e The new added layer event
+     */
+    @Override
+    public void layerRemoving(LayerRemoveEvent e) {
+        if (e.getRemovedLayer() instanceof MapdustLayer) {
+            /* remove the layer */
+            Config.getPref().put("mapdust.pluginState",
+                    MapdustPluginState.ONLINE.getValue());
+            NavigatableComponent.removeZoomChangeListener(this);
+            if (mapdustGUI != null) {
+                MainApplication.getMap().remove(mapdustGUI);
+                mapdustGUI.destroy();
+            }
+            mapdustLayer = null;
+            filter = null;
+            mapdustBugList = null;
+        }
+    }
+
+    /**
+     * Listens for the zoom change event. If the zoom was changed, then it will
+     * down-load the MapDust bugs data from the current view. The new data will
+     * be down-loaded only if the current bounding box is different from the
+     * previous one.
+     */
+    @Override
+    public void zoomChanged() {
+        if (mapdustGUI != null && mapdustGUI.isShowing() && !wasError) {
+            boolean download = true;
+            BoundingBox curentBBox = getBBox();
+            if (bBox != null) {
+                if (bBox.equals(curentBBox)) {
+                    download = false;
+                }
+            }
+            bBox = curentBBox;
+            if (download) {
+                updatePluginData();
+            }
+        }
+    }
+
+    /**
+     * Updates the plug-in with a new MapDust bugs data. If the filters are set
+     * then the MapDust data will be filtered. If initialUpdate flag is true
+     * then the plug-in is updated for the first time with the MapDust data. By
+     * default the first time there is no filter applied to the MapDust data.
+     *
+     * @param filter The <code>MapdustBugFilter</code> containing the filter
+     * settings
+     * @param initialUpdate If true then there will be no filter applied.
+     */
+    @Override
+    public void update(MapdustBugFilter filter, boolean initialUpdate) {
+        bBox = getBBox();
+        if (initialUpdate) {
+            updatePluginData();
+        } else {
+            if (filter != null) {
+                this.filter = filter;
+            }
+            if (mapdustGUI != null && mapdustGUI.isShowing() && !wasError) {
+                updatePluginData();
+            }
+        }
+    }
+
+    /**
+     * Returns the current bounding box. If the bounding box values are not in
+     * the limits, then it will normalized.
+     *
+     * @return A <code>BoundingBox</code>
+     */
+    private BoundingBox getBBox() {
+        MapView mapView = MainApplication.getMap().mapView;
+        Bounds bounds = new Bounds(mapView.getLatLon(0, mapView.getHeight()),
+                mapView.getLatLon(mapView.getWidth(), 0));
+        return new BoundingBox(bounds.getMin().lon(), bounds.getMin().lat(),
+                bounds.getMax().lon(), bounds.getMax().lat());
+    }
+
+    /**
+     * Updates the <code>MapdustPlugin</code> data. Down-loads the
+     * <code>MapdustBug</code> objects from the current view, and updates the
+     * <code>MapdustGUI</code> and the map with the new data.
+     */
+    private void updatePluginData() {
+        executor.execute(() -> updateMapdustData());
+    }
+
+    /**
+     * Updates the MapDust plug-in data. Down-loads the list of
+     * <code>MapdustBug</code> objects for the given area, and updates the map
+     * and the MapDust layer with the new data.
+     */
+    protected synchronized void updateMapdustData() {
+        if (MainApplication.getMap() != null && MainApplication.getMap().mapView != null) {
+            /* Downloads the MapDust data */
+            try {
+                MapdustServiceHandler handler = new MapdustServiceHandler();
+                mapdustBugList = handler.getBugs(bBox, filter);
+                wasError = false;
+            } catch (MapdustServiceHandlerException e) {
+                wasError = true;
+                mapdustBugList = new ArrayList<>();
+            }
+            /* update the view */
+            SwingUtilities.invokeLater(new Runnable() {
+                @Override
+                public void run() {
+                    synchronized (this) {
+                        updateView();
+                        if (wasError) {
+                            handleError();
+                        }
+                    }
+                }
+            });
+        }
+    }
+
+    /**
+     * Updates the current view ( map and MapDust bug list), with the given list
+     * of <code>MapdustBug</code> objects.
+     */
+    protected void updateView() {
+        if (MainApplication.getMap() != null && MainApplication.getMap().mapView != null) {
+            /* update the MapdustLayer */
+            boolean needRepaint = false;
+            if (!containsMapdustLayer()) {
+                /* first start or layer was deleted */
+                if (mapdustGUI.isDownloaded()) {
+                    mapdustGUI.update(mapdustBugList, this);
+                    /* create and add the layer */
+                    mapdustLayer = new MapdustLayer("MapDust", mapdustGUI,
+                            mapdustBugList);
+                    MainApplication.getLayerManager().addLayer(this.mapdustLayer);
+                    MainApplication.getMap().mapView.moveLayer(this.mapdustLayer, 0);
+                    MainApplication.getMap().mapView.addMouseListener(this);
+                    NavigatableComponent.addZoomChangeListener(this);
+                    needRepaint = true;
+                }
+            } else {
+                if (mapdustLayer != null) {
+                    /* MapDust data was changed */
+                    mapdustGUI.update(mapdustBugList, this);
+                    mapdustLayer.invalidate();
+                    mapdustLayer.update(mapdustGUI, mapdustBugList);
+                    needRepaint = true;
+                }
+            }
+            if (needRepaint) {
+                /* force repaint */
+                mapdustGUI.revalidate();
+                MainApplication.getMap().mapView.revalidate();
+                MainApplication.getMap().repaint();
+            }
+        }
+    }
+
+    /**
+     * Verifies if the <code>MapView</code> contains or not the
+     * <code>MapdustLayer</code> layer.
+     *
+     * @return true if the <code>MapView</code> contains the
+     * <code>MapdustLayer</code> false otherwise
+     */
+    private boolean containsMapdustLayer() {
+        return mapdustLayer != null && MainApplication.getLayerManager().containsLayer(mapdustLayer);
+    }
+
+    /**
+     * Handles the <code>MapdustServiceHandlerException</code> error.
+     */
+    protected void handleError() {
+        String showMessage = Config.getPref().get("mapdust.showError");
+        Boolean showErrorMessage = Boolean.parseBoolean(showMessage);
+        if (showErrorMessage) {
+            /* show errprMessage, and remove the layer */
+            Config.getPref().putBoolean("mapdust.showError", false);
+            String errorMessage = "There was a Mapdust service error.";
+            errorMessage += " Please try later.";
+            JOptionPane.showMessageDialog(MainApplication.getMainFrame(), tr(errorMessage));
+        }
+    }
+
+    /**
+     * Returns the <code>MapdustGUI</code> object
+     *
+     * @return the mapdustGUI
+     */
+    public MapdustGUI getMapdustGUI() {
+        return mapdustGUI;
+    }
+
+    /**
+     * Sets the <code>MapdustGUI</code> object.
+     *
+     * @param mapdustGUI the mapdustGUI to set
+     */
+    public void setMapdustGUI(MapdustGUI mapdustGUI) {
+        this.mapdustGUI = mapdustGUI;
+    }
+
+    /**
+     * Returns the <code>MapdustLayer</code> object.
+     *
+     * @return the mapdustLayer
+     */
+    public MapdustLayer getMapdustLayer() {
+        return mapdustLayer;
+    }
+
+    /**
+     * Sets the <code>MapdustLayer</code> object.
+     *
+     * @param mapdustLayer the mapdustLayer to set
+     */
+    public void setMapdustLayer(MapdustLayer mapdustLayer) {
+        this.mapdustLayer = mapdustLayer;
+    }
+
+    /**
+     * Returns the list of <code>MapdustBug</code> objects
+     *
+     * @return the mapdustBugList
+     */
+    public List<MapdustBug> getMapdustBugList() {
+        return mapdustBugList;
+    }
+
+    /**
+     * Returns the MapDust bug filter
+     *
+     * @return the filter
+     */
+    public MapdustBugFilter getFilter() {
+        return filter;
+    }
+
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/MapdustActionUploader.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/MapdustActionUploader.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/MapdustActionUploader.java	(revision 35962)
@@ -0,0 +1,123 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui;
+
+
+import java.util.List;
+
+import org.openstreetmap.josm.plugins.mapdust.gui.value.MapdustAction;
+import org.openstreetmap.josm.plugins.mapdust.gui.value.MapdustServiceCommand;
+import org.openstreetmap.josm.plugins.mapdust.service.MapdustServiceHandler;
+import org.openstreetmap.josm.plugins.mapdust.service.MapdustServiceHandlerException;
+
+
+/**
+ * Uploads the user's modifications to the MapDust service.
+ *
+ * @author Bea
+ * @version $Revision$
+ */
+public final class MapdustActionUploader {
+
+    /** The <code>MapdustActionUploader</code> instance */
+    private static MapdustActionUploader instance;
+
+    /** The <code>MapdustServiceHandler</code> object */
+    private static MapdustServiceHandler handler;
+
+    /**
+     * Builds a <code>MapdustActionUploader</code> object
+     */
+    private MapdustActionUploader() {
+        handler = new MapdustServiceHandler();
+    }
+
+    /**
+     * Returns a new instance of the <code>MapdustActionUploader</code> object.
+     * If the instance is null, then creates a new one. Otherwise returns the
+     * existing instance.
+     *
+     * @return new instance of <code>MapdustActionUploader</code>
+     */
+    public static MapdustActionUploader getInstance() {
+        if (instance == null) {
+            instance = new MapdustActionUploader();
+        }
+        return instance;
+    }
+
+    /**
+     * Uploads the given data to the MapdDst service.
+     *
+     * @param actionList A list of <code>MapdustAction</code> objects
+     * @throws MapdustActionUploaderException If there was some error during the
+     * upload to MapDust service
+     */
+    public void uploadData(List<MapdustAction> actionList)
+            throws MapdustActionUploaderException {
+        if (actionList != null && actionList.size() > 0) {
+            try {
+                for (MapdustAction action : actionList) {
+                    dispatchAction(action);
+                }
+            } catch (MapdustServiceHandlerException e) {
+                throw new MapdustActionUploaderException(
+                        "Error durring uploading data to Mapdust service!", e);
+            }
+        }
+
+    }
+
+    /**
+     * Handles the given action based on the command type. If the command is
+     * "addBug" then creates a new bug. If the command is "commentBug" then
+     * creates a new comment for the given bug. Otherwise changes the status of
+     * the given bug.
+     *
+     * @param action A <code>MapdustAction</code> object
+     * @throws MapdustServiceHandlerException If there was some error during the
+     * upload to MapDust service
+     */
+    private void dispatchAction(MapdustAction action)
+            throws MapdustServiceHandlerException {
+        if (action.getCommand().equals(MapdustServiceCommand.ADD_BUG)) {
+            /* create new bug */
+            handler.addBug(action.getMapdustBug());
+        } else {
+            if (action.getCommand().equals(MapdustServiceCommand.COMMENT_BUG)) {
+                /* comment bug */
+                handler.commentBug(action.getMapdustComment());
+            } else {
+                /* change bug status */
+                handler.changeBugStatus(action.getNewStatus(),
+                        action.getMapdustComment());
+            }
+        }
+    }
+
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/MapdustActionUploaderException.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/MapdustActionUploaderException.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/MapdustActionUploaderException.java	(revision 35962)
@@ -0,0 +1,76 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui;
+
+
+/**
+ * Specific exception for the <code>MapdustActionUploader</code> object
+ *
+ * @author Bea
+ * @version $Revision$
+ */
+public class MapdustActionUploaderException extends Exception {
+
+    /**
+     * Builds an empty <code>MapdustActionUploaderException</code> object.
+     */
+    public MapdustActionUploaderException() {
+        super();
+    }
+
+    /**
+     * Builds a <code>MapdustActionUploaderException</code> object based on the
+     * given argument.
+     *
+     * @param message The message of the exception.
+     */
+    public MapdustActionUploaderException(String message) {
+        super(message);
+    }
+
+    /**
+     * Builds a <code>MapdustActionUploaderException</code> object based on the
+     * given argument.
+     *
+     * @param cause The cause of the exception.
+     */
+    public MapdustActionUploaderException(Throwable cause) {
+        super(cause);
+    }
+
+    /**
+     * Builds a <code>MapdustActionUploaderException</code> object based on the
+     * given arguments.
+     *
+     * @param message The message of the exception.
+     * @param cause The cause of the exception.
+     */
+    public MapdustActionUploaderException(String message, Throwable cause) {
+        super(message, cause);
+    }
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/MapdustGUI.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/MapdustGUI.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/MapdustGUI.java	(revision 35962)
@@ -0,0 +1,577 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui;
+
+
+import static org.openstreetmap.josm.tools.I18n.tr;
+
+import java.awt.BorderLayout;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.swing.JPanel;
+import javax.swing.JTabbedPane;
+
+import org.openstreetmap.josm.gui.MainApplication;
+import org.openstreetmap.josm.gui.dialogs.ToggleDialog;
+import org.openstreetmap.josm.plugins.mapdust.MapdustPlugin;
+import org.openstreetmap.josm.plugins.mapdust.gui.component.panel.MapdustActionPanel;
+import org.openstreetmap.josm.plugins.mapdust.gui.component.panel.MapdustBugListPanel;
+import org.openstreetmap.josm.plugins.mapdust.gui.component.panel.MapdustBugPropertiesPanel;
+import org.openstreetmap.josm.plugins.mapdust.gui.observer.MapdustActionObserver;
+import org.openstreetmap.josm.plugins.mapdust.gui.observer.MapdustBugDetailsObservable;
+import org.openstreetmap.josm.plugins.mapdust.gui.observer.MapdustBugDetailsObserver;
+import org.openstreetmap.josm.plugins.mapdust.gui.observer.MapdustUpdateObservable;
+import org.openstreetmap.josm.plugins.mapdust.gui.observer.MapdustUpdateObserver;
+import org.openstreetmap.josm.plugins.mapdust.gui.value.MapdustAction;
+import org.openstreetmap.josm.plugins.mapdust.gui.value.MapdustPluginState;
+import org.openstreetmap.josm.plugins.mapdust.gui.value.MapdustServiceCommand;
+import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustBug;
+import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustBugFilter;
+import org.openstreetmap.josm.plugins.mapdust.service.value.Status;
+import org.openstreetmap.josm.spi.preferences.Config;
+import org.openstreetmap.josm.tools.Shortcut;
+
+
+/**
+ * This class is the main graphical user interface class.
+ *
+ * @author Bea
+ */
+public class MapdustGUI extends ToggleDialog implements MapdustActionObserver,
+        MapdustBugDetailsObservable, MapdustUpdateObservable {
+
+    /** The serial version UID */
+    private static final long serialVersionUID = -1194197412364335190L;
+
+    /** The list of MapDust bug details observers */
+    private final ArrayList<MapdustBugDetailsObserver> bugDetailsObservers =
+            new ArrayList<>();
+
+    /** The list of MapDust initial update observers */
+    private final ArrayList<MapdustUpdateObserver> initialUpdateObservers =
+            new ArrayList<>();
+
+    /** The <code>MapdustPlugin</code> plug-in */
+    private MapdustPlugin mapdustPlugin;
+
+    /** The <code>MapdustBugPropertiesPanel</code> */
+    private MapdustBugPropertiesPanel detailsPanel;
+
+    /** The <code>MapdustBugListPanel</code> object */
+    private MapdustBugListPanel panel;
+
+    /** The <code>MapdustActionPanel</code> object */
+    private MapdustActionPanel actionPanel;
+
+    /** The <code>JTabbedPanel</code> object */
+    private JTabbedPane tabbedPane;
+
+    /** The <code>JPanel</code> */
+    private JPanel mainPanel;
+
+    /** Specifies if the MapDust data was or not downloaded */
+    private boolean downloaded;
+
+    /** Remembers if the dialog has been destroyed */
+    private boolean destroyed;
+
+    /**
+     * Builds a <code>MapdustGUi</code> based on the given parameters.
+     *
+     * @param name The name of the GUI
+     * @param iconName The name of the icon
+     * @param tooltip The tool tip
+     * @param shortcut The shortcut
+     * @param preferredHeight The height
+     * @param mapdustPlugin The <code>MapdustPlugin</code> object
+     */
+    public MapdustGUI(String name, String iconName, String tooltip,
+            Shortcut shortcut, int preferredHeight, MapdustPlugin mapdustPlugin) {
+        super(tr(name), iconName, tr(tooltip), shortcut, preferredHeight);
+        this.mapdustPlugin = mapdustPlugin;
+    }
+
+    /**
+     * Displays the <code>MapdustGUI</code> dialog window in the JOSM editor. If
+     * the MapDust data was not down-loaded yet or the MapDust layer was added
+     * after a previous deletion, then the bug reports data will be deleted.
+     */
+    @Override
+    public void showDialog() {
+        if (!downloaded) {
+            notifyObservers(null, true);
+            downloaded = true;
+        }
+        super.showDialog();
+    }
+
+    /**
+     * Destroys the <code>MapdustGUI</code> dialog window.
+     */
+    @Override
+    public void destroy() {
+        setVisible(false);
+        /* remove panels */
+        if (tabbedPane != null) {
+            /* from off-line to online */
+            remove(mainPanel);
+            tabbedPane = null;
+            actionPanel = null;
+            mainPanel = null;
+            panel = null;
+            actionPanel = null;
+        } else {
+            /* from online to off-line */
+            if (mainPanel != null) {
+                remove(mainPanel);
+                mainPanel = null;
+                panel = null;
+                detailsPanel = null;
+            }
+        }
+        downloaded = false;
+        button.setSelected(false);
+        if (!destroyed) {
+            super.destroy();
+            destroyed = true;
+        }
+    }
+
+    @Override
+    protected void toggleButtonHook() {
+        if (isVisible()) {
+            setVisible(false);
+            button.setSelected(false);
+        } else {
+            setVisible(true);
+        }
+    }
+
+    /**
+     * Adds the given <code>MapdustAction</code> object to the list of actions.
+     *
+     * @param action The <code>MapdustAction</code> object
+     */
+    @Override
+    public synchronized void addAction(MapdustAction action) {
+        /* add the action */
+        List<MapdustAction> actionList = actionPanel.getActionList();
+        actionList.add(action);
+        List<MapdustBug> mapdustBugs = panel.getMapdustBugsList();
+        boolean showBug = shouldDisplay(action.getMapdustBug(),
+                mapdustPlugin.getFilter());
+        mapdustBugs = modifyBug(mapdustBugs, action.getMapdustBug(), showBug);
+        /* update panels */
+        updateMapdustPanel(mapdustBugs);
+        updateMapdustActionPanel(actionList);
+        if (showBug && !action.getCommand().equals(MapdustServiceCommand.ADD_BUG)) {
+            panel.resetSelectedBug(0);
+        } else {
+            mapdustPlugin.getMapdustLayer().setBugSelected(null);
+        }
+        revalidate();
+        MainApplication.getMap().mapView.revalidate();
+        MainApplication.getMap().repaint();
+    }
+
+    /**
+     * Verifies if the given <code>MapdustBug</code> should be shown on the
+     * MapDust bug list/ map. Any <code>MapdustBug</code> should be shown on the
+     * MapDust bug list / map only if it is permitted by the selected filters.
+     *
+     * @param modifiedBug The <code>MapdustBug</code> object
+     * @param filter The <code>MapdustBugFilter</code> object
+     * @return true if the given MapDust bug should be shown in the list/map
+     * false otherwise
+     */
+    private boolean shouldDisplay(MapdustBug modifiedBug,
+            MapdustBugFilter filter) {
+        boolean result = false;
+        if (filter != null && filter.getStatuses() != null
+                && !filter.getStatuses().isEmpty()) {
+            if (filter.getStatuses().contains(modifiedBug.getStatus().getKey())) {
+                result = true;
+            }
+        } else {
+            result = true;
+        }
+        return result;
+    }
+
+    /**
+     * Updates the MapDust GUI with the given list of <code>MapdustBug</code>
+     * objects.
+     *
+     * @param mapdustBugs The list of <code>MapdustBug</code> objects
+     * @param mapdustPlugin The <code>MapdustPlugin</code> object
+     */
+    public synchronized void update(List<MapdustBug> mapdustBugs,
+            MapdustPlugin mapdustPlugin) {
+        setMapdustPlugin(mapdustPlugin);
+        String pluginState = Config.getPref().get("mapdust.pluginState");
+        if (pluginState.equals(MapdustPluginState.ONLINE.getValue())) {
+            if (tabbedPane != null) {
+                /* from off-line to online */
+                remove(mainPanel);
+                tabbedPane = null;
+                actionPanel = null;
+                mainPanel = null;
+                panel = null;
+            }
+            updateMapdustPanel(mapdustBugs);
+            if (mainPanel == null) {
+                createMainPanel();
+            }
+        } else {
+            if (tabbedPane == null) {
+                /* from online to off-line */
+                remove(mainPanel);
+                mainPanel = null;
+                panel = null;
+            }
+            List<MapdustAction> actionList = actionPanel != null ?
+                    actionPanel.getActionList() : new ArrayList<>();
+
+            /* update panels */
+            List<MapdustBug> bugs = filterMapdustBugList(mapdustBugs,
+                    actionList, mapdustPlugin.getFilter());
+            updateMapdustPanel(bugs);
+            updateMapdustActionPanel(actionList);
+            if (mainPanel == null) {
+                createMainPanel();
+            }
+        }
+    }
+
+    /**
+     * Updates the MapDust bugs panel with the new list of data.
+     *
+     * @param mapdustBugs The list of <code>MapdustBug</code> objects
+     */
+    private void updateMapdustPanel(List<MapdustBug> mapdustBugs) {
+        MapdustBug selectedBug = (mapdustBugs != null && mapdustBugs.size()
+                > 0) ? mapdustBugs.get(0) : null;
+        if (detailsPanel == null) {
+            detailsPanel = new MapdustBugPropertiesPanel(selectedBug);
+            addObserver(detailsPanel);
+        }
+        if (panel == null) {
+            panel = new MapdustBugListPanel(mapdustBugs, "Bug reports",
+                    mapdustPlugin);
+            panel.addObserver(detailsPanel);
+        } else {
+            panel.updateComponents(mapdustBugs);
+            notifyObservers(selectedBug);
+        }
+    }
+
+    /**
+     * Updates the MapDust action panel with the new list of data.
+     *
+     * @param actionList The list of <code>MapdustAction</code> objects
+     */
+    private void updateMapdustActionPanel(List<MapdustAction> actionList) {
+        if (actionPanel == null) {
+            actionPanel = new MapdustActionPanel(actionList,
+                    "Offline Contribution", mapdustPlugin);
+        } else {
+            actionPanel.updateComponents(actionList);
+        }
+    }
+
+    /**
+     * Creates the main panel of the plug-in and adds to the content pane.
+     */
+    private void createMainPanel() {
+        mainPanel = new JPanel();
+        mainPanel.setAutoscrolls(true);
+        mainPanel.setLayout(new BorderLayout());
+        mainPanel.add(detailsPanel, BorderLayout.NORTH);
+        if (actionPanel == null) {
+            mainPanel.add(panel, BorderLayout.CENTER);
+        } else {
+            tabbedPane = new JTabbedPane();
+            tabbedPane.add(panel, 0);
+            tabbedPane.add(actionPanel);
+            mainPanel.add(tabbedPane, BorderLayout.CENTER);
+        }
+        createLayout(mainPanel, false, null);
+    }
+
+
+    /**
+     * Filters the given list of <code>MapdustBug</code>s based on the given
+     * list of <code>MapdustAction</code>s. The filtering is done in order to
+     * show the modified bugs ( but not already committed operations) if they
+     * also appears in the new list of bugs, according to the latest
+     * modifications.
+     *
+     * @param bugList The list of <code>MapdustBug</code> objects
+     * @param actionList The list of <code>MapdustAction</code> objects
+     * @param filter The <code>MapdustBugFilter</code> object
+     * @return A filtered list of <code>MapdustBug</code>s
+     */
+    private List<MapdustBug> filterMapdustBugList(List<MapdustBug> bugList,
+            List<MapdustAction> actionList, MapdustBugFilter filter) {
+        if (bugList != null && actionList != null) {
+            for (MapdustAction action : actionList) {
+                int index = bugList.indexOf(action.getMapdustBug());
+                if (index >= 0) {
+                    if (action.getNewStatus() != null) {
+                        Status newStatus =
+                                Status.getStatus(action.getNewStatus());
+                        if (filter != null && filter.getStatuses() != null
+                                && !filter.getStatuses().isEmpty()) {
+                            if (filter.getStatuses().contains(
+                                    newStatus.getKey())) {
+                                bugList.get(index).setStatus(newStatus);
+                            } else {
+                                bugList.remove(index);
+                            }
+                        } else {
+                            bugList.get(index).setStatus(newStatus);
+                        }
+                    }
+                }
+            }
+        }
+        return bugList;
+    }
+
+    /**
+     * Modifies the given <code>MapdustBug</code> in the given list of
+     * <code>MapdustBug</code> objects. Returns the list of bugs containing the
+     * modified bug.
+     *
+     * @param mapdustBugs The list of <code>MapdustBug</code> objects
+     * @param modifiedBug The <code>MapdustBug</code> object
+     * @param showBug A flag indicating if the given modified bug should be
+     * displayed on the map and on the list of bugs
+     * @return the modified list
+     */
+    private List<MapdustBug> modifyBug(List<MapdustBug> mapdustBugs,
+            MapdustBug modifiedBug, boolean showBug) {
+        int index = -1;
+        for (int i = 0; i < mapdustBugs.size(); i++) {
+            if (modifiedBug.getId() != null) {
+                if (mapdustBugs.get(i).getId().equals(modifiedBug.getId())) {
+                    index = i;
+                }
+            }
+        }
+        if (index != -1) {
+            /* remove, and add to the top of the list */
+            mapdustBugs.remove(index);
+            if (showBug) {
+                mapdustBugs.add(0, modifiedBug);
+            }
+        }
+        return mapdustBugs;
+    }
+
+    /**
+     * Returns the selected bug from the list of bugs. If there is no bug
+     * selected then the returned result is null.
+     *
+     * @return The selected bug
+     */
+    public MapdustBug getSelectedBug() {
+        MapdustBug selectedBug = null;
+        if (panel != null) {
+            selectedBug = panel.getSelectedBug();
+        }
+        return selectedBug;
+    }
+
+    /**
+     * Sets the given <code>MapdustBug</code> to be selected from the list of
+     * bugs.
+     *
+     * @param mapdustBug The <code>MapdustBug</code> object
+     */
+    public void setSelectedBug(MapdustBug mapdustBug) {
+        if (panel != null) {
+            panel.setSelectedBug(mapdustBug);
+        }
+    }
+
+    /**
+     * Disables the buttons from the <code>MapdustPanel</code>.
+     *
+     */
+    public void disableBtnPanel() {
+        if (panel != null) {
+            panel.disableBtnPanel();
+        }
+    }
+
+    /**
+     * Enables the basic components from the <code>MapdustButtonPanel</code>.
+     * Basic components are considered the following buttons: work off-line,
+     * filter bug report, and refresh.If the onlyBasic flag is true then the
+     * other buttons will be disabled.
+     *
+     * @param onlyBasic If true then the not basic buttons will be disabled
+     */
+    public void enableBtnPanel(boolean onlyBasic) {
+        if (panel != null) {
+            panel.enableBtnPanel(onlyBasic);
+        }
+    }
+
+    /**
+     * Returns the list of <code>MapdustAction</code> objects.
+     *
+     * @return list of <code>MapdustAction</code>
+     */
+    public List<MapdustAction> getMapdustActionList() {
+        return getActionPanel().getActionList();
+    }
+
+    /**
+     * Adds a new MapDust bug details observer to the list of observers.
+     *
+     * @param observer The <code>MapdustBugDetailsObserver</code> object
+     */
+    @Override
+    public void addObserver(MapdustBugDetailsObserver observer) {
+        if (!this.bugDetailsObservers.contains(observer)) {
+            this.bugDetailsObservers.add(observer);
+        }
+    }
+
+    /**
+     * Adds a new MapDust update observer to the list of observers.
+     *
+     * @param observer The <code>MapdustUpdateObserver</code> object
+     */
+    @Override
+    public void addObserver(MapdustUpdateObserver observer) {
+        if (!this.initialUpdateObservers.contains(observer)) {
+            this.initialUpdateObservers.add(observer);
+        }
+    }
+
+    /**
+     * Removes the given MapDust bug details observer from the list of
+     * observers.
+     *
+     * @param observer The <code>MapdustBugDetailsObserver</code> object
+     */
+    @Override
+    public void removeObserver(MapdustBugDetailsObserver observer) {
+        this.bugDetailsObservers.remove(observer);
+
+    }
+
+    /**
+     * Removes the given MapDust initial update observer from the list of
+     * observers.
+     *
+     * @param observer The <code>MapdustInitialUpdateObserver</code> object
+     */
+    @Override
+    public void removeObserver(MapdustUpdateObserver observer) {
+        this.initialUpdateObservers.remove(observer);
+
+    }
+
+    /**
+     * Notifies the <code>MapdustBugDetailsObserver</code> objects observing the
+     * given <code>MapdustBug</code> object.
+     */
+    @Override
+    public void notifyObservers(MapdustBug mapdustBug) {
+        Iterator<MapdustBugDetailsObserver> elements =
+                this.bugDetailsObservers.iterator();
+        while (elements.hasNext()) {
+            elements.next().showDetails(mapdustBug);
+        }
+    }
+
+    /**
+     * Notifies the <code>MapdustInitialUpdateObserver</code> objects waiting
+     * for the initial down-load, and update of plug-in.
+     */
+    @Override
+    public void notifyObservers(MapdustBugFilter filter, boolean first) {
+        Iterator<MapdustUpdateObserver> elements =
+                this.initialUpdateObservers.iterator();
+        while (elements.hasNext()) {
+            elements.next().update(filter, first);
+        }
+    }
+
+    /**
+     * Returns the <code>MapdustPanel</code> object
+     *
+     * @return the panel
+     */
+    public MapdustBugListPanel getPanel() {
+        return panel;
+    }
+
+    /**
+     * Returns the <code>MapdustActionPanel</code> object
+     *
+     * @return the queuePanel
+     */
+    public MapdustActionPanel getActionPanel() {
+        return actionPanel;
+    }
+
+    /**
+     * Returns the <code>MapdustPlugin</code> object
+     *
+     * @return the mapdustPlugin
+     */
+    public MapdustPlugin getMapdustPlugin() {
+        return mapdustPlugin;
+    }
+
+    /**
+     * Sets the <code>MapdustPlugin</code> object
+     *
+     * @param mapdustPlugin the mapdustPlugin to set
+     */
+    public void setMapdustPlugin(MapdustPlugin mapdustPlugin) {
+        this.mapdustPlugin = mapdustPlugin;
+    }
+
+    /**
+     * Returns the down-loaded flag
+     *
+     * @return the down-loaded
+     */
+    public boolean isDownloaded() {
+        return downloaded;
+    }
+
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/adapter/DisplayMenu.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/adapter/DisplayMenu.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/adapter/DisplayMenu.java	(revision 35962)
@@ -0,0 +1,109 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.action.adapter;
+
+
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+
+import javax.swing.JList;
+import javax.swing.JPopupMenu;
+
+import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustBug;
+
+
+/**
+ * Displays the pop-up menu for the given selected element from the list of
+ * bugs.
+ *
+ * @author Bea
+ * @version $Revision$
+ */
+public class DisplayMenu extends MouseAdapter {
+
+    /** The <code>JPopupMenu</code> */
+    private JPopupMenu menu;
+
+    /** The list of bugs */
+    private JList<MapdustBug> listBugs;
+
+    /**
+     * Builds a <code>DisplayMenu</code> object
+     */
+    public DisplayMenu() {}
+
+    /**
+     * Builds a <code>DisplayMenu</code> object with the given arguments.
+     *
+     * @param listBugs The <code>JList</code> of <code>MapdustBug</code> objects
+     * @param menu The <code>JPopupMenu</code> object
+     */
+    public DisplayMenu(JList<MapdustBug> listBugs, JPopupMenu menu) {
+        this.listBugs = listBugs;
+        this.menu = menu;
+    }
+
+    @Override
+    public void mouseClicked(MouseEvent e) {
+        /* show the pop-up menu */
+        showMenu(e);
+    }
+
+    @Override
+    public void mousePressed(MouseEvent e) {
+        /* show the pop-up menu */
+        showMenu(e);
+    }
+
+    @Override
+    public void mouseReleased(MouseEvent e) {
+        /* show the pop-up menu */
+        showMenu(e);
+    }
+
+    /**
+     * Shows the menu if the given <code>MouseEvent</code> object has trigger
+     * the popup action.
+     *
+     * @param event The <code>MouseEvent</code> object
+     */
+    private void showMenu(MouseEvent event) {
+        if (event.isPopupTrigger()) {
+            int x = event.getX();
+            int y = event.getY();
+            int locationToIndex = listBugs.locationToIndex(event.getPoint());
+            int selectedIndex = listBugs.getSelectedIndex();
+            if (!listBugs.isSelectionEmpty()
+                    && locationToIndex == selectedIndex) {
+                menu.show(listBugs, x, y);
+
+            }
+        }
+    }
+
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/adapter/WindowClose.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/adapter/WindowClose.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/adapter/WindowClose.java	(revision 35962)
@@ -0,0 +1,120 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.action.adapter;
+
+
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
+
+import org.openstreetmap.josm.plugins.mapdust.gui.component.dialog.AbstractDialog;
+import org.openstreetmap.josm.plugins.mapdust.gui.component.panel.MapdustButtonPanel;
+import org.openstreetmap.josm.plugins.mapdust.gui.value.MapdustPluginState;
+import org.openstreetmap.josm.plugins.mapdust.service.value.Status;
+import org.openstreetmap.josm.spi.preferences.Config;
+
+
+/**
+ * Closes the given dialog window.
+ *
+ * @author Bea
+ * @version $Revision$
+ */
+public class WindowClose extends WindowAdapter {
+
+    /** A <code>AbstractDialog</code> object */
+    private AbstractDialog dialog;
+
+    /** The <code>MapdustButtonPanel</code> object */
+    private MapdustButtonPanel btnPanel;
+
+    /**
+     * Builds a <code>WindowClose</code> object
+     */
+    public WindowClose() {}
+
+    /**
+     * Builds a <code>WindowClose</code> object based on the given arguments
+     *
+     * @param dialog The dialog which will be closed
+     * @param btnPanel The button panel
+     */
+    public WindowClose(AbstractDialog dialog, MapdustButtonPanel btnPanel) {
+        this.dialog = dialog;
+        this.btnPanel = btnPanel;
+    }
+
+    @Override
+    public void windowClosing(WindowEvent event) {
+        String status = Config.getPref().get("selectedBug.status");
+        String pluginState = Config.getPref().get("mapdust.pluginState");
+        /* enable buttons */
+        if (btnPanel != null) {
+            btnPanel.getBtnWorkOffline().setEnabled(true);
+            btnPanel.getBtnWorkOffline().setSelected(false);
+            btnPanel.getBtnWorkOffline().setFocusable(false);
+            btnPanel.getBtnFilter().setEnabled(true);
+            btnPanel.getBtnFilter().setSelected(false);
+            btnPanel.getBtnFilter().setFocusable(false);
+            if (pluginState.equals(MapdustPluginState.OFFLINE.getValue())) {
+                btnPanel.getBtnRefresh().setEnabled(false);
+            } else {
+                btnPanel.getBtnRefresh().setEnabled(true);
+                btnPanel.getBtnRefresh().setSelected(false);
+                btnPanel.getBtnRefresh().setFocusable(false);
+            }
+            if (status.equals(Status.OPEN.getValue())) {
+                btnPanel.getBtnFixBugReport().setEnabled(true);
+                btnPanel.getBtnInvalidateBugReport().setEnabled(true);
+                btnPanel.getBtnAddComment().setEnabled(true);
+            } else {
+                if (status.equals(Status.FIXED.getValue())) {
+                    btnPanel.getBtnReOpenBugReport().setEnabled(true);
+                    btnPanel.getBtnAddComment().setEnabled(true);
+                } else {
+                    if (status.equals(Status.INVALID.getValue())) {
+                        btnPanel.getBtnReOpenBugReport().setEnabled(true);
+                        btnPanel.getBtnAddComment().setEnabled(true);
+                    }
+                }
+            }
+        }
+
+        btnPanel.getBtnAddComment().setSelected(false);
+        btnPanel.getBtnAddComment().setFocusable(false);
+        btnPanel.getBtnFixBugReport().setSelected(false);
+        btnPanel.getBtnFixBugReport().setFocusable(false);
+        btnPanel.getBtnInvalidateBugReport().setSelected(false);
+        btnPanel.getBtnInvalidateBugReport().setFocusable(false);
+        btnPanel.getBtnReOpenBugReport().setSelected(false);
+        btnPanel.getBtnReOpenBugReport().setFocusable(false);
+
+        /* dispose dialog */
+        dialog.dispose();
+    }
+
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/adapter/package-info.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/adapter/package-info.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/adapter/package-info.java	(revision 35962)
@@ -0,0 +1,4 @@
+/**
+ * Contains the adapter classes.
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.action.adapter;
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/ExecuteActionList.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/ExecuteActionList.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/ExecuteActionList.java	(revision 35962)
@@ -0,0 +1,85 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.action.execute;
+
+import static org.openstreetmap.josm.tools.I18n.tr;
+
+import java.awt.event.ActionEvent;
+
+import javax.swing.JOptionPane;
+import javax.swing.JToggleButton;
+
+import org.openstreetmap.josm.gui.MainApplication;
+import org.openstreetmap.josm.plugins.mapdust.gui.MapdustActionUploader;
+import org.openstreetmap.josm.plugins.mapdust.gui.MapdustActionUploaderException;
+import org.openstreetmap.josm.plugins.mapdust.gui.MapdustGUI;
+import org.openstreetmap.josm.plugins.mapdust.gui.value.MapdustPluginState;
+import org.openstreetmap.josm.spi.preferences.Config;
+
+/**
+ * Uploads the <code>MapdustAction</code> objects from the action list to the
+ * MapDust service. After the upload is done, the plugin state become 'ONLINE'
+ * and the MapdustBug objects will be refreshed.
+ *
+ * @author Bea
+ *
+ */
+public class ExecuteActionList extends MapdustExecuteActionObservable {
+
+    /**
+     * Builds a <code>ExecuteActionList</code> object
+     *
+     * @param mapdustGUI The <code>MapdustGUI</code> object
+     */
+    public ExecuteActionList(MapdustGUI mapdustGUI) {
+        setMapdustGUI(mapdustGUI);
+    }
+
+    /**
+     * Uploads the content of the action list to the MapDust service.
+     *
+     * @param event The event which fires this action
+     */
+    @Override
+    public void actionPerformed(ActionEvent event) {
+        if (event.getSource() instanceof JToggleButton) {
+            try {
+                MapdustActionUploader.getInstance().uploadData(
+                        getMapdustGUI().getMapdustActionList());
+            } catch (MapdustActionUploaderException e) {
+                String errorMessage = "There was an error uploading the ";
+                errorMessage += "action list.";
+                JOptionPane.showMessageDialog(MainApplication.getMainFrame(), tr(errorMessage),
+                        tr("Error"), JOptionPane.ERROR_MESSAGE);
+            }
+            Config.getPref().put("mapdust.pluginState",
+                    MapdustPluginState.ONLINE.getValue());
+            notifyObservers(null, false);
+        }
+    }
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/ExecuteAddBug.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/ExecuteAddBug.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/ExecuteAddBug.java	(revision 35962)
@@ -0,0 +1,249 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.action.execute;
+
+
+import static org.openstreetmap.josm.tools.I18n.tr;
+
+import java.awt.Point;
+import java.awt.event.ActionEvent;
+import java.util.ArrayList;
+import java.util.Iterator;
+
+import javax.swing.JOptionPane;
+
+import org.openstreetmap.josm.data.coor.LatLon;
+import org.openstreetmap.josm.gui.MainApplication;
+import org.openstreetmap.josm.plugins.mapdust.gui.MapdustGUI;
+import org.openstreetmap.josm.plugins.mapdust.gui.component.dialog.CreateBugDialog;
+import org.openstreetmap.josm.plugins.mapdust.gui.observer.MapdustActionObservable;
+import org.openstreetmap.josm.plugins.mapdust.gui.observer.MapdustActionObserver;
+import org.openstreetmap.josm.plugins.mapdust.gui.observer.MapdustBugObservable;
+import org.openstreetmap.josm.plugins.mapdust.gui.observer.MapdustBugObserver;
+import org.openstreetmap.josm.plugins.mapdust.gui.value.MapdustAction;
+import org.openstreetmap.josm.plugins.mapdust.gui.value.MapdustPluginState;
+import org.openstreetmap.josm.plugins.mapdust.gui.value.MapdustServiceCommand;
+import org.openstreetmap.josm.plugins.mapdust.service.MapdustServiceHandler;
+import org.openstreetmap.josm.plugins.mapdust.service.MapdustServiceHandlerException;
+import org.openstreetmap.josm.plugins.mapdust.service.value.BugType;
+import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustBug;
+import org.openstreetmap.josm.plugins.mapdust.service.value.Status;
+import org.openstreetmap.josm.spi.preferences.Config;
+
+
+/**
+ * Creates a new <code>MapdustBug</code> object. Validates the input data, and
+ * based on the plugin state executes the corresponding action. If the plugin is
+ * in the "ONLINE" state then executes the Mapdust Service 'addBug' method with
+ * the given input parameters. If the plugin is in the "OFFLINE" state then adds
+ * the given action to the actions list.
+ *
+ * @author Bea
+ *
+ */
+public class ExecuteAddBug extends MapdustExecuteAction implements
+        MapdustBugObservable, MapdustActionObservable {
+
+    /** The serial version UID */
+    private static final long serialVersionUID = 8023875766573474513L;
+
+    /** The list of MapDust bug observers */
+    private final ArrayList<MapdustBugObserver> bugObservers =
+            new ArrayList<>();
+
+    /** The list of MapDust action observers */
+    private final ArrayList<MapdustActionObserver> actionObservers =
+            new ArrayList<>();
+
+    /**
+     * Builds a <code>ExecuteAddBug</code> object
+     */
+    public ExecuteAddBug() {}
+
+    /**
+     * Builds a <code>ExecuteAddBug</code> object based on the given arguments.
+     *
+     * @param dialog The <code>CreateIssueDialog</code> object
+     * @param mapdustGUI The <code>MapdustGUI</code> object
+     */
+    public ExecuteAddBug(CreateBugDialog dialog, MapdustGUI mapdustGUI) {
+        setDialog(dialog);
+        setMapdustGUI(mapdustGUI);
+    }
+
+    /**
+     * Creates a new <code>MapdustBug</code> object if the entered informations
+     * are valid. Otherwise a corresponding warning message will be shown to the
+     * user.
+     *
+     * @param event The action event which fires this action
+     */
+    @Override
+    public void actionPerformed(ActionEvent event) {
+        if (event != null) {
+            CreateBugDialog createDialog = (CreateBugDialog) getDialog();
+            BugType type = (BugType) createDialog.getCbbType().getSelectedItem();
+            String nickname = createDialog.getTxtNickname().getText();
+            String commentText = createDialog.getTxtDescription().getText();
+            /* validates the input */
+            String errorMessage = validate(nickname, commentText);
+            if (errorMessage != null) {
+                /* invalid data */
+                JOptionPane.showMessageDialog(MainApplication.getMainFrame(), tr(errorMessage),
+                        tr("Missing input data"), JOptionPane.WARNING_MESSAGE);
+                return;
+            }
+            /* valid data */
+            Config.getPref().put("mapdust.nickname", nickname);
+            Point p = createDialog.getPoint();
+            LatLon latlon = null;
+            if (p != null) {
+                latlon = MainApplication.getMap().mapView.getLatLon(p.x, p.y);
+            }
+            MapdustBug bug = new MapdustBug(latlon, type, commentText,
+                    nickname);
+            String pluginState = Config.getPref().get("mapdust.pluginState");
+            if (pluginState.equals(MapdustPluginState.OFFLINE.getValue())) {
+                /* offline state */
+                bug.setStatus(Status.OPEN);
+                String iconPath = getIconPath(bug);
+                MapdustAction mapdustAction = new MapdustAction(
+                        MapdustServiceCommand.ADD_BUG, iconPath, bug);
+                /* destroy dialog */
+                getDialog().dispose();
+                mapdustGUI.enableBtnPanel(false);
+                if (getMapdustGUI().getActionPanel() != null) {
+                    notifyObservers(mapdustAction);
+                }
+            } else {
+                /* online state */
+                MapdustServiceHandler handler = new MapdustServiceHandler();
+                Long id = null;
+                try {
+                    id = handler.addBug(bug);
+                } catch (MapdustServiceHandlerException e) {
+                    errorMessage = "There was a Mapdust service error.";
+                    JOptionPane.showMessageDialog(MainApplication.getMainFrame(), tr(errorMessage),
+                            tr("Error"), JOptionPane.ERROR_MESSAGE);
+                }
+                if (id != null) {
+                    /* success */
+                    MapdustBug newMapdustBug = null;
+                    try {
+                        newMapdustBug = handler.getBug(id, null);
+                    } catch (MapdustServiceHandlerException e) {
+                        errorMessage = "There was a Mapdust service error.";
+                        JOptionPane.showMessageDialog(MainApplication.getMainFrame(),
+                                tr(errorMessage), tr("Error"),
+                                JOptionPane.ERROR_MESSAGE);
+                    }
+                    /* destroy dialog */
+                    getDialog().dispose();
+                    mapdustGUI.enableBtnPanel(false);
+                    if (newMapdustBug != null) {
+                        notifyObservers(newMapdustBug);
+                    }
+                }
+            }
+        }
+    }
+
+    /**
+     * Adds a new MapDust bug observer to the list of observers.
+     *
+     * @param observer The <code>MapdustBugObserver</code> object
+     */
+    @Override
+    public void addObserver(MapdustBugObserver observer) {
+        if (!this.bugObservers.contains(observer)) {
+            this.bugObservers.add(observer);
+        }
+    }
+
+    /**
+     * Removes the MapDust bug observer object from the list of observers.
+     *
+     * @param observer The <code>MapdustBugObserver</code> object
+     */
+    @Override
+    public void removeObserver(MapdustBugObserver observer) {
+        this.bugObservers.remove(observer);
+    }
+
+    /**
+     * Notifies the observers observing this action.
+     *
+     * @param mapdustBug The <code>MapdustBug</code> object
+     */
+    @Override
+    public void notifyObservers(MapdustBug mapdustBug) {
+        Iterator<MapdustBugObserver> elements = this.bugObservers.iterator();
+        while (elements.hasNext()) {
+            elements.next().changedData(mapdustBug);
+        }
+    }
+
+    /**
+     * Adds a new MapDust action list observer to the list of observers.
+     *
+     * @param observer The <code>MapdustActionListObserver</code> object
+     */
+    @Override
+    public void addObserver(MapdustActionObserver observer) {
+        if (!this.actionObservers.contains(observer)) {
+            this.actionObservers.add(observer);
+        }
+    }
+
+    /**
+     * Removes the MapDust action list observer object from the list of
+     * observers.
+     *
+     * @param observer The <code>MapdustActionListObserver</code> object
+     */
+    @Override
+    public void removeObserver(MapdustActionObserver observer) {
+        this.actionObservers.remove(observer);
+
+    }
+
+    /**
+     * Notifies the observers observing this action.
+     *
+     * @param mapdustAction The <code>MapdustAction</code> object
+     */
+    @Override
+    public void notifyObservers(MapdustAction mapdustAction) {
+        Iterator<MapdustActionObserver> elements =
+                this.actionObservers.iterator();
+        while (elements.hasNext()) {
+            elements.next().addAction(mapdustAction);
+        }
+    }
+
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/ExecuteCancel.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/ExecuteCancel.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/ExecuteCancel.java	(revision 35962)
@@ -0,0 +1,138 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.action.execute;
+
+
+import java.awt.event.ActionEvent;
+
+import org.openstreetmap.josm.plugins.mapdust.gui.MapdustGUI;
+import org.openstreetmap.josm.plugins.mapdust.gui.component.dialog.AbstractDialog;
+import org.openstreetmap.josm.plugins.mapdust.gui.component.panel.MapdustButtonPanel;
+import org.openstreetmap.josm.plugins.mapdust.gui.value.MapdustPluginState;
+import org.openstreetmap.josm.plugins.mapdust.service.value.Status;
+import org.openstreetmap.josm.spi.preferences.Config;
+
+
+/**
+ * This class is invoked whenever a "Cancel" button is pressed.
+ *
+ * @author Bea
+ *
+ */
+public class ExecuteCancel extends MapdustExecuteAction {
+
+    /** The serial version UID */
+    private static final long serialVersionUID = 5357125707042485489L;
+
+    /**
+     * Builds a <code>CancelAction</code> object
+     */
+    public ExecuteCancel() {}
+
+    /**
+     * Builds a <code>CancelAction</code> object
+     *
+     * @param dialog The <code>AbstractDialog</code> object
+     * @param mapdustGUI The <code>MapdustGUI</code> object
+     */
+    public ExecuteCancel(AbstractDialog dialog, MapdustGUI mapdustGUI) {
+        setDialog(dialog);
+        setMapdustGUI(mapdustGUI);
+    }
+
+    /**
+     * Cancels the executed action, and closes the visible dialog window.
+     *
+     * @param event The action event which fires this action
+     */
+    @Override
+    public void actionPerformed(ActionEvent event) {
+        if (event != null) {
+            String pluginState = Config.getPref().get("mapdust.pluginState");
+            String status = Config.getPref().get("selectedBug.status");
+            /* enable buttons */
+            MapdustButtonPanel btnPanel =
+                    getMapdustGUI().getPanel().getBtnPanel();
+            if (btnPanel != null) {
+                btnPanel.getBtnWorkOffline().setEnabled(true);
+                btnPanel.getBtnWorkOffline().setFocusable(false);
+                btnPanel.getBtnWorkOffline().setSelected(false);
+                if (pluginState.equals(MapdustPluginState.OFFLINE.getValue())) {
+                    btnPanel.getBtnRefresh().setEnabled(false);
+                } else {
+                    btnPanel.getBtnRefresh().setEnabled(true);
+                }
+                if (status.equals(Status.OPEN.getValue())) {
+                    btnPanel.getBtnFixBugReport().setEnabled(true);
+                    btnPanel.getBtnInvalidateBugReport().setEnabled(true);
+                    btnPanel.getBtnReOpenBugReport().setEnabled(false);
+                    btnPanel.getBtnAddComment().setEnabled(true);
+                } else {
+                    if (status.equals(Status.FIXED.getValue())) {
+                        btnPanel.getBtnFixBugReport().setEnabled(false);
+                        btnPanel.getBtnInvalidateBugReport().setEnabled(false);
+                        btnPanel.getBtnReOpenBugReport().setEnabled(true);
+                        btnPanel.getBtnAddComment().setEnabled(true);
+                    } else {
+                        if (status.equals(Status.INVALID.getValue())) {
+                            btnPanel.getBtnFixBugReport().setEnabled(false);
+                            btnPanel.getBtnInvalidateBugReport().setEnabled(
+                                    false);
+                            btnPanel.getBtnReOpenBugReport().setEnabled(true);
+                            btnPanel.getBtnAddComment().setEnabled(true);
+                        } else {
+                            if (!status.isEmpty()) {
+                                btnPanel.getBtnFixBugReport().setEnabled(false);
+                                btnPanel.getBtnInvalidateBugReport()
+                                        .setEnabled(false);
+                                btnPanel.getBtnReOpenBugReport().setEnabled(
+                                        false);
+                                btnPanel.getBtnAddComment().setEnabled(false);
+                            }
+                        }
+                    }
+                }
+                btnPanel.getBtnFilter().setEnabled(true);
+                btnPanel.getBtnFilter().setSelected(false);
+                btnPanel.getBtnFilter().setFocusable(false);
+                btnPanel.getBtnAddComment().setSelected(false);
+                btnPanel.getBtnAddComment().setFocusable(false);
+                btnPanel.getBtnFixBugReport().setSelected(false);
+                btnPanel.getBtnFixBugReport().setFocusable(false);
+                btnPanel.getBtnInvalidateBugReport().setSelected(false);
+                btnPanel.getBtnInvalidateBugReport().setFocusable(false);
+                btnPanel.getBtnReOpenBugReport().setSelected(false);
+                btnPanel.getBtnReOpenBugReport().setFocusable(false);
+            }
+        }
+
+        /* dispose dialog */
+        getDialog().dispose();
+    }
+
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/ExecuteCloseBug.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/ExecuteCloseBug.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/ExecuteCloseBug.java	(revision 35962)
@@ -0,0 +1,246 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.action.execute;
+
+
+import static org.openstreetmap.josm.tools.I18n.tr;
+
+import java.awt.event.ActionEvent;
+import java.util.ArrayList;
+import java.util.Iterator;
+
+import javax.swing.JButton;
+import javax.swing.JOptionPane;
+
+import org.openstreetmap.josm.gui.MainApplication;
+import org.openstreetmap.josm.plugins.mapdust.gui.MapdustGUI;
+import org.openstreetmap.josm.plugins.mapdust.gui.component.dialog.ChangeBugStatusDialog;
+import org.openstreetmap.josm.plugins.mapdust.gui.observer.MapdustActionObservable;
+import org.openstreetmap.josm.plugins.mapdust.gui.observer.MapdustActionObserver;
+import org.openstreetmap.josm.plugins.mapdust.gui.observer.MapdustBugObservable;
+import org.openstreetmap.josm.plugins.mapdust.gui.observer.MapdustBugObserver;
+import org.openstreetmap.josm.plugins.mapdust.gui.value.MapdustAction;
+import org.openstreetmap.josm.plugins.mapdust.gui.value.MapdustPluginState;
+import org.openstreetmap.josm.plugins.mapdust.gui.value.MapdustServiceCommand;
+import org.openstreetmap.josm.plugins.mapdust.service.MapdustServiceHandler;
+import org.openstreetmap.josm.plugins.mapdust.service.MapdustServiceHandlerException;
+import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustBug;
+import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustComment;
+import org.openstreetmap.josm.plugins.mapdust.service.value.Status;
+import org.openstreetmap.josm.spi.preferences.Config;
+
+
+/**
+ * Fixes the given <code>MapdustBug</code> object. Validates the input data, and
+ * based on the plugin state executes the corresponding action. If the plugin is
+ * in the "ONLINE" state then executes the MapDust Service 'changeBugStatus'
+ * action with statusId=2 and the given input parameters. If the plugin is in
+ * the "OFFLINE" state then adds the given action to the queue list.
+ *
+ * @author Bea
+ *
+ */
+public class ExecuteCloseBug extends MapdustExecuteAction implements
+        MapdustBugObservable, MapdustActionObservable {
+
+    /** The list of Mapdust bug observers */
+    private final ArrayList<MapdustBugObserver> bugObservers =
+            new ArrayList<>();
+
+    /** The list of Mapdust action observers */
+    private final ArrayList<MapdustActionObserver> actionObservers =
+            new ArrayList<>();
+
+    /**
+     * Builds a <code>ExecuteCloseBug</code> object.
+     */
+    public ExecuteCloseBug() {}
+
+    /**
+     * Builds a <code>ExecuteCloseBug</code> object
+     *
+     * @param dialog The <code>ChangeIssueStatusDialog</code> object
+     * @param mapdustGUI The <code>MapdustGUI</code> object
+     */
+    public ExecuteCloseBug(ChangeBugStatusDialog dialog, MapdustGUI mapdustGUI) {
+        setDialog(dialog);
+        setMapdustGUI(mapdustGUI);
+    }
+
+    /**
+     * Closes the given MapDust bug. If the entered informations are invalid a
+     * corresponding warning message will be displayed.
+     *
+     * @param event The action event which fires this action
+     */
+    @Override
+    public void actionPerformed(ActionEvent event) {
+        if (event.getSource() instanceof JButton) {
+            JButton btn = (JButton) event.getSource();
+            if (btn.getText().equals("OK")) {
+                /* the OK button was pressed */
+                ChangeBugStatusDialog issueDialog =
+                        (ChangeBugStatusDialog) getDialog();
+                String nickname = issueDialog.getTxtNickname().getText();
+                String commentText = issueDialog.getTxtDescription().getText();
+                /* validate nickname & comment text */
+                String errorMessage = validate(nickname, commentText);
+                if (errorMessage != null) {
+                    /* invalid input data */
+                    JOptionPane.showMessageDialog(MainApplication.getMainFrame(), tr(errorMessage),
+                            tr("Missing input data"), JOptionPane.WARNING_MESSAGE);
+                    return;
+                }
+                /* valid input data */
+                Config.getPref().put("mapdust.nickname", nickname);
+                MapdustBug selectedBug = mapdustGUI.getSelectedBug();
+                MapdustComment comment = new MapdustComment(selectedBug.getId(),
+                        commentText, nickname);
+                String pluginState = Config.getPref().get("mapdust.pluginState");
+                if (pluginState.equals(MapdustPluginState.OFFLINE.getValue())) {
+                    /* offline state, put to the actions list */
+                    selectedBug.setStatus(Status.FIXED);
+                    String iconPath = getIconPath(selectedBug);
+                    MapdustAction mapdustAction = new MapdustAction(
+                            MapdustServiceCommand.CHANGE_BUG_STATUS, iconPath,
+                            selectedBug, comment, 2);
+                    /* destroy dialog */
+                    enableFiredButton(issueDialog.getFiredButton());
+                    mapdustGUI.enableBtnPanel(true);
+                    issueDialog.dispose();
+                    if (getMapdustGUI().getActionPanel() != null) {
+                        notifyObservers(mapdustAction);
+                    }
+                } else {
+                    /* online state, execute Mapdust service method */
+                    MapdustServiceHandler handler = new MapdustServiceHandler();
+                    Long id = null;
+                    try {
+                        id = handler.changeBugStatus(2, comment);
+                    } catch (MapdustServiceHandlerException e) {
+                        errorMessage = "There was a Mapdust service error.";
+                        JOptionPane.showMessageDialog(MainApplication.getMainFrame(),
+                                tr(errorMessage), tr("Error"),
+                                JOptionPane.ERROR_MESSAGE);
+                    }
+                    if (id != null) {
+                        // success
+                        MapdustBug newMapdustBug = null;
+                        try {
+                            newMapdustBug = handler.getBug(selectedBug.getId(),
+                                    null);
+                        } catch (MapdustServiceHandlerException e) {
+                            errorMessage = "There was a Mapdust service error.";
+                            JOptionPane.showMessageDialog(MainApplication.getMainFrame(),
+                                    tr(errorMessage), tr("Error"),
+                                    JOptionPane.ERROR_MESSAGE);
+                        }
+                        /* destroy dialog */
+                        enableFiredButton(issueDialog.getFiredButton());
+                        mapdustGUI.enableBtnPanel(false);
+                        issueDialog.dispose();
+                        if (newMapdustBug != null) {
+                            notifyObservers(newMapdustBug);
+                        }
+                    }
+                }
+            }
+        }
+    }
+
+    /**
+     * Adds a new MapDust bug observer to the list of observers.
+     *
+     * @param observer The <code>MapdustBugObserver</code> object
+     */
+    @Override
+    public void addObserver(MapdustBugObserver observer) {
+        if (!this.bugObservers.contains(observer)) {
+            this.bugObservers.add(observer);
+        }
+    }
+
+    /**
+     * Adds a new MapDust action list observer to the list of observers.
+     *
+     * @param observer The <code>MapdustActionListObserver</code> object
+     */
+    @Override
+    public void addObserver(MapdustActionObserver observer) {
+        if (!this.actionObservers.contains(observer)) {
+            this.actionObservers.add(observer);
+        }
+    }
+
+    /**
+     * Removes the MapDust bug observer object from the list of observers.
+     *
+     * @param observer The <code>MapdustBugObserver</code> object
+     */
+    @Override
+    public void removeObserver(MapdustBugObserver observer) {
+        this.bugObservers.remove(observer);
+
+    }
+
+    /**
+     * Removes the MapDust action list observer object from the list of
+     * observers.
+     *
+     * @param observer The <code>MapdustActionListObserver</code> object
+     */
+    @Override
+    public void removeObserver(MapdustActionObserver observer) {
+        this.actionObservers.remove(observer);
+
+    }
+
+    /**
+     * Notifies the observers observing this action.
+     */
+    @Override
+    public void notifyObservers(MapdustBug mapdustBug) {
+        Iterator<MapdustBugObserver> elements = this.bugObservers.iterator();
+        while (elements.hasNext()) {
+            elements.next().changedData(mapdustBug);
+        }
+    }
+
+    /**
+     * Notifies the observers observing this action.
+     */
+    @Override
+    public void notifyObservers(MapdustAction mapdustAction) {
+        Iterator<MapdustActionObserver> elements =
+                this.actionObservers.iterator();
+        while (elements.hasNext()) {
+            elements.next().addAction(mapdustAction);
+        }
+    }
+
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/ExecuteCommentBug.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/ExecuteCommentBug.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/ExecuteCommentBug.java	(revision 35962)
@@ -0,0 +1,251 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.action.execute;
+
+
+import static org.openstreetmap.josm.tools.I18n.tr;
+
+import java.awt.event.ActionEvent;
+import java.util.ArrayList;
+import java.util.Iterator;
+
+import javax.swing.JButton;
+import javax.swing.JOptionPane;
+
+import org.openstreetmap.josm.gui.MainApplication;
+import org.openstreetmap.josm.plugins.mapdust.gui.MapdustGUI;
+import org.openstreetmap.josm.plugins.mapdust.gui.component.dialog.CommentBugDialog;
+import org.openstreetmap.josm.plugins.mapdust.gui.observer.MapdustActionObservable;
+import org.openstreetmap.josm.plugins.mapdust.gui.observer.MapdustActionObserver;
+import org.openstreetmap.josm.plugins.mapdust.gui.observer.MapdustBugObservable;
+import org.openstreetmap.josm.plugins.mapdust.gui.observer.MapdustBugObserver;
+import org.openstreetmap.josm.plugins.mapdust.gui.value.MapdustAction;
+import org.openstreetmap.josm.plugins.mapdust.gui.value.MapdustPluginState;
+import org.openstreetmap.josm.plugins.mapdust.gui.value.MapdustServiceCommand;
+import org.openstreetmap.josm.plugins.mapdust.service.MapdustServiceHandler;
+import org.openstreetmap.josm.plugins.mapdust.service.MapdustServiceHandlerException;
+import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustBug;
+import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustComment;
+import org.openstreetmap.josm.spi.preferences.Config;
+
+
+/**
+ * Comments the given <code>MapdustBug</code> object. Validates the input data,
+ * and based on the plugin state executes the corresponding action. If the
+ * plugin is in the "ONLINE" state then executes the MapDust Service
+ * 'commentBug' method with the given input parameters. If the plugin is in the
+ * "OFFLINE" state then the given action is added to the actions list.
+ *
+ * @author Bea
+ *
+ */
+public class ExecuteCommentBug extends MapdustExecuteAction implements
+        MapdustBugObservable, MapdustActionObservable {
+
+    /** The serial version UID */
+    private static final long serialVersionUID = 4391634740784919337L;
+
+    /** The list of MapDust bug observers */
+    private final ArrayList<MapdustBugObserver> bugObservers =
+            new ArrayList<>();
+
+    /** The list of mapdust action observers */
+    private final ArrayList<MapdustActionObserver> actionObservers =
+            new ArrayList<>();
+
+    /**
+     * Builds a <code>ExecuteCommentBug</code> object
+     */
+    public ExecuteCommentBug() {}
+
+    /**
+     * Builds a <code>ExecuteCommentBug</code> object with the given arguments.
+     *
+     * @param dialog The <code>CommentIssueDialog</code> object
+     * @param mapdustGUI The <code>MapdustGUI</code> object
+     */
+    public ExecuteCommentBug(CommentBugDialog dialog, MapdustGUI mapdustGUI) {
+        setDialog(dialog);
+        setMapdustGUI(mapdustGUI);
+    }
+
+    /**
+     * Creates a comment for the given MapDust bug. If the entered informations
+     * are invalid a corresponding warning message will be displayed.
+     *
+     * @param event The action event which fires this action
+     */
+    @Override
+    public void actionPerformed(ActionEvent event) {
+        if (event.getSource() instanceof JButton) {
+            JButton btn = (JButton) event.getSource();
+            if (btn.getText().equals("OK")) {
+                /* ok button was pressed */
+                CommentBugDialog issueDialog =
+                        (CommentBugDialog) getDialog();
+                String nickname = issueDialog.getTxtNickname().getText();
+                String commentText = issueDialog.getTxtComment().getText();
+                /* validate */
+                String errorMessage = validate(nickname, commentText);
+                if (errorMessage != null) {
+                    /* invalid input data */
+                    JOptionPane.showMessageDialog(MainApplication.getMainFrame(), tr(errorMessage),
+                            tr("Missing input data"), JOptionPane.WARNING_MESSAGE);
+                    return;
+                }
+                /* valid */
+                Config.getPref().put("mapdust.nickname", nickname);
+                MapdustBug selectedBug = mapdustGUI.getSelectedBug();
+                MapdustComment comment = new MapdustComment(selectedBug.getId(),
+                        commentText, nickname);
+                String pluginState = Config.getPref().get("mapdust.pluginState");
+                if (pluginState.equals(MapdustPluginState.OFFLINE.getValue())) {
+                    /* offline, save to actions list */
+                    String iconPath = getIconPath(selectedBug);
+                    MapdustAction mapdustAction = new MapdustAction(
+                            MapdustServiceCommand.COMMENT_BUG, iconPath,
+                            selectedBug, comment);
+                    /* destroy dialog */
+                    enableFiredButton(issueDialog.getFiredButton());
+                    mapdustGUI.enableBtnPanel(true);
+                    mapdustGUI.getPanel().resetSelectedBug(0);
+                    issueDialog.dispose();
+                    if (getMapdustGUI().getActionPanel() != null) {
+                        issueDialog.dispose();
+                        notifyObservers(mapdustAction);
+                    }
+                } else {
+                    /* online, execute Mapdust service method */
+                    MapdustServiceHandler handler = new MapdustServiceHandler();
+                    Long id = null;
+                    try {
+                        id = handler.commentBug(comment);
+                    } catch (MapdustServiceHandlerException e) {
+                        errorMessage = "There was a Mapdust service error.";
+                        JOptionPane.showMessageDialog(MainApplication.getMainFrame(),
+                                tr(errorMessage), tr("Error"),
+                                JOptionPane.ERROR_MESSAGE);
+                    }
+                    if (id != null) {
+                        // success
+                        MapdustBug newMapdustBug = null;
+                        try {
+                            newMapdustBug = handler.getBug(selectedBug.getId(),
+                                    null);
+                        } catch (MapdustServiceHandlerException e) {
+                            errorMessage = "There was a Mapdust service error.";
+                            JOptionPane.showMessageDialog(MainApplication.getMainFrame(),
+                                    tr(errorMessage), tr("Error"),
+                                    JOptionPane.ERROR_MESSAGE);
+                        }
+                        /* enable buttons */
+                        enableFiredButton(issueDialog.getFiredButton());
+                        mapdustGUI.enableBtnPanel(false);
+                        mapdustGUI.getPanel().resetSelectedBug(0);
+                        /* destroy dialog */
+                        issueDialog.dispose();
+                        if (newMapdustBug != null) {
+                            notifyObservers(newMapdustBug);
+                        }
+                    }
+                }
+
+            }
+        }
+    }
+
+    /**
+     * Adds a new MapDust bug observer to the list of observers.
+     *
+     * @param observer The <code>MapdustBugObserver</code> object
+     */
+    @Override
+    public void addObserver(MapdustBugObserver observer) {
+        if (!this.bugObservers.contains(observer)) {
+            this.bugObservers.add(observer);
+        }
+    }
+
+    /**
+     * Adds a new MapDust action list observer to the list of observers.
+     *
+     * @param observer The <code>MapdustActionListObserver</code> object
+     */
+    @Override
+    public void addObserver(MapdustActionObserver observer) {
+        if (!this.actionObservers.contains(observer)) {
+            this.actionObservers.add(observer);
+        }
+    }
+
+    /**
+     * Removes the MapDust bug observer object from the list of observers.
+     *
+     * @param observer The <code>MapdustBugObserver</code> object
+     */
+    @Override
+    public void removeObserver(MapdustBugObserver observer) {
+        this.bugObservers.remove(observer);
+
+    }
+
+    /**
+     * Removes the MapDust action list observer object from the list of
+     * observers.
+     *
+     * @param observer The <code>MapdustActionListObserver</code> object
+     */
+    @Override
+    public void removeObserver(MapdustActionObserver observer) {
+        this.actionObservers.remove(observer);
+    }
+
+    /**
+     * Notifies the observers observing this action.
+     */
+    @Override
+    public void notifyObservers(MapdustBug mapdustBug) {
+        Iterator<MapdustBugObserver> elements = this.bugObservers.iterator();
+        while (elements.hasNext()) {
+            elements.next().changedData(mapdustBug);
+        }
+    }
+
+    /**
+     * Notifies the observers observing this action.
+     */
+    @Override
+    public void notifyObservers(MapdustAction mapdustAction) {
+        Iterator<MapdustActionObserver> elements =
+                this.actionObservers.iterator();
+        while (elements.hasNext()) {
+            elements.next().addAction(mapdustAction);
+        }
+    }
+
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/ExecuteFilterBug.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/ExecuteFilterBug.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/ExecuteFilterBug.java	(revision 35962)
@@ -0,0 +1,102 @@
+/*
+ * Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ *
+ * Created on Feb 10, 2011 by Bea
+ * Modified on $DateTime$ by $Author$
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.action.execute;
+
+import java.awt.event.ActionEvent;
+import java.util.List;
+
+import javax.swing.JButton;
+
+import org.openstreetmap.josm.plugins.mapdust.gui.MapdustGUI;
+import org.openstreetmap.josm.plugins.mapdust.gui.component.dialog.FilterBugDialog;
+import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustBugFilter;
+import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustRelevance;
+
+/**
+ * Filters the MapDust bugs from the given area based on the selected filters.
+ * The filters can be based on the status, type or description of the bugs.
+ *
+ * @author Bea
+ */
+public class ExecuteFilterBug extends MapdustExecuteActionObservable {
+
+    /** The serial version UID */
+    private static final long serialVersionUID = -2724396161610512502L;
+
+    /**
+     * Builds a <code>ExecuteFilterBug</code> object.
+     */
+    public ExecuteFilterBug() {}
+
+    /**
+     * Builds a <code>ExecuteFilterBug</code> object based on the given
+     * arguments.
+     *
+     * @param dialog The MapDust filter bug dialog window
+     * @param mapdustGUI The <code>MapdustGUI</code> object
+     */
+    public ExecuteFilterBug(FilterBugDialog dialog, MapdustGUI mapdustGUI) {
+        setDialog(dialog);
+        setMapdustGUI(mapdustGUI);
+    }
+
+    /**
+     * Applies the selected filters for the MapDust bugs from the current view.
+     *
+     * @param event The action event which fires this action
+     */
+    @Override
+    public void actionPerformed(ActionEvent event) {
+        if (event.getSource() instanceof JButton) {
+            JButton btn = (JButton) event.getSource();
+            if (btn.getText().equals("Apply")) {
+                /* pressed apply */
+                FilterBugDialog dialog = (FilterBugDialog) getDialog();
+                /* get the selected type filters */
+                List<String> types = dialog.getCheckedTypes();
+                /* get the selected status filters */
+                List<Integer> statuses = dialog.getCheckedStatuses();
+                /* get the selected description filter */
+                boolean descr = dialog.isDescrFilterChecked();
+                MapdustRelevance minValue = dialog.getSelectedMinRelevance();
+                MapdustRelevance maxValue = dialog.getSelectedMaxRelevance();
+                /* notifies the observers about the filters */
+                notifyObservers(new MapdustBugFilter(statuses, types, descr,
+                        minValue, maxValue), false);
+                enableFiredButton(dialog.getFiredButton());
+                mapdustGUI.enableBtnPanel(false);
+                /* destroy dialog */
+                dialog.dispose();
+            }
+        }
+    }
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/ExecuteInvalidateBug.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/ExecuteInvalidateBug.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/ExecuteInvalidateBug.java	(revision 35962)
@@ -0,0 +1,258 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.action.execute;
+
+
+import static org.openstreetmap.josm.tools.I18n.tr;
+
+import java.awt.event.ActionEvent;
+import java.util.ArrayList;
+import java.util.Iterator;
+
+import javax.swing.JButton;
+import javax.swing.JOptionPane;
+
+import org.openstreetmap.josm.gui.MainApplication;
+import org.openstreetmap.josm.plugins.mapdust.gui.MapdustGUI;
+import org.openstreetmap.josm.plugins.mapdust.gui.component.dialog.ChangeBugStatusDialog;
+import org.openstreetmap.josm.plugins.mapdust.gui.observer.MapdustActionObservable;
+import org.openstreetmap.josm.plugins.mapdust.gui.observer.MapdustActionObserver;
+import org.openstreetmap.josm.plugins.mapdust.gui.observer.MapdustBugObservable;
+import org.openstreetmap.josm.plugins.mapdust.gui.observer.MapdustBugObserver;
+import org.openstreetmap.josm.plugins.mapdust.gui.value.MapdustAction;
+import org.openstreetmap.josm.plugins.mapdust.gui.value.MapdustPluginState;
+import org.openstreetmap.josm.plugins.mapdust.gui.value.MapdustServiceCommand;
+import org.openstreetmap.josm.plugins.mapdust.service.MapdustServiceHandler;
+import org.openstreetmap.josm.plugins.mapdust.service.MapdustServiceHandlerException;
+import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustBug;
+import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustComment;
+import org.openstreetmap.josm.plugins.mapdust.service.value.Status;
+import org.openstreetmap.josm.spi.preferences.Config;
+
+
+/**
+ * Invalidates the given <code>MapdustBug</code> object. Validates the input
+ * data, and based on the plugin state executes the corresponding action. If the
+ * plugin is in the "ONLINE" state then executes the MapDust Service
+ * 'changeBugStatus' action with statusId=3 and the given input parameters. If
+ * the plugin is in the "OFFLINE" state then adds the given action to the action
+ * list.
+ *
+ * @author Bea
+ *
+ */
+public class ExecuteInvalidateBug extends MapdustExecuteAction implements
+        MapdustBugObservable, MapdustActionObservable {
+
+    /** The serial version UID */
+    private static final long serialVersionUID = 542699469544481797L;
+
+    /** The list of mapdust bug observers */
+    private final ArrayList<MapdustBugObserver> bugObservers =
+            new ArrayList<>();
+
+    /** The list of mapdust action observers */
+    private final ArrayList<MapdustActionObserver> actionObservers =
+            new ArrayList<>();
+
+    /**
+     * Builds a <code>ExecuteInvalidateBug</code> object
+     */
+    public ExecuteInvalidateBug() {}
+
+    /**
+     * Builds a <code>ExecuteInvalidateBug</code> object based on the given
+     * arguments.
+     *
+     * @param dialog The <code>ChangeIssueStatusDialog</code> object
+     * @param mapdustGUI The <code>MapdustGUI</code> object
+     */
+    public ExecuteInvalidateBug(ChangeBugStatusDialog dialog,
+            MapdustGUI mapdustGUI) {
+        setDialog(dialog);
+        setMapdustGUI(mapdustGUI);
+    }
+
+    /**
+     * Invalidates the given MapDust bug. If the entered informations are
+     * invalid a corresponding warning message will be displayed.
+     *
+     * @param event The action event which fires this action
+     */
+    @Override
+    public void actionPerformed(ActionEvent event) {
+        if (event.getSource() instanceof JButton) {
+            JButton btn = (JButton) event.getSource();
+            if (btn.getText().equals("OK")) {
+                /* ok button was pressed */
+                ChangeBugStatusDialog issueDialog =
+                        (ChangeBugStatusDialog) getDialog();
+                String nickname = issueDialog.getTxtNickname().getText();
+                String commentText = issueDialog.getTxtDescription().getText();
+                /* validate input */
+                String errorMessage = validate(nickname, commentText);
+                if (errorMessage != null) {
+                    /* invalid input */
+                    JOptionPane.showMessageDialog(MainApplication.getMainFrame(), tr(errorMessage),
+                            tr("Missing input data"), JOptionPane.WARNING_MESSAGE);
+                    return;
+                }
+                /* valid input */
+                Config.getPref().put("mapdust.nickname", nickname);
+                MapdustBug selectedBug = mapdustGUI.getSelectedBug();
+                MapdustComment comment = new MapdustComment(selectedBug.getId(),
+                        commentText, nickname);
+                String pluginState = Config.getPref().get("mapdust.pluginState");
+                if (pluginState.equals(MapdustPluginState.OFFLINE.getValue())) {
+                    /* 'offline' state , add to action list */
+                    selectedBug.setStatus(Status.INVALID);
+                    String iconPath = getIconPath(selectedBug);
+                    MapdustAction mapdustAction = new MapdustAction(
+                            MapdustServiceCommand.CHANGE_BUG_STATUS, iconPath,
+                            selectedBug, comment, 3);
+                    /* destroy dialog */
+
+                    /* enable buttons */
+                    mapdustGUI.enableBtnPanel(true);
+                    enableFiredButton(issueDialog.getFiredButton());
+                    issueDialog.dispose();
+                    if (getMapdustGUI().getActionPanel() != null) {
+                        notifyObservers(mapdustAction);
+                    }
+                } else {
+                    /* online state, execute Mapdust method */
+                    MapdustServiceHandler handler = new MapdustServiceHandler();
+                    Long id = null;
+                    try {
+                        id = handler.changeBugStatus(3, comment);
+                    } catch (MapdustServiceHandlerException e) {
+                        errorMessage = "There was a Mapdust service error.";
+                        JOptionPane.showMessageDialog(MainApplication.getMainFrame(),
+                                tr(errorMessage), tr("Error"),
+                                JOptionPane.ERROR_MESSAGE);
+                    }
+                    if (id != null) {
+                        // success
+                        MapdustBug newMapdustBug = null;
+                        try {
+                            newMapdustBug = handler.getBug(selectedBug.getId(),
+                                    null);
+                        } catch (MapdustServiceHandlerException e) {
+                            errorMessage = "There was a Mapdust service error.";
+                            errorMessage += "Mapdust bug report.";
+                            JOptionPane.showMessageDialog(MainApplication.getMainFrame(),
+                                    tr(errorMessage), tr("Error"),
+                                    JOptionPane.ERROR_MESSAGE);
+                        }
+                        /* destroy dialog */
+
+                        /* enable buttons */
+                        enableFiredButton(issueDialog.getFiredButton());
+                        mapdustGUI.enableBtnPanel(false);
+                        issueDialog.dispose();
+
+                        if (newMapdustBug != null) {
+                            notifyObservers(newMapdustBug);
+                        }
+                    }
+                }
+
+            }
+        }
+    }
+
+    /**
+     * Adds a new MapDust bug observer to the list of observers.
+     *
+     * @param observer The <code>MapdustBugObserver</code> object
+     */
+    @Override
+    public void addObserver(MapdustBugObserver observer) {
+        if (!this.bugObservers.contains(observer)) {
+            this.bugObservers.add(observer);
+        }
+    }
+
+    /**
+     * Adds a new MapDust action list observer to the list of observers.
+     *
+     * @param observer The <code>MapdustActionListObserver</code> object
+     */
+    @Override
+    public void addObserver(MapdustActionObserver observer) {
+        if (!this.actionObservers.contains(observer)) {
+            this.actionObservers.add(observer);
+        }
+    }
+
+    /**
+     * Removes the MapDust bug observer object from the list of observers.
+     *
+     * @param observer The <code>MapdustBugObserver</code> object
+     */
+    @Override
+    public void removeObserver(MapdustBugObserver observer) {
+        this.bugObservers.remove(observer);
+
+    }
+
+    /**
+     * Removes the MapDust action list observer object from the list of observers.
+     *
+     * @param observer The <code>MapdustActionListObserver</code> object
+     */
+    @Override
+    public void removeObserver(MapdustActionObserver observer) {
+        this.actionObservers.remove(observer);
+
+    }
+
+    /**
+     * Notifies the observers observing this action.
+     */
+    @Override
+    public void notifyObservers(MapdustBug mapdustBug) {
+        Iterator<MapdustBugObserver> elements = this.bugObservers.iterator();
+        while (elements.hasNext()) {
+            elements.next().changedData(mapdustBug);
+        }
+    }
+
+    /**
+     * Notifies the observers observing this action.
+     */
+    @Override
+    public void notifyObservers(MapdustAction mapdustAction) {
+        Iterator<MapdustActionObserver> elements =
+                this.actionObservers.iterator();
+        while (elements.hasNext()) {
+            elements.next().addAction(mapdustAction);
+        }
+    }
+
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/ExecuteReOpenBug.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/ExecuteReOpenBug.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/ExecuteReOpenBug.java	(revision 35962)
@@ -0,0 +1,249 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.action.execute;
+
+
+import static org.openstreetmap.josm.tools.I18n.tr;
+
+import java.awt.event.ActionEvent;
+import java.util.ArrayList;
+import java.util.Iterator;
+
+import javax.swing.JButton;
+import javax.swing.JOptionPane;
+
+import org.openstreetmap.josm.gui.MainApplication;
+import org.openstreetmap.josm.plugins.mapdust.gui.MapdustGUI;
+import org.openstreetmap.josm.plugins.mapdust.gui.component.dialog.ChangeBugStatusDialog;
+import org.openstreetmap.josm.plugins.mapdust.gui.observer.MapdustActionObservable;
+import org.openstreetmap.josm.plugins.mapdust.gui.observer.MapdustActionObserver;
+import org.openstreetmap.josm.plugins.mapdust.gui.observer.MapdustBugObservable;
+import org.openstreetmap.josm.plugins.mapdust.gui.observer.MapdustBugObserver;
+import org.openstreetmap.josm.plugins.mapdust.gui.value.MapdustAction;
+import org.openstreetmap.josm.plugins.mapdust.gui.value.MapdustPluginState;
+import org.openstreetmap.josm.plugins.mapdust.gui.value.MapdustServiceCommand;
+import org.openstreetmap.josm.plugins.mapdust.service.MapdustServiceHandler;
+import org.openstreetmap.josm.plugins.mapdust.service.MapdustServiceHandlerException;
+import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustBug;
+import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustComment;
+import org.openstreetmap.josm.plugins.mapdust.service.value.Status;
+import org.openstreetmap.josm.spi.preferences.Config;
+
+
+/**
+ * Re-opens the given <code>MapdustBug</code> object. Validates the input data,
+ * and based on the plugin state executes the corresponding action. If the
+ * plugin is in the "ONLINE" state then executes the MapDust Service
+ * 'changeBugStatus' action with statusId=1 and the given input parameters. If
+ * the plugin is in the "OFFLINE" state then adds the given action to the action
+ * list.
+ *
+ * @author Bea
+ *
+ */
+public class ExecuteReOpenBug extends MapdustExecuteAction implements
+        MapdustBugObservable, MapdustActionObservable {
+
+    /** The serial version UID */
+    private static final long serialVersionUID = 8275121997644127251L;
+
+    /** The list of MapDust bug observers */
+    private final ArrayList<MapdustBugObserver> bugObservers =
+            new ArrayList<>();
+
+    /** The list of MapDust action observers */
+    private final ArrayList<MapdustActionObserver> actionObservers =
+            new ArrayList<>();
+
+    /**
+     * Builds a <code>ExecuteReOpenBug</code> object
+     */
+    public ExecuteReOpenBug() {}
+
+    /**
+     * Builds a <code>ExecuteReOpenBug</code> object with the given arguments.
+     *
+     * @param dialog The <code>ChangeIssueStatusDialog</code> object
+     * @param mapdustGUI The <code>MapdustGUI</code> object
+     */
+    public ExecuteReOpenBug(ChangeBugStatusDialog dialog,
+            MapdustGUI mapdustGUI) {
+        setDialog(dialog);
+        setMapdustGUI(mapdustGUI);
+    }
+
+    /**
+     *
+     * @param event The event which fires this action
+     */
+    @Override
+    public void actionPerformed(ActionEvent event) {
+        if (event.getSource() instanceof JButton) {
+            JButton btn = (JButton) event.getSource();
+            if (btn.getText().equals("OK")) {
+                /* pressed ok */
+                ChangeBugStatusDialog issueDialog =
+                        (ChangeBugStatusDialog) getDialog();
+                String nickname = issueDialog.getTxtNickname().getText();
+                String commentText = issueDialog.getTxtDescription().getText();
+                /* validate */
+                String errorMessage = validate(nickname, commentText);
+                if (errorMessage != null) {
+                    /* invalid data */
+                    JOptionPane.showMessageDialog(MainApplication.getMainFrame(), tr(errorMessage),
+                            tr("Missing input data"), JOptionPane.WARNING_MESSAGE);
+                    return;
+                }
+                /* valid */
+                Config.getPref().put("mapdust.nickname", nickname);
+                MapdustBug selectedBug = mapdustGUI.getSelectedBug();
+                MapdustComment comment = new MapdustComment(selectedBug.getId(),
+                        commentText, nickname);
+                String pluginState = Config.getPref().get("mapdust.pluginState");
+                if (pluginState.equals(MapdustPluginState.OFFLINE.getValue())) {
+                    /* offline , save to action list */
+                    selectedBug.setStatus(Status.OPEN);
+                    String iconPath = getIconPath(selectedBug);
+                    MapdustAction mapdustAction = new MapdustAction(
+                            MapdustServiceCommand.CHANGE_BUG_STATUS, iconPath,
+                            selectedBug, comment, 1);
+                    /* destroy dialog */
+                    mapdustGUI.enableBtnPanel(true);
+                    enableFiredButton(issueDialog.getFiredButton());
+                    issueDialog.dispose();
+                    if (getMapdustGUI().getActionPanel() != null) {
+                        notifyObservers(mapdustAction);
+                    }
+                } else {
+                    /* online, call MapDust service method */
+                    MapdustServiceHandler handler = new MapdustServiceHandler();
+                    Long id = null;
+                    try {
+                        id = handler.changeBugStatus(1, comment);
+                    } catch (MapdustServiceHandlerException e) {
+                        errorMessage = "There was a Mapdust service error.";
+                        errorMessage += "Mapdust bug report.";
+                        JOptionPane.showMessageDialog(MainApplication.getMainFrame(),
+                                tr(errorMessage), tr("Error"),
+                                JOptionPane.ERROR_MESSAGE);
+                    }
+                    if (id != null) {
+                        MapdustBug newMapdustBug = null;
+                        try {
+                            newMapdustBug = handler.getBug(selectedBug.getId(),
+                                    null);
+                        } catch (MapdustServiceHandlerException e) {
+                            errorMessage = "There was a Mapdust service error.";
+                            errorMessage += "Mapdust bug report.";
+                            JOptionPane.showMessageDialog(MainApplication.getMainFrame(),
+                                    tr(errorMessage), tr("Error"),
+                                    JOptionPane.ERROR_MESSAGE);
+                        }
+                        mapdustGUI.enableBtnPanel(false);
+                        enableFiredButton(issueDialog.getFiredButton());
+                        issueDialog.dispose();
+                        if (newMapdustBug != null) {
+                            notifyObservers(newMapdustBug);
+                        }
+                    }
+                }
+            }
+        }
+    }
+
+    /**
+     * Adds a new MapDust bug observer to the list of observers.
+     *
+     * @param observer The <code>MapdustBugObserver</code> object
+     */
+    @Override
+    public void addObserver(MapdustBugObserver observer) {
+        if (!this.bugObservers.contains(observer)) {
+            this.bugObservers.add(observer);
+        }
+    }
+
+    /**
+     * Adds a new MapDust action list observer to the list of observers.
+     *
+     * @param observer The <code>MapdustActionListObserver</code> object
+     */
+    @Override
+    public void addObserver(MapdustActionObserver observer) {
+        if (!this.actionObservers.contains(observer)) {
+            this.actionObservers.add(observer);
+        }
+    }
+
+    /**
+     * Removes the MapDust bug observer object from the list of observers.
+     *
+     * @param observer The <code>MapdustBugObserver</code> object
+     */
+    @Override
+    public void removeObserver(MapdustBugObserver observer) {
+        this.bugObservers.remove(observer);
+
+    }
+
+    /**
+     * Removes the MapDust action list observer object from the list of
+     * observers.
+     *
+     * @param observer The <code>MapdustActionListObserver</code> object
+     */
+    @Override
+    public void removeObserver(MapdustActionObserver observer) {
+        this.actionObservers.remove(observer);
+
+    }
+
+    /**
+     * Notifies the observers observing this action.
+     */
+    @Override
+    public void notifyObservers(MapdustBug mapdustBug) {
+        Iterator<MapdustBugObserver> elements = this.bugObservers.iterator();
+        while (elements.hasNext()) {
+            elements.next().changedData(mapdustBug);
+        }
+    }
+
+    /**
+     * Notifies the observers observing this action.
+     */
+    @Override
+    public void notifyObservers(MapdustAction mapdustAction) {
+        Iterator<MapdustActionObserver> elements =
+                this.actionObservers.iterator();
+        while (elements.hasNext()) {
+            elements.next().addAction(mapdustAction);
+        }
+    }
+
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/ExecuteRefresh.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/ExecuteRefresh.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/ExecuteRefresh.java	(revision 35962)
@@ -0,0 +1,116 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.action.execute;
+
+
+import java.awt.event.ActionEvent;
+import java.util.ArrayList;
+import java.util.Iterator;
+
+import javax.swing.AbstractAction;
+import javax.swing.JToggleButton;
+
+import org.openstreetmap.josm.plugins.mapdust.gui.observer.MapdustUpdateObservable;
+import org.openstreetmap.josm.plugins.mapdust.gui.observer.MapdustUpdateObserver;
+import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustBugFilter;
+import org.openstreetmap.josm.spi.preferences.Config;
+
+
+/**
+ * Executes a refresh action. The refresh action returns all the
+ * <code>MapdustBug</code> object from the current view.
+ *
+ * @author Bea
+ *
+ */
+public class ExecuteRefresh extends AbstractAction implements
+        MapdustUpdateObservable {
+
+    /** The serial version UID */
+    private static final long serialVersionUID = 1507634893685333278L;
+
+    /** The list of MapDust refresh observers */
+    private final ArrayList<MapdustUpdateObserver> observers =
+            new ArrayList<>();
+
+    /**
+     * Builds a <code>EexecuteRefresh</code> object
+     */
+    public ExecuteRefresh() {}
+
+    /**
+     * Updates the MapDust data.
+     *
+     * @param event The event which fires this action
+     */
+    @Override
+    public void actionPerformed(ActionEvent event) {
+        if (event.getSource() instanceof JToggleButton) {
+            JToggleButton btn = (JToggleButton) event.getSource();
+            /* update the bugs */
+            Config.getPref().putBoolean("mapdust.showError", true);
+            notifyObservers(null, false);
+            btn.setSelected(false);
+            btn.setFocusable(false);
+        }
+    }
+
+    /**
+     * Adds a new MapDust refresh observer to the list of observers.
+     *
+     * @param observer The <code>MapdustRefreshObserver</code> object
+     */
+    @Override
+    public void addObserver(MapdustUpdateObserver observer) {
+        if (!this.observers.contains(observer)) {
+            this.observers.add(observer);
+        }
+    }
+
+    /**
+     * Removes the MapDust refresh observer object from the list of observers.
+     *
+     * @param observer The <code>MapdustRefreshObserver</code> object
+     */
+    @Override
+    public void removeObserver(MapdustUpdateObserver observer) {
+        this.observers.remove(observer);
+    }
+
+    /**
+     * Notifies the observers observing this action.
+     */
+    @Override
+    public void notifyObservers(MapdustBugFilter filter, boolean first) {
+        Iterator<MapdustUpdateObserver> elements = this.observers.iterator();
+        while (elements.hasNext()) {
+            elements.next().update(filter, false);
+        }
+    }
+
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/ExecuteWorkOffline.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/ExecuteWorkOffline.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/ExecuteWorkOffline.java	(revision 35962)
@@ -0,0 +1,118 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.action.execute;
+
+import static org.openstreetmap.josm.tools.I18n.tr;
+
+import java.awt.event.ActionEvent;
+
+import javax.swing.JOptionPane;
+import javax.swing.JToggleButton;
+
+import org.openstreetmap.josm.gui.MainApplication;
+import org.openstreetmap.josm.plugins.mapdust.gui.MapdustActionUploader;
+import org.openstreetmap.josm.plugins.mapdust.gui.MapdustActionUploaderException;
+import org.openstreetmap.josm.plugins.mapdust.gui.MapdustGUI;
+import org.openstreetmap.josm.plugins.mapdust.gui.value.MapdustPluginState;
+import org.openstreetmap.josm.spi.preferences.Config;
+
+/**
+ * Executes the "work offline" action. In the offline mode the user actions will
+ * not be uploaded immediately to the MapDust service. The user can perform the
+ * following actions in offline mode: add bug, comment bug and change bug
+ * status. After de-activating the offline mode the user's modifications will be
+ * uploaded to the MapDust service.
+ *
+ * @author Bea
+ *
+ */
+public class ExecuteWorkOffline extends MapdustExecuteActionObservable {
+
+    /** The serial version UID */
+    private static final long serialVersionUID = 8792828131813689548L;
+
+    /**
+     * Builds a <code>ExecuteWorkOffline</code> object.
+     */
+    public ExecuteWorkOffline() {}
+
+    /**
+     * Builds a <code>ExecuteWorkOffline</code> object based on the given
+     * arguments.
+     *
+     * @param mapdustGUI The <code>MapdustGUI</code> object
+     */
+    public ExecuteWorkOffline(MapdustGUI mapdustGUI) {
+        setMapdustGUI(mapdustGUI);
+    }
+
+    /**
+     * Sets the 'offline' mode for the plugin.
+     *
+     * @param event The event which fires this action
+     */
+    @Override
+    public void actionPerformed(ActionEvent event) {
+        if (event.getSource() instanceof JToggleButton) {
+            JToggleButton btn = (JToggleButton) event.getSource();
+            if (getMapdustGUI() != null) {
+                String pluginState = Config.getPref().get("mapdust.pluginState");
+                if (pluginState.equals(MapdustPluginState.ONLINE.getValue())) {
+                    Config.getPref().put("mapdust.pluginState",
+                            MapdustPluginState.OFFLINE.getValue());
+                    btn.setSelected(false);
+                    btn.setFocusable(false);
+                } else {
+                    // was offline, becomes online
+                    String title = "MapDust";
+                    String message = "Do you want to submit your changes ";
+                    message += "to Mapdust?";
+                    int result = JOptionPane.showConfirmDialog(MainApplication.getMainFrame(),
+                            tr(message), tr(title), JOptionPane.YES_NO_OPTION);
+                    if (result == JOptionPane.YES_OPTION) {
+                        try {
+                            MapdustActionUploader.getInstance().uploadData(
+                                    getMapdustGUI().getMapdustActionList());
+                        } catch (MapdustActionUploaderException e) {
+                            String errorMessage = "There was a Mapdust service";
+                            errorMessage += " error.";
+                            JOptionPane.showMessageDialog(MainApplication.getMainFrame(),
+                                    tr(errorMessage), tr("Error"),
+                                    JOptionPane.ERROR_MESSAGE);
+                        }
+                    }
+                    Config.getPref().put("mapdust.pluginState",
+                            MapdustPluginState.ONLINE.getValue());
+                    btn.setSelected(false);
+                    btn.setFocusable(false);
+                }
+                notifyObservers(null, false);
+            }
+        }
+    }
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/MapdustExecuteAction.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/MapdustExecuteAction.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/MapdustExecuteAction.java	(revision 35962)
@@ -0,0 +1,189 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.action.execute;
+
+
+import javax.swing.AbstractAction;
+import javax.swing.JToggleButton;
+
+import org.openstreetmap.josm.plugins.mapdust.gui.MapdustGUI;
+import org.openstreetmap.josm.plugins.mapdust.gui.component.dialog.AbstractDialog;
+import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustBug;
+
+
+/**
+ * This is an abstract class, defining the commonly used methods by the
+ * ExecuteAction classes.
+ *
+ * @author Bea
+ *
+ */
+public abstract class MapdustExecuteAction extends AbstractAction {
+
+    /** The abstract dialog object */
+    protected AbstractDialog dialog;
+
+    /** The MapDust GUI object */
+    protected MapdustGUI mapdustGUI;
+
+    /**
+     * Validates the nickname and the commentText fields, and returns the
+     * corresponding message. If the fields are both valid, the method return
+     * null.
+     *
+     * @param nickname The nickname of the user
+     * @param commentText A comment given by the user
+     * @return An error string
+     */
+    protected String validate(String nickname, String commentText) {
+        String errorMessage = null;
+        String invalidNickname = " Your nickname length has to be between 3";
+        invalidNickname += " and 16 characters. Please use letters,numbers, ";
+        invalidNickname += " '-', '.' or '_' '.'";
+        if (emptyValue(nickname) && emptyValue(commentText)) {
+            errorMessage = " Missing nickname and comment.";
+            errorMessage += invalidNickname;
+        } else {
+            if (emptyValue(nickname)) {
+                errorMessage = " Missing nickname.";
+                errorMessage += nickname;
+            } else {
+                if (emptyValue(commentText)) {
+                    if (!validNickname(nickname)) {
+                        errorMessage = " Missing comment and invalid nickname.";
+                        errorMessage += invalidNickname;
+                    } else {
+                        errorMessage = " The comment is missing.";
+                    }
+                } else {
+                    if (!validNickname(nickname)) {
+                        errorMessage = " Invalid nickname.";
+                        errorMessage += invalidNickname;
+                    }
+                }
+            }
+        }
+        return errorMessage;
+    }
+
+    /**
+     * Returns the icon path for the given MapDust bug. The icons are located in
+     * the "dialogs" directory under the "images" directory. The name of an icon
+     * for a given bug has the following format: status_type.png.
+     *
+     * @param bug The <code>MapdustBug</code> object
+     * @return The path of the icon
+     */
+    protected String getIconPath(MapdustBug bug) {
+        String iconPath = "bugs/normal/";
+        iconPath += bug.getStatus().getValue().toLowerCase();
+        iconPath += "_";
+        iconPath += bug.getType().getKey();
+        iconPath += ".png";
+        return iconPath;
+    }
+
+    /**
+     * Enables the given button. This button had fired a corresponding action,
+     * and after the action finishes, the button need to become enabled.
+     *
+     * @param button A <code>JToggleButton</code> object
+     */
+    protected void enableFiredButton(JToggleButton button) {
+        if (button != null) {
+            button.setSelected(false);
+            button.setFocusable(false);
+        }
+    }
+
+    /**
+     * Verifies if the given value is empty or not.
+     *
+     * @param value A string
+     * @return true if the value is empty false otherwise
+     */
+    private boolean emptyValue(String value) {
+        String modifiedValue = value != null ? value.trim() : "";
+        if (value == null || value.isEmpty() || modifiedValue.isEmpty()) {
+            return true;
+        }
+        return false;
+    }
+
+    /**
+     * Validates the given nickname. A nickname is valid if its length is
+     * between 3 and 16 characters.
+     *
+     * @param value The nickname
+     * @return true if the nickname is valid false otherwise
+     */
+    private boolean validNickname(String value) {
+        int length = value.length();
+        if (length < 3 || length > 16) {
+            return false;
+        }
+        return true;
+    }
+
+    /**
+     * Returns the abstract dialog
+     *
+     * @return the dialog
+     */
+    public AbstractDialog getDialog() {
+        return this.dialog;
+    }
+
+    /**
+     * Sets the abstract dialog
+     *
+     * @param dialog the dialog to set
+     */
+    public void setDialog(AbstractDialog dialog) {
+        this.dialog = dialog;
+    }
+
+    /**
+     * Returns the <code>MapdustGUI</code> object
+     *
+     * @return the mapdustGUI
+     */
+    public MapdustGUI getMapdustGUI() {
+        return this.mapdustGUI;
+    }
+
+    /**
+     * Sets the <code>MapdustGUI</code> object
+     *
+     * @param mapdustGUI the mapdustGUI to set
+     */
+    public void setMapdustGUI(MapdustGUI mapdustGUI) {
+        this.mapdustGUI = mapdustGUI;
+    }
+
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/MapdustExecuteActionObservable.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/MapdustExecuteActionObservable.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/MapdustExecuteActionObservable.java	(revision 35962)
@@ -0,0 +1,75 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.action.execute;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+
+import org.openstreetmap.josm.plugins.mapdust.gui.observer.MapdustUpdateObservable;
+import org.openstreetmap.josm.plugins.mapdust.gui.observer.MapdustUpdateObserver;
+import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustBugFilter;
+
+public abstract class MapdustExecuteActionObservable extends MapdustExecuteAction implements MapdustUpdateObservable {
+
+    /** The list of MapDust refresh observers */
+    private final ArrayList<MapdustUpdateObserver> observers =
+            new ArrayList<>();
+
+    /**
+     * Adds a new MapDust refresh observer to the list of observers.
+     *
+     * @param observer The <code>MapdustRefreshObserver</code> object
+     */
+    @Override
+    public void addObserver(MapdustUpdateObserver observer) {
+        if (!this.observers.contains(observer)) {
+            this.observers.add(observer);
+        }
+    }
+
+    /**
+     * Removes the MapDust refresh observer object from the list of observers.
+     *
+     * @param observer The <code>MapdustRefreshObserver</code> object
+     */
+    @Override
+    public void removeObserver(MapdustUpdateObserver observer) {
+        this.observers.remove(observer);
+    }
+
+    /**
+     * Notifies the observers observing this action.
+     */
+    @Override
+    public void notifyObservers(MapdustBugFilter filter, boolean first) {
+        Iterator<MapdustUpdateObserver> elements = this.observers.iterator();
+        while (elements.hasNext()) {
+            elements.next().update(filter, false);
+        }
+    }
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/package-info.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/package-info.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/package-info.java	(revision 35962)
@@ -0,0 +1,6 @@
+/**
+ * Contains the action classes which handles the user actions.
+ * Each of these class extends the <code>MapdustExecuteAction</code> abstract
+ * class.
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.action.execute;
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/package-info.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/package-info.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/package-info.java	(revision 35962)
@@ -0,0 +1,6 @@
+/**
+ * Contains the MapDust GUI action classes. The action classes are divided
+ * in three main categories: adapter, execute and show.
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.action;
+
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/show/MapdustShowAction.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/show/MapdustShowAction.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/show/MapdustShowAction.java	(revision 35962)
@@ -0,0 +1,130 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.action.show;
+
+
+import javax.swing.AbstractAction;
+
+import org.openstreetmap.josm.plugins.mapdust.MapdustPlugin;
+import org.openstreetmap.josm.plugins.mapdust.gui.component.panel.MapdustButtonPanel;
+
+
+/**
+ * This class is a base action class. Defines the common functionality for the
+ * other 'show' action classes.
+ *
+ * @author Bea
+ *
+ */
+public abstract class MapdustShowAction extends AbstractAction {
+
+    /** The serial version UID */
+    private static final long serialVersionUID = -4894445690647156702L;
+
+    /** The title of the dialog window */
+    protected String title;
+
+    /** The icon name of the dialog window */
+    protected String iconName;
+
+    /** The <code>MapdustPlugin</code> */
+    protected MapdustPlugin mapdustPlugin;
+
+    /**
+     * Returns the <code>MapdustButtonPanel</code> object.
+     *
+     * @return MapdustButtonPanel
+     */
+    protected MapdustButtonPanel getButtonPanel() {
+        MapdustButtonPanel btnPanel =
+                this.mapdustPlugin.getMapdustGUI().getPanel().getBtnPanel();
+        return btnPanel;
+    }
+
+    /**
+     * Returns the <code>MapdustPlugin</code> object
+     *
+     * @return the mapdustPlugin
+     */
+    public MapdustPlugin getMapdustPlugin() {
+        return this.mapdustPlugin;
+    }
+
+    /**
+     * Sets the <code>MapdustPlugin</code> object
+     *
+     * @param mapdustPlugin the mapdustPlugin to set
+     */
+    public void setMapdustPlugin(MapdustPlugin mapdustPlugin) {
+        this.mapdustPlugin = mapdustPlugin;
+    }
+
+    /**
+     * Returns the title
+     *
+     * @return the title
+     */
+    public String getTitle() {
+        return this.title;
+    }
+
+    /**
+     * Sets the title
+     *
+     * @param title the title to set
+     */
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    /**
+     * Returns the name of the icon
+     *
+     * @return the iconName
+     */
+    public String getIconName() {
+        return this.iconName;
+    }
+
+    /**
+     * Sets the name of the icon
+     *
+     * @param iconName the iconName to set
+     */
+    public void setIconName(String iconName) {
+        this.iconName = iconName;
+    }
+
+    /**
+     * Disables the buttons from the given button panel.
+     *
+     * @param buttonPanel The <code>MapdustButtonPanel</code> object
+     */
+    abstract void disableButtons(MapdustButtonPanel buttonPanel);
+
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/show/ShowCloseBugAction.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/show/ShowCloseBugAction.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/show/ShowCloseBugAction.java	(revision 35962)
@@ -0,0 +1,129 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.action.show;
+
+
+import java.awt.event.ActionEvent;
+
+import javax.swing.JMenuItem;
+import javax.swing.JToggleButton;
+
+import org.openstreetmap.josm.plugins.mapdust.MapdustPlugin;
+import org.openstreetmap.josm.plugins.mapdust.gui.component.dialog.ChangeBugStatusDialog;
+import org.openstreetmap.josm.plugins.mapdust.gui.component.panel.MapdustButtonPanel;
+
+
+/**
+ * Displays the <code>ChangeIssueStatusDialog</code> dialog window of type
+ * 'close'. This action is executed whenever the user clicks on the
+ * "Close bug report" button or selects the "Close bug" option from the pop-up
+ * menu.
+ *
+ * @author Bea
+ *
+ */
+public class ShowCloseBugAction extends MapdustShowAction {
+
+    /** The serial version UID */
+    private static final long serialVersionUID = 6459224244170352152L;
+
+    /**
+     * Builds a <code>ShowCloseBugAction</code> object
+     */
+    public ShowCloseBugAction() {}
+
+    /**
+     * Builds a <code>ShowCloseBugAction</code> object based on the given
+     * argument.
+     *
+     * @param mapdustPlugin The <code>MapdustPlugin</code> object
+     */
+    public ShowCloseBugAction(MapdustPlugin mapdustPlugin) {
+        setMapdustPlugin(mapdustPlugin);
+        setTitle("Mark bug report as fixed");
+        setIconName("dialogs/fixed.png");
+    }
+
+    /**
+     * Builds a <code>ChangeIssueStatusDialog</code> dialog window of type
+     * "close" and displays on the screen.
+     *
+     * @param event The <code>ActionEvent</code> object
+     */
+    @Override
+    public void actionPerformed(ActionEvent event) {
+        if (event != null) {
+            JToggleButton btn = null;
+            if (event.getSource() instanceof JToggleButton) {
+                btn = (JToggleButton) event.getSource();
+            } else {
+                if (event.getSource() instanceof JMenuItem) {
+                    getButtonPanel().getBtnFixBugReport().setSelected(true);
+                }
+            }
+            disableButtons(getButtonPanel());
+            ChangeBugStatusDialog dialog = new ChangeBugStatusDialog(
+                    getTitle(), getIconName(), "close", btn,
+                    getMapdustPlugin());
+            dialog.setLocationRelativeTo(null);
+            dialog.getContentPane().setPreferredSize(dialog.getSize());
+            dialog.pack();
+            dialog.setVisible(true);
+        }
+    }
+
+    /**
+     * Disables the buttons from the <code>MapdustButtonPanel</code> according
+     * to the executed action type. The only enabled button will be close bug
+     * report button.
+     *
+     * @param buttonPanel The <code>MapdustButtonPanel</code> object
+     */
+    @Override
+    void disableButtons(MapdustButtonPanel buttonPanel) {
+        buttonPanel.getBtnWorkOffline().setEnabled(false);
+        buttonPanel.getBtnWorkOffline().setSelected(false);
+        buttonPanel.getBtnWorkOffline().setFocusable(false);
+        buttonPanel.getBtnRefresh().setEnabled(false);
+        buttonPanel.getBtnRefresh().setSelected(false);
+        buttonPanel.getBtnRefresh().setFocusable(false);
+        buttonPanel.getBtnFilter().setEnabled(false);
+        buttonPanel.getBtnFilter().setSelected(false);
+        buttonPanel.getBtnFilter().setFocusable(false);
+        buttonPanel.getBtnAddComment().setEnabled(false);
+        buttonPanel.getBtnAddComment().setSelected(false);
+        buttonPanel.getBtnAddComment().setFocusable(false);
+        buttonPanel.getBtnInvalidateBugReport().setEnabled(false);
+        buttonPanel.getBtnInvalidateBugReport().setSelected(false);
+        buttonPanel.getBtnInvalidateBugReport().setFocusable(false);
+        buttonPanel.getBtnReOpenBugReport().setEnabled(false);
+        buttonPanel.getBtnReOpenBugReport().setSelected(false);
+        buttonPanel.getBtnReOpenBugReport().setFocusable(false);
+    }
+
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/show/ShowCommentBugAction.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/show/ShowCommentBugAction.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/show/ShowCommentBugAction.java	(revision 35962)
@@ -0,0 +1,127 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.action.show;
+
+
+import java.awt.event.ActionEvent;
+
+import javax.swing.JMenuItem;
+import javax.swing.JToggleButton;
+
+import org.openstreetmap.josm.plugins.mapdust.MapdustPlugin;
+import org.openstreetmap.josm.plugins.mapdust.gui.component.dialog.CommentBugDialog;
+import org.openstreetmap.josm.plugins.mapdust.gui.component.panel.MapdustButtonPanel;
+
+
+/**
+ * Displays the <code>CommentIssueDialog</code> dialog window. This action is
+ * executed whenever the user clicks on the "Create bug report comment" button
+ * or selects the "Add comment" option from the pop-up menu.
+ *
+ * @author Bea
+ *
+ */
+public class ShowCommentBugAction extends MapdustShowAction {
+
+    /** The serial version UID */
+    private static final long serialVersionUID = -8174561825477499474L;
+
+    /**
+     * Builds a <code>ShowCommentBugAction</code> object
+     */
+    public ShowCommentBugAction() {}
+
+    /**
+     * Builds a <code>ShowCommentBugAction</code> object based on the given
+     * argument.
+     *
+     * @param mapdustPlugin The <code>MapdustPlugin</code>
+     */
+    public ShowCommentBugAction(MapdustPlugin mapdustPlugin) {
+        setMapdustPlugin(mapdustPlugin);
+        setTitle("Add comment/additional info");
+        setIconName("dialogs/comment.png");
+    }
+
+    /**
+     * Builds a <code>CommentIssueDialog</code> dialog window and displays
+     * on the screen.
+     *
+     * @param event The <code>ActionEvent</code> object
+     */
+    @Override
+    public void actionPerformed(ActionEvent event) {
+        if (event != null) {
+            JToggleButton btn = null;
+            if (event.getSource() instanceof JToggleButton) {
+                btn = (JToggleButton) event.getSource();
+            } else {
+                if (event.getSource() instanceof JMenuItem) {
+                    getButtonPanel().getBtnAddComment().setSelected(true);
+                }
+            }
+            disableButtons(getButtonPanel());
+            CommentBugDialog dialog = new CommentBugDialog(getTitle(),
+                    getIconName(), btn, getMapdustPlugin());
+            dialog.setLocationRelativeTo(null);
+            dialog.getContentPane().setPreferredSize(dialog.getSize());
+            dialog.pack();
+            dialog.setVisible(true);
+        }
+    }
+
+    /**
+     * Disables the buttons from the <code>MapdustButtonPanel</code> according
+     * to the executed action type. The only enabled button will be the "Create
+     * bug report comment" button.
+     *
+     * @param buttonPanel The <code>MapdustButtonPanel</code> object
+     */
+    @Override
+    void disableButtons(MapdustButtonPanel buttonPanel) {
+        buttonPanel.getBtnWorkOffline().setEnabled(false);
+        buttonPanel.getBtnWorkOffline().setSelected(false);
+        buttonPanel.getBtnWorkOffline().setFocusable(false);
+        buttonPanel.getBtnRefresh().setEnabled(false);
+        buttonPanel.getBtnRefresh().setSelected(false);
+        buttonPanel.getBtnRefresh().setFocusable(false);
+        buttonPanel.getBtnFilter().setEnabled(false);
+        buttonPanel.getBtnFilter().setSelected(false);
+        buttonPanel.getBtnFilter().setFocusable(false);
+        buttonPanel.getBtnInvalidateBugReport().setEnabled(false);
+        buttonPanel.getBtnInvalidateBugReport().setSelected(false);
+        buttonPanel.getBtnInvalidateBugReport().setFocusable(false);
+        buttonPanel.getBtnReOpenBugReport().setEnabled(false);
+        buttonPanel.getBtnReOpenBugReport().setSelected(false);
+        buttonPanel.getBtnReOpenBugReport().setFocusable(false);
+        buttonPanel.getBtnFixBugReport().setEnabled(false);
+        buttonPanel.getBtnFixBugReport().setSelected(false);
+        buttonPanel.getBtnFixBugReport().setFocusable(false);
+    }
+
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/show/ShowFilterBugAction.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/show/ShowFilterBugAction.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/show/ShowFilterBugAction.java	(revision 35962)
@@ -0,0 +1,144 @@
+/*
+ * Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ *
+ * Created on Feb 10, 2011 by Bea
+ * Modified on $DateTime$ by $Author$
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.action.show;
+
+
+import java.awt.event.ActionEvent;
+
+import javax.swing.JMenuItem;
+import javax.swing.JToggleButton;
+
+import org.openstreetmap.josm.plugins.mapdust.MapdustPlugin;
+import org.openstreetmap.josm.plugins.mapdust.gui.component.dialog.FilterBugDialog;
+import org.openstreetmap.josm.plugins.mapdust.gui.component.panel.MapdustButtonPanel;
+import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustBug;
+import org.openstreetmap.josm.spi.preferences.Config;
+
+
+/**
+ * Displays the <code>FilterBugDialog</code> dialog window. This action is
+ * executed whenever the user clicks on the "Filter bug reports" button.
+ *
+ * @author Bea
+ * @version $Revision$
+ */
+public class ShowFilterBugAction extends MapdustShowAction {
+
+    /** The serial version UID */
+    private static final long serialVersionUID = -5627314630613341777L;
+
+    /**
+     * Builds a <code>ShowFilterBugAction</code> object
+     */
+    public ShowFilterBugAction() {}
+
+    /**
+     * Builds a <code>ShowFilterBugAction</code> object based on the given
+     * arguments.
+     *
+     * @param mapdustPlugin The <code>MapdustPlugin</code> object
+     */
+    public ShowFilterBugAction(MapdustPlugin mapdustPlugin) {
+        setMapdustPlugin(mapdustPlugin);
+        setTitle("Filter bug reports");
+        setIconName("dialogs/mapdust_bug_filter.png");
+    }
+
+    /**
+     * Builds a <code>FilterBugDialog</code> dialog window and displays on the
+     * screen.
+     *
+     * @param event The <code>ActionEvent</code> object
+     */
+    @Override
+    public void actionPerformed(ActionEvent event) {
+        if (event != null) {
+            JToggleButton btn = null;
+            if (event.getSource() instanceof JToggleButton) {
+                btn = (JToggleButton) event.getSource();
+                btn.setSelected(true);
+            } else {
+                if (event.getSource() instanceof JMenuItem) {
+                    getButtonPanel().getBtnFilter().setSelected(true);
+                }
+            }
+            MapdustBug selectedBug =
+                    mapdustPlugin.getMapdustGUI().getSelectedBug();
+            if (selectedBug != null) {
+                Config.getPref().put("selectedBug.status", selectedBug.getStatus()
+                        .getValue());
+            } else {
+                Config.getPref().put("selectedBug.status", "");
+            }
+            disableButtons(getButtonPanel());
+            FilterBugDialog dialog = new FilterBugDialog(getTitle(),
+                    getIconName(), btn, getMapdustPlugin());
+            dialog.setLocationRelativeTo(null);
+            dialog.getContentPane().setPreferredSize(dialog.getSize());
+            dialog.pack();
+            dialog.setVisible(true);
+        }
+
+    }
+
+    /**
+     * Disables the buttons from the <code>MapdustButtonPanel</code> according
+     * to the executed action type. The only enabled button will be the "Filter
+     * bug reports" button.
+     *
+     * @param buttonPanel The <code>MapdustButtonPanel</code> object
+     */
+    @Override
+    void disableButtons(MapdustButtonPanel buttonPanel) {
+        if (buttonPanel != null) {
+            buttonPanel.getBtnWorkOffline().setEnabled(false);
+            buttonPanel.getBtnWorkOffline().setSelected(false);
+            buttonPanel.getBtnWorkOffline().setFocusable(false);
+            buttonPanel.getBtnRefresh().setEnabled(false);
+            buttonPanel.getBtnRefresh().setSelected(false);
+            buttonPanel.getBtnRefresh().setFocusable(false);
+            buttonPanel.getBtnReOpenBugReport().setEnabled(false);
+            buttonPanel.getBtnReOpenBugReport().setSelected(false);
+            buttonPanel.getBtnReOpenBugReport().setFocusable(false);
+            buttonPanel.getBtnAddComment().setEnabled(false);
+            buttonPanel.getBtnAddComment().setSelected(false);
+            buttonPanel.getBtnAddComment().setFocusable(false);
+            buttonPanel.getBtnInvalidateBugReport().setEnabled(false);
+            buttonPanel.getBtnInvalidateBugReport().setSelected(false);
+            buttonPanel.getBtnInvalidateBugReport().setFocusable(false);
+            buttonPanel.getBtnFixBugReport().setEnabled(false);
+            buttonPanel.getBtnFixBugReport().setSelected(false);
+            buttonPanel.getBtnFixBugReport().setFocusable(false);
+        }
+    }
+
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/show/ShowInvalidateBugAction.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/show/ShowInvalidateBugAction.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/show/ShowInvalidateBugAction.java	(revision 35962)
@@ -0,0 +1,130 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.action.show;
+
+
+import java.awt.event.ActionEvent;
+
+import javax.swing.JMenuItem;
+import javax.swing.JToggleButton;
+
+import org.openstreetmap.josm.plugins.mapdust.MapdustPlugin;
+import org.openstreetmap.josm.plugins.mapdust.gui.component.dialog.ChangeBugStatusDialog;
+import org.openstreetmap.josm.plugins.mapdust.gui.component.panel.MapdustButtonPanel;
+
+
+/**
+ * Displays the <code>ChangeIssueStatusDialog</code> dialog window of type
+ * 'invalidate'. This action is executed whenever the user clicks on the
+ * "Invalidate bug report" button or selects the "Invalidate bug" option from
+ * the pop-up menu.
+ *
+ * @author Bea
+ *
+ */
+public class ShowInvalidateBugAction extends MapdustShowAction {
+
+    /** The serial version UID */
+    private static final long serialVersionUID = 5163950675223273862L;
+
+    /**
+     * Builds a <code>ShowInvalidateBugAction</code> object
+     */
+    public ShowInvalidateBugAction() {}
+
+    /**
+     * Builds a <code>ShowInvalidateBugAction</code> object based on the given
+     * argument.
+     *
+     * @param mapdustPlugin The <code>MapdustPlugin</code> object.
+     */
+    public ShowInvalidateBugAction(MapdustPlugin mapdustPlugin) {
+        setMapdustPlugin(mapdustPlugin);
+        setTitle("Mark bug report as non-reproducible/software bug");
+        setIconName("dialogs/invalid.png");
+    }
+
+    /**
+     * Builds a <code>ChangeIssueStatusDialog</code> dialog window of type
+     * "invalidate" and displays on the screen.
+     *
+     * @param event The <code>ActionEvent</code> object
+     */
+    @Override
+    public void actionPerformed(ActionEvent event) {
+        if (event != null) {
+            JToggleButton btn = null;
+            if (event.getSource() instanceof JToggleButton) {
+                btn = (JToggleButton) event.getSource();
+            } else {
+                if (event.getSource() instanceof JMenuItem) {
+                    getButtonPanel().getBtnInvalidateBugReport().setSelected(
+                            true);
+                }
+            }
+            disableButtons(getButtonPanel());
+            ChangeBugStatusDialog dialog = new ChangeBugStatusDialog(
+                    getTitle(), getIconName(), "invalidate",
+                    btn, getMapdustPlugin());
+            dialog.setLocationRelativeTo(null);
+            dialog.getContentPane().setPreferredSize(dialog.getSize());
+            dialog.pack();
+            dialog.setVisible(true);
+        }
+    }
+
+    /**
+     * Disables the buttons from the <code>MapdustButtonPanel</code> according
+     * to the executed action type. The only enabled button will be the
+     * "Invalidate bug report" button.
+     *
+     * @param buttonPanel The <code>MapdustButtonPanel</code> object
+     */
+    @Override
+    void disableButtons(MapdustButtonPanel buttonPanel) {
+        buttonPanel.getBtnWorkOffline().setEnabled(false);
+        buttonPanel.getBtnWorkOffline().setSelected(false);
+        buttonPanel.getBtnWorkOffline().setFocusable(false);
+        buttonPanel.getBtnRefresh().setEnabled(false);
+        buttonPanel.getBtnRefresh().setSelected(false);
+        buttonPanel.getBtnRefresh().setFocusable(false);
+        buttonPanel.getBtnFilter().setEnabled(false);
+        buttonPanel.getBtnFilter().setSelected(false);
+        buttonPanel.getBtnFilter().setFocusable(false);
+        buttonPanel.getBtnAddComment().setEnabled(false);
+        buttonPanel.getBtnAddComment().setSelected(false);
+        buttonPanel.getBtnAddComment().setFocusable(false);
+        buttonPanel.getBtnReOpenBugReport().setEnabled(false);
+        buttonPanel.getBtnReOpenBugReport().setSelected(false);
+        buttonPanel.getBtnReOpenBugReport().setFocusable(false);
+        buttonPanel.getBtnFixBugReport().setEnabled(false);
+        buttonPanel.getBtnFixBugReport().setSelected(false);
+        buttonPanel.getBtnFixBugReport().setFocusable(false);
+    }
+
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/show/ShowReOpenBugAction.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/show/ShowReOpenBugAction.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/show/ShowReOpenBugAction.java	(revision 35962)
@@ -0,0 +1,130 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.action.show;
+
+
+import java.awt.event.ActionEvent;
+
+import javax.swing.JMenuItem;
+import javax.swing.JToggleButton;
+
+import org.openstreetmap.josm.plugins.mapdust.MapdustPlugin;
+import org.openstreetmap.josm.plugins.mapdust.gui.component.dialog.ChangeBugStatusDialog;
+import org.openstreetmap.josm.plugins.mapdust.gui.component.panel.MapdustButtonPanel;
+
+
+/**
+ * Displays the <code>ChangeIssueStatusDialog</code> dialog window of type
+ * 'reopen'. This action is executed whenever the user clicks on the
+ * "Re-open bug report" button or selects the "Re-open bug" option from
+ * the pop-up menu.
+ *
+ * @author Bea
+ */
+public class ShowReOpenBugAction extends MapdustShowAction {
+
+    /** The serial version UID */
+    private static final long serialVersionUID = -1362380763238161011L;
+
+    /**
+     * Builds a <code>ShowReOpenBugAction</code> object
+     */
+    public ShowReOpenBugAction() {}
+
+    /**
+     * Builds a <code>ShowReOpenBugAction</code> object based on the given
+     * argument
+     *
+     * @param mapdustPlugin The <code>MapdustPlugin</code> action.
+     */
+    public ShowReOpenBugAction(MapdustPlugin mapdustPlugin) {
+        setMapdustPlugin(mapdustPlugin);
+        setTitle("Reopen bug report");
+        setIconName("dialogs/reopen.png");
+    }
+
+    /**
+     * Builds a <code>ChangeIssueStatusDialog</code> dialog window of type
+     * "re-open" and displays on the screen.
+     *
+     * @param event The <code>ActionEvent</code> object
+     */
+    @Override
+    public void actionPerformed(ActionEvent event) {
+        if (event != null) {
+            JToggleButton btn = null;
+            if (event.getSource() instanceof JToggleButton) {
+                btn = (JToggleButton) event.getSource();
+                btn.setSelected(true);
+            }
+            if (event.getSource() instanceof JMenuItem) {
+                getButtonPanel().getBtnReOpenBugReport().setSelected(true);
+            }
+            disableButtons(getButtonPanel());
+            ChangeBugStatusDialog dialog = new ChangeBugStatusDialog(
+                    getTitle(), getIconName(), "reopen", btn,
+                    getMapdustPlugin());
+            dialog.setLocationRelativeTo(null);
+            dialog.getContentPane().setPreferredSize(dialog.getSize());
+            dialog.pack();
+            dialog.setVisible(true);
+        }
+    }
+
+    /**
+     * Disables the buttons from the <code>MapdustButtonPanel</code> according
+     * to the executed action type. The only enabled button will be the
+     * "Re-open bug report" button.
+     *
+     * @param buttonPanel The <code>MapdustButtonPanel</code> object
+     */
+    @Override
+    void disableButtons(MapdustButtonPanel buttonPanel) {
+        if (buttonPanel != null) {
+            buttonPanel.getBtnWorkOffline().setEnabled(false);
+            buttonPanel.getBtnWorkOffline().setSelected(false);
+            buttonPanel.getBtnWorkOffline().setFocusable(false);
+            buttonPanel.getBtnRefresh().setEnabled(false);
+            buttonPanel.getBtnRefresh().setSelected(false);
+            buttonPanel.getBtnRefresh().setFocusable(false);
+            buttonPanel.getBtnFilter().setEnabled(false);
+            buttonPanel.getBtnFilter().setSelected(false);
+            buttonPanel.getBtnFilter().setFocusable(false);
+            buttonPanel.getBtnAddComment().setEnabled(false);
+            buttonPanel.getBtnAddComment().setSelected(false);
+            buttonPanel.getBtnAddComment().setFocusable(false);
+            buttonPanel.getBtnInvalidateBugReport().setEnabled(false);
+            buttonPanel.getBtnInvalidateBugReport().setSelected(false);
+            buttonPanel.getBtnInvalidateBugReport().setFocusable(false);
+            buttonPanel.getBtnFixBugReport().setEnabled(false);
+            buttonPanel.getBtnFixBugReport().setSelected(false);
+            buttonPanel.getBtnFixBugReport().setFocusable(false);
+        }
+    }
+
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/show/package-info.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/show/package-info.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/show/package-info.java	(revision 35962)
@@ -0,0 +1,7 @@
+/**
+ * Contains the classes, which are used in order to display the dialogs of the
+ * plugin.
+ * Each of these classes extends the <code>MapdustShowAction</code> abstract
+ * class.
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.action.show;
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/dialog/AbstractDialog.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/dialog/AbstractDialog.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/dialog/AbstractDialog.java	(revision 35962)
@@ -0,0 +1,74 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.component.dialog;
+
+
+import javax.swing.JDialog;
+import javax.swing.JToggleButton;
+
+import org.openstreetmap.josm.plugins.mapdust.MapdustPlugin;
+
+
+/**
+ * Defines the basic methods used for creating swing components.
+ *
+ * @author Bea
+ */
+public abstract class AbstractDialog extends JDialog {
+
+    /** The serial version UID */
+    private static final long serialVersionUID = 7543537884312236858L;
+
+    /** The button which opened the dialog window */
+    private JToggleButton firedButton;
+
+    /**
+     * Add the components to the panel
+     *
+     * @param mapdustPlugin The <code>MapdustPlugin</code> object
+     */
+    public abstract void addComponents(MapdustPlugin mapdustPlugin);
+
+    /**
+     * Returns the button which fired the action
+     *
+     * @return the firedButton
+     */
+    public JToggleButton getFiredButton() {
+        return this.firedButton;
+    }
+
+    /**
+     * Sets the button which fired the action
+     *
+     * @param firedButton the firedButton to set
+     */
+    public void setFiredButton(JToggleButton firedButton) {
+        this.firedButton = firedButton;
+    }
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/dialog/ChangeBugStatusDialog.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/dialog/ChangeBugStatusDialog.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/dialog/ChangeBugStatusDialog.java	(revision 35962)
@@ -0,0 +1,287 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.component.dialog;
+
+
+import java.awt.Color;
+import java.awt.Font;
+import java.awt.Image;
+import java.awt.Rectangle;
+
+import javax.swing.AbstractAction;
+import javax.swing.JButton;
+import javax.swing.JLabel;
+import javax.swing.JScrollPane;
+import javax.swing.JTextArea;
+import javax.swing.JTextField;
+import javax.swing.JToggleButton;
+import javax.swing.WindowConstants;
+
+import org.openstreetmap.josm.plugins.mapdust.MapdustPlugin;
+import org.openstreetmap.josm.plugins.mapdust.gui.action.adapter.WindowClose;
+import org.openstreetmap.josm.plugins.mapdust.gui.action.execute.ExecuteCancel;
+import org.openstreetmap.josm.plugins.mapdust.gui.action.execute.ExecuteCloseBug;
+import org.openstreetmap.josm.plugins.mapdust.gui.action.execute.ExecuteInvalidateBug;
+import org.openstreetmap.josm.plugins.mapdust.gui.action.execute.ExecuteReOpenBug;
+import org.openstreetmap.josm.plugins.mapdust.gui.component.panel.MapdustButtonPanel;
+import org.openstreetmap.josm.plugins.mapdust.gui.component.util.ComponentUtil;
+import org.openstreetmap.josm.spi.preferences.Config;
+import org.openstreetmap.josm.tools.ImageProvider;
+
+
+/**
+ * This class is used for creating a dialog window for the following MapDust BUG
+ * related actions: close bug report, invalidate bug report and re-open bug
+ * report.
+ *
+ * @author Bea
+ */
+public class ChangeBugStatusDialog extends AbstractDialog {
+
+    /** The serial version UID */
+    private static final long serialVersionUID = -4106150600118847229L;
+
+    /** Nickname label */
+    private JLabel lblNickname;
+
+    /** Nickname text field */
+    private JTextField txtNickname;
+
+    /** Comment label */
+    private JLabel lblComment;
+
+    /** Description text area */
+    private JScrollPane cmpDescription;
+
+    /** The description text */
+    private JTextArea txtDescription;
+
+    /** Cancel button */
+    private JButton btnCancel;
+
+    /** OK button */
+    private JButton btnOk;
+
+    /** The type */
+    private final String type;
+
+    /**
+     * Builds a new <code>ChangeStatusDialog</code> object with the given
+     * parameters.
+     *
+     * @param title The title of the dialog
+     * @param iconName The name of the icon
+     * @param type The type of the dialog ( close ,invalidate , re-open)
+     * @param firedButton The button which fired this action
+     * @param mapdustPlugin The <code>MapdustPlugin</code> object
+     */
+    public ChangeBugStatusDialog(String title, String iconName, String type,
+            JToggleButton firedButton, MapdustPlugin mapdustPlugin) {
+        this.type = type;
+        if (firedButton != null) {
+            setFiredButton(firedButton);
+        }
+        setTitle(title);
+        setModal(true);
+        Image image = ImageProvider.get(iconName).getImage();
+        setIconImage(image);
+        setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
+        getContentPane().setFont(new Font("Times New Roman", Font.BOLD, 14));
+        setBackground(Color.white);
+        setResizable(false);
+        setForeground(Color.black);
+        setLayout(null);
+        addComponents(mapdustPlugin);
+        MapdustButtonPanel btnPanel =
+                mapdustPlugin.getMapdustGUI().getPanel().getBtnPanel();
+        addWindowListener(new WindowClose(this, btnPanel));
+    }
+
+    /**
+     * Adds the components to the dialog window.
+     *
+     * @param mapdustPlugin The <code>MapdustPlugin</code> object
+     */
+    @Override
+    public void addComponents(MapdustPlugin mapdustPlugin) {
+        /* initialize components of the JDialog */
+        Color backgroundColor = getContentPane().getBackground();
+        Font font = new Font("Times New Roman", Font.BOLD, 14);
+        /* create the nickname label and text field */
+        if (lblNickname == null) {
+            Rectangle bounds = new Rectangle(10, 10, 85, 25);
+            lblNickname = ComponentUtil.createJLabel("Nickname", font, bounds,
+                    null);
+        }
+        if (txtNickname == null) {
+            Rectangle bounds = new Rectangle(100, 10, 250, 25);
+            txtNickname = ComponentUtil.createJTextField(bounds);
+            /* get the nickname */
+            String nickname = Config.getPref().get("mapdust.nickname");
+            if (nickname.isEmpty()) {
+                /* if nickname is empty, then get JOSM username */
+                nickname = Config.getPref().get("mapdust.josmUserName");
+            }
+            if (nickname != null && !nickname.isEmpty()) {
+                txtNickname.setText(nickname);
+            }
+        }
+        /* creates the comment label and text area */
+        if (lblComment == null) {
+            Rectangle bounds = new Rectangle(10, 50, 89, 25);
+            lblComment = ComponentUtil.createJLabel("Comment", font, bounds,
+                    null);
+        }
+        if (cmpDescription == null) {
+            Rectangle bounds = new Rectangle(100, 50, 250, 80);
+            txtDescription = new JTextArea();
+            txtDescription.setLineWrap(true);
+            txtDescription.setFont(new Font("Times New Roman", Font.PLAIN, 12));
+            cmpDescription = ComponentUtil.createJScrollPane(txtDescription,
+                    bounds, backgroundColor, false, true);
+        }
+        /* creates the cancel action */
+        ExecuteCancel cancelAction = new ExecuteCancel(this,
+                mapdustPlugin.getMapdustGUI());
+        AbstractAction okAction;
+        if (type.equals("close")) {
+            /* create the execute close bug action */
+            okAction = new ExecuteCloseBug(this, mapdustPlugin.getMapdustGUI());
+            ((ExecuteCloseBug) okAction).addObserver(mapdustPlugin);
+            ((ExecuteCloseBug) okAction).addObserver(mapdustPlugin
+                    .getMapdustGUI());
+        } else {
+            if (type.equals("invalidate")) {
+                /* create the invalidate bug action */
+                okAction = new ExecuteInvalidateBug(this,
+                        mapdustPlugin.getMapdustGUI());
+                ((ExecuteInvalidateBug) okAction).addObserver(mapdustPlugin);
+                ((ExecuteInvalidateBug) okAction).addObserver(mapdustPlugin
+                        .getMapdustGUI());
+            } else {
+                /* executes the re-open bug action */
+                okAction = new ExecuteReOpenBug(this,
+                        mapdustPlugin.getMapdustGUI());
+                ((ExecuteReOpenBug) okAction).addObserver(mapdustPlugin);
+                ((ExecuteReOpenBug) okAction).addObserver(mapdustPlugin
+                        .getMapdustGUI());
+            }
+        }
+        /* creates the cancel button */
+        if (btnCancel == null) {
+            Rectangle bounds = new Rectangle(260, 140, 90, 25);
+            btnCancel = ComponentUtil.createJButton("Cancel", bounds,
+                    cancelAction);
+        }
+        /* creates the ok button */
+        if (btnOk == null) {
+            Rectangle bounds = new Rectangle(190, 140, 60, 25);
+            btnOk = ComponentUtil.createJButton("OK", bounds, okAction);
+        }
+        /* add components to the frame */
+        add(lblNickname);
+        add(txtNickname);
+        add(lblComment);
+        add(cmpDescription);
+        add(btnCancel);
+        add(btnOk);
+        setSize(360, 170);
+    }
+
+    /**
+     * Returns the <code>JLabel</code> of the nickname
+     *
+     * @return the lblNickname
+     */
+    public JLabel getLblNickname() {
+        return this.lblNickname;
+    }
+
+    /**
+     * Returns the <code>JTextField</code> of the nickname
+     *
+     * @return the txtNickname
+     */
+    public JTextField getTxtNickname() {
+        return this.txtNickname;
+    }
+
+    /**
+     * Returns the <code>JLabel</code> of the comment
+     *
+     * @return the lblComment
+     */
+    public JLabel getLblComment() {
+        return this.lblComment;
+    }
+
+    /**
+     * Returns the <code>JScrollPane</code> of the description
+     *
+     * @return the cmpDescription
+     */
+    public JScrollPane getCmpDescription() {
+        return this.cmpDescription;
+    }
+
+    /**
+     * Returns the <code>JTextArea</code> of the description
+     *
+     * @return the txtDescription
+     */
+    public JTextArea getTxtDescription() {
+        return this.txtDescription;
+    }
+
+    /**
+     * Returns the cancel button
+     *
+     * @return the btnCancel
+     */
+    public JButton getBtnCancel() {
+        return this.btnCancel;
+    }
+
+    /**
+     * Returns the ok buttons
+     *
+     * @return the btnOk
+     */
+    public JButton getBtnOk() {
+        return this.btnOk;
+    }
+
+    /**
+     * Returns the type of the dialog window
+     *
+     * @return the type
+     */
+// caused compile error
+//    public String getType() {        return this.type;    }
+
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/dialog/CommentBugDialog.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/dialog/CommentBugDialog.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/dialog/CommentBugDialog.java	(revision 35962)
@@ -0,0 +1,248 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.component.dialog;
+
+
+import java.awt.Color;
+import java.awt.Font;
+import java.awt.Image;
+import java.awt.Rectangle;
+
+import javax.swing.JButton;
+import javax.swing.JLabel;
+import javax.swing.JScrollPane;
+import javax.swing.JTextArea;
+import javax.swing.JTextField;
+import javax.swing.JToggleButton;
+import javax.swing.WindowConstants;
+
+import org.openstreetmap.josm.plugins.mapdust.MapdustPlugin;
+import org.openstreetmap.josm.plugins.mapdust.gui.action.adapter.WindowClose;
+import org.openstreetmap.josm.plugins.mapdust.gui.action.execute.ExecuteCancel;
+import org.openstreetmap.josm.plugins.mapdust.gui.action.execute.ExecuteCommentBug;
+import org.openstreetmap.josm.plugins.mapdust.gui.component.panel.MapdustButtonPanel;
+import org.openstreetmap.josm.plugins.mapdust.gui.component.util.ComponentUtil;
+import org.openstreetmap.josm.spi.preferences.Config;
+import org.openstreetmap.josm.tools.ImageProvider;
+
+
+/**
+ * This class is used for creating a dialog window for the comment MapDust Bug
+ * action.
+ *
+ * @author Bea
+ *
+ */
+public class CommentBugDialog extends AbstractDialog {
+
+    /** The serial version UID */
+    private static final long serialVersionUID = 7788698281871951326L;
+
+    /** Nickname label */
+    private JLabel lblNickname;
+
+    /** Nickname text field */
+    private JTextField txtNickname;
+
+    /** Comment label */
+    private JLabel lblComment;
+
+    /** Comment text area */
+    private JScrollPane cmpComment;
+
+    /** The comment */
+    private JTextArea txtComment;
+
+    /** Cancel button */
+    private JButton btnCancel;
+
+    /** OK button */
+    private JButton btnOk;
+
+    /**
+     * Builds a new <code>ChangeStatusDialog</code> object with the given
+     * parameters.
+     *
+     * @param title The title of the dialog
+     * @param iconName The name of the icon
+     * @param firedButton The button which action was to show this dialog
+     * @param mapdustPlugin The <code>MapdustPlugin</code> object
+     */
+    public CommentBugDialog(String title, String iconName,
+            JToggleButton firedButton, MapdustPlugin mapdustPlugin) {
+        if (firedButton != null) {
+            setFiredButton(firedButton);
+        }
+        setTitle(title);
+        setModal(true);
+        Image image = ImageProvider.get(iconName).getImage();
+        setIconImage(image);
+        setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
+        getContentPane().setFont(new Font("Times New Roman", Font.BOLD, 14));
+        setBackground(getContentPane().getBackground());
+        setResizable(false);
+        setForeground(Color.black);
+        setLayout(null);
+        addComponents(mapdustPlugin);
+        MapdustButtonPanel btnPanel =
+                mapdustPlugin.getMapdustGUI().getPanel().getBtnPanel();
+        addWindowListener(new WindowClose(this, btnPanel));
+    }
+
+    /**
+     * Add the components to the dialog window.
+     *
+     * @param mapdustPlugin The <code>MapdustPlugin</code> object
+     */
+    @Override
+    public void addComponents(MapdustPlugin mapdustPlugin) {
+        Color backgroundColor = getContentPane().getBackground();
+        Font font = new Font("Times New Roman", Font.BOLD, 14);
+        /* nickname */
+        if (lblNickname == null) {
+            Rectangle bounds = new Rectangle(10, 10, 91, 25);
+            lblNickname = ComponentUtil.createJLabel("Nickname", font, bounds,
+                    null);
+        }
+        if (txtNickname == null) {
+            Rectangle bounds = new Rectangle(100, 10, 250, 25);
+            txtNickname = ComponentUtil.createJTextField(bounds);
+            /* get the nickname */
+            String nickname = Config.getPref().get("mapdust.nickname");
+            if (nickname.isEmpty()) {
+                /* if nickname is empty, get JOSM username */
+                nickname = Config.getPref().get("mapdust.josmUserName");
+            }
+            if (nickname != null && !nickname.isEmpty()) {
+                txtNickname.setText(nickname);
+            }
+        }
+        /* comment */
+        if (lblComment == null) {
+            Rectangle bounds = new Rectangle(10, 50, 79, 25);
+            lblComment = ComponentUtil.createJLabel("Comment", font, bounds,
+                    null);
+        }
+        if (cmpComment == null) {
+            Rectangle bounds = new Rectangle(100, 50, 250, 80);
+            txtComment = new JTextArea();
+            txtComment.setFont(new Font("Times New Roman", Font.PLAIN, 12));
+            txtComment.setLineWrap(true);
+            cmpComment = ComponentUtil.createJScrollPane(txtComment, bounds,
+                    backgroundColor, false, true);
+        }
+        /* cancel button */
+        if (btnCancel == null) {
+            Rectangle bounds = new Rectangle(260, 140, 90, 25);
+            ExecuteCancel cancelAction = new ExecuteCancel(this,
+                    mapdustPlugin.getMapdustGUI());
+            btnCancel = ComponentUtil.createJButton("Cancel", bounds,
+                    cancelAction);
+        }
+        /* OK button */
+        if (btnOk == null) {
+            Rectangle bounds = new Rectangle(190, 140, 60, 25);
+            ExecuteCommentBug okAction =
+                    new ExecuteCommentBug(this, mapdustPlugin.getMapdustGUI());
+            okAction.addObserver(mapdustPlugin);
+            okAction.addObserver(mapdustPlugin.getMapdustGUI());
+            btnOk = ComponentUtil.createJButton("OK", bounds, okAction);
+        }
+        /* add components */
+        add(lblNickname);
+        add(txtNickname);
+        add(lblComment);
+        add(cmpComment);
+        add(btnCancel);
+        add(btnOk);
+        setSize(360, 170);
+    }
+
+    /**
+     * Returns the nickname <code>JLabel</code> object
+     *
+     * @return the lblNickname
+     */
+    public JLabel getLblNickname() {
+        return lblNickname;
+    }
+
+    /**
+     * Returns the nickname <code>JTextField</code> object
+     *
+     * @return the txtNickname
+     */
+    public JTextField getTxtNickname() {
+        return txtNickname;
+    }
+
+    /**
+     * Returns the comment <code>JLabel</code> object
+     *
+     * @return the lblComment
+     */
+    public JLabel getLblComment() {
+        return lblComment;
+    }
+
+    /**
+     * Returns the comment <code>JScrollPane</code> object
+     *
+     * @return the cmpComment
+     */
+    public JScrollPane getCmpComment() {
+        return cmpComment;
+    }
+
+    /**
+     * Returns the comment <code>JTextArea</code> object
+     *
+     * @return the txtComment
+     */
+    public JTextArea getTxtComment() {
+        return txtComment;
+    }
+
+    /**
+     * Returns the cancel <code>JButton</code> object
+     *
+     * @return the btnCancel
+     */
+    public JButton getBtnCancel() {
+        return btnCancel;
+    }
+
+    /**
+     * Returns the ok <code>JButton</code> object
+     *
+     * @return the btnOk
+     */
+    public JButton getBtnOk() {
+        return btnOk;
+    }
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/dialog/CreateBugDialog.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/dialog/CreateBugDialog.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/dialog/CreateBugDialog.java	(revision 35962)
@@ -0,0 +1,309 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.component.dialog;
+
+import java.awt.Color;
+import java.awt.Font;
+import java.awt.Image;
+import java.awt.Point;
+import java.awt.Rectangle;
+
+import javax.swing.JButton;
+import javax.swing.JComboBox;
+import javax.swing.JLabel;
+import javax.swing.JScrollPane;
+import javax.swing.JTextArea;
+import javax.swing.JTextField;
+import javax.swing.WindowConstants;
+
+import org.openstreetmap.josm.plugins.mapdust.MapdustPlugin;
+import org.openstreetmap.josm.plugins.mapdust.gui.action.adapter.WindowClose;
+import org.openstreetmap.josm.plugins.mapdust.gui.action.execute.ExecuteAddBug;
+import org.openstreetmap.josm.plugins.mapdust.gui.action.execute.ExecuteCancel;
+import org.openstreetmap.josm.plugins.mapdust.gui.component.panel.MapdustButtonPanel;
+import org.openstreetmap.josm.plugins.mapdust.gui.component.renderer.ComboBoxRenderer;
+import org.openstreetmap.josm.plugins.mapdust.gui.component.util.ComponentUtil;
+import org.openstreetmap.josm.plugins.mapdust.service.value.BugType;
+import org.openstreetmap.josm.spi.preferences.Config;
+import org.openstreetmap.josm.tools.ImageProvider;
+
+/**
+ * This class is used for creating a dialog window for the new issue MapDust Bug
+ * action.
+ *
+ * @author Bea
+ *
+ */
+public class CreateBugDialog extends AbstractDialog {
+
+    /** The serial version UID */
+    private static final long serialVersionUID = 1912577313684808253L;
+
+    /** Text message */
+    private JScrollPane cmpMessage;
+
+    /** The label of the bug type */
+    private JLabel lblType;
+
+    /** The combo-box for the bug types */
+    private JComboBox<BugType> cbbType;
+
+    /** The nickname label */
+    private JLabel lblNickname;
+
+    /** The nickname text field */
+    private JTextField txtNickname;
+
+    /** The description label */
+    private JLabel lblDescription;
+
+    /** The description scroll pane */
+    private JScrollPane cmpDescription;
+
+    /** The description text area */
+    private JTextArea txtDescription;
+
+    /** The cancel button */
+    private JButton btnCancel;
+
+    /** The ok button */
+    private JButton btnOk;
+
+    /** The point */
+    private final Point point;
+
+    /**
+     * Builds a new <code>ChangeStatusDialog</code> object with the given
+     * parameters.
+     *
+     * @param point The position where the bug was created
+     * @param mapdustPlugin The <code>MapdustPlugin</code> object
+     */
+    public CreateBugDialog(Point point, MapdustPlugin mapdustPlugin) {
+        this.point = point;
+        /* set JDialog settings */
+        initializeDialog();
+        /* add components to the dialog */
+        addComponents(mapdustPlugin);
+        /* add window listener */
+        MapdustButtonPanel btnPanel =
+                mapdustPlugin.getMapdustGUI().getPanel().getBtnPanel();
+        addWindowListener(new WindowClose(this, btnPanel));
+    }
+
+    /**
+     * Initializes the dialog default fields.
+     */
+    private void initializeDialog() {
+        /* set JDialog settings */
+        setTitle("Create bug report");
+        setModal(true);
+        Image image = ImageProvider.get("dialogs/open.png").getImage();
+        setIconImage(image);
+        setDefaultCloseOperation(WindowConstants.HIDE_ON_CLOSE);
+        getContentPane().setFont(new Font("Times New Roman", Font.BOLD, 14));
+        setResizable(false);
+        setForeground(Color.black);
+        setLayout(null);
+
+    }
+
+    /**
+     * Displays the dialog window on the screen.
+     */
+    public void showDialog() {
+        setLocationRelativeTo(null);
+        getContentPane().setPreferredSize(getSize());
+        pack();
+        setVisible(true);
+    }
+
+    /**
+     * Adds the components to the dialog window.
+     *
+     * @param mapdustPlugin The <code>MapdustPlugin</code> object
+     */
+    @Override
+    public void addComponents(MapdustPlugin mapdustPlugin) {
+        Color backgroundColor = getContentPane().getBackground();
+        Font font = new Font("Times New Roman", Font.BOLD, 14);
+        /* type */
+        if (lblType == null) {
+            Rectangle bounds = new Rectangle(10, 10, 91, 25);
+            lblType = ComponentUtil.createJLabel("Type", font, bounds, null);
+        }
+        if (cbbType == null) {
+            ComboBoxRenderer renderer = new ComboBoxRenderer();
+            Rectangle bounds = new Rectangle(110, 10, 250, 25);
+            cbbType = ComponentUtil.createJComboBox(bounds, renderer,
+                    backgroundColor);
+        }
+        /* nickname */
+        if (lblNickname == null) {
+            Rectangle bounds = new Rectangle(10, 50, 79, 25);
+            lblNickname = ComponentUtil.createJLabel("Nickname", font, bounds,
+                    null);
+        }
+        if (txtNickname == null) {
+            Rectangle bounds = new Rectangle(110, 50, 250, 25);
+            txtNickname = ComponentUtil.createJTextField(bounds);
+            /* get the nickname */
+            String nickname = Config.getPref().get("mapdust.nickname");
+            if (nickname.isEmpty()) {
+                /* if nickname is empty, get the JOSM username */
+                nickname = Config.getPref().get("mapdust.josmUserName");
+            }
+            if (nickname != null && !nickname.isEmpty()) {
+                txtNickname.setText(nickname);
+            }
+        }
+        /* description */
+        if (lblDescription == null) {
+            Rectangle bounds = new Rectangle(10, 90, 95, 25);
+            lblDescription = ComponentUtil.createJLabel("Description", font,
+                    bounds, null);
+        }
+        if (cmpDescription == null) {
+            Rectangle bounds = new Rectangle(110, 90, 250, 80);
+            txtDescription = new JTextArea();
+            txtDescription.setFont(new Font("Times New Roman", Font.PLAIN, 12));
+            txtDescription.setLineWrap(true);
+            cmpDescription = ComponentUtil.createJScrollPane(txtDescription,
+                    bounds, backgroundColor, false, true);
+        }
+        /* cancel button */
+        if (btnCancel == null) {
+            Rectangle bounds = new Rectangle(270, 180, 90, 25);
+            ExecuteCancel cancelAction = new ExecuteCancel(this,
+                    mapdustPlugin.getMapdustGUI());
+            btnCancel = ComponentUtil.createJButton("Cancel", bounds,
+                    cancelAction);
+        }
+        /* ok button */
+        if (btnOk == null) {
+            Rectangle bounds = new Rectangle(200, 180, 60, 25);
+            ExecuteAddBug okAction = new ExecuteAddBug(this,
+                    mapdustPlugin.getMapdustGUI());
+            okAction.addObserver(mapdustPlugin);
+            okAction.addObserver(mapdustPlugin.getMapdustGUI());
+            btnOk = ComponentUtil.createJButton("OK", bounds, okAction);
+        }
+        /* add components to the frame */
+        add(lblType);
+        add(cbbType);
+        add(lblNickname);
+        add(txtNickname);
+        add(lblDescription);
+        add(cmpDescription);
+        add(btnCancel);
+        add(btnOk);
+        setSize(370, 210);
+    }
+
+    /**
+     * Returns the message <code>JScrollPane</code>
+     *
+     * @return the cmpMessage
+     */
+    public JScrollPane getCmpMessage() {
+        return cmpMessage;
+    }
+
+    /**
+     * Returns the type <code>JLabel</code>
+     *
+     * @return the lblType
+     */
+    public JLabel getLblType() {
+        return lblType;
+    }
+
+    /**
+     * Returns the type <code>JComboBox</code>
+     *
+     * @return the cbbType
+     */
+    public JComboBox<BugType> getCbbType() {
+        return cbbType;
+    }
+
+    /**
+     * Returns the nickname <code>JLabel</code>
+     *
+     * @return the lblNickname
+     */
+    public JLabel getLblNickname() {
+        return lblNickname;
+    }
+
+    /**
+     * Returns the nickname <code>JTextField</code>
+     *
+     * @return the txtNickname
+     */
+    public JTextField getTxtNickname() {
+        return txtNickname;
+    }
+
+    /**
+     * Returns the description <code>JLabel</code>
+     *
+     * @return the lblDescription
+     */
+    public JLabel getLblDescription() {
+        return lblDescription;
+    }
+
+    /**
+     * Returns the description <code>JScrollPane</code>
+     *
+     * @return the cmpDescription
+     */
+    public JScrollPane getCmpDescription() {
+        return cmpDescription;
+    }
+
+    /**
+     * Returns the description <code>JTextArea</code>
+     *
+     * @return the txtDescription
+     */
+    public JTextArea getTxtDescription() {
+        return txtDescription;
+    }
+
+    /**
+     * Returns the <code>Point</code>
+     *
+     * @return point
+     */
+    public Point getPoint() {
+        return point;
+    }
+
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/dialog/FilterBugDialog.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/dialog/FilterBugDialog.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/dialog/FilterBugDialog.java	(revision 35962)
@@ -0,0 +1,423 @@
+/*
+ * Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ *
+ * Created on Feb 10, 2011 by Bea
+ * Modified on $DateTime$ by $Author$
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.component.dialog;
+
+
+import java.awt.Color;
+import java.awt.Font;
+import java.awt.Image;
+import java.awt.Rectangle;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.swing.JButton;
+import javax.swing.JLabel;
+import javax.swing.JToggleButton;
+import javax.swing.WindowConstants;
+
+import org.openstreetmap.josm.plugins.mapdust.MapdustPlugin;
+import org.openstreetmap.josm.plugins.mapdust.gui.action.adapter.WindowClose;
+import org.openstreetmap.josm.plugins.mapdust.gui.action.execute.ExecuteCancel;
+import org.openstreetmap.josm.plugins.mapdust.gui.action.execute.ExecuteFilterBug;
+import org.openstreetmap.josm.plugins.mapdust.gui.component.panel.MapdustButtonPanel;
+import org.openstreetmap.josm.plugins.mapdust.gui.component.slider.RelevanceSlider;
+import org.openstreetmap.josm.plugins.mapdust.gui.component.util.ComponentUtil;
+import org.openstreetmap.josm.plugins.mapdust.gui.component.util.FilterCheckBox;
+import org.openstreetmap.josm.plugins.mapdust.gui.value.MapdustRelevanceValue;
+import org.openstreetmap.josm.plugins.mapdust.service.value.BugType;
+import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustBugFilter;
+import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustRelevance;
+import org.openstreetmap.josm.plugins.mapdust.service.value.Status;
+import org.openstreetmap.josm.tools.ImageProvider;
+
+
+/**
+ * This class it is used for creating a dialog window for the MapDust bug
+ * filtering feature.
+ *
+ * @author Bea
+ */
+public class FilterBugDialog extends AbstractDialog {
+    org.openstreetmap.josm.plugins.mapdust.service.value.BugType ttt = org.openstreetmap.josm.plugins.mapdust.service.value.BugType.WRONG_TURN;
+
+    /** The serial version UID */
+    private static final long serialVersionUID = -3333642616656969760L;
+
+    /** The <code>JLabel</code> for the status filter */
+    private JLabel lblStatus;
+
+    /** The array of <code>FilterCheckBox</cod> containing the status filters */
+    private FilterCheckBox[] filterStatuses;
+
+    /** The <ode>JLabel</code> for the type filter */
+    private JLabel lblType;
+
+    /** The array of <code>FilterCheckBox</cod> containing the type filters */
+    private FilterCheckBox[] filterTypes;
+
+    /** The <code>JLabel</code> for the description filter */
+    private JLabel lblDescription;
+
+    /** The <code>FilterCheckBox</code> containing the description filter */
+    private FilterCheckBox filterDescr;
+
+    /** The <code>JLabel</code> for the relevance filter */
+    private JLabel lblRelevance;
+
+    /** The <code>RelevanceSlider</code> representing the relevance values */
+    private RelevanceSlider sliderRelevance;
+
+    /** The apply button */
+    private JButton btnApply;
+
+    /** The cancel button */
+    private JButton btnCancel;
+
+    /** Builds a <code>FilterBugDialog</code> object */
+    public FilterBugDialog() {}
+
+    /**
+     * Builds a <code>FilterBugDialog</code> object with the given parameters.
+     *
+     * @param title The title of the dialog
+     * @param iconName The name of the icon
+     * @param firedButton The button which fired this action
+     * @param mapdustPlugin The <code>MapdustPlugin</code> object
+     */
+    public FilterBugDialog(String title, String iconName,
+            JToggleButton firedButton, MapdustPlugin mapdustPlugin) {
+        if (firedButton != null) {
+            setFiredButton(firedButton);
+        }
+        setTitle(title);
+        setModal(true);
+        Image image = ImageProvider.get(iconName).getImage();
+        setIconImage(image);
+        setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
+        getContentPane().setFont(new Font("Times New Roman", Font.BOLD, 14));
+        setBackground(Color.white);
+        setResizable(false);
+        setForeground(Color.black);
+        setLayout(null);
+        addComponents(mapdustPlugin);
+        MapdustButtonPanel btnPanel =
+                mapdustPlugin.getMapdustGUI().getPanel().getBtnPanel();
+        addWindowListener(new WindowClose(this, btnPanel));
+    }
+
+    @Override
+    public void addComponents(MapdustPlugin mapdustPlugin) {
+        Font font = new Font("Times New Roman", Font.BOLD, 14);
+        MapdustBugFilter prevFilter = mapdustPlugin.getFilter();
+
+        /* status filter */
+        if (lblStatus == null) {
+            Rectangle bounds = new Rectangle(10, 10, 95, 25);
+            lblStatus = ComponentUtil.createJLabel("Status", font, bounds,
+                    null);
+        }
+        if (filterStatuses == null) {
+            createStatusFilters(prevFilter);
+        }
+
+        /* type filters */
+        if (filterTypes == null) {
+            createTypeFilters(prevFilter);
+        }
+        if (lblType == null) {
+            Rectangle bounds = new Rectangle(10, 90, 95, 25);
+            lblType = ComponentUtil.createJLabel("Type", font, bounds, null);
+        }
+
+        /* description filter */
+        if (lblDescription == null) {
+            Rectangle bounds = new Rectangle(10, 230, 95, 25);
+            lblDescription = ComponentUtil.createJLabel("Description", font,
+                    bounds, null);
+        }
+        if (filterDescr == null) {
+            Rectangle chbBounds = new Rectangle(110, 230, 20, 25);
+            Rectangle lblBounds = new Rectangle(130, 230, 300, 25);
+            String text = "Hide bugs with default description";
+            String iconName = "dialogs/default_description.png";
+            filterDescr = new FilterCheckBox("descr", chbBounds, iconName,
+                    text, lblBounds);
+            if (prevFilter != null && prevFilter.getDescr() != null
+                    && prevFilter.getDescr()) {
+                filterDescr.getChbFilter().setSelected(true);
+            }
+        }
+        /* relevance filter */
+        if (lblRelevance == null) {
+            Rectangle bounds = new Rectangle(10, 265, 95, 25);
+            lblRelevance = ComponentUtil.createJLabel("Relevance", font,
+                    bounds, null);
+        }
+        if (sliderRelevance == null) {
+            Rectangle bounds = new Rectangle(110, 265, 300, 50);
+            sliderRelevance = new RelevanceSlider();
+            sliderRelevance.setBounds(bounds);
+            if (prevFilter != null) {
+                MapdustRelevance min = prevFilter.getMinRelevance();
+                MapdustRelevance max = prevFilter.getMaxRelevance();
+                if (min != null) {
+                    Integer value = MapdustRelevanceValue.getSliderValue(min);
+                    if (value == null) {
+                        value = MapdustRelevanceValue.LOW.getSliderValue();
+                    }
+                    sliderRelevance.setLowerValue(value);
+                }
+                if (max != null) {
+                    Integer value = MapdustRelevanceValue.getSliderValue(max);
+                    if (value == null) {
+                        value = MapdustRelevanceValue.HIGH.getSliderValue();
+                    }
+                    sliderRelevance.setUpperValue(value);
+                }
+                if (max != null && max.equals(min)
+                        && max.equals(MapdustRelevance.LOW)) {
+                    sliderRelevance.getUI().setIsUpperSelected(true);
+                }
+            }
+        }
+
+        /* creates the cancel button */
+        if (btnCancel == null) {
+            Rectangle bounds = new Rectangle(360, 330, 90, 25);
+            ExecuteCancel cancelAction = new ExecuteCancel(this,
+                    mapdustPlugin.getMapdustGUI());
+            btnCancel = ComponentUtil.createJButton("Cancel", bounds,
+                    cancelAction);
+        }
+        /* creates the OK button */
+        if (btnApply == null) {
+            Rectangle bounds = new Rectangle(260, 330, 90, 25);
+            ExecuteFilterBug applyAction = new ExecuteFilterBug(this,
+                    mapdustPlugin.getMapdustGUI());
+            applyAction.addObserver(mapdustPlugin);
+            btnApply = ComponentUtil.createJButton("Apply", bounds,
+                    applyAction);
+        }
+        /* add components */
+        add(lblStatus);
+        add(filterStatuses);
+        add(lblType);
+        add(filterTypes);
+        add(lblDescription);
+        add(filterDescr);
+        add(lblRelevance);
+        add(sliderRelevance);
+        add(btnCancel);
+        add(btnApply);
+        setSize(460, 360);
+    }
+
+    /**
+     * Creates the MapDust bug status filters. If there was any previous status
+     * filter selected then this status filter will be selected by default.
+     *
+     * @param prevFilter The <code>MapdustBugFilter</code> object
+     */
+    private void createStatusFilters(MapdustBugFilter prevFilter) {
+        filterStatuses = new FilterCheckBox[3];
+
+        /* open status */
+        filterStatuses[0] = new FilterCheckBox(Status.OPEN.getKey(),
+                new Rectangle(110, 10, 20, 25), "dialogs/open_bug.png",
+                Status.OPEN.getValue(), new Rectangle(130, 10, 150, 25));
+
+        /* closed status */
+        filterStatuses[1] = new FilterCheckBox(Status.INVALID.getKey(),
+                new Rectangle(270, 10, 20, 25), "dialogs/invalid_bug.png",
+                Status.INVALID.getValue(), new Rectangle(290, 10, 180, 25));
+
+        /* invalid status */
+        filterStatuses[2] = new FilterCheckBox(Status.FIXED.getKey(),
+                new Rectangle(110, 45, 20, 25), "dialogs/fixed_bug.png",
+                Status.FIXED.getValue(), new Rectangle(130, 45, 150, 25));
+
+        if (prevFilter != null && prevFilter.getStatuses() != null) {
+            for (FilterCheckBox filter : filterStatuses) {
+                if (prevFilter.getStatuses().contains(filter.getId())) {
+                    filter.getChbFilter().setSelected(true);
+                }
+            }
+        }
+    }
+
+    /**
+     * Creates the MapDust bug type filters. If there was any previous type
+     * filter selected, then this type filter will be selected by default.
+     *
+     * @param prevFilter The <code>MapdustBugFilter</code> object
+     */
+    private void createTypeFilters(MapdustBugFilter prevFilter) {
+        filterTypes = new FilterCheckBox[8];
+
+        /* wrong_turn type */
+        filterTypes[0] = new FilterCheckBox(BugType.WRONG_TURN.getKey(),
+                new Rectangle(110, 90, 20, 25), "dialogs/wrong_turn.png",
+                BugType.WRONG_TURN.getValue(), new Rectangle(130, 90, 120, 25));
+        /* bad_routing type */
+        filterTypes[1] = new FilterCheckBox(BugType.WRONG_ROUNDABOUT.getKey(),
+                new Rectangle(270, 90, 20, 25), "dialogs/wrong_roundabout.png",
+                BugType.WRONG_ROUNDABOUT.getValue(), new Rectangle(290, 90, 180,
+                        25));
+        /* oneway_road type */
+        filterTypes[2] = new FilterCheckBox(BugType.MISSING_STREET.getKey(),
+                new Rectangle(110, 125, 20, 25), "dialogs/missing_street.png",
+                BugType.MISSING_STREET.getValue(), new Rectangle(130, 125, 150,
+                        25));
+        /* blocked_street type */
+        filterTypes[3] = new FilterCheckBox(BugType.BLOCKED_STREET.getKey(),
+                new Rectangle(270, 125, 20, 25), "dialogs/blocked_street.png",
+                BugType.BLOCKED_STREET.getValue(), new Rectangle(290, 125, 180,
+                        25));
+        /* missing_street type */
+        filterTypes[4] = new FilterCheckBox(BugType.BAD_ROUTING.getKey(),
+                new Rectangle(110, 160, 20, 25), "dialogs/bad_routing.png",
+                BugType.BAD_ROUTING.getValue(), new Rectangle(130, 160, 150, 25));
+        /* wrong_roundabout type */
+        filterTypes[5] = new FilterCheckBox(BugType.MISSING_SPEEDLIMIT.getKey(),
+                new Rectangle(270, 160, 20, 25), "dialogs/missing_speedlimit.png",
+                BugType.MISSING_SPEEDLIMIT.getValue(), new Rectangle(290, 160,
+                        180, 25));
+        /* missing_speedlimit type */
+        filterTypes[6] = new FilterCheckBox(BugType.OTHER.getKey(),
+                new Rectangle(110, 195, 20, 25), "dialogs/other.png",
+                BugType.OTHER.getValue(), new Rectangle(130, 195, 150, 25));
+        /* other type */
+        filterTypes[7] = new FilterCheckBox(BugType.ONEWAY_ROAD.getKey(),
+                new Rectangle(270, 195, 20, 25), "dialogs/oneway_road.png",
+                BugType.ONEWAY_ROAD.getValue(), new Rectangle(290, 195, 180, 25));
+
+        if (prevFilter != null && prevFilter.getTypes() != null) {
+            for (FilterCheckBox filter : filterTypes) {
+                if (prevFilter.getTypes().contains(filter.getId())) {
+                    filter.getChbFilter().setSelected(true);
+                }
+            }
+        }
+    }
+
+    /**
+     * Returns the list of selected status filter values.
+     *
+     * @return a list of <code>Integer</code> values, representing the selected
+     * status filter IDs
+     */
+    public List<Integer> getCheckedStatuses() {
+        List<Integer> statusList = new ArrayList<>();
+        for (FilterCheckBox filter : filterStatuses) {
+            if (filter.getChbFilter().isSelected()) {
+                statusList.add((Integer) filter.getId());
+            }
+        }
+        return statusList;
+    }
+
+    /**
+     * Returns the list of selected type filter values.
+     *
+     * @return a list of <code>String</code> values, representing the selected
+     * type filter values
+     */
+    public List<String> getCheckedTypes() {
+        List<String> typeList = new ArrayList<>();
+        for (FilterCheckBox filter : filterTypes) {
+            if (filter.getChbFilter().isSelected()) {
+                typeList.add((String) filter.getId());
+            }
+        }
+        return typeList;
+    }
+
+    /**
+     * Verifies if the description filter is selected or not.
+     *
+     * @return true if the description filter is selected false if the
+     * description filter is not selected
+     */
+    public boolean isDescrFilterChecked() {
+        if (filterDescr.getChbFilter().isSelected()) {
+            return true;
+        }
+        return false;
+    }
+
+    /**
+     * Returns the selected minimum relevance value from the relevance slider.
+     *
+     * @return A <code>MapdustRelevance</code> object
+     */
+    public MapdustRelevance getSelectedMinRelevance() {
+        int value = sliderRelevance.getLowerValue();
+        MapdustRelevance minRelevance =
+                MapdustRelevance.getMapdustRelevance(value);
+        return minRelevance;
+    }
+
+    /**
+     * Returns the selected maximum relevance value from the relevance slider.
+     *
+     * @return A <code>MapdustRelevance</code> object
+     */
+    public MapdustRelevance getSelectedMaxRelevance() {
+        int value = sliderRelevance.getUpperValue();
+        MapdustRelevance maxRelevance =
+                MapdustRelevance.getMapdustRelevance(value);
+        return maxRelevance;
+    }
+
+    /**
+     * Add the given filter to the current dialog window.
+     *
+     * @param filter The <code>FilterCheckBox</code> object
+     */
+    private void add(FilterCheckBox filter) {
+        add(filter.getChbFilter());
+        add(filter.getLblFilter());
+    }
+
+    /**
+     * Add the given array of filters to the current dialog window.
+     *
+     * @param filters The array of <code>FilterCheckBox</code> objects
+     */
+    private void add(FilterCheckBox[] filters) {
+        for (FilterCheckBox filter : filters) {
+            add(filter.getChbFilter());
+            add(filter.getLblFilter());
+        }
+    }
+
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/dialog/package-info.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/dialog/package-info.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/dialog/package-info.java	(revision 35962)
@@ -0,0 +1,5 @@
+/**
+ * Contains the MapDust GUI dialog classes. The dialog classes extends the
+ * <code>AbstractDialog</code> abstract class.
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.component.dialog;
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/model/ActionListModel.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/model/ActionListModel.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/model/ActionListModel.java	(revision 35962)
@@ -0,0 +1,91 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.component.model;
+
+
+import java.util.List;
+import javax.swing.AbstractListModel;
+import org.openstreetmap.josm.plugins.mapdust.gui.value.MapdustAction;
+
+
+/**
+ * The list model for the <code>MapdustAction</code> objects.
+ *
+ * @author Bea
+ * @version $Revision$
+ */
+public class ActionListModel extends AbstractListModel<MapdustAction> {
+
+    /** The serial version UID */
+    private static final long serialVersionUID = -4919264544683489112L;
+
+    /**
+     * The list of <code>MapdustAction</code> objects
+     */
+    private final List<MapdustAction> list;
+
+    /**
+     * Builds an empty <code>MapdustAction</code> object
+     */
+    public ActionListModel() {
+        this.list = null;
+    }
+
+    /**
+     * Builds a <code>MapdustAction</code> object based on the given argument
+     *
+     * @param list A list of <code>MapdustAction</code> objects
+     */
+    public ActionListModel(List<MapdustAction> list) {
+        this.list = list;
+    }
+
+    /**
+     * Returns the <code>MapdustAction</code> from the given position.
+     *
+     * @param index The position of the element
+     * @return <code>MapdustAction</code> from the given position
+     */
+    @Override
+    public MapdustAction getElementAt(int index) {
+        if (index >= 0 && index < list.size()) {
+            return list.get(index);
+        }
+        return null;
+    }
+
+    /**
+     * Returns the size of the list of objects.
+     *
+     * @return size
+     */
+    @Override
+    public int getSize() {
+        return (list != null ? list.size() : 0);
+    }
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/model/BugsListModel.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/model/BugsListModel.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/model/BugsListModel.java	(revision 35962)
@@ -0,0 +1,94 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.component.model;
+
+import java.util.List;
+import javax.swing.AbstractListModel;
+import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustBug;
+
+/**
+ * The list model for the <code>MapdustBug</code> objects.
+ *
+ * @author Bea
+ *
+ */
+public class BugsListModel extends AbstractListModel<MapdustBug> {
+
+    /** The serial version UID */
+    private static final long serialVersionUID = 3451277352571392219L;
+
+    /** The list of <code>MapdustBug</code> objects */
+    private final List<MapdustBug> bugs;
+
+    /**
+     * Builds a <code>BugsListModel</code> object
+     */
+    public BugsListModel() {
+        this.bugs = null;
+    }
+
+    /**
+     * Builds a <code>BugsListModel</code> object
+     *
+     * @param bugs The list of <code>MapdustBug</code> objects
+     */
+    public BugsListModel(List<MapdustBug> bugs) {
+        this.bugs = bugs;
+    }
+
+    /**
+     * Returns the <code>MapdustBug</code> from the given position.
+     *
+     * @param index The position of the element
+     * @return <code>MapdustBug</code> from the given position
+     */
+    @Override
+    public MapdustBug getElementAt(int index) {
+        if (index >= 0 && index < bugs.size()) {
+            return bugs.get(index);
+        }
+        return null;
+    }
+
+    /**
+     * Returns the size of the list of objects.
+     *
+     * @return size
+     */
+    @Override
+    public int getSize() {
+        return (bugs != null ? bugs.size() : 0);
+    }
+
+    /**
+     * Updates the bugs list model.
+     */
+    public void update() {
+        this.fireContentsChanged(this, 0, bugs.size() - 1);
+    }
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/model/CommentListModel.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/model/CommentListModel.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/model/CommentListModel.java	(revision 35962)
@@ -0,0 +1,92 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.component.model;
+
+
+import javax.swing.ListModel;
+import javax.swing.event.ListDataListener;
+import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustComment;
+
+
+/**
+ * List model for <code>MapdustComment</code> objects.
+ *
+ * @author Bea
+ *
+ */
+public class CommentListModel implements ListModel<MapdustComment> {
+
+    /** The list of <code>MapdustBug</code> objects */
+    private final MapdustComment[] comments;
+
+    /**
+     * Builds a <code>BugsListModel</code> object
+     */
+    public CommentListModel() {
+        this.comments = null;
+    }
+
+    /**
+     * Builds a <code>BugsListModel</code> object
+     *
+     * @param comments The array of comments
+     */
+    public CommentListModel(MapdustComment[] comments) {
+        this.comments = comments;
+    }
+
+    /**
+     * Returns the <code>MapdustComment</code> from the given position.
+     *
+     * @param index The position of the element
+     * @return <code>MapdustComment</code> from the given position
+     */
+    @Override
+    public MapdustComment getElementAt(int index) {
+        if (index > 0 && index < comments.length) {
+            return comments[index];
+        }
+        return null;
+    }
+
+    /**
+     * Returns the size of the list of objects.
+     *
+     * @return size
+     */
+    @Override
+    public int getSize() {
+        return (comments != null ? comments.length : 0);
+    }
+
+    @Override
+    public void removeListDataListener(ListDataListener l) {}
+
+    @Override
+    public void addListDataListener(ListDataListener l) {}
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/model/TypesListModel.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/model/TypesListModel.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/model/TypesListModel.java	(revision 35962)
@@ -0,0 +1,98 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.component.model;
+
+import javax.swing.AbstractListModel;
+import javax.swing.ComboBoxModel;
+import org.openstreetmap.josm.plugins.mapdust.service.value.BugType;
+
+/**
+ * The combo box model for the bug <code>BugType</code>s.
+ *
+ * @author Bea
+ * @version $Revision$
+ */
+public class TypesListModel extends AbstractListModel<BugType> implements ComboBoxModel<BugType> {
+
+    /** The serial version UID */
+    private static final long serialVersionUID = 4005728061902494996L;
+
+    /** The array of types */
+    private final BugType[] types;
+
+    /** The selected type */
+    private BugType selection = null;
+
+    /**
+     * Builds a <code>TypesListModel</code> object
+     */
+    public TypesListModel() {
+        this.types = BugType.getTypes();
+    }
+
+    /**
+     * Returns the <code>BugType</code> from the given position.
+     *
+     * @param index The position of the element
+     * @return <code>BugType</code> from the given position
+     */
+    @Override
+    public BugType getElementAt(int index) {
+        return types[index];
+    }
+
+    /**
+     * Returns the size of the list of objects.
+     *
+     * @return size
+     */
+    @Override
+    public int getSize() {
+        return types.length;
+    }
+
+    /**
+     * Returns the selected <code>BugType</code> object.
+     *
+     * @return selected item
+     */
+    @Override
+    public Object getSelectedItem() {
+        return selection;
+    }
+
+    /**
+     * Sets the selected <code>BugType</code> object.
+     *
+     * @param anItem The selected item
+     */
+    @Override
+    public void setSelectedItem(Object anItem) {
+        selection = (BugType) anItem;
+    }
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/model/package-info.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/model/package-info.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/model/package-info.java	(revision 35962)
@@ -0,0 +1,5 @@
+/**
+ * Contains the <code>ListModel</code> classes used for building customized
+ * list and combo box GUI elements for the MapDust plugin.
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.component.model;
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/package-info.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/package-info.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/package-info.java	(revision 35962)
@@ -0,0 +1,4 @@
+/**
+ * Contains the components of the GUI.
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.component;
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/panel/MapdustActionPanel.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/panel/MapdustActionPanel.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/panel/MapdustActionPanel.java	(revision 35962)
@@ -0,0 +1,130 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.component.panel;
+
+import static org.openstreetmap.josm.tools.I18n.tr;
+
+import java.awt.BorderLayout;
+import java.util.List;
+
+import javax.swing.AbstractAction;
+import javax.swing.JList;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JToggleButton;
+
+import org.openstreetmap.josm.plugins.mapdust.MapdustPlugin;
+import org.openstreetmap.josm.plugins.mapdust.gui.action.execute.ExecuteActionList;
+import org.openstreetmap.josm.plugins.mapdust.gui.component.model.ActionListModel;
+import org.openstreetmap.josm.plugins.mapdust.gui.component.util.ComponentUtil;
+import org.openstreetmap.josm.plugins.mapdust.gui.value.MapdustAction;
+
+/**
+ * Defines a JPanel for the <code>MapdustAction</code> object.
+ *
+ * @author Bea
+ *
+ */
+public class MapdustActionPanel extends JPanel {
+
+    /** The scroll pane */
+    private JScrollPane cmpActionList;
+
+    /** The JList containing the MapDust action objects */
+    private JList<MapdustAction> actionJList;
+
+    /** The list of <code>MapdustAction</code> objects */
+    private List<MapdustAction> actionList;
+
+    /**
+     * Builds a <code>MapdustActionPanel</code> object based on the given
+     * arguments.
+     *
+     * @param actionList The list of <code>MapdustAction</code> objects
+     * @param name The name of the panel
+     * @param mapdustPlugin The <code>MapdustPlugin</code> object
+     */
+    public MapdustActionPanel(List<MapdustAction> actionList, String name,
+            MapdustPlugin mapdustPlugin) {
+        this.actionList = actionList;
+        setLayout(new BorderLayout());
+        addComponents(actionList, mapdustPlugin);
+        setName(tr(name));
+    }
+
+    /**
+     * Creates and adds the components to the MapdustAction panel.
+     *
+     * @param list The list of <code>MapdustAction</code> objects
+     * @param mapdustPlugin The <code>MapdustPlugin</code> object
+     */
+    private void addComponents(List<MapdustAction> list, MapdustPlugin mapdustPlugin) {
+        /* create components */
+        AbstractAction action = new ExecuteActionList(mapdustPlugin.getMapdustGUI());
+        JToggleButton btnUpload = ComponentUtil.createJButton("Upload list data",
+                null, null, action);
+        ((ExecuteActionList) action).addObserver(mapdustPlugin);
+        if (cmpActionList == null) {
+            actionJList = ComponentUtil.createJList(list);
+            cmpActionList = ComponentUtil.createJScrollPane(actionJList);
+        }
+        add(cmpActionList, BorderLayout.CENTER);
+        add(btnUpload, BorderLayout.SOUTH);
+    }
+
+    /**
+     * Updates the <code>MapdustActionPanel</code> with the given list of
+     * <code>MapdustAction</code>s.
+     *
+     * @param actionList The list of <code>MapdustAction</code> objects
+     */
+    public void updateComponents(List<MapdustAction> actionList) {
+        setActionList(actionList);
+        actionJList.setModel(new ActionListModel(actionList));
+        cmpActionList.getViewport().setView(actionJList);
+        cmpActionList.invalidate();
+    }
+
+    /**
+     * Returns the list of <code>MapdustAction</code>s
+     *
+     * @return the actionList
+     */
+    public List<MapdustAction> getActionList() {
+        return actionList;
+    }
+
+    /**
+     * Sets the list of <code>MapdustAction</code>s
+     *
+     * @param actionList the actionList to set
+     */
+    public void setActionList(List<MapdustAction> actionList) {
+        this.actionList = actionList;
+    }
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/panel/MapdustAddressPanel.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/panel/MapdustAddressPanel.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/panel/MapdustAddressPanel.java	(revision 35962)
@@ -0,0 +1,130 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.component.panel;
+
+
+import java.awt.Color;
+import java.awt.Font;
+import java.awt.GridLayout;
+
+import javax.swing.JPanel;
+
+import org.openstreetmap.josm.data.coor.LatLon;
+import org.openstreetmap.josm.plugins.mapdust.gui.component.util.ComponentUtil;
+import org.openstreetmap.josm.plugins.mapdust.service.value.Address;
+
+
+/**
+ * Defines the JPanel for displaying the address of the <code>MapdustBug</code>
+ * object.
+ *
+ * @author Bea
+ *
+ */
+public class MapdustAddressPanel extends JPanel {
+
+    /** The serial version UID */
+    private static final long serialVersionUID = 8388870946800544374L;
+
+    /**
+     * Builds a new <code>MapdustBugDetailsPanel</code> object.
+     *
+     * @param address The address of the MapDust bug
+     * @param coordinates The coordinates of the MapDust bug
+     */
+    public MapdustAddressPanel(Address address, LatLon coordinates) {
+        setLayout(new GridLayout(8, 1));
+        setBackground(Color.white);
+        addComponents(address, coordinates);
+    }
+
+    /**
+     * Updates the components of the <code>MapdustAddressPanel</code> based on
+     * the given parameters.
+     *
+     * @param address The <code>Address</code> of a MapDust bug
+     * @param coordinates The <code>LatLon</code> of a MapDust bug
+     */
+    public void updateComponents(Address address, LatLon coordinates) {
+        removeAll();
+        addComponents(address, coordinates);
+    }
+
+    /**
+     * Creates the components of the panel, and adds to the parent panel.
+     *
+     * @param address The address of the <code>MapdustBug</code> object
+     * @param coordinates The coordinate of the <code>MapdustBug</code> object
+     */
+    private void addComponents(Address address, LatLon coordinates) {
+        /* the font of the label and label value */
+        Font fontLabel = new Font("Times New Roman", Font.BOLD, 12);
+        Font fontLabelVal = new Font("Times New Roman", Font.PLAIN, 12);
+
+        /* country */
+        add(ComponentUtil.createJLabel("Country: ", fontLabel, null, null));
+        String country = address != null ? address.getCountryCode() : "";
+        add(ComponentUtil.createJLabel(country, fontLabelVal, null, null));
+
+        /* label */
+        add(ComponentUtil.createJLabel("City: ", fontLabel, null, null));
+        String city = address != null ? address.getCity() : "";
+        add(ComponentUtil.createJLabel(city, fontLabelVal, null, null));
+
+        /* statecode */
+        add(ComponentUtil.createJLabel("State code: ", fontLabel, null, null));
+        String state = address != null ? address.getStateCode() : "";
+        add(ComponentUtil.createJLabel(state, fontLabelVal, null, null));
+
+        /* label */
+        add(ComponentUtil.createJLabel("Zip code: ", fontLabel, null, null));
+        String zip = address != null ? address.getZipCode() : "";
+        add(ComponentUtil.createJLabel(zip, fontLabelVal, null, null));
+
+        /* street name */
+        add(ComponentUtil.createJLabel("Street: ", fontLabel, null, null));
+        String street = address != null ? address.getStreetName() : "";
+        add(ComponentUtil.createJLabel(street, fontLabelVal, null, null));
+
+        /* house number */
+        add(ComponentUtil.createJLabel("House number: ", fontLabel, null, null));
+        String houseNr = address != null ? address.getHouseNumber() : "";
+        add(ComponentUtil.createJLabel(houseNr, fontLabelVal, null, null));
+
+        /* latitude */
+        add(ComponentUtil.createJLabel("Latitude: ", fontLabel, null, null));
+        String lat = coordinates != null ? ("" + coordinates.lat()) : "";
+        add(ComponentUtil.createJLabel(lat, fontLabelVal, null, null));
+
+        /* longitude */
+        add(ComponentUtil.createJLabel("Longitude: ", fontLabel, null, null));
+        String lon = coordinates != null ? ("" + coordinates.lon()) : "";
+        add(ComponentUtil.createJLabel(lon, fontLabelVal, null, null));
+    }
+
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/panel/MapdustBugDetailsPanel.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/panel/MapdustBugDetailsPanel.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/panel/MapdustBugDetailsPanel.java	(revision 35962)
@@ -0,0 +1,213 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.component.panel;
+
+
+import static org.openstreetmap.josm.tools.I18n.tr;
+
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Font;
+import java.awt.GridLayout;
+import java.net.URI;
+import java.text.DateFormat;
+import java.util.Locale;
+
+import javax.swing.JEditorPane;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.event.HyperlinkEvent;
+import javax.swing.event.HyperlinkListener;
+import javax.swing.text.html.HTMLEditorKit;
+
+import org.openstreetmap.josm.gui.MainApplication;
+import org.openstreetmap.josm.plugins.mapdust.gui.component.util.ComponentUtil;
+import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustBug;
+import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustRelevance;
+import org.openstreetmap.josm.plugins.mapdust.util.Configuration;
+import org.openstreetmap.josm.tools.OpenBrowser;
+
+
+/**
+ * Defines the JPanel for the <code>MapdustBug</code> object details.
+ *
+ * @author Bea
+ */
+public class MapdustBugDetailsPanel extends JPanel implements HyperlinkListener {
+
+    /** The serial version UID */
+    private static final long serialVersionUID = 65974543949362926L;
+
+    /** The <code>MapdustBug</code> object */
+    private MapdustBug bug;
+
+    /**
+     * Builds a new <code>MapdustBugDetailsPanel</code> object.
+     *
+     * @param bug The <code>MapdustBug</code> object
+     */
+    public MapdustBugDetailsPanel(MapdustBug bug) {
+        this.bug = bug;
+        setLayout(new GridLayout(8, 2));
+        addComponents();
+        setBackground(Color.white);
+    }
+
+    /**
+     * Updates the components of the <code>MapdustBugDetailsPanel</code> based
+     * on the given parameter.
+     *
+     * @param bug The <code>MapdustBug</code>
+     */
+    public void updateComponents(MapdustBug bug) {
+        this.bug = bug;
+        removeAll();
+        addComponents();
+    }
+
+    /**
+     * Add the components to the panel.
+     */
+    private void addComponents() {
+        /* the font of the label and label value */
+        Font fontLabel = new Font("Times New Roman", Font.BOLD, 12);
+        Font fontLabelVal = new Font("Times New Roman", Font.PLAIN, 12);
+        /* date formatter */
+        DateFormat df = DateFormat.getDateInstance(DateFormat.DEFAULT,
+                Locale.getDefault());
+
+        /* the id */
+        add(ComponentUtil.createJLabel("Id: ", fontLabel, null, null));
+        String idStr = bug != null ? bug.getId().toString() : "";
+        String txt = "<html>";
+        txt += "<font style='font-size:10px' face='Times New Roman'>";
+        txt += "<a href='' target='_blank'>" + idStr + "</a>";
+        txt += "</font></html>";
+        JEditorPane txtId = new JEditorPane("text/html", "");
+        txtId.setEditorKit(new HTMLEditorKit());
+        txtId.setEditable(false);
+        txtId.setText(txt);
+        txtId.setPreferredSize(new Dimension(100, 20));
+        txtId.addHyperlinkListener(this);
+        add(txtId);
+
+        /* the type */
+        add(ComponentUtil.createJLabel("Type: ", fontLabel, null, null));
+        String typeStr = bug != null ? bug.getType().getValue() : "";
+        add(ComponentUtil.createJLabel(typeStr, fontLabelVal, null, null));
+
+        /* the status */
+        add(ComponentUtil.createJLabel("Status: ", fontLabel, null, null));
+        String statusStr = bug != null ? bug.getStatus().getValue() : "";
+        add(ComponentUtil.createJLabel(statusStr, fontLabelVal, null, null));
+
+        /* the relevance */
+        add(ComponentUtil.createJLabel("Relevance: ", fontLabel, null, null));
+        Color color = getRelevanceValueColor(bug);
+        String relevanceStr = bug != null ? bug.getRelevance().getName() : "";
+        add(ComponentUtil.createJLabel(relevanceStr, fontLabel, null, color));
+
+        /* the source */
+        add(ComponentUtil.createJLabel("Source: ", fontLabel, null, null));
+        String sourceStr = bug != null ? bug.getSource() : "";
+        add(ComponentUtil.createJLabel(sourceStr, fontLabelVal, null, null));
+
+        /* the nickname */
+        add(ComponentUtil.createJLabel("Created by: ", fontLabel, null, null));
+        String nicknameStr = bug != null ? bug.getNickname() : "";
+        add(ComponentUtil.createJLabel(nicknameStr, fontLabelVal, null, null));
+
+        /* the date created */
+        add(ComponentUtil.createJLabel("Date created: ", fontLabel, null, null));
+        String dateCreatedStr = bug != null ? df.format(bug.getDateCreated())
+                : "";
+        add(ComponentUtil.createJLabel(dateCreatedStr, fontLabelVal, null,
+                null));
+
+        /* the date updated */
+        add(ComponentUtil.createJLabel("Date updated: ", fontLabel, null, null));
+        String dateUpdatedStr = bug != null ? df.format(bug.getDateUpdated())
+                : "";
+        add(ComponentUtil.createJLabel(dateUpdatedStr, fontLabelVal, null,
+                null));
+    }
+
+    @Override
+    public void hyperlinkUpdate(HyperlinkEvent event) {
+        if (event.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
+            String bugDetailsUrl = null;
+            if (bug != null) {
+                String mapdustSite = Configuration.getInstance().getMapdustBugDetailsUrl();
+                bugDetailsUrl = mapdustSite + bug.getId().toString();
+            }
+            if (bugDetailsUrl != null) {
+                try {
+                    OpenBrowser.displayUrl(new URI(bugDetailsUrl));
+                } catch (Exception e) {
+                    String errorMessage = "Error opening the MapDust bug ";
+                    errorMessage += "details page";
+                    JOptionPane.showMessageDialog(MainApplication.getMainFrame(),
+                            tr(errorMessage), tr("Error"),
+                            JOptionPane.ERROR_MESSAGE);
+                }
+            }
+
+        }
+    }
+
+    /**
+     * Returns a <code>Color</code> object based on the <code>MapdustBug</code>
+     * relevance level. If the <code>MapdustBug</code> is null, then the
+     * returned color will be black.
+     *
+     * @param bug The <code>MapdustBug</code> object
+     * @return The corresponding <code>Color</code>
+     */
+    private Color getRelevanceValueColor(MapdustBug bug) {
+        Color color = Color.BLACK;
+        if (bug != null) {
+            if (bug.getRelevance().equals(MapdustRelevance.LOW)) {
+                color = Color.RED.brighter();
+            }
+            if (bug.getRelevance().equals(MapdustRelevance.MID_LOW)) {
+                color = Color.RED.darker();
+            }
+            if (bug.getRelevance().equals(MapdustRelevance.MEDIUM)) {
+                color = Color.ORANGE;
+            }
+            if (bug.getRelevance().equals(MapdustRelevance.MID_HIGH)) {
+                color = Color.GREEN;
+            }
+            if (bug.getRelevance().equals(MapdustRelevance.HIGH)) {
+                color = Color.GREEN.darker().darker();
+            }
+        }
+        return color;
+    }
+
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/panel/MapdustBugListPanel.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/panel/MapdustBugListPanel.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/panel/MapdustBugListPanel.java	(revision 35962)
@@ -0,0 +1,459 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.component.panel;
+
+
+import java.awt.BorderLayout;
+import java.awt.Color;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.swing.JList;
+import javax.swing.JMenuItem;
+import javax.swing.JPanel;
+import javax.swing.JPopupMenu;
+import javax.swing.JScrollPane;
+import javax.swing.border.LineBorder;
+import javax.swing.event.ListSelectionEvent;
+import javax.swing.event.ListSelectionListener;
+
+import org.openstreetmap.josm.gui.MainApplication;
+import org.openstreetmap.josm.plugins.mapdust.MapdustPlugin;
+import org.openstreetmap.josm.plugins.mapdust.gui.MapdustGUI;
+import org.openstreetmap.josm.plugins.mapdust.gui.action.adapter.DisplayMenu;
+import org.openstreetmap.josm.plugins.mapdust.gui.action.show.MapdustShowAction;
+import org.openstreetmap.josm.plugins.mapdust.gui.action.show.ShowCloseBugAction;
+import org.openstreetmap.josm.plugins.mapdust.gui.action.show.ShowCommentBugAction;
+import org.openstreetmap.josm.plugins.mapdust.gui.action.show.ShowInvalidateBugAction;
+import org.openstreetmap.josm.plugins.mapdust.gui.action.show.ShowReOpenBugAction;
+import org.openstreetmap.josm.plugins.mapdust.gui.component.model.BugsListModel;
+import org.openstreetmap.josm.plugins.mapdust.gui.component.renderer.BugListCellRenderer;
+import org.openstreetmap.josm.plugins.mapdust.gui.component.util.ComponentUtil;
+import org.openstreetmap.josm.plugins.mapdust.gui.observer.MapdustBugDetailsObservable;
+import org.openstreetmap.josm.plugins.mapdust.gui.observer.MapdustBugDetailsObserver;
+import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustBug;
+import org.openstreetmap.josm.spi.preferences.Config;
+
+
+/**
+ * Defines the components of the MapDust bug list panel.
+ *
+ * @author Bea
+ * @version $Revision$
+ */
+public class MapdustBugListPanel extends JPanel implements
+        ListSelectionListener, MapdustBugDetailsObservable {
+
+    /** The serial version UID */
+    private static final long serialVersionUID = -675120506597637085L;
+
+    /** The list of observers */
+    private final ArrayList<MapdustBugDetailsObserver> observers =
+            new ArrayList<>();
+
+    /** The list of <code>MapdustBug</code> objects */
+    private List<MapdustBug> mapdustBugsList;
+
+    /** The list of bugs */
+    private JList<MapdustBug> mapdustBugsJList;
+
+    /** The scroll pane for the <code>MapdustBug</code>s */
+    private JScrollPane cmpMapdustBugs;
+
+    /** The button panel */
+    private MapdustButtonPanel btnPanel;
+
+    /** The <code>MapdustGUI</code> */
+    private MapdustGUI mapdustGUI;
+
+    /** The pop-up menu */
+    private JPopupMenu menu;
+
+    /** The add comment menu item */
+    private JMenuItem menuAddComment;
+
+    /** The fixed menu item */
+    private JMenuItem menuFixed;
+
+    /** The invalidate menu item */
+    private JMenuItem menuInvalidate;
+
+    /** The re-open menu item */
+    private JMenuItem menuReopen;
+
+    /**
+     * Builds a <code>MapdustPlugin</code> object
+     */
+    public MapdustBugListPanel() {}
+
+    /**
+     * Builds a <code>MapdustPlugin</code> object with the given parameters.
+     *
+     * @param mapdustBugsList The list of <code>MapdustBug</code> objects
+     * @param name The name of the panel
+     * @param mapdustPlugin The <code>MapdustPlugin</code> object
+     */
+    public MapdustBugListPanel(List<MapdustBug> mapdustBugsList, String name,
+            MapdustPlugin mapdustPlugin) {
+        this.mapdustGUI = mapdustPlugin.getMapdustGUI();
+        this.mapdustBugsList = mapdustBugsList;
+        setLayout(new BorderLayout(5, 10));
+        addComponents(mapdustPlugin);
+        setName(name);
+    }
+
+    /**
+     * Adds the components to the MapDust panel.
+     *
+     * @param mapdustPlugin The <code>MapdustPlugin</code> object
+     */
+    private void addComponents(MapdustPlugin mapdustPlugin) {
+        /* create components */
+        if (btnPanel == null) {
+            btnPanel = new MapdustButtonPanel(mapdustPlugin);
+        }
+        if (menu == null) {
+            menu = new JPopupMenu();
+            /* add comment item */
+            MapdustShowAction action = new ShowCommentBugAction(mapdustPlugin);
+            menuAddComment = ComponentUtil.createJMenuItem(action,
+                    "Add comment/additional info", "dialogs/comment.png");
+            menu.add(menuAddComment);
+            /* fix bug item */
+            action = new ShowCloseBugAction(mapdustPlugin);
+            menuFixed = ComponentUtil.createJMenuItem(action, "Mark as fixed",
+                    "dialogs/fixed.png");
+            menu.add(menuFixed);
+            /* invalidate bug item */
+            action = new ShowInvalidateBugAction(mapdustPlugin);
+            menuInvalidate = ComponentUtil.createJMenuItem(action,
+                    "Non-reproducible/Software bug", "dialogs/invalid.png");
+            menu.add(menuInvalidate);
+            /* re-open bug item */
+            action = new ShowReOpenBugAction(mapdustPlugin);
+            menuReopen = ComponentUtil.createJMenuItem(action, "Reopen bug",
+                    "dialogs/reopen.png");
+            menu.add(menuReopen);
+        }
+        /* create bugs list */
+        if (mapdustBugsList == null || mapdustBugsList.isEmpty()) {
+            String text = " No bugs in the current view for the selected";
+            text += " filters!";
+            JList<String> textJList = new JList<>(new String[] {text});
+            textJList.setBorder(new LineBorder(Color.black, 1, false));
+            textJList.setCellRenderer(new BugListCellRenderer());
+            cmpMapdustBugs = ComponentUtil.createJScrollPane(textJList);
+            add(cmpMapdustBugs, BorderLayout.CENTER);
+        } else {
+            mapdustBugsJList = ComponentUtil.createJList(mapdustBugsList, menu);
+            mapdustBugsJList.addListSelectionListener(this);
+            DisplayMenu adapter = new DisplayMenu(mapdustBugsJList, menu);
+            mapdustBugsJList.addMouseListener(adapter);
+            cmpMapdustBugs = ComponentUtil.createJScrollPane(mapdustBugsJList);
+            add(cmpMapdustBugs, BorderLayout.CENTER);
+        }
+        /* add button panel */
+        add(btnPanel, BorderLayout.SOUTH);
+    }
+
+    /**
+     * Updates the <code>MapdustPanel</code> with the new list of
+     * <code>MapdustBug</code>s. If the list is null or empty an appropriate
+     * message will be displayed on the list.
+     *
+     * @param mapdustBugsList The list of <code>MapdustBug</code>s
+     */
+    public synchronized void updateComponents(List<MapdustBug> mapdustBugsList) {
+        this.mapdustBugsList = mapdustBugsList;
+        if (mapdustBugsList == null || mapdustBugsList.isEmpty()) {
+            String text = " No bugs in the current view for the selected";
+            text += " filters!";
+            JList<String> textJList = new JList<>(new String[] {text});
+            textJList.setBorder(new LineBorder(Color.black, 1, false));
+            textJList.setCellRenderer(new BugListCellRenderer());
+            cmpMapdustBugs.getViewport().setView(textJList);
+        } else {
+            if (mapdustBugsJList == null) {
+                mapdustBugsJList = ComponentUtil.createJList(mapdustBugsList, menu);
+                mapdustBugsJList.addListSelectionListener(this);
+                DisplayMenu adapter = new DisplayMenu(mapdustBugsJList, menu);
+                mapdustBugsJList.addMouseListener(adapter);
+            } else {
+                mapdustBugsJList.setModel(new BugsListModel(mapdustBugsList));
+            }
+            cmpMapdustBugs.getViewport().setView(mapdustBugsJList);
+        }
+    }
+
+    /**
+     * Listens to the <code>ListSelectionEvent</code>s and modifies the buttons
+     * and menu items depending on the status of the <code>MapdustBug</code>
+     * object.
+     *
+     * @param event The <code>ListSelectionEvent</code> object
+     */
+    @Override
+    public synchronized void valueChanged(ListSelectionEvent event) {
+        if (!event.getValueIsAdjusting()) {
+            MapdustBug selectedBug =
+                    (MapdustBug) mapdustBugsJList.getSelectedValue();
+            if (selectedBug != null) {
+                Config.getPref().put("selectedBug.status", selectedBug.getStatus()
+                        .getValue());
+                if (selectedBug.getStatus().getKey().equals(1)) {
+                    /* status open */
+                    btnPanel.getBtnAddComment().setEnabled(true);
+                    btnPanel.getBtnReOpenBugReport().setEnabled(false);
+                    btnPanel.getBtnInvalidateBugReport().setEnabled(true);
+                    btnPanel.getBtnFixBugReport().setEnabled(true);
+                    getMenuReopen().setEnabled(false);
+                    getMenuInvalidate().setEnabled(true);
+                    getMenuFixed().setEnabled(true);
+                }
+                if (selectedBug.getStatus().getKey().equals(2)) {
+                    /* status fixed */
+                    btnPanel.getBtnAddComment().setEnabled(true);
+                    btnPanel.getBtnReOpenBugReport().setEnabled(true);
+                    btnPanel.getBtnInvalidateBugReport().setEnabled(false);
+                    btnPanel.getBtnFixBugReport().setEnabled(false);
+                    getMenuReopen().setEnabled(true);
+                    getMenuInvalidate().setEnabled(false);
+                    getMenuFixed().setEnabled(false);
+                }
+                if (selectedBug.getStatus().getKey().equals(3)) {
+                    /* status invalid */
+                    btnPanel.getBtnAddComment().setEnabled(true);
+                    btnPanel.getBtnReOpenBugReport().setEnabled(true);
+                    btnPanel.getBtnInvalidateBugReport().setEnabled(false);
+                    btnPanel.getBtnFixBugReport().setEnabled(false);
+                    getMenuReopen().setEnabled(true);
+                    getMenuInvalidate().setEnabled(false);
+                    getMenuFixed().setEnabled(false);
+                }
+                btnPanel.getBtnAddComment().setSelected(false);
+                btnPanel.getBtnReOpenBugReport().setSelected(false);
+                btnPanel.getBtnFixBugReport().setSelected(false);
+                btnPanel.getBtnInvalidateBugReport().setSelected(false);
+                notifyObservers(selectedBug);
+            } else {
+                btnPanel.getBtnWorkOffline().setSelected(false);
+                btnPanel.getBtnWorkOffline().setFocusable(false);
+                btnPanel.getBtnRefresh().setSelected(false);
+                btnPanel.getBtnRefresh().setFocusable(false);
+                btnPanel.getBtnFilter().setSelected(false);
+                btnPanel.getBtnFilter().setFocusable(false);
+                btnPanel.getBtnAddComment().setEnabled(false);
+                btnPanel.getBtnFixBugReport().setEnabled(false);
+                btnPanel.getBtnInvalidateBugReport().setEnabled(false);
+                btnPanel.getBtnReOpenBugReport().setEnabled(false);
+            }
+            /* re-paint */
+            MainApplication.getMap().mapView.repaint();
+            mapdustGUI.repaint();
+        } else {
+            return;
+        }
+    }
+
+    /**
+     * Returns the selected bug from the list of MapDust bugs.
+     *
+     * @return a <code>MapdustBug</code> object
+     */
+    public MapdustBug getSelectedBug() {
+        MapdustBug selectedBug = null;
+        if (getMapdustBugsJList() != null) {
+            selectedBug = (MapdustBug) getMapdustBugsJList().getSelectedValue();
+        }
+        return selectedBug;
+    }
+
+    /**
+     * Sets the <code>MapdustBug</code> which will be selected from the list of
+     * MapDust bug.
+     *
+     * @param mapdustBug The <code>MapdustBug</code> object
+     */
+    public void setSelectedBug(MapdustBug mapdustBug) {
+        mapdustBugsJList.setSelectedValue(mapdustBug, false);
+        int index = mapdustBugsJList.getSelectedIndex();
+        mapdustBugsJList.ensureIndexIsVisible(index);
+    }
+
+    /**
+     * Selects the <code>MapdustBug</code> at the given index.
+     *
+     * @param index The index of the <code>MapdustBug</code>
+     */
+    public void resetSelectedBug(int index) {
+        if (mapdustBugsJList != null) {
+            mapdustBugsJList.setSelectedIndex(index);
+        }
+    }
+
+    /**
+     * Returns the selected <code>MapdustBug</code> object index.
+     *
+     * @return index
+     */
+    public int getSelectedBugIndex() {
+        return mapdustBugsJList.getSelectedIndex();
+    }
+
+    /**
+     * Disables the buttons from the <code>MapdustButtonPanel</code>.
+     */
+    public void disableBtnPanel() {
+        btnPanel.disableComponents();
+    }
+
+    /**
+     * Enables the basic components from the <code>MapdustButtonPanel</code>.
+     * Basic components are considered the following buttons: work offline,
+     * filter bug report, and refresh.If the onlyBasic flag is true then the
+     * other buttons will be disabled.
+     *
+     * @param onlyBasic If true then the not basic buttons will be disabled
+     */
+    public void enableBtnPanel(boolean onlyBasic) {
+        btnPanel.enableBasicComponents(onlyBasic);
+    }
+
+    /**
+     * Returns the list of bugs
+     *
+     * @return the listBugs
+     */
+    public JList<MapdustBug> getMapdustBugsJList() {
+        return mapdustBugsJList;
+    }
+
+    /**
+     * Return the menu
+     *
+     * @return the menu
+     */
+    public JPopupMenu getMenu() {
+        return menu;
+    }
+
+    /**
+     * Returns the button panel
+     *
+     * @return the btnPanel
+     */
+    public MapdustButtonPanel getBtnPanel() {
+        return btnPanel;
+    }
+
+    /**
+     * Returns the 'add comment' menu item
+     *
+     * @return the menuAddComment
+     */
+    public JMenuItem getMenuAddComment() {
+        return menuAddComment;
+    }
+
+    /**
+     * Returns the 'fixed' menu item
+     *
+     * @return the menuFixed
+     */
+    public JMenuItem getMenuFixed() {
+        return menuFixed;
+    }
+
+    /**
+     * Returns the 'invalidate' menu item
+     *
+     * @return the menuInvalidate
+     */
+    public JMenuItem getMenuInvalidate() {
+        return menuInvalidate;
+    }
+
+    /**
+     * Returns the 're-open' menu item
+     *
+     * @return the menuReopen
+     */
+    public JMenuItem getMenuReopen() {
+        return menuReopen;
+    }
+
+    /**
+     * Returns the list of <code>MapdustBug</code> objects
+     *
+     * @return the mapdustBugsList
+     */
+    public List<MapdustBug> getMapdustBugsList() {
+        return mapdustBugsList;
+    }
+
+    /**
+     * Adds a new MapDust bug details observer to the list of observers.
+     *
+     * @param observer The <code>MapdustBugDetailsObserver</code> object
+     */
+    @Override
+    public void addObserver(MapdustBugDetailsObserver observer) {
+        if (!this.observers.contains(observer)) {
+            this.observers.add(observer);
+        }
+    }
+
+    /**
+     * Removes the given MapDust bug details observer from the list of
+     * observers.
+     *
+     * @param observer The <code>MapdustBugDetailsObserver</code> object
+     */
+    @Override
+    public void removeObserver(MapdustBugDetailsObserver observer) {
+        this.observers.remove(observer);
+
+    }
+
+    /**
+     * Notifies the MapDust bug details observers observing the given
+     * <code>MapdustBug</code> object.
+     *
+     * @param mapdustBug The <code>MapdustBug</code> object
+     */
+    @Override
+    public void notifyObservers(MapdustBug mapdustBug) {
+        Iterator<MapdustBugDetailsObserver> elements =
+                this.observers.iterator();
+        while (elements.hasNext()) {
+            elements.next().showDetails(mapdustBug);
+        }
+    }
+
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/panel/MapdustBugPropertiesPanel.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/panel/MapdustBugPropertiesPanel.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/panel/MapdustBugPropertiesPanel.java	(revision 35962)
@@ -0,0 +1,230 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.component.panel;
+
+
+import static org.openstreetmap.josm.tools.I18n.tr;
+
+import java.awt.BorderLayout;
+import java.awt.Dimension;
+
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTabbedPane;
+
+import org.openstreetmap.josm.data.coor.LatLon;
+import org.openstreetmap.josm.gui.MainApplication;
+import org.openstreetmap.josm.plugins.mapdust.gui.component.util.ComponentUtil;
+import org.openstreetmap.josm.plugins.mapdust.gui.observer.MapdustBugDetailsObserver;
+import org.openstreetmap.josm.plugins.mapdust.service.MapdustServiceHandler;
+import org.openstreetmap.josm.plugins.mapdust.service.MapdustServiceHandlerException;
+import org.openstreetmap.josm.plugins.mapdust.service.value.Address;
+import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustBug;
+import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustComment;
+
+
+/**
+ * Defines the JPanel for the <code>MapdustBug</code> object properties. The
+ * MapDust bug properties panel displays detailed information about a given
+ * <code>MapdustBug</code> and it is composed by the following panels:
+ * <code>MapdustBugDetailsPanel</code>, <code>MapdustAddressPanel</code>,
+ * <code>MapdustDescriptionPanel</code>, <code>MapdustCommentsPanel</code> and
+ * <code>MapdustHelpPanel</code>.
+ *
+ * @author Bea
+ */
+public class MapdustBugPropertiesPanel extends JPanel implements
+        MapdustBugDetailsObserver {
+
+    /** The serial version UID */
+    private static final long serialVersionUID = 5320232823004570279L;
+
+    /** The <code>MapdustBugDetailsPanel</code> object */
+    private MapdustBugDetailsPanel detailsPanel;
+
+    /** The <code>MapdustAddressPanel</code> object */
+    private MapdustAddressPanel addressPanel;
+
+    /** The <code>MapdustDescriptionPanel</code> object */
+    private MapdustDescriptionPanel descriptionPanel;
+
+    /** The <code>MapdustCommentsPanel</code> object */
+    private MapdustCommentsPanel commentsPanel;
+
+    /** The <code>MapdustHelpPanel</code> object */
+    private MapdustHelpPanel helpPanel;
+
+    /** The <code>JScrollPane</code> for the address */
+    private JScrollPane cmpAddress;
+
+    /** The <code>JScrollPane</code> for the details */
+    private JScrollPane cmpDetails;
+
+    /** The main panel */
+    private JTabbedPane mainPanel;
+
+    /**
+     * Builds a <code>MapdustBugPropertiesPanel</code> object based on the given
+     * argument.
+     *
+     * @param mapdustBug The <code>MapdustBug</code> object
+     */
+    public MapdustBugPropertiesPanel(MapdustBug mapdustBug) {
+        setLayout(new BorderLayout());
+        setName("Bug Details");
+        addComponents(mapdustBug);
+
+    }
+
+    /**
+     * Displays the details of the given MapDust bug.
+     *
+     * @param mapdustBug The <code>MapdustBug</code> object
+     */
+    @Override
+    public void showDetails(MapdustBug mapdustBug) {
+        MapdustBug selectedBug = mapdustBug;
+        if (mapdustBug != null) {
+            if (mapdustBug.getNumberOfComments() > 0) {
+                Long id = mapdustBug.getId();
+                selectedBug = getBug(id);
+            }
+        }
+        int index = -1;
+        /* remove components */
+        if (mainPanel != null) {
+            index = mainPanel.getSelectedIndex();
+        }
+        /* create the panels */
+        createPanels(selectedBug);
+        if (index != -1) {
+            mainPanel.setSelectedIndex(index);
+        }
+    }
+
+    /**
+     * Creates and adds the components to the main panel.
+     *
+     * @param mapdustBug The <code>MapdustBug</code> object
+     */
+    private void addComponents(MapdustBug mapdustBug) {
+        MapdustBug selectedBug = mapdustBug;
+        if (mapdustBug != null) {
+            if (mapdustBug.getNumberOfComments() > 0) {
+                Long id = mapdustBug.getId();
+                selectedBug = getBug(id);
+            }
+        }
+        createPanels(selectedBug);
+    }
+
+    /**
+     * Creates the JPanels for displaying the <code>MapdustBug</code> details.
+     *
+     * @param mapdustBug The <code>MapdustBug</code> object
+     */
+    private void createPanels(MapdustBug mapdustBug) {
+        /* details panel */
+        if (cmpDetails == null) {
+            detailsPanel = new MapdustBugDetailsPanel(mapdustBug);
+            cmpDetails = ComponentUtil.createJScrollPane(detailsPanel,
+                    getBounds(), getBackground(), true, true);
+            cmpDetails.setPreferredSize(new Dimension(100, 100));
+            cmpDetails.setName("Bug Details");
+        } else {
+            detailsPanel.updateComponents(mapdustBug);
+        }
+        /* address panel */
+        Address address = mapdustBug != null ? mapdustBug.getAddress() : null;
+        LatLon coordinates = mapdustBug != null ? mapdustBug.getLatLon() : null;
+        if (cmpAddress == null) {
+            addressPanel = new MapdustAddressPanel(address, coordinates);
+            cmpAddress = ComponentUtil.createJScrollPane(addressPanel,
+                    getBounds(), getBackground(), true, true);
+            cmpAddress.setName("Address");
+            cmpAddress.setPreferredSize(new Dimension(100, 100));
+        } else {
+            addressPanel.updateComponents(address, coordinates);
+        }
+        /* description panel */
+        String description = mapdustBug != null ? mapdustBug.getDescription()
+                : "";
+        if (descriptionPanel == null) {
+            descriptionPanel = new MapdustDescriptionPanel(description);
+        } else {
+            descriptionPanel.updateComponents(description);
+        }
+        /* comments panel */
+        MapdustComment[] comments = mapdustBug != null ?
+                mapdustBug.getComments() : new MapdustComment[0];
+        if (commentsPanel == null) {
+            commentsPanel = new MapdustCommentsPanel(comments);
+        } else {
+            commentsPanel.updateComponents(comments);
+            mainPanel.setTitleAt(3, commentsPanel.getName());
+        }
+        /* the help panel */
+        if (helpPanel == null) {
+            helpPanel = new MapdustHelpPanel();
+        }
+        /* creates the main panel */
+        if (mainPanel == null) {
+            mainPanel = new JTabbedPane();
+            mainPanel.setIgnoreRepaint(true);
+            mainPanel.add(cmpDetails, 0);
+            mainPanel.add(cmpAddress, 1);
+            mainPanel.add(descriptionPanel, 2);
+            mainPanel.add(commentsPanel, 3);
+            mainPanel.add(helpPanel);
+            add(mainPanel, BorderLayout.CENTER);
+        } else {
+            mainPanel.revalidate();
+        }
+    }
+
+    /**
+     * Returns the bug with the given id.
+     *
+     * @param id The id of the object
+     * @return A <code>MapdustBug</code> object
+     */
+    private MapdustBug getBug(Long id) {
+        MapdustBug bug = null;
+        try {
+            bug = new MapdustServiceHandler().getBug(id, null);
+        } catch (MapdustServiceHandlerException e) {
+            String errorMessage = "There was a MapDust service error durring ";
+            errorMessage += " the MapDust bug retrieve process.";
+            JOptionPane.showMessageDialog(MainApplication.getMainFrame(), tr(errorMessage),
+                    tr("Error"), JOptionPane.ERROR_MESSAGE);
+        }
+        return bug;
+    }
+
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/panel/MapdustButtonPanel.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/panel/MapdustButtonPanel.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/panel/MapdustButtonPanel.java	(revision 35962)
@@ -0,0 +1,341 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.component.panel;
+
+
+import java.awt.GridLayout;
+
+import javax.swing.AbstractAction;
+import javax.swing.JPanel;
+import javax.swing.JToggleButton;
+
+import org.openstreetmap.josm.plugins.mapdust.MapdustPlugin;
+import org.openstreetmap.josm.plugins.mapdust.gui.action.execute.ExecuteRefresh;
+import org.openstreetmap.josm.plugins.mapdust.gui.action.execute.ExecuteWorkOffline;
+import org.openstreetmap.josm.plugins.mapdust.gui.action.show.ShowCloseBugAction;
+import org.openstreetmap.josm.plugins.mapdust.gui.action.show.ShowCommentBugAction;
+import org.openstreetmap.josm.plugins.mapdust.gui.action.show.ShowFilterBugAction;
+import org.openstreetmap.josm.plugins.mapdust.gui.action.show.ShowInvalidateBugAction;
+import org.openstreetmap.josm.plugins.mapdust.gui.action.show.ShowReOpenBugAction;
+import org.openstreetmap.josm.plugins.mapdust.gui.component.util.ComponentUtil;
+import org.openstreetmap.josm.plugins.mapdust.gui.value.MapdustPluginState;
+import org.openstreetmap.josm.spi.preferences.Config;
+
+
+/**
+ * Defines the panel of buttons for the MapDust bugs list.
+ *
+ * @author Bea
+ * @version $Revision$
+ */
+public class MapdustButtonPanel extends JPanel {
+
+    /** The serial version UID */
+    private static final long serialVersionUID = -4234650664854226973L;
+
+    /** The work off-line button */
+    private JToggleButton btnWorkOffline;
+
+    /** The filter button */
+    private JToggleButton btnFilter;
+
+    /** The add comment button */
+    private JToggleButton btnAddComment;
+
+    /** The fix bug report button */
+    private JToggleButton btnFixBugReport;
+
+    /** The invalidate bug report button */
+    private JToggleButton btnInvalidateBugReport;
+
+    /** The re-open bug report button */
+    private JToggleButton btnReOpenBugReport;
+
+    /** The refresh button */
+    private JToggleButton btnRefresh;
+
+    /**
+     * Builds a <code>MapdustButtonPanel</code> object
+     */
+    public MapdustButtonPanel() {}
+
+    /**
+     * Builds a <code>MapdustButtonPanel</code> object based on the given
+     * parameter
+     *
+     * @param mapdustPlugin The <code>MapdustPlugin</code> object
+     */
+    public MapdustButtonPanel(MapdustPlugin mapdustPlugin) {
+        setLayout(new GridLayout(1, 7));
+        addComponents(mapdustPlugin);
+    }
+
+    /**
+     * Add the components to the button panel.
+     *
+     * @param mapdustPlugin The <code>MapdustPlugin</code> object
+     */
+    private void addComponents(MapdustPlugin mapdustPlugin) {
+        /* 'Work off-line' button */
+        String text = "";
+        String imagePath = "";
+        if (btnWorkOffline == null) {
+            String pluginState = Config.getPref().get("mapdust.pluginState");
+            if (pluginState.equals(MapdustPluginState.ONLINE.getValue())) {
+                text = "Work offline mode";
+                imagePath = "dialogs/workoffline.png";
+            } else {
+                text = "Work online mode";
+                imagePath = "dialogs/online.png";
+            }
+            AbstractAction action = new ExecuteWorkOffline(
+                    mapdustPlugin.getMapdustGUI());
+            ((ExecuteWorkOffline) action).addObserver(mapdustPlugin);
+            btnWorkOffline = ComponentUtil.createJButton("Work offline", text,
+                    imagePath, action);
+            btnWorkOffline.setSelected(false);
+            btnWorkOffline.setFocusTraversalKeysEnabled(false);
+        }
+        /* 'Filter' button */
+        if (btnFilter == null) {
+            text = "Filter bug reports";
+            imagePath = "dialogs/mapdust_bug_filter.png";
+            AbstractAction action = new ShowFilterBugAction(mapdustPlugin);
+            btnFilter = ComponentUtil.createJButton(text, text, imagePath,
+                    action);
+            btnFilter.setEnabled(true);
+            btnFilter.setFocusTraversalKeysEnabled(false);
+        }
+        /* 'Add Comment' button */
+        if (btnAddComment == null) {
+            text = "Add comment/additional info";
+            imagePath = "dialogs/comment.png";
+            AbstractAction action = new ShowCommentBugAction(mapdustPlugin);
+            btnAddComment = ComponentUtil.createJButton(text, text, imagePath,
+                    action);
+            btnAddComment.setEnabled(false);
+            btnAddComment.setFocusTraversalKeysEnabled(false);
+        }
+        /* 'Fix bug report' button */
+        if (btnFixBugReport == null) {
+            text = "Mark as fixed";
+            imagePath = "dialogs/fixed.png";
+            AbstractAction action = new ShowCloseBugAction(mapdustPlugin);
+            btnFixBugReport = ComponentUtil.createJButton(text, text, imagePath,
+                    action);
+            btnFixBugReport.setEnabled(false);
+            btnFixBugReport.setFocusTraversalKeysEnabled(false);
+        }
+        /* 'Invalidate bug report' button */
+        if (btnInvalidateBugReport == null) {
+            text = "Non-reproducible/Software bug";
+            imagePath = "dialogs/invalid.png";
+            AbstractAction action = new ShowInvalidateBugAction(mapdustPlugin);
+            btnInvalidateBugReport = ComponentUtil.createJButton(text, text,
+                    imagePath, action);
+            btnInvalidateBugReport.setEnabled(false);
+            btnInvalidateBugReport.setFocusTraversalKeysEnabled(false);
+        }
+        /* 'Re-open bug report' button */
+        if (btnReOpenBugReport == null) {
+            text = "Reopen bug";
+            imagePath = "dialogs/reopen.png";
+            AbstractAction action = new ShowReOpenBugAction(mapdustPlugin);
+            btnReOpenBugReport = ComponentUtil.createJButton(text, text,
+                    imagePath, action);
+            btnReOpenBugReport.setEnabled(false);
+            btnReOpenBugReport.setFocusTraversalKeysEnabled(false);
+        }
+        /* 'Refresh' button */
+        if (btnRefresh == null) {
+            text = "Refresh";
+            imagePath = "dialogs/mapdust_refresh.png";
+            String pluginState = Config.getPref().get("mapdust.pluginState");
+            AbstractAction action = new ExecuteRefresh();
+            ((ExecuteRefresh) action).addObserver(mapdustPlugin);
+            btnRefresh = ComponentUtil.createJButton(text, text, imagePath,
+                    action);
+            if (pluginState.equals(MapdustPluginState.OFFLINE.getValue())) {
+                btnRefresh.setEnabled(false);
+            }
+            btnRefresh.setFocusTraversalKeysEnabled(false);
+        }
+
+        /* add components */
+        add(btnWorkOffline);
+        add(btnFilter);
+        add(btnAddComment);
+        add(btnFixBugReport);
+        add(btnInvalidateBugReport);
+        add(btnReOpenBugReport);
+        add(btnRefresh);
+    }
+
+    /**
+     * Disables the buttons from the <code>MapdustButtonPanel</code>.
+     */
+    public void disableComponents() {
+        if (btnWorkOffline != null) {
+            btnWorkOffline.setEnabled(false);
+            btnWorkOffline.setSelected(false);
+            btnWorkOffline.setFocusable(false);
+        }
+        if (btnFilter != null) {
+            btnFilter.setEnabled(false);
+            btnFilter.setEnabled(false);
+            btnFilter.setEnabled(false);
+        }
+        if (btnRefresh != null) {
+            btnRefresh.setEnabled(false);
+            btnRefresh.setSelected(false);
+            btnRefresh.setFocusable(false);
+        }
+        if (btnAddComment != null) {
+            btnAddComment.setEnabled(false);
+            btnAddComment.setSelected(false);
+            btnAddComment.setFocusable(false);
+        }
+        if (btnFixBugReport != null) {
+            btnFixBugReport.setEnabled(false);
+            btnFixBugReport.setSelected(false);
+            btnFixBugReport.setFocusable(false);
+        }
+        if (btnInvalidateBugReport != null) {
+            btnInvalidateBugReport.setEnabled(false);
+            btnInvalidateBugReport.setEnabled(false);
+            btnInvalidateBugReport.setEnabled(false);
+        }
+        if (btnReOpenBugReport != null) {
+            btnReOpenBugReport.setEnabled(false);
+            btnReOpenBugReport.setEnabled(false);
+            btnReOpenBugReport.setEnabled(false);
+        }
+    }
+
+    /**
+     * Enables the basic components from the <code>MapdustButtonPanel</code>.
+     * Basic components are considered the following buttons: work offline,
+     * filter bug report, and refresh.If the onlyBasic flag is true then the
+     * other buttons will be disabled.
+     *
+     * @param onlyBasic If true then the not basic buttons will be enabled
+     */
+    public void enableBasicComponents(boolean onlyBasic) {
+        btnWorkOffline.setEnabled(true);
+        btnWorkOffline.setSelected(false);
+        btnWorkOffline.setFocusable(false);
+        btnFilter.setEnabled(true);
+        btnFilter.setSelected(false);
+        btnFilter.setFocusable(false);
+        String pluginState = Config.getPref().get("mapdust.pluginState");
+        if (pluginState.equals(MapdustPluginState.ONLINE.getValue())) {
+            btnRefresh.setEnabled(true);
+        } else {
+            btnRefresh.setEnabled(false);
+        }
+
+        btnRefresh.setSelected(false);
+        btnRefresh.setFocusable(false);
+        if (onlyBasic) {
+            btnAddComment.setEnabled(false);
+            btnAddComment.setSelected(false);
+            btnAddComment.setFocusable(false);
+            btnFixBugReport.setEnabled(false);
+            btnFixBugReport.setSelected(false);
+            btnFixBugReport.setFocusable(false);
+            btnInvalidateBugReport.setEnabled(false);
+            btnInvalidateBugReport.setEnabled(false);
+            btnInvalidateBugReport.setEnabled(false);
+            btnReOpenBugReport.setEnabled(false);
+            btnReOpenBugReport.setEnabled(false);
+            btnReOpenBugReport.setEnabled(false);
+        }
+    }
+
+    /**
+     * Returns the work off-line button
+     *
+     * @return the btnWorkOffline
+     */
+    public JToggleButton getBtnWorkOffline() {
+        return btnWorkOffline;
+    }
+
+    /**
+     * Returns the refresh button
+     *
+     * @return the btnRefresh
+     */
+    public JToggleButton getBtnRefresh() {
+        return btnRefresh;
+    }
+
+    /**
+     * @return the btnFilter
+     */
+    public JToggleButton getBtnFilter() {
+        return btnFilter;
+    }
+
+    /**
+     * Returns the add comment button
+     *
+     * @return the btnAddComment
+     */
+    public JToggleButton getBtnAddComment() {
+        return btnAddComment;
+    }
+
+    /**
+     * Returns the fix bug report button
+     *
+     * @return the btnFixBugReport
+     */
+    public JToggleButton getBtnFixBugReport() {
+        return btnFixBugReport;
+    }
+
+    /**
+     * Returns the invalidate button
+     *
+     * @return the btnInvalidateBugReport
+     */
+    public JToggleButton getBtnInvalidateBugReport() {
+        return btnInvalidateBugReport;
+    }
+
+    /**
+     * Returns the re-open bug report button
+     *
+     * @return the btnReOpenBugReport
+     */
+    public JToggleButton getBtnReOpenBugReport() {
+        return btnReOpenBugReport;
+    }
+
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/panel/MapdustCommentsPanel.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/panel/MapdustCommentsPanel.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/panel/MapdustCommentsPanel.java	(revision 35962)
@@ -0,0 +1,116 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.component.panel;
+
+
+import java.awt.BorderLayout;
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Font;
+import java.text.DateFormat;
+import java.util.Locale;
+
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTextArea;
+
+import org.openstreetmap.josm.plugins.mapdust.gui.component.util.ComponentUtil;
+import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustComment;
+
+
+/**
+ * Defines the JPanel which displays the comments of a <code>MapdustBug</code>
+ * object.
+ *
+ * @author Bea
+ *
+ */
+public class MapdustCommentsPanel extends JPanel {
+
+    /** The serial version UID */
+    private static final long serialVersionUID = 5730420562553912697L;
+
+    /**
+     * Builds a <code>MapdustCommentsPanel</code> object based on the given
+     * arguments.
+     *
+     * @param comments The array of <code>MapdustComment</code> object
+     */
+    public MapdustCommentsPanel(MapdustComment[] comments) {
+        setLayout(new BorderLayout());
+        addComponents(comments);
+    }
+
+    /**
+     * Updates the components of the <code>MapdustCommentsPanel</code> based on
+     * the given parameter.
+     *
+     * @param comments The array of <code>MapdustComment</code>s
+     */
+    public void updateComponents(MapdustComment[] comments) {
+        removeAll();
+        addComponents(comments);
+    }
+
+    /**
+     * Adds the components to the panel.
+     *
+     * @param comments The array of <code>MapdustComment</code> objects
+     */
+    private void addComponents(MapdustComment[] comments) {
+        String name = "Bug Comments (";
+        name += comments.length + " )";
+        setName(name);
+        JTextArea txt = new JTextArea();
+        txt.setAutoscrolls(true);
+        txt.setEditable(false);
+        String line = "";
+        DateFormat df = DateFormat.getDateInstance(DateFormat.DEFAULT,
+                Locale.getDefault());
+        int index = comments.length;
+        for (MapdustComment com : comments) {
+            line += "Comment " + index + ":";
+            line += "\n";
+            line += "  " + com.getCommentText();
+            line += "\n ";
+            line += " added by " + "[" + com.getNickname() + "]";
+            line += " on ";
+            line += "[ " + df.format(com.getDateCreated()) + " ";
+            line += "] \n\n";
+            index--;
+        }
+        txt.setText(line);
+        txt.setFont(new Font("Times New Roman", Font.BOLD, 12));
+        txt.setCaretPosition(0);
+        JScrollPane sp = ComponentUtil.createJScrollPane(txt, null, Color.white,
+                true, true);
+        sp.setPreferredSize(new Dimension(100, 100));
+        add(sp);
+    }
+
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/panel/MapdustDescriptionPanel.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/panel/MapdustDescriptionPanel.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/panel/MapdustDescriptionPanel.java	(revision 35962)
@@ -0,0 +1,95 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.component.panel;
+
+
+import java.awt.BorderLayout;
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Font;
+
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTextArea;
+
+import org.openstreetmap.josm.plugins.mapdust.gui.component.util.ComponentUtil;
+
+
+/**
+ * Defines the JPanel which displays the <code>MapdustBug</code> object
+ * description.
+ *
+ * @author Bea
+ *
+ */
+public class MapdustDescriptionPanel extends JPanel {
+
+    /** The serial version UID */
+    private static final long serialVersionUID = -4246874841836269643L;
+
+    /**
+     * Builds a <code>MapdustDescriptionPanel</code> object
+     *
+     * @param description The description of the bug
+     */
+    public MapdustDescriptionPanel(String description) {
+        setLayout(new BorderLayout());
+        String name = "Description ";
+        setName(name);
+        addComponents(description);
+    }
+
+    /**
+     * Updates the components of the <code>MapdustDescriptionPanel</code> based
+     * on the given parameter
+     *
+     * @param description The description
+     */
+    public void updateComponents(String description) {
+        removeAll();
+        addComponents(description);
+    }
+
+    /**
+     * Adds the components to the <code>MapdustDescriptionPanel</code>.
+     *
+     * @param description the description
+     */
+    private void addComponents(String description) {
+        description = (description != null ? description : "");
+        JTextArea txtDescription = new JTextArea(description);
+        txtDescription.setLineWrap(true);
+        txtDescription.setFont(new Font("Times New Roman", Font.BOLD, 12));
+        txtDescription.setEditable(false);
+        JScrollPane cmpDescription = ComponentUtil.createJScrollPane(
+                txtDescription, null, Color.white, true, true);
+        cmpDescription.setPreferredSize(new Dimension(100, 100));
+        add(cmpDescription, BorderLayout.CENTER);
+    }
+
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/panel/MapdustHelpPanel.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/panel/MapdustHelpPanel.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/panel/MapdustHelpPanel.java	(revision 35962)
@@ -0,0 +1,139 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.component.panel;
+
+
+import static org.openstreetmap.josm.tools.I18n.tr;
+
+import java.awt.BorderLayout;
+import java.awt.Color;
+import java.awt.Dimension;
+import java.net.URI;
+
+import javax.swing.JEditorPane;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.event.HyperlinkEvent;
+import javax.swing.event.HyperlinkListener;
+import javax.swing.text.html.HTMLEditorKit;
+
+import org.openstreetmap.josm.gui.MainApplication;
+import org.openstreetmap.josm.plugins.mapdust.gui.component.util.ComponentUtil;
+import org.openstreetmap.josm.plugins.mapdust.util.Configuration;
+import org.openstreetmap.josm.spi.preferences.Config;
+import org.openstreetmap.josm.tools.OpenBrowser;
+
+
+/**
+ * Defines the JPanel which displays the Help.
+ * 
+ * @author Bea
+ */
+public class MapdustHelpPanel extends JPanel implements HyperlinkListener {
+    
+    /** The serial version UID */
+    private static final long serialVersionUID = 8366853437915060878L;
+    
+    /**
+     * Builds a <code>MapdustDescriptionPanel</code> object
+     */
+    public MapdustHelpPanel() {
+        setLayout(new BorderLayout());
+        String name = "Help";
+        setName(name);
+        String txt = buildText();
+        JEditorPane txtHelp = new JEditorPane("text/html", "");
+        txtHelp.setEditorKit(new HTMLEditorKit());
+        txtHelp.setEditable(false);
+        txtHelp.setText(txt);
+        txtHelp.addHyperlinkListener(this);
+        JScrollPane cmpDescription =
+                ComponentUtil.createJScrollPane(txtHelp, null, Color.white,
+                        true, true);
+        cmpDescription.setPreferredSize(new Dimension(100, 100));
+        add(cmpDescription, BorderLayout.CENTER);
+    }
+    
+    @Override
+    public void hyperlinkUpdate(HyperlinkEvent event) {
+        if (event.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
+            String url = Configuration.getInstance().getMapdustWiki();
+            try {
+                OpenBrowser.displayUrl(new URI(url));
+            } catch (Exception e) {
+                String errorMessage = "Error opening the MapDust wiki page";
+                JOptionPane.showMessageDialog(MainApplication.getMainFrame(), tr(errorMessage),
+                        tr("Error"), JOptionPane.ERROR_MESSAGE);
+            }
+        }
+    }
+    
+    /**
+     * Builds the text of the Help panel. This text contains general information
+     * related to the MapDust plugin.
+     * 
+     * @return a string containing the text which will be displayed on the Help
+     * tab
+     */
+    private String buildText() {
+        Integer version;
+        try {
+            version = Integer.decode(Config.getPref().get("mapdust.version"));
+        } catch (NumberFormatException e) {
+            version = null;
+        }
+                
+        Integer localVersion;
+        try {
+            localVersion = Integer.decode(Config.getPref().get("mapdust.localVersion"));
+        } catch (NumberFormatException e) {
+            localVersion = null;
+        }
+             
+        StringBuilder sb = new StringBuilder("<html>");
+        sb.append("<font style='font-size:10px' face='Times New Roman'>");
+        sb.append("<b>You are using MapDust version ");
+        sb.append("<i style='color:red;font-size:10px'>");
+        if (version != null && localVersion != null && version <= localVersion) {
+            sb.append(Config.getPref().get("mapdust.version")).append("</i>.</b><br>");
+        } else {
+            sb.append(Config.getPref().get("mapdust.localVersion"));
+            sb.append("</i>. There is an update available. ");
+            sb.append("Please update to version ");
+            sb.append("<i style='color:red;font-size:10px'>");
+            sb.append(version);
+            sb.append("</i> to benefit from the latest improvements.</b><br>");
+        }
+        sb.append("<b>To add bugs on the map you need to activate ");
+        sb.append("the MapDust layer in the Layer List Dialog.");
+        sb.append("Click <a href='' target='_blank'>here</a> for more help.");
+        sb.append("</b></font></html>");
+        return sb.toString();
+    }
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/panel/package-info.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/panel/package-info.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/panel/package-info.java	(revision 35962)
@@ -0,0 +1,5 @@
+/**
+ * Contains the customized <code>JPanel</code> classes used for building
+ * the MapDust plugin GUI.
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.component.panel;
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/renderer/ActionListCellRenderer.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/renderer/ActionListCellRenderer.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/renderer/ActionListCellRenderer.java	(revision 35962)
@@ -0,0 +1,116 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.component.renderer;
+
+import java.awt.Component;
+import java.awt.Font;
+import javax.swing.DefaultListCellRenderer;
+import javax.swing.JLabel;
+import javax.swing.JList;
+import org.openstreetmap.josm.plugins.mapdust.gui.value.MapdustAction;
+import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustBug;
+import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustComment;
+import org.openstreetmap.josm.tools.ImageProvider;
+
+/**
+ * Cell renderer for the <code>MapdustAction</code> objects.
+ *
+ * @author Bea
+ * @version $Revision$
+ */
+public class ActionListCellRenderer extends DefaultListCellRenderer {
+
+    /**
+     * Returns the cell renderer component of the action list.
+     *
+     * @param list The action list
+     * @param value The selected object
+     * @param index The selected index
+     * @param isSelected Specifies if the item is selected or not
+     * @param hasFocus Specifies if the item has focus or not
+     */
+    @Override
+    public Component getListCellRendererComponent(JList<?> list, Object value,
+            int index, boolean isSelected, boolean hasFocus) {
+        JLabel label = (JLabel) super.getListCellRendererComponent(list, value,
+                index, isSelected, hasFocus);
+        if (value instanceof MapdustAction) {
+            MapdustAction mapdustAction = (MapdustAction) value;
+            String text = "";
+            MapdustBug bug = mapdustAction.getMapdustBug();
+            MapdustComment comment = mapdustAction.getMapdustComment();
+            if (comment == null) {
+                /* created a new bug */
+                bug = mapdustAction.getMapdustBug();
+                text += bug.getType().getValue() + ":";
+                text += bug.getDescription() + " ";
+                text += " created by ";
+                text += bug.getNickname();
+            } else {
+                if (mapdustAction.getNewStatus() != null) {
+                    switch (mapdustAction.getNewStatus()) {
+                        case 1:
+                            /* bug was re-opened */
+                            text += bug.getId() + ":";
+                            text += bug.getType().getValue() + " ";
+                            text += " re-opened by ";
+                            text += comment.getNickname();
+                            break;
+                        case 2:
+                            /* bug was fixed */
+                            text += bug.getId() + ":";
+                            text += bug.getType().getValue() + " ";
+                            text += " fixed by ";
+                            text += comment.getNickname();
+                            break;
+                        case 3:
+                            /* bug was invalidated */
+                            text += bug.getId() + ":";
+                            text += bug.getType().getValue() + " ";
+                            text += " invalidated by ";
+                            text += comment.getNickname();
+                            break;
+                    }
+
+                } else {
+                    /* new comment */
+                    text += bug.getId() + ":";
+                    text += bug.getType().getValue() + " ";
+                    text += " commented by ";
+                    text += comment.getNickname();
+                }
+            }
+            /* set the text and icon */
+            label.setText(text);
+            label.setIcon(ImageProvider.get(mapdustAction.getIconPath()));
+            label.setFont(new Font("Times New Roman", Font.BOLD, 12));
+        }
+        return (label);
+    }
+
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/renderer/BugListCellRenderer.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/renderer/BugListCellRenderer.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/renderer/BugListCellRenderer.java	(revision 35962)
@@ -0,0 +1,102 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.component.renderer;
+
+
+import java.awt.Component;
+import java.awt.Font;
+import java.text.DateFormat;
+import java.util.Locale;
+import javax.swing.DefaultListCellRenderer;
+import javax.swing.ImageIcon;
+import javax.swing.JLabel;
+import javax.swing.JList;
+import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustBug;
+import org.openstreetmap.josm.tools.ImageProvider;
+
+
+/**
+ * Cell renderer for the list of <code>MapdustBug</code> objects.
+ *
+ * @author Bea
+ */
+public class BugListCellRenderer extends DefaultListCellRenderer {
+
+    /** The serial version UID */
+    private static final long serialVersionUID = -5888587819204364046L;
+
+    /**
+     * Returns the cell renderer component of the MapDust bug list.
+     *
+     * @param list The MapDust bug list
+     * @param value The selected object
+     * @param index The selected index
+     * @param isSelected Specifies if the item is selected or not
+     * @param hasFocus Specifies if the item has focus or not
+     */
+    @Override
+    public Component getListCellRendererComponent(JList<?> list, Object value,
+            int index, boolean isSelected, boolean hasFocus) {
+        JLabel label = (JLabel) super.getListCellRendererComponent(list, value,
+                index, isSelected, hasFocus);
+        if (value instanceof MapdustBug) {
+            /* show the MapdustBug in the list */
+            MapdustBug mapdustBug = (MapdustBug) value;
+            String iconPath = "bugs/normal/";
+            iconPath += mapdustBug.getStatus().getValue().toLowerCase();
+            iconPath += "_";
+            iconPath += mapdustBug.getType().getKey() + ".png";
+            ImageIcon icon = ImageProvider.get(iconPath);
+            icon.setDescription(mapdustBug.getType().getValue());
+            label.setIcon(ImageProvider.get(iconPath));
+            String text = "" + mapdustBug.getId() + ": ";
+            text += mapdustBug.getType().getValue();
+            if (mapdustBug.getAddress() != null) {
+                String addressStr = mapdustBug.getAddress().toString();
+                if (!addressStr.trim().isEmpty()) {
+                    text += " (" + mapdustBug.getAddress().toString() + " )";
+                }
+            }
+            DateFormat df = DateFormat.getDateInstance(DateFormat.DEFAULT,
+                    Locale.getDefault());
+            text += " last modified on ";
+            text += df.format(mapdustBug.getDateUpdated());
+            label.setText(text);
+            label.setFont(new Font("Times New Roman", Font.BOLD, 12));
+            label.setSize(200, 20);
+        }
+        if (value instanceof String) {
+            /* show default text in the list */
+            String text = (String) value;
+            label.setText(text);
+            label.setFont(new Font("Times New Roman", Font.BOLD, 12));
+        }
+        return (label);
+    }
+
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/renderer/ComboBoxRenderer.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/renderer/ComboBoxRenderer.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/renderer/ComboBoxRenderer.java	(revision 35962)
@@ -0,0 +1,73 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.component.renderer;
+
+import java.awt.Component;
+import java.awt.Font;
+import javax.swing.DefaultListCellRenderer;
+import javax.swing.ImageIcon;
+import javax.swing.JLabel;
+import javax.swing.JList;
+import javax.swing.ListCellRenderer;
+import org.openstreetmap.josm.plugins.mapdust.service.value.BugType;
+import org.openstreetmap.josm.tools.ImageProvider;
+
+/**
+ * Cell renderer for the <code>MapdustBug</code> types.
+ *
+ * @author Bea
+ */
+public class ComboBoxRenderer implements ListCellRenderer<BugType> {
+
+    /** The default renderer */
+    private final DefaultListCellRenderer defaultRenderer =
+            new DefaultListCellRenderer();
+
+    /**
+     * Returns the cell renderer component of the MapDust type combo box.
+     *
+     * @param list The list of types
+     * @param value The selected object
+     * @param index The selected index
+     * @param isSelected Specifies if the item is selected or not
+     * @param cellHasFocus Specifies if the item has focus or not
+     */
+    @Override
+    public Component getListCellRendererComponent(JList<? extends BugType> list, BugType type,
+            int index, boolean isSelected, boolean cellHasFocus) {
+        JLabel label = (JLabel) defaultRenderer.getListCellRendererComponent(
+                list, type, index, isSelected, cellHasFocus);
+        String iconPath = "bugs/normal/open_" + type.getKey() + ".png";
+        String text = type.getValue();
+        ImageIcon icon = ImageProvider.get(iconPath);
+        label.setIcon(icon);
+        label.setText(text);
+        label.setFont(new Font("Times New Roman", Font.BOLD, 12));
+        return label;
+    }
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/renderer/package-info.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/renderer/package-info.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/renderer/package-info.java	(revision 35962)
@@ -0,0 +1,4 @@
+/**
+ * contains the custom renderer classes used by lists and combo boxes
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.component.renderer;
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/slider/RelevanceChangeListener.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/slider/RelevanceChangeListener.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/slider/RelevanceChangeListener.java	(revision 35962)
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ *
+ * Created on Apr 1, 2011 by Bea
+ * Modified on $DateTime$ by $Author$
+
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.component.slider;
+
+
+import javax.swing.event.ChangeEvent;
+import javax.swing.event.ChangeListener;
+
+
+/**
+ * Change listener for the <code>RelevanceSlider</code> object.
+ *
+ * @author Bea
+ * @version $Revision$
+ */
+public class RelevanceChangeListener implements ChangeListener {
+
+    /** The <code>RelevanceSliderUI</code> object */
+    private final RelevanceSliderUI sliderUI;
+
+    /**
+     * Builds a <code>RelevanceChangeListener</code> object based on the given
+     * argument
+     *
+     * @param sliderUI The <code>RelevanceSliderUI</code> object
+     */
+    public RelevanceChangeListener(RelevanceSliderUI sliderUI) {
+        this.sliderUI = sliderUI;
+    }
+
+    /**
+     * Listens for slider thumb specific change events ( the lower or upper
+     * thumb of the <code>RelevanceSlider</code> was moved), and updates the
+     * current <code>RelevanceSlider</code> state to the new state.
+     *
+     * @param event A <code>ChangeEvent</code> object
+     */
+    @Override
+    public void stateChanged(ChangeEvent event) {
+        if (event != null) {
+            sliderUI.changeSliderState();
+        }
+    }
+
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/slider/RelevanceSlider.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/slider/RelevanceSlider.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/slider/RelevanceSlider.java	(revision 35962)
@@ -0,0 +1,187 @@
+/*
+ * Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ *
+ * Created on Apr 1, 2011 by Bea
+ * Modified on $DateTime$ by $Author$
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.component.slider;
+
+
+import java.awt.Font;
+import java.util.Dictionary;
+import java.util.Hashtable;
+import javax.swing.JLabel;
+import javax.swing.JSlider;
+import org.openstreetmap.josm.plugins.mapdust.gui.component.util.ComponentUtil;
+import org.openstreetmap.josm.plugins.mapdust.gui.value.MapdustRelevanceValue;
+import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustRelevance;
+
+
+/**
+ * This class defines a customized relevance <code>JSlider</code> object. The
+ * relevance slider is a slider with two thumbs, and with a lower and upper
+ * value.
+ *
+ * @author Bea
+ * @version $Revision$
+ */
+public class RelevanceSlider extends JSlider {
+
+    /** The serial version UID */
+    private static final long serialVersionUID = 3306976109770890966L;
+
+    /** The selected lower value */
+    private int lowerValue;
+
+    /** The selected upper value */
+    private int upperValue;
+
+    /**
+     * Builds a new <code>RelevanceSlider</code> with the default settings. By
+     * default the <code>RelevanceSlider</code> values are from 0 (see
+     * <code>MapdustRelevanceValue</code> LOW value) until 16 (see
+     * <code>MapdustRelevanceValue</code> HIGH value).
+     */
+    public RelevanceSlider() {
+        super(MapdustRelevanceValue.LOW.getSliderValue(),
+                MapdustRelevanceValue.HIGH.getSliderValue());
+        initSlider(MapdustRelevanceValue.LOW.getSliderValue(),
+                MapdustRelevanceValue.HIGH.getSliderValue());
+    }
+
+    /**
+     * Initialize the <code>RelevanceSlider</code> object.
+     *
+     * @param lowerValue The value of the lower thumb
+     * @param upperValue The value of the upper thumb
+     */
+    private void initSlider(int lowerValue, int upperValue) {
+        setOrientation(HORIZONTAL);
+        setMajorTickSpacing(4);
+        setLowerValue(lowerValue);
+        setUpperValue(upperValue);
+        setPaintTicks(true);
+        setPaintLabels(true);
+        setSnapToTicks(true);
+        setFocusable(false);
+        /* set label for the slider values */
+        Dictionary<Integer, JLabel> values = new Hashtable<>();
+        Font font = new Font("Times New Roman", Font.BOLD, 12);
+        values.put(MapdustRelevanceValue.LOW.getSliderValue(), ComponentUtil
+                .createJLabel(MapdustRelevance.LOW.getName(), font, null, null));
+        values.put(MapdustRelevanceValue.MID_LOW.getSliderValue(),
+                ComponentUtil.createJLabel(MapdustRelevance.MID_LOW.getName(),
+                        font, null, null));
+        values.put(MapdustRelevanceValue.MEDIUM.getSliderValue(), ComponentUtil
+                .createJLabel(MapdustRelevance.MEDIUM.getName(), font, null,
+                        null));
+        values.put(MapdustRelevanceValue.MID_HIGH.getSliderValue(),
+                ComponentUtil.createJLabel(MapdustRelevance.MID_HIGH.getName(),
+                        font, null, null));
+        values.put(MapdustRelevanceValue.HIGH.getSliderValue(),
+                ComponentUtil.createJLabel(MapdustRelevance.HIGH.getName(),
+                        font, null, null));
+        setLabelTable(values);
+    }
+
+    /**
+     * Updates the UI of the slider.
+     */
+    @Override
+    public void updateUI() {
+        setUI(new RelevanceSliderUI(this));
+        updateLabelUIs();
+    }
+
+    /**
+     * Returns the <code>RelevanceSliderUI</code> object
+     *
+     * @return ui
+     */
+    @Override
+    public RelevanceSliderUI getUI() {
+        return (RelevanceSliderUI) ui;
+    }
+
+    /**
+     * Returns the lower value
+     *
+     * @return the lowerValue
+     */
+    public int getLowerValue() {
+        return lowerValue;
+    }
+
+    /**
+     * Sets the new lower value, and the range properties.
+     *
+     * @param lowerValue The new lower value
+     */
+    public void setLowerValue(int lowerValue) {
+        int oldValue = getLowerValue();
+        int oldExtent = getExtent();
+        int newExtent = oldExtent + oldValue - lowerValue;
+        getModel().setRangeProperties(lowerValue, newExtent, getMinimum(),
+                getMaximum(), true);
+        this.lowerValue = lowerValue;
+    }
+
+    /**
+     * Returns the upper value
+     *
+     * @return upperValue
+     */
+    public int getUpperValue() {
+        if (upperValue < lowerValue) {
+            upperValue = lowerValue;
+        }
+        return upperValue;
+    }
+
+    /**
+     * Sets the upper value, and the extent value.
+     *
+     * @param upperValue The new upper value.
+     */
+    public void setUpperValue(int upperValue) {
+        this.upperValue = upperValue;
+        int newExtent = Math.min(Math.max(0, upperValue - getLowerValue()),
+                getMaximum() - getLowerValue());
+        setExtent(newExtent);
+    }
+
+    /**
+     * Sets the extent values of the slider, and also reset the value for the
+     * upperValue field.
+     */
+    @Override
+    public void setExtent(int extent) {
+        super.setExtent(extent);
+        this.upperValue = getLowerValue()+getExtent();
+    }
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/slider/RelevanceSliderUI.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/slider/RelevanceSliderUI.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/slider/RelevanceSliderUI.java	(revision 35962)
@@ -0,0 +1,601 @@
+/*
+ * Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ *
+ * Created on Apr 7, 2011 by Bea
+ * Modified on $DateTime$ by $Author$
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.component.slider;
+
+
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics;
+import java.awt.Rectangle;
+import java.awt.event.MouseEvent;
+import javax.swing.Icon;
+import javax.swing.JComponent;
+import javax.swing.JSlider;
+import javax.swing.SwingConstants;
+import javax.swing.SwingUtilities;
+import javax.swing.event.ChangeListener;
+import javax.swing.plaf.basic.BasicSliderUI;
+import org.openstreetmap.josm.tools.ImageProvider;
+
+
+/**
+ * This class defines a customized <code>BasicSliderUI</code> for the
+ * <code>RelevanceSlider</code> object.
+ *
+ * @author Bea
+ * @version $Revision$
+ */
+public class RelevanceSliderUI extends BasicSliderUI {
+
+    /** The rectangle of the upper thumb */
+    private Rectangle upperRect;
+
+    /** Flag indicating if the upper thumb is selected or not */
+    private boolean isUpperSelected;
+
+    /** Flag indicating if the lower thumb is dragging or not */
+    private transient boolean isLowerDragging;
+
+    /** Flag indicating if the upper thumb is dragging or not */
+    private transient boolean isUpperDragging;
+
+    /** The icon used for representing the upper and lower thumbs */
+    private final Icon sliderIcon;
+
+    /**
+     * Builds a new <code>RelevanceSliderUI</code> object based on the given
+     * arguments.
+     *
+     * @param relevanceSlider The <code>RelevanceSlider</code> object
+     */
+    public RelevanceSliderUI(RelevanceSlider relevanceSlider) {
+        super(relevanceSlider);
+        this.sliderIcon = ImageProvider.get("slider/thumb.png");
+    }
+
+    /**
+     * Installs the UI on the given component.
+     *
+     * @param component A <code>JComponent</code> object
+     */
+    @Override
+    public void installUI(JComponent component) {
+        upperRect = new Rectangle();
+        super.installUI(component);
+    }
+
+    /**
+     * Changes the slider current state shown on the GUI with a new state.
+     * Basically moves the upper and lower thumbs on the slider, based on a
+     * previous user action.
+     */
+    public void changeSliderState() {
+        if (!isLowerDragging && !isUpperDragging) {
+            calculateThumbLocation();
+            slider.repaint();
+        } else {
+            if (isUpperSelected) {
+                calculateThumbLocation();
+                slider.repaint();
+            }
+        }
+    }
+
+    /**
+     * Creates a new custom <code>TrackListener</code> object for the slider.
+     *
+     * @param slider The <code>JSlider</code> object
+     * @return A new <code>RangeTrackListener</code> object
+     */
+    @Override
+    protected TrackListener createTrackListener(JSlider slider) {
+        return new RangeTrackListener();
+    }
+
+    /**
+     * Creates a new custom <code>ChangeListener</code> object for the slider.
+     *
+     * @param slider The <code>JSlider</code> object
+     * @return A new <code>RelevanceChangeListener</code> object
+     */
+    @Override
+    protected ChangeListener createChangeListener(JSlider slider) {
+        return new RelevanceChangeListener(this);
+    }
+
+    /**
+     * Calculates the slider thumb sizes. Also sets the size for the upper and
+     * lower thumb.
+     *
+     */
+    @Override
+    protected void calculateThumbSize() {
+        super.calculateThumbSize();
+        upperRect.setSize(sliderIcon.getIconWidth(), sliderIcon.getIconHeight());
+
+    }
+
+    /**
+     * Calculates the locations of the upper and lower thumbs.
+     */
+    @Override
+    protected void calculateThumbLocation() {
+        super.calculateThumbLocation();
+        if (getSlider().getSnapToTicks()) {
+            int upperValue = getSlider().getUpperValue();
+            int snappedValue = upperValue;
+            int majorTickSpacing = getSlider().getMajorTickSpacing();
+            int minorTickSpacing = getSlider().getMinorTickSpacing();
+            int tickSpacing = 0;
+            if (minorTickSpacing > 0) {
+                tickSpacing = minorTickSpacing;
+            } else if (majorTickSpacing > 0) {
+                tickSpacing = majorTickSpacing;
+            }
+            if (tickSpacing != 0) {
+                int min = getSlider().getMinimum();
+                if ((upperValue - min) % tickSpacing != 0) {
+                    float temp = upperValue - min;
+                    temp /= tickSpacing;
+                    int whichTick = Math.round(temp);
+                    snappedValue = min + (whichTick * tickSpacing);
+                }
+                if (snappedValue != upperValue) {
+                    int extent = snappedValue - getSlider().getLowerValue();
+                    getSlider().setExtent(extent);
+                }
+            }
+        }
+        int value = getSlider().getLowerValue() + getSlider().getExtent();
+        int upperPosition = xPositionForValue(value);
+        upperRect.x = upperPosition - (upperRect.width / 2);
+        upperRect.y = trackRect.y;
+    }
+
+    /**
+     * Returns the size of the thumbs. The dimension is computed based on the
+     * thumb icon dimension.
+     *
+     * @return A <code>Dimension</code> object.
+     */
+    @Override
+    protected Dimension getThumbSize() {
+        return new Dimension(sliderIcon.getIconWidth(),
+                sliderIcon.getIconHeight());
+    }
+
+    /**
+     * Paints the given components.
+     *
+     * @param g The <code>Graphics</code> object
+     * @param c The <code>JComponent</code> object
+     */
+    @Override
+    public void paint(Graphics g, JComponent c) {
+        super.paint(g, c);
+        Rectangle clipRect = g.getClipBounds();
+        if (isUpperSelected) {
+            if (clipRect.intersects(thumbRect)) {
+                sliderIcon.paintIcon(getSlider(), g, thumbRect.x, thumbRect.y);
+            }
+            if (clipRect.intersects(upperRect)) {
+                sliderIcon.paintIcon(getSlider(), g, upperRect.x, upperRect.y);
+            }
+        } else {
+            if (clipRect.intersects(upperRect)) {
+                sliderIcon.paintIcon(getSlider(), g, upperRect.x, upperRect.y);
+            }
+            if (clipRect.intersects(thumbRect)) {
+                sliderIcon.paintIcon(getSlider(), g, thumbRect.x, thumbRect.y);
+            }
+        }
+    }
+
+    @Override
+    public void paintThumb(Graphics g) {}
+
+    /**
+     * Paints the tack of the slider. The selected part of the slider will be
+     * painted with orange.
+     *
+     * @param g The <code>Graphics</code> object
+     */
+    @Override
+    public void paintTrack(Graphics g) {
+        super.paintTrack(g);
+        Rectangle trackBounds = trackRect;
+        int lowerX = thumbRect.x + (thumbRect.width / 2);
+        int upperX = upperRect.x + (upperRect.width / 2);
+        int cy = (trackBounds.height / 2) - 2;
+        Color oldColor = g.getColor();
+        g.translate(trackBounds.x, trackBounds.y + cy);
+        g.setColor(Color.orange);
+        for (int y = 0; y <= 3; y++) {
+            g.drawLine(lowerX - trackBounds.x, y, upperX - trackBounds.x, y);
+        }
+        g.translate(-trackBounds.x, -(trackBounds.y + cy));
+        g.setColor(oldColor);
+    }
+
+    /**
+     * Moves the selected thumb in the specified direction by a block increment.
+     *
+     * @param direction The direction
+     */
+    @Override
+    public void scrollByBlock(int direction) {
+        synchronized (getSlider()) {
+            int min = getSlider().getMinimum();
+            int max = getSlider().getMaximum();
+            int incr = (max - min) / 10;
+            if (incr <= 0 && max > min) {
+                incr = 1;
+            }
+            int delta = incr * ((direction > 0) ? POSITIVE_SCROLL
+                    : NEGATIVE_SCROLL);
+            if (isUpperSelected) {
+                int oldValue = getSlider().getUpperValue();
+                getSlider().setUpperValue(oldValue + delta);
+            } else {
+                int oldValue = getSlider().getLowerValue();
+                getSlider().setLowerValue(oldValue + delta);
+            }
+        }
+    }
+
+    /**
+     * Moves the selected thumb in the specified direction by a unit increment.
+     *
+     * @param direction The direction
+     */
+    @Override
+    public void scrollByUnit(int direction) {
+        synchronized (getSlider()) {
+            int delta = 1 * ((direction > 0) ? POSITIVE_SCROLL : NEGATIVE_SCROLL);
+            if (isUpperSelected) {
+                int oldValue = getSlider().getUpperValue();
+                getSlider().setUpperValue(oldValue + delta);
+            } else {
+                int oldValue = getSlider().getLowerValue();
+                getSlider().setLowerValue(oldValue + delta);
+            }
+        }
+    }
+
+    /**
+     * Returns the <code>RelevanceSlider</code> object
+     *
+     * @return relevance slider
+     */
+    protected RelevanceSlider getSlider() {
+        return (RelevanceSlider) slider;
+    }
+
+    /**
+     * Returns the thumb rectangle. This method returns the parent class
+     * thumbRect field.
+     *
+     * @return A <code>Rectangle</code> object
+     */
+    protected Rectangle getThumbRect() {
+        return super.thumbRect;
+    }
+
+    /**
+     * Returns the track rectangle. This method returns the parent class
+     * trackRect field.
+     *
+     * @return A <code>Rectangle</code> object
+     */
+    protected Rectangle getTrackRect() {
+        return super.trackRect;
+    }
+
+    /**
+     * Returns the upper thumb rectangle.
+     *
+     * @return A <code>Rectangle</code> object
+     */
+    public Rectangle getUpperRect() {
+        return upperRect;
+    }
+
+    /**
+     * This method it is used for accessing the base class 'drawInverted'
+     * method.
+     *
+     * @return boolean
+     */
+    @Override
+    protected boolean drawInverted() {
+        return super.drawInverted();
+    }
+
+    /**
+     * This method it is used for accessing the base class 'xPositionForValue'
+     * method.
+     *
+     * @param value The integer value
+     * @return the x position for the given value
+     */
+    @Override
+    protected int xPositionForValue(int value) {
+        return super.xPositionForValue(value);
+    }
+
+    /**
+     * Returns the isUpperSelected field value.
+     *
+     * @return the isUpperSelected
+     */
+    public boolean getIsUpperSelected() {
+        return isUpperSelected;
+    }
+
+    /**
+     * Sets the isUpperSelected field to a new value
+     *
+     * @param isUpperSelected the isUpperSelected to set
+     */
+    public void setIsUpperSelected(boolean isUpperSelected) {
+        this.isUpperSelected = isUpperSelected;
+    }
+
+    /**
+     * Returns the isLowerDragging field value.
+     *
+     * @return the isLowerDragging
+     */
+    public boolean getIsLowerDragging() {
+        return isLowerDragging;
+    }
+
+    /**
+     * Sets the isLowerDragging field value
+     *
+     * @param isLowerDragging the isLowerDragging to set
+     */
+    public void setIsLowerDragging(boolean isLowerDragging) {
+        this.isLowerDragging = isLowerDragging;
+    }
+
+    /**
+     * Returns the isUpperDragging field value
+     *
+     * @return the isUpperDragging
+     */
+    public boolean getIsUpperDragging() {
+        return isUpperDragging;
+    }
+
+    /**
+     * Sets the isUpperDragging field value
+     *
+     * @param isUpperDragging the isUpperDragging to set
+     */
+    public void setIsUpperDragging(boolean isUpperDragging) {
+        this.isUpperDragging = isUpperDragging;
+    }
+
+    /**
+     * Custom <code>TrackListener</code> inner class for the
+     * <code>RelevanceSliderUI</code> object.
+     *
+     */
+    class RangeTrackListener extends TrackListener {
+
+        /**
+         * Listens and handles the mouse pressed event.
+         *
+         * @param event The <code>MouseEvent</code> object
+         */
+        @Override
+        public void mousePressed(MouseEvent event) {
+            if (!getSlider().isEnabled()) {
+                return;
+            }
+            currentMouseX = event.getX();
+            currentMouseY = event.getY();
+            if (getSlider().isRequestFocusEnabled()) {
+                getSlider().requestFocus();
+            }
+            boolean lowerPressed = false;
+            boolean upperPressed = false;
+            if (getIsUpperSelected()) {
+                if (getUpperRect().contains(currentMouseX, currentMouseY)) {
+                    upperPressed = true;
+                } else {
+                    if (getThumbRect().contains(currentMouseX, currentMouseY)) {
+                        lowerPressed = true;
+                    }
+                }
+            } else {
+                if (getThumbRect().contains(currentMouseX, currentMouseY)) {
+                    lowerPressed = true;
+                } else {
+                    if (getUpperRect().contains(currentMouseX, currentMouseY)) {
+                        upperPressed = true;
+                    }
+                }
+            }
+
+            /* lower thumb was pressed */
+            if (lowerPressed) {
+                offset = currentMouseX - getThumbRect().x;
+                setIsUpperSelected(false);
+                setIsLowerDragging(true);
+                return;
+            }
+            setIsLowerDragging(false);
+
+            /* upper thumb was pressed */
+            if (upperPressed) {
+                offset = currentMouseX - getUpperRect().x;
+                setIsUpperSelected(true);
+                setIsUpperDragging(true);
+                return;
+            }
+            setIsUpperDragging(false);
+        }
+
+        /**
+         * Listens and handles the mouse released event.
+         *
+         * @param event The <code>MouseEvent</code> object
+         */
+        @Override
+        public void mouseReleased(MouseEvent event) {
+            setIsLowerDragging(false);
+            setIsUpperDragging(false);
+            getSlider().setValueIsAdjusting(false);
+            super.mouseReleased(event);
+        }
+
+        /**
+         * Listens and handles the mouse dragged event.
+         *
+         * @param event The <code>MouseEvent</code> object
+         */
+        @Override
+        public void mouseDragged(MouseEvent event) {
+            if (!getSlider().isEnabled()) {
+                return;
+            }
+            currentMouseX = event.getX();
+            currentMouseY = event.getY();
+            if (getIsLowerDragging()) {
+                getSlider().setValueIsAdjusting(true);
+                moveLowerThumb(event);
+
+            } else if (getIsUpperDragging()) {
+                getSlider().setValueIsAdjusting(true);
+                moveUpperThumb(event);
+            }
+        }
+
+        @Override
+        public boolean shouldScroll(int direction) {
+            return false;
+        }
+
+        /**
+         * Moves the location of the lower thumb, and sets its corresponding
+         * value in the slider.
+         *
+         * @param event The <code>MouseEvent</code> object
+         */
+        private void moveLowerThumb(MouseEvent event) {
+            int halfThumbWidth = getThumbRect().width / 2;
+            int thumbLeft = currentMouseX - offset;
+            int trackLeft = getTrackRect().x;
+            int trackRight = getTrackRect().x + (getTrackRect().width - 1);
+            int hMax = xPositionForValue(getSlider().getLowerValue()
+                    + getSlider().getExtent());
+            if (drawInverted()) {
+                trackLeft = hMax;
+            } else {
+                trackRight = hMax;
+            }
+            thumbLeft = Math.max(thumbLeft, trackLeft - halfThumbWidth);
+            thumbLeft = Math.min(thumbLeft, trackRight - halfThumbWidth);
+            /* set location & repaint */
+            setThumbLocation(thumbLeft, getThumbRect().y);
+            /* set lower value */
+            getSlider().setLowerValue(getSnappedValue(event));
+        }
+
+        /**
+         * Moves the location of the upper thumb, and sets its corresponding
+         * value in the slider.
+         *
+         * @param event The <code>MouseEvent</code> object
+         */
+        private void moveUpperThumb(MouseEvent event) {
+            int halfThumbWidth = getThumbRect().width / 2;
+            int thumbLeft = currentMouseX - offset;
+            int trackLeft = getTrackRect().x;
+            int trackRight = getTrackRect().x + (getTrackRect().width - 1);
+            int hMin = xPositionForValue(getSlider().getLowerValue());
+            if (drawInverted()) {
+                trackRight = hMin;
+            } else {
+                trackLeft = hMin;
+            }
+            thumbLeft = Math.max(thumbLeft, trackLeft - halfThumbWidth);
+            thumbLeft = Math.min(thumbLeft, trackRight - halfThumbWidth);
+            /* set location & repaint */
+            Rectangle upperUnionRect = new Rectangle();
+            upperUnionRect.setBounds(getUpperRect());
+            getUpperRect().setLocation(thumbLeft, getThumbRect().y);
+            SwingUtilities.computeUnion(getUpperRect().x, getUpperRect().y,
+                    getUpperRect().width, getUpperRect().height,
+                    upperUnionRect);
+            getSlider().repaint(upperUnionRect.x, upperUnionRect.y,
+                    upperUnionRect.width, upperUnionRect.height);
+            /* set the new upper value */
+            getSlider().setUpperValue(getSnappedValue(event));
+        }
+
+        /**
+         * Computes the snapped values for the upper/lower relevance slider
+         * value. If the value of the slider is not on a tick, than its value
+         * will be adjusted according to the nearest left or right tick.
+         *
+         * @param evt The <code>MouseEvent</code>
+         * @return The snapped value
+         */
+        private int getSnappedValue(MouseEvent evt) {
+            int pozX = valueForXPosition(evt.getX());
+            int pozY = valueForYPosition(evt.getY());
+            int value = getSlider().getOrientation() ==
+                SwingConstants.HORIZONTAL ? pozX : pozY;
+            int snappedValue = value;
+            int tickSpacing = 0;
+            int majorTickSpacing = getSlider().getMajorTickSpacing();
+            int minorTickSpacing = getSlider().getMinorTickSpacing();
+            if (minorTickSpacing > 0)
+                tickSpacing = minorTickSpacing;
+            else if (majorTickSpacing > 0)
+                tickSpacing = majorTickSpacing;
+            /* If it's not on a tick, change the value */
+            if (tickSpacing != 0) {
+                if ((value - getSlider().getMinimum()) % tickSpacing != 0) {
+                    float temp = (float) (value - getSlider().getMinimum())
+                            / (float) tickSpacing;
+                    snappedValue = getSlider().getMinimum()+ (Math.round(temp)
+                            * tickSpacing);
+                }
+            }
+            return snappedValue;
+        }
+    }
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/slider/package-info.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/slider/package-info.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/slider/package-info.java	(revision 35962)
@@ -0,0 +1,6 @@
+/**
+ * Contains a custom implementation for the MapDust bug relevance
+ * <code>JSlider</code> UI element. This custom implementation defines the
+ * functionality for a <code>JSlider</code> with 2 thumbs.
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.component.slider;
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/util/ComponentUtil.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/util/ComponentUtil.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/util/ComponentUtil.java	(revision 35962)
@@ -0,0 +1,333 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.component.util;
+
+
+import static org.openstreetmap.josm.tools.I18n.tr;
+
+import java.awt.Color;
+import java.awt.Component;
+import java.awt.Font;
+import java.awt.Rectangle;
+import java.util.List;
+
+import javax.swing.AbstractAction;
+import javax.swing.Action;
+import javax.swing.JButton;
+import javax.swing.JCheckBox;
+import javax.swing.JComboBox;
+import javax.swing.JLabel;
+import javax.swing.JList;
+import javax.swing.JMenuItem;
+import javax.swing.JPopupMenu;
+import javax.swing.JScrollPane;
+import javax.swing.JTextField;
+import javax.swing.JTextPane;
+import javax.swing.JToggleButton;
+import javax.swing.ListCellRenderer;
+import javax.swing.ListSelectionModel;
+import javax.swing.SwingConstants;
+import javax.swing.border.LineBorder;
+
+import org.openstreetmap.josm.plugins.mapdust.gui.component.model.ActionListModel;
+import org.openstreetmap.josm.plugins.mapdust.gui.component.model.BugsListModel;
+import org.openstreetmap.josm.plugins.mapdust.gui.component.model.TypesListModel;
+import org.openstreetmap.josm.plugins.mapdust.gui.component.renderer.ActionListCellRenderer;
+import org.openstreetmap.josm.plugins.mapdust.gui.component.renderer.BugListCellRenderer;
+import org.openstreetmap.josm.plugins.mapdust.gui.value.MapdustAction;
+import org.openstreetmap.josm.plugins.mapdust.service.value.BugType;
+import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustBug;
+import org.openstreetmap.josm.tools.ImageProvider;
+
+
+/**
+ * Helper class, used for creating the GUI elements.
+ *
+ * @author Bea
+ * @version $Revision$
+ */
+public final class ComponentUtil {
+
+    private ComponentUtil() {
+        // Hide default constructor for utilities classes
+    }
+    
+    /**
+     * Creates a <code>JLabel</code> object with the given properties.
+     *
+     * @param text The text of the label
+     * @param font The font of the label
+     * @param bounds The bounds of the element
+     * @param color The color of the element
+     * @return A <code>JLabel</code> object
+     */
+    public static JLabel createJLabel(String text, Font font, Rectangle bounds,
+            Color color) {
+        JLabel jLabel = new JLabel();
+        if (bounds != null) {
+            jLabel.setBounds(bounds);
+        }
+        jLabel.setText(text);
+        jLabel.setFont(font);
+        if (color != null) {
+            jLabel.setForeground(color);
+        }
+        jLabel.setVerticalTextPosition(SwingConstants.TOP);
+        return jLabel;
+    }
+
+
+    /**
+     * Creates a <code>JLabel</code> object with the given properties.
+     *
+     * @param text The text of the label
+     * @param iconName The name of the label icon
+     * @param bounds The dimension of the label
+     * @return A <code>JLabel</code> object
+     */
+    public static JLabel createJLabel(String text, String iconName,
+            Rectangle bounds) {
+        JLabel jLabel = new JLabel(text, ImageProvider.get(iconName),
+                SwingConstants.LEFT);
+        jLabel.setBounds(bounds);
+        jLabel.setFont(new Font("Times New Roman", Font.BOLD, 12));
+        return jLabel;
+    }
+
+    /**
+     * Creates a new <code>JButton</code> object with the given properties.
+     *
+     * @param text The text which appears on the button
+     * @param bounds The position and dimension attributes
+     * @param action The action of the button
+     * @return A <code>JButton</code> object
+     */
+    public static JButton createJButton(String text, Rectangle bounds,
+            Action action) {
+        JButton jButton = null;
+        if (action != null) {
+            jButton = new JButton(action);
+        } else {
+            jButton = new JButton();
+        }
+        jButton.setFont(new Font("Times New Roman", Font.BOLD, 14));
+        jButton.setText(text);
+        jButton.setBounds(bounds);
+        return jButton;
+    }
+
+    /**
+     * Creates a new <code>JToggleButton</code> object with the given
+     * properties.
+     *
+     * @param text The text of the button
+     * @param toolTipText The tool tip text
+     * @param iconName The name of the icon
+     * @param action The action of the button
+     * @return A <code>JToggleButton</code> object
+     */
+    public static JToggleButton createJButton(String text, String toolTipText,
+            String iconName, AbstractAction action) {
+        JToggleButton jButton = new JToggleButton(tr(text));
+        if (action != null) {
+            jButton.setAction(action);
+        }
+        if (toolTipText != null) {
+            jButton.setToolTipText(tr(toolTipText));
+        }
+        if (iconName != null) {
+            jButton.setIcon(ImageProvider.get(iconName));
+        } else {
+            jButton.setText(tr(text));
+            jButton.setFont(new Font("Times New Roman", Font.BOLD, 14));
+        }
+        return jButton;
+    }
+
+    /**
+     * Creates a new <code>JTextField</code> object with the given properties.
+     *
+     * @param bounds The position and dimension attributes
+     * @return A <code>JTextField</code> object
+     */
+    public static JTextField createJTextField(Rectangle bounds) {
+        JTextField txtField = new JTextField();
+        txtField.setFont(new Font("Times New Roman", Font.PLAIN, 12));
+        txtField.setBounds(bounds);
+        return txtField;
+    }
+
+    /**
+     * Creates a new <code>JScrollPane</code> object with the given properties.
+     *
+     * @param component The component of the scroll pane
+     * @param bounds The dimension of the component
+     * @param backgroundColor The color of the background
+     * @param noBorder if true then the scroll pane is without border otherwise
+     * the scroll pane will have also a border
+     * @param visible if true then the scroll pane will be visible otherwise the
+     * scroll pane will be invisible
+     * @return A <code>JScrollPane</code> object
+     */
+    public static JScrollPane createJScrollPane(Component component,
+            Rectangle bounds, Color backgroundColor, boolean noBorder,
+            boolean visible) {
+        JScrollPane pane = new JScrollPane();
+        if (bounds != null) {
+            pane.setBounds(bounds);
+        }
+        pane.setBackground(backgroundColor);
+        pane.setViewportView(component);
+        if (noBorder) {
+            pane.setBorder(null);
+        }
+        if (!visible) {
+            pane.setVisible(false);
+        }
+        return pane;
+    }
+
+    /**
+     * Creates a new <code>JScrollPane</code> object with the given properties.
+     *
+     * @param list The list of the scroll pane
+     * @return A <code>JScrollPane</code> object
+     */
+    public static JScrollPane createJScrollPane(JList<?> list) {
+        JScrollPane jScrollPane = new JScrollPane();
+        jScrollPane.setViewportView(list);
+        jScrollPane.setAutoscrolls(true);
+        return jScrollPane;
+    }
+
+    /**
+     * Creates a new <code>JList</code> object with the given properties.
+     *
+     * @param list The list of <code>MapdustAction</code> objects
+     * @return A <code>JList</code> object
+     */
+    public static JList<MapdustAction> createJList(List<MapdustAction> list) {
+        final JList<MapdustAction> jList = new JList<>(new ActionListModel(list));
+        jList.setBorder(new LineBorder(Color.black, 1, false));
+        jList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+        jList.setCellRenderer(new ActionListCellRenderer());
+        jList.setAutoscrolls(true);
+        return jList;
+    }
+
+    /**
+     * Creates a new <code>JList</code> object with the given properties.
+     *
+     * @param bugsList The list of <code>MapdustBug</code> objects
+     * @param menu The menu
+     * @return A <code>JList</code>
+     */
+    public static JList<MapdustBug> createJList(List<MapdustBug> bugsList, final JPopupMenu menu) {
+        final JList<MapdustBug> jList = new JList<>(new BugsListModel(bugsList));
+        jList.setBorder(new LineBorder(Color.black, 1, false));
+        jList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+        jList.setCellRenderer(new BugListCellRenderer());
+        jList.setAutoscrolls(true);
+        return jList;
+    }
+
+    /**
+     * Creates a new <code>JMenuItem</code> object with the given properties.
+     *
+     * @param action the Action of the menu item
+     * @param title The title of the menu item
+     * @param iconPath The path of the icon
+     * @return A <code>JMenuItem</code> object
+     */
+    public static JMenuItem createJMenuItem(Action action, String title,
+            String iconPath) {
+        JMenuItem menuItem = new JMenuItem(action);
+        menuItem.setText(title);
+        menuItem.setIcon(ImageProvider.get(iconPath));
+        menuItem.setFont(new Font("Times New Roman", Font.BOLD, 12));
+        return menuItem;
+    }
+
+    /**
+     * Creates a new <code>JTextPane</code> object with the given properties.
+     *
+     * @param text The text which will appear in the text pane
+     * @param backgroundColor The background color
+     * @return A <code>JTextPane</code> object
+     */
+    public static JTextPane createJTextPane(String text, Color backgroundColor) {
+        JTextPane jTextPane = new JTextPane();
+        jTextPane.setBorder(null);
+        jTextPane.setEditable(false);
+        jTextPane.setBackground(backgroundColor);
+        jTextPane.setFont(new Font("Times New Roman", Font.PLAIN, 14));
+        if (text != null) {
+            jTextPane.setText(text);
+        }
+        jTextPane.setVerifyInputWhenFocusTarget(false);
+        jTextPane.setAutoscrolls(false);
+        return jTextPane;
+    }
+
+    /**
+     * Creates a new <code>JComboBox</code> object with the given properties.
+     *
+     * @param bounds The dimension of the combo box
+     * @param renderer The <code>ListCellRenderer</code> object
+     * @param backgroundColor The background color
+     * @return A <code>JComboBox</code> object
+     */
+    public static JComboBox<BugType> createJComboBox(Rectangle bounds,
+            ListCellRenderer<BugType> renderer, Color backgroundColor) {
+        JComboBox<BugType> jComboBox = new JComboBox<>(new TypesListModel());
+        jComboBox.setSelectedIndex(0);
+        jComboBox.setBackground(backgroundColor);
+        jComboBox.setFont(new Font("Times New Roman", Font.BOLD, 12));
+        jComboBox.setDoubleBuffered(false);
+        jComboBox.setBorder(null);
+        jComboBox.setBounds(bounds);
+        if (renderer != null) {
+            jComboBox.setRenderer(renderer);
+            jComboBox.setMaximumRowCount(7);
+        }
+        return jComboBox;
+    }
+
+    /**
+     * Creates a new <code>JCheckBox</code> object with the given properties.
+     *
+     * @param bounds The dimension of the check box
+     * @return A <code>JCheckBox</code> object
+     */
+    public static JCheckBox createJCheckBox(Rectangle bounds) {
+        JCheckBox jCheckBox = new JCheckBox();
+        jCheckBox.setBounds(bounds);
+        return jCheckBox;
+    }
+
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/util/FilterCheckBox.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/util/FilterCheckBox.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/util/FilterCheckBox.java	(revision 35962)
@@ -0,0 +1,105 @@
+/*
+ * Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ *
+ * Created on Feb 14, 2011 by Bea
+ * Modified on $DateTime$ by $Author$
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.component.util;
+
+
+import java.awt.Rectangle;
+import javax.swing.JCheckBox;
+import javax.swing.JLabel;
+
+
+/**
+ * This is a helper class for the customized <code>JCheckBox</code> object.
+ *
+ * @author Bea
+ * @version $Revision$
+ */
+public class FilterCheckBox {
+
+    /** The identifier of the check box */
+    private Object id;
+
+    /** The <code>JLabel</code> of the filter */
+    private JLabel lblFilter;
+
+    /** The <code>JCheckBox</code> of the filter */
+    private JCheckBox chbFilter;
+
+    /**
+     * Builds a <code>FilterCheckBox</code> object
+     */
+    public FilterCheckBox() {}
+
+    /**
+     * Builds a <code>FilterCheckBox</code> object based on the given parameters
+     *
+     * @param id The identifier of the object
+     * @param chbBounds The bounds of the check box
+     * @param iconName The name of the icon
+     * @param text The text of the filter
+     * @param lblBounds The bounds of the label
+     */
+    public FilterCheckBox(Object id, Rectangle chbBounds, String iconName,
+            String text, Rectangle lblBounds) {
+        this.id = id;
+        this.chbFilter = ComponentUtil.createJCheckBox(chbBounds);
+        this.lblFilter = ComponentUtil.createJLabel(text, iconName, lblBounds);
+    }
+
+    /**
+     * Returns the id
+     *
+     * @return the id
+     */
+    public Object getId() {
+        return id;
+    }
+
+    /**
+     * Returns the filter label
+     *
+     * @return the lblFilter
+     */
+    public JLabel getLblFilter() {
+        return lblFilter;
+    }
+
+    /**
+     * Returns the filter check box
+     *
+     * @return the chbFilter
+     */
+    public JCheckBox getChbFilter() {
+        return chbFilter;
+    }
+
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/util/package-info.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/util/package-info.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/util/package-info.java	(revision 35962)
@@ -0,0 +1,4 @@
+/**
+ * Contains helper classes used for building the GUI.
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.component.util;
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/observer/MapdustActionObservable.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/observer/MapdustActionObservable.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/observer/MapdustActionObservable.java	(revision 35962)
@@ -0,0 +1,61 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.observer;
+
+import org.openstreetmap.josm.plugins.mapdust.gui.value.MapdustAction;
+
+/**
+ * Observable interface for the <code>MapdustAction</code> object.
+ *
+ * @author Bea
+ * @version $Revision$
+ */
+public interface MapdustActionObservable {
+
+    /**
+     * Adds a new observer to the list of observers.
+     *
+     * @param observer The <code>MapdustActionObserver</code> object
+     */
+    void addObserver(MapdustActionObserver observer);
+
+    /**
+     * Removes the given observer from the list of observers.
+     *
+     * @param observer The <code>MapdustActionObserver</code> object
+     */
+    void removeObserver(MapdustActionObserver observer);
+
+    /**
+     * Notifies all the observers observing the given <code>MapdustAction</code>
+     * object.
+     *
+     * @param mapdustAction The <code>MapdustAction</code> object
+     */
+    void notifyObservers(MapdustAction mapdustAction);
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/observer/MapdustActionObserver.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/observer/MapdustActionObserver.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/observer/MapdustActionObserver.java	(revision 35962)
@@ -0,0 +1,46 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.observer;
+
+import org.openstreetmap.josm.plugins.mapdust.gui.value.MapdustAction;
+
+/**
+ * The observer interface for the <code>MapdustAction</code> object.
+ *
+ * @author Bea
+ * @version $Revision$
+ */
+public interface MapdustActionObserver {
+
+    /**
+     * Adds a new <code>MapdustAction</code> object to the MapDust action list
+     *
+     * @param mapdustAction The <code>MapdustAction</code> list
+     */
+    void addAction(MapdustAction mapdustAction);
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/observer/MapdustBugDetailsObservable.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/observer/MapdustBugDetailsObservable.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/observer/MapdustBugDetailsObservable.java	(revision 35962)
@@ -0,0 +1,61 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.observer;
+
+import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustBug;
+
+/**
+ * The observable interface for the <code>MapdustBug</code> object details.
+ *
+ * @author Bea
+ * @version $Revision$
+ */
+public interface MapdustBugDetailsObservable {
+
+    /**
+     * Adds a new observer to the list of observers.
+     *
+     * @param observer The <code>MapdustBugDetailsObserver</code> object
+     */
+    void addObserver(MapdustBugDetailsObserver observer);
+
+    /**
+     * Removes the given observer from the list of observers.
+     *
+     * @param observer The <code>MapdustBugDetailsObserver</code> object
+     */
+    void removeObserver(MapdustBugDetailsObserver observer);
+
+    /**
+     * Notifies all the observers observing the details of the given
+     * <code>MapdustBug</code> object.
+     *
+     * @param mapdustBug The <code>MapdustBug</code> object
+     */
+    void notifyObservers(MapdustBug mapdustBug);
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/observer/MapdustBugDetailsObserver.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/observer/MapdustBugDetailsObserver.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/observer/MapdustBugDetailsObserver.java	(revision 35962)
@@ -0,0 +1,47 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.observer;
+
+import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustBug;
+
+/**
+ * The observer interface for the <code>MapdustBug</code> object details.
+ *
+ * @author Bea
+ * @version $Revision$
+ */
+public interface MapdustBugDetailsObserver {
+
+    /**
+     * Shows the details of the <code>MapdustBug</code> object in the MapDust
+     * plugin panel.
+     *
+     * @param mapdustBug The <code>MapdustBug</code> object
+     */
+    void showDetails(MapdustBug mapdustBug);
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/observer/MapdustBugObservable.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/observer/MapdustBugObservable.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/observer/MapdustBugObservable.java	(revision 35962)
@@ -0,0 +1,63 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.observer;
+
+
+import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustBug;
+
+/**
+ * The observable interface for the <code>MapdustBug</code> object. Observes the
+ * changes of a given <code>MapdustBug</code> object.
+ *
+ * @author Bea
+ * @version $Revision$
+ */
+public interface MapdustBugObservable {
+
+    /**
+     * Adds a new observer to the list of observers.
+     *
+     * @param observer The <code>MapdustBugObserver</code> object
+     */
+    void addObserver(MapdustBugObserver observer);
+
+    /**
+     * Removes the given observer from the list of observers.
+     *
+     * @param observer The <code>MapdustBugObserver</code> object
+     */
+    void removeObserver(MapdustBugObserver observer);
+
+    /**
+     * Notifies all the observers observing the given <code>MapdustBug</code>
+     * object.
+     *
+     * @param mapdustBug The <code>MapdustBug</code> object
+     */
+    void notifyObservers(MapdustBug mapdustBug);
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/observer/MapdustBugObserver.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/observer/MapdustBugObserver.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/observer/MapdustBugObserver.java	(revision 35962)
@@ -0,0 +1,46 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.observer;
+
+import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustBug;
+
+/**
+ * The observer interface for the <code>MapdustBug</code> object.
+ *
+ * @author Bea
+ * @version $Revision$
+ */
+public interface MapdustBugObserver {
+
+    /**
+     * Modifies the given <code>MapdustBug</code> object.
+     *
+     * @param mapdustBug A <code>MapdustBug</code> object
+     */
+    void changedData(MapdustBug mapdustBug);
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/observer/MapdustUpdateObservable.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/observer/MapdustUpdateObservable.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/observer/MapdustUpdateObservable.java	(revision 35962)
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ *
+ * Created on Feb 10, 2011 by Bea
+ * Modified on $DateTime$ by $Author$
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.observer;
+
+
+import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustBugFilter;
+
+/**
+ * The observable interface for the MapDust bug update action.
+ *
+ * @author Bea
+ * @version $Revision$
+ */
+public interface MapdustUpdateObservable {
+
+    /**
+     * Adds a new observer to the list of observers.
+     *
+     * @param observer The <code>MapdustUpdateObserver</code> object
+     */
+    void addObserver(MapdustUpdateObserver observer);
+
+    /**
+     * Removes the given observer from the list of observers.
+     *
+     * @param observer The <code>MapdustUpdateObserver</code> object
+     */
+    void removeObserver(MapdustUpdateObserver observer);
+
+    /**
+     * Notifies all the observers observing the MapDust bug update action.
+     *
+     * @param filter The <code>MapdustBugFilter</code> object
+     * @param initialUpdate Indicates if the update action is for the first time
+     * or not.
+     */
+    void notifyObservers(MapdustBugFilter filter, boolean initialUpdate);
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/observer/MapdustUpdateObserver.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/observer/MapdustUpdateObserver.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/observer/MapdustUpdateObserver.java	(revision 35962)
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ *
+ * Created on Feb 10, 2011 by Bea
+ * Modified on $DateTime$ by $Author$
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.observer;
+
+
+import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustBugFilter;
+
+
+/**
+ * The observer interface for the MapDust bug update action.
+ *
+ * @author Bea
+ * @version $Revision$
+ */
+public interface MapdustUpdateObserver {
+
+    /**
+     * Updates the MapDust bugs based on the given filters. If the initialUpdate
+     * flag is true then the filters will not be applied to the MapDust bug
+     * data. The initialUpdate flag can be true in one the following cases:
+     * 1) After JOSM startup , 2) If the MapDust layer was re-added after a
+     * previous deletion.
+     *
+     * @param filter The <code>MapdustBugFilter</code> object
+     * @param initialUpdate Indicates if the update action is for the first time
+     * or not.
+     */
+    void update(MapdustBugFilter filter, boolean initialUpdate);
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/observer/package-info.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/observer/package-info.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/observer/package-info.java	(revision 35962)
@@ -0,0 +1,4 @@
+/**
+ * Contains the observer and observable interfaces.
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.observer;
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/package-info.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/package-info.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/package-info.java	(revision 35962)
@@ -0,0 +1,8 @@
+/**
+ * Contains the graphical user interface related classes of the MapDust plugin.
+ * These classes are divided based on their type in the following four packages:
+ * action, component, observer and value.
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui;
+
+
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/value/MapdustAction.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/value/MapdustAction.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/value/MapdustAction.java	(revision 35962)
@@ -0,0 +1,157 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.value;
+
+
+import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustBug;
+import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustComment;
+
+
+/**
+ * Represents the <code>MapdustAction</code> object .
+ *
+ * @author Bea
+ *
+ */
+public class MapdustAction {
+
+    /** The <code>MapdustServiceCommand</code> object */
+    private MapdustServiceCommand command;
+
+    /** The icon path */
+    private String iconPath;
+
+    /** The <code>MapdustBug</code> object */
+    private MapdustBug mapdustBug;
+
+    /** The <code>MapdustComment</code> object */
+    private MapdustComment mapdustComment;
+
+    /** The new status of the bug */
+    private Integer newStatus;
+
+    /**
+     * The <code>MapdustAction</code> object
+     */
+    public MapdustAction() {}
+
+    /**
+     * The <code>MapdustAction</code> object.
+     *
+     * @param command The <code>MapdustServiceCommand</code> object
+     * @param iconPath The icon path
+     * @param mapdustBug The <code>MapdustBug</code> object
+     */
+    public MapdustAction(MapdustServiceCommand command, String iconPath,
+            MapdustBug mapdustBug) {
+        this.command = command;
+        this.iconPath = iconPath;
+        this.mapdustBug = mapdustBug;
+    }
+
+    /**
+     * The <code>MapdustAction</code> object.
+     *
+     * @param command The <code>MapdustServiceCommand</code> object
+     * @param iconPath The icon path
+     * @param mapdustBug The <code>MapdustBug</code> object
+     * @param mapdustComment The <code>MapdustComment</code> object
+     */
+    public MapdustAction(MapdustServiceCommand command, String iconPath,
+            MapdustBug mapdustBug, MapdustComment mapdustComment) {
+        this.command = command;
+        this.iconPath = iconPath;
+        this.mapdustBug = mapdustBug;
+        this.mapdustComment = mapdustComment;
+    }
+
+    /**
+     * The <code>MapdustAction</code> object.
+     *
+     * @param command The <code>MapdustServiceCommand</code> object
+     * @param iconPath The icon path
+     * @param mapdustBug The <code>MapdustBug</code> object
+     * @param mapdustComment The <code>MapdustComment</code> object
+     * @param newStatus The new status of the object
+     */
+    public MapdustAction(MapdustServiceCommand command, String iconPath,
+            MapdustBug mapdustBug, MapdustComment mapdustComment,
+            Integer newStatus) {
+        this.command = command;
+        this.iconPath = iconPath;
+        this.mapdustBug = mapdustBug;
+        this.mapdustComment = mapdustComment;
+        this.newStatus = newStatus;
+    }
+
+    /**
+     * Returns the <code>MapdustServiceCommand</code> object
+     *
+     * @return the command
+     */
+    public MapdustServiceCommand getCommand() {
+        return command;
+    }
+
+    /**
+     * Returns the <code>MapdustComment</code> object
+     *
+     * @return the mapdustComment
+     */
+    public MapdustComment getMapdustComment() {
+        return mapdustComment;
+    }
+
+    /**
+     * Returns the icon path
+     *
+     * @return the iconPath
+     */
+    public String getIconPath() {
+        return iconPath;
+    }
+
+    /**
+     * Returns the <code>MapdustBug</code> object
+     *
+     * @return the mapdustBug
+     */
+    public MapdustBug getMapdustBug() {
+        return mapdustBug;
+    }
+
+    /**
+     * Returns the status
+     *
+     * @return the newStatus
+     */
+    public Integer getNewStatus() {
+        return newStatus;
+    }
+
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/value/MapdustPluginState.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/value/MapdustPluginState.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/value/MapdustPluginState.java	(revision 35962)
@@ -0,0 +1,89 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.value;
+
+
+/**
+ * Enumeration representing the MapDust plugin state. The plugin can be in the
+ * following 2 states: online and offline.
+ *
+ * @author Bea
+ */
+public enum MapdustPluginState {
+
+    /** The online state */
+    ONLINE("online"),
+
+    /** The offline state */
+    OFFLINE("offline");
+
+    /** The value of the state */
+    private final String value;
+
+    /**
+     * Builds a new <code>ActivationStatus</code> with the given value
+     *
+     * @param value The value of the object
+     */
+    MapdustPluginState(String value) {
+        this.value = value;
+    }
+
+    /**
+     * Returns the value of the payment status
+     *
+     * @return value
+     */
+    public String getValue() {
+        return value;
+    }
+
+    /**
+     * Returns a <code>MapdustPluginState</code> object for the given type. If
+     * the type is invalid, the method return null.
+     * @param type The type
+     * @return A <code>MapdustPluginState</code> object.
+     */
+    public static MapdustPluginState getMapdustPluginState(String type) {
+        MapdustPluginState[] pluginStates = values();
+        if (pluginStates != null) {
+            for (MapdustPluginState state : pluginStates) {
+                if (state.getValue().equalsIgnoreCase(type)) {
+                    return state;
+                }
+            }
+        }
+        return null;
+    }
+
+    @Override
+    public String toString() {
+        return getClass().getSimpleName() + ":'" + getValue() + "'";
+    }
+
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/value/MapdustRelevanceValue.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/value/MapdustRelevanceValue.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/value/MapdustRelevanceValue.java	(revision 35962)
@@ -0,0 +1,135 @@
+/*
+ * Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ *
+ * Created on Apr 6, 2011 by Bea
+ * Modified on $DateTime$ by $Author$
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.value;
+
+
+import java.util.HashMap;
+import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustRelevance;
+
+
+/**
+ * This is a helper object, used for representing the MapDust bug relevance -
+ * actual value mappings (value from the slider).
+ *
+ * @author Bea
+ * @version $Revision$
+ */
+public final class MapdustRelevanceValue {
+
+    /** The low MapDust bug relevance value */
+    public static final MapdustRelevanceValue LOW = new MapdustRelevanceValue(
+            MapdustRelevance.LOW, 0);
+
+    /** The mid-low MapDust bug relevance value */
+    public static final MapdustRelevanceValue MID_LOW =
+            new MapdustRelevanceValue(MapdustRelevance.MID_LOW, 4);
+
+    /** The medium MapDust bug relevance value */
+    public static final MapdustRelevanceValue MEDIUM =
+            new MapdustRelevanceValue(MapdustRelevance.MEDIUM, 8);
+
+    /** The mid-high MapDust bug relevance value */
+    public static final MapdustRelevanceValue MID_HIGH =
+            new MapdustRelevanceValue(MapdustRelevance.MID_HIGH, 12);
+
+    /** The high MapDust bug relevance value */
+    public static final MapdustRelevanceValue HIGH = new MapdustRelevanceValue(
+            MapdustRelevance.HIGH, 16);
+
+    /** The MapDust bug relevance */
+    private MapdustRelevance relevance;
+
+    /** The actual slider value corresponding for this relevance */
+    private int sliderValue;
+
+    /**
+     * The hash map containing the valid <code>MapdustRelevanceValue</code>
+     * objects
+     */
+    private static java.util.HashMap<MapdustRelevance, Integer> map;
+
+    /**
+     * Builds a new <code>MapdustRelevanceValue</code> object.
+     */
+    private MapdustRelevanceValue() {}
+
+    /**
+     * Builds a new <code>MapdustRelevanceValue</code> object based on the given
+     * arguments.
+     *
+     * @param relevance The MapDust bug relevance
+     * @param sliderValue The actual slider value
+     */
+    private MapdustRelevanceValue(MapdustRelevance relevance, int sliderValue) {
+        this.relevance = relevance;
+        this.sliderValue = sliderValue;
+        if (MapdustRelevanceValue.map == null) {
+            MapdustRelevanceValue.map =
+                    new HashMap<>();
+        }
+        MapdustRelevanceValue.map.put(relevance, sliderValue);
+    }
+
+    /**
+     * Returns the slider value for the given MapDust bug relevance. If the
+     * given relevance does not exists, then the method returns null.
+     *
+     * @param relevance The <code>MapdustRelevanceValue</code> object
+     * @return The corresponding slider value
+     */
+    public static Integer getSliderValue(MapdustRelevance relevance) {
+        if (relevance != null) {
+            Integer sliderValue = MapdustRelevanceValue.map.get(relevance);
+            return sliderValue;
+        }
+        return null;
+    }
+
+    /**
+     * Returns the relevance
+     *
+     * @return the relevance
+     */
+    public MapdustRelevance getRelevance() {
+        return relevance;
+    }
+
+    /**
+     * Returns the slider value
+     *
+     * @return the sliderValue
+     */
+    public int getSliderValue() {
+        return sliderValue;
+    }
+
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/value/MapdustServiceCommand.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/value/MapdustServiceCommand.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/value/MapdustServiceCommand.java	(revision 35962)
@@ -0,0 +1,76 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.value;
+
+
+/**
+ * Enumeration representing the MapDust service "commands".
+ *
+ * @author Bea
+ * @version $Revision$
+ */
+public enum MapdustServiceCommand {
+
+    /** The add bug command */
+    ADD_BUG("addBug", "Add Bug"),
+    /** The comment bug command */
+    COMMENT_BUG("commentBug", "Comment Bug"),
+    /** The change bug status command */
+    CHANGE_BUG_STATUS("changeBugStatus", "Modify Bug status");
+
+    /** The key */
+    private final String key;
+
+    /** The value */
+    private final String value;
+
+    /**
+     * Builds a new <code>MapdustServiceCommand</code> object
+     *
+     * @param key The key
+     * @param value The value
+     */
+    MapdustServiceCommand(String key, String value) {
+        this.key = key;
+        this.value = value;
+    }
+
+    /**
+     * @return the key
+     */
+    public String getKey() {
+        return key;
+    }
+
+    /**
+     * @return the value
+     */
+    public String getValue() {
+        return value;
+    }
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/value/package-info.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/value/package-info.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/value/package-info.java	(revision 35962)
@@ -0,0 +1,4 @@
+/**
+ * Contains helper classes used by GUI.
+ */
+package org.openstreetmap.josm.plugins.mapdust.gui.value;
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/package-info.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/package-info.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/package-info.java	(revision 35962)
@@ -0,0 +1,5 @@
+/**
+ * Contains the JOSM MapDust Bug reporter plugin classes.
+ *
+ */
+package org.openstreetmap.josm.plugins.mapdust;
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/MapdustConverter.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/MapdustConverter.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/MapdustConverter.java	(revision 35962)
@@ -0,0 +1,271 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.service;
+
+
+import java.util.ArrayList;
+import java.util.List;
+import org.openstreetmap.josm.data.coor.LatLon;
+import org.openstreetmap.josm.plugins.mapdust.service.connector.response.Geometry;
+import org.openstreetmap.josm.plugins.mapdust.service.connector.response.MapdustBugContent;
+import org.openstreetmap.josm.plugins.mapdust.service.connector.response.MapdustBugProperties;
+import org.openstreetmap.josm.plugins.mapdust.service.connector.response.MapdustCommentProperties;
+import org.openstreetmap.josm.plugins.mapdust.service.connector.response.MapdustGetBugResponse;
+import org.openstreetmap.josm.plugins.mapdust.service.connector.response.MapdustGetBugsResponse;
+import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustBug;
+import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustComment;
+import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustRelevance;
+import org.openstreetmap.josm.plugins.mapdust.service.value.Status;
+import org.openstreetmap.josm.plugins.mapdust.service.value.BugType;
+
+
+/**
+ * The <code>MapdustConverter</code> object. Builds a MapdustBug, list of
+ * MapdustBug based on the given response object.
+ * 
+ * @author Bea
+ * 
+ */
+final class MapdustConverter {
+    
+    private MapdustConverter() {
+        // Hide default constructor for utilities classes
+    }
+    
+    /**
+     * Builds a <code>MapdustBug</code> object from the given
+     * <code>MapdustGetBugResponse</code> object.
+     * 
+     * @param bugResponse A <code>MapdustGetBugResponse</code> object.
+     * @return A <code>MapdustBug</code> object.
+     */
+    static MapdustBug buildMapdustBug(MapdustGetBugResponse bugResponse) {
+        MapdustBug bug = new MapdustBug();
+        if (bugResponse != null) {
+            /* sets the id */
+            bug.setId(bugResponse.getId());
+            /* sets the coordinates */
+            Geometry geometry = bugResponse.getGeometry();
+            LatLon latLon = null;
+            if (geometry != null && geometry.getCoordinates() != null
+                    && geometry.getCoordinates().length == 2) {
+                Double longitude = geometry.getCoordinates()[0];
+                Double latitude = geometry.getCoordinates()[1];
+                latLon = new LatLon(latitude, longitude);
+            }
+            bug.setLatLon(latLon);
+            /* sets the properties of the bug */
+            MapdustBugProperties bugProperties = bugResponse.getProperties();
+            if (bugProperties != null) {
+                /* sets the address */
+                bug.setAddress(bugProperties.getAddress());
+                /* sets the status */
+                Status status = Status.getStatus(bugProperties.getStatus());
+                bug.setStatus(status);
+                /* sets the type */
+                BugType type = BugType.getType(bugProperties.getType());
+                bug.setType(type);
+                /* sets the relevance */
+                MapdustRelevance relevance =
+                        MapdustRelevance.getMapdustRelevance(bugProperties
+                                .getRelevance());
+                bug.setRelevance(relevance);
+                /* sets the creation date */
+                bug.setDateCreated(bugProperties.getDateCreated());
+                /* sets the update date */
+                bug.setDateUpdated(bugProperties.getDateUpdated());
+                /* sets the description */
+                bug.setDescription(bugProperties.getDescription());
+                /* sets the isDefaultDescription */
+                boolean isDefDescr =
+                        bugProperties.getIsDefaultDescription() == 1 ? Boolean.TRUE
+                                : Boolean.FALSE;
+                bug.setIsDefaultDescription(isDefDescr);
+                /* sets the skobbler user id */
+                bug.setSkoUid(bugProperties.getSkoUid());
+                /* sets the external user id */
+                bug.setExtUid(bugProperties.getExtUid());
+                /* sets the nickname */
+                bug.setNickname(bugProperties.getNickname());
+                /* sets the source */
+                bug.setSource(bugProperties.getSource());
+                /* sets the kml url */
+                bug.setKmlUrl(bugProperties.getKmlUrl());
+                /* sets the number of comments */
+                bug.setNumberOfComments(bugProperties.getNumberOfComments());
+                /* sets the comments */
+                MapdustCommentProperties[] commentProperties =
+                        bugProperties.getComments();
+                MapdustComment[] commentArray =
+                        buildMapdustCommentArray(bug.getId(), commentProperties);
+                bug.setComments(commentArray);
+            }
+        }
+        return bug;
+    }
+    
+    /**
+     * Builds a list of <code>MapdustBug</code> objects based on the given
+     * <code>MapdustGetBugsResponse</code> object.
+     * 
+     * @param bugsResponse A <code>MapdustGetBugsResponse</code> object
+     * @return A list of <code>MapdustBug</code> objects
+     */
+    static List<MapdustBug> buildMapdustBugList(
+            MapdustGetBugsResponse bugsResponse) {
+        List<MapdustBug> bugsList = new ArrayList<>();
+        if (bugsResponse != null) {
+            MapdustBugContent[] bugContent = bugsResponse.getFeatures();
+            if (bugContent != null) {
+                for (MapdustBugContent obj : bugContent) {
+                    MapdustBug bug = buildMapdustBug(obj);
+                    bugsList.add(bug);
+                }
+            }
+        }
+        return bugsList;
+    }
+    
+    /**
+     * Builds a <code>MapdustBug</code> object from the given
+     * <code>MapdustBugContent</code> object.
+     * 
+     * @param bugContent A <code>MapdustBugContent</code> object
+     * @return A <code>MapdustBug</code> object.
+     */
+    private static MapdustBug buildMapdustBug(MapdustBugContent bugContent) {
+        MapdustBug bug = new MapdustBug();
+        if (bugContent != null) {
+            /* set the id */
+            bug.setId(bugContent.getId());
+            /* set the coordinates */
+            Geometry geometry = bugContent.getGeometry();
+            LatLon latLon = null;
+            if (geometry != null && geometry.getCoordinates() != null
+                    && geometry.getCoordinates().length == 2) {
+                Double longitude = geometry.getCoordinates()[0];
+                Double latitude = geometry.getCoordinates()[1];
+                latLon = new LatLon(latitude, longitude);
+            }
+            bug.setLatLon(latLon);
+            /* set the bug properties */
+            MapdustBugProperties bugProperties = bugContent.getProperties();
+            if (bugProperties != null) {
+                /* sets the address */
+                bug.setAddress(bugProperties.getAddress());
+                /* sets the status */
+                Status status = Status.getStatus(bugProperties.getStatus());
+                bug.setStatus(status);
+                /* sets the type */
+                BugType type = BugType.getType(bugProperties.getType());
+                bug.setType(type);
+                /* sets the relevance */
+                MapdustRelevance relevance =
+                        MapdustRelevance.getMapdustRelevance(bugProperties
+                                .getRelevance());
+                bug.setRelevance(relevance);
+                /* sets the creation date */
+                bug.setDateCreated(bugProperties.getDateCreated());
+                /* sets the update date */
+                bug.setDateUpdated(bugProperties.getDateUpdated());
+                /* sets the description */
+                bug.setDescription(bugProperties.getDescription());
+                /* sets the skobbler user id */
+                bug.setSkoUid(bugProperties.getSkoUid());
+                /* sets the external user id */
+                bug.setExtUid(bugProperties.getExtUid());
+                /* sets the nickname */
+                bug.setNickname(bugProperties.getNickname());
+                /* sets the source */
+                bug.setSource(bugProperties.getSource());
+                /* sets the kml url */
+                bug.setKmlUrl(bugProperties.getKmlUrl());
+                /* sets the number of comments */
+                bug.setNumberOfComments(bugProperties.getNumberOfComments());
+                /* sets the comments */
+                MapdustCommentProperties[] commentProperties =
+                        bugProperties.getComments();
+                MapdustComment[] commentArray =
+                        buildMapdustCommentArray(bug.getId(), commentProperties);
+                bug.setComments(commentArray);
+            }
+        }
+        return bug;
+    }
+    
+    /**
+     * Builds a <code>MapdustComment</code> object based on the given arguments.
+     * 
+     * @param bugId The id of the bug
+     * @param commentProperties The <code>MapdustCommentProperties</code>
+     * object.
+     * @return A <code>MapdustComment</code> object
+     */
+    private static MapdustComment buildMapdustComment(Long bugId,
+            MapdustCommentProperties commentProperties) {
+        MapdustComment comment = new MapdustComment();
+        if (bugId != null) {
+            comment.setBugId(bugId);
+        }
+        if (commentProperties != null) {
+            comment.setDateCreated(commentProperties.getDateCreated());
+            comment.setCommentText(commentProperties.getComment());
+            comment.setExtUid(commentProperties.getExtUid());
+            comment.setNickname(commentProperties.getNickname());
+            comment.setSkoUid(commentProperties.getSkoUid());
+            comment.setSource(commentProperties.getSource());
+        }
+        return comment;
+    }
+    
+    /**
+     * Builds an array of <code>MapdustComment</code> objects based on the given
+     * arguments.
+     * 
+     * @param bugId the if of the bug
+     * @param commentProperties The array of
+     * <code>MapdusrCommentProperties</code> objects
+     * @return An array of <code>MapdustComment</code> object
+     */
+    private static MapdustComment[] buildMapdustCommentArray(Long bugId,
+            MapdustCommentProperties[] commentProperties) {
+        List<MapdustComment> commentList = new ArrayList<>();
+        if (bugId != null) {
+            if (commentProperties != null) {
+                for (MapdustCommentProperties obj : commentProperties) {
+                    MapdustComment comment = buildMapdustComment(bugId, obj);
+                    commentList.add(comment);
+                }
+            }
+        }
+        MapdustComment[] commentArray =
+                commentList.toArray(new MapdustComment[0]);
+        return commentArray;
+    }
+    
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/MapdustServiceHandler.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/MapdustServiceHandler.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/MapdustServiceHandler.java	(revision 35962)
@@ -0,0 +1,238 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.service;
+
+
+import java.util.List;
+import org.openstreetmap.josm.plugins.mapdust.service.connector.MapdustConnector;
+import org.openstreetmap.josm.plugins.mapdust.service.connector.MapdustConnectorException;
+import org.openstreetmap.josm.plugins.mapdust.service.connector.response.MapdustGetBugResponse;
+import org.openstreetmap.josm.plugins.mapdust.service.connector.response.MapdustGetBugsResponse;
+import org.openstreetmap.josm.plugins.mapdust.service.connector.response.MapdustPostResponse;
+import org.openstreetmap.josm.plugins.mapdust.service.value.BoundingBox;
+import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustBug;
+import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustBugFilter;
+import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustComment;
+import org.openstreetmap.josm.plugins.mapdust.service.value.Paging;
+
+
+/**
+ * This class responsibility is to handle the MapDust API HTTP
+ * request/responses.
+ *
+ * @author Bea
+ *
+ */
+public class MapdustServiceHandler {
+
+    /** The <code>MapdustConnector</code> object */
+    private final MapdustConnector connector;
+
+    /**
+     * Builds a <code>MapdustServiceHandler</code> object with the default
+     * settings.
+     *
+     */
+    public MapdustServiceHandler() {
+        this.connector = new MapdustConnector();
+    }
+
+    /**
+     * Builds a <code>MapdustServiceHandler</code> object based on the given
+     * arguments.
+     *
+     * @param connector The <code>MapdustConnector</code> object
+     */
+    public MapdustServiceHandler(MapdustConnector connector) {
+        this.connector = connector;
+    }
+
+    /**
+     * Searches for the <code>MapdustBug</code> objects in the bounding box
+     * defined by the given coordinates. If there are no bugs in the given area
+     * then an empty list will be returned. If one of the coordinates is missing
+     * a corresponding exception will be thrown.
+     *
+     * @param bBox The bounding box where the bugs are searched.
+     * @param filter The MapDust bug filter. The bugs can be filtered based on
+     * the status, type and description. This parameter is not required.
+     * @return A list of <code>MapdustBug</code> objects.
+     * @throws MapdustServiceHandlerException In the case of an error
+     */
+    public List<MapdustBug> getBugs(BoundingBox bBox, MapdustBugFilter filter)
+            throws MapdustServiceHandlerException {
+        MapdustGetBugsResponse getBugsResponse = null;
+        /* validates the coordinates */
+        if (bBox.getMinLon() == null || bBox.getMinLat() == null
+                || bBox.getMaxLon() == null || bBox.getMaxLat() == null) {
+            throw new MapdustServiceHandlerException("Invalid coordinates!");
+        }
+        /* executes the getBug MapDust method */
+        try {
+            getBugsResponse = connector.getBugs(bBox, filter);
+        } catch (MapdustConnectorException e) {
+            throw new MapdustServiceHandlerException(e.getMessage(), e);
+        }
+        /* converts the result into a list of MapDust bugs */
+        List<MapdustBug> bugsList =
+                MapdustConverter.buildMapdustBugList(getBugsResponse);
+        return bugsList;
+    }
+
+    /**
+     * Retrieves the <code>MapdustBug</code> object with the given id. If the
+     * paging object is not null, then the comments of the bug will be
+     * paginated. If no bug found with the given id, then an empty object will
+     * be returned.
+     *
+     * @param id The id of the object. This parameter is a required parameter.
+     * @param paging A <code>Paging</code> object. This parameter is optional.
+     * If it is null, it will be ignored.
+     * @return A <code>MapdustBug</code> object with the given id.
+     * @throws MapdustServiceHandlerException In the case of an error
+     */
+    public MapdustBug getBug(Long id, Paging paging)
+            throws MapdustServiceHandlerException {
+        MapdustGetBugResponse getBugResponse = null;
+        /* validate id */
+        if (id == null) {
+            String errorMessage = "Invalid id. The id cannot be null!";
+            throw new MapdustServiceHandlerException(errorMessage);
+        }
+        /* executes the getBug MapDust method */
+        try {
+            getBugResponse = connector.getBug(id, paging);
+        } catch (MapdustConnectorException e) {
+            throw new MapdustServiceHandlerException(e.getMessage(), e);
+        }
+        /* converts the response into a MapdustBug object */
+        MapdustBug bug = MapdustConverter.buildMapdustBug(getBugResponse);
+        return bug;
+    }
+
+    /**
+     * Adds a new <code>MapdustBug</code> object to the MapDust OSM bug service.
+     * If the object is null, a corresponding exception will be thrown.
+     *
+     * @param bug A <code>BugReport</code> object
+     * @return The if of the created bug.
+     * @throws MapdustServiceHandlerException In the case of an error
+     */
+    public Long addBug(MapdustBug bug) throws MapdustServiceHandlerException {
+        MapdustPostResponse postResponse = null;
+        /* validates the bug */
+        if (bug == null) {
+            String errorMessage = "Invalid bug. The bug cannot be null!";
+            throw new MapdustServiceHandlerException(errorMessage);
+        }
+        /* executes the addBug MapDust method */
+        try {
+            postResponse = connector.addBug(bug);
+        } catch (MapdustConnectorException e) {
+            throw new MapdustServiceHandlerException(e.getMessage(), e);
+        }
+        /* get the id */
+        Long id = null;
+        if (postResponse != null) {
+            id = postResponse.getId();
+        }
+        return id;
+    }
+
+    /**
+     * Create a comment for a given MapDust bug. If the
+     * <code>MapdustComment</code> object is null, an exception will be thrown.
+     * The method returns the id of the created <code>MapdustComment</code>
+     * object.
+     *
+     * @param comment A <code>MapdustComment</code> object.
+     * @return The id of the created object.
+     * @throws MapdustServiceHandlerException In the case of an error.
+     */
+    public Long commentBug(MapdustComment comment)
+            throws MapdustServiceHandlerException {
+        MapdustPostResponse postResponse = null;
+        /* validates comment */
+        if (comment == null) {
+            String errorMessage = "Invalid comment. The comment cannot be null!";
+            throw new MapdustServiceHandlerException(errorMessage);
+        }
+        /* execute commentBug MapDust method */
+        try {
+            postResponse = connector.commentBug(comment);
+        } catch (MapdustConnectorException e) {
+            throw new MapdustServiceHandlerException(e.getMessage(), e);
+        }
+        /* get the id */
+        Long id = null;
+        if (postResponse != null) {
+            id = postResponse.getId();
+        }
+        return id;
+    }
+
+    /**
+     * Changes the status of a given MapDust bug. The status of a MapDust bug
+     * can be one of the following: 1-open, 2-fixed, 3-invalid. If the statusId
+     * or the comment is null an exception will be thrown.
+     *
+     * @param statusId The id of the status. Possible values are:1, 2, or 3.
+     * @param comment The <code>MapdustComment</code> object.
+     * @return The id of the bug object.
+     * @throws MapdustServiceHandlerException In the case of an error.
+     */
+    public Long changeBugStatus(Integer statusId, MapdustComment comment)
+            throws MapdustServiceHandlerException {
+        MapdustPostResponse postResponse = null;
+        /* validates statusId */
+        if (statusId == null) {
+            String errorMessage = "Invalid status id. The status id cannot ";
+            errorMessage += "be null!";
+            throw new MapdustServiceHandlerException(errorMessage);
+        }
+        /* validates comment */
+        if (comment == null) {
+            String errorMessage =
+                    "Invalid comment. The comment cannot be null!";
+            throw new MapdustServiceHandlerException(errorMessage);
+        }
+        /* executes changeBugStatus MapDust method */
+        try {
+            postResponse = connector.changeBugStatus(statusId, comment);
+        } catch (MapdustConnectorException e) {
+            throw new MapdustServiceHandlerException(e.getMessage(), e);
+        }
+        /* get the id */
+        Long id = null;
+        if (postResponse != null) {
+            id = postResponse.getId();
+        }
+        return id;
+    }
+
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/MapdustServiceHandlerException.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/MapdustServiceHandlerException.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/MapdustServiceHandlerException.java	(revision 35962)
@@ -0,0 +1,78 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.service;
+
+
+/**
+ * Defines the exception type for <code>MapdustServiceHandler</code> object.
+ *
+ * @author Bea
+ */
+public class MapdustServiceHandlerException extends Exception {
+
+    /** The serial version UID */
+    private static final long serialVersionUID = -2860059748215555626L;
+
+    /**
+     * Builds an empty <code>MapdustServiceHandlerException</code> object.
+     */
+    public MapdustServiceHandlerException() {
+        super();
+    }
+
+    /**
+     * Builds a <code>MapdustServiceHandlerException</code> object based on the
+     * given argument.
+     *
+     * @param message The message of the exception.
+     */
+    public MapdustServiceHandlerException(String message) {
+        super(message);
+    }
+
+    /**
+     * Builds a <code>MapdustServiceHandlerException</code> object based on the
+     * given argument.
+     *
+     * @param cause The cause of the exception.
+     */
+    public MapdustServiceHandlerException(Throwable cause) {
+        super(cause);
+    }
+
+    /**
+     * Builds a <code>MapdustServiceHandlerException</code> object based on the
+     * given arguments.
+     *
+     * @param message The message of the exception.
+     * @param cause The cause of the exception.
+     */
+    public MapdustServiceHandlerException(String message, Throwable cause) {
+        super(message, cause);
+    }
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/connector/MapdustConnector.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/connector/MapdustConnector.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/connector/MapdustConnector.java	(revision 35962)
@@ -0,0 +1,557 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.service.connector;
+
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import org.openstreetmap.josm.plugins.mapdust.service.connector.response.MapdustGetBugResponse;
+import org.openstreetmap.josm.plugins.mapdust.service.connector.response.MapdustGetBugsResponse;
+import org.openstreetmap.josm.plugins.mapdust.service.connector.response.MapdustPostResponse;
+import org.openstreetmap.josm.plugins.mapdust.service.value.BoundingBox;
+import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustBug;
+import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustBugFilter;
+import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustComment;
+import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustResponseStatusCode;
+import org.openstreetmap.josm.plugins.mapdust.service.value.Paging;
+import org.openstreetmap.josm.plugins.mapdust.util.Configuration;
+import org.openstreetmap.josm.plugins.mapdust.util.http.HttpConnector;
+import org.openstreetmap.josm.plugins.mapdust.util.http.HttpResponse;
+import org.openstreetmap.josm.plugins.mapdust.util.retry.RetrySetup;
+import com.google.gson.FieldNamingPolicy;
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import com.google.gson.JsonSyntaxException;
+
+
+/**
+ * The <code>MapdustConnector</code> object. Connects to the Mapdust service,
+ * and executes the following Mapdust service methods: getBug, getBugs, addBug,
+ * commentBug and changeBugStatus.
+ * 
+ * @author Bea
+ */
+public class MapdustConnector {
+    
+    /** The <code>HttpConnector</code> object */
+    private final HttpConnector httpConnector;
+    
+    private Gson gson;
+    
+    /**
+     * Builds a <code>MapdustConnector</code> object with the default settings.
+     */
+    public MapdustConnector() {
+        httpConnector = new HttpConnector(RetrySetup.DEFAULT);
+        gson = buildGson();
+    }
+    
+    private Gson buildGson() {
+        GsonBuilder builder = new GsonBuilder();
+        builder.setDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
+        builder.setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES);
+        return builder.create();
+    }
+    
+    /**
+     * Searches for the OSM MapDust bugs in the given bounding box. The method
+     * executes the 'getBugs' MapDust service method, parses the obtained
+     * response object and return a <code>MapdustGetBugsResponse</code> object
+     * containing the pagination information and the array of bugs. In the case
+     * if the response code is not 200,201 or 204, a corresponding exception
+     * will be thrown.
+     * 
+     * @param bBox The bounding box where the bugs are searched.
+     * @param filter The MapDust bug filter. The bugs can be filtered based on
+     * the status, type and description. This parameter is not required.
+     * @return A <code>MapdustGetBugsResponse</code> object, containing the
+     * pagination information and an array of <code>MapdustBugContent</code>
+     * object.
+     * @throws MapdustConnectorException In the case of an error.
+     */
+    public MapdustGetBugsResponse getBugs(BoundingBox bBox,
+            MapdustBugFilter filter) throws MapdustConnectorException {
+        /* execute GET method and get the response */
+        HttpResponse httpResponse = null;
+        try {
+            httpResponse = executeGetBugs(bBox, filter);
+        } catch (Exception e) {
+            throw new MapdustConnectorException(e.getMessage(), e);
+        }
+        /* parse HttpResponse */
+        MapdustGetBugsResponse result = null;
+        try {
+            /* verify status codes */
+            handleStatusCode(httpResponse);
+            result = parseResponse(httpResponse.getContent(), 
+                    MapdustGetBugsResponse.class);
+        } catch (MapdustConnectorException e) {
+            throw new MapdustConnectorException(e.getMessage(), e);
+        }
+        return result;
+    }
+    
+    
+    /**
+     * Returns the OSM bug with the given id. If the <code>Paging</code> object
+     * is set, then the comments of the bug will be paginated. The method
+     * executes the 'getBug' MapDust service method, parses the obtained
+     * response object and return a <code>MapdustGetBugResponse</code> object.
+     * In the case if the response code is not 2
+     * 
+     * @param id The id of the object
+     * @param paging The <code>Paging</code> object
+     * @return A <code>MapdustGetBugResponse</code> object.
+     * 
+     * @throws MapdustConnectorException In the case of an error.
+     */
+    public MapdustGetBugResponse getBug(Long id, Paging paging)
+            throws MapdustConnectorException {
+        HttpResponse httpResponse = null;
+        try {
+            httpResponse = executeGetBug(id, paging);
+        } catch (Exception e) {
+            throw new MapdustConnectorException(e.getMessage(), e);
+        }
+        /* parse result */
+        MapdustGetBugResponse result = null;
+        try {
+            handleStatusCode(httpResponse);
+            result = parseResponse(httpResponse.getContent(),
+                    MapdustGetBugResponse.class);
+        } catch (MapdustConnectorException e) {
+            throw new MapdustConnectorException(e.getMessage(), e);
+        }
+        return result;
+    }
+    
+    /**
+     * Creates a new OSM bug with the specified arguments. The method executes
+     * the 'addBug' MapDust service method, parses the obtained response object
+     * and return a <code>MapdustPostResponse</code> object containing the id of
+     * the created comment. In the case if the response code is not 200,201 or
+     * 204, a corresponding exception will be thrown.
+     * 
+     * @param bug A <code>MapdustBug</code> object
+     * @return A <code>MapdustPostResponse</code> object which contains the id
+     * of the created object.
+     * 
+     * @throws MapdustConnectorException In the case of an error
+     */
+    public MapdustPostResponse addBug(MapdustBug bug)
+            throws MapdustConnectorException {
+        HttpResponse httpResponse = null;
+        try {
+            httpResponse = executeAddBug(bug);
+        } catch (Exception e) {
+            throw new MapdustConnectorException(e.getMessage(), e);
+        }
+        
+        /* parse result */
+        MapdustPostResponse result = null;
+        try {
+            handleStatusCode(httpResponse);
+            result = parseResponse(httpResponse.getContent(), 
+                    MapdustPostResponse.class);
+        } catch (MapdustConnectorException e) {
+            throw new MapdustConnectorException(e.getMessage(), e);
+        }
+        return result;
+    }
+    
+    /**
+     * Creates a new comment for the given bug. The method executes the
+     * 'commentBug' MapDust service method, parses the obtained response object
+     * and return a <code>MapdustPostResponse</code> object containing the id of
+     * the created comment. In the case if the response code is not 200,201 or
+     * 204, a corresponding exception will be thrown.
+     * 
+     * @param comment A <code>MapdustComment</code> object
+     * @return A <code>MapdustPostResponse</code> object which contains the id
+     * of the created object.
+     * @throws MapdustConnectorException In the case of an error
+     */
+    public MapdustPostResponse commentBug(MapdustComment comment)
+            throws MapdustConnectorException {
+        HttpResponse httpResponse = null;
+        try {
+            httpResponse = executeCommentBug(comment);
+        } catch (Exception e) {
+            throw new MapdustConnectorException(e.getMessage(), e);
+        }
+        /* parse result */
+        MapdustPostResponse result = null;
+        try {
+            handleStatusCode(httpResponse);
+            result = parseResponse(httpResponse.getContent(),
+                    MapdustPostResponse.class);
+        } catch (MapdustConnectorException e) {
+            throw new MapdustConnectorException(e.getMessage(), e);
+        }
+        return result;
+    }
+    
+    /**
+     * Changes the status of a given bug. The method executes the
+     * 'changeBugStatus' MapDust service method, parses the obtained response
+     * object and return a <code>MapdustPostResponse</code> object containing
+     * the id of the created comment. In the case if the response code is not
+     * 200,201 or 204, a corresponding exception will be thrown.
+     * 
+     * @param statusId The new value for the status. Possible values are: 1, 2
+     * or 3.
+     * @param comment A <code>MapdustComment</code> object
+     * @return A <code>MapdustPostResponse</code> object which contains the id
+     * of the created object.
+     * @throws MapdustConnectorException In the case of an error
+     */
+    public MapdustPostResponse changeBugStatus(Integer statusId,
+            MapdustComment comment) throws MapdustConnectorException {
+        HttpResponse httpResponse = null;
+        try {
+            httpResponse = executeChangeBugStatus(statusId, comment);
+        } catch (Exception e) {
+            throw new MapdustConnectorException(e.getMessage(), e);
+        }
+        /* parse result */
+        MapdustPostResponse result = null;
+        try {
+            handleStatusCode(httpResponse);
+            result = parseResponse(httpResponse.getContent(), 
+                    MapdustPostResponse.class);
+        } catch (MapdustConnectorException e) {
+            throw new MapdustConnectorException(e.getMessage(), e);
+        }
+        return result;
+    }
+    
+    /**
+     * Executes the 'getBugs' MapDust service method.
+     * 
+     * @param bBox The bounding box where the bugs are searched. This parameter
+     * it is a required parameter.
+     * @param filter The MapDust bug filter. The bugs can be filtered based on
+     * the status, type and description. This parameter is not required.
+     * @return A <code>HttpResponse</code> object containing the JSON response.
+     * @throws MalformedURLException In the case if the format of the URL is
+     * invalid
+     * @throws IOException In the case of an IO error
+     */
+    private HttpResponse executeGetBugs(BoundingBox bBox,
+            MapdustBugFilter filter) throws MalformedURLException, IOException {
+        HttpResponse httpResponse = null;
+        String mapdustUri = Configuration.getInstance().getMapdustUrl();
+        String mapdustApiKey = Configuration.getInstance().getMapdustKey();
+        String urlString = null;
+        if (mapdustUri != null && mapdustApiKey != null) {
+            urlString = mapdustUri;
+            urlString += "/getBugs?";
+            urlString += "key=" + mapdustApiKey;
+            urlString += "&bbox=" + bBox.getMinLon();
+            urlString += "," + bBox.getMinLat();
+            urlString += "," + bBox.getMaxLon();
+            urlString += "," + bBox.getMaxLat();
+            if (filter != null) {
+                if (filter.getStatuses() != null
+                        && filter.getStatuses().size() > 0) {
+                    String paramStatus = buildParameter(filter.getStatuses());
+                    if (!paramStatus.isEmpty()) {
+                        urlString += "&fs=" + paramStatus;
+                    }
+                }
+                if (filter.getTypes() != null && filter.getTypes().size() > 0) {
+                    String paramTypes = buildParameter(filter.getTypes());
+                    if (!paramTypes.isEmpty()) {
+                        urlString += "&ft=" + paramTypes;
+                    }
+                }
+                if (filter.getDescr() != null && filter.getDescr()) {
+                    urlString += "&idd=" + "0";
+                }
+                if (filter.getMinRelevance() != null) {
+                    int min = filter.getMinRelevance().getRange().getLowerValue();
+                    urlString += "&minr=" + min;
+                }
+                if (filter.getMaxRelevance() != null) {
+                    int max = filter.getMaxRelevance().getRange().getUpperValue();
+                    urlString += "&maxr=" + max;
+                }
+            }
+        }
+        URL url = null;
+        if (urlString != null) {
+            url = new URL(urlString);
+            httpResponse = httpConnector.executeGET(url);
+        }
+        return httpResponse;
+    }
+    
+    /**
+     * Executes the 'getBug' MapDust service method.
+     * 
+     * @param id The id of the object
+     * @param paging The <code>Paging</code> object
+     * @return A <code>HttpResponse</code> containing the JSON response of the
+     * Mapdust method.
+     * 
+     * @throws MalformedURLException In the case if the format of the URL is
+     * invalid
+     * @throws IOException In the case of an IO error
+     */
+    private HttpResponse executeGetBug(Long id, Paging paging)
+            throws MalformedURLException, IOException {
+        HttpResponse httpResponse = null;
+        String mapdustUri = Configuration.getInstance().getMapdustUrl();
+        String mapdustApiKey = Configuration.getInstance().getMapdustKey();
+        String urlString = null;
+        if (mapdustUri != null && mapdustApiKey != null) {
+            urlString = mapdustUri;
+            urlString += "/getBug?";
+            urlString += "key=" + mapdustApiKey;
+            if (id != null) {
+                urlString += "&id=" + id;
+            }
+            if (paging != null && paging.getItems() != null
+                    && paging.getPage() != null) {
+                urlString += "&items=" + paging.getItems();
+                urlString += "&p=" + paging.getPage();
+            }
+        }
+        URL url = null;
+        if (urlString != null) {
+            url = new URL(urlString);
+            httpResponse = httpConnector.executeGET(url);
+        }
+        return httpResponse;
+    }
+    
+    /**
+     * Executes the 'addBug' MapDust service method.
+     * 
+     * @param bug A <code>MapdustBug</code> object
+     * @return A <code>HttpResponse</code> containing the JSON response of the
+     * MapDust method.
+     * 
+     * @throws MalformedURLException In the case if the format of the URL is
+     * invalid
+     * @throws IOException In the case of an IO error
+     */
+    private HttpResponse executeAddBug(MapdustBug bug)
+            throws MalformedURLException, IOException {
+        HttpResponse httpResponse = null;
+        String mapdustUri = Configuration.getInstance().getMapdustUrl();
+        String mapdustApiKey = Configuration.getInstance().getMapdustKey();
+        String urlString = null;
+        Map<String, String> requestParameters = new HashMap<>();
+        if (mapdustUri != null && mapdustApiKey != null) {
+            urlString = mapdustUri;
+            urlString += "/addBug";
+            requestParameters.put("key", mapdustApiKey);
+            String coordinatesStr = "" + bug.getLatLon().getX();
+            coordinatesStr += "," + bug.getLatLon().getY();
+            requestParameters.put("coordinates", coordinatesStr);
+            requestParameters.put("type", bug.getType().getKey());
+            requestParameters.put("description", bug.getDescription());
+            requestParameters.put("nickname", bug.getNickname());
+        }
+        URL url = null;
+        if (urlString != null) {
+            url = new URL(urlString);
+            httpResponse =
+                    httpConnector.executePOST(url, null, requestParameters);
+        }
+        return httpResponse;
+    }
+    
+    /**
+     * Executes the 'commentBug' MapDust service method.
+     * 
+     * @param comment The <code>MapdustComment</code> object
+     * @return A <code>HttpResponse</code> containing the JSON response of the
+     * MapDust method.
+     * @throws MalformedURLException In the case if the format of the URL is
+     * invalid
+     * @throws IOException In the case of an IO error
+     */
+    private HttpResponse executeCommentBug(MapdustComment comment)
+            throws MalformedURLException, IOException {
+        HttpResponse httpResponse = null;
+        String mapdustUri = Configuration.getInstance().getMapdustUrl();
+        String mapdustApiKey = Configuration.getInstance().getMapdustKey();
+        String urlString = null;
+        Map<String, String> requestParameters = new HashMap<>();
+        if (mapdustUri != null && mapdustApiKey != null) {
+            urlString = mapdustUri;
+            urlString += "/commentBug";
+            requestParameters.put("key", mapdustApiKey);
+            requestParameters.put("id", comment.getBugId().toString());
+            requestParameters.put("comment", comment.getCommentText());
+            requestParameters.put("nickname", comment.getNickname());
+        }
+        URL url = null;
+        if (urlString != null) {
+            url = new URL(urlString);
+            httpResponse =
+                    httpConnector.executePOST(url, null, requestParameters);
+        }
+        return httpResponse;
+    }
+    
+    /**
+     * Executes the 'changeBugStatus' MapDust service method.
+     * 
+     * @param statusId The id of the status.
+     * @param comment A <code>MapdustComment</code> object.
+     * @return A <code>HttpResponse</code> containing the JSON response of the
+     * MapDust method.
+     * 
+     * @throws MalformedURLException In the case if the format of the URL is
+     * invalid
+     * @throws IOException In the case of an IO error
+     */
+    private HttpResponse executeChangeBugStatus(Integer statusId,
+            MapdustComment comment) throws MalformedURLException, IOException {
+        HttpResponse httpResponse = null;
+        String mapdustUri = Configuration.getInstance().getMapdustUrl();
+        String mapdustApiKey = Configuration.getInstance().getMapdustKey();
+        String urlString = null;
+        Map<String, String> requestParameters = new HashMap<>();
+        if (mapdustUri != null && mapdustApiKey != null) {
+            urlString = mapdustUri;
+            urlString += "/changeBugStatus";
+            requestParameters.put("key", mapdustApiKey);
+            requestParameters.put("id", comment.getBugId().toString());
+            requestParameters.put("status", statusId.toString());
+            requestParameters.put("comment", comment.getCommentText());
+            requestParameters.put("nickname", comment.getNickname());
+        }
+        URL url = null;
+        if (urlString != null) {
+            url = new URL(urlString);
+            httpResponse =
+                    httpConnector.executePOST(url, null, requestParameters);
+        }
+        return httpResponse;
+    }
+    
+    /**
+     * Builds a string containing the elements of the given list. The elements
+     * will be separated by a comma. If the list does not contains any element
+     * the returned result will be an empty string.
+     * 
+     * @param list The list of objects.
+     * @return a string
+     */
+    private String buildParameter(List<? extends Object> list) {
+        StringBuffer sb = new StringBuffer();
+        for (Object obj : list) {
+            if (obj != null) {
+                sb.append(obj).append(",");
+            }
+        }
+        return sb.substring(0, sb.length() - 1);
+    }
+    
+    /**
+     * Handles the response codes of the given <code>HttpResponse</code> object.
+     * If the response code is 200, 201 or 204, the method returns without any
+     * exception. Otherwise a <code>MapdustConnectorException</code> will be
+     * thrown with an appropriate message.
+     * 
+     * @param httpResponse The <code>HttpResponse</code> method.
+     * @throws MapdustConnectorException In the case if the status code is not
+     * 200, 201 or 204.
+     */
+    private void handleStatusCode(HttpResponse httpResponse)
+            throws MapdustConnectorException {
+        String error = "";
+        Integer statusCode = httpResponse.getStatusCode();
+        String statusMessage = httpResponse.getStatusMessage();
+        if (statusCode.equals(MapdustResponseStatusCode.Status200
+                .getStatusCode())
+                || statusCode.equals(MapdustResponseStatusCode.Status201
+                        .getStatusCode())
+                || statusCode.equals(MapdustResponseStatusCode.Status204
+                        .getStatusCode())) {
+            // no error
+            return;
+        }
+        switch (statusCode) {
+            case 400:
+                error = statusMessage + " ";
+                error += MapdustResponseStatusCode.Status400.getDescription();
+                throw new MapdustConnectorException(error);
+            case 401:
+                error = statusMessage + " ";
+                error += MapdustResponseStatusCode.Status401.getDescription();
+                throw new MapdustConnectorException(error);
+            case 403:
+                error = statusMessage + " ";
+                error += MapdustResponseStatusCode.Status403.getDescription();
+                throw new MapdustConnectorException(error);
+            case 404:
+                error = statusMessage + " ";
+                error += MapdustResponseStatusCode.Status404.getDescription();
+                throw new MapdustConnectorException(error);
+            case 405:
+                error = statusMessage + " ";
+                error += MapdustResponseStatusCode.Status405.getDescription();
+                throw new MapdustConnectorException(error);
+            case 500:
+                error = statusMessage + " ";
+                error += MapdustResponseStatusCode.Status500.getDescription();
+                throw new MapdustConnectorException(error);
+            case 601:
+                error = statusMessage + " ";
+                error += MapdustResponseStatusCode.Status601.getDescription();
+                throw new MapdustConnectorException(error);
+            case 602:
+                error = statusMessage + " ";
+                error += MapdustResponseStatusCode.Status602.getDescription();
+                throw new MapdustConnectorException(error);
+            default:
+                throw new MapdustConnectorException(
+                        MapdustResponseStatusCode.Status.getDescription());
+        }
+    }
+        
+    private <T> T parseResponse(String httpResponse, Class<T> responseType)
+            throws MapdustConnectorException {
+        T result;
+        try {
+            result = gson.fromJson(httpResponse, responseType);
+        } catch (JsonSyntaxException e) {
+            throw new MapdustConnectorException(e.getMessage(), e);
+        }
+        return result;
+    }
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/connector/MapdustConnectorException.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/connector/MapdustConnectorException.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/connector/MapdustConnectorException.java	(revision 35962)
@@ -0,0 +1,79 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.service.connector;
+
+
+/**
+ * Defines the exception type for the <code>MapdustConnector</code> object.
+ *
+ * @author Bea
+ *
+ */
+public class MapdustConnectorException extends Exception {
+
+    /** The serial version UID */
+    private static final long serialVersionUID = 6222042834700541233L;
+
+    /**
+     * Builds a <code>MapdustConnectorException</code> object.
+     */
+    public MapdustConnectorException() {
+        super();
+    }
+
+    /**
+     * Builds a <code>MapdustConnectorException</code> object based on the given
+     * argument.
+     *
+     * @param message The message of the exception
+     */
+    public MapdustConnectorException(String message) {
+        super(message);
+    }
+
+    /**
+     * Builds a <code>MapdustConnectorException</code> object based on the given
+     * argument.
+     *
+     * @param cause The cause of the exception
+     */
+    public MapdustConnectorException(Throwable cause) {
+        super(cause);
+    }
+
+    /**
+     * Builds a <code>MapdustConnectorException</code> object based on the given
+     * arguments.
+     *
+     * @param message The message of the exception
+     * @param cause The cause of the exception
+     */
+    public MapdustConnectorException(String message, Throwable cause) {
+        super(message, cause);
+    }
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/connector/package-info.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/connector/package-info.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/connector/package-info.java	(revision 35962)
@@ -0,0 +1,4 @@
+/**
+ * Contains the MapDust service connector classes.
+ */
+package org.openstreetmap.josm.plugins.mapdust.service.connector;
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/connector/response/GeneralContent.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/connector/response/GeneralContent.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/connector/response/GeneralContent.java	(revision 35962)
@@ -0,0 +1,59 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.service.connector.response;
+
+
+/**
+ * Defines a general content, containing a given id.
+ * 
+ * @author Bea
+ * 
+ */
+public class GeneralContent {
+    
+    /** The id */
+    private Long id;
+    
+    /**
+     * Builds a <code>GeneralContent</code> object.
+     */
+    public GeneralContent() {}
+    
+    /**
+     * Builds a <code>GeneralContent</code> object.
+     * 
+     * @param id The id of the object
+     */
+    public GeneralContent(Long id) {
+        this.id = id;
+    }
+        
+    public Long getId() {
+        return id;
+    }
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/connector/response/Geometry.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/connector/response/Geometry.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/connector/response/Geometry.java	(revision 35962)
@@ -0,0 +1,58 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.service.connector.response;
+
+/**
+ * Defines the attributes of the geometry object.
+ * 
+ * @author Bea
+ * 
+ */
+public class Geometry {
+    
+    /** The array of coordinates */
+    private Double[] coordinates;
+    
+    /**
+     * Builds a <code>Geometry</code> object
+     */
+    public Geometry() {}
+    
+    /**
+     * Builds a <code>Geometry</code> object
+     * 
+     * @param coordinates An array of coordinates.
+     */
+    public Geometry(Double[] coordinates) {
+        this.coordinates = coordinates;
+    }
+        
+    public Double[] getCoordinates() {
+        return coordinates;
+    }
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/connector/response/MapdustBugContent.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/connector/response/MapdustBugContent.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/connector/response/MapdustBugContent.java	(revision 35962)
@@ -0,0 +1,70 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.service.connector.response;
+
+
+/**
+ * Defines the attributes of the <code>MapdustBugContent</code> object.
+ * 
+ * @author Bea
+ * 
+ */
+public class MapdustBugContent extends GeneralContent {
+    
+    /** The <code>Geometry</code> object */
+    private Geometry geometry;
+    
+    /** The <code>MapdustBugProperties</code> object */
+    private MapdustBugProperties properties;
+    
+    /**
+     * Builds a <code>MapdustBugContent</code> object.
+     * 
+     */
+    public MapdustBugContent() {}
+    
+    /**
+     * Builds a <code>MapdustBugContent</code> object based on the given
+     * arguments.
+     * 
+     * @param geometry A <code>Geometry</code> object
+     * @param properties A <code>MapdustBugProperties</code> object
+     */
+    public MapdustBugContent(Geometry geometry, MapdustBugProperties properties) {
+        this.geometry = geometry;
+        this.properties = properties;
+    }
+        
+    public Geometry getGeometry() {
+        return geometry;
+    }
+    
+    public MapdustBugProperties getProperties() {
+        return properties;
+    }
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/connector/response/MapdustBugProperties.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/connector/response/MapdustBugProperties.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/connector/response/MapdustBugProperties.java	(revision 35962)
@@ -0,0 +1,194 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.service.connector.response;
+
+
+import java.util.Date;
+import org.openstreetmap.josm.plugins.mapdust.service.value.Address;
+
+
+/**
+ * Defines the attributes of the <code>MapdustBugProperties</code> object.
+ * 
+ * @author Bea
+ * 
+ */
+public class MapdustBugProperties {
+    
+    /** The creation date */
+    private Date dateCreated;
+    
+    /** The update date */
+    private Date dateUpdated;
+    
+    /** The status of the bug */
+    private Integer status;
+    
+    /** The type of the bug */
+    private String type;
+    
+    /** The relevance value */
+    private Integer relevance;
+    
+    /** The description of the bug */
+    private String description;
+    
+    /** Flag indicating if the description is default or not */
+    private byte isDefaultDescription;
+    
+    /** The nickname of the bug */
+    private String nickname;
+    
+    /** The skobbler user id */
+    private String skoUid;
+    
+    /** The external user id */
+    private String extUid;
+    
+    /** The source of the bug */
+    private String source;
+    
+    /** The url of the kml */
+    private String kmlUrl;
+    
+    /** The address of the bug */
+    private Address address;
+    
+    /** The number of comments */
+    private Integer numberOfComments;
+    
+    /** The bug comments */
+    private MapdustCommentProperties[] comments;
+    
+    /**
+     * Builds a <code>MapdustBugProperties</code> object.
+     */
+    public MapdustBugProperties() {}
+    
+    /**
+     * Builds a <code>MapdustBugProperties</code> object.
+     * 
+     * @param dateCreated The creation date
+     * @param dateUpdated The update date
+     * @param status The status of the bug
+     * @param type The type of the bug
+     * @param relevance The relevance of the bug
+     * @param description The description of the bug
+     * @param isDefaultDescription Flag indicating if the description is default
+     * or not
+     * @param nickname The nickname
+     * @param skoUid The skobbler user id
+     * @param extUid The external user id
+     * @param source The source of the bug
+     * @param kmlUrl The URL of the KML
+     * @param address The address of the object
+     * @param numberOfComments The number of comments
+     * @param comments The array of comments
+     */
+    public MapdustBugProperties(Date dateCreated, Date dateUpdated,
+            Integer status, String type, Integer relevance, String description,
+            byte isDefaultDescription, String nickname, String skoUid,
+            String extUid, String source, String kmlUrl, Address address,
+            Integer numberOfComments, MapdustCommentProperties[] comments) {
+        this.dateCreated = dateCreated;
+        this.dateUpdated = dateUpdated;
+        this.status = status;
+        this.type = type;
+        this.relevance = relevance;
+        this.description = description;
+        this.isDefaultDescription = isDefaultDescription;
+        this.nickname = nickname;
+        this.skoUid = skoUid;
+        this.extUid = extUid;
+        this.source = source;
+        this.kmlUrl = kmlUrl;
+        this.address = address;
+        this.numberOfComments = numberOfComments;
+        this.comments = comments;
+    }
+        
+    public Date getDateCreated() {
+        return dateCreated;
+    }
+    
+    public Date getDateUpdated() {
+        return dateUpdated;
+    }
+    
+    public Integer getStatus() {
+        return status;
+    }
+    
+    public String getType() {
+        return type;
+    }
+    
+    public Integer getRelevance() {
+        return relevance;
+    }
+  
+    public String getDescription() {
+        return description;
+    }
+    
+    public byte getIsDefaultDescription() {
+        return isDefaultDescription;
+    }
+    
+    public String getNickname() {
+        return nickname;
+    }
+    
+    public String getSkoUid() {
+        return skoUid;
+    }
+    
+    public String getExtUid() {
+        return extUid;
+    }
+    
+    public String getSource() {
+        return source;
+    }
+    
+    public String getKmlUrl() {
+        return kmlUrl;
+    }
+    
+    public Address getAddress() {
+        return address;
+    }
+    
+    public Integer getNumberOfComments() {
+        return numberOfComments;
+    }
+    
+    public MapdustCommentProperties[] getComments() {
+        return comments;
+    }
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/connector/response/MapdustCommentProperties.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/connector/response/MapdustCommentProperties.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/connector/response/MapdustCommentProperties.java	(revision 35962)
@@ -0,0 +1,108 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.service.connector.response;
+
+
+import java.util.Date;
+
+
+/**
+ * Defines the attributes of the <code>MapdustCommentProperties</code> object.
+ *
+ * @author Bea
+ *
+ */
+public class MapdustCommentProperties {
+
+    /** The date created */
+    private Date dateCreated;
+
+    /** The comment text */
+    private String comment;
+
+    /** The nickname */
+    private String nickname;
+
+    /** The skobbler user id */
+    private String skoUid;
+
+    /** The external user id */
+    private String extUid;
+
+    /** The source */
+    private String source;
+
+    /**
+     * Builds a <code>MapdustCommentProperties</code> object
+     */
+    public MapdustCommentProperties() {}
+
+    /**
+     * Builds a <code>MapdustCommentProperties</code> object
+     *
+     * @param dateCreated The date of creation
+     * @param comment The text of the comment
+     * @param nickname The nickname of the user
+     * @param skoUid The skobbler user id of the user
+     * @param extUid The external user id of the user
+     * @param source The source of the user
+     */
+    public MapdustCommentProperties(Date dateCreated, String comment,
+            String nickname, String skoUid, String extUid, String source) {
+        this.dateCreated = dateCreated;
+        this.comment = comment;
+        this.nickname = nickname;
+        this.skoUid = skoUid;
+        this.extUid = extUid;
+        this.source = source;
+    }
+    
+    public Date getDateCreated() {
+        return dateCreated;
+    }
+    
+    public String getComment() {
+        return comment;
+    }
+
+    public String getNickname() {
+        return nickname;
+    }
+
+    public String getSkoUid() {
+        return skoUid;
+    }
+
+    public String getExtUid() {
+        return extUid;
+    }
+
+    public String getSource() {
+        return source;
+    }
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/connector/response/MapdustGetBugResponse.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/connector/response/MapdustGetBugResponse.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/connector/response/MapdustGetBugResponse.java	(revision 35962)
@@ -0,0 +1,79 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.service.connector.response;
+
+
+/**
+ * Represents the response of the 'getBug' method . This object is used for
+ * building the response from a JSON format.
+ *
+ * @author Bea
+ *
+ */
+public class MapdustGetBugResponse {
+
+    /** The <code>Geometry</code> object */
+    private Geometry geometry;
+
+    /** The id */
+    private Long id;
+
+    /** The <code>MapdustBugProprties</code> object */
+    private MapdustBugProperties properties;
+
+    /**
+     * Builds a <code>MapdustGetBugResponse</code> object
+     */
+    public MapdustGetBugResponse() {}
+
+    /**
+     * Builds a <code>MapdustGetBugResponse</code> object
+     *
+     * @param geometry The <code>Geometry</code> object
+     * @param id The id of the object
+     * @param properties The <code>MapdustBugProperties</code> object
+     */
+    public MapdustGetBugResponse(Geometry geometry, Long id,
+            MapdustBugProperties properties) {
+        this.geometry = geometry;
+        this.id = id;
+        this.properties = properties;
+    }
+    
+    public Geometry getGeometry() {
+        return geometry;
+    }
+    
+    public Long getId() {
+        return id;
+    }
+
+    public MapdustBugProperties getProperties() {
+        return properties;
+    }
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/connector/response/MapdustGetBugsResponse.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/connector/response/MapdustGetBugsResponse.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/connector/response/MapdustGetBugsResponse.java	(revision 35962)
@@ -0,0 +1,60 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.service.connector.response;
+
+
+/**
+ * Represents the response of the 'getBugs' method . This object is used for
+ * building the response from a JSON format.
+ *
+ * @author Bea
+ *
+ */
+public class MapdustGetBugsResponse {
+
+    /** The array of <code>MapdustBugContent</code> object */
+    private MapdustBugContent[] features;
+
+    /**
+     * Builds a <code>MapdustGetBugsResponse</code> object.
+     */
+    public MapdustGetBugsResponse() {}
+
+    /**
+     * Builds a <code>MapdustGetBugsResponse</code> object.
+     *
+     * @param features An array of <code>MapdustBugContent</code> object
+     */
+    public MapdustGetBugsResponse(MapdustBugContent[] features) {
+        this.features = features;
+    }
+    
+    public MapdustBugContent[] getFeatures() {
+        return features;
+    }
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/connector/response/MapdustGetResponse.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/connector/response/MapdustGetResponse.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/connector/response/MapdustGetResponse.java	(revision 35962)
@@ -0,0 +1,64 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.service.connector.response;
+
+
+import org.openstreetmap.josm.plugins.mapdust.service.value.Paging;
+
+
+/**
+ * Represents a general response for the "GET" http method.
+ *
+ * @author Bea
+ *
+ */
+public class MapdustGetResponse {
+
+    /**
+     * The <code>Paging</code> object
+     */
+    private Paging paging;
+
+    /**
+     * Builds a <code>MapdustGetResponse</code> object
+     */
+    public MapdustGetResponse() {}
+
+    /**
+     * Builds a <code>MapdustGetResponse</code> object
+     *
+     * @param paging A <code>Paging</code> object
+     */
+    public MapdustGetResponse(Paging paging) {
+        this.paging = paging;
+    }
+    
+    public Paging getPaging() {
+        return paging;
+    }
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/connector/response/MapdustPostResponse.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/connector/response/MapdustPostResponse.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/connector/response/MapdustPostResponse.java	(revision 35962)
@@ -0,0 +1,60 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.service.connector.response;
+
+/**
+ * Represents a response object for the HTTP POST method.
+ *
+ * @author Bea
+ *
+ */
+public class MapdustPostResponse {
+
+    /** The id */
+    private Long id;
+
+    /**
+     * Builds a <code>MapdustPostResponse</code> object.
+     */
+    public MapdustPostResponse() {
+
+    }
+
+    /**
+     * Builds a <code>MapdustPostResponse</code> object.
+     *
+     * @param id The id of the object
+     */
+    public MapdustPostResponse(Long id) {
+        this.id = id;
+    }
+    
+    public Long getId() {
+        return id;
+    }
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/connector/response/package-info.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/connector/response/package-info.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/connector/response/package-info.java	(revision 35962)
@@ -0,0 +1,4 @@
+/**
+ * Contains the MapDust service the response objects.
+ */
+package org.openstreetmap.josm.plugins.mapdust.service.connector.response;
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/package-info.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/package-info.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/package-info.java	(revision 35962)
@@ -0,0 +1,8 @@
+/**
+ * Contains the MapDust API connection classes. These classes are used for
+ * downloading/uploading MapDust bug data from/to the MapDust service.
+ * The MapDust service connection classes are divided based on their type
+ * in the following four packages: connector, converter, parser and value.
+ *
+ */
+package org.openstreetmap.josm.plugins.mapdust.service;
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/value/Address.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/value/Address.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/value/Address.java	(revision 35962)
@@ -0,0 +1,230 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.service.value;
+
+
+/**
+ * Defines the attributes of the <code>Address</code> object.
+ *
+ * @author Bea
+ *
+ */
+public class Address {
+
+    /** The country code */
+    private String countryCode;
+
+    /** The city */
+    private String city;
+
+    /** The state code */
+    private String stateCode;
+
+    /** The ZIP code */
+    private String zipCode;
+
+    /** The street name */
+    private String streetName;
+
+    /** The house number */
+    private String houseNumber;
+
+    /**
+     * Builds a <code>Address</code> object.
+     */
+    public Address() {}
+
+    /**
+     * Builds a <code>Address</code> object based on the given arguments.
+     *
+     * @param countryCode The country code
+     * @param city The city
+     * @param stateCode The state code
+     * @param zipCode The ZIP code
+     * @param streetName The street name
+     * @param houseNumber The house number
+     */
+    public Address(String countryCode, String city, String stateCode,
+            String zipCode, String streetName, String houseNumber) {
+        this.countryCode = countryCode;
+        this.city = city;
+        this.stateCode = stateCode;
+        this.zipCode = zipCode;
+        this.streetName = streetName;
+        this.houseNumber = houseNumber;
+    }
+
+    /**
+     * Returns the country code
+     *
+     * @return the countryCode
+     */
+    public String getCountryCode() {
+        return countryCode;
+    }
+
+    /**
+     * Sets the country code
+     *
+     * @param countryCode the countryCode to set
+     */
+    public void setCountryCode(String countryCode) {
+        this.countryCode = countryCode;
+    }
+
+    /**
+     * Returns the city
+     *
+     * @return the city
+     */
+    public String getCity() {
+        return city;
+    }
+
+    /**
+     * Sets the city
+     *
+     * @param city the city to set
+     */
+    public void setCity(String city) {
+        this.city = city;
+    }
+
+    /**
+     * Returns the state code
+     *
+     * @return the stateCode
+     */
+    public String getStateCode() {
+        return stateCode;
+    }
+
+    /**
+     * Sets the state code
+     *
+     * @param stateCode the stateCode to set
+     */
+    public void setStateCode(String stateCode) {
+        this.stateCode = stateCode;
+    }
+
+    /**
+     * Returns the zip code
+     *
+     * @return the zipCode
+     */
+    public String getZipCode() {
+        return zipCode;
+    }
+
+    /**
+     * Sets the zip code
+     *
+     * @param zipCode the zipCode to set
+     */
+    public void setZipCode(String zipCode) {
+        this.zipCode = zipCode;
+    }
+
+    /**
+     * Returns the street name
+     *
+     * @return the streetName
+     */
+    public String getStreetName() {
+        return streetName;
+    }
+
+    /**
+     * Sets the street name
+     *
+     * @param streetName the streetName to set
+     */
+    public void setStreetName(String streetName) {
+        this.streetName = streetName;
+    }
+
+    /**
+     * Returns the house number
+     *
+     * @return the houseNumber
+     */
+    public String getHouseNumber() {
+        return houseNumber;
+    }
+
+    /**
+     * Sets the house number
+     *
+     * @param houseNumber the houseNumber to set
+     */
+    public void setHouseNumber(String houseNumber) {
+        this.houseNumber = houseNumber;
+    }
+
+    @Override
+    public String toString() {
+        String addressStr = "";
+        if (countryCode != null && !countryCode.isEmpty()) {
+            addressStr += countryCode;
+        }
+        if (city != null && !city.isEmpty()) {
+            if (!addressStr.isEmpty()) {
+                addressStr += ", ";
+            }
+            addressStr += city;
+        }
+
+        if (stateCode != null && !stateCode.isEmpty()) {
+            if (!addressStr.isEmpty()) {
+                addressStr += ", ";
+            }
+            addressStr += stateCode;
+        }
+
+        if (zipCode != null && !zipCode.isEmpty()) {
+            if (!addressStr.isEmpty()) {
+                addressStr += ", ";
+            }
+            addressStr += zipCode;
+        }
+        if (streetName != null && !streetName.isEmpty()) {
+            if (!addressStr.isEmpty()) {
+                addressStr += ", ";
+            }
+            addressStr += streetName;
+        }
+        if (houseNumber != null && !houseNumber.isEmpty()) {
+            if (!addressStr.isEmpty()) {
+                addressStr += ", ";
+            }
+            addressStr += houseNumber;
+        }
+        return addressStr;
+    }
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/value/BoundingBox.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/value/BoundingBox.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/value/BoundingBox.java	(revision 35962)
@@ -0,0 +1,157 @@
+/*
+ * Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ *
+ * Created on 06.03.2011 by Bea
+ * Modified on $DateTime$ by $Author$
+ */
+package org.openstreetmap.josm.plugins.mapdust.service.value;
+
+
+/**
+ * Helper object used for representing a bounding box. This object it is used
+ * for representing the searching area.
+ *
+ * @author Bea
+ * @version $Revision$
+ */
+public class BoundingBox {
+
+    /** The minimum longitude */
+    private Double minLon;
+
+    /** The minimum latitude */
+    private Double minLat;
+
+    /** The maximum longitude */
+    private Double maxLon;
+
+    /** The maximum latitude */
+    private Double maxLat;
+
+    /**
+     * Builds a <code>BoundingBox</code> object
+     */
+    public BoundingBox(){}
+
+    /**
+     * Builds a <code>BoundingBox</code> object based on the given arguments.
+     *
+     * @param minLon The minimum longitude
+     * @param minLat The minimum latitude
+     * @param maxLon The maximum longitude
+     * @param maxLat The maximum latitude
+     */
+    public BoundingBox(Double minLon, Double minLat, Double maxLon,
+            Double maxLat) {
+        this.minLon = minLon;
+        this.minLat = minLat;
+        this.maxLon = maxLon;
+        this.maxLat = maxLat;
+        normalize();
+    }
+
+    /**
+     * Normalize the bounding box values.
+     */
+    private void normalize() {
+        if (minLon < -180) {
+            minLon = -180.0;
+        }
+        if (maxLon > 180) {
+            maxLon = 180.0;
+        }
+        if (minLat < -90) {
+            minLat = -90.0;
+        }
+        if (maxLat > 90) {
+            maxLat = 90.0;
+        }
+    }
+
+    /**
+     * Returns the minimum longitude
+     *
+     * @return the minLon
+     */
+    public Double getMinLon() {
+        return minLon;
+    }
+
+    /**
+     * Returns the minimum latitude
+     *
+     * @return the minLat
+     */
+    public Double getMinLat() {
+        return minLat;
+    }
+
+    /**
+     * Returns the maximum longitude
+     *
+     * @return the maxLon
+     */
+    public Double getMaxLon() {
+        return maxLon;
+    }
+
+    /**
+     * Returns the maximum latitude
+     *
+     * @return the maxLat
+     */
+    public Double getMaxLat() {
+        return maxLat;
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((maxLat == null) ? 0 : maxLat.hashCode());
+        result = prime * result + ((maxLon == null) ? 0 : maxLon.hashCode());
+        result = prime * result + ((minLat == null) ? 0 : minLat.hashCode());
+        result = prime * result + ((minLon == null) ? 0 : minLon.hashCode());
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (obj instanceof BoundingBox) {
+            BoundingBox bBox = (BoundingBox) obj;
+            Double bBoxMinLon = bBox.getMinLon();
+            Double bBoxMinLat = bBox.getMinLat();
+            Double bBoxMaxLon = bBox.getMaxLon();
+            Double bBoxMaxLat = bBox.getMaxLat();
+            return (minLon.equals(bBoxMinLon) && minLat.equals(bBoxMinLat)
+                    && maxLon.equals(bBoxMaxLon) && maxLat.equals(bBoxMaxLat));
+        }
+        return false;
+    }
+
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/value/BugType.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/value/BugType.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/value/BugType.java	(revision 35962)
@@ -0,0 +1,178 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.service.value;
+
+
+import java.io.Serializable;
+import java.util.Collection;
+import java.util.HashMap;
+
+
+/**
+ * Defines the values for the <code>Type</code>.
+ *
+ * @author Bea
+ *
+ */
+public class BugType implements Serializable {
+
+    /** The serial version UID */
+    private static final long serialVersionUID = 4022464908172242274L;
+
+    /** The key of the <code>Type</code> */
+    private String key;
+
+    /** The value of the <code>Type</code> */
+    private String value;
+
+    /** The hash map containing the valid values */
+    private static java.util.HashMap<String, BugType> table = null;
+
+    /**
+     * Builds a new <code>Type</code> object
+     */
+    public BugType() {}
+
+    /**
+     * Builds a new <code>status</code> object
+     *
+     * @param key The key of the object
+     * @param value The value of the object
+     */
+    public BugType(String key, String value) {
+        this.key = key;
+        this.value = value;
+        if (BugType.table == null) {
+            BugType.table = new HashMap<>();
+        }
+        BugType.table.put(key, this);
+    }
+
+    /** The wrong turn <code>BugType</code> */
+    public static final BugType WRONG_TURN = new BugType("wrong_turn", "Wrong turn");
+
+    /** The bad routing <code>BugType</code> */
+    public static final BugType BAD_ROUTING = new BugType("bad_routing",
+            "Bad routing");
+
+    /** The oneway road <code>BugType</code> */
+    public static final BugType ONEWAY_ROAD = new BugType("oneway_road",
+            "Oneway road");
+
+    /** The blocked street <code>BugType</code> */
+    public static final BugType BLOCKED_STREET = new BugType("blocked_street",
+            "Blocked street");
+
+    /** The missing street <code>BugType</code> */
+    public static final BugType MISSING_STREET = new BugType("missing_street",
+            "Missing street");
+
+    /** The wrong roundabout <code>BugType</code> */
+    public static final BugType WRONG_ROUNDABOUT = new BugType("wrong_roundabout",
+            "Wrong roundabout");
+
+    /** The missing speedlimit <code>BugType</code> */
+    public static final BugType MISSING_SPEEDLIMIT = new BugType(
+            "missing_speedlimit", "Missing speedlimit");
+
+    /** The other <code>BugType</code> */
+    public static final BugType OTHER = new BugType("other", "Other");
+
+    /**
+     * Returns the <code>BugType</code> for the given value.
+     *
+     * @param value The value
+     * @return A <code>BugType</code> object
+     * @throws java.lang.IllegalStateException If the value is invalid
+     */
+    public static BugType getType(java.lang.String value)
+            throws java.lang.IllegalStateException {
+        BugType type = table.get(value);
+        if (type == null) {
+            type = BugType.OTHER;
+        }
+        return type;
+    }
+
+    /**
+     * Returns the <code>BugType</code> object for the given value. If there is no
+     * BugType with the given value, the returned value is null.
+     *
+     * @param value The value of the type
+     * @return A <code>BugType</code> object
+     */
+    public static BugType getTypeFromValue(String value) {
+        BugType type = null;
+        for (BugType obj : table.values()) {
+            if (obj.getValue().equals(value)) {
+                type = obj;
+                break;
+            }
+        }
+        return type;
+    }
+
+    /**
+     * Returns all the types.
+     *
+     * @return An array of <code>BugType</code> objects
+     */
+    public static BugType[] getTypes() {
+        Collection<BugType> collection = table.values();
+        return collection.toArray(new BugType[0]);
+    }
+
+    @Override
+    public boolean equals(java.lang.Object obj) {
+        return (obj == this);
+    }
+
+    @Override
+    public int hashCode() {
+        return super.hashCode();
+    }
+
+    /**
+     * Returns the key
+     *
+     * @return the key
+     */
+    public String getKey() {
+        return key;
+    }
+
+    /**
+     * Returns the value
+     *
+     * @return the value
+     */
+    public String getValue() {
+        return value;
+    }
+
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/value/MapdustBug.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/value/MapdustBug.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/value/MapdustBug.java	(revision 35962)
@@ -0,0 +1,492 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.service.value;
+
+
+import java.util.Date;
+import org.openstreetmap.josm.data.coor.LatLon;
+
+
+/**
+ * Defines the attributes of the <code>MapdustBug</code> object.
+ *
+ * @author Bea
+ *
+ */
+public final class MapdustBug {
+
+    /** The id of the bug */
+    private Long id;
+
+    /** The coordinates of the bug */
+    private LatLon latLon;
+
+    /** The address of the bug */
+    private Address address;
+
+    /** The creation date */
+    private Date dateCreated;
+
+    /** The update date */
+    private Date dateUpdated;
+
+    /** The status of the object */
+    private Status status;
+
+    /** The type of the object */
+    private BugType type;
+
+    /** The relevance of the object */
+    private MapdustRelevance relevance;
+
+    /** The description of the bug */
+    private String description;
+
+    /** Flag indicating if the description is default or not */
+    private boolean isDefaultDescription;
+
+    /** The nickname of the user who created the bug */
+    private String nickname;
+
+    /** The skobbler user id */
+    private String skoUid;
+
+    /** The external user id */
+    private String extUid;
+
+    /** The source of the bug */
+    private String source;
+
+    /** The url of the KML file */
+    private String kmlUrl;
+
+    /** The number of comments */
+    private Integer numberOfComments;
+
+    /** The array of comments */
+    private MapdustComment[] comments;
+
+    /**
+     * Builds a <code>MapdustBug</code> object.
+     */
+    public MapdustBug() {}
+
+    /**
+     * Builds a <code>MapdustBug</code> object based on the given arguments.
+     *
+     * @param latLon The coordinate
+     * @param type The type of the bug
+     * @param description The description of the bug
+     * @param nickname The nickname of the user who created the bug
+     */
+    public MapdustBug(LatLon latLon, BugType type, String description,
+            String nickname) {
+        this.latLon = latLon;
+        this.type = type;
+        this.description = description;
+        this.nickname = nickname;
+    }
+
+    /**
+     * Builds a <code>MapdustBug</code> object based on the given arguments.
+     *
+     * @param id The id of the bug
+     * @param latLon The coordinates of the bug
+     * @param address The address of the bug
+     * @param dateCreated The creation date
+     * @param dateUpdated The update date
+     * @param status The status of the bug
+     * @param type The type of the bug
+     * @param relevance The relevance of the bug
+     * @param description The description of the bug
+     * @param isDefaultDescription Flag indicating if the description is default
+     * or not
+     * @param nickname The nickname
+     * @param skoUid The skobbler user id
+     * @param extUid The external user id
+     * @param source The source of the bug
+     * @param kmlUrl The URL of the KML
+     * @param numberOfComments The number of comments
+     * @param comments The array of comments
+     */
+    public MapdustBug(Long id, LatLon latLon, Address address,
+            Date dateCreated, Date dateUpdated, Status status, BugType type,
+            MapdustRelevance relevance, String description,
+            boolean isDefaultDescription, String nickname, String skoUid,
+            String extUid, String source, String kmlUrl,
+            Integer numberOfComments, MapdustComment[] comments) {
+        this.id = id;
+        this.latLon = latLon;
+        this.address = address;
+        this.dateCreated = dateCreated;
+        this.dateUpdated = dateUpdated;
+        this.status = status;
+        this.type = type;
+        this.relevance = relevance;
+        this.description = description;
+        this.isDefaultDescription = isDefaultDescription;
+        this.nickname = nickname;
+        this.skoUid = skoUid;
+        this.extUid = extUid;
+        this.source = source;
+        this.kmlUrl = kmlUrl;
+        this.numberOfComments = numberOfComments;
+        this.comments = comments;
+    }
+
+    /**
+     * Returns the id
+     *
+     * @return the id
+     */
+    public Long getId() {
+        return id;
+    }
+
+    /**
+     * Sets the id
+     *
+     * @param id the id to set
+     */
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    /**
+     * Returns the coordinates of the bug
+     *
+     * @return the latLon
+     */
+    public LatLon getLatLon() {
+        return latLon;
+    }
+
+    /**
+     * Sets the coordinates of the bug
+     *
+     * @param latLon the latLon to set
+     */
+    public void setLatLon(LatLon latLon) {
+        this.latLon = latLon;
+    }
+
+    /**
+     * Returns the date created
+     *
+     * @return the dateCreated
+     */
+    public Date getDateCreated() {
+        return dateCreated;
+    }
+
+    /**
+     * Sets the date created
+     *
+     * @param dateCreated the dateCreated to set
+     */
+    public void setDateCreated(Date dateCreated) {
+        this.dateCreated = dateCreated;
+    }
+
+    /**
+     * Returns the date updated
+     *
+     * @return the dateUpdated
+     */
+    public Date getDateUpdated() {
+        return dateUpdated;
+    }
+
+    /**
+     * Sets the date updated
+     *
+     * @param dateUpdated the dateUpdated to set
+     */
+    public void setDateUpdated(Date dateUpdated) {
+        this.dateUpdated = dateUpdated;
+    }
+
+    /**
+     * Returns the status
+     *
+     * @return the status
+     */
+    public Status getStatus() {
+        return status;
+    }
+
+    /**
+     * Sets the status
+     *
+     * @param status the status to set
+     */
+    public void setStatus(Status status) {
+        this.status = status;
+    }
+
+    /**
+     * Returns the type
+     *
+     * @return the type
+     */
+    public BugType getType() {
+        return type;
+    }
+
+    /**
+     * Sets the type
+     *
+     * @param type the type to set
+     */
+    public void setType(BugType type) {
+        this.type = type;
+    }
+
+    /**
+     * Returns the relevance
+     *
+     * @return the relevance
+     */
+    public MapdustRelevance getRelevance() {
+        return relevance;
+    }
+
+    /**
+     * Sets the relevance
+     *
+     * @param relevance the relevance to set
+     */
+    public void setRelevance(MapdustRelevance relevance) {
+        this.relevance = relevance;
+    }
+
+    /**
+     * Returns the description
+     *
+     * @return the description
+     */
+    public String getDescription() {
+        return description;
+    }
+
+    /**
+     * Sets the description
+     *
+     * @param description the description to set
+     */
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    /**
+     * Returns the isDefaultDescription flag
+     *
+     * @return the isDefaultDescription
+     */
+    public boolean getIsDefaultDescription() {
+        return isDefaultDescription;
+    }
+
+    /**
+     * Sets the isDefaultDescription flag
+     *
+     * @param isDefaultDescription the isDefaultDescription to set
+     */
+    public void setIsDefaultDescription(boolean isDefaultDescription) {
+        this.isDefaultDescription = isDefaultDescription;
+    }
+
+    /**
+     * Returns the address
+     *
+     * @return the address
+     */
+    public Address getAddress() {
+        return address;
+    }
+
+    /**
+     * Sets the address
+     *
+     * @param address the address to set
+     */
+    public void setAddress(Address address) {
+        this.address = address;
+    }
+
+    /**
+     * Returns the nickname
+     *
+     * @return the nickname
+     */
+    public String getNickname() {
+        return nickname;
+    }
+
+    /**
+     * Sets the nickname
+     *
+     * @param nickname the nickname to set
+     */
+    public void setNickname(String nickname) {
+        this.nickname = nickname;
+    }
+
+    /**
+     * Returns the skobbler user id
+     *
+     * @return the skoUid
+     */
+    public String getSkoUid() {
+        return skoUid;
+    }
+
+    /**
+     * Sets the skobbler user id
+     *
+     * @param skoUid the skoUid to set
+     */
+    public void setSkoUid(String skoUid) {
+        this.skoUid = skoUid;
+    }
+
+    /**
+     * Returns the external user id
+     *
+     * @return the extUid
+     */
+    public String getExtUid() {
+        return extUid;
+    }
+
+    /**
+     * Sets the external user id
+     *
+     * @param extUid the extUid to set
+     */
+    public void setExtUid(String extUid) {
+        this.extUid = extUid;
+    }
+
+    /**
+     * Returns the source
+     *
+     * @return the source
+     */
+    public String getSource() {
+        return source;
+    }
+
+    /**
+     * Sets the source
+     *
+     * @param source the source to set
+     */
+    public void setSource(String source) {
+        this.source = source;
+    }
+
+    /**
+     * Returns the kml URL
+     *
+     * @return the kmlUrl
+     */
+    public String getKmlUrl() {
+        return kmlUrl;
+    }
+
+    /**
+     * Sets the kml URL
+     *
+     * @param kmlUrl the kmlUrl to set
+     */
+    public void setKmlUrl(String kmlUrl) {
+        this.kmlUrl = kmlUrl;
+    }
+
+    /**
+     * Returns the number of comments
+     *
+     * @return the numberOfComments
+     */
+    public Integer getNumberOfComments() {
+        return numberOfComments;
+    }
+
+    /**
+     * Sets the number of comments
+     *
+     * @param numberOfComments the numberOfComments to set
+     */
+    public void setNumberOfComments(Integer numberOfComments) {
+        this.numberOfComments = numberOfComments;
+    }
+
+    /**
+     * Returns the bug comments
+     *
+     * @return the comments
+     */
+    public MapdustComment[] getComments() {
+        return comments;
+    }
+
+    /**
+     * Sets the bug comments
+     * @param comments the comments to set
+     */
+    public void setComments(MapdustComment[] comments) {
+        this.comments = comments;
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((id == null) ? 0 : id.hashCode());
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj)
+            return true;
+        if (obj == null)
+            return false;
+        if (getClass() != obj.getClass())
+            return false;
+        MapdustBug other = (MapdustBug) obj;
+        if (id == null) {
+            if (other.id != null)
+                return false;
+        } else if (!id.equals(other.id))
+            return false;
+        return true;
+    }
+
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/value/MapdustBugFilter.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/value/MapdustBugFilter.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/value/MapdustBugFilter.java	(revision 35962)
@@ -0,0 +1,176 @@
+/*
+ * Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ *
+ * Created on Feb 17, 2011 by Bea
+ * Modified on $DateTime$ by $Author$
+ */
+package org.openstreetmap.josm.plugins.mapdust.service.value;
+
+
+import java.util.List;
+
+
+/**
+ * This object represents the MapDust bug filter.
+ *
+ * @author Bea
+ * @version $Revision$
+ */
+public class MapdustBugFilter {
+
+    /** The list of status filter values */
+    private List<Integer> statuses;
+
+    /** The list of type filter values */
+    private List<String> types;
+
+    /** The description filter value */
+    private Boolean descr;
+
+    /** The minimum relevance */
+    private MapdustRelevance minRelevance;
+
+    /** The maximum relevance */
+    private MapdustRelevance maxRelevance;
+
+    /**
+     * Build a <code>MapdustBugFilter</code> object
+     */
+    public MapdustBugFilter() {}
+
+    /**
+     * Builds a <code>MapdustBugFilter</code> object based on the given
+     * arguments.
+     *
+     * @param statuses The list of status filter values
+     * @param types The list of type filter values
+     * @param descr The description filter value
+     * @param minRelevance The minimum relevance
+     * @param maxRelevance The maximum relevance
+     */
+    public MapdustBugFilter(List<Integer> statuses, List<String> types,
+            Boolean descr, MapdustRelevance minRelevance,
+            MapdustRelevance maxRelevance) {
+        this.statuses = statuses;
+        this.types = types;
+        this.descr = descr;
+        this.minRelevance = minRelevance;
+        this.maxRelevance = maxRelevance;
+    }
+
+    /**
+     * Returns the list of status filter values
+     *
+     * @return the statuses
+     */
+    public List<Integer> getStatuses() {
+        return statuses;
+    }
+
+    /**
+     * Sets the list of status filter values.
+     *
+     * @param statuses the statuses to set
+     */
+    public void setStatuses(List<Integer> statuses) {
+        this.statuses = statuses;
+    }
+
+    /**
+     * Returns the list of type filter values.
+     *
+     * @return the types
+     */
+    public List<String> getTypes() {
+        return types;
+    }
+
+    /**
+     * Sets the list of type filter values.
+     *
+     * @param types the types to set
+     */
+    public void setTypes(List<String> types) {
+        this.types = types;
+    }
+
+    /**
+     * Returns the description filter value.
+     *
+     * @return the descr
+     */
+    public Boolean getDescr() {
+        return descr;
+    }
+
+    /**
+     * Sets the description filter value.
+     *
+     * @param descr the descr to set
+     */
+    public void setDescr(Boolean descr) {
+        this.descr = descr;
+    }
+
+    /**
+     * Returns the minimum relevance
+     *
+     * @return the minRelevance
+     */
+    public MapdustRelevance getMinRelevance() {
+        return minRelevance;
+    }
+
+    /**
+     * Sets the minimum relevance
+     *
+     * @param minRelevance the minRelevance to set
+     */
+    public void setMinRelevance(MapdustRelevance minRelevance) {
+        this.minRelevance = minRelevance;
+    }
+
+    /**
+     * Returns the maximum relevance
+     *
+     * @return the maxRelevance
+     */
+    public MapdustRelevance getMaxRelevance() {
+        return maxRelevance;
+    }
+
+    /**
+     * Sets the maximum relevance
+     *
+     * @param maxRelevance the maxRelevance to set
+     */
+    public void setMaxRelevance(MapdustRelevance maxRelevance) {
+        this.maxRelevance = maxRelevance;
+    }
+
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/value/MapdustComment.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/value/MapdustComment.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/value/MapdustComment.java	(revision 35962)
@@ -0,0 +1,228 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.service.value;
+
+import java.util.Date;
+
+
+/**
+ * Defines the attributes of the <code>MapdustComment</code> object.
+ *
+ * @author Bea
+ *
+ */
+public class MapdustComment {
+
+    /** The id of the bug */
+    private Long bugId;
+
+    /** The creation date */
+    private Date dateCreated;
+
+    /** The text of the comment */
+    private String commentText;
+
+    /** The nickname of the user who created the comment */
+    private String nickname;
+
+    /** The skobbler user id of the user who created the comment */
+    private String skoUid;
+
+    /** The external user id of the user who created the comment */
+    private String extUid;
+
+    /** The source of the comment */
+    private String source;
+
+    /**
+     * Builds a <code>MapdustComment</code> object
+     */
+    public MapdustComment() {}
+
+    /**
+     * Builds a <code>MapdustComment</code> object based on the given arguments.
+     *
+     * @param bugId The id of the bug
+     * @param commentText The text of the comment
+     * @param nickname The nickname of the user
+     */
+    public MapdustComment(Long bugId, String commentText, String nickname) {
+        this.bugId = bugId;
+        this.commentText = commentText;
+        this.nickname = nickname;
+    }
+
+    /**
+     * Builds a <code>MapdustComment</code> object based on the given arguments.
+     *
+     * @param bugId The id of the bug
+     * @param dateCreated The date of creation
+     * @param commentText The text of the comment
+     * @param nickname The nickname of the user
+     * @param skoUid The skobbler user id of the user
+     * @param extUid The external user id of the user
+     * @param source The source of the user
+     */
+    public MapdustComment(Long bugId, Date dateCreated, String commentText,
+            String nickname, String skoUid, String extUid, String source) {
+        this.bugId = bugId;
+        this.dateCreated = dateCreated;
+        this.commentText = commentText;
+        this.nickname = nickname;
+        this.skoUid = skoUid;
+        this.extUid = extUid;
+        this.source = source;
+    }
+
+    /**
+     * Returns the id of the bug
+     *
+     * @return the bugId
+     */
+    public Long getBugId() {
+        return bugId;
+    }
+
+    /**
+     * Sets the id of the bug
+     *
+     * @param bugId the bugId to set
+     */
+    public void setBugId(Long bugId) {
+        this.bugId = bugId;
+    }
+
+    /**
+     * Returns the date created
+     *
+     * @return the dateCreated
+     */
+    public Date getDateCreated() {
+        return dateCreated;
+    }
+
+    /**
+     * Sets the date created
+     *
+     * @param dateCreated the dateCreated to set
+     */
+    public void setDateCreated(Date dateCreated) {
+        this.dateCreated = dateCreated;
+    }
+
+    /**
+     * Returns the text of the comment
+     *
+     * @return the commentText
+     */
+    public String getCommentText() {
+        return commentText;
+    }
+
+    /**
+     * Sets the comment text
+     *
+     * @param commentText the commentText to set
+     */
+    public void setCommentText(String commentText) {
+        this.commentText = commentText;
+    }
+
+    /**
+     * Returns the nickname
+     *
+     * @return the nickname
+     */
+    public String getNickname() {
+        return nickname;
+    }
+
+    /**
+     * Sets the nickname
+     *
+     * @param nickname the nickname to set
+     */
+    public void setNickname(String nickname) {
+        this.nickname = nickname;
+    }
+
+    /**
+     * Returns the skobbler userid
+     *
+     * @return the skoUid
+     */
+    public String getSkoUid() {
+        return skoUid;
+    }
+
+    /**
+     * Sets the skobbler user id
+     *
+     * @param skoUid the skoUid to set
+     */
+    public void setSkoUid(String skoUid) {
+        this.skoUid = skoUid;
+    }
+
+    /**
+     * Returns the external user id
+     *
+     * @return the extUid
+     */
+    public String getExtUid() {
+        return extUid;
+    }
+
+    /**
+     * Sets the external user id
+     *
+     * @param extUid the extUid to set
+     */
+    public void setExtUid(String extUid) {
+        this.extUid = extUid;
+    }
+
+    /**
+     * Returns the source
+     *
+     * @return the source
+     */
+    public String getSource() {
+        return source;
+    }
+
+    /**
+     * Sets the source
+     *
+     * @param source the source to set
+     */
+    public void setSource(String source) {
+        this.source = source;
+    }
+
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/value/MapdustRelevance.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/value/MapdustRelevance.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/value/MapdustRelevance.java	(revision 35962)
@@ -0,0 +1,179 @@
+/*
+ * Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ *
+ * Created on Mar 31, 2011 by Bea
+ * Modified on $DateTime$ by $Author$
+ */
+package org.openstreetmap.josm.plugins.mapdust.service.value;
+
+
+import java.io.Serializable;
+import java.util.HashMap;
+
+
+/**
+ * This a helper object, used for representing the MapDust bug relevance. A bug
+ * relevance is defined by a name and a relevance range.
+ *
+ * @author Bea
+ * @version $Revision$
+ */
+public class MapdustRelevance implements Serializable,
+        Comparable<MapdustRelevance> {
+
+    /** Serial Version UID */
+    private static final long serialVersionUID = 8910563589536711954L;
+
+    /** The low MapDust bug relevance */
+    public static final MapdustRelevance LOW = new MapdustRelevance("Low",
+            RelevanceRange.LOW_RANGE);
+
+    /** The low MapDust bug relevance */
+    public static final MapdustRelevance MID_LOW = new MapdustRelevance(
+            "Mid-Low", RelevanceRange.MID_LOW_RANGE);
+
+    /** The low MapDust bug relevance */
+    public static final MapdustRelevance MEDIUM = new MapdustRelevance(
+            "Medium", RelevanceRange.MEDIUM_RANGE);
+
+    /** The low MapDust bug relevance */
+    public static final MapdustRelevance MID_HIGH = new MapdustRelevance(
+            "Mid-High", RelevanceRange.MID_HIGH_RANGE);
+
+    /** The low MapDust bug relevance */
+    public static final MapdustRelevance HIGH = new MapdustRelevance("High",
+            RelevanceRange.HIGH_RANGE);
+
+    /** The name of the relevance */
+    private String name;
+
+    /** The range of the relevance */
+    private RelevanceRange range;
+
+    /** The hash map containing the valid values */
+    private static java.util.HashMap<RelevanceRange, MapdustRelevance> map;
+
+    /***
+     * Builds a new <code>MapdustRelevance</code> object.
+     */
+    public MapdustRelevance() {}
+
+    /**
+     * Builds a new <code>MapdustRelevance</code> object based on the given
+     * arguments.
+     *
+     * @param name The name of the relevance
+     * @param range The range of the relevance
+     */
+    public MapdustRelevance(String name, RelevanceRange range) {
+        this.name = name;
+        this.range = range;
+        if (MapdustRelevance.map == null) {
+            MapdustRelevance.map =
+                    new HashMap<>();
+        }
+        MapdustRelevance.map.put(range, this);
+    }
+
+    /**
+     * Returns the corresponding <code>MapdustRelevance</code> object for the
+     * given value. If there is no corresponding <code>MapdustRelevance</code>
+     * for the given value, the method returns null.
+     *
+     * @param value The value
+     * @return A <code>MapdustRelevance</code> object
+     */
+    public static MapdustRelevance getMapdustRelevance(int value) {
+        RelevanceRange range = RelevanceRange.getRelevanceRange(value);
+        if (range != null) {
+            MapdustRelevance relevance = map.get(range);
+            return relevance;
+        }
+        return null;
+    }
+
+    /**
+     * Returns the name.
+     *
+     * @return the name
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * Returns the range.
+     *
+     * @return the range
+     */
+    public RelevanceRange getRange() {
+        return range;
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((name == null) ? 0 : name.hashCode());
+        result = prime * result + ((range == null) ? 0 : range.hashCode());
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (!(obj instanceof MapdustRelevance)) {
+            return false;
+        }
+        MapdustRelevance other = (MapdustRelevance) obj;
+        if (name == null || other.name == null) {
+            return false;
+        }
+        if (!name.equals(other.name)) {
+            return false;
+        }
+        if (range == null || other.getRange() == null) {
+            return false;
+        }
+        if (!range.equals(other.range)) {
+            return false;
+        }
+        return true;
+    }
+
+    @Override
+    public int compareTo(MapdustRelevance obj) {
+        if (this.equals(obj)) {
+            return 0;
+        }
+        if (obj == null) {
+            return -1;
+        }
+        return this.getRange().compareTo(obj.getRange());
+    }
+
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/value/MapdustResponseStatusCode.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/value/MapdustResponseStatusCode.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/value/MapdustResponseStatusCode.java	(revision 35962)
@@ -0,0 +1,123 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.service.value;
+
+
+/**
+ * Defines the response status codes of the Mapdust service.
+ *
+ * @author Bea
+ */
+public enum MapdustResponseStatusCode {
+
+    /** Status 200 */
+    Status200(200, null, "SUCESS"),
+
+    /** Status 201 */
+    Status201(201, null, "SUCESS"),
+
+    /** Status 204 */
+    Status204(204, 204, "No results found."),
+
+    /** A general status */
+    Status(null, null, "Some other error."),
+
+    /** Status 400 */
+    Status400(400, 400, "Missing or invalid value for parameter 'x'."),
+
+    /** Status 401 */
+    Status401(401, 401, "Invalid API key."),
+
+    /** Status 403 */
+    Status403(403, 403, "Request rate limit exceeded."),
+
+    /** Status 405 */
+    Status405(405, 405, "Method not allowed."),
+
+    /** Status 404 */
+    Status404(404, 404, "Not found."),
+
+    /** Status 500 */
+    Status500(500, 500, "Internal server error."),
+
+    /** Status 601 */
+    Status601(400, 601, "There is no bug with the given ID."),
+
+    /** Status 602 */
+    Status602(400, 602, "There is no skobbler user with thw igven ID.");
+
+    /** The code of the error */
+    private final Integer statusCode;
+
+    /** The Mapdust API code */
+    private final Integer apiCode;
+
+    /** The description of the response code */
+    private final String description;
+
+    /**
+     * Builds a new <code>BillingServiceResponseCode</code>
+     *
+     * @param statusCode The code of the response
+     * @param apiCode The code of the Mapdust API
+     * @param description The description of the response
+     */
+    MapdustResponseStatusCode(Integer statusCode, Integer apiCode,
+            String description) {
+        this.statusCode = statusCode;
+        this.apiCode = apiCode;
+        this.description = description;
+    }
+
+    /**
+     * Returns the status code
+     *
+     * @return the statusCode
+     */
+    public Integer getStatusCode() {
+        return statusCode;
+    }
+
+    /**
+     * Returns the api code
+     *
+     * @return the apiCode
+     */
+    public Integer getApiCode() {
+        return apiCode;
+    }
+
+    /**
+     * Returns the description
+     *
+     * @return the description
+     */
+    public String getDescription() {
+        return description;
+    }
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/value/Paging.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/value/Paging.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/value/Paging.java	(revision 35962)
@@ -0,0 +1,120 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.service.value;
+
+
+/**
+ * Defines the attributes of the <code>Paging</code> object.
+ *
+ * @author Bea
+ */
+public class Paging {
+
+    /** The page */
+    private Integer page;
+
+    /** The items */
+    private Integer items;
+
+    /** The total */
+    private Integer total;
+
+    /**
+     * Builds a <code>Paging</code> object.
+     *
+     */
+    public Paging() {}
+
+    /**
+     * Builds a <code>Paging</code> object with the given argument.
+     *
+     * @param page The page number
+     * @param items The items of objects displayed on that page
+     * @param total The total number of objects
+     */
+    public Paging(Integer page, Integer items, Integer total) {
+        this.page = page;
+        this.items = items;
+        this.total = total;
+    }
+
+    /**
+     * Returns the page number
+     *
+     * @return the page
+     */
+    public Integer getPage() {
+        return page;
+    }
+
+    /**
+     * Sets the page number
+     *
+     * @param page the page to set
+     */
+    public void setPage(Integer page) {
+        this.page = page;
+    }
+
+    /**
+     * Returns the items
+     *
+     * @return the items
+     */
+    public Integer getItems() {
+        return items;
+    }
+
+    /**
+     * Sets the items
+     *
+     * @param items the items to set
+     */
+    public void setItems(Integer items) {
+        this.items = items;
+    }
+
+    /**
+     * Returns the total
+     *
+     * @return the total
+     */
+    public Integer getTotal() {
+        return total;
+    }
+
+    /**
+     * Sets the total
+     *
+     * @param total the total to set
+     */
+    public void setTotal(Integer total) {
+        this.total = total;
+    }
+
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/value/RelevanceRange.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/value/RelevanceRange.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/value/RelevanceRange.java	(revision 35962)
@@ -0,0 +1,172 @@
+/*
+ * Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ *
+ * Created on Apr 5, 2011 by Bea
+ * Modified on $DateTime$ by $Author$
+ */
+package org.openstreetmap.josm.plugins.mapdust.service.value;
+
+
+import java.io.Serializable;
+import java.util.HashSet;
+import java.util.Iterator;
+
+
+/**
+ * This a helper object, used for representing the MapDust bug relevance range.
+ * A bug relevance range is defined by the lower and the upper values.
+ *
+ * @author Bea
+ * @version $Revision$
+ */
+public final class RelevanceRange implements Serializable, Comparable<RelevanceRange> {
+
+    /** The serial version UID */
+    private static final long serialVersionUID = -5187434838022942754L;
+
+    /** The low range */
+    public static final RelevanceRange LOW_RANGE = new RelevanceRange(0, 3);
+
+    /** The mid-low range */
+    public static final RelevanceRange MID_LOW_RANGE = new RelevanceRange(4, 6);
+
+    /** The medium range */
+    public static final RelevanceRange MEDIUM_RANGE = new RelevanceRange(7, 9);
+
+    /** The mid-high range */
+    public static final RelevanceRange MID_HIGH_RANGE = new RelevanceRange(10,
+            13);
+
+    /** The high range */
+    public static final RelevanceRange HIGH_RANGE = new RelevanceRange(14, 17);
+
+    /** A set containing all the valid range values */
+    private static java.util.Set<RelevanceRange> set;
+
+    /** The minimal value */
+    private int lowerValue;
+
+    /** The maximal value */
+    private int upperValue;
+
+    /**
+     * Builds a new <code>RelevanceRange</code> object.
+     *
+     */
+    private RelevanceRange() {}
+
+    /**
+     * Builds a new <code>RelevanceRange</code> object based on the given
+     * arguments.
+     *
+     * @param lowerValue The mimal value of the range
+     * @param upperValue The maximal value of the range
+     */
+    private RelevanceRange(int lowerValue, int upperValue) {
+        this.lowerValue = lowerValue;
+        this.upperValue = upperValue;
+        if (set == null) {
+            set = new HashSet<>();
+        }
+        set.add(this);
+    }
+
+    /**
+     * Returns the range for the given value. A value belongs to a range if
+     * value>=loweValue and value <=upperValue. If there is no range defined for
+     * the given value, then the method return null.
+     *
+     * @param value An integer value, where value >=0 and value <=17
+     * @return The <code>RelevanceRange</code> corresponding to the given value.
+     */
+    public static RelevanceRange getRelevanceRange(int value) {
+        Iterator<RelevanceRange> it = set.iterator();
+        RelevanceRange range = null;
+        while (it.hasNext()) {
+            range = it.next();
+            if (value >= range.getLowerValue()
+                    && value <= range.getUpperValue()) {
+                return range;
+            }
+        }
+        return null;
+    }
+
+    /**
+     * Returns the lower value
+     *
+     * @return the lowerValue
+     */
+    public int getLowerValue() {
+        return lowerValue;
+    }
+
+    /**
+     * Returns the upper value
+     *
+     * @return the upperValue
+     */
+    public int getUpperValue() {
+        return upperValue;
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + lowerValue;
+        result = prime * result + upperValue;
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (!(obj instanceof RelevanceRange)) {
+            return false;
+        }
+        RelevanceRange other = (RelevanceRange) obj;
+        if (lowerValue != other.lowerValue)
+            return false;
+        if (upperValue != other.upperValue)
+            return false;
+        return true;
+    }
+
+    @Override
+    public int compareTo(RelevanceRange obj) {
+        if (this.getLowerValue() < obj.getLowerValue()
+                && this.getUpperValue() < obj.getUpperValue()) {
+            return -1;
+        }
+        if (this.getLowerValue() > obj.getLowerValue()
+                && this.getUpperValue() > obj.getUpperValue()) {
+            return 1;
+        }
+        return 0;
+    }
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/value/Status.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/value/Status.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/value/Status.java	(revision 35962)
@@ -0,0 +1,133 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.service.value;
+
+
+import java.io.Serializable;
+import java.util.HashMap;
+
+
+/**
+ * Defines the attributes of the <code>Status</code> object.
+ *
+ * @author Bea
+ */
+public class Status implements Serializable {
+
+    /** The serial version UID */
+    private static final long serialVersionUID = 5534551701260061940L;
+
+    /** The key of the <code>Status</code> */
+    private Integer key;
+
+    /** The value of the <code>Status</code> */
+    private String value;
+
+    /** The hash map containing the valid values */
+    private static java.util.HashMap<Integer, Status> table = null;
+
+    /**
+     * Builds a new <code>Status</code> object
+     */
+    public Status() {}
+
+    /**
+     * Builds a new <code>status</code> object
+     *
+     * @param key The key of the object
+     * @param value The value of the object
+     */
+    public Status(Integer key, String value) {
+        this.key = key;
+        this.value = value;
+        if (Status.table == null) {
+            Status.table = new HashMap<>();
+        }
+        Status.table.put(key, this);
+    }
+
+    /** The open status */
+    public static final Status OPEN = new Status(1, "Open");
+
+    /** The fixed status */
+    public static final Status FIXED = new Status(2, "Fixed");
+
+    /** The closed status */
+    public static final Status INVALID = new Status(3, "Invalid");
+
+    /**
+     * Returns the <code>Status</code> object for the given value.
+     *
+     * @param value The value of the object
+     * @return A <code>Status</code> object
+     * @throws java.lang.IllegalStateException If the status value is invalid
+     */
+    public static Status getStatus(Integer value)
+            throws java.lang.IllegalStateException {
+        Status status = table.get(value);
+        if (status == null) {
+            throw new java.lang.IllegalStateException();
+        }
+        return status;
+    }
+
+    /**
+     * Verifies if two objects are equals or not.
+     */
+    @Override
+    public boolean equals(java.lang.Object obj) {
+        return (obj == this);
+    }
+
+    /**
+     * Returns the hash code of the object
+     */
+    @Override
+    public int hashCode() {
+        return toString().hashCode();
+    }
+
+    /**
+     * Returns the key
+     *
+     * @return the key
+     */
+    public Integer getKey() {
+        return key;
+    }
+
+    /**
+     * Sets the key
+     *
+     * @return the value
+     */
+    public String getValue() {
+        return value;
+    }
+
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/value/package-info.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/value/package-info.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/value/package-info.java	(revision 35962)
@@ -0,0 +1,4 @@
+/**
+ * Contains the objects used for representing the MapDust data.
+ */
+package org.openstreetmap.josm.plugins.mapdust.service.value;
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/util/Configuration.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/util/Configuration.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/util/Configuration.java	(revision 35962)
@@ -0,0 +1,142 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.util;
+
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+
+/**
+ * This class is used for reading the configurations for the connection to the
+ * MapDust service, from a configuration file.
+ *
+ * @author Bea
+ */
+public final class Configuration {
+
+    /** The instance of this singleton object type */
+    private static final Configuration INSTANCE = new Configuration();
+
+    /** The resource bundle containing properties needed at runtime */
+    private static ResourceBundle properties;
+
+    /** The MapDust URL */
+    private String mapdustUrl;
+
+    /** The MapDust api key */
+    private String mapdustKey;
+
+    /** The MapDust bug details url */
+    private String mapdustBugDetailsUrl;
+
+    /** The MapDust wiki url */
+    private String mapdustWiki;
+    
+    /**
+     * Returns the only instance of this singleton object type.
+     *
+     * @return the instance of the <code>Configuration</code>
+     */
+    public static Configuration getInstance() {
+        return INSTANCE;
+    }
+
+    /**
+     * Reads the configuration parameters.
+     */
+    private Configuration() {
+        try {
+            properties = ResourceBundle.getBundle("mapdust");
+        } catch (RuntimeException e) {
+            throw new MissingResourceException(
+                    "Could not instantiate resource bundle ", "", "mapdust");
+        }
+        try {
+            mapdustUrl = properties.getString("mapdust.url");
+        } catch (RuntimeException e) {
+            throw new MissingResourceException("Could not read mapdust.url ",
+                    "", "mapdust");
+        }
+        try {
+            mapdustKey = properties.getString("mapdust.key");
+        } catch (RuntimeException e) {
+            throw new MissingResourceException("Could not read mapdust.key ",
+                    "", "mapdust");
+        }
+        try {
+            mapdustBugDetailsUrl = properties.getString("mapdust.site");
+        } catch (RuntimeException e) {
+            throw new MissingResourceException("Could not read mapdust.site ",
+                    "", "mapdust");
+        }
+        
+        try {
+            mapdustWiki = properties.getString("mapdust.wiki");
+        } catch (RuntimeException e) {
+            throw new MissingResourceException("Could not read mapdust.wikis ",
+                    "", "mapdust");
+        }
+    }
+
+    /**
+     * Returns the MapDust service URL
+     *
+     * @return the mapdustUrl
+     */
+    public String getMapdustUrl() {
+        return mapdustUrl;
+    }
+
+    /**
+     * Returns the MapDust API key
+     *
+     * @return the mapdustKey
+     */
+    public String getMapdustKey() {
+        return mapdustKey;
+    }
+
+    /**
+     * Returns the MapDust bug details URL
+     *
+     * @return the mapdustBugDetailsUrl
+     */
+    public String getMapdustBugDetailsUrl() {
+        return mapdustBugDetailsUrl;
+    }
+
+    /**
+     * Returns the MapDust wiki URL
+     *
+     * @return the mapdustWiki
+     */
+    public String getMapdustWiki() {
+        return mapdustWiki;
+    }
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/util/http/HttpConnector.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/util/http/HttpConnector.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/util/http/HttpConnector.java	(revision 35962)
@@ -0,0 +1,242 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.util.http;
+
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStreamWriter;
+import java.io.UnsupportedEncodingException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.net.URLEncoder;
+import java.nio.charset.StandardCharsets;
+import java.util.Map;
+
+import org.openstreetmap.josm.plugins.mapdust.util.retry.RetryAgent;
+import org.openstreetmap.josm.plugins.mapdust.util.retry.RetrySetup;
+import org.openstreetmap.josm.tools.Logging;
+
+/**
+ * General connector to a given REST web service.
+ *
+ * @author Bea
+ *
+ */
+public class HttpConnector {
+
+    /** The timeout */
+    private final int timeout = 20000;
+
+    /** The <code>RetrySetup</code> */
+    private final RetrySetup retrySetup;
+
+    /** The <code>HttpURLConnection</code> object */
+    protected HttpURLConnection connection;
+
+    /**
+     * Builds a new <code>HttpConnector</code> object based on the given
+     * argument.
+     *
+     * @param retrySetup The <code>RetrySetup</code> object.
+     */
+    public HttpConnector(RetrySetup retrySetup) {
+        this.retrySetup = retrySetup;
+    }
+
+    /**
+     * Executes a HTTP GET method, based on the given URL. Returns a
+     * <code>HttpResponse</code> object containing the response code , response
+     * message and the response content.
+     *
+     * @param url The URL
+     * @return a <code>HttpResponse</code> object.
+     *
+     * @throws IOException In the case of an error
+     */
+    public HttpResponse executeGET(final URL url) throws IOException {
+        HttpResponse response;
+        RetryAgent<Boolean> agent = new RetryAgent<Boolean>(retrySetup) {
+
+            @Override
+            protected Boolean target() throws IOException {
+                /* 1: set up the connection */
+                connection = (HttpURLConnection) url.openConnection();
+                connection.setConnectTimeout(timeout);
+                connection.setReadTimeout(timeout);
+                /* 2: connect */
+                connection.connect();
+                return true;
+            }
+
+            @Override
+            protected void cleanup() throws IOException {
+                /* No cleanup is needed. */
+            }
+        };
+        try {
+            agent.run();
+        } catch (Exception e) {
+            if (e instanceof IOException) {
+                throw (IOException) e;
+            }
+                throw new IOException(e);
+
+        }
+        /* 3: build the response */
+        int responseCode = connection.getResponseCode();
+        String responseMessage = connection.getResponseMessage();
+        String responseContent = null;
+        if (responseCode == 200 || responseCode == 201 || responseCode == 204) {
+            responseContent = readContent(connection.getContent());
+        }
+        response = new HttpResponse(responseCode, responseMessage, responseContent);
+        return response;
+
+    }
+
+    /**
+     * Executes a HTTP POST method based on the given arguments.
+     *
+     * @param url The URL
+     * @param requestHeaders A map of request headers
+     * @param requestParameters A map of request parameters
+     * @return a <code>HttpResponse</code> object.
+     * @throws IOException In the case of an error
+     */
+    public HttpResponse executePOST(final URL url,
+            final Map<String, String> requestHeaders,
+            final Map<String, String> requestParameters) throws IOException {
+        HttpResponse response = null;
+        RetryAgent<Boolean> agent = new RetryAgent<Boolean>(retrySetup) {
+
+            @Override
+            protected Boolean target() throws IOException {
+                /* 1: set up the connection */
+                connection = (HttpURLConnection) url.openConnection();
+                connection.setConnectTimeout(timeout);
+                connection.setReadTimeout(timeout);
+                /* set the request header */
+                if (requestHeaders != null) {
+                    for (String key : requestHeaders.keySet()) {
+                        connection.addRequestProperty(key,
+                                requestHeaders.get(key));
+                    }
+                }
+                final StringBuffer sbEncodeParameters = new StringBuffer();
+                if (requestParameters != null) {
+                    connection.setDoOutput(true);
+                    sbEncodeParameters
+                            .append(encodeParameters(requestParameters));
+                }
+
+                /* 2: connect */
+                connection.connect();
+
+                /* 3: write content */
+                if (sbEncodeParameters.length() > 0) {
+                    try (OutputStreamWriter out =
+                            new OutputStreamWriter(connection.getOutputStream(), StandardCharsets.UTF_8)) {
+                        out.write(sbEncodeParameters.toString());
+                    }
+                }
+
+                return true;
+            }
+
+            @Override
+            protected void cleanup() throws IOException {
+                /* No cleanup is needed. */
+            }
+        };
+        try {
+            agent.run();
+        } catch (Exception e) {
+            if (e instanceof IOException) {
+                throw (IOException) e;
+            }
+                throw new IOException(e);
+
+        }
+        /* 3: build the response */
+        int responseCode = connection.getResponseCode();
+        String responseMessage = connection.getResponseMessage();
+        String responseContent = null;
+        if (responseCode == 200 || responseCode == 201 || responseCode == 204) {
+            responseContent = readContent(connection.getContent());
+        }
+        response = new HttpResponse(responseCode, responseMessage, responseContent);
+        return response;
+    }
+
+    /**
+     * Reads the content of the given object.
+     *
+     * @param obj An object
+     * @return A string containing the content of the object.
+     *
+     * @throws IOException In the case of an error
+     */
+    protected String readContent(Object obj) throws IOException {
+        String result = "";
+        InputStreamReader in = new InputStreamReader((InputStream) obj, StandardCharsets.UTF_8);
+        BufferedReader buff = new BufferedReader(in);
+        String line = "";
+        while ((line = buff.readLine()) != null) {
+            result += line;
+        }
+        return result;
+    }
+
+    /**
+     * Encodes with 'utf-8' the given map of parameters.
+     *
+     * @param postParameters A map of POST parameters
+     * @return An encoded string.
+     */
+    protected String encodeParameters(Map<String, String> postParameters) {
+        StringBuffer buf = new StringBuffer();
+        int i = 0;
+        for (String key : postParameters.keySet()) {
+            if (i != 0) {
+                buf.append("&");
+            }
+            try {
+                buf.append(key).append("=").append(URLEncoder.encode(
+                        postParameters.get(key), "utf-8"));
+            } catch (UnsupportedEncodingException e) {
+                Logging.error(e);
+            }
+            i++;
+        }
+        return buf.toString();
+    }
+
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/util/http/HttpResponse.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/util/http/HttpResponse.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/util/http/HttpResponse.java	(revision 35962)
@@ -0,0 +1,119 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.util.http;
+
+
+/**
+ * Defines the attributes of a HTTP response.
+ *
+ * @author Bea
+ */
+public class HttpResponse {
+
+    /** The status code */
+    private Integer statusCode;
+
+    /** The status message */
+    private String statusMessage;
+
+    /** The content of the response */
+    private String content;
+
+    /**
+     * Builds an empty <code>HttpResponse</code> object
+     */
+    public HttpResponse() {}
+
+    /**
+     * Builds a new <code>HttpResponse</code> object based on the given
+     * arguments.
+     *
+     * @param statusCode The status code
+     * @param statusMessage The status message
+     * @param content The content of the response
+     */
+    public HttpResponse(Integer statusCode, String statusMessage, String content) {
+        this.statusCode = statusCode;
+        this.statusMessage = statusMessage;
+        this.content = content;
+    }
+
+    /**
+     * Returns the status code.
+     *
+     * @return the statusCode
+     */
+    public Integer getStatusCode() {
+        return statusCode;
+    }
+
+    /**
+     * Sets the status code
+     *
+     * @param statusCode the statusCode to set
+     */
+    public void setStatusCode(Integer statusCode) {
+        this.statusCode = statusCode;
+    }
+
+    /**
+     * Returns the status message
+     *
+     * @return the statusMessage
+     */
+    public String getStatusMessage() {
+        return statusMessage;
+    }
+
+    /**
+     * Sets the status message
+     *
+     * @param statusMessage the statusMessage to set
+     */
+    public void setStatusMessage(String statusMessage) {
+        this.statusMessage = statusMessage;
+    }
+
+    /**
+     * Returns the content of the message
+     *
+     * @return the content
+     */
+    public String getContent() {
+        return content;
+    }
+
+    /**
+     * Sets the content of the message
+     *
+     * @param content the content to set
+     */
+    public void setContent(String content) {
+        this.content = content;
+    }
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/util/http/package-info.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/util/http/package-info.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/util/http/package-info.java	(revision 35962)
@@ -0,0 +1,4 @@
+/**
+ * Contains the classes used for HTTP connection to a given URL.
+ */
+package org.openstreetmap.josm.plugins.mapdust.util.http;
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/util/package-info.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/util/package-info.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/util/package-info.java	(revision 35962)
@@ -0,0 +1,4 @@
+/**
+ * Contains the utility classes.
+ */
+package org.openstreetmap.josm.plugins.mapdust.util;
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/util/retry/RetryAgent.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/util/retry/RetryAgent.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/util/retry/RetryAgent.java	(revision 35962)
@@ -0,0 +1,193 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.util.retry;
+
+import org.openstreetmap.josm.tools.Logging;
+
+/**
+ * A <code>RetryAgent</code> attempts several times to execute a given
+ * operation. It can run in several modes (see {@link RetryMode} for details),
+ * but no matter what mode it is in, it will run at least once and it will stop
+ * trying after the first success. This class has two abstract methods which
+ * have to be implemented specifically by any instance: the target method and
+ * the cleanup method.
+ *
+ * @author rrainn
+ * @param <T> the type of the object returned by the target method
+ */
+public abstract class RetryAgent<T> {
+
+    /** The <code>RetrySetup</code> object  */
+    private RetrySetup setup;
+
+    /**
+     * Builds a new <code>RetryAgent</code> that will run as specified by a
+     * default setup.
+     */
+    public RetryAgent() {
+        this(RetrySetup.DEFAULT);
+    }
+
+    /**
+     * Builds a new <code>RetryAgent</code> that will run as specified by the
+     * given <code>RetrySetup</code>.
+     *
+     * @param setup the metadata specifying the running parameters for this
+     * <code>RetryAgent</code>
+     */
+    public RetryAgent(RetrySetup setup) {
+        this.setup = setup;
+    }
+
+    /**
+     * The target operation of the <code>RetryAgent</code>. This method will be
+     * called several times (until it returns successfully, or until the number
+     * of attempts has been exhausted).
+     *
+     * @return what this method returns must be defined by the implementer
+     * @throws Exception the cases in which this method returns this mode of
+     * exception must be defined by the implementer
+     */
+    protected abstract T target() throws Exception;
+
+    /**
+     * The cleanup operation of the <code>RetryAgent</code>. This method will be
+     * called after each call of the target method.
+     *
+     * @throws Exception the cases in which this method returns this mode of
+     * exception must be defined by the implementer
+     */
+    protected abstract void cleanup() throws Exception;
+
+    /**
+     * Launches the <code>RetryAgent</code>'s execution. This involves at least
+     * one run of the target and cleanup methods.
+     *
+     * @return whatever the target method is returning
+     * @throws Exception in case the target method failed on every attempt and
+     * the running conditions have been exhausted
+     */
+    public T run() throws Exception {
+        T result;
+        if (setup.getMode() == RetryMode.COUNTED) {
+            result = runCounted();
+        } else if (setup.getMode() == RetryMode.TIMED) {
+            result = runTimed();
+        } else {
+            throw new RuntimeException("Unsupported retry mode: '"
+                    + setup.getMode() + "'");
+        }
+        return result;
+    }
+
+    /**
+     * Launches the <code>RetryAgent</code>'s  counted execution.
+     *
+     * @return whatever the target method is returning
+     * @throws Exception in case the target method failed on every attempt and
+     * the running conditions have been exhausted
+     */
+    private T runCounted() throws Exception {
+        T result = null;
+        boolean success = false;
+        int attempts = setup.getStopCondition();
+        int delay = setup.getBaseDelay();
+        do {
+            attempts--;
+            try {
+                result = target();
+                success = true;
+            } catch (Exception e) {
+                if (attempts <= 0) {
+                    throw e;
+                }
+                    try {
+                        Thread.sleep(delay);
+                    } catch (InterruptedException e1) {
+                        Logging.error(e1);
+                        // throw e;
+                    }
+                    delay = delay * 3 / 2;
+
+            } finally {
+                try {
+                    cleanup();
+                } catch (Exception e) {
+                    /* if it can't be cleaned up, there's nothing to do */
+                    Logging.error("Could not clean up", e);
+                }
+            }
+        } while (!success && attempts > 0);
+        return result;
+    }
+
+    /**
+     * Launches the <code>RetryAgent</code>'s  timed execution.
+     *
+     * @return whatever the target method is returning
+     * @throws Exception in case the target method failed on every attempt and
+     * the running conditions have been exhausted
+     */
+    private T runTimed() throws Exception {
+        T result = null;
+        boolean success = false;
+        long delay = setup.getBaseDelay();
+        long maxTime = setup.getStopCondition();
+        do {
+            long time = System.currentTimeMillis();
+            try {
+                result = target();
+                success = true;
+            } catch (Exception e) {
+                // LOG.debug("Attempt failed after "
+                // + (setup.getStopCondition() - maxTime) + " ms", e);
+                if (maxTime - delay <= 0) {
+                    throw e;
+                }
+                    try {
+                        Thread.sleep(delay);
+                    } catch (InterruptedException e1) {
+                        Logging.error(e1);
+                        throw e;
+                    }
+                    delay = delay * 3 / 2;
+
+            } finally {
+                try {
+                    cleanup();
+                } catch (Exception e) {
+                    /* if it can't be cleaned up, there's nothing to do */
+                    Logging.log(Logging.LEVEL_ERROR, "Could not clean up", e);
+                }
+            }
+            time = System.currentTimeMillis() - time;
+            maxTime -= time;
+        } while (!success && maxTime > 0);
+        return result;
+    }
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/util/retry/RetryMode.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/util/retry/RetryMode.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/util/retry/RetryMode.java	(revision 35962)
@@ -0,0 +1,65 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.util.retry;
+
+/**
+ * The mode in which the {@link RetryAgent} should work.
+ *
+ * @author rrainn
+ */
+public enum RetryMode {
+
+    /**
+     * In "counted" mode, the <code>RetryAgent</code> will run for at most a
+     * (defined) number of times before failing.
+     */
+    COUNTED("COUNTED"),
+
+    /**
+     * In "timed" mode, the <code>RetryAgent</code> will run for at most a
+     * (defined) number of milliseconds before failing.
+     */
+    TIMED("TIMED");
+
+    /** The name of the retry mode*/
+    private final String name;
+
+    /**
+     * Builds a <code>RetryMode</code> object
+     * 
+     * @param name the name of the mode
+     */
+    RetryMode(String name) {
+        this.name = name;
+    }
+
+    @Override
+    public String toString() {
+        return name;
+    }
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/util/retry/RetrySetup.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/util/retry/RetrySetup.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/util/retry/RetrySetup.java	(revision 35962)
@@ -0,0 +1,98 @@
+/* Copyright (c) 2010, skobbler GmbH
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the project 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.
+ */
+package org.openstreetmap.josm.plugins.mapdust.util.retry;
+
+
+/**
+ * Defined metadata for the running method used by a {@link RetryAgent}.
+ *
+ * @author rrainn
+ */
+public class RetrySetup {
+
+    /** A default configuration for the {@link RetryAgent} */
+    public static final RetrySetup DEFAULT = new RetrySetup(RetryMode.COUNTED,
+            1, 500);
+
+    /** The retry mode */
+    private final RetryMode mode;
+
+    /** The stop condition */
+    private final int stopCondition;
+
+    /** The delay */
+    private final int baseDelay; // milliseconds
+
+    /**
+     * Builds a new <code>RetrySetup</code> with the specified values.
+     *
+     * @param mode the method for computing time intervals between attempts
+     * @param stopCondition the value at which to cease attempts
+     * @param baseDelay the base delay between attempts
+     * @see RetrySetup#getMode()
+     * @see RetrySetup#getStopCondition()
+     * @see RetrySetup#getBaseDelay()
+     */
+    public RetrySetup(RetryMode mode, int stopCondition, int baseDelay) {
+        this.mode = mode;
+        this.stopCondition = stopCondition;
+        this.baseDelay = baseDelay;
+    }
+
+    /**
+     * Returns the method for computing time intervals between attempts.
+     *
+     * @return the retry mode
+     * @see RetryMode
+     */
+    public RetryMode getMode() {
+        return mode;
+    }
+
+    /**
+     * Returns the value at which new attempts are ceased, intrerpreted either
+     * as 'maximum number of attempts' (for <code>COUNTED</code> mode) or as
+     * 'maximum number of milliseconds' (for <code>TIMED</code> mode).
+     *
+     * @return the stop condition
+     */
+    public int getStopCondition() {
+        return stopCondition;
+    }
+
+    /**
+     * Returns the base delay in milliseconds between attempts. Each delay will
+     * be computed based on this basic value, which will be augmented after each
+     * attempt.
+     *
+     * @return the base delay between attempts, in milliseconds
+     */
+    public int getBaseDelay() {
+        return baseDelay;
+    }
+}
Index: /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/util/retry/package-info.java
===================================================================
--- /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/util/retry/package-info.java	(revision 35962)
+++ /applications/editors/josm/oldplugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/util/retry/package-info.java	(revision 35962)
@@ -0,0 +1,2 @@
+/** contains the RetryAgent classes*/
+package org.openstreetmap.josm.plugins.mapdust.util.retry;
