Commit 39d49979 authored by Vincent Privat's avatar Vincent Privat

see #josm15985 - fix help topic and javadoc warnings

git-svn-id: https://svn.openstreetmap.org/applications/editors/josm/plugins/wikipedia@34079 b9d5c4c9-76e1-0310-9c85-f3177eceb1e4
parent 1441d298
......@@ -16,6 +16,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.doc.comment.support=enabled
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
......@@ -39,12 +40,25 @@ 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.invalidJavadoc=warning
org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
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.missingJavadocComments=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore
......
......@@ -28,7 +28,6 @@ import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import org.openstreetmap.josm.Main;
import org.openstreetmap.josm.data.coor.LatLon;
import org.openstreetmap.josm.data.osm.OsmPrimitive;
import org.openstreetmap.josm.gui.datatransfer.ClipboardUtils;
......@@ -221,6 +220,8 @@ public final class WikipediaApp {
/**
* Returns a map mapping wikipedia articles to wikidata ids.
* @param articles wikipedia article names
* @return article / wikidata id map
*/
public Map<String, String> getWikidataForArticles(Collection<String> articles) {
return articles.stream()
......@@ -251,6 +252,8 @@ public final class WikipediaApp {
/**
* Get Wikidata IDs. For any unknown IDs, resolve them (normalize and get redirects),
* and try getting Wikidata IDs again
* @param articles wikipedia article names
* @return article / wikidata id map
*/
private Map<String, String> resolveWikidataItems(Collection<String> articles) {
final Map<String, String> result = getWikidataForArticles0(articles);
......@@ -322,6 +325,8 @@ public final class WikipediaApp {
/**
* Given a list of wikipedia titles, returns a map of corresponding normalized title names,
* or if the title is a redirect page, the result is the redirect target.
* @param articles wikipedia articles
* @return article / wikidata id map
*/
private Map<String, String> resolveRedirectsForArticles(Collection<String> articles) {
try {
......
......@@ -14,7 +14,6 @@ import java.util.Set;
import javax.swing.JOptionPane;
import org.openstreetmap.josm.Main;
import org.openstreetmap.josm.actions.JosmAction;
import org.openstreetmap.josm.command.ChangePropertyCommand;
import org.openstreetmap.josm.command.Command;
......
......@@ -46,7 +46,7 @@ public class WikipediaCopyTemplate {
/**
* Class to hold copy templates for serialization using {@link Preferences}.
* Public visibility is needed for reflection used in {@link Preferences#getListOfStructs}.
* Public visibility is needed for reflection used in {@link Preferences#getListOfMaps}.
*/
@SuppressWarnings("WeakerAccess")
public static class CoordCopyTemplateEntry {
......
......@@ -18,7 +18,6 @@ import javax.swing.JLabel;
import javax.swing.JTable;
import javax.swing.table.DefaultTableCellRenderer;
import org.openstreetmap.josm.Main;
import org.openstreetmap.josm.gui.util.GuiHelper;
import org.openstreetmap.josm.tools.Logging;
import org.openstreetmap.josm.tools.Utils;
......
// License: GPL. For details, see LICENSE file.
package org.wikipedia.gui;
import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
import static org.openstreetmap.josm.tools.I18n.tr;
import java.awt.event.ActionEvent;
......@@ -365,6 +366,11 @@ public class WikipediaToggleDialog extends ToggleDialog implements ActiveLayerCh
private final DataSetListenerAdapter dataChangedAdapter = new DataSetListenerAdapter(this);
@Override
public String helpTopic() {
return ht("/Plugin/Wikipedia");
}
@Override
public void showNotify() {
DatasetEventManager.getInstance().addDatasetListener(dataChangedAdapter, FireMode.IN_EDT_CONSOLIDATED);
......
......@@ -67,6 +67,9 @@ public class SophoxDownloadReader extends BoundingBoxDownloader {
* @param downloadArea The area to download
* @param sophoxServer The Sophox server to use
* @param sophoxQuery The Sophox query
* @param asNewLayer if the data should be downloaded into a new layer
* @param downloadReferrers if the referrers of the object should be downloaded as well
* @param downloadFull if the members of a relation should be downloaded as well
*/
public SophoxDownloadReader(Bounds downloadArea, String sophoxServer, String sophoxQuery,
boolean asNewLayer, boolean downloadReferrers, boolean downloadFull) {
......
......@@ -17,6 +17,10 @@ public class Debouncer {
/**
* Debounces {@code callable} by {@code delay}, i.e., schedules it to be executed after {@code delay},
* or cancels its execution if the method is called with the same key within the {@code delay} again.
* @param key key
* @param runnable runnable to be scheduled
* @param delay delay value
* @param unit delay time unit
*/
public void debounce(final Object key, final Runnable runnable, long delay, TimeUnit unit) {
final Future<?> prev = delayedMap.put(key, scheduler.schedule(() -> {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment