in src/net/sourceforge/transparent/CCaseViewsManager.java [250:278]
private static void extractViewType(String viewPath, ViewInfo info) throws ClearCaseNoServerException {
String output = TransparentVcs.cleartoolOnLocalPathWithOutput(viewPath, LIST_VIEW_CMD, CURRENT_VIEW_SWITCH, LONG_SWITCH);
if (TransparentVcs.isServerDownMessage(output)) throw new ClearCaseNoServerException(output);
List<String> lines = StringUtil.split(output, "\n");
for (String line : lines) {
if (line.startsWith(TAG_SIG)) {
info.tag = line.substring(TAG_SIG.length());
// IDEADEV-23797 - when present, view's comment is printed along with
// the view's tag. Strip it (it starts with the quote char).
// NB: assuming that view's tag can not contain quote symbols.
int quoteIndex = info.tag.indexOf('"');
if (quoteIndex != -1) info.tag = info.tag.substring(0, quoteIndex - 1).trim();
}
else if (line.startsWith(TAG_UUID_SIG)) {
info.uuid = line.substring(TAG_UUID_SIG.length());
}
else if (line.indexOf(ATTRIBUTES_SIG) != -1) {
// When analyzing the type of the view (dynamic or snapshot):
// value "snapshot" appears in "View attributes:..." line only in the
// case of snapshot view (lol). If the value is not present, assume the
// view is dynamic.
info.isSnapshot = line.indexOf(SNAPSHOT_SIG) != -1;
info.isUcm = line.indexOf(UCM_SIG) != -1;
break;
}
}
}