[Title] changed namespace. (Osp => Tizen)
authorTaeyoung Son <taeyoung2.son@samsung.com>
Thu, 13 Dec 2012 07:03:48 +0000 (16:03 +0900)
committerTaeyoung Son <taeyoung2.son@samsung.com>
Thu, 13 Dec 2012 07:03:48 +0000 (16:03 +0900)
[Desc.]
[Issue]

Change-Id: I9b4c1d43455abe4b843cfffb792bf88175e3b8f0

org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/c/hover/CDocHover.java

index 34dc834..b565cf1 100644 (file)
@@ -79,7 +79,7 @@ import org.eclipse.ui.editors.text.EditorsUI;
  * Provides doxygen hover.
  */
 public class CDocHover extends AbstractCEditorTextHover {
-
+    private static String TIZEN_API_ROOT_NAMESPACE = "Tizen";
        private static String doxygenDirectoryPath;
 
        /**
@@ -341,24 +341,24 @@ public class CDocHover extends AbstractCEditorTextHover {
                        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("{")) {
@@ -407,13 +407,13 @@ public class CDocHover extends AbstractCEditorTextHover {
                                        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");
@@ -425,7 +425,7 @@ public class CDocHover extends AbstractCEditorTextHover {
                                                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");
@@ -434,7 +434,7 @@ public class CDocHover extends AbstractCEditorTextHover {
                                                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");
@@ -443,7 +443,7 @@ public class CDocHover extends AbstractCEditorTextHover {
                                                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");
@@ -695,12 +695,12 @@ public class CDocHover extends AbstractCEditorTextHover {
                                                        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);
                                                                        }
@@ -1275,7 +1275,7 @@ public class CDocHover extends AbstractCEditorTextHover {
                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")) {