r205 - trunk/chorem-webmotion/src/main/java/org/chorem/webmotion/actions
Author: ymartel Date: 2012-07-03 17:22:49 +0200 (Tue, 03 Jul 2012) New Revision: 205 Url: http://chorem.org/repositories/revision/chorem/205 Log: refs #661 when list an extension, only see it, not its dependencies Modified: trunk/chorem-webmotion/src/main/java/org/chorem/webmotion/actions/GenericAction.java Modified: trunk/chorem-webmotion/src/main/java/org/chorem/webmotion/actions/GenericAction.java =================================================================== --- trunk/chorem-webmotion/src/main/java/org/chorem/webmotion/actions/GenericAction.java 2012-07-03 12:52:32 UTC (rev 204) +++ trunk/chorem-webmotion/src/main/java/org/chorem/webmotion/actions/GenericAction.java 2012-07-03 15:22:49 UTC (rev 205) @@ -54,6 +54,7 @@ import java.util.LinkedHashSet; import java.util.List; import java.util.Map; +import java.util.Set; /** * @@ -171,8 +172,10 @@ // on classe par extension demande les resultats LinkedHashMultimap<String, Wikitty> map = LinkedHashMultimap.create(); for (Wikitty w : results) { - for (String ext : w.getExtensionNames()) { - map.put(ext, w); + for (WikittyExtension ext : w.getExtensions()) { + if (exts.contains(ext)) { + map.put(ext.getName(), w); + } } } @@ -182,6 +185,13 @@ map.removeAll(ext); } + for (String ext : extension) { + // The wanted extensions should be present, even without wikitties... + Set<Wikitty> wikitties = map.get(ext); + if (wikitties == null || wikitties.isEmpty() ) { + map.put(ext, null); + } + } return map; }
participants (1)
-
ymartel@users.chorem.org