User: ko5tik
Date: 02/04/16 03:38:58
Modified: src/java/xtags ConditionFactory.java Tag.java TagFamily.java
Log:
added "unique" param to ctag indicating it can be contained
only one in program element
solved fucking race condition in nodes removal.
Guys: first select parent node, then remove undesired stuff...
Revision Changes Path
1.7 +6 -1 xdocletgui/src/java/xtags/ConditionFactory.java
Index: ConditionFactory.java
===================================================================
RCS file: /cvsroot/xdoclet/xdocletgui/src/java/xtags/ConditionFactory.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -w -r1.6 -r1.7
--- ConditionFactory.java 4 Apr 2002 14:12:27 -0000 1.6
+++ ConditionFactory.java 16 Apr 2002 10:38:58 -0000 1.7
@@ -132,9 +132,14 @@
String tagName =
tagElement.getChild("name").getTextTrim();
String tagUsage =
tagElement.getChild("usage-description").getTextNormalize();
+ boolean unique = false;
+ if (tagElement.getChild("unique") !=
null) {
+ unique =
"true".equals(tagElement.getChild("unique").getTextTrim());
+
+ }
_log.debug("Adding class tag: @" +
tagName);
- Tag tag = tagFamily.addTag(tagName,
tagUsage, new Or());
+ Tag tag = tagFamily.addTag(tagName,
tagUsage, unique, new Or());
List parameterElements =
tagElement.getChildren("parameter");
for (Iterator parameterIterator =
parameterElements.iterator(); parameterIterator.hasNext(); ) {
1.6 +38 -1 xdocletgui/src/java/xtags/Tag.java
Index: Tag.java
===================================================================
RCS file: /cvsroot/xdoclet/xdocletgui/src/java/xtags/Tag.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -w -r1.5 -r1.6
--- Tag.java 15 Apr 2002 17:33:20 -0000 1.5
+++ Tag.java 16 Apr 2002 10:38:58 -0000 1.6
@@ -76,6 +76,10 @@
private final Or _or;
/**
+ * whether this tag is unique
+ */
+ private boolean _unique;
+ /**
* Get static reference to Log4J Logger
*/
private static org.apache.log4j.Category _log =
org.apache.log4j.Category.getInstance(Tag.class.getName());
@@ -87,16 +91,29 @@
* @param tagName Describe what the parameter does
* @param tagUsage Describe what the parameter does
* @param or Describe what the parameter does
+ * @param unique Describe what the parameter does
+ * @todo-javadoc Write javadocs for method parameter
* @todo-javadoc Write javadocs for method parameter
* @todo-javadoc Write javadocs for constructor
* @todo-javadoc Write javadocs for method parameter
* @todo-javadoc Write javadocs for method parameter
*/
- protected Tag(String tagName, String tagUsage, Or or) {
+ protected Tag(String tagName, String tagUsage, boolean unique, Or or) {
_tagName = tagName;
_tagUsage = tagUsage;
_or = or;
_parameterMap = new TreeMap();
+ _unique = unique;
+ }
+
+
+ /**
+ * set uniqueness
+ *
+ * @param unique The new Unique value
+ */
+ public void setUnique(boolean unique) {
+ _unique = unique;
}
@@ -132,6 +149,26 @@
*/
public String getName() {
return _tagName;
+ }
+
+
+ /**
+ * get uniqueness
+ *
+ * @return The Unique value
+ */
+ public boolean getUnique() {
+ return _unique;
+ }
+
+
+ /**
+ * get uniqueness
+ *
+ * @return The Unique value
+ */
+ public boolean isUnique() {
+ return _unique;
}
1.8 +5 -2 xdocletgui/src/java/xtags/TagFamily.java
Index: TagFamily.java
===================================================================
RCS file: /cvsroot/xdoclet/xdocletgui/src/java/xtags/TagFamily.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -w -r1.7 -r1.8
--- TagFamily.java 6 Apr 2002 14:39:29 -0000 1.7
+++ TagFamily.java 16 Apr 2002 10:38:58 -0000 1.8
@@ -91,6 +91,7 @@
* @param usage tag family usage description
* @param conditionDescription description of applicability condition
* @param condition Conditions of applicability
+ * @todo-javadoc Write javadocs for method parameter
*/
public TagFamily(String name, String usage, String conditionDescription,
Condition condition) {
_tagMap = new TreeMap();
@@ -206,7 +207,9 @@
* @param tagName Describe the method parameter
* @param tagUsage Describe the method parameter
* @param or Describe the method parameter
+ * @param unique Describe the method parameter
* @return Describe the return value
+ * @todo-javadoc Describe the method parameter
* @todo-javadoc Write javadocs for return value
* @todo-javadoc Describe the method parameter
* @todo-javadoc Describe the method parameter
@@ -215,8 +218,8 @@
* @todo-javadoc Describe the method
* @todo-javadoc Describe the method parameter
*/
- Tag addTag(String tagName, String tagUsage, Or or) {
- Tag tag = new Tag(tagName, tagUsage, or);
+ Tag addTag(String tagName, String tagUsage, boolean unique, Or or) {
+ Tag tag = new Tag(tagName, tagUsage, unique, or);
_tags.add(tag);
// _or.addCondition(or);
return tag;
_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel