Tizen 2.1 base
authorJinkun Jang <jinkun.jang@samsung.com>
Tue, 12 Mar 2013 17:17:59 +0000 (02:17 +0900)
committerJinkun Jang <jinkun.jang@samsung.com>
Tue, 12 Mar 2013 17:17:59 +0000 (02:17 +0900)
37 files changed:
AUTHOR [new file with mode: 0644]
COPYING [new file with mode: 0644]
LICENSE.EPL [new file with mode: 0644]
NOTICE [new file with mode: 0644]
builder/build.properties.clean [new file with mode: 0644]
builder/customTargets.xml [new file with mode: 0644]
org.tizen.web.advanceddeclarationview.branding/.project [new file with mode: 0644]
org.tizen.web.advanceddeclarationview.branding/32_TIZEN_SDK_icon.png [new file with mode: 0644]
org.tizen.web.advanceddeclarationview.branding/META-INF/MANIFEST.MF [new file with mode: 0644]
org.tizen.web.advanceddeclarationview.branding/about.ini [new file with mode: 0644]
org.tizen.web.advanceddeclarationview.branding/about.mappings [new file with mode: 0644]
org.tizen.web.advanceddeclarationview.branding/about.properties [new file with mode: 0644]
org.tizen.web.advanceddeclarationview.branding/build.properties [new file with mode: 0644]
org.tizen.web.advanceddeclarationview.feature/.project [new file with mode: 0644]
org.tizen.web.advanceddeclarationview.feature/build.properties [new file with mode: 0644]
org.tizen.web.advanceddeclarationview.feature/feature.properties [new file with mode: 0644]
org.tizen.web.advanceddeclarationview.feature/feature.xml [new file with mode: 0644]
org.tizen.web.advanceddeclarationview.feature/license.html [new file with mode: 0644]
org.tizen.web.advanceddeclarationview/.classpath [new file with mode: 0644]
org.tizen.web.advanceddeclarationview/.project [new file with mode: 0644]
org.tizen.web.advanceddeclarationview/.settings/org.eclipse.jdt.core.prefs [new file with mode: 0644]
org.tizen.web.advanceddeclarationview/META-INF/MANIFEST.MF [new file with mode: 0644]
org.tizen.web.advanceddeclarationview/build.properties [new file with mode: 0644]
org.tizen.web.advanceddeclarationview/contexts.xml [new file with mode: 0644]
org.tizen.web.advanceddeclarationview/fragment.xml [new file with mode: 0644]
org.tizen.web.advanceddeclarationview/icons/declaration_view_icon.png [new file with mode: 0644]
org.tizen.web.advanceddeclarationview/icons/declaration_view_lock.png [new file with mode: 0644]
org.tizen.web.advanceddeclarationview/icons/declaration_view_open.png [new file with mode: 0644]
org.tizen.web.advanceddeclarationview/src/org/tizen/web/advanceddeclarationview/ui/AdvancedDeclarationView.java [new file with mode: 0644]
org.tizen.web.advanceddeclarationview/src/org/tizen/web/advanceddeclarationview/ui/OpenInputActionDelegate.java [new file with mode: 0644]
org.tizen.web.advanceddeclarationview/src/org/tizen/web/advanceddeclarationview/ui/TextSelectionConverter.java [new file with mode: 0644]
org.tizen.web.advanceddeclarationview/src/org/tizen/web/advanceddeclarationview/ui/ToggleLineNumberActionDelegate.java [new file with mode: 0644]
org.tizen.web.advanceddeclarationview/src/org/tizen/web/advanceddeclarationview/ui/ToggleLockActionDelegate.java [new file with mode: 0644]
org.tizen.web.advanceddeclarationview/src/org/tizen/web/advanceddeclarationview/ui/ViewHandler.java [new file with mode: 0644]
package/build.linux [new file with mode: 0644]
package/changelog [new file with mode: 0644]
package/pkginfo.manifest [new file with mode: 0644]

diff --git a/AUTHOR b/AUTHOR
new file mode 100644 (file)
index 0000000..92d1c2c
--- /dev/null
+++ b/AUTHOR
@@ -0,0 +1,5 @@
+Woongsik Choi <woongsik76.choi@samsung.com>
+Hyukmin Kwon <hyukmin0530.kwon@samsung.com>
+Jaeheung Kim <jaeheung.kim@samsung.com>
+Sujin Kim <sujin921.kim@samsung.com>
+HyunGoo Kang <hyungoo1.kang@samsung.com>
diff --git a/COPYING b/COPYING
new file mode 100644 (file)
index 0000000..b398acc
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,259 @@
+<!--?xml version="1.0" encoding="ISO-8859-1" ?-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Eclipse Public License - Version 1.0</title>
+<style type="text/css">
+  body {
+    size: 8.5in 11.0in;
+    margin: 0.25in 0.5in 0.25in 0.5in;
+    tab-interval: 0.5in;
+    }
+  p {          
+    margin-left: auto;
+    margin-top:  0.5em;
+    margin-bottom: 0.5em;
+    }
+  p.list {
+       margin-left: 0.5in;
+    margin-top:  0.05em;
+    margin-bottom: 0.05em;
+    }
+  </style>
+
+</head>
+
+<body lang="EN-US">
+
+<h2>Eclipse Public License - v 1.0</h2>
+
+<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
+PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
+DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
+AGREEMENT.</p>
+
+<p><b>1. DEFINITIONS</b></p>
+
+<p>"Contribution" means:</p>
+
+<p class="list">a) in the case of the initial Contributor, the initial
+code and documentation distributed under this Agreement, and</p>
+<p class="list">b) in the case of each subsequent Contributor:</p>
+<p class="list">i) changes to the Program, and</p>
+<p class="list">ii) additions to the Program;</p>
+<p class="list">where such changes and/or additions to the Program
+originate from and are distributed by that particular Contributor. A
+Contribution 'originates' from a Contributor if it was added to the
+Program by such Contributor itself or anyone acting on such
+Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in
+conjunction with the Program under their own license agreement, and (ii)
+are not derivative works of the Program.</p>
+
+<p>"Contributor" means any person or entity that distributes
+the Program.</p>
+
+<p>"Licensed Patents" mean patent claims licensable by a
+Contributor which are necessarily infringed by the use or sale of its
+Contribution alone or when combined with the Program.</p>
+
+<p>"Program" means the Contributions distributed in accordance
+with this Agreement.</p>
+
+<p>"Recipient" means anyone who receives the Program under
+this Agreement, including all Contributors.</p>
+
+<p><b>2. GRANT OF RIGHTS</b></p>
+
+<p class="list">a) Subject to the terms of this Agreement, each
+Contributor hereby grants Recipient a non-exclusive, worldwide,
+royalty-free copyright license to reproduce, prepare derivative works
+of, publicly display, publicly perform, distribute and sublicense the
+Contribution of such Contributor, if any, and such derivative works, in
+source code and object code form.</p>
+
+<p class="list">b) Subject to the terms of this Agreement, each
+Contributor hereby grants Recipient a non-exclusive, worldwide,
+royalty-free patent license under Licensed Patents to make, use, sell,
+offer to sell, import and otherwise transfer the Contribution of such
+Contributor, if any, in source code and object code form. This patent
+license shall apply to the combination of the Contribution and the
+Program if, at the time the Contribution is added by the Contributor,
+such addition of the Contribution causes such combination to be covered
+by the Licensed Patents. The patent license shall not apply to any other
+combinations which include the Contribution. No hardware per se is
+licensed hereunder.</p>
+
+<p class="list">c) Recipient understands that although each Contributor
+grants the licenses to its Contributions set forth herein, no assurances
+are provided by any Contributor that the Program does not infringe the
+patent or other intellectual property rights of any other entity. Each
+Contributor disclaims any liability to Recipient for claims brought by
+any other entity based on infringement of intellectual property rights
+or otherwise. As a condition to exercising the rights and licenses
+granted hereunder, each Recipient hereby assumes sole responsibility to
+secure any other intellectual property rights needed, if any. For
+example, if a third party patent license is required to allow Recipient
+to distribute the Program, it is Recipient's responsibility to acquire
+that license before distributing the Program.</p>
+
+<p class="list">d) Each Contributor represents that to its knowledge it
+has sufficient copyright rights in its Contribution, if any, to grant
+the copyright license set forth in this Agreement.</p>
+
+<p><b>3. REQUIREMENTS</b></p>
+
+<p>A Contributor may choose to distribute the Program in object code
+form under its own license agreement, provided that:</p>
+
+<p class="list">a) it complies with the terms and conditions of this
+Agreement; and</p>
+
+<p class="list">b) its license agreement:</p>
+
+<p class="list">i) effectively disclaims on behalf of all Contributors
+all warranties and conditions, express and implied, including warranties
+or conditions of title and non-infringement, and implied warranties or
+conditions of merchantability and fitness for a particular purpose;</p>
+
+<p class="list">ii) effectively excludes on behalf of all Contributors
+all liability for damages, including direct, indirect, special,
+incidental and consequential damages, such as lost profits;</p>
+
+<p class="list">iii) states that any provisions which differ from this
+Agreement are offered by that Contributor alone and not by any other
+party; and</p>
+
+<p class="list">iv) states that source code for the Program is available
+from such Contributor, and informs licensees how to obtain it in a
+reasonable manner on or through a medium customarily used for software
+exchange.</p>
+
+<p>When the Program is made available in source code form:</p>
+
+<p class="list">a) it must be made available under this Agreement; and</p>
+
+<p class="list">b) a copy of this Agreement must be included with each
+copy of the Program.</p>
+
+<p>Contributors may not remove or alter any copyright notices contained
+within the Program.</p>
+
+<p>Each Contributor must identify itself as the originator of its
+Contribution, if any, in a manner that reasonably allows subsequent
+Recipients to identify the originator of the Contribution.</p>
+
+<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
+
+<p>Commercial distributors of software may accept certain
+responsibilities with respect to end users, business partners and the
+like. While this license is intended to facilitate the commercial use of
+the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create
+potential liability for other Contributors. Therefore, if a Contributor
+includes the Program in a commercial product offering, such Contributor
+("Commercial Contributor") hereby agrees to defend and
+indemnify every other Contributor ("Indemnified Contributor")
+against any losses, damages and costs (collectively "Losses")
+arising from claims, lawsuits and other legal actions brought by a third
+party against the Indemnified Contributor to the extent caused by the
+acts or omissions of such Commercial Contributor in connection with its
+distribution of the Program in a commercial product offering. The
+obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In
+order to qualify, an Indemnified Contributor must: a) promptly notify
+the Commercial Contributor in writing of such claim, and b) allow the
+Commercial Contributor to control, and cooperate with the Commercial
+Contributor in, the defense and any related settlement negotiations. The
+Indemnified Contributor may participate in any such claim at its own
+expense.</p>
+
+<p>For example, a Contributor might include the Program in a commercial
+product offering, Product X. That Contributor is then a Commercial
+Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance
+claims and warranties are such Commercial Contributor's responsibility
+alone. Under this section, the Commercial Contributor would have to
+defend claims against the other Contributors related to those
+performance claims and warranties, and if a court requires any other
+Contributor to pay any damages as a result, the Commercial Contributor
+must pay those damages.</p>
+
+<p><b>5. NO WARRANTY</b></p>
+
+<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
+PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
+OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION,
+ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY
+OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and
+distributing the Program and assumes all risks associated with its
+exercise of rights under this Agreement , including but not limited to
+the risks and costs of program errors, compliance with applicable laws,
+damage to or loss of data, programs or equipment, and unavailability or
+interruption of operations.</p>
+
+<p><b>6. DISCLAIMER OF LIABILITY</b></p>
+
+<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT
+NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
+WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR
+DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
+HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</p>
+
+<p><b>7. GENERAL</b></p>
+
+<p>If any provision of this Agreement is invalid or unenforceable under
+applicable law, it shall not affect the validity or enforceability of
+the remainder of the terms of this Agreement, and without further action
+by the parties hereto, such provision shall be reformed to the minimum
+extent necessary to make such provision valid and enforceable.</p>
+
+<p>If Recipient institutes patent litigation against any entity
+(including a cross-claim or counterclaim in a lawsuit) alleging that the
+Program itself (excluding combinations of the Program with other
+software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the
+date such litigation is filed.</p>
+
+<p>All Recipient's rights under this Agreement shall terminate if it
+fails to comply with any of the material terms or conditions of this
+Agreement and does not cure such failure in a reasonable period of time
+after becoming aware of such noncompliance. If all Recipient's rights
+under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive.</p>
+
+<p>Everyone is permitted to copy and distribute copies of this
+Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The
+Agreement Steward reserves the right to publish new versions (including
+revisions) of this Agreement from time to time. No one other than the
+Agreement Steward has the right to modify this Agreement. The Eclipse
+Foundation is the initial Agreement Steward. The Eclipse Foundation may
+assign the responsibility to serve as the Agreement Steward to a
+suitable separate entity. Each new version of the Agreement will be
+given a distinguishing version number. The Program (including
+Contributions) may always be distributed subject to the version of the
+Agreement under which it was received. In addition, after a new version
+of the Agreement is published, Contributor may elect to distribute the
+Program (including its Contributions) under the new version. Except as
+expressly stated in Sections 2(a) and 2(b) above, Recipient receives no
+rights or licenses to the intellectual property of any Contributor under
+this Agreement, whether expressly, by implication, estoppel or
+otherwise. All rights in the Program not expressly granted under this
+Agreement are reserved.</p>
+
+<p>This Agreement is governed by the laws of the State of New York and
+the intellectual property laws of the United States of America. No party
+to this Agreement will bring a legal action under this Agreement more
+than one year after the cause of action arose. Each party waives its
+rights to a jury trial in any resulting litigation.</p>
+
+
+
+</body></html>
\ No newline at end of file
diff --git a/LICENSE.EPL b/LICENSE.EPL
new file mode 100644 (file)
index 0000000..b398acc
--- /dev/null
@@ -0,0 +1,259 @@
+<!--?xml version="1.0" encoding="ISO-8859-1" ?-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Eclipse Public License - Version 1.0</title>
+<style type="text/css">
+  body {
+    size: 8.5in 11.0in;
+    margin: 0.25in 0.5in 0.25in 0.5in;
+    tab-interval: 0.5in;
+    }
+  p {          
+    margin-left: auto;
+    margin-top:  0.5em;
+    margin-bottom: 0.5em;
+    }
+  p.list {
+       margin-left: 0.5in;
+    margin-top:  0.05em;
+    margin-bottom: 0.05em;
+    }
+  </style>
+
+</head>
+
+<body lang="EN-US">
+
+<h2>Eclipse Public License - v 1.0</h2>
+
+<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
+PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
+DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
+AGREEMENT.</p>
+
+<p><b>1. DEFINITIONS</b></p>
+
+<p>"Contribution" means:</p>
+
+<p class="list">a) in the case of the initial Contributor, the initial
+code and documentation distributed under this Agreement, and</p>
+<p class="list">b) in the case of each subsequent Contributor:</p>
+<p class="list">i) changes to the Program, and</p>
+<p class="list">ii) additions to the Program;</p>
+<p class="list">where such changes and/or additions to the Program
+originate from and are distributed by that particular Contributor. A
+Contribution 'originates' from a Contributor if it was added to the
+Program by such Contributor itself or anyone acting on such
+Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in
+conjunction with the Program under their own license agreement, and (ii)
+are not derivative works of the Program.</p>
+
+<p>"Contributor" means any person or entity that distributes
+the Program.</p>
+
+<p>"Licensed Patents" mean patent claims licensable by a
+Contributor which are necessarily infringed by the use or sale of its
+Contribution alone or when combined with the Program.</p>
+
+<p>"Program" means the Contributions distributed in accordance
+with this Agreement.</p>
+
+<p>"Recipient" means anyone who receives the Program under
+this Agreement, including all Contributors.</p>
+
+<p><b>2. GRANT OF RIGHTS</b></p>
+
+<p class="list">a) Subject to the terms of this Agreement, each
+Contributor hereby grants Recipient a non-exclusive, worldwide,
+royalty-free copyright license to reproduce, prepare derivative works
+of, publicly display, publicly perform, distribute and sublicense the
+Contribution of such Contributor, if any, and such derivative works, in
+source code and object code form.</p>
+
+<p class="list">b) Subject to the terms of this Agreement, each
+Contributor hereby grants Recipient a non-exclusive, worldwide,
+royalty-free patent license under Licensed Patents to make, use, sell,
+offer to sell, import and otherwise transfer the Contribution of such
+Contributor, if any, in source code and object code form. This patent
+license shall apply to the combination of the Contribution and the
+Program if, at the time the Contribution is added by the Contributor,
+such addition of the Contribution causes such combination to be covered
+by the Licensed Patents. The patent license shall not apply to any other
+combinations which include the Contribution. No hardware per se is
+licensed hereunder.</p>
+
+<p class="list">c) Recipient understands that although each Contributor
+grants the licenses to its Contributions set forth herein, no assurances
+are provided by any Contributor that the Program does not infringe the
+patent or other intellectual property rights of any other entity. Each
+Contributor disclaims any liability to Recipient for claims brought by
+any other entity based on infringement of intellectual property rights
+or otherwise. As a condition to exercising the rights and licenses
+granted hereunder, each Recipient hereby assumes sole responsibility to
+secure any other intellectual property rights needed, if any. For
+example, if a third party patent license is required to allow Recipient
+to distribute the Program, it is Recipient's responsibility to acquire
+that license before distributing the Program.</p>
+
+<p class="list">d) Each Contributor represents that to its knowledge it
+has sufficient copyright rights in its Contribution, if any, to grant
+the copyright license set forth in this Agreement.</p>
+
+<p><b>3. REQUIREMENTS</b></p>
+
+<p>A Contributor may choose to distribute the Program in object code
+form under its own license agreement, provided that:</p>
+
+<p class="list">a) it complies with the terms and conditions of this
+Agreement; and</p>
+
+<p class="list">b) its license agreement:</p>
+
+<p class="list">i) effectively disclaims on behalf of all Contributors
+all warranties and conditions, express and implied, including warranties
+or conditions of title and non-infringement, and implied warranties or
+conditions of merchantability and fitness for a particular purpose;</p>
+
+<p class="list">ii) effectively excludes on behalf of all Contributors
+all liability for damages, including direct, indirect, special,
+incidental and consequential damages, such as lost profits;</p>
+
+<p class="list">iii) states that any provisions which differ from this
+Agreement are offered by that Contributor alone and not by any other
+party; and</p>
+
+<p class="list">iv) states that source code for the Program is available
+from such Contributor, and informs licensees how to obtain it in a
+reasonable manner on or through a medium customarily used for software
+exchange.</p>
+
+<p>When the Program is made available in source code form:</p>
+
+<p class="list">a) it must be made available under this Agreement; and</p>
+
+<p class="list">b) a copy of this Agreement must be included with each
+copy of the Program.</p>
+
+<p>Contributors may not remove or alter any copyright notices contained
+within the Program.</p>
+
+<p>Each Contributor must identify itself as the originator of its
+Contribution, if any, in a manner that reasonably allows subsequent
+Recipients to identify the originator of the Contribution.</p>
+
+<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
+
+<p>Commercial distributors of software may accept certain
+responsibilities with respect to end users, business partners and the
+like. While this license is intended to facilitate the commercial use of
+the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create
+potential liability for other Contributors. Therefore, if a Contributor
+includes the Program in a commercial product offering, such Contributor
+("Commercial Contributor") hereby agrees to defend and
+indemnify every other Contributor ("Indemnified Contributor")
+against any losses, damages and costs (collectively "Losses")
+arising from claims, lawsuits and other legal actions brought by a third
+party against the Indemnified Contributor to the extent caused by the
+acts or omissions of such Commercial Contributor in connection with its
+distribution of the Program in a commercial product offering. The
+obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In
+order to qualify, an Indemnified Contributor must: a) promptly notify
+the Commercial Contributor in writing of such claim, and b) allow the
+Commercial Contributor to control, and cooperate with the Commercial
+Contributor in, the defense and any related settlement negotiations. The
+Indemnified Contributor may participate in any such claim at its own
+expense.</p>
+
+<p>For example, a Contributor might include the Program in a commercial
+product offering, Product X. That Contributor is then a Commercial
+Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance
+claims and warranties are such Commercial Contributor's responsibility
+alone. Under this section, the Commercial Contributor would have to
+defend claims against the other Contributors related to those
+performance claims and warranties, and if a court requires any other
+Contributor to pay any damages as a result, the Commercial Contributor
+must pay those damages.</p>
+
+<p><b>5. NO WARRANTY</b></p>
+
+<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
+PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
+OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION,
+ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY
+OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and
+distributing the Program and assumes all risks associated with its
+exercise of rights under this Agreement , including but not limited to
+the risks and costs of program errors, compliance with applicable laws,
+damage to or loss of data, programs or equipment, and unavailability or
+interruption of operations.</p>
+
+<p><b>6. DISCLAIMER OF LIABILITY</b></p>
+
+<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT
+NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
+WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR
+DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
+HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</p>
+
+<p><b>7. GENERAL</b></p>
+
+<p>If any provision of this Agreement is invalid or unenforceable under
+applicable law, it shall not affect the validity or enforceability of
+the remainder of the terms of this Agreement, and without further action
+by the parties hereto, such provision shall be reformed to the minimum
+extent necessary to make such provision valid and enforceable.</p>
+
+<p>If Recipient institutes patent litigation against any entity
+(including a cross-claim or counterclaim in a lawsuit) alleging that the
+Program itself (excluding combinations of the Program with other
+software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the
+date such litigation is filed.</p>
+
+<p>All Recipient's rights under this Agreement shall terminate if it
+fails to comply with any of the material terms or conditions of this
+Agreement and does not cure such failure in a reasonable period of time
+after becoming aware of such noncompliance. If all Recipient's rights
+under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive.</p>
+
+<p>Everyone is permitted to copy and distribute copies of this
+Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The
+Agreement Steward reserves the right to publish new versions (including
+revisions) of this Agreement from time to time. No one other than the
+Agreement Steward has the right to modify this Agreement. The Eclipse
+Foundation is the initial Agreement Steward. The Eclipse Foundation may
+assign the responsibility to serve as the Agreement Steward to a
+suitable separate entity. Each new version of the Agreement will be
+given a distinguishing version number. The Program (including
+Contributions) may always be distributed subject to the version of the
+Agreement under which it was received. In addition, after a new version
+of the Agreement is published, Contributor may elect to distribute the
+Program (including its Contributions) under the new version. Except as
+expressly stated in Sections 2(a) and 2(b) above, Recipient receives no
+rights or licenses to the intellectual property of any Contributor under
+this Agreement, whether expressly, by implication, estoppel or
+otherwise. All rights in the Program not expressly granted under this
+Agreement are reserved.</p>
+
+<p>This Agreement is governed by the laws of the State of New York and
+the intellectual property laws of the United States of America. No party
+to this Agreement will bring a legal action under this Agreement more
+than one year after the cause of action arose. Each party waives its
+rights to a jury trial in any resulting litigation.</p>
+
+
+
+</body></html>
\ No newline at end of file
diff --git a/NOTICE b/NOTICE
new file mode 100644 (file)
index 0000000..ec1f007
--- /dev/null
+++ b/NOTICE
@@ -0,0 +1,6 @@
+Copyright (c) 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
+Except as noted, this software is licensed under Eclipse Public License v1.0.
+Please, see the LICENSE.EPL file for Eclipse Public License terms and conditions.
+
+Tizen SDK 2.0
+* Advanced Declaration View for JavaScript moudule is originated from JSDT's org.eclipse.wst.jsdt.internal.ui.infoviews package.
diff --git a/builder/build.properties.clean b/builder/build.properties.clean
new file mode 100644 (file)
index 0000000..9604419
--- /dev/null
@@ -0,0 +1,260 @@
+###############################################################################
+# Copyright (c) 2003, 2006 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+# 
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+#####################
+# Parameters describing how and where to execute the build.
+# Typical users need only update the following properties:
+#    baseLocation - where things you are building against are installed
+#    bootclasspath - The base jars to compile against (typicaly rt.jar)
+#    configs - the list of {os, ws, arch} configurations to build.  
+#
+# Of course any of the settings here can be overridden by spec'ing 
+# them on the command line (e.g., -DbaseLocation=d:/eclipse
+
+#The type of the top level element we are building,  generally "feature"
+topLevelElementType=feature
+#The id of the top level element we are building
+topLevelElementId=org.tizen.web.advanceddeclarationview.feature
+
+############# PRODUCT/PACKAGING CONTROL #############
+#product=/com.samsung.freshide/SLPSDK.product
+#runPackager=true
+
+#Set the name of the archive that will result from the product build.
+#archiveNamePrefix=
+
+# The prefix that will be used in the generated archive.
+archivePrefix="Do not touch here."
+
+# The location underwhich all of the build output will be collected.
+collectingFolder=${archivePrefix}
+
+# The list of {os, ws, arch} configurations to build.  This 
+# value is a '&' separated list of ',' separate triples.  For example, 
+#     configs=win32,win32,x86 & linux,motif,x86
+# By default the value is *,*,*
+configs="Do not touch here."
+#configs=win32, win32, x86 & \
+#      win32,win32,x86_64 & \
+#      win32,win32,wpf & \
+#      linux, gtk, ppc & \
+#      linux, gtk, x86 & \
+#      linux, gtk, x86_64 & \
+#      linux, motif, x86 & \
+#      solaris, motif, sparc & \
+#      solaris, gtk, sparc & \
+#      aix, motif, ppc & \
+#      hpux, motif, ia64_32 & \
+#      macosx, carbon, ppc & \
+#      macosx, carbon, x86 & \
+#      macosx, cocoa, ppc & \
+#      macosx, cocoa, x86 & \
+#      macosx, cocoa, x86_64
+
+# By default PDE creates one archive (result) per entry listed in the configs property.
+# Setting this value to true will cause PDE to only create one output containing all 
+# artifacts for all the platforms listed in the configs property.
+# To control the output format for the group, add a "group, group, group - <format>" entry to the
+# archivesFormat. 
+#groupConfigurations=true
+
+#The format of the archive. By default a zip is created using antZip.
+#The list can only contain the configuration for which the desired format is different than zip.
+#archivesFormat=win32, win32, x86 - antZip& \
+#      linux, gtk, ppc - antZip &\
+#    linux, gtk, x86 - antZip& \
+#      linux, gtk, x86_64 - antZip& \
+# linux, motif, x86 - antZip& \
+#      solaris, motif, sparc - antZip& \
+#      solaris, gtk, sparc - antZip& \
+#      aix, motif, ppc - antZip& \
+#      hpux, motif, PA_RISC - antZip& \
+#      macosx, carbon, ppc - antZip
+
+#Allow cycles involving at most one bundle that needs to be compiled with the rest being binary bundles.
+allowBinaryCycles=true
+
+#Sort bundles depenedencies across all features instead of just within a given feature.
+#flattenDependencies = true
+
+#Parallel compilation, requires flattenedDependencies=true
+#parallelCompilation=true
+#parallelThreadCount=
+#parallelThreadsPerProcessor=
+       
+#Set to true if you want the output to be ready for an update jar (no site.xml generated)
+#outputUpdateJars = false
+
+#Set to true for Jnlp generation
+#codebase should be a URL that will be used as the root of all relative URLs in the output.
+#generateJnlp=false
+#jnlp.codebase=<codebase url>
+#jnlp.j2se=<j2se version>
+#jnlp.locale=<a locale>
+#jnlp.generateOfflineAllowed=true or false generate <offlineAllowed/> attribute in the generated features
+#jnlp.configs=${configs}                       #uncomment to filter the content of the generated jnlp files based on the configuration being built
+
+#Set to true if you want to sign jars
+#signJars=false
+#sign.alias=<alias>
+#sign.keystore=<keystore location>
+#sign.storepass=<keystore password>
+#sign.keypass=<key password>
+
+#Arguments to send to the zip executable
+#zipargs=
+
+#Arguments to send to the tar executable
+#tarargs=
+
+#Control the creation of a file containing the version included in each configuration - on by default 
+#generateVersionsLists=false
+
+############## BUILD NAMING CONTROL ################
+# The directory into which the build elements are fetched and where
+# the build takes place.
+buildDirectory="Do not touch here"
+
+# Type of build.  Used in naming the build output.  Typically this value is
+# one of I, N, M, S, ...
+buildType="Do not touch here"
+
+# ID of the build.  Used in naming the build output.
+buildId="Do not touch here"
+
+# Label for the build.  Used in naming the build output
+buildLabel=${buildType}.${buildId}
+
+# Timestamp for the build.  Used in naming the build output
+timestamp=007
+
+#The value to be used for the qualifier of a plugin or feature when you want to override the value computed by pde.
+#The value will only be applied to plugin or features indicating build.properties, qualifier = context 
+#forceContextQualifier=<the value for the qualifier>
+
+#Enable / disable the generation of a suffix for the features that use .qualifier. 
+#The generated suffix is computed according to the content of the feature   
+#generateFeatureVersionSuffix=true
+
+############# BASE CONTROL #############
+# Settings for the base Eclipse components and Java class libraries 
+# against which you are building.
+# Base location for anything the build needs to compile against.  For example,
+# in most RCP app or a plug-in,  the baseLocation should be the location of a previously
+# installed Eclipse against which the application or plug-in code will be compiled and the RCP delta pack.
+
+base="Do not touch here"
+baseLocation="Do not touch here"
+
+
+#Folder containing repositories whose content is needed to compile against
+#repoBaseLocation=${base}/repos
+#Folder where the content of the repositories from ${repoBaseLocation} will be made available as a form suitable to be compiled against
+#transformedRepoLocation=${base}/transformedRepos
+
+#Os/Ws/Arch/nl of the eclipse specified by baseLocation
+baseos=linux
+basews=gtk
+basearch=x86
+
+#this property indicates whether you want the set of plug-ins and features to be considered during the build to be limited to the ones reachable from the features / plugins being built
+filteredDependencyCheck=false
+
+#this property indicates whether the resolution should be done in development mode (i.e. ignore multiple bundles with singletons)
+resolution.devMode=false
+
+#pluginPath is a list of locations in which to find plugins and features.  This list is separated by the platform file separator (; or :)
+#a location is one of:  
+#- the location of the jar or folder that is the plugin or feature : /path/to/foo.jar or /path/to/foo
+#- a directory that contains a /plugins or /features subdirectory
+#- the location of a feature.xml, or for 2.1 style plugins, the plugin.xml or fragment.xml
+#pluginPath=
+
+skipBase=true
+eclipseURL=<url for eclipse download site>
+eclipseBuildId=<Id of Eclipse build to get>
+eclipseBaseURL=${eclipseURL}/eclipse-platform-${eclipseBuildId}-win32.zip
+
+
+############# MAP FILE CONTROL ################
+# This section defines CVS tags to use when fetching the map files from the repository.
+# If you want to fetch the map file from repository / location, change the getMapFiles target in the customTargets.xml
+
+skipMaps=true
+mapsRepo=:pserver:anonymous@example.com/path/to/repo
+mapsRoot=path/to/maps
+mapsCheckoutTag=HEAD
+
+#tagMaps=true
+mapsTagTag=v${buildId}
+
+
+############ REPOSITORY CONTROL ###############
+# This section defines properties parameterizing the repositories where plugins, fragments
+# bundles and features are being obtained from. 
+
+# The tags to use when fetching elements to build.
+# By default thebuilder will use whatever is in the maps.  
+# This value takes the form of a comma separated list of repository identifier (like used in the map files) and the 
+# overriding value
+# For example fetchTag=CVS=HEAD, SVN=v20050101
+# fetchTag=HEAD
+skipFetch=true
+
+
+############# P2 OPTIONS ##############
+#p2.gathering = true
+#p2.compress=true
+
+############# JAVA COMPILER OPTIONS ##############
+# The location of the Java jars to compile against.  Typically the rt.jar for your JDK/JRE
+#bootclasspath=${java.home}/lib/rt.jar
+
+# specific JRE locations to compile against. These values are used to compile bundles specifying a 
+# Bundle-RequiredExecutionEnvironment. Uncomment and set values for environments that you support
+#CDC-1.0/Foundation-1.0= /path/to/rt.jar
+#CDC-1.1/Foundation-1.1=
+#OSGi/Minimum-1.0=
+#OSGi/Minimum-1.1=
+#JRE-1.1=
+#J2SE-1.2=
+#J2SE-1.3=
+#J2SE-1.4=
+#J2SE-1.5=
+#JavaSE-1.6=
+#PersonalJava-1.1=
+#PersonalJava-1.2=
+#CDC-1.0/PersonalBasis-1.0=
+#CDC-1.0/PersonalJava-1.0=
+#CDC-1.1/PersonalBasis-1.1=
+#CDC-1.1/PersonalJava-1.1=
+
+# Specify the output format of the compiler log when eclipse jdt is used
+logExtension=.log
+
+# Whether or not to include debug info in the output jars
+javacDebugInfo=true
+
+# Whether or not to fail the build if there are compiler errors
+javacFailOnError=true
+
+# Enable or disable verbose mode of the compiler
+javacVerbose=false
+
+# Extra arguments for the compiler. These are specific to the java compiler being used.
+#compilerArg=
+
+# Default value for the version of the source code. This value is used when compiling plug-ins that do not set the Bundle-RequiredExecutionEnvironment or set javacSource in build.properties
+javacSource=1.6
+
+# Default value for the version of the byte code targeted. This value is used when compiling plug-ins that do not set the Bundle-RequiredExecutionEnvironment or set javacTarget in build.properties.
+javacTarget=1.6
+
+
diff --git a/builder/customTargets.xml b/builder/customTargets.xml
new file mode 100644 (file)
index 0000000..6a42e92
--- /dev/null
@@ -0,0 +1,187 @@
+<project name="Build specific targets and properties" default="noDefault">
+
+       <!-- ===================================================================== -->
+       <!-- Run a given ${target} on all elements being built -->
+       <!-- Add on <ant> task for each top level element being built. -->
+       <!-- ===================================================================== -->
+       <available property="allElementsFile" file="${builder}/allElements.xml" value="${builder}/allElements.xml"/>
+       <property name="allElementsFile" location="${eclipse.pdebuild.templates}/headless-build/allElements.xml"/>
+
+       <import file="${allElementsFile}" />
+       <target name="allElements">
+               <ant antfile="${genericTargets}" target="${target}">
+                       <property name="type" value="${topLevelElementType}"/>
+                       <property name="id" value="${topLevelElementId}"/>
+               </ant>
+       </target>
+
+       <target
+               name="assemble.${topLevelElementId}.linux.gtk.x86">
+               <ant antfile="{$assembleScriptName}" dir="${buildDirectory}"/>
+       </target>
+       <target
+               name="assemble.${topLevelElementId}.win32.win32.x86">
+               <ant antfile="{$assembleScriptName}" dir="${buildDirectory}"/>
+       </target>
+       
+       <!-- ===================================================================== -->
+       <!-- ===================================================================== -->
+       <target name="getBaseComponents" depends="checkLocalBase" unless="skipBase">
+               <get src="${eclipseBaseURL}" dest="${buildDirectory}/../temp-base.zip" />
+               <unzip dest="${base}" overwrite="true" src="${buildDirectory}/../temp-base.zip" />
+       </target>
+
+       <target name="checkLocalBase">
+               <available file="${base}" property="skipBase" />
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Check out map files from correct repository -->
+       <!-- Replace values for mapsCheckoutTag as desired. -->
+       <!-- ===================================================================== -->
+       <target name="getMapFiles" depends="checkLocalMaps" unless="skipMaps">
+               <property name="mapsCheckoutTag" value="HEAD" />
+               <cvs cvsRoot="${mapsRepo}" package="${mapsRoot}" dest="${buildDirectory}/maps" tag="${mapsCheckoutTag}" />
+       </target>
+
+       <target name="checkLocalMaps">
+               <available property="skipMaps" file="${buildDirectory}/maps" />
+       </target>
+
+       <target name="tagMapFiles" if="tagMaps">
+               <cvs dest="${buildDirectory}/maps/${mapsRoot}" command="tag ${mapsTagTag}" />
+       </target>
+
+       <!-- ===================================================================== -->
+
+       <target name="clean" unless="noclean">
+               <antcall target="allElements">
+                       <param name="target" value="cleanElement" />
+               </antcall>
+       </target>
+
+       <target name="gatherLogs">
+               <mkdir dir="${buildDirectory}/${buildLabel}/compilelogs" />
+               <antcall target="allElements">
+                       <param name="target" value="gatherLogs" />
+               </antcall>
+               <unzip dest="${buildDirectory}/${buildLabel}/compilelogs" overwrite="true">
+                       <fileset dir="${buildDirectory}/features">
+                               <include name="**/*.log.zip" />
+                       </fileset>
+               </unzip>
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Steps to do before setup -->
+       <!-- ===================================================================== -->
+       <target name="preSetup">
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Steps to do after setup but before starting the build proper -->
+       <!-- ===================================================================== -->
+       <target name="postSetup">
+               <antcall target="getBaseComponents" />
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Steps to do before fetching the build elements -->
+       <!-- ===================================================================== -->
+       <target name="preFetch">
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Steps to do after fetching the build elements -->
+       <!-- ===================================================================== -->
+       <target name="postFetch">
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Steps to do before the repositories are being processed -->
+       <!-- ===================================================================== -->
+       <target name="preProcessRepos">
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Steps to do after the repositories have been processed -->
+       <!-- ===================================================================== -->
+       <target name="postProcessRepos">
+       </target>
+       
+       <!-- ===================================================================== -->
+       <!-- Steps to do before generating the build scripts. -->
+       <!-- ===================================================================== -->
+       <target name="preGenerate">
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Steps to do after generating the build scripts. -->
+       <!-- ===================================================================== -->
+       <target name="postGenerate">
+               <antcall target="clean" />
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Steps to do before running the build.xmls for the elements being built. -->
+       <!-- ===================================================================== -->
+       <target name="preProcess">
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Steps to do after running the build.xmls for the elements being built. -->
+       <!-- ===================================================================== -->
+       <target name="postProcess">
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Steps to do before running assemble. -->
+       <!-- ===================================================================== -->
+       <target name="preAssemble">
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Steps to do after  running assemble. -->
+       <!-- ===================================================================== -->
+       <target name="postAssemble">
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Steps to do before running package. -->
+       <!-- ===================================================================== -->
+       <target name="prePackage">
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Steps to do after  running package. -->
+       <!-- ===================================================================== -->
+       <target name="postPackage">
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Steps to do after the build is done. -->
+       <!-- ===================================================================== -->
+       <target name="postBuild">
+               <antcall target="gatherLogs" />
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Steps to do to test the build results -->
+       <!-- ===================================================================== -->
+       <target name="test">
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Steps to do to publish the build results -->
+       <!-- ===================================================================== -->
+       <target name="publish">
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Default target                                                        -->
+       <!-- ===================================================================== -->
+       <target name="noDefault">
+               <echo message="You must specify a target when invoking this file" />
+       </target>
+
+</project>
diff --git a/org.tizen.web.advanceddeclarationview.branding/.project b/org.tizen.web.advanceddeclarationview.branding/.project
new file mode 100644 (file)
index 0000000..990d59d
--- /dev/null
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.tizen.web.advanceddeclarationview.branding</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.PluginNature</nature>
+       </natures>
+</projectDescription>
diff --git a/org.tizen.web.advanceddeclarationview.branding/32_TIZEN_SDK_icon.png b/org.tizen.web.advanceddeclarationview.branding/32_TIZEN_SDK_icon.png
new file mode 100644 (file)
index 0000000..e511542
Binary files /dev/null and b/org.tizen.web.advanceddeclarationview.branding/32_TIZEN_SDK_icon.png differ
diff --git a/org.tizen.web.advanceddeclarationview.branding/META-INF/MANIFEST.MF b/org.tizen.web.advanceddeclarationview.branding/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..2d2cccf
--- /dev/null
@@ -0,0 +1,6 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Tizen Advanced Declaration View for JavaScript
+Bundle-SymbolicName: org.tizen.web.advanceddeclarationview.branding
+Bundle-Version: 1.0.0.qualifier
+Bundle-Vendor: The Linux Foundation
diff --git a/org.tizen.web.advanceddeclarationview.branding/about.ini b/org.tizen.web.advanceddeclarationview.branding/about.ini
new file mode 100644 (file)
index 0000000..fc8fa16
--- /dev/null
@@ -0,0 +1,32 @@
+# about.ini
+# contains information about a feature
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# "%key" are externalized strings defined in about.properties
+# This file does not need to be translated.
+
+# Property "aboutText" contains blurb for "About" dialog (translated)
+aboutText=%blurb
+
+# Property "windowImage" contains path to window icon (16x16)
+# needed for primary features only
+
+# Property "featureImage" contains path to feature image (32x32)
+featureImage=32_TIZEN_SDK_icon.png
+
+# Property "aboutImage" contains path to product image (500x330 or 115x164)
+# needed for primary features only
+
+# Property "appName" contains name of the application (translated)
+# needed for primary features only
+
+# Property "welcomePage" contains path to welcome page (special XML-based format)
+# welcomePage=$nl$/welcome.xml
+
+# Property "welcomePerspective" contains the id of the perspective in which the
+# welcome page is to be opened.
+# optional
+
+# Property "tipsAndTricksHref" contains the Help topic href to a tips and tricks page 
+# optional
+# tipsAndTricksHref=/org.tizen.doc.user/tips/tizen_tips.htm
+
diff --git a/org.tizen.web.advanceddeclarationview.branding/about.mappings b/org.tizen.web.advanceddeclarationview.branding/about.mappings
new file mode 100644 (file)
index 0000000..5480415
--- /dev/null
@@ -0,0 +1,6 @@
+# about.mappings
+# contains fill-ins for about.properties and bundle.properties
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file does not need to be translated.
+0=Tizen Advanced Declaration View for JavaScript
+1=date-time
diff --git a/org.tizen.web.advanceddeclarationview.branding/about.properties b/org.tizen.web.advanceddeclarationview.branding/about.properties
new file mode 100644 (file)
index 0000000..5c2e80a
--- /dev/null
@@ -0,0 +1,12 @@
+# about.properties
+# contains externalized strings for about.ini
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# fill-ins are supplied by about.mappings
+# This file should be translated.
+
+blurb={0}\n\
+\n\
+Version : {featureVersion}\n\
+Build id : {1}\n\
+\n\
+Visit https://developer.tizen.org \n
\ No newline at end of file
diff --git a/org.tizen.web.advanceddeclarationview.branding/build.properties b/org.tizen.web.advanceddeclarationview.branding/build.properties
new file mode 100644 (file)
index 0000000..be9983f
--- /dev/null
@@ -0,0 +1,5 @@
+bin.includes = META-INF/,\
+               32_TIZEN_SDK_icon.png,\
+               about.ini,\
+               about.mappings,\
+               about.properties
diff --git a/org.tizen.web.advanceddeclarationview.feature/.project b/org.tizen.web.advanceddeclarationview.feature/.project
new file mode 100644 (file)
index 0000000..8a5131c
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.tizen.web.advanceddeclarationview.feature</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.pde.FeatureBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.FeatureNature</nature>
+       </natures>
+</projectDescription>
diff --git a/org.tizen.web.advanceddeclarationview.feature/build.properties b/org.tizen.web.advanceddeclarationview.feature/build.properties
new file mode 100644 (file)
index 0000000..b3a611b
--- /dev/null
@@ -0,0 +1,2 @@
+bin.includes = feature.xml,\
+               feature.properties
diff --git a/org.tizen.web.advanceddeclarationview.feature/feature.properties b/org.tizen.web.advanceddeclarationview.feature/feature.properties
new file mode 100644 (file)
index 0000000..0d5d572
--- /dev/null
@@ -0,0 +1,53 @@
+###############################################################################
+# Copyright (C) 2000 - 2011 Samsung Electronics Co., Ltd.
+# All rights reserved. This program and the accompanying materials 
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+# 
+# Contributors:
+#      S-Core Co., Ltd
+###############################################################################
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file should be translated.
+
+# "featureName" property - name of the feature
+featureName=Tizen Advanced Declaration View for JavaScript
+
+# "providerName" property - name of the company that provides the feature
+providerName=Samsung Electronics
+
+# "updateSiteName" property - label for the update site
+updateSiteName=Tizen Advanced Declaration View Updates
+
+# "description" property - description of the feature
+description=Tizen Advanced Declaration View for JavaScript.
+       14            %copyright
+       15         </copyright>
+# "copyright" property
+copyrightURL=https://developer.tizen.org
+copyright=Copyright (C) 2010 - 2011 Samsung Electronics Co., Ltd.\n\
+All rights reserved.\n
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+Tizen SDK\n\
+\n\
+Tizen SDK contains software portions licensed under various open source licenses as well as proprietary components.  All open source software portions ("Open Source Software") are licensed under the open source licenses that accompany such Open Source Software.\n\
+ \n\
+The licenses governing the Open Source Software are available at: http://developer.tizen.org/download/tizen_sdk_opensource_license.html\n\
+ \n\
+Except for the Open Source Software contained in Tizen SDK, all other software portions contained in Tizen SDK are governed by the terms and conditions of the Tizen Software Development Kit License Agreement, available at: http://developer.tizen.org/download/samsung_sdk_license.html\n\
+ \n\
+You may access and download Tizen SDK Open Source Software at: http://developer.tizen.org/download/tizenopensdk.tar.gz\n\
+ \n\
+BY CLICKING THE "I AGREE" BUTTON OR BY USING ANY PART OF TIZEN SDK, YOU AGREE (ON BEHALF OF YOURSELF AND/OR YOUR COMPANY) TO THE OPEN SOURCE SOFTWARE LICENSE TERMS AND THE TIZEN SOFTWARE DEVELOPMENT KIT LICENSE AGREEMENT. IF YOU DO NOT AGREE WITH THE OPEN SOURCE SOFTWARE LICENSE TERMS OR THE TIZEN SOFTWARE DEVELOPMENT KIT LICENSE AGREEMENT, YOU MAY NOT DOWNLOAD OR USE TIZEN SDK.\n
+########### end of license property ##########################################
diff --git a/org.tizen.web.advanceddeclarationview.feature/feature.xml b/org.tizen.web.advanceddeclarationview.feature/feature.xml
new file mode 100644 (file)
index 0000000..05548dd
--- /dev/null
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+      id="org.tizen.web.advanceddeclarationview.feature"
+      label="Tizen Adavanced Declaration View for JavaScript"
+      version="1.0.0.qualifier"
+      provider-name="The Linux Foundation"
+      plugin="org.tizen.web.advanceddeclarationview.branding"
+      license-feature="org.tizen.base.feature">
+
+   <description>
+      %description
+   </description>
+
+   <copyright>
+      %copyright
+   </copyright>
+
+   <license url="license.html">
+      %license
+   </license>
+
+   <requires>
+      <import plugin="org.eclipse.wst.jsdt.ui"/>
+   </requires>
+
+   <plugin
+         id="org.tizen.web.advanceddeclarationview"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         fragment="true"
+         unpack="false"/>
+
+   <plugin
+         id="org.tizen.web.advanceddeclarationview.branding"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"/>
+
+</feature>
diff --git a/org.tizen.web.advanceddeclarationview.feature/license.html b/org.tizen.web.advanceddeclarationview.feature/license.html
new file mode 100644 (file)
index 0000000..c42e289
--- /dev/null
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>\r
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\r
+<html xmlns="http://www.w3.org/1999/xhtml">\r
+<head>\r
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />\r
+<title>Tizen SOFTWARE DEVELOPMENT KIT (&quot;SDK&quot;) LICENSE AGREEMENT</title>\r
+</head>\r
+\r
+<body lang="EN-US">\r
+               <p align="center">Tizen SDK</p><br /><br />\r
+\r
+Tizen SDK contains software portions licensed under various open source licenses as well as proprietary components.  All open source software portions ("Open Source Software") are licensed under the open source\r
+licenses that accompany such Open Source Software.<br/><br/>\r
+\r
+The licenses governing the Open Source Software are available at:<br />\r
+<a href="https://developer.tizen.org/tizen-sdk-opensource-license">https://developer.tizen.org/tizen-sdk-opensource-license</a><br /><br />\r
\r
+Except for the Open Source Software and proprietary components contributed from companies other than Samsung, contained in Tizen SDK, all other software portions contained in Tizen SDK are governed by the\r
+terms and conditions of the Samsung Tizen SDK License Agreement, available at:<br />\r
+<a href="https://developer.tizen.org/tizen-sdk-license">https://developer.tizen.org/tizen-sdk-license</a><br /><br />\r
+\r
+The licenses of all proprietary components contributed from companies other than Samsung will be either displayed as part of their respective installers or accessed inside installation package archive of each\r
+component.\r
+\r
+You may access and download Tizen SDK Open Source Software at:<br />\r
+<a href="http://developer.tizen.org/download/tizenopensdk.tar.gz">http://developer.tizen.org/download/tizenopensdk.tar.gz</a><br /><br />\r
+BY CLICKING THE "I AGREE" BUTTON OR BY USING ANY PART OF TIZEN SDK, YOU AGREE (ON BEHALF OF YOURSELF AND/OR YOUR COMPANY) TO THE OPEN SOURCE SOFTWARE LICENSE TERMS, THE SAMSUNG TIZEN SDK LICENSE AGREEMENT AND THE LICENSES OF ALL PROPRIETARY COMPONENTS CONTRIBUTED FROM COMPANIES OTHER THAN SAMSUNG. If you do not agree with the Open Source Software license terms or the SAMSUNG TIZEN SDK LICENSE AGREEMENT or THE LICENSES OF ALL PROPRIETARY COMPONENTS CONTRIBUTED FROM COMPANIES OTHER THAN SAMSUNG, you may not download or use Tizen SDK.\r
diff --git a/org.tizen.web.advanceddeclarationview/.classpath b/org.tizen.web.advanceddeclarationview/.classpath
new file mode 100644 (file)
index 0000000..098194c
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+       <classpathentry kind="src" path="src"/>
+       <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.tizen.web.advanceddeclarationview/.project b/org.tizen.web.advanceddeclarationview/.project
new file mode 100644 (file)
index 0000000..84b140a
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.tizen.web.advanceddeclarationview</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.jdt.core.javabuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.PluginNature</nature>
+               <nature>org.eclipse.jdt.core.javanature</nature>
+       </natures>
+</projectDescription>
diff --git a/org.tizen.web.advanceddeclarationview/.settings/org.eclipse.jdt.core.prefs b/org.tizen.web.advanceddeclarationview/.settings/org.eclipse.jdt.core.prefs
new file mode 100644 (file)
index 0000000..e963290
--- /dev/null
@@ -0,0 +1,8 @@
+#Thu Sep 13 14:36:03 KST 2012
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.7
diff --git a/org.tizen.web.advanceddeclarationview/META-INF/MANIFEST.MF b/org.tizen.web.advanceddeclarationview/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..b0f8ff5
--- /dev/null
@@ -0,0 +1,11 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Tizen Advanced Declaration View for JavaScript
+Bundle-SymbolicName: org.tizen.web.advanceddeclarationview;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Fragment-Host: org.eclipse.wst.jsdt.ui;bundle-version="1.1.101"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.ui,
+ org.eclipse.osgi.util;bundle-version="3.2.200"
+Bundle-Vendor: The Linux Foundation
diff --git a/org.tizen.web.advanceddeclarationview/build.properties b/org.tizen.web.advanceddeclarationview/build.properties
new file mode 100644 (file)
index 0000000..187f664
--- /dev/null
@@ -0,0 +1,6 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               fragment.xml,\
+               icons/
diff --git a/org.tizen.web.advanceddeclarationview/contexts.xml b/org.tizen.web.advanceddeclarationview/contexts.xml
new file mode 100644 (file)
index 0000000..02e26e4
--- /dev/null
@@ -0,0 +1,12 @@
+<contexts>
+       <context id="viewer" title="Sample View">
+               <description>This is the context help for the sample view with a table viewer. It was generated by a PDE template.</description>
+               <topic href="/PLUGINS_ROOT/org.eclipse.platform.doc.isv/guide/ua_help_context.htm" label="Context-sensitive help">
+                       <enablement>
+                               <with variable="platform">
+                       <test property="org.eclipse.core.runtime.isBundleInstalled" args="org.eclipse.platform.doc.isv"/>
+                       </with>
+                       </enablement>
+               </topic>
+       </context>
+</contexts>
diff --git a/org.tizen.web.advanceddeclarationview/fragment.xml b/org.tizen.web.advanceddeclarationview/fragment.xml
new file mode 100644 (file)
index 0000000..f201da4
--- /dev/null
@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<fragment>
+   <extension
+         point="org.eclipse.ui.views">
+      <view
+            category="org.eclipse.wst.jsdt.ui.java"
+            class="org.tizen.web.advanceddeclarationview.ui.AdvancedDeclarationView"
+            icon="icons/declaration_view_icon.png"
+            id="org.tizen.web.advanceddeclarationview.ui.AdvancedDeclarationView"
+            name="Declaration">
+      </view>
+   </extension>
+   <extension
+         point="org.eclipse.help.contexts">
+      <contexts
+            file="contexts.xml">
+      </contexts>
+   </extension>
+   
+<extension
+         point="org.eclipse.ui.viewActions">
+      <viewContribution
+            id="org.tizen.web.advanceddeclarationview.viewContribution"
+            targetID="org.tizen.web.advanceddeclarationview.ui.AdvancedDeclarationView">
+         <action
+               class="org.tizen.web.advanceddeclarationview.ui.ToggleLockActionDelegate"
+               definitionId="org.tizen.web.advanceddeclarationview.ui.LockView"
+               icon="icons/declaration_view_lock.png"
+               id="org.tizen.web.advanceddeclarationview.lockAction"
+               label="&amp;Lock View"
+               state="false"
+               style="toggle"
+               toolbarPath="additions"
+               tooltip="Lock">
+         </action>
+      </viewContribution>
+   </extension>
+   <extension
+         point="org.eclipse.ui.bindings">
+      <key
+            commandId="org.tizen.web.advanceddeclarationview.ui.LockView"
+            contextId="org.eclipse.ui.contexts.window"
+            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+            sequence="Alt+L">
+      </key>
+       <key
+               commandId="org.tizen.web.advanceddeclarationview.ui.AdvancedDeclarationView"
+               contextId="org.eclipse.ui.contexts.window"
+            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+            sequence="Alt+Ctrl+O">
+      </key>
+   </extension>
+   
+   <extension
+         point="org.eclipse.ui.commands">
+       <category
+           id="org.tizen.web.advanceddeclarationview.commands"
+           name="Advanced Declaration View"
+           description="Advanced Declaration View Commands"/>        
+      <command
+               categoryId="org.tizen.web.advanceddeclarationview.commands"
+           id="org.tizen.web.advanceddeclarationview.ui.LockView"
+            name="Lock Advanced Declaration View"
+            defaultHandler="org.tizen.web.advanceddeclarationview.ui.ViewHandler">
+      </command>
+   </extension>
+   <extension
+         point="org.eclipse.ui.viewActions">
+      <viewContribution
+            id="org.tizen.web.advanceddeclarationview.viewContribution1"
+            targetID="org.tizen.web.advanceddeclarationview.ui.AdvancedDeclarationView">
+         <action
+               class="org.tizen.web.advanceddeclarationview.ui.ToggleLineNumberActionDelegate"
+               id="org.tizen.web.advanceddeclarationview.togglelinenumberaction"
+               label="Show Line Number"
+               state="true"
+               style="toggle"
+               tooltip="Show Line Number">
+         </action>
+      </viewContribution>
+   </extension>
+   <extension
+         point="org.eclipse.ui.viewActions">
+      <viewContribution
+            id="org.tizen.web.advanceddeclarationview.viewContribution2"
+            targetID="org.tizen.web.advanceddeclarationview.ui.AdvancedDeclarationView">
+         <action
+               class="org.tizen.web.advanceddeclarationview.ui.OpenInputActionDelegate"
+               icon="icons/declaration_view_open.png"
+               id="org.tizen.web.advanceddeclarationview.action1"
+               label="Open Input"
+               style="push"
+               toolbarPath="additions"
+               tooltip="Open Input">
+         </action>
+      </viewContribution>
+   </extension>
+   <extension
+        point="org.eclipse.ui.themes">
+      <colorDefinition
+            label="Declaration view background"
+            categoryId="org.eclipse.wst.jsdt.ui.presentation"
+            value="242,254,255"
+            id="org.tizen.web.advanceddeclarationview.ui.AdvancedDeclarationView.backgroundColor">
+         <description>
+            The color used as background for the JavaScript Declaration view.
+         </description>
+      </colorDefinition>
+   </extension>
+   
+   <!-- Set Advanced Declaration View location beside Pages in TizenWeb perspective -->
+   <extension
+       point="org.eclipse.ui.perspectiveExtensions">
+        <perspectiveExtension
+            targetID="org.tizen.web.ui.perspective.WebWidget">
+               <view
+               id="org.tizen.webuibuilder.ui.views.PagesView"
+               relationship="stack"
+               relative="org.eclipse.ui.views.ProblemView">
+            </view>
+             <view
+               id="org.tizen.web.advanceddeclarationview.ui.AdvancedDeclarationView"
+               relationship="stack"
+               relative="org.eclipse.ui.views.ProblemView">
+             </view>
+         </perspectiveExtension>
+   </extension>
+</fragment>
diff --git a/org.tizen.web.advanceddeclarationview/icons/declaration_view_icon.png b/org.tizen.web.advanceddeclarationview/icons/declaration_view_icon.png
new file mode 100644 (file)
index 0000000..8ec491f
Binary files /dev/null and b/org.tizen.web.advanceddeclarationview/icons/declaration_view_icon.png differ
diff --git a/org.tizen.web.advanceddeclarationview/icons/declaration_view_lock.png b/org.tizen.web.advanceddeclarationview/icons/declaration_view_lock.png
new file mode 100644 (file)
index 0000000..bfb8a9f
Binary files /dev/null and b/org.tizen.web.advanceddeclarationview/icons/declaration_view_lock.png differ
diff --git a/org.tizen.web.advanceddeclarationview/icons/declaration_view_open.png b/org.tizen.web.advanceddeclarationview/icons/declaration_view_open.png
new file mode 100644 (file)
index 0000000..ad3ea1c
Binary files /dev/null and b/org.tizen.web.advanceddeclarationview/icons/declaration_view_open.png differ
diff --git a/org.tizen.web.advanceddeclarationview/src/org/tizen/web/advanceddeclarationview/ui/AdvancedDeclarationView.java b/org.tizen.web.advanceddeclarationview/src/org/tizen/web/advanceddeclarationview/ui/AdvancedDeclarationView.java
new file mode 100644 (file)
index 0000000..3e3ab76
--- /dev/null
@@ -0,0 +1,1317 @@
+/*******************************************************************************
+ * Program Understanding / Advanced Declaration View for JavaScript
+ *
+ * Copyright (c) 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Hyukmin Kwon <hyukmin0530@samsung.com>
+ * Jaeheung Kim <jaeheung.kim@samsung.com>
+ * Sujin Kim <sujin921.kim@samsung.com>
+ * Woongsik Choi <woongsik76.choi@samsung.com>
+ *  
+ *  The Original Code is JSDT's org.eclipse.wst.jsdt.internal.ui.infoviews package.
+ *  The Initial developer or author of the Original Code is IBM Corporation and others.
+ *  Samsung Electronics Co., Ltd. modifies it under the terms of Eclipse Public License v1.0
+ *  
+ * This program and the accompanying materials are made available 
+ * under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *  
+ *******************************************************************************/
+package org.tizen.web.advanceddeclarationview.ui;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IMenuListener;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.jface.resource.ColorRegistry;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.Document;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.ITextPresentationListener;
+import org.eclipse.jface.text.ITextSelection;
+import org.eclipse.jface.text.TextPresentation;
+import org.eclipse.jface.text.source.CompositeRuler;
+import org.eclipse.jface.text.source.ISharedTextColors;
+import org.eclipse.jface.text.source.LineNumberRulerColumn;
+import org.eclipse.jface.text.source.SourceViewer;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.ComboViewer;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.StyleRange;
+import org.eclipse.swt.custom.StyledText;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IActionBars;
+import org.eclipse.ui.IPartListener2;
+import org.eclipse.ui.ISelectionListener;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchPartReference;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.editors.text.EditorsUI;
+import org.eclipse.ui.part.ViewPart;
+import org.eclipse.ui.texteditor.AbstractDecoratedTextEditorPreferenceConstants;
+import org.eclipse.wst.jsdt.core.ICodeAssist;
+import org.eclipse.wst.jsdt.core.IJavaScriptElement;
+import org.eclipse.wst.jsdt.core.ILocalVariable;
+import org.eclipse.wst.jsdt.core.IMember;
+import org.eclipse.wst.jsdt.core.ISourceRange;
+import org.eclipse.wst.jsdt.core.ISourceReference;
+import org.eclipse.wst.jsdt.core.JavaScriptModelException;
+import org.eclipse.wst.jsdt.internal.core.SourceType;
+import org.eclipse.wst.jsdt.internal.ui.IJavaHelpContextIds;
+import org.eclipse.wst.jsdt.internal.ui.JavaScriptPlugin;
+import org.eclipse.wst.jsdt.internal.ui.javaeditor.JavaEditor;
+import org.eclipse.wst.jsdt.internal.ui.javaeditor.JavaSourceViewer;
+import org.eclipse.wst.jsdt.internal.ui.text.SimpleJavaSourceViewerConfiguration;
+import org.eclipse.wst.jsdt.internal.ui.util.SelectionUtil;
+import org.eclipse.wst.jsdt.ui.IContextMenuConstants;
+import org.eclipse.wst.jsdt.ui.JavaScriptElementLabels;
+import org.eclipse.wst.jsdt.ui.actions.IJavaEditorActionDefinitionIds;
+import org.eclipse.wst.jsdt.ui.actions.JdtActionConstants;
+import org.eclipse.wst.jsdt.ui.actions.OpenAction;
+import org.eclipse.wst.jsdt.ui.text.IJavaScriptPartitions;
+import org.eclipse.wst.jsdt.ui.text.JavaScriptSourceViewerConfiguration;
+
+
+/**
+ * Abstract class for views which show information for a given element.
+ *
+ * 
+ */
+public class AdvancedDeclarationView extends ViewPart implements ISelectionListener, IMenuListener, IPropertyChangeListener {
+       /** Symbolic Java editor font name. */
+       private static final String SYMBOLIC_FONT_NAME= "org.eclipse.wst.jsdt.ui.editors.textfont"; //$NON-NLS-1$
+
+       /** JavaScriptElementLabels flags used for the title */
+       private final long TITLE_FLAGS=  JavaScriptElementLabels.ALL_FULLY_QUALIFIED
+               | JavaScriptElementLabels.M_PRE_RETURNTYPE | JavaScriptElementLabels.M_PARAMETER_TYPES | JavaScriptElementLabels.M_PARAMETER_NAMES | JavaScriptElementLabels.M_EXCEPTIONS
+               | JavaScriptElementLabels.F_PRE_TYPE_SIGNATURE | JavaScriptElementLabels.M_PRE_TYPE_PARAMETERS | JavaScriptElementLabels.T_TYPE_PARAMETERS
+               | JavaScriptElementLabels.USE_RESOLVED 
+               | JavaScriptElementLabels.APPEND_ROOT_PATH;
+       private final long LOCAL_VARIABLE_TITLE_FLAGS= TITLE_FLAGS & ~JavaScriptElementLabels.F_FULLY_QUALIFIED | JavaScriptElementLabels.F_POST_QUALIFIED;
+       
+       /** JavaScriptElementLabels flags used for the tool tip text */
+       private static final long TOOLTIP_LABEL_FLAGS= JavaScriptElementLabels.DEFAULT_QUALIFIED | JavaScriptElementLabels.ROOT_POST_QUALIFIED | JavaScriptElementLabels.APPEND_ROOT_PATH |
+                       JavaScriptElementLabels.M_PARAMETER_TYPES | JavaScriptElementLabels.M_PARAMETER_NAMES | JavaScriptElementLabels.M_APP_RETURNTYPE | JavaScriptElementLabels.M_EXCEPTIONS |
+                       JavaScriptElementLabels.F_APP_TYPE_SIGNATURE | JavaScriptElementLabels.T_TYPE_PARAMETERS;
+       
+       private static final int LAYOUT_NORMAL = 0;
+       private static final int LAYOUT_MULTIPLE_ELEMENTS = 1;
+       private static final int LAYOUT_NOTHING_TO_VIEW = 2;
+
+       /*
+        * @see IPartListener2
+        */
+       private IPartListener2 fPartListener= new IPartListener2() {
+               public void partVisible(IWorkbenchPartReference ref) {
+                       if (ref.getId().equals(getSite().getId())) {
+                               IWorkbenchPart activePart= ref.getPage().getActivePart();
+                               if (activePart != null) {
+                                       selectionChanged(activePart, ref.getPage().getSelection());
+                               }
+                               startListeningForSelectionChanges();
+                       }
+               }
+               public void partHidden(IWorkbenchPartReference ref) {
+                       if (ref.getId().equals(getSite().getId())) {
+                               stopListeningForSelectionChanges();
+                       }
+               }
+               public void partInputChanged(IWorkbenchPartReference ref) {
+                       if (!ref.getId().equals(getSite().getId())) {
+                               computeAndSetInput(ref.getPart(false));
+                       }
+               }
+               public void partActivated(IWorkbenchPartReference ref) {
+               }
+               public void partBroughtToTop(IWorkbenchPartReference ref) {
+               }
+               public void partClosed(IWorkbenchPartReference ref) {
+               }
+               public void partDeactivated(IWorkbenchPartReference ref) {
+               }
+               public void partOpened(IWorkbenchPartReference ref) {
+               }
+       };
+       
+       /** Parent control */
+       private Composite parentControl;
+       /** This view's source viewer */
+       private SourceViewer fSrcViewer;
+       /** This view's combo viewer */
+       private ComboViewer fComboViewer;
+       /** The viewers configuration */
+       private JavaScriptSourceViewerConfiguration fViewerConfiguration;
+       /** This view's javascript element info label */
+       private Label fElementInfoLabel;
+       /** This view's result info label */
+       private Label fComboBoxLabel;
+       /** The viewer's vertical ruler */
+       private CompositeRuler fVerticalRuler;
+       /** The viewer's showing line number flag */
+       private boolean fShowLineNumber = true;
+       /** The viewer's line number column */
+       private LineNumberRulerColumn fLineNumberColumn;
+       /** The toggle line number ruler action */
+       private IAction fToggleLineNumberAction;
+       /** The open input action action */
+       private IAction fOpenInputAction;
+       
+       /** The viewer's font properties change listener. */
+       private IPropertyChangeListener fFontPropertyChangeListener= new FontPropertyChangeListener();
+       /** The current input. */
+       protected IJavaScriptElement fSelectedElement;
+
+       /**
+        * The editor's property change listener.
+        * 
+        */
+       private IPropertyChangeListener fPropertyChangeListener= new PropertyChangeListener();
+       /** The open action */
+       private OpenAction fOpen;
+       /** The toggle lock action */
+       private IAction fToggleLockAction;
+
+       /** Counts the number of background computation requests. */
+       private volatile int fComputeCount;
+       
+       /** Flag for locking */
+       private boolean locked = false;
+       
+       /** Background color. */
+       private Color fBackgroundColor;
+       private RGB fBackgroundColorRGB;
+
+       /**
+        * Internal property change listener for handling changes in the editor's preferences.
+        */
+       class PropertyChangeListener implements IPropertyChangeListener {
+               /*
+                * @see IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
+                */
+               public void propertyChange(PropertyChangeEvent event) {
+                       if (fSrcViewer == null) {
+                               return;
+                       }
+
+                       if (fViewerConfiguration.affectsTextPresentation(event)) {
+                               fViewerConfiguration.handlePropertyChangeEvent(event);
+                               fSrcViewer.invalidateTextPresentation();
+                       }
+                       if (event.getProperty().equals(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_LINE_NUMBER_RULER_COLOR)) {
+                               updateLineNumberColumnPresentation(true);
+                       }
+               }
+       }
+
+       /**
+        * Internal property change listener for handling workbench font changes.
+        */
+       class FontPropertyChangeListener implements IPropertyChangeListener {
+               /*
+                * @see IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
+                */
+               public void propertyChange(PropertyChangeEvent event) {
+                       if (fSrcViewer == null) {
+                               return;
+                       }
+
+                       String property= event.getProperty();
+
+                       if (SYMBOLIC_FONT_NAME.equals(property)) {
+                               setViewerFont();
+                       }
+               }
+       }
+
+       private ISourceRange getSourceRange(IJavaScriptElement element) {
+               ISourceRange range = null;
+               if (element instanceof ISourceReference) {
+                       try {
+                               if (element instanceof ILocalVariable) {
+                                       range = ((ILocalVariable) element).getNameRange();
+                               } else if (element instanceof IMember) {
+                                       range = ((IMember) element).getNameRange();
+                               } else {
+                                       range = ((ISourceReference) element).getSourceRange();
+                               }
+                       } catch (JavaScriptModelException e) {
+                               return null;
+                       }
+               }
+               return range;
+       }
+       
+       /**
+        * Remove elements with no JavaScript file which contains the element
+        * @param elements array to search
+        * @return elements array 
+        */
+       private IJavaScriptElement[] removeElementsWithNoContainingJSFile(IJavaScriptElement[] elements) {
+               if (elements == null) {
+                       return elements;
+               }
+               
+               int count = elements.length;
+               for (int i = 0; i < elements.length; i++) {
+                       if (elements[i] == null) {
+                               count--;
+                               continue;
+                       }
+                       if (getJsFileElement(elements[i]) == null) {
+                               elements[i] = null;
+                               count--;
+                       }
+               }
+               
+               IJavaScriptElement[] jsElements = new IJavaScriptElement[count];        
+               for (int i = 0, j = 0; i < elements.length; i++) {
+                       if (elements[i] != null) {
+                               jsElements[j++] = elements[i];
+                       }
+               }
+               return jsElements;
+       }       
+       
+       /**
+        * Brute force search to remove elements by comparing with SourceRanges.
+        * @param elements to search
+        * @return removed unnecessary elements
+        */
+       private IJavaScriptElement[] removeDuplicateElements(IJavaScriptElement[] elements) {
+               if (elements == null || elements.length <= 1) {
+                       return elements;
+               }
+               
+               int count = elements.length;
+               outerloop: for (int i = 0; i < elements.length; i++) {
+                       if (elements[i] == null) {
+                               continue;
+                       }
+
+                       IJavaScriptElement ifile = getJsFileElement(elements[i]);
+                       ISourceRange irange = getSourceRange(elements[i]);
+                       if (irange == null) {
+                               continue;
+                       }
+                       int ioffset = irange.getOffset();
+                       int ilength = irange.getLength();
+
+                       for (int j = i + 1; j < elements.length; j++) {
+                               if (elements[j] == null) {
+                                       continue;
+                               }
+                               
+                               IJavaScriptElement jfile = getJsFileElement(elements[j]);
+                               ISourceRange jrange = getSourceRange(elements[j]);
+                               if (jrange == null) {
+                                       continue;
+                               }
+                               
+                               int joffset = jrange.getOffset();
+                               int jlength = jrange.getLength();
+                               
+                               if (ifile == null || jfile == null || !ifile.equals(jfile) || ilength == jlength) {
+                                       continue;
+                               }
+                               
+                               // start comparing ranges to remove element
+                               if (ioffset >= joffset && (ioffset + ilength <= joffset + jlength)) {
+                                       elements[j] = null;
+                                       count--;
+                               } else if (ioffset <= joffset && (ioffset + ilength >= joffset + jlength)) {
+                                       elements[i] = null;
+                                       count--;
+                                       continue outerloop;
+                               }
+                       }
+               }
+               
+               IJavaScriptElement[] jsElements = new IJavaScriptElement[count];
+               // copy all non null elements to jsElements
+               for (int i = 0, j = 0; i < elements.length; i++) {
+                       if (elements[i] != null) {
+                               jsElements[j++] = elements[i];
+                       }
+               }
+               
+               return jsElements;
+       }
+       
+       /**
+        * Find default element and set it to elements[0]
+        * @param elements elements to search and set 
+        */
+       private void findDefaultElementAndSet(IJavaScriptElement[] elements) {
+               if(elements == null)
+                       return;
+               for (int index = 0; index < elements.length; index++) {
+                       if(!(elements[index] instanceof SourceType)) {
+                               // set default element to elements[0] 
+                               IJavaScriptElement element = elements[0];
+                               elements[0] = elements[index];
+                               elements[index] = element;
+                       }
+               }
+       }
+       
+       /**
+        * Text presentation listeners for handling background color.
+        * @author sujin
+        */
+       private class DeclarationVieweTextPresenter implements ITextPresentationListener {
+               @Override
+               public void applyTextPresentation(TextPresentation textPresentation) {
+                       highlightDeclaration(textPresentation);                 
+               }
+               private void highlightDeclaration(TextPresentation textPresentation) {
+                       
+                       //Highlight and scroll to the declaration.
+                       ISourceRange range = getSourceRange(fSelectedElement);
+                       if(range != null) {
+                               Display disp = fSrcViewer.getControl().getDisplay();
+                               StyleRange styleRange = new StyleRange();
+                               styleRange.start = range.getOffset();
+                               styleRange.length = range.getLength();
+                               styleRange.background = new Color(disp, new RGB(185,211,238));
+                               
+                               fSrcViewer.setRangeIndication(range.getOffset(), range.getLength(), true);
+                               textPresentation.mergeStyleRange(styleRange);
+                       }
+               }
+       }
+
+       /**
+        * Set the input of this view.
+        *
+        * @param input the input object
+        */
+       protected void setInput(Object input) {
+               if (input instanceof IDocument) {
+                       fSrcViewer.setInput(input);
+               } else if (input == null) {
+                       fSrcViewer.setInput(new Document("")); //$NON-NLS-1$
+               } else {
+                       IDocument document= new Document(input.toString());
+                       JavaScriptPlugin.getDefault().getJavaTextTools().setupJavaDocumentPartitioner(document, IJavaScriptPartitions.JAVA_PARTITIONING);                       
+                       fSrcViewer.setInput(document);
+               }
+               
+               if (input != null) {
+                       fSrcViewer.invalidateTextPresentation();
+               }
+       }
+       
+       /**
+        * Computes the input for this view based on the given element.
+        *
+        * @param element the element from which to compute the input
+        * @return      the input or <code>null</code> if the input was not computed successfully
+        */
+       protected Object getJsFileSource(Object input) {
+               if (!(input instanceof IJavaScriptElement)) {
+                       return null;
+               }
+
+               IJavaScriptElement inputFile = getJsFileElement(((IJavaScriptElement)input));
+       
+               if (inputFile == null) {
+                       return null;                    
+               }
+
+               if (fSrcViewer == null || !(inputFile instanceof ISourceReference)) {
+                       return null;
+               }
+
+               ISourceReference sourceRef= (ISourceReference)inputFile;
+
+               String source;
+               try {
+                       source= sourceRef.getSource();
+               } catch (JavaScriptModelException ex) {
+                       return ""; //$NON-NLS-1$
+               }
+
+               if (source == null) {
+                       return ""; //$NON-NLS-1$
+               }
+
+               return source;
+       }
+       
+       /**
+        * Find the name of the JavaScript file containing the given JavaScript element.
+        *
+        * @param element JavaScript element
+        * @return      the file name String or "" if the containing JavaScript file can not be found.
+        */
+       protected String getJsFileName(IJavaScriptElement element) {
+               IJavaScriptElement file = getJsFileElement(element);
+               if (file == null) {
+                       return "";
+               } else {
+                       return file.getElementName();
+               }               
+       }
+       
+       /**
+        * Find the JavaScript element for file containing the given JavaScript element.
+        *
+        * @param element JavaScript element
+        * @return      the file JavaScript element or <code>null</code> if the containing JavaScript file can not be found.
+        */
+       protected IJavaScriptElement getJsFileElement(IJavaScriptElement element) {
+               IJavaScriptElement file = element.getAncestor(IJavaScriptElement.JAVASCRIPT_UNIT);
+               if (file == null) {
+                       file = element.getAncestor(IJavaScriptElement.CLASS_FILE);
+               }
+
+               return file;
+       }
+
+       /**
+        * Set the view's foreground color.
+        *
+        * @param color the SWT color
+        */
+       protected void setForeground(Color color) {
+               fSrcViewer.getTextWidget().setForeground(color);
+       }
+
+       /**
+        * Set the view's background color.
+        *
+        * @param color the SWT color
+        */
+       protected void setBackground(Color color) {
+               fSrcViewer.getTextWidget().setBackground(color);
+       }
+       
+       public void setFocus() {
+               fSrcViewer.getTextWidget().setFocus();
+       }
+
+       /**
+        * Returns the view's primary control.
+        *
+        * @return the primary control
+        */
+       protected Control getControl() {
+               return fSrcViewer.getControl();
+       }
+       
+       /**
+        * Returns the context ID for the Help system
+        *
+        * @return      the string used as ID for the Help context
+        * 
+        */
+       protected String getHelpContextId() {
+               return IJavaHelpContextIds.SOURCE_VIEW;
+       }
+       
+       /**
+        * set locked flag.
+        * @param flag
+        */
+       public void setLocked(boolean flag) {
+               locked = flag;
+       }
+
+       /**
+        * Returns locked flag.
+        *
+        * @return      the locked flag
+        * 
+        */
+       protected boolean isLocked() {
+               return locked;
+       }
+
+       /**
+        * set lock action.
+        * @param ac
+        */
+       public void setLockAction(IAction ac) {
+               fToggleLockAction = ac;
+       }
+
+       /**
+        * get lock action.
+        * @return
+        */
+       public IAction getLockAction() {
+               return fToggleLockAction;
+       }
+       
+       /**
+        * set Show Line Number flag.
+        * @param flag
+        */
+       public void setLineNumberStatus(boolean flag) {
+               fShowLineNumber = flag;
+               updateLineNumberRuler();
+       }
+       
+       /**
+        * set toggle line number action.
+        * @param ac
+        */
+       public void setToggleLineNumberAction(IAction ac) {
+               fToggleLineNumberAction = ac;
+       }
+
+       /**
+        * get toggle line number action.
+        * @return
+        */
+       public IAction getToggleLineNumberAction() {
+               return fToggleLineNumberAction;
+       }
+
+       /**
+        * set open in action.
+        * @param ac
+        */
+       public void setOpenInputAction(IAction ac) {
+               fOpenInputAction = ac;
+       }
+       
+
+       /**
+        * get open in action.
+        * @return
+        */
+       public IAction getOpenInputAction() {
+               return fOpenInputAction;
+       }
+       
+       /**
+        * Returns Show Line Number flag.
+        *
+        * @return      the fShowLineNumber flag
+        * 
+        */
+       public boolean getLineNumberStatus() {
+               return fShowLineNumber;
+       }
+
+       /*
+        * @see IWorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
+        */
+       public final void createPartControl(Composite parent) {
+               internalCreatePartControl(parent);
+               inititalizeColors();
+               getSite().getWorkbenchWindow().getPartService().addPartListener(fPartListener);
+               createContextMenu();
+               createActions();
+               fillActionBars(getViewSite().getActionBars());
+               PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), getHelpContextId());
+       }
+       
+       /**
+        * Create the part control.
+        *
+        * @param parent the parent control
+        * @see IWorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
+        */
+       protected void internalCreatePartControl(Composite parent) {
+               parentControl = parent;
+               parent.setLayout(new FormLayout());
+               
+               IPreferenceStore store= JavaScriptPlugin.getDefault().getCombinedPreferenceStore();
+               fComboViewer = new ComboViewer(parent, SWT.READ_ONLY);
+               fComboViewer.setLabelProvider(new LabelProvider() {
+                       @Override
+                       public String getText(Object element) {
+                               if (element instanceof IJavaScriptElement) {
+                                       IJavaScriptElement jsElement = (IJavaScriptElement)element;
+                                       return getElementLabelString(jsElement);
+                               } else {
+                                       return super.getText(element);
+                               }
+                       }
+               });
+               fComboViewer.setContentProvider(new ArrayContentProvider());
+               fComboViewer.addSelectionChangedListener(new ISelectionChangedListener() {                      
+                       @Override
+                       public void selectionChanged(SelectionChangedEvent event) {
+                               ISelection selection = event.getSelection();
+                               if (!(selection instanceof StructuredSelection)) {
+                                       return;
+                               }
+                               
+                               Object selectedObject = ((StructuredSelection)selection).getFirstElement();
+                               if (!(selectedObject instanceof IJavaScriptElement)) {
+                                       return;
+                               }
+                               
+                               IJavaScriptElement selectedElement = (IJavaScriptElement)selectedObject;
+                               processComboViewerSelection(selectedElement);
+                       }
+               });
+               
+               fElementInfoLabel = new Label(parent, SWT.LEFT);
+               fElementInfoLabel.setText("");
+               
+               fComboBoxLabel = new Label(parent, SWT.LEFT);
+               fComboBoxLabel.setText("");
+               
+               fVerticalRuler = new CompositeRuler();
+               fSrcViewer = new JavaSourceViewer(parent, fVerticalRuler, null, false, SWT.V_SCROLL | SWT.H_SCROLL, store);
+               fViewerConfiguration= new SimpleJavaSourceViewerConfiguration(JavaScriptPlugin.getDefault().getJavaTextTools().getColorManager(), store, null, IJavaScriptPartitions.JAVA_PARTITIONING, false);
+               fSrcViewer.configure(fViewerConfiguration);
+               fSrcViewer.setEditable(false);
+               ITextPresentationListener textPresenter = new DeclarationVieweTextPresenter();
+               fSrcViewer.addTextPresentationListener(textPresenter);
+               setViewerFont();
+               JFaceResources.getFontRegistry().addListener(fFontPropertyChangeListener);
+               store.addPropertyChangeListener(fPropertyChangeListener);
+               getViewSite().setSelectionProvider(fSrcViewer);
+               
+               updateLayout(LAYOUT_NOTHING_TO_VIEW);
+               
+               updateLineNumberRuler();
+       }
+       
+       private void inititalizeColors() {
+               if (getSite().getShell().isDisposed()) {
+                       return;
+               }
+
+               Display display= getSite().getShell().getDisplay();
+               if (display == null || display.isDisposed()) {
+                       return;
+               }
+
+               setForeground(display.getSystemColor(SWT.COLOR_INFO_FOREGROUND));
+               
+               ColorRegistry registry= JFaceResources.getColorRegistry();
+               registry.addListener(this);
+               
+               fBackgroundColorRGB= registry.getRGB(getBackgroundColorKey());
+               Color bgColor;
+               if (fBackgroundColorRGB == null) {
+                       bgColor= display.getSystemColor(SWT.COLOR_INFO_BACKGROUND);
+                       fBackgroundColorRGB= bgColor.getRGB();
+               } else {
+                       bgColor= new Color(display, fBackgroundColorRGB);
+                       fBackgroundColor= bgColor;
+               }
+               setBackground(bgColor);
+       }
+       
+       /**
+        * Creates the context menu for this view.
+        */
+       protected void createContextMenu() {
+               MenuManager menuManager= new MenuManager("#PopupMenu"); //$NON-NLS-1$
+               menuManager.setRemoveAllWhenShown(true);
+               menuManager.addMenuListener(this);
+               Menu contextMenu= menuManager.createContextMenu(fSrcViewer.getTextWidget());
+               fSrcViewer.getTextWidget().setMenu(contextMenu);
+               getSite().registerContextMenu(menuManager, getSelectionProvider());
+       }
+
+       /**
+        * Creates the actions and action groups for this view.
+        */
+       protected void createActions() {
+               
+               // Setup OpenAction
+               fOpen= new OpenAction(getViewSite()) {
+                       /*
+                        * @see org.eclipse.wst.jsdt.ui.actions.SelectionDispatchAction#getSelection()
+                        */
+                       public ISelection getSelection() {
+                               return convertToJavaElementSelection(fSrcViewer.getSelection());
+                       }
+
+                       /*
+                        * @see org.eclipse.wst.jsdt.ui.actions.OpenAction#run(IStructuredSelection)
+                        */
+                       public void run(IStructuredSelection selection) {
+                               if (selection.isEmpty()) {
+                                       getShell().getDisplay().beep();
+                                       return;
+                               }
+                               super.run(selection);
+                       }
+
+                       /*
+                        * @see org.eclipse.wst.jsdt.ui.actions.OpenAction#run(Object[])
+                        */
+                       public void run(Object[] elements) {
+                               stopListeningForSelectionChanges();
+                               super.run(elements);
+                               startListeningForSelectionChanges();
+                       }
+               };
+       }
+
+       /**
+        * Converts the given selection to a structured selection
+        * containing Java elements.
+        *
+        * @param selection the selection
+        * @return a structured selection with Java elements
+        */
+       private IStructuredSelection convertToJavaElementSelection(ISelection selection) {
+               if (!(selection instanceof ITextSelection && fSelectedElement instanceof ISourceReference)) {
+                       return StructuredSelection.EMPTY;
+               }
+
+               ITextSelection textSelection= (ITextSelection)selection;
+               Object codeAssist= getJsFileElement(fSelectedElement);
+
+               if (codeAssist instanceof ICodeAssist) {
+                       IJavaScriptElement[] elements= null;
+                       try {
+                               elements= ((ICodeAssist)codeAssist).codeSelect(textSelection.getOffset(), textSelection.getLength());
+                               elements = removeElementsWithNoContainingJSFile(elements);
+                               elements = removeDuplicateElements(elements);
+                               findDefaultElementAndSet(elements);
+                       } catch (JavaScriptModelException e) {
+                               return StructuredSelection.EMPTY;
+                       }
+                       if (elements != null && elements.length > 0) {
+                               return new StructuredSelection(elements[0]);
+                       } else {
+                               return StructuredSelection.EMPTY; 
+                       }
+               }
+
+               return StructuredSelection.EMPTY;
+       }
+
+       /*
+        * @see IMenuListener#menuAboutToShow(org.eclipse.jface.action.IMenuManager)
+        */
+       public void menuAboutToShow(IMenuManager menu) {
+               menu.add(new Separator(IContextMenuConstants.GROUP_OPEN));
+               menu.add(new Separator(IContextMenuConstants.GROUP_ADDITIONS));
+               
+               if (fOpenInputAction != null) {
+                       menu.appendToGroup(IContextMenuConstants.GROUP_OPEN, fOpenInputAction);
+               }
+               
+               //menu.appendToGroup(IContextMenuConstants.GROUP_OPEN, fGotoInputAction);
+               menu.appendToGroup(IContextMenuConstants.GROUP_OPEN, fOpen);
+               
+               if (fToggleLockAction != null) {
+                       menu.appendToGroup(IContextMenuConstants.GROUP_ADDITIONS, fToggleLockAction);
+               }
+               
+               if (fToggleLineNumberAction != null) {
+                       menu.appendToGroup(IContextMenuConstants.GROUP_ADDITIONS, fToggleLineNumberAction);
+               }
+       }
+
+       /**
+        * Returns the input of this view.
+        *
+        * @return input the input object or <code>null</code> if not input is set
+        */
+       protected IJavaScriptElement getInput() {
+               return fSelectedElement;
+       }
+
+       // Helper method
+       ISelectionProvider getSelectionProvider() {
+               return getViewSite().getSelectionProvider();
+       }
+
+       /**
+        * Fills the actions bars.
+        * <p>
+        * Subclasses may extend.
+        *
+        * @param actionBars the action bars
+        */
+       protected void fillActionBars(IActionBars actionBars) {
+               
+               actionBars.setGlobalActionHandler(JdtActionConstants.OPEN, fOpen);
+               fOpen.setActionDefinitionId(IJavaEditorActionDefinitionIds.OPEN_EDITOR);
+       }
+
+
+       /**
+        * The preference key for the background color.
+        * 
+        * @return the background color key
+        * 
+        */
+       protected String getBackgroundColorKey() {
+               return "org.tizen.web.advanceddeclarationview.ui.AdvancedDeclarationView.backgroundColor";               //$NON-NLS-1$
+       }
+
+       public void propertyChange(PropertyChangeEvent event) {
+               if (getBackgroundColorKey().equals(event.getProperty())) {
+                       inititalizeColors();
+               }
+       }
+
+       /**
+        * Start to listen for selection changes.
+        */
+       protected void startListeningForSelectionChanges() {
+               getSite().getPage().addPostSelectionListener(this);
+       }
+
+       /**
+        * Stop to listen for selection changes.
+        */
+       protected void stopListeningForSelectionChanges() {
+               getSite().getPage().removePostSelectionListener(this);
+       }
+
+       /*
+        * @see ISelectionListener#selectionChanged(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
+        */
+       public void selectionChanged(IWorkbenchPart part, ISelection selection) {
+               if (part.equals(this)) {
+                       return;
+               }
+
+               computeAndSetInput(part);
+       }
+
+       /**
+        * Tries to get a JavaScript element out of the given element.
+        *
+        * @param element an object
+        * @return the JavaScript element represented by the given element or <code>null</code>
+        */
+       private IJavaScriptElement findJavaScriptElement(Object element) {
+               if (element == null) {
+                       return null;
+               }
+
+               IJavaScriptElement je= null;
+               if (element instanceof IAdaptable) {
+                       je= (IJavaScriptElement)((IAdaptable)element).getAdapter(IJavaScriptElement.class);
+               }
+
+               return je;
+       }
+
+       /*
+        * @see IWorkbenchPart#dispose()
+        */
+       final public void dispose() {
+               // cancel possible running computation
+               fComputeCount++;
+
+               getSite().getWorkbenchWindow().getPartService().removePartListener(fPartListener);
+
+               JFaceResources.getColorRegistry().removeListener(this);
+               fBackgroundColorRGB= null;
+               if (fBackgroundColor != null) {
+                       fBackgroundColor.dispose();
+                       fBackgroundColor= null;
+               }
+               
+               internalDispose();
+       }
+
+       /*
+        * @see IWorkbenchPart#dispose()
+        */
+       protected void internalDispose() {
+               fSrcViewer= null;
+               fComboViewer= null;
+               fViewerConfiguration= null;
+               JFaceResources.getFontRegistry().removeListener(fFontPropertyChangeListener);
+               JavaScriptPlugin.getDefault().getCombinedPreferenceStore().removePropertyChangeListener(fPropertyChangeListener);
+       }
+       
+       /**
+        * Finds and returns the JavaScript element selected in the given part.
+        * Returns null for non JavaScript context.
+        * Returns empty array for no-declaration found case.
+        * @param part the workbench part for which to find the selected Java element
+        * @param selection the selection
+        * @return the selected JavaScript element
+        */
+       protected IJavaScriptElement[] findSelectedJavaScriptElements(IWorkbenchPart part, ISelection selection) {
+               Object element = null;
+               try {
+                       if (part instanceof JavaEditor && selection instanceof ITextSelection) {
+                               return TextSelectionConverter.codeResolve((JavaEditor)part, (ITextSelection)selection);                         
+                       } else if (selection instanceof IStructuredSelection) {
+                               element = SelectionUtil.getSingleElement(selection);
+                               IJavaScriptElement e = findJavaScriptElement(element);
+                               if (e==null)    { 
+                                       return null;
+                               } else  {
+                                       return new IJavaScriptElement[] {e};
+                               }
+                       } else {
+                               return null;
+                       }                               
+               } catch (JavaScriptModelException e) {
+                       return null;
+               }
+       }
+
+       /**
+        * Determines all necessary details and delegates the computation into
+        * a background thread.
+        *
+        * @param part the workbench part
+        */
+       private void computeAndSetInput(final IWorkbenchPart part) {
+               if (isLocked()) {
+                       return;
+               }
+               
+               final int currentCount= ++fComputeCount;
+
+               ISelectionProvider provider= part.getSite().getSelectionProvider();
+               if (provider == null) {
+                       return;
+               }
+
+               final ISelection selection= provider.getSelection();
+               if (selection == null || selection.isEmpty()) {
+                       return;
+               }
+
+               Thread thread= new Thread("Advanced Declaration view input computer") { //$NON-NLS-1$
+                       public void run() {
+                               if (currentCount != fComputeCount) {
+                                       return;
+                               }
+                               
+                               IJavaScriptElement[] elements= findSelectedJavaScriptElements(part, selection);
+                               elements = removeElementsWithNoContainingJSFile(elements);
+                               final IJavaScriptElement[] jsElements = removeDuplicateElements(elements);
+                               findDefaultElementAndSet(jsElements);
+                               
+                               Shell shell= getSite().getShell();
+                               if (shell.isDisposed()) {       
+                                       return;
+                               }
+
+                               Display display= shell.getDisplay();
+                               if (display.isDisposed()) {
+                                       return;
+                               }
+                               
+                               setComboViewerInput(display, jsElements, currentCount);
+
+                               if (jsElements == null || jsElements.length <= 0) {
+                                       setSrcViewerInput(display, null, currentCount);
+                               } else {
+                                       setSrcViewerInput(display, jsElements[0], currentCount);
+                               }
+                       }
+               };
+
+               thread.setDaemon(true);
+               thread.setPriority(Thread.MIN_PRIORITY);
+               thread.start();
+       }
+       
+       /**
+        * Determines all necessary details and delegates the computation into
+        * a background thread.
+        *
+        * @param part the workbench part
+        */
+       private void processComboViewerSelection(final IJavaScriptElement jsElement) {
+               if (isLocked()) {
+                       return;
+               }
+               
+               final int currentCount= ++fComputeCount;
+
+               Thread thread= new Thread("Advanced Declaration view ComboViewer selection processing thread") { //$NON-NLS-1$
+                       public void run() {
+                               if (currentCount != fComputeCount) {
+                                       return;
+                               }
+                       
+                               Shell shell= getSite().getShell();
+                               if (shell.isDisposed()) {       
+                                       return;
+                               }
+
+                               Display display= shell.getDisplay();
+                               if (display.isDisposed()) {
+                                       return;
+                               }
+                               
+                               setSrcViewerInput (display, jsElement, currentCount);
+                       }
+               };
+
+               thread.setDaemon(true);
+               thread.setPriority(Thread.MIN_PRIORITY);
+               thread.start();
+       }
+       
+       private void setSrcViewerInput (Display display, final IJavaScriptElement jsElement, final int currentCount)    {
+               display.asyncExec(new Runnable() {
+                       /*
+                        * @see java.lang.Runnable#run()
+                        */
+                       public void run() {
+                               if (fComputeCount != currentCount || getViewSite().getShell().isDisposed()) {
+                                       return;                         
+                               }
+                               updateSrcViewer(jsElement);
+                       }
+               });
+       }
+       
+       private void setComboViewerInput (Display display, final IJavaScriptElement[] jsElements, final int currentCount)       {
+               display.asyncExec(new Runnable() {
+                       /*
+                        * @see java.lang.Runnable#run()
+                        */
+                       public void run() {
+                               if (fComputeCount != currentCount || getViewSite().getShell().isDisposed()) {
+                                       return;                         
+                               }
+                               
+                               if  (jsElements == null) {
+                                       fElementInfoLabel.setText("Declaration View is not available.");
+                                       updateComboViewer(new IJavaScriptElement[] {});
+                               } else if (jsElements.length > 0) {
+                                       updateComboViewer(jsElements);                                  
+                               } else {
+                                       fElementInfoLabel.setText("No declaration found.");
+                                       updateComboViewer(new IJavaScriptElement[] {});
+                               }
+                       }
+               });
+       }
+       
+       private void updateComboViewer(Object[] elements) {
+               if (elements.length > 1) {
+                       fSrcViewer.getControl().setVisible(true);
+                       fComboViewer.getCombo().removeAll();
+                       fComboViewer.add(elements);
+                       fComboViewer.getCombo().select(0);
+                       fComboBoxLabel.setText(elements.length + " cases");
+                       fComboViewer.getCombo().setVisible(true);
+                       fComboBoxLabel.setVisible(true);
+                       updateLayout(LAYOUT_MULTIPLE_ELEMENTS);
+               } else if (elements.length >= 1) {
+                       fSrcViewer.getControl().setVisible(true);
+                       fComboViewer.getCombo().setVisible(false);
+                       fComboBoxLabel.setVisible(false);
+                       updateLayout(LAYOUT_NORMAL);
+               } else {
+                       fSrcViewer.getControl().setVisible(false);
+                       fComboViewer.getCombo().setVisible(false);
+                       fComboBoxLabel.setVisible(false);
+                       updateLayout(LAYOUT_NOTHING_TO_VIEW);
+               }
+       }
+       
+       private void updateSrcViewer(IJavaScriptElement selection) {
+               fSelectedElement = selection;
+               if (selection == null) {
+                       setInput(null);
+               } else {
+                       Object src = getJsFileSource(selection);
+                       if (src == null) {
+                               setInput(null);
+                       } else {
+                               doSetInput(src);
+                       }
+               }
+       }
+
+       private void doSetInput(Object input) {
+               setInput(input);
+               IJavaScriptElement inputElement= fSelectedElement;              
+               fElementInfoLabel.setText(getElementLabelString(inputElement));
+                
+               setTitleToolTip(JavaScriptElementLabels.getElementLabel(inputElement, TOOLTIP_LABEL_FLAGS));
+       }
+       
+       private String getElementLabelString(IJavaScriptElement element) {
+               long flags;
+               if (element instanceof ILocalVariable) {
+                       flags= LOCAL_VARIABLE_TITLE_FLAGS;
+               } else {
+                       flags= TITLE_FLAGS;
+               }
+               
+               String positionInfo = "";
+               ISourceRange range = getSourceRange(element);
+               if (range != null) {
+                       try {
+                               int lineOfOffset = fSrcViewer.getDocument().getLineOfOffset(range.getOffset()) + 1;
+                               positionInfo = " [line:" + lineOfOffset + "]";
+                       } catch (BadLocationException ex) {
+                               positionInfo = "";
+                       }                       
+               }
+               return JavaScriptElementLabels.getElementLabel(element, flags)  + "/" + getJsFileName(element) + positionInfo;  
+       }
+       
+       /**
+        * Sets the font for this viewer sustaining selection and scroll position.
+        */
+       private void setViewerFont() {
+               Font font= JFaceResources.getFont(SYMBOLIC_FONT_NAME);
+
+               if (fSrcViewer.getDocument() != null) {
+                       Point selection= fSrcViewer.getSelectedRange();
+                       int topIndex= fSrcViewer.getTopIndex();
+
+                       StyledText styledText= fSrcViewer.getTextWidget();
+                       Control parent= fSrcViewer.getControl();
+                       parent.setRedraw(false);
+                       styledText.setFont(font);
+                       fSrcViewer.setSelectedRange(selection.x , selection.y);
+                       fSrcViewer.setTopIndex(topIndex);
+                       
+                       if (parent instanceof Composite) {
+                               Composite composite= (Composite) parent;
+                               composite.layout(true);
+                       }
+                       parent.setRedraw(true);
+               } else {
+                       StyledText styledText= fSrcViewer.getTextWidget();
+                       styledText.setFont(font);
+               }
+       }
+       
+       private void updateLayout(int mode) {
+               FormData formData; 
+               int margin = 3;
+               if (mode == LAYOUT_MULTIPLE_ELEMENTS) {
+                       formData = new FormData();              
+                       formData.left = new FormAttachment(0, margin);
+                       formData.right = new FormAttachment(70, -2 * margin);
+                       formData.top = new FormAttachment(0, margin);
+                       fComboViewer.getControl().setLayoutData(formData);
+                       
+                       formData = new FormData();              
+                       formData.left = new FormAttachment(fComboViewer.getControl(), 2 * margin);
+                       formData.right = new FormAttachment(100, -margin);
+                       formData.top = new FormAttachment(0, margin);
+                       fComboBoxLabel.setLayoutData(formData);
+                       
+                       formData = new FormData();
+                       formData.left = new FormAttachment(0, margin);
+                       formData.right = new FormAttachment(100, -margin);
+                       formData.bottom = new FormAttachment(100, -margin);
+                       fElementInfoLabel.setLayoutData(formData);      
+                                       
+                       formData = new FormData();
+                       formData.left = new FormAttachment(0, margin);
+                       formData.right = new FormAttachment(100, -margin);
+                       formData.top = new FormAttachment(fComboViewer.getControl(), margin);
+                       formData.bottom = new FormAttachment(fElementInfoLabel, -margin);
+                       fSrcViewer.getControl().setLayoutData(formData);
+               } else if (mode == LAYOUT_NORMAL) {
+                       formData = new FormData();
+                       formData.left = new FormAttachment(0, margin);
+                       formData.right = new FormAttachment(100, -margin);
+                       formData.bottom = new FormAttachment(100, -margin);
+                       fElementInfoLabel.setLayoutData(formData);      
+                                       
+                       formData = new FormData();
+                       formData.left = new FormAttachment(0, margin);
+                       formData.right = new FormAttachment(100, -margin);
+                       formData.top = new FormAttachment(0, margin);
+                       formData.bottom = new FormAttachment(fElementInfoLabel, -margin);
+                       fSrcViewer.getControl().setLayoutData(formData);
+               } else if (mode == LAYOUT_NOTHING_TO_VIEW) {
+                       formData = new FormData();
+                       formData.top = new FormAttachment(0, margin);
+                       formData.left = new FormAttachment(0, margin);
+                       formData.right = new FormAttachment(100, -margin);
+                       fElementInfoLabel.setLayoutData(formData);      
+               }
+               parentControl.layout();
+       }
+       
+       /**
+        * Updates the line number ruler.        
+        */
+       private void updateLineNumberRuler()
+       {
+               if (fVerticalRuler !=null) {
+                       if(!fShowLineNumber){
+                               if(fLineNumberColumn!=null){
+                                       fVerticalRuler.removeDecorator(fLineNumberColumn);
+                               }
+                       } else {
+                               if(fLineNumberColumn==null){
+                                       fLineNumberColumn = new LineNumberRulerColumn();
+                                       updateLineNumberColumnPresentation(false);
+                               }
+                               fVerticalRuler.addDecorator(0, fLineNumberColumn);
+                       }
+               }
+       }
+       
+       private void updateLineNumberColumnPresentation(boolean refresh) {
+               if (fLineNumberColumn == null) {
+                       return;
+               }
+               RGB rgb=  getColorFromStore(EditorsUI.getPreferenceStore(), AbstractDecoratedTextEditorPreferenceConstants.EDITOR_LINE_NUMBER_RULER_COLOR);
+               if (rgb == null) {
+                       rgb= new RGB(0, 0, 0);
+               }
+               ISharedTextColors sharedColors= getSharedColors();
+               fLineNumberColumn.setForeground(sharedColors.getColor(rgb));
+               if (refresh) {
+                       fLineNumberColumn.redraw();
+               }
+       }
+       
+       private ISharedTextColors getSharedColors() {
+               return EditorsUI.getSharedTextColors();
+       }
+       
+       private RGB getColorFromStore(IPreferenceStore store, String key) {
+               RGB rgb= null;
+               if (store.contains(key)) {
+                       if (store.isDefault(key)) {
+                               rgb= PreferenceConverter.getDefaultColor(store, key);
+                       } else {
+                               rgb= PreferenceConverter.getColor(store, key);
+                       }
+               }
+               return rgb;
+       }
+}
+
diff --git a/org.tizen.web.advanceddeclarationview/src/org/tizen/web/advanceddeclarationview/ui/OpenInputActionDelegate.java b/org.tizen.web.advanceddeclarationview/src/org/tizen/web/advanceddeclarationview/ui/OpenInputActionDelegate.java
new file mode 100644 (file)
index 0000000..79b5dfb
--- /dev/null
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Program Understanding / Advanced Declaration View for JavaScript
+ *
+ * Copyright (c) 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Hyukmin Kwon <hyukmin0530@samsung.com>
+ * Jaeheung Kim <jaeheung.kim@samsung.com>
+ * Sujin Kim <sujin921.kim@samsung.com>
+ * Woongsik Choi <woongsik76.choi@samsung.com>
+ *  
+ * This program and the accompanying materials are made available 
+ * under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *  
+ *******************************************************************************/
+package org.tizen.web.advanceddeclarationview.ui;
+
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.ui.IViewActionDelegate;
+import org.eclipse.ui.IViewPart;
+import org.eclipse.wst.jsdt.core.IJavaScriptElement;
+import org.eclipse.wst.jsdt.ui.actions.OpenAction;
+
+public class OpenInputActionDelegate implements IViewActionDelegate {
+       private AdvancedDeclarationView targetPart;
+
+       @Override
+       public void run(IAction action) {
+               IJavaScriptElement inputElement= targetPart.getInput();
+               if (inputElement != null) {
+                       new OpenAction(targetPart.getViewSite()).run(new Object[] { inputElement });
+               }
+       }
+
+       @Override
+       public void selectionChanged(IAction action, ISelection selection) {
+               // TODO Auto-generated method stub
+               targetPart.setOpenInputAction(action);
+       }
+
+       @Override
+       public void init(IViewPart view) {
+               targetPart = (AdvancedDeclarationView)view;
+
+       }
+
+}
diff --git a/org.tizen.web.advanceddeclarationview/src/org/tizen/web/advanceddeclarationview/ui/TextSelectionConverter.java b/org.tizen.web.advanceddeclarationview/src/org/tizen/web/advanceddeclarationview/ui/TextSelectionConverter.java
new file mode 100644 (file)
index 0000000..a8793aa
--- /dev/null
@@ -0,0 +1,131 @@
+/*******************************************************************************
+ * Program Understanding / Advanced Declaration View for JavaScript
+ *
+ * Copyright (c) 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Hyukmin Kwon <hyukmin0530@samsung.com>
+ * Jaeheung Kim <jaeheung.kim@samsung.com>
+ * Sujin Kim <sujin921.kim@samsung.com>
+ * Woongsik Choi <woongsik76.choi@samsung.com>
+ *  
+ *  The Original Code is JSDT's org.eclipse.wst.jsdt.internal.ui.infoviews package.
+ *  The Initial developer or author of the Original Code is IBM Corporation and others.
+ *  Samsung Electronics Co., Ltd. modifies it under the terms of Eclipse Public License v1.0
+ *  
+ * This program and the accompanying materials are made available 
+ * under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *  
+ *******************************************************************************/
+package org.tizen.web.advanceddeclarationview.ui;
+
+import org.eclipse.jface.text.ITextSelection;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.wst.jsdt.core.IClassFile;
+import org.eclipse.wst.jsdt.core.ICodeAssist;
+import org.eclipse.wst.jsdt.core.IJavaScriptUnit;
+import org.eclipse.wst.jsdt.core.IJavaScriptElement;
+import org.eclipse.wst.jsdt.core.JavaScriptModelException;
+import org.eclipse.wst.jsdt.internal.corext.util.JavaModelUtil;
+import org.eclipse.wst.jsdt.internal.ui.JavaScriptPlugin;
+import org.eclipse.wst.jsdt.internal.ui.javaeditor.IClassFileEditorInput;
+import org.eclipse.wst.jsdt.internal.ui.javaeditor.JavaEditor;
+import org.eclipse.wst.jsdt.ui.IWorkingCopyManager;
+
+/**
+ * Helper class to convert text selections to Java elements.
+ *
+ * 
+ */
+class TextSelectionConverter {
+
+       /** Empty result. */
+       private static final IJavaScriptElement[] EMPTY_RESULT= new IJavaScriptElement[0];
+
+       /** Prevent instance creation. */
+       private TextSelectionConverter() {
+       }
+
+       /**
+        * Finds and returns the Java elements for the given editor selection.
+        *
+        * @param editor the Java editor
+        * @param selection the text selection
+        * @return      the Java elements for the given editor selection
+        * @throws JavaScriptModelException
+        */
+       public static IJavaScriptElement[] codeResolve(JavaEditor editor, ITextSelection selection) throws JavaScriptModelException {
+               return codeResolve(getInput(editor), selection);
+       }
+
+       /**
+        * Finds and returns the Java element that contains the
+        * text selection in the given editor.
+        *
+        * @param editor the Java editor
+        * @param selection the text selection
+        * @return      the Java elements for the given editor selection
+        * @throws JavaScriptModelException
+        */
+       public static IJavaScriptElement getElementAtOffset(JavaEditor editor, ITextSelection selection) throws JavaScriptModelException {
+               return getElementAtOffset(getInput(editor), selection);
+       }
+
+       //-------------------- Helper methods --------------------
+
+       private static IJavaScriptElement getInput(JavaEditor editor) {
+               if (editor == null) {
+                       return null;
+               }
+               IEditorInput input= editor.getEditorInput();
+               if (input instanceof IClassFileEditorInput) {
+                       return ((IClassFileEditorInput)input).getClassFile();
+               }
+               IWorkingCopyManager manager= JavaScriptPlugin.getDefault().getWorkingCopyManager();
+               return manager.getWorkingCopy(input);
+       }
+
+       private static IJavaScriptElement[] codeResolve(IJavaScriptElement input, ITextSelection selection) throws JavaScriptModelException {
+                       if (input instanceof ICodeAssist) {
+                               if (input instanceof IJavaScriptUnit) {
+                                       IJavaScriptUnit cunit= (IJavaScriptUnit)input;
+                                       if (cunit.isWorkingCopy()) {
+                                               JavaModelUtil.reconcile(cunit);
+                                       }
+                               }
+                               IJavaScriptElement[] elements= ((ICodeAssist)input).codeSelect(selection.getOffset(), selection.getLength());
+                               if (elements != null && elements.length > 0) {
+                                       return elements;
+                               }
+                       }
+                       return EMPTY_RESULT;
+       }
+
+       private static IJavaScriptElement getElementAtOffset(IJavaScriptElement input, ITextSelection selection) throws JavaScriptModelException {
+               if (input instanceof IJavaScriptUnit) {
+                       IJavaScriptUnit cunit= (IJavaScriptUnit)input;
+                       if (cunit.isWorkingCopy()) {
+                               JavaModelUtil.reconcile(cunit);
+                       }
+                       IJavaScriptElement ref= cunit.getElementAt(selection.getOffset());
+                       if (ref == null) {
+                               return input;
+                       } else {
+                               return ref;
+                       }
+               } else if (input instanceof IClassFile) {
+                       IJavaScriptElement ref= ((IClassFile)input).getElementAt(selection.getOffset());
+                       if (ref == null) {
+                               return input;
+                       } else {
+                               return ref;
+                       }
+               }
+               return null;
+       }
+}
diff --git a/org.tizen.web.advanceddeclarationview/src/org/tizen/web/advanceddeclarationview/ui/ToggleLineNumberActionDelegate.java b/org.tizen.web.advanceddeclarationview/src/org/tizen/web/advanceddeclarationview/ui/ToggleLineNumberActionDelegate.java
new file mode 100644 (file)
index 0000000..44ae9bc
--- /dev/null
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Program Understanding / Advanced Declaration View for JavaScript
+ *
+ * Copyright (c) 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Hyukmin Kwon <hyukmin0530@samsung.com>
+ * Jaeheung Kim <jaeheung.kim@samsung.com>
+ * Sujin Kim <sujin921.kim@samsung.com>
+ * Woongsik Choi <woongsik76.choi@samsung.com>
+ *  
+ * This program and the accompanying materials are made available 
+ * under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *  
+ *******************************************************************************/
+
+package org.tizen.web.advanceddeclarationview.ui;
+
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.ui.IViewActionDelegate;
+import org.eclipse.ui.IViewPart;
+
+public class ToggleLineNumberActionDelegate implements IViewActionDelegate {
+       private AdvancedDeclarationView targetPart;
+       @Override
+       public void run(IAction action) {
+               targetPart.setLineNumberStatus(!targetPart.getLineNumberStatus());
+       }
+
+       @Override
+       public void selectionChanged(IAction action, ISelection selection) {
+               targetPart.setToggleLineNumberAction(action);
+       }
+
+       @Override
+       public void init(IViewPart view) {
+               targetPart = (AdvancedDeclarationView)view;
+       }
+
+}
diff --git a/org.tizen.web.advanceddeclarationview/src/org/tizen/web/advanceddeclarationview/ui/ToggleLockActionDelegate.java b/org.tizen.web.advanceddeclarationview/src/org/tizen/web/advanceddeclarationview/ui/ToggleLockActionDelegate.java
new file mode 100644 (file)
index 0000000..0aae0e1
--- /dev/null
@@ -0,0 +1,58 @@
+/*******************************************************************************\r
+ * Program Understanding / Advanced Declaration View for JavaScript\r
+ *\r
+ * Copyright (c) 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact:\r
+ * Hyukmin Kwon <hyukmin0530@samsung.com>\r
+ * Jaeheung Kim <jaeheung.kim@samsung.com>\r
+ * Sujin Kim <sujin921.kim@samsung.com>\r
+ * Woongsik Choi <woongsik76.choi@samsung.com>\r
+ *  \r
+ * This program and the accompanying materials are made available \r
+ * under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *  \r
+ *******************************************************************************/\r
+\r
+package org.tizen.web.advanceddeclarationview.ui;\r
+\r
+import org.eclipse.jface.action.IAction;\r
+import org.eclipse.jface.viewers.ISelection;\r
+import org.eclipse.ui.IViewActionDelegate;\r
+import org.eclipse.ui.IViewPart;\r
+\r
+public class ToggleLockActionDelegate implements IViewActionDelegate {\r
+       private AdvancedDeclarationView targetPart;\r
+       private static ToggleLockActionDelegate lockAction;\r
+\r
+       @Override\r
+       public void run(IAction action) {\r
+               targetPart.setLocked(!targetPart.isLocked());\r
+       }\r
+\r
+       @Override\r
+       public void selectionChanged(IAction action, ISelection selection) {\r
+               targetPart.setLockAction(action);\r
+       }\r
+\r
+       @Override\r
+       public void init(IViewPart view) {\r
+               targetPart = (AdvancedDeclarationView)view;\r
+               targetPart.setLocked(false);\r
+               \r
+               lockAction = this;\r
+       }\r
+\r
+       public static ToggleLockActionDelegate getDefault() {\r
+               return lockAction;\r
+       }\r
+       \r
+       public AdvancedDeclarationView getTarget() {\r
+               return targetPart;\r
+       }\r
+}\r
diff --git a/org.tizen.web.advanceddeclarationview/src/org/tizen/web/advanceddeclarationview/ui/ViewHandler.java b/org.tizen.web.advanceddeclarationview/src/org/tizen/web/advanceddeclarationview/ui/ViewHandler.java
new file mode 100644 (file)
index 0000000..d595860
--- /dev/null
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Program Understanding / Advanced Declaration View for JavaScript
+ *
+ * Copyright (c) 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Hyukmin Kwon <hyukmin0530@samsung.com>
+ * Jaeheung Kim <jaeheung.kim@samsung.com>
+ * Sujin Kim <sujin921.kim@samsung.com>
+ * Woongsik Choi <woongsik76.choi@samsung.com>
+ *  
+ * This program and the accompanying materials are made available 
+ * under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *  
+ *******************************************************************************/
+
+package org.tizen.web.advanceddeclarationview.ui;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.action.IAction;
+
+/**
+ * Lock Advanced Declaration View command handler.  
+ */
+public class ViewHandler extends AbstractHandler {
+
+       @Override
+       public Object execute(ExecutionEvent event) throws ExecutionException {
+               String identifier = event.getCommand().getId();
+        if (identifier.equals("org.tizen.web.advanceddeclarationview.ui.LockView")) {
+                       ToggleLockActionDelegate lockAction = ToggleLockActionDelegate.getDefault();
+                       IAction action = lockAction.getTarget().getLockAction();
+
+                       action.setChecked(!lockAction.getTarget().isLocked());
+                       lockAction.run(action);
+               }
+               return null;
+       }
+}
\ No newline at end of file
diff --git a/package/build.linux b/package/build.linux
new file mode 100644 (file)
index 0000000..214d2bc
--- /dev/null
@@ -0,0 +1,73 @@
+#!/bin/bash -xe
+
+__copy_necessary_binaries()
+{
+    echo "add necessary files."
+    ## ex)
+    ##     ide_root_path_name=IDE
+    ##     cp -rf ~~~~/file.file ${INSTALL_DIR}/${ide_root_path_name}/
+    ##     cp -rf ${SRCDIR}/packager/common/data/* ${INSTALL_DIR}/
+}
+
+__set_parameter()
+{
+    echo "TARGET_OS : ${TARGET_OS}"
+    build_script_path=${ROOTDIR}/pde-build
+}
+
+# clean
+clean()
+{
+    echo "=========================================CLEAN============================================"
+    __set_parameter
+    ${build_script_path}/clean.sh ${package_name}
+}
+
+# build
+build() 
+{
+    echo "=========================================BUILD============================================"
+    pkgname_and_platform_list=`awk 'BEGIN{RS="\n\n"; FS="\n"} /Package:/{for(i=1;i<NF;i++){if($i ~ /^OS:/){print $1,$i}}}' ${SRCDIR}/package/pkginfo.manifest | tr ' ' '@'`
+    for pkgname_and_platform in ${pkgname_and_platform_list}
+    do
+        pkgname_and_platform=`echo $pkgname_and_platform | tr '@' ' '`
+        package_name=`echo ${pkgname_and_platform} | cut -f1 -d " " | cut -f2 -d ":"`
+        platform=`echo ${pkgname_and_platform} | cut -f2 -d " " | cut -f2 -d ":"`
+    
+        if [ "x${TARGET_OS}" = "x${platform}" ]
+        then
+            __set_parameter
+            ${build_script_path}/build.sh ${package_name}
+       else
+            echo ""
+        fi
+    done
+}
+
+# install
+install() 
+{
+    pkgname_and_platform_list=`awk 'BEGIN{RS="\n\n"; FS="\n"} /Package:/{for(i=1;i<NF;i++){if($i ~ /^OS:/){print $1,$i}}}' ${SRCDIR}/package/pkginfo.manifest | tr ' ' '@'`
+    for pkgname_and_platform in ${pkgname_and_platform_list}
+    do
+        echo "=========================================INSTALL============================================"
+        pkgname_and_platform=`echo $pkgname_and_platform | tr '@' ' '`
+        package_name=`echo ${pkgname_and_platform} | cut -f1 -d " " | cut -f2 -d ":"`
+        platform=`echo ${pkgname_and_platform} | cut -f2 -d " " | cut -f2 -d ":"`
+
+        if [ "x${TARGET_OS}" = "x${platform}" ]
+        then
+            __set_parameter
+               INSTALL_DIR=${SRCDIR}/package/${package_name}.package.${TARGET_OS}/data
+            mkdir -p ${INSTALL_DIR} 
+            __copy_necessary_binaries
+            ${build_script_path}/install.sh ${package_name}
+        else
+            echo ""
+        fi
+    done    
+}
+
+[ "$1" = "clean" ] && clean
+[ "$1" = "build" ] && build
+[ "$1" = "install" ] && install
diff --git a/package/changelog b/package/changelog
new file mode 100644 (file)
index 0000000..41445d2
--- /dev/null
@@ -0,0 +1,9 @@
+* 2.0.0
+- Tizen 2.0 release
+== hyukmin0530.kwon <hyukmin0530.kwon@samsung.com> 2013-01-11
+* 1.0.1
+- Bugs related to the open action are fixed.
+== hyukmin0530.kwon <hyukmin0530.kwon@samsung.com> 2012-11-26 14:55
+* 1.0.0
+- Initial package build
+== hyukmin0530.kwon <hyukmin0530.kwon@samsung.com> 2012-11-16 18:00
diff --git a/package/pkginfo.manifest b/package/pkginfo.manifest
new file mode 100644 (file)
index 0000000..c0f72d1
--- /dev/null
@@ -0,0 +1,40 @@
+Version:2.0.0
+Maintainer:Woongsik Choi <woongsik76.choi@samsung.com>, Hyukmin Kwon <hyukmin0530.kwon@samsung.com>, Jaeheung Kim <jaeheung.kim@samsung.com>i, Sujin Kim <sujin921.kim@samsung.com>
+Source: jsdt-extension-eplugin
+
+Package:advanceddeclarationview-eplugin
+OS:ubuntu-32
+Build-dependency:common-eplugin [ubuntu-32], pde-build [ubuntu-32]
+Build-host-os:ubuntu-32
+Install-dependency:common-eplugin [ubuntu-32], base-ide-product [ubuntu-32]
+Description: Advanced Delcaration View plugin
+
+Package:advanceddeclarationview-eplugin
+OS:ubuntu-64
+Build-dependency:common-eplugin [ubuntu-64], pde-build [ubuntu-64]
+Build-host-os:ubuntu-32
+Install-dependency:common-eplugin [ubuntu-64], base-ide-product [ubuntu-64]
+Description: Advanced Delcaration View plugin
+
+Package:advanceddeclarationview-eplugin
+OS:windows-32
+Build-dependency:common-eplugin [windows-32], pde-build [windows-32]
+Build-host-os:ubuntu-32
+Install-dependency:common-eplugin [windows-32], base-ide-product [windows-32]
+Description: Advanced Delcaration View plugin
+
+Package:advanceddeclarationview-eplugin
+OS:windows-64
+Build-dependency:common-eplugin [windows-64], pde-build [windows-64]
+Build-host-os:ubuntu-32
+Install-dependency:common-eplugin [windows-64], base-ide-product [windows-64]
+Description: Advanced Delcaration View plugin
+
+Package:advanceddeclarationview-eplugin
+OS:macos-64
+Build-dependency:common-eplugin [macos-64], pde-build [macos-64]
+Build-host-os:ubuntu-32
+Install-dependency:common-eplugin [macos-64], base-ide-product [macos-64]
+Description: Advanced Delcaration View plugin
+
+