buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/PropertyMeta.java
equal
deleted
inserted
replaced
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 package com.nokia.helium.ant.data; |
18 package com.nokia.helium.ant.data; |
19 |
19 |
20 import java.io.IOException; |
|
21 |
|
22 import org.apache.tools.ant.Project; |
20 import org.apache.tools.ant.Project; |
23 import org.dom4j.Element; |
21 import org.dom4j.Element; |
24 import org.dom4j.Node; |
22 import org.dom4j.Node; |
25 |
23 |
26 /** |
24 /** |
31 public static final String STRING_TYPE = "string"; |
29 public static final String STRING_TYPE = "string"; |
32 public static final String INTEGER_TYPE = "integer"; |
30 public static final String INTEGER_TYPE = "integer"; |
33 public static final String BOOLEAN_TYPE = "boolean"; |
31 public static final String BOOLEAN_TYPE = "boolean"; |
34 public static final String DEFAULT_TYPE = STRING_TYPE; |
32 public static final String DEFAULT_TYPE = STRING_TYPE; |
35 |
33 |
36 public PropertyMeta(AntObjectMeta parent, Node propNode) throws IOException { |
34 public PropertyMeta(AntObjectMeta parent, Node propNode) { |
37 super(parent, propNode); |
35 super(parent, propNode); |
38 } |
36 } |
39 |
37 |
40 /** |
38 /** |
41 * Returns the default value of the property. |
39 * Returns the default value of the property. |
78 * private by default. This is only if there is no scope defined in the |
76 * private by default. This is only if there is no scope defined in the |
79 * comment for the property. |
77 * comment for the property. |
80 */ |
78 */ |
81 @Override |
79 @Override |
82 public String getScope() { |
80 public String getScope() { |
83 String scope = getComment().getTagValue("scope"); |
81 String scope = super.getScope(); |
84 if (scope.equals("")) { |
82 Element parent = getNode().getParent(); |
85 Element parent = getNode().getParent(); |
83 if (getComment().getTagValue("scope").length() == 0 && !parent.getName().equals("project")) { |
86 if (parent.getName().equals("project")) { |
84 scope = "private"; |
87 scope = "public"; |
|
88 //if (getComment().getDocumentation().equals("")) { |
|
89 // System.out.println(getName() + " no comment"); |
|
90 //} |
|
91 } |
|
92 else { |
|
93 scope = "private"; |
|
94 //if (!getComment().getDocumentation().equals("")) { |
|
95 // System.out.println(getName() + " no scope"); |
|
96 //} |
|
97 } |
|
98 } |
85 } |
99 return scope; |
86 return scope; |
100 } |
87 } |
101 } |
88 } |