Update code lines in Studio based on new rules 73/133273/2
authorEditor Lionbridge <TizenEditor.SEL@lionbridge.com>
Fri, 9 Jun 2017 11:43:31 +0000 (14:43 +0300)
committerEditor Lionbridge <TizenEditor.SEL@lionbridge.com>
Mon, 12 Jun 2017 05:44:42 +0000 (08:44 +0300)
This is a manual cherry-pick from the #130909 change in the tizen_3.0
branch.
The cherry-pick is not identical, because the branches have some
synch differences, but the same code-related checks have been made and
all found issues fixed.

PS2: Rebase

Change-Id: Ib353ce21f9f6010fa82d003492bbccd6a96c3fe1

org.tizen.studio/html/common_tools/emulator_features.htm
org.tizen.studio/html/native_tools/component_attributes_n.htm
org.tizen.studio/html/native_tools/manifest_elements_n.htm
org.tizen.studio/html/native_tools/t_trace_n.htm
org.tizen.studio/html/web_tools/config_editor_w.htm
org.tizen.studio/html/web_tools/js_analyzer_w.htm
org.tizen.studio/html/web_tools/web_simulator_features_w.htm

index cd0bb64..6bb18b4 100644 (file)
@@ -360,7 +360,7 @@ The appending value of the configuration file is removed when the user changes t
                &lt;!--Hardware key region size and position--&gt;
                &lt;region left="233" top="882" width="74" height="74"/&gt;
                &lt;keycode&gt;139&lt;/keycode&gt; &lt;!--Keycode value--&gt;
-               &lt;!--This line to be displayed when mouse hovers over the hardware key region--&gt;
+               &lt;!--This line is displayed when mouse hovers over hardware key region--&gt;
                &lt;tooltip&gt;Home&lt;/tooltip&gt;
                &lt;!--Defined keyboard shortcut--&gt;
                &lt;shortcut&gt;F1&lt;/shortcut&gt;
index 55e6f83..5b99988 100644 (file)
 <pre class="prettyprint">
 &lt;scroller scrollbar_v="auto" align_v="fill" visible="true" weight_v="1" pack_h="123"
           content_min_h="false" weight_h="1" scrollbar_h="auto" align_h="fill" propagate_events="true"
-          pack_w="276" pack_x=v433" pack_y="173" style="default" id="scroller1" content_min_w="false"&gt;
+          pack_w="276" pack_x="v433" pack_y="173" style="default" id="scroller1" content_min_w="false"&gt;
 &lt;/scroller&gt;
 </pre>
 
index dde54a1..80f3ff5 100644 (file)
 
 <p><strong>For example:</strong></p>
 <pre class="prettyprint">
-&lt;background-category value="download"/&gt; &lt;!--For the API version 2.4 or higher--&gt;
-&lt;metadata key="http://tizen.org/metadata/background-category/download"/&gt; &lt;!--For the API version lower than 2.4--&gt;
+&lt;!--For the API version 2.4 or higher--&gt;
+&lt;background-category value="download"/&gt;
+
+&lt;!--For the API version lower than 2.4--&gt;
+&lt;metadata key="http://tizen.org/metadata/background-category/download"/&gt;
 </pre>
 
  <h2 name="datacontrol" id="datacontrol">&lt;datacontrol&gt; Element</h2>
index 1f10ea7..161939e 100644 (file)
@@ -97,7 +97,7 @@
 <ol>
 <li>Open the command prompt and move to the T-trace script directory:
 <pre class="prettyprint">
-$ cd TIZEN_STUDIO/tools/ttrace
+$ cd &lt;TIZEN_STUDIO&gt;/tools/ttrace
 </pre>
 </li>
 <li>Run the T-trace script with applicable options:
index 7f10c6e..536c7e8 100644 (file)
     </li>
     </ul>
          <p><strong>Example:</strong> </p><pre class="prettyprint">&lt;tizen:ime&gt;
-    &lt;tizen:uuid&gt;6135122a-a428-40d2-8feb-a75f462c202c&lt;/tizen:uuid&gt;
-    &lt;tizen:languages&gt;
-        &lt;tizen:language&gt;en-us&lt;/tizen:language&gt;
-        &lt;tizen:language&gt;de-de&lt;/tizen:language&gt;
-    &lt;/tizen:languages&gt;
+   &lt;tizen:uuid&gt;6135122a-a428-40d2-8feb-a75f462c202c&lt;/tizen:uuid&gt;
+   &lt;tizen:languages&gt;
+      &lt;tizen:language&gt;en-us&lt;/tizen:language&gt;
+      &lt;tizen:language&gt;de-de&lt;/tizen:language&gt;
+   &lt;/tizen:languages&gt;
 &lt;/tizen:ime&gt;
 
 &lt;tizen:category name="http://tizen.org/category/ime"/&gt;</pre>
        <li>1 or more</li>
        </ul>
          <p><strong>Example:</strong> </p><pre class="prettyprint">&lt;tizen:languages&gt;
-  &lt;tizen:language&gt;en-us&lt;/tizen:language&gt;
-  &lt;tizen:language&gt;de-de&lt;/tizen:language&gt;
+   &lt;tizen:language&gt;en-us&lt;/tizen:language&gt;
+   &lt;tizen:language&gt;de-de&lt;/tizen:language&gt;
 &lt;/tizen:languages&gt;</pre>
  </td>
  </tr>
index 4171d32..91b841f 100644 (file)
 
 <p>This rule is supported by the JSLint and the Google Closure Linter. They say that "When you fail to specify <code>var</code>, the variable gets placed in the global context, potentially clobbering existing values. Also, if there is no declaration, it is hard to tell in what scope a variable lives."</p>
 
-<pre class="prettyprint">function func1() {
-   /* The foo function is defined without the var keyword */
-   foo = function() {
-      alert('func1');
-   };
-
-   /* When the foo function is called, the foo function is not clear */
-   foo();
+<pre class="prettyprint">
+function func1() {
+    /* The foo function is defined without the var keyword */
+    foo = function() {
+        alert('func1');
+    };
+
+    /* When the foo function is called, the foo function is not clear */
+    foo();
 }
 function func2() {
-   /* The other foo function is defined without var keyword */
-   foo = function() {
-      alert('func2');
-   };
+    /* The other foo function is defined without var keyword */
+    foo = function() {
+        alert('func2');
+    };
 
-   /* When the foo function is called, the foo function is not clear */
-   foo();
-}</pre>
+    /* When the foo function is called, the foo function is not clear */
+    foo();
+}
+</pre>
 
 <p>The JSA displays the following message:</p>
 
@@ -126,10 +128,12 @@ function func2() {
 
 <p>In the following example, the statement <code>var arguments = [];</code> in the function overwrites the reserved keyword <code>arguments</code>. As a result, the reserved keyword <code>arguments</code> in functions lose the feature to access the arguments of the function.</p>
 
-<pre class="prettyprint">function func() {
-   /* 'arguments' has been predefined as a reserved keyword */
-   var arguments = [];
-}</pre>
+<pre class="prettyprint">
+function func() {
+    /* 'arguments' has been predefined as a reserved keyword */
+    var arguments = [];
+}
+</pre>
 
 <p>The JSA displays the following message:</p>
 
@@ -143,19 +147,23 @@ function func2() {
 
 <p>This rule is introduced in the Google JavaScript Style Guide. They say that "The ability to create closures is perhaps the most useful and often overlooked feature of JS.One thing to keep in mind, however, is that a closure keeps a pointer to its enclosing scope. As a result, attaching a closure to a DOM element can create a circular reference and thus, a memory leak.".</p>
 
-<pre class="prettyprint">var outer = function() {
-   /* Warning case, be careful */
-   var x = 0;
+<pre class="prettyprint">
+var outer = function() {
+    /* Warning case, be careful */
+    var x = 0;
 
-   return function() {
-      /* Variable x of the outer function is captured in the inner function */
+    return function() {
+        /* Variable x of the outer function is captured in the inner function */
 
-      return ++x;
-   }
-}
+        return ++x;
+    }
+};
 var x = -1;
 
-/* The inner function of function outer is assigned to variable test outside function outer */
+/*
+   The inner function of function outer is assigned to variable test
+   outside function outer
+*/
 var test = outer();
 
 /* Whenever the test is called, the result can be different from the expectation */
@@ -179,17 +187,19 @@ test();</pre>
 
 <p>This rule is described in the Google JavaScript Coding Style Guide. They say that "Extra comma and semicolon can make error.".</p>
 
-<pre class="prettyprint">function func() {
-   for (var i = 0; i &lt; 10; i++) {
-      /* Extra semicolon */
-      x++;;
-      /* Extra semicolon after the 'for' statement */
-   };
-
-   return x;
+<pre class="prettyprint">
+function func() {
+    for (var i = 0; i &lt; 10; i++) {
+        /* Extra semicolon */
+        x++;;
+        /* Extra semicolon after the 'for' statement */
+    };
+
+    return x;
 /* Extra semicolon after the function definition statement */
 };
-var result = func();</pre>
+var result = func();
+</pre>
 
 <p>The JSA displays the following message:</p>
 
@@ -203,9 +213,10 @@ var result = func();</pre>
 
 <p>This rule is introduced by the Google JavaScript Style Guide. They say that "In modern JavaScript engines, changing the number of properties on an object is much slower than reassigning the values. The delete keyword should be avoided except when it is necessary to remove a property from an object's iterated list of keys, or to change the result of if (key in obj)."</p>
 
-<pre class="prettyprint">function Obj() {
-   this.value = 10;
-};
+<pre class="prettyprint">
+function Obj() {
+    this.value = 10;
+}
 var obj = new Obj();
 
 /* Deleting properties of objects can make the performance of the program worse */
@@ -221,9 +232,11 @@ delete obj.value;</pre>
 
 <p>This rule is introduced by the Google JavaScript Style Guide. They say that "The whitespace at the beginning of each line can't be safely stripped at compile time; whitespace after the slash will result in tricky errors; and while most script engines support this, it is not part of ECMAScript".</p>
 
-<pre class="prettyprint">/* Multi-line string literals can create a problem */
+<pre class="prettyprint">
+/* Multi-line string literals can create a problem */
 var str = 'The Test String \
-   for Positive TC';</pre>
+    for Positive TC';
+</pre>
 
 <p>The JSA displays the following message:</p>
 
@@ -237,13 +250,15 @@ var str = 'The Test String \
 
 <p>This rule is introduced by the Google Javascript Style Guide. They say that "Array constructors are error-prone due to their arguments".</p>
 
-<pre class="prettyprint">var x = 1
+<pre class="prettyprint">
+var x = 1
 
-/* If the variable x is 1, the array arr1 is the array whose length is 1, not arr[0] is 1 */
+/* If the variable x is 1, array arr1 is the array whose length is 1, not arr[0] is 1 */
 var arr1 = new Array(x);
 
 /* The array arr2 is the array which has 3 values, 1, 2, and 3 */
-var arr2 = new Array(1, 2, 3);</pre>
+var arr2 = new Array(1, 2, 3);
+</pre>
 
 <p>The JSA displays the following message:</p>
 
@@ -257,10 +272,12 @@ var arr2 = new Array(1, 2, 3);</pre>
 
 <p>This rule is introduced by the Google Javascript Style Guide. They say that "Modifying builtins like Object.prototype and Array.prototype are strictly forbidden. It leads to hard to debug issues in production and should be avoided."</p>
 
-<pre class="prettyprint">/* Modifying the function in prototype of built-in object makes debugging difficult */
+<pre class="prettyprint">
+/* Modifying the function in prototype of built-in object makes debugging difficult */
 Object.prototype.create = function() {
-   alert('Warning!');
-};</pre>
+    alert('Warning!');
+};
+</pre>
 
 <p>The JSA displays the following message:</p>
 
@@ -274,16 +291,17 @@ Object.prototype.create = function() {
 
 <p>This rule is introduced by the Google Javascript Style Guide. They say that "There's no reason to use wrapper objects for primitive types, plus they are dangerous". </p>
 
-<pre class="prettyprint">/* The variable bool is not false. It is an object with the value false */
+<pre class="prettyprint">
+/* The variable bool is not false. It is an object with the value false */
 var bool = new Boolean(false);
 
 /* bool is always true */
 if (bool) {
-   alert('true');
+    alert('true');
+} else {
+    alert('false');
 }
-else {
-   alert('false');
-}</pre>
+</pre>
 
 <p>The JSA displays the following message:</p>
 
@@ -297,12 +315,14 @@ else {
 
 <p>This rule is introduced both by the JSLint and the Google Javascript Style Guide. They say that "for-in loops are often incorrectly used to loop over the elements in an Array. This is however very error prone because it does not loop from 0 to length - 1 but over all the present keys in the object and its prototype chain."</p>
 
-<pre class="prettyprint">var arr = ['a', 'b', 'c'];
+<pre class="prettyprint">
+var arr = ['a', 'b', 'c'];
 
 /* The variable key is not 'a', 'b', and 'c'. It is 0, 1, and 2 */
 for (var key in arr) {
-   alert(key);
-}</pre>
+    alert(key);
+}
+</pre>
 
 <p>The JSA displays the following message:</p>
 
@@ -316,7 +336,8 @@ for (var key in arr) {
 <pre class="prettyprint">
 /* The temp function needs the closing brace */
 function temp() {
-   var a = 'ddd';</pre>
+    var a = 'ddd';
+</pre>
 
 <p>The JSA displays the following message:</p>
 <pre class="prettyprint">[Syntax Error]Missing closing brace } character.</pre>
@@ -332,9 +353,10 @@ function temp() {
 var a = 10;
 var b = 5;
 for (var i = 0; i &lt; b; i++) {
-   a += i;
-   /* init i;
-}</pre>
+    a += i;
+    /* init i;
+}
+</pre>
 
 <p>The JSA displays the following message:</p>
 <pre class="prettyprint">[Syntax Error]Missing closing comment "*/".</pre>
@@ -349,8 +371,9 @@ for (var i = 0; i &lt; b; i++) {
 /* Setting value for MAX is not correct, missing single quote */
 var MAX = 20;
 for (var i = 0; i &lt; 10; i++) {
-   MAX = 'tt;
-}</pre>
+    MAX = 'tt;
+}
+</pre>
 
 <p>The JSA displays the following message:</p>
 <pre class="prettyprint">[Syntax Error]Missing closing single-quote ' character.</pre>
@@ -364,8 +387,9 @@ for (var i = 0; i &lt; 10; i++) {
 <pre class="prettyprint">
 /* The declaration of a needed semicolon in the end */
 function tempx() {
-   var a = 'ddd'
-}</pre>
+    var a = 'ddd'
+}
+</pre>
 
 <p>The JSA displays the following message:</p>
 <pre class="prettyprint">[CodingRule] Do not omit semicolon at the end of a declaration.</pre>
@@ -376,11 +400,12 @@ function tempx() {
 
 <p>In the following example, setting the value for the abc with the = operator in the new line is not correct. The operator must be in the same line as abc. The JSA detects it and creates an alarm.</p>
 
-<pre class="prettyprint">/* Setting value for abc is not correct, do no begin with operator = */
+<pre class="prettyprint">
+/* Setting value for abc is not correct, do no begin with operator = */
 var variable_sum = 1;
 var b = 2;
 var abc
-   = 10 + variable_sum + b;
+    = 10 + variable_sum + b;
 </pre>
 
 <p>The JSA displays the following message:</p>
@@ -394,8 +419,9 @@ var abc
 
 <pre class="prettyprint">
 if (true) {
-   var a = "aa";
-}</pre>
+    var a = "aa";
+}
+</pre>
 
 <p>The JSA displays the following message:</p>
 <pre class="prettyprint">[[CodingRule] Do not use double-quotes instead of single-quotes for string.</pre>
@@ -422,7 +448,7 @@ var abc = [1, 2, 3,];</pre>
 /* Do Not Use Wrong Opening Brace */
 if (true)
 {
-   var test = 'test';
+    var test = 'test';
 }
 </pre>
 
@@ -468,12 +494,13 @@ tizen.filesystem.resolve('images'
 
 <p>In the following example, the <code>tizen.filesystem.resolve()</code> function needs an error callback as its third argument. Because the error callback does not exist, the JSA detects it and creates an alarm.</p>
 
-<pre class="prettyprint">tizen.filesystem.resolve('images',
-                         function(dir) {
-                            console.log("Mount point Name is " +  dir.path);
-                         }
-                         /* Error callback required as the third argument */
-);</pre>
+<pre class="prettyprint">
+tizen.filesystem.resolve('images', function(dir) {
+    console.log('Mount point Name is ' +  dir.path);
+}
+/* Error callback required as the third argument */
+);
+</pre>
 
 <p>The JSA displays the following message:</p>
 
@@ -485,8 +512,13 @@ tizen.filesystem.resolve('images'
 
 <p>In the following example, the <code>tizen.calendar.getCalendars()</code> is a function that can throw exceptions, so it must be wrapped by a <code>try-catch</code> statement. Because the <code>try-catch</code> statement does not exist, the JSA detects it and creates an alarm.</p>
 
-<pre class="prettyprint">/* tizen.calendar.getCalendars API can make exceptions, so it should be wrapped in a try-catch statement */
-tizen.calendar.getCalendars('EVENT', calendarListCallback, errorCallback);</pre>
+<pre class="prettyprint">
+/*
+   tizen.calendar.getCalendars API can make exceptions,
+   so it should be wrapped in a try-catch statement
+*/
+tizen.calendar.getCalendars('EVENT', calendarListCallback, errorCallback);
+</pre>
 
 <p>The JSA displays the following message:</p>
 
@@ -498,14 +530,18 @@ tizen.calendar.getCalendars('EVENT', calendarListCallback, errorCallback);</pre>
 
 <p>In the following example, the <code>tizen.contact.getAddressBooks()</code> function needs arguments whose type is the <code>function</code> instead of the <code>string</code> and the <code>undefined</code>, so the JSA detects it and makes an alarm.</p>
 
-<pre class="prettyprint">var addressBooksCB = 'notFucntion';
+<pre class="prettyprint">
+var addressBooksCB = 'notFucntion';
 try {
-   /* The arguments of tizen.contact.getAddressBooks API must be function types instead of strings and undefined */
-   tizen.contact.getAddressBooks(addressBooksCB, undefined);
+    /*
+       Arguments of tizen.contact.getAddressBooks API must be
+       function types instead of strings and undefined
+    */
+    tizen.contact.getAddressBooks(addressBooksCB, undefined);
+} catch (e) {
+    /* Error handling */
 }
-catch (e) {
-   /* Error handling */
-}</pre>
+</pre>
 
 <p>The JSA displays the following message:</p>
 
@@ -518,20 +554,24 @@ catch (e) {
 
 <p>In the following example, the constructor <code>tizen.Contact()</code> function needs a dictionary object as the first argument. If the keys of the dictionary object are different from the spec, the JSA detects it and creates an alarm.</p>
 
-<pre class="prettyprint">var validContactObj = new tizen.Contact({
-   name: new tizen.ContactName({
-      firstName: 'Jeffrey',
-      lastName: 'Hyman',
-      nicknames: ['joey ramone']
-   }),
-   emails: [new tizen.ContactEmailAddress('user@domain.com')],
-   phoneNumbers: [new tizen.ContactPhoneNumber('666666666')]
+<pre class="prettyprint">
+var validContactObj = new tizen.Contact({
+    name: new tizen.ContactName({
+        firstName: 'Jeffrey',
+        lastName: 'Hyman',
+        nicknames: ['joey ramone']
+    }),
+    emails: [new tizen.ContactEmailAddress('user@domain.com')],
+    phoneNumbers: [new tizen.ContactPhoneNumber('666666666')]
 });
 
-var invalidContactObj = new tizen.Contact(
-{
-   /* The first argument, whose type is dictionary, of tizen.Contact API does not have the property 'foo' */
-   foo: 'I'm not an member of Contact'</pre>
+var invalidContactObj = new tizen.Contact({
+    /*
+       First argument, whose type is dictionary, of tizen.Contact API
+       does not have the property 'foo'
+    */
+    foo: 'I'm not an member of Contact'
+</pre>
 
 <p>The JSA displays the following message:</p>
 
@@ -548,10 +588,13 @@ function onsuccess() { /* ... */ }
 function onerror() { /* ... */ }
 
 try {
-   /* Source code in Web App for Tizen 2.3 wearable platform, but 'open()' is defined in mobile-2.3 */
-   tizen.archive.open('downloads/some_archive.zip', 'r', onsuccess, onerror);
+    /*
+       Source code in Web App for Tizen 2.3 wearable platform,
+       but 'open()' is defined in mobile-2.3
+    */
+    tizen.archive.open('downloads/some_archive.zip', 'r', onsuccess, onerror);
 } catch (e) {
-   /* ... */
+    /* ... */
 }
 </pre>
 
@@ -648,19 +691,19 @@ tizen.application.launch('targetApp0.main', onsuccess);
 <pre class="prettyprint">
 /* JavaScript snippets */
 function exitApp() {
-   document.addEventListener('tizenhwkey', function(e) {
-      if (e.keyName == 'back') {
-         try {
-            tizen.application.getCurrentApplication().exit();
-         } catch (error) {
-            console.error('getCurrentApplication(): ' + error.message);
-         }
-      }
+    document.addEventListener('tizenhwkey', function(e) {
+        if (e.keyName == 'back') {
+            try {
+                tizen.application.getCurrentApplication().exit();
+            } catch (error) {
+                console.error('getCurrentApplication(): ' + error.message);
+            }
+        }
    });
 }
 
 function runtime() {
-   exitApp(); /* Add the function call for memory leak */
+    exitApp(); /* Add the function call for memory leak */
 }
 </pre>
 
@@ -690,19 +733,19 @@ function runtime() {
 <pre class="prettyprint">
 /* JavaScript snippets */
 var init = function() {
-   document.addEventListener('tizenhwkey', function(e) {
-      if (e.keyName == 'back') {
-         try {
-            tizen.application.getCurrentApplication().exit();
-         } catch (error) {
-            console.error('getCurrentApplication(): ' + error.message);
-         }
-      }
-   });
-}
+    document.addEventListener('tizenhwkey', function(e) {
+        if (e.keyName == 'back') {
+            try {
+                tizen.application.getCurrentApplication().exit();
+            } catch (error) {
+                console.error('getCurrentApplication(): ' + error.message);
+            }
+        }
+    });
+};
 
 function command(num) {
-   init(); /* Add the function call for memory leak */
+    init(); /* Add the function call for memory leak */
 }
 </pre>
 
index c844454..6a89bc8 100644 (file)
   <p align="center"><strong>Figure: Packages and Applications panel</strong></p>
   <p align="center"><img  alt="Packages and Applications panel" src="../images/simulator_panel_package.png" /></p>
   <p>The following sample code demonstrates how to receive the INSTALLED, UPDATED, and UNINSTALLED events for changes in the installed packages list. If you select <strong>Sample Package</strong> from the available packages list and click <strong>Install</strong>, the "The package "Sample Package" is installed" message is displayed in the console, and for each application in the package, the <code>oninstalled</code> event is generated. You can subscribe to these application events by registering the <code>tizen.application.addAppInfoEventListener</code> interface.</p>
-  <pre class="prettyprint">var packageEventCallback =
-{
-   oninstalled: function(packageInfo)
-   {
-      console.log('The package "' + packageInfo.name + '" is installed');
-   },
-   onupdated: function(packageInfo)
-   {
-      console.log('The package "' + packageInfo.name + '" is updated');
-   },
-   onuninstalled: function(packageId)
-   {
-      console.log('The package "' + packageId + '" is uninstalled');
-   }
+<pre class="prettyprint">
+var packageEventCallback = {
+    oninstalled: function(packageInfo) {
+        console.log('The package "' + packageInfo.name + '" is installed');
+    },
+    onupdated: function(packageInfo) {
+        console.log('The package "' + packageInfo.name + '" is updated');
+    },
+    onuninstalled: function(packageId) {
+        console.log('The package "' + packageId + '" is uninstalled');
+    }
 };
 
-tizen.package.setPackageInfoEventListener(packageEventCallback);</pre>
+tizen.package.setPackageInfoEventListener(packageEventCallback);
+</pre>
 
 
  <h4>Preinstalled Packages and Applications In Mobile Applications</h4>
  <p>A <strong>Sample Package</strong> is preinstalled in the simulator and contains 2 sample applications: Tizen dialer for making phone calls, and Tizen sender for sending SMS messages. Many sample applications, such as CallLog, use the Tizen <a href="../../../org.tizen.web.apireference/html/device_api/mobile/tizen/application.html">Application</a> API to invoke these service applications. Since the simulator allows you to run only 1 application at a time, the <strong>Application Module Message</strong> window is available, which can provide return data for success callback and simulate application launch failure.</p>
 
  <p>The following sample code demonstrates how to define an application control and invoke the <code>http://tizen.org/appcontrol/operation/send_text</code> service provided by the Tizen sender application. You can use the <strong>Application Module Message</strong> window to simulate the success value for the success callback or an error message for the error callback.</p>
-  <pre class="prettyprint">var appControl = new tizen.ApplicationControl('http://tizen.org/appcontrol/operation/send_text',
+<pre class="prettyprint">
+var appControl = new tizen.ApplicationControl('http://tizen.org/appcontrol/operation/send_text',
                                               'sms:' + phoneNumber);
 
-tizen.application.launchAppControl(appControl, null, function()
-{
-   console.log('launch app service ...');
+tizen.application.launchAppControl(appControl, null, function() {
+    console.log('launch app service ...');
 }, function(e) {/* Error handling */},
 {
-   onsuccess: function()
-   {
-      console.log('Message service launch success');
-   },
-   onfailure: function(er) {/* Error handling */}
-});</pre>
+    onsuccess: function() {
+        console.log('Message service launch success');
+    },
+    onfailure: function(er) {/* Error handling */}
+});
+</pre>
 
   <p align="center"><strong>Figure: Providing application callback data</strong></p>
   <p align="center"><img  alt="Providing application callback data" src="../images/simulator_panel_package_callback.png" /></p>
@@ -248,9 +246,10 @@ tizen.application.launchAppControl(appControl, null, function()
   <p>The <strong>Download</strong> panel allows you to create a simulated download object with custom size, MIME type, and download speed. All simulated download objects support start, cancel, pause, and resume operations, and provide status feedback mechanism. You can use the simulated download object created by the panel to test various conditions for your application.</p>
   <p>The panel contains 2 predefined simulated download objects: <code>http://tizen.org/small_file.zip</code> and <code>http://tizen.org/big_file.zip</code>. When an object is selected from the drop-down list, its details are displayed at the bottom half of the panel. The panel also allows you to add, remove, and update download objects. Details, such as URL, MIME type, file size, and speed, are configurable.</p>
   <p>The following sample code demonstrates how to start the download process and set a listener callback to monitor the status of the download. By adjusting the parameter of the download object, you can verify that you application behaves correctly in different scenarios.</p>
-  <pre class="prettyprint">request = tizen.DownloadRequest("http://tizen.org/small_file.zip")
-downloadId = tizen.download.start(request)
-tizen.download.setListener(downloadId, listener)
+<pre class="prettyprint">
+request = tizen.DownloadRequest('http://tizen.org/small_file.zip');
+downloadId = tizen.download.start(request);
+tizen.download.setListener(downloadId, listener);
 </pre>
   <p align="center"><strong>Figure: Download panel</strong></p>
   <p> </p>
@@ -264,14 +263,13 @@ tizen.download.setListener(downloadId, listener)
 
   <p align="center"><img  alt="Notification panel with empty notification" src="../images/simulator_panel_notification_none.png" /></p>
   <p>The following sample code demonstrates how to create a status notification. When it is posted with the <code>post()</code> method, the details of the notification are displayed on the panel, as shown in the figure below.</p>
-  <pre class="prettyprint">
-notification = new tizen.StatusNotification("PROGRESS", "Notification Sample",
-{
-   content: "sample content",
-   iconPath: file:///images/icons/icon.png,
-   soundPath: file:///sounds/alert.wav,
-   vibration: true,
-   progressValue: 67
+<pre class="prettyprint">
+notification = new tizen.StatusNotification('PROGRESS', 'Notification Sample', {
+    content: 'sample content',
+    iconPath: file:///images/icons/icon.png,
+    soundPath: file:///sounds/alert.wav,
+    vibration: true,
+    progressValue: 67
 });
 
 </pre>