Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
<classpathentry kind="lib" path="D:/JOSM/josm-latest.jar"/>
<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/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry combineaccessrules="false" kind="src" path="/JOSM"/>
<classpathentry kind="output" path="bin"/>
</classpath>
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/build/
/bin/
6 changes: 3 additions & 3 deletions .settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.7
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.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.7
org.eclipse.jdt.core.compiler.source=1.8
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
Expand Down
21 changes: 0 additions & 21 deletions README

This file was deleted.

Binary file removed bin/andrei/josm/plugin/color/ColorAction.class
Binary file not shown.
Binary file removed bin/andrei/josm/plugin/color/ColorDialog$1.class
Binary file not shown.
Binary file removed bin/andrei/josm/plugin/color/ColorDialog$2.class
Binary file not shown.
Binary file removed bin/andrei/josm/plugin/color/ColorDialog.class
Binary file not shown.
Binary file removed bin/andrei/josm/plugin/color/ColorPlugin.class
Binary file not shown.
2 changes: 1 addition & 1 deletion build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<!-- enter the SVN commit message -->
<property name="commit.message" value="Initial commit"/>
<!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
<property name="plugin.main.version" value="1111"/>
<property name="plugin.main.version" value="10580"/>

<!-- Configure these properties (replace "..." accordingly).
See http://josm.openstreetmap.de/wiki/DevelopersGuide/DevelopingPlugins
Expand Down
340 changes: 0 additions & 340 deletions build/LICENSE

This file was deleted.

21 changes: 0 additions & 21 deletions build/README

This file was deleted.

Binary file removed build/andrei/josm/plugin/color/ColorAction.class
Binary file not shown.
Binary file removed build/andrei/josm/plugin/color/ColorDialog$1.class
Binary file not shown.
Binary file removed build/andrei/josm/plugin/color/ColorDialog$2.class
Binary file not shown.
Binary file removed build/andrei/josm/plugin/color/ColorDialog.class
Binary file not shown.
Binary file removed build/andrei/josm/plugin/color/ColorPlugin.class
Binary file not shown.
Binary file removed build/data/bg.lang
Binary file not shown.
Binary file removed build/data/ca.lang
Binary file not shown.
Binary file removed build/data/cs.lang
Binary file not shown.
Binary file removed build/data/da.lang
Binary file not shown.
Binary file removed build/data/de.lang
Binary file not shown.
Binary file removed build/data/el.lang
Binary file not shown.
Binary file removed build/data/en.lang
Binary file not shown.
Binary file removed build/data/en_AU.lang
Binary file not shown.
Binary file removed build/data/en_GB.lang
Binary file not shown.
Binary file removed build/data/es.lang
Binary file not shown.
Binary file removed build/data/et.lang
Binary file not shown.
Binary file removed build/data/eu.lang
Binary file not shown.
Binary file removed build/data/fi.lang
Binary file not shown.
Binary file removed build/data/fr.lang
Binary file not shown.
Binary file removed build/data/gl.lang
Binary file not shown.
Binary file removed build/data/hu.lang
Binary file not shown.
Binary file removed build/data/id.lang
Binary file not shown.
Binary file removed build/data/it.lang
Binary file not shown.
Binary file removed build/data/ja.lang
Binary file not shown.
Binary file removed build/data/nb.lang
Binary file not shown.
Binary file removed build/data/nl.lang
Binary file not shown.
Binary file removed build/data/pl.lang
Binary file not shown.
Binary file removed build/data/pt.lang
Binary file not shown.
Binary file removed build/data/pt_BR.lang
Binary file not shown.
Binary file removed build/data/ru.lang
Binary file not shown.
Binary file removed build/data/sk.lang
Binary file not shown.
Binary file removed build/data/sv.lang
Binary file not shown.
Binary file removed build/data/tr.lang
Binary file not shown.
Binary file removed build/data/uk.lang
Binary file not shown.
Binary file removed build/data/zh_CN.lang
Binary file not shown.
Binary file removed build/data/zh_TW.lang
Binary file not shown.
Binary file removed build/images/dialogs/Color.png
Binary file not shown.
Binary file removed build/images/dialogs/turnrestrictions.png
Binary file not shown.
Binary file removed build/images/preferences/Color.png
Binary file not shown.
32 changes: 11 additions & 21 deletions src/andrei/josm/plugin/color/ColorAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

import javax.swing.JOptionPane;

import org.openstreetmap.josm.Main;
import org.openstreetmap.josm.actions.JosmAction;
import org.openstreetmap.josm.data.osm.OsmPrimitive;
import org.openstreetmap.josm.tools.I18n;
Expand All @@ -24,31 +23,22 @@ public ColorAction() {
super(tr("Color "), "dialogs/Color.png", tr("Choose or set a color for objects."),
Shortcut.registerShortcut("tools:Color", tr("Tool: {0}", tr("Color Plugin")), KeyEvent.VK_Y, Shortcut.CTRL_SHIFT),
true, "Color", true);

}

@Override
public void actionPerformed(ActionEvent arg0) {
try
{
Collection<OsmPrimitive> selectedPrimitive = Main.main.getCurrentDataSet().getSelectedNodesAndWays();
if (selectedPrimitive.size() != 1)
{
JOptionPane.showMessageDialog(null, I18n.tr("Choose one node or way", new Object[0]), "Error", 0);

return;
}
else {
new ColorDialog().showDialog();
}
}catch(Exception e){
e.printStackTrace();
}
Collection<OsmPrimitive> selectedPrimitive = getLayerManager().getEditDataSet().getSelectedNodesAndWays();
if (selectedPrimitive.size() != 1) {
JOptionPane.showMessageDialog(null, I18n.tr("Choose one node or way", new Object[0]), "Error", 0);

return;
} else {
new ColorDialog().showDialog();
}
}
protected void updateEnabledState()
{
setEnabled(getCurrentDataSet() != null);
}

@Override
protected void updateEnabledState() {
setEnabled(getLayerManager().getEditDataSet() != null);
}
}