Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eliminate code duplication #5

Open
wants to merge 25 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
f44c9cc
Follow suggestion "Type may be primitive"
kolesar-andras Jan 28, 2023
8920c0b
Fix warning "integer division in floating-point context"
kolesar-andras Jan 28, 2023
33c9775
Extend class from core
kolesar-andras Jan 28, 2023
2eb39d7
Rename class to match plugin name
kolesar-andras Jan 28, 2023
1666259
Remove unused code
kolesar-andras Jan 28, 2023
de55362
Switch to LF line endings
kolesar-andras Jan 28, 2023
19fed78
Move static methods to helper class
kolesar-andras Jan 28, 2023
689981e
Simplify code from parent class
kolesar-andras Jan 28, 2023
d42e277
Fix registration in keydetector
kolesar-andras Jan 28, 2023
f5b78d0
Reuse whole paint method from parent class
kolesar-andras Jan 29, 2023
e369ec4
Extract methods from paint
kolesar-andras Jan 29, 2023
971d37c
Move local variable declaration into smallest possible scope
kolesar-andras Jan 29, 2023
cd95baa
Remove unused code
kolesar-andras Jan 29, 2023
4086a14
Rename mod4 to meta
kolesar-andras Jan 29, 2023
b10071c
Fix bug when paint did not follow mouse movement
kolesar-andras Jan 29, 2023
992278d
Switch from EastNorth to LatLon
kolesar-andras Jan 29, 2023
a47dc15
Remove override of mouseReleased method
kolesar-andras Jan 29, 2023
857b642
Fix old bug that caused NPE
kolesar-andras Jan 29, 2023
a58d8ba
Skip updating cursor dependent object while meta key is pressed
kolesar-andras Jan 29, 2023
ca2d799
Use the same condition in related methods
kolesar-andras Jan 29, 2023
b5e8442
Use own copy of base class until merge
kolesar-andras Jan 30, 2023
7040438
Move settings management to a new class
kolesar-andras Jan 30, 2023
35d63b8
Test revert and resolve conflict with later commit
kolesar-andras Jan 30, 2023
97a9883
Add copy of base class from core
kolesar-andras Jan 30, 2023
bd4a8c2
Don't use wildcard imports
kolesar-andras Feb 21, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .classpath
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry combineaccessrules="false" kind="src" path="/JOSM"/>
<classpathentry kind="output" path="bin"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry combineaccessrules="false" kind="src" path="/JOSM"/>
<classpathentry kind="output" path="bin"/>
</classpath>
46 changes: 23 additions & 23 deletions .project
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>JOSM-improve-way</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>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>JOSM-improve-way</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>
42 changes: 21 additions & 21 deletions build.xml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<project name="ImproveWay" default="dist" basedir=".">
<!-- enter the SVN commit message -->
<property name="commit.message" value="ImproveWay: recompile for compatibility with JOSM r17896"/>
<!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
<property name="plugin.main.version" value="17896"/>
<!-- Configure these properties (replace "..." accordingly).
See https://josm.openstreetmap.de/wiki/DevelopersGuide/DevelopingPlugins
-->
<property name="plugin.author" value="Kolesár András &lt;[email protected]&gt;"/>
<property name="plugin.class" value="org.openstreetmap.josm.plugins.improveway.ImproveWayPlugin"/>
<property name="plugin.description" value="Extends ImproveWayAccuracy mode with helpers to place nodes at accurate distances and angles."/>
<property name="plugin.icon" value="images/mapmode/improveway.png"/>
<property name="plugin.link" value="https://wiki.openstreetmap.org/wiki/JOSM/Plugins/ImproveWay"/>
<property name="plugin.canloadatruntime" value="true"/>
<!-- ** include targets that all plugins have in common ** -->
<import file="../build-common.xml"/>
</project>
<?xml version="1.0" encoding="utf-8"?>
<project name="ImproveWay" default="dist" basedir=".">
<!-- enter the SVN commit message -->
<property name="commit.message" value="ImproveWay: recompile for compatibility with JOSM r17896"/>
<!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
<property name="plugin.main.version" value="17896"/>

<!-- Configure these properties (replace "..." accordingly).
See https://josm.openstreetmap.de/wiki/DevelopersGuide/DevelopingPlugins
-->
<property name="plugin.author" value="Kolesár András &lt;[email protected]&gt;"/>
<property name="plugin.class" value="org.openstreetmap.josm.plugins.improveway.ImproveWayPlugin"/>
<property name="plugin.description" value="Extends ImproveWayAccuracy mode with helpers to place nodes at accurate distances and angles."/>
<property name="plugin.icon" value="images/mapmode/improveway.png"/>
<property name="plugin.link" value="https://wiki.openstreetmap.org/wiki/JOSM/Plugins/ImproveWay"/>
<property name="plugin.canloadatruntime" value="true"/>

<!-- ** include targets that all plugins have in common ** -->
<import file="../build-common.xml"/>

</project>
Loading