* Provides doxygen hover.
*/
public class CDocHover extends AbstractCEditorTextHover {
-
+ private static String TIZEN_API_ROOT_NAMESPACE = "Tizen";
private static String doxygenDirectoryPath;
/**
String namespace = ownerOfBinding.substring(0, ownerOfBinding.lastIndexOf(":") + 1);
String methodName = tokenizeStringWithDelimiter(bindingString, "(),")[0];
if (!methodName.equals("Compare")) {
- if (!bindingString.contains("Osp::Base::Object")) {
+ if (!bindingString.contains(TIZEN_API_ROOT_NAMESPACE + "::Base::Object")) {
if (bindingString.contains(namespace)) {
bindingString = bindingString.replaceAll(namespace, "");
}
}
} else if (methodName.equals("Compare")) {
- if (!bindingString.contains("Osp::Base::Object")) {
+ if (!bindingString.contains(TIZEN_API_ROOT_NAMESPACE + "::Base::Object")) {
if (bindingString.contains(namespace)) {
bindingString = bindingString.replaceAll(namespace, "");
}
}
}
- if (ownerOfBinding.equals("Osp::Base::Utility::StringUtil CPPCLASSTYPE")) {
- bindingString = bindingString.replaceAll("Osp::Base::", "");
+ if (ownerOfBinding.equals(TIZEN_API_ROOT_NAMESPACE + "::Base::Utility::StringUtil CPPCLASSTYPE")) {
+ bindingString = bindingString.replaceAll(TIZEN_API_ROOT_NAMESPACE + "::Base::", "");
}
- if (ownerOfBinding.equals("Osp::Ui::Controls::Frame CPPCLASSTYPE")) {
+ if (ownerOfBinding.equals(TIZEN_API_ROOT_NAMESPACE + "::Ui::Controls::Frame CPPCLASSTYPE")) {
if (!bindingString.contains("AddControl")) {
- bindingString = bindingString.replaceAll("Osp::Ui::", "");
+ bindingString = bindingString.replaceAll(TIZEN_API_ROOT_NAMESPACE + "::Ui::", "");
}
}
if (bindingString.contains("{")) {
String tokenOfMethod3 = htmlLineString.substring(htmlLineString.indexOf(")") + 1, htmlLineString.length());
/* handling defined type start */
if (tokenOfMethod2.contains("AppId")) {
- tokenOfMethod2 = tokenOfMethod2.replaceAll("AppId", "Osp::Base::String");
+ tokenOfMethod2 = tokenOfMethod2.replaceAll("AppId", TIZEN_API_ROOT_NAMESPACE + "::Base::String");
}
if (tokenOfMethod2.contains("AppSecret")) {
- tokenOfMethod2 = tokenOfMethod2.replaceAll("AppSecret", "Osp::Base::String");
+ tokenOfMethod2 = tokenOfMethod2.replaceAll("AppSecret", TIZEN_API_ROOT_NAMESPACE + "::Base::String");
}
if (tokenOfMethod2.contains("BuddyCategoryId")) {
- tokenOfMethod2 = tokenOfMethod2.replaceAll("BuddyCategoryId", "Osp::Base::String");
+ tokenOfMethod2 = tokenOfMethod2.replaceAll("BuddyCategoryId", TIZEN_API_ROOT_NAMESPACE + "::Base::String");
}
if (tokenOfMethod2.contains("ChatMsgId")) {
tokenOfMethod2 = tokenOfMethod2.replaceAll("ChatMsgId", "int");
tokenOfMethod2 = tokenOfMethod2.replaceAll("LandmarkId", "long");
}
if (tokenOfMethod2.contains("LoginId")) {
- tokenOfMethod2 = tokenOfMethod2.replaceAll("LoginId", "Osp::Base::String");
+ tokenOfMethod2 = tokenOfMethod2.replaceAll("LoginId", TIZEN_API_ROOT_NAMESPACE + "::Base::String");
}
if (tokenOfMethod2.contains("NetAccountId")) {
tokenOfMethod2 = tokenOfMethod2.replaceAll("NetAccountId", "int");
tokenOfMethod2 = tokenOfMethod2.replaceAll("RecordId", "long long");
}
if (tokenOfMethod2.contains("RecurrenceId")) {
- tokenOfMethod2 = tokenOfMethod2.replaceAll("RecurrenceId", "Osp::Base::DateTime");
+ tokenOfMethod2 = tokenOfMethod2.replaceAll("RecurrenceId", TIZEN_API_ROOT_NAMESPACE + "::Base::DateTime");
}
if (tokenOfMethod2.contains("RequestId")) {
tokenOfMethod2 = tokenOfMethod2.replaceAll("RequestId", "long");
tokenOfMethod2 = tokenOfMethod2.replaceAll("result", "unsigned long");
}
if (tokenOfMethod2.contains("UserId")) {
- tokenOfMethod2 = tokenOfMethod2.replaceAll("UserId", "Osp::Base::String");
+ tokenOfMethod2 = tokenOfMethod2.replaceAll("UserId", TIZEN_API_ROOT_NAMESPACE + "::Base::String");
}
if (tokenOfMethod2.contains("xmlChar")) {
tokenOfMethod2 = tokenOfMethod2.replaceAll("xmlChar", "unsigned char");
if (binding.getOwner() == null) {
String stringOfBinding[] = tokenizeString(binding.toString());
if (stringOfBinding.length == 2) { /* Case 1-1. using root namespace in source file */
- if (stringOfBinding[0].equals("Osp") && stringOfBinding[1].equals("CPPNAMESPACE")) {
+ if (stringOfBinding[0].equals(TIZEN_API_ROOT_NAMESPACE) && stringOfBinding[1].equals("CPPNAMESPACE")) {
htmlFileName = "namespaceOsp.html";
isExist = checkHTMLFileExistence(htmlFileName);
}
} else if (stringOfBinding.length == 1) { /* Case 1-2. declaration root namespace in header or source file */
- if (stringOfBinding[0].equals("Osp")) {
+ if (stringOfBinding[0].equals(TIZEN_API_ROOT_NAMESPACE)) {
htmlFileName = "namespaceOsp.html";
isExist = checkHTMLFileExistence(htmlFileName);
}
String elementName = "";
try {
if (htmlName.equals("namespaceOsp.html")) {
- elementName = "Osp";
+ elementName = TIZEN_API_ROOT_NAMESPACE;
} else if (htmlName.equals("privlevel.html")) {
elementName = "Privilege Level";
} else if (htmlName.equals("privgroup.html")) {