@@ -69,12 +69,14 @@ private void cloneSourceEntries(ICSourceEntry entries[]) {
69
69
*/
70
70
public AutoBuildResourceData (ICConfigurationDescription cfgDescription , KeyValueTree keyValues ) {
71
71
// TODO read Map<String, CResourceData> myResourceDatas = new HashMap<>();
72
- // TODO read ICSourceEntry mySourceEntries[] = null;
73
72
// TODO read CFolderData myRootFolderData;
74
73
Set <CSourceEntry > sourceEntries = new HashSet <>();
75
74
for (KeyValueTree cursourceEntykeyValue : keyValues .getChildren ().values ()) {
76
75
String name = cursourceEntykeyValue .getKey ();
77
76
String value = cursourceEntykeyValue .getValue ();
77
+ if (ROOT .equals (name )) {
78
+ name =EMPTY_STRING ;
79
+ }
78
80
String values [] = value .split (Pattern .quote (COLON ));
79
81
if (values .length < 2 ) {
80
82
// no exclusion patterns
@@ -86,8 +88,7 @@ public AutoBuildResourceData(ICConfigurationDescription cfgDescription, KeyValue
86
88
for (int curEx = 1 ; curEx < values .length ; curEx ++) {
87
89
exclusionPatterns .add (new Path (values [curEx ]));
88
90
}
89
- sourceEntries .add (
90
- new CSourceEntry (name , exclusionPatterns .toArray (new IPath [exclusionPatterns .size ()]), flags ));
91
+ sourceEntries .add (new CSourceEntry (name , exclusionPatterns .toArray (new IPath [exclusionPatterns .size ()]), flags ));
91
92
}
92
93
}
93
94
mySourceEntries = sourceEntries .toArray (new ICSourceEntry [sourceEntries .size ()]);
@@ -181,7 +182,7 @@ protected void serialize(KeyValueTree keyValuePairs) {
181
182
if (key .isBlank ()) {
182
183
key = ROOT ;
183
184
}
184
- String value = Integer .toString (curSourceEntry .getFlags ());
185
+ String value = Integer .toString (curSourceEntry .getFlags ());//&~(ICSettingEntry.VALUE_WORKSPACE_PATH));
185
186
for (IPath curExclusion : curSourceEntry .getExclusionPatterns ()) {
186
187
value = value + COLON + curExclusion .toString ();
187
188
}
0 commit comments