diff --git a/src/fr/devinsy/xidyn/data/SimpleTagData.java b/src/fr/devinsy/xidyn/data/SimpleTagData.java index aa8566c..b99a604 100644 --- a/src/fr/devinsy/xidyn/data/SimpleTagData.java +++ b/src/fr/devinsy/xidyn/data/SimpleTagData.java @@ -112,7 +112,7 @@ public class SimpleTagData implements Serializable, TagData result = this.attributes; // - return (result); + return result; } /** @@ -125,7 +125,7 @@ public class SimpleTagData implements Serializable, TagData result = this.content; // - return (result); + return result; } /** @@ -137,7 +137,7 @@ public class SimpleTagData implements Serializable, TagData result = this.displayMode; - return (result); + return result; } /** @@ -150,7 +150,7 @@ public class SimpleTagData implements Serializable, TagData result = this.excludeSection; // - return (result); + return result; } /** @@ -163,7 +163,7 @@ public class SimpleTagData implements Serializable, TagData result = this.iterationStrategy; // - return (result); + return result; } /** diff --git a/src/fr/devinsy/xidyn/data/TagAttributes.java b/src/fr/devinsy/xidyn/data/TagAttributes.java index 554c208..c0d2428 100644 --- a/src/fr/devinsy/xidyn/data/TagAttributes.java +++ b/src/fr/devinsy/xidyn/data/TagAttributes.java @@ -54,7 +54,7 @@ public class TagAttributes extends HashMap { if (this.containsKey(label)) { - this.put(label, this.get(label) + value); + this.put(label, this.get(label) + " " + value); } else { @@ -79,7 +79,7 @@ public class TagAttributes extends HashMap } // - return (result); + return result; } /** diff --git a/src/fr/devinsy/xidyn/data/TagDataListById.java b/src/fr/devinsy/xidyn/data/TagDataListById.java index 4a642e2..4c075ff 100644 --- a/src/fr/devinsy/xidyn/data/TagDataListById.java +++ b/src/fr/devinsy/xidyn/data/TagDataListById.java @@ -46,7 +46,7 @@ public class TagDataListById extends HashMap implements TagData result = this.get(id); // - return (result); + return result; } /** diff --git a/src/fr/devinsy/xidyn/data/TagDataManager.java b/src/fr/devinsy/xidyn/data/TagDataManager.java index c1ffd2e..fc9e260 100644 --- a/src/fr/devinsy/xidyn/data/TagDataManager.java +++ b/src/fr/devinsy/xidyn/data/TagDataManager.java @@ -18,6 +18,8 @@ */ package fr.devinsy.xidyn.data; +import fr.devinsy.xidyn.presenters.DomPresenterCore; + /** * * @author Christian Pierre MOMON (christian.momon@devinsy.fr) @@ -249,16 +251,35 @@ public class TagDataManager } /** - * - */ + * + * @param id + */ + public void removeTag(final String id) + { + SimpleTagData tag = this.getIdData(id); + + tag.attributes().setAttribute("class", DomPresenterCore.NODISPLAY_CLASS); + } + + /** + * + * @param id + * @param line + * @param label + * @param value + */ public void setAttribute(final String id, final int line, final String label, final long value) { setAttribute(id, line, label, String.valueOf(value)); } /** - * - */ + * + * @param id + * @param line + * @param label + * @param value + */ public void setAttribute(final String id, final int line, final String label, final String value) { SimpleTagData tag = this.getIdData(id, line); @@ -267,8 +288,13 @@ public class TagDataManager } /** - * - */ + * + * @param id + * @param line + * @param column + * @param label + * @param value + */ public void setAttribute(final String id, final int line, final String column, final String label, final long value) { setAttribute(id, line, column, label, String.valueOf(value)); @@ -357,8 +383,8 @@ public class TagDataManager } /** - * - */ + * + */ public void setContent(final String id, final String content) { SimpleTagData idData = this.getIdData(id); diff --git a/src/fr/devinsy/xidyn/presenters/DomPresenter.java b/src/fr/devinsy/xidyn/presenters/DomPresenter.java index d7de736..8f94c52 100644 --- a/src/fr/devinsy/xidyn/presenters/DomPresenter.java +++ b/src/fr/devinsy/xidyn/presenters/DomPresenter.java @@ -103,7 +103,7 @@ public class DomPresenter implements Presenter } // - return (result); + return result; } /** @@ -116,7 +116,7 @@ public class DomPresenter implements Presenter result = this.dom; // - return (result); + return result; } /** @@ -130,7 +130,7 @@ public class DomPresenter implements Presenter result = this.dom; // - return (result); + return result; } /** diff --git a/src/fr/devinsy/xidyn/presenters/DomPresenterCore.java b/src/fr/devinsy/xidyn/presenters/DomPresenterCore.java index 27b5122..8d9a4cf 100644 --- a/src/fr/devinsy/xidyn/presenters/DomPresenterCore.java +++ b/src/fr/devinsy/xidyn/presenters/DomPresenterCore.java @@ -49,6 +49,7 @@ public class DomPresenterCore private static Logger logger = LoggerFactory.getLogger(DomPresenterCore.class); public static final char INDEX_SEPARATOR = '_'; + public static final String NODISPLAY_CLASS = "xid:nodisplay"; /** * Dynamize a doc with data. @@ -62,7 +63,7 @@ public class DomPresenterCore result = htmlCode.getBuffer(); // - return (result); + return result; } /** @@ -75,7 +76,7 @@ public class DomPresenterCore result = dynamize(doc, data.getIdsDataById()); // - return (result); + return result; } /** @@ -121,7 +122,7 @@ public class DomPresenterCore } // - return (result); + return result; } /** @@ -169,7 +170,7 @@ public class DomPresenterCore } // - return (result); + return result; } /** @@ -216,7 +217,7 @@ public class DomPresenterCore } // - return (result); + return result; } /** @@ -269,7 +270,7 @@ public class DomPresenterCore String name; name = getClassAttributeValue(node); - if ((name == null) || ((name != null) && (!name.equals("xid:nodisplay")))) + if ((name == null) || ((name != null) && (!name.equals(NODISPLAY_CLASS)))) { int type = node.getNodeType(); switch (type) @@ -383,7 +384,7 @@ public class DomPresenterCore result = processAttributes(attrs, null, null, ""); // - return (result); + return result; } /** @@ -396,7 +397,7 @@ public class DomPresenterCore result = processAttributes(attrs, dataAttributes, ""); // - return (result); + return result; } /** @@ -461,7 +462,7 @@ public class DomPresenterCore } // - return (result); + return result; } /** @@ -474,7 +475,7 @@ public class DomPresenterCore result = processAttributes(attrs, mergeAttributes(dataAttributes, namedDataAttributes), suffix); // - return (result); + return result; } /** @@ -708,7 +709,7 @@ public class DomPresenterCore String theClass = data.attributes().getAttribute("class"); - if ((theClass == null) || (!theClass.equals("xid:nodisplay"))) + if ((theClass == null) || (!theClass.equals(NODISPLAY_CLASS))) { // Open the tag. result.append("<"); diff --git a/src/fr/devinsy/xidyn/presenters/FilePresenter.java b/src/fr/devinsy/xidyn/presenters/FilePresenter.java index 7055428..7e5f462 100644 --- a/src/fr/devinsy/xidyn/presenters/FilePresenter.java +++ b/src/fr/devinsy/xidyn/presenters/FilePresenter.java @@ -100,7 +100,7 @@ public class FilePresenter extends StringPresenter result = super.dynamize(data); // - return (result); + return result; } /** @@ -113,7 +113,7 @@ public class FilePresenter extends StringPresenter result = this.source; // - return (result); + return result; } /** @@ -127,7 +127,7 @@ public class FilePresenter extends StringPresenter result = this.sourceFilePathname; // - return (result); + return result; } /** diff --git a/src/fr/devinsy/xidyn/presenters/FilePresenters.java b/src/fr/devinsy/xidyn/presenters/FilePresenters.java index 37dc700..a7af61a 100644 --- a/src/fr/devinsy/xidyn/presenters/FilePresenters.java +++ b/src/fr/devinsy/xidyn/presenters/FilePresenters.java @@ -68,7 +68,7 @@ public class FilePresenters extends Vector } // - return (result); + return result; } /** @@ -81,7 +81,7 @@ public class FilePresenters extends Vector result = this.get(id); // - return (result); + return result; } /** @@ -125,7 +125,7 @@ public class FilePresenters extends Vector } // - return (result); + return result; } /** @@ -169,7 +169,7 @@ public class FilePresenters extends Vector } // - return (result); + return result; } /** @@ -183,7 +183,7 @@ public class FilePresenters extends Vector result = ""; // - return (result); + return result; } } diff --git a/src/fr/devinsy/xidyn/presenters/FilePresentersProxy.java b/src/fr/devinsy/xidyn/presenters/FilePresentersProxy.java index d1c4ec1..38cb909 100644 --- a/src/fr/devinsy/xidyn/presenters/FilePresentersProxy.java +++ b/src/fr/devinsy/xidyn/presenters/FilePresentersProxy.java @@ -61,7 +61,7 @@ public class FilePresentersProxy } // - return (result); + return result; } /** @@ -79,7 +79,7 @@ public class FilePresentersProxy result = instance; // - return (result); + return result; } } diff --git a/src/fr/devinsy/xidyn/presenters/PresenterUtils.java b/src/fr/devinsy/xidyn/presenters/PresenterUtils.java index 445b08f..ef9e3a4 100644 --- a/src/fr/devinsy/xidyn/presenters/PresenterUtils.java +++ b/src/fr/devinsy/xidyn/presenters/PresenterUtils.java @@ -87,7 +87,7 @@ public class PresenterUtils result = presenter.dynamize((TagDataManager) null); // - return (result); + return result; } /** @@ -102,7 +102,7 @@ public class PresenterUtils result = presenter.dynamize(datas); // - return (result); + return result; } /** @@ -118,7 +118,7 @@ public class PresenterUtils result = presenter.dynamize(datas); // - return (result); + return result; } /** diff --git a/src/fr/devinsy/xidyn/presenters/StringPresenter.java b/src/fr/devinsy/xidyn/presenters/StringPresenter.java index f7c435d..c09d8c1 100644 --- a/src/fr/devinsy/xidyn/presenters/StringPresenter.java +++ b/src/fr/devinsy/xidyn/presenters/StringPresenter.java @@ -155,7 +155,7 @@ public class StringPresenter implements Presenter } // - return (result); + return result; } /** @@ -169,7 +169,7 @@ public class StringPresenter implements Presenter result = this.source; // - return (result); + return result; } /** diff --git a/src/fr/devinsy/xidyn/presenters/URLPresenter.java b/src/fr/devinsy/xidyn/presenters/URLPresenter.java index b9f2405..f842c55 100644 --- a/src/fr/devinsy/xidyn/presenters/URLPresenter.java +++ b/src/fr/devinsy/xidyn/presenters/URLPresenter.java @@ -101,7 +101,7 @@ public class URLPresenter extends StringPresenter result = super.dynamize(data); // - return (result); + return result; } /** @@ -115,7 +115,7 @@ public class URLPresenter extends StringPresenter result = this.sourcePathname; // - return (result); + return result; } /** @@ -128,7 +128,7 @@ public class URLPresenter extends StringPresenter result = this.source; // - return (result); + return result; } /** diff --git a/src/fr/devinsy/xidyn/utils/ParserErrorHandler.java b/src/fr/devinsy/xidyn/utils/ParserErrorHandler.java index 45ea7d5..77dcfd2 100644 --- a/src/fr/devinsy/xidyn/utils/ParserErrorHandler.java +++ b/src/fr/devinsy/xidyn/utils/ParserErrorHandler.java @@ -56,7 +56,7 @@ public class ParserErrorHandler implements ErrorHandler result = fatalErrorsCount() + errorsCount() + warningCount(); // - return (result); + return result; } /** @@ -85,7 +85,7 @@ public class ParserErrorHandler implements ErrorHandler result = this.errorsCount; // - return (result); + return result; } /** @@ -115,7 +115,7 @@ public class ParserErrorHandler implements ErrorHandler result = this.fatalErrorsCount; // - return (result); + return result; } /** @@ -135,7 +135,7 @@ public class ParserErrorHandler implements ErrorHandler } // - return (result); + return result; } /** @@ -184,6 +184,6 @@ public class ParserErrorHandler implements ErrorHandler result = this.warningCount; // - return (result); + return result; } } diff --git a/src/fr/devinsy/xidyn/utils/XidynUtils.java b/src/fr/devinsy/xidyn/utils/XidynUtils.java index 355aa7a..b6ccd6e 100644 --- a/src/fr/devinsy/xidyn/utils/XidynUtils.java +++ b/src/fr/devinsy/xidyn/utils/XidynUtils.java @@ -145,7 +145,7 @@ public class XidynUtils } // - return (result); + return result; } /** @@ -217,7 +217,7 @@ public class XidynUtils } // - return (result); + return result; } /** @@ -245,7 +245,7 @@ public class XidynUtils } // - return (result); + return result; } /** @@ -278,7 +278,7 @@ public class XidynUtils } // - return (result); + return result; } /** @@ -383,7 +383,7 @@ public class XidynUtils } // - return (result); + return result; } /** @@ -697,7 +697,7 @@ public class XidynUtils } // - return (result); + return result; } /** @@ -720,6 +720,6 @@ public class XidynUtils } // - return (result); + return result; } } diff --git a/test/XidynTest.java b/test/XidynTest.java index d8b89ea..9948dfb 100644 --- a/test/XidynTest.java +++ b/test/XidynTest.java @@ -71,7 +71,7 @@ class XidynTest } // - return (result); + return result; }; /**