summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--LICENSE.APLv2206
-rw-r--r--NOTICE4
-rw-r--r--org.tizen.nativeapp.assignmenttracing.branding/.project22
-rw-r--r--org.tizen.nativeapp.assignmenttracing.branding/32_TIZEN_SDK_icon.pngbin0 -> 5237 bytes
-rw-r--r--org.tizen.nativeapp.assignmenttracing.branding/META-INF/MANIFEST.MF6
-rw-r--r--org.tizen.nativeapp.assignmenttracing.branding/about.ini32
-rw-r--r--org.tizen.nativeapp.assignmenttracing.branding/about.mappings6
-rw-r--r--org.tizen.nativeapp.assignmenttracing.branding/about.properties12
-rw-r--r--org.tizen.nativeapp.assignmenttracing.branding/build.properties5
-rw-r--r--org.tizen.nativeapp.assignmenttracing.feature/feature.properties4
-rw-r--r--org.tizen.nativeapp.assignmenttracing.feature/feature.xml16
-rw-r--r--org.tizen.nativeapp.assignmenttracing.feature/license.html27
-rw-r--r--org.tizen.nativeapp.assignmenttracing.tests/META-INF/MANIFEST.MF6
-rw-r--r--org.tizen.nativeapp.assignmenttracing.tests/src/org/tizen/nativeapp/assignmenttracing/tests/DUChainTest.java143
-rw-r--r--org.tizen.nativeapp.assignmenttracing/META-INF/MANIFEST.MF6
-rw-r--r--org.tizen.nativeapp.assignmenttracing/fragment.xml28
-rw-r--r--org.tizen.nativeapp.assignmenttracing/src/org/tizen/nativeapp/assignmenttracing/core/CFGBuilder.java34
-rw-r--r--org.tizen.nativeapp.assignmenttracing/src/org/tizen/nativeapp/assignmenttracing/core/CFGNode.java16
-rw-r--r--org.tizen.nativeapp.assignmenttracing/src/org/tizen/nativeapp/assignmenttracing/core/ChainBuilder.java35
-rw-r--r--org.tizen.nativeapp.assignmenttracing/src/org/tizen/nativeapp/assignmenttracing/core/exceptions/NameFoundException.java33
-rw-r--r--org.tizen.nativeapp.assignmenttracing/src/org/tizen/nativeapp/assignmenttracing/ui/AssignmentTracingUI.java65
-rwxr-xr-xpackage/build.linux312
-rw-r--r--package/changelog3
-rw-r--r--package/pkginfo.manifest50
24 files changed, 707 insertions, 364 deletions
diff --git a/LICENSE.APLv2 b/LICENSE.APLv2
new file mode 100644
index 0000000..f94008a
--- /dev/null
+++ b/LICENSE.APLv2
@@ -0,0 +1,206 @@
+Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) 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. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+
+
diff --git a/NOTICE b/NOTICE
index 4297ee3..1694af9 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1 +1,3 @@
-Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+Copyright (c) 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
+Except as noted, this software is licensed under Apache License, Version 2.
+Please, see the LICENSE.APLv2 file for Apache License terms and conditions.
diff --git a/org.tizen.nativeapp.assignmenttracing.branding/.project b/org.tizen.nativeapp.assignmenttracing.branding/.project
new file mode 100644
index 0000000..ece3ab7
--- /dev/null
+++ b/org.tizen.nativeapp.assignmenttracing.branding/.project
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.tizen.nativeapp.assignmenttracing.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.nativeapp.assignmenttracing.branding/32_TIZEN_SDK_icon.png b/org.tizen.nativeapp.assignmenttracing.branding/32_TIZEN_SDK_icon.png
new file mode 100644
index 0000000..e511542
--- /dev/null
+++ b/org.tizen.nativeapp.assignmenttracing.branding/32_TIZEN_SDK_icon.png
Binary files differ
diff --git a/org.tizen.nativeapp.assignmenttracing.branding/META-INF/MANIFEST.MF b/org.tizen.nativeapp.assignmenttracing.branding/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..16cc3c8
--- /dev/null
+++ b/org.tizen.nativeapp.assignmenttracing.branding/META-INF/MANIFEST.MF
@@ -0,0 +1,6 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Tizen Assignment Tracing for C
+Bundle-SymbolicName: org.tizen.nativeapp.assignmenttracing.branding
+Bundle-Version: 1.0.0.qualifier
+Bundle-Vendor: The Linux Foundation
diff --git a/org.tizen.nativeapp.assignmenttracing.branding/about.ini b/org.tizen.nativeapp.assignmenttracing.branding/about.ini
new file mode 100644
index 0000000..fc8fa16
--- /dev/null
+++ b/org.tizen.nativeapp.assignmenttracing.branding/about.ini
@@ -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.nativeapp.assignmenttracing.branding/about.mappings b/org.tizen.nativeapp.assignmenttracing.branding/about.mappings
new file mode 100644
index 0000000..11120f1
--- /dev/null
+++ b/org.tizen.nativeapp.assignmenttracing.branding/about.mappings
@@ -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 Assignment Tracing for C
+1=date-time
diff --git a/org.tizen.nativeapp.assignmenttracing.branding/about.properties b/org.tizen.nativeapp.assignmenttracing.branding/about.properties
new file mode 100644
index 0000000..5c2e80a
--- /dev/null
+++ b/org.tizen.nativeapp.assignmenttracing.branding/about.properties
@@ -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.nativeapp.assignmenttracing.branding/build.properties b/org.tizen.nativeapp.assignmenttracing.branding/build.properties
new file mode 100644
index 0000000..be9983f
--- /dev/null
+++ b/org.tizen.nativeapp.assignmenttracing.branding/build.properties
@@ -0,0 +1,5 @@
+bin.includes = META-INF/,\
+ 32_TIZEN_SDK_icon.png,\
+ about.ini,\
+ about.mappings,\
+ about.properties
diff --git a/org.tizen.nativeapp.assignmenttracing.feature/feature.properties b/org.tizen.nativeapp.assignmenttracing.feature/feature.properties
index f905ab0..eeebb62 100644
--- a/org.tizen.nativeapp.assignmenttracing.feature/feature.properties
+++ b/org.tizen.nativeapp.assignmenttracing.feature/feature.properties
@@ -15,7 +15,7 @@
# This file should be translated.
# "featureName" property - name of the feature
-featureName=Tizen Assignment Tracing
+featureName=Tizen Assignment Tracing for C
# "providerName" property - name of the company that provides the feature
providerName=Samsung
@@ -24,7 +24,7 @@ providerName=Samsung
updateSiteName=Tizen Assignment Tracing Updates
# "description" property - description of the feature
-description=Tizen Assignment Tracing for Native Applications.
+description=Tizen Assignment Tracing for C.
14 %copyright
15 </copyright>
# "copyright" property
diff --git a/org.tizen.nativeapp.assignmenttracing.feature/feature.xml b/org.tizen.nativeapp.assignmenttracing.feature/feature.xml
index ef02a29..d7f7f35 100644
--- a/org.tizen.nativeapp.assignmenttracing.feature/feature.xml
+++ b/org.tizen.nativeapp.assignmenttracing.feature/feature.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<feature
id="org.tizen.nativeapp.assignmenttracing.feature"
- label="Tizen Assignment Tracing"
- version="1.0.2"
- provider-name="Samsung"
- plugin="org.tizen.base.platform"
+ label="Tizen Assignment Tracing for C"
+ version="1.0.0.qualifier"
+ provider-name="The Linux Foundation"
+ plugin="org.tizen.nativeapp.assignmenttracing.branding"
license-feature="org.tizen.base.feature">
<description>
@@ -15,7 +15,7 @@
%copyright
</copyright>
- <license url="">
+ <license url="license.html">
%license
</license>
@@ -31,4 +31,10 @@
fragment="true"
unpack="false"/>
+ <plugin
+ id="org.tizen.nativeapp.assignmenttracing.branding"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"/>
+
</feature>
diff --git a/org.tizen.nativeapp.assignmenttracing.feature/license.html b/org.tizen.nativeapp.assignmenttracing.feature/license.html
new file mode 100644
index 0000000..c42e289
--- /dev/null
+++ b/org.tizen.nativeapp.assignmenttracing.feature/license.html
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Tizen SOFTWARE DEVELOPMENT KIT (&quot;SDK&quot;) LICENSE AGREEMENT</title>
+</head>
+
+<body lang="EN-US">
+ <p align="center">Tizen SDK</p><br /><br />
+
+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.<br/><br/>
+
+The licenses governing the Open Source Software are available at:<br />
+<a href="https://developer.tizen.org/tizen-sdk-opensource-license">https://developer.tizen.org/tizen-sdk-opensource-license</a><br /><br />
+
+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
+terms and conditions of the Samsung Tizen SDK License Agreement, available at:<br />
+<a href="https://developer.tizen.org/tizen-sdk-license">https://developer.tizen.org/tizen-sdk-license</a><br /><br />
+
+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
+component.
+
+You may access and download Tizen SDK Open Source Software at:<br />
+<a href="http://developer.tizen.org/download/tizenopensdk.tar.gz">http://developer.tizen.org/download/tizenopensdk.tar.gz</a><br /><br />
+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.
diff --git a/org.tizen.nativeapp.assignmenttracing.tests/META-INF/MANIFEST.MF b/org.tizen.nativeapp.assignmenttracing.tests/META-INF/MANIFEST.MF
index 91a8d9a..080e261 100644
--- a/org.tizen.nativeapp.assignmenttracing.tests/META-INF/MANIFEST.MF
+++ b/org.tizen.nativeapp.assignmenttracing.tests/META-INF/MANIFEST.MF
@@ -1,9 +1,9 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
-Bundle-Name: Tests for Assignment Tracing
+Bundle-Name: Tests for C Assignment Tracing
Bundle-SymbolicName: org.tizen.nativeapp.assignmenttracing.tests
-Bundle-Version: 1.0.2.v20120224
-Bundle-Vendor: Samsung
+Bundle-Version: 1.0.0.qualifier
+Bundle-Vendor: The Linux Foundation
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Import-Package: org.eclipse.cdt.core,
org.eclipse.cdt.core.dom.ast,
diff --git a/org.tizen.nativeapp.assignmenttracing.tests/src/org/tizen/nativeapp/assignmenttracing/tests/DUChainTest.java b/org.tizen.nativeapp.assignmenttracing.tests/src/org/tizen/nativeapp/assignmenttracing/tests/DUChainTest.java
index e3afe97..d579260 100644
--- a/org.tizen.nativeapp.assignmenttracing.tests/src/org/tizen/nativeapp/assignmenttracing/tests/DUChainTest.java
+++ b/org.tizen.nativeapp.assignmenttracing.tests/src/org/tizen/nativeapp/assignmenttracing/tests/DUChainTest.java
@@ -1231,9 +1231,9 @@ public class DUChainTest {
" int x = 10; "+
" int y; "+
" L04: "+
- " y = x + 10; "+
+ " $y = x + 10; "+
" goto L04; "+
- " y = $x; "+
+ " y = x; "+
"} ";
buildAndCheck(extractSourceAndMarkers(testGotoLabel04));
}
@@ -1406,7 +1406,7 @@ public class DUChainTest {
" { "+
" y = x + 2; "+
" return ( x + 2 ); "+
- " @dx = x + 2; "+
+ " x = x + 2; "+
" } "+
" x = $x + 10; "+
"} ";
@@ -2549,15 +2549,15 @@ public class DUChainTest {
public void testDoWhile_M07()
{
String testDoWhile07 =
- "void testDoWhile07() "+
- "{ "+
- " int @dx = 5; "+
- " do{ "+
- " continue; "+
- " @dx = x + 1; "+
- " } while( $x > 10 ); "+
- " x = x + 5; "+
- "} ";
+ "void testDoWhile07() "+
+ "{ "+
+ " int @dx = 5; "+
+ " do{ "+
+ " continue; "+
+ " x = x + 1; "+
+ " } while( $x > 10 ); "+
+ " x = x + 5; "+
+ "} ";
buildAndCheck(extractSourceAndMarkers(testDoWhile07));
}
@@ -3219,16 +3219,16 @@ public class DUChainTest {
String testSwitch09 =
"void testSwitch09() "+
"{ "+
- " int x = 10; "+
+ " int @dx = 10; "+
" int y; "+
" switch(x) "+
" { "+
- " $x = 1; "+
- " y = @ux + 1; "+
- " case 10: @ux; break; "+
+ " x = 1; "+
+ " y = x + 1; "+
+ " case 10: $x; break; "+
" case 20: x; "+
" } "+
- " @ux; "+
+ " x; "+
"} ";
buildAndCheck(extractSourceAndMarkers(testSwitch09));
}
@@ -3561,9 +3561,9 @@ public class DUChainTest {
String testReturn03 =
"int testReturn03() "+
"{ "+
- " int x = 5; "+
- " return (x=x+1); "+
- " $x; "+
+ " int @dx = 5; "+
+ " return (x=$x+1);"+
+ " x; "+
"} ";
buildAndCheck(extractSourceAndMarkers(testReturn03));
}
@@ -3903,6 +3903,90 @@ public class DUChainTest {
"} ";
buildAndCheck(extractSourceAndMarkers(code));
}
+
+ @Test
+ public void testReachability01()
+ {
+ String testReachability01 =
+ "void testReachability01() "+
+ "{ "+
+ " int @dx = 5; "+
+ " do{ "+
+ " continue; "+
+ " x++; "+
+ " } while( $x > 10 ); "+
+ " x++; "+
+ "} ";
+ buildAndCheck(extractSourceAndMarkers(testReachability01));
+ }
+
+ @Test
+ public void testReachability02()
+ {
+ String testReachability02 =
+ "void testReachability02() "+
+ "{ "+
+ " int @dx = 0; "+
+ " int y; "+
+ " if( x > 10 ) "+
+ " { "+
+ " y = x + 2; "+
+ " return ( x++ ); "+
+ " x++; "+
+ " } "+
+ " x = $x + 1; "+
+ "} ";
+ buildAndCheck(extractSourceAndMarkers(testReachability02));
+ }
+
+ @Test
+ public void testReachability03()
+ {
+ String testReachability03 =
+ "void testReachability03() "+
+ "{ "+
+ " int x = 10; "+
+ " int y; "+
+ " switch(x) "+
+ " { "+
+ " $x = 1; "+
+ " y = @ux + 1; "+
+ " case 10: @ux; break; "+
+ " case 20: x; "+
+ " } "+
+ " @ux; "+
+ "} ";
+ assertTrue(isUnSupportedExceptionOccurred(extractSourceAndMarkers(testReachability03)));
+ }
+
+ @Test
+ public void testReachability04()
+ {
+ String testReachability04 =
+ "int testReachability04() "+
+ "{ "+
+ " int x = 5; "+
+ " return (x=x+1); "+
+ " $x; "+
+ "} ";
+ assertTrue(isUnSupportedExceptionOccurred(extractSourceAndMarkers(testReachability04)));
+ }
+
+ @Test
+ public void testReachability05()
+ {
+ String testReachability05 =
+ "void testReachability05 () "+
+ "{ "+
+ " int x = 10; "+
+ " int y; "+
+ " L04: "+
+ " y = x + 10; "+
+ " goto L04; "+
+ " y = $x; "+
+ "} ";
+ assertTrue(isUnSupportedExceptionOccurred(extractSourceAndMarkers(testReachability05)));
+ }
private String extractSourceAndMarkers(String str) {
StringBuffer resultStr = new StringBuffer();
@@ -3954,6 +4038,24 @@ public class DUChainTest {
assertEquals(duChainMarks.size(), 0);
}
}
+
+ private boolean isUnSupportedExceptionOccurred(String code) {
+ try{
+ parse(code);
+ buildMarksArray();
+ if (checkInteresting()) {
+ buildCFG();
+ buildDUChain();
+ } else {
+ // if the selected name is unanalyzable, there should be no du/ud chain.
+ assertEquals(udChainMarks.size(), 0);
+ assertEquals(duChainMarks.size(), 0);
+ }
+ }catch(TracingUnsupportedException e){
+ return true;
+ }
+ return false;
+ }
private IASTTranslationUnit parse(String code) {
FileContent codeReader = FileContent.create("code.c", code.toCharArray());
@@ -4008,6 +4110,7 @@ public class DUChainTest {
IASTName selName = pickNameFromOffset(selOffset);
cfgBuilder = new CFGBuilder(new NullProgressMonitor());
selNodes = cfgBuilder.buildCFG(getEnclosingFunc(selName), selName);
+ cfgBuilder.checkReachability();
}
private void checkDUChain() {
diff --git a/org.tizen.nativeapp.assignmenttracing/META-INF/MANIFEST.MF b/org.tizen.nativeapp.assignmenttracing/META-INF/MANIFEST.MF
index 84adaae..c05267b 100644
--- a/org.tizen.nativeapp.assignmenttracing/META-INF/MANIFEST.MF
+++ b/org.tizen.nativeapp.assignmenttracing/META-INF/MANIFEST.MF
@@ -1,11 +1,11 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Fragment-Host: org.eclipse.cdt.ui;bundle-version="5.2.2"
-Bundle-Name: Tizen Assignment Tracing
+Bundle-Name: Tizen Assignment Tracing for C
Bundle-SymbolicName: org.tizen.nativeapp.assignmenttracing;singleton:=true
-Bundle-Version: 1.0.2.v20120224
+Bundle-Version: 1.0.0.qualifier
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Import-Package: org.eclipse.cdt.core,
org.eclipse.cdt.ui,
org.eclipse.ui
-Bundle-Vendor: Samsung
+Bundle-Vendor: The Linux Foundation
diff --git a/org.tizen.nativeapp.assignmenttracing/fragment.xml b/org.tizen.nativeapp.assignmenttracing/fragment.xml
index b41938f..9784bf8 100644
--- a/org.tizen.nativeapp.assignmenttracing/fragment.xml
+++ b/org.tizen.nativeapp.assignmenttracing/fragment.xml
@@ -23,7 +23,7 @@
highlightPreferenceKey="du.def.highlight"
highlightPreferenceValue="false"
includeOnPreferencePage="true"
- label="Assignment Tracing - Assignment"
+ label="C Assignment Tracing - Write Occurrences"
overviewRulerPreferenceKey="du.def.rulers.overview"
overviewRulerPreferenceValue="true"
presentationLayer="6"
@@ -42,7 +42,7 @@
highlightPreferenceKey="du.use.highlight"
highlightPreferenceValue="false"
includeOnPreferencePage="true"
- label="Assignment Tracing - Use"
+ label="C Assignment Tracing - Read Occurrences"
overviewRulerPreferenceKey="du.use.rulers.overview"
overviewRulerPreferenceValue="true"
presentationLayer="5"
@@ -61,7 +61,7 @@
highlightPreferenceKey="du.sel.highlight"
highlightPreferenceValue="true"
includeOnPreferencePage="true"
- label="Assignment Tracing - Selection"
+ label="C Assignment Tracing - Selection"
overviewRulerPreferenceKey="du.sel.rulers.overview"
overviewRulerPreferenceValue="true"
presentationLayer="7"
@@ -78,15 +78,15 @@
point="org.eclipse.ui.editorActions">
<editorContribution
id="org.tizen.nativeapp.assignmenttracing.duchain-action"
- targetID="org.tizen.nativeapp.contentassist.SLPCEditor">
+ targetID="org.tizen.nativeappcommon.contentassist.SLPCEditor">
<action
class="org.tizen.nativeapp.assignmenttracing.ui.TracingActionDelegate"
icon="icons/duchain.gif"
id="org.tizen.nativeapp.assignmenttracing.mark-duchain"
- label="Assignment Tracing"
+ label="Assignment Tracing for C"
state="true"
style="toggle"
- tooltip="Toggle Assignment Tracing">
+ tooltip="Toggle Assignment Tracing for C">
</action>
</editorContribution>
</extension>
@@ -100,10 +100,10 @@
class="org.tizen.nativeapp.assignmenttracing.ui.TracingActionDelegate"
icon="icons/duchain.gif"
id="org.tizen.nativeapp.assignmenttracing.mark-duchain"
- label="Assignment Tracing"
+ label="Assignment Tracing for C"
state="true"
style="toggle"
- tooltip="Toggle Assignment Tracing">
+ tooltip="Toggle Assignment Tracing for C">
</action>
</editorContribution>
</extension>
@@ -112,16 +112,16 @@
<extension point="org.eclipse.ui.commands">
<category
id="org.tizen.nativeapp.assignmenttracing.commands"
- name="Assignment Tracing"
- description="Assignment Tracing Commands"/>
- <command name="Assignment Tracing - Previous"
- description="Move cursor to the previous Assignment Tracing Result"
+ name="Assignment Tracing for C"
+ description="C Assignment Tracing Commands"/>
+ <command name="Go to Previous Tracing Result"
+ description="Move caret to the previous Assignment Tracing result"
categoryId="org.tizen.nativeapp.assignmenttracing.commands"
defaultHandler="org.tizen.nativeapp.assignmenttracing.ui.TracingCommandHandler"
id="org.tizen.nativeapp.assignmenttracing.moveprevious">
</command>
- <command name="Assignment Tracing - Next"
- description="Move cursor to the next Assignment Tracing Result"
+ <command name="Go to Next Tracing Result"
+ description="Move caret to the next Assignment Tracing result"
categoryId="org.tizen.nativeapp.assignmenttracing.commands"
defaultHandler="org.tizen.nativeapp.assignmenttracing.ui.TracingCommandHandler"
id="org.tizen.nativeapp.assignmenttracing.movenext">
diff --git a/org.tizen.nativeapp.assignmenttracing/src/org/tizen/nativeapp/assignmenttracing/core/CFGBuilder.java b/org.tizen.nativeapp.assignmenttracing/src/org/tizen/nativeapp/assignmenttracing/core/CFGBuilder.java
index f91169e..05d0dce 100644
--- a/org.tizen.nativeapp.assignmenttracing/src/org/tizen/nativeapp/assignmenttracing/core/CFGBuilder.java
+++ b/org.tizen.nativeapp.assignmenttracing/src/org/tizen/nativeapp/assignmenttracing/core/CFGBuilder.java
@@ -29,6 +29,7 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
+import java.util.Stack;
import org.eclipse.cdt.core.dom.ast.IASTArrayDeclarator;
import org.eclipse.cdt.core.dom.ast.IASTArrayModifier;
@@ -105,6 +106,7 @@ public class CFGBuilder {
private List<CFGNode> nameMatchedNode;
private HashMap<String, CFGNode> labels;
private HashMap<CFGNode, CFGNode> defaultTable;
+ private CFGNode start = null;
// backup ASTName for other method
private IASTName selectedName;
@@ -146,7 +148,6 @@ public class CFGBuilder {
* @exception TracingUnsupportedException if unsupported features are found
*/
public List<CFGNode> buildCFG(IASTFunctionDefinition func, IASTName selName) {
- CFGNode start = null;
selectedName = selName;
// identify nested function.
@@ -187,6 +188,25 @@ public class CFGBuilder {
return nameMatchedNode;
}
+
+ /**
+ * Calculate and mark CFGNode if it is reachable from start node
+ */
+ public void checkReachability() {
+ Stack<CFGNode> nodeStack = new Stack<CFGNode>();
+
+ nodeStack.push(start);
+
+ while (!nodeStack.empty()) {
+ CFGNode currentNode = nodeStack.pop();
+ currentNode.setReachable();
+ for (CFGNode succ : currentNode.getSucc()) {
+ if (!succ.isReachable()) {
+ nodeStack.push(succ);
+ }
+ }
+ }
+ }
private CFGNode createStatement(CFGNode prev, IASTStatement stmt) {
// check job cancellation before processing each statement
@@ -676,13 +696,11 @@ public class CFGBuilder {
}
}
- else {
- /* Following expressions are properly ignored for building CFG.
- * - IASTLiteralExpression
- * - IASTProblemExpression
- * - IASTTypeIdExpression
- */
- }
+ /* Following expressions are properly ignored for building CFG.
+ * - IASTLiteralExpression
+ * - IASTProblemExpression
+ * - IASTTypeIdExpression
+ */
return prev;
}
diff --git a/org.tizen.nativeapp.assignmenttracing/src/org/tizen/nativeapp/assignmenttracing/core/CFGNode.java b/org.tizen.nativeapp.assignmenttracing/src/org/tizen/nativeapp/assignmenttracing/core/CFGNode.java
index 2e4a559..30cfd56 100644
--- a/org.tizen.nativeapp.assignmenttracing/src/org/tizen/nativeapp/assignmenttracing/core/CFGNode.java
+++ b/org.tizen.nativeapp.assignmenttracing/src/org/tizen/nativeapp/assignmenttracing/core/CFGNode.java
@@ -37,6 +37,7 @@ import java.util.List;
public class CFGNode {
private List<CFGNode> pred;
private List<CFGNode> succ;
+ private boolean reachable = false;
private int id;
@@ -86,4 +87,19 @@ public class CFGNode {
void addPred(CFGNode node) {
pred.add(node);
}
+
+ /**
+ * Set reachable flag
+ */
+ public void setReachable() {
+ reachable = true;
+ }
+
+ /**
+ * Returns if this node is reachable or not
+ * @return boolean
+ */
+ public boolean isReachable() {
+ return reachable;
+ }
} \ No newline at end of file
diff --git a/org.tizen.nativeapp.assignmenttracing/src/org/tizen/nativeapp/assignmenttracing/core/ChainBuilder.java b/org.tizen.nativeapp.assignmenttracing/src/org/tizen/nativeapp/assignmenttracing/core/ChainBuilder.java
index c4f1443..979177b 100644
--- a/org.tizen.nativeapp.assignmenttracing/src/org/tizen/nativeapp/assignmenttracing/core/ChainBuilder.java
+++ b/org.tizen.nativeapp.assignmenttracing/src/org/tizen/nativeapp/assignmenttracing/core/ChainBuilder.java
@@ -29,6 +29,7 @@ import java.util.List;
import java.util.Stack;
import org.eclipse.cdt.core.dom.ast.IASTName;
+import org.tizen.nativeapp.assignmenttracing.core.exceptions.TracingUnsupportedException;
import org.tizen.nativeapp.assignmenttracing.ui.AssignmentTracingUI;
@@ -49,19 +50,27 @@ public class ChainBuilder {
duChain = new ArrayList<IASTName>();
udChain = new ArrayList<IASTName>();
- if (AssignmentTracingUI.DEBUG) initStat();
+ if (AssignmentTracingUI.DEBUG) {
+ initStat();
+ }
for (CFGNode selNode: selNodes) {
- if (selNode instanceof DefNode) {
- initializeFlagArray();
- calcDUChain(selNode);
- } else if (selNode instanceof UseNode) {
- initializeFlagArray();
- calcUDChain(selNode);
+ if (selNode.isReachable()) {
+ if (selNode instanceof DefNode) {
+ initializeFlagArray();
+ calcDUChain(selNode);
+ } else if (selNode instanceof UseNode) {
+ initializeFlagArray();
+ calcUDChain(selNode);
+ }
+ } else {
+ throw new TracingUnsupportedException();
}
}
- if (AssignmentTracingUI.DEBUG) printStat();
+ if (AssignmentTracingUI.DEBUG) {
+ printStat();
+ }
explored = null;
}
@@ -93,7 +102,9 @@ public class ChainBuilder {
while (!nodeStack.empty()) {
CFGNode currentNode = nodeStack.pop();
- if (AssignmentTracingUI.DEBUG) checkStat(currentNode);
+ if (AssignmentTracingUI.DEBUG) {
+ checkStat(currentNode);
+ }
explored[currentNode.getID()] = true;
for (CFGNode succ : currentNode.getSucc()) {
@@ -117,11 +128,13 @@ public class ChainBuilder {
while (!nodeStack.empty()) {
CFGNode currentNode = nodeStack.pop();
- if (AssignmentTracingUI.DEBUG) checkStat(currentNode);
+ if (AssignmentTracingUI.DEBUG) {
+ checkStat(currentNode);
+ }
explored[currentNode.getID()] = true;
for (CFGNode pred : currentNode.getPred()) {
- if (!explored [pred.getID()]) {
+ if (!explored [pred.getID()] && pred.isReachable()) {
if (pred instanceof DefNode) {
explored[pred.getID()] = true;
DefNode defNode = (DefNode) pred;
diff --git a/org.tizen.nativeapp.assignmenttracing/src/org/tizen/nativeapp/assignmenttracing/core/exceptions/NameFoundException.java b/org.tizen.nativeapp.assignmenttracing/src/org/tizen/nativeapp/assignmenttracing/core/exceptions/NameFoundException.java
new file mode 100644
index 0000000..2836bd2
--- /dev/null
+++ b/org.tizen.nativeapp.assignmenttracing/src/org/tizen/nativeapp/assignmenttracing/core/exceptions/NameFoundException.java
@@ -0,0 +1,33 @@
+/*
+ * Program Understanding / Assignment Tracing
+ *
+ * Copyright (c) 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Jaeheung Kim <jaeheung.kim@samsung.com>
+ * Woongsik Choi <woongsik76.choi@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ */
+package org.tizen.nativeapp.assignmenttracing.core.exceptions;
+
+/**
+ * This exception is thrown when found the type declaration for name in K&R parameter
+ *@author Jaeheung Kim <jaeheung.kim@samsung.com>
+ */
+public class NameFoundException extends Exception {
+ static final long serialVersionUID = 3944807270362832384L;
+}
diff --git a/org.tizen.nativeapp.assignmenttracing/src/org/tizen/nativeapp/assignmenttracing/ui/AssignmentTracingUI.java b/org.tizen.nativeapp.assignmenttracing/src/org/tizen/nativeapp/assignmenttracing/ui/AssignmentTracingUI.java
index b0be7b0..8f08bd0 100644
--- a/org.tizen.nativeapp.assignmenttracing/src/org/tizen/nativeapp/assignmenttracing/ui/AssignmentTracingUI.java
+++ b/org.tizen.nativeapp.assignmenttracing/src/org/tizen/nativeapp/assignmenttracing/ui/AssignmentTracingUI.java
@@ -96,6 +96,7 @@ import org.tizen.nativeapp.assignmenttracing.core.CFGNode;
import org.tizen.nativeapp.assignmenttracing.core.ChainBuilder;
import org.tizen.nativeapp.assignmenttracing.core.exceptions.TracingCancelException;
import org.tizen.nativeapp.assignmenttracing.core.exceptions.TracingUnsupportedException;
+import org.tizen.nativeapp.assignmenttracing.core.exceptions.NameFoundException;
/**
@@ -115,22 +116,25 @@ public class AssignmentTracingUI {
/**
* Official name of this feature
*/
- private static final String ASSIGNMENT_TRACING_NAME = "Assignment Tracing";
+ private static final String ASSIGNMENT_TRACING_NAME = "Assignment Tracing for C";
/**
* def annotation type
*/
public static final String DEF_ANNOT_TYPE = "org.tizen.nativeapp.assignmenttracing.def";
+ private static final String DEF_ANNOT_MESSAGE = "Assignment Tracing (write)";
/**
* use annotation type
*/
public static final String USE_ANNOT_TYPE = "org.tizen.nativeapp.assignmenttracing.use";
+ private static final String USE_ANNOT_MESSAGE = "Assignment Tracing (read)";
/**
* selection annotation type
*/
public static final String SEL_ANNOT_TYPE = "org.tizen.nativeapp.assignmenttracing.sel";
+ private static final String SEL_ANNOT_MESSAGE = "Assignment Tracing (selection)";
/**
* Set true for debug mode
@@ -175,7 +179,9 @@ public class AssignmentTracingUI {
}
msg("selected");
- if (currentEditor == null) return;
+ if (currentEditor == null) {
+ return;
+ }
// currentEditor is always C editor and set before selection event is fired.
// Thus if currentEditor doesn't equal to part, it's not a C editor.
if (!currentEditor.equals(part)) {
@@ -203,8 +209,9 @@ public class AssignmentTracingUI {
* @return the singleton instance
*/
public static AssignmentTracingUI getInstance() {
- if (singleton == null)
+ if (singleton == null) {
singleton = new AssignmentTracingUI();
+ }
return singleton;
}
@@ -393,11 +400,14 @@ public class AssignmentTracingUI {
}
// build CFG
- if (DEBUG) startCFGBuild = System.nanoTime();
+ if (DEBUG) {
+ startCFGBuild = System.nanoTime();
+ }
CFGBuilder cfgBuilder = new CFGBuilder(cancelMonitor);
List<CFGNode> cfgNodes;
try {
cfgNodes = cfgBuilder.buildCFG(func, name);
+ cfgBuilder.checkReachability();
} catch (TracingCancelException re) {
return Status.CANCEL_STATUS;
} catch (TracingUnsupportedException re) {
@@ -406,27 +416,46 @@ public class AssignmentTracingUI {
removeAllAnnotations();
return Status.CANCEL_STATUS;
}
- if (DEBUG) endCFGBuild = System.nanoTime();
- if (DEBUG) nodeCount = cfgBuilder.getNodeCount();
+ if (DEBUG) {
+ endCFGBuild = System.nanoTime();
+ }
+ if (DEBUG) {
+ nodeCount = cfgBuilder.getNodeCount();
+ }
if (cancelMonitor.isCanceled()) {
return Status.CANCEL_STATUS;
}
// build DU-chain
- if (DEBUG) startChainBuild = System.nanoTime();
+ if (DEBUG) {
+ startChainBuild = System.nanoTime();
+ }
ChainBuilder chainBuilder = new ChainBuilder();
- chainBuilder.buildChain(cfgNodes, cfgBuilder.getNodeCount());
- if (DEBUG) endChainBuild = System.nanoTime();
+ try {
+ chainBuilder.buildChain(cfgNodes, cfgBuilder.getNodeCount());
+ } catch (TracingUnsupportedException re) {
+ // when unsupported features are found,
+ // remove all annotations and cancel the process.
+ removeAllAnnotations();
+ return Status.CANCEL_STATUS;
+ }
+ if (DEBUG) {
+ endChainBuild = System.nanoTime();
+ }
if (cancelMonitor.isCanceled()) {
return Status.CANCEL_STATUS;
}
// visualize
- if (DEBUG) startVisualize = System.nanoTime();
+ if (DEBUG) {
+ startVisualize = System.nanoTime();
+ }
IStatus status = visualizeDUChain(chainBuilder, name, cancelMonitor);
- if (DEBUG) endVisualize = System.nanoTime();
+ if (DEBUG) {
+ endVisualize = System.nanoTime();
+ }
astNamePositionList = new ArrayList<Position>();
@@ -638,11 +667,11 @@ public class AssignmentTracingUI {
((IASTSimpleDeclaration) decl).getDeclarators();
for (IASTDeclarator declarator : declarators) {
if (declarator.getName().toString().equals(name.toString())) {
- throw new Exception(); // found
+ throw new NameFoundException(); // found
}
}
}
- } catch (Exception e) {
+ } catch (NameFoundException e) {
// Found the type declaration for name
return true;
}
@@ -708,18 +737,18 @@ public class AssignmentTracingUI {
for (IASTName use : uses) {
IASTFileLocation loc = use.getFileLocation();
Position position = new Position(loc.getNodeOffset(), loc.getNodeLength());
- Annotation an = new Annotation(USE_ANNOT_TYPE, false, new String("Used"));
+ Annotation an = new Annotation(USE_ANNOT_TYPE, false, new String(USE_ANNOT_MESSAGE));
annotationMap.put(an, position);
}
for (IASTName def : defs) {
IASTFileLocation loc = def.getFileLocation();
Position position = new Position(loc.getNodeOffset(), loc.getNodeLength());
- Annotation an = new Annotation(DEF_ANNOT_TYPE, false, new String("Assigned"));
+ Annotation an = new Annotation(DEF_ANNOT_TYPE, false, new String(DEF_ANNOT_MESSAGE));
annotationMap.put(an, position);
}
IASTFileLocation loc = selectedName.getFileLocation();
Position position = new Position(loc.getNodeOffset(), loc.getNodeLength());
- Annotation an = new Annotation(SEL_ANNOT_TYPE, false, new String("Selected"));
+ Annotation an = new Annotation(SEL_ANNOT_TYPE, false, new String(SEL_ANNOT_MESSAGE));
annotationMap.put(an, position);
synchronized (getLockObject(annotationModel)) {
@@ -807,7 +836,9 @@ public class AssignmentTracingUI {
synchronized (getLockObject(annotationModel)) {
// return if annotations is changed to null by UI thread
- if (annotations == null) return;
+ if (annotations == null) {
+ return;
+ }
if (annotationModel instanceof IAnnotationModelExtension) {
((IAnnotationModelExtension) annotationModel).replaceAnnotations(annotations, null);
} else {
diff --git a/package/build.linux b/package/build.linux
index d257166..214d2bc 100755
--- a/package/build.linux
+++ b/package/build.linux
@@ -1,291 +1,73 @@
-#!/bin/bash -x
-
-build_path=${SRCDIR}/build_result
-
-__set_parameter()
-{
- build_id=${package_name}
- build_type=N
- build_result_directory=${build_type}.${build_id}
- build_result_path="$build_path/$build_result_directory"
- architecture=x86
- ide_root_path_name=IDE
-
- case ${platform} in
- linux)
- archive_platform_name=linux
- windowing=gtk
- ;;
- windows)
- archive_platform_name=win32
- windowing=win32
- ;;
- *)
- echo "${platform} is not support yet."
- ;;
- esac
-
- result_archive_file=${build_id}-${archive_platform_name}.${windowing}.${architecture}.zip
-}
-
-__set_build_parameter()
-{
- case ${platform} in
- linux)
- reference_ide_path=${ROOTDIR}/indigo-pde/eclipse
- ;;
- windows)
- reference_ide_path=${ROOTDIR}/indigo-winpde/eclipse
- ;;
- *)
- echo "${platform} is not support yet."
- ;;
- esac
-}
-
-__set_install_parameter()
-{
- INSTALL_DIR=${SRCDIR}/package/${package_name}.package.${platform}/data
-}
-
-__clean_build_environment()
-{
- if [ -d $build_path ]
- then
- echo "Build result directory : [$build_path]"
- else
- echo "Make build result directory [$build_path]"
- mkdir -p $build_path
- fi
-
- echo "Remove legacy build files..."
- if [ -d ${build_result_path}/${archive_platform_name}.${windowing}.${architecture} ]
- then
- rm -rf ${build_result_path}/${archive_platform_name}.${windowing}.${architecture}
- fi
- if [ -e ${build_result_path}/${result_archive_file} ]
- then
- rm -rf ${build_result_path}/${result_archive_file}
- fi
- if [ -d ${build_path}/tmp ]
- then
- rm -rf ${build_path}/tmp
- fi
-
- if [ -d ${build_path}/buildRepo ]
- then
- rm -rf ${build_path}/buildRepo
- fi
-
- rm -r ${build_path}/*.xml
- rm -r ${build_path}/*.properties
- rm -r ${build_path}/*.clean
-
-
- if [ -d $build_path/plugins ]
- then
- echo "plugins directory recreate..."
- rm -rf $build_path/plugins
- mkdir $build_path/plugins
- else
- echo "Make plugins directory..."
- mkdir $build_path/plugins
- fi
- if [ -d $build_path/features/ ]
- then
- echo "features directory recreate..."
- rm -rf $build_path/features
- mkdir $build_path/features
- else
- echo "Make features directory..."
- mkdir $build_path/features
- fi
-
-}
-
-__copy_build_sources()
-{
- echo "Copy features from $SRCDIR to $build_path/features"
- cp -r $SRCDIR/*.feature $build_path/features
-
- echo "Copy plugins from $SRCDIR to $build_path/plugins"
- cp -r $SRCDIR/* $build_path/plugins
- rm -rf $build_path/plugins/*.feature
-}
-
-__copy_dependency_plugins()
-{
- dependency_plugin_path=${ROOTDIR}/${ide_root_path_name}
- if [ -d ${dependency_plugin_path} ]
- then
- cp -rf ${dependency_plugin_path}/features/* ${build_path}/features/
- cp -rf ${dependency_plugin_path}/plugins/* ${build_path}/plugins/
- fi
-}
-
-__make_ant_build_properties_file()
-{
- builder_path="${SRCDIR}/builder"
- parent_path_of_based_eclipse=${reference_ide_path}/..
-
- echo "Make build.properties file..."
- if [ ! -e $builder_path/build.properties.clean ] ; then
- echo "ERROR : \"build.properties.clean\" file does not exist..."
- exit 1
- fi
- cp $builder_path/build.properties.clean $build_path
- cp $builder_path/customTargets.xml $build_path
-
- if [ -d $reference_ide_path ]
- then
- sed -e "s;\(^buildDirectory=\).*;\1${build_path};g" \
- -e "s;\(^base=\).*;\1${parent_path_of_based_eclipse};g" \
- -e "s;\(^baseLocation=\).*;\1${reference_ide_path};g" \
- -e "s;\(^configs=\).*;\1${archive_platform_name},${windowing},${architecture};g" \
- -e "s;\(^buildType=\).*;\1${build_type};g" \
- -e "s;\(^buildId=\).*;\1${build_id};g" \
- -e "s;\(^archivePrefix=\).*;\1${build_id};g" \
- < $build_path/build.properties.clean > $build_path/build.properties
-
- else
- echo "ERROR : target eclipse is not exist."
- exit 1
- fi
-}
-
-__execute_pde_build()
-{
- echo "Execute Product Ant Builder..."
- equinox_launcher=`echo org.eclipse.equinox.launcher_*.jar`
- pde_build=`echo org.eclipse.pde.build_*`
-
- java -jar ${reference_ide_path}/plugins/$equinox_launcher -application org.eclipse.ant.core.antRunner -buildfile ${reference_ide_path}/plugins/$pde_build/scripts/productBuild/productBuild.xml -Dbuilder=$build_path -Dosgi.locking=none 2>&1
-
- if [ $? != 0 ];
- then
- echo "Build failed..."
- exit 1
- fi
-}
-
-__unzip_plugin_pack()
-{
- echo "unzip to $build_result_path"
- unzip -a $build_result_path/${result_archive_file} -d $build_result_path/${archive_platform_name}.${windowing}.${architecture}
-}
-
-build_plugins()
-{
- case ${platform} in
- linux)
- echo "build plugin for ${platform}"
- ;;
- windows)
- echo "build plugin for ${platform}"
- ;;
- *)
- echo "${platform} is not support yet."
- exit 1
- ;;
- esac
-
- __set_parameter
- __set_build_parameter
- __clean_build_environment
- __copy_build_sources
- __copy_dependency_plugins
- __make_ant_build_properties_file
- __execute_pde_build
- __unzip_plugin_pack
-
- echo "Build SUCCESS. You will find SDK IDE in \"${build_result_path}\"."
-}
-
-__clean_packaging_environment()
-{
-
- if [ -d ${INSTALL_DIR} ]
- then
- rm -rf ${INSTALL_DIR}
- else
- mkdir -p ${INSTALL_DIR}
- fi
-}
+#!/bin/bash -xe
__copy_necessary_binaries()
{
- echo "add necessary files."
+ 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}/
}
-packaging_plugins()
+__set_parameter()
{
- __set_parameter
- __set_install_parameter
-
- __clean_packaging_environment
- __copy_necessary_binaries
-
- install_ide_path=${INSTALL_DIR}/${ide_root_path_name}
-
- if [ ! -d ${install_ide_path} ]
- then
- mkdir -p ${install_ide_path}
- fi
-
- cp -rf ${build_result_path}/${archive_platform_name}.${windowing}.${architecture}/${package_name}/* ${install_ide_path}/
+ echo "TARGET_OS : ${TARGET_OS}"
+ build_script_path=${ROOTDIR}/pde-build
}
# clean
clean()
{
- echo "=========================================CLEAN============================================"
- make clean
- rm -rf ${SRCDIR}/*.zip
- rm -rf ${SRCDIR}/*.tar.gz
- rm -rf ${build_path}
+ 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${BUILD_TARGET_OS}" = "x${platform}" ]
- then
- build_plugins
- else
- echo ""
- fi
- done
+ 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${BUILD_TARGET_OS}" = "x${platform}" ]
- then
- packaging_plugins
- else
- echo ""
- fi
- done
+ 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
-exit 0
diff --git a/package/changelog b/package/changelog
new file mode 100644
index 0000000..576ebf4
--- /dev/null
+++ b/package/changelog
@@ -0,0 +1,3 @@
+* 2.0.0
+- Tizen 2.0 release
+== hyukmin0530.kwon <hyukmin0530.kwon@samsung.com> 2013-01-11
diff --git a/package/pkginfo.manifest b/package/pkginfo.manifest
index 287a9a2..f550ae8 100644
--- a/package/pkginfo.manifest
+++ b/package/pkginfo.manifest
@@ -1,20 +1,40 @@
-Package:assignmenttracing-eplugin
-Version:1.0.2
-OS:linux
+Version:2.0.0
Maintainer:Woongsik Choi <woongsik76.choi@samsung.com>, Hyukmin Kwon <hyukmin0530.kwon@samsung.com>, Wooyoung Cho <wooyoung1.cho@samsung.com>, Yoonseok Ko <ys597.ko@samsung.com>, Jaeheung Kim <jaeheung.kim@samsung.com>, Sujin Kim <sujin921.kim@samsung.com>
-Build-dependency:indigo-pde [linux], common-eplugin [linux]
-Build-host-os:linux
-Install-dependency:common-eplugin [linux], base-ide-product [linux]
Source: assignmenttracing-eplugin
-Description: Assignment Tracing plugin
Package:assignmenttracing-eplugin
-Version:1.0.2
-OS:windows
-Maintainer:Woongsik Choi <woongsik76.choi@samsung.com>, Hyukmin Kwon <hyukmin0530.kwon@samsung.com>, Wooyoung Cho <wooyoung1.cho@samsung.com>, Yoonseok Ko <ys597.ko@samsung.com>, Jaeheung Kim <jaeheung.kim@samsung.com>, Sujin Kim <sujin921.kim@samsung.com>
-Build-dependency:indigo-winpde [windows], common-eplugin [windows]
-Build-host-os:linux
-Install-dependency:common-eplugin [windows], base-ide-product [windows]
-Source: assignmenttracing-eplugin
-Description: Assignment Tracing plugin
+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: C Assignment Tracing plugin
+
+Package:assignmenttracing-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: C Assignment Tracing plugin
+
+Package:assignmenttracing-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: C Assignment Tracing plugin
+
+Package:assignmenttracing-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: C Assignment Tracing plugin
+
+Package:assignmenttracing-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: C Assignment Tracing plugin
+