You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by jm...@apache.org on 2014/09/04 00:49:42 UTC

[01/50] [abbrv] git commit: [flex-utilities] [refs/heads/master] - Add example for future version of the SDK

Repository: flex-utilities
Updated Branches:
  refs/heads/master b49c1ac4e -> 26e0fd564


Add example for future version of the SDK


Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/e0e35330
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/e0e35330
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/e0e35330

Branch: refs/heads/master
Commit: e0e353309a7355e2e0ca9ab93cdc9b79520849cb
Parents: e43b7a8
Author: Justin Mclean <jm...@apache.org>
Authored: Wed Aug 27 13:57:28 2014 +1000
Committer: Justin Mclean <jm...@apache.org>
Committed: Wed Aug 27 13:57:28 2014 +1000

----------------------------------------------------------------------
 TourDeFlex/TourDeFlex3/build.xml        | 4 ++++
 TourDeFlex/TourDeFlex3/src/explorer.xml | 5 +++++
 2 files changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e0e35330/TourDeFlex/TourDeFlex3/build.xml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/build.xml b/TourDeFlex/TourDeFlex3/build.xml
index 8cb0b30..94797df 100644
--- a/TourDeFlex/TourDeFlex3/build.xml
+++ b/TourDeFlex/TourDeFlex3/build.xml
@@ -406,6 +406,7 @@
 		<compile-mxml example="/apache/ApacheFlex4_11_0"/>
 		<compile-mxml example="/apache/ApacheFlex4_12_1"/>
 		<compile-mxml example="/apache/ApacheFlex4_13_0"/>
+		<!-- <compile-mxml example="/apache/ApacheFlex4_13_0"/> -->
 		
 		<compile-mxml example="/apache/formatters/PostCodeFormatterExample"/>
 		<compile-mxml example="/apache/validators/PostCodeValidatorExample"/>
@@ -417,6 +418,9 @@
 		<compile-mxml example="/apache/i18n/NumericStepperExample"/>
 		<compile-mxml example="/apache/containers/CalloutExample"/>
 		<compile-mxml example="/apache/controls/MaskedTextInputExample"/>
+		
+		<!-- Uncomment when Flex 4.14 is released -->
+		<!-- compile-mxml example="/apache/controls/SparkRichTextEditorExample"/-->
 	</target>
 		
 	<target name="package" description="package up all source files" depends="package-dir,package-tar,package-zip">

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e0e35330/TourDeFlex/TourDeFlex3/src/explorer.xml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/explorer.xml b/TourDeFlex/TourDeFlex3/src/explorer.xml
index cfe594e..7cfe009 100755
--- a/TourDeFlex/TourDeFlex3/src/explorer.xml
+++ b/TourDeFlex/TourDeFlex3/src/explorer.xml
@@ -468,6 +468,11 @@
 			<node label="Apache Flex 4.13" app="apache/ApacheFlex4_13_0">
 				<!--  Add examples here -->
 			</node>
+			<!-- Add when Flex 4.14 is released
+			<node label="Apache Flex 4.14" app="apache/ApacheFlex4_14_0">
+				<compile-mxml label="MaskedTextInput" app="apache/controls/SparkRichTextEditorExample"/>
+			</node> 
+			 -->
 		</node>
 	</node>
 </compTree>
\ No newline at end of file


[50/50] [abbrv] git commit: [flex-utilities] [refs/heads/master] - merged develop into master for Squiggly

Posted by jm...@apache.org.
merged develop into master for Squiggly


Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/26e0fd56
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/26e0fd56
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/26e0fd56

Branch: refs/heads/master
Commit: 26e0fd5643ce7f72a5adb9fce13523c37f7f2a00
Parents: b49c1ac 249e685
Author: Justin Mclean <jm...@apache.org>
Authored: Thu Sep 4 08:49:22 2014 +1000
Committer: Justin Mclean <jm...@apache.org>
Committed: Thu Sep 4 08:49:22 2014 +1000

----------------------------------------------------------------------
 FlexPMD/.pmd                                    |   25 +
 FlexPMD/as3-parser-api/.pmd                     |   25 -
 FlexPMD/as3-parser-api/pom.xml                  |   32 -
 .../com/adobe/ac/pmd/parser/IAS3Parser.java     |   47 -
 .../com/adobe/ac/pmd/parser/IParserNode.java    |   90 -
 .../java/com/adobe/ac/pmd/parser/KeyWords.java  |   88 -
 .../java/com/adobe/ac/pmd/parser/NodeKind.java  |  137 -
 .../java/com/adobe/ac/pmd/parser/Operators.java |  101 -
 .../parser/exceptions/NullTokenException.java   |   33 -
 .../pmd/parser/exceptions/TokenException.java   |   32 -
 .../exceptions/UnExpectedTokenException.java    |   55 -
 .../com/adobe/ac/pmd/parser/KeyWordsTest.java   |   31 -
 .../com/adobe/ac/pmd/parser/NodeKindTest.java   |   31 -
 .../com/adobe/ac/pmd/parser/OperatorsTest.java  |   33 -
 .../parser/exceptions/FlexPmdExceptionTest.java |   50 -
 FlexPMD/as3-parser/.pmd                         |   25 -
 FlexPMD/as3-parser/pom.xml                      |   46 -
 .../de/bokelberg/flex/parser/AS3Parser.java     | 2360 ------------------
 .../de/bokelberg/flex/parser/AS3Scanner.java    |  898 -------
 .../de/bokelberg/flex/parser/NestedNode.java    |  224 --
 .../java/de/bokelberg/flex/parser/Node.java     |  168 --
 .../flex/parser/AbstractAs3ParserTest.java      |   98 -
 .../flex/parser/AbstractStatementTest.java      |   36 -
 .../bokelberg/flex/parser/NestedNodeTest.java   |   91 -
 .../java/de/bokelberg/flex/parser/NodeTest.java |   57 -
 .../de/bokelberg/flex/parser/TestAS3Parser.java |   75 -
 .../bokelberg/flex/parser/TestAS3Scanner.java   |  362 ---
 .../flex/parser/TestAS3ScannerWithFiles.java    |   92 -
 .../de/bokelberg/flex/parser/TestClass.java     |  144 --
 .../bokelberg/flex/parser/TestClassContent.java |  307 ---
 .../flex/parser/TestCompilationUnit.java        |   90 -
 .../flex/parser/TestConstStatement.java         |   67 -
 .../bokelberg/flex/parser/TestDoStatement.java  |   61 -
 .../flex/parser/TestE4xExpression.java          |   46 -
 .../flex/parser/TestEmptyStatement.java         |   42 -
 .../bokelberg/flex/parser/TestExpression.java   |  204 --
 .../bokelberg/flex/parser/TestForStatement.java |  101 -
 .../bokelberg/flex/parser/TestIfStatement.java  |  136 -
 .../de/bokelberg/flex/parser/TestInterface.java |   76 -
 .../flex/parser/TestInterfaceContent.java       |   96 -
 .../flex/parser/TestPackageContent.java         |  220 --
 .../flex/parser/TestPrimaryExpression.java      |  114 -
 .../flex/parser/TestReturnStatement.java        |   70 -
 .../flex/parser/TestSwitchStatement.java        |   52 -
 .../parser/TestTryCatchFinallyStatement.java    |   58 -
 .../flex/parser/TestUnaryExpression.java        |  132 -
 .../bokelberg/flex/parser/TestVarStatement.java |  126 -
 .../flex/parser/TestWhileStatement.java         |   67 -
 .../src/test/resources/examples/Enum.as         |   84 -
 .../src/test/resources/examples/FisheyeBase.as  |  564 -----
 .../src/test/resources/examples/FlexPMD115.as   |   22 -
 .../src/test/resources/examples/FlexPMD195.as   |   51 -
 .../src/test/resources/examples/FlexPMD62.as    |   35 -
 .../src/test/resources/examples/FlexPMD98.as    |  440 ----
 .../src/test/resources/examples/JPEGEncoder.as  |  669 -----
 .../src/test/resources/examples/JPEGEncoder2.as |  671 -----
 .../toAS2/src/fw/data/request/ResultListener.as |   27 -
 .../resources/examples/unformatted/IContext.as  |   83 -
 .../resources/examples/unformatted/Simple.as    |   19 -
 .../resources/examples/unformatted/Title.as     |   32 -
 FlexPMD/as3-plugin-utils/pom.xml                |   34 -
 .../com/adobe/ac/ncss/filters/FlexFilter.java   |   44 -
 .../java/com/adobe/ac/ncss/utils/FileUtils.java |  197 --
 .../main/java/com/adobe/ac/pmd/LoggerUtils.java |   44 -
 .../com/adobe/ac/utils/StackTraceUtils.java     |   59 -
 .../src/main/resources/logger.properties        |   22 -
 .../com/adobe/ac/ncss/utils/TestFileUtils.java  |   83 -
 .../com/adobe/ac/utils/StackTraceUtilsTest.java |   45 -
 .../adobe/ac/ncss/flexunit/AbstractRowData.as   |  115 -
 .../adobe/ac/ncss/flexunit/FilterTestsModel.as  |   74 -
 .../com/adobe/ac/ncss/flexunit/TestCaseData.as  |  139 --
 .../ac/ncss/flexunit/TestFunctionRowData.as     |  217 --
 .../flexunit/TestRunnerBasePresentationModel.as |  315 ---
 .../flexunit/filter/AllTestFunctionStatus.as    |   36 -
 .../flexunit/filter/EmptyTestFunctionStatus.as  |   36 -
 .../flexunit/filter/ErrorTestFunctionStatus.as  |   36 -
 .../ncss/flexunit/filter/ITestFunctionStatus.as |   28 -
 .../flexunit/filter/TestfFunctionStatuses.as    |   32 -
 .../com/adobe/ac/ncss/mxml/IterationView.mxml   |  105 -
 .../com/adobe/ac/ncss/mxml/IterationsList.mxml  |   61 -
 FlexPMD/checkstyle.xml                          |   78 +
 FlexPMD/cleanup.profile.xml                     |   95 +
 FlexPMD/custom-ruleset/pom.xml                  |   12 +-
 FlexPMD/flex-formatter.properties               |   74 +
 FlexPMD/flex-pmd-ant-task/.pmd                  |   25 -
 FlexPMD/flex-pmd-ant-task/pom.xml               |  177 --
 .../flex-pmd-ant-task/src/main/assemble/bin.xml |   38 -
 .../com/adobe/ac/pmd/ant/FlexPmdAntTask.java    |  119 -
 .../adobe/ac/pmd/ant/FlexPmdAntTaskTest.java    |   82 -
 FlexPMD/flex-pmd-automator-workflow/pom.xml     |   56 -
 .../src/main/assembly/workflow.xml              |   46 -
 .../Contents/QuickLook/Preview.pdf              |  Bin 86091 -> 0 bytes
 .../Contents/document.wflow                     |  545 ----
 FlexPMD/flex-pmd-bundles/pom.xml                |  129 -
 FlexPMD/flex-pmd-command-line-api/.pmd          |   25 -
 FlexPMD/flex-pmd-command-line-api/pom.xml       |   41 -
 .../com/adobe/ac/pmd/CommandLineOptions.java    |   39 -
 .../java/com/adobe/ac/pmd/CommandLineUtils.java |   58 -
 .../com/adobe/ac/pmd/ICommandLineOptions.java   |   22 -
 .../adobe/ac/pmd/CommandLineOptionsTest.java    |   31 -
 .../com/adobe/ac/pmd/CommandLineUtilsTest.java  |   58 -
 FlexPMD/flex-pmd-command-line/.pmd              |   25 -
 FlexPMD/flex-pmd-command-line/pom.xml           |  198 --
 .../src/main/assemble/bin.xml                   |   41 -
 .../com/adobe/ac/pmd/commandline/FlexPMD.java   |  134 -
 .../adobe/ac/pmd/commandline/FlexPMDTest.java   |  187 --
 FlexPMD/flex-pmd-core/.p4ignore                 |    1 -
 FlexPMD/flex-pmd-core/.pmd                      |   25 -
 FlexPMD/flex-pmd-core/pom.xml                   |  105 -
 .../com/adobe/ac/pmd/FlexPmdParameters.java     |  123 -
 .../com/adobe/ac/pmd/FlexPmdViolations.java     |  244 --
 .../ac/pmd/engines/AbstractFlexPmdEngine.java   |  199 --
 .../com/adobe/ac/pmd/engines/FlexPMDFormat.java |   35 -
 .../adobe/ac/pmd/engines/FlexPmdXmlEngine.java  |  171 --
 .../adobe/ac/pmd/engines/PmdEngineUtils.java    |   66 -
 .../adobe/ac/pmd/AbstractEntireRulesetTest.java |   87 -
 .../com/adobe/ac/pmd/AllInOneRulesetTest.java   |   64 -
 .../pmd/AllInOneWithExclusionRulesetTest.java   |   38 -
 .../com/adobe/ac/pmd/FlexPmdParametersTest.java |   47 -
 .../com/adobe/ac/pmd/FlexPmdXmlEngineTest.java  |   82 -
 .../ac/pmd/LoadRulesetWithNonUTF8CharTest.java  |   38 -
 .../engines/AbstractTestFlexPmdEngineTest.java  |   73 -
 .../ac/pmd/engines/PmdEngineUtilsTest.java      |  103 -
 .../src/test/resources/allInOneRuleset.xml      |  600 -----
 .../resources/allInOneWithExclusionRuleset.xml  |  601 -----
 .../src/test/resources/broken_pmd.xml           |  703 ------
 .../flex-pmd-core/src/test/resources/pmd.xml    |   63 -
 .../flex-pmd-core/src/test/resources/pmd.xsd    |   57 -
 FlexPMD/flex-pmd-cpd-ant-task/pom.xml           |  151 --
 .../com/adobe/ac/cpd/ant/FlexCpdAntTask.java    |  173 --
 .../adobe/ac/cpd/ant/FlexCpdAntTaskTest.java    |   56 -
 FlexPMD/flex-pmd-cpd-command-line/pom.xml       |  187 --
 .../cpd/commandline/CpdCommandLineOptions.java  |   37 -
 .../com/adobe/ac/cpd/commandline/FlexCPD.java   |  195 --
 .../ac/cpd/commandline/FlexCpdParameters.java   |   60 -
 .../adobe/ac/cpd/commandline/FlexCPDTest.java   |  105 -
 FlexPMD/flex-pmd-cpd-maven-plugin/pom.xml       |  116 -
 .../com/adobe/ac/cpd/maven/FlexCpdMojo.java     |  201 --
 .../src/main/resources/flexPmd.properties       |   16 -
 .../com/adobe/ac/cpd/maven/FlexCpdMojoTest.java |   42 -
 FlexPMD/flex-pmd-cpd/pom.xml                    |   93 -
 .../java/com/adobe/ac/cpd/FlexLanguage.java     |   27 -
 .../java/com/adobe/ac/cpd/FlexTokenizer.java    |  132 -
 .../test/java/com/adobe/ac/cpd/FlexCpdTest.java |  121 -
 .../src/test/resources/test/FlexPMD119.mxml     |  107 -
 FlexPMD/flex-pmd-files/pom.xml                  |   82 -
 .../java/com/adobe/ac/pmd/FlexPmdTestBase.java  |   71 -
 .../com/adobe/ac/pmd/ResourcesManagerTest.java  |  104 -
 .../java/com/adobe/ac/pmd/files/IAs3File.java   |   24 -
 .../java/com/adobe/ac/pmd/files/IFlexFile.java  |   94 -
 .../java/com/adobe/ac/pmd/files/IMxmlFile.java  |   43 -
 .../ac/pmd/files/impl/AbstractFlexFile.java     |  259 --
 .../com/adobe/ac/pmd/files/impl/As3File.java    |   86 -
 .../com/adobe/ac/pmd/files/impl/FileUtils.java  |  163 --
 .../com/adobe/ac/pmd/files/impl/MxmlFile.java   |  334 ---
 .../java/net/sourceforge/pmd/PMDException.java  |   80 -
 .../com/adobe/ac/pmd/FlexPmdTestBaseTest.java   |   40 -
 .../adobe/ac/pmd/ResourcesManagerTestTest.java  |   32 -
 .../com/adobe/ac/pmd/files/MxmlFileTest.java    |  150 --
 .../ac/pmd/files/impl/AbstractFlexFileTest.java |  157 --
 .../adobe/ac/pmd/files/impl/As3FileTest.java    |   64 -
 .../adobe/ac/pmd/files/impl/FileUtilsTest.java  |  115 -
 .../ac/pmd/files/impl/FlexFileFactoryTest.java  |   63 -
 .../adobe/ac/pmd/files/impl/MxmlFileTest.java   |   50 -
 .../net/sourceforge/pmd/PMDExceptionTest.java   |   61 -
 FlexPMD/flex-pmd-flex-lib/.checkstyle           |   24 -
 .../org.maven.ide.eclipse.maven2Builder.launch  |   25 -
 FlexPMD/flex-pmd-flex-lib/pom.xml               |  207 --
 .../flex/com/adobe/ac/model/IDomainModel.as     |   26 -
 .../com/adobe/ac/model/IPresentationModel.as    |   26 -
 .../com/adobe/ac/pmd/api/IGetRulesetContent.as  |   28 -
 .../control/events/GetRulesetContentEvent.as    |   56 -
 .../flex/com/adobe/ac/pmd/model/Property.as     |   35 -
 .../flex/com/adobe/ac/pmd/model/RootRuleset.as  |  103 -
 .../main/flex/com/adobe/ac/pmd/model/Rule.as    |   92 -
 .../main/flex/com/adobe/ac/pmd/model/Ruleset.as |   63 -
 .../com/adobe/ac/pmd/model/ViolationPriority.as |   82 -
 .../ac/pmd/model/events/RulesetReceivedEvent.as |   48 -
 .../main/flex/com/adobe/ac/pmd/view/Title.mxml  |   36 -
 .../src/main/resources/assets/cancelledIcon.png |  Bin 1094 -> 0 bytes
 .../src/main/resources/assets/export.png        |  Bin 1205 -> 0 bytes
 .../main/resources/assets/icon_tool_trash.png   |  Bin 821 -> 0 bytes
 .../main/resources/assets/icon_tool_trash2.png  |  Bin 27190 -> 0 bytes
 .../src/main/resources/assets/todoLogo.png      |  Bin 1106 -> 0 bytes
 .../src/main/resources/assets/todoLogo_big.png  |  Bin 57083 -> 0 bytes
 .../flex-pmd-flex-lib/src/test/flex/AllTests.as |   36 -
 .../flex/com/adobe/ac/pmd/model/RuleTest.as     |   61 -
 .../flex/com/adobe/ac/pmd/model/RulesetTest.as  |   72 -
 FlexPMD/flex-pmd-flex-parent/pom.xml            |  125 -
 .../flex-pmd-flex/flex-pmd-flex-lib/.checkstyle |   24 +
 .../org.maven.ide.eclipse.maven2Builder.launch  |   25 +
 FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/pom.xml |  196 ++
 .../flex-pmd-flex-lib/src/main/flex/Version.as  |    1 +
 .../flex/com/adobe/ac/model/IDomainModel.as     |   26 +
 .../com/adobe/ac/model/IPresentationModel.as    |   26 +
 .../com/adobe/ac/pmd/api/IGetRulesetContent.as  |   28 +
 .../control/events/GetRulesetContentEvent.as    |   56 +
 .../flex/com/adobe/ac/pmd/model/Property.as     |   35 +
 .../flex/com/adobe/ac/pmd/model/RootRuleset.as  |  103 +
 .../main/flex/com/adobe/ac/pmd/model/Rule.as    |   92 +
 .../main/flex/com/adobe/ac/pmd/model/Ruleset.as |   63 +
 .../com/adobe/ac/pmd/model/ViolationPriority.as |   82 +
 .../ac/pmd/model/events/RulesetReceivedEvent.as |   48 +
 .../main/flex/com/adobe/ac/pmd/view/Title.mxml  |   36 +
 .../src/main/resources/assets/cancelledIcon.png |  Bin 0 -> 1094 bytes
 .../src/main/resources/assets/export.png        |  Bin 0 -> 1205 bytes
 .../main/resources/assets/icon_tool_trash.png   |  Bin 0 -> 821 bytes
 .../main/resources/assets/icon_tool_trash2.png  |  Bin 0 -> 27190 bytes
 .../src/main/resources/assets/todoLogo.png      |  Bin 0 -> 1106 bytes
 .../src/main/resources/assets/todoLogo_big.png  |  Bin 0 -> 57083 bytes
 .../flex-pmd-flex-lib/src/test/flex/AllTests.as |   36 +
 .../flex/com/adobe/ac/pmd/model/RuleTest.as     |   61 +
 .../flex/com/adobe/ac/pmd/model/RulesetTest.as  |   72 +
 .../flex-pmd-ruleset-creator/build.properties   |   41 +
 .../flex-pmd-ruleset-creator/build.xml          |   75 +
 .../flexcover.properties                        |   89 +
 .../flex-pmd-ruleset-creator/flexcover.xml      |  191 ++
 .../html-template/index.template.html           |  121 +
 .../flex-pmd-ruleset-creator/pom.xml            |  221 ++
 .../src/main/flex/Main.mxml                     |  132 +
 .../src/main/flex/TestRunner-app.xml            |   45 +
 .../src/main/flex/TestViewRunner-app.xml        |   45 +
 .../src/main/flex/assets/add-10.png             |  Bin 0 -> 3128 bytes
 .../src/main/flex/assets/add-48.png             |  Bin 0 -> 3141 bytes
 .../src/main/flex/assets/arrow.ai               | 1121 +++++++++
 .../src/main/flex/assets/cancelledIcon.png      |  Bin 0 -> 1094 bytes
 .../src/main/flex/assets/down.png               |  Bin 0 -> 926 bytes
 .../src/main/flex/assets/icon_tool_trash.png    |  Bin 0 -> 821 bytes
 .../src/main/flex/assets/icon_tool_trash2.png   |  Bin 0 -> 27190 bytes
 .../src/main/flex/assets/todoLogo.png           |  Bin 0 -> 1106 bytes
 .../src/main/flex/assets/todoLogo_big.png       |  Bin 0 -> 57083 bytes
 .../src/main/flex/assets/up.png                 |  Bin 0 -> 924 bytes
 .../com/adobe/ac/pmd/api/IGetCustomRuleset.as   |   28 +
 .../com/adobe/ac/pmd/api/IGetRootRuleset.as     |   28 +
 .../flex/com/adobe/ac/pmd/control/Controller.as |   40 +
 .../control/commands/GetCustomRulesetCommand.as |   63 +
 .../control/commands/GetRootRulesetCommand.as   |   63 +
 .../commands/GetRulesetContentCommand.as        |   65 +
 .../pmd/control/events/GetCustomRulesetEvent.as |   48 +
 .../pmd/control/events/GetRootRulesetEvent.as   |   48 +
 .../adobe/ac/pmd/services/MyServiceLocator.mxml |   39 +
 .../ac/pmd/services/rulesets/RulesetDelegate.as |   96 +
 .../services/translators/PropertyTranslator.as  |   44 +
 .../translators/RootRulesetTranslator.as        |  107 +
 .../pmd/services/translators/RuleTranslator.as  |   98 +
 .../services/translators/RulesetTranslator.as   |   63 +
 .../flex/com/adobe/ac/pmd/view/RuleEditor.mxml  |  140 ++
 .../flex/com/adobe/ac/pmd/view/RuleEditorPM.as  |   33 +
 .../com/adobe/ac/pmd/view/RuleSetNavigator.mxml |  160 ++
 .../com/adobe/ac/pmd/view/RuleSetNavigatorPM.as |  162 ++
 .../pmd/view/events/SelectedRuleChangeEvent.as  |   48 +
 .../view/renderers/DeleteButtonRenderer.mxml    |   77 +
 .../src/main/locales/en_US/Main.properties      |   15 +
 .../src/main/resources/placeholder.txt          |   16 +
 .../src/test/flex/AllTests.as                   |   42 +
 .../flex/com/adobe/ac/pmd/model/RulesetTest.as  |   72 +
 .../services/translators/RuleTranslatorTest.as  |   59 +
 .../translators/RulesetTranslatorTest.as        |   45 +
 .../adobe/ac/pmd/view/RuleSetNavigatorPMTest.as |   80 +
 .../html-template/index.template.html           |  121 +
 .../flex-pmd-violations-viewer/pom.xml          |  186 ++
 .../src/main/flex/Main.mxml                     |   87 +
 .../src/main/flex/TestRunner.mxml               |   24 +
 .../com/adobe/ac/pmd/model/CharacterPosition.as |   44 +
 .../main/flex/com/adobe/ac/pmd/model/File.as    |   48 +
 .../flex/com/adobe/ac/pmd/model/Violation.as    |   82 +
 .../com/adobe/ac/pmd/model/ViolationPosition.as |   44 +
 .../com/adobe/ac/pmd/view/FilterResults.mxml    |   67 +
 .../com/adobe/ac/pmd/view/ResultsFormatter.as   |   41 +
 .../flex/com/adobe/ac/pmd/view/ResultsView.mxml |  142 ++
 .../adobe/ac/pmd/view/SelectedViolation.mxml    |  151 ++
 .../flex/com/adobe/ac/pmd/view/Summary.mxml     |   69 +
 .../flex/com/adobe/ac/pmd/view/UploadView.mxml  |   44 +
 .../adobe/ac/pmd/view/model/ResultsFilter.as    |   50 +
 .../com/adobe/ac/pmd/view/model/ResultsModel.as |  138 +
 .../com/adobe/ac/pmd/view/model/UploadModel.as  |  135 +
 .../adobe/ac/pmd/view/model/ViolationsModel.as  |   84 +
 .../src/test/flex/AllTests.as                   |   30 +
 FlexPMD/flex-pmd-flex/flexunit-theme/pom.xml    |   91 +
 .../src/main/resources/assets/cancelledIcon.png |  Bin 0 -> 1094 bytes
 .../src/main/resources/assets/export.png        |  Bin 0 -> 1205 bytes
 .../main/resources/assets/icon_tool_trash.png   |  Bin 0 -> 821 bytes
 .../main/resources/assets/icon_tool_trash2.png  |  Bin 0 -> 27190 bytes
 .../src/main/resources/assets/todoLogo.png      |  Bin 0 -> 1106 bytes
 .../src/main/resources/assets/todoLogo_big.png  |  Bin 0 -> 57083 bytes
 .../src/main/resources/css/default.css          |  285 +++
 .../skins/ButtonBarButton_disabledSkin.png      |  Bin 0 -> 1439 bytes
 .../skins/ButtonBarButton_downSkin.png          |  Bin 0 -> 1468 bytes
 .../skins/ButtonBarButton_overSkin.png          |  Bin 0 -> 1471 bytes
 .../ButtonBarButton_selectedDisabledSkin.png    |  Bin 0 -> 1455 bytes
 .../skins/ButtonBarButton_selectedUpSkin.png    |  Bin 0 -> 1469 bytes
 .../resources/skins/ButtonBarButton_upSkin.png  |  Bin 0 -> 1445 bytes
 .../skins/ButtonBarFirstButton_disabledSkin.png |  Bin 0 -> 1496 bytes
 .../skins/ButtonBarFirstButton_downSkin.png     |  Bin 0 -> 1497 bytes
 .../skins/ButtonBarFirstButton_overSkin.png     |  Bin 0 -> 1511 bytes
 ...uttonBarFirstButton_selectedDisabledSkin.png |  Bin 0 -> 1484 bytes
 .../ButtonBarFirstButton_selectedUpSkin.png     |  Bin 0 -> 1498 bytes
 .../skins/ButtonBarFirstButton_upSkin.png       |  Bin 0 -> 1490 bytes
 .../skins/ButtonBarLastButton_disabledSkin.png  |  Bin 0 -> 1489 bytes
 .../skins/ButtonBarLastButton_downSkin.png      |  Bin 0 -> 1520 bytes
 .../skins/ButtonBarLastButton_overSkin.png      |  Bin 0 -> 1499 bytes
 ...ButtonBarLastButton_selectedDisabledSkin.png |  Bin 0 -> 1489 bytes
 .../ButtonBarLastButton_selectedUpSkin.png      |  Bin 0 -> 1506 bytes
 .../skins/ButtonBarLastButton_upSkin.png        |  Bin 0 -> 1501 bytes
 .../resources/skins/Button_disabledSkin.png     |  Bin 0 -> 1509 bytes
 .../main/resources/skins/Button_downSkin.png    |  Bin 0 -> 1530 bytes
 .../main/resources/skins/Button_overSkin.png    |  Bin 0 -> 1535 bytes
 .../src/main/resources/skins/Button_upSkin.png  |  Bin 0 -> 1528 bytes
 .../skins/CursorManager_busyCursor.png          |  Bin 0 -> 2001 bytes
 .../resources/skins/DataGrid_borderSkin.png     |  Bin 0 -> 1497 bytes
 .../skins/DataGrid_columnDropIndicatorSkin.png  |  Bin 0 -> 1287 bytes
 .../skins/DataGrid_columnResizeSkin.png         |  Bin 0 -> 1248 bytes
 .../skins/DataGrid_headerBackgroundSkin.png     |  Bin 0 -> 1323 bytes
 .../skins/DataGrid_headerSeparatorSkin.png      |  Bin 0 -> 1240 bytes
 .../resources/skins/DataGrid_sortArrowSkin.png  |  Bin 0 -> 1336 bytes
 .../resources/skins/DataGrid_stretchCursor.png  |  Bin 0 -> 1461 bytes
 .../resources/skins/FormItem_indicatorSkin.png  |  Bin 0 -> 1327 bytes
 .../skins/HScrollArrowLeft_disabledSkin.png     |  Bin 0 -> 1277 bytes
 .../skins/HScrollArrowRight_disabledSkin.png    |  Bin 0 -> 1796 bytes
 .../skins/HScrollBar_leftArrowDownSkin.png      |  Bin 0 -> 1325 bytes
 .../skins/HScrollBar_leftArrowOverSkin.png      |  Bin 0 -> 1335 bytes
 .../skins/HScrollBar_leftArrowUpSkin.png        |  Bin 0 -> 1335 bytes
 .../skins/HScrollBar_rightArrowDownSkin.png     |  Bin 0 -> 1324 bytes
 .../skins/HScrollBar_rightArrowOverSkin.png     |  Bin 0 -> 1336 bytes
 .../skins/HScrollBar_rightArrowUpSkin.png       |  Bin 0 -> 1336 bytes
 .../skins/HScrollBar_thumbDownSkin.png          |  Bin 0 -> 1453 bytes
 .../resources/skins/HScrollBar_thumbIcon.png    |  Bin 0 -> 1252 bytes
 .../skins/HScrollBar_thumbOverSkin.png          |  Bin 0 -> 1552 bytes
 .../resources/skins/HScrollBar_thumbUpSkin.png  |  Bin 0 -> 1484 bytes
 .../skins/HScrollBar_trackDisabledSkin.png      |  Bin 0 -> 1394 bytes
 .../resources/skins/HScrollBar_trackSkin.png    |  Bin 0 -> 1393 bytes
 .../main/resources/skins/Panel_borderSkin.png   |  Bin 0 -> 2906 bytes
 .../skins/VScrollBar_downArrowDisabledSkin.png  |  Bin 0 -> 1347 bytes
 .../skins/VScrollBar_downArrowDownSkin.png      |  Bin 0 -> 1325 bytes
 .../skins/VScrollBar_downArrowOverSkin.png      |  Bin 0 -> 1335 bytes
 .../skins/VScrollBar_downArrowUpSkin.png        |  Bin 0 -> 1335 bytes
 .../skins/VScrollBar_thumbDownSkin.png          |  Bin 0 -> 1453 bytes
 .../resources/skins/VScrollBar_thumbIcon.png    |  Bin 0 -> 1252 bytes
 .../skins/VScrollBar_thumbOverSkin.png          |  Bin 0 -> 1434 bytes
 .../resources/skins/VScrollBar_thumbUpSkin.png  |  Bin 0 -> 1434 bytes
 .../skins/VScrollBar_trackDisabledSkin.png      |  Bin 0 -> 1394 bytes
 .../resources/skins/VScrollBar_trackSkin.png    |  Bin 0 -> 1393 bytes
 .../skins/VScrollBar_upArrowDisabledSkin.png    |  Bin 0 -> 1281 bytes
 .../skins/VScrollBar_upArrowDownSkin.png        |  Bin 0 -> 1324 bytes
 .../skins/VScrollBar_upArrowOverSkin.png        |  Bin 0 -> 1336 bytes
 .../skins/VScrollBar_upArrowUpSkin.png          |  Bin 0 -> 1336 bytes
 FlexPMD/flex-pmd-flex/pom.xml                   |  123 +
 FlexPMD/flex-pmd-hybrid-parent/pom.xml          |  279 ---
 .../flex-pmd-hybrid/flex-pmd-automator/pom.xml  |   56 +
 .../src/main/assembly/workflow.xml              |   46 +
 .../Contents/QuickLook/Preview.pdf              |  Bin 0 -> 86091 bytes
 .../Contents/document.wflow                     |  545 ++++
 .../flex-pmd-hybrid/flex-pmd-bundles/pom.xml    |  129 +
 FlexPMD/flex-pmd-hybrid/pom.xml                 |  278 +++
 FlexPMD/flex-pmd-java-parent/pom.xml            |   56 -
 FlexPMD/flex-pmd-java-parent/sonar.sh           |   17 -
 FlexPMD/flex-pmd-java/as3-parser-api/.pmd       |   25 +
 FlexPMD/flex-pmd-java/as3-parser-api/pom.xml    |   34 +
 .../com/adobe/ac/pmd/parser/IAS3Parser.java     |   47 +
 .../com/adobe/ac/pmd/parser/IParserNode.java    |   90 +
 .../java/com/adobe/ac/pmd/parser/KeyWords.java  |   88 +
 .../java/com/adobe/ac/pmd/parser/NodeKind.java  |  137 +
 .../java/com/adobe/ac/pmd/parser/Operators.java |  101 +
 .../parser/exceptions/NullTokenException.java   |   33 +
 .../pmd/parser/exceptions/TokenException.java   |   32 +
 .../exceptions/UnExpectedTokenException.java    |   55 +
 .../com/adobe/ac/pmd/parser/KeyWordsTest.java   |   31 +
 .../com/adobe/ac/pmd/parser/NodeKindTest.java   |   31 +
 .../com/adobe/ac/pmd/parser/OperatorsTest.java  |   33 +
 .../parser/exceptions/FlexPmdExceptionTest.java |   50 +
 FlexPMD/flex-pmd-java/as3-parser/.pmd           |   25 +
 FlexPMD/flex-pmd-java/as3-parser/pom.xml        |   47 +
 .../de/bokelberg/flex/parser/AS3Parser.java     | 2360 ++++++++++++++++++
 .../de/bokelberg/flex/parser/AS3Scanner.java    |  898 +++++++
 .../de/bokelberg/flex/parser/NestedNode.java    |  224 ++
 .../java/de/bokelberg/flex/parser/Node.java     |  168 ++
 .../flex/parser/AbstractAs3ParserTest.java      |   98 +
 .../flex/parser/AbstractStatementTest.java      |   36 +
 .../bokelberg/flex/parser/NestedNodeTest.java   |   91 +
 .../java/de/bokelberg/flex/parser/NodeTest.java |   57 +
 .../de/bokelberg/flex/parser/TestAS3Parser.java |   76 +
 .../bokelberg/flex/parser/TestAS3Scanner.java   |  362 +++
 .../flex/parser/TestAS3ScannerWithFiles.java    |   95 +
 .../de/bokelberg/flex/parser/TestClass.java     |  144 ++
 .../bokelberg/flex/parser/TestClassContent.java |  307 +++
 .../flex/parser/TestCompilationUnit.java        |   90 +
 .../flex/parser/TestConstStatement.java         |   67 +
 .../bokelberg/flex/parser/TestDoStatement.java  |   61 +
 .../flex/parser/TestE4xExpression.java          |   46 +
 .../flex/parser/TestEmptyStatement.java         |   42 +
 .../bokelberg/flex/parser/TestExpression.java   |  204 ++
 .../bokelberg/flex/parser/TestForStatement.java |  101 +
 .../bokelberg/flex/parser/TestIfStatement.java  |  136 +
 .../de/bokelberg/flex/parser/TestInterface.java |   76 +
 .../flex/parser/TestInterfaceContent.java       |   96 +
 .../flex/parser/TestPackageContent.java         |  220 ++
 .../flex/parser/TestPrimaryExpression.java      |  114 +
 .../flex/parser/TestReturnStatement.java        |   70 +
 .../flex/parser/TestSwitchStatement.java        |   52 +
 .../parser/TestTryCatchFinallyStatement.java    |   58 +
 .../flex/parser/TestUnaryExpression.java        |  132 +
 .../bokelberg/flex/parser/TestVarStatement.java |  126 +
 .../flex/parser/TestWhileStatement.java         |   67 +
 .../src/test/resources/examples/Enum.as         |   84 +
 .../src/test/resources/examples/FisheyeBase.as  |  564 +++++
 .../src/test/resources/examples/FlexPMD115.as   |   22 +
 .../src/test/resources/examples/FlexPMD195.as   |   51 +
 .../src/test/resources/examples/FlexPMD62.as    |   35 +
 .../src/test/resources/examples/FlexPMD98.as    |  440 ++++
 .../src/test/resources/examples/JPEGEncoder.as  |  669 +++++
 .../src/test/resources/examples/JPEGEncoder2.as |  671 +++++
 .../toAS2/src/fw/data/request/ResultListener.as |   27 +
 .../resources/examples/unformatted/IContext.as  |   83 +
 .../resources/examples/unformatted/Simple.as    |   19 +
 .../resources/examples/unformatted/Title.as     |   32 +
 FlexPMD/flex-pmd-java/as3-plugin-utils/pom.xml  |   35 +
 .../com/adobe/ac/ncss/filters/FlexFilter.java   |   44 +
 .../java/com/adobe/ac/ncss/utils/FileUtils.java |  197 ++
 .../main/java/com/adobe/ac/pmd/LoggerUtils.java |   44 +
 .../com/adobe/ac/utils/StackTraceUtils.java     |   59 +
 .../src/main/resources/logger.properties        |   22 +
 .../com/adobe/ac/ncss/utils/TestFileUtils.java  |   83 +
 .../com/adobe/ac/utils/StackTraceUtilsTest.java |   45 +
 .../adobe/ac/ncss/flexunit/AbstractRowData.as   |  115 +
 .../adobe/ac/ncss/flexunit/FilterTestsModel.as  |   74 +
 .../com/adobe/ac/ncss/flexunit/TestCaseData.as  |  139 ++
 .../ac/ncss/flexunit/TestFunctionRowData.as     |  217 ++
 .../flexunit/TestRunnerBasePresentationModel.as |  315 +++
 .../flexunit/filter/AllTestFunctionStatus.as    |   36 +
 .../flexunit/filter/EmptyTestFunctionStatus.as  |   36 +
 .../flexunit/filter/ErrorTestFunctionStatus.as  |   36 +
 .../ncss/flexunit/filter/ITestFunctionStatus.as |   28 +
 .../flexunit/filter/TestfFunctionStatuses.as    |   32 +
 .../com/adobe/ac/ncss/mxml/IterationView.mxml   |  105 +
 .../com/adobe/ac/ncss/mxml/IterationsList.mxml  |   61 +
 FlexPMD/flex-pmd-java/flex-pmd-ant-task/.pmd    |   25 +
 FlexPMD/flex-pmd-java/flex-pmd-ant-task/pom.xml |  190 ++
 .../flex-pmd-ant-task/src/main/assemble/bin.xml |   38 +
 .../com/adobe/ac/pmd/ant/FlexPmdAntTask.java    |  119 +
 .../adobe/ac/pmd/ant/FlexPmdAntTaskTest.java    |   82 +
 .../flex-pmd-command-line-api/.pmd              |   25 +
 .../flex-pmd-command-line-api/pom.xml           |   41 +
 .../com/adobe/ac/pmd/CommandLineOptions.java    |   39 +
 .../java/com/adobe/ac/pmd/CommandLineUtils.java |   58 +
 .../com/adobe/ac/pmd/ICommandLineOptions.java   |   22 +
 .../adobe/ac/pmd/CommandLineOptionsTest.java    |   31 +
 .../com/adobe/ac/pmd/CommandLineUtilsTest.java  |   58 +
 .../flex-pmd-java/flex-pmd-command-line/.pmd    |   25 +
 .../flex-pmd-java/flex-pmd-command-line/pom.xml |  196 ++
 .../src/main/assemble/bin.xml                   |   41 +
 .../com/adobe/ac/pmd/commandline/FlexPMD.java   |  134 +
 .../adobe/ac/pmd/commandline/FlexPMDTest.java   |  187 ++
 FlexPMD/flex-pmd-java/flex-pmd-core/.p4ignore   |    1 +
 FlexPMD/flex-pmd-java/flex-pmd-core/.pmd        |   25 +
 FlexPMD/flex-pmd-java/flex-pmd-core/pom.xml     |  105 +
 .../com/adobe/ac/pmd/FlexPmdParameters.java     |  123 +
 .../com/adobe/ac/pmd/FlexPmdViolations.java     |  244 ++
 .../ac/pmd/engines/AbstractFlexPmdEngine.java   |  199 ++
 .../com/adobe/ac/pmd/engines/FlexPMDFormat.java |   35 +
 .../adobe/ac/pmd/engines/FlexPmdXmlEngine.java  |  171 ++
 .../adobe/ac/pmd/engines/PmdEngineUtils.java    |   66 +
 .../adobe/ac/pmd/AbstractEntireRulesetTest.java |   87 +
 .../com/adobe/ac/pmd/AllInOneRulesetTest.java   |   64 +
 .../pmd/AllInOneWithExclusionRulesetTest.java   |   38 +
 .../com/adobe/ac/pmd/FlexPmdParametersTest.java |   47 +
 .../com/adobe/ac/pmd/FlexPmdXmlEngineTest.java  |   82 +
 .../ac/pmd/LoadRulesetWithNonUTF8CharTest.java  |   38 +
 .../engines/AbstractTestFlexPmdEngineTest.java  |   73 +
 .../ac/pmd/engines/PmdEngineUtilsTest.java      |  103 +
 .../src/test/resources/allInOneRuleset.xml      |  600 +++++
 .../resources/allInOneWithExclusionRuleset.xml  |  601 +++++
 .../src/test/resources/broken_pmd.xml           |  703 ++++++
 .../flex-pmd-core/src/test/resources/pmd.xml    |   63 +
 .../flex-pmd-core/src/test/resources/pmd.xsd    |   57 +
 .../flex-pmd-java/flex-pmd-cpd-ant-task/pom.xml |  161 ++
 .../com/adobe/ac/cpd/ant/FlexCpdAntTask.java    |  173 ++
 .../adobe/ac/cpd/ant/FlexCpdAntTaskTest.java    |   56 +
 .../flex-pmd-cpd-command-line/pom.xml           |  197 ++
 .../cpd/commandline/CpdCommandLineOptions.java  |   37 +
 .../com/adobe/ac/cpd/commandline/FlexCPD.java   |  195 ++
 .../ac/cpd/commandline/FlexCpdParameters.java   |   60 +
 .../adobe/ac/cpd/commandline/FlexCPDTest.java   |  105 +
 .../flex-pmd-cpd-maven-plugin/pom.xml           |  118 +
 .../com/adobe/ac/cpd/maven/FlexCpdMojo.java     |  201 ++
 .../src/main/resources/flexPmd.properties       |   16 +
 .../com/adobe/ac/cpd/maven/FlexCpdMojoTest.java |   42 +
 FlexPMD/flex-pmd-java/flex-pmd-cpd/pom.xml      |   93 +
 .../java/com/adobe/ac/cpd/FlexLanguage.java     |   27 +
 .../java/com/adobe/ac/cpd/FlexTokenizer.java    |  132 +
 .../test/java/com/adobe/ac/cpd/FlexCpdTest.java |  121 +
 .../src/test/resources/test/FlexPMD119.mxml     |  107 +
 FlexPMD/flex-pmd-java/flex-pmd-files/pom.xml    |   84 +
 .../java/com/adobe/ac/pmd/FlexPmdTestBase.java  |   71 +
 .../com/adobe/ac/pmd/ResourcesManagerTest.java  |  104 +
 .../java/com/adobe/ac/pmd/files/IAs3File.java   |   24 +
 .../java/com/adobe/ac/pmd/files/IFlexFile.java  |   94 +
 .../java/com/adobe/ac/pmd/files/IMxmlFile.java  |   43 +
 .../ac/pmd/files/impl/AbstractFlexFile.java     |  259 ++
 .../com/adobe/ac/pmd/files/impl/As3File.java    |   86 +
 .../com/adobe/ac/pmd/files/impl/FileUtils.java  |  163 ++
 .../com/adobe/ac/pmd/files/impl/MxmlFile.java   |  334 +++
 .../java/net/sourceforge/pmd/PMDException.java  |   80 +
 .../com/adobe/ac/pmd/FlexPmdTestBaseTest.java   |   40 +
 .../adobe/ac/pmd/ResourcesManagerTestTest.java  |   32 +
 .../com/adobe/ac/pmd/files/MxmlFileTest.java    |  150 ++
 .../ac/pmd/files/impl/AbstractFlexFileTest.java |  157 ++
 .../adobe/ac/pmd/files/impl/As3FileTest.java    |   64 +
 .../adobe/ac/pmd/files/impl/FileUtilsTest.java  |  115 +
 .../ac/pmd/files/impl/FlexFileFactoryTest.java  |   63 +
 .../adobe/ac/pmd/files/impl/MxmlFileTest.java   |   50 +
 .../net/sourceforge/pmd/PMDExceptionTest.java   |   61 +
 .../flex-pmd-java/flex-pmd-maven-plugin/pom.xml |  116 +
 .../adobe/ac/pmd/maven/AbstractFlexPmdMojo.java |  362 +++
 .../adobe/ac/pmd/maven/FlexPmdHtmlEngine.java   |  125 +
 .../com/adobe/ac/pmd/maven/FlexPmdMojo.java     |   40 +
 .../adobe/ac/pmd/maven/FlexPmdReportMojo.java   |   82 +
 .../com/adobe/ac/pmd/maven/FlexPmdMojoTest.java |   97 +
 .../ac/pmd/maven/FlexPmdReportMojoTest.java     |   86 +
 .../src/test/resources/rulesets/broken_pmd.xml  |  703 ++++++
 .../flex-pmd-metrics-ant-task/.pmd              |  975 ++++++++
 .../flex-pmd-metrics-ant-task/pom.xml           |  163 ++
 .../ac/pmd/metrics/ant/FlexMetricsAntTask.java  |   83 +
 .../pmd/metrics/ant/FlexMetricsAntTaskTest.java |   40 +
 .../flex-pmd-metrics-command-line/.pmd          |  975 ++++++++
 .../flex-pmd-metrics-command-line/pom.xml       |  217 ++
 .../ac/pmd/metrics/commandline/FlexMetrics.java |  126 +
 .../metrics/commandline/FlexMetricsTest.java    |   55 +
 .../metrics/commandline/FlexMetricsTest.java    |   55 +
 .../flex-pmd-metrics-maven-plugin/.pmd          |  975 ++++++++
 .../flex-pmd-metrics-maven-plugin/pom.xml       |  102 +
 .../ac/pmd/metrics/maven/FlexMetricsMojo.java   |  201 ++
 .../metrics/maven/FlexMetricsReportMojo.java    |  414 +++
 .../NcssAggregateReportGenerator.java           |  193 ++
 .../maven/generators/NcssReportGenerator.java   |  464 ++++
 .../generators/NcssReportGeneratorBase.java     |  220 ++
 .../pmd/metrics/maven/utils/ModuleReport.java   |   60 +
 .../pmd/metrics/maven/utils/NcssExecuter.java   |   48 +
 .../maven/utils/NumericNodeComparator.java      |   59 +
 .../src/main/resources/flexMetrics.properties   |   94 +
 .../pmd/metrics/maven/FlexMetricsMojoTest.java  |   60 +
 .../maven/FlexMetricsReportMojoTest.java        |   98 +
 FlexPMD/flex-pmd-java/flex-pmd-metrics/.pmd     |  975 ++++++++
 FlexPMD/flex-pmd-java/flex-pmd-metrics/pom.xml  |  100 +
 .../ac/pmd/metrics/AbstractNamedMetrics.java    |   38 +
 .../ac/pmd/metrics/AbstractPackagedMetrics.java |   89 +
 .../ac/pmd/metrics/AverageClassMetrics.java     |   57 +
 .../ac/pmd/metrics/AverageFunctionMetrics.java  |   39 +
 .../ac/pmd/metrics/AverageMetricsBase.java      |   53 +
 .../com/adobe/ac/pmd/metrics/ClassMetrics.java  |  128 +
 .../adobe/ac/pmd/metrics/FunctionMetrics.java   |   74 +
 .../java/com/adobe/ac/pmd/metrics/IMetrics.java |   22 +
 .../ac/pmd/metrics/InternalFunctionMetrics.java |   85 +
 .../com/adobe/ac/pmd/metrics/MetricUtils.java   |   70 +
 .../adobe/ac/pmd/metrics/PackageMetrics.java    |   95 +
 .../adobe/ac/pmd/metrics/ProjectMetrics.java    |  118 +
 .../ac/pmd/metrics/TotalPackageMetrics.java     |  107 +
 .../ac/pmd/metrics/engine/AbstractMetrics.java  |  234 ++
 .../ac/pmd/metrics/engine/FlexMetrics.java      |  148 ++
 .../adobe/ac/pmd/metrics/ClassMetricsTest.java  |  162 ++
 .../metrics/InternalFunctionMetricsTest.java    |   46 +
 .../adobe/ac/pmd/metrics/MetricUtilsTest.java   |   43 +
 .../ac/pmd/metrics/PackageMetricsTest.java      |   72 +
 .../ac/pmd/metrics/engine/FlexMetricsTest.java  |  161 ++
 .../flex-pmd-ruleset-api/.checkstyle            |   24 +
 FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/.pmd |   25 +
 .../flex-pmd-java/flex-pmd-ruleset-api/pom.xml  |  110 +
 .../java/com/adobe/ac/pmd/IFlexViolation.java   |   54 +
 .../com/adobe/ac/pmd/files/FileSetUtils.java    |  179 ++
 .../com/adobe/ac/pmd/nodes/IAsDocHolder.java    |   30 +
 .../java/com/adobe/ac/pmd/nodes/IAttribute.java |   24 +
 .../java/com/adobe/ac/pmd/nodes/IClass.java     |   81 +
 .../com/adobe/ac/pmd/nodes/ICommentHolder.java  |   32 +
 .../java/com/adobe/ac/pmd/nodes/IConstant.java  |   24 +
 .../java/com/adobe/ac/pmd/nodes/IField.java     |   28 +
 .../ac/pmd/nodes/IFieldInitialization.java      |   24 +
 .../java/com/adobe/ac/pmd/nodes/IFunction.java  |  100 +
 .../com/adobe/ac/pmd/nodes/IIdentifierNode.java |   25 +
 .../java/com/adobe/ac/pmd/nodes/IMetaData.java  |   47 +
 .../adobe/ac/pmd/nodes/IMetaDataListHolder.java |   46 +
 .../adobe/ac/pmd/nodes/IModifiersHolder.java    |   34 +
 .../java/com/adobe/ac/pmd/nodes/INamable.java   |   28 +
 .../com/adobe/ac/pmd/nodes/INamableNode.java    |   25 +
 .../main/java/com/adobe/ac/pmd/nodes/INode.java |   32 +
 .../java/com/adobe/ac/pmd/nodes/IPackage.java   |   50 +
 .../java/com/adobe/ac/pmd/nodes/IParameter.java |   24 +
 .../java/com/adobe/ac/pmd/nodes/IVariable.java  |   33 +
 .../java/com/adobe/ac/pmd/nodes/IVisible.java   |   28 +
 .../java/com/adobe/ac/pmd/nodes/MetaData.java   |   85 +
 .../java/com/adobe/ac/pmd/nodes/Modifier.java   |   78 +
 .../ac/pmd/nodes/asdoc/impl/AsDocNodeBase.java  |   42 +
 .../ac/pmd/nodes/asdoc/impl/ClassAsDocNode.java |   31 +
 .../pmd/nodes/asdoc/impl/FunctionAsDocNode.java |   54 +
 .../nodes/asdoc/impl/ParameterAsDocNode.java    |   55 +
 .../adobe/ac/pmd/nodes/impl/AbstractNode.java   |   90 +
 .../adobe/ac/pmd/nodes/impl/AttributeNode.java  |   44 +
 .../com/adobe/ac/pmd/nodes/impl/ClassNode.java  |  411 +++
 .../adobe/ac/pmd/nodes/impl/ConstantNode.java   |   44 +
 .../pmd/nodes/impl/FieldInitializationNode.java |   53 +
 .../com/adobe/ac/pmd/nodes/impl/FieldNode.java  |   94 +
 .../com/adobe/ac/pmd/nodes/impl/FormalNode.java |   53 +
 .../adobe/ac/pmd/nodes/impl/FunctionNode.java   |  444 ++++
 .../adobe/ac/pmd/nodes/impl/IdentifierNode.java |   63 +
 .../adobe/ac/pmd/nodes/impl/MetaDataNode.java   |  139 ++
 .../adobe/ac/pmd/nodes/impl/NodeFactory.java    |   49 +
 .../adobe/ac/pmd/nodes/impl/PackageNode.java    |  167 ++
 .../adobe/ac/pmd/nodes/impl/VariableNode.java   |  224 ++
 .../adobe/ac/pmd/nodes/utils/AsDocUtils.java    |   60 +
 .../adobe/ac/pmd/nodes/utils/FunctionUtils.java |   53 +
 .../ac/pmd/rules/core/AbstractAstFlexRule.java  | 1164 +++++++++
 .../pmd/rules/core/AbstractAstFlexRuleTest.java |   67 +
 .../rules/core/AbstractFlexMetaDataRule.java    |  111 +
 .../ac/pmd/rules/core/AbstractFlexRule.java     |  354 +++
 .../ac/pmd/rules/core/AbstractFlexRuleTest.java |  264 ++
 .../rules/core/AbstractForbiddenImportRule.java |   58 +
 .../pmd/rules/core/AbstractPrimaryAstRule.java  |   86 +
 .../rules/core/AbstractRegExpBasedRuleTest.java |   76 +
 .../pmd/rules/core/AbstractRegexpBasedRule.java |  116 +
 .../rules/core/AbstractXpathRelatedRule.java    |  244 ++
 .../adobe/ac/pmd/rules/core/IFlexAstRule.java   |   28 +
 .../com/adobe/ac/pmd/rules/core/IFlexRule.java  |   53 +
 .../com/adobe/ac/pmd/rules/core/Violation.java  |  323 +++
 .../ac/pmd/rules/core/ViolationPosition.java    |  106 +
 .../ac/pmd/rules/core/ViolationPriority.java    |   45 +
 .../AbstractMaximizedAstFlexRule.java           |   60 +
 .../thresholded/AbstractMaximizedFlexRule.java  |   60 +
 .../AbstractMaximizedRegexpBasedRule.java       |   61 +
 .../core/thresholded/IThresholdedRule.java      |   45 +
 .../src/main/resources/flexPmd.properties       |   26 +
 .../adobe/ac/pmd/files/FileSetUtilsTest.java    |   47 +
 .../com/adobe/ac/pmd/nodes/MetaDataTest.java    |   55 +
 .../adobe/ac/pmd/nodes/impl/ClassNodeTest.java  |  174 ++
 .../ac/pmd/nodes/impl/CommentNodeTest.java      |  163 ++
 .../adobe/ac/pmd/nodes/impl/FieldNodeTest.java  |   84 +
 .../ac/pmd/nodes/impl/FunctionNodeTest.java     |  271 ++
 .../ac/pmd/nodes/impl/MetaDataNodeTest.java     |  119 +
 .../ac/pmd/nodes/impl/PackageNodeTest.java      |  126 +
 .../ac/pmd/nodes/impl/VariableNodeTest.java     |   77 +
 .../ac/pmd/nodes/utils/AsDocUtilsTest.java      |   63 +
 .../ac/pmd/nodes/utils/FunctionUtilsTest.java   |   60 +
 .../com/adobe/ac/pmd/rules/core/EmptyRule.java  |   79 +
 .../adobe/ac/pmd/rules/core/EmptyRuleTest.java  |  134 +
 .../adobe/ac/pmd/rules/core/FlexRuleTest.java   |   94 +
 .../adobe/ac/pmd/rules/core/IgnoreRuleTest.java |  129 +
 .../pmd/rules/core/TestAbstractAstFlexRule.java |  146 ++
 .../pmd/rules/core/ViolationPriorityTest.java   |   35 +
 .../adobe/ac/pmd/rules/core/ViolationTest.java  |  236 ++
 .../adobe/ac/pmd/rules/core/WarningRule.java    |   57 +
 ...ceforge.pmd.eclipse.plugin.pmdBuilder.launch |   25 +
 FlexPMD/flex-pmd-java/flex-pmd-ruleset/.pmd     |  935 +++++++
 FlexPMD/flex-pmd-java/flex-pmd-ruleset/pom.xml  |   83 +
 .../rules/architecture/MonkeyPatchingRule.java  |   72 +
 .../UseInternalClassOutsideApiClass.java        |  126 +
 .../ViewComponentReferencedInModelRule.java     |   87 +
 .../ac/pmd/rules/asdocs/AbstractAsDocRule.java  |   37 +
 .../rules/asdocs/AttributeAsDocMissingRule.java |   53 +
 .../pmd/rules/asdocs/ClassAsDocMissingRule.java |   60 +
 .../rules/asdocs/MethodAsDocMissingRule.java    |   53 +
 .../ac/pmd/rules/binding/BindingUtilsRule.java  |   48 +
 .../ac/pmd/rules/binding/ChangeWatcherRule.java |   48 +
 .../binding/TooLongBindingExpressionRule.java   |  115 +
 .../BadCairngormEventNameFormatRule.java        |  119 +
 .../cairngorm/BindableModelLocatorRule.java     |   64 +
 ...rngormEventDispatcherCallExplicitlyRule.java |   74 +
 .../pmd/rules/cairngorm/FatControllerRule.java  |   97 +
 ...catorReferencedMoreThanOncePerClassRule.java |   53 +
 ...delLocatorOutsideTheMainApplicationRule.java |   73 +
 .../rules/component/CallLaterDirectlyRule.java  |   62 +
 ...teChildrenNumberInUpdateDisplayListRule.java |   66 +
 .../ac/pmd/rules/css/StyleBlockInMxmlRule.java  |   68 +
 .../css/UseCssInsteadOfEmbedMetaDataRule.java   |   84 +
 .../pmd/rules/empty/AbstractEmptyBlockRule.java |   37 +
 .../rules/empty/EmptyCatchStatementRule.java    |   53 +
 .../ac/pmd/rules/empty/EmptyIfStmtRule.java     |   53 +
 .../rules/event/AbstractEventRelatedRule.java   |   54 +
 .../event/ConstructorDispatchingEventRule.java  |   65 +
 .../pmd/rules/event/DefaultEventNameRule.java   |   53 +
 .../event/DispatchHardCodedEventNameRule.java   |   80 +
 .../event/EventMissingCloneFunctionRule.java    |   82 +
 .../event/ListenForHardCodedEventNameRule.java  |   80 +
 .../event/PublicVariableInCustomEventRule.java  |   57 +
 .../rules/event/UnboundTypeInMetadataRule.java  |   83 +
 .../rules/event/UntypedEventMetadataRule.java   |   71 +
 .../ac/pmd/rules/flexunit/EmptyUnitTest.java    |   99 +
 .../pmd/rules/maintanability/AlertShowRule.java |   74 +
 .../ArrayFieldWithNoArrayElementTypeRule.java   |   93 +
 .../AvoidProtectedFieldInFinalClassRule.java    |   92 +
 .../maintanability/AvoidUseOfAsKeywordRule.java |   48 +
 .../AvoidUsingPublicStaticFieldRule.java        |   59 +
 .../AvoidUsingWithKeyWordRule.java              |   57 +
 .../ClassAndExtensionAreIdenticalRule.java      |   68 +
 .../rules/maintanability/DynamicClassRule.java  |   65 +
 .../maintanability/EmptyStatementRule.java      |   49 +
 .../maintanability/ExcessiveImportRule.java     |   80 +
 .../NonStaticConstantFieldRule.java             |   59 +
 .../rules/maintanability/OnlyOneReturnRule.java |   72 +
 .../ProtectedStaticMethodRule.java              |   54 +
 ...ToVariableBindingFromItsInitializerRule.java |   91 +
 .../maintanability/TrueFalseConditionRule.java  |   84 +
 .../UselessOverridenFunctionRule.java           |   82 +
 .../AbstractUseForbiddenTypeRule.java           |  119 +
 .../forbiddentypes/UseDictionaryTypeRule.java   |   46 +
 .../forbiddentypes/UseGenericTypeRule.java      |   48 +
 .../forbiddentypes/UseObjectTypeRule.java       |   92 +
 .../multiscreen/AvoidRollMouseEventRule.java    |   69 +
 .../pmd/rules/multiscreen/AvoidTooltipRule.java |   68 +
 .../AbstractMoreThanEntryPointInMxmlRule.java   |  110 +
 .../ac/pmd/rules/mxml/CodeBehindInMxmlRule.java |   68 +
 .../mxml/MoreThanOneEntryPointInMxmlRule.java   |   47 +
 .../mxml/MoreThanTwoEntryPointsInMxmlRule.java  |   47 +
 .../mxml/OnlyOneScriptBlockPerMxmlRule.java     |   97 +
 .../pmd/rules/mxml/StaticMethodInMxmlRule.java  |   66 +
 .../pmd/rules/mxml/TooLongScriptBlockRule.java  |   99 +
 .../pmd/rules/mxml/TooManyStatesInMxmlRule.java |  159 ++
 .../BooleanAttributeShouldContainIsHasRule.java |   75 +
 .../rules/naming/CapitalizeConstantsRule.java   |   51 +
 .../ac/pmd/rules/naming/IncorrectClassCase.java |   56 +
 .../naming/IncorrectEventHandlerNameRule.java   |   79 +
 .../pmd/rules/naming/InterfaceNamingRule.java   |   41 +
 .../ac/pmd/rules/naming/PackageCaseRule.java    |   76 +
 .../PropertyHiddenByLocalVariableRule.java      |   75 +
 .../rules/naming/TooLongFunctionNameRule.java   |   55 +
 .../pmd/rules/naming/TooShortVariableRule.java  |  151 ++
 .../VariableNameEndingWithNumericRule.java      |  111 +
 .../rules/naming/WronglyNamedVariableRule.java  |  121 +
 .../ParameterizedRegExpBasedRule.java           |   91 +
 .../rules/parsley/InaccessibleMetaDataRule.java |  100 +
 .../MessageInterceptorSignatureRule.java        |   91 +
 .../parsley/MismatchedManagedEventRule.java     |   86 +
 .../rules/parsley/MisplacedMetaDataRule.java    |  120 +
 ...edundantMessageHandlerTypeAttributeRule.java |   99 +
 .../parsley/RedundantMethodAttributeRule.java   |   80 +
 .../parsley/UnknownMetaDataAttributeRule.java   |   79 +
 .../ac/pmd/rules/parsley/utils/MetaDataTag.java |  102 +
 .../rules/parsley/utils/ParsleyMetaData.java    |  276 ++
 .../AbstractAvoidNodeInLoopRule.java            |   85 +
 .../performance/AvoidDeclarationInLoopRule.java |   37 +
 .../AvoidInstanciationInLoopRule.java           |   44 +
 .../performance/AvoidUsingMathCeilRule.java     |   74 +
 .../performance/AvoidUsingMathFloorRule.java    |   74 +
 .../performance/AvoidUsingMathRoundRule.java    |   74 +
 .../rules/performance/BindableClassRule.java    |   66 +
 .../performance/CreationPolicySetToAllRule.java |   70 +
 .../performance/CyclomaticComplexityRule.java   |   77 +
 .../rules/performance/DeeplyNestedIfRule.java   |  123 +
 .../performance/DynamicFiltersUsedInPopup.java  |   68 +
 .../rules/performance/HeavyConstructorRule.java |   90 +
 .../performance/RecursiveStyleManagerRule.java  |   58 +
 .../rules/performance/UseTraceFunctionRule.java |   62 +
 .../security/AllowAllSecureDomainRule.java      |  100 +
 .../rules/security/AllowInsecureDomainRule.java |   90 +
 .../security/ImportLoadBestPracticeRule.java    |   90 +
 .../security/InsecureExactSettingsRule.java     |   89 +
 .../pmd/rules/security/LSOSecureFalseRule.java  |   94 +
 .../rules/security/LocalConnectionStarRule.java |   96 +
 .../pmd/rules/sizing/TooLongFunctionRule.java   |   90 +
 .../pmd/rules/sizing/TooLongSwitchCaseRule.java |   80 +
 .../pmd/rules/sizing/TooManyFieldInVORule.java  |   47 +
 .../ac/pmd/rules/sizing/TooManyFieldsRule.java  |  107 +
 .../pmd/rules/sizing/TooManyFunctionRule.java   |  103 +
 .../pmd/rules/sizing/TooManyParametersRule.java |   85 +
 .../ac/pmd/rules/sizing/TooManyPublicRule.java  |  120 +
 .../ac/pmd/rules/style/BadFormatLoggerRule.java |   83 +
 .../ConstructorNonEmptyReturnTypeRule.java      |   53 +
 .../pmd/rules/style/CopyrightMissingRule.java   |   95 +
 .../rules/style/ImportFromSamePackageRule.java  |   61 +
 .../ac/pmd/rules/style/OverLongLineRule.java    |  114 +
 .../pmd/rules/style/TabUsedAsIndentorRule.java  |   48 +
 .../switchrules/IdenticalSwitchCasesRule.java   |   73 +
 .../pmd/rules/switchrules/NestedSwitchRule.java |   58 +
 .../switchrules/NonBreakableSwitchCaseRule.java |   41 +
 .../SwitchStatementsShouldHaveDefaultRule.java  |   75 +
 .../TooFewBrancheInSwitchStatementRule.java     |  144 ++
 .../unused/AbstractUnusedVariableRule.java      |  130 +
 .../rules/unused/EmptyPrivateMethodRule.java    |   41 +
 .../ac/pmd/rules/unused/UnusedFieldRule.java    |  128 +
 .../rules/unused/UnusedLocalVariableRule.java   |   76 +
 .../pmd/rules/unused/UnusedParameterRule.java   |  239 ++
 .../rules/unused/UnusedPrivateMethodRule.java   |  183 ++
 .../resources/com/adobe/ac/pmd/all_flex.xml     |   48 +
 .../resources/com/adobe/ac/pmd/default_flex.xml |   46 +
 .../com/adobe/ac/pmd/rulesets/architecture.xml  |  118 +
 .../com/adobe/ac/pmd/rulesets/asdocs.xml        |   50 +
 .../com/adobe/ac/pmd/rulesets/basic_mxml.xml    |   65 +
 .../com/adobe/ac/pmd/rulesets/binding.xml       |   70 +
 .../com/adobe/ac/pmd/rulesets/cairngorm.xml     |  134 +
 .../com/adobe/ac/pmd/rulesets/component.xml     |   43 +
 .../resources/com/adobe/ac/pmd/rulesets/css.xml |   41 +
 .../com/adobe/ac/pmd/rulesets/empty.xml         |   66 +
 .../com/adobe/ac/pmd/rulesets/event.xml         |  147 ++
 .../com/adobe/ac/pmd/rulesets/indentation.xml   |   31 +
 .../adobe/ac/pmd/rulesets/maintanability.xml    |  236 ++
 .../com/adobe/ac/pmd/rulesets/multitouch.xml    |   39 +
 .../com/adobe/ac/pmd/rulesets/naming.xml        |  162 ++
 .../com/adobe/ac/pmd/rulesets/parsley.xml       |  148 ++
 .../com/adobe/ac/pmd/rulesets/performance.xml   |  114 +
 .../com/adobe/ac/pmd/rulesets/security.xml      |   86 +
 .../com/adobe/ac/pmd/rulesets/sizing.xml        |  178 ++
 .../com/adobe/ac/pmd/rulesets/style.xml         |   86 +
 .../com/adobe/ac/pmd/rulesets/switches.xml      |  111 +
 .../com/adobe/ac/pmd/rulesets/unittest.xml      |   34 +
 .../com/adobe/ac/pmd/rulesets/unused.xml        |   82 +
 .../architecture/MonkeyPatchingRuleTest.java    |   38 +
 .../UseInternalClassOutsideApiClassTest.java    |   48 +
 .../ViewComponentReferencedInModelRuleTest.java |   58 +
 .../pmd/rules/asdocs/AbstractAsDocRuleTest.java |   67 +
 .../asdocs/AttributeAsDocMissingRuleTest.java   |   37 +
 .../rules/asdocs/ClassAsDocMissingRuleTest.java |   37 +
 .../asdocs/MethodAsDocMissingRuleTest.java      |   39 +
 .../pmd/rules/binding/BindingUtilsRuleTest.java |   38 +
 .../rules/binding/ChangeWatcherRuleTest.java    |   38 +
 .../TooLongBindingExpressionRuleTest.java       |   56 +
 .../BadCairngormEventNameFormatRuleTest.java    |   41 +
 .../cairngorm/BindableModelLocatorRuleTest.java |   38 +
 ...rmEventDispatcherCallExplicitlyRuleTest.java |   39 +
 .../rules/cairngorm/FatControllerRuleTest.java  |   38 +
 ...rReferencedMoreThanOncePerClassRuleTest.java |   38 +
 ...ocatorOutsideTheMainApplicationRuleTest.java |   60 +
 .../component/CallLaterDirectlyRuleTest.java    |   39 +
 ...ildrenNumberInUpdateDisplayListRuleTest.java |   41 +
 .../pmd/rules/css/StyleBlockInMxmlRuleTest.java |   66 +
 .../UseCssInsteadOfEmbedMetaDataRuleTest.java   |   38 +
 .../empty/EmptyCatchStatementRuleTest.java      |   38 +
 .../ac/pmd/rules/empty/EmptyIfStmtRuleTest.java |   49 +
 .../ConstructorDispatchingEventRuleTest.java    |   38 +
 .../rules/event/DefaultEventNameRuleTest.java   |   38 +
 .../DispatchHardCodedEventNameRuleTest.java     |   61 +
 .../EventMissingCloneFunctionRuleTest.java      |   41 +
 .../ListenForHardCodedEventNameRuleTest.java    |   57 +
 .../PublicVariableInCustomEventRuleTest.java    |   41 +
 .../event/UnboundTypeInMetadataRuleTest.java    |   40 +
 .../event/UntypedEventMetadataRuleTest.java     |   38 +
 .../pmd/rules/flexunit/EmptyUnitTestTest.java   |   41 +
 .../rules/maintanability/AlertShowRuleTest.java |   47 +
 ...rrayFieldWithNoArrayElementTypeRuleTest.java |   40 +
 ...AvoidProtectedFieldInFinalClassRuleTest.java |   39 +
 .../AvoidUseOfAsKeywordRuleTest.java            |   86 +
 .../AvoidUsingPublicStaticFieldRuleTest.java    |   40 +
 .../AvoidUsingWithKeyWordRuleTest.java          |   38 +
 .../ClassAndExtensionAreIdenticalRuleTest.java  |   38 +
 .../maintanability/DynamicClassRuleTest.java    |   38 +
 .../maintanability/EmptyStatementRuleTest.java  |   42 +
 .../maintanability/ExcessiveImportRuleTest.java |   42 +
 .../NonStaticConstantFieldRuleTest.java         |   51 +
 .../maintanability/OnlyOneReturnRuleTest.java   |   53 +
 .../ProtectedStaticMethodRuleTest.java          |   38 +
 ...riableBindingFromItsInitializerRuleTest.java |   41 +
 .../TrueFalseConditionRuleTest.java             |   56 +
 .../UselessOverridenFunctionRuleTest.java       |   40 +
 .../UseDictionaryTypeRuleTest.java              |   39 +
 .../forbiddenttypes/UseGenericTypeRuleTest.java |   54 +
 .../forbiddenttypes/UseObjectTypeRuleTest.java  |   54 +
 .../AvoidRollMouseEventRuleTest.java            |   59 +
 .../rules/multiscreen/AvoidTooltipRuleTest.java |   55 +
 ...bstractMoreThanEntryPointInMxmlRuleTest.java |   36 +
 .../rules/mxml/CodeBehindInMxmlRuleTest.java    |   55 +
 .../MoreThanOneEntryPointInMxmlRuleTest.java    |   43 +
 .../MoreThanTwoEntryPointsInMxmlRuleTest.java   |   43 +
 .../mxml/OnlyOneScriptBlockPerMxmlRuleTest.java |   40 +
 .../rules/mxml/StaticMethodInMxmlRuleTest.java  |   38 +
 .../rules/mxml/TooLongScriptBlockRuleTest.java  |   45 +
 .../rules/mxml/TooManyStatesInMxmlRuleTest.java |   38 +
 ...leanAttributeShouldContainIsHasRuleTest.java |   36 +
 .../naming/CapitalizeConstantsRuleTest.java     |   46 +
 .../rules/naming/IncorrectClassCaseTest.java    |   38 +
 .../IncorrectEventHandlerNameRuleTest.java      |   47 +
 .../rules/naming/InterfaceNamingRuleTest.java   |   43 +
 .../pmd/rules/naming/PackageCaseRuleTest.java   |   46 +
 .../PropertyHiddenByLocalVariableRuleTest.java  |   38 +
 .../naming/TooLongFunctionNameRuleTest.java     |   38 +
 .../rules/naming/TooShortVariableRuleTest.java  |   69 +
 .../VariableNameEndingWithNumericRuleTest.java  |   77 +
 .../naming/WronglyNamedVariableRuleTest.java    |   70 +
 .../ParameterizedRegExpBasedRuleTest.java       |   41 +
 ...rizedRegExpBasedRuleWithEmptyRegexpTest.java |   36 +
 .../parsley/InaccessibleMetaDataRuleTest.java   |   43 +
 .../MessageInterceptorSignatureRuleTest.java    |   40 +
 .../parsley/MismatchedManagedEventRuleTest.java |   38 +
 .../parsley/MisplacedMetaDataRuleTest.java      |   67 +
 ...dantMessageHandlerTypeAttributeRuleTest.java |   38 +
 .../RedundantMethodAttributeRuleTest.java       |   38 +
 .../UnknownMetaDataAttributeRuleTest.java       |   40 +
 .../AvoidDeclarationInLoopRuleTest.java         |  100 +
 .../AvoidInstanciationInLoopRuleTest.java       |   50 +
 .../performance/AvoidUsingMathCeilRuleTest.java |   36 +
 .../AvoidUsingMathFloorRuleTest.java            |   39 +
 .../AvoidUsingMathRoundRuleTest.java            |   38 +
 .../performance/BindableClassRuleTest.java      |   40 +
 .../CreationPolicySetToAllRuleTest.java         |   53 +
 .../CyclomaticComplexityRuleTest.java           |   45 +
 .../performance/DeeplyNestedIfRuleTest.java     |   46 +
 .../DynamicFiltersUsedInPopupTest.java          |   60 +
 .../performance/HeavyConstructorRuleTest.java   |   46 +
 .../RecursiveStyleManagerRuleTest.java          |   39 +
 .../performance/UseTraceFunctionRuleTest.java   |   43 +
 .../security/AllowAllSecureDomainRuleTest.java  |   82 +
 .../security/AllowInsecureDomainRuleTest.java   |   55 +
 .../ImportLoadBestPracticeRuleTest.java         |   52 +
 .../security/InsecureExactSettingsRuleTest.java |   55 +
 .../rules/security/LSOSecureFalseRuleTest.java  |   59 +
 .../security/LocalConnectionStarRuleTest.java   |   57 +
 .../rules/sizing/TooLongFunctionRuleTest.java   |   54 +
 .../rules/sizing/TooLongSwitchCaseRuleTest.java |   47 +
 .../rules/sizing/TooManyFieldInVORuleTest.java  |   38 +
 .../pmd/rules/sizing/TooManyFieldsRuleTest.java |   44 +
 .../rules/sizing/TooManyFunctionRuleTest.java   |   42 +
 .../rules/sizing/TooManyParametersRuleTest.java |   44 +
 .../pmd/rules/sizing/TooManyPublicRuleTest.java |   42 +
 .../rules/style/BadFormatLoggerRuleTest.java    |   41 +
 .../ConstructorNonEmptyReturnTypeRuleTest.java  |   38 +
 .../rules/style/CopyrightMissingRuleTest.java   |   42 +
 .../style/ImportFromSamePackageRuleTest.java    |   38 +
 .../pmd/rules/style/OverLongLineRuleTest.java   |   55 +
 .../rules/style/TabUsedAsIndentorRuleTest.java  |   99 +
 .../IdenticalSwitchCasesRuleTest.java           |   38 +
 .../rules/switchrules/NestedSwitchRuleTest.java |   40 +
 .../NonBreakableSwitchCaseRuleTest.java         |   38 +
 ...itchStatementsShouldHaveDefaultRuleTest.java |   42 +
 .../TooFewBrancheInSwitchStatementRuleTest.java |   40 +
 .../unused/EmptyPrivateMethodRuleTest.java      |   49 +
 .../pmd/rules/unused/UnusedFieldRuleTest.java   |   44 +
 .../unused/UnusedLocalVariableRuleTest.java     |   84 +
 .../rules/unused/UnusedParameterRuleTest.java   |   53 +
 .../unused/UnusedPrivateMethodRuleTest.java     |   49 +
 .../flex-pmd-test-resources/pom.xml             |   57 +
 .../src/main/assembly/resources.xml             |   31 +
 .../src/main/resources/test/AbstractRowData.as  |  136 +
 .../main/resources/test/AbstractRowData.mxml    |   44 +
 .../src/main/resources/test/BadComponent.as     |   43 +
 .../src/main/resources/test/Color.as            |   29 +
 .../src/main/resources/test/DefaultNameEvent.as |   36 +
 .../resources/test/DeleteButtonRenderer.mxml    |  101 +
 .../src/main/resources/test/ErrorToltipSkin.as  |  317 +++
 .../src/main/resources/test/GenericType.as      |   37 +
 .../src/main/resources/test/GoodComponent.as    |   51 +
 .../test/LinkButtonExample_Exception.mxml       |   38 +
 .../src/main/resources/test/Looping.as          |   68 +
 .../src/main/resources/test/Main.mxml           |   45 +
 .../resources/test/MainWithModelLocator.mxml    |   42 +
 .../resources/test/MainWithNoCopyright.mxml     |   22 +
 .../src/main/resources/test/PngEncoder.as       |  617 +++++
 .../src/main/resources/test/RadonDataGrid.as    |  200 ++
 .../src/main/resources/test/Responder.as        |   36 +
 .../src/main/resources/test/Simple.as           |   19 +
 .../src/main/resources/test/SkinStyles.as       |   65 +
 .../src/main/resources/test/Sorted.as           |   62 +
 .../src/main/resources/test/Title.as            |   33 +
 .../src/main/resources/test/UnboundMetadata.as  |   41 +
 .../src/main/resources/test/WorkEvent.as        |  205 ++
 .../main/resources/test/asDocs/EmptyClass.as    |   38 +
 .../resources/test/asDocs/EmptyWithDocClass.as  |   51 +
 .../src/main/resources/test/bug/Duane.mxml      |  154 ++
 .../src/main/resources/test/bug/FlexPMD115.as   |   30 +
 .../main/resources/test/bug/FlexPMD141a.mxml    |   32 +
 .../main/resources/test/bug/FlexPMD141b.mxml    |   34 +
 .../src/main/resources/test/bug/FlexPMD157.as   |   33 +
 .../src/main/resources/test/bug/FlexPMD173.as   |   40 +
 .../src/main/resources/test/bug/FlexPMD181.as   | 2344 +++++++++++++++++
 .../src/main/resources/test/bug/FlexPMD232.as   |   36 +
 .../main/resources/test/bug/FlexPMD233a.mxml    |   91 +
 .../main/resources/test/bug/FlexPMD233b.mxml    |  300 +++
 .../src/main/resources/test/bug/FlexPMD61.as    |   42 +
 .../src/main/resources/test/bug/FlexPMD62.as    |   35 +
 .../src/main/resources/test/bug/FlexPMD88.as    |   41 +
 .../src/main/resources/test/bug/FlexPMD97.as    |   31 +
 .../src/main/resources/test/bug/Nico.as         |   30 +
 .../src/main/resources/test/bug/Security.as     |   36 +
 .../test/cairngorm/BindableModelLocator.as      |   23 +
 .../resources/test/cairngorm/FatController.as   |  183 ++
 .../resources/test/cairngorm/LightController.as |  201 ++
 .../test/cairngorm/NonBindableModelLocator.as   |   54 +
 .../cairngorm/events/CorrectConstantEvent.as    |   45 +
 .../cairngorm/events/CorrectConstructorEvent.as |   38 +
 .../cairngorm/events/UncorrectConstantEvent.as  |   40 +
 .../events/UncorrectConstructorEvent.as         |   38 +
 .../test/com/adobe/ac/AbstractRowData.as        |  118 +
 .../src/main/resources/test/com/adobe/ac/foo.as |   22 +
 .../resources/test/com/adobe/ac/ncss/ArrayVO.as |   46 +
 .../test/com/adobe/ac/ncss/BigImporterModel.as  |   78 +
 .../test/com/adobe/ac/ncss/BigModel.as          |   90 +
 .../test/com/adobe/ac/ncss/ConfigProxy.as       |   50 +
 .../test/com/adobe/ac/ncss/LongSwitch.as        |  132 +
 .../com/adobe/ac/ncss/MyCairngormCommand.as     |   30 +
 .../test/com/adobe/ac/ncss/NestedSwitch.as      |   59 +
 .../test/com/adobe/ac/ncss/SearchBarEvent.as    |   34 +
 .../test/com/adobe/ac/ncss/VoidConstructor.as   |   37 +
 .../adobe/ac/ncss/event/DynamicCustomEvent.as   |   35 +
 .../com/adobe/ac/ncss/event/FirstCustomEvent.as |   30 +
 .../adobe/ac/ncss/event/SecondCustomEvent.as    |   28 +
 .../com/adobe/ac/ncss/mxml/IterationsList.mxml  |   90 +
 .../com/adobe/ac/ncss/mxml/IterationsList2.mxml |   44 +
 .../com/adobe/ac/ncss/mxml/NestedComponent.mxml |   43 +
 .../adobe/cairngorm/work/SequenceWorkFlow.as    |   19 +
 .../src/main/resources/test/empty/Empty.as      |   18 +
 .../src/main/resources/test/empty/Empty.mxml    |   18 +
 .../src/main/resources/test/filters/MyPopup.as  |   28 +
 .../main/resources/test/filters/MyPopup.mxml    |   32 +
 .../main/resources/test/flexpmd114/a/Test.as    |   39 +
 .../main/resources/test/flexpmd114/b/Test.as    |   35 +
 .../main/resources/test/flexpmd114/c/Test.as    |   35 +
 .../main/resources/test/flexunit/RaoulTest.as   |   69 +
 .../main/resources/test/flexunit/RulesetTest.as |   62 +
 .../main/resources/test/fu/main/flex/Main.mxml  |   22 +
 .../fu/main/flex/TestRunnerApplication.mxml     |   50 +
 .../main/resources/test/fu/test/flex/MySuite.as |   26 +
 .../main/resources/test/fu/test/flex/MyTest.as  |   46 +
 .../test/functional/FunctionalClient.as         |   29 +
 .../functional/func1/api/Func1ExposedClass.as   |   29 +
 .../func1/restricted/Func1RestrictedClass.as    |   29 +
 .../functional/func2/api/Func2ExposedClass.as   |   28 +
 .../func2/restricted/Func2RestrictedClass.as    |   28 +
 .../resources/test/mx/controls/DateChooser2.as  |   25 +
 .../org/as3commons/concurrency/thread/Color.as  |   25 +
 .../test/parsley/InaccessibleMetaData.as        |   53 +
 .../InaccessibleMetaDataInternalClass.as        |   25 +
 .../test/parsley/MessageInterceptorSignature.as |   47 +
 .../test/parsley/MismatchedManagedEvent.as      |   28 +
 .../resources/test/parsley/MisplacedMetaData.as |   65 +
 .../RedundantMessageHandlerTypeAttribute.as     |   35 +
 .../test/parsley/RedundantMethodAttribute.as    |   35 +
 .../test/parsley/UnknownMetaDataAttribute.as    |   32 +
 .../resources/test/pseudo/look/IEditLook.as     |   24 +
 .../main/resources/test/schedule_internal.as    |   22 +
 .../test/src/fw/data/request/ResultListener.as  |   27 +
 FlexPMD/flex-pmd-java/pom.xml                   |   56 +
 FlexPMD/flex-pmd-java/sonar.sh                  |   17 +
 FlexPMD/flex-pmd-maven-plugin/pom.xml           |  115 -
 .../adobe/ac/pmd/maven/AbstractFlexPmdMojo.java |  362 ---
 .../adobe/ac/pmd/maven/FlexPmdHtmlEngine.java   |  125 -
 .../com/adobe/ac/pmd/maven/FlexPmdMojo.java     |   40 -
 .../adobe/ac/pmd/maven/FlexPmdReportMojo.java   |   82 -
 .../com/adobe/ac/pmd/maven/FlexPmdMojoTest.java |   97 -
 .../ac/pmd/maven/FlexPmdReportMojoTest.java     |   86 -
 .../src/test/resources/rulesets/broken_pmd.xml  |  703 ------
 FlexPMD/flex-pmd-metrics-ant-task/.pmd          |  975 --------
 FlexPMD/flex-pmd-metrics-ant-task/pom.xml       |  152 --
 .../ac/pmd/metrics/ant/FlexMetricsAntTask.java  |   83 -
 .../pmd/metrics/ant/FlexMetricsAntTaskTest.java |   40 -
 FlexPMD/flex-pmd-metrics-command-line/.pmd      |  975 --------
 FlexPMD/flex-pmd-metrics-command-line/pom.xml   |  201 --
 .../ac/pmd/metrics/commandline/FlexMetrics.java |  126 -
 .../metrics/commandline/FlexMetricsTest.java    |   55 -
 .../metrics/commandline/FlexMetricsTest.java    |   55 -
 FlexPMD/flex-pmd-metrics-maven-plugin/.pmd      |  975 --------
 FlexPMD/flex-pmd-metrics-maven-plugin/pom.xml   |  102 -
 .../ac/pmd/metrics/maven/FlexMetricsMojo.java   |  201 --
 .../metrics/maven/FlexMetricsReportMojo.java    |  414 ---
 .../pmd/metrics/maven/utils/NcssExecuter.java   |   48 -
 .../src/main/resources/flexMetrics.properties   |   94 -
 .../pmd/metrics/maven/FlexMetricsMojoTest.java  |   60 -
 .../maven/FlexMetricsReportMojoTest.java        |   98 -
 FlexPMD/flex-pmd-metrics/.pmd                   |  975 --------
 FlexPMD/flex-pmd-metrics/pom.xml                |   98 -
 .../ac/pmd/metrics/AbstractNamedMetrics.java    |   38 -
 .../ac/pmd/metrics/AbstractPackagedMetrics.java |   89 -
 .../ac/pmd/metrics/AverageClassMetrics.java     |   57 -
 .../ac/pmd/metrics/AverageFunctionMetrics.java  |   39 -
 .../ac/pmd/metrics/AverageMetricsBase.java      |   53 -
 .../com/adobe/ac/pmd/metrics/ClassMetrics.java  |  128 -
 .../adobe/ac/pmd/metrics/FunctionMetrics.java   |   74 -
 .../java/com/adobe/ac/pmd/metrics/IMetrics.java |   22 -
 .../ac/pmd/metrics/InternalFunctionMetrics.java |   85 -
 .../com/adobe/ac/pmd/metrics/MetricUtils.java   |   70 -
 .../adobe/ac/pmd/metrics/PackageMetrics.java    |   95 -
 .../adobe/ac/pmd/metrics/ProjectMetrics.java    |  118 -
 .../ac/pmd/metrics/TotalPackageMetrics.java     |  107 -
 .../ac/pmd/metrics/engine/AbstractMetrics.java  |  234 --
 .../ac/pmd/metrics/engine/FlexMetrics.java      |  148 --
 .../adobe/ac/pmd/metrics/ClassMetricsTest.java  |  162 --
 .../metrics/InternalFunctionMetricsTest.java    |   46 -
 .../adobe/ac/pmd/metrics/MetricUtilsTest.java   |   43 -
 .../ac/pmd/metrics/PackageMetricsTest.java      |   72 -
 .../ac/pmd/metrics/engine/FlexMetricsTest.java  |  161 --
 FlexPMD/flex-pmd-parent/.pmd                    |   25 -
 FlexPMD/flex-pmd-parent/checkstyle.xml          |   78 -
 FlexPMD/flex-pmd-parent/cleanup.profile.xml     |   95 -
 .../flex-pmd-parent/flex-formatter.properties   |   74 -
 FlexPMD/flex-pmd-parent/java-formatter.xml      |  772 ------
 FlexPMD/flex-pmd-parent/pmd.xml                 |  249 --
 FlexPMD/flex-pmd-parent/pom.xml                 |  455 ----
 FlexPMD/flex-pmd-parent/projectSet.psf          |   49 -
 FlexPMD/flex-pmd-parent/src/etc/header.txt      |   14 -
 FlexPMD/flex-pmd-ruleset-api/.checkstyle        |   24 -
 FlexPMD/flex-pmd-ruleset-api/.pmd               |   25 -
 FlexPMD/flex-pmd-ruleset-api/pom.xml            |  109 -
 .../java/com/adobe/ac/pmd/IFlexViolation.java   |   54 -
 .../com/adobe/ac/pmd/files/FileSetUtils.java    |  179 --
 .../com/adobe/ac/pmd/nodes/IAsDocHolder.java    |   30 -
 .../java/com/adobe/ac/pmd/nodes/IAttribute.java |   24 -
 .../java/com/adobe/ac/pmd/nodes/IClass.java     |   81 -
 .../com/adobe/ac/pmd/nodes/ICommentHolder.java  |   32 -
 .../java/com/adobe/ac/pmd/nodes/IConstant.java  |   24 -
 .../java/com/adobe/ac/pmd/nodes/IField.java     |   28 -
 .../ac/pmd/nodes/IFieldInitialization.java      |   24 -
 .../java/com/adobe/ac/pmd/nodes/IFunction.java  |  100 -
 .../com/adobe/ac/pmd/nodes/IIdentifierNode.java |   25 -
 .../java/com/adobe/ac/pmd/nodes/IMetaData.java  |   47 -
 .../adobe/ac/pmd/nodes/IMetaDataListHolder.java |   46 -
 .../adobe/ac/pmd/nodes/IModifiersHolder.java    |   34 -
 .../java/com/adobe/ac/pmd/nodes/INamable.java   |   28 -
 .../com/adobe/ac/pmd/nodes/INamableNode.java    |   25 -
 .../main/java/com/adobe/ac/pmd/nodes/INode.java |   32 -
 .../java/com/adobe/ac/pmd/nodes/IPackage.java   |   50 -
 .../java/com/adobe/ac/pmd/nodes/IParameter.java |   24 -
 .../java/com/adobe/ac/pmd/nodes/IVariable.java  |   33 -
 .../java/com/adobe/ac/pmd/nodes/IVisible.java   |   28 -
 .../java/com/adobe/ac/pmd/nodes/MetaData.java   |   85 -
 .../java/com/adobe/ac/pmd/nodes/Modifier.java   |   78 -
 .../ac/pmd/nodes/asdoc/impl/AsDocNodeBase.java  |   42 -
 .../ac/pmd/nodes/asdoc/impl/ClassAsDocNode.java |   31 -
 .../pmd/nodes/asdoc/impl/FunctionAsDocNode.java |   54 -
 .../nodes/asdoc/impl/ParameterAsDocNode.java    |   55 -
 .../adobe/ac/pmd/nodes/impl/AbstractNode.java   |   90 -
 .../adobe/ac/pmd/nodes/impl/AttributeNode.java  |   44 -
 .../com/adobe/ac/pmd/nodes/impl/ClassNode.java  |  411 ---
 .../adobe/ac/pmd/nodes/impl/ConstantNode.java   |   44 -
 .../pmd/nodes/impl/FieldInitializationNode.java |   53 -
 .../com/adobe/ac/pmd/nodes/impl/FieldNode.java  |   94 -
 .../com/adobe/ac/pmd/nodes/impl/FormalNode.java |   53 -
 .../adobe/ac/pmd/nodes/impl/FunctionNode.java   |  444 ----
 .../adobe/ac/pmd/nodes/impl/IdentifierNode.java |   63 -
 .../adobe/ac/pmd/nodes/impl/MetaDataNode.java   |  139 --
 .../adobe/ac/pmd/nodes/impl/NodeFactory.java    |   49 -
 .../adobe/ac/pmd/nodes/impl/PackageNode.java    |  167 --
 .../adobe/ac/pmd/nodes/impl/VariableNode.java   |  224 --
 .../adobe/ac/pmd/nodes/utils/AsDocUtils.java    |   60 -
 .../adobe/ac/pmd/nodes/utils/FunctionUtils.java |   53 -
 .../ac/pmd/rules/core/AbstractAstFlexRule.java  | 1164 ---------
 .../pmd/rules/core/AbstractAstFlexRuleTest.java |   67 -
 .../rules/core/AbstractFlexMetaDataRule.java    |  111 -
 .../ac/pmd/rules/core/AbstractFlexRule.java     |  354 ---
 .../ac/pmd/rules/core/AbstractFlexRuleTest.java |  264 --
 .../rules/core/AbstractForbiddenImportRule.java |   58 -
 .../pmd/rules/core/AbstractPrimaryAstRule.java  |   86 -
 .../rules/core/AbstractRegExpBasedRuleTest.java |   76 -
 .../pmd/rules/core/AbstractRegexpBasedRule.java |  116 -
 .../rules/core/AbstractXpathRelatedRule.java    |  244 --
 .../adobe/ac/pmd/rules/core/IFlexAstRule.java   |   28 -
 .../com/adobe/ac/pmd/rules/core/IFlexRule.java  |   53 -
 .../com/adobe/ac/pmd/rules/core/Violation.java  |  323 ---
 .../ac/pmd/rules/core/ViolationPosition.java    |  106 -
 .../ac/pmd/rules/core/ViolationPriority.java    |   45 -
 .../AbstractMaximizedAstFlexRule.java           |   60 -
 .../thresholded/AbstractMaximizedFlexRule.java  |   60 -
 .../AbstractMaximizedRegexpBasedRule.java       |   61 -
 .../core/thresholded/IThresholdedRule.java      |   45 -
 .../src/main/resources/flexPmd.properties       |   26 -
 .../adobe/ac/pmd/files/FileSetUtilsTest.java    |   47 -
 .../com/adobe/ac/pmd/nodes/MetaDataTest.java    |   55 -
 .../adobe/ac/pmd/nodes/impl/ClassNodeTest.java  |  174 --
 .../ac/pmd/nodes/impl/CommentNodeTest.java      |  163 --
 .../adobe/ac/pmd/nodes/impl/FieldNodeTest.java  |   84 -
 .../ac/pmd/nodes/impl/FunctionNodeTest.java     |  271 --
 .../ac/pmd/nodes/impl/MetaDataNodeTest.java     |  119 -
 .../ac/pmd/nodes/impl/PackageNodeTest.java      |  126 -
 .../ac/pmd/nodes/impl/VariableNodeTest.java     |   77 -
 .../ac/pmd/nodes/utils/AsDocUtilsTest.java      |   63 -
 .../ac/pmd/nodes/utils/FunctionUtilsTest.java   |   60 -
 .../com/adobe/ac/pmd/rules/core/EmptyRule.java  |   79 -
 .../adobe/ac/pmd/rules/core/EmptyRuleTest.java  |  134 -
 .../adobe/ac/pmd/rules/core/FlexRuleTest.java   |   94 -
 .../adobe/ac/pmd/rules/core/IgnoreRuleTest.java |  129 -
 .../pmd/rules/core/TestAbstractAstFlexRule.java |  146 --
 .../pmd/rules/core/ViolationPriorityTest.java   |   35 -
 .../adobe/ac/pmd/rules/core/ViolationTest.java  |  236 --
 .../adobe/ac/pmd/rules/core/WarningRule.java    |   57 -
 .../flex-pmd-ruleset-creator/build.properties   |   41 -
 FlexPMD/flex-pmd-ruleset-creator/build.xml      |   75 -
 .../flexcover.properties                        |   89 -
 FlexPMD/flex-pmd-ruleset-creator/flexcover.xml  |  191 --
 .../html-template/index.template.html           |  121 -
 FlexPMD/flex-pmd-ruleset-creator/pom.xml        |  218 --
 .../src/main/flex/Main.mxml                     |  132 -
 .../src/main/flex/TestRunner-app.xml            |   45 -
 .../src/main/flex/TestViewRunner-app.xml        |   45 -
 .../src/main/flex/assets/add-10.png             |  Bin 3128 -> 0 bytes
 .../src/main/flex/assets/add-48.png             |  Bin 3141 -> 0 bytes
 .../src/main/flex/assets/arrow.ai               | 1121 ---------
 .../src/main/flex/assets/cancelledIcon.png      |  Bin 1094 -> 0 bytes
 .../src/main/flex/assets/down.png               |  Bin 926 -> 0 bytes
 .../src/main/flex/assets/icon_tool_trash.png    |  Bin 821 -> 0 bytes
 .../src/main/flex/assets/icon_tool_trash2.png   |  Bin 27190 -> 0 bytes
 .../src/main/flex/assets/todoLogo.png           |  Bin 1106 -> 0 bytes
 .../src/main/flex/assets/todoLogo_big.png       |  Bin 57083 -> 0 bytes
 .../src/main/flex/assets/up.png                 |  Bin 924 -> 0 bytes
 .../com/adobe/ac/pmd/api/IGetCustomRuleset.as   |   28 -
 .../com/adobe/ac/pmd/api/IGetRootRuleset.as     |   28 -
 .../flex/com/adobe/ac/pmd/control/Controller.as |   40 -
 .../control/commands/GetCustomRulesetCommand.as |   63 -
 .../control/commands/GetRootRulesetCommand.as   |   63 -
 .../commands/GetRulesetContentCommand.as        |   65 -
 .../pmd/control/events/GetCustomRulesetEvent.as |   48 -
 .../pmd/control/events/GetRootRulesetEvent.as   |   48 -
 .../adobe/ac/pmd/services/MyServiceLocator.mxml |   39 -
 .../ac/pmd/services/rulesets/RulesetDelegate.as |   96 -
 .../services/translators/PropertyTranslator.as  |   44 -
 .../translators/RootRulesetTranslator.as        |  107 -
 .../pmd/services/translators/RuleTranslator.as  |   98 -
 .../services/translators/RulesetTranslator.as   |   63 -
 .../flex/com/adobe/ac/pmd/view/RuleEditor.mxml  |  140 --
 .../flex/com/adobe/ac/pmd/view/RuleEditorPM.as  |   33 -
 .../com/adobe/ac/pmd/view/RuleSetNavigator.mxml |  160 --
 .../com/adobe/ac/pmd/view/RuleSetNavigatorPM.as |  162 --
 .../pmd/view/events/SelectedRuleChangeEvent.as  |   48 -
 .../view/renderers/DeleteButtonRenderer.mxml    |   77 -
 .../src/main/locales/en_US/Main.properties      |   15 -
 .../src/main/resources/placeholder.txt          |   16 -
 .../src/test/flex/AllTests.as                   |   42 -
 .../flex/com/adobe/ac/pmd/model/RulesetTest.as  |   72 -
 .../services/translators/RuleTranslatorTest.as  |   59 -
 .../translators/RulesetTranslatorTest.as        |   45 -
 .../adobe/ac/pmd/view/RuleSetNavigatorPMTest.as |   80 -
 ...ceforge.pmd.eclipse.plugin.pmdBuilder.launch |   25 -
 FlexPMD/flex-pmd-ruleset/.pmd                   |  935 -------
 FlexPMD/flex-pmd-ruleset/pom.xml                |   81 -
 .../rules/architecture/MonkeyPatchingRule.java  |   72 -
 .../UseInternalClassOutsideApiClass.java        |  126 -
 .../ViewComponentReferencedInModelRule.java     |   87 -
 .../ac/pmd/rules/asdocs/AbstractAsDocRule.java  |   37 -
 .../rules/asdocs/AttributeAsDocMissingRule.java |   53 -
 .../pmd/rules/asdocs/ClassAsDocMissingRule.java |   60 -
 .../rules/asdocs/MethodAsDocMissingRule.java    |   53 -
 .../ac/pmd/rules/binding/BindingUtilsRule.java  |   48 -
 .../ac/pmd/rules/binding/ChangeWatcherRule.java |   48 -
 .../binding/TooLongBindingExpressionRule.java   |  115 -
 .../BadCairngormEventNameFormatRule.java        |  119 -
 .../cairngorm/BindableModelLocatorRule.java     |   64 -
 ...rngormEventDispatcherCallExplicitlyRule.java |   74 -
 .../pmd/rules/cairngorm/FatControllerRule.java  |   97 -
 ...catorReferencedMoreThanOncePerClassRule.java |   53 -
 ...delLocatorOutsideTheMainApplicationRule.java |   73 -
 .../rules/component/CallLaterDirectlyRule.java  |   62 -
 ...teChildrenNumberInUpdateDisplayListRule.java |   66 -
 .../ac/pmd/rules/css/StyleBlockInMxmlRule.java  |   68 -
 .../css/UseCssInsteadOfEmbedMetaDataRule.java   |   84 -
 .../pmd/rules/empty/AbstractEmptyBlockRule.java |   37 -
 .../rules/empty/EmptyCatchStatementRule.java    |   53 -
 .../ac/pmd/rules/empty/EmptyIfStmtRule.java     |   53 -
 .../rules/event/AbstractEventRelatedRule.java   |   54 -
 .../event/ConstructorDispatchingEventRule.java  |   65 -
 .../pmd/rules/event/DefaultEventNameRule.java   |   53 -
 .../event/DispatchHardCodedEventNameRule.java   |   80 -
 .../event/EventMissingCloneFunctionRule.java    |   82 -
 .../event/ListenForHardCodedEventNameRule.java  |   80 -
 .../event/PublicVariableInCustomEventRule.java  |   57 -
 .../rules/event/UnboundTypeInMetadataRule.java  |   83 -
 .../rules/event/UntypedEventMetadataRule.java   |   71 -
 .../ac/pmd/rules/flexunit/EmptyUnitTest.java    |   99 -
 .../pmd/rules/maintanability/AlertShowRule.java |   74 -
 .../ArrayFieldWithNoArrayElementTypeRule.java   |   93 -
 .../AvoidProtectedFieldInFinalClassRule.java    |   92 -
 .../maintanability/AvoidUseOfAsKeywordRule.java |   48 -
 .../AvoidUsingPublicStaticFieldRule.java        |   59 -
 .../AvoidUsingWithKeyWordRule.java              |   57 -
 .../ClassAndExtensionAreIdenticalRule.java      |   68 -
 .../rules/maintanability/DynamicClassRule.java  |   65 -
 .../maintanability/EmptyStatementRule.java      |   49 -
 .../maintanability/ExcessiveImportRule.java     |   80 -
 .../NonStaticConstantFieldRule.java             |   59 -
 .../rules/maintanability/OnlyOneReturnRule.java |   72 -
 .../ProtectedStaticMethodRule.java              |   54 -
 ...ToVariableBindingFromItsInitializerRule.java |   91 -
 .../maintanability/TrueFalseConditionRule.java  |   84 -
 .../UselessOverridenFunctionRule.java           |   82 -
 .../AbstractUseForbiddenTypeRule.java           |  119 -
 .../forbiddentypes/UseDictionaryTypeRule.java   |   46 -
 .../forbiddentypes/UseGenericTypeRule.java      |   48 -
 .../forbiddentypes/UseObjectTypeRule.java       |   92 -
 .../multiscreen/AvoidRollMouseEventRule.java    |   69 -
 .../pmd/rules/multiscreen/AvoidTooltipRule.java |   68 -
 .../AbstractMoreThanEntryPointInMxmlRule.java   |  110 -
 .../ac/pmd/rules/mxml/CodeBehindInMxmlRule.java |   68 -
 .../mxml/MoreThanOneEntryPointInMxmlRule.java   |   47 -
 .../mxml/MoreThanTwoEntryPointsInMxmlRule.java  |   47 -
 .../mxml/OnlyOneScriptBlockPerMxmlRule.java     |   97 -
 .../pmd/rules/mxml/StaticMethodInMxmlRule.java  |   66 -
 .../pmd/rules/mxml/TooLongScriptBlockRule.java  |   99 -
 .../pmd/rules/mxml/TooManyStatesInMxmlRule.java |  159 --
 .../BooleanAttributeShouldContainIsHasRule.java |   75 -
 .../rules/naming/CapitalizeConstantsRule.java   |   51 -
 .../ac/pmd/rules/naming/IncorrectClassCase.java |   56 -
 .../naming/IncorrectEventHandlerNameRule.java   |   79 -
 .../pmd/rules/naming/InterfaceNamingRule.java   |   41 -
 .../ac/pmd/rules/naming/PackageCaseRule.java    |   76 -
 .../PropertyHiddenByLocalVariableRule.java      |   75 -
 .../rules/naming/TooLongFunctionNameRule.java   |   55 -
 .../pmd/rules/naming/TooShortVariableRule.java  |  151 --
 .../VariableNameEndingWithNumericRule.java      |  111 -
 .../rules/naming/WronglyNamedVariableRule.java  |  121 -
 .../ParameterizedRegExpBasedRule.java           |   91 -
 .../rules/parsley/InaccessibleMetaDataRule.java |  100 -
 .../MessageInterceptorSignatureRule.java        |   91 -
 .../parsley/MismatchedManagedEventRule.java     |   86 -
 .../rules/parsley/MisplacedMetaDataRule.java    |  120 -
 ...edundantMessageHandlerTypeAttributeRule.java |   99 -
 .../parsley/RedundantMethodAttributeRule.java   |   80 -
 .../parsley/UnknownMetaDataAttributeRule.java   |   79 -
 .../ac/pmd/rules/parsley/utils/MetaDataTag.java |  102 -
 .../rules/parsley/utils/ParsleyMetaData.java    |  276 --
 .../AbstractAvoidNodeInLoopRule.java            |   85 -
 .../performance/AvoidDeclarationInLoopRule.java |   37 -
 .../AvoidInstanciationInLoopRule.java           |   44 -
 .../performance/AvoidUsingMathCeilRule.java     |   74 -
 .../performance/AvoidUsingMathFloorRule.java    |   74 -
 .../performance/AvoidUsingMathRoundRule.java    |   74 -
 .../rules/performance/BindableClassRule.java    |   66 -
 .../performance/CreationPolicySetToAllRule.java |   70 -
 .../performance/CyclomaticComplexityRule.java   |   77 -
 .../rules/performance/DeeplyNestedIfRule.java   |  123 -
 .../performance/DynamicFiltersUsedInPopup.java  |   68 -
 .../rules/performance/HeavyConstructorRule.java |   90 -
 .../performance/RecursiveStyleManagerRule.java  |   58 -
 .../rules/performance/UseTraceFunctionRule.java |   62 -
 .../security/AllowAllSecureDomainRule.java      |  100 -
 .../rules/security/AllowInsecureDomainRule.java |   90 -
 .../security/ImportLoadBestPracticeRule.java    |   90 -
 .../security/InsecureExactSettingsRule.java     |   89 -
 .../pmd/rules/security/LSOSecureFalseRule.java  |   94 -
 .../rules/security/LocalConnectionStarRule.java |   96 -
 .../pmd/rules/sizing/TooLongFunctionRule.java   |   90 -
 .../pmd/rules/sizing/TooLongSwitchCaseRule.java |   80 -
 .../pmd/rules/sizing/TooManyFieldInVORule.java  |   47 -
 .../ac/pmd/rules/sizing/TooManyFieldsRule.java  |  107 -
 .../pmd/rules/sizing/TooManyFunctionRule.java   |  103 -
 .../pmd/rules/sizing/TooManyParametersRule.java |   85 -
 .../ac/pmd/rules/sizing/TooManyPublicRule.java  |  120 -
 .../ac/pmd/rules/style/BadFormatLoggerRule.java |   83 -
 .../ConstructorNonEmptyReturnTypeRule.java      |   53 -
 .../pmd/rules/style/CopyrightMissingRule.java   |   95 -
 .../rules/style/ImportFromSamePackageRule.java  |   61 -
 .../ac/pmd/rules/style/OverLongLineRule.java    |  114 -
 .../pmd/rules/style/TabUsedAsIndentorRule.java  |   48 -
 .../switchrules/IdenticalSwitchCasesRule.java   |   73 -
 .../pmd/rules/switchrules/NestedSwitchRule.java |   58 -
 .../switchrules/NonBreakableSwitchCaseRule.java |   41 -
 .../SwitchStatementsShouldHaveDefaultRule.java  |   75 -
 .../TooFewBrancheInSwitchStatementRule.java     |  144 --
 .../unused/AbstractUnusedVariableRule.java      |  130 -
 .../rules/unused/EmptyPrivateMethodRule.java    |   41 -
 .../ac/pmd/rules/unused/UnusedFieldRule.java    |  128 -
 .../rules/unused/UnusedLocalVariableRule.java   |   76 -
 .../pmd/rules/unused/UnusedParameterRule.java   |  239 --
 .../rules/unused/UnusedPrivateMethodRule.java   |  183 --
 .../resources/com/adobe/ac/pmd/all_flex.xml     |   48 -
 .../resources/com/adobe/ac/pmd/default_flex.xml |   46 -
 .../com/adobe/ac/pmd/rulesets/architecture.xml  |  118 -
 .../com/adobe/ac/pmd/rulesets/asdocs.xml        |   50 -
 .../com/adobe/ac/pmd/rulesets/basic_mxml.xml    |   65 -
 .../com/adobe/ac/pmd/rulesets/binding.xml       |   70 -
 .../com/adobe/ac/pmd/rulesets/cairngorm.xml     |  134 -
 .../com/adobe/ac/pmd/rulesets/component.xml     |   43 -
 .../resources/com/adobe/ac/pmd/rulesets/css.xml |   41 -
 .../com/adobe/ac/pmd/rulesets/empty.xml         |   66 -
 .../com/adobe/ac/pmd/rulesets/event.xml         |  147 --
 .../com/adobe/ac/pmd/rulesets/indentation.xml   |   31 -
 .../adobe/ac/pmd/rulesets/maintanability.xml    |  236 --
 .../com/adobe/ac/pmd/rulesets/multitouch.xml    |   39 -
 .../com/adobe/ac/pmd/rulesets/naming.xml        |  162 --
 .../com/adobe/ac/pmd/rulesets/parsley.xml       |  148 --
 .../com/adobe/ac/pmd/rulesets/performance.xml   |  114 -
 .../com/adobe/ac/pmd/rulesets/security.xml      |   86 -
 .../com/adobe/ac/pmd/rulesets/sizing.xml        |  178 --
 .../com/adobe/ac/pmd/rulesets/style.xml         |   86 -
 .../com/adobe/ac/pmd/rulesets/switches.xml      |  111 -
 .../com/adobe/ac/pmd/rulesets/unittest.xml      |   34 -
 .../com/adobe/ac/pmd/rulesets/unused.xml        |   82 -
 .../architecture/MonkeyPatchingRuleTest.java    |   38 -
 .../UseInternalClassOutsideApiClassTest.java    |   48 -
 .../ViewComponentReferencedInModelRuleTest.java |   58 -
 .../pmd/rules/asdocs/AbstractAsDocRuleTest.java |   67 -
 .../asdocs/AttributeAsDocMissingRuleTest.java   |   37 -
 .../rules/asdocs/ClassAsDocMissingRuleTest.java |   37 -
 .../asdocs/MethodAsDocMissingRuleTest.java      |   39 -
 .../pmd/rules/binding/BindingUtilsRuleTest.java |   38 -
 .../rules/binding/ChangeWatcherRuleTest.java    |   38 -
 .../TooLongBindingExpressionRuleTest.java       |   56 -
 .../BadCairngormEventNameFormatRuleTest.java    |   41 -
 .../cairngorm/BindableModelLocatorRuleTest.java |   38 -
 ...rmEventDispatcherCallExplicitlyRuleTest.java |   39 -
 .../rules/cairngorm/FatControllerRuleTest.java  |   38 -
 ...rReferencedMoreThanOncePerClassRuleTest.java |   38 -
 ...ocatorOutsideTheMainApplicationRuleTest.java |   60 -
 .../component/CallLaterDirectlyRuleTest.java    |   39 -
 ...ildrenNumberInUpdateDisplayListRuleTest.java |   41 -
 .../pmd/rules/css/StyleBlockInMxmlRuleTest.java |   66 -
 .../UseCssInsteadOfEmbedMetaDataRuleTest.java   |   38 -
 .../empty/EmptyCatchStatementRuleTest.java      |   38 -
 .../ac/pmd/rules/empty/EmptyIfStmtRuleTest.java |   49 -
 .../ConstructorDispatchingEventRuleTest.java    |   38 -
 .../rules/event/DefaultEventNameRuleTest.java   |   38 -
 .../DispatchHardCodedEventNameRuleTest.java     |   61 -
 .../EventMissingCloneFunctionRuleTest.java      |   41 -
 .../ListenForHardCodedEventNameRuleTest.java    |   57 -
 .../PublicVariableInCustomEventRuleTest.java    |   41 -
 .../event/UnboundTypeInMetadataRuleTest.java    |   40 -
 .../event/UntypedEventMetadataRuleTest.java     |   38 -
 .../pmd/rules/flexunit/EmptyUnitTestTest.java   |   41 -
 .../rules/maintanability/AlertShowRuleTest.java |   47 -
 ...rrayFieldWithNoArrayElementTypeRuleTest.java |   40 -
 ...AvoidProtectedFieldInFinalClassRuleTest.java |   39 -
 .../AvoidUseOfAsKeywordRuleTest.java            |   86 -
 .../AvoidUsingPublicStaticFieldRuleTest.java    |   40 -
 .../AvoidUsingWithKeyWordRuleTest.java          |   38 -
 .../ClassAndExtensionAreIdenticalRuleTest.java  |   38 -
 .../maintanability/DynamicClassRuleTest.java    |   38 -
 .../maintanability/EmptyStatementRuleTest.java  |   42 -
 .../maintanability/ExcessiveImportRuleTest.java |   42 -
 .../NonStaticConstantFieldRuleTest.java         |   51 -
 .../maintanability/OnlyOneReturnRuleTest.java   |   53 -
 .../ProtectedStaticMethodRuleTest.java          |   38 -
 ...riableBindingFromItsInitializerRuleTest.java |   41 -
 .../TrueFalseConditionRuleTest.java             |   56 -
 .../UselessOverridenFunctionRuleTest.java       |   40 -
 .../UseDictionaryTypeRuleTest.java              |   39 -
 .../forbiddenttypes/UseGenericTypeRuleTest.java |   54 -
 .../forbiddenttypes/UseObjectTypeRuleTest.java  |   54 -
 .../AvoidRollMouseEventRuleTest.java            |   59 -
 .../rules/multiscreen/AvoidTooltipRuleTest.java |   55 -
 ...bstractMoreThanEntryPointInMxmlRuleTest.java |   36 -
 .../rules/mxml/CodeBehindInMxmlRuleTest.java    |   55 -
 .../MoreThanOneEntryPointInMxmlRuleTest.java    |   43 -
 .../MoreThanTwoEntryPointsInMxmlRuleTest.java   |   43 -
 .../mxml/OnlyOneScriptBlockPerMxmlRuleTest.java |   40 -
 .../rules/mxml/StaticMethodInMxmlRuleTest.java  |   38 -
 .../rules/mxml/TooLongScriptBlockRuleTest.java  |   45 -
 .../rules/mxml/TooManyStatesInMxmlRuleTest.java |   38 -
 ...leanAttributeShouldContainIsHasRuleTest.java |   36 -
 .../naming/CapitalizeConstantsRuleTest.java     |   46 -
 .../rules/naming/IncorrectClassCaseTest.java    |   38 -
 .../IncorrectEventHandlerNameRuleTest.java      |   47 -
 .../rules/naming/InterfaceNamingRuleTest.java   |   43 -
 .../pmd/rules/naming/PackageCaseRuleTest.java   |   46 -
 .../PropertyHiddenByLocalVariableRuleTest.java  |   38 -
 .../naming/TooLongFunctionNameRuleTest.java     |   38 -
 .../rules/naming/TooShortVariableRuleTest.java  |   69 -
 .../VariableNameEndingWithNumericRuleTest.java  |   77 -
 .../naming/WronglyNamedVariableRuleTest.java    |   70 -
 .../ParameterizedRegExpBasedRuleTest.java       |   41 -
 ...rizedRegExpBasedRuleWithEmptyRegexpTest.java |   36 -
 .../parsley/InaccessibleMetaDataRuleTest.java   |   43 -
 .../MessageInterceptorSignatureRuleTest.java    |   40 -
 .../parsley/MismatchedManagedEventRuleTest.java |   38 -
 .../parsley/MisplacedMetaDataRuleTest.java      |   67 -
 ...dantMessageHandlerTypeAttributeRuleTest.java |   38 -
 .../RedundantMethodAttributeRuleTest.java       |   38 -
 .../UnknownMetaDataAttributeRuleTest.java       |   40 -
 .../AvoidDeclarationInLoopRuleTest.java         |  100 -
 .../AvoidInstanciationInLoopRuleTest.java       |   50 -
 .../performance/AvoidUsingMathCeilRuleTest.java |   36 -
 .../AvoidUsingMathFloorRuleTest.java            |   39 -
 .../AvoidUsingMathRoundRuleTest.java            |   38 -
 .../performance/BindableClassRuleTest.java      |   40 -
 .../CreationPolicySetToAllRuleTest.java         |   53 -
 .../CyclomaticComplexityRuleTest.java           |   45 -
 .../performance/DeeplyNestedIfRuleTest.java     |   46 -
 .../DynamicFiltersUsedInPopupTest.java          |   60 -
 .../performance/HeavyConstructorRuleTest.java   |   46 -
 .../RecursiveStyleManagerRuleTest.java          |   39 -
 .../performance/UseTraceFunctionRuleTest.java   |   43 -
 .../security/AllowAllSecureDomainRuleTest.java  |   82 -
 .../security/AllowInsecureDomainRuleTest.java   |   55 -
 .../ImportLoadBestPracticeRuleTest.java         |   52 -
 .../security/InsecureExactSettingsRuleTest.java |   55 -
 .../rules/security/LSOSecureFalseRuleTest.java  |   59 -
 .../security/LocalConnectionStarRuleTest.java   |   57 -
 .../rules/sizing/TooLongFunctionRuleTest.java   |   54 -
 .../rules/sizing/TooLongSwitchCaseRuleTest.java |   47 -
 .../rules/sizing/TooManyFieldInVORuleTest.java  |   38 -
 .../pmd/rules/sizing/TooManyFieldsRuleTest.java |   44 -
 .../rules/sizing/TooManyFunctionRuleTest.java   |   42 -
 .../rules/sizing/TooManyParametersRuleTest.java |   44 -
 .../pmd/rules/sizing/TooManyPublicRuleTest.java |   42 -
 .../rules/style/BadFormatLoggerRuleTest.java    |   41 -
 .../ConstructorNonEmptyReturnTypeRuleTest.java  |   38 -
 .../rules/style/CopyrightMissingRuleTest.java   |   42 -
 .../style/ImportFromSamePackageRuleTest.java    |   38 -
 .../pmd/rules/style/OverLongLineRuleTest.java   |   55 -
 .../rules/style/TabUsedAsIndentorRuleTest.java  |   99 -
 .../IdenticalSwitchCasesRuleTest.java           |   38 -
 .../rules/switchrules/NestedSwitchRuleTest.java |   40 -
 .../NonBreakableSwitchCaseRuleTest.java         |   38 -
 ...itchStatementsShouldHaveDefaultRuleTest.java |   42 -
 .../TooFewBrancheInSwitchStatementRuleTest.java |   40 -
 .../unused/EmptyPrivateMethodRuleTest.java      |   49 -
 .../pmd/rules/unused/UnusedFieldRuleTest.java   |   44 -
 .../unused/UnusedLocalVariableRuleTest.java     |   84 -
 .../rules/unused/UnusedParameterRuleTest.java   |   53 -
 .../unused/UnusedPrivateMethodRuleTest.java     |   49 -
 FlexPMD/flex-pmd-test-resources/pom.xml         |   56 -
 .../src/main/assembly/resources.xml             |   31 -
 .../src/main/resources/test/AbstractRowData.as  |  136 -
 .../main/resources/test/AbstractRowData.mxml    |   44 -
 .../src/main/resources/test/BadComponent.as     |   43 -
 .../src/main/resources/test/Color.as            |   29 -
 .../src/main/resources/test/DefaultNameEvent.as |   36 -
 .../resources/test/DeleteButtonRenderer.mxml    |  101 -
 .../src/main/resources/test/ErrorToltipSkin.as  |  317 ---
 .../src/main/resources/test/GenericType.as      |   37 -
 .../src/main/resources/test/GoodComponent.as    |   51 -
 .../test/LinkButtonExample_Exception.mxml       |   38 -
 .../src/main/resources/test/Looping.as          |   68 -
 .../src/main/resources/test/Main.mxml           |   45 -
 .../resources/test/MainWithModelLocator.mxml    |   42 -
 .../resources/test/MainWithNoCopyright.mxml     |   22 -
 .../src/main/resources/test/PngEncoder.as       |  617 -----
 .../src/main/resources/test/RadonDataGrid.as    |  200 --
 .../src/main/resources/test/Responder.as        |   36 -
 .../src/main/resources/test/Simple.as           |   19 -
 .../src/main/resources/test/SkinStyles.as       |   65 -
 .../src/main/resources/test/Sorted.as           |   62 -
 .../src/main/resources/test/Title.as            |   33 -
 .../src/main/resources/test/UnboundMetadata.as  |   41 -
 .../src/main/resources/test/WorkEvent.as        |  205 --
 .../main/resources/test/asDocs/EmptyClass.as    |   38 -
 .../resources/test/asDocs/EmptyWithDocClass.as  |   51 -
 .../src/main/resources/test/bug/Duane.mxml      |  154 --
 .../src/main/resources/test/bug/FlexPMD115.as   |   30 -
 .../main/resources/test/bug/FlexPMD141a.mxml    |   32 -
 .../main/resources/test/bug/FlexPMD141b.mxml    |   34 -
 .../src/main/resources/test/bug/FlexPMD157.as   |   33 -
 .../src/main/resources/test/bug/FlexPMD173.as   |   40 -
 .../src/main/resources/test/bug/FlexPMD181.as   | 2344 -----------------
 .../src/main/resources/test/bug/FlexPMD232.as   |   36 -
 .../main/resources/test/bug/FlexPMD233a.mxml    |   91 -
 .../main/resources/test/bug/FlexPMD233b.mxml    |  300 ---
 .../src/main/resources/test/bug/FlexPMD61.as    |   42 -
 .../src/main/resources/test/bug/FlexPMD62.as    |   35 -
 .../src/main/resources/test/bug/FlexPMD88.as    |   41 -
 .../src/main/resources/test/bug/FlexPMD97.as    |   31 -
 .../src/main/resources/test/bug/Nico.as         |   30 -
 .../src/main/resources/test/bug/Security.as     |   36 -
 .../test/cairngorm/BindableModelLocator.as      |   23 -
 .../resources/test/cairngorm/FatController.as   |  183 --
 .../resources/test/cairngorm/LightController.as |  201 --
 .../test/cairngorm/NonBindableModelLocator.as   |   54 -
 .../cairngorm/events/CorrectConstantEvent.as    |   45 -
 .../cairngorm/events/CorrectConstructorEvent.as |   38 -
 .../cairngorm/events/UncorrectConstantEvent.as  |   40 -
 .../events/UncorrectConstructorEvent.as         |   38 -
 .../test/com/adobe/ac/AbstractRowData.as        |  118 -
 .../src/main/resources/test/com/adobe/ac/foo.as |   22 -
 .../resources/test/com/adobe/ac/ncss/ArrayVO.as |   46 -
 .../test/com/adobe/ac/ncss/BigImporterModel.as  |   78 -
 .../test/com/adobe/ac/ncss/BigModel.as          |   90 -
 .../test/com/adobe/ac/ncss/ConfigProxy.as       |   50 -
 .../test/com/adobe/ac/ncss/LongSwitch.as        |  132 -
 .../com/adobe/ac/ncss/MyCairngormCommand.as     |   30 -
 .../test/com/adobe/ac/ncss/NestedSwitch.as      |   59 -
 .../test/com/adobe/ac/ncss/SearchBarEvent.as    |   34 -
 .../test/com/adobe/ac/ncss/VoidConstructor.as   |   37 -
 .../adobe/ac/ncss/event/DynamicCustomEvent.as   |   35 -
 .../com/adobe/ac/ncss/event/FirstCustomEvent.as |   30 -
 .../adobe/ac/ncss/event/SecondCustomEvent.as    |   28 -
 .../com/adobe/ac/ncss/mxml/IterationsList.mxml  |   90 -
 .../com/adobe/ac/ncss/mxml/IterationsList2.mxml |   44 -
 .../com/adobe/ac/ncss/mxml/NestedComponent.mxml |   43 -
 .../adobe/cairngorm/work/SequenceWorkFlow.as    |   19 -
 .../src/main/resources/test/empty/Empty.as      |   18 -
 .../src/main/resources/test/empty/Empty.mxml    |   18 -
 .../src/main/resources/test/filters/MyPopup.as  |   28 -
 .../main/resources/test/filters/MyPopup.mxml    |   32 -
 .../main/resources/test/flexpmd114/a/Test.as    |   39 -
 .../main/resources/test/flexpmd114/b/Test.as    |   35 -
 .../main/resources/test/flexpmd114/c/Test.as    |   35 -
 .../main/resources/test/flexunit/RaoulTest.as   |   69 -
 .../main/resources/test/flexunit/RulesetTest.as |   62 -
 .../main/resources/test/fu/main/flex/Main.mxml  |   22 -
 .../fu/main/flex/TestRunnerApplication.mxml     |   50 -
 .../main/resources/test/fu/test/flex/MySuite.as |   26 -
 .../main/resources/test/fu/test/flex/MyTest.as  |   46 -
 .../test/functional/FunctionalClient.as         |   29 -
 .../functional/func1/api/Func1ExposedClass.as   |   29 -
 .../func1/restricted/Func1RestrictedClass.as    |   29 -
 .../functional/func2/api/Func2ExposedClass.as   |   28 -
 .../func2/restricted/Func2RestrictedClass.as    |   28 -
 .../resources/test/mx/controls/DateChooser2.as  |   25 -
 .../org/as3commons/concurrency/thread/Color.as  |   25 -
 .../test/parsley/InaccessibleMetaData.as        |   53 -
 .../InaccessibleMetaDataInternalClass.as        |   25 -
 .../test/parsley/MessageInterceptorSignature.as |   47 -
 .../test/parsley/MismatchedManagedEvent.as      |   28 -
 .../resources/test/parsley/MisplacedMetaData.as |   65 -
 .../RedundantMessageHandlerTypeAttribute.as     |   35 -
 .../test/parsley/RedundantMethodAttribute.as    |   35 -
 .../test/parsley/UnknownMetaDataAttribute.as    |   32 -
 .../resources/test/pseudo/look/IEditLook.as     |   24 -
 .../main/resources/test/schedule_internal.as    |   22 -
 .../test/src/fw/data/request/ResultListener.as  |   27 -
 .../html-template/index.template.html           |  121 -
 FlexPMD/flex-pmd-violations-viewer/pom.xml      |  191 --
 .../src/main/flex/Main.mxml                     |   87 -
 .../src/main/flex/TestRunner.mxml               |   24 -
 .../com/adobe/ac/pmd/model/CharacterPosition.as |   44 -
 .../main/flex/com/adobe/ac/pmd/model/File.as    |   48 -
 .../flex/com/adobe/ac/pmd/model/Violation.as    |   82 -
 .../com/adobe/ac/pmd/model/ViolationPosition.as |   44 -
 .../com/adobe/ac/pmd/view/FilterResults.mxml    |   67 -
 .../com/adobe/ac/pmd/view/ResultsFormatter.as   |   41 -
 .../flex/com/adobe/ac/pmd/view/ResultsView.mxml |  142 --
 .../adobe/ac/pmd/view/SelectedViolation.mxml    |  151 --
 .../flex/com/adobe/ac/pmd/view/Summary.mxml     |   69 -
 .../flex/com/adobe/ac/pmd/view/UploadView.mxml  |   44 -
 .../adobe/ac/pmd/view/model/ResultsFilter.as    |   50 -
 .../com/adobe/ac/pmd/view/model/ResultsModel.as |  138 -
 .../com/adobe/ac/pmd/view/model/UploadModel.as  |  135 -
 .../adobe/ac/pmd/view/model/ViolationsModel.as  |   84 -
 .../src/test/flex/AllTests.as                   |   30 -
 FlexPMD/flexunit-theme/pom.xml                  |   84 -
 .../src/main/resources/assets/cancelledIcon.png |  Bin 1094 -> 0 bytes
 .../src/main/resources/assets/export.png        |  Bin 1205 -> 0 bytes
 .../main/resources/assets/icon_tool_trash.png   |  Bin 821 -> 0 bytes
 .../main/resources/assets/icon_tool_trash2.png  |  Bin 27190 -> 0 bytes
 .../src/main/resources/assets/todoLogo.png      |  Bin 1106 -> 0 bytes
 .../src/main/resources/assets/todoLogo_big.png  |  Bin 57083 -> 0 bytes
 .../src/main/resources/css/default.css          |  285 ---
 .../skins/ButtonBarButton_disabledSkin.png      |  Bin 1439 -> 0 bytes
 .../skins/ButtonBarButton_downSkin.png          |  Bin 1468 -> 0 bytes
 .../skins/ButtonBarButton_overSkin.png          |  Bin 1471 -> 0 bytes
 .../ButtonBarButton_selectedDisabledSkin.png    |  Bin 1455 -> 0 bytes
 .../skins/ButtonBarButton_selectedUpSkin.png    |  Bin 1469 -> 0 bytes
 .../resources/skins/ButtonBarButton_upSkin.png  |  Bin 1445 -> 0 bytes
 .../skins/ButtonBarFirstButton_disabledSkin.png |  Bin 1496 -> 0 bytes
 .../skins/ButtonBarFirstButton_downSkin.png     |  Bin 1497 -> 0 bytes
 .../skins/ButtonBarFirstButton_overSkin.png     |  Bin 1511 -> 0 bytes
 ...uttonBarFirstButton_selectedDisabledSkin.png |  Bin 1484 -> 0 bytes
 .../ButtonBarFirstButton_selectedUpSkin.png     |  Bin 1498 -> 0 bytes
 .../skins/ButtonBarFirstButton_upSkin.png       |  Bin 1490 -> 0 bytes
 .../skins/ButtonBarLastButton_disabledSkin.png  |  Bin 1489 -> 0 bytes
 .../skins/ButtonBarLastButton_downSkin.png      |  Bin 1520 -> 0 bytes
 .../skins/ButtonBarLastButton_overSkin.png      |  Bin 1499 -> 0 bytes
 ...ButtonBarLastButton_selectedDisabledSkin.png |  Bin 1489 -> 0 bytes
 .../ButtonBarLastButton_selectedUpSkin.png      |  Bin 1506 -> 0 bytes
 .../skins/ButtonBarLastButton_upSkin.png        |  Bin 1501 -> 0 bytes
 .../resources/skins/Button_disabledSkin.png     |  Bin 1509 -> 0 bytes
 .../main/resources/skins/Button_downSkin.png    |  Bin 1530 -> 0 bytes
 .../main/resources/skins/Button_overSkin.png    |  Bin 1535 -> 0 bytes
 .../src/main/resources/skins/Button_upSkin.png  |  Bin 1528 -> 0 bytes
 .../skins/CursorManager_busyCursor.png          |  Bin 2001 -> 0 bytes
 .../resources/skins/DataGrid_borderSkin.png     |  Bin 1497 -> 0 bytes
 .../skins/DataGrid_columnDropIndicatorSkin.png  |  Bin 1287 -> 0 bytes
 .../skins/DataGrid_columnResizeSkin.png         |  Bin 1248 -> 0 bytes
 .../skins/DataGrid_headerBackgroundSkin.png     |  Bin 1323 -> 0 bytes
 .../skins/DataGrid_headerSeparatorSkin.png      |  Bin 1240 -> 0 bytes
 .../resources/skins/DataGrid_sortArrowSkin.png  |  Bin 1336 -> 0 bytes
 .../resources/skins/DataGrid_stretchCursor.png  |  Bin 1461 -> 0 bytes
 .../resources/skins/FormItem_indicatorSkin.png  |  Bin 1327 -> 0 bytes
 .../skins/HScrollArrowLeft_disabledSkin.png     |  Bin 1277 -> 0 bytes
 .../skins/HScrollArrowRight_disabledSkin.png    |  Bin 1796 -> 0 bytes
 .../skins/HScrollBar_leftArrowDownSkin.png      |  Bin 1325 -> 0 bytes
 .../skins/HScrollBar_leftArrowOverSkin.png      |  Bin 1335 -> 0 bytes
 .../skins/HScrollBar_leftArrowUpSkin.png        |  Bin 1335 -> 0 bytes
 .../skins/HScrollBar_rightArrowDownSkin.png     |  Bin 1324 -> 0 bytes
 .../skins/HScrollBar_rightArrowOverSkin.png     |  Bin 1336 -> 0 bytes
 .../skins/HScrollBar_rightArrowUpSkin.png       |  Bin 1336 -> 0 bytes
 .../skins/HScrollBar_thumbDownSkin.png          |  Bin 1453 -> 0 bytes
 .../resources/skins/HScrollBar_thumbIcon.png    |  Bin 1252 -> 0 bytes
 .../skins/HScrollBar_thumbOverSkin.png          |  Bin 1552 -> 0 bytes
 .../resources/skins/HScrollBar_thumbUpSkin.png  |  Bin 1484 -> 0 bytes
 .../skins/HScrollBar_trackDisabledSkin.png      |  Bin 1394 -> 0 bytes
 .../resources/skins/HScrollBar_trackSkin.png    |  Bin 1393 -> 0 bytes
 .../main/resources/skins/Panel_borderSkin.png   |  Bin 2906 -> 0 bytes
 .../skins/VScrollBar_downArrowDisabledSkin.png  |  Bin 1347 -> 0 bytes
 .../skins/VScrollBar_downArrowDownSkin.png      |  Bin 1325 -> 0 bytes
 .../skins/VScrollBar_downArrowOverSkin.png      |  Bin 1335 -> 0 bytes
 .../skins/VScrollBar_downArrowUpSkin.png        |  Bin 1335 -> 0 bytes
 .../skins/VScrollBar_thumbDownSkin.png          |  Bin 1453 -> 0 bytes
 .../resources/skins/VScrollBar_thumbIcon.png    |  Bin 1252 -> 0 bytes
 .../skins/VScrollBar_thumbOverSkin.png          |  Bin 1434 -> 0 bytes
 .../resources/skins/VScrollBar_thumbUpSkin.png  |  Bin 1434 -> 0 bytes
 .../skins/VScrollBar_trackDisabledSkin.png      |  Bin 1394 -> 0 bytes
 .../resources/skins/VScrollBar_trackSkin.png    |  Bin 1393 -> 0 bytes
 .../skins/VScrollBar_upArrowDisabledSkin.png    |  Bin 1281 -> 0 bytes
 .../skins/VScrollBar_upArrowDownSkin.png        |  Bin 1324 -> 0 bytes
 .../skins/VScrollBar_upArrowOverSkin.png        |  Bin 1336 -> 0 bytes
 .../skins/VScrollBar_upArrowUpSkin.png          |  Bin 1336 -> 0 bytes
 FlexPMD/java-formatter.xml                      |  772 ++++++
 FlexPMD/pmd.xml                                 |  249 ++
 FlexPMD/pom.xml                                 |  501 ++++
 FlexPMD/projectSet.psf                          |   49 +
 FlexPMD/src/etc/header.txt                      |   14 +
 Squiggly/LICENSE                                |  206 ++
 Squiggly/NOTICE                                 |    9 +
 Squiggly/README                                 |  104 +
 Squiggly/RELEASE_NOTES                          |    7 +
 .../adobe/linguistics/spelling/SpellUIForTLF.as |   14 +-
 .../SimpleEditor/src/AdobeSpellingConfig.xml    |   22 -
 .../Demo/SimpleEditor/src/SpellingConfig.xml    |   22 +
 Squiggly/build.xml                              |  210 ++
 .../src/SquigglyTLFExample.as                   |    2 +-
 .../src/AdobeSpellingFrameworkExample.mxml      |   80 -
 .../src/SpellingFrameworkExample.mxml           |   80 +
 .../com/adobe/linguistics/utils/ITokenizer.as   |   76 -
 .../adobe/linguistics/utils/TextTokenizer.as    |  393 ---
 .../src/com/adobe/linguistics/utils/Token.as    |   94 -
 .../linguistics/spelling/HunspellDictionary.as  |  205 --
 .../adobe/linguistics/spelling/ISpellChecker.as |   62 -
 .../linguistics/spelling/ISpellingDictionary.as |   45 -
 .../adobe/linguistics/spelling/SpellChecker.as  |  387 ---
 .../linguistics/spelling/UserDictionary.as      |  113 -
 .../spelling/UserDictionaryInternal.as          |  115 -
 .../spelling/core/DictionaryManager.as          |   73 -
 .../linguistics/spelling/core/HashEntry.as      |  108 -
 .../linguistics/spelling/core/LinguisticRule.as | 1118 ---------
 .../linguistics/spelling/core/SpellingInfo.as   |   32 -
 .../spelling/core/SquigglyDictionary.as         |  207 --
 .../linguistics/spelling/core/SquigglyEngine.as |  426 ----
 .../spelling/core/SuggestionManager.as          | 1026 --------
 .../spelling/core/UserDictionaryEngine.as       |   71 -
 .../spelling/core/container/Collection.as       |   89 -
 .../spelling/core/container/Enumeration.as      |   28 -
 .../spelling/core/container/HashTable.as        |  179 --
 .../linguistics/spelling/core/container/Heap.as |  263 --
 .../spelling/core/container/Iterator.as         |   64 -
 .../linguistics/spelling/core/container/Set.as  |  195 --
 .../spelling/core/container/SparseHashTable.as  |  283 ---
 .../spelling/core/env/ExternalConstants.as      |   47 -
 .../spelling/core/env/InternalConstants.as      |   87 -
 .../spelling/core/error/ContentError.as         |   39 -
 .../spelling/core/error/ErrorTable.as           |   41 -
 .../spelling/core/logging/AbstractTarget.as     |  167 --
 .../spelling/core/logging/ILogger.as            |   40 -
 .../spelling/core/logging/ILoggingTarget.as     |   39 -
 .../linguistics/spelling/core/logging/Log.as    |  210 --
 .../spelling/core/logging/LogEvent.as           |   87 -
 .../spelling/core/logging/LogEventLevel.as      |   76 -
 .../spelling/core/logging/LogLogger.as          |  102 -
 .../core/logging/targets/ArrayTarget.as         |   35 -
 .../core/logging/targets/CollectionTarget.as    |  107 -
 .../core/logging/targets/LineFormattedTarget.as |  104 -
 .../core/logging/targets/TextFieldTarget.as     |   52 -
 .../core/logging/targets/TraceTarget.as         |   37 -
 .../spelling/core/rule/AffixEntry.as            |  137 -
 .../linguistics/spelling/core/rule/AffixRule.as |   92 -
 .../linguistics/spelling/core/rule/MapFilter.as |   39 -
 .../spelling/core/rule/OptimizedPrefixEntry.as  |  245 --
 .../spelling/core/rule/OptimizedSuffixEntry.as  |  301 ---
 .../spelling/core/rule/PrefixEntry.as           |  102 -
 .../spelling/core/rule/ReplacementFilter.as     |   34 -
 .../spelling/core/rule/SimpleFilter.as          |   48 -
 .../spelling/core/rule/SuffixEntry.as           |  126 -
 .../spelling/core/utils/DictionaryLoader.as     |   94 -
 .../spelling/core/utils/LinguisticRuleLoader.as |  977 --------
 .../spelling/core/utils/MathUtils.as            |   66 -
 .../spelling/core/utils/RefObject.as            |   36 -
 .../spelling/core/utils/SimpleNumberParser.as   |   54 -
 .../core/utils/SquigglyDictionaryLoader.as      |  369 ---
 .../spelling/core/utils/StringUtils.as          |  333 ---
 .../spelling/core/utils/SuggestionsResult.as    |  142 --
 .../adobe/linguistics/spelling/utils/Token.as   |   47 -
 .../linguistics/spelling/utils/Tokenizer.as     |   96 -
 .../linguistics/spelling/utils/WordList.as      |  120 -
 .../main/AdobeSpellingFramework/asdocgen.bat    |   18 -
 .../spelling/framework/ResourceTable.as         |  134 -
 .../spelling/framework/SpellingConfiguration.as |  102 -
 .../spelling/framework/SpellingService.as       |  241 --
 .../spelling/framework/ui/HaloHighlighter.as    |  124 -
 .../spelling/framework/ui/HaloWordProcessor.as  |  111 -
 .../spelling/framework/ui/IHighlighter.as       |   34 -
 .../spelling/framework/ui/IWordProcessor.as     |   30 -
 .../spelling/framework/ui/SparkHighlighter.as   |  225 --
 .../spelling/framework/ui/SparkWordProcessor.as |  132 -
 .../framework/ui/SpellingHighlighter.as         |  179 --
 .../spelling/framework/ui/TLFHighlighter.as     |  248 --
 .../spelling/framework/ui/TLFWordProcessor.as   |  156 --
 .../com/adobe/linguistics/spelling/SpellUI.as   |  562 -----
 .../linguistics/spelling/SpellingContextMenu.as |  243 --
 .../linguistics/spelling/ui/HaloHighlighter.as  |  126 -
 .../spelling/ui/HaloWordProcessor.as            |  112 -
 .../linguistics/spelling/ui/IHighlighter.as     |   67 -
 .../linguistics/spelling/ui/IWordProcessor.as   |   30 -
 .../linguistics/spelling/ui/SparkHighlighter.as |  229 --
 .../spelling/ui/SparkWordProcessor.as           |  133 -
 .../spelling/ui/SpellingHighlighter.as          |  196 --
 .../linguistics/spelling/ui/TLFHighlighter.as   |  252 --
 .../linguistics/spelling/ui/TLFWordProcessor.as |  159 --
 .../linguistics/spelling/ui/HaloHighlighter.as  |   87 -
 .../spelling/ui/HaloWordProcessor.as            |  109 -
 .../linguistics/spelling/ui/IHighlighter.as     |   34 -
 .../linguistics/spelling/ui/IWordProcessor.as   |   30 -
 .../linguistics/spelling/ui/SparkHighlighter.as |  190 --
 .../spelling/ui/SparkWordProcessor.as           |  104 -
 .../spelling/ui/SpellingHighlighter.as          |  179 --
 .../com/adobe/linguistics/spelling/SpellUI.as   |  577 -----
 .../linguistics/spelling/SpellingContextMenu.as |  243 --
 .../adobe/linguistics/spelling/SpellUIForTLF.as |  522 ----
 .../spelling/SpellingContextMenuForTLF.as       |  249 --
 .../SquigglyCustomContainerController.as        |  258 --
 Squiggly/main/Data/genTextWordlist.sh           |   10 +-
 .../src/AdobeSpellingAirDemo-app.xml            |  153 --
 .../src/AdobeSpellingAirDemo.mxml               |   39 -
 .../src/AdobeSpellingAirDemoEx-app.xml          |  153 --
 .../src/AdobeSpellingAirDemoEx.mxml             |   71 -
 .../src/AdobeSpellingConfig.xml                 |   26 -
 .../src/AdobeSpellingDemo.mxml                  |   72 -
 .../src/AdobeSpellingConfig.xml                 |   27 -
 .../src/AdobeSpellingDemoEx.mxml                |   70 -
 .../SpellingAirDemo/src/SpellingAirDemo-app.xml |  153 ++
 .../SpellingAirDemo/src/SpellingAirDemo.mxml    |   39 +
 .../src/SpellingAirDemoEx-app.xml               |  153 ++
 .../src/SpellingAirDemoEx.mxml                  |   71 +
 .../Demo/SpellingDemo/src/SpellingConfig.xml    |   26 +
 .../Demo/SpellingDemo/src/SpellingDemo.mxml     |   72 +
 .../Demo/SpellingDemoEx/src/SpellingConfig.xml  |   27 +
 .../com/adobe/linguistics/utils/ITokenizer.as   |   76 +
 .../adobe/linguistics/utils/TextTokenizer.as    |  393 +++
 .../src/com/adobe/linguistics/utils/Token.as    |   94 +
 Squiggly/main/README.txt                        |   28 -
 .../linguistics/spelling/HunspellDictionary.as  |  205 ++
 .../adobe/linguistics/spelling/ISpellChecker.as |   62 +
 .../linguistics/spelling/ISpellingDictionary.as |   45 +
 .../adobe/linguistics/spelling/SpellChecker.as  |  387 +++
 .../linguistics/spelling/UserDictionary.as      |  113 +
 .../spelling/UserDictionaryInternal.as          |  115 +
 .../spelling/core/DictionaryManager.as          |   73 +
 .../linguistics/spelling/core/HashEntry.as      |  108 +
 .../linguistics/spelling/core/LinguisticRule.as | 1118 +++++++++
 .../linguistics/spelling/core/SpellingInfo.as   |   32 +
 .../spelling/core/SquigglyDictionary.as         |  207 ++
 .../linguistics/spelling/core/SquigglyEngine.as |  426 ++++
 .../spelling/core/SuggestionManager.as          | 1026 ++++++++
 .../spelling/core/UserDictionaryEngine.as       |   71 +
 .../spelling/core/container/Collection.as       |   89 +
 .../spelling/core/container/Enumeration.as      |   28 +
 .../spelling/core/container/HashTable.as        |  179 ++
 .../linguistics/spelling/core/container/Heap.as |  263 ++
 .../spelling/core/container/Iterator.as         |   64 +
 .../linguistics/spelling/core/container/Set.as  |  195 ++
 .../spelling/core/container/SparseHashTable.as  |  283 +++
 .../spelling/core/env/ExternalConstants.as      |   47 +
 .../spelling/core/env/InternalConstants.as      |   87 +
 .../spelling/core/error/ContentError.as         |   39 +
 .../spelling/core/error/ErrorTable.as           |   41 +
 .../spelling/core/logging/AbstractTarget.as     |  167 ++
 .../spelling/core/logging/ILogger.as            |   40 +
 .../spelling/core/logging/ILoggingTarget.as     |   39 +
 .../linguistics/spelling/core/logging/Log.as    |  210 ++
 .../spelling/core/logging/LogEvent.as           |   87 +
 .../spelling/core/logging/LogEventLevel.as      |   76 +
 .../spelling/core/logging/LogLogger.as          |  102 +
 .../core/logging/targets/ArrayTarget.as         |   35 +
 .../core/logging/targets/CollectionTarget.as    |  107 +
 .../core/logging/targets/LineFormattedTarget.as |  104 +
 .../core/logging/targets/TextFieldTarget.as     |   52 +
 .../core/logging/targets/TraceTarget.as         |   37 +
 .../spelling/core/rule/AffixEntry.as            |  137 +
 .../linguistics/spelling/core/rule/AffixRule.as |   92 +
 .../linguistics/spelling/core/rule/MapFilter.as |   39 +
 .../spelling/core/rule/OptimizedPrefixEntry.as  |  245 ++
 .../spelling/core/rule/OptimizedSuffixEntry.as  |  301 +++
 .../spelling/core/rule/PrefixEntry.as           |  102 +
 .../spelling/core/rule/ReplacementFilter.as     |   34 +
 .../spelling/core/rule/SimpleFilter.as          |   48 +
 .../spelling/core/rule/SuffixEntry.as           |  126 +
 .../spelling/core/utils/DictionaryLoader.as     |   94 +
 .../spelling/core/utils/LinguisticRuleLoader.as |  977 ++++++++
 .../spelling/core/utils/MathUtils.as            |   66 +
 .../spelling/core/utils/RefObject.as            |   36 +
 .../spelling/core/utils/SimpleNumberParser.as   |   54 +
 .../core/utils/SquigglyDictionaryLoader.as      |  369 +++
 .../spelling/core/utils/StringUtils.as          |  333 +++
 .../spelling/core/utils/SuggestionsResult.as    |  142 ++
 .../adobe/linguistics/spelling/utils/Token.as   |   47 +
 .../linguistics/spelling/utils/Tokenizer.as     |   96 +
 .../linguistics/spelling/utils/WordList.as      |  120 +
 Squiggly/main/SpellingFramework/asdocgen.bat    |   18 +
 .../spelling/framework/ResourceTable.as         |  134 +
 .../spelling/framework/SpellingConfiguration.as |  102 +
 .../spelling/framework/SpellingService.as       |  241 ++
 .../spelling/framework/ui/HaloHighlighter.as    |  124 +
 .../spelling/framework/ui/HaloWordProcessor.as  |  111 +
 .../spelling/framework/ui/IHighlighter.as       |   34 +
 .../spelling/framework/ui/IWordProcessor.as     |   30 +
 .../spelling/framework/ui/SparkHighlighter.as   |  225 ++
 .../spelling/framework/ui/SparkWordProcessor.as |  132 +
 .../framework/ui/SpellingHighlighter.as         |  179 ++
 .../spelling/framework/ui/TLFHighlighter.as     |  248 ++
 .../spelling/framework/ui/TLFWordProcessor.as   |  156 ++
 .../com/adobe/linguistics/spelling/SpellUI.as   |  562 +++++
 .../linguistics/spelling/SpellingContextMenu.as |  243 ++
 .../linguistics/spelling/ui/HaloHighlighter.as  |  126 +
 .../spelling/ui/HaloWordProcessor.as            |  112 +
 .../linguistics/spelling/ui/IHighlighter.as     |   67 +
 .../linguistics/spelling/ui/IWordProcessor.as   |   30 +
 .../linguistics/spelling/ui/SparkHighlighter.as |  229 ++
 .../spelling/ui/SparkWordProcessor.as           |  133 +
 .../spelling/ui/SpellingHighlighter.as          |  196 ++
 .../linguistics/spelling/ui/TLFHighlighter.as   |  252 ++
 .../linguistics/spelling/ui/TLFWordProcessor.as |  159 ++
 .../linguistics/spelling/ui/HaloHighlighter.as  |   87 +
 .../spelling/ui/HaloWordProcessor.as            |  109 +
 .../linguistics/spelling/ui/IHighlighter.as     |   34 +
 .../linguistics/spelling/ui/IWordProcessor.as   |   30 +
 .../linguistics/spelling/ui/SparkHighlighter.as |  190 ++
 .../spelling/ui/SparkWordProcessor.as           |  104 +
 .../spelling/ui/SpellingHighlighter.as          |  179 ++
 .../com/adobe/linguistics/spelling/SpellUI.as   |  577 +++++
 .../linguistics/spelling/SpellingContextMenu.as |  243 ++
 .../adobe/linguistics/spelling/SpellUIForTLF.as |  522 ++++
 .../spelling/SpellingContextMenuForTLF.as       |  249 ++
 .../SquigglyCustomContainerController.as        |  258 ++
 .../main/Tools/AdobeSpellingDictGen/README.txt  |   16 -
 .../sample/sampleWordList.txt                   |   13 -
 .../src/AdobeSpellingDictGen-app.xml            |  153 --
 .../src/AdobeSpellingDictGen.mxml               |  210 --
 .../Tools/AdobeSpellingDictGen/src/UIWord.as    |   37 -
 Squiggly/main/Tools/SpellingDictGen/README.txt  |   16 +
 .../SpellingDictGen/sample/sampleWordList.txt   |    7 +
 .../SpellingDictGen/src/SpellingDictGen-app.xml |  153 ++
 .../SpellingDictGen/src/SpellingDictGen.mxml    |  210 ++
 .../main/Tools/SpellingDictGen/src/UIWord.as    |   37 +
 Squiggly/main/build.xml                         |   92 +-
 TourDeFlex/LICENSE                              |    5 +
 TourDeFlex/NOTICE                               |    4 +
 TourDeFlex/TourDeFlex3/README                   |   55 +-
 TourDeFlex/TourDeFlex3/RELEASE_NOTES            |   40 +-
 TourDeFlex/TourDeFlex3/build.xml                |   70 +-
 TourDeFlex/TourDeFlex3/src/SourceTab.mxml       |   30 +-
 .../src/apache/ApacheFlex4_14_0.mxml            |   51 +
 .../src/apache/containers/CalloutExample.mxml   |   41 +
 .../apache/controls/MaskedTextInputExample.mxml |   34 +
 .../controls/SparkRichTextEditorExample.mxml    |   55 +
 .../formatters/PostCodeFormatterExample.mxml    |   88 +
 .../src/apache/i18n/DateExample.mxml            |   84 +
 .../src/apache/i18n/LocaleExample.mxml          |   70 +
 .../src/apache/i18n/MillisecondExample.mxml     |   57 +
 .../src/apache/i18n/NumericStepperExample.mxml  |   34 +
 .../src/apache/i18n/ScientificExample.mxml      |   44 +
 .../src/apache/i18n/TimeZoneExample.mxml        |   67 +
 .../validators/PostCodeValidatorExample.mxml    |   85 +
 TourDeFlex/TourDeFlex3/src/explorer.html        |   65 -
 TourDeFlex/TourDeFlex3/src/explorer.mxml        |   95 +-
 TourDeFlex/TourDeFlex3/src/explorer.xml         |   61 +-
 TourDeFlex/TourDeFlex3/src/favicon.ico          |  Bin 0 -> 1150 bytes
 TourDeFlex/TourDeFlex3/src/index.html           |   65 +
 .../src/spark/containers/BorderExample.mxml     |    2 +-
 .../src/spark/containers/GroupExample.mxml      |    2 +-
 .../src/spark/containers/PanelExample.mxml      |    2 +-
 .../SkinableDataContainerExample.mxml           |   62 -
 .../SkinnableDataContainerExample.mxml          |   62 +
 .../spark/containers/TabNavigator1Example.mxml  |    2 +-
 .../src/spark/controls/ButtonBarExample.mxml    |    2 +-
 .../src/spark/controls/ButtonExample.mxml       |    3 +-
 .../src/spark/controls/CheckboxExample.mxml     |    3 +-
 .../src/spark/controls/DropdownExample.mxml     |    3 +-
 .../src/spark/controls/ListExample.mxml         |    2 +-
 .../spark/controls/NumericStepperExample.mxml   |    3 +-
 .../src/spark/controls/PopUpAnchor1Example.mxml |    2 +-
 .../src/spark/controls/RadioButtonExample.mxml  |    3 +-
 .../src/spark/controls/ScrollBarExample.mxml    |    2 +-
 .../src/spark/controls/Scroller1Example.mxml    |    3 +-
 .../src/spark/controls/SliderExample.mxml       |    3 +-
 .../src/spark/controls/SpinnerExample.mxml      |    2 +-
 .../src/spark/controls/ToggleButtonExample.mxml |    2 +-
 .../src/spark/css/CSSIDSelectorExample.mxml     |    2 +-
 .../spark/effects/AnimatePropertiesExample.mxml |    3 +-
 .../src/spark/effects/Rotate3DExample.mxml      |   33 +-
 .../src/spark/effects/Scale3DExample.mxml       |   37 +-
 .../fxg/LinearGradientsSpreadMethodExample.mxml |    2 +-
 .../src/spark/fxg/StaticFXGExample.mxml         |    2 +-
 .../itemRenderers/ListItemRendererExample.mxml  |    2 +-
 .../spark/other/ControllingViewportExample.mxml |    2 +-
 .../spark/skinning/ButtonWithIconExample.mxml   |    3 +-
 .../skinning/SkinningApplication1Example.mxml   |    2 +-
 .../skinning/SkinningApplication2Example.mxml   |    2 +-
 .../skinning/SkinningApplication3Example.mxml   |    2 +-
 .../skinning/SkinningContainerExample.mxml      |    2 +-
 TourDeFlex/TourDeFlex3/src/viewsource.mxml      |    1 +
 1966 files changed, 97197 insertions(+), 94814 deletions(-)
----------------------------------------------------------------------



[31/50] [abbrv] remove Adobe from directory names (package name still contains Adobe)

Posted by jm...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/logging/ILogger.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/logging/ILogger.as b/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/logging/ILogger.as
deleted file mode 100644
index 37df37e..0000000
--- a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/logging/ILogger.as
+++ /dev/null
@@ -1,40 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-
-
-package com.adobe.linguistics.spelling.core.logging
-{
-
-import flash.events.IEventDispatcher;
-
-public interface ILogger extends IEventDispatcher
-{
-    function get category():String;
-
-    function log(level:int, message:String, ... rest):void;
-    function debug(message:String, ... rest):void;
-    function error(message:String, ... rest):void;
-
-    function fatal(message:String, ... rest):void;
-    function info(message:String, ... rest):void;
-    function warn(message:String, ... rest):void;
-}
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/logging/ILoggingTarget.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/logging/ILoggingTarget.as b/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/logging/ILoggingTarget.as
deleted file mode 100644
index 47ed7ac..0000000
--- a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/logging/ILoggingTarget.as
+++ /dev/null
@@ -1,39 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-
-package com.adobe.linguistics.spelling.core.logging
-{
-public interface ILoggingTarget 
-{
-    function get filters():Array;
-    
-    function set filters(value:Array):void;
-    function get level():int;
-
-    function set level(value:int):void;
-    
-    function get mask():int;
-
-    function addLogger(logger:ILogger):void;
-
-    function removeLogger(logger:ILogger):void;
-}
-
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/logging/Log.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/logging/Log.as b/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/logging/Log.as
deleted file mode 100644
index e9a720d..0000000
--- a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/logging/Log.as
+++ /dev/null
@@ -1,210 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-
-package com.adobe.linguistics.spelling.core.logging
-{
-	import flash.errors.IllegalOperationError;
-public class Log
-{
-
-    private static var _targetLevel:int = LogEventLevel.NONE;
-        // Initialize target level to a value out of range.
-
-    private static var _loggers:Array;
-
-    private static var _targets:Array = [];
-
-	
-    public static function isFatal():Boolean
-    {
-        return (_targetLevel & LogEventLevel.FATAL) ? true : false;
-    }
-    
-    public static function isError():Boolean
-    {
-        return (_targetLevel & LogEventLevel.ERROR) ? true : false;
-    }
-    
-    public static function isWarn():Boolean
-    {
-        return (_targetLevel & LogEventLevel.WARN) ? true : false;
-    }
-
-    public static function isInfo():Boolean
-    {
-        return (_targetLevel & LogEventLevel.INFO) ? true : false;
-    }
-    
-    public static function isDebug():Boolean
-    {
-        return (_targetLevel & LogEventLevel.DEBUG) ? true : false;
-    }
-
-    public static function addTarget(target:ILoggingTarget):void
-    {
-        if (target)
-        {
-            var filters:Array = target.filters;
-            var logger:ILogger;
-            // need to find what filters this target matches and set the specified
-            // target as a listener for that logger.
-            for (var i:String in _loggers)
-            {
-                if (categoryMatchInFilterList(i, filters))
-                    target.addLogger(ILogger(_loggers[i]));
-            }
-            // if we found a match all is good, otherwise we need to
-            // put the target in a waiting queue in the event that a logger
-            // is created that this target cares about.
-            _targets.push(target);
-            
-            if (_targetLevel == LogEventLevel.NONE)
-                _targetLevel = target.mask;
-            else{
-            	_targetLevel = _targetLevel | target.mask;
-            }
-        }
-        else
-        {
-            throw new IllegalOperationError("addTarget function did not receive null object.");
-        }
-    }
-
-    public static function removeTarget(target:ILoggingTarget):void
-    {
-        if (target)
-        {
-            var filters:Array = target.filters;
-            var logger:ILogger;
-            // Disconnect this target from any matching loggers.
-            for (var i:String in _loggers)
-            {
-                if (categoryMatchInFilterList(i, filters))
-                {
-                    target.removeLogger(ILogger(_loggers[i]));
-                }                
-            }
-            // Remove the target.
-            for (var j:int = 0; j<_targets.length; j++)
-            {
-                if (target == _targets[j])
-                {
-                    _targets.splice(j, 1);
-                    j--;
-                }
-            }
-            resetTargetLevel();
-        }
-        else
-        {
-            throw new IllegalOperationError("addHandle function did not receive null object.");
-        }
-    }
-
-    public static function getLogger(category:String):ILogger
-    {
-        checkCategory(category);
-        if (!_loggers)
-            _loggers = [];
-		var newFlag:Boolean = false;
-        // get the logger for the specified category or create one if it
-        // doesn't exist
-        var result:ILogger = _loggers[category];
-        if (result == null)
-        {
-            result = new LogLogger(category);
-            _loggers[category] = result;
-            newFlag = true;
-        }
-
-        // check to see if there are any targets waiting for this logger.
-        var target:ILoggingTarget;
-        for (var i:int = 0; (i < _targets.length)&&(newFlag); i++)
-        {
-            target = ILoggingTarget(_targets[i]);
-            if (categoryMatchInFilterList(category, target.filters))
-                target.addLogger(result);
-        }
-
-        return result;
-    }
-
-    public static function flush():void
-    {
-        _loggers = [];
-        _targets = [];
-        _targetLevel = LogEventLevel.NONE;
-    }
-
-    public static function hasIllegalCharacters(value:String):Boolean
-    {
-        return value.search(/[\[\]\~\$\^\&\\(\)\{\}\+\?\/=`!@#%,:;'"<>\s]/) != -1;
-    }
-
-    private static function categoryMatchInFilterList(category:String, filters:Array):Boolean
-    {
-        var result:Boolean = false;
-        var filter:String;
-        var index:int = -1;
-        for (var i:uint = 0; i < filters.length; i++)
-        {
-            filter = filters[i];
-            // first check to see if we need to do a partial match
-            // do we have an asterisk?
-            index = filter.indexOf("*");
-
-            if (index == 0)
-                return true;
-
-            index = index < 0 ? index = category.length : index -1;
-
-            if (category.substring(0, index) == filter.substring(0, index))
-                return true;
-        }
-        return false;
-    }
-
-    private static function checkCategory(category:String):void
-    {
-        var message:String;
-        
-        if (category == null || category.length == 0)
-        {
-            throw new IllegalOperationError("checkCategory function did not receive null object.");
-        }
-
-        if (hasIllegalCharacters(category) || (category.indexOf("*") != -1))
-        {
-            throw new IllegalOperationError("checkCategory function did not receive invalid characters.");
-        }
-    }
-    
-    private static function resetTargetLevel():void
-    {	
-    	var res:int = 0;
-        for (var i:int = 0; i < _targets.length; i++)
-        {
-            res = ( res | (_targets[i].mask) );
-        }
-        _targetLevel = res;
-    }
-}
-
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/logging/LogEvent.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/logging/LogEvent.as b/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/logging/LogEvent.as
deleted file mode 100644
index d90098d..0000000
--- a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/logging/LogEvent.as
+++ /dev/null
@@ -1,87 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-
-package com.adobe.linguistics.spelling.core.logging
-{
-
-import flash.events.Event;
-
-public class LogEvent extends Event
-{
-    public static const eventID:String = "com.adobe.linguistics.spelling.core.logging.LogEvent";
-
-    public static function getLevelString(value:uint):String
-    {
-        switch (value)
-        {
-            case LogEventLevel.INFO:
-			{
-                return "INFO";
-			}
-
-            case LogEventLevel.DEBUG:
-			{
-                return "DEBUG";
-            }
-
-            case LogEventLevel.ERROR:
-			{
-                return "ERROR";
-            }
-
-            case LogEventLevel.WARN:
-			{
-                return "WARN";
-            }
-
-            case LogEventLevel.FATAL:
-			{
-                return "FATAL";
-            }
-
-            case LogEventLevel.ALL:
-			{
-                return "ALL";
-            }
-		}
-
-		return "UNKNOWN";
-    }
-
-    public function LogEvent(message:String = "",
-							 level:int = 31 /* LogEventLevel.ALL */)
-    {
-        super(LogEvent.eventID, false, false);
-
-        this.message = message;
-        this.level = level;
-    }
-
-    public var level:int;
-
-    public var message:String;
-
-    override public function clone():Event
-    {
-        return new LogEvent(message, /*type,*/ level);
-    }
-}
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/logging/LogEventLevel.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/logging/LogEventLevel.as b/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/logging/LogEventLevel.as
deleted file mode 100644
index a12098b..0000000
--- a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/logging/LogEventLevel.as
+++ /dev/null
@@ -1,76 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-
-package com.adobe.linguistics.spelling.core.logging
-{
-	import flash.errors.IllegalOperationError;
-public final class LogEventLevel
-{
-	    public static const FATAL:int = 16;
-	
-	    public static const ERROR:int = 8;
-	    
-	    public static const WARN:int = 4;
-	    
-	    public static const INFO:int = 2;
-	    
-	    public static const DEBUG:int = 1;
-	    
-	    public static const ALL:int = (DEBUG | INFO | WARN | ERROR | FATAL);
-	
-	    public static const NONE:int = 0;
-	    
-	    public static const LoggerLevelList:Array = [DEBUG, INFO, WARN, ERROR, FATAL, ALL];
-    
-		public static function isValidLevel(level:int) :Boolean {
-			for ( var i:int = 0; i < LoggerLevelList.length ; ++i ) {
-				if ( (LoggerLevelList[i] == level) )
-					return true;
-			}
-			return false;
-		}
-		
-		public static function isValidMask(mask:int ):Boolean {
-			var allMask:int = 0;
-			for ( var i:int = 0; i< LoggerLevelList.length; ++i ) {
-				allMask = (allMask | (LoggerLevelList[i]));
-			}
-			if ( (allMask | mask ) == allMask ) return true;
-			return false;
-		}
-		
-		public static function getUpperMask(level:int ) :int {
-			var result:int = 0;
-			if ( !isValidLevel(level) ) {
-				throw new IllegalOperationError("Please input an valid level for getUpperMask.");
-			} 
-			if ( level == ALL) return level;
-			for ( var i:int =0; i< LoggerLevelList.length; ++i ) {
-				if ( (LoggerLevelList[i] >= level) && (LoggerLevelList[i] < ALL) ) {
-					result =result | LoggerLevelList[i];
-				}
-			}
-			return result;
-		}
-
-
-}
-
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/logging/LogLogger.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/logging/LogLogger.as b/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/logging/LogLogger.as
deleted file mode 100644
index b5a23be..0000000
--- a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/logging/LogLogger.as
+++ /dev/null
@@ -1,102 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-
-package com.adobe.linguistics.spelling.core.logging
-{
-	import flash.errors.IllegalOperationError;
-	import flash.events.EventDispatcher;
-public class LogLogger extends EventDispatcher implements ILogger
-{
-	public function LogLogger(category:String)
-	{
-		super();
-
-		_category = category;
-	}
-
-	/**
-	 *  @private
-	 *  Storage for the category property.
-	 */
-	private var _category:String;
-
-	/**
-	 *  The category this logger send messages for.
-	 *  
-	 */	
-	public function get category():String
-	{
-		return _category;
-	}
-	
-	public function log(level:int, msg:String, ... rest):void
-	{
-		dispatchLoggerEvent( level, msg, rest);
-	}
-
-	public function debug(msg:String, ... rest):void
-	{
-		dispatchLoggerEvent( LogEventLevel.DEBUG, msg, rest);
-	}
-
-	public function error(msg:String, ... rest):void
-	{
-		dispatchLoggerEvent( LogEventLevel.ERROR, msg, rest);
-	}
-
-	public function fatal(msg:String, ... rest):void
-	{
-		dispatchLoggerEvent( LogEventLevel.FATAL, msg, rest);
-	}
-
-	public function info(msg:String, ... rest):void
-	{
-		dispatchLoggerEvent( LogEventLevel.INFO, msg, rest);
-	}
-
-	public function warn(msg:String, ... rest):void
-	{
-		dispatchLoggerEvent( LogEventLevel.WARN, msg, rest);
-	}
-	
-	private function dispatchLoggerEvent(level:int, msg:String, options:Array):void {
-		// we don't want to allow people to log messages at the 
-		// Log.Level.ALL level, so throw a RTE if they do
-		if ( !LogEventLevel.isValidLevel( level ) )
-		{
-			throw new IllegalOperationError("Please check for level permit.");
-		}
-        	
-		if (hasEventListener(LogEvent.eventID))
-		{
-			// replace all of the parameters in the msg string
-			for (var i:int = 0; i < options.length; i++)
-			{
-				msg = msg.replace(new RegExp("\\{"+i+"\\}", "g"), options[i]);
-			}
-
-			dispatchEvent(new LogEvent(msg, level));
-		}
-		
-	}
-	
-}
-
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/logging/targets/ArrayTarget.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/logging/targets/ArrayTarget.as b/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/logging/targets/ArrayTarget.as
deleted file mode 100644
index 61a5a4a..0000000
--- a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/logging/targets/ArrayTarget.as
+++ /dev/null
@@ -1,35 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-
-package com.adobe.linguistics.spelling.core.logging.targets
-{
-	public class ArrayTarget extends CollectionTarget
-	{
-		public var items:Array;
-		public function ArrayTarget(arr:Array, usingLevelMaskMode:Boolean = false)
-		{
-			this.items = arr;
-			super(usingLevelMaskMode);
-		}
-		public override function internalLog(msg:String,lvl:int):void {
-			items.push( {date:this.date, time:this.time, category:this.category, levelString:this.levelString, message:msg, level:lvl } );
-		}
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/logging/targets/CollectionTarget.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/logging/targets/CollectionTarget.as b/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/logging/targets/CollectionTarget.as
deleted file mode 100644
index b355f04..0000000
--- a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/logging/targets/CollectionTarget.as
+++ /dev/null
@@ -1,107 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-
-package com.adobe.linguistics.spelling.core.logging.targets
-{
-	import com.adobe.linguistics.spelling.core.logging.*;
-	public class CollectionTarget extends AbstractTarget
-	{
-	    public var fieldSeparator:String = " ";
-	
-	    public var includeCategory:Boolean;
-	
-	    public var includeDate:Boolean;
-	
-	    public var includeLevel:Boolean;
-	
-	    public var includeTime:Boolean;
-
-	    protected var date:String = "";
-	    protected var time:String = "";
-	    protected var levelString:String = "";
-	    protected var category:String = "";
-		
-		public function CollectionTarget(usingLevelMaskMode:Boolean = false)
-		{
-	        super(usingLevelMaskMode);
-	        includeTime = false;
-	        includeDate = false;
-	        includeCategory = false;
-	        includeLevel = false;
-		}
-
-	    override public function logEvent(event:LogEvent):void
-	    {
-	    	date = "";
-	    	time = "";
-	    	levelString = "";
-	    	category = "";
-	        if (includeDate || includeTime)
-	        {
-	            var d:Date = new Date();
-	            if (includeDate)
-	            {
-	                date = Number(d.getMonth() + 1).toString() + "/" +
-	                       d.getDate().toString() + "/" + 
-	                       d.getFullYear();
-	            }   
-	            if (includeTime)
-	            {
-	                time += padTime(d.getHours()) + ":" +
-	                        padTime(d.getMinutes()) + ":" +
-	                        padTime(d.getSeconds()) + "." +
-	                        padTime(d.getMilliseconds(), true);
-	            }
-	        }
-	        
-	        if (includeLevel)
-	        {
-	            levelString = LogEvent.getLevelString(event.level);
-	        }
-	
-	        category = includeCategory ? ILogger(event.target).category:"";
-	
-	        internalLog(event.message,event.level);
-	    }
-	    
-	    private function padTime(num:Number, millis:Boolean = false):String
-	    {
-	        if (millis)
-	        {
-	            if (num < 10)
-	                return "00" + num.toString();
-	            else if (num < 100)
-	                return "0" + num.toString();
-	            else 
-	                return num.toString();
-	        }
-	        else
-	        {
-	            return num > 9 ? num.toString() : "0" + num.toString();
-	        }
-	    }
-	
-	    public function internalLog(message:String, level:int):void
-	    {
-	        // override this method to perform the redirection to the desired output
-	    }
-
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/logging/targets/LineFormattedTarget.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/logging/targets/LineFormattedTarget.as b/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/logging/targets/LineFormattedTarget.as
deleted file mode 100644
index c1b66eb..0000000
--- a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/logging/targets/LineFormattedTarget.as
+++ /dev/null
@@ -1,104 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-
-package com.adobe.linguistics.spelling.core.logging.targets
-{
-	import com.adobe.linguistics.spelling.core.logging.*;
-public class LineFormattedTarget extends AbstractTarget
-{
-    public function LineFormattedTarget(usingLevelMaskMode:Boolean = false)
-    {
-        super(usingLevelMaskMode);
-
-        includeTime = false;
-        includeDate = false;
-        includeCategory = false;
-        includeLevel = false;
-    }
-
-    public var fieldSeparator:String = " ";
-
-    public var includeCategory:Boolean;
-
-    public var includeDate:Boolean;
-
-    public var includeLevel:Boolean;
-
-    public var includeTime:Boolean;
-
-    override public function logEvent(event:LogEvent):void
-    {
-        var date:String = ""
-        if (includeDate || includeTime)
-        {
-            var d:Date = new Date();
-            if (includeDate)
-            {
-                date = Number(d.getMonth() + 1).toString() + "/" +
-                       d.getDate().toString() + "/" + 
-                       d.getFullYear() + fieldSeparator;
-            }   
-            if (includeTime)
-            {
-                date += padTime(d.getHours()) + ":" +
-                        padTime(d.getMinutes()) + ":" +
-                        padTime(d.getSeconds()) + "." +
-                        padTime(d.getMilliseconds(), true) + fieldSeparator;
-            }
-        }
-        
-        var level:String = "";
-        if (includeLevel)
-        {
-            level = "[" + LogEvent.getLevelString(event.level) +
-                    "]" + fieldSeparator;
-        }
-
-        var category:String = includeCategory ?
-                              ILogger(event.target).category + fieldSeparator :
-                              "";
-
-        internalLog(date + category+ level  + event.message,event.level);
-    }
-    
-    private function padTime(num:Number, millis:Boolean = false):String
-    {
-        if (millis)
-        {
-            if (num < 10)
-                return "00" + num.toString();
-            else if (num < 100)
-                return "0" + num.toString();
-            else 
-                return num.toString();
-        }
-        else
-        {
-            return num > 9 ? num.toString() : "0" + num.toString();
-        }
-    }
-
-    public function internalLog(message:String, level:int):void
-    {
-        // override this method to perform the redirection to the desired output
-    }
-}
-
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/logging/targets/TextFieldTarget.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/logging/targets/TextFieldTarget.as b/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/logging/targets/TextFieldTarget.as
deleted file mode 100644
index bb4d75b..0000000
--- a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/logging/targets/TextFieldTarget.as
+++ /dev/null
@@ -1,52 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-
-package com.adobe.linguistics.spelling.core.logging.targets
-{
-    
-    import flash.text.TextField;
-    public class TextFieldTarget extends LineFormattedTarget 
-    {
-        public var autoScroll:Boolean = true ;
-        public var textfield:TextField ;
-
-        public function TextFieldTarget( textfield:TextField,usingLevelMaskMode:Boolean = false )
-        {
-            super(usingLevelMaskMode);
-            this.textfield = textfield ;
-        }
-        
-        public override function internalLog( message:String , level:int ):void
-        {
-            if ( textfield != null )
-            {
-				textfield.appendText( message + "\r");
-                if ( autoScroll )
-                {
-                    textfield.scrollV  = textfield.maxScrollV ;
-                }
-            }
-            else
-            {
-                throw new ReferenceError( "The internal textfield reference of the target not must be null." ) ;
-            }
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/logging/targets/TraceTarget.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/logging/targets/TraceTarget.as b/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/logging/targets/TraceTarget.as
deleted file mode 100644
index 5571fcd..0000000
--- a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/logging/targets/TraceTarget.as
+++ /dev/null
@@ -1,37 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-
-package com.adobe.linguistics.spelling.core.logging.targets
-{
-
-public class TraceTarget extends LineFormattedTarget
-{
-    public function TraceTarget(usingLevelMaskMode:Boolean = false)
-    {
-        super(usingLevelMaskMode);
-    }
-
-    public override function internalLog(message:String,level:int):void
-    {
-        trace(message);
-    }
-}
-
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/rule/AffixEntry.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/rule/AffixEntry.as b/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/rule/AffixEntry.as
deleted file mode 100644
index 4ec678d..0000000
--- a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/rule/AffixEntry.as
+++ /dev/null
@@ -1,137 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-
-package com.adobe.linguistics.spelling.core.rule
-{
-	import com.adobe.linguistics.spelling.core.LinguisticRule;
-	
-	public class AffixEntry
-	{
-		private var _flag:int;
-		private var _stripValue:String; /*stripping characters from beginning (at prefix rules) or end (at suffix rules) of the word  */
-		private var _affixValue:String; /* affix (optionally with flags of continuation classes, separated by a slash)  */
-		private var _conditionString:String; /*Zero stripping or affix are indicated by zero. 
-		Zero condition is indicated by dot. Condition is a simplified, regular expression-like pattern, 
-		which must be met before the affix can be applied. (Dot signs an arbitrary character. Characters 
-		in braces sign an arbitrary character from the character subset. Dash hasn’t got special meaning, 
-		but circumflex (^) next the first brace sets the complementer character set.)  */
-		private var _conditionPattern:RegExp;
-		private var _permissionToCombine:Boolean; /* Cross product (permission to combine prefixes and suffixes). Possible values: Y (yes) or N (no) */
-		private var _type:int; // 0 means prefix, 1 means suffix...
-		private var _morphologicalFields:String; //Optional morphological fields separated by spaces or tabulators. 
-		private var _contclass:String; //Added for Double affix support
-		
-		private var _attrMgr:LinguisticRule;		
-
-		
-		public function AffixEntry(affixFlag:int, stripString:String, affixValue:String, conditionStr:String, morph:String = "", permission:Boolean = false, affixType:int = 0, contclass:String=null)
-		{
-			this.flag = affixFlag;
-			this.conditionString = conditionStr;
-			this.stripValue = stripString;
-			this.affixKey = affixValue;
-			this.permissionToCombine = permission;
-			this.type = affixType;
-			this.morphologicalFields = morph;
-			this.attributeManager = null;
-			this.contclass=contclass;//can be null too
-			this._conditionPattern = (affixType == 0) ? new RegExp("^"+conditionStr+".*"+"$"): new RegExp("^"+".*"+conditionStr+"$");
-		}
-		
-		public function set attributeManager( attrMgr:LinguisticRule):void {
-			this._attrMgr = attrMgr;
-		}
-		
-		public function get attributeManager( ):LinguisticRule {
-			return this._attrMgr;
-		}
-		
-		public function set morphologicalFields(value:String):void {
-			this._morphologicalFields = value;
-		}
-		
-		public function get morphologicalFields():String {
-			return this._morphologicalFields;
-		}
-		
-		public function set permissionToCombine(value:Boolean) : void {
-			this._permissionToCombine = value;
-		}
-		
-		public function get permissionToCombine():Boolean {
-			return this._permissionToCombine;
-		}
-		
-		public function get flag():int {
-			return this._flag;
-		}
-		public function set flag(affixFlag:int):void {
-			this._flag = affixFlag;
-		}
-		
-		public function get type():int {
-			return this._type;
-		}
-		
-		public function set type(affixType:int):void {
-			this._type = affixType;
-		}
-		
-		public function set stripValue(value:String):void {
-			this._stripValue = value;
-		} 
-		
-		public function get stripValue():String {
-			return this._stripValue;
-		}
-		
-		public function set affixKey(value:String):void {
-			this._affixValue = value;
-		}
-		
-		public function get affixKey():String {
-			return this._affixValue;
-		}
-		
-		public function set contclass(value:String):void {
-			this._contclass = value;
-		}
-		
-		public function get contclass():String {
-			return this._contclass;
-		}
-		
-		public function get conditionString():String {
-			return this._conditionString;
-		}
-		
-		public function set conditionString(value:String):void {
-			this._conditionString  = value;
-		}
-		
-		public function get conditionPattern():RegExp {
-			return this._conditionPattern;
-		}
-		public function set conditionPattern(value:RegExp):void {
-			this._conditionPattern = value;
-		}
-
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/rule/AffixRule.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/rule/AffixRule.as b/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/rule/AffixRule.as
deleted file mode 100644
index 2633bd6..0000000
--- a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/rule/AffixRule.as
+++ /dev/null
@@ -1,92 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-
-package  com.adobe.linguistics.spelling.core.rule
-{
-	
-	public class AffixRule
-	{
-		private var _name:String;
-		private var _type:uint;
-		private var _stripValue:String;
-		private var _affixValue:String;
-		private var _conditionPattern:String;
-		private var _permissionToCombine:Boolean;
-		
-		public function AffixRule(affixName:String, affixType:uint, stripString:String, affixString:String, conditionString:String, permission:Boolean = true)
-		{
-			this.name = affixName;
-			this._conditionPattern = conditionString;
-			this.type = affixType;
-			this.stripValue = stripString;
-			this.affixValue = affixString;
-			this.permissionToCombine = permission;
-			
-		}
-		
-		public function set permissionToCombine(value:Boolean) : void {
-			this._permissionToCombine = value;
-		}
-		
-		public function get permissionToCombine():Boolean {
-			return this._permissionToCombine;
-		}
-		
-		public function get name():String {
-			return this._name;
-		}
-		public function set name(affixName:String):void {
-			this._name = affixName;
-		}
-		
-		public function get type():uint {
-			return this._type;
-		}
-		
-		public function set type(affixType:uint):void {
-			this._type = affixType;
-		}
-		
-		public function set stripValue(value:String):void {
-			this._stripValue = value;
-		} 
-		
-		public function get stripValue():String {
-			return this._stripValue;
-		}
-		
-		public function set affixValue(value:String):void {
-			this._affixValue = value;
-		}
-		
-		public function get affixValue():String {
-			return this._affixValue;
-		}
-		
-		public function get conditionPattern():String {
-			return this._conditionPattern;
-		}
-		
-		public function set conditionPattern(value:String):void {
-			this._conditionPattern  = value;
-		}
-
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/rule/MapFilter.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/rule/MapFilter.as b/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/rule/MapFilter.as
deleted file mode 100644
index 3c241ed..0000000
--- a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/rule/MapFilter.as
+++ /dev/null
@@ -1,39 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-
-package  com.adobe.linguistics.spelling.core.rule
-{
-	
-	public class MapFilter
-	{
-		private var _mapCharSet:String;
-		public function MapFilter(mapString:String)
-		{
-			this.mapCharSet = mapString;
-		}
-		public function get mapCharSet():String {
-			return this._mapCharSet;
-		}
-		public function set mapCharSet(value:String) : void {
-			this._mapCharSet = value;
-		}
-
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/rule/OptimizedPrefixEntry.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/rule/OptimizedPrefixEntry.as b/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/rule/OptimizedPrefixEntry.as
deleted file mode 100644
index b448338..0000000
--- a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/rule/OptimizedPrefixEntry.as
+++ /dev/null
@@ -1,245 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-
-package com.adobe.linguistics.spelling.core.rule
-{
-	import com.adobe.linguistics.spelling.core.HashEntry;
-	import com.adobe.linguistics.spelling.core.env.InternalConstants;
-	public class OptimizedPrefixEntry extends AffixEntry
-	{
-		private var _flagNext:OptimizedPrefixEntry;
-		private var _keyNext:OptimizedPrefixEntry;
-		private var _flags:Array;
-		private var _pfxTable:Array;
-		public function OptimizedPrefixEntry(pfxEntry:PrefixEntry)
-		{
-			
-			super(pfxEntry.flag,pfxEntry.stripValue,pfxEntry.affixKey,pfxEntry.conditionString,pfxEntry.morphologicalFields, pfxEntry.permissionToCombine, 0,pfxEntry.contclass);
-			_flags = new Array();
-			this._pfxTable = new Array();
-			this.nextElementWithFlag = null;
-			this.nextElementWithKey = null;
-			_flags.push(this.flag);
-			this._pfxTable.push(pfxEntry);
-			this.flag = -1;
-			this.conditionString = "";
-		}
-
-		public function isSimilarObject(pfxEntry:PrefixEntry):Boolean {
-			var chkString:String=this.contclass+pfxEntry.contclass;
-			if(chkString)chkString=chkString.split('').sort().join('').replace(/(.)\1+/gi,'$1');//this pattern removes any repetition from strings. this will work only because we are converting n' or q' to Long numbers in decode flags
-			if ( (this.stripValue == pfxEntry.stripValue) && (this.affixKey == pfxEntry.affixKey) && (this.permissionToCombine == pfxEntry.permissionToCombine) && (this.morphologicalFields == pfxEntry.morphologicalFields)&&(this.contclass==chkString) )	return true;
-			return false;
-		} 
-		
-		public function extendObject( pfxEntry:PrefixEntry ):Boolean {
-			if ( !isSimilarObject(pfxEntry) )	{
-				return false;
-			}
-			_flags.push( pfxEntry.flag);
-			this._pfxTable.push( pfxEntry );
-		
-			var newConditionString:String;
-			newConditionString = this.conditionPattern.source + "|" + "^"+pfxEntry.conditionString+".*"+"$";
-			this.conditionPattern  = new RegExp ( newConditionString);
-			this.contclass=pfxEntry.contclass;
-			return true;
-		}
-
-		public function get nextElementWithKey():OptimizedPrefixEntry {
-			return this._keyNext;
-		}
-		
-		public function set nextElementWithKey(pfxEntry:OptimizedPrefixEntry):void {
-			this._keyNext = pfxEntry;
-		}
-		
-		public function get nextElementWithFlag():OptimizedPrefixEntry {
-			return this._flagNext;
-		}
-		
-		public function set nextElementWithFlag(pfxEntry:OptimizedPrefixEntry):void {
-			this._flagNext = pfxEntry;
-		}
-		
-		public function get flags():Array {
-			return this._flags;
-		}
-
-		/*
-		 * Deprecated function for now...
-		 * History: 
-		 *          A pre-version of implementation for error detection. After I optimized the code for performance,
-		 *          I drop this function by that time, but you know performance meassuring is a tricky problem... 
-		 * ToDo: Need a revisit when we implementing complex-affix support and compound-word support.
-		 */
-		// check if this prefix entry matches
-		public function checkWord( word:String, sfxopts:int, ppfx:AffixEntry, inCompound:int, needFlag:int):HashEntry {
-			var disLen:int = word.length - this.affixKey.length;
-			var he:HashEntry = null;
-			var i:int;
-			// if this suffix is being cross checked with a prefix
-			// but it does not support cross products skip it
-			if ( (sfxopts& InternalConstants.aeXPRODUCT) != 0 && this.permissionToCombine != true ) return null;
-			// on entry prefix is 0 length or already matches the beginning of the word.
-			// So if the remaining root word has positive length
-			// and if there are enough chars in root word and added back strip chars
-			// to meet the number of characters conditions, then test it
-			if ( disLen > 0 || (disLen == 0 && this.attributeManager.fullStrip) ) {
-				// generate new root word by removing prefix and adding
-				// back any characters that would have been stripped
-				word = this.stripValue + word.substr(this.affixKey.length);
-				// now make sure all of the conditions on characters
-				// are met.  Please see the appendix at the end of
-				// this file for more info on exactly what is being
-				// tested
-				// if all conditions are met then check if resulting
-				// root word in the dictionary
-				if ( this.conditionPattern.test( word ) ) {
-					// look word in hash table
-					for ( i=0; i < this.attributeManager.dictionaryManager.dictonaryList.length && !he; ++i ) {
-						he = this.attributeManager.dictionaryManager.dictonaryList[i].getElement(word);
-						while( he ) {
-							if ( he.testAffixs(this._flags) && ( (!needFlag) || he.testAffix(needFlag) ) ) {
-								return he;
-							}
-							he = he.next;
-						}
-					}
-				} 
-				
-			}
-			return he;
-		}
-
-		// check if this prefix entry matches
-		public function checkWord2( word:String, inCompound:int, needFlag:int):HashEntry {
-			var disLen:int = word.length - this.affixKey.length;
-			var he:HashEntry = null;
-			var i:int,j:int;
-			// on entry prefix is 0 length or already matches the beginning of the word.
-			// So if the remaining root word has positive length
-			// and if there are enough chars in root word and added back strip chars
-			// to meet the number of characters conditions, then test it
-			if ( disLen > 0 || (disLen == 0 && this.attributeManager.fullStrip) ) {
-				// generate new root word by removing prefix and adding
-				// back any characters that would have been stripped
-				word = this.stripValue + word.substr(this.affixKey.length);
-				// now make sure all of the conditions on characters
-				// are met.  Please see the appendix at the end of
-				// this file for more info on exactly what is being
-				// tested
-				// if all conditions are met then check if resulting
-				// root word in the dictionary
-				if ( this.conditionPattern.test( word ) ) {
-					// look word in hash table
-					for ( i=0; i < this.attributeManager.dictionaryManager.dictonaryList.length && !he; ++i ) {
-						he = this.attributeManager.dictionaryManager.dictonaryList[i].getElement(word);
-						while( he ) {
-							if ( he.testAffixs(this._flags) && ( (!needFlag) || he.testAffix(needFlag) ) ) {
-								for ( j=0;j<this._pfxTable.length;++j) {
-									if ( (this._pfxTable[j] ).conditionPattern.test(word) ) {
-										if ( he.testAffix(this._flags[j]) ){
-											return he;
-										}
-									}
-								}
-							}
-							he = he.next;
-						}
-					}
-					//if ((opts & aeXPRODUCT) && in_compound)
-					if ( this.permissionToCombine ) {
-						for(i=0; j<this.flags[i];i++)
-						{
-							he = this.attributeManager.optSuffixCheck2(word, InternalConstants.aeXPRODUCT,this, needFlag, inCompound,this.flags[i]);
-							
-							if (he) 
-							{
-							
-								for ( j=0;j<this._pfxTable.length;++j) 
-								{
-									if ( (this._pfxTable[j] ).conditionPattern.test(word) && (this._pfxTable[j].flag ==this.flags[i]) )
-									{
-										
-											return he;
-										
-									}
-								}
-							he = null;	
-							} 
-						}
-					}
-				} 
-				
-			}
-			return he;
-		}
-		 
-		//checkTwoWord
-		public function checkTwoWord( word:String, inCompound:int, needFlag:int):HashEntry {
-			var disLen:int = word.length - this.affixKey.length;
-			var he:HashEntry = null;
-			var i:int,j:int;
-			// on entry prefix is 0 length or already matches the beginning of the word.
-			// So if the remaining root word has positive length
-			// and if there are enough chars in root word and added back strip chars
-			// to meet the number of characters conditions, then test it
-			if ( disLen > 0 || (disLen == 0 && this.attributeManager.fullStrip) ) {
-				// generate new root word by removing prefix and adding
-				// back any characters that would have been stripped
-				word = this.stripValue + word.substr(this.affixKey.length);
-				// now make sure all of the conditions on characters
-				// are met.  Please see the appendix at the end of
-				// this file for more info on exactly what is being
-				// tested
-				// if all conditions are met then check if resulting
-				// root word in the dictionary
-				if ( this.conditionPattern.test( word ) ) {
-					// do not look word in hash table
-					
-					//if ((opts & aeXPRODUCT) && in_compound)
-					if ( this.permissionToCombine && inCompound!=1/*IN_CPD_BEGIN*/) {//TODO: figure this constant
-						for(i=0; j<this.flags[i];i++)
-						{
-						
-							he = this.attributeManager.optTwoSuffixCheck(word, InternalConstants.aeXPRODUCT,this,needFlag,this.flags[i]);//this is the c2
-							if (he) {
-								for ( j=0;j<this._pfxTable.length;++j) { //Squiggly will handle undrinkables from here
-									if ( (this._pfxTable[j] ).conditionPattern.test(word)&& (this._pfxTable[j].flag ==this.flags[i]) ) 
-									{
-									
-											return he;
-										
-									}
-								}
-								he = null;
-							}
-						}
-					}
-				} 
-				
-			}
-			return he;
-		}
-		//--
-
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/rule/OptimizedSuffixEntry.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/rule/OptimizedSuffixEntry.as b/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/rule/OptimizedSuffixEntry.as
deleted file mode 100644
index 7d6ee58..0000000
--- a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/rule/OptimizedSuffixEntry.as
+++ /dev/null
@@ -1,301 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-
-package com.adobe.linguistics.spelling.core.rule
-{
-	import com.adobe.linguistics.spelling.core.HashEntry;
-	import com.adobe.linguistics.spelling.core.env.InternalConstants;
-	import com.adobe.linguistics.spelling.core.utils.StringUtils;
-	
-	public class OptimizedSuffixEntry  extends AffixEntry
-	{
-		private var _flagNext:OptimizedSuffixEntry;
-		private var _keyNext:OptimizedSuffixEntry;
-		private var _flags:Array;
-		private var _sfxTable:Array;
-		private var _reverseAffixKey:String;
-		public function OptimizedSuffixEntry(sfxEntry:SuffixEntry)
-		{
-			super(sfxEntry.flag,sfxEntry.stripValue,sfxEntry.affixKey,sfxEntry.conditionString,sfxEntry.morphologicalFields, sfxEntry.permissionToCombine, sfxEntry.type,sfxEntry.contclass);
-			_flags = new Array();
-			_sfxTable = new Array();
-			this.nextElementWithFlag = null;
-			this.nextElementWithKey = null;
-			_flags.push(this.flag);
-			_sfxTable.push(sfxEntry);
-			this.reverseAffixKey = StringUtils.reverseString(this.affixKey);
-			this.flag = -1;
-			this.conditionString = "";
-		}
-		
-		public function isSimilarObject(sfxEntry:SuffixEntry):Boolean {
-			var chkString:String=this.contclass+sfxEntry.contclass;
-			if(chkString)chkString=chkString.split('').sort().join('').replace(/(.)\1+/gi,'$1');//this pattern removes any repetition from strings. this will work only because we are converting n' or q' to Long numbers in decode flags
-			if ( (this.stripValue == sfxEntry.stripValue) && (this.affixKey == sfxEntry.affixKey) && (this.permissionToCombine == sfxEntry.permissionToCombine) && (this.morphologicalFields == sfxEntry.morphologicalFields) &&(this.contclass==chkString) )	return true;
-			return false;
-		} 
-		
-		public function extendObject( sfxEntry:SuffixEntry ):Boolean {
-			
-			 if ( !isSimilarObject(sfxEntry) ) return false;
-			_flags.push(sfxEntry.flag);
-			_sfxTable.push(sfxEntry);
-			var newConditionString:String;
-			newConditionString = this.conditionPattern.source + "|" + "^"+".*"+sfxEntry.conditionString+"$";
-			this.conditionPattern  = new RegExp ( newConditionString);
-			//now add in contclass
-			this.contclass=sfxEntry.contclass;
-			return true;
-		}
-		
-		public function set reverseAffixKey(value:String):void {
-			this._reverseAffixKey = value;
-		}
-		
-		public function get reverseAffixKey():String {
-			return this._reverseAffixKey;
-		}
-		
-		public function get nextElementWithKey():OptimizedSuffixEntry {
-			return this._keyNext;
-		}
-		
-		public function set nextElementWithKey(pfxEntry:OptimizedSuffixEntry):void {
-			this._keyNext = pfxEntry;
-		}
-		
-		public function get nextElementWithFlag():OptimizedSuffixEntry {
-			return this._flagNext;
-		}
-		
-		public function set nextElementWithFlag(pfxEntry:OptimizedSuffixEntry):void {
-			this._flagNext = pfxEntry;
-		}
-		
-		public function get flags():Array {
-			return this._flags;
-		}
-		
-		/*
-		 * Deprecated function for now...
-		 * History: 
-		 *          A pre-version of implementation for error detection. After I optimized the code for performance,
-		 *          I drop this function by that time, but you know performance meassuring is a tricky problem... 
-		 * ToDo: Need a revisit when we implementing complex-affix support and compound-word support.
-		 */
-		// see if this suffix is present in the word
-		public function checkWord( word:String, needFlag:int, inCompound:int):HashEntry {
-			var disLen:int = word.length - this.affixKey.length;
-			var he:HashEntry = null;
-			var i:int;
-
-			// upon entry suffix is 0 length or already matches the end of the word.
-			// So if the remaining root word has positive length
-			// and if there are enough chars in root word and added back strip chars
-			// to meet the number of characters conditions, then test it
-			if ( (disLen > 0 || (disLen == 0 && this.attributeManager.fullStrip)) ) {
-				// generate new root word by removing suffix and adding
-				// back any characters that would have been stripped or
-				// or null terminating the shorter string
-				word = word.substr(0, word.length - this.affixKey.length) + this.stripValue;
-				// now make sure all of the conditions on characters
-				// are met.  Please see the appendix at the end of
-				// this file for more info on exactly what is being
-				// tested
-				// if all conditions are met then check if resulting
-				// root word in the dictionary
-				if ( this.conditionPattern.test( word ) ) {
-					// look word in hash table
-					for ( i=0; i < this.attributeManager.dictionaryManager.dictonaryList.length && !he; ++i ) {
-						he = this.attributeManager.dictionaryManager.dictonaryList[i].getElement(word);
-						while( he ) {
-							if ( he.testAffixs(this._flags) && ( (!needFlag) || he.testAffix(needFlag) ) ) {
-								return he;
-							}
-							he = he.next;
-						}
-					}
-					//if ((opts & aeXPRODUCT) && in_compound)
-					if ( this.permissionToCombine ) {
-						he = this.attributeManager.optPrefixCheck(word, InternalConstants.aeXPRODUCT,this, needFlag, inCompound);
-						if (he) return he; 
-					}
-				} 
-				
-			}
-			return he;
-		}
-		
-		//for develepors only, function used for printing flags when flag_mode=FLAG.LONG presently not being called anywhere
-		public function printFlag(flag:Number):void{
-			var result:String =  String.fromCharCode(flag>>8) + String.fromCharCode(flag-((flag>>8)<<8));
-			var x:String= this.affixKey;
-		}
-		// see if this suffix is present in the word
-		public function checkWord2( word:String, sfxopts:int, ppfx:AffixEntry, needFlag:int, inCompound:int, cclass:int, pfxcclass:int=0):HashEntry {
-			var disLen:int = word.length - this.affixKey.length;
-			var he:HashEntry = null;
-			var i:int;
-
-			// if this suffix is being cross checked with a prefix
-			// but it does not support cross products skip it
-			if ( (sfxopts& InternalConstants.aeXPRODUCT) != 0 && this.permissionToCombine != true ) return null;
-
-			// upon entry suffix is 0 length or already matches the end of the word.
-			// So if the remaining root word has positive length
-			// and if there are enough chars in root word and added back strip chars
-			// to meet the number of characters conditions, then test it
-			if ( (disLen > 0 || (disLen == 0 && this.attributeManager.fullStrip)) ) {
-				// generate new root word by removing suffix and adding
-				// back any characters that would have been stripped or
-				// or null terminating the shorter string
-				word = word.substr(0, word.length - this.affixKey.length) + this.stripValue;
-				// now make sure all of the conditions on characters
-				// are met.  Please see the appendix at the end of
-				// this file for more info on exactly what is being
-				// tested
-				// if all conditions are met then check if resulting
-				// root word in the dictionary
-				if ( this.conditionPattern.test( word ) ) {
-					// look word in hash table
-					for ( i=0; i < this.attributeManager.dictionaryManager.dictonaryList.length && !he; ++i ) {
-						he = this.attributeManager.dictionaryManager.dictonaryList[i].getElement(word);
-						while( he ) {
-							if (  (( he.testAffixs(this._flags) ) && ( (!needFlag) || he.testAffix(needFlag) ))||(ppfx && ppfx.contclass) ) {
-								for ( var j:int=0;j<this._sfxTable.length;++j) {
-									if ( (this._sfxTable[j] ).conditionPattern.test(word) ) {
-										if(!ppfx)
-										{
-											if(cclass)
-											{
-												if (he.testAffix(this._flags[j]) && HashEntry.TESTAFF(this.contclass,cclass) )//should handle cases like drink->able->s also in un-run-able-s if run-->able and able-->s and s-->un this should suffice
-													return he;
-											}
-											else											
-											{	if(he.testAffix(this._flags[j]))//should handle all normal cases like drink->able or drink->s
-												return he;
-											}
-											
-																						
-										}
-										else
-										{
-											if(this.contclass && he.testAffix(this._flags[j]) && HashEntry.TESTAFF(this.contclass,cclass) && !pfxcclass) // handle when suffix has contclass like l'->autre->s
-											{
-											return he;
-											}
-											if(ppfx.contclass && HashEntry.TESTAFF(ppfx.contclass,this._flags[j]) && he.testAffix(cclass) && !pfxcclass) //handle when prefix has contclass like milli->litre->s
-											{
-												return he;	
-											}
-											if(he.testAffix(this._flags[j]) && he.testAffix(cclass))//handle normal cases when both pfx and sfx exist in hash affix string
-											{
-											return he;
-											}
-											
-											//special case of un-drink-able-s
-											if(    (he.testAffix(pfxcclass) && ppfx.contclass && HashEntry.TESTAFF(ppfx.contclass,this._flags[j]) && this.contclass && HashEntry.TESTAFF(this.contclass,cclass)) 
-											   ||  (he.testAffix(this._flags[j]) && this.contclass && HashEntry.TESTAFF(this.contclass,cclass) && HashEntry.TESTAFF(this.contclass,pfxcclass))
-											   )
-											{
-												return he;
-											}
-											
-																						
-										}
-											
-										}
-								}
-							}
-							he = he.next;
-						}
-					}
-
-				} 
-				
-			}
-			return he;
-		}
-		
-		// Function for two level suffix checkword
-		// see if this suffix is present in the word
-		public function checkTwoWord( word:String, sfxopts:int, ppfx:AffixEntry, needFlag:int, cclass:int, pfxcclass:int=0):HashEntry {
-			var disLen:int = word.length - this.affixKey.length;
-			var he:HashEntry = null;
-			var i:int;
-			
-			// if this suffix is being cross checked with a prefix
-			// but it does not support cross products skip it
-			if ( (sfxopts& InternalConstants.aeXPRODUCT) != 0 && this.permissionToCombine != true ) return null;
-			
-			// upon entry suffix is 0 length or already matches the end of the word.
-			// So if the remaining root word has positive length
-			// and if there are enough chars in root word and added back strip chars
-			// to meet the number of characters conditions, then test it
-			if ( (disLen > 0 || (disLen == 0 && this.attributeManager.fullStrip)) ) {
-				// generate new root word by removing suffix and adding
-				// back any characters that would have been stripped or
-				// or null terminating the shorter string
-				word = word.substr(0, word.length - this.affixKey.length) + this.stripValue;
-				// now make sure all of the conditions on characters
-				// are met.  Please see the appendix at the end of
-				// this file for more info on exactly what is being
-				// tested
-				// if all conditions are met then see if for conditional suffix and if this has been stripped by a possible
-				// contclass check the remaining word 
-				// eg: if drinkables was original word and after possible stripping of s we have drinkable very if 
-				// now check drinkable, able will be stripped and drink will be found that hash entry will then be returned
-				if ( this.conditionPattern.test( word ) ) {//checks a whole group of 
-					
-					if(ppfx)
-					{ //check for conditional suffix
-						if( contclass!=null && HashEntry.TESTAFF(contclass, pfxcclass))
-						{
-							he = this.attributeManager.optSuffixCheck2(word, 0, null,needFlag,0,cclass,pfxcclass);//we are not sending ppfx here as it will not be needed.
-						}
-						else
-						{
-							he = this.attributeManager.optSuffixCheck2(word, sfxopts, ppfx,needFlag,0,cclass,pfxcclass);
-						}
-					}
-					else
-					{
-						he = this.attributeManager.optSuffixCheck2(word, 0, null,needFlag,0,cclass,0);
-					}
-					if (he) {
-						for ( var j:int=0;j<this._sfxTable.length;++j) { //Squiggly will handle drink->able->s from here
-							if ( (this._sfxTable[j]).conditionPattern.test(word) && cclass==(this._sfxTable[j]).flag) {//only permit words which end with s in drinkables
-								
-									return he;
-							
-							}
-						}
-						he = null;
-					}
-					
-				} 
-				
-			}
-			
-			return he;
-		}
-		//--
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/rule/PrefixEntry.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/rule/PrefixEntry.as b/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/rule/PrefixEntry.as
deleted file mode 100644
index 7df2e55..0000000
--- a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/rule/PrefixEntry.as
+++ /dev/null
@@ -1,102 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-
-package com.adobe.linguistics.spelling.core.rule
-{
-	import com.adobe.linguistics.spelling.core.HashEntry;
-	import com.adobe.linguistics.spelling.core.env.InternalConstants;
-	public class PrefixEntry extends AffixEntry
-	{
-		private var _flagNext:PrefixEntry;
-		private var _keyNext:PrefixEntry;
-		public function PrefixEntry(affixFlag:int, stripString:String, affixValue:String, conditionString:String, morph:String = "", permission:Boolean = false,contclass:String=null)
-		{
-			super(affixFlag,stripString,affixValue,conditionString,morph, permission, 0,contclass);
-			this.nextElementWithFlag = null;
-			this.nextElementWithKey = null;
-		}
-		
-		public function add(root:String):String {
-			if ( this.conditionPattern.test(root) )
-				return this.affixKey + root.substring(this.stripValue.length );
-			return null; 
-		}
-		
-		public function get nextElementWithKey():PrefixEntry {
-			return this._keyNext;
-		}
-		
-		public function set nextElementWithKey(pfxEntry:PrefixEntry):void {
-			this._keyNext = pfxEntry;
-		}
-		
-		public function get nextElementWithFlag():PrefixEntry {
-			return this._flagNext;
-		}
-		
-		public function set nextElementWithFlag(pfxEntry:PrefixEntry):void {
-			this._flagNext = pfxEntry;
-		}
-		
-		// check if this prefix entry matches
-		public function checkWord( word:String, inCompound:int, needFlag:int):HashEntry {
-			var disLen:int = word.length - this.affixKey.length;
-			var he:HashEntry = null;
-			var i:int;
-			// on entry prefix is 0 length or already matches the beginning of the word.
-			// So if the remaining root word has positive length
-			// and if there are enough chars in root word and added back strip chars
-			// to meet the number of characters conditions, then test it
-			if ( disLen > 0 || (disLen == 0 && this.attributeManager.fullStrip) ) {
-				// generate new root word by removing prefix and adding
-				// back any characters that would have been stripped
-				word = this.stripValue + word.substr(this.affixKey.length);
-				// now make sure all of the conditions on characters
-				// are met.  Please see the appendix at the end of
-				// this file for more info on exactly what is being
-				// tested
-				// if all conditions are met then check if resulting
-				// root word in the dictionary
-				if ( this.conditionPattern.test( word ) ) {
-					// look word in hash table
-					for ( i=0; i < this.attributeManager.dictionaryManager.dictonaryList.length && !he; ++i ) {
-						he = this.attributeManager.dictionaryManager.dictonaryList[i].getElement(word);
-						while( he ) {
-							if ( he.testAffix(this.flag) && ( (!needFlag) || he.testAffix(needFlag) ) ) {
-								return he;
-							}
-							he = he.next;
-						}
-					}
-					//if ((opts & aeXPRODUCT) && in_compound)
-					if ( this.permissionToCombine ) {
-						he = this.attributeManager.suffixCheck2(word, InternalConstants.aeXPRODUCT,this, needFlag, inCompound);
-						if (he) return he; 
-					}
-				} 
-				
-			}
-			return he;
-		}
-
-
-
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/rule/ReplacementFilter.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/rule/ReplacementFilter.as b/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/rule/ReplacementFilter.as
deleted file mode 100644
index 8f0b1d9..0000000
--- a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/rule/ReplacementFilter.as
+++ /dev/null
@@ -1,34 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-
-package com.adobe.linguistics.spelling.core.rule
-{
-		/*
-		 * Deprecated class for now...
-		 * ToDo: It is a place holder for metaphone algorithm in the rule based engine.
-		 */
-	public class ReplacementFilter
-	{
-		public function ReplacementFilter()
-		{
-		}
-
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/rule/SimpleFilter.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/rule/SimpleFilter.as b/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/rule/SimpleFilter.as
deleted file mode 100644
index 4763059..0000000
--- a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/rule/SimpleFilter.as
+++ /dev/null
@@ -1,48 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-
-package com.adobe.linguistics.spelling.core.rule
-{
-	public class SimpleFilter
-	{
-		private var _matchString:String;
-		private var _replacementString:String;
-		public function SimpleFilter(matchingString:String, replacementString:String)
-		{
-			this.matchString = matchingString;
-			this.replacement = replacementString;
-		}
-		
-		public function set matchString(value:String) :void {
-			this._matchString = value;
-		}
-		public function get matchString():String {
-			return this._matchString;
-		}
-		
-		public function set replacement(value:String) :void {
-			this._replacementString = value;
-		}
-		public function get replacement() :String {
-			return this._replacementString;
-		}
-
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/rule/SuffixEntry.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/rule/SuffixEntry.as b/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/rule/SuffixEntry.as
deleted file mode 100644
index 313ada3..0000000
--- a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/rule/SuffixEntry.as
+++ /dev/null
@@ -1,126 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-
-package com.adobe.linguistics.spelling.core.rule
-{
-	import com.adobe.linguistics.spelling.core.HashEntry;
-	import com.adobe.linguistics.spelling.core.env.InternalConstants;
-
-	public class SuffixEntry extends AffixEntry
-	{
-		private var _flagNext:SuffixEntry;
-		private var _keyNext:SuffixEntry;
-		private var _conditionPattern2:RegExp = null;;
-		private var _noTestFlag:Boolean = false;
-		public function SuffixEntry(affixFlag:int, stripString:String, affixValue:String, conditionString:String, morph:String = "", permission:Boolean = false, contclass:String=null)
-		{
-			super(affixFlag,stripString,affixValue,conditionString,morph, permission, 1,contclass);
-			this.nextElementWithFlag = null;
-			this.nextElementWithKey = null;
-			if ( this.stripValue != "" ) {
-				if ( this.conditionString == "." ) {
-						this._conditionPattern2 = null;
-						this._noTestFlag = true;
-					
-				}else {
-					var stripPattern:RegExp = new RegExp ( "^(.*)"+this.stripValue+"$" );
-					var strArr:Array;
-					if ( (strArr = this.conditionString.match(stripPattern) ) != null ) {
-						if ( strArr[1] != "" ) {
-							this._conditionPattern2 = new RegExp( "^.*" + strArr[1] + "$" );
-						}else {
-							this._conditionPattern2 = null;
-							this._noTestFlag = true;
-						}
-					}else {
-						this._conditionPattern2 = this.conditionPattern;
-					}
-				}
-			}
-			
-		}
-		
-		public function add(root:String):String {
-			if ( this.conditionPattern.test(root) )
-				return root.substring(0, (root.length-this.stripValue.length) ) + this.affixKey;
-			return null; 
-		}
-		
-		public function get nextElementWithKey():SuffixEntry {
-			return this._keyNext;
-		}
-		
-		public function set nextElementWithKey(pfxEntry:SuffixEntry):void {
-			this._keyNext = pfxEntry;
-		}
-		
-		public function get nextElementWithFlag():SuffixEntry {
-			return this._flagNext;
-		}
-		
-		public function set nextElementWithFlag(pfxEntry:SuffixEntry):void {
-			this._flagNext = pfxEntry;
-		}
-
-		// see if this suffix is present in the word
-		public function checkWord( word:String, sfxopts:int, ppfx:AffixEntry, needFlag:int, inCompound:int):HashEntry {
-			var disLen:int = word.length - this.affixKey.length;
-			var he:HashEntry = null;
-			var i:int;
-
-			// if this suffix is being cross checked with a prefix
-			// but it does not support cross products skip it
-			if ( (sfxopts& InternalConstants.aeXPRODUCT) != 0 && this.permissionToCombine != true ) return null;
-
-			// upon entry suffix is 0 length or already matches the end of the word.
-			// So if the remaining root word has positive length
-			// and if there are enough chars in root word and added back strip chars
-			// to meet the number of characters conditions, then test it
-			if ( (disLen > 0 || (disLen == 0 && this.attributeManager.fullStrip)) ) {
-				// generate new root word by removing suffix and adding
-				// back any characters that would have been stripped or
-				// or null terminating the shorter string
-				word = word.substr(0, word.length - this.affixKey.length) + this.stripValue;
-				// now make sure all of the conditions on characters
-				// are met.  Please see the appendix at the end of
-				// this file for more info on exactly what is being
-				// tested
-				// if all conditions are met then check if resulting
-				// root word in the dictionary
-				if ( this._noTestFlag || this.conditionPattern.test( word ) ) {
-					// look word in hash table
-					for ( i=0; i < this.attributeManager.dictionaryManager.dictonaryList.length && !he; ++i ) {
-						he = this.attributeManager.dictionaryManager.dictonaryList[i].getElement(word);
-						while( he ) {
-							if ( he.testAffix(this.flag) && ( (!needFlag) || he.testAffix(needFlag) ) ) {
-								return he;
-							}
-							he = he.next;
-						}
-					}
-
-				} 
-				
-			}
-			return he;
-		}
-
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/utils/DictionaryLoader.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/utils/DictionaryLoader.as b/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/utils/DictionaryLoader.as
deleted file mode 100644
index 1092179..0000000
--- a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/utils/DictionaryLoader.as
+++ /dev/null
@@ -1,94 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-
-
-package com.adobe.linguistics.spelling.core.utils
-{
-	import flash.events.Event;
-	import flash.events.EventDispatcher;
-	import flash.events.IOErrorEvent;
-	import flash.events.SecurityErrorEvent;
-	import flash.net.URLLoader;
-	import flash.net.URLLoaderDataFormat;
-	import flash.net.URLRequest;
-	import flash.utils.ByteArray;
-	import flash.utils.getTimer;
-	
-	public class DictionaryLoader extends EventDispatcher
-	{
-		private var dataloader:URLLoader;
-		private var _data:ByteArray;
-		public function DictionaryLoader(request:URLRequest=null)
-		{
-			dataloader = new URLLoader();
-			dataloader.dataFormat = URLLoaderDataFormat.BINARY;
-			dataloader.addEventListener(Event.COMPLETE,handleComplete);
-			dataloader.addEventListener(IOErrorEvent.IO_ERROR,handleError);
-			dataloader.addEventListener(SecurityErrorEvent.SECURITY_ERROR,handleError);
-			if (request) { 
-				try {
-					load(request); 
-				}
-				catch (error:Error) {
-									
-				}
-			}
-			else 
-			{
-				dispatchEvent(new Event(Event.COMPLETE));
-			}
-		}
-		
-		public function get bytesTotal():uint {
-			return dataloader.bytesTotal;
-		}
-		
-		public function get data():ByteArray {
-			return this._data;
-		}
-
-		public function load(request:URLRequest):void {
-			_data = null;
-			//trace("Before Actual load: "+getTimer()+" "+dataloader.bytesLoaded);
-			dataloader.load(request);
-			
-		}
-
-		private function handleComplete(evt:Event):void {
-			// add to-do function.
-			this._data = (dataloader.data as ByteArray);
-			dispatchEvent(new Event(Event.COMPLETE));
-		}
-
-		private function handleError(evt:Event):void {
-			bounceEvent(evt);
-		}
-		
-		private function bounceEvent(evt:Event):void {
-			dispatchEvent(evt.clone());
-		}
-		
-		public function getData(): ByteArray {
-			return this._data;
-		}
-		
-
-	}
-}
\ No newline at end of file


[16/50] [abbrv] git commit: [flex-utilities] [refs/heads/master] - add top level build file to package everything up

Posted by jm...@apache.org.
add top level build file to package everything up


Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/47a594e0
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/47a594e0
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/47a594e0

Branch: refs/heads/master
Commit: 47a594e0e88797f262f278db562950ab50141a58
Parents: 7be1a52
Author: Justin Mclean <jm...@apache.org>
Authored: Thu Aug 28 10:54:28 2014 +1000
Committer: Justin Mclean <jm...@apache.org>
Committed: Thu Aug 28 10:54:28 2014 +1000

----------------------------------------------------------------------
 Squiggly/build.xml | 139 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 139 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/47a594e0/Squiggly/build.xml
----------------------------------------------------------------------
diff --git a/Squiggly/build.xml b/Squiggly/build.xml
new file mode 100644
index 0000000..8d1c62d
--- /dev/null
+++ b/Squiggly/build.xml
@@ -0,0 +1,139 @@
+<?xml version="1.0" ?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+
+-->
+<project name="Squiggly" default="compile" basedir=".">
+
+    <property file="${basedir}/env.properties"/>
+    <property environment="env"/>
+    <property file="${basedir}/local.properties"/>
+    <property file="${basedir}/build.properties"/>
+	
+    <property name="version" value="1.0" />
+	
+	<target name="compile" description="compile squiggly swcs and ane" depends="compile-swc,compile-ane">
+	</target>
+	
+	<target name="compile-swc" description="compile squiggly swcs">
+		<ant dir="main" />
+	</target>
+	
+	<target name="compile-ane" description="compile squiggly ane">
+		<!-- TODO may be added in a future release -->
+	</target>
+		
+	<target name="package" description="package up all source files" depends="package-dir,package-source-tar,package-source-zip,package-binary-tar,package-binary-zip">
+	</target>
+	
+	<target name="package-dir">
+		<delete dir="${basedir}/out"/>  
+		<mkdir dir="${basedir}/out"/> 
+	</target>
+		
+	<target name="package-source-tar" description="tar up all source files">     
+        <tar destfile="${basedir}/out/apache-flex-squiggly-${version}-src.tar.gz" 
+         	compression="gzip"
+            longfile="gnu">
+            <tarfileset dir="${basedir}">
+                <include name="LICENSE" />
+                <include name="NOTICE" />
+                <include name="README" />
+                <include name="RELEASE_NOTES" />
+                <include name="**/*.xml" />
+                <include name="**/*.mxml" />
+            	<include name="**/*.as" />
+            	<include name="**/*.txt" />
+            	<include name="**/*.bat" />
+            	<include name="**/*.py" />
+            	<include name="**/*.sh" />
+            	<include name="**/*.properties" />
+            	<exclude name="ane/**" />
+             </tarfileset>
+         </tar>
+	</target>
+	
+	<target name="package-source-zip" description="zip up all source files">    
+        <zip destfile="${basedir}/out/apache-flex-squiggly-${version}-src.zip">
+            <fileset dir="${basedir}">
+                <include name="LICENSE" />
+                <include name="NOTICE" />
+                <include name="README" />
+                <include name="RELEASE_NOTES" />
+                <include name="**/*.xml" />
+                <include name="**/*.mxml" />
+            	<include name="**/*.as" />
+            	<include name="**/*.txt" />
+            	<include name="**/*.bat" />
+            	<include name="**/*.py" />
+            	<include name="**/*.sh" />
+            	<include name="**/*.properties" />
+            	<exclude name="ane/**" />
+             </fileset>
+         </zip>
+	</target>
+	
+	<target name="package-binary-tar" description="tar up all source files and swcs">     
+	        <tar destfile="${basedir}/out/apache-flex-squiggly-${version}-bin.tar.gz" 
+	         	compression="gzip"
+	            longfile="gnu">
+	            <tarfileset dir="${basedir}">
+	                <include name="LICENSE" />
+	                <include name="NOTICE" />
+	                <include name="README" />
+	                <include name="RELEASE_NOTES" />
+	                <include name="**/*.xml" />
+	                <include name="**/*.mxml" />
+	            	<include name="**/*.as" />
+	            	<include name="**/*.txt" />
+	            	<include name="**/*.bat" />
+	            	<include name="**/*.py" />
+	            	<include name="**/*.sh" />
+	            	<include name="**/*.properties" />
+	                <include name="**/*.swc" />
+	            	<exclude name="ane/**" />
+	             </tarfileset>
+	         </tar>
+		</target>
+		
+		<target name="package-binary-zip" description="zip up all source files and swcs">    
+	        <zip destfile="${basedir}/out/apache-flex-squiggly-${version}-bin.zip">
+	            <fileset dir="${basedir}">
+	                <include name="LICENSE" />
+	                <include name="NOTICE" />
+	                <include name="README" />
+	                <include name="RELEASE_NOTES" />
+	                <include name="**/*.xml" />
+	                <include name="**/*.mxml" />
+	            	<include name="**/*.as" />
+	            	<include name="**/*.txt" />
+	            	<include name="**/*.bat" />
+	            	<include name="**/*.py" />
+	            	<include name="**/*.sh" />
+	            	<include name="**/*.properties" />
+	                <include name="**/*.swc" />
+	            	<exclude name="ane/**" />
+	             </fileset>
+	         </zip>
+		</target>
+   
+    <target name="clean" description="clean up">
+    	<delete>
+    		<fileset dir="${basedir}" includes="**/*.swf" />
+    	</delete>
+    </target>
+</project>
\ No newline at end of file


[35/50] [abbrv] git commit: [flex-utilities] [refs/heads/master] - update flash player version and change directories

Posted by jm...@apache.org.
update flash player version and change directories


Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/0e3fa32f
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/0e3fa32f
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/0e3fa32f

Branch: refs/heads/master
Commit: 0e3fa32faf52090b9e52dfc325b183965ba6199c
Parents: 4e4f983
Author: Justin Mclean <jm...@apache.org>
Authored: Thu Aug 28 10:57:43 2014 +1000
Committer: Justin Mclean <jm...@apache.org>
Committed: Thu Aug 28 10:57:43 2014 +1000

----------------------------------------------------------------------
 Squiggly/main/build.xml | 92 ++++++++++++++++++++++----------------------
 1 file changed, 46 insertions(+), 46 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/0e3fa32f/Squiggly/main/build.xml
----------------------------------------------------------------------
diff --git a/Squiggly/main/build.xml b/Squiggly/main/build.xml
index 5bae583..9328068 100644
--- a/Squiggly/main/build.xml
+++ b/Squiggly/main/build.xml
@@ -40,7 +40,7 @@
 	<property name="COMPC.JAR" value="${FLEX_HOME}/lib/compc.jar"/>
 	<property name="ADL" value="${AIR_HOME}/bin/adl.exe"/>
     <property name="ADT.JAR" value="${AIR_HOME}/lib/adt.jar"/>
-    <property name="playerglobal.version" value="11.1" />
+    <property name="playerglobal.version" value="14.0" />
 	
     <property name="OUTPUT_DIR" value="libs"/>
     
@@ -51,40 +51,40 @@
 	<target name="compilelinguistics" depends="init">
 		<java jar="${COMPC.JAR}" fork="true" failonerror="true">
 			<arg value="-swf-version"/>
-			<arg value="13"/>
+			<arg value="25"/>
 			<arg value="+flexlib=${FLEX_HOME}/frameworks"/>
 			<arg value="-source-path"/>
-			<arg value="AdobeLinguisticUtils/src"/>
+			<arg value="LinguisticUtils/src"/>
 			<arg value="-include-sources"/>
-			<arg value="AdobeLinguisticUtils/src"/>
+			<arg value="LinguisticUtils/src"/>
 			<arg value="-output"/>
-			<arg value="${OUTPUT_DIR}/AdobeLinguisticUtils.swc"/>
+			<arg value="${OUTPUT_DIR}/ApacheFlexLinguisticUtils.swc"/>
 		</java>
 	</target>
 	
 	<target name="compileengine" depends="init">
 		<java jar="${COMPC.JAR}" fork="true" failonerror="true">
 			<arg value="-swf-version"/>
-			<arg value="13"/>
+			<arg value="25"/>
 			<arg value="+flexlib=${FLEX_HOME}/frameworks"/>
 			<arg value="-source-path"/>
-			<arg value="AdobeSpellingEngine/src"/>
+			<arg value="SpellingEngine/src"/>
 			<arg value="-include-sources"/>
-			<arg value="AdobeSpellingEngine/src"/>
+			<arg value="SpellingEngine/src"/>
 			<arg value="-output"/>
-			<arg value="${OUTPUT_DIR}/AdobeSpellingEngine.swc"/>
+			<arg value="${OUTPUT_DIR}/ApacheflexSpellingEngine.swc"/>
 		</java>
 	</target>
 
 	<target name="compileframework" depends="init">
 		<java jar="${COMPC.JAR}" fork="true" failonerror="true">
 			<arg value="-swf-version"/>
-			<arg value="13"/>
+			<arg value="25"/>
 			<arg value="+flexlib=${FLEX_HOME}/frameworks"/>
 			<arg value="-source-path"/>
-			<arg value="AdobeSpellingFramework/src"/>
+			<arg value="SpellingFramework/src"/>
 			<arg value="-include-sources"/>
-			<arg value="AdobeSpellingFramework/src"/>
+			<arg value="SpellingFramework/src"/>
 			<arg value="-external-library-path"/>
 			<arg value="${FLEX_HOME}/frameworks/libs/framework.swc"/>
 			<arg value="-external-library-path"/>
@@ -96,23 +96,23 @@
 			<arg value="-external-library-path"/>
 			<arg value="${PLAYERGLOBAL_HOME}/${playerglobal.version}/playerglobal.swc"/>
 			<arg value="-external-library-path"/>
-			<arg value="${OUTPUT_DIR}/AdobeLinguisticUtils.swc"/>
+			<arg value="${OUTPUT_DIR}/ApacheFlexLinguisticUtils.swc"/>
 			<arg value="-external-library-path"/>
-			<arg value="${OUTPUT_DIR}/AdobeSpellingEngine.swc"/>
+			<arg value="${OUTPUT_DIR}/ApacheflexSpellingEngine.swc"/>
 			<arg value="-output"/>
-			<arg value="${OUTPUT_DIR}/AdobeSpellingFramework.swc"/>
+			<arg value="${OUTPUT_DIR}/ApacheFlexSpellingFramework.swc"/>
 		</java>
 	</target>
 
 	<target name="compileui" depends="init">
 		<java jar="${COMPC.JAR}" fork="true" failonerror="true">
 			<arg value="-swf-version"/>
-			<arg value="13"/>
+			<arg value="25"/>
 			<arg value="+flexlib=${FLEX_HOME}/frameworks"/>
 			<arg value="-source-path"/>
-			<arg value="AdobeSpellingUI/src"/>
+			<arg value="SpellingUI/src"/>
 			<arg value="-include-sources"/>
-			<arg value="AdobeSpellingUI/src"/>
+			<arg value="SpellingUI/src"/>
 			<arg value="-external-library-path"/>
 			<arg value="${FLEX_HOME}/frameworks/libs/framework.swc"/>
 			<arg value="-external-library-path"/>
@@ -124,25 +124,25 @@
 			<arg value="-external-library-path"/>
 			<arg value="${PLAYERGLOBAL_HOME}/${playerglobal.version}/playerglobal.swc"/>
 			<arg value="-external-library-path"/>
-			<arg value="${OUTPUT_DIR}/AdobeLinguisticUtils.swc"/>
+			<arg value="${OUTPUT_DIR}/ApacheFlexLinguisticUtils.swc"/>
 			<arg value="-external-library-path"/>
-			<arg value="${OUTPUT_DIR}/AdobeSpellingEngine.swc"/>
+			<arg value="${OUTPUT_DIR}/ApacheFlexSpellingEngine.swc"/>
 			<arg value="-external-library-path"/>
-			<arg value="${OUTPUT_DIR}/AdobeSpellingFramework.swc"/>
+			<arg value="${OUTPUT_DIR}/ApacheFlexSpellingFramework.swc"/>
 			<arg value="-output"/>
-			<arg value="${OUTPUT_DIR}/AdobeSpellingUI.swc"/>
+			<arg value="${OUTPUT_DIR}/ApacheFlexSpellingUI.swc"/>
 		</java>
 	</target>
 
     <target name="compileuiapi" depends="init">
         <java jar="${COMPC.JAR}" fork="true" failonerror="true">
             <arg value="-swf-version"/>
-            <arg value="13"/>
+            <arg value="25"/>
             <arg value="+flexlib=${FLEX_HOME}/frameworks"/>
             <arg value="-source-path"/>
-            <arg value="AdobeSpellingUIAPI/src"/>
+            <arg value="SpellingUIAPI/src"/>
             <arg value="-include-sources"/>
-            <arg value="AdobeSpellingUIAPI/src"/>
+            <arg value="SpellingUIAPI/src"/>
 			<arg value="-external-library-path"/>
 			<arg value="${FLEX_HOME}/frameworks/libs/framework.swc"/>
 			<arg value="-external-library-path"/>
@@ -154,51 +154,51 @@
 			<arg value="-external-library-path"/>
 			<arg value="${PLAYERGLOBAL_HOME}/${playerglobal.version}/playerglobal.swc"/>
             <arg value="-external-library-path"/>
-            <arg value="${OUTPUT_DIR}/AdobeLinguisticUtils.swc"/>
+            <arg value="${OUTPUT_DIR}/ApacheflexLinguisticUtils.swc"/>
             <arg value="-external-library-path"/>
-            <arg value="${OUTPUT_DIR}/AdobeSpellingEngine.swc"/>
+            <arg value="${OUTPUT_DIR}/ApacheFlexSpellingEngine.swc"/>
             <arg value="-external-library-path"/>
-            <arg value="${OUTPUT_DIR}/AdobeSpellingFramework.swc"/>
+            <arg value="${OUTPUT_DIR}/ApacheFlexSpellingFramework.swc"/>
             <arg value="-output"/>
-            <arg value="${OUTPUT_DIR}/AdobeSpellingUIAPI.swc"/>
+            <arg value="${OUTPUT_DIR}/ApacheFlexSpellingUIAPI.swc"/>
         </java>
     </target>
 
     <target name="compileuitlf" depends="init">
         <java jar="${COMPC.JAR}" fork="true" failonerror="true">
             <arg value="-swf-version"/>
-            <arg value="13"/>
+            <arg value="25"/>
             <arg value="+flexlib=${FLEX_HOME}/frameworks"/>
             <arg value="-source-path"/>
-            <arg value="AdobeSpellingUITLF/src"/>
+            <arg value="SpellingUITLF/src"/>
             <arg value="-include-sources"/>
-            <arg value="AdobeSpellingUITLF/src"/>
+            <arg value="SpellingUITLF/src"/>
 			<arg value="-external-library-path"/>
 			<arg value="${FLEX_HOME}/frameworks/libs/textLayout.swc"/>
 			<arg value="-external-library-path"/>
 			<arg value="${PLAYERGLOBAL_HOME}/${playerglobal.version}/playerglobal.swc"/>
             <arg value="-external-library-path"/>
-            <arg value="${OUTPUT_DIR}/AdobeLinguisticUtils.swc"/>
+            <arg value="${OUTPUT_DIR}/ApacheFlexLinguisticUtils.swc"/>
             <arg value="-external-library-path"/>
-            <arg value="${OUTPUT_DIR}/AdobeSpellingEngine.swc"/>
+            <arg value="${OUTPUT_DIR}/ApacheFlexSpellingEngine.swc"/>
             <arg value="-external-library-path"/>
-            <arg value="${OUTPUT_DIR}/AdobeSpellingFramework.swc"/>
+            <arg value="${OUTPUT_DIR}/ApacheFlexSpellingFramework.swc"/>
             <arg value="-external-library-path"/>
-            <arg value="${OUTPUT_DIR}/AdobeSpellingUI.swc"/>
+            <arg value="${OUTPUT_DIR}/ApacheFlexSpellingUI.swc"/>
             <arg value="-output"/>
-            <arg value="${OUTPUT_DIR}/AdobeSpellingUITLF.swc"/>
+            <arg value="${OUTPUT_DIR}/ApacheFlexApacheFlexSpellingUITLF.swc"/>
         </java>
     </target>
 
     <target name="compileuiex" depends="init">
         <java jar="${COMPC.JAR}" fork="true" failonerror="true">
             <arg value="-swf-version"/>
-            <arg value="13"/>
+            <arg value="25"/>
             <arg value="+flexlib=${FLEX_HOME}/frameworks"/>
             <arg value="-source-path"/>
-            <arg value="AdobeSpellingUIEx/src"/>
+            <arg value="SpellingUIEx/src"/>
             <arg value="-include-sources"/>
-            <arg value="AdobeSpellingUIEx/src"/>
+            <arg value="SpellingUIEx/src"/>
 			<arg value="-external-library-path"/>
 			<arg value="${FLEX_HOME}/frameworks/libs/framework.swc"/>
 			<arg value="-external-library-path"/>
@@ -210,15 +210,15 @@
 			<arg value="-external-library-path"/>
 			<arg value="${PLAYERGLOBAL_HOME}/${playerglobal.version}/playerglobal.swc"/>
             <arg value="-external-library-path"/>
-            <arg value="${OUTPUT_DIR}/AdobeLinguisticUtils.swc"/>
+            <arg value="${OUTPUT_DIR}/ApacheFlexLinguisticUtils.swc"/>
             <arg value="-external-library-path"/>
-            <arg value="${OUTPUT_DIR}/AdobeSpellingEngine.swc"/>
+            <arg value="${OUTPUT_DIR}/ApacheFlexSpellingEngine.swc"/>
             <arg value="-external-library-path"/>
-            <arg value="${OUTPUT_DIR}/AdobeSpellingFramework.swc"/>
+            <arg value="${OUTPUT_DIR}/ApacheFlexSpellingFramework.swc"/>
             <arg value="-external-library-path"/>
-            <arg value="${OUTPUT_DIR}/AdobeSpellingUI.swc"/>
+            <arg value="${OUTPUT_DIR}/ApacheFlexSpellingUI.swc"/>
             <arg value="-output"/>
-            <arg value="${OUTPUT_DIR}/AdobeSpellingUIEx.swc"/>
+            <arg value="${OUTPUT_DIR}/ApacheFlexSpellingUIEx.swc"/>
         </java>
     </target>
 
@@ -228,4 +228,4 @@
     <target name="clean" description="clean up">
     	<delete dir="${OUTPUT_DIR}"/>
     </target>
-</project>
\ No newline at end of file
+</project>


[27/50] [abbrv] remove Adobe from directory names (package name still contains Adobe)

Posted by jm...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingUIAPI/src/com/adobe/linguistics/spelling/ui/HaloWordProcessor.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingUIAPI/src/com/adobe/linguistics/spelling/ui/HaloWordProcessor.as b/Squiggly/main/AdobeSpellingUIAPI/src/com/adobe/linguistics/spelling/ui/HaloWordProcessor.as
deleted file mode 100644
index 9360f0b..0000000
--- a/Squiggly/main/AdobeSpellingUIAPI/src/com/adobe/linguistics/spelling/ui/HaloWordProcessor.as
+++ /dev/null
@@ -1,109 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-package com.adobe.linguistics.spelling.ui
-{
-	import com.adobe.linguistics.utils.ITokenizer;
-	import com.adobe.linguistics.utils.TextTokenizer;
-	import com.adobe.linguistics.utils.Token;
-	
-	import flash.text.TextField;
-	import flash.text.TextFormat;
-	
-	import mx.controls.TextArea;
-	import mx.controls.TextInput;
-
-
-	public class HaloWordProcessor implements IWordProcessor
-	{
-		private var mTextField:TextField;
-
-		public function HaloWordProcessor(textField:TextField)
-		{
-			if (textField == null ) throw new Error("illegal argument."); 
-			mTextField = textField;
-		}
-
-		
-		public function replaceText(startIndex:int, endIndex:int, replacement:String):void {
-			
-			if ( replacement == null ) return;
-			
-			if (mTextField.text.length<endIndex || startIndex<0) {
-				return;
-			}
-			
-			var _misspellStart:int = startIndex;
-			var _misspellEnd:int = endIndex;
-			// Try to preserve the format, this works if the whole misspelled word is the same format
-			var tf:TextFormat = mTextField.getTextFormat(_misspellStart, _misspellEnd);
-			mTextField.replaceText(_misspellStart, _misspellEnd, replacement);	
-			mTextField.setTextFormat(tf, _misspellStart, _misspellStart+replacement.length);
-			
-			var ta:TextArea = mTextField.parent as TextArea;
-			var ti:TextInput = mTextField.parent as TextInput;
-			
-			if (ta != null) {
-				ta.selectionBeginIndex = _misspellStart + replacement.length;
-				ta.selectionEndIndex = _misspellStart + replacement.length;
-			}
-			else if (ti != null) {
-				ti.selectionBeginIndex = _misspellStart + replacement.length;
-				ti.selectionEndIndex = _misspellStart + replacement.length;				
-			}
-			else {
-				// Do nothing if it's not a valid text component
-			}
-		}
-
-
-		public function getWordAtPoint(x:uint, y:uint, externalTokenizer:ITokenizer=null):Token
-		{
-			var _token:Token = tryGetWordAtPoint(x,y, externalTokenizer);
-			return _token;
-		}
-		
-		private function tryGetWordAtPoint(x:uint, y:uint, externalTokenizer:ITokenizer=null):Token {
-			// TODO: use a better alternative than _misspellStart, end
-			var index:uint = mTextField.getCharIndexAtPoint(x + mTextField.scrollH, y);
-			if (index >= mTextField.text.length) return null;
-
-			var tmpToken:Token = new Token(index,index);
-			var tokenizer:ITokenizer;
-			if ( externalTokenizer == null ) {
-				tokenizer = new TextTokenizer(mTextField.text);	
-			}else {
-				tokenizer = externalTokenizer;
-			}
-			
-			var result:Token = new Token(0,0);
-			
-			var preToken:Token = tokenizer.getPreviousToken(tmpToken);
-			var nextToken:Token = tokenizer.getNextToken(tmpToken);
-			if ( preToken.last == nextToken.first ) {
-				result.first = preToken.first;
-				result.last = nextToken.last;
-				return result;		
-			}else {
-				return null;
-			}
-		}
-
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingUIAPI/src/com/adobe/linguistics/spelling/ui/IHighlighter.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingUIAPI/src/com/adobe/linguistics/spelling/ui/IHighlighter.as b/Squiggly/main/AdobeSpellingUIAPI/src/com/adobe/linguistics/spelling/ui/IHighlighter.as
deleted file mode 100644
index ea702da..0000000
--- a/Squiggly/main/AdobeSpellingUIAPI/src/com/adobe/linguistics/spelling/ui/IHighlighter.as
+++ /dev/null
@@ -1,34 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-package com.adobe.linguistics.spelling.ui
-{
-	import com.adobe.linguistics.utils.Token;
-	import __AS3__.vec.Vector;
-	import flash.geom.Point;
-	
-	public interface IHighlighter
-	{
-		function drawSquiggles(tokens:Vector.<Token>):void;
-		function clearSquiggles():void;
-		function set offsetPoint(op:Point):void;
-		function get offsetPoint():Point;
-		
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingUIAPI/src/com/adobe/linguistics/spelling/ui/IWordProcessor.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingUIAPI/src/com/adobe/linguistics/spelling/ui/IWordProcessor.as b/Squiggly/main/AdobeSpellingUIAPI/src/com/adobe/linguistics/spelling/ui/IWordProcessor.as
deleted file mode 100644
index 919acbd..0000000
--- a/Squiggly/main/AdobeSpellingUIAPI/src/com/adobe/linguistics/spelling/ui/IWordProcessor.as
+++ /dev/null
@@ -1,30 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-package com.adobe.linguistics.spelling.ui
-{
-	import com.adobe.linguistics.utils.ITokenizer;
-	import com.adobe.linguistics.utils.Token;
-	
-	public interface IWordProcessor
-	{
-		function getWordAtPoint(x:uint, y:uint, externalTokenizer:ITokenizer=null):Token;
-		function replaceText(startIndex:int, endIndex:int, replacement:String):void;
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingUIAPI/src/com/adobe/linguistics/spelling/ui/SparkHighlighter.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingUIAPI/src/com/adobe/linguistics/spelling/ui/SparkHighlighter.as b/Squiggly/main/AdobeSpellingUIAPI/src/com/adobe/linguistics/spelling/ui/SparkHighlighter.as
deleted file mode 100644
index f847584..0000000
--- a/Squiggly/main/AdobeSpellingUIAPI/src/com/adobe/linguistics/spelling/ui/SparkHighlighter.as
+++ /dev/null
@@ -1,190 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-package com.adobe.linguistics.spelling.ui
-{
-	import com.adobe.linguistics.utils.Token;
-	import com.adobe.linguistics.utils.TextTokenizer;
-	import flash.geom.Point;
-	
-	import flash.display.Shape;
-	import flash.geom.Rectangle;
-	import flash.text.engine.TextLine;
-	
-	import flashx.textLayout.compose.TextFlowLine;
-	import flashx.textLayout.edit.SelectionManager;
-	import flashx.textLayout.elements.TextFlow;
-	import flashx.textLayout.tlf_internal;
-	
-	import spark.components.RichEditableText;
-	use namespace tlf_internal;	
-
-	public class SparkHighlighter implements IHighlighter
-	{
-		
-		private var mTextField:RichEditableText;
-		private var mHighlighter:Shape;
-		/*
-		* offset point:
-		*/
-		private var _offsetPoint:Point;
-
-
-		public function SparkHighlighter( textField:RichEditableText )
-		{
-			if (textField == null ) throw new Error("illegal argument."); 
-			mTextField = textField;
-			mHighlighter = null;
-			this._offsetPoint = new Point(0,0);
-		}
-
-		public function drawSquiggles(tokens:Vector.<Token>):void
-		{
-			spellCheckRange(tokens);
-		}
-		
-		public function clearSquiggles():void
-		{
-			if (mHighlighter) {
-				mTextField.removeChild(mHighlighter);
-				mHighlighter=null;
-			}		
-		}
-
-		public function set offsetPoint(op:Point):void{
-			_offsetPoint = op;
-		}
-		
-		public function get offsetPoint():Point{
-			return _offsetPoint;
-		}
-
-
-
-		// TODO: refactor this code to share with halo components, and support words that cross lines
-		private function spellCheckRange(tokens:Vector.<Token>):void {
-
-			var ta:RichEditableText = mTextField;
-			if (!ta) return;		
-
-			mHighlighter= new Shape();
-			mHighlighter.graphics.clear();
-			
-			for ( var i:int = 0; i< tokens.length; ++i ) {
-				var _token:Token = tokens[i];
-				drawSquigglyLineForRange(_token.first, _token.last);
-			}
-			
-			// Just adjust the left padding, top padding is not an issue 
-			//var pleft:uint = mTextField.getStyle("paddingLeft");
-			//mHighlighter.x += pleft;			
-			mTextField.addChild(mHighlighter);	
-			
-
-		}
-		
-		// Draw squiggly line
-		private function drawSquigglyLineForRange(start:Number, end:Number):void
-		{
-			// draw squiggly line
-			var tf:TextFlow = mTextField.textFlow;
-			var tflFirst:TextFlowLine = tf.flowComposer.findLineAtPosition(start);
-			var tflLast:TextFlowLine = tf.flowComposer.findLineAtPosition(end);
-			var tflIndexFirst:int = tf.flowComposer.findLineIndexAtPosition(start);
-			var tflIndexLast:int = tf.flowComposer.findLineIndexAtPosition(end);
-			
-			// Pointer
-			var tflIndex:int = tflIndexFirst;
-			var tfl:TextFlowLine = tflFirst;
-			
-			if (tflIndexFirst == tflIndexLast) {
-				// Draw one line
-				drawSquigglyLineAtIndex(tflIndexFirst, start - tflFirst.absoluteStart, end - tflFirst.absoluteStart);
-			} else {
-				// Multiple lines (very long word)
-				drawSquigglyLineAtIndex(tflIndexFirst, start - tflFirst.absoluteStart);
-				
-				tflIndex++;
-				while (tflIndex != tflIndexLast) {
-					drawSquigglyLineAtIndex(tflIndex);
-					tflIndex++;
-				}
-				
-				drawSquigglyLineAtIndex(tflIndexLast, 0, end - tflLast.absoluteStart);
-			}
-		}
-		
-		// Draw a squiggly line at specific line for specific index range
-		private function drawSquigglyLineAtIndex(lineIndex:Number, startIndex:Number=0, endIndex:Number=0x7FFFFFFF):void
-		{
-			var tf:TextFlow = mTextField.textFlow;
-			var tfl:TextFlowLine = tf.flowComposer.getLineAt(lineIndex);
-			var rectLine:Rectangle = tfl.getBounds();
-			if (endIndex == 0x7FFFFFFF) {
-				drawSquigglyLineAtPoint(rectLine.left, rectLine.bottom, rectLine.right - rectLine.left);
-			}
-			else {
-				// Force to have a valid TextLine
-				var tl:TextLine = tfl.getTextLine(true);
-				
-				// TODO: atom index and char index is not matching for some chars, use try/catch to avoid crash
-				try {
-					var rectFirst:Rectangle = tl.getAtomBounds(startIndex);
-					var rectLast:Rectangle = tl.getAtomBounds(endIndex);
-					drawSquigglyLineAtPoint(rectFirst.left + tfl.x, rectLine.bottom, rectLast.right - rectFirst.left);
-				} catch (err:Error)
-				{
-					//TODO: report error
-				}
-			}
-				
-		}
-		// Draw a squiggly from point x,y with given width, the line is drew in mHighlighter 
-		private function drawSquigglyLineAtPoint(x:Number, y:Number, width:Number):void
-		{
-			mHighlighter.graphics.lineStyle(1, 0xfa0707, .65);
-			mHighlighter.graphics.moveTo(x, y);
-			var upDirection:Boolean = false;
-			var offset:uint = 0;
-			var stepLength:uint = 2;
-			for ( var i:uint = 1; offset <= width; i++) {
-				offset = offset + stepLength;
-				if ( upDirection )
-					mHighlighter.graphics.lineTo(x+offset,y);
-				else
-					mHighlighter.graphics.lineTo(x+offset,y+stepLength);
-				upDirection = !upDirection;
-			}	
-		}
-		
-		private function getValidFirstWordIndex():int{
-			var index:int = SelectionManager.computeSelectionIndex(mTextField.textFlow, mTextField, mTextField, 0 + mTextField.horizontalScrollPosition, 0 + mTextField.verticalScrollPosition);
-			return index;
-
-			
-		}
-		
-		private function getValidLastWordIndex():int{
-			var index:int = SelectionManager.computeSelectionIndex(mTextField.textFlow, mTextField, mTextField, mTextField.width+mTextField.horizontalScrollPosition, mTextField.height+mTextField.verticalScrollPosition);
-			return index;
-
-		}
-
-	}
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingUIAPI/src/com/adobe/linguistics/spelling/ui/SparkWordProcessor.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingUIAPI/src/com/adobe/linguistics/spelling/ui/SparkWordProcessor.as b/Squiggly/main/AdobeSpellingUIAPI/src/com/adobe/linguistics/spelling/ui/SparkWordProcessor.as
deleted file mode 100644
index 81e155b..0000000
--- a/Squiggly/main/AdobeSpellingUIAPI/src/com/adobe/linguistics/spelling/ui/SparkWordProcessor.as
+++ /dev/null
@@ -1,104 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-package com.adobe.linguistics.spelling.ui
-{
-	import com.adobe.linguistics.utils.TextTokenizer;
-	import com.adobe.linguistics.utils.Token;
-	import com.adobe.linguistics.utils.ITokenizer;
-	
-	import flashx.textLayout.edit.SelectionManager;
-	import flashx.textLayout.tlf_internal;
-	
-	import spark.components.RichEditableText;
-	
-	use namespace tlf_internal;	
-	
-	public class SparkWordProcessor implements IWordProcessor
-	{
-		private var mTextField:RichEditableText;
-
-		public function SparkWordProcessor(textField:RichEditableText)
-		{
-			if (textField == null ) throw new Error("illegal argument."); 
-			mTextField = textField;
-		}
-		
-		
-		public function replaceText(startIndex:int, endIndex:int, replacement:String):void {
-			var ta:RichEditableText = mTextField;
-			var end:int = getValidLastWordIndex();
-			
-			if ( replacement == null ) return;
-			
-			if (mTextField.text.length<endIndex || startIndex<0) {
-				return;
-			}
-			
-			var _misspellStart:int = startIndex;
-			var _misspellEnd:int = endIndex;
-
-			// Workaround for Spark: changes in inactive components will trigger strange behavior			
-			ta.setFocus();
-			ta.text = ta.text.substr(0, _misspellStart) + replacement + ta.text.substr(_misspellEnd);
-			ta.textFlow;
-			ta.selectRange(_misspellStart + replacement.length, _misspellStart + replacement.length);
-			
-			// Workaround for unexpected jump
-			ta.scrollToRange(end, end);
-		}
-		
-		public function getWordAtPoint(x:uint, y:uint, externalTokenizer:ITokenizer=null):Token
-		{
-			// TODO: use a better alternative than _misspellStart, end
-			var ta:RichEditableText = mTextField;	
-			var index:int = SelectionManager.computeSelectionIndex(ta.textFlow, ta, ta, x, y);
-
-			if (index >= ta.text.length) return null;
-
-			var tmpToken:Token = new Token(index,index);
-			var tokenizer:ITokenizer;
-			if ( externalTokenizer == null ) {
-				tokenizer = new TextTokenizer(mTextField.text);	
-			}else {
-				tokenizer = externalTokenizer;
-			}
-			
-			var result:Token = new Token(0,0);
-			var preToken:Token = tokenizer.getPreviousToken(tmpToken);
-			var nextToken:Token = tokenizer.getNextToken(tmpToken);
-			if ( preToken.last == nextToken.first ) {
-				result.first = preToken.first;
-				result.last = nextToken.last;
-				return result;		
-			}else {
-				return null;
-			}
-				
-		}
-
-		// TODO: workaround for unexpected jump when word replaced, to be refactored for code sharing
-		private function getValidLastWordIndex():int{
-			var index:int = SelectionManager.computeSelectionIndex(mTextField.textFlow, mTextField, mTextField, mTextField.width+mTextField.horizontalScrollPosition, mTextField.height+mTextField.verticalScrollPosition);
-			return index;
-		}
-
-
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingUIAPI/src/com/adobe/linguistics/spelling/ui/SpellingHighlighter.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingUIAPI/src/com/adobe/linguistics/spelling/ui/SpellingHighlighter.as b/Squiggly/main/AdobeSpellingUIAPI/src/com/adobe/linguistics/spelling/ui/SpellingHighlighter.as
deleted file mode 100644
index 2292a61..0000000
--- a/Squiggly/main/AdobeSpellingUIAPI/src/com/adobe/linguistics/spelling/ui/SpellingHighlighter.as
+++ /dev/null
@@ -1,179 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-package com.adobe.linguistics.spelling.ui
-{
-	import flash.display.Shape;
-	import flash.geom.Point;
-	import flash.geom.Rectangle;
-	import flash.text.TextLineMetrics;
-	
-	import mx.core.IUITextField;
-	import mx.flash.UIMovieClip;
-
-
-	public class SpellingHighlighter extends UIMovieClip
-	{
-		/*
-		* offset point:
-		*/
-		private var _offsetPoint:Point;
-		
-		/*
-		* Target TextField.
-		*/
-		private var _textField:IUITextField;
-		private static var InvalidIndexValue:int = -2;
-		public function SpellingHighlighter(textField:IUITextField) {
-			super();
-			this._textField = textField;
-			this._offsetPoint = new Point(0,0);
-		}
-		
-		public function drawSquigglyLine(firstCharIndex:int, lastCharIndex:int ):void {
-			var validFirstCharIndex:int = getValidFirstCharIndex(firstCharIndex);
-			var validLastCharIndex:int = getValidLastCharIndex(lastCharIndex);
-			if ( validFirstCharIndex == InvalidIndexValue || validLastCharIndex == InvalidIndexValue ){
-				return;
-			}
-			/* draw squiggly line here. */
-			if ( validFirstCharIndex <= validLastCharIndex ) {
-				var firstLine:int = _textField.getLineIndexOfChar(validFirstCharIndex);
-				var lastLine:int = _textField.getLineIndexOfChar(validLastCharIndex);
-				//only one line case.
-				if(lastLine==firstLine)
-				{
-					drawSingleSquigglyLine(validFirstCharIndex, validLastCharIndex);
-					return;
-				}
-				//more than one line.
-				//first line
-				drawSingleSquigglyLine(validFirstCharIndex, _textField.getLineOffset(firstLine)+_textField.getLineLength(firstLine)-1);
-				//middle....
-				for(var i:int=firstLine+1;i<lastLine;i++)
-				{
-					drawSingleSquigglyLine(_textField.getLineOffset(i), _textField.getLineOffset(i)+_textField.getLineLength(i)-1);
-				}
-				//last lines.
-				drawSingleSquigglyLine(_textField.getLineOffset(lastLine), validLastCharIndex);
-			}
-		}
-		
-		public function drawSingleSquigglyLine(firstCharIndex:int, lastCharIndex:int ):void {
-			var firstLine:int = _textField.getLineIndexOfChar(firstCharIndex);
-			var lastLine:int = _textField.getLineIndexOfChar(lastCharIndex);
-			if ( firstLine != lastLine ) {
-				return;
-			}else {
-				var rect1:Rectangle = _textField.getCharBoundaries(firstCharIndex);
-				var rect2:Rectangle = _textField.getCharBoundaries(lastCharIndex);
-				var x:Number = rect1.x+_offsetPoint.x - _textField.scrollH;
-				var y:Number = rect1.y + rect1.height + 2;
-				var width:Number = rect2.x+rect2.width-rect1.x;
-				
-				// Avoid drawing outside the textField
-				if (x<0) 
-				{
-					if (x+width > 0) {
-						width += x;
-						x = 0;
-					} 
-					else
-						return;
-				}
-				if (x+width > _textField.width) 
-				{
-					if (x < _textField.width) {
-						width = textField.width - x;
-					} 	
-					else
-						return;
-				}
-				
-				// The rectangle that bound the string you want
-				// actual work here.
-				var myShape:Shape = new Shape();
-				myShape.graphics.clear();
-				//myShape.graphics.beginFill(0x0099CC, .35); 
-				myShape.graphics.lineStyle(1, 0xfa0707, .65);
-				myShape.graphics.moveTo(x, y);
-				var upDirection:Boolean = false;
-				var offset:uint = 0;
-				var stepLength:uint = 2;
-				for ( var i:uint = 1; offset <= width; i++) {
-					offset = offset + stepLength;
-					if ( upDirection )
-						myShape.graphics.lineTo(x+offset,y);
-					else
-						myShape.graphics.lineTo(x+offset,y+stepLength);
-					upDirection = !upDirection;
-				}
-				//myShape.graphics.endFill();
-				this.addChild(myShape);	
-			}
-		}
-		
-		private function getValidFirstCharIndex(firstCharIndex:int):int{
-			if(firstCharIndex<0 || firstCharIndex>_textField.text.length-1) 
-			{
-				return InvalidIndexValue;
-			}
-			var firstLine:Number = _textField.getLineIndexOfChar(firstCharIndex);
-			
-			if(firstLine<_textField.scrollV-1)
-			{
-				firstLine = _textField.scrollV-1;
-				return _textField.getLineOffset(firstLine);
-			}
-			return firstCharIndex;
-		}
-		
-		private function getValidLastCharIndex(lastCharIndex:int):int{
-			if(lastCharIndex<0 || lastCharIndex>_textField.text.length-1) 
-			{
-				return InvalidIndexValue;
-			}
-			var lastLine:Number = _textField.getLineIndexOfChar(lastCharIndex);
-			if(lastLine>_textField.bottomScrollV-1)
-			{
-				lastLine = _textField.bottomScrollV-1;
-				return _textField.getLineOffset(lastLine)+_textField.getLineLength(lastLine)-1;
-			}
-			return lastCharIndex;
-		}
-					
-		public function set textField(tf:IUITextField):void{
-			_textField = tf;
-		}
-		
-		public function get textField():IUITextField{
-			return _textField;
-		}
-		
-		public function set offsetPoint(op:Point):void{
-			_offsetPoint = op;
-		}
-		
-		public function get offsetPoint():Point{
-			return _offsetPoint;
-		}
-
-
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingUIEx/src/com/adobe/linguistics/spelling/SpellUI.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingUIEx/src/com/adobe/linguistics/spelling/SpellUI.as b/Squiggly/main/AdobeSpellingUIEx/src/com/adobe/linguistics/spelling/SpellUI.as
deleted file mode 100644
index 69c9aab..0000000
--- a/Squiggly/main/AdobeSpellingUIEx/src/com/adobe/linguistics/spelling/SpellUI.as
+++ /dev/null
@@ -1,577 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-package com.adobe.linguistics.spelling
-{
-	import com.adobe.linguistics.spelling.UserDictionary;
-	import com.adobe.linguistics.spelling.framework.ResourceTable;
-	import com.adobe.linguistics.spelling.framework.SpellingConfiguration;
-	import com.adobe.linguistics.spelling.framework.SpellingService;
-    import com.adobe.linguistics.spelling.ui.HaloHighlighter;
-    import com.adobe.linguistics.spelling.ui.IHighlighter;
-    import com.adobe.linguistics.spelling.ui.SparkHighlighter;
-    import com.adobe.linguistics.spelling.ui.HaloWordProcessor;
-    import com.adobe.linguistics.spelling.ui.IWordProcessor;
-    import com.adobe.linguistics.spelling.ui.SparkWordProcessor;
-	import com.adobe.linguistics.utils.TextTokenizer;
-	import com.adobe.linguistics.utils.Token;
-	
-	import flash.events.Event;
-	import flash.events.FocusEvent;
-	import flash.geom.Point;
-	import flash.geom.Rectangle;
-	import flash.net.SharedObject;
-	import flash.net.URLLoader;
-	import flash.net.URLRequest;
-	import flash.text.TextField;
-	import flash.utils.Dictionary;
-	
-	import mx.controls.RichTextEditor;
-	import mx.controls.TextArea;
-	import mx.controls.TextInput;
-	import mx.core.UIComponent;
-	import mx.core.mx_internal;
-	import mx.events.ScrollEvent;
-	
-	import spark.components.RichEditableText;
-	import spark.components.TextArea;
-	import spark.components.TextInput;
-	
-	import flashx.textLayout.tlf_internal;
-	import flashx.textLayout.compose.TextFlowLine;
-	import flashx.textLayout.edit.SelectionManager;
-	import flashx.textLayout.elements.TextFlow;
-	
-	use namespace mx_internal;
-	
-	use namespace tlf_internal;	
-	/**
-	 * UI implementation for spelling.
-	 *
-	 * <p>This class is a simple UI for some standard Flex UI components.
-	 *	It is not intended to address a complete user interface.
-	 *	Instead, it presents a basic user interface for some commonly used Flex UI components.</p>
-	 *
-	 * <p>For advanced text editing applications, more complex features are likely required.
-	 *	For those applications, we recommend bypassing this class and utilizing the <code>SpellChecker</code> class directly.</p>
-	 *
-	 * @playerversion Flash 10
-	 * @langversion 3.0
-	 */
-	public class SpellUI
-	{
-		private var hh:IHighlighter;
-		private var hw:IWordProcessor;
-		
-		private var _checkLastWord:Boolean = true;
-		private var _spellingEnabled:Boolean;
-		
-		private var _actualParent:*;
-		private var isHaloComponent:Boolean;
-		private var isSparkComponent:Boolean;
-
-        //New Added below
-		private var mTextField:*;
-		
-		//private var mTextField:RichEditableText;
-
-		private var _dictname:String = new String();			
-		private var _hundict:HunspellDictionary = new HunspellDictionary();		
-		private var _userdict:UserDictionary = null;
-		private var _sharedobj:SharedObject = null;
-		private var scm:SpellingContextMenu;
-		
-		private var _newchecker:SpellChecker = null;
-		private var _resource_locale:Object = null;
-		private var _spellingservice:SpellingService = null;
-
-		private static var _contextMenuEntries:Object = {enable:"Enable Spelling", disable:"Disable Spelling", add:"Add to dictionary"};		
-		private static var _spellingConfigUrl:String = "AdobeSpellingConfig.xml";
-		private static var _UITable:Dictionary= new Dictionary();
-		private static var _parentTable:Dictionary= new Dictionary();
-		private static var _cacheDictTable:Dictionary= new Dictionary();
-		
-		private static var _configXML:XML = null;
-		private static var _configXMLLoading:Boolean = false;
-		private static var _configXMLLoader:URLLoader = new URLLoader();
-		
-		// Work around for the memory usage problem, ideally a better fix is to provide a dicitonary unload function
-		private static var _cache:Object = new Object();
-
-		/**
-		 * Enables the spell checking feature for a UI component.
-		 * 
-		 * <p>Note: This version provides only enabling function but no disabling function.</p>
-		 *
-		 * @param comp	A text editing Flex UI component.
-		 				It can be a <code>TextArea</code>, <code>TextInput</code> or <code>RichTextEditor</code>.
-		 * @param dict	A URL for the dictionary to be used with the <code>SpellChecker.</code>
-		 *
-		 * @includeExample Examples/Flex/SquigglyUIExample/src/SquigglyUIExample.mxml
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */
-		public static function enableSpelling(comp:UIComponent, lang:String):void
-		{
-			if ( lang == null ) return;
-		 	// TODO: Change dict parameter type to a SpellCheck class or a URL string.
-			var txt:* = getComponentTextModel(comp);
-			/*var comp1:UIComponent = txt.parent;
-			var comp2:UIComponent = txt.owner;
-			var comp3:UIComponent = txt.parentApplication;
-			var comp4:UIComponent = txt.parentDocument;
-			var comp5:UIComponent = txt.parentDocument.hostComponent; <--spark parent UICOmponent*/
-			if ( txt==null || _UITable[comp]!=undefined )
-				return;	
-			
-			// TODO: dangerous, is garbage collection going to clear this?
-			_UITable[comp]=new SpellUI(txt, lang);
-			_parentTable[txt] = comp;
-			_cacheDictTable[comp]=lang;
-		}
-
-		// Customize the spelling related entry in spelling contextMenu
-		public static function setSpellingMenuEntries(entries:Object):Boolean
-		{
-			if (entries.enable && entries.disable && entries.add && (entries.enable != "") && (entries.disable != "") && (entries.add != ""))
-			{
-				_contextMenuEntries = entries;
-				return true;
-			}
-			else
-				return false;
-		}
-		
-		/**
-		 * Get the spelling context menu entries. 
-		 * 
-		 * @return A flex <code>Object</code> containing the spelling context menu entries. If you haven't customized the entries, you get the default associative array <code>{enable:"Enable Spelling", disable:"Disable Spelling", add:"Add to dictionary"}</code>
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */		
-		public static function getSpellingMenuEntries():Object
-		{
-			return _contextMenuEntries;
-		}
-		
-		/**
-		 * The URL for the spelling config xml file. If you haven't specify it, the default URL is [applicationDirectory]/AdobeSpellingConfig.xml. Note that we don't validate the URL, if the file doesn't exist, you will get an error when calling enableSpelling() function.
-		 *
-		 * @example The following code customize the spellingConfigUrl before enabling spell checking.
-		 * <listing version="3.0">
-		 * SpellUI.spellingConfigUrl = "./config/MySpellingConfig.xml";
-		 * SpellUI.enableSpelling(textArea, "en_US");
-		 * </listing>
-		 */
-		public static function get spellingConfigUrl():String
-		{
-			return _spellingConfigUrl;
-		}
-		
-		public static function set spellingConfigUrl(url:String):void
-		{
-			if (url == null) throw new Error("URL can't be null");
-			_spellingConfigUrl = url;
-		}
-		
-
-		
-		/**
-		 * Disable the spell checking feature for a UI component.
-		 * 
-		 * @param comp	A text editing Flex UI component.
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */
-		public static function disableSpelling(comp:UIComponent):void{
-			if ( _UITable[comp] == undefined )
-				return;
-			var _ui:SpellUI = _UITable[comp];
-			if ( _ui != null) _ui.cleanUp();
-			var dictName:String = _cacheDictTable[comp];
-			var cleanUPDictionaryCount:int = 0;
-			for each ( var _dictName:String in _cacheDictTable ) {
-				if ( _dictName == dictName  )
-					cleanUPDictionaryCount++;
-			}
-			if ( cleanUPDictionaryCount == 1 ) {
-				_cache[dictName] = undefined;
-			}
-			delete _UITable[comp];
-			delete _cacheDictTable[comp];
-			
-		}
-		
-		/**
-		 @private
-		 (This property is for Squiggly Developer use only.)
-		 */
-		public static function get UITable():Dictionary {
-			return _UITable;
-		}
-		
-		/**
-		 @private
-		 (This property is for Squiggly Developer use only.)
-		 */
-		public function set spellingEnabled(value:Boolean):void {
-			_spellingEnabled = value;
-		}
-		
-		/**
-		 @private
-		 (This property is for Squiggly Developer use only.)
-		 */
-		public static function get parentComp():Dictionary {
-			return _parentTable;
-		}
-		
-		private static function getComponentTextModel(comp:UIComponent):* {
-			var txt:TextField = null;
-			var txt2:RichEditableText = null;
-			if ( (comp == null) || !( (comp is mx.controls.TextArea) || (comp is mx.controls.TextInput) || (comp is RichTextEditor) 
-								|| (comp is spark.components.TextArea) || (comp is spark.components.TextInput) || (comp is spark.components.RichEditableText)) )
-				return null;
-			if ((comp as RichTextEditor) != null) {
-				txt = (comp as RichTextEditor).textArea.getTextField() as TextField;
-			}
-			else if ((comp as mx.controls.TextArea) != null){
-				txt = (comp as mx.controls.TextArea).getTextField() as TextField;
-			}
-			else if ((comp as mx.controls.TextInput) != null) {
-				txt = (comp as mx.controls.TextInput).getTextField() as TextField;
-			}
-			else if ((comp as spark.components.TextArea) != null) {
-                if ((comp as spark.components.TextArea).textDisplay is TextField)
-                    txt = (comp as spark.components.TextArea).textDisplay as TextField;
-                else
-    				txt2 = (comp as spark.components.TextArea).textDisplay as RichEditableText;
-			}
-			else if ((comp as spark.components.TextInput) != null) {
-                if ((comp as spark.components.TextInput).textDisplay is TextField)
-                    txt = (comp as spark.components.TextInput).textDisplay as TextField;
-                else
-    				txt2 = (comp as spark.components.TextInput).textDisplay as RichEditableText;
-			}
-			else if ((comp as spark.components.RichEditableText) !=null) {
-				txt2 = comp as RichEditableText;
-			}
-			else {
-				// do nothing if it's not a valid text component
-				return null;
-			}
-			if (txt != null) 
-				return txt;
-			else 
-				return txt2;
-		}
-		
-		/**
-		 * Constructs a SpellUI object.
-		 *
-		 *	@param	textFiled	A Flex UI component to include spell-check capability
-		 *	@param	dict		A URL for Squiggly spelling dictionary.
-		 *
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */			
-		public function SpellUI(textModel:*, lang:String)
-		{		
-			// TODO: Consider making this method invisible to user, only expose the static function.
-			if ( textModel is TextField ) {
-				isHaloComponent=true;
-				//New Added below -- check if text field needs to be extracted from textModel
-				//mTextField = textModel;
-			}else if (textModel is RichEditableText ) {
-				isSparkComponent=true;
-				textModel.setFocus();
-				textModel.selectRange(textModel.text.length, textModel.text.length);
-				//New Added below -- check if text field needs to be extracted from textModel
-				//mTextField = textModel ;
-			}else {
-				// do nothing, we only accept textField and TextFlow here....
-				return;
-			}
-			_actualParent = textModel;
-			mTextField = textModel ;
-									
-			mTextField.addEventListener(FocusEvent.FOCUS_OUT, handleFocusOut);
-			mTextField.addEventListener(FocusEvent.FOCUS_IN, handleFocusIn);
-			mTextField.addEventListener(ScrollEvent.SCROLL, spellCheckScreen);
-			mTextField.parent.addEventListener(Event.RENDER, spellCheckScreen);
-			mTextField.parent.addEventListener(Event.CHANGE, handleChangeEvent);
-			_dictname = lang;			
-			loadConfig();
-			
-		}
-		
-		private function spellCheckScreen(event:Event):void
-		{
-			doSpellingJob();
-		}
-		
-		private function handleFocusOut(event:FocusEvent):void
-		{
-			_checkLastWord = true;
-			doSpellingJob();
-		}
-						
-		private function handleFocusIn(event:FocusEvent):void
-		{
-			_checkLastWord = false;
-			doSpellingJob();
-		}
-		
-		private function handleChangeEvent( event:Event ) :void {
-			_checkLastWord = false;
-			spellCheckScreen(event);
-		}
-		
-		/*private function doSpelling():void
-		{
-			_checkLastWord = true;
-			doSpellingJob();
-		}*/
-				
-		/**
-		 @private
-		 (This property is for Squiggly Developer use only.)
-		 */		
-		public function doSpellingJob():void
-		{
-			if (_spellingEnabled == false) return;
-			spellCheckRange(getValidFirstWordIndex(), getValidLastWordIndex());
-		}
-		
-		private function spellCheckRange(start:uint, end:uint):void {
-			//hh.preSpellCheckRange(start, end);
-			hh.clearSquiggles();
-			if ( isHaloComponent ) {
-				//if (end <= start) return;
-				var firstLine:int = mTextField.getLineIndexOfChar(start);
-				var rect:Rectangle = mTextField.getCharBoundaries(start);
-				var counter:uint = start;
-				var numLines:Number = 0;
-				
-				/* mTextField.getCharBoundaries returns null for blank lines and for end of line characters. Placing this workaround
-				to count line heights until a non-null bounding rectangle is found */
-				while (rect == null) {
-					if (++counter > end) {
-						rect = new Rectangle(0,0,0,0);
-						break;
-					}
-					numLines += mTextField.getLineMetrics(firstLine).height;
-					firstLine++;
-					rect = mTextField.getCharBoundaries(counter);
-				}
-				
-				var yoffset:Number = rect.y - numLines;	
-				var pleft:uint = (mTextField.parent as UIComponent).getStyle("paddingLeft");
-				var ptop:uint = (mTextField.parent as UIComponent).getStyle("paddingTop");
-				
-				var offsetPoint:Point = new Point(pleft, ptop-yoffset); 
-								
-				hh.offsetPoint = offsetPoint;
-			}
-			
-			var tokenizer:TextTokenizer = new TextTokenizer(mTextField.text.substring(start,end));
-			var tokens:Vector.<Token> = new Vector.<Token>();
-			
-			for ( var token:Token = tokenizer.getFirstToken(); token != tokenizer.getLastToken(); token= tokenizer.getNextToken(token) ) {
-				var result:Boolean=_spellingservice.checkWord(mTextField.text.substring(token.first+start, token.last+start));					
-				if (!result){
-					if (_checkLastWord || (token.last+start != mTextField.text.length))
-						//hh.highlightWord(token.first+start, token.last+start-1);
-						//tokens.push(new Token(token.first+start, token.last+start-1));
-						hh.drawSquiggleAt(new Token(token.first+start, token.last+start-1));
-				}
-				
-			}
-			//hh.postSpellCheckRange(start, end);
-			//hh.offsetPoint = offsetPoint;
-			//hh.drawSquiggles(tokens);
-		}
-		
-		
-		
-		private function getValidFirstWordIndex():int{			
-			var index:int;
-			if ( mTextField is TextField ) {
-				index = mTextField.getLineOffset(mTextField.scrollV-1);
-			}else if (mTextField is RichEditableText ) {			
-				// Check for computeSelectionIndexInContainer which throws when lineindex == 0
-				try {
-					index = SelectionManager.computeSelectionIndex(mTextField.textFlow, mTextField, mTextField, 0 + mTextField.horizontalScrollPosition, 0 + mTextField.verticalScrollPosition);
-				
-				} catch (err:Error)
-				{
-					//TODO: report error
-					index = 0;
-				}
-			}
-			return index;
-		}
-		
-		private function getValidLastWordIndex():int{			
-			var index:int;
-			if ( mTextField is TextField ) {
-				index = mTextField.getLineOffset(mTextField.bottomScrollV-1)+mTextField.getLineLength(mTextField.bottomScrollV-1);
-			}else if (mTextField is RichEditableText ) {	
-				// Check for computeSelectionIndexInContainer which throws when lineindex == 0
-				try {
-					index = SelectionManager.computeSelectionIndex(mTextField.textFlow, mTextField, mTextField, mTextField.width+mTextField.horizontalScrollPosition, mTextField.height+mTextField.verticalScrollPosition);
-				} catch (err:Error)
-				{
-					//TODO: report error
-					index = 0;
-				}
-			}				
-			return index;
-		}
-
-			private function loadConfig():void{
-			_resource_locale = SpellingConfiguration.resourceTable.getResource(_dictname);
-			
-			if ((_resource_locale != null) || (SpellUI._configXML != null)) 
-				loadConfigComplete(null);
-			else {	
-				SpellUI._configXMLLoader.addEventListener(Event.COMPLETE, loadConfigComplete);
-			
-				if (SpellUI._configXMLLoading == false)
-				{
-					SpellUI._configXMLLoader.load(new URLRequest(_spellingConfigUrl));
-					SpellUI._configXMLLoading = true;
-				}
-			}
-		}
-		
-		private function loadConfigComplete(evt:Event):void{
-			if (_resource_locale == null) {
-			if (SpellUI._configXML == null)
-				SpellUI._configXML= new XML(evt.target.data);
-			
-				SpellingConfiguration.resourceTable.setResource(_dictname,{rule:SpellUI._configXML.LanguageResource.(@languageCode==_dictname).@ruleFile, 
-																		dict:SpellUI._configXML.LanguageResource.(@languageCode==_dictname).@dictionaryFile});
-		}
-                //New Added
-			_spellingservice = new SpellingService(_dictname);
-			_spellingservice.addEventListener(Event.COMPLETE, loadDictComplete);
-			_spellingservice.init();
-		}
-		
-				
-				
-		
-		private function loadDictComplete(evt:Event):void
-		{					
-			//_newchecker = new SpellChecker(_hundict);
-			
-			// Lazy loading the UD only when the main dict is loaded successfully
-			if ((SpellUI._cache["Squiggly_UD"] as UserDictionary) == null)
-			{
-				_sharedobj = SharedObject.getLocal("Squiggly_v03");
-				var vec:Vector.<String> = new Vector.<String>();
-				if (_sharedobj.data.ud) {
-					for each (var w:String in _sharedobj.data.ud)
-					vec.push(w);
-				}
-				_userdict = new UserDictionary(vec);
-				
-				SpellUI._cache["Squiggly_SO"] = _sharedobj;
-				SpellUI._cache["Squiggly_UD"] = _userdict;
-			}
-			else 
-			{
-				_sharedobj = SpellUI._cache["Squiggly_SO"];
-				_userdict = SpellUI._cache["Squiggly_UD"];
-			}
-			_spellingservice.addUserDictionary(_userdict);
-			
-			
-			// Add the context menu, this might be not successful
-			scm = null;
-			try {
-				addContextMenu(null);
-			}
-			catch (err:Error)
-			{
-				// TODO: error handling here
-			}
-			_actualParent.addEventListener(Event.ADDED_TO_STAGE, addContextMenu);
-		}
-		
-		
-		private function addContextMenu(event:Event):void
-		{
-			if ( scm != null ) return;
-			if ( isHaloComponent ) {
-				hh= new HaloHighlighter( _actualParent);
-				hw= new HaloWordProcessor( _actualParent );
-			}else if ( isSparkComponent ){
-				hh = new SparkHighlighter( _actualParent);
-				hw = new SparkWordProcessor( _actualParent);
-			} else {
-				trace("error now, later will be true");
-			}
-		
-			scm =  new SpellingContextMenu(hh, hw, _spellingservice, _actualParent, _actualParent.contextMenu); 
-			scm.setIgnoreWordCallback( addWordToUserDictionary );
-			
-			// Halo need this
-			if (_actualParent.contextMenu == null)
-			{
-				_actualParent.contextMenu = scm.contextMenu;
-			}
-			
-			//hh.spellingEnabled=true;
-			_spellingEnabled = true;
-			try {
-				doSpellingJob();
-			}
-			catch (err:Error)
-			{
-				// If it fails here, it should later triggered by the render event, so no need to do anything
-			}
-		}
-		
-		private function addWordToUserDictionary(word:String):void
-		{
-			_userdict.addWord(word);
-		
-			// TODO: serialization here might affect ther performance
-			_sharedobj.data.ud = _userdict.wordList;
-			
-		}
-		/**
-		 *	@private
-		 */
-		private function cleanUp():void {
-			hh.clearSquiggles();
-			scm.cleanUp();
-			_actualParent.removeEventListener(Event.ADDED_TO_STAGE, addContextMenu);
-			
-			mTextField.removeEventListener(ScrollEvent.SCROLL, spellCheckScreen);
-			mTextField.parent.removeEventListener(Event.RENDER, spellCheckScreen);
-			mTextField.parent.removeEventListener(Event.CHANGE, handleChangeEvent);
-			mTextField.removeEventListener(FocusEvent.FOCUS_OUT, handleFocusOut);
-			mTextField.removeEventListener(FocusEvent.FOCUS_IN, handleFocusIn);
-		}
-		
-	}
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingUIEx/src/com/adobe/linguistics/spelling/SpellingContextMenu.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingUIEx/src/com/adobe/linguistics/spelling/SpellingContextMenu.as b/Squiggly/main/AdobeSpellingUIEx/src/com/adobe/linguistics/spelling/SpellingContextMenu.as
deleted file mode 100644
index fc71ce3..0000000
--- a/Squiggly/main/AdobeSpellingUIEx/src/com/adobe/linguistics/spelling/SpellingContextMenu.as
+++ /dev/null
@@ -1,243 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-package com.adobe.linguistics.spelling
-{
-	import com.adobe.linguistics.spelling.SpellUI;
-	import com.adobe.linguistics.spelling.framework.SpellingService;
-	import com.adobe.linguistics.spelling.ui.*;
-	import com.adobe.linguistics.utils.Token;
-	import com.adobe.linguistics.utils.TextTokenizer;
-	
-	import flash.events.ContextMenuEvent;
-	import flash.events.Event;
-	import flash.events.EventDispatcher;
-	
-	import flash.ui.ContextMenu;
-	import flash.ui.ContextMenuItem;
-	
-	import flash.text.TextField;
-	import mx.core.UIComponent;
-	
-	import flash.geom.Point;
-	import flash.geom.Rectangle;
-	
-	public class SpellingContextMenu
-	{
-		private var disableMenuItem:ContextMenuItem = new ContextMenuItem("Disable spell checking",true);
-		private var enableMenuItem:ContextMenuItem = new ContextMenuItem("Enable spell checking");
-		private var controlMenuItemList:Array = new Array();
-		private var suggestionMenuItemList:Array = new Array();
-		private var _spellingEnabled:Boolean;
-		private var _contextMenu:ContextMenu;
-		private var mTextHighlighter:IHighlighter;
-		private var mWordProcessor:IWordProcessor;
-		private var mSpellEngine:SpellingService;
-		private var mParentTextField:*;
-		private var _ignoreWordFunctionProcessor:Function;
-		private var _misspelledToken:Token;
-		private var _misspelled:String;
-		public function SpellingContextMenu(textHighlighter:IHighlighter, wordProcessor:IWordProcessor, engine:SpellingService, actualParent:*, contextMenu:ContextMenu=null)
-		{
-			
-			if ( textHighlighter == null || wordProcessor == null ||  engine == null) throw new Error("illegal argument."); 
-			mTextHighlighter = textHighlighter;
-			mWordProcessor = wordProcessor;
-			mSpellEngine = engine;
-			mParentTextField = actualParent;
-			if (contextMenu != null) {
-				_contextMenu =contextMenu;
-			}else {
-				_contextMenu = new ContextMenu();
-			}
-			enableMenuItem.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, handleEnableSpellCheck);
-			disableMenuItem.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, handleDisableSpellCheck);
-			controlMenuItemList.push(enableMenuItem);
-			controlMenuItemList.push(disableMenuItem);
-			
-			_contextMenu.customItems.push(disableMenuItem);
-			_contextMenu.customItems.push(enableMenuItem);
-			spellingEnabled = true; //default value
-			//spellingEnabled= mTextHighlighter.spellingEnabled;
-			_contextMenu.addEventListener(ContextMenuEvent.MENU_SELECT, handleContextMenuSelect);
-			_ignoreWordFunctionProcessor=null;
-		}
-		
-		public function cleanUp():void
-		{
-			mTextHighlighter=null;
-			mWordProcessor=null;
-			spellingEnabled = false;
-			_ignoreWordFunctionProcessor=null;
-			
-			_contextMenu.removeEventListener(ContextMenuEvent.MENU_SELECT, handleContextMenuSelect);
-			
-			var removedNum:int = 0;
-			var count:uint = _contextMenu.customItems.length;
-			for (var j:uint=count; j>0; j--) {
-				if ( isWordItem(_contextMenu.customItems[j-1]) || isControlItem(_contextMenu.customItems[j-1]) ) {
-					_contextMenu.customItems.splice(j-1,1);
-					removedNum++
-				}
-			}
-			if ( removedNum != suggestionMenuItemList.length + controlMenuItemList.length ) {
-				trace("internal error");
-			}
-			
-			suggestionMenuItemList = null;
-			controlMenuItemList = null;
-		}
-		
-		public function get contextMenu():ContextMenu {
-			return this._contextMenu;
-		}
-
-		private function handleContextMenuSelect(event:ContextMenuEvent):void
-		{
-			/* Clear the context menu */
-			//spellingEnabled= mTextHighlighter.spellingEnabled;
-			//SpellUI.doSpelling1();
-			var removedNum:int = 0;
-			var count:uint = _contextMenu.customItems.length;
-			for (var j:uint=count; j>0; j--) {
-				if ( isWordItem(_contextMenu.customItems[j-1]) ) {
-					_contextMenu.customItems.splice(j-1,1);
-					removedNum++
-				}
-			}
-			if ( removedNum != suggestionMenuItemList.length ) {
-				trace("internal error");
-			}
-			
-			
-			suggestionMenuItemList = new Array();
-	
-			// localized entries
-			var entries:Object = SpellUI.getSpellingMenuEntries();
-			disableMenuItem.caption = entries.disable;
-			enableMenuItem.caption = entries.enable;				
-
-			if (spellingEnabled == true) {
-				_misspelledToken = mWordProcessor.getWordAtPoint(mParentTextField.mouseX, mParentTextField.mouseY);
-				if (_misspelledToken==null) return;
-				_misspelled = 	mParentTextField.text.substring(_misspelledToken.first, _misspelledToken.last);
-				if ((_misspelled==null) || (_misspelled == "")) return;
-				
-				if (mSpellEngine.checkWord(_misspelled)==true) return;				
-				
-				var suseAddToItem:ContextMenuItem = new ContextMenuItem(entries.add);
-				suseAddToItem.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, handleAddToItemSelect);
-				suggestionMenuItemList.push(suseAddToItem);
-				_contextMenu.customItems.splice(0,0,suseAddToItem);	
-				//var result:Array = mWordProcessor.getSuggestionsAtPoint();
-				var resultVector:Vector.<String> = mSpellEngine.getSuggestions(_misspelled);
-				var result:Array = new Array();
-				if (resultVector) {
-					for each (var w:String in resultVector)
-					result.push(w);
-				}
-				if (result!=null) {
-					for (var i:int=result.length-1;i>=0;i-- ) {
-						var suseMenuItem:ContextMenuItem = new ContextMenuItem(result[i]);
-						suseMenuItem.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, handleSuseItemSelect);
-						suggestionMenuItemList.push(suseMenuItem);
-						//_contextMenu.customItems.push(suseMenuItem);
-						_contextMenu.customItems.splice(0,0,suseMenuItem);
-					}
-				}
-			}
-			
-
-			
-		}
-		
-		public function setIgnoreWordCallback(func:Function ) :void {
-			if ( func != null )
-			_ignoreWordFunctionProcessor = func;
-		}
-		
-		private function handleAddToItemSelect(event:ContextMenuEvent):void
-		{
-			if ( _ignoreWordFunctionProcessor == null ) return;
-			
-			/*
-			var menuEntry:String = (event.currentTarget as ContextMenuItem).caption;
-			var start:uint = 5;
-			var end:uint = menuEntry.length - 15;
-			var word:String = menuEntry.substring(start, end);
-			*/
-			_ignoreWordFunctionProcessor(_misspelled);
-			//SpellUI.UITable[SpellUI.parentComp[mParentTextField]].doSpellingJob();
-			//now implicitly calling dospelling on all text areas
-			for each (var tempUIComponent:SpellUI in SpellUI.UITable)
-			{
-				tempUIComponent.doSpellingJob();
-			}
-		}
-
-		private function isWordItem(item:ContextMenuItem):Boolean {
-			
-			for ( var i:int=0; i<suggestionMenuItemList.length; ++i ) {
-				if ( suggestionMenuItemList[i] == item ) return true;
-			}
-			return false;
-		}
-		
-		private function isControlItem(item:ContextMenuItem):Boolean {
-			for (var i:int=0; i<controlMenuItemList.length; ++i) {
-				if ( controlMenuItemList[i] == item) return true;
-			}
-			return false;
-		}
-
-		private function handleSuseItemSelect(event:ContextMenuEvent):void
-		{
-			mWordProcessor.replaceText(_misspelledToken, (event.currentTarget as ContextMenuItem).caption );
-			SpellUI.UITable[SpellUI.parentComp[mParentTextField]].doSpellingJob();
-		}
-
-		
-		private function set spellingEnabled(value:Boolean) :void {
-			_spellingEnabled = value;
-			disableMenuItem.visible=spellingEnabled;
-			enableMenuItem.visible=!spellingEnabled;
-		}
-		private function get spellingEnabled():Boolean {
-			return this._spellingEnabled;
-		}
-		private function handleEnableSpellCheck(event:ContextMenuEvent):void
-		{
-			spellingEnabled= true;
-			//mTextHighlighter.spellingEnabled= spellingEnabled;
-			//SpellUI.doSpellingJob();
-			//dispatchEvent(new Event(Event.RENDER));
-			
-			SpellUI.UITable[SpellUI.parentComp[mParentTextField]].spellingEnabled = spellingEnabled;
-			SpellUI.UITable[SpellUI.parentComp[mParentTextField]].doSpellingJob();
-			//spellCheckRange(getValidFirstWordIndex(), getValidLastWordIndex());
-		}
-		private function handleDisableSpellCheck(event:ContextMenuEvent):void
-		{
-			spellingEnabled= false;
-			SpellUI.UITable[SpellUI.parentComp[mParentTextField]].spellingEnabled = spellingEnabled;
-			mTextHighlighter.clearSquiggles();
-		}
-				
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingUITLF/src/com/adobe/linguistics/spelling/SpellUIForTLF.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingUITLF/src/com/adobe/linguistics/spelling/SpellUIForTLF.as b/Squiggly/main/AdobeSpellingUITLF/src/com/adobe/linguistics/spelling/SpellUIForTLF.as
deleted file mode 100644
index 4128cd4..0000000
--- a/Squiggly/main/AdobeSpellingUITLF/src/com/adobe/linguistics/spelling/SpellUIForTLF.as
+++ /dev/null
@@ -1,522 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-package com.adobe.linguistics.spelling
-{
-	import com.adobe.linguistics.spelling.UserDictionary;
-	import com.adobe.linguistics.spelling.framework.ResourceTable;
-	import com.adobe.linguistics.spelling.framework.SpellingConfiguration;
-	import com.adobe.linguistics.spelling.framework.SpellingService;
-	import com.adobe.linguistics.spelling.ui.IHighlighter;
-	import com.adobe.linguistics.spelling.ui.IWordProcessor;
-	import com.adobe.linguistics.spelling.ui.TLFHighlighter;
-	import com.adobe.linguistics.spelling.ui.TLFWordProcessor;
-	import com.adobe.linguistics.utils.TextTokenizer;
-	import com.adobe.linguistics.utils.Token;
-	
-	import flash.events.Event;
-	import flash.events.FocusEvent;
-	import flash.geom.Point;
-	import flash.geom.Rectangle;
-	import flash.net.SharedObject;
-	import flash.net.URLLoader;
-	import flash.net.URLRequest;
-	import flash.utils.Dictionary;
-	
-	import flashx.textLayout.compose.StandardFlowComposer;
-	import flashx.textLayout.compose.TextFlowLine;
-	import flashx.textLayout.container.ContainerController;
-	import flashx.textLayout.conversion.TextConverter;
-	import flashx.textLayout.edit.SelectionManager;
-	import flashx.textLayout.elements.FlowLeafElement;
-	import flashx.textLayout.elements.ParagraphElement;
-	import flashx.textLayout.elements.TextFlow;
-	import flashx.textLayout.events.CompositionCompleteEvent;
-	
-	import flashx.textLayout.tlf_internal;
-	
-	
-	use namespace tlf_internal;	
-	/**
-	 * <p>A comprehensive convenience class that bundles a context menu UI, 
-	 * the spelling engine, the dictionary loader, and user dictionary support 
-	 * to enable a single-line integration of spell checking functionality into 
-	 * any custom UI component built around TLF TextFlow.  </p>
-	 * 
-	 *
-	 * <p>For advanced text editing applications, more complex features are likely required.
-	 *	For those applications, we recommend bypassing this class and utilizing the <code>SpellChecker</code> class directly.</p>
-	 *
-	 * In order to display Squiggly custom right-click context menu, SpellUIForTLF extends TLF <code>ContainerController</code> class and overrides createContextMenu() method 
-	 * of <code>ContainerController</code>. This could have the following side-effects for a Squiggly client:
-	 * <ul>
-	 * 		<li>In case the Squiggly client application uses a derived controller that inherits from ContainerController class in order to show custom context menu items, Squiggly
-	 * 			context menu will override that. That essentially means that after SpellUIForTLF.enableSpelling() is called, client's own custom right-click menu items, if any, will not be
-	 * 			accessible. </li>
-	 * 		<li>Incase any ContainerController api needs to be called after SpellUIForTLF.enableSpelling() has been called, the client application will need to get the controller objects afresh 
-	 * 			from the TextFlow's FlowComposer. This is needed since SpellUIForTLF replaces ContainerController objects with new SquigglyCustomContainerController(derived from ContainerController) objects. </li> 
-	 * </ul>
-	 * 
-	 * 
-	 * <p><code>SpellUIForTLF</code> uses the AdobeSpellingConfig.xml file to lookup corresponding resource files for a given locale.
-	 * The default location of AdobeSpellingConfig.xml is [yourapplicationDirectory]/AdobeSpellingConfig.xml. This could be customized using 
-	 * <code>spellingConfigUrl</code> property of <code>SpellUI</code>. You don't have to change the content of this file. However,
-	 * if you want to add a new language, to use an alternative dictionary or to customize the location for your dictionaries, you can modify it. 
-	 * There's an known issue with IIS web server when loading dictionary files with unknown extensions, in which case you can modify the XML to work around it.</p><p>
-	 * A sample AdobeSpellingConfig.xml will look as follows:
-	 * <listing version="3.0">
-	 * <pre class="preWrapper">
-	 * &lt;?xml version=&quot;1.0&quot; encoding='UTF-8'?&gt;
-	 * &lt;SpellingConfig&gt;
-	 *   	&lt;LanguageResource language=&quot;English&quot; 	  languageCode=&quot;en_US&quot; ruleFile=&quot;dictionaries/en_US/en_US.aff&quot; dictionaryFile=&quot;dictionaries/en_US/en_US.dic&quot;/&gt;
-	 *    	&lt;LanguageResource language=&quot;Spanish&quot;    languageCode=&quot;es_ES&quot; ruleFile=&quot;dictionaries/es_ES/es_ES.aff&quot; dictionaryFile=&quot;dictionaries/es_ES/es_ES.dic&quot;/&gt;
-	 *   	&lt;LanguageResource language=&quot;Portuguese&quot; languageCode=&quot;pt_PT&quot; ruleFile=&quot;dictionaries/pt_PT/pt_PT.aff&quot; dictionaryFile=&quot;dictionaries/pt_PT/pt_PT.dic&quot;/&gt;
-	 *  	 &lt;LanguageResource language=&quot;Italian&quot; 	  languageCode=&quot;it_IT&quot; ruleFile=&quot;dictionaries/it_IT/it_IT.aff&quot; dictionaryFile=&quot;dictionaries/it_IT/it_IT.dic&quot;/&gt;
-	 * &lt;/SpellingConfig&gt;</pre>
-	 *
-	 * </listing>
-	 * Note: The languageCode can be an arbitrary value, as long as you are consistent when passing them to the Squiggly classes. 
-	 * However, we highly encourage you to follow the two part Unicode language identifier format. 
-	 * For more information, please consult the latest Unicode Technical Standard that can be found at: http://unicode.org/reports/tr35/.</p>
-	 * 
-	 * @playerversion Flash 10
-	 * @langversion 3.0
-	 */
-	public class SpellUIForTLF
-	{
-		private var hh:IHighlighter;
-		private var hw:IWordProcessor;
-		
-		private var _checkLastWord:Boolean = true;
-		private var _spellingEnabled:Boolean;
-		
-		private var _actualParent:*;
-		
-
-        //New Added below
-		private var mTextFlow:TextFlow;
-		
-		
-		private var _dictname:String = new String();			
-
-		private var _userdict:UserDictionary = null;
-		private var _sharedobj:SharedObject = null;
-		private var scm:SpellingContextMenuForTLF;
-		
-		private var _newchecker:SpellChecker = null;
-		private var _resource_locale:Object = null;
-		private var _spellingservice:SpellingService = null;
-
-		private static var _contextMenuEntries:Object = {enable:"Enable Spelling", disable:"Disable Spelling", add:"Add to dictionary"};		
-		private static var _spellingConfigUrl:String = "AdobeSpellingConfig.xml";
-		private static var _UITable:Dictionary= new Dictionary();
-		private static var _parentTable:Dictionary= new Dictionary();
-		private static var _cacheDictTable:Dictionary= new Dictionary();
-		
-		private static var _configXML:XML = null;
-		private static var _configXMLLoading:Boolean = false;
-		private static var _configXMLLoader:URLLoader = new URLLoader();
-		
-		// Work around for the memory usage problem, ideally a better fix is to provide a dicitonary unload function
-		private static var _cache:Object = new Object();
-
-		/**
-		 * Enables the spell checking feature for a TLF TextFlow. Once a TextFlow is spell checking enabled, misspelled words will be highlighted with a squiggly line. Users can 
-		 * right click on a misspelled word to see the suggestions in the context menu.
-		 * 
-		 * @param comp	A TLF TextFlow object
-		 * @param lang	The language code used for spell checking, for example <code>en_US</code>. it will lookup the AdobeSpellingConfig.xml file to access corresponding resource files.
-		 * AdobeSpellingConfig.xml should located at the same folder as your main mxml source file. You don't have to change the content of this file. However,
-		 * if you want to add a new language, to use an alternative dictionary or to customize the location for your dictionaries, you can modify it. There's an known issue with
-		 * IIS web server when loading dictionary files with unknown extensions, in which case you can modify the XML to work around it.
-		 * 
-		 * 
-		 * @includeExample Examples/ActionScript/SquigglyTLFExample/src/SquigglyTLFExample.as
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */
-
-		public static function enableSpelling(comp:TextFlow, lang:String):void
-		{
-			if ( lang == null ) return;
-			if ( comp==null || _UITable[comp]!=undefined )
-				return;	
-			
-			// TODO: dangerous, is garbage collection going to clear this?
-			_UITable[comp]=new SpellUIForTLF(comp, lang);
-			_parentTable[comp] = comp;
-			_cacheDictTable[comp]=lang;			
-		}	
-	
-		/**
-		 * Set the spelling context menu entries. This uses the ActionScript Object class as an associative array for extensibility. 
-		 * <code>entries</code> should have all the customized contextMenu entries including <code>enable (spelling), 
-		 * disable (spelling) and add (to dictionary)</code>. To ensure a consistent contextMenu within your application, 
-		 * the spelling context menu entries you provide here are applied to all UI components. We recommend you use this API
-		 * to localize the context menu strings.
-		 *  
-		 * @param entries A Object that looks like <code>entries:Object = {enable:"Enable Spelling", disable:"Disable Spelling", 
-		 * add:"Add to dictionary"}</code>. If you don't customize the contextMenu, the default contextMenu in English will be used.
-		 * 
-		 * @return <code>True</code> if the spelling menu is successfully customized, <code>false</code> if it fails. Possible failure 
-		 * reasons include passing the wrong object or missing some required entries. If the function fails, the contextMenu is left unchanged.
-		 * 
-		 * 
-		 * @IncludeExample Examples/Flex/CustomContextMenu/src/CustomContextMenu.mxml
-		 * @IncludeExample Examples/Flex/ContextMenuWithResource/src/ContextMenuWithResource.mxml
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */
-		public static function setSpellingMenuEntries(entries:Object):Boolean
-		{
-			if (entries.enable && entries.disable && entries.add && (entries.enable != "") && (entries.disable != "") && (entries.add != ""))
-			{
-				_contextMenuEntries = entries;
-				return true;
-			}
-			else
-				return false;
-		}
-		
-		/**
-		 * Get the spelling context menu entries. 
-		 * 
-		 * @return A actionScript <code>Object</code> containing the spelling context menu entries. If you haven't customized the entries, you get the default associative array <code>{enable:"Enable Spelling", disable:"Disable Spelling", add:"Add to dictionary"}</code>
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */		
-		public static function getSpellingMenuEntries():Object
-		{
-			return _contextMenuEntries;
-		}
-		
-		/**
-		 * The URL for the spelling config xml file. If you haven't specify it, the default URL is [applicationDirectory]/AdobeSpellingConfig.xml. Note that we don't validate the URL, if the file doesn't exist, you will get an error when calling enableSpelling() function.
-		 *
-		 * @example The following code customize the spellingConfigUrl before enabling spell checking.
-		 * <listing version="3.0">
-		 * SpellUIForTLF.spellingConfigUrl = "./config/MySpellingConfig.xml";
-		 * SpellUIForTLF.enableSpelling(textFlow, "en_US");
-		 * </listing>
-		 */
-		public static function get spellingConfigUrl():String
-		{
-			return _spellingConfigUrl;
-		}
-		
-		public static function set spellingConfigUrl(url:String):void
-		{
-			if (url == null) throw new Error("URL can't be null");
-			_spellingConfigUrl = url;
-		}
-		
-
-		
-		/**
-		 * Disable the spell checking feature for a TLF TextFlow.
-		 * 
-		 * @param comp	TLF TextFlow object on which to disable spell check.
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */
-		public static function disableSpelling(comp:TextFlow):void{
-			if ( _UITable[comp] == undefined )
-				return;
-			var _ui:SpellUIForTLF = _UITable[comp];
-			if ( _ui != null) _ui.cleanUp();
-			var dictName:String = _cacheDictTable[comp];
-			var cleanUPDictionaryCount:int = 0;
-			for each ( var _dictName:String in _cacheDictTable ) {
-				if ( _dictName == dictName  )
-					cleanUPDictionaryCount++;
-			}
-			if ( cleanUPDictionaryCount == 1 ) {
-				_cache[dictName] = undefined;
-			}
-			delete _UITable[comp];
-			delete _cacheDictTable[comp];
-			
-		}
-		
-		/**
-		 @private
-		 (This property is for Squiggly Developer use only.)
-		 */
-		public static function get UITable():Dictionary {
-			return _UITable;
-		}
-		
-		/**
-		 @private
-		 (This property is for Squiggly Developer use only.)
-		 */
-		public function set spellingEnabled(value:Boolean):void {
-			_spellingEnabled = value;
-		}
-		
-		/**
-		 @private
-		 (This property is for Squiggly Developer use only.)
-		 */
-		public static function get parentComp():Dictionary {
-			return _parentTable;
-		}
-		
-				
-		/**
-		 * Constructs a SpellUI object.
-		 *  @private
-		 *	@param	textFiled	A Flex UI component to include spell-check capability
-		 *	@param	dict		A URL for Squiggly spelling dictionary.
-		 *
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */			
-		public function SpellUIForTLF(textModel:TextFlow, lang:String)
-		{		
-		
-			_actualParent = textModel;
-			mTextFlow = textModel;					
-			
-			mTextFlow.addEventListener(flashx.textLayout.events.CompositionCompleteEvent.COMPOSITION_COMPLETE, spellCheckScreen,false, 0,true);
-			//mTextFlow.addEventListener(flashx.textLayout.events.StatusChangeEvent.INLINE_GRAPHIC_STATUS_CHANGE, spellCheckScreen);
-			
-			_dictname = lang;			
-			loadConfig();			
-		}
-		
-		private function spellCheckScreen(event:Event):void
-		{
-			doSpellingJob();
-		}
-		
-				
-		/**
-		 @private
-		 (This property is for Squiggly Developer use only.)
-		 */		
-		public function doSpellingJob():void
-		{
-			if (_spellingEnabled == false) return;
-			
-			hh.clearSquiggles();
-			for (var idx:int = 0; idx < mTextFlow.flowComposer.numControllers; idx++)
-			{
-				var testController:ContainerController = mTextFlow.flowComposer.getControllerAt(idx); 
-				//if (getValidFirstWordIndexTLF(testController) != -1) 
-					spellCheckRangeTLF(getValidFirstWordIndexTLF(testController), getValidLastWordIndexTLF(testController));
-			}
-			
-		}
-			
-		
-		private function spellCheckRangeTLF(start:uint, end:uint):void {
-			var tokenizer:TextTokenizer;
-			//hh.clearSquiggles();
-			var tt:TextFlow = mTextFlow;
-			//var currentLeaf:FlowLeafElement = tt.getFirstLeaf();
-			var currentLeaf:FlowLeafElement = tt.findLeaf(start);
-			var currentParagraph:ParagraphElement = currentLeaf ? currentLeaf.getParagraph() : null;
-			while (currentParagraph) { // iterate over all paragraphs in the text flow
-				var paraStart:uint = currentParagraph.getAbsoluteStart();
-				if (paraStart > end)
-					break; 
-				
-				//var offsetPoint:Point = new Point(currentParagraph.paddingLeft, currentParagraph.paddingTop); 
-				//hh.offsetPoint = offsetPoint;
-				tokenizer = new TextTokenizer(currentParagraph.getText().substring());
-				//var tokens:Vector.<Token> = new Vector.<Token>();
-				
-				for ( var token:Token = tokenizer.getFirstToken(); token != tokenizer.getLastToken(); token= tokenizer.getNextToken(token) ) {
-					var result:Boolean=_spellingservice.checkWord(currentParagraph.getText().substring(token.first, token.last));					
-					if (!result){
-						//if (_checkLastWord || (token.last+paraStart != currentParagraph.getText().length))
-							//hh.highlightWord(token.first+start, token.last+start-1);
-							//tokens.push(new Token(token.first+start, token.last+start-1));
-							hh.drawSquiggleAt(new Token(token.first+paraStart, token.last+paraStart-1));
-					}
-					
-				}
-				currentParagraph = currentParagraph.getNextParagraph();
-				
-			}
-			//hh.postSpellCheckRange(start, end);
-			//hh.offsetPoint = offsetPoint;
-			//hh.drawSquiggles(tokens);
-		}
-		private function getValidFirstWordIndexTLF(containerController:ContainerController):int{			
-			var index:int;
-					
-			// Check for computeSelectionIndexInContainer which throws when lineindex == 0
-			try {
-				//index = SelectionManager.computeSelectionIndex(mTextFlow, containerController.container, containerController.container, 0 + containerController.horizontalScrollPosition, 0 + containerController.verticalScrollPosition);
-				// SelectionManager.computeSelectionIndex() sometimes gives index as -1. in the same scenarios below logic works better 
-				var tl:TextFlowLine = containerController.getFirstVisibleLine();
-				var firstVisiblePosition:int = tl.absoluteStart;
-				index = firstVisiblePosition;
-				
-			} catch (err:Error)
-			{
-				//TODO: report error
-				index = 0;
-			}
-				
-			return index;
-		}
-		
-		private function getValidLastWordIndexTLF(containerController:ContainerController):int{			
-			var index:int;
-			
-			// Check for computeSelectionIndexInContainer which throws when lineindex == 0
-			try {
-				//index = SelectionManager.computeSelectionIndex(mTextFlow, containerController.container, containerController.container, containerController.container.width+containerController.horizontalScrollPosition, containerController.container.height+containerController.verticalScrollPosition);
-				var tl:TextFlowLine = containerController.getLastVisibleLine();
-				var lastVisiblePosition:int = tl.absoluteStart + tl.textLength;
-				index = lastVisiblePosition;
-			} catch (err:Error)
-			{
-				//TODO: report error
-				index = 0;
-			}
-				
-			return index;
-		}
-		
-
-		private function loadConfig():void{
-			_resource_locale = SpellingConfiguration.resourceTable.getResource(_dictname);
-			
-			if ((_resource_locale != null) || (SpellUIForTLF._configXML != null)) 
-				loadConfigComplete(null);
-			else {	
-				SpellUIForTLF._configXMLLoader.addEventListener(Event.COMPLETE, loadConfigComplete);
-			
-				if (SpellUIForTLF._configXMLLoading == false)
-				{
-					SpellUIForTLF._configXMLLoader.load(new URLRequest(_spellingConfigUrl));
-					SpellUIForTLF._configXMLLoading = true;
-				}
-			}
-		}
-		
-		private function loadConfigComplete(evt:Event):void{
-			if (_resource_locale == null) {
-			if (SpellUIForTLF._configXML == null)
-				SpellUIForTLF._configXML= new XML(evt.target.data);
-			
-				SpellingConfiguration.resourceTable.setResource(_dictname,{rule:SpellUIForTLF._configXML.LanguageResource.(@languageCode==_dictname).@ruleFile, 
-																		dict:SpellUIForTLF._configXML.LanguageResource.(@languageCode==_dictname).@dictionaryFile});
-		}
-                //New Added
-			_spellingservice = new SpellingService(_dictname);
-			_spellingservice.addEventListener(Event.COMPLETE, loadDictComplete);
-			_spellingservice.init();
-		}
-		
-				
-				
-		
-		private function loadDictComplete(evt:Event):void
-		{					
-			//_newchecker = new SpellChecker(_hundict);
-			
-			// Lazy loading the UD only when the main dict is loaded successfully
-			if ((SpellUIForTLF._cache["Squiggly_UD"] as UserDictionary) == null)
-			{
-				_sharedobj = SharedObject.getLocal("Squiggly_v03");
-				var vec:Vector.<String> = new Vector.<String>();
-				if (_sharedobj.data.ud) {
-					for each (var w:String in _sharedobj.data.ud)
-					vec.push(w);
-				}
-				_userdict = new UserDictionary(vec);
-				
-				SpellUIForTLF._cache["Squiggly_SO"] = _sharedobj;
-				SpellUIForTLF._cache["Squiggly_UD"] = _userdict;
-			}
-			else 
-			{
-				_sharedobj = SpellUIForTLF._cache["Squiggly_SO"];
-				_userdict = SpellUIForTLF._cache["Squiggly_UD"];
-			}
-			_spellingservice.addUserDictionary(_userdict);
-			
-			
-			// Add the context menu, this might be not successful
-			scm = null;
-			try {
-				addContextMenu(null);
-			}
-			catch (err:Error)
-			{
-				// TODO: error handling here
-			}
-			_actualParent.addEventListener(Event.ADDED_TO_STAGE, addContextMenu);
-		}
-		
-		
-		private function addContextMenu(event:Event):void
-		{
-			if ( scm != null ) return;
-			
-			hh = new TLFHighlighter( _actualParent);
-			hw = new TLFWordProcessor( _actualParent);	
-						
-			scm =  new SpellingContextMenuForTLF(hh, hw, _spellingservice, _actualParent, addWordToUserDictionary); 
-			//scm.setIgnoreWordCallback( addWordToUserDictionary );
-			
-			// Halo need this
-			//if (_actualParent.contextMenu == null)
-			//{
-				//_actualParent.contextMenu = scm.contextMenu;
-			//}
-			
-			//hh.spellingEnabled=true;
-			_spellingEnabled = true;
-			try {
-				doSpellingJob();
-			}
-			catch (err:Error)
-			{
-				// If it fails here, it should later triggered by the render event, so no need to do anything
-			}
-		}
-		
-		private function addWordToUserDictionary(word:String):void
-		{
-			_userdict.addWord(word);
-		
-			// TODO: serialization here might affect ther performance
-			_sharedobj.data.ud = _userdict.wordList;
-			
-		}
-		/**
-		 *	@private
-		 */
-		private function cleanUp():void {
-			hh.clearSquiggles();
-			scm.cleanUp();
-			_actualParent.removeEventListener(Event.ADDED_TO_STAGE, addContextMenu);
-			
-			mTextFlow.removeEventListener(flashx.textLayout.events.CompositionCompleteEvent.COMPOSITION_COMPLETE, spellCheckScreen);
-			//mTextFlow.removeEventListener(flashx.textLayout.events.StatusChangeEvent.INLINE_GRAPHIC_STATUS_CHANGE, spellCheckScreen);
-		}
-		
-	}
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingUITLF/src/com/adobe/linguistics/spelling/SpellingContextMenuForTLF.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingUITLF/src/com/adobe/linguistics/spelling/SpellingContextMenuForTLF.as b/Squiggly/main/AdobeSpellingUITLF/src/com/adobe/linguistics/spelling/SpellingContextMenuForTLF.as
deleted file mode 100644
index ccc3c78..0000000
--- a/Squiggly/main/AdobeSpellingUITLF/src/com/adobe/linguistics/spelling/SpellingContextMenuForTLF.as
+++ /dev/null
@@ -1,249 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-package com.adobe.linguistics.spelling
-{
-	import com.adobe.linguistics.spelling.SpellUIForTLF;
-	import com.adobe.linguistics.spelling.SquigglyCustomContainerController;
-	import com.adobe.linguistics.spelling.framework.SpellingService;
-	import com.adobe.linguistics.spelling.ui.IHighlighter;
-	import com.adobe.linguistics.spelling.ui.IWordProcessor;
-	import com.adobe.linguistics.spelling.ui.TLFHighlighter;
-	import com.adobe.linguistics.spelling.ui.TLFWordProcessor;
-	import com.adobe.linguistics.utils.TextTokenizer;
-	import com.adobe.linguistics.utils.Token;
-	
-	import flash.events.ContextMenuEvent;
-	import flash.events.Event;
-	import flash.events.EventDispatcher;
-	import flash.geom.Point;
-	import flash.geom.Rectangle;
-	import flash.ui.ContextMenu;
-	import flash.ui.ContextMenuItem;
-	import flash.utils.describeType;
-	import flash.utils.getQualifiedClassName;
-		
-	import flashx.textLayout.compose.StandardFlowComposer;
-	import flashx.textLayout.compose.TextFlowLine;
-	import flashx.textLayout.container.ContainerController;
-	import flashx.textLayout.conversion.TextConverter;
-	import flashx.textLayout.edit.SelectionManager;
-	import flashx.textLayout.elements.FlowLeafElement;
-	import flashx.textLayout.elements.ParagraphElement;
-	import flashx.textLayout.elements.TextFlow;
-	import flashx.textLayout.events.CompositionCompleteEvent;
-	import flashx.textLayout.events.StatusChangeEvent;
-	import flashx.textLayout.tlf_internal;
-	
-	
-	use namespace tlf_internal;	
-	
-	public class SpellingContextMenuForTLF
-	{
-		private var disableMenuItem:ContextMenuItem = new ContextMenuItem("Disable spell checking",true);
-		private var enableMenuItem:ContextMenuItem = new ContextMenuItem("Enable spell checking");		
-		
-		private var controlMenuItemList:Array = new Array();
-		private var suggestionMenuItemList:Array = new Array();
-		private var _spellingEnabled:Boolean;
-		private var _contextMenu:ContextMenu;
-		private var mTextHighlighter:IHighlighter;
-		private var mWordProcessor:IWordProcessor;
-		private var mSpellEngine:SpellingService;
-		private var mTextFlow:TextFlow;
-		private var _ignoreWordFunctionProcessor:Function;
-		private var _misspelledToken:Token;
-		private var _misspelled:String;
-		public function SpellingContextMenuForTLF(textHighlighter:IHighlighter, wordProcessor:IWordProcessor, engine:SpellingService, actualParent:*, func:Function)
-		{
-			
-			if ( textHighlighter == null || wordProcessor == null ||  engine == null) throw new Error("illegal argument."); 
-			mTextHighlighter = textHighlighter;
-			mWordProcessor = wordProcessor;
-			mSpellEngine = engine;
-			mTextFlow = actualParent;
-			
-			
-			var numControllers:int = mTextFlow.flowComposer.numControllers;
-			for (var idx:int = 0; idx < numControllers; idx++)
-			{	
-				var containerController:ContainerController = mTextFlow.flowComposer.getControllerAt(idx);
-				var squigglyContainerController:SquigglyCustomContainerController = new SquigglyCustomContainerController(containerController.container, mTextHighlighter, mWordProcessor, 
-																								mSpellEngine, func, containerController.compositionWidth, containerController.compositionHeight);	
-				copyObject(containerController, squigglyContainerController);
-				mTextFlow.flowComposer.removeController(containerController);
-				containerController = null; // make it null so that the associated memory is garbage collected
-				mTextFlow.flowComposer.addControllerAt(squigglyContainerController, idx);
-				
-			}
-			mTextFlow.flowComposer.updateAllControllers();
-			
-			
-			spellingEnabled = true; //default value
-			//spellingEnabled= mTextHighlighter.spellingEnabled;
-			
-			_ignoreWordFunctionProcessor=null;
-		}
-		
-		/**
-		 * copies a source object to a destination object
-		 * @param sourceObject the source object
-		 * @param destinationObject the destination object
-		 *
-		 */
-		private function copyObject(sourceObject:ContainerController, destinationObject:SquigglyCustomContainerController):void
-		{
-			// check if the objects are not null
-			if((sourceObject) && (destinationObject)) {
-				try
-				{
-					//retrive information about the source object via XML
-					var sourceInfo:XML = describeType(sourceObject);
-					var objectProperty:XML;
-					var propertyName:String;
-					
-					// loop through the properties
-					for each(objectProperty in sourceInfo.variable)
-					{
-						propertyName = objectProperty.@name;
-						if(sourceObject[objectProperty.@name] != null)
-						{
-							if(destinationObject.hasOwnProperty(objectProperty.@name)) {
-								destinationObject[objectProperty.@name] = sourceObject[objectProperty.@name];
-							}
-						}
-					}
-					//loop through the accessors
-					for each(objectProperty in sourceInfo.accessor) {
-						if(objectProperty.@access == "readwrite") {
-							propertyName = objectProperty.@name;
-							if(sourceObject[objectProperty.@name] != null)
-							{
-								if(destinationObject.hasOwnProperty(objectProperty.@name)) {
-									destinationObject[objectProperty.@name] = sourceObject[objectProperty.@name];
-								}
-							}
-						}
-					}
-				}
-				catch (err:*) {
-					;
-				}
-			}
-		}
-		
-		public function cleanUp():void
-		{
-			mTextHighlighter=null;
-			mWordProcessor=null;
-			spellingEnabled = false;
-			_ignoreWordFunctionProcessor=null;
-			
-			var numControllers:int = mTextFlow.flowComposer.numControllers;
-			for (var idx:int = 0; idx < numControllers; idx++)
-			{	
-				 //if (getQualifiedClassName(mTextFlow.flowComposer.getControllerAt(idx)) == "SquigglyCustomContainerController"){
-					 var containerController:ContainerController = mTextFlow.flowComposer.getControllerAt(idx);
-					 //Use try-catch incase some controller not of type SquigglyCustomContainerController comes across
-					 try {
-					 (containerController as SquigglyCustomContainerController).cleanUpContextMenu();
-					 }
-					 catch (err:Error)
-					 {
-						 // TODO: error handling here
-					 }
-				 //}
-				
-			}
-			
-		}
-		
-		public function get contextMenu():ContextMenu {
-			return this._contextMenu;
-		}
-		
-		public function setIgnoreWordCallback(func:Function ) :void {
-			if ( func != null )
-			_ignoreWordFunctionProcessor = func;
-		}
-		
-		private function handleAddToItemSelect(event:ContextMenuEvent):void
-		{
-			if ( _ignoreWordFunctionProcessor == null ) return;
-			
-			/*
-			var menuEntry:String = (event.currentTarget as ContextMenuItem).caption;
-			var start:uint = 5;
-			var end:uint = menuEntry.length - 15;
-			var word:String = menuEntry.substring(start, end);
-			*/
-			_ignoreWordFunctionProcessor(_misspelled);
-			SpellUIForTLF.UITable[SpellUIForTLF.parentComp[mTextFlow]].doSpellingJob();
-		}
-
-		private function isWordItem(item:ContextMenuItem):Boolean {
-			
-			for ( var i:int=0; i<suggestionMenuItemList.length; ++i ) {
-				if ( suggestionMenuItemList[i] == item ) return true;
-			}
-			return false;
-		}
-		
-		private function isControlItem(item:ContextMenuItem):Boolean {
-			for (var i:int=0; i<controlMenuItemList.length; ++i) {
-				if ( controlMenuItemList[i] == item) return true;
-			}
-			return false;
-		}
-
-		private function handleSuseItemSelect(event:ContextMenuEvent):void
-		{
-			mWordProcessor.replaceText(_misspelledToken, (event.currentTarget as ContextMenuItem).caption );
-			SpellUIForTLF.UITable[SpellUIForTLF.parentComp[mTextFlow]].doSpellingJob();
-		}
-
-		
-		private function set spellingEnabled(value:Boolean) :void {
-			_spellingEnabled = value;
-			disableMenuItem.visible=spellingEnabled;
-			enableMenuItem.visible=!spellingEnabled;
-		}
-		private function get spellingEnabled():Boolean {
-			return this._spellingEnabled;
-		}
-		private function handleEnableSpellCheck(event:ContextMenuEvent):void
-		{
-			spellingEnabled= true;
-			//mTextHighlighter.spellingEnabled= spellingEnabled;
-			//SpellUI.doSpellingJob();
-			//dispatchEvent(new Event(Event.RENDER));
-			
-			SpellUIForTLF.UITable[SpellUIForTLF.parentComp[mTextFlow]].spellingEnabled = spellingEnabled;
-			SpellUIForTLF.UITable[SpellUIForTLF.parentComp[mTextFlow]].doSpellingJob();
-			//spellCheckRange(getValidFirstWordIndex(), getValidLastWordIndex());
-		}
-		private function handleDisableSpellCheck(event:ContextMenuEvent):void
-		{
-			spellingEnabled= false;
-			SpellUIForTLF.UITable[SpellUIForTLF.parentComp[mTextFlow]].spellingEnabled = spellingEnabled;
-			mTextHighlighter.clearSquiggles();
-		}
-				
-	}
-}


[46/50] [abbrv] git commit: [flex-utilities] [refs/heads/master] - add asdic target and remove potentially uncorking stuff from release packages

Posted by jm...@apache.org.
add asdic target and remove potentially uncorking stuff from release packages


Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/8d679d89
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/8d679d89
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/8d679d89

Branch: refs/heads/master
Commit: 8d679d8908e939ae7e5eb14308fc26becbf1056e
Parents: 12148ef
Author: Justin Mclean <jm...@apache.org>
Authored: Fri Aug 29 10:42:33 2014 +1000
Committer: Justin Mclean <jm...@apache.org>
Committed: Fri Aug 29 10:42:33 2014 +1000

----------------------------------------------------------------------
 Squiggly/build.xml | 71 ++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 70 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/8d679d89/Squiggly/build.xml
----------------------------------------------------------------------
diff --git a/Squiggly/build.xml b/Squiggly/build.xml
index 8d1c62d..8d75f24 100644
--- a/Squiggly/build.xml
+++ b/Squiggly/build.xml
@@ -24,8 +24,20 @@
     <property file="${basedir}/local.properties"/>
     <property file="${basedir}/build.properties"/>
 	
+    <condition property="FLEX_HOME" value="${env.FLEX_HOME}">
+        <isset property="env.FLEX_HOME" />
+    </condition>
+        	
     <property name="version" value="1.0" />
 	
+    <path id="flexTasks.path">
+        <fileset dir="${FLEX_HOME}">
+            <include name="lib/flexTasks.jar" />
+            <include name="ant/lib/flexTasks.jar" />
+        </fileset>
+    </path>
+    <taskdef resource="flexTasks.tasks" classpathref="flexTasks.path"/>
+	
 	<target name="compile" description="compile squiggly swcs and ane" depends="compile-swc,compile-ane">
 	</target>
 	
@@ -37,7 +49,43 @@
 		<!-- TODO may be added in a future release -->
 	</target>
 		
-	<target name="package" description="package up all source files" depends="package-dir,package-source-tar,package-source-zip,package-binary-tar,package-binary-zip">
+	<target name="package" description="package up all source files" depends="package-dir,generate-docs,package-source-tar,package-source-zip,package-binary-tar,package-binary-zip">
+	</target>
+	
+	<target name="generate-docs">
+		<!--
+		C:\flexsdk4.1\bin\asdoc" 
+		-package com.adobe.linguistics.spelling "This package providing spell checking functionality to your action script applications. This includes the core spell checking engine and the optional SpellUI class for easy integration with your existing Flex projects."
+		-package com.adobe.linguistics.spelling.ui "This package provides text highlighting related functionalities"
+		-package com.adobe.linguistics.spelling.framework "This package provides spelling service and spelling configuration related functionalities"
+		-package com.adobe.linguistics.utils "This package provides text parsing and tokenizing related classes"
+		-->
+		<asdoc output="out\docs" lenient="true" failonerror="true" warnings="false" strict="false" locale="en_US" fork="true"
+			exclude-dependencies="true"  
+			window-title="Squiggly API Documentation ${version}"
+            main-title="${version} API Reference">
+
+		    <doc-classes class="com.adobe.linguistics.spelling.SpellUI"/>
+		    <doc-classes class="com.adobe.linguistics.spelling.SpellUIForTLF"/>
+		    <doc-classes class="com.adobe.linguistics.spelling.HunspellDictionary"/>
+		    <doc-classes class="com.adobe.linguistics.spelling.SpellChecker"/>
+		    <doc-classes class="com.adobe.linguistics.spelling.UserDictionary"/>
+		    <doc-classes class="com.adobe.linguistics.utils.TextTokenizer"/>
+		    <doc-classes class="com.adobe.linguistics.utils.Token"/>
+		    <doc-classes class="com.adobe.linguistics.spelling.framework.ResourceTable"/>
+		    <doc-classes class="com.adobe.linguistics.spelling.framework.SpellingConfiguration"/>		    
+		    <doc-classes class="com.adobe.linguistics.spelling.framework.SpellingService"/>		    
+		    <doc-classes class="com.adobe.linguistics.spelling.ui.IHighlighter"/>
+		    <doc-classes class="com.adobe.linguistics.spelling.ui.HaloHighlighter"/>
+			<doc-classes class="com.adobe.linguistics.spelling.ui.SparkHighlighter"/>
+			<doc-classes class="com.adobe.linguistics.spelling.ui.TLFHighlighter"/>
+	    		    
+			<compiler.source-path path-element="main/SpellingUI/src"/>
+			<compiler.source-path path-element="main/SpellingUITLF/src"/>
+			<compiler.source-path path-element="main/SpellingEngine/src"/>
+			<compiler.source-path path-element="main/LinguisticUtils/src"/>
+			<compiler.source-path path-element="main/SpellingFramework/src"/>
+		</asdoc>
 	</target>
 	
 	<target name="package-dir">
@@ -63,6 +111,11 @@
             	<include name="**/*.sh" />
             	<include name="**/*.properties" />
             	<exclude name="ane/**" />
+            	<exclude name="main/ASDocExamples/**" />
+            	<exclude name="main/Automation/**" />
+            	<exclude name="main/Data/**" />
+            	<exclude name="main/Demo/**" />
+            	<exclude name="main/Tools/**" />
              </tarfileset>
          </tar>
 	</target>
@@ -83,6 +136,11 @@
             	<include name="**/*.sh" />
             	<include name="**/*.properties" />
             	<exclude name="ane/**" />
+            	<exclude name="main/ASDocExamples/**" />
+            	<exclude name="main/Automation/**" />
+            	<exclude name="main/Data/**" />
+            	<exclude name="main/Demo/**" />
+            	<exclude name="main/Tools/**" />
              </fileset>
          </zip>
 	</target>
@@ -106,6 +164,11 @@
 	            	<include name="**/*.properties" />
 	                <include name="**/*.swc" />
 	            	<exclude name="ane/**" />
+	            	<exclude name="main/ASDocExamples/**" />
+	            	<exclude name="main/Automation/**" />
+	            	<exclude name="main/Data/**" />
+	            	<exclude name="main/Demo/**" />
+	            	<exclude name="main/Tools/**" />
 	             </tarfileset>
 	         </tar>
 		</target>
@@ -127,6 +190,11 @@
 	            	<include name="**/*.properties" />
 	                <include name="**/*.swc" />
 	            	<exclude name="ane/**" />
+	            	<exclude name="main/ASDocExamples/**" />
+	            	<exclude name="main/Automation/**" />
+	            	<exclude name="main/Data/**" />
+	            	<exclude name="main/Demo/**" />
+	            	<exclude name="main/Tools/**" />
 	             </fileset>
 	         </zip>
 		</target>
@@ -135,5 +203,6 @@
     	<delete>
     		<fileset dir="${basedir}" includes="**/*.swf" />
     	</delete>
+    	<delete dir="${basedir}/out"/> 
     </target>
 </project>
\ No newline at end of file


[14/50] [abbrv] git commit: [flex-utilities] [refs/heads/master] - update release notes

Posted by jm...@apache.org.
update release notes


Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/2672b616
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/2672b616
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/2672b616

Branch: refs/heads/master
Commit: 2672b616124224ac04ba52011c5cc818e40de55a
Parents: 7ce2575
Author: Justin Mclean <jm...@apache.org>
Authored: Wed Aug 27 17:15:28 2014 +1000
Committer: Justin Mclean <jm...@apache.org>
Committed: Wed Aug 27 17:15:28 2014 +1000

----------------------------------------------------------------------
 TourDeFlex/TourDeFlex3/RELEASE_NOTES | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/2672b616/TourDeFlex/TourDeFlex3/RELEASE_NOTES
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/RELEASE_NOTES b/TourDeFlex/TourDeFlex3/RELEASE_NOTES
index 9d1ef62..5cd2ce9 100644
--- a/TourDeFlex/TourDeFlex3/RELEASE_NOTES
+++ b/TourDeFlex/TourDeFlex3/RELEASE_NOTES
@@ -5,16 +5,23 @@ Apache Flex Tour De Flex Component Explorer 1.1
 Changes since the version 1.0
 - Update READE and RELEASE_NOTES
 - Added some Apache Flex specific examples
+- Added button to copy code in source tab
+- Added button to link to github example
+- Added button to copy link to example
 - Improved build file ant task descriptions
-- Removed broken view source URL
-- Fixed a few minor issues
+- Removed broken view source URLs
+- Fixed a few other minor issues
+- Now contains over 300 examples!
 
-Bugs fixed:
+Bugs fixed and improvements:
+FLEX-34502 Add link to github in TourDeFlex
 FLEX-34500 Show total number of examples in Tour De Flex UI
 FLEX-34495 Error loading source file
+FLEX-34492 Need ability to link to examples
 FLEX-34489 Some examples are missing all source files tab
 FLEX-34488 Add favicon to TourDeFlex
 FLEX-34483 Make logo links to Apache Flex web site
+FLEX-34482 Add copy button to copy code examples to clipboard
 FLEX-34480 If TourDeFlex is run from an untrusted location you get an error
 FLEX-34479 Change naming format of TourDeFlex
 FLEX-34474 TourDeFlex effects example bad styles and modifying default destination scaling


[45/50] [abbrv] git commit: [flex-utilities] [refs/heads/master] - Change default config file name to SpellingConfig.xml in docs

Posted by jm...@apache.org.
Change default config file name to SpellingConfig.xml in docs


Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/12148ef1
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/12148ef1
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/12148ef1

Branch: refs/heads/master
Commit: 12148ef10a423d8f6e5d015232adf7be88da0938
Parents: 730b1b5
Author: Justin Mclean <jm...@apache.org>
Authored: Fri Aug 29 10:41:40 2014 +1000
Committer: Justin Mclean <jm...@apache.org>
Committed: Fri Aug 29 10:41:40 2014 +1000

----------------------------------------------------------------------
 .../com/adobe/linguistics/spelling/SpellUIForTLF.as   | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/12148ef1/Squiggly/ane/Squiggly/AdobeSpellingUITLF/src/com/adobe/linguistics/spelling/SpellUIForTLF.as
----------------------------------------------------------------------
diff --git a/Squiggly/ane/Squiggly/AdobeSpellingUITLF/src/com/adobe/linguistics/spelling/SpellUIForTLF.as b/Squiggly/ane/Squiggly/AdobeSpellingUITLF/src/com/adobe/linguistics/spelling/SpellUIForTLF.as
index edd15e8..96c496b 100644
--- a/Squiggly/ane/Squiggly/AdobeSpellingUITLF/src/com/adobe/linguistics/spelling/SpellUIForTLF.as
+++ b/Squiggly/ane/Squiggly/AdobeSpellingUITLF/src/com/adobe/linguistics/spelling/SpellUIForTLF.as
@@ -79,12 +79,12 @@ package com.adobe.linguistics.spelling
 	 * </ul>
 	 * 
 	 * 
-	 * <p><code>SpellUIForTLF</code> uses the AdobeSpellingConfig.xml file to lookup corresponding resource files for a given locale.
-	 * The default location of AdobeSpellingConfig.xml is [yourapplicationDirectory]/AdobeSpellingConfig.xml. This could be customized using 
+	 * <p><code>SpellUIForTLF</code> uses the SpellingConfig.xml file to lookup corresponding resource files for a given locale.
+	 * The default location of SpellingConfig.xml is [yourapplicationDirectory]/SpellingConfig.xml. This could be customized using 
 	 * <code>spellingConfigUrl</code> property of <code>SpellUI</code>. You don't have to change the content of this file. However,
 	 * if you want to add a new language, to use an alternative dictionary or to customize the location for your dictionaries, you can modify it. 
 	 * There's an known issue with IIS web server when loading dictionary files with unknown extensions, in which case you can modify the XML to work around it.</p><p>
-	 * A sample AdobeSpellingConfig.xml will look as follows:
+	 * A sample SpellingConfig.xml will look as follows:
 	 * <listing version="3.0">
 	 * <pre class="preWrapper">
 	 * &lt;?xml version=&quot;1.0&quot; encoding='UTF-8'?&gt;
@@ -132,7 +132,7 @@ package com.adobe.linguistics.spelling
 		private var _spellingservice:SpellingService = null;
 
 		private static var _contextMenuEntries:Object = {enable:"Enable Spelling", disable:"Disable Spelling", add:"Add to dictionary"};		
-		private static var _spellingConfigUrl:String = "AdobeSpellingConfig.xml";
+		private static var _spellingConfigUrl:String = "SpellingConfig.xml";
 		private static var _UITable:Dictionary= new Dictionary();
 		private static var _parentTable:Dictionary= new Dictionary();
 		private static var _cacheDictTable:Dictionary= new Dictionary();
@@ -149,8 +149,8 @@ package com.adobe.linguistics.spelling
 		 * right click on a misspelled word to see the suggestions in the context menu.
 		 * 
 		 * @param comp	A TLF TextFlow object
-		 * @param lang	The language code used for spell checking, for example <code>en_US</code>. it will lookup the AdobeSpellingConfig.xml file to access corresponding resource files.
-		 * AdobeSpellingConfig.xml should located at the same folder as your main mxml source file. You don't have to change the content of this file. However,
+		 * @param lang	The language code used for spell checking, for example <code>en_US</code>. it will lookup the SpellingConfig.xml file to access corresponding resource files.
+		 * SpellingConfig.xml should located at the same folder as your main mxml source file. You don't have to change the content of this file. However,
 		 * if you want to add a new language, to use an alternative dictionary or to customize the location for your dictionaries, you can modify it. There's an known issue with
 		 * IIS web server when loading dictionary files with unknown extensions, in which case you can modify the XML to work around it.
 		 * 
@@ -215,7 +215,7 @@ package com.adobe.linguistics.spelling
 		}
 		
 		/**
-		 * The URL for the spelling config xml file. If you haven't specify it, the default URL is [applicationDirectory]/AdobeSpellingConfig.xml. Note that we don't validate the URL, if the file doesn't exist, you will get an error when calling enableSpelling() function.
+		 * The URL for the spelling config xml file. If you haven't specify it, the default URL is [applicationDirectory]/SpellingConfig.xml. Note that we don't validate the URL, if the file doesn't exist, you will get an error when calling enableSpelling() function.
 		 *
 		 * @example The following code customize the spellingConfigUrl before enabling spell checking.
 		 * <listing version="3.0">


[10/50] [abbrv] git commit: [flex-utilities] [refs/heads/master] - fix names of nodes

Posted by jm...@apache.org.
fix names of nodes


Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/668810aa
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/668810aa
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/668810aa

Branch: refs/heads/master
Commit: 668810aad9fb797dadb6ab418f2e3a59ae07e7cb
Parents: f19d78d
Author: Justin Mclean <jm...@apache.org>
Authored: Wed Aug 27 16:58:29 2014 +1000
Committer: Justin Mclean <jm...@apache.org>
Committed: Wed Aug 27 16:58:29 2014 +1000

----------------------------------------------------------------------
 TourDeFlex/TourDeFlex3/src/explorer.xml | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/668810aa/TourDeFlex/TourDeFlex3/src/explorer.xml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/explorer.xml b/TourDeFlex/TourDeFlex3/src/explorer.xml
index 8506b29..9a2c9bd 100755
--- a/TourDeFlex/TourDeFlex3/src/explorer.xml
+++ b/TourDeFlex/TourDeFlex3/src/explorer.xml
@@ -445,32 +445,32 @@
 			</node>
 			<node label="Apache Flex 4.9" app="apache/ApacheFlex4_9_0">
 				<!--  Add more examples here -->
-				<compile-mxml label="PostCodeFormatter" app="apache/formatters/PostCodeFormatterExample"/>
-				<compile-mxml label="PostCodeValidator" app="apache/validators/PostCodeValidatorExample"/>
-				<compile-mxml label="New SDK locales" app="apache/i18n/LocaleExample"/>
+				<node label="PostCodeFormatter" app="apache/formatters/PostCodeFormatterExample"/>
+				<node label="PostCodeValidator" app="apache/validators/PostCodeValidatorExample"/>
+				<node label="New SDK locales" app="apache/i18n/LocaleExample"/>
 			</node>
 			<node label="Apache Flex 4.10" app="apache/ApacheFlex4_10_0">
 				<!--  Add more examples here -->
-				<compile-mxml label="International Dates" app="apache/i18n/DateExample"/>
-				<compile-mxml label="Millisecond Formatting" app="apache/i18n/MillisecondExample"/>
-				<compile-mxml label="NumberStepper" app="apache/i18n/NumericStepperExample"/>
-				<compile-mxml label="Scientific Notation Formatting" app="apache/i18n/ScientificExample"/>
-				<compile-mxml label="Timezone Formatting" app="apache/i18n/TimezoneExample"/>
+				<node label="International Dates" app="apache/i18n/DateExample"/>
+				<node label="Millisecond Formatting" app="apache/i18n/MillisecondExample"/>
+				<node label="NumberStepper" app="apache/i18n/NumericStepperExample"/>
+				<node label="Scientific Notation Formatting" app="apache/i18n/ScientificExample"/>
+				<node label="Timezone Formatting" app="apache/i18n/TimezoneExample"/>
 			</node>
 			<node label="Apache Flex 4.11" app="apache/ApacheFlex4_11_0">
 				<!--  Add more examples here -->
-				<compile-mxml label="Callout" app="apache/containers/CalloutExample"/>
+				<node label="Callout" app="apache/containers/CalloutExample"/>
 			</node>
 			<node label="Apache Flex 4.12" app="apache/ApacheFlex4_12_1">
 				<!--  Add more examples here -->
-				<compile-mxml label="MaskedTextInput" app="apache/controls/MaskedTextInputExample"/>
+				<node label="MaskedTextInput" app="apache/controls/MaskedTextInputExample"/>
 			</node>
 			<node label="Apache Flex 4.13" app="apache/ApacheFlex4_13_0">
 				<!--  Add examples here -->
 			</node>
 			<!-- Add when Flex 4.14 is released
 			<node label="Apache Flex 4.14" app="apache/ApacheFlex4_14_0">
-				<compile-mxml label="MaskedTextInput" app="apache/controls/SparkRichTextEditorExample"/>
+				<node label="MaskedTextInput" app="apache/controls/SparkRichTextEditorExample"/>
 			</node> 
 			 -->
 		</node>


[06/50] [abbrv] git commit: [flex-utilities] [refs/heads/master] - FLEX-34495 fix error loading source file

Posted by jm...@apache.org.
FLEX-34495 fix error loading source file


Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/64b07cb6
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/64b07cb6
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/64b07cb6

Branch: refs/heads/master
Commit: 64b07cb6468c8e76b33f544453f94a7f2edaded7
Parents: eaff755
Author: Justin Mclean <jm...@apache.org>
Authored: Wed Aug 27 14:25:28 2014 +1000
Committer: Justin Mclean <jm...@apache.org>
Committed: Wed Aug 27 14:25:28 2014 +1000

----------------------------------------------------------------------
 TourDeFlex/TourDeFlex3/src/explorer.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/64b07cb6/TourDeFlex/TourDeFlex3/src/explorer.xml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/explorer.xml b/TourDeFlex/TourDeFlex3/src/explorer.xml
index 7cfe009..93e9195 100755
--- a/TourDeFlex/TourDeFlex3/src/explorer.xml
+++ b/TourDeFlex/TourDeFlex3/src/explorer.xml
@@ -99,7 +99,7 @@
 			</node>
 			<node label="Print Controls">
 				<node label="FlexPrintJob, PrintDataGrid" app="mx/printing/PrintDataGridExample"
-					src="mx/printing/FormPrintView.mxml&amp;printing/FormPrintHeader.mxml&amp;mx/printing/FormPrintFooter.mxml" />
+					src="mx/printing/FormPrintView.mxml&amp;mx/printing/FormPrintHeader.mxml&amp;mx/printing/FormPrintFooter.mxml" />
 			</node>
 			<node label="Validators and Formatters">
 				<node label="Validators">


[18/50] [abbrv] remove Adobe from directory names (package name still contains Adobe)

Posted by jm...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingUITLF/src/com/adobe/linguistics/spelling/SquigglyCustomContainerController.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingUITLF/src/com/adobe/linguistics/spelling/SquigglyCustomContainerController.as b/Squiggly/main/SpellingUITLF/src/com/adobe/linguistics/spelling/SquigglyCustomContainerController.as
new file mode 100644
index 0000000..9ea0f9a
--- /dev/null
+++ b/Squiggly/main/SpellingUITLF/src/com/adobe/linguistics/spelling/SquigglyCustomContainerController.as
@@ -0,0 +1,258 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+package com.adobe.linguistics.spelling
+{
+	import com.adobe.linguistics.spelling.SpellUIForTLF;
+	import com.adobe.linguistics.spelling.framework.SpellingService;
+	import com.adobe.linguistics.spelling.ui.IHighlighter;
+	import com.adobe.linguistics.spelling.ui.IWordProcessor;
+	import com.adobe.linguistics.spelling.ui.TLFHighlighter;
+	import com.adobe.linguistics.spelling.ui.TLFWordProcessor;
+	import com.adobe.linguistics.utils.TextTokenizer;
+	import com.adobe.linguistics.utils.Token;
+	
+	import flash.display.Sprite;
+	import flash.events.ContextMenuEvent;
+	import flash.events.Event;
+	import flash.events.EventDispatcher;
+	import flash.geom.Point;
+	import flash.geom.Rectangle;
+	import flash.ui.ContextMenu;
+	import flash.ui.ContextMenuItem;
+	
+	import flashx.textLayout.compose.StandardFlowComposer;
+	import flashx.textLayout.compose.TextFlowLine;
+	import flashx.textLayout.container.ContainerController;
+	import flashx.textLayout.conversion.TextConverter;
+	import flashx.textLayout.edit.SelectionManager;
+	import flashx.textLayout.elements.FlowLeafElement;
+	import flashx.textLayout.elements.ParagraphElement;
+	import flashx.textLayout.elements.TextFlow;
+	import flashx.textLayout.events.CompositionCompleteEvent;
+	import flashx.textLayout.events.StatusChangeEvent;
+	import flashx.textLayout.tlf_internal;
+	
+	/** Custom container controller for populating context menu and hanlding menu item selection  */
+	internal class SquigglyCustomContainerController extends ContainerController
+	{
+		private var disableMenuItem:ContextMenuItem = new ContextMenuItem("Disable spell checking",true);
+		private var enableMenuItem:ContextMenuItem = new ContextMenuItem("Enable spell checking");		
+		
+		private var controlMenuItemList:Array = new Array();
+		private var suggestionMenuItemList:Array = new Array();
+		private var _spellingEnabled:Boolean;
+		private var _contextMenu:ContextMenu;
+		private var mTextHighlighter:IHighlighter;
+		private var mWordProcessor:IWordProcessor;
+		private var mSpellEngine:SpellingService;
+		private var mTextFlow:TextFlow;
+		private var _ignoreWordFunctionProcessor:Function;
+		private var _misspelledToken:Token;
+		private var _misspelled:String;
+		
+		public function SquigglyCustomContainerController(container:Sprite,textHighlighter:IHighlighter, wordProcessor:IWordProcessor, engine:SpellingService,
+														  func:Function, compositionWidth:Number=100,compositionHeight:Number=100)
+		{
+			super (container, compositionWidth, compositionHeight);
+			mTextHighlighter = textHighlighter;
+			mWordProcessor = wordProcessor;
+			mSpellEngine = engine;
+			_ignoreWordFunctionProcessor = func;
+			
+			spellingEnabled = true;
+		}
+		
+		/** Overridden to add custom items to the context menu */
+		override protected function createContextMenu():ContextMenu
+		{
+			// Get the default context menu used by TLF for editable flows
+			_contextMenu = super.container.contextMenu;
+			if (_contextMenu == null)
+				_contextMenu = super.createContextMenu();
+				
+			
+			enableMenuItem.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, handleEnableSpellCheck);
+			disableMenuItem.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, handleDisableSpellCheck);
+			controlMenuItemList.push(enableMenuItem);
+			controlMenuItemList.push(disableMenuItem);
+			
+			_contextMenu.customItems.push(disableMenuItem);
+			_contextMenu.customItems.push(enableMenuItem);
+			
+			// Listen for menu selection
+			_contextMenu.addEventListener(ContextMenuEvent.MENU_SELECT, updateCustomMenuItems);
+			
+			return _contextMenu;
+		}
+		
+		/** Update the state of the custom menu items before the context menu is displayed */
+		private function updateCustomMenuItems(event:ContextMenuEvent):void 
+		{
+			/* Clear the context menu */
+			//spellingEnabled= mTextHighlighter.spellingEnabled;
+			//SpellUI.doSpelling1();
+			var removedNum:int = 0;
+			var count:uint = _contextMenu.customItems.length;
+			for (var j:uint=count; j>0; j--) {
+				if ( isWordItem(_contextMenu.customItems[j-1]) ) {
+					_contextMenu.customItems.splice(j-1,1);
+					removedNum++
+				}
+			}
+			if ( removedNum != suggestionMenuItemList.length ) {
+				trace("internal error");
+			}
+			
+			
+			suggestionMenuItemList = new Array();
+			
+			// localized entries
+			var entries:Object = SpellUIForTLF.getSpellingMenuEntries();
+			disableMenuItem.caption = entries.disable;
+			enableMenuItem.caption = entries.enable;				
+			
+			if (spellingEnabled == true) {
+				(mWordProcessor as TLFWordProcessor).textFlowContainerController = this;
+				
+				//trace("stageX " +  super.container.stage.mouseX);
+				//trace("stageY " +  super.container.stage.mouseY);
+				//trace("mouseX " +  super.container.mouseX);
+				//trace("mouseY " +  super.container.mouseY);
+				_misspelledToken = mWordProcessor.getWordAtPoint(this.container.mouseX, this.container.mouseY);
+				if (_misspelledToken==null) return;
+				var currentLeaf:FlowLeafElement = this.textFlow.findLeaf(_misspelledToken.first);
+				var currentParagraph:ParagraphElement = currentLeaf ? currentLeaf.getParagraph() : null;
+				_misspelled = 	currentParagraph.getText().substring(_misspelledToken.first - currentParagraph.getAbsoluteStart(), 
+																		_misspelledToken.last - currentParagraph.getAbsoluteStart());
+				if ((_misspelled==null) || (_misspelled == "")) return;
+				
+				if (mSpellEngine.checkWord(_misspelled)==true) return;				
+				
+				var suseAddToItem:ContextMenuItem = new ContextMenuItem(entries.add);
+				suseAddToItem.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, handleAddToItemSelect);
+				suggestionMenuItemList.push(suseAddToItem);
+				_contextMenu.customItems.splice(0,0,suseAddToItem);	
+				//var result:Array = mWordProcessor.getSuggestionsAtPoint();
+				var resultVector:Vector.<String> = mSpellEngine.getSuggestions(_misspelled);
+				var result:Array = new Array();
+				if (resultVector) {
+					for each (var w:String in resultVector)
+					result.push(w);
+				}
+				if (result!=null) {
+					for (var i:int=result.length-1;i>=0;i-- ) {
+						var suseMenuItem:ContextMenuItem = new ContextMenuItem(result[i]);
+						suseMenuItem.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, handleSuseItemSelect);
+						suggestionMenuItemList.push(suseMenuItem);
+						//_contextMenu.customItems.push(suseMenuItem);
+						_contextMenu.customItems.splice(0,0,suseMenuItem);
+					}
+				}
+			}
+		}
+		
+		private function handleAddToItemSelect(event:ContextMenuEvent):void
+		{
+			if ( _ignoreWordFunctionProcessor == null ) return;
+			
+			/*
+			var menuEntry:String = (event.currentTarget as ContextMenuItem).caption;
+			var start:uint = 5;
+			var end:uint = menuEntry.length - 15;
+			var word:String = menuEntry.substring(start, end);
+			*/
+			_ignoreWordFunctionProcessor(_misspelled);
+			SpellUIForTLF.UITable[SpellUIForTLF.parentComp[super.textFlow]].doSpellingJob();
+		}
+		
+		private function handleSuseItemSelect(event:ContextMenuEvent):void
+		{
+			mWordProcessor.replaceText(_misspelledToken, (event.currentTarget as ContextMenuItem).caption );
+			SpellUIForTLF.UITable[SpellUIForTLF.parentComp[super.textFlow]].doSpellingJob();
+		}
+			
+		private function set spellingEnabled(value:Boolean) :void {
+			_spellingEnabled = value;
+			disableMenuItem.visible=spellingEnabled;
+			enableMenuItem.visible=!spellingEnabled;
+		}
+		private function get spellingEnabled():Boolean {
+			return this._spellingEnabled;
+		}
+		
+		private function isWordItem(item:ContextMenuItem):Boolean {
+			
+			for ( var i:int=0; i<suggestionMenuItemList.length; ++i ) {
+				if ( suggestionMenuItemList[i] == item ) return true;
+			}
+			return false;
+		}
+		
+		private function isControlItem(item:ContextMenuItem):Boolean {
+			for (var i:int=0; i<controlMenuItemList.length; ++i) {
+				if ( controlMenuItemList[i] == item) return true;
+			}
+			return false;
+		}
+		
+		private function handleEnableSpellCheck(event:ContextMenuEvent):void
+		{
+			spellingEnabled= true;
+			//mTextHighlighter.spellingEnabled= spellingEnabled;
+			//SpellUI.doSpellingJob();
+			//dispatchEvent(new Event(Event.RENDER));
+			
+			SpellUIForTLF.UITable[SpellUIForTLF.parentComp[this.textFlow]].spellingEnabled = spellingEnabled;
+			SpellUIForTLF.UITable[SpellUIForTLF.parentComp[this.textFlow]].doSpellingJob();
+			//spellCheckRange(getValidFirstWordIndex(), getValidLastWordIndex());
+		}
+		private function handleDisableSpellCheck(event:ContextMenuEvent):void
+		{
+			spellingEnabled= false;
+			SpellUIForTLF.UITable[SpellUIForTLF.parentComp[this.textFlow]].spellingEnabled = spellingEnabled;
+			mTextHighlighter.clearSquiggles();
+		}
+		
+		public function cleanUpContextMenu():void
+		{
+			mTextHighlighter=null;
+			mWordProcessor=null;
+			spellingEnabled = false;
+			_ignoreWordFunctionProcessor=null;
+			
+			_contextMenu.removeEventListener(ContextMenuEvent.MENU_SELECT, updateCustomMenuItems);
+			
+			var removedNum:int = 0;
+			var count:uint = _contextMenu.customItems.length;
+			for (var j:uint=count; j>0; j--) {
+				if ( isWordItem(_contextMenu.customItems[j-1]) || isControlItem(_contextMenu.customItems[j-1]) ) {
+					_contextMenu.customItems.splice(j-1,1);
+					removedNum++
+				}
+			}
+			if ( removedNum != suggestionMenuItemList.length + controlMenuItemList.length ) {
+				trace("internal error");
+			}
+			
+			suggestionMenuItemList = null;
+			controlMenuItemList = null;
+		}
+		
+	}
+}
\ No newline at end of file


[15/50] [abbrv] git commit: [flex-utilities] [refs/heads/master] - add initial LICENSE and NOTICE

Posted by jm...@apache.org.
add initial LICENSE and NOTICE


Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/7be1a522
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/7be1a522
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/7be1a522

Branch: refs/heads/master
Commit: 7be1a522f3a40e7ef9324038fa42514787b3825e
Parents: 2672b61
Author: Justin Mclean <jm...@apache.org>
Authored: Thu Aug 28 10:53:52 2014 +1000
Committer: Justin Mclean <jm...@apache.org>
Committed: Thu Aug 28 10:53:52 2014 +1000

----------------------------------------------------------------------
 Squiggly/LICENSE | 206 ++++++++++++++++++++++++++++++++++++++++++++++++++
 Squiggly/NOTICE  |   9 +++
 2 files changed, 215 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/7be1a522/Squiggly/LICENSE
----------------------------------------------------------------------
diff --git a/Squiggly/LICENSE b/Squiggly/LICENSE
new file mode 100644
index 0000000..fa3308b
--- /dev/null
+++ b/Squiggly/LICENSE
@@ -0,0 +1,206 @@
+
+                                 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.
+
+
+
+

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/7be1a522/Squiggly/NOTICE
----------------------------------------------------------------------
diff --git a/Squiggly/NOTICE b/Squiggly/NOTICE
new file mode 100644
index 0000000..c53afef
--- /dev/null
+++ b/Squiggly/NOTICE
@@ -0,0 +1,9 @@
+Apache Flex Squiggly
+Copyright 2014 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+
+The Initial Developer of the Original Code, known as Squiggly, 
+is Adobe Systems Incorporated (http://www.adobe.com/).
+Copyright 2011 - 2013 Adobe Systems Incorporated. All Rights Reserved.
\ No newline at end of file


[22/50] [abbrv] remove Adobe from directory names (package name still contains Adobe)

Posted by jm...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/utils/LinguisticRuleLoader.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/utils/LinguisticRuleLoader.as b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/utils/LinguisticRuleLoader.as
new file mode 100644
index 0000000..1b5bac9
--- /dev/null
+++ b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/utils/LinguisticRuleLoader.as
@@ -0,0 +1,977 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+package com.adobe.linguistics.spelling.core.utils
+{
+	import com.adobe.linguistics.spelling.core.LinguisticRule;
+	import com.adobe.linguistics.spelling.core.env.InternalConstants;
+	import com.adobe.linguistics.spelling.core.error.*;
+	import com.adobe.linguistics.spelling.core.logging.*;
+	
+	import flash.errors.IllegalOperationError;
+	import flash.events.ErrorEvent;
+	import flash.events.Event;
+	import flash.events.EventDispatcher;
+	import flash.events.IOErrorEvent;
+	import flash.events.SecurityErrorEvent;
+	import flash.net.URLRequest;
+	import flash.utils.ByteArray;
+
+	public class LinguisticRuleLoader extends EventDispatcher
+	{
+		private var _attrMgr:LinguisticRule;
+		private var _rulePath:String;
+		private var snp:SimpleNumberParser = new SimpleNumberParser();
+		
+		private var unrecognizedLines:int = 0;
+
+		
+		//setup logger for sending message.
+		private var className:String = flash.utils.getQualifiedClassName(this).split("::").join(".");
+		private var logger:ILogger = Log.getLogger( className );
+
+		public function LinguisticRuleLoader()
+		{
+			init();
+		}
+		
+		private function init():void {
+			_attrMgr = null;
+			_rulePath = null ;
+			unrecognizedLines = 0;
+			
+		}
+
+		public function load(ruleURL:String):void {
+			if ( ruleURL == null) {
+				throw new IllegalOperationError("Linguistics rule load function received an invalid URL.");
+			}
+			if ( this._attrMgr ) {
+				logger.warn("You already did call the load function muliti-times, The orginal linguistic data will be overiden." );
+				init();
+			}
+			_rulePath = ruleURL;
+			var request:URLRequest = new URLRequest( _rulePath );
+			var dloader:DictionaryLoader = new DictionaryLoader(request);
+			dloader.addEventListener(Event.COMPLETE,loadRuleComplete);
+			dloader.addEventListener(IOErrorEvent.IO_ERROR,handleError);
+			dloader.addEventListener(SecurityErrorEvent.SECURITY_ERROR,handleError);
+		}
+		//Private method to dispatch an error event.
+		private function handleError(evt:Event):void {
+			bounceEvent(evt);
+		}
+		private function bounceEvent(evt:Event):void {
+			dispatchEvent(evt.clone());
+		}
+
+		public function get linguisticRule():LinguisticRule {
+			return _attrMgr;
+		}
+
+		private function loadRuleComplete(evt:Event):void {
+			_attrMgr = new LinguisticRule();
+			if( !_attrMgr ) {
+				logger.fatal("Rule File[{0}] Operation[parsing]:Could not locate memory for Linguistic Rule", this._rulePath  );
+				return;
+			}
+			var bytes:ByteArray = evt.target.data;
+			detectEncoding(bytes);
+			bytes.position = 0;
+			parseRule(bytes);
+			dispatchEvent(new Event(Event.COMPLETE));
+		}
+		
+		private function parseRule(bytes:ByteArray):void {
+			
+			var str:String = 	bytes.readMultiByte(bytes.length, _attrMgr.encoding);
+			/*
+			In DOS, a line break is a single '\n'.
+			In Unix, a line break is the sequence '\r\n'.
+			In MAC, a line break is a single '\r'.
+			Correct me if I'm wrong.
+			so step 1:
+			replace "\r\n" with "\n"
+			step 2:
+			replace "\r" with "\n";
+			finally ,we get "\n" line seperator.
+			*/
+			str=str.split("\r\n").join("\n");
+			str=str.split("\r").join("\n");
+			var lineContentArr:Array = str.split("\n");
+			
+			//bof of parsing the text.
+			if( (lineContentArr== null) || (lineContentArr.length== 1) ) {
+				logger.fatal("Rule File[{0}] Operation[parsing] has nothing in the file.", this._rulePath  );
+				return;
+			}
+			/* remove byte order mark */
+			if ( lineContentArr[0].match(new RegExp("^\xEF\xBB\xBF[.]+$") ) ) lineContentArr[0]=lineContentArr[0].substr(3);
+
+			var lineContent:String;
+			var res:int;
+			for( var line:int = 0; line<lineContentArr.length; ) {
+				lineContent= lineContentArr[line];
+				
+				
+				if ( parseAttribute( lineContent, line ) ) {
+					++line;
+					continue;
+				}
+				//parsing for AF rule make aliasf table before loading alias rules
+				if( (res=parseAliasf(lineContent, lineContentArr, line) ) !=0){
+					++line;
+					line+=res;
+					continue;
+				}
+					
+				if ( (res=parseAffix(lineContent, lineContentArr, line)) != 0 ) {
+					line++;
+					line += res;
+					continue;
+				}
+				
+				
+				if ( (res=parseReplaceTable(lineContent, lineContentArr,line)) !=0 ) {
+					line++;
+					line += res;
+					continue;
+				}
+				if ( (res=parseMapTable(lineContent, lineContentArr, line) ) != 0 ) {
+					line++;
+					line += res;
+					continue;
+				}
+/*				//Parse phone table
+				if ( (res=parsePhoneTable(lineContent, lineContentArr,line)) !=0 ) {
+					line++;
+					line += res;
+					continue;
+				}
+*/				/*parse for ICONV/OCONV field*/
+				if ((res=parseConvTable(lineContent, lineContentArr,line)) !=0 ) {
+					line++;
+					line+=res;
+					continue;
+				}
+				
+				/*parse for BREAK rule*/
+				if ((res=parseBreakTable(lineContent, lineContentArr,line)) !=0 ) {
+					line++;
+					line+=res;
+					continue;
+				}
+				
+				if ( !isCommentOrEmpty( lineContent ) ) {
+					line++;
+					unrecognizedLines++;
+					logger.warn("Rule File[{0}] Operation[parsing] Line Number:{1}, Content:{2}",this._rulePath , (line+1).toString(),lineContent );
+					continue;
+				}
+				line++;
+			}
+			//eof of parsing the text.
+			logger.info("Rule File[{0}] Operation[parsing] Total Lines:{1}, Unrecognized Lines:{2}", this._rulePath ,lineContentArr.length.toString(), unrecognizedLines.toString() );
+			
+		}
+
+		private function detectEncoding(bytes:ByteArray):void {
+			var str:String = 	bytes.readUTFBytes(bytes.length);
+			/*
+			In DOS, a line break is a single '\n'.
+			In Unix, a line break is the sequence '\r\n'.
+			In MAC, a line break is a single '\r'.
+			Correct me if I'm wrong.
+			so step 1:
+			replace "\r\n" with "\n"
+			step 2:
+			replace "\r" with "\n";
+			finally ,we get "\n" line seperator.
+			*/
+			str=str.split("\r\n").join("\n");
+			str=str.split("\r").join("\n");
+			var lineContentArr:Array = str.split("\n");
+			
+			//bof of parsing the text.
+			if(lineContentArr== null ) {
+				logger.fatal("Rule File[{0}] Operation[parsing] has nothing in the file.", this._rulePath  );
+				return;
+			}
+			/* remove byte order mark */
+			if ( lineContentArr[0].match(new RegExp("^\xEF\xBB\xBF[.]+$") ) ) lineContentArr[0]=lineContentArr[0].substr(3);
+
+			var lineContent:String;
+			var res:int;
+			for( var line:int = 0; line<lineContentArr.length; ) {
+				lineContent= lineContentArr[line];
+				if ( parseEncoding( lineContent, line ) ) {
+					break;
+				}
+				++line;
+			}
+			//eof of parsing the text.
+			if( _attrMgr.encoding == null ) {
+				logger.fatal("Rule File[{0}] Operation[parsing] Error[no encoding specified] in file.",this._rulePath );
+				_attrMgr.encoding= InternalConstants.DEFAULTENCODING;
+			}
+			
+		}
+		
+		private function parseEncoding(lineContent:String, lineNumber:int):Boolean {
+			var result:String;
+			/* parse in the name of the character set used by the .dict and .aff */
+			if ( (result=parseStringAttribute("SET",lineContent)) != null ){
+				if ( _attrMgr.encoding != null ) {
+					//"error: line xxx: multiple definitions"
+					logger.error("Rule File[{0}] Operation[parsing] Error[multiple definitions] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
+				}else{ 
+					result = getEncodingByString( result );
+					if ( result == "" ) {
+						logger.fatal("Rule File[{0}] Operation[parsing] Error[unsupported encoding] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent);
+						result = InternalConstants.DEFAULTENCODING;
+					}
+					_attrMgr.encoding = result;
+				}
+				return true;
+			}
+			return false;
+		}
+
+
+		private function parseMapTable( lineContent:String, lineContentArray:Array, lineNumber:int ) :int {
+			var res:int = 0;
+			if ( !testKeyString("MAP",lineContent)  )
+				return res;
+			var seperatorPattern:RegExp = /[\t ]+/;
+			if ( _attrMgr.mapFilterTable.length != 0 ) {
+				logger.error("Rule File[{0}] Operation[parsing] Error[multiple definitions] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
+			}
+			/*
+			MAP number_of_map_definitions
+			MAP string_of_related_chars
+				We can define language-dependent information on characters that should be considered related (ie. nearer than other chars not in the set) in the affix file (.aff) by a character map table. With this table, Hunspell can suggest the right forms for words, which incorrectly choose the wrong letter from a related set more than once in a word. 
+			For example a possible mapping could be for the German umlauted ü versus the regular u; the word Frühstück really should be written with umlauted u's and not regular ones
+			MAP 1
+			MAP uü
+			word support in spell checking (forbidding generated compound words, if they are also simple words with typical fault). 
+			*/
+			var strArr:Array = lineContent.split(seperatorPattern);
+			if ( strArr == null || strArr.length < 2 ) {
+				logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
+			}
+			var numberOfEntries:int = snp.parse(strArr[1]); 
+			var parsedLines:int = 0;
+			lineNumber++;
+			while( lineNumber < lineContentArray.length && parsedLines<numberOfEntries ) {
+				lineContent = lineContentArray[lineNumber];
+				lineNumber++;
+				parsedLines++;
+				strArr = lineContent.split(seperatorPattern);
+				if ( strArr == null || (strArr.length < 2) ) {
+					logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
+				}
+				if ( strArr[0]!="MAP" ) {
+					logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
+				}
+				var mapString:String =strArr[1];
+				/* special handling for the rule file include mixed-case mapping string:
+					MAP 5
+					MAP aáAÁ
+					MAP eéEÉ
+					MAP iíIÍ
+					MAP oóOÓ
+					MAP uúüUÚÜ
+				*/
+				var capaType:int = StringUtils.getCapType(mapString);
+				if ( capaType == InternalConstants.ALLCAP ||  capaType == InternalConstants.NOCAP ) {
+					_attrMgr.addMapFilter(mapString);
+				}else {
+					var upperStr:String="";
+					var lowerStr:String=""; 
+					for ( var i:int=0;i< mapString.length;++i ) {
+						if ( mapString.charAt(i) != mapString.charAt(i).toLocaleUpperCase() ) {
+							lowerStr+=mapString.charAt(i);
+						}else {
+							upperStr+=mapString.charAt(i);
+						}
+					}
+					_attrMgr.addMapFilter(upperStr);
+					_attrMgr.addMapFilter(lowerStr);
+				}
+			}
+			if ( parsedLines != numberOfEntries ) {
+				logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
+			}
+			return (numberOfEntries);
+			
+		}
+		
+		private function parseReplaceTable( lineContent:String, lineContentArray:Array, lineNumber:int ) :int {
+			var res:int = 0;
+			if ( !testKeyString("REP",lineContent)  )
+				return res;
+			var seperatorPattern:RegExp = /[\t ]+/;
+			if ( _attrMgr.simpleFilterTable.length != 0 ) {
+				logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
+			}
+			/*
+			REP number_of_replacement_definitions
+			REP what replacement
+			    We can define language-dependent phonetic information in the affix file (.aff) by a replacement table. 
+			    First REP is the header of this table and one or more REP data line are following it. With this table, 
+			    Hunspell can suggest the right forms for the typical faults of spelling when the incorrect form differs 
+			    by more, than 1 letter from the right form. For example a possible English replacement table definition 
+			    to handle misspelled consonants: 
+			REP 8
+			REP f ph
+			REP ph f
+			REP f gh
+			REP gh f
+			REP j dg
+			REP dg j
+			REP k ch
+			REP ch k
+			Replacement table is also usable in robust morphological analysis (accepting bad forms) or stricter compound 
+			word support in spell checking (forbidding generated compound words, if they are also simple words with typical fault). 
+			*/
+			var strArr:Array = lineContent.split(seperatorPattern);
+			if ( strArr == null || strArr.length != 2 ) {
+				logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
+			}
+			var numberOfEntries:int = snp.parse(strArr[1]); 
+			var parsedLines:int = 0;
+			lineNumber++;
+			while( lineNumber < lineContentArray.length && parsedLines<numberOfEntries ) {
+				lineContent = lineContentArray[lineNumber];
+				lineNumber++;
+				parsedLines++;
+				strArr = lineContent.split(seperatorPattern);
+				if ( strArr == null || (strArr.length != 3) ) {
+					logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
+				}
+				if ( strArr[0]!="REP" ) {
+					logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
+				}
+				var matchString:String =strArr[1];
+				var replacement:String =strArr[2];
+				_attrMgr.addSimpleFilter(matchString,replacement);
+			}
+			if ( parsedLines != numberOfEntries ) {
+				logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
+			}
+			return (numberOfEntries);
+		}
+		
+		/*---------parse phone table
+		Param: Line content, lince content array, and line number
+		Return: number of parsed lines
+		*/
+/*		private function parsePhoneTable( lineContent:String, lineContentArray:Array, lineNumber:int ) :int {
+			var res:int = 0;
+			if ( !testKeyString("PHONE",lineContent)  )
+				return res;
+			var seperatorPattern:RegExp = /[\t ]+/;
+			if ( _attrMgr.phoneTable ) {
+				logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
+			}
+			
+			PHONE number_of_phone_definitions
+			PHONE what replacement
+			PHONE uses a table-driven phonetic transcription algorithm borrowed from Aspell. It is useful for
+			languages with not pronunciation based orthography. You can add a full alphabet conversion and
+			other rules for conversion of special letter sequences. For detailed documentation see
+			http://aspell.net/man-html/Phonetic-Code.html. Note: Multibyte UTF-8 characters have not
+			worked with bracket expression yet. Dash expression has signed bytes and not UTF-8 characters
+			yet.
+			
+			var strArr:Array = lineContent.split(seperatorPattern);
+			if ( strArr == null || strArr.length != 2 ) {
+				logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
+			}
+			var numberOfEntries:int = snp.parse(strArr[1]); 
+			var parsedLines:int = 0;
+			lineNumber++;
+			//now parse the remaining lines
+			while( lineNumber < lineContentArray.length && parsedLines<numberOfEntries ) {
+				lineContent = lineContentArray[lineNumber];
+				lineNumber++;
+				parsedLines++;
+				strArr = lineContent.split(seperatorPattern);
+				if ( strArr == null || (strArr.length != 3) ) {
+					logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
+				}
+				if ( strArr[0]!="PHONE" ) {
+					logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
+				}
+				var matchString:String =strArr[1];
+				var replacement:String =strArr[2];
+				_attrMgr.phoneTable.addPhoneticFilter(matchString,replacement);//TODO: edit this
+			}
+			if ( parsedLines != numberOfEntries ) {
+				logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
+			}
+			return (numberOfEntries);
+		}
+*/		//---------parse phone table ends----//
+		
+		//---------parse conv table starts
+		private function parseConvTable( lineContent:String, lineContentArray:Array, lineNumber:int ) :int {
+			var res:int = 0;
+			var ioflag:Boolean;
+			var convTable:Array;
+			if(testKeyString("ICONV",lineContent)!=false){
+			//do for iconvtable	
+			ioflag=true;
+			convTable=_attrMgr.iconvFilterTable;
+			}
+			else if(testKeyString("OCONV",lineContent)!=false){
+			//do for oconvtable
+			ioflag=false;
+			convTable=_attrMgr.oconvFilterTable;
+			}
+			else return res;
+			
+			var seperatorPattern:RegExp = /[\t ]+/;
+			if ( (!convTable)||(convTable && convTable.length != 0 )) {
+				logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
+			}
+			/*ICONV number_of_ICONV_definitions
+			ICONV pattern pattern2
+			Define input conversion table.
+			OCONV number_of_OCONV_definitions
+			OCONV pattern pattern2
+			Define output conversion table.
+			*/
+			var strArr:Array = lineContent.split(seperatorPattern);
+			if ( strArr == null || strArr.length != 2 ) {
+				logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
+			}
+			var numberOfEntries:int = snp.parse(strArr[1]); 
+			var parsedLines:int = 0;
+			lineNumber++;
+			while( lineNumber < lineContentArray.length && parsedLines<numberOfEntries ) {
+				lineContent = lineContentArray[lineNumber];
+				lineNumber++;
+				parsedLines++;
+				strArr = lineContent.split(seperatorPattern);
+				if ( strArr == null || (strArr.length != 3) ) {
+					logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
+				}
+				if ( strArr[0]!="REP" ) {
+					logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
+				}
+				var matchString:String =strArr[1];
+				var replacement:String =strArr[2];
+				_attrMgr.addConvFilter(matchString,replacement,ioflag);//todo
+			}
+			if ( parsedLines != numberOfEntries ) {
+				logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
+			}
+			return (numberOfEntries);
+		}
+		//--parse Convtable ends
+		//--parse BreakTable starts
+		private function parseBreakTable( lineContent:String, lineContentArray:Array, lineNumber:int ) :int {
+			var res:int = 0;
+			if( !testKeyString("BREAK",lineContent) )
+				return res;
+			
+			var seperatorPattern:RegExp = /[\t ]+/;
+			if ( _attrMgr && _attrMgr.breakTable && _attrMgr.breakTable.length != 0 ) {
+				logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
+			}
+			/*
+			BREAK number_of_break_definitions
+			BREAK character_or_character_sequence
+			Define new break points for breaking words and checking word parts separately. Use ˆ and $ to
+			delete characters at end and start of the word. Rationale: useful for compounding with joining
+			character or strings (for example, hyphen in English and German or hyphen and n-dash in Hungarian).
+			Dashes are often bad break points for tokenization, because compounds with dashes may
+			contain not valid parts, too.) With BREAK, Hunspell can check both side of these compounds,
+			breaking the words at dashes and n-dashes:
+			BREAK 2
+			BREAK -
+			BREAK -- # n-dash
+			*/
+			var strArr:Array = lineContent.split(seperatorPattern);
+			if ( strArr == null || strArr.length != 2 ) {
+				logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
+			}
+			var numberOfEntries:int = snp.parse(strArr[1]); 
+			var parsedLines:int = 0;
+			lineNumber++;
+			while( lineNumber < lineContentArray.length && parsedLines<numberOfEntries ) {
+				lineContent = lineContentArray[lineNumber];
+				lineNumber++;
+				parsedLines++;
+				strArr = lineContent.split(seperatorPattern);
+				if ( strArr == null || (strArr.length != 2) ) {
+					logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
+				}
+				if ( strArr[0]!="BREAK" ) {
+					logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
+				}
+			if(_attrMgr.breakTable)	_attrMgr.breakTable.push(strArr[1]);
+			}
+			if ( parsedLines != numberOfEntries ) {
+				logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
+			}
+			return (numberOfEntries);
+		}
+		//--parse Breaktable Endas
+		
+		private function parseAffix(lineContent:String, lineContentArray:Array, lineNumber:int ) : int {
+			var res:int = 0;
+			if ( !testKeyString("PFX",lineContent) && !testKeyString("SFX",lineContent) )
+				return res;
+			var seperatorPattern:RegExp = /[\t ]+/;
+			var slashInsidePattern:RegExp = /^(.+)\/(.+)$/
+			
+			var resStrArr:Array;
+			
+			/* 
+			Affix classes are signed with affix flags. The first line of an affix class definition is the header. The fields of an affix class header:
+			(0) Option name (PFX or SFX)
+			(1) Flag (name of the affix class)
+			(2) Cross product (permission to combine prefixes and suffixes). Possible values: Y (yes) or N (no)
+			(3) Line count of the following rules. 
+			*/
+			var strArr:Array = lineContent.split( seperatorPattern );
+			if ( strArr == null || strArr.length < 4 ) {
+				logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
+			}
+			// piece 1 - is type of affix
+			var atype:int = (strArr[0]=="PFX") ? 0 : 1;
+			 // piece 2 - is affix char
+			var aflag:int = decodeFlag( strArr[1], this._attrMgr.flagMode );
+			// piece 3 - is cross product indicator 
+			var aPermission:Boolean = (strArr[2]=="Y") ? true : false;
+			// piece 4 - is number of affentries
+			var numberOfEntries:int = snp.parse(strArr[3]); 
+			var stripStr:String;
+			var affixStr:String;
+			var conditionsStr:String;
+			var morphStr:String;
+			var conditionPattern:RegExp;
+			var contclass:String;
+			
+			if ( numberOfEntries == 0 ) {
+				logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
+			}
+			
+			var parsedLines:int = 0;
+			lineNumber++;
+			while( lineNumber < lineContentArray.length && parsedLines<numberOfEntries ) {
+				var warnFlag:Boolean = false;
+				lineContent = lineContentArray[lineNumber];
+				lineNumber++;
+				parsedLines++;
+				/*
+				Fields of an affix rules:
+				(0) Option name
+				(1) Flag
+				(2) stripping characters from beginning (at prefix rules) or end (at suffix rules) of the word
+				(3) affix (optionally with flags of continuation classes, separated by a slash)
+				(4) condition.
+				Zero stripping or affix are indicated by zero. Zero condition is indicated by dot. Condition is a simplified, regular expression-like pattern, which must be met before the affix can be applied. (Dot signs an arbitrary character. Characters in braces sign an arbitrary character from the character subset. Dash hasn’t got special meaning, but circumflex (^) next the first brace sets the complementer character set.)
+				(5) Optional morphological fields separated by spaces or tabulators. 				
+				*/
+				strArr = lineContent.split(seperatorPattern);
+				if ( strArr == null || (strArr.length < 5) ) {
+					logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
+				}
+				// piece 1 - is type of affix
+				var aatype:int = (strArr[0]=="PFX") ? 0 : 1;
+				if ( aatype != atype ) {
+					logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
+				}
+				 // piece 2 - is affix char
+				var aaflag:int = decodeFlag( strArr[1],this._attrMgr.flagMode );
+				if ( aaflag != aflag ) {
+					logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
+				}
+				// piece 3 - is string to strip or 0 for null 
+				stripStr = strArr[2];
+				if ( stripStr == "0" ) stripStr="";
+				
+				/*complex affix bof*/
+				if ( (resStrArr=stripStr.match(slashInsidePattern)) != null ) {
+					stripStr = resStrArr[1];
+					warnFlag = true;
+					logger.warn("Rule File[{0}] Operation[parsing] Warn[complex affix] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
+				}
+				/*complex affix eof*/
+				
+				// piece 4 - is affix string or 0 for null
+				/*complex affix bof*/
+				if (strArr[3] && (resStrArr=strArr[3].match(slashInsidePattern)) != null ) //if contclass in Affix Rules
+				{
+					if(this._attrMgr && this._attrMgr.aliasfTable && this._attrMgr.aliasfTable.length>0)//if AF rule 
+					{
+						affixStr = resStrArr[1];
+						contclass=this._attrMgr.aliasfTable[parseInt(resStrArr[2],10)-1];
+					}
+					else// If not AF rule
+					{
+						affixStr =resStrArr[1];
+						contclass=decodeFlags(resStrArr[2],this._attrMgr.flagMode);
+						
+					}
+					
+					this._attrMgr.haveContClass=true;
+					
+					for(var i:int=0;i<contclass.length; i++ )//record the possible contclass in possible contclass array
+						this._attrMgr.contClasses[contclass.charCodeAt(i)]=true;
+				}
+				else
+				{
+					affixStr=strArr[3];
+					contclass=null;
+				}
+				if ( affixStr == "0" ) affixStr="";
+				if ( _attrMgr.ignoredChars != null ) StringUtils.removeIgnoredChars(affixStr, _attrMgr.ignoredChars );
+				/*complex affix eof*/
+
+
+				
+				// piece 5 - is the conditions descriptions
+				conditionsStr = strArr[4];
+				if ( conditionsStr.length == 0 ) {
+					logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
+				}
+				
+				//piece 6  morph information... ToDo....
+				morphStr = (strArr.length == 6) ? strArr[5]: "";
+			/*if(contclass && affixStr=="lit")	
+				for(var c:int=0;c<contclass.length;c++){
+				if(_attrMgr.flagMode== InternalConstants.FLAG_LONG)
+					trace(" contclasslong   "+c+"           " + String.fromCharCode(contclass.charCodeAt(c)>>8)+String.fromCharCode(contclass.charCodeAt(c)-((contclass.charCodeAt(c)>>8)<<8)));
+				else
+					trace(" contclassnormal   "+c+"           " + contclass[c]);
+			}*/
+				_attrMgr.addAffixEntry( aflag, stripStr, affixStr, conditionsStr, morphStr, aPermission, atype, contclass );
+				
+			}
+			if ( parsedLines != numberOfEntries ) {
+				logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
+			}
+			
+			return (numberOfEntries);
+		}
+		
+		//-------parseAliasf
+		private function parseAliasf(lineContent:String, lineContentArray:Array, lineNumber:int ) : int {
+			var res:int = 0;
+			if ( !testKeyString("AF",lineContent))
+				return res;
+			var seperatorPattern:RegExp = /[\t ]+/;
+			var slashInsidePattern:RegExp = /^(.+)\/(.+)$/
+			
+			var resStrArr:Array;
+			
+			/* 
+			AF number_of_flag_vector_aliases
+			AF flag_vector
+			Hunspell can substitute affix flag sets with ordinal numbers in affix rules ( compression, see
+			makealias tool). First example with  compression:
+			3
+			hello
+			try/1
+			work/2
+			AF definitions in the affix file:
+			SET UTF-8
+			TRY esianrtolcdugmphbyfvkwzESIANRTOLCDUGMPHBYFVKWZ’
+			AF 2
+			AF A
+			AF AB
+			It is equivalent of the following dic file:
+			3
+			hello
+			try/A
+			work/AB
+			*/
+			var strArr:Array = lineContent.split(seperatorPattern);
+			if ( strArr == null || strArr.length != 2 ) {
+				logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
+			}
+			var numberOfEntries:int = snp.parse(strArr[1]); 
+			var parsedLines:int = 0;
+			lineNumber++;
+			while( lineNumber < lineContentArray.length && parsedLines<numberOfEntries ) {
+				lineContent = lineContentArray[lineNumber];
+				lineNumber++;
+				parsedLines++;
+				strArr = lineContent.split(seperatorPattern);
+				if ( strArr == null || (strArr.length != 2) ) {
+					logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
+				}
+				if ( strArr[0]!="AF" ) {
+					logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
+				}
+				//Decode Flags and store as long numbers. In normal case without AF rule we do this step later. Here we are decoding and storing the flags.
+				var flags:String=decodeFlags(strArr[1],this._attrMgr.flagMode);
+				_attrMgr.aliasfTable.push(flags);
+			}
+			if ( parsedLines != numberOfEntries ) {
+				logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
+			}
+			return (numberOfEntries);
+		}
+		//--------parseAliasf
+		//------decodeflags
+		/*
+		* Squiggly is using utf16 by default...
+		* for utf8 string conversion,we need extra work later.
+		* we might also need a better toString() fuction for Flag_long and flag_num mode.
+		*/
+		private function decodeFlags(flags:String, flagMode:int):String {
+			var result:String="";
+			var i:int;
+			switch ( flagMode )  {
+				case InternalConstants.FLAG_LONG:
+					if ( (flags.length)%2 == 1 ) {
+						logger.error("Dictionary File[{0}] Operation[parsing] Error[decoding error] target flags:{1}",this._rulePath , flags );
+						throw new ContentError(ErrorTable.CONTENTPARSINGERROR_MSG,ErrorTable.CONTENTPARSINGERROR_ID);
+					}
+					var len:int = flags.length/2;
+					for ( i = 0; i< len; ++i ) {
+						result +=  String.fromCharCode( ((flags.charCodeAt((i * 2))) << 8) + (flags.charCodeAt((i * 2 + 1))) );
+					}
+					break;
+				case InternalConstants.FLAG_NUM:
+					var strArr:Array = flags.split(",");
+					for ( i = 0;i< strArr.length;++i) {
+						var num:Number = snp.parse(strArr[i]);
+						if ( num >= InternalConstants.DEFAULTFLAGS ) {
+							logger.error("Dictionary File[{0}] Operation[parsing] Error[decoding error] target flags:{1}",this._rulePath , flags );
+						}
+						result += String.fromCharCode(num);
+					}
+					break;
+				case InternalConstants.FLAG_UNI:
+					result = flags;
+					break;
+				default:
+					result = flags;
+					break;
+			}
+			return result;
+		}
+//-----------decode flags ends
+		
+		
+		private function decodeFlag( flagString:String, flag_mode:int=InternalConstants.FLAG_CHAR  ) : int {
+			var s:int;
+			var i:int;
+			switch ( flag_mode ) {
+				case InternalConstants.FLAG_LONG:
+					if ( flagString.length != 2 ) {
+						logger.error("Rule File[{0}] Operation[decodeFlag] Error[Unknown Flags] The length of flag id {1} is not equal 2.",this._rulePath , flagString);
+					}
+					s = ( flagString.charCodeAt(0) << 8) + flagString.charCodeAt(1);
+					break;
+				case InternalConstants.FLAG_NUM:
+					i = snp.parse(flagString);
+					if (i >= InternalConstants.DEFAULTFLAGS) {
+						logger.error("Rule File[{0}] Operation[decodeFlag] Error[Unknown Flags] flag id {1} is too large (max: {2})",this._rulePath , i.toString(),InternalConstants.DEFAULTFLAGS.toString() );
+					}
+					s = i;
+					break;
+				case InternalConstants.FLAG_UNI: // utf-8
+				default:
+					s = flagString.charCodeAt(0);
+			}
+			return s;
+		}
+
+		private function parseFlagMode(lineContent:String, lineNumber:int):Boolean {
+			var result:String;
+			/* parse in the name of the character set used by the .dict and .aff */
+			if ( (result=parseStringAttribute("FLAG",lineContent)) != null ){
+	            if (result == "long") _attrMgr.flagMode = InternalConstants.FLAG_LONG;
+	            if (result == "num") _attrMgr.flagMode = InternalConstants.FLAG_NUM;
+	            if (result == "UTF-8") _attrMgr.flagMode = InternalConstants.FLAG_UNI;
+	            if ( result == "char" ) _attrMgr.flagMode = InternalConstants.FLAG_CHAR;
+				return true;
+			}
+			return false;
+		}
+
+
+		private function parseAttribute(lineContent:String, lineNumber:int):Boolean {
+			var result:String;
+			
+			/* parse in the name of the character set used by the .dict and .aff */
+			if ( parseFlagMode(lineContent,lineNumber) ){
+				return true;
+			}
+			
+			 /* parse in the keyboard string */
+			if ( (result=parseStringAttribute("KEY",lineContent)) != null ){
+				_attrMgr.keyString = result;
+				return true;
+			}
+			
+			/* parse in the try string */
+			if ( (result=parseStringAttribute("TRY",lineContent)) != null ){
+				if ( _attrMgr.tryString != null ) {
+					//"error: line %d: multiple definitions\n"
+					throw new ContentError(ErrorTable.CONTENTPARSINGERROR_MSG,ErrorTable.CONTENTPARSINGERROR_ID); 
+				}else _attrMgr.tryString = result;
+				return true;
+			}
+			
+			/* parse in the name of the character set used by the .dict and .aff */
+			if ( (result=parseStringAttribute("SET",lineContent)) != null ){
+				return true;
+			}
+			
+			/* parse in the noSuggest flag */
+			if ( (result=parseStringAttribute("NOSUGGEST",lineContent)) != null ){
+			//	_attrMgr.noSuggest = result.charCodeAt(0); //Depreceated old function, had to be changed for supporting FLAG_LONG
+				_attrMgr.noSuggest = decodeFlag(result, this._attrMgr.flagMode);
+
+				return true;
+			}
+			
+			/* parse in the flag used by forbidden words */
+			if ( (result=parseStringAttribute("FORBIDDENWORD",lineContent)) != null ){
+				//_attrMgr.forbiddenWord = result.charCodeAt(0);//Depreceated old function, had to be changed for supporting FLAG_LONG
+				_attrMgr.forbiddenWord = decodeFlag(result, this._attrMgr.flagMode);
+
+				return true;
+			}
+
+			 /* parse in the ignored characters (for example, Arabic optional diacretics charachters */
+			if ( (result=parseStringAttribute("IGNORE",lineContent)) != null ){
+				if ( _attrMgr.ignoredChars != null ) {
+					//"error: line %d: multiple definitions\n"
+					throw new ContentError(ErrorTable.CONTENTPARSINGERROR_MSG,ErrorTable.CONTENTPARSINGERROR_ID); 
+				}else _attrMgr.ignoredChars = result;
+				return true;
+			}
+
+			/* parse in the extra word characters */
+			if ( (result=parseStringAttribute("WORDCHARS",lineContent)) != null ){
+				if ( _attrMgr.wordChars != null ) {
+					//"error: line %d: multiple definitions\n"
+					throw new ContentError(ErrorTable.CONTENTPARSINGERROR_MSG,ErrorTable.CONTENTPARSINGERROR_ID); 
+				}else _attrMgr.wordChars = result;
+				return true;
+			}
+			
+			/* parse in the language for language specific codes */
+			if ( (result=parseStringAttribute("LANG",lineContent)) != null ){
+				if ( _attrMgr.languageCode != null ) {
+					//"error: line %d: multiple definitions\n"
+					throw new ContentError(ErrorTable.CONTENTPARSINGERROR_MSG,ErrorTable.CONTENTPARSINGERROR_ID); 
+				}else {
+					_attrMgr.languageCode = result;
+					//langnum = get_lang_num(lang);
+				}
+				return true;
+			}
+			
+			/* parse in the version */
+			if ( (result=parseStringAttribute("VERSION",lineContent)) != null ){
+				_attrMgr.version = result;
+				return true;
+			}
+
+			if ( (result=parseStringAttribute("MAXNGRAMSUGS",lineContent)) != null ){
+				_attrMgr.maxNgramSuggestions = snp.parse(result);
+				return true;
+			}
+			
+			if ( testKeyString("NOSPLITSUGS",lineContent) ) {
+				_attrMgr.nosplitSuggestions = 1;
+			}
+			
+			if ( testKeyString("SUGSWITHDOTS",lineContent) ) {
+				_attrMgr.suggestionsWithDots = 1;
+			}
+			
+			if ( testKeyString("FULLSTRIP",lineContent) ) {
+				_attrMgr.fullStrip = 1;
+			}
+			/* parse in the noSuggest flag */
+			if ( (result=parseStringAttribute("KEEPCASE",lineContent)) != null ){
+				//_attrMgr.keepCase = result.charCodeAt(0);//Depreceated old function, had to be changed for supporting FLAG_LONG
+				_attrMgr.keepCase = decodeFlag(result, this._attrMgr.flagMode);
+				return true;
+			}
+			
+			/*parse in the CIRCUMFIX flag*/
+			if ( (result=parseStringAttribute("CIRCUMFIX",lineContent)) != null ){
+			//	_attrMgr.circumfix =result.charCodeAt(0);//Depreceated old function, had to be changed for supporting FLAG_LONG
+				_attrMgr.circumfix =decodeFlag(result, this._attrMgr.flagMode);
+				return true;
+			}
+			/*parse in the NEEDAFFIX flag*/
+			if ( (result=parseStringAttribute("NEEDAFFIX",lineContent)) != null ){
+				//_attrMgr.needAffix = result.charCodeAt(0); ////Depreceated old function, had to be changed for supporting FLAG_LONG
+				_attrMgr.needAffix = decodeFlag(result, this._attrMgr.flagMode);
+				return true;
+			}
+			
+		return false;
+		}
+		
+		private function parseStringAttribute(key:String, lineContent:String):String {
+			if ( lineContent == null || key == null ) return null;
+			var keyPattern:RegExp = new RegExp("^"+key+"[\\t ]+(.+)$");
+			var parseArr:Array;
+			if ( (parseArr=lineContent.match(keyPattern)) != null ) {
+				return parseArr[1];
+			}		
+			return null;
+		}
+		
+		private function testKeyString(key:String,lineContent:String):Boolean {
+			if ( key == null ) return false;
+			var keyPattern:RegExp = new RegExp("^"+key+".*$");
+			return keyPattern.test( lineContent );
+		}
+
+		private function isCommentOrEmpty(lineContent:String):Boolean{
+			var str:String = lineContent;
+			str = StringUtils.trim( lineContent);
+			if ( str == "" ) return true;
+			if ( testKeyString("#",str) ) return true;
+			return false;
+		}
+
+		private function getEncodingByString(key:String):String {
+			var result:String = "";
+			var keyEncodingTable:Object = {"UTF-8":"utf-8", "ISO8859-1":"iso-8859-1","ISO8859-2":"iso-8859-2","ISO8859-3":"iso-8859-3",
+			"ISO8859-4":"iso-8859-4","ISO8859-5":"iso-8859-5","ISO8859-6":"iso-8859-6","ISO8859-7":"iso-8859-7","ISO8859-8":"iso-8859-8",
+			"ISO8859-9":"iso-8859-9", "ISO8859-15":"iso-8859-15", "KOI8-R":"koi8-r", "KOI8-U":"koi8-u", "microsoft-cp1251":"windows-1251", 
+			"ISCII-DEVANAGARI":"x-iscii-de"};
+			var unsupportedTable:Object = {"ISO8859-10":"", "ISO8859-13":""};
+			if ( key == null ) return InternalConstants.DEFAULTENCODING;
+			
+			if ( keyEncodingTable[key] == undefined || keyEncodingTable[key] == "" ) return result;
+			result = keyEncodingTable[key];
+			
+			return result;
+		}
+
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/utils/MathUtils.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/utils/MathUtils.as b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/utils/MathUtils.as
new file mode 100644
index 0000000..2c79756
--- /dev/null
+++ b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/utils/MathUtils.as
@@ -0,0 +1,66 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+package com.adobe.linguistics.spelling.core.utils
+{
+	public class MathUtils
+	{
+		/**
+		 *  Return next prime; assume N >= 10 
+		 */
+		public static function nextPrime( N:int ):int
+		{
+			var i:int;
+			var continueFlag:Boolean;
+			if( N % 2 == 0 )
+				N++;
+			for( ; ; N += 2 )
+			{
+				continueFlag = false;
+				for( i = 3; i * i <= N; i += 2 )
+					if( N % i == 0 ) {
+						continueFlag = true;    //Sorry about this!
+						break;
+					}
+				if ( continueFlag ) continue;
+				return N;
+			}
+			return -1; // failure branch... it should never happen.
+		}
+
+		/**
+		 * Rounds a number to a specific number of decimal places.
+		 */
+		public static function roundPrecision(number:Number, precision:int=0):Number
+		{
+			var places:Number = Math.pow(10, precision);
+			return Math.round(places * number) / places;
+		}
+
+		/**
+		 * Generates a random number between two number values.
+		 */
+		public static function randomBetween(min:Number=0, max:Number=99999999, precision:int=0):Number
+		{
+			return roundPrecision(Math.random() * (max - min) + min, precision);
+		}
+
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/utils/RefObject.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/utils/RefObject.as b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/utils/RefObject.as
new file mode 100644
index 0000000..ef1a99d
--- /dev/null
+++ b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/utils/RefObject.as
@@ -0,0 +1,36 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+package com.adobe.linguistics.spelling.core.utils
+{
+	public class RefObject
+	{
+		private var _ref:int;
+		public function RefObject(value:int) {
+			this._ref = value;
+		}
+		public function set ref(v:int):void {
+			this._ref = v;
+		}
+		public function get ref():int {
+			return this._ref;
+		}
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/utils/SimpleNumberParser.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/utils/SimpleNumberParser.as b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/utils/SimpleNumberParser.as
new file mode 100644
index 0000000..29bdc4b
--- /dev/null
+++ b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/utils/SimpleNumberParser.as
@@ -0,0 +1,54 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+package com.adobe.linguistics.spelling.core.utils
+{
+	/*
+	 * A simple number parsing class...
+	 */
+	public class SimpleNumberParser
+	{
+		private var numberPattern:RegExp = /^((\d+,?)*\d+)?\.?\d*$|^[-+]?\d+\.?\d*[eE]{1}[-+]?\d+$/;
+		private var negativePattern:RegExp = /^-[ ]?([0-9\.,]+)$|^([0-9\.,]+)[ ]?-$|^\([ ]?([0-9\.,]+)[ ]?\)$/;
+		private var _decimalSymbol:String, _grouppingSymbol:String;
+		
+		public function SimpleNumberParser(decimalSymbol:String=".", grouppingSymbol:String=",")
+		{
+			this._decimalSymbol = decimalSymbol; this._grouppingSymbol = grouppingSymbol;
+		}
+		
+		public function parse(inputString:String):Number {
+			var neg:int = 1;
+			inputString= inputString.split(_decimalSymbol).join("."); 
+			inputString= inputString.split(_grouppingSymbol).join(",");
+			inputString= StringUtils.trim(inputString);
+			if ( negativePattern.test(inputString) ) {
+				var result:Array = inputString.match( negativePattern );
+				for ( var i:int = 1; i < result.length; i++ )
+					if ( result[i]!= undefined ) break;
+				inputString= result[i];
+				neg=-1;
+			}
+			if ( !numberPattern.test( inputString ) ) return NaN;
+			inputString= inputString.split(_grouppingSymbol).join(""); 
+			return (new Number(inputString))*neg;
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/utils/SquigglyDictionaryLoader.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/utils/SquigglyDictionaryLoader.as b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/utils/SquigglyDictionaryLoader.as
new file mode 100644
index 0000000..e97000c
--- /dev/null
+++ b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/utils/SquigglyDictionaryLoader.as
@@ -0,0 +1,369 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+package com.adobe.linguistics.spelling.core.utils
+{
+	import com.adobe.linguistics.spelling.core.LinguisticRule;
+	import com.adobe.linguistics.spelling.core.SquigglyDictionary;
+	import com.adobe.linguistics.spelling.core.env.InternalConstants;
+	import com.adobe.linguistics.spelling.core.error.*;
+	import com.adobe.linguistics.spelling.core.logging.*;
+	
+	import flash.errors.IllegalOperationError;
+	import flash.events.ErrorEvent;
+	import flash.events.Event;
+	import flash.events.EventDispatcher;
+	import flash.events.IOErrorEvent;
+	import flash.events.SecurityErrorEvent;
+	import flash.net.URLRequest;
+	import flash.utils.*;
+	public class SquigglyDictionaryLoader extends EventDispatcher
+	{
+		private var _dict:SquigglyDictionary;
+		private var _dictionaryPath:String;
+		private var _attrMgr:LinguisticRule;
+
+
+		private var snp:SimpleNumberParser = new SimpleNumberParser();
+
+		//setup logger for sending message.
+		private var className:String = flash.utils.getQualifiedClassName(this).split("::").join(".");
+		private var logger:ILogger = Log.getLogger( className );
+		//vars shifted up
+        private var wordList:Array;
+		private var dp:String;//description;
+		private var ts:String;
+		private var ap:String;
+		private var flags:String;
+		
+		private var dpPattern1:RegExp; 	//patterns to split rule line into fileds according to new morphological field separator
+		private var dpPattern2:RegExp;	//patterns to split rule line into fileds according to old morphological field separator
+		private var tsPattern1:RegExp;	//extracts the affix string
+		private var strArr:Array;
+		private var lineContent:String;
+		private var totalPart:int;
+		private var delay:int;
+		//vars shifted up
+		
+		//variables added to accomodate property
+		private var _enableDictionarySplit:Boolean;
+		private var _wordsPerDictionarySplit:int;
+		
+		public function SquigglyDictionaryLoader()
+		{
+			_dict = null;
+			_dictionaryPath = null;
+			_attrMgr = null;
+			dpPattern1= /^(.+)[ \t]+.{2}:(.+)$/ ; 	//patterns to split rule line into fileds according to new morphological field separator
+			dpPattern2= /^(.+)[\t]{1}(.+)$/ ; 		//patterns to split rule line into fileds according to old morphological field separator
+			tsPattern1= /^(.*[^\\])\/(.+)$/ ; 
+			delay=InternalConstants.DICT_LOAD_DELAY; //the timeout period between two parts 10 ms
+		}
+		
+		public function set linguisticRule(value:LinguisticRule):void {
+			this._attrMgr = value;
+		}
+		
+		public function get linguisticRule():LinguisticRule {
+			return this._attrMgr;
+		}
+		
+		public function load(dictionaryURL:String,enableDictionarySplit:Boolean,wordsPerDictionarySplit:int):void {
+			if ( dictionaryURL == null ) {
+				throw new IllegalOperationError("load function did not receive two valid URLs.");
+			}
+			_dictionaryPath = dictionaryURL;
+			_enableDictionarySplit=enableDictionarySplit;
+			_wordsPerDictionarySplit=wordsPerDictionarySplit;
+			var request:URLRequest = new URLRequest( _dictionaryPath );
+			var dloader:DictionaryLoader = new DictionaryLoader(request);
+			dloader.addEventListener(Event.COMPLETE,loadDictionaryComplete);
+			dloader.addEventListener(IOErrorEvent.IO_ERROR,handleError);
+			dloader.addEventListener(SecurityErrorEvent.SECURITY_ERROR,handleError);
+			
+		}
+
+		//Private method to dispatch an error event.
+		private function handleError(evt:Event):void {
+			bounceEvent(evt);
+		}
+		private function bounceEvent(evt:Event):void {
+			dispatchEvent(evt.clone());
+		}
+
+
+		public function get squigglyDictionary():SquigglyDictionary {
+			return  _dict;
+		}
+		
+		private function loadDictionaryComplete(evt:Event):void {
+			_dict = new SquigglyDictionary(_attrMgr);
+
+			var bytes:ByteArray = evt.target.data;
+			//trace("load complete handler: "+getTimer()+" "+bytes.bytesAvailable);
+			var charSet:String;
+			if ( _attrMgr ) {
+				charSet = _attrMgr.encoding;
+			}else {
+				charSet = InternalConstants.DEFAULTENCODING;
+			}
+			var str:String = 	bytes.readMultiByte(bytes.length, charSet);
+			//trace("Bytes read at: "+getTimer());
+
+			/*
+			In DOS, a line break is a single '\n'.
+			In Unix, a line break is the sequence '\r\n'.
+			In MAC, a line break is a single '\r'.
+			Correct me if I'm wrong.
+			so step 1:
+			replace "\r\n" with "\n"
+			step 2:
+			replace "\r" with "\n";
+			finally ,we get "\n" line seperator.
+			*/
+			str=str.split("\r\n").join("\n");
+			str=str.split("\r").join("\n");
+			wordList= str.split("\n");
+			//bof of parsing the text.
+			//trace("Wordlist length: "+wordList.length);
+			if(wordList== null ) {
+				logger.error("Dictionary File[{0}] Operation[parsing] Error[corrupt data]",this._dictionaryPath);
+			}
+			if(wordList.length== 1){
+				logger.error("Dictionary File[{0}] Operation[parsing] Error[corrupt data]",this._dictionaryPath );
+//				logger.error("Dictionary File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
+			} 
+			//fix for 	Bug #: 	2855795 now if greater load to a max of wordList.length
+			if(wordList.length<this._wordsPerDictionarySplit){
+				this._wordsPerDictionarySplit=wordList.length;				
+			}
+			
+			/* remove byte order mark */
+			if ( wordList[0].match(new RegExp("^\xEF\xBB\xBF[.]+$") ) ) wordList[0]=wordList[0].substr(3);
+			var snp:SimpleNumberParser = new SimpleNumberParser();
+			/* get the table size */
+			var tablesize:int = snp.parse(wordList[0]);
+			if (tablesize == 0) throw new ContentError(ErrorTable.CONTENTPARSINGERROR_MSG,ErrorTable.CONTENTPARSINGERROR_ID);
+			
+			//trace("Before parsing: "+getTimer());
+			
+			if(this._enableDictionarySplit ){
+				setTimeout(loadWithTimeouts,1,1);//go to loadWithTimeouts
+			}
+			else
+			{	
+				setTimeout(loadWithoutTimeouts,1,1);//directly go to finish. This will cause words to load from 1 to wordList.length
+			}
+			
+		}
+	
+		private function loadWithTimeouts(part:int):void	{
+			for( var line:int = part; line<part+(this._wordsPerDictionarySplit)-1; ++line) { 
+				lineContent = wordList[line];
+				/* : is the new morphological field separator */
+				if ( (strArr = lineContent.match(dpPattern1)) != null ) {
+					dp=strArr[2];
+					ts = strArr[1];
+				/* tabulator is the old morphological field separator */
+				}else if ( (strArr = lineContent.match(dpPattern2)) != null ) {
+					ts = strArr[1];
+					dp=strArr[2];
+				}else {
+					ts = lineContent;//so ts has the word and dp has morphological desc
+					dp = null;
+				}
+				
+				ts= StringUtils.trim(ts);
+				if( dp != null ) dp= StringUtils.trim(dp);
+				// eof: split each line into word and morphological description
+
+				// bof:split each line into word and affix char strings
+				/*
+				"\/" signs slash in words (not affix separator)
+				"/" at beginning of the line is word character (not affix separator)
+				*/
+				if ( (strArr = ts.match(tsPattern1))!= null ) {
+					ap = strArr[2]; 
+					ts = strArr[1];
+					ts = ts.split('\\/').join('/');	/* replace "\/" with "/" */
+					if(_attrMgr){
+						if(_attrMgr.aliasfTable && _attrMgr.aliasfTable.length>0)
+						{ 
+						flags=_attrMgr.aliasfTable[parseInt(ap,10)-1];
+						}
+						else
+						{
+						flags = decodeFlags( ap, _attrMgr.flagMode);
+						}
+					}
+/*	
+// Todo, will remove this comments after we have complex-affix support and compound-word support.
+            if (aliasf) {
+                int index = atoi(ap + 1);
+                al = get_aliasf(index, &flags, dict);
+                if (!al) {
+                    HUNSPELL_WARNING(stderr, "error: line %d: bad flag vector alias\n", dict->getlinenum());
+                    *ap = '\0';
+                }
+            } else {
+                al = decode_flags(&flags, ap + 1, dict);
+                flag_qsort(flags, 0, al);
+            }
+*/
+				}else {
+					ap=null;
+					flags=null;
+				}
+				// eof:split each line into word and affix char strings
+				//trace(line+" WORD:"+ts);
+				_dict.addWord( ts, flags, dp );			
+		}
+				
+				if(line+(this._wordsPerDictionarySplit)>=wordList.length)//Last part reached.
+				{
+					setTimeout(loadWithoutTimeouts,delay,line);//the last part left which is less than wordsPerDictionarySplit is loaded w/o Timeouts
+				}
+				else
+				{
+				setTimeout(loadWithTimeouts,delay, line);//get delay of 10 ms
+				}
+			// } //loop ends
+			//eof of parsing the text.
+			//function ends here
+		}
+		
+		/* Squiggly function to end Asynchronous looping
+		*
+		*
+		*/
+		private function loadWithoutTimeouts(line:int):void
+		{
+			for( ; line<wordList.length; ++line) {
+				
+				// bof: split each line into word and morphological description 
+				lineContent = wordList[line];
+				/* : is the new morphological field separator */
+				if ( (strArr = lineContent.match(dpPattern1)) != null ) {
+					dp=strArr[2];
+					ts = strArr[1];
+					/* tabulator is the old morphological field separator */
+				}else if ( (strArr = lineContent.match(dpPattern2)) != null ) {
+					ts = strArr[1];
+					dp=strArr[2];
+				}else {
+					ts = lineContent;
+					dp = null;
+				}
+				ts= StringUtils.trim(ts);
+				if( dp != null ) dp= StringUtils.trim(dp);
+				// eof: split each line into word and morphological description
+				
+				// bof:split each line into word and affix char strings
+				/*
+				"\/" signs slash in words (not affix separator)
+				"/" at beginning of the line is word character (not affix separator)
+				*/
+				if ( (strArr = ts.match(tsPattern1))!= null ) {
+					ap = strArr[2]; 
+					ts = strArr[1];
+					ts = ts.split('\\/').join('/');	/* replace "\/" with "/" */
+					if(_attrMgr)
+					{
+						if(_attrMgr.aliasfTable && _attrMgr.aliasfTable.length>0)
+						{
+						flags=_attrMgr.aliasfTable[parseInt(ap,10)-1];
+						}
+						else
+						{
+						flags = decodeFlags( ap, _attrMgr.flagMode);
+						}
+					}
+					/*
+					// Todo, will remove this comments after we have complex-affix support and compound-word support.
+					if (aliasf) {
+					int index = atoi(ap + 1);
+					al = get_aliasf(index, &flags, dict);
+					if (!al) {
+					HUNSPELL_WARNING(stderr, "error: line %d: bad flag vector alias\n", dict->getlinenum());
+					*ap = '\0';
+					}
+					} else {
+					al = decode_flags(&flags, ap + 1, dict);
+					flag_qsort(flags, 0, al);
+					}
+					*/
+				}else {
+					ap=null;
+					flags=null;
+				}
+				// eof:split each line into word and affix char strings
+				//trace("WORD2:"+ts);
+				_dict.addWord( ts, flags, dp );			
+			}
+			//trace("After Parsing: "+getTimer());
+			logger.info("Dictionary File[{0}] Operation[parsing] Total Lines:{1}, Unrecognized Lines:{2}", this._dictionaryPath ,wordList.length.toString(), 0  );
+			
+			dispatchEvent(new Event(Event.COMPLETE));
+		}
+		
+		
+
+		/*
+		 * Squiggly is using utf16 by default...
+		 * for utf8 string conversion,we need extra work later.
+		 * we might also need a better toString() fuction for Flag_long and flag_num mode.
+		 */
+		private function decodeFlags(flags:String, flagMode:int):String {
+			var result:String="";
+			var i:int;
+			switch ( flagMode )  {
+				case InternalConstants.FLAG_LONG:
+				if ( (flags.length)%2 == 1 ) {
+					logger.error("Dictionary File[{0}] Operation[parsing] Error[decoding error] target flags:{1}",this._dictionaryPath , flags );
+					throw new ContentError(ErrorTable.CONTENTPARSINGERROR_MSG,ErrorTable.CONTENTPARSINGERROR_ID);
+				}
+				var len:int = flags.length/2;
+				for ( i = 0; i< len; ++i ) {
+					result +=  String.fromCharCode( ((flags.charCodeAt((i * 2))) << 8) + (flags.charCodeAt((i * 2 + 1))) );
+				}
+				break;
+				case InternalConstants.FLAG_NUM:
+				var strArr:Array = flags.split(",");
+				for ( i = 0;i< strArr.length;++i) {
+					var num:Number = snp.parse(strArr[i]);
+					if ( num >= InternalConstants.DEFAULTFLAGS ) {
+						logger.error("Dictionary File[{0}] Operation[parsing] Error[decoding error] target flags:{1}",this._dictionaryPath , flags );
+					}
+					result += String.fromCharCode(num);
+				}
+				break;
+				case InternalConstants.FLAG_UNI:
+				result = flags;
+				break;
+				default:
+				result = flags;
+				break;
+			}
+			return result;
+		}
+
+
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/utils/StringUtils.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/utils/StringUtils.as b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/utils/StringUtils.as
new file mode 100644
index 0000000..63dba22
--- /dev/null
+++ b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/utils/StringUtils.as
@@ -0,0 +1,333 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+package com.adobe.linguistics.spelling.core.utils
+{
+	import com.adobe.linguistics.spelling.core.env.InternalConstants;
+	public final class StringUtils
+	{
+		
+	    public static function isWhiteSpace( ch:Number ):Boolean {
+	    	// '\r' || '\n' || '\f' || '\t' || ' ' 
+	    	
+	    	return ch == 32 || 
+	    	ch == 32 || 
+	    	ch == 32 || 
+	    	ch == 32 || 
+	    	ch == 32; 
+	    }
+	    public static function isWhiteSpace2( ch:String ):Boolean {
+	    	// '\r' || '\n' || '\f' || '\t' || ' ' 
+	    	
+	    	return ch == '\r' || 
+	    	ch == '\n' || 
+	    	ch == '\f' || 
+	    	ch == '\t' || 
+	    	ch == ' '; 
+	    }
+    
+	    public static function trim( original:String ):String {
+	    	var i:int;
+	    	var start:int=0, end:int=original.length;
+	    	for ( i=0; (i< original.length) && isWhiteSpace(original.charCodeAt(i)) ; ++i ) {
+	    		start++;
+	    	}
+	    	for ( i=end-1; (i>=0) && isWhiteSpace(original.charCodeAt(i)) ; --i) {
+	    		end--;
+	    	}
+	    	return original.substring(start,end);
+	    }
+	    
+		/*
+		 * Deprecated function for now...
+		 * History: 
+		 *          A pre-version of implementation for error detection. After I optimized the code for performance,
+		 *          I drop this function by that time, but you know performance meassuring is a tricky problem... 
+		 * ToDo: Need a revisit when we implementing complex-affix support and compound-word support.
+		 */
+	    public static function trim2( original:String ):String {
+
+	      var characters:Array = original.split( "" );
+	      for ( var i:int = 0; i < characters.length; i++ ) {
+	        if ( isWhiteSpace2( characters[i] ) ) {
+	          characters.splice( i, 1 );
+	          i--;
+	        } else {
+	          break;
+	        }
+	      }
+	      for ( i = characters.length-1; i >= 0; i-- ) {
+	      	if (isWhiteSpace2( characters[i] )) {
+	      		characters.splice( i, 1 );
+	      	}else {
+	      		break;
+	      	}
+	      }
+	      return characters.join("");
+	    }
+	    
+	    /*
+	     * ideally, this function shouldn't be here, we should always get a word without any ill-formed character. 
+	     * ToDo, will create a normalization class in next release....
+	     * Need revisit this function.
+	     */
+	    public static var curlyQuotePattern:RegExp = /[‘’]/;
+	    public static function normalize( value:String ):String {
+	    	var result:String;
+	    	if ( (value.indexOf("‘") == -1) && (value.indexOf("’") == -1) ) return value;
+	    	result = value.replace(curlyQuotePattern,"'");
+	    	return result;
+	    	
+	    }
+	    
+		public static function reverseString(str:String):String {
+			var sTmp:String="";
+			for ( var i:int= str.length -1 ; i >=0 ; i-- ) 
+				sTmp+=str.charAt(i);
+			return sTmp;
+		}
+		
+	    public static function sort(str:String, descending:Boolean= false):String {
+	    	if ( (str==null) || (str.length<=1) ) 
+	    		return str;
+	    	var chars:Array = str.split("");
+	    	if ( descending )
+	    		chars.sort(Array.DESCENDING);
+	    	else
+	    		chars.sort();
+	    	return chars.join("");	
+	    }
+
+		public static function removeIgnoredChars(word:String, ignoreChars:String ) :String {
+			if ( ignoreChars == null || word == null ) return word;
+			for ( var i:int = 0; i< ignoreChars.length ; ++i ) {
+				word.split(ignoreChars[i]).join("");
+			}
+			return word;
+		}
+
+		public static function makeInitCap(word:String):String {
+			return word.charAt(0).toLocaleUpperCase() + word.substr(1);
+		}
+
+		/*
+		 * Deprecated function for now...
+		 * History: 
+		 *          A pre-version of implementation for error detection. After I optimized the code for performance,
+		 *          I drop this function by that time, but you know performance meassuring is a tricky problem... 
+		 * ToDo: Need a revisit when we implementing complex-affix support and compound-word support.
+		 */
+	    public static function getCapType1(word:String):int {
+			// now determine the capitalization type of the first nl letters
+			var ncap:int = 0;
+			var nneutral:int = 0;
+			var firstcap:int = 0;
+			// Potential improvment 1:
+			// It could be updated to user gslib StringUtils class in the future( after we have argo player 10.1 public). It is better for locale correction.
+			// at that time, we should consider about german language sharp SS -> beta case... the only case for changing the string length.
+			// Potential improvement 2:
+			// Using a hard code mapping table to convert the string to lowercase or uppercase. It is better for perfermance...
+			
+			if ( word == null || word=="" ) return InternalConstants.NOCAP;
+
+			var lowerStr:String = word.toLocaleLowerCase();
+			var upperStr:String = word.toLocaleUpperCase();
+
+			for ( var i:int = 0; i < word.length; ++i ) {
+				if ( upperStr.charCodeAt(i) == lowerStr.charCodeAt(i) ) 
+					nneutral++;
+				else {
+					if ( word.charCodeAt(i) == upperStr.charCodeAt(i) )
+						ncap++;
+				}
+			}
+			
+			if (ncap) {
+				if ( word.charCodeAt(0) == upperStr.charCodeAt(0) && upperStr.charCodeAt(0) != lowerStr.charCodeAt(0) )
+					firstcap = 1;
+			}
+
+			// now finally set the captype
+			if (ncap == 0) {
+				return InternalConstants.NOCAP;
+			} else if ((ncap == 1) && firstcap) {
+				return InternalConstants.INITCAP;
+			} else if ((ncap == word.length) || ((ncap + nneutral) == word.length)) {
+				return InternalConstants.ALLCAP;
+			} else if ((ncap > 1) && firstcap) {
+				return InternalConstants.HUHINITCAP;
+			}
+			return InternalConstants.HUHCAP;			
+	    }
+
+	    public static function getCapType(word:String):int {
+			// now determine the capitalization type of the first nl letters
+			var ncap:int = 0;
+			var nneutral:int = 0;
+			var firstcap:int = 0;
+			// Potential improvment 1:
+			// It could be updated to user gslib StringUtils class in the future( after we have argo player 10.1 public). It is better for locale correction.
+			// at that time, we should consider about german language sharp SS -> beta case... the only case for changing the string length.
+			// Potential improvement 2:
+			// Using a hard code mapping table to convert the string to lowercase or uppercase. It is better for perfermance...
+			
+			if ( word == null || word=="" ) return InternalConstants.NOCAP;
+			var lowerStr:String = word.toLocaleLowerCase();
+			var upperStr:String = word.toLocaleUpperCase();
+			//trying to find if non word characters are present
+			/*var nonWordCharRegex:RegExp = /\b\w+\b/;
+			var resNonWord:Array = word.match( nonWordCharRegex);
+			if(word==resNonWord[0]) then return 
+			trace("the word: "+resNonWord[0]);
+			trace("cosdfasdfnd: "+(word==resNonWord[0])+" Word "+word);*/
+			//var testWord:String= word;
+			
+			//var nonWordIndex:int= word.search(containsNonWordCharRegex);
+			//trace("**NonwordIndex : "+nonWordIndex+" Word: "+word);
+			//if(nonWordIndex!=-1) 
+			
+			if ( word == lowerStr ) return InternalConstants.NOCAP;
+			if ( word == upperStr ) return InternalConstants.ALLCAP;
+			if ( upperStr == lowerStr ) return InternalConstants.NOCAP;
+			if ( word.charCodeAt(0) == upperStr.charCodeAt(0) && upperStr.charCodeAt(0) != lowerStr.charCodeAt(0) ) {
+				ncap = 1;
+				for ( var i:int = 1; i < word.length; ++i ) {
+					if ( word.charCodeAt(i) == upperStr.charCodeAt(i) && upperStr.charCodeAt(i) != lowerStr.charCodeAt(i) ) {
+						ncap++;
+						break;
+					}
+				}
+				if ( ncap == 1 )
+					return InternalConstants.INITCAP;
+				else 
+					return InternalConstants.HUHINITCAP;
+			}else {
+		    	return InternalConstants.HUHCAP;
+			}
+	
+	    }
+	    
+		/*
+		 * Deprecated function for now...
+		 * History: 
+		 *          A pre-version of implementation for error correction. After I optimized the code for performance,
+		 *          I drop this function by that time, but you know performance meassuring is a tricky problem... 
+		 * ToDo: Need a revisit when we implementing complex-affix support and compound-word support.
+		 */
+	    static public function lcs1(a:String, b:String):String {
+	    	var aSub:String = a.substr(0,a.length-1);
+	    	var bSub:String = b.substr(0, b.length -1 );
+	    	if ( a.length == 0 || b.length == 0 ) {
+	    		return "";
+	    	}else if ( a.charAt(a.length-1) == b.charAt(b.length-1) ) {
+	    		return lcs1(aSub,bSub) + a.charAt(a.length-1);
+	    	}else {
+	    		var x:String = lcs1(a,bSub);
+	    		var y:String = lcs1(aSub,b);
+	    		return (x.length > y.length) ? x: y;
+	    	}
+	    }
+
+		/*
+		 * Longest common subsequence problem
+		 * From Wikipedia, the free encyclopedia
+		 * Jump to: navigation, search
+		 * Not to be confused with longest common substring problem.
+		 * The longest common subsequence (LCS) problem is to find the longest subsequence 
+		 * common to all sequences in a set of sequences (often just two). It is a classic computer 
+		 * science problem, the basis of diff (a file comparison program that outputs the differences 
+		 * between two files), and has applications in bioinformatics.
+		 * 
+		 * URL: http://en.wikipedia.org/wiki/Longest_common_subsequence_problem
+		 */
+		static public function lcs(a:String, b:String):String {
+			var lengths:Array = new Array(a.length+1);
+			var i:int,j:int, x:int,y:int;
+			for ( i = 0 ; i< a.length+1; ++i ) {
+				lengths[i] = new Array(b.length+1);
+				for ( j=0; j< b.length+1; ++j) 
+					lengths[i][j]=0;
+			}
+			// row 0 and column 0 are initialized to 0 already
+			for ( i=0;i< a.length; ++i ) 
+				for( j=0;j<b.length; ++j)
+					if ( a.charAt(i) == b.charAt(j) )
+						lengths[i+1][j+1] = lengths[i][j] + 1;
+					else
+						 lengths[i+1][j+1] = Math.max(lengths[i+1][j], lengths[i][j+1]);
+			// read the substring out from the matrix
+			var res:String="";
+			for ( x = a.length,y=b.length; x!=0 && y!=0; ) {
+				if (lengths[x][y] == lengths[x-1][y])
+					x--;
+				else if ( lengths[x][y] == lengths[x][y-1] )
+					y--;
+				else {
+					res +=a.charAt(x-1);
+					x--;
+					y--;
+				}
+			}
+			return res.split("").reverse().join("");
+		}
+
+	    
+	    static public function lcslen( a:String, b:String) :int {
+	    	return lcs(a,b).length;
+	    } 
+	    
+	    static public function commonCharacterPositions( a:String, b:String, refObj:RefObject):int {
+			var num:int = 0, i:int;
+			var diff:int = 0;
+			var diffpos:Array = new Array(2);
+			refObj.ref  = 0;
+	    	b = b.toLocaleLowerCase();
+	    	for ( i =0; (i < a.length) && ( i<b.length); ++i ) {
+	    		if ( a.charAt(i) == b.charAt(i) ) {
+	    			num++;
+	    		}else {
+	    			if ( diff < 2) diffpos[diff] = i;
+	    			diff++;
+	    		}
+	    	}
+	    	if ( (diff == 2) && ( i=(a.length-1) ) && ( i==(b.length-1)) && (a.charCodeAt(diffpos[0]) == b.charCodeAt(diffpos[1])) && ( a.charCodeAt( diffpos[1]) == b.charCodeAt(diffpos[0]) ))
+	    		refObj.ref = 1;
+	    	
+	    	return num;
+	    }
+	    
+		/*
+		* To find if the Numbers are present in the word
+		* 
+		* returns true if hasNumber else returns false
+		*/
+		public static function getHasNumber(word:String):Boolean {
+			var i:int;
+			for ( i=0 ; i < word.length ; ++i ) {
+				if ( (word.charCodeAt(i) <= 57 ) && ( word.charCodeAt(i) >= 48) ) { // '0' to '9'
+					return true;
+				}
+			}
+			return false;
+		}
+	}
+}
+
+

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/utils/SuggestionsResult.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/utils/SuggestionsResult.as b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/utils/SuggestionsResult.as
new file mode 100644
index 0000000..8a43921
--- /dev/null
+++ b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/utils/SuggestionsResult.as
@@ -0,0 +1,142 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+
+package com.adobe.linguistics.spelling.core.utils
+{
+	public class SuggestionsResult
+	{
+		private var _myHeap:Array;
+		private var _count:uint=0;
+		private var _size:uint=1;
+		private var __compare:Function;
+		public function SuggestionsResult(buffersize:uint=100, compare:Function = null)
+		{
+			_size=buffersize;
+			_myHeap= new Array(_size+1);
+			_count=0;
+			if (compare == null)
+				__compare = function(a:int, b:int):int { return a - b; };
+			else
+				__compare = compare;
+		}
+		public function insert(obj:*):Boolean {
+			_myHeap[++_count]=obj;
+			return true;
+		}
+		public function find(obj:*):Boolean {
+			for (var i:int = 1; i <= _count; i++)
+			{
+				if (_myHeap[i] === obj)
+					return true;
+			}
+			return false;
+		}
+
+		public function get front():*
+		{
+			return this._myHeap[1];
+		}
+
+		public function get maxSize():int
+		{
+			return this._size;
+		}
+
+		public function isEmpty():Boolean
+		{
+			if (_count==0) {
+				return true;
+			}else {
+				return false;
+			}
+			
+		}
+		
+		public function clear():void
+		{
+			_myHeap = new Array(_size);
+			_count = 0;
+		}
+		
+		public function get size():uint {
+			return this._count;
+		}
+		
+		public function dump():String {
+			var s:String = "Suggestions Result\n{\n";
+			var k:int = _count + 1;
+			for (var i:int = 1; i < k; i++)
+				s += "\t" + _myHeap[i] + "\n";
+			s += "\n}";
+			return s;
+		}
+		
+		public function toArray():Array {
+			return _myHeap.slice(1,_count+1);
+		}
+		
+		
+		public function get data():Array {
+			return this._myHeap;
+		}
+		
+		public function buildheap():void {
+			if(this.size<2) {
+				return;
+			}
+			for ( var i:int=this.size/2;i>0;i--) {
+				minheapify(i);
+			}
+		}
+		
+		public function updateFront():void {
+			minheapify(1);
+		}
+		
+		private function minheapify(index:uint):void {
+			var i:int = index;
+			var child:int = i << 1;
+			var tmp:* = _myHeap[i];
+			var v:*;
+			
+			while (child <= _count)
+			{
+				if (child < _count - 1)
+				{
+					if (__compare(_myHeap[child], _myHeap[int(child + 1)]) > 0)
+						child++;
+				}
+				v = _myHeap[child];
+				if (__compare(tmp, v) > 0)
+				{
+					_myHeap[i] = v;
+					i = child;
+					child <<= 1;
+				}
+				else break;
+			}
+			_myHeap[i] = tmp;
+
+		}	
+		
+	}
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/utils/Token.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/utils/Token.as b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/utils/Token.as
new file mode 100644
index 0000000..52e2c8a
--- /dev/null
+++ b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/utils/Token.as
@@ -0,0 +1,47 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+
+
+
+package com.adobe.linguistics.spelling.utils
+{
+	public class Token
+	{
+		private var _first:uint;
+		private var _last:uint;
+		
+		public function Token(inFirst:uint, inLast:uint)
+		{
+			_first = inFirst;
+			_last = inLast;
+		}
+		
+		public function get first():uint
+		{
+			return _first;
+		}
+		
+		public function get last():uint
+		{
+			return _last;
+		}
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/utils/Tokenizer.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/utils/Tokenizer.as b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/utils/Tokenizer.as
new file mode 100644
index 0000000..6ccbd8a
--- /dev/null
+++ b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/utils/Tokenizer.as
@@ -0,0 +1,96 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+
+
+
+package com.adobe.linguistics.spelling.utils
+{
+
+	import com.adobe.linguistics.spelling.utils.Token;
+		
+	public class Tokenizer
+	{
+		private var _data:String;
+		private var _current:uint;
+
+		public function Tokenizer(inText:String)
+		{
+			_data = inText;
+			_current = 0;
+		}
+		public function next():Token
+		{
+			var first:uint;
+			var last:uint;
+			
+			if (_current==_data.length) return null;
+			while (isSeparator(_data.charAt(_current))) {
+				_current++;
+				if (_current==_data.length) return null;
+			}
+			first = _current;
+			while (!isSeparator(_data.charAt(_current))) {
+				_current++;
+				if (_current==_data.length) break;
+			}
+			last = _current;
+			
+			// Special handling for single quote
+			var charFirst:Number = _data.charCodeAt(first);
+			var charLast:Number = _data.charCodeAt(last-1);
+			if ((charFirst == 39) || (charFirst == 0x2018) || (charFirst == 0x2019)) first++;
+			if ((charLast == 39) || (charLast == 0x2018) || (charLast == 0x2019)) last--;
+			
+			return new Token(first, last);	
+		}
+		
+		private static var allValidChars:Array = [
+			{startingChar:65, endingChar:90}, /*Basic Latin bof */
+			{startingChar:97, endingChar:122},/*Basic Latin eof */
+			{startingChar:39, endingChar:39}, /* "'" character*/
+			{startingChar:0x2018, endingChar:0x2019}, /* "‘" and "’" character*/
+			{startingChar:192, endingChar:214},/* Latin-1 supplement  bof */
+			{startingChar:216, endingChar:246},
+			{startingChar:248, endingChar:255},/* Latin-1 supplement  eof */
+			{startingChar:256, endingChar:383},/* Lating Extended-A bof-eof    European Latin*/
+			{startingChar:384, endingChar:447}, /* Latin extended-B bof-eof */
+			{startingChar:48, endingChar:57}, /* number */
+			{startingChar:536, endingChar:537} /* "ş" character, for romanian */
+		];
+		private static function isValidCharacter( inChar:int ) :Boolean {
+			for ( var i:int = 0; i < allValidChars.length; ++i ) {
+				if ( (inChar >= allValidChars[i].startingChar) && (inChar <= allValidChars[i].endingChar) )
+					return true; 
+			}
+			return false;
+		} 
+		
+		public static function isSeparator(inChar:String):Boolean
+		{	
+			var ccode:Number = inChar.charCodeAt();
+			if ( isValidCharacter( ccode ) )
+				return false;
+			return true;
+		}
+
+	}
+	
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/utils/WordList.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/utils/WordList.as b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/utils/WordList.as
new file mode 100644
index 0000000..358036b
--- /dev/null
+++ b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/utils/WordList.as
@@ -0,0 +1,120 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+
+
+
+package com.adobe.linguistics.spelling.utils
+{
+	[RemoteClass]
+	public class WordList
+	{
+		private var _words:Array;
+		private var _sorted:Boolean;  // TODO: Shouldn't be always sorted?
+
+		public function WordList(wordsList:Array=null)
+		{
+			if(wordsList!=null) {
+				_words=wordsList;	
+			}else {
+				_words=new Array();
+			}
+			
+		}
+		
+		public function toArray():Array {
+			return this._words;
+		}
+
+		public function set data(inData:Array):void {
+			this._words = inData;
+		}
+		
+		public function get data():Array {
+			return this._words;
+		}
+		
+		public function insert(value:String):Boolean {
+			if( _words.length==0 ) {
+				_words.push(value)
+				return true;
+			}
+			var low:uint= 0;
+			var high:uint= _words.length-1;
+			var middle:uint= (low+high)/2;
+			while (low<high) {
+				if(_words[middle]<value) {
+					low=middle+1;
+				}else {
+					high=middle;
+				}
+				middle= (low+high)/2;
+			}
+			if( (low <= _words.length-1) && (_words[low]!=value) ) {
+				var pos:uint=_words[low]>value?low:low+1;
+				_words.splice(pos,0,value);
+				return true;
+			}else {
+				return false;
+			}
+			_words.push(value);
+			return true;
+		}
+		
+		public function remove(value:String):Boolean {
+			var pos:int= lookup(value);
+			if( pos!= -1 ) {
+				_words.splice(pos,1);
+				return true;
+			}else {
+				return false;
+			}
+		}
+		
+		//binary search to find the word.
+		public function lookup(value:String):int {
+			if(_words.length==0) {
+				return -1;
+			}
+			var low:uint= 0;
+			var high:uint= _words.length-1;
+			var middle:uint= (low+high)/2;
+			while (low<high) {
+				if(_words[middle]<value) {
+					low=middle+1;
+				}else {
+					high=middle;
+				}
+				middle= (low+high)/2;
+			}
+			if( (low <= _words.length-1) && (_words[low]==value) ) {
+				return low;
+			}else {
+				return -1;
+			}
+			
+		}
+		
+		public function mergeWordLists(list1:WordList,list2:WordList):WordList {
+			return null;
+		}
+
+	}
+}
\ No newline at end of file


[30/50] [abbrv] remove Adobe from directory names (package name still contains Adobe)

Posted by jm...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/utils/LinguisticRuleLoader.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/utils/LinguisticRuleLoader.as b/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/utils/LinguisticRuleLoader.as
deleted file mode 100644
index 1b5bac9..0000000
--- a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/utils/LinguisticRuleLoader.as
+++ /dev/null
@@ -1,977 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-
-package com.adobe.linguistics.spelling.core.utils
-{
-	import com.adobe.linguistics.spelling.core.LinguisticRule;
-	import com.adobe.linguistics.spelling.core.env.InternalConstants;
-	import com.adobe.linguistics.spelling.core.error.*;
-	import com.adobe.linguistics.spelling.core.logging.*;
-	
-	import flash.errors.IllegalOperationError;
-	import flash.events.ErrorEvent;
-	import flash.events.Event;
-	import flash.events.EventDispatcher;
-	import flash.events.IOErrorEvent;
-	import flash.events.SecurityErrorEvent;
-	import flash.net.URLRequest;
-	import flash.utils.ByteArray;
-
-	public class LinguisticRuleLoader extends EventDispatcher
-	{
-		private var _attrMgr:LinguisticRule;
-		private var _rulePath:String;
-		private var snp:SimpleNumberParser = new SimpleNumberParser();
-		
-		private var unrecognizedLines:int = 0;
-
-		
-		//setup logger for sending message.
-		private var className:String = flash.utils.getQualifiedClassName(this).split("::").join(".");
-		private var logger:ILogger = Log.getLogger( className );
-
-		public function LinguisticRuleLoader()
-		{
-			init();
-		}
-		
-		private function init():void {
-			_attrMgr = null;
-			_rulePath = null ;
-			unrecognizedLines = 0;
-			
-		}
-
-		public function load(ruleURL:String):void {
-			if ( ruleURL == null) {
-				throw new IllegalOperationError("Linguistics rule load function received an invalid URL.");
-			}
-			if ( this._attrMgr ) {
-				logger.warn("You already did call the load function muliti-times, The orginal linguistic data will be overiden." );
-				init();
-			}
-			_rulePath = ruleURL;
-			var request:URLRequest = new URLRequest( _rulePath );
-			var dloader:DictionaryLoader = new DictionaryLoader(request);
-			dloader.addEventListener(Event.COMPLETE,loadRuleComplete);
-			dloader.addEventListener(IOErrorEvent.IO_ERROR,handleError);
-			dloader.addEventListener(SecurityErrorEvent.SECURITY_ERROR,handleError);
-		}
-		//Private method to dispatch an error event.
-		private function handleError(evt:Event):void {
-			bounceEvent(evt);
-		}
-		private function bounceEvent(evt:Event):void {
-			dispatchEvent(evt.clone());
-		}
-
-		public function get linguisticRule():LinguisticRule {
-			return _attrMgr;
-		}
-
-		private function loadRuleComplete(evt:Event):void {
-			_attrMgr = new LinguisticRule();
-			if( !_attrMgr ) {
-				logger.fatal("Rule File[{0}] Operation[parsing]:Could not locate memory for Linguistic Rule", this._rulePath  );
-				return;
-			}
-			var bytes:ByteArray = evt.target.data;
-			detectEncoding(bytes);
-			bytes.position = 0;
-			parseRule(bytes);
-			dispatchEvent(new Event(Event.COMPLETE));
-		}
-		
-		private function parseRule(bytes:ByteArray):void {
-			
-			var str:String = 	bytes.readMultiByte(bytes.length, _attrMgr.encoding);
-			/*
-			In DOS, a line break is a single '\n'.
-			In Unix, a line break is the sequence '\r\n'.
-			In MAC, a line break is a single '\r'.
-			Correct me if I'm wrong.
-			so step 1:
-			replace "\r\n" with "\n"
-			step 2:
-			replace "\r" with "\n";
-			finally ,we get "\n" line seperator.
-			*/
-			str=str.split("\r\n").join("\n");
-			str=str.split("\r").join("\n");
-			var lineContentArr:Array = str.split("\n");
-			
-			//bof of parsing the text.
-			if( (lineContentArr== null) || (lineContentArr.length== 1) ) {
-				logger.fatal("Rule File[{0}] Operation[parsing] has nothing in the file.", this._rulePath  );
-				return;
-			}
-			/* remove byte order mark */
-			if ( lineContentArr[0].match(new RegExp("^\xEF\xBB\xBF[.]+$") ) ) lineContentArr[0]=lineContentArr[0].substr(3);
-
-			var lineContent:String;
-			var res:int;
-			for( var line:int = 0; line<lineContentArr.length; ) {
-				lineContent= lineContentArr[line];
-				
-				
-				if ( parseAttribute( lineContent, line ) ) {
-					++line;
-					continue;
-				}
-				//parsing for AF rule make aliasf table before loading alias rules
-				if( (res=parseAliasf(lineContent, lineContentArr, line) ) !=0){
-					++line;
-					line+=res;
-					continue;
-				}
-					
-				if ( (res=parseAffix(lineContent, lineContentArr, line)) != 0 ) {
-					line++;
-					line += res;
-					continue;
-				}
-				
-				
-				if ( (res=parseReplaceTable(lineContent, lineContentArr,line)) !=0 ) {
-					line++;
-					line += res;
-					continue;
-				}
-				if ( (res=parseMapTable(lineContent, lineContentArr, line) ) != 0 ) {
-					line++;
-					line += res;
-					continue;
-				}
-/*				//Parse phone table
-				if ( (res=parsePhoneTable(lineContent, lineContentArr,line)) !=0 ) {
-					line++;
-					line += res;
-					continue;
-				}
-*/				/*parse for ICONV/OCONV field*/
-				if ((res=parseConvTable(lineContent, lineContentArr,line)) !=0 ) {
-					line++;
-					line+=res;
-					continue;
-				}
-				
-				/*parse for BREAK rule*/
-				if ((res=parseBreakTable(lineContent, lineContentArr,line)) !=0 ) {
-					line++;
-					line+=res;
-					continue;
-				}
-				
-				if ( !isCommentOrEmpty( lineContent ) ) {
-					line++;
-					unrecognizedLines++;
-					logger.warn("Rule File[{0}] Operation[parsing] Line Number:{1}, Content:{2}",this._rulePath , (line+1).toString(),lineContent );
-					continue;
-				}
-				line++;
-			}
-			//eof of parsing the text.
-			logger.info("Rule File[{0}] Operation[parsing] Total Lines:{1}, Unrecognized Lines:{2}", this._rulePath ,lineContentArr.length.toString(), unrecognizedLines.toString() );
-			
-		}
-
-		private function detectEncoding(bytes:ByteArray):void {
-			var str:String = 	bytes.readUTFBytes(bytes.length);
-			/*
-			In DOS, a line break is a single '\n'.
-			In Unix, a line break is the sequence '\r\n'.
-			In MAC, a line break is a single '\r'.
-			Correct me if I'm wrong.
-			so step 1:
-			replace "\r\n" with "\n"
-			step 2:
-			replace "\r" with "\n";
-			finally ,we get "\n" line seperator.
-			*/
-			str=str.split("\r\n").join("\n");
-			str=str.split("\r").join("\n");
-			var lineContentArr:Array = str.split("\n");
-			
-			//bof of parsing the text.
-			if(lineContentArr== null ) {
-				logger.fatal("Rule File[{0}] Operation[parsing] has nothing in the file.", this._rulePath  );
-				return;
-			}
-			/* remove byte order mark */
-			if ( lineContentArr[0].match(new RegExp("^\xEF\xBB\xBF[.]+$") ) ) lineContentArr[0]=lineContentArr[0].substr(3);
-
-			var lineContent:String;
-			var res:int;
-			for( var line:int = 0; line<lineContentArr.length; ) {
-				lineContent= lineContentArr[line];
-				if ( parseEncoding( lineContent, line ) ) {
-					break;
-				}
-				++line;
-			}
-			//eof of parsing the text.
-			if( _attrMgr.encoding == null ) {
-				logger.fatal("Rule File[{0}] Operation[parsing] Error[no encoding specified] in file.",this._rulePath );
-				_attrMgr.encoding= InternalConstants.DEFAULTENCODING;
-			}
-			
-		}
-		
-		private function parseEncoding(lineContent:String, lineNumber:int):Boolean {
-			var result:String;
-			/* parse in the name of the character set used by the .dict and .aff */
-			if ( (result=parseStringAttribute("SET",lineContent)) != null ){
-				if ( _attrMgr.encoding != null ) {
-					//"error: line xxx: multiple definitions"
-					logger.error("Rule File[{0}] Operation[parsing] Error[multiple definitions] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
-				}else{ 
-					result = getEncodingByString( result );
-					if ( result == "" ) {
-						logger.fatal("Rule File[{0}] Operation[parsing] Error[unsupported encoding] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent);
-						result = InternalConstants.DEFAULTENCODING;
-					}
-					_attrMgr.encoding = result;
-				}
-				return true;
-			}
-			return false;
-		}
-
-
-		private function parseMapTable( lineContent:String, lineContentArray:Array, lineNumber:int ) :int {
-			var res:int = 0;
-			if ( !testKeyString("MAP",lineContent)  )
-				return res;
-			var seperatorPattern:RegExp = /[\t ]+/;
-			if ( _attrMgr.mapFilterTable.length != 0 ) {
-				logger.error("Rule File[{0}] Operation[parsing] Error[multiple definitions] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
-			}
-			/*
-			MAP number_of_map_definitions
-			MAP string_of_related_chars
-				We can define language-dependent information on characters that should be considered related (ie. nearer than other chars not in the set) in the affix file (.aff) by a character map table. With this table, Hunspell can suggest the right forms for words, which incorrectly choose the wrong letter from a related set more than once in a word. 
-			For example a possible mapping could be for the German umlauted ü versus the regular u; the word Frühstück really should be written with umlauted u's and not regular ones
-			MAP 1
-			MAP uü
-			word support in spell checking (forbidding generated compound words, if they are also simple words with typical fault). 
-			*/
-			var strArr:Array = lineContent.split(seperatorPattern);
-			if ( strArr == null || strArr.length < 2 ) {
-				logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
-			}
-			var numberOfEntries:int = snp.parse(strArr[1]); 
-			var parsedLines:int = 0;
-			lineNumber++;
-			while( lineNumber < lineContentArray.length && parsedLines<numberOfEntries ) {
-				lineContent = lineContentArray[lineNumber];
-				lineNumber++;
-				parsedLines++;
-				strArr = lineContent.split(seperatorPattern);
-				if ( strArr == null || (strArr.length < 2) ) {
-					logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
-				}
-				if ( strArr[0]!="MAP" ) {
-					logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
-				}
-				var mapString:String =strArr[1];
-				/* special handling for the rule file include mixed-case mapping string:
-					MAP 5
-					MAP aáAÁ
-					MAP eéEÉ
-					MAP iíIÍ
-					MAP oóOÓ
-					MAP uúüUÚÜ
-				*/
-				var capaType:int = StringUtils.getCapType(mapString);
-				if ( capaType == InternalConstants.ALLCAP ||  capaType == InternalConstants.NOCAP ) {
-					_attrMgr.addMapFilter(mapString);
-				}else {
-					var upperStr:String="";
-					var lowerStr:String=""; 
-					for ( var i:int=0;i< mapString.length;++i ) {
-						if ( mapString.charAt(i) != mapString.charAt(i).toLocaleUpperCase() ) {
-							lowerStr+=mapString.charAt(i);
-						}else {
-							upperStr+=mapString.charAt(i);
-						}
-					}
-					_attrMgr.addMapFilter(upperStr);
-					_attrMgr.addMapFilter(lowerStr);
-				}
-			}
-			if ( parsedLines != numberOfEntries ) {
-				logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
-			}
-			return (numberOfEntries);
-			
-		}
-		
-		private function parseReplaceTable( lineContent:String, lineContentArray:Array, lineNumber:int ) :int {
-			var res:int = 0;
-			if ( !testKeyString("REP",lineContent)  )
-				return res;
-			var seperatorPattern:RegExp = /[\t ]+/;
-			if ( _attrMgr.simpleFilterTable.length != 0 ) {
-				logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
-			}
-			/*
-			REP number_of_replacement_definitions
-			REP what replacement
-			    We can define language-dependent phonetic information in the affix file (.aff) by a replacement table. 
-			    First REP is the header of this table and one or more REP data line are following it. With this table, 
-			    Hunspell can suggest the right forms for the typical faults of spelling when the incorrect form differs 
-			    by more, than 1 letter from the right form. For example a possible English replacement table definition 
-			    to handle misspelled consonants: 
-			REP 8
-			REP f ph
-			REP ph f
-			REP f gh
-			REP gh f
-			REP j dg
-			REP dg j
-			REP k ch
-			REP ch k
-			Replacement table is also usable in robust morphological analysis (accepting bad forms) or stricter compound 
-			word support in spell checking (forbidding generated compound words, if they are also simple words with typical fault). 
-			*/
-			var strArr:Array = lineContent.split(seperatorPattern);
-			if ( strArr == null || strArr.length != 2 ) {
-				logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
-			}
-			var numberOfEntries:int = snp.parse(strArr[1]); 
-			var parsedLines:int = 0;
-			lineNumber++;
-			while( lineNumber < lineContentArray.length && parsedLines<numberOfEntries ) {
-				lineContent = lineContentArray[lineNumber];
-				lineNumber++;
-				parsedLines++;
-				strArr = lineContent.split(seperatorPattern);
-				if ( strArr == null || (strArr.length != 3) ) {
-					logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
-				}
-				if ( strArr[0]!="REP" ) {
-					logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
-				}
-				var matchString:String =strArr[1];
-				var replacement:String =strArr[2];
-				_attrMgr.addSimpleFilter(matchString,replacement);
-			}
-			if ( parsedLines != numberOfEntries ) {
-				logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
-			}
-			return (numberOfEntries);
-		}
-		
-		/*---------parse phone table
-		Param: Line content, lince content array, and line number
-		Return: number of parsed lines
-		*/
-/*		private function parsePhoneTable( lineContent:String, lineContentArray:Array, lineNumber:int ) :int {
-			var res:int = 0;
-			if ( !testKeyString("PHONE",lineContent)  )
-				return res;
-			var seperatorPattern:RegExp = /[\t ]+/;
-			if ( _attrMgr.phoneTable ) {
-				logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
-			}
-			
-			PHONE number_of_phone_definitions
-			PHONE what replacement
-			PHONE uses a table-driven phonetic transcription algorithm borrowed from Aspell. It is useful for
-			languages with not pronunciation based orthography. You can add a full alphabet conversion and
-			other rules for conversion of special letter sequences. For detailed documentation see
-			http://aspell.net/man-html/Phonetic-Code.html. Note: Multibyte UTF-8 characters have not
-			worked with bracket expression yet. Dash expression has signed bytes and not UTF-8 characters
-			yet.
-			
-			var strArr:Array = lineContent.split(seperatorPattern);
-			if ( strArr == null || strArr.length != 2 ) {
-				logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
-			}
-			var numberOfEntries:int = snp.parse(strArr[1]); 
-			var parsedLines:int = 0;
-			lineNumber++;
-			//now parse the remaining lines
-			while( lineNumber < lineContentArray.length && parsedLines<numberOfEntries ) {
-				lineContent = lineContentArray[lineNumber];
-				lineNumber++;
-				parsedLines++;
-				strArr = lineContent.split(seperatorPattern);
-				if ( strArr == null || (strArr.length != 3) ) {
-					logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
-				}
-				if ( strArr[0]!="PHONE" ) {
-					logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
-				}
-				var matchString:String =strArr[1];
-				var replacement:String =strArr[2];
-				_attrMgr.phoneTable.addPhoneticFilter(matchString,replacement);//TODO: edit this
-			}
-			if ( parsedLines != numberOfEntries ) {
-				logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
-			}
-			return (numberOfEntries);
-		}
-*/		//---------parse phone table ends----//
-		
-		//---------parse conv table starts
-		private function parseConvTable( lineContent:String, lineContentArray:Array, lineNumber:int ) :int {
-			var res:int = 0;
-			var ioflag:Boolean;
-			var convTable:Array;
-			if(testKeyString("ICONV",lineContent)!=false){
-			//do for iconvtable	
-			ioflag=true;
-			convTable=_attrMgr.iconvFilterTable;
-			}
-			else if(testKeyString("OCONV",lineContent)!=false){
-			//do for oconvtable
-			ioflag=false;
-			convTable=_attrMgr.oconvFilterTable;
-			}
-			else return res;
-			
-			var seperatorPattern:RegExp = /[\t ]+/;
-			if ( (!convTable)||(convTable && convTable.length != 0 )) {
-				logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
-			}
-			/*ICONV number_of_ICONV_definitions
-			ICONV pattern pattern2
-			Define input conversion table.
-			OCONV number_of_OCONV_definitions
-			OCONV pattern pattern2
-			Define output conversion table.
-			*/
-			var strArr:Array = lineContent.split(seperatorPattern);
-			if ( strArr == null || strArr.length != 2 ) {
-				logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
-			}
-			var numberOfEntries:int = snp.parse(strArr[1]); 
-			var parsedLines:int = 0;
-			lineNumber++;
-			while( lineNumber < lineContentArray.length && parsedLines<numberOfEntries ) {
-				lineContent = lineContentArray[lineNumber];
-				lineNumber++;
-				parsedLines++;
-				strArr = lineContent.split(seperatorPattern);
-				if ( strArr == null || (strArr.length != 3) ) {
-					logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
-				}
-				if ( strArr[0]!="REP" ) {
-					logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
-				}
-				var matchString:String =strArr[1];
-				var replacement:String =strArr[2];
-				_attrMgr.addConvFilter(matchString,replacement,ioflag);//todo
-			}
-			if ( parsedLines != numberOfEntries ) {
-				logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
-			}
-			return (numberOfEntries);
-		}
-		//--parse Convtable ends
-		//--parse BreakTable starts
-		private function parseBreakTable( lineContent:String, lineContentArray:Array, lineNumber:int ) :int {
-			var res:int = 0;
-			if( !testKeyString("BREAK",lineContent) )
-				return res;
-			
-			var seperatorPattern:RegExp = /[\t ]+/;
-			if ( _attrMgr && _attrMgr.breakTable && _attrMgr.breakTable.length != 0 ) {
-				logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
-			}
-			/*
-			BREAK number_of_break_definitions
-			BREAK character_or_character_sequence
-			Define new break points for breaking words and checking word parts separately. Use ˆ and $ to
-			delete characters at end and start of the word. Rationale: useful for compounding with joining
-			character or strings (for example, hyphen in English and German or hyphen and n-dash in Hungarian).
-			Dashes are often bad break points for tokenization, because compounds with dashes may
-			contain not valid parts, too.) With BREAK, Hunspell can check both side of these compounds,
-			breaking the words at dashes and n-dashes:
-			BREAK 2
-			BREAK -
-			BREAK -- # n-dash
-			*/
-			var strArr:Array = lineContent.split(seperatorPattern);
-			if ( strArr == null || strArr.length != 2 ) {
-				logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
-			}
-			var numberOfEntries:int = snp.parse(strArr[1]); 
-			var parsedLines:int = 0;
-			lineNumber++;
-			while( lineNumber < lineContentArray.length && parsedLines<numberOfEntries ) {
-				lineContent = lineContentArray[lineNumber];
-				lineNumber++;
-				parsedLines++;
-				strArr = lineContent.split(seperatorPattern);
-				if ( strArr == null || (strArr.length != 2) ) {
-					logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
-				}
-				if ( strArr[0]!="BREAK" ) {
-					logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
-				}
-			if(_attrMgr.breakTable)	_attrMgr.breakTable.push(strArr[1]);
-			}
-			if ( parsedLines != numberOfEntries ) {
-				logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
-			}
-			return (numberOfEntries);
-		}
-		//--parse Breaktable Endas
-		
-		private function parseAffix(lineContent:String, lineContentArray:Array, lineNumber:int ) : int {
-			var res:int = 0;
-			if ( !testKeyString("PFX",lineContent) && !testKeyString("SFX",lineContent) )
-				return res;
-			var seperatorPattern:RegExp = /[\t ]+/;
-			var slashInsidePattern:RegExp = /^(.+)\/(.+)$/
-			
-			var resStrArr:Array;
-			
-			/* 
-			Affix classes are signed with affix flags. The first line of an affix class definition is the header. The fields of an affix class header:
-			(0) Option name (PFX or SFX)
-			(1) Flag (name of the affix class)
-			(2) Cross product (permission to combine prefixes and suffixes). Possible values: Y (yes) or N (no)
-			(3) Line count of the following rules. 
-			*/
-			var strArr:Array = lineContent.split( seperatorPattern );
-			if ( strArr == null || strArr.length < 4 ) {
-				logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
-			}
-			// piece 1 - is type of affix
-			var atype:int = (strArr[0]=="PFX") ? 0 : 1;
-			 // piece 2 - is affix char
-			var aflag:int = decodeFlag( strArr[1], this._attrMgr.flagMode );
-			// piece 3 - is cross product indicator 
-			var aPermission:Boolean = (strArr[2]=="Y") ? true : false;
-			// piece 4 - is number of affentries
-			var numberOfEntries:int = snp.parse(strArr[3]); 
-			var stripStr:String;
-			var affixStr:String;
-			var conditionsStr:String;
-			var morphStr:String;
-			var conditionPattern:RegExp;
-			var contclass:String;
-			
-			if ( numberOfEntries == 0 ) {
-				logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
-			}
-			
-			var parsedLines:int = 0;
-			lineNumber++;
-			while( lineNumber < lineContentArray.length && parsedLines<numberOfEntries ) {
-				var warnFlag:Boolean = false;
-				lineContent = lineContentArray[lineNumber];
-				lineNumber++;
-				parsedLines++;
-				/*
-				Fields of an affix rules:
-				(0) Option name
-				(1) Flag
-				(2) stripping characters from beginning (at prefix rules) or end (at suffix rules) of the word
-				(3) affix (optionally with flags of continuation classes, separated by a slash)
-				(4) condition.
-				Zero stripping or affix are indicated by zero. Zero condition is indicated by dot. Condition is a simplified, regular expression-like pattern, which must be met before the affix can be applied. (Dot signs an arbitrary character. Characters in braces sign an arbitrary character from the character subset. Dash hasn’t got special meaning, but circumflex (^) next the first brace sets the complementer character set.)
-				(5) Optional morphological fields separated by spaces or tabulators. 				
-				*/
-				strArr = lineContent.split(seperatorPattern);
-				if ( strArr == null || (strArr.length < 5) ) {
-					logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
-				}
-				// piece 1 - is type of affix
-				var aatype:int = (strArr[0]=="PFX") ? 0 : 1;
-				if ( aatype != atype ) {
-					logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
-				}
-				 // piece 2 - is affix char
-				var aaflag:int = decodeFlag( strArr[1],this._attrMgr.flagMode );
-				if ( aaflag != aflag ) {
-					logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
-				}
-				// piece 3 - is string to strip or 0 for null 
-				stripStr = strArr[2];
-				if ( stripStr == "0" ) stripStr="";
-				
-				/*complex affix bof*/
-				if ( (resStrArr=stripStr.match(slashInsidePattern)) != null ) {
-					stripStr = resStrArr[1];
-					warnFlag = true;
-					logger.warn("Rule File[{0}] Operation[parsing] Warn[complex affix] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
-				}
-				/*complex affix eof*/
-				
-				// piece 4 - is affix string or 0 for null
-				/*complex affix bof*/
-				if (strArr[3] && (resStrArr=strArr[3].match(slashInsidePattern)) != null ) //if contclass in Affix Rules
-				{
-					if(this._attrMgr && this._attrMgr.aliasfTable && this._attrMgr.aliasfTable.length>0)//if AF rule 
-					{
-						affixStr = resStrArr[1];
-						contclass=this._attrMgr.aliasfTable[parseInt(resStrArr[2],10)-1];
-					}
-					else// If not AF rule
-					{
-						affixStr =resStrArr[1];
-						contclass=decodeFlags(resStrArr[2],this._attrMgr.flagMode);
-						
-					}
-					
-					this._attrMgr.haveContClass=true;
-					
-					for(var i:int=0;i<contclass.length; i++ )//record the possible contclass in possible contclass array
-						this._attrMgr.contClasses[contclass.charCodeAt(i)]=true;
-				}
-				else
-				{
-					affixStr=strArr[3];
-					contclass=null;
-				}
-				if ( affixStr == "0" ) affixStr="";
-				if ( _attrMgr.ignoredChars != null ) StringUtils.removeIgnoredChars(affixStr, _attrMgr.ignoredChars );
-				/*complex affix eof*/
-
-
-				
-				// piece 5 - is the conditions descriptions
-				conditionsStr = strArr[4];
-				if ( conditionsStr.length == 0 ) {
-					logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
-				}
-				
-				//piece 6  morph information... ToDo....
-				morphStr = (strArr.length == 6) ? strArr[5]: "";
-			/*if(contclass && affixStr=="lit")	
-				for(var c:int=0;c<contclass.length;c++){
-				if(_attrMgr.flagMode== InternalConstants.FLAG_LONG)
-					trace(" contclasslong   "+c+"           " + String.fromCharCode(contclass.charCodeAt(c)>>8)+String.fromCharCode(contclass.charCodeAt(c)-((contclass.charCodeAt(c)>>8)<<8)));
-				else
-					trace(" contclassnormal   "+c+"           " + contclass[c]);
-			}*/
-				_attrMgr.addAffixEntry( aflag, stripStr, affixStr, conditionsStr, morphStr, aPermission, atype, contclass );
-				
-			}
-			if ( parsedLines != numberOfEntries ) {
-				logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
-			}
-			
-			return (numberOfEntries);
-		}
-		
-		//-------parseAliasf
-		private function parseAliasf(lineContent:String, lineContentArray:Array, lineNumber:int ) : int {
-			var res:int = 0;
-			if ( !testKeyString("AF",lineContent))
-				return res;
-			var seperatorPattern:RegExp = /[\t ]+/;
-			var slashInsidePattern:RegExp = /^(.+)\/(.+)$/
-			
-			var resStrArr:Array;
-			
-			/* 
-			AF number_of_flag_vector_aliases
-			AF flag_vector
-			Hunspell can substitute affix flag sets with ordinal numbers in affix rules ( compression, see
-			makealias tool). First example with  compression:
-			3
-			hello
-			try/1
-			work/2
-			AF definitions in the affix file:
-			SET UTF-8
-			TRY esianrtolcdugmphbyfvkwzESIANRTOLCDUGMPHBYFVKWZ’
-			AF 2
-			AF A
-			AF AB
-			It is equivalent of the following dic file:
-			3
-			hello
-			try/A
-			work/AB
-			*/
-			var strArr:Array = lineContent.split(seperatorPattern);
-			if ( strArr == null || strArr.length != 2 ) {
-				logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
-			}
-			var numberOfEntries:int = snp.parse(strArr[1]); 
-			var parsedLines:int = 0;
-			lineNumber++;
-			while( lineNumber < lineContentArray.length && parsedLines<numberOfEntries ) {
-				lineContent = lineContentArray[lineNumber];
-				lineNumber++;
-				parsedLines++;
-				strArr = lineContent.split(seperatorPattern);
-				if ( strArr == null || (strArr.length != 2) ) {
-					logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
-				}
-				if ( strArr[0]!="AF" ) {
-					logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
-				}
-				//Decode Flags and store as long numbers. In normal case without AF rule we do this step later. Here we are decoding and storing the flags.
-				var flags:String=decodeFlags(strArr[1],this._attrMgr.flagMode);
-				_attrMgr.aliasfTable.push(flags);
-			}
-			if ( parsedLines != numberOfEntries ) {
-				logger.error("Rule File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
-			}
-			return (numberOfEntries);
-		}
-		//--------parseAliasf
-		//------decodeflags
-		/*
-		* Squiggly is using utf16 by default...
-		* for utf8 string conversion,we need extra work later.
-		* we might also need a better toString() fuction for Flag_long and flag_num mode.
-		*/
-		private function decodeFlags(flags:String, flagMode:int):String {
-			var result:String="";
-			var i:int;
-			switch ( flagMode )  {
-				case InternalConstants.FLAG_LONG:
-					if ( (flags.length)%2 == 1 ) {
-						logger.error("Dictionary File[{0}] Operation[parsing] Error[decoding error] target flags:{1}",this._rulePath , flags );
-						throw new ContentError(ErrorTable.CONTENTPARSINGERROR_MSG,ErrorTable.CONTENTPARSINGERROR_ID);
-					}
-					var len:int = flags.length/2;
-					for ( i = 0; i< len; ++i ) {
-						result +=  String.fromCharCode( ((flags.charCodeAt((i * 2))) << 8) + (flags.charCodeAt((i * 2 + 1))) );
-					}
-					break;
-				case InternalConstants.FLAG_NUM:
-					var strArr:Array = flags.split(",");
-					for ( i = 0;i< strArr.length;++i) {
-						var num:Number = snp.parse(strArr[i]);
-						if ( num >= InternalConstants.DEFAULTFLAGS ) {
-							logger.error("Dictionary File[{0}] Operation[parsing] Error[decoding error] target flags:{1}",this._rulePath , flags );
-						}
-						result += String.fromCharCode(num);
-					}
-					break;
-				case InternalConstants.FLAG_UNI:
-					result = flags;
-					break;
-				default:
-					result = flags;
-					break;
-			}
-			return result;
-		}
-//-----------decode flags ends
-		
-		
-		private function decodeFlag( flagString:String, flag_mode:int=InternalConstants.FLAG_CHAR  ) : int {
-			var s:int;
-			var i:int;
-			switch ( flag_mode ) {
-				case InternalConstants.FLAG_LONG:
-					if ( flagString.length != 2 ) {
-						logger.error("Rule File[{0}] Operation[decodeFlag] Error[Unknown Flags] The length of flag id {1} is not equal 2.",this._rulePath , flagString);
-					}
-					s = ( flagString.charCodeAt(0) << 8) + flagString.charCodeAt(1);
-					break;
-				case InternalConstants.FLAG_NUM:
-					i = snp.parse(flagString);
-					if (i >= InternalConstants.DEFAULTFLAGS) {
-						logger.error("Rule File[{0}] Operation[decodeFlag] Error[Unknown Flags] flag id {1} is too large (max: {2})",this._rulePath , i.toString(),InternalConstants.DEFAULTFLAGS.toString() );
-					}
-					s = i;
-					break;
-				case InternalConstants.FLAG_UNI: // utf-8
-				default:
-					s = flagString.charCodeAt(0);
-			}
-			return s;
-		}
-
-		private function parseFlagMode(lineContent:String, lineNumber:int):Boolean {
-			var result:String;
-			/* parse in the name of the character set used by the .dict and .aff */
-			if ( (result=parseStringAttribute("FLAG",lineContent)) != null ){
-	            if (result == "long") _attrMgr.flagMode = InternalConstants.FLAG_LONG;
-	            if (result == "num") _attrMgr.flagMode = InternalConstants.FLAG_NUM;
-	            if (result == "UTF-8") _attrMgr.flagMode = InternalConstants.FLAG_UNI;
-	            if ( result == "char" ) _attrMgr.flagMode = InternalConstants.FLAG_CHAR;
-				return true;
-			}
-			return false;
-		}
-
-
-		private function parseAttribute(lineContent:String, lineNumber:int):Boolean {
-			var result:String;
-			
-			/* parse in the name of the character set used by the .dict and .aff */
-			if ( parseFlagMode(lineContent,lineNumber) ){
-				return true;
-			}
-			
-			 /* parse in the keyboard string */
-			if ( (result=parseStringAttribute("KEY",lineContent)) != null ){
-				_attrMgr.keyString = result;
-				return true;
-			}
-			
-			/* parse in the try string */
-			if ( (result=parseStringAttribute("TRY",lineContent)) != null ){
-				if ( _attrMgr.tryString != null ) {
-					//"error: line %d: multiple definitions\n"
-					throw new ContentError(ErrorTable.CONTENTPARSINGERROR_MSG,ErrorTable.CONTENTPARSINGERROR_ID); 
-				}else _attrMgr.tryString = result;
-				return true;
-			}
-			
-			/* parse in the name of the character set used by the .dict and .aff */
-			if ( (result=parseStringAttribute("SET",lineContent)) != null ){
-				return true;
-			}
-			
-			/* parse in the noSuggest flag */
-			if ( (result=parseStringAttribute("NOSUGGEST",lineContent)) != null ){
-			//	_attrMgr.noSuggest = result.charCodeAt(0); //Depreceated old function, had to be changed for supporting FLAG_LONG
-				_attrMgr.noSuggest = decodeFlag(result, this._attrMgr.flagMode);
-
-				return true;
-			}
-			
-			/* parse in the flag used by forbidden words */
-			if ( (result=parseStringAttribute("FORBIDDENWORD",lineContent)) != null ){
-				//_attrMgr.forbiddenWord = result.charCodeAt(0);//Depreceated old function, had to be changed for supporting FLAG_LONG
-				_attrMgr.forbiddenWord = decodeFlag(result, this._attrMgr.flagMode);
-
-				return true;
-			}
-
-			 /* parse in the ignored characters (for example, Arabic optional diacretics charachters */
-			if ( (result=parseStringAttribute("IGNORE",lineContent)) != null ){
-				if ( _attrMgr.ignoredChars != null ) {
-					//"error: line %d: multiple definitions\n"
-					throw new ContentError(ErrorTable.CONTENTPARSINGERROR_MSG,ErrorTable.CONTENTPARSINGERROR_ID); 
-				}else _attrMgr.ignoredChars = result;
-				return true;
-			}
-
-			/* parse in the extra word characters */
-			if ( (result=parseStringAttribute("WORDCHARS",lineContent)) != null ){
-				if ( _attrMgr.wordChars != null ) {
-					//"error: line %d: multiple definitions\n"
-					throw new ContentError(ErrorTable.CONTENTPARSINGERROR_MSG,ErrorTable.CONTENTPARSINGERROR_ID); 
-				}else _attrMgr.wordChars = result;
-				return true;
-			}
-			
-			/* parse in the language for language specific codes */
-			if ( (result=parseStringAttribute("LANG",lineContent)) != null ){
-				if ( _attrMgr.languageCode != null ) {
-					//"error: line %d: multiple definitions\n"
-					throw new ContentError(ErrorTable.CONTENTPARSINGERROR_MSG,ErrorTable.CONTENTPARSINGERROR_ID); 
-				}else {
-					_attrMgr.languageCode = result;
-					//langnum = get_lang_num(lang);
-				}
-				return true;
-			}
-			
-			/* parse in the version */
-			if ( (result=parseStringAttribute("VERSION",lineContent)) != null ){
-				_attrMgr.version = result;
-				return true;
-			}
-
-			if ( (result=parseStringAttribute("MAXNGRAMSUGS",lineContent)) != null ){
-				_attrMgr.maxNgramSuggestions = snp.parse(result);
-				return true;
-			}
-			
-			if ( testKeyString("NOSPLITSUGS",lineContent) ) {
-				_attrMgr.nosplitSuggestions = 1;
-			}
-			
-			if ( testKeyString("SUGSWITHDOTS",lineContent) ) {
-				_attrMgr.suggestionsWithDots = 1;
-			}
-			
-			if ( testKeyString("FULLSTRIP",lineContent) ) {
-				_attrMgr.fullStrip = 1;
-			}
-			/* parse in the noSuggest flag */
-			if ( (result=parseStringAttribute("KEEPCASE",lineContent)) != null ){
-				//_attrMgr.keepCase = result.charCodeAt(0);//Depreceated old function, had to be changed for supporting FLAG_LONG
-				_attrMgr.keepCase = decodeFlag(result, this._attrMgr.flagMode);
-				return true;
-			}
-			
-			/*parse in the CIRCUMFIX flag*/
-			if ( (result=parseStringAttribute("CIRCUMFIX",lineContent)) != null ){
-			//	_attrMgr.circumfix =result.charCodeAt(0);//Depreceated old function, had to be changed for supporting FLAG_LONG
-				_attrMgr.circumfix =decodeFlag(result, this._attrMgr.flagMode);
-				return true;
-			}
-			/*parse in the NEEDAFFIX flag*/
-			if ( (result=parseStringAttribute("NEEDAFFIX",lineContent)) != null ){
-				//_attrMgr.needAffix = result.charCodeAt(0); ////Depreceated old function, had to be changed for supporting FLAG_LONG
-				_attrMgr.needAffix = decodeFlag(result, this._attrMgr.flagMode);
-				return true;
-			}
-			
-		return false;
-		}
-		
-		private function parseStringAttribute(key:String, lineContent:String):String {
-			if ( lineContent == null || key == null ) return null;
-			var keyPattern:RegExp = new RegExp("^"+key+"[\\t ]+(.+)$");
-			var parseArr:Array;
-			if ( (parseArr=lineContent.match(keyPattern)) != null ) {
-				return parseArr[1];
-			}		
-			return null;
-		}
-		
-		private function testKeyString(key:String,lineContent:String):Boolean {
-			if ( key == null ) return false;
-			var keyPattern:RegExp = new RegExp("^"+key+".*$");
-			return keyPattern.test( lineContent );
-		}
-
-		private function isCommentOrEmpty(lineContent:String):Boolean{
-			var str:String = lineContent;
-			str = StringUtils.trim( lineContent);
-			if ( str == "" ) return true;
-			if ( testKeyString("#",str) ) return true;
-			return false;
-		}
-
-		private function getEncodingByString(key:String):String {
-			var result:String = "";
-			var keyEncodingTable:Object = {"UTF-8":"utf-8", "ISO8859-1":"iso-8859-1","ISO8859-2":"iso-8859-2","ISO8859-3":"iso-8859-3",
-			"ISO8859-4":"iso-8859-4","ISO8859-5":"iso-8859-5","ISO8859-6":"iso-8859-6","ISO8859-7":"iso-8859-7","ISO8859-8":"iso-8859-8",
-			"ISO8859-9":"iso-8859-9", "ISO8859-15":"iso-8859-15", "KOI8-R":"koi8-r", "KOI8-U":"koi8-u", "microsoft-cp1251":"windows-1251", 
-			"ISCII-DEVANAGARI":"x-iscii-de"};
-			var unsupportedTable:Object = {"ISO8859-10":"", "ISO8859-13":""};
-			if ( key == null ) return InternalConstants.DEFAULTENCODING;
-			
-			if ( keyEncodingTable[key] == undefined || keyEncodingTable[key] == "" ) return result;
-			result = keyEncodingTable[key];
-			
-			return result;
-		}
-
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/utils/MathUtils.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/utils/MathUtils.as b/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/utils/MathUtils.as
deleted file mode 100644
index 2c79756..0000000
--- a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/utils/MathUtils.as
+++ /dev/null
@@ -1,66 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-
-package com.adobe.linguistics.spelling.core.utils
-{
-	public class MathUtils
-	{
-		/**
-		 *  Return next prime; assume N >= 10 
-		 */
-		public static function nextPrime( N:int ):int
-		{
-			var i:int;
-			var continueFlag:Boolean;
-			if( N % 2 == 0 )
-				N++;
-			for( ; ; N += 2 )
-			{
-				continueFlag = false;
-				for( i = 3; i * i <= N; i += 2 )
-					if( N % i == 0 ) {
-						continueFlag = true;    //Sorry about this!
-						break;
-					}
-				if ( continueFlag ) continue;
-				return N;
-			}
-			return -1; // failure branch... it should never happen.
-		}
-
-		/**
-		 * Rounds a number to a specific number of decimal places.
-		 */
-		public static function roundPrecision(number:Number, precision:int=0):Number
-		{
-			var places:Number = Math.pow(10, precision);
-			return Math.round(places * number) / places;
-		}
-
-		/**
-		 * Generates a random number between two number values.
-		 */
-		public static function randomBetween(min:Number=0, max:Number=99999999, precision:int=0):Number
-		{
-			return roundPrecision(Math.random() * (max - min) + min, precision);
-		}
-
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/utils/RefObject.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/utils/RefObject.as b/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/utils/RefObject.as
deleted file mode 100644
index ef1a99d..0000000
--- a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/utils/RefObject.as
+++ /dev/null
@@ -1,36 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-
-package com.adobe.linguistics.spelling.core.utils
-{
-	public class RefObject
-	{
-		private var _ref:int;
-		public function RefObject(value:int) {
-			this._ref = value;
-		}
-		public function set ref(v:int):void {
-			this._ref = v;
-		}
-		public function get ref():int {
-			return this._ref;
-		}
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/utils/SimpleNumberParser.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/utils/SimpleNumberParser.as b/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/utils/SimpleNumberParser.as
deleted file mode 100644
index 29bdc4b..0000000
--- a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/utils/SimpleNumberParser.as
+++ /dev/null
@@ -1,54 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-
-package com.adobe.linguistics.spelling.core.utils
-{
-	/*
-	 * A simple number parsing class...
-	 */
-	public class SimpleNumberParser
-	{
-		private var numberPattern:RegExp = /^((\d+,?)*\d+)?\.?\d*$|^[-+]?\d+\.?\d*[eE]{1}[-+]?\d+$/;
-		private var negativePattern:RegExp = /^-[ ]?([0-9\.,]+)$|^([0-9\.,]+)[ ]?-$|^\([ ]?([0-9\.,]+)[ ]?\)$/;
-		private var _decimalSymbol:String, _grouppingSymbol:String;
-		
-		public function SimpleNumberParser(decimalSymbol:String=".", grouppingSymbol:String=",")
-		{
-			this._decimalSymbol = decimalSymbol; this._grouppingSymbol = grouppingSymbol;
-		}
-		
-		public function parse(inputString:String):Number {
-			var neg:int = 1;
-			inputString= inputString.split(_decimalSymbol).join("."); 
-			inputString= inputString.split(_grouppingSymbol).join(",");
-			inputString= StringUtils.trim(inputString);
-			if ( negativePattern.test(inputString) ) {
-				var result:Array = inputString.match( negativePattern );
-				for ( var i:int = 1; i < result.length; i++ )
-					if ( result[i]!= undefined ) break;
-				inputString= result[i];
-				neg=-1;
-			}
-			if ( !numberPattern.test( inputString ) ) return NaN;
-			inputString= inputString.split(_grouppingSymbol).join(""); 
-			return (new Number(inputString))*neg;
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/utils/SquigglyDictionaryLoader.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/utils/SquigglyDictionaryLoader.as b/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/utils/SquigglyDictionaryLoader.as
deleted file mode 100644
index e97000c..0000000
--- a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/utils/SquigglyDictionaryLoader.as
+++ /dev/null
@@ -1,369 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-
-package com.adobe.linguistics.spelling.core.utils
-{
-	import com.adobe.linguistics.spelling.core.LinguisticRule;
-	import com.adobe.linguistics.spelling.core.SquigglyDictionary;
-	import com.adobe.linguistics.spelling.core.env.InternalConstants;
-	import com.adobe.linguistics.spelling.core.error.*;
-	import com.adobe.linguistics.spelling.core.logging.*;
-	
-	import flash.errors.IllegalOperationError;
-	import flash.events.ErrorEvent;
-	import flash.events.Event;
-	import flash.events.EventDispatcher;
-	import flash.events.IOErrorEvent;
-	import flash.events.SecurityErrorEvent;
-	import flash.net.URLRequest;
-	import flash.utils.*;
-	public class SquigglyDictionaryLoader extends EventDispatcher
-	{
-		private var _dict:SquigglyDictionary;
-		private var _dictionaryPath:String;
-		private var _attrMgr:LinguisticRule;
-
-
-		private var snp:SimpleNumberParser = new SimpleNumberParser();
-
-		//setup logger for sending message.
-		private var className:String = flash.utils.getQualifiedClassName(this).split("::").join(".");
-		private var logger:ILogger = Log.getLogger( className );
-		//vars shifted up
-        private var wordList:Array;
-		private var dp:String;//description;
-		private var ts:String;
-		private var ap:String;
-		private var flags:String;
-		
-		private var dpPattern1:RegExp; 	//patterns to split rule line into fileds according to new morphological field separator
-		private var dpPattern2:RegExp;	//patterns to split rule line into fileds according to old morphological field separator
-		private var tsPattern1:RegExp;	//extracts the affix string
-		private var strArr:Array;
-		private var lineContent:String;
-		private var totalPart:int;
-		private var delay:int;
-		//vars shifted up
-		
-		//variables added to accomodate property
-		private var _enableDictionarySplit:Boolean;
-		private var _wordsPerDictionarySplit:int;
-		
-		public function SquigglyDictionaryLoader()
-		{
-			_dict = null;
-			_dictionaryPath = null;
-			_attrMgr = null;
-			dpPattern1= /^(.+)[ \t]+.{2}:(.+)$/ ; 	//patterns to split rule line into fileds according to new morphological field separator
-			dpPattern2= /^(.+)[\t]{1}(.+)$/ ; 		//patterns to split rule line into fileds according to old morphological field separator
-			tsPattern1= /^(.*[^\\])\/(.+)$/ ; 
-			delay=InternalConstants.DICT_LOAD_DELAY; //the timeout period between two parts 10 ms
-		}
-		
-		public function set linguisticRule(value:LinguisticRule):void {
-			this._attrMgr = value;
-		}
-		
-		public function get linguisticRule():LinguisticRule {
-			return this._attrMgr;
-		}
-		
-		public function load(dictionaryURL:String,enableDictionarySplit:Boolean,wordsPerDictionarySplit:int):void {
-			if ( dictionaryURL == null ) {
-				throw new IllegalOperationError("load function did not receive two valid URLs.");
-			}
-			_dictionaryPath = dictionaryURL;
-			_enableDictionarySplit=enableDictionarySplit;
-			_wordsPerDictionarySplit=wordsPerDictionarySplit;
-			var request:URLRequest = new URLRequest( _dictionaryPath );
-			var dloader:DictionaryLoader = new DictionaryLoader(request);
-			dloader.addEventListener(Event.COMPLETE,loadDictionaryComplete);
-			dloader.addEventListener(IOErrorEvent.IO_ERROR,handleError);
-			dloader.addEventListener(SecurityErrorEvent.SECURITY_ERROR,handleError);
-			
-		}
-
-		//Private method to dispatch an error event.
-		private function handleError(evt:Event):void {
-			bounceEvent(evt);
-		}
-		private function bounceEvent(evt:Event):void {
-			dispatchEvent(evt.clone());
-		}
-
-
-		public function get squigglyDictionary():SquigglyDictionary {
-			return  _dict;
-		}
-		
-		private function loadDictionaryComplete(evt:Event):void {
-			_dict = new SquigglyDictionary(_attrMgr);
-
-			var bytes:ByteArray = evt.target.data;
-			//trace("load complete handler: "+getTimer()+" "+bytes.bytesAvailable);
-			var charSet:String;
-			if ( _attrMgr ) {
-				charSet = _attrMgr.encoding;
-			}else {
-				charSet = InternalConstants.DEFAULTENCODING;
-			}
-			var str:String = 	bytes.readMultiByte(bytes.length, charSet);
-			//trace("Bytes read at: "+getTimer());
-
-			/*
-			In DOS, a line break is a single '\n'.
-			In Unix, a line break is the sequence '\r\n'.
-			In MAC, a line break is a single '\r'.
-			Correct me if I'm wrong.
-			so step 1:
-			replace "\r\n" with "\n"
-			step 2:
-			replace "\r" with "\n";
-			finally ,we get "\n" line seperator.
-			*/
-			str=str.split("\r\n").join("\n");
-			str=str.split("\r").join("\n");
-			wordList= str.split("\n");
-			//bof of parsing the text.
-			//trace("Wordlist length: "+wordList.length);
-			if(wordList== null ) {
-				logger.error("Dictionary File[{0}] Operation[parsing] Error[corrupt data]",this._dictionaryPath);
-			}
-			if(wordList.length== 1){
-				logger.error("Dictionary File[{0}] Operation[parsing] Error[corrupt data]",this._dictionaryPath );
-//				logger.error("Dictionary File[{0}] Operation[parsing] Error[corrupt data] Line Number:{1}, Content:{2}",this._rulePath , (lineNumber+1).toString(),lineContent );
-			} 
-			//fix for 	Bug #: 	2855795 now if greater load to a max of wordList.length
-			if(wordList.length<this._wordsPerDictionarySplit){
-				this._wordsPerDictionarySplit=wordList.length;				
-			}
-			
-			/* remove byte order mark */
-			if ( wordList[0].match(new RegExp("^\xEF\xBB\xBF[.]+$") ) ) wordList[0]=wordList[0].substr(3);
-			var snp:SimpleNumberParser = new SimpleNumberParser();
-			/* get the table size */
-			var tablesize:int = snp.parse(wordList[0]);
-			if (tablesize == 0) throw new ContentError(ErrorTable.CONTENTPARSINGERROR_MSG,ErrorTable.CONTENTPARSINGERROR_ID);
-			
-			//trace("Before parsing: "+getTimer());
-			
-			if(this._enableDictionarySplit ){
-				setTimeout(loadWithTimeouts,1,1);//go to loadWithTimeouts
-			}
-			else
-			{	
-				setTimeout(loadWithoutTimeouts,1,1);//directly go to finish. This will cause words to load from 1 to wordList.length
-			}
-			
-		}
-	
-		private function loadWithTimeouts(part:int):void	{
-			for( var line:int = part; line<part+(this._wordsPerDictionarySplit)-1; ++line) { 
-				lineContent = wordList[line];
-				/* : is the new morphological field separator */
-				if ( (strArr = lineContent.match(dpPattern1)) != null ) {
-					dp=strArr[2];
-					ts = strArr[1];
-				/* tabulator is the old morphological field separator */
-				}else if ( (strArr = lineContent.match(dpPattern2)) != null ) {
-					ts = strArr[1];
-					dp=strArr[2];
-				}else {
-					ts = lineContent;//so ts has the word and dp has morphological desc
-					dp = null;
-				}
-				
-				ts= StringUtils.trim(ts);
-				if( dp != null ) dp= StringUtils.trim(dp);
-				// eof: split each line into word and morphological description
-
-				// bof:split each line into word and affix char strings
-				/*
-				"\/" signs slash in words (not affix separator)
-				"/" at beginning of the line is word character (not affix separator)
-				*/
-				if ( (strArr = ts.match(tsPattern1))!= null ) {
-					ap = strArr[2]; 
-					ts = strArr[1];
-					ts = ts.split('\\/').join('/');	/* replace "\/" with "/" */
-					if(_attrMgr){
-						if(_attrMgr.aliasfTable && _attrMgr.aliasfTable.length>0)
-						{ 
-						flags=_attrMgr.aliasfTable[parseInt(ap,10)-1];
-						}
-						else
-						{
-						flags = decodeFlags( ap, _attrMgr.flagMode);
-						}
-					}
-/*	
-// Todo, will remove this comments after we have complex-affix support and compound-word support.
-            if (aliasf) {
-                int index = atoi(ap + 1);
-                al = get_aliasf(index, &flags, dict);
-                if (!al) {
-                    HUNSPELL_WARNING(stderr, "error: line %d: bad flag vector alias\n", dict->getlinenum());
-                    *ap = '\0';
-                }
-            } else {
-                al = decode_flags(&flags, ap + 1, dict);
-                flag_qsort(flags, 0, al);
-            }
-*/
-				}else {
-					ap=null;
-					flags=null;
-				}
-				// eof:split each line into word and affix char strings
-				//trace(line+" WORD:"+ts);
-				_dict.addWord( ts, flags, dp );			
-		}
-				
-				if(line+(this._wordsPerDictionarySplit)>=wordList.length)//Last part reached.
-				{
-					setTimeout(loadWithoutTimeouts,delay,line);//the last part left which is less than wordsPerDictionarySplit is loaded w/o Timeouts
-				}
-				else
-				{
-				setTimeout(loadWithTimeouts,delay, line);//get delay of 10 ms
-				}
-			// } //loop ends
-			//eof of parsing the text.
-			//function ends here
-		}
-		
-		/* Squiggly function to end Asynchronous looping
-		*
-		*
-		*/
-		private function loadWithoutTimeouts(line:int):void
-		{
-			for( ; line<wordList.length; ++line) {
-				
-				// bof: split each line into word and morphological description 
-				lineContent = wordList[line];
-				/* : is the new morphological field separator */
-				if ( (strArr = lineContent.match(dpPattern1)) != null ) {
-					dp=strArr[2];
-					ts = strArr[1];
-					/* tabulator is the old morphological field separator */
-				}else if ( (strArr = lineContent.match(dpPattern2)) != null ) {
-					ts = strArr[1];
-					dp=strArr[2];
-				}else {
-					ts = lineContent;
-					dp = null;
-				}
-				ts= StringUtils.trim(ts);
-				if( dp != null ) dp= StringUtils.trim(dp);
-				// eof: split each line into word and morphological description
-				
-				// bof:split each line into word and affix char strings
-				/*
-				"\/" signs slash in words (not affix separator)
-				"/" at beginning of the line is word character (not affix separator)
-				*/
-				if ( (strArr = ts.match(tsPattern1))!= null ) {
-					ap = strArr[2]; 
-					ts = strArr[1];
-					ts = ts.split('\\/').join('/');	/* replace "\/" with "/" */
-					if(_attrMgr)
-					{
-						if(_attrMgr.aliasfTable && _attrMgr.aliasfTable.length>0)
-						{
-						flags=_attrMgr.aliasfTable[parseInt(ap,10)-1];
-						}
-						else
-						{
-						flags = decodeFlags( ap, _attrMgr.flagMode);
-						}
-					}
-					/*
-					// Todo, will remove this comments after we have complex-affix support and compound-word support.
-					if (aliasf) {
-					int index = atoi(ap + 1);
-					al = get_aliasf(index, &flags, dict);
-					if (!al) {
-					HUNSPELL_WARNING(stderr, "error: line %d: bad flag vector alias\n", dict->getlinenum());
-					*ap = '\0';
-					}
-					} else {
-					al = decode_flags(&flags, ap + 1, dict);
-					flag_qsort(flags, 0, al);
-					}
-					*/
-				}else {
-					ap=null;
-					flags=null;
-				}
-				// eof:split each line into word and affix char strings
-				//trace("WORD2:"+ts);
-				_dict.addWord( ts, flags, dp );			
-			}
-			//trace("After Parsing: "+getTimer());
-			logger.info("Dictionary File[{0}] Operation[parsing] Total Lines:{1}, Unrecognized Lines:{2}", this._dictionaryPath ,wordList.length.toString(), 0  );
-			
-			dispatchEvent(new Event(Event.COMPLETE));
-		}
-		
-		
-
-		/*
-		 * Squiggly is using utf16 by default...
-		 * for utf8 string conversion,we need extra work later.
-		 * we might also need a better toString() fuction for Flag_long and flag_num mode.
-		 */
-		private function decodeFlags(flags:String, flagMode:int):String {
-			var result:String="";
-			var i:int;
-			switch ( flagMode )  {
-				case InternalConstants.FLAG_LONG:
-				if ( (flags.length)%2 == 1 ) {
-					logger.error("Dictionary File[{0}] Operation[parsing] Error[decoding error] target flags:{1}",this._dictionaryPath , flags );
-					throw new ContentError(ErrorTable.CONTENTPARSINGERROR_MSG,ErrorTable.CONTENTPARSINGERROR_ID);
-				}
-				var len:int = flags.length/2;
-				for ( i = 0; i< len; ++i ) {
-					result +=  String.fromCharCode( ((flags.charCodeAt((i * 2))) << 8) + (flags.charCodeAt((i * 2 + 1))) );
-				}
-				break;
-				case InternalConstants.FLAG_NUM:
-				var strArr:Array = flags.split(",");
-				for ( i = 0;i< strArr.length;++i) {
-					var num:Number = snp.parse(strArr[i]);
-					if ( num >= InternalConstants.DEFAULTFLAGS ) {
-						logger.error("Dictionary File[{0}] Operation[parsing] Error[decoding error] target flags:{1}",this._dictionaryPath , flags );
-					}
-					result += String.fromCharCode(num);
-				}
-				break;
-				case InternalConstants.FLAG_UNI:
-				result = flags;
-				break;
-				default:
-				result = flags;
-				break;
-			}
-			return result;
-		}
-
-
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/utils/StringUtils.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/utils/StringUtils.as b/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/utils/StringUtils.as
deleted file mode 100644
index 63dba22..0000000
--- a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/utils/StringUtils.as
+++ /dev/null
@@ -1,333 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-
-package com.adobe.linguistics.spelling.core.utils
-{
-	import com.adobe.linguistics.spelling.core.env.InternalConstants;
-	public final class StringUtils
-	{
-		
-	    public static function isWhiteSpace( ch:Number ):Boolean {
-	    	// '\r' || '\n' || '\f' || '\t' || ' ' 
-	    	
-	    	return ch == 32 || 
-	    	ch == 32 || 
-	    	ch == 32 || 
-	    	ch == 32 || 
-	    	ch == 32; 
-	    }
-	    public static function isWhiteSpace2( ch:String ):Boolean {
-	    	// '\r' || '\n' || '\f' || '\t' || ' ' 
-	    	
-	    	return ch == '\r' || 
-	    	ch == '\n' || 
-	    	ch == '\f' || 
-	    	ch == '\t' || 
-	    	ch == ' '; 
-	    }
-    
-	    public static function trim( original:String ):String {
-	    	var i:int;
-	    	var start:int=0, end:int=original.length;
-	    	for ( i=0; (i< original.length) && isWhiteSpace(original.charCodeAt(i)) ; ++i ) {
-	    		start++;
-	    	}
-	    	for ( i=end-1; (i>=0) && isWhiteSpace(original.charCodeAt(i)) ; --i) {
-	    		end--;
-	    	}
-	    	return original.substring(start,end);
-	    }
-	    
-		/*
-		 * Deprecated function for now...
-		 * History: 
-		 *          A pre-version of implementation for error detection. After I optimized the code for performance,
-		 *          I drop this function by that time, but you know performance meassuring is a tricky problem... 
-		 * ToDo: Need a revisit when we implementing complex-affix support and compound-word support.
-		 */
-	    public static function trim2( original:String ):String {
-
-	      var characters:Array = original.split( "" );
-	      for ( var i:int = 0; i < characters.length; i++ ) {
-	        if ( isWhiteSpace2( characters[i] ) ) {
-	          characters.splice( i, 1 );
-	          i--;
-	        } else {
-	          break;
-	        }
-	      }
-	      for ( i = characters.length-1; i >= 0; i-- ) {
-	      	if (isWhiteSpace2( characters[i] )) {
-	      		characters.splice( i, 1 );
-	      	}else {
-	      		break;
-	      	}
-	      }
-	      return characters.join("");
-	    }
-	    
-	    /*
-	     * ideally, this function shouldn't be here, we should always get a word without any ill-formed character. 
-	     * ToDo, will create a normalization class in next release....
-	     * Need revisit this function.
-	     */
-	    public static var curlyQuotePattern:RegExp = /[‘’]/;
-	    public static function normalize( value:String ):String {
-	    	var result:String;
-	    	if ( (value.indexOf("‘") == -1) && (value.indexOf("’") == -1) ) return value;
-	    	result = value.replace(curlyQuotePattern,"'");
-	    	return result;
-	    	
-	    }
-	    
-		public static function reverseString(str:String):String {
-			var sTmp:String="";
-			for ( var i:int= str.length -1 ; i >=0 ; i-- ) 
-				sTmp+=str.charAt(i);
-			return sTmp;
-		}
-		
-	    public static function sort(str:String, descending:Boolean= false):String {
-	    	if ( (str==null) || (str.length<=1) ) 
-	    		return str;
-	    	var chars:Array = str.split("");
-	    	if ( descending )
-	    		chars.sort(Array.DESCENDING);
-	    	else
-	    		chars.sort();
-	    	return chars.join("");	
-	    }
-
-		public static function removeIgnoredChars(word:String, ignoreChars:String ) :String {
-			if ( ignoreChars == null || word == null ) return word;
-			for ( var i:int = 0; i< ignoreChars.length ; ++i ) {
-				word.split(ignoreChars[i]).join("");
-			}
-			return word;
-		}
-
-		public static function makeInitCap(word:String):String {
-			return word.charAt(0).toLocaleUpperCase() + word.substr(1);
-		}
-
-		/*
-		 * Deprecated function for now...
-		 * History: 
-		 *          A pre-version of implementation for error detection. After I optimized the code for performance,
-		 *          I drop this function by that time, but you know performance meassuring is a tricky problem... 
-		 * ToDo: Need a revisit when we implementing complex-affix support and compound-word support.
-		 */
-	    public static function getCapType1(word:String):int {
-			// now determine the capitalization type of the first nl letters
-			var ncap:int = 0;
-			var nneutral:int = 0;
-			var firstcap:int = 0;
-			// Potential improvment 1:
-			// It could be updated to user gslib StringUtils class in the future( after we have argo player 10.1 public). It is better for locale correction.
-			// at that time, we should consider about german language sharp SS -> beta case... the only case for changing the string length.
-			// Potential improvement 2:
-			// Using a hard code mapping table to convert the string to lowercase or uppercase. It is better for perfermance...
-			
-			if ( word == null || word=="" ) return InternalConstants.NOCAP;
-
-			var lowerStr:String = word.toLocaleLowerCase();
-			var upperStr:String = word.toLocaleUpperCase();
-
-			for ( var i:int = 0; i < word.length; ++i ) {
-				if ( upperStr.charCodeAt(i) == lowerStr.charCodeAt(i) ) 
-					nneutral++;
-				else {
-					if ( word.charCodeAt(i) == upperStr.charCodeAt(i) )
-						ncap++;
-				}
-			}
-			
-			if (ncap) {
-				if ( word.charCodeAt(0) == upperStr.charCodeAt(0) && upperStr.charCodeAt(0) != lowerStr.charCodeAt(0) )
-					firstcap = 1;
-			}
-
-			// now finally set the captype
-			if (ncap == 0) {
-				return InternalConstants.NOCAP;
-			} else if ((ncap == 1) && firstcap) {
-				return InternalConstants.INITCAP;
-			} else if ((ncap == word.length) || ((ncap + nneutral) == word.length)) {
-				return InternalConstants.ALLCAP;
-			} else if ((ncap > 1) && firstcap) {
-				return InternalConstants.HUHINITCAP;
-			}
-			return InternalConstants.HUHCAP;			
-	    }
-
-	    public static function getCapType(word:String):int {
-			// now determine the capitalization type of the first nl letters
-			var ncap:int = 0;
-			var nneutral:int = 0;
-			var firstcap:int = 0;
-			// Potential improvment 1:
-			// It could be updated to user gslib StringUtils class in the future( after we have argo player 10.1 public). It is better for locale correction.
-			// at that time, we should consider about german language sharp SS -> beta case... the only case for changing the string length.
-			// Potential improvement 2:
-			// Using a hard code mapping table to convert the string to lowercase or uppercase. It is better for perfermance...
-			
-			if ( word == null || word=="" ) return InternalConstants.NOCAP;
-			var lowerStr:String = word.toLocaleLowerCase();
-			var upperStr:String = word.toLocaleUpperCase();
-			//trying to find if non word characters are present
-			/*var nonWordCharRegex:RegExp = /\b\w+\b/;
-			var resNonWord:Array = word.match( nonWordCharRegex);
-			if(word==resNonWord[0]) then return 
-			trace("the word: "+resNonWord[0]);
-			trace("cosdfasdfnd: "+(word==resNonWord[0])+" Word "+word);*/
-			//var testWord:String= word;
-			
-			//var nonWordIndex:int= word.search(containsNonWordCharRegex);
-			//trace("**NonwordIndex : "+nonWordIndex+" Word: "+word);
-			//if(nonWordIndex!=-1) 
-			
-			if ( word == lowerStr ) return InternalConstants.NOCAP;
-			if ( word == upperStr ) return InternalConstants.ALLCAP;
-			if ( upperStr == lowerStr ) return InternalConstants.NOCAP;
-			if ( word.charCodeAt(0) == upperStr.charCodeAt(0) && upperStr.charCodeAt(0) != lowerStr.charCodeAt(0) ) {
-				ncap = 1;
-				for ( var i:int = 1; i < word.length; ++i ) {
-					if ( word.charCodeAt(i) == upperStr.charCodeAt(i) && upperStr.charCodeAt(i) != lowerStr.charCodeAt(i) ) {
-						ncap++;
-						break;
-					}
-				}
-				if ( ncap == 1 )
-					return InternalConstants.INITCAP;
-				else 
-					return InternalConstants.HUHINITCAP;
-			}else {
-		    	return InternalConstants.HUHCAP;
-			}
-	
-	    }
-	    
-		/*
-		 * Deprecated function for now...
-		 * History: 
-		 *          A pre-version of implementation for error correction. After I optimized the code for performance,
-		 *          I drop this function by that time, but you know performance meassuring is a tricky problem... 
-		 * ToDo: Need a revisit when we implementing complex-affix support and compound-word support.
-		 */
-	    static public function lcs1(a:String, b:String):String {
-	    	var aSub:String = a.substr(0,a.length-1);
-	    	var bSub:String = b.substr(0, b.length -1 );
-	    	if ( a.length == 0 || b.length == 0 ) {
-	    		return "";
-	    	}else if ( a.charAt(a.length-1) == b.charAt(b.length-1) ) {
-	    		return lcs1(aSub,bSub) + a.charAt(a.length-1);
-	    	}else {
-	    		var x:String = lcs1(a,bSub);
-	    		var y:String = lcs1(aSub,b);
-	    		return (x.length > y.length) ? x: y;
-	    	}
-	    }
-
-		/*
-		 * Longest common subsequence problem
-		 * From Wikipedia, the free encyclopedia
-		 * Jump to: navigation, search
-		 * Not to be confused with longest common substring problem.
-		 * The longest common subsequence (LCS) problem is to find the longest subsequence 
-		 * common to all sequences in a set of sequences (often just two). It is a classic computer 
-		 * science problem, the basis of diff (a file comparison program that outputs the differences 
-		 * between two files), and has applications in bioinformatics.
-		 * 
-		 * URL: http://en.wikipedia.org/wiki/Longest_common_subsequence_problem
-		 */
-		static public function lcs(a:String, b:String):String {
-			var lengths:Array = new Array(a.length+1);
-			var i:int,j:int, x:int,y:int;
-			for ( i = 0 ; i< a.length+1; ++i ) {
-				lengths[i] = new Array(b.length+1);
-				for ( j=0; j< b.length+1; ++j) 
-					lengths[i][j]=0;
-			}
-			// row 0 and column 0 are initialized to 0 already
-			for ( i=0;i< a.length; ++i ) 
-				for( j=0;j<b.length; ++j)
-					if ( a.charAt(i) == b.charAt(j) )
-						lengths[i+1][j+1] = lengths[i][j] + 1;
-					else
-						 lengths[i+1][j+1] = Math.max(lengths[i+1][j], lengths[i][j+1]);
-			// read the substring out from the matrix
-			var res:String="";
-			for ( x = a.length,y=b.length; x!=0 && y!=0; ) {
-				if (lengths[x][y] == lengths[x-1][y])
-					x--;
-				else if ( lengths[x][y] == lengths[x][y-1] )
-					y--;
-				else {
-					res +=a.charAt(x-1);
-					x--;
-					y--;
-				}
-			}
-			return res.split("").reverse().join("");
-		}
-
-	    
-	    static public function lcslen( a:String, b:String) :int {
-	    	return lcs(a,b).length;
-	    } 
-	    
-	    static public function commonCharacterPositions( a:String, b:String, refObj:RefObject):int {
-			var num:int = 0, i:int;
-			var diff:int = 0;
-			var diffpos:Array = new Array(2);
-			refObj.ref  = 0;
-	    	b = b.toLocaleLowerCase();
-	    	for ( i =0; (i < a.length) && ( i<b.length); ++i ) {
-	    		if ( a.charAt(i) == b.charAt(i) ) {
-	    			num++;
-	    		}else {
-	    			if ( diff < 2) diffpos[diff] = i;
-	    			diff++;
-	    		}
-	    	}
-	    	if ( (diff == 2) && ( i=(a.length-1) ) && ( i==(b.length-1)) && (a.charCodeAt(diffpos[0]) == b.charCodeAt(diffpos[1])) && ( a.charCodeAt( diffpos[1]) == b.charCodeAt(diffpos[0]) ))
-	    		refObj.ref = 1;
-	    	
-	    	return num;
-	    }
-	    
-		/*
-		* To find if the Numbers are present in the word
-		* 
-		* returns true if hasNumber else returns false
-		*/
-		public static function getHasNumber(word:String):Boolean {
-			var i:int;
-			for ( i=0 ; i < word.length ; ++i ) {
-				if ( (word.charCodeAt(i) <= 57 ) && ( word.charCodeAt(i) >= 48) ) { // '0' to '9'
-					return true;
-				}
-			}
-			return false;
-		}
-	}
-}
-
-

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/utils/SuggestionsResult.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/utils/SuggestionsResult.as b/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/utils/SuggestionsResult.as
deleted file mode 100644
index 8a43921..0000000
--- a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/utils/SuggestionsResult.as
+++ /dev/null
@@ -1,142 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-
-
-package com.adobe.linguistics.spelling.core.utils
-{
-	public class SuggestionsResult
-	{
-		private var _myHeap:Array;
-		private var _count:uint=0;
-		private var _size:uint=1;
-		private var __compare:Function;
-		public function SuggestionsResult(buffersize:uint=100, compare:Function = null)
-		{
-			_size=buffersize;
-			_myHeap= new Array(_size+1);
-			_count=0;
-			if (compare == null)
-				__compare = function(a:int, b:int):int { return a - b; };
-			else
-				__compare = compare;
-		}
-		public function insert(obj:*):Boolean {
-			_myHeap[++_count]=obj;
-			return true;
-		}
-		public function find(obj:*):Boolean {
-			for (var i:int = 1; i <= _count; i++)
-			{
-				if (_myHeap[i] === obj)
-					return true;
-			}
-			return false;
-		}
-
-		public function get front():*
-		{
-			return this._myHeap[1];
-		}
-
-		public function get maxSize():int
-		{
-			return this._size;
-		}
-
-		public function isEmpty():Boolean
-		{
-			if (_count==0) {
-				return true;
-			}else {
-				return false;
-			}
-			
-		}
-		
-		public function clear():void
-		{
-			_myHeap = new Array(_size);
-			_count = 0;
-		}
-		
-		public function get size():uint {
-			return this._count;
-		}
-		
-		public function dump():String {
-			var s:String = "Suggestions Result\n{\n";
-			var k:int = _count + 1;
-			for (var i:int = 1; i < k; i++)
-				s += "\t" + _myHeap[i] + "\n";
-			s += "\n}";
-			return s;
-		}
-		
-		public function toArray():Array {
-			return _myHeap.slice(1,_count+1);
-		}
-		
-		
-		public function get data():Array {
-			return this._myHeap;
-		}
-		
-		public function buildheap():void {
-			if(this.size<2) {
-				return;
-			}
-			for ( var i:int=this.size/2;i>0;i--) {
-				minheapify(i);
-			}
-		}
-		
-		public function updateFront():void {
-			minheapify(1);
-		}
-		
-		private function minheapify(index:uint):void {
-			var i:int = index;
-			var child:int = i << 1;
-			var tmp:* = _myHeap[i];
-			var v:*;
-			
-			while (child <= _count)
-			{
-				if (child < _count - 1)
-				{
-					if (__compare(_myHeap[child], _myHeap[int(child + 1)]) > 0)
-						child++;
-				}
-				v = _myHeap[child];
-				if (__compare(tmp, v) > 0)
-				{
-					_myHeap[i] = v;
-					i = child;
-					child <<= 1;
-				}
-				else break;
-			}
-			_myHeap[i] = tmp;
-
-		}	
-		
-	}
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/utils/Token.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/utils/Token.as b/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/utils/Token.as
deleted file mode 100644
index 52e2c8a..0000000
--- a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/utils/Token.as
+++ /dev/null
@@ -1,47 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-
-
-
-
-package com.adobe.linguistics.spelling.utils
-{
-	public class Token
-	{
-		private var _first:uint;
-		private var _last:uint;
-		
-		public function Token(inFirst:uint, inLast:uint)
-		{
-			_first = inFirst;
-			_last = inLast;
-		}
-		
-		public function get first():uint
-		{
-			return _first;
-		}
-		
-		public function get last():uint
-		{
-			return _last;
-		}
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/utils/Tokenizer.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/utils/Tokenizer.as b/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/utils/Tokenizer.as
deleted file mode 100644
index 6ccbd8a..0000000
--- a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/utils/Tokenizer.as
+++ /dev/null
@@ -1,96 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-
-
-
-
-package com.adobe.linguistics.spelling.utils
-{
-
-	import com.adobe.linguistics.spelling.utils.Token;
-		
-	public class Tokenizer
-	{
-		private var _data:String;
-		private var _current:uint;
-
-		public function Tokenizer(inText:String)
-		{
-			_data = inText;
-			_current = 0;
-		}
-		public function next():Token
-		{
-			var first:uint;
-			var last:uint;
-			
-			if (_current==_data.length) return null;
-			while (isSeparator(_data.charAt(_current))) {
-				_current++;
-				if (_current==_data.length) return null;
-			}
-			first = _current;
-			while (!isSeparator(_data.charAt(_current))) {
-				_current++;
-				if (_current==_data.length) break;
-			}
-			last = _current;
-			
-			// Special handling for single quote
-			var charFirst:Number = _data.charCodeAt(first);
-			var charLast:Number = _data.charCodeAt(last-1);
-			if ((charFirst == 39) || (charFirst == 0x2018) || (charFirst == 0x2019)) first++;
-			if ((charLast == 39) || (charLast == 0x2018) || (charLast == 0x2019)) last--;
-			
-			return new Token(first, last);	
-		}
-		
-		private static var allValidChars:Array = [
-			{startingChar:65, endingChar:90}, /*Basic Latin bof */
-			{startingChar:97, endingChar:122},/*Basic Latin eof */
-			{startingChar:39, endingChar:39}, /* "'" character*/
-			{startingChar:0x2018, endingChar:0x2019}, /* "‘" and "’" character*/
-			{startingChar:192, endingChar:214},/* Latin-1 supplement  bof */
-			{startingChar:216, endingChar:246},
-			{startingChar:248, endingChar:255},/* Latin-1 supplement  eof */
-			{startingChar:256, endingChar:383},/* Lating Extended-A bof-eof    European Latin*/
-			{startingChar:384, endingChar:447}, /* Latin extended-B bof-eof */
-			{startingChar:48, endingChar:57}, /* number */
-			{startingChar:536, endingChar:537} /* "ş" character, for romanian */
-		];
-		private static function isValidCharacter( inChar:int ) :Boolean {
-			for ( var i:int = 0; i < allValidChars.length; ++i ) {
-				if ( (inChar >= allValidChars[i].startingChar) && (inChar <= allValidChars[i].endingChar) )
-					return true; 
-			}
-			return false;
-		} 
-		
-		public static function isSeparator(inChar:String):Boolean
-		{	
-			var ccode:Number = inChar.charCodeAt();
-			if ( isValidCharacter( ccode ) )
-				return false;
-			return true;
-		}
-
-	}
-	
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/utils/WordList.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/utils/WordList.as b/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/utils/WordList.as
deleted file mode 100644
index 358036b..0000000
--- a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/utils/WordList.as
+++ /dev/null
@@ -1,120 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-
-
-
-
-package com.adobe.linguistics.spelling.utils
-{
-	[RemoteClass]
-	public class WordList
-	{
-		private var _words:Array;
-		private var _sorted:Boolean;  // TODO: Shouldn't be always sorted?
-
-		public function WordList(wordsList:Array=null)
-		{
-			if(wordsList!=null) {
-				_words=wordsList;	
-			}else {
-				_words=new Array();
-			}
-			
-		}
-		
-		public function toArray():Array {
-			return this._words;
-		}
-
-		public function set data(inData:Array):void {
-			this._words = inData;
-		}
-		
-		public function get data():Array {
-			return this._words;
-		}
-		
-		public function insert(value:String):Boolean {
-			if( _words.length==0 ) {
-				_words.push(value)
-				return true;
-			}
-			var low:uint= 0;
-			var high:uint= _words.length-1;
-			var middle:uint= (low+high)/2;
-			while (low<high) {
-				if(_words[middle]<value) {
-					low=middle+1;
-				}else {
-					high=middle;
-				}
-				middle= (low+high)/2;
-			}
-			if( (low <= _words.length-1) && (_words[low]!=value) ) {
-				var pos:uint=_words[low]>value?low:low+1;
-				_words.splice(pos,0,value);
-				return true;
-			}else {
-				return false;
-			}
-			_words.push(value);
-			return true;
-		}
-		
-		public function remove(value:String):Boolean {
-			var pos:int= lookup(value);
-			if( pos!= -1 ) {
-				_words.splice(pos,1);
-				return true;
-			}else {
-				return false;
-			}
-		}
-		
-		//binary search to find the word.
-		public function lookup(value:String):int {
-			if(_words.length==0) {
-				return -1;
-			}
-			var low:uint= 0;
-			var high:uint= _words.length-1;
-			var middle:uint= (low+high)/2;
-			while (low<high) {
-				if(_words[middle]<value) {
-					low=middle+1;
-				}else {
-					high=middle;
-				}
-				middle= (low+high)/2;
-			}
-			if( (low <= _words.length-1) && (_words[low]==value) ) {
-				return low;
-			}else {
-				return -1;
-			}
-			
-		}
-		
-		public function mergeWordLists(list1:WordList,list2:WordList):WordList {
-			return null;
-		}
-
-	}
-}
\ No newline at end of file


[21/50] [abbrv] remove Adobe from directory names (package name still contains Adobe)

Posted by jm...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingFramework/asdocgen.bat
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingFramework/asdocgen.bat b/Squiggly/main/SpellingFramework/asdocgen.bat
new file mode 100644
index 0000000..b458486
--- /dev/null
+++ b/Squiggly/main/SpellingFramework/asdocgen.bat
@@ -0,0 +1,18 @@
+@echo off
+rem Licensed to the Apache Software Foundation (ASF) under one or more
+rem contributor license agreements.  See the NOTICE file distributed with
+rem this work for additional information regarding copyright ownership.
+rem The ASF licenses this file to You under the Apache License, Version 2.0
+rem (the "License"); you may not use this file except in compliance with
+rem the License.  You may obtain a copy of the License at
+rem
+rem     http://www.apache.org/licenses/LICENSE-2.0
+rem
+rem Unless required by applicable law or agreed to in writing, software
+rem distributed under the License is distributed on an "AS IS" BASIS,
+rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+rem See the License for the specific language governing permissions and
+rem limitations under the License.
+
+REM This generates the ASDoc for Engine and SInC. Modify the path as you need. TODO: move to build folder.
+"C:\Program Files\Adobe\Adobe Flash Builder 4\sdks\4.0.0\bin\asdoc" -source-path src -doc-classes com.adobe.linguistics.spelling.framework.ResourceConfig com.adobe.linguistics.spelling.framework.SpellingConfiguration com.adobe.linguistics.spelling.framework.SpellingService com.adobe.linguistics.spelling.framework.UserDictionary -library-path "C:\Program Files\Adobe\Adobe Flash Builder 4\sdks\4.0.0\frameworks\libs" -exclude-dependencies=true -output docs -main-title "AdobeSpellingFramework API Documentation 0.4" -package com.adobe.linguistics.spelling.framework "This package provides spell checking framework for easy integration with the Squiggly spelling engine."

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingFramework/src/com/adobe/linguistics/spelling/framework/ResourceTable.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingFramework/src/com/adobe/linguistics/spelling/framework/ResourceTable.as b/Squiggly/main/SpellingFramework/src/com/adobe/linguistics/spelling/framework/ResourceTable.as
new file mode 100644
index 0000000..a72a95d
--- /dev/null
+++ b/Squiggly/main/SpellingFramework/src/com/adobe/linguistics/spelling/framework/ResourceTable.as
@@ -0,0 +1,134 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+  
+package com.adobe.linguistics.spelling.framework
+{
+	import flash.utils.IDataInput;
+	import flash.utils.IDataOutput;
+	import flash.utils.IExternalizable;
+	
+	[RemoteClass(alias='com.adobe.linguistics.spelling.framework.ResourceConfig')]
+		
+	/**
+	 * The ResourceTable class contains a table mapping language to the spelling resources. Resources here imply the URL of rule file and dict file to be used for the language.
+	 * 
+	 * @includeExample ../Examples/Flex/ConfigExample/src/ConfigExample.mxml -noswf
+	 * @playerversion Flash 10
+	 * @langversion 3.0
+	 */
+	public class ResourceTable implements IExternalizable
+	{
+		private var _resources:Object;
+		
+		/**
+		 * Constructs a new ResourceTable object that performs language to resource mapping. 
+		 */
+		public function ResourceTable()
+		{
+			_resources = new Object();
+		}
+
+		/**
+		 * A list of languages supported in this ResourceTable
+		 */
+		public function get availableLanguages():Vector.<String>
+		{
+			var result:Vector.<String> = new Vector.<String>();
+			for (var i:String in _resources)
+			{
+				result.push(i);
+			}
+			return result;
+		}
+		
+		/**
+		 * Set the resource for the specified language.
+		 * 
+		 * @param language The language that you want to assign spelling resources to.
+		 * @param resource A <code>Object</code> that behave as an associated array, it 
+		 * contains the path(s) to the resource file(s). For the time being, the only 
+		 * supported resource is hunspell dictionary, which contains a rule file (.aff) and a 
+		 * dictionary file (.dic). 
+		 * 
+		 * @example The following code sets the resource for American English language.
+		 * <listing version="3.0">
+		 * var resourceTable:ResourceTable = new ResourceTable();
+		 * resourceTable.setResource("en_US", {rule:"en_US.aff", dict:"en_US.dic"});
+		 * </listing>
+		 */
+		public function setResource(language:String, resource:Object):void
+		{
+			_resources[language] = resource;
+		}
+		
+		/**
+		 * Get the resource for the specified language.
+		 * 
+		 * @param language The language associated with the resource you are looking for.
+		 * @return An <code>Object</code> that stores the resource file URL(s).
+		 * @example The following code gets and uses the resource for American English language.
+		 * <listing version="3.0">
+		 * var resource_en_US:Object = SpellingConfiguration.resourceTable.getResource("en_US");
+		 * trace("rule file:" + resource_en_US["rule"] + ", dictionary file:" + resource_en_US.dict);
+		 * </listing>
+		 */
+		public function getResource(language:String):Object
+		{
+			return _resources[language];
+		}
+		
+		/**
+		 * Overwrite toString() for debug purpose.
+		 * @private
+		 */
+		public function toString():String
+		{
+			var result:String = new String();
+			for (var i:String in _resources)
+			{
+				result += i;
+				result += ": ";
+				result += "[";
+				for (var j:String in getResource(i))
+				{
+					result += j + ":" + getResource(i)[j] + " "
+				}
+				result += "]";
+				result += "; ";
+			}
+			return result;
+		}
+		
+		/**
+		 * Implement this IExternalizable API so that it can be serialized to an ByteArray.
+		 * @private
+		 */
+		public function readExternal(input:IDataInput):void {
+			_resources = input.readObject();
+		}
+		
+		/**
+		 * Implement this IExternalizable API so that it can be serialized to an ByteArray.
+		 * @private
+		 */
+		public function writeExternal(output:IDataOutput):void {
+			output.writeObject(_resources);
+		}
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingFramework/src/com/adobe/linguistics/spelling/framework/SpellingConfiguration.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingFramework/src/com/adobe/linguistics/spelling/framework/SpellingConfiguration.as b/Squiggly/main/SpellingFramework/src/com/adobe/linguistics/spelling/framework/SpellingConfiguration.as
new file mode 100644
index 0000000..38f316a
--- /dev/null
+++ b/Squiggly/main/SpellingFramework/src/com/adobe/linguistics/spelling/framework/SpellingConfiguration.as
@@ -0,0 +1,102 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+  
+  
+package com.adobe.linguistics.spelling.framework
+{
+	
+	
+	import flash.errors.IllegalOperationError;
+	import com.adobe.linguistics.spelling.core.env.InternalConstants;
+	import com.adobe.linguistics.spelling.framework.ResourceTable;
+	
+	/**
+	 * The SpellingConfiguration is for setting and getting the configuration for the spell checker.
+	 * 
+	 * @includeExample ../Examples/Flex/ConfigExample/src/ConfigExample.mxml -noswf
+	 * @playerversion Flash 10
+	 * @langversion 3.0
+	 */
+	
+	public class SpellingConfiguration
+	{
+		
+
+		private static var _resourceTable:ResourceTable = null;
+		private static var _enableDictionarySplit:Boolean=false;//static value so can be initialised here
+		private static var _wordsPerDictionarySplit:int=InternalConstants.WORDS_PER_SPLIT;
+		
+		/**
+		 * The resourceTable is used for mapping the language to resources.
+		 */
+		public static function get resourceTable():ResourceTable
+		{
+			// Lazy initialization for the default value
+			if (_resourceTable == null) {
+				_resourceTable = new ResourceTable();
+				//_resourceTable.setResource("en_US", {rule:"data/en_US.aff", dict:"data/en_US.dic"});
+			}
+			return _resourceTable;	
+		}
+		
+		public static function set resourceTable(resourceTable:ResourceTable):void
+		{
+			_resourceTable = resourceTable;
+		}
+		
+		/**
+		 * This is a flag that enables/disables loading of dictionary in splits.
+		 * By default this flag is set to <code>false</code>. In case the initial loading time of dictionaries is found slow, this flag should be set to <code>true</code>. By enabling this, squiggly will load dictionary in splits with each split having <code>wordsPerDictionarySplit</code> number of words.
+		 * <p>NOTE: This property, if used, should be set before calling <code>SpellUI.enableSpeliing</code>. Once <code>SpellUI.enableSpeliing</code> is called dictionaries will be loaded according to default values, and this property will not be used. </p>
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */
+		public static function get enableDictionarySplit():Boolean
+		{
+			return _enableDictionarySplit;	
+		}
+		
+		public static function set enableDictionarySplit(enableDictionarySplit:Boolean):void
+		{
+			_enableDictionarySplit = enableDictionarySplit;
+		}
+		
+		/**
+		 * This property defines the number of words in one dictionary split.
+		 * By default the value of this property is set to 20000 words. This property is used only if <code>enableDictionarySplit</code> is set to <code>true</code>. If <code>enableDictionarySplit</code> is set to <code>flase</code> this property turns void.
+		 * <p>NOTE: This property, if used, should be defined before calling <code>SpellUI.enableSpeliing</code>. Once <code>SpellUI.enableSpeliing</code> is called dictionaries will be loaded according to default values, and this property will not be used.</p>
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */
+		public static function get wordsPerDictionarySplit():int
+		{
+			
+			return _wordsPerDictionarySplit;	
+		}
+		
+		public static function set wordsPerDictionarySplit(wordsPerDictionarySplit:int):void
+		{
+			if(wordsPerDictionarySplit<=0){
+				//Do error Handling
+				throw new IllegalOperationError("wordsPerDictionarySplit should be a positive non-zero value.");
+			}
+			_wordsPerDictionarySplit = wordsPerDictionarySplit;
+		}
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingFramework/src/com/adobe/linguistics/spelling/framework/SpellingService.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingFramework/src/com/adobe/linguistics/spelling/framework/SpellingService.as b/Squiggly/main/SpellingFramework/src/com/adobe/linguistics/spelling/framework/SpellingService.as
new file mode 100644
index 0000000..9e687ee
--- /dev/null
+++ b/Squiggly/main/SpellingFramework/src/com/adobe/linguistics/spelling/framework/SpellingService.as
@@ -0,0 +1,241 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+  
+  
+package com.adobe.linguistics.spelling.framework
+{
+	import com.adobe.linguistics.spelling.HunspellDictionary;
+	import com.adobe.linguistics.spelling.SpellChecker;
+	import com.adobe.linguistics.spelling.UserDictionary;
+	import com.adobe.linguistics.spelling.core.UserDictionaryEngine;
+	import com.adobe.linguistics.spelling.core.env.InternalConstants;
+	
+	import flash.events.Event;
+	import flash.events.EventDispatcher;
+//	import flash.utils.Timer;
+//	import flash.events.TimerEvent;
+	
+	/**
+	 * The SpellingService provides spell checking features for the specified language. 
+	 * This class makes use of SpellingConfiguration class to dynamically get the language dictionary location. The dictionaries are then loaded and SpellChecker object
+	 * created based on these dictionaries. SpellingService also caches SpellChecker and dictionary objects for individual languages for efficient reuse.
+	 * @includeExample ../Examples/Flex/SpellingServiceEsg/src/SpellingServiceEsg.mxml -noswf
+	 * @playerversion Flash 10
+	 * @langversion 3.0.
+	 * 
+	 */
+	public class SpellingService extends EventDispatcher
+	{
+		private var _language:String = null;
+		private var _engine:SpellChecker = null;
+		private var _udEngine:UserDictionaryEngine = null;
+		private var _userDictionaries:Array = new Array();
+		
+				
+		// Static table for caching engines and fixed dictionaries
+		private static var _engines:Array = new Array();
+		private static var _dicts:Array = new Array();
+		
+		/**
+		 * Constructs a spelling service object.
+		 *
+		 * @param language The language used to create a <code>SpellingService</code>.
+		 */
+		public function SpellingService(language:String)
+		{
+			_language = language;		
+		}
+
+		/**
+		 * Initialize the <code>SpellingService</code>. Once the initialization is done, an <code>Event.COMPLETE</code> event will be dispatched
+		 * and the <code>SpellingService</code> is ready to be used.
+		 */		
+		public function init():void
+		{
+			_udEngine = new UserDictionaryEngine();
+			
+			// Since the engine and dictionary are shared, the loading has three status
+			// Loaded
+			if (_engines[_language] != null)
+			{
+				loadDictComplete(null);
+			}
+			// Loading
+			else if (_dicts[_language] != null)
+			{
+				_dicts[_language].addEventListener(Event.COMPLETE, loadDictComplete);
+			}
+			// Loading not started
+			else
+			{			
+				var urls:Object = SpellingConfiguration.resourceTable.getResource(_language);
+				var hunspellDict:HunspellDictionary = new HunspellDictionary();
+				_dicts[_language] = hunspellDict;
+				hunspellDict.addEventListener(Event.COMPLETE, loadDictComplete);
+				/*added for check on 10-12-2010
+				var mytimer:Timer =new Timer(50,0);
+				mytimer.start();
+				var initTime:int =mytimer.currentCount;
+				trace(initTime);*/
+				
+				//adding code for enabling loading in parts. Since spelling service class needs SpellingConfiguration so it this property uses it.
+				hunspellDict.enableDictionarySplit=SpellingConfiguration.enableDictionarySplit;//user has to be freed from this. So we have to put a default value in SpellingConfiguration class.
+				hunspellDict.wordsPerDictionarySplit=SpellingConfiguration.wordsPerDictionarySplit;//user has to be freed from this. So we have to put a default value in SpellingConfiguration class.
+				
+				hunspellDict.load(urls["rule"], urls["dict"]);
+				/*var timePassed:int =mytimer.currentCount;
+				trace(timePassed);*/
+			}
+		}
+		
+		private function loadDictComplete(e:Event):void
+		{
+			if (_engines[_language] == null) {
+				_engines[_language] = new SpellChecker(_dicts[_language]);
+			}
+			_engine = _engines[_language];
+			dispatchEvent(new Event(Event.COMPLETE));
+		}
+	
+		/**
+		 * Check the spelling of a word.
+		 *
+		 * @param word The word to be checked.
+		 * @return True if the word is correctly spelled, false if it is misspelled.
+		 */		
+		public function checkWord(word:String):Boolean
+		{
+			return ((_udEngine.spell(word)) || (_engine.checkWord(word)));
+		}
+
+		/**
+		 * Get the suggestion of a misspelled word. 
+		 *
+		 * @param word The word to be checked.
+		 * @return A vector containing all suggestions for the misspelled word, ordered by similarity to the original word. 
+		 * Note that if a word is already correctly spelled, an empty Vector is returned.
+		 * @internal TODO: get the suggestions from user dicitonaries
+		 */			
+		public function getSuggestions(word:String):Vector.<String>
+		{
+			var resultArray:Array = _engine.getSuggestions(word);
+			
+			var resultVector:Vector.<String> = new Vector.<String>();
+			for each (var i:String in resultArray) {
+				resultVector.push(i);		
+			}
+			
+			return resultVector;
+		}
+		
+		/** 
+		 * Add a <code>UserDictionary</code> to the <code>SpellingService</code>.
+		 * 
+		 * @param userDictionary The UserDictionary to be added.
+		 * @return True if the UserDictionary is added successfully, false if any error occurs. An example error scenario: Trying to add a previously added user dictionary. 
+		 * @see UserDictionary
+		 */
+		public function addUserDictionary(userDictionary:UserDictionary):Boolean
+		{
+			if  (_udEngine.addDictionary(userDictionary.internalUserDictionary) == true)
+			{
+				_userDictionaries.push(userDictionary);
+				return true;
+			} 
+			
+			return false;
+		}
+
+		/** 
+		 * Remove a <code>UserDictionary</code> from the <code>SpellingService</code>.
+		 * 
+		 * @param userDictionary The UserDictionary to be removed.
+		 * @return True if the UserDictionary is removed successfully, false if any error occurs. An example error scenario: Trying to remove a user dictionary that has not been added previously. 
+		 * @see UserDictionary
+		 */		
+		public function removeUserDictionary(userDictionary:UserDictionary):Boolean
+		{
+			if (_udEngine.removeDictionary(userDictionary.internalUserDictionary) == true)
+			{
+				for ( var i:int =0; i < _userDictionaries.length; ++i ) {
+					if ( userDictionary == _userDictionaries[i] ) {
+						_userDictionaries.splice(i,1);
+						return true;
+					}
+				}
+			}
+			
+			return false;
+		}
+		
+		/**
+		 * A <code>Vector</code> of user dictionaries added to this <code>SpellingService</code>.
+		 * 
+		 * @return A <code>Vector</code> of <code>UserDictionary</code> objects.
+		 * @see UserDictionary
+		 */
+		public function get userDictionaries():Vector.<UserDictionary>
+		{	
+			var resultVector:Vector.<UserDictionary> = new Vector.<UserDictionary>;
+			for each (var i:UserDictionary in _userDictionaries) {
+				resultVector.push(i);		
+			}
+			
+			return resultVector;
+		}
+		
+		/**
+		 * This property controls if words in all upper-case should be considered as properly spelled or not.
+		 * 
+		 * <table class="innertable">
+		 *		<tr>
+		 *			<td align="center"><strong><code>ignoreWordWithAllUpperCase</code></strong></td>
+		 *			<td align="center"><strong>&#160;</strong></td>
+		 *			<td align="center"><strong>Description</strong></td>
+		 *		</tr>
+		 *		<tr>
+		 *			<td><code>false</code></td>
+		 *			<td>Default</td>
+		 *			<td><p>Words with all characters in upper case are checked against the dictionary for proper spelling.</p>
+		 *				<p>Example: if <code>ignoreWordWithAllUpperCase = false</code>, "MISPEL" will be checked for proper spelling.</p></td>
+		 *		</tr>
+		 *		<tr>
+		 *			<td><code>true</code></td>
+		 *			<td>&#160;</td>
+		 *			<td><p>Any words with all characters in upper case are always considered as properly spelled,
+		 *					no matter whether the word is in the dictionary or not.</p>
+		 *				<p>Example: if <code>ignoreWordWithAllUpperCase = true</code>, "MISPEL" will be considered as properly spelled.</p></td>
+		 *		</tr>
+		 *	</table>
+		 * */
+		/* Getter Function for ignoring all word with all upper case*/
+		public function get ignoreWordWithAllUpperCase():Boolean
+		{
+			return _engine.ignoreWordWithAllUpperCase;
+		}
+		/* Setter Function for ignoring all word with all upper case*/
+		public function set ignoreWordWithAllUpperCase(value:Boolean):void
+		{
+			_engine.ignoreWordWithAllUpperCase=value;
+		}
+		
+	}
+}
+
+

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/HaloHighlighter.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/HaloHighlighter.as b/Squiggly/main/SpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/HaloHighlighter.as
new file mode 100644
index 0000000..6945e20
--- /dev/null
+++ b/Squiggly/main/SpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/HaloHighlighter.as
@@ -0,0 +1,124 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package com.adobe.linguistics.spelling.framework.ui
+{
+	import __AS3__.vec.Vector;
+	
+	import com.adobe.linguistics.utils.Token;
+	
+	import flash.geom.Point;
+	import flash.text.TextField;
+	
+	import mx.core.IUITextField;
+
+	/**
+	 * <p>This class facilitates drawing of squiggly lines below words for TextField class. TextField class is used to create display objects for text display 
+	 * and input for Halo TextArea and TextInput components. HaloHighlighter could therefore be used for drawing squiggly lines in these Halo components.</p>
+	 * 	
+	 * @playerversion Flash 9.x
+	 * @langversion 3.0
+	 */
+
+	public class HaloHighlighter implements IHighlighter
+	{
+		private var mTextField:TextField;
+		private var mHighlighter:SpellingHighlighter;
+		/*
+		* offset point:
+		*/
+		private var _offsetPoint:Point;
+
+		/**
+		 * The constructor for HaloHighlighter.
+		 * @param textField <code>TextField</code> in which to enable highlighting.		 
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */
+		public function HaloHighlighter( textField:TextField )
+		{
+			if (textField == null ) throw new Error("illegal argument."); 
+			mTextField = textField;
+			mHighlighter = null;
+			this._offsetPoint = new Point(0,0);
+		}
+		/**
+		 * Draw squiggly lines below a given token.
+		 * @param token <code>Token</code> information of the word to be highlighted.		 
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */
+		public function drawSquiggleAt(token:Token):void
+		{
+			squiggleWord(token);
+		}
+		
+		/**
+		 * Clear all squiggly lines in the TextField.		
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */
+		public function clearSquiggles():void
+		{
+			if (mHighlighter) {
+				mTextField.parent.removeChild(mHighlighter);
+				mHighlighter=null;
+			}
+			
+		}
+		
+		/**
+		 * Set offset point information for scrollable controls. This is used by the highlighter to move 
+		 * the squiggly lines as the text scrolls inside the control.	
+		 * @param op offset information as a <code>Point</code> instance.		 
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */		
+		public function set offsetPoint(op:Point):void{
+			_offsetPoint = op;
+		}
+		
+		/**
+		 * Get offset point information for scrollable controls. This is used by the highlighter to move 
+		 * the squiggly lines as the text scrolls inside the control.	
+		 * @param op offset information as a <code>Point</code> instance.		 
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */		
+		public function get offsetPoint():Point{
+			return _offsetPoint;
+		}
+		
+
+		private function squiggleWord(token:Token):void {
+						
+			if (!mHighlighter) {
+				mHighlighter= new SpellingHighlighter( mTextField as IUITextField);
+				mTextField.parent.addChild(mHighlighter);				
+			}
+						
+			mHighlighter.drawSquigglyLine(token.first, token.last);
+		
+		
+			//mTextField.parent.addChild(mHighlighter);	
+			mHighlighter.move(_offsetPoint.x, _offsetPoint.y);
+		}
+
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/HaloWordProcessor.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/HaloWordProcessor.as b/Squiggly/main/SpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/HaloWordProcessor.as
new file mode 100644
index 0000000..cf77943
--- /dev/null
+++ b/Squiggly/main/SpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/HaloWordProcessor.as
@@ -0,0 +1,111 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package com.adobe.linguistics.spelling.framework.ui
+{
+	import com.adobe.linguistics.utils.ITokenizer;
+	import com.adobe.linguistics.utils.TextTokenizer;
+	import com.adobe.linguistics.utils.Token;
+	
+	import flash.text.TextField;
+	import flash.text.TextFormat;
+	
+	import mx.controls.TextArea;
+	import mx.controls.TextInput;
+
+
+	public class HaloWordProcessor implements IWordProcessor
+	{
+		private var mTextField:TextField;
+
+		public function HaloWordProcessor(textField:TextField)
+		{
+			if (textField == null ) throw new Error("illegal argument."); 
+			mTextField = textField;
+		}
+				
+		
+		public function replaceText(token:Token, replacement:String):void {
+			var startIndex:int = token.first;
+			var endIndex:int = token.last;
+			
+			if ( replacement == null ) return;
+			
+			if (mTextField.text.length<endIndex || startIndex<0) {
+				return;
+			}
+			
+			var _misspellStart:int = startIndex;
+			var _misspellEnd:int = endIndex;
+			// Try to preserve the format, this works if the whole misspelled word is the same format
+			var tf:TextFormat = mTextField.getTextFormat(_misspellStart, _misspellEnd);
+			mTextField.replaceText(_misspellStart, _misspellEnd, replacement);	
+			mTextField.setTextFormat(tf, _misspellStart, _misspellStart+replacement.length);
+			
+			var ta:TextArea = mTextField.parent as TextArea;
+			var ti:TextInput = mTextField.parent as TextInput;
+			
+			if (ta != null) {
+				ta.selectionBeginIndex = _misspellStart + replacement.length;
+				ta.selectionEndIndex = _misspellStart + replacement.length;
+			}
+			else if (ti != null) {
+				ti.selectionBeginIndex = _misspellStart + replacement.length;
+				ti.selectionEndIndex = _misspellStart + replacement.length;				
+			}
+			else {
+				// Do nothing if it's not a valid text component
+			}
+		}
+
+		
+		public function getWordAtPoint(x:uint, y:uint, externalTokenizer:ITokenizer=null):Token
+		{
+			var _token:Token = tryGetWordAtPoint(x,y, externalTokenizer);
+			return _token;
+		}
+		
+		private function tryGetWordAtPoint(x:uint, y:uint, externalTokenizer:ITokenizer=null):Token {
+			// TODO: use a better alternative than _misspellStart, end
+			var index:uint = mTextField.getCharIndexAtPoint(x + mTextField.scrollH, y);
+			if (index >= mTextField.text.length) return null;
+
+			var tmpToken:Token = new Token(index,index);
+			var tokenizer:ITokenizer;
+			if ( externalTokenizer == null ) {
+				tokenizer = new TextTokenizer(mTextField.text);	
+			}else {
+				tokenizer = externalTokenizer;
+			}
+			
+			var result:Token = new Token(0,0);
+			
+			var preToken:Token = tokenizer.getPreviousToken(tmpToken);
+			var nextToken:Token = tokenizer.getNextToken(tmpToken);
+			if ( preToken.last == nextToken.first ) {
+				result.first = preToken.first;
+				result.last = nextToken.last;
+				return result;		
+			}else {
+				return null;
+			}
+		}
+
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/IHighlighter.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/IHighlighter.as b/Squiggly/main/SpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/IHighlighter.as
new file mode 100644
index 0000000..a8b826f
--- /dev/null
+++ b/Squiggly/main/SpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/IHighlighter.as
@@ -0,0 +1,34 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package com.adobe.linguistics.spelling.framework.ui
+{
+	import com.adobe.linguistics.utils.Token;
+	import __AS3__.vec.Vector;
+	import flash.geom.Point;
+	
+	public interface IHighlighter
+	{
+		function drawSquiggleAt(token:Token):void;
+		function clearSquiggles():void;
+		function set offsetPoint(op:Point):void;
+		function get offsetPoint():Point;
+		
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/IWordProcessor.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/IWordProcessor.as b/Squiggly/main/SpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/IWordProcessor.as
new file mode 100644
index 0000000..76c3c8e
--- /dev/null
+++ b/Squiggly/main/SpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/IWordProcessor.as
@@ -0,0 +1,30 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package com.adobe.linguistics.spelling.framework.ui
+{
+	import com.adobe.linguistics.utils.ITokenizer;
+	import com.adobe.linguistics.utils.Token;
+	
+	public interface IWordProcessor
+	{
+		function getWordAtPoint(x:uint, y:uint, externalTokenizer:ITokenizer=null):Token;
+		function replaceText(token:Token, replacement:String):void;
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/SparkHighlighter.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/SparkHighlighter.as b/Squiggly/main/SpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/SparkHighlighter.as
new file mode 100644
index 0000000..fc5308d
--- /dev/null
+++ b/Squiggly/main/SpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/SparkHighlighter.as
@@ -0,0 +1,225 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package com.adobe.linguistics.spelling.framework.ui
+{
+	import com.adobe.linguistics.utils.Token;
+	import com.adobe.linguistics.utils.TextTokenizer;
+	import flash.geom.Point;
+	
+	import flash.display.Shape;
+	import flash.geom.Rectangle;
+	import flash.text.engine.TextLine;
+	
+	import flashx.textLayout.compose.TextFlowLine;
+	import flashx.textLayout.edit.SelectionManager;
+	import flashx.textLayout.elements.TextFlow;
+	import flashx.textLayout.tlf_internal;
+	
+	import spark.components.RichEditableText;
+	use namespace tlf_internal;	
+	
+	/**
+	 * <p>This class facilitates drawing of squiggly lines below words for RichEditableText class. RichEditableText is a low-level UIComponent for displaying, 
+	 * scrolling, selecting, and editing richly-formatted text. This class is used in the skins of the Spark versions of TextInput and TextArea. 
+	 * SparkHighlighter could therefore be used for drawing squiggly lines in these Spark components.</p>
+	 * 	
+	 * @playerversion Flash 10
+	 * @langversion 3.0
+	 */
+	public class SparkHighlighter implements IHighlighter
+	{
+		
+		private var mTextField:RichEditableText;
+		private var mHighlighter:Shape;
+		/*
+		* offset point:
+		*/
+		private var _offsetPoint:Point;
+
+		/**
+		 * The constructor for SparkHighlighter.
+		 * @param richEditableText <code>RichEditableText</code> in which to enable highlighting.		 
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */
+		public function SparkHighlighter( richEditableText:RichEditableText )
+		{
+			if (richEditableText == null ) throw new Error("illegal argument."); 
+			mTextField = richEditableText;
+			mHighlighter = null;
+			this._offsetPoint = new Point(0,0);
+		}
+
+		/**
+		 * Draw squiggly lines below a given token.
+		 * @param token <code>Token</code> information of the word to be highlighted.		 
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */
+		public function drawSquiggleAt(token:Token):void
+		{
+			squiggleWord(token);
+		}
+		
+		/**
+		 * Clear all squiggly lines in the component.		
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */
+		public function clearSquiggles():void
+		{
+			if (mHighlighter) {
+				mTextField.removeChild(mHighlighter);
+				mHighlighter=null;
+			}		
+		}
+		
+		/**
+		 * Set offset point information for scrollable controls. This is used by the highlighter to move 
+		 * the squiggly lines as the text scrolls inside the control.	
+		 * @param op offset information as a <code>Point</code> instance.		 
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */		
+		public function set offsetPoint(op:Point):void{
+			_offsetPoint = op;
+		}
+		
+		/**
+		 * Get offset point information for scrollable controls. This is used by the highlighter to move 
+		 * the squiggly lines as the text scrolls inside the control.	
+		 * @param op offset information as a <code>Point</code> instance.		 
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */		
+		public function get offsetPoint():Point{
+			return _offsetPoint;
+		}
+
+		
+
+		// TODO: refactor this code to share with halo components, and support words that cross lines
+		private function squiggleWord(token:Token):void {
+					
+			var ta:RichEditableText = mTextField;
+			if (!ta) return;		
+			
+			if (!mHighlighter) {
+				mHighlighter= new Shape();
+				mHighlighter.graphics.clear();
+				mTextField.addChild(mHighlighter);	
+			}
+					
+		        drawSquigglyLineForRange(token.first, token.last);
+			
+			// Just adjust the left padding, top padding is not an issue 
+			//var pleft:uint = mTextField.getStyle("paddingLeft");
+			//mHighlighter.x += pleft;		
+		}
+		
+		// Draw squiggly line
+		private function drawSquigglyLineForRange(start:Number, end:Number):void
+		{
+			// draw squiggly line
+			var tf:TextFlow = mTextField.textFlow;
+			var tflFirst:TextFlowLine = tf.flowComposer.findLineAtPosition(start);
+			var tflLast:TextFlowLine = tf.flowComposer.findLineAtPosition(end);
+			var tflIndexFirst:int = tf.flowComposer.findLineIndexAtPosition(start);
+			var tflIndexLast:int = tf.flowComposer.findLineIndexAtPosition(end);
+			
+			// Pointer
+			var tflIndex:int = tflIndexFirst;
+			var tfl:TextFlowLine = tflFirst;
+			
+			if (tflIndexFirst == tflIndexLast) {
+				// Draw one line
+				drawSquigglyLineAtIndex(tflIndexFirst, start - tflFirst.absoluteStart, end - tflFirst.absoluteStart);
+			} else {
+				// Multiple lines (very long word)
+				drawSquigglyLineAtIndex(tflIndexFirst, start - tflFirst.absoluteStart);
+				
+				tflIndex++;
+				while (tflIndex != tflIndexLast) {
+					drawSquigglyLineAtIndex(tflIndex);
+					tflIndex++;
+				}
+				
+				drawSquigglyLineAtIndex(tflIndexLast, 0, end - tflLast.absoluteStart);
+			}
+		}
+		
+		// Draw a squiggly line at specific line for specific index range
+		private function drawSquigglyLineAtIndex(lineIndex:Number, startIndex:Number=0, endIndex:Number=0x7FFFFFFF):void
+		{
+			var tf:TextFlow = mTextField.textFlow;
+			var tfl:TextFlowLine = tf.flowComposer.getLineAt(lineIndex);
+			var rectLine:Rectangle = tfl.getBounds();
+			if (endIndex == 0x7FFFFFFF) {
+				drawSquigglyLineAtPoint(rectLine.left, rectLine.bottom, rectLine.right - rectLine.left);
+			}
+			else {
+				// Force to have a valid TextLine
+				var tl:TextLine = tfl.getTextLine(true);
+				
+				// TODO: atom index and char index is not matching for some chars, use try/catch to avoid crash
+				try {
+					var rectFirst:Rectangle = tl.getAtomBounds(startIndex);
+					var rectLast:Rectangle = tl.getAtomBounds(endIndex);
+					drawSquigglyLineAtPoint(rectFirst.left + tfl.x, rectLine.bottom, rectLast.right - rectFirst.left);
+				} catch (err:Error)
+				{
+					//TODO: report error
+				}
+			}
+				
+		}
+		// Draw a squiggly from point x,y with given width, the line is drew in mHighlighter 
+		private function drawSquigglyLineAtPoint(x:Number, y:Number, width:Number):void
+		{
+			mHighlighter.graphics.lineStyle(1, 0xfa0707, .65);
+			mHighlighter.graphics.moveTo(x, y);
+			var upDirection:Boolean = false;
+			var offset:uint = 0;
+			var stepLength:uint = 2;
+			for ( var i:uint = 1; offset <= width; i++) {
+				offset = offset + stepLength;
+				if ( upDirection )
+					mHighlighter.graphics.lineTo(x+offset,y);
+				else
+					mHighlighter.graphics.lineTo(x+offset,y+stepLength);
+				upDirection = !upDirection;
+			}	
+		}
+		
+		private function getValidFirstWordIndex():int{
+			var index:int = SelectionManager.computeSelectionIndex(mTextField.textFlow, mTextField, mTextField, 0 + mTextField.horizontalScrollPosition, 0 + mTextField.verticalScrollPosition);
+			return index;
+
+			
+		}
+		
+		private function getValidLastWordIndex():int{
+			var index:int = SelectionManager.computeSelectionIndex(mTextField.textFlow, mTextField, mTextField, mTextField.width+mTextField.horizontalScrollPosition, mTextField.height+mTextField.verticalScrollPosition);
+			return index;
+
+		}
+
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/SparkWordProcessor.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/SparkWordProcessor.as b/Squiggly/main/SpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/SparkWordProcessor.as
new file mode 100644
index 0000000..c174eee
--- /dev/null
+++ b/Squiggly/main/SpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/SparkWordProcessor.as
@@ -0,0 +1,132 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package com.adobe.linguistics.spelling.framework.ui
+{
+	import com.adobe.linguistics.utils.ITokenizer;
+	import com.adobe.linguistics.utils.TextTokenizer;
+	import com.adobe.linguistics.utils.Token;
+	
+	import flashx.textLayout.edit.SelectionManager;
+	import flashx.textLayout.tlf_internal;
+	
+	import spark.components.RichEditableText;
+	
+	use namespace tlf_internal;	
+	
+	public class SparkWordProcessor implements IWordProcessor
+	{
+		private var mTextField:RichEditableText;
+
+		public function SparkWordProcessor(textField:RichEditableText)
+		{
+			if (textField == null ) throw new Error("illegal argument."); 
+			mTextField = textField;
+		}
+				
+		
+		public function replaceText(token:Token, replacement:String):void {
+			var startIndex:int = token.first;
+			var endIndex:int = token.last;
+			
+			var ta:RichEditableText = mTextField;
+			var end:int = getValidLastWordIndex();
+			
+			if ( replacement == null ) return;
+			
+			if (mTextField.text.length<endIndex || startIndex<0) {
+				return;
+			}
+			
+			var _misspellStart:int = startIndex;
+			var _misspellEnd:int = endIndex;
+			
+			// Workaround for Spark: changes in inactive components will trigger strange behavior			
+			//var selectedElementRange:ElementRange = ElementRange.createElementRange(ta.textFlow, _misspellStart, _misspellEnd);
+			//var selectedCharacterFormat:ITextLayoutFormat = ta.textFlow.interactionManager.activePosition == ta.textFlow.interactionManager.anchorPosition ? ta.textFlow.interactionManager.getCommonCharacterFormat() : selectedElementRange.characterFormat;
+			//var selectedParagraphFormat:ITextLayoutFormat = selectedElementRange.paragraphFormat;
+			//var selectedContainerFormat:ITextLayoutFormat = selectedElementRange.containerFormat;
+			
+			
+			
+			//var selectedCharacterFormat:ITextLayoutFormat = ta.textFlow.interactionManager.getCommonCharacterFormat();
+			//var selectedContainerFormat:ITextLayoutFormat = ta.textFlow.interactionManager.getCommonContainerFormat();
+			//var selectedParagraphFormat:ITextLayoutFormat = ta.textFlow.interactionManager.getCommonParagraphFormat();
+			
+			/*var tem:EditManager = new EditManager();
+			ta.textFlow.interactionManager = tem;	*/
+			
+			
+			ta.setFocus();
+			//ta.text = ta.text.substr(0, _misspellStart) + replacement + ta.text.substr(_misspellEnd);
+			
+			//tem.applyFormat(selectedCharacterFormat,selectedParagraphFormat,selectedContainerFormat);
+			//ta.textFlow.flowComposer.updateAllControllers();
+			
+			ta.textFlow;
+			//ta.selectRange(_misspellStart + replacement.length, _misspellStart + replacement.length);
+			ta.selectRange(_misspellStart+1, _misspellEnd);
+			ta.insertText(replacement);
+			ta.selectRange(_misspellStart, _misspellStart+1);
+			ta.insertText("");
+			
+			//ta.textFlow.interactionManager.applyFormat(selectedCharacterFormat,null,null);
+			
+			// Workaround for unexpected jump
+			ta.scrollToRange(end, end);
+		}
+		
+		public function getWordAtPoint(x:uint, y:uint, externalTokenizer:ITokenizer=null):Token
+		{
+			// TODO: use a better alternative than _misspellStart, end
+			var ta:RichEditableText = mTextField;	
+			var index:int = SelectionManager.computeSelectionIndex(ta.textFlow, ta, ta, x, y);
+
+			if (index >= ta.text.length) return null;
+
+			var tmpToken:Token = new Token(index,index);
+			var tokenizer:ITokenizer;
+			if ( externalTokenizer == null ) {
+				tokenizer = new TextTokenizer(mTextField.text);	
+			}else {
+				tokenizer = externalTokenizer;
+			}
+			
+			var result:Token = new Token(0,0);
+			var preToken:Token = tokenizer.getPreviousToken(tmpToken);
+			var nextToken:Token = tokenizer.getNextToken(tmpToken);
+			if ( preToken.last == nextToken.first ) {
+				result.first = preToken.first;
+				result.last = nextToken.last;
+				return result;		
+			}else {
+				return null;
+			}
+				
+		}
+
+		// TODO: workaround for unexpected jump when word replaced, to be refactored for code sharing
+		private function getValidLastWordIndex():int{
+			var index:int = SelectionManager.computeSelectionIndex(mTextField.textFlow, mTextField, mTextField, mTextField.width+mTextField.horizontalScrollPosition, mTextField.height+mTextField.verticalScrollPosition);
+			return index;
+		}
+
+
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/SpellingHighlighter.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/SpellingHighlighter.as b/Squiggly/main/SpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/SpellingHighlighter.as
new file mode 100644
index 0000000..5095331
--- /dev/null
+++ b/Squiggly/main/SpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/SpellingHighlighter.as
@@ -0,0 +1,179 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package com.adobe.linguistics.spelling.framework.ui
+{
+	import flash.display.Shape;
+	import flash.geom.Point;
+	import flash.geom.Rectangle;
+	import flash.text.TextLineMetrics;
+	
+	import mx.core.IUITextField;
+	import mx.flash.UIMovieClip;
+
+
+	public class SpellingHighlighter extends UIMovieClip
+	{
+		/*
+		* offset point:
+		*/
+		private var _offsetPoint:Point;
+		
+		/*
+		* Target TextField.
+		*/
+		private var _textField:IUITextField;
+		private static var InvalidIndexValue:int = -2;
+		public function SpellingHighlighter(textField:IUITextField) {
+			super();
+			this._textField = textField;
+			this._offsetPoint = new Point(0,0);
+		}
+		
+		public function drawSquigglyLine(firstCharIndex:int, lastCharIndex:int ):void {
+			var validFirstCharIndex:int = getValidFirstCharIndex(firstCharIndex);
+			var validLastCharIndex:int = getValidLastCharIndex(lastCharIndex);
+			if ( validFirstCharIndex == InvalidIndexValue || validLastCharIndex == InvalidIndexValue ){
+				return;
+			}
+			/* draw squiggly line here. */
+			if ( validFirstCharIndex <= validLastCharIndex ) {
+				var firstLine:int = _textField.getLineIndexOfChar(validFirstCharIndex);
+				var lastLine:int = _textField.getLineIndexOfChar(validLastCharIndex);
+				//only one line case.
+				if(lastLine==firstLine)
+				{
+					drawSingleSquigglyLine(validFirstCharIndex, validLastCharIndex);
+					return;
+				}
+				//more than one line.
+				//first line
+				drawSingleSquigglyLine(validFirstCharIndex, _textField.getLineOffset(firstLine)+_textField.getLineLength(firstLine)-1);
+				//middle....
+				for(var i:int=firstLine+1;i<lastLine;i++)
+				{
+					drawSingleSquigglyLine(_textField.getLineOffset(i), _textField.getLineOffset(i)+_textField.getLineLength(i)-1);
+				}
+				//last lines.
+				drawSingleSquigglyLine(_textField.getLineOffset(lastLine), validLastCharIndex);
+			}
+		}
+		
+		public function drawSingleSquigglyLine(firstCharIndex:int, lastCharIndex:int ):void {
+			var firstLine:int = _textField.getLineIndexOfChar(firstCharIndex);
+			var lastLine:int = _textField.getLineIndexOfChar(lastCharIndex);
+			if ( firstLine != lastLine ) {
+				return;
+			}else {
+				var rect1:Rectangle = _textField.getCharBoundaries(firstCharIndex);
+				var rect2:Rectangle = _textField.getCharBoundaries(lastCharIndex);
+				var x:Number = rect1.x+_offsetPoint.x - _textField.scrollH;
+				var y:Number = rect1.y + rect1.height + 2;
+				var width:Number = rect2.x+rect2.width-rect1.x;
+				
+				// Avoid drawing outside the textField
+				if (x<0) 
+				{
+					if (x+width > 0) {
+						width += x;
+						x = 0;
+					} 
+					else
+						return;
+				}
+				if (x+width > _textField.width) 
+				{
+					if (x < _textField.width) {
+						width = textField.width - x;
+					} 	
+					else
+						return;
+				}
+				
+				// The rectangle that bound the string you want
+				// actual work here.
+				var myShape:Shape = new Shape();
+				myShape.graphics.clear();
+				//myShape.graphics.beginFill(0x0099CC, .35); 
+				myShape.graphics.lineStyle(1, 0xfa0707, .65);
+				myShape.graphics.moveTo(x, y);
+				var upDirection:Boolean = false;
+				var offset:uint = 0;
+				var stepLength:uint = 2;
+				for ( var i:uint = 1; offset <= width; i++) {
+					offset = offset + stepLength;
+					if ( upDirection )
+						myShape.graphics.lineTo(x+offset,y);
+					else
+						myShape.graphics.lineTo(x+offset,y+stepLength);
+					upDirection = !upDirection;
+				}
+				//myShape.graphics.endFill();
+				this.addChild(myShape);	
+			}
+		}
+		
+		private function getValidFirstCharIndex(firstCharIndex:int):int{
+			if(firstCharIndex<0 || firstCharIndex>_textField.text.length-1) 
+			{
+				return InvalidIndexValue;
+			}
+			var firstLine:Number = _textField.getLineIndexOfChar(firstCharIndex);
+			
+			if(firstLine<_textField.scrollV-1)
+			{
+				firstLine = _textField.scrollV-1;
+				return _textField.getLineOffset(firstLine);
+			}
+			return firstCharIndex;
+		}
+		
+		private function getValidLastCharIndex(lastCharIndex:int):int{
+			if(lastCharIndex<0 || lastCharIndex>_textField.text.length-1) 
+			{
+				return InvalidIndexValue;
+			}
+			var lastLine:Number = _textField.getLineIndexOfChar(lastCharIndex);
+			if(lastLine>_textField.bottomScrollV-1)
+			{
+				lastLine = _textField.bottomScrollV-1;
+				return _textField.getLineOffset(lastLine)+_textField.getLineLength(lastLine)-1;
+			}
+			return lastCharIndex;
+		}
+					
+		public function set textField(tf:IUITextField):void{
+			_textField = tf;
+		}
+		
+		public function get textField():IUITextField{
+			return _textField;
+		}
+		
+		public function set offsetPoint(op:Point):void{
+			_offsetPoint = op;
+		}
+		
+		public function get offsetPoint():Point{
+			return _offsetPoint;
+		}
+
+
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/TLFHighlighter.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/TLFHighlighter.as b/Squiggly/main/SpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/TLFHighlighter.as
new file mode 100644
index 0000000..75f6576
--- /dev/null
+++ b/Squiggly/main/SpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/TLFHighlighter.as
@@ -0,0 +1,248 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package com.adobe.linguistics.spelling.framework.ui
+{
+	import com.adobe.linguistics.utils.TextTokenizer;
+	import com.adobe.linguistics.utils.Token;
+	
+	import flash.display.Graphics;
+	import flash.display.Shape;
+	import flash.display.Sprite;
+	import flash.geom.Point;
+	import flash.geom.Rectangle;
+	import flash.text.engine.TextLine;
+	import flash.utils.Dictionary;
+	
+	import flashx.textLayout.compose.TextFlowLine;
+	import flashx.textLayout.container.ContainerController;
+	import flashx.textLayout.edit.SelectionManager;
+	import flashx.textLayout.elements.TextFlow;
+	import flashx.textLayout.tlf_internal;
+
+
+	use namespace tlf_internal;	
+
+	/**
+	 * <p>This class facilitates drawing of squiggly lines below words for TLF TextFlow class.</p>
+	 * <p>The TextFlow class is responsible for managing all 
+	 * the text content of a story. In TextLayout, text is stored in a hierarchical tree of elements. TextFlow is the root object of the element tree. 
+	 * All elements on the tree derive from the base class, FlowElement. </p> 
+	 * TLFHighlighter could be used for drawing squiggly lines in any of the custom visual components(probably based on <code>Sprite</code>) which make use 
+	 * of TextFlow to display text.
+	 * 	
+	 * @playerversion Flash 10
+	 * @langversion 3.0
+	 */
+	public class TLFHighlighter implements IHighlighter
+	{
+		
+		private var mTextFlow:TextFlow;
+		private var mHighlighter:Dictionary;
+	
+		//private var mHighlighter:Shape;
+		private var ccindex:int;
+		private var cc:ContainerController;
+		/*
+		* offset point:
+		*/
+		private var _offsetPoint:Point;
+
+		/**
+		 * The constructor for TLFHighlighter.
+		 * @param textFlow <code>TextFlow</code> in which to enable highlighting.		 
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */
+		public function TLFHighlighter( textFlow:TextFlow )
+		{
+			if (textFlow == null ) throw new Error("illegal argument."); 
+			mTextFlow = textFlow;
+			//mHighlighter = null;
+			mHighlighter = new Dictionary(true);
+			this._offsetPoint = new Point(0,0);
+		}
+		/**
+		 * Draw squiggly lines below a given token.
+		 * @param token <code>Token</code> information of the word to be highlighted.		 
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */
+		public function drawSquiggleAt(token:Token):void
+		{
+			squiggleWord(token);
+		}
+		/**
+		 * Clear all squiggly lines in the component.		
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */
+		public function clearSquiggles():void
+		{
+			
+			for (var idx:int = 0; idx < mTextFlow.flowComposer.numControllers; idx++)
+			{	
+				var cctmp:ContainerController = mTextFlow.flowComposer.getControllerAt(idx);
+				if (mHighlighter[cctmp.container] != null) {
+					
+					//ToDO: This assumes single container for whole of mTextFlow. Need to implement for multiple container case.
+					cctmp.container.removeChild((mHighlighter[cctmp.container] as Shape));
+					
+					mHighlighter[cctmp.container] = null;
+				}	
+			}
+		}
+	
+		/**
+		 * Set offset point information for scrollable controls. This is used by the highlighter to move 
+		 * the squiggly lines as the text scrolls inside the control.	
+		 * @param op offset information as a <code>Point</code> instance.		 
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */		
+		public function set offsetPoint(op:Point):void{
+			_offsetPoint = op;
+		}
+		/**
+		 * Get offset point information for scrollable controls. This is used by the highlighter to move 
+		 * the squiggly lines as the text scrolls inside the control.	
+		 * @param op offset information as a <code>Point</code> instance.		 
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */	
+		public function get offsetPoint():Point{
+			return _offsetPoint;
+		}
+
+		
+
+		// TODO: refactor this code to share with halo components, and support words that cross lines
+		private function squiggleWord(token:Token):void {					
+			var ta:TextFlow = mTextFlow;
+			
+			if (!ta) return;		
+			ccindex = ta.flowComposer.findControllerIndexAtPosition(token.first);
+			
+			cc = ta.flowComposer.getControllerAt(ccindex);
+			
+			if (mHighlighter[cc.container] == null ) {
+				mHighlighter[cc.container]= new Shape();
+				(mHighlighter[cc.container] as Shape).graphics.clear();
+				//ccindex = ta.flowComposer.findControllerIndexAtPosition(token.first);
+				
+				//var cc:ContainerController = ta.flowComposer.getControllerAt(ccindex);
+				//ToDO: This assumes single container for whole of mTextFlow. Need to implement for multiple container case.
+				cc.container.addChild((mHighlighter[cc.container] as Shape));				
+			}
+					
+		    drawSquigglyLineForRange(token.first, token.last);
+			
+			// Just adjust the left padding, top padding is not an issue 
+			//var pleft:uint = mTextFlow.getStyle("paddingLeft");
+			//mHighlighter.x += pleft;		
+		}
+		
+		// Draw squiggly line
+		private function drawSquigglyLineForRange(start:Number, end:Number):void
+		{
+			// draw squiggly line
+			var tf:TextFlow = mTextFlow;
+			var tflFirst:TextFlowLine = tf.flowComposer.findLineAtPosition(start);
+			var tflLast:TextFlowLine = tf.flowComposer.findLineAtPosition(end);
+			var tflIndexFirst:int = tf.flowComposer.findLineIndexAtPosition(start);
+			var tflIndexLast:int = tf.flowComposer.findLineIndexAtPosition(end);
+			
+			// Pointer
+			var tflIndex:int = tflIndexFirst;
+			var tfl:TextFlowLine = tflFirst;
+			
+			if (tflIndexFirst == tflIndexLast) {
+				// Draw one line
+				drawSquigglyLineAtIndex(tflIndexFirst, start - tflFirst.absoluteStart, end - tflFirst.absoluteStart);
+			} else {
+				// Multiple lines (very long word)
+				drawSquigglyLineAtIndex(tflIndexFirst, start - tflFirst.absoluteStart);
+				
+				tflIndex++;
+				while (tflIndex != tflIndexLast) {
+					drawSquigglyLineAtIndex(tflIndex);
+					tflIndex++;
+				}
+				
+				drawSquigglyLineAtIndex(tflIndexLast, 0, end - tflLast.absoluteStart);
+			}
+		}
+		
+		// Draw a squiggly line at specific line for specific index range
+		private function drawSquigglyLineAtIndex(lineIndex:Number, startIndex:Number=0, endIndex:Number=0x7FFFFFFF):void
+		{
+			var tf:TextFlow = mTextFlow;
+			var tfl:TextFlowLine = tf.flowComposer.getLineAt(lineIndex);
+			var rectLine:Rectangle = tfl.getBounds(); 
+			if (endIndex == 0x7FFFFFFF) {
+				drawSquigglyLineAtPoint(rectLine.left, rectLine.bottom, rectLine.right - rectLine.left, lineIndex);
+			}
+			else {
+				// Force to have a valid TextLine
+				var tl:TextLine = tfl.getTextLine(true);
+				
+				// TODO: atom index and char index is not matching for some chars, use try/catch to avoid crash
+				try {
+					var rectFirst:Rectangle = tl.getAtomBounds(startIndex);
+					var rectLast:Rectangle = tl.getAtomBounds(endIndex);
+					drawSquigglyLineAtPoint(rectFirst.left + tfl.x, rectLine.bottom, rectLast.right - rectFirst.left, lineIndex);
+				} catch (err:Error)
+				{
+					//TODO: report error
+				}
+			}
+				
+		}
+		// Draw a squiggly from point x,y with given width, the line is drawn in mHighlighter 
+		private function drawSquigglyLineAtPoint(x:Number, y:Number, width:Number, lineIndex:Number):void
+		{
+			var tf:TextFlow = mTextFlow;
+			var tfl:TextFlowLine = tf.flowComposer.getLineAt(lineIndex);
+			var tl:TextLine = tfl.getTextLine(true);
+						
+			(mHighlighter[cc.container] as Shape).graphics.lineStyle(1, 0xfa0707, .65);
+			(mHighlighter[cc.container] as Shape).graphics.moveTo(x, y);
+			var upDirection:Boolean = false;
+			var offset:uint = 0;
+			var stepLength:uint = 2;
+			for ( var i:uint = 1; offset <= width; i++) {
+				offset = offset + stepLength;
+				if ( upDirection )
+					(mHighlighter[cc.container] as Shape).graphics.lineTo(x+offset,y);
+				else
+					(mHighlighter[cc.container] as Shape).graphics.lineTo(x+offset,y+stepLength);
+				upDirection = !upDirection;
+			}
+			
+			//tl.addChild(mHighlighter);
+						
+			//tf.flowComposer.updateToController(ccindex);
+
+		}
+		
+
+	}
+	
+}
+

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/TLFWordProcessor.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/TLFWordProcessor.as b/Squiggly/main/SpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/TLFWordProcessor.as
new file mode 100644
index 0000000..f506227
--- /dev/null
+++ b/Squiggly/main/SpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/TLFWordProcessor.as
@@ -0,0 +1,156 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package com.adobe.linguistics.spelling.framework.ui
+{
+	import com.adobe.linguistics.utils.ITokenizer;
+	import com.adobe.linguistics.utils.TextTokenizer;
+	import com.adobe.linguistics.utils.Token;
+	
+	import flashx.textLayout.edit.SelectionManager;
+	import flashx.textLayout.edit.EditManager;
+	import flashx.textLayout.tlf_internal;
+	import flashx.textLayout.elements.TextFlow;
+	
+	import flashx.textLayout.container.ContainerController;
+	import flashx.textLayout.elements.FlowLeafElement;
+	import flashx.textLayout.elements.ParagraphElement;
+	
+	use namespace tlf_internal;	
+	
+	public class TLFWordProcessor implements IWordProcessor
+	{
+		private var mTextFlow:TextFlow;
+		private var _containerController:ContainerController;
+
+		public function TLFWordProcessor(textFlow:TextFlow)
+		{
+			if (textFlow == null ) throw new Error("illegal argument."); 
+			mTextFlow = textFlow;
+		}
+				
+		
+		public function replaceText(token:Token, replacement:String):void {
+			var startIndex:int = token.first;
+			var endIndex:int = token.last;
+			
+			var ta:TextFlow = mTextFlow;
+			//var end:int = getValidLastWordIndex();
+			
+			if ( replacement == null ) return;
+			
+			/*if (mTextFlow.text.length<endIndex || startIndex<0) {
+				return;
+			}*/
+			
+			var _misspellStart:int = startIndex;
+			var _misspellEnd:int = endIndex;
+			
+			// Workaround for Spark: changes in inactive components will trigger strange behavior			
+			//var selectedElementRange:ElementRange = ElementRange.createElementRange(ta.textFlow, _misspellStart, _misspellEnd);
+			//var selectedCharacterFormat:ITextLayoutFormat = ta.textFlow.interactionManager.activePosition == ta.textFlow.interactionManager.anchorPosition ? ta.textFlow.interactionManager.getCommonCharacterFormat() : selectedElementRange.characterFormat;
+			//var selectedParagraphFormat:ITextLayoutFormat = selectedElementRange.paragraphFormat;
+			//var selectedContainerFormat:ITextLayoutFormat = selectedElementRange.containerFormat;
+			
+			
+			
+			//var selectedCharacterFormat:ITextLayoutFormat = ta.textFlow.interactionManager.getCommonCharacterFormat();
+			//var selectedContainerFormat:ITextLayoutFormat = ta.textFlow.interactionManager.getCommonContainerFormat();
+			//var selectedParagraphFormat:ITextLayoutFormat = ta.textFlow.interactionManager.getCommonParagraphFormat();
+			
+			var tem:EditManager = ta.interactionManager as EditManager;
+			
+			
+			
+			//ta.setFocus();
+			//ta.text = ta.text.substr(0, _misspellStart) + replacement + ta.text.substr(_misspellEnd);
+			
+			//tem.applyFormat(selectedCharacterFormat,selectedParagraphFormat,selectedContainerFormat);
+			//ta.textFlow.flowComposer.updateAllControllers();
+			
+			//ta.textFlow;
+			//ta.selectRange(_misspellStart + replacement.length, _misspellStart + replacement.length);
+			
+			
+			tem.selectRange(_misspellStart+1, _misspellEnd);
+			tem.insertText(replacement);
+			tem.selectRange(_misspellStart, _misspellStart+1);
+			tem.insertText("");
+			
+			//ta.textFlow.interactionManager.applyFormat(selectedCharacterFormat,null,null);
+			
+			// Workaround for unexpected jump
+			//ta.scrollToRange(end, end);
+		}
+		
+		/**
+		 @private
+		 (This property is for Squiggly Developer use only.)
+		 */
+		public function set textFlowContainerController(value:ContainerController):void {
+			_containerController = value;
+		}
+		
+		public function getWordAtPoint(x:uint, y:uint, externalTokenizer:ITokenizer=null):Token
+		{
+			// TODO: use a better alternative than _misspellStart, end
+			var ta:TextFlow = mTextFlow;	
+									
+			var index:int = SelectionManager.computeSelectionIndex(ta, _containerController.container, _containerController.container, x, y);
+
+			if (index >= ta.textLength) return null;
+
+			var currentLeaf:FlowLeafElement = ta.findLeaf(index);
+			var currentParagraph:ParagraphElement = currentLeaf ? currentLeaf.getParagraph() : null;
+			
+			var paraStart:uint = currentParagraph.getAbsoluteStart();
+				
+			//tokenizer = new TextTokenizer(currentParagraph.getText().substring());
+			
+			var tmpToken:Token = new Token(index - paraStart,index - paraStart);
+			var tokenizer:ITokenizer;
+			if ( externalTokenizer == null ) {
+				tokenizer = new TextTokenizer(currentParagraph.getText().substring());	
+			}else {
+				tokenizer = externalTokenizer;
+			}
+			
+			var result:Token = new Token(0,0);
+			var preToken:Token = tokenizer.getPreviousToken(tmpToken);
+			var nextToken:Token = tokenizer.getNextToken(tmpToken);
+			if ( preToken.last == nextToken.first ) {
+				result.first = preToken.first + paraStart;
+				result.last = nextToken.last + paraStart;
+				return result;		
+			}else {
+				return null;
+			}
+							
+		}
+
+		// TODO: workaround for unexpected jump when word replaced, to be refactored for code sharing
+		private function getValidLastWordIndex():int{
+			var index:int = 0;
+			//var index:int = SelectionManager.computeSelectionIndex(mTextFlow.textFlow, mTextFlow, mTextFlow, mTextFlow.width+mTextFlow.horizontalScrollPosition, mTextFlow.height+mTextFlow.verticalScrollPosition);
+			return index;
+		}
+
+
+	}
+}
\ No newline at end of file


[20/50] [abbrv] remove Adobe from directory names (package name still contains Adobe)

Posted by jm...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingUI/src/com/adobe/linguistics/spelling/SpellUI.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingUI/src/com/adobe/linguistics/spelling/SpellUI.as b/Squiggly/main/SpellingUI/src/com/adobe/linguistics/spelling/SpellUI.as
new file mode 100644
index 0000000..426ca4c
--- /dev/null
+++ b/Squiggly/main/SpellingUI/src/com/adobe/linguistics/spelling/SpellUI.as
@@ -0,0 +1,562 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+ 
+package com.adobe.linguistics.spelling
+{
+	import com.adobe.linguistics.spelling.UserDictionary;
+	import com.adobe.linguistics.spelling.framework.ResourceTable;
+	import com.adobe.linguistics.spelling.framework.SpellingConfiguration;
+	import com.adobe.linguistics.spelling.framework.SpellingService;
+    import com.adobe.linguistics.spelling.ui.HaloHighlighter;
+    import com.adobe.linguistics.spelling.ui.HaloWordProcessor;
+    import com.adobe.linguistics.spelling.ui.IHighlighter;
+    import com.adobe.linguistics.spelling.ui.IWordProcessor;
+	import com.adobe.linguistics.utils.TextTokenizer;
+	import com.adobe.linguistics.utils.Token;
+	
+	import flash.events.Event;
+	import flash.events.FocusEvent;
+	import flash.geom.Point;
+	import flash.geom.Rectangle;
+	import flash.net.SharedObject;
+	import flash.net.URLLoader;
+	import flash.net.URLRequest;
+	import flash.text.TextField;
+	import flash.utils.Dictionary;
+	
+	import mx.controls.RichTextEditor;
+	import mx.controls.TextArea;
+	import mx.controls.TextInput;
+	import mx.core.UIComponent;
+	import mx.core.mx_internal;
+	import mx.events.ScrollEvent;
+	
+	use namespace mx_internal;
+	
+	/**
+	 * <p>A comprehensive convenience class that bundles a context menu UI, 
+	 * the spelling engine, the dictionary loader, and user dictionary support 
+	 * to enable a single-line integration of spell checking functionality into 
+	 * any text related Flex UI component.  While this class drastically simplifies 
+	 * the effort to enable spell checking functionality in a Flex UI component, 
+	 * it does shield the developer form controlling detailed behaviors of the spell 
+	 * checker and the user dictionary storage options. </p>
+	 *
+	 * <p>This class provides a simple UI for some standard Flex UI components.
+	 *	It is not intended to address a complete user interface.
+	 *	Instead, it presents a basic user interface for some commonly used Flex UI components.</p>
+	 *
+	 * <p>For advanced text editing applications, more complex features are likely required.
+	 *	For those applications, we recommend bypassing this class and utilizing the <code>SpellChecker</code> class directly.</p>
+	 *
+	 * <p><code>SpellUI</code> uses the AdobeSpellingConfig.xml file to lookup corresponding resource files for a given locale.
+	 * The default location of AdobeSpellingConfig.xml is [yourapplicationDirectory]/AdobeSpellingConfig.xml. This could be customized using 
+	 * <code>spellingConfigUrl</code> property of <code>SpellUI</code>. You don't have to change the content of this file. However,
+	 * if you want to add a new language, to use an alternative dictionary or to customize the location for your dictionaries, you can modify it. 
+	 * There's an known issue with IIS web server when loading dictionary files with unknown extensions, in which case you can modify the XML to work around it.</p><p>
+	 * A sample AdobeSpellingConfig.xml will look as follows:
+	 * <listing version="3.0">
+	 * <pre class="preWrapper">
+ 	 * &lt;?xml version=&quot;1.0&quot; encoding='UTF-8'?&gt;
+ 	 * &lt;SpellingConfig&gt;
+ 	 *   	&lt;LanguageResource language=&quot;English&quot; 	  languageCode=&quot;en_US&quot; ruleFile=&quot;dictionaries/en_US/en_US.aff&quot; dictionaryFile=&quot;dictionaries/en_US/en_US.dic&quot;/&gt;
+	 *    	&lt;LanguageResource language=&quot;Spanish&quot;    languageCode=&quot;es_ES&quot; ruleFile=&quot;dictionaries/es_ES/es_ES.aff&quot; dictionaryFile=&quot;dictionaries/es_ES/es_ES.dic&quot;/&gt;
+ 	 *   	&lt;LanguageResource language=&quot;Portuguese&quot; languageCode=&quot;pt_PT&quot; ruleFile=&quot;dictionaries/pt_PT/pt_PT.aff&quot; dictionaryFile=&quot;dictionaries/pt_PT/pt_PT.dic&quot;/&gt;
+ 	 *  	 &lt;LanguageResource language=&quot;Italian&quot; 	  languageCode=&quot;it_IT&quot; ruleFile=&quot;dictionaries/it_IT/it_IT.aff&quot; dictionaryFile=&quot;dictionaries/it_IT/it_IT.dic&quot;/&gt;
+ 	 * &lt;/SpellingConfig&gt;</pre>
+	 *
+	 * </listing>
+	 * Note: The languageCode can be an arbitrary value, as long as you are consistent when passing them to the Squiggly classes. 
+	 * However, we highly encourage you to follow the two part Unicode language identifier format. 
+	 * For more information, please consult the latest Unicode Technical Standard that can be found at: http://unicode.org/reports/tr35/.</p>
+	 * 
+	 * @playerversion Flash 10
+	 * @langversion 3.0
+	 */
+	public class SpellUI
+	{
+		private var hh:IHighlighter;
+		private var hw:IWordProcessor;
+				
+		
+		private var _checkLastWord:Boolean = true;
+		
+		private var _spellingEnabled:Boolean;
+		
+		private var _actualParent:*;
+		private var isHaloComponent:Boolean;
+
+		//New Added below
+		private var mTextField:TextField;
+				
+		private var _dictname:String = new String();	
+		
+		private var _userdict:UserDictionary = null;
+		private var _sharedobj:SharedObject = null;
+		private var scm:SpellingContextMenu;	
+		private var _newchecker:SpellChecker = null;
+		private var _resource_locale:Object = null;
+		private var _spellingservice:SpellingService = null;
+		
+		private static var _contextMenuEntries:Object = {enable:"Enable Spelling", disable:"Disable Spelling", add:"Add to dictionary"};
+		private static var _spellingConfigUrl:String = "AdobeSpellingConfig.xml";
+		
+		private static var _UITable:Dictionary= new Dictionary();
+		private static var _parentTable:Dictionary= new Dictionary();
+		private static var _cacheDictTable:Dictionary= new Dictionary();
+		
+		private static var _configXML:XML = null;
+		private static var _configXMLLoading:Boolean = false;
+		private static var _configXMLLoader:URLLoader = new URLLoader();
+		
+		
+		
+		// Work around for the memory usage problem, ideally a better fix is to provide a dicitonary unload function
+		private static var _cache:Object = new Object();
+
+		/**
+		 * Enable the spell checking feature in the specified language for a UI component. Once a component is spell checking enabled, misspelled words will be highlighted with a squiggly line. Users can 
+		 * right click on a misspelled word to see the suggestions in the context menu.
+		 * 
+		 *
+		 *
+		 * @param comp	A text editing Flex UI component. It can be a mx <code>TextArea</code>, <code>TextInput</code> or <code>RichTextEditor</code>. 
+		 * If you are using AdobeSpellingUIEx.swc, it can also be a spark <code>TextArea</code> or <code>TextInput</code>.
+		 * @param lang	The language code used for spell checking, for example <code>en_US</code>. it will lookup the AdobeSpellingConfig.xml file to access corresponding resource files.
+		 * AdobeSpellingConfig.xml should be located at the same folder as your main mxml source file. You don't have to change the content of this file. However,
+		 * if you want to add a new language, to use an alternative dictionary or to customize the location for your dictionaries, you can modify it. There's an known issue with
+		 * IIS web server when loading dictionary files with unknown extensions, in which case you can modify the XML to work around it.
+		 * 
+		 * 
+		 *
+		 * @includeExample Examples/Flex/SquigglyUIExample/src/SquigglyUIExample.mxml
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */
+		public static function enableSpelling(comp:UIComponent, lang:String):void
+		{
+			if ( lang == null ) return;
+		 	// TODO: Change dict parameter type to a SpellCheck class or a URL string.
+			var txt:* = getComponentTextModel(comp);
+			
+			if ( txt==null || _UITable[comp]!=undefined )
+				return;
+			
+			// TODO: dangerous, is garbage collection going to clear this?
+			_UITable[comp]=new SpellUI(txt, lang);
+			_parentTable[txt] = comp;
+			_cacheDictTable[comp]=lang;
+		}
+		
+		/**
+		 * Set the spelling context menu entries. This uses the flex object as an associative array for extensibility. 
+		 * <code>entries</code> should have all the customized contextMenu entries including <code>enable (spelling), 
+		 * disable (spelling) and add (to dictionary)</code>. To ensure a consistent contextMenu within your application, 
+		 * the spelling context menu entries you provide here are applied to all UI components. We recommend you use this API
+		 * with Flex resource for localization. Make sure to also have a look at the Flex localization documentation.
+		 * 
+		 * @see http://livedocs.adobe.com/flex/3/html/help.html?content=l10n_1.html 
+		 * 
+		 * @param entries A flex Ojbect that looks like <code>entries:Object = {enable:"Enable Spelling", disable:"Disable Spelling", 
+		 * add:"Add to dictionary"}</code>. If you don't customize the contextMenu, the default contextMenu in English will be used.
+		 * We recommend that you use the Flex localization resource to obtain these strings. 
+		 * @return <code>True</code> if the spelling menu is successfully customized, <code>false</code> if it fails. Possible failure 
+		 * reasons include passing the wrong object or missing some required entries. If the function fails, the contextMenu is left unchanged.
+		 * 
+		 * 
+		 * @includeExample Examples/Flex/CustomContextMenu/src/CustomContextMenu.mxml
+		 * @includeExample Examples/Flex/ContextMenuWithResource/src/ContextMenuWithResource.mxml
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */
+		public static function setSpellingMenuEntries(entries:Object):Boolean
+		{
+			if (entries.enable && entries.disable && entries.add && (entries.enable != "") && (entries.disable != "") && (entries.add != ""))
+			{
+					_contextMenuEntries = entries;
+					return true;
+			}
+			else
+				return false;
+		}
+
+		/**
+		 * Get the spelling context menu entries. 
+		 * 
+		 * @return A flex <code>Object</code> containing the spelling context menu entries. If you haven't customized the entries, you get the default associative array <code>{enable:"Enable Spelling", disable:"Disable Spelling", add:"Add to dictionary"}</code>
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */		
+		public static function getSpellingMenuEntries():Object
+		{
+			return _contextMenuEntries;
+		}
+			
+		/**
+		 * The URL for the spelling config xml file. If you haven't specified it, the default URL is [applicationDirectory]/AdobeSpellingConfig.xml. Note that we don't validate the URL, if the file doesn't exist, you will get an error when calling enableSpelling() function.
+		 *
+		 * @example The following code customize the spellingConfigUrl before enabling spell checking.
+		 * <listing version="3.0">
+		 * SpellUI.spellingConfigUrl = "./config/MySpellingConfig.xml";
+		 * SpellUI.enableSpelling(textArea, "es_ES");
+		 * </listing>
+		 */
+		public static function get spellingConfigURL():String
+		{
+			return _spellingConfigUrl;
+		}
+		
+		public static function set spellingConfigURL(url:String):void
+		{
+			if (url == null) throw new Error("URL can't be null");
+			_spellingConfigUrl = url;
+		}
+		
+
+			
+		/**
+		 * Disable the spell checking feature for a UI component.
+		 * 
+		 * @param comp	A text editing Flex UI component.
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */
+		public static function disableSpelling(comp:UIComponent):void{
+			if ( _UITable[comp] == undefined )
+				return;
+			var _ui:SpellUI = _UITable[comp];
+			if ( _ui != null) _ui.cleanUp();
+			var dictName:String = _cacheDictTable[comp];
+			var cleanUPDictionaryCount:int = 0;
+			for each ( var _dictName:String in _cacheDictTable ) {
+				if ( _dictName == dictName  )
+					cleanUPDictionaryCount++;
+			}
+			if ( cleanUPDictionaryCount == 1 ) {
+				_cache[dictName] = undefined;
+			}
+			delete _UITable[comp];
+			delete _cacheDictTable[comp];
+			
+		}
+		
+		/**
+		 @private
+		 (This property is for Squiggly Developer use only.)
+		 */
+		public static function get UITable():Dictionary {
+			return _UITable;
+		}
+		
+		/**
+		 @private
+		 (This property is for Squiggly Developer use only.)
+		 */
+		public function set spellingEnabled(value:Boolean):void {
+			_spellingEnabled = value;
+		}
+		
+		/**
+		 @private
+		 (This property is for Squiggly Developer use only.)
+		 */
+		public static function get parentComp():Dictionary {
+			return _parentTable;
+		}
+		
+		private static function getComponentTextModel(comp:UIComponent):* {
+			var txt:TextField = null;
+			if ( (comp == null) || !( (comp is TextArea) || (comp is TextInput) || (comp is RichTextEditor) ) )
+				return null;
+			if ((comp as RichTextEditor) != null) {
+				txt = (comp as RichTextEditor).textArea.getTextField() as TextField;
+			}
+			else if ((comp as TextArea) != null){
+				txt = (comp as TextArea).getTextField() as TextField;
+			}
+			else if ((comp as TextInput) != null) {
+				txt = (comp as TextInput).getTextField() as TextField;
+			}
+			else {
+				// do nothing if it's not a valid text component
+				return null;
+			}
+			return txt;
+		}
+		
+		/**
+		 * Constructs a SpellUI object.
+		 *	@private
+		 *
+		 *	@param	textFiled	A Flex UI component to include spell-check capability
+		 * 	@param lang	The language code used for spell checking
+		 *
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */			
+		public function SpellUI(textModel:*, lang:String)
+		{		
+			// TODO: Consider making this method invisible to user, only expose the static function.
+			if ( textModel is TextField ) {
+				isHaloComponent=true;
+			}else {
+				// do nothing, we only accept textField and TextFlow here....
+				return;
+			}
+			_actualParent = textModel;
+			
+			//New Added below -- check if text field needs to be extracted from textModel
+			mTextField = textModel;
+						
+			mTextField.addEventListener(FocusEvent.FOCUS_OUT, handleFocusOut);
+			mTextField.addEventListener(ScrollEvent.SCROLL, spellCheckScreen);
+			mTextField.parent.addEventListener(Event.RENDER, spellCheckScreen);
+			mTextField.parent.addEventListener(Event.CHANGE, handleChangeEvent);
+			_dictname = lang;			
+			loadConfig();
+			
+		}
+		
+		private function spellCheckScreen(event:Event):void
+		{
+			doSpellingJob();
+		}
+		
+		private function handleFocusOut(event:FocusEvent):void
+		{
+			_checkLastWord = true;
+			doSpellingJob();
+		}
+		
+		private function handleChangeEvent( event:Event ) :void {
+			_checkLastWord = false;
+			doSpellingJob();
+		}
+				
+		/*private function doSpelling():void
+		{
+			_checkLastWord = true;
+			doSpellingJob();
+		}*/
+		
+		/**
+		 @private
+		 (This property is for Squiggly Developer use only.)
+		 */		
+		public function doSpellingJob():void
+		{
+			if (_spellingEnabled == false) return;
+			spellCheckRange(getValidFirstWordIndex(), getValidLastWordIndex());
+		}
+		
+		private function spellCheckRange(start:uint, end:uint):void {
+			//hh.preSpellCheckRange(start, end);
+			hh.clearSquiggles();
+			
+			//if (end <= start) return;
+			var firstLine:int = mTextField.getLineIndexOfChar(start);
+			var rect:Rectangle = mTextField.getCharBoundaries(start);
+			var counter:uint = start;
+			var numLines:Number = 0;
+			
+			/* mTextField.getCharBoundaries returns null for blank lines and for end of line characters. Placing this workaround
+			to count line heights until a non-null bounding rectangle is found */
+			
+			while (rect == null) {
+				if (counter+1 > end) {
+						rect = new Rectangle(0,0,0,0);
+						break;
+					}				
+				if(mTextField.text.charCodeAt(counter)<0x0300 || mTextField.text.charCodeAt(counter)>0x036F)//not in diacritic combining range
+				{
+					numLines += mTextField.getLineMetrics(firstLine).height;
+					firstLine++;
+				}
+				counter++;
+				rect = mTextField.getCharBoundaries(counter);
+			}
+			
+			var yoffset:Number = rect.y - numLines;	
+			var pleft:uint = (mTextField.parent as UIComponent).getStyle("paddingLeft");
+			var ptop:uint = (mTextField.parent as UIComponent).getStyle("paddingTop");
+			
+			var offsetPoint:Point = new Point(pleft, ptop-yoffset); 
+						
+			var tokenizer:TextTokenizer = new TextTokenizer(mTextField.text.substring(start,end));
+			//var seps:Vector.<int> = new Vector.<int>();
+			//seps.push(new int(34));
+			//tokenizer.ignoredSeperators = seps;
+			var tokens:Vector.<Token> = new Vector.<Token>();
+			
+			hh.offsetPoint = offsetPoint;
+			
+			for ( var token:Token = tokenizer.getFirstToken(); token != tokenizer.getLastToken(); token= tokenizer.getNextToken(token) ) {
+				var result:Boolean=_spellingservice.checkWord(mTextField.text.substring(token.first+start, token.last+start));					
+				if (!result){
+					if (_checkLastWord || (token.last+start != mTextField.text.length)) 
+						//hh.highlightWord(token.first+start, token.last+start-1);
+						//tokens.push(new Token(token.first+start, token.last+start-1));
+						hh.drawSquiggleAt(new Token(token.first+start, token.last+start-1));
+				}
+				
+			}
+			//hh.postSpellCheckRange(start, end);
+			//hh.offsetPoint = offsetPoint;
+			//hh.drawSquiggles(tokens);
+		}
+		
+		
+		private function getValidFirstWordIndex():int{
+			return mTextField.getLineOffset(mTextField.scrollV-1);
+		}
+		
+		private function getValidLastWordIndex():int{
+			return mTextField.getLineOffset(mTextField.bottomScrollV-1)+mTextField.getLineLength(mTextField.bottomScrollV-1);
+		}
+
+		private function loadConfig():void{
+			_resource_locale = SpellingConfiguration.resourceTable.getResource(_dictname);
+			
+			if ((_resource_locale != null) || (SpellUI._configXML != null)) 
+				loadConfigComplete(null);
+			else {	
+				SpellUI._configXMLLoader.addEventListener(Event.COMPLETE, loadConfigComplete);
+			
+				if (SpellUI._configXMLLoading == false)
+				{
+					SpellUI._configXMLLoader.load(new URLRequest(_spellingConfigUrl));
+					SpellUI._configXMLLoading = true;
+				}
+			}
+		}
+		
+		private function loadConfigComplete(evt:Event):void{
+			if (_resource_locale == null) {
+				if (SpellUI._configXML == null)
+					SpellUI._configXML= new XML(evt.target.data);
+			
+				SpellingConfiguration.resourceTable.setResource(_dictname,{rule:SpellUI._configXML.LanguageResource.(@languageCode==_dictname).@ruleFile, 
+																		dict:SpellUI._configXML.LanguageResource.(@languageCode==_dictname).@dictionaryFile});
+			}
+			//New Added
+			_spellingservice = new SpellingService(_dictname);
+			_spellingservice.addEventListener(Event.COMPLETE, loadDictComplete);
+			_spellingservice.init();
+		}
+		
+
+		
+		
+		private function loadDictComplete(evt:Event):void
+		{					
+			
+			
+			// Lazy loading the UD only when the main dict is loaded successfully
+			if ((SpellUI._cache["Squiggly_UD"] as UserDictionary) == null)
+			{
+				_sharedobj = SharedObject.getLocal("Squiggly_v03");
+				var vec:Vector.<String> = new Vector.<String>();
+				if (_sharedobj.data.ud) {
+					for each (var w:String in _sharedobj.data.ud)
+						vec.push(w);
+				}
+				_userdict = new UserDictionary(vec);
+				
+				SpellUI._cache["Squiggly_SO"] = _sharedobj;
+				SpellUI._cache["Squiggly_UD"] = _userdict;
+			}
+			else 
+			{
+				_sharedobj = SpellUI._cache["Squiggly_SO"];
+				_userdict = SpellUI._cache["Squiggly_UD"];
+			}
+			_spellingservice.addUserDictionary(_userdict);
+			//Adding default behaviour to accomodate ignoring of abbreviations bug#2756840
+			_spellingservice.ignoreWordWithAllUpperCase=true;
+			
+			
+			// Add the context menu, this might be not successful
+			scm = null;
+			try {
+				addContextMenu(null);
+			}
+			catch (err:Error)
+			{
+				// TODO: error handling here
+			}
+			_actualParent.addEventListener(Event.ADDED_TO_STAGE, addContextMenu);
+		}
+		
+
+		private function addContextMenu(event:Event):void
+		{
+			if ( scm != null ) return;
+			if ( isHaloComponent ) {
+				hh= new HaloHighlighter( _actualParent);
+				hw= new HaloWordProcessor( _actualParent);
+			}else {
+				trace("error now, later will be true");
+			}
+		
+			scm =  new SpellingContextMenu(hh, hw, _spellingservice, _actualParent, _actualParent.contextMenu); 
+			scm.setIgnoreWordCallback( addWordToUserDictionary );
+			
+			// Halo need this
+			if (_actualParent.contextMenu == null)
+			{
+				_actualParent.contextMenu = scm.contextMenu;
+			}
+			
+			//hh.spellingEnabled=true;
+			_spellingEnabled = true;
+			try {
+				doSpellingJob();
+			}
+			catch (err:Error)
+			{
+				// If it fails here, it should later triggered by the render event, so no need to do anything
+			}
+			
+			
+		}
+		
+		private function addWordToUserDictionary(word:String):void
+		{
+			_userdict.addWord(word);
+			
+			// TODO: serialization here might affect ther performance
+			_sharedobj.data.ud = _userdict.wordList;
+			
+		}
+		/**
+		 *	@private
+		 */
+		private function cleanUp():void {
+			hh.clearSquiggles();
+			scm.cleanUp();
+			_actualParent.removeEventListener(Event.ADDED_TO_STAGE, addContextMenu);
+			
+			mTextField.removeEventListener(ScrollEvent.SCROLL, spellCheckScreen);
+			mTextField.parent.removeEventListener(Event.RENDER, spellCheckScreen);
+			mTextField.parent.removeEventListener(Event.CHANGE, handleChangeEvent);
+			mTextField.removeEventListener(FocusEvent.FOCUS_OUT, handleFocusOut);	
+		}
+		
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingUI/src/com/adobe/linguistics/spelling/SpellingContextMenu.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingUI/src/com/adobe/linguistics/spelling/SpellingContextMenu.as b/Squiggly/main/SpellingUI/src/com/adobe/linguistics/spelling/SpellingContextMenu.as
new file mode 100644
index 0000000..d84f325
--- /dev/null
+++ b/Squiggly/main/SpellingUI/src/com/adobe/linguistics/spelling/SpellingContextMenu.as
@@ -0,0 +1,243 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package com.adobe.linguistics.spelling
+{
+	import com.adobe.linguistics.spelling.framework.SpellingService;
+	import com.adobe.linguistics.utils.Token;
+	import com.adobe.linguistics.utils.TextTokenizer;
+	
+	import flash.events.ContextMenuEvent;
+	import flash.events.Event;
+	import flash.events.EventDispatcher;
+	
+	import flash.ui.ContextMenu;
+	import flash.ui.ContextMenuItem;
+	
+	import flash.text.TextField;
+	import mx.core.UIComponent;
+	
+	import flash.geom.Point;
+	import flash.geom.Rectangle;
+	import com.adobe.linguistics.spelling.ui.IHighlighter;
+	import com.adobe.linguistics.spelling.ui.IWordProcessor;
+	
+	public class SpellingContextMenu
+	{
+		private var disableMenuItem:ContextMenuItem = new ContextMenuItem("Disable spell checking",true);
+		private var enableMenuItem:ContextMenuItem = new ContextMenuItem("Enable spell checking");
+		private var controlMenuItemList:Array = new Array();
+		private var suggestionMenuItemList:Array = new Array();
+		private var _spellingEnabled:Boolean;
+		private var _contextMenu:ContextMenu;
+		private var mTextHighlighter:IHighlighter;
+		private var mWordProcessor:IWordProcessor;
+		private var mSpellEngine:SpellingService;
+		private var mParentTextField:TextField;
+		private var _ignoreWordFunctionProcessor:Function;
+		private var _misspelledToken:Token;
+		private var _misspelled:String;
+		public function SpellingContextMenu(textHighlighter:IHighlighter, wordProcessor:IWordProcessor, engine:SpellingService, actualParent:*, contextMenu:ContextMenu=null)
+		{
+			
+			if ( textHighlighter == null || wordProcessor == null ||  engine == null) throw new Error("illegal argument."); 
+			mTextHighlighter = textHighlighter;
+			mWordProcessor = wordProcessor;
+			mSpellEngine = engine;
+			mParentTextField = actualParent;
+			if (contextMenu != null) {
+				_contextMenu =contextMenu;
+			}else {
+				_contextMenu = new ContextMenu();
+			}
+			enableMenuItem.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, handleEnableSpellCheck);
+			disableMenuItem.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, handleDisableSpellCheck);
+			controlMenuItemList.push(enableMenuItem);
+			controlMenuItemList.push(disableMenuItem);
+			
+			_contextMenu.customItems.push(disableMenuItem);
+			_contextMenu.customItems.push(enableMenuItem);
+			spellingEnabled = true; //default value
+			//spellingEnabled= mTextHighlighter.spellingEnabled;
+			_contextMenu.addEventListener(ContextMenuEvent.MENU_SELECT, handleContextMenuSelect);
+			_ignoreWordFunctionProcessor=null;
+		}
+		
+		public function cleanUp():void
+		{
+			mTextHighlighter=null;
+			mWordProcessor=null;
+			spellingEnabled = false;
+			_ignoreWordFunctionProcessor=null;
+			
+			_contextMenu.removeEventListener(ContextMenuEvent.MENU_SELECT, handleContextMenuSelect);
+			
+			var removedNum:int = 0;
+			var count:uint = _contextMenu.customItems.length;
+			for (var j:uint=count; j>0; j--) {
+				if ( isWordItem(_contextMenu.customItems[j-1]) || isControlItem(_contextMenu.customItems[j-1]) ) {
+					_contextMenu.customItems.splice(j-1,1);
+					removedNum++
+				}
+			}
+			if ( removedNum != suggestionMenuItemList.length + controlMenuItemList.length ) {
+				trace("internal error");
+			}
+			
+			suggestionMenuItemList = null;
+			controlMenuItemList = null;
+		}
+		
+		public function get contextMenu():ContextMenu {
+			return this._contextMenu;
+		}
+
+		private function handleContextMenuSelect(event:ContextMenuEvent):void
+		{
+			/* Clear the context menu */
+			//spellingEnabled= mTextHighlighter.spellingEnabled;
+			//SpellUI.doSpelling1();
+			var removedNum:int = 0;
+			var count:uint = _contextMenu.customItems.length;
+			for (var j:uint=count; j>0; j--) {
+				if ( isWordItem(_contextMenu.customItems[j-1]) ) {
+					_contextMenu.customItems.splice(j-1,1);
+					removedNum++
+				}
+			}
+			if ( removedNum != suggestionMenuItemList.length ) {
+				trace("internal error");
+			}
+			
+			
+			suggestionMenuItemList = new Array();
+	
+			// localized entries
+			var entries:Object = SpellUI.getSpellingMenuEntries();
+			disableMenuItem.caption = entries.disable;
+			enableMenuItem.caption = entries.enable;				
+
+			if (spellingEnabled == true) {
+				_misspelledToken = mWordProcessor.getWordAtPoint(mParentTextField.mouseX, mParentTextField.mouseY);
+				if (_misspelledToken==null) return;
+				_misspelled = 	mParentTextField.text.substring(_misspelledToken.first, _misspelledToken.last);
+				if ((_misspelled==null) || (_misspelled == "")) return;
+				
+				if (mSpellEngine.checkWord(_misspelled)==true) return;				
+				
+				var suseAddToItem:ContextMenuItem = new ContextMenuItem(entries.add);
+				suseAddToItem.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, handleAddToItemSelect);
+				suggestionMenuItemList.push(suseAddToItem);
+				_contextMenu.customItems.splice(0,0,suseAddToItem);	
+				//var result:Array = mWordProcessor.getSuggestionsAtPoint();
+				var resultVector:Vector.<String> = mSpellEngine.getSuggestions(_misspelled);
+				var result:Array = new Array();
+				if (resultVector) {
+					for each (var w:String in resultVector)
+					result.push(w);
+				}
+				if (result!=null) {
+					for (var i:int=result.length-1;i>=0;i-- ) {
+						var suseMenuItem:ContextMenuItem = new ContextMenuItem(result[i]);
+						suseMenuItem.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, handleSuseItemSelect);
+						suggestionMenuItemList.push(suseMenuItem);
+						//_contextMenu.customItems.push(suseMenuItem);
+						_contextMenu.customItems.splice(0,0,suseMenuItem);
+					}
+				}
+			}
+			
+
+			
+		}
+		
+		public function setIgnoreWordCallback(func:Function ) :void {
+			if ( func != null )
+			_ignoreWordFunctionProcessor = func;
+		}
+		
+		private function handleAddToItemSelect(event:ContextMenuEvent):void
+		{
+			if ( _ignoreWordFunctionProcessor == null ) return;
+			
+			/*
+			var menuEntry:String = (event.currentTarget as ContextMenuItem).caption;
+			var start:uint = 5;
+			var end:uint = menuEntry.length - 15;
+			var word:String = menuEntry.substring(start, end);
+			*/
+			_ignoreWordFunctionProcessor(_misspelled);
+			//SpellUI.UITable[SpellUI.parentComp[mParentTextField]].doSpellingJob();//Reason bug#2713972 Fix Added Under
+			//now implicitly calling dospelling on all text areas
+			for each (var tempUIComponent:SpellUI in SpellUI.UITable)
+			{
+				tempUIComponent.doSpellingJob();
+			}
+		}
+
+		private function isWordItem(item:ContextMenuItem):Boolean {
+			
+			for ( var i:int=0; i<suggestionMenuItemList.length; ++i ) {
+				if ( suggestionMenuItemList[i] == item ) return true;
+			}
+			return false;
+		}
+		
+		private function isControlItem(item:ContextMenuItem):Boolean {
+			for (var i:int=0; i<controlMenuItemList.length; ++i) {
+				if ( controlMenuItemList[i] == item) return true;
+			}
+			return false;
+		}
+
+		private function handleSuseItemSelect(event:ContextMenuEvent):void
+		{
+			mWordProcessor.replaceText(_misspelledToken, (event.currentTarget as ContextMenuItem).caption );
+			SpellUI.UITable[SpellUI.parentComp[mParentTextField]].doSpellingJob();
+		}
+
+		
+		private function set spellingEnabled(value:Boolean) :void {
+			_spellingEnabled = value;
+			disableMenuItem.visible=spellingEnabled;
+			enableMenuItem.visible=!spellingEnabled;
+		}
+		private function get spellingEnabled():Boolean {
+			return this._spellingEnabled;
+		}
+		private function handleEnableSpellCheck(event:ContextMenuEvent):void
+		{
+			spellingEnabled= true;
+			//mTextHighlighter.spellingEnabled= spellingEnabled;
+			//SpellUI.doSpellingJob();
+			//dispatchEvent(new Event(Event.RENDER));
+			
+			SpellUI.UITable[SpellUI.parentComp[mParentTextField]].spellingEnabled = spellingEnabled;
+			SpellUI.UITable[SpellUI.parentComp[mParentTextField]].doSpellingJob();
+			//spellCheckRange(getValidFirstWordIndex(), getValidLastWordIndex());
+		}
+		private function handleDisableSpellCheck(event:ContextMenuEvent):void
+		{
+			spellingEnabled= false;
+			SpellUI.UITable[SpellUI.parentComp[mParentTextField]].spellingEnabled = spellingEnabled;
+			mTextHighlighter.clearSquiggles();
+		}
+				
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingUI/src/com/adobe/linguistics/spelling/ui/HaloHighlighter.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingUI/src/com/adobe/linguistics/spelling/ui/HaloHighlighter.as b/Squiggly/main/SpellingUI/src/com/adobe/linguistics/spelling/ui/HaloHighlighter.as
new file mode 100644
index 0000000..91b0d5f
--- /dev/null
+++ b/Squiggly/main/SpellingUI/src/com/adobe/linguistics/spelling/ui/HaloHighlighter.as
@@ -0,0 +1,126 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package com.adobe.linguistics.spelling.ui
+{
+	import __AS3__.vec.Vector;
+	
+	import com.adobe.linguistics.utils.Token;
+	
+	import flash.geom.Point;
+	import flash.text.TextField;
+	
+	import mx.core.IUITextField;
+	import com.adobe.linguistics.spelling.ui.IHighlighter;
+	import com.adobe.linguistics.spelling.ui.SpellingHighlighter;
+
+	/**
+	 * <p>This class facilitates drawing of squiggly lines below words for TextField class. TextField class is used to create display objects for text display 
+	 * and input for Halo TextArea and TextInput components. HaloHighlighter could therefore be used for drawing squiggly lines in these Halo components.</p>
+	 * 	
+	 * @playerversion Flash 10
+	 * @langversion 3.0
+	 */
+
+	public class HaloHighlighter implements IHighlighter
+	{
+		private var mTextField:TextField;
+		private var mHighlighter:SpellingHighlighter;
+		/*
+		* offset point:
+		*/
+		private var _offsetPoint:Point;
+
+		/**
+		 * The constructor for HaloHighlighter.
+		 * @param textField <code>TextField</code> in which to enable highlighting.		 
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */
+		public function HaloHighlighter( textField:TextField )
+		{
+			if (textField == null ) throw new Error("illegal argument."); 
+			mTextField = textField;
+			mHighlighter = null;
+			this._offsetPoint = new Point(0,0);
+		}
+		/**
+		 * Draw squiggly lines below a given token.
+		 * @param token <code>Token</code> information of the word to be highlighted.		 
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */
+		public function drawSquiggleAt(token:Token):void
+		{
+			squiggleWord(token);
+		}
+		
+		/**
+		 * Clear all squiggly lines in the TextField.		
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */
+		public function clearSquiggles():void
+		{
+			if (mHighlighter) {
+				mTextField.parent.removeChild(mHighlighter);
+				mHighlighter=null;
+			}
+			
+		}
+		
+		/**
+		 * Set offset point information for scrollable controls. This is used by the highlighter to move 
+		 * the squiggly lines as the text scrolls inside the control.	
+		 * @param op offset information as a <code>Point</code> instance.		 
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */		
+		public function set offsetPoint(op:Point):void{
+			_offsetPoint = op;
+		}
+		
+		/**
+		 * Get offset point information for scrollable controls. This is used by the highlighter to move 
+		 * the squiggly lines as the text scrolls inside the control.	
+		 * @param op offset information as a <code>Point</code> instance.		 
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */		
+		public function get offsetPoint():Point{
+			return _offsetPoint;
+		}
+		
+
+		private function squiggleWord(token:Token):void {
+						
+			if (!mHighlighter) {
+				mHighlighter= new SpellingHighlighter( mTextField as IUITextField);
+				mTextField.parent.addChild(mHighlighter);				
+			}
+						
+			mHighlighter.drawSquigglyLine(token.first, token.last);
+		
+		
+			//mTextField.parent.addChild(mHighlighter);	
+			mHighlighter.move(_offsetPoint.x, _offsetPoint.y);
+		}
+
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingUI/src/com/adobe/linguistics/spelling/ui/HaloWordProcessor.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingUI/src/com/adobe/linguistics/spelling/ui/HaloWordProcessor.as b/Squiggly/main/SpellingUI/src/com/adobe/linguistics/spelling/ui/HaloWordProcessor.as
new file mode 100644
index 0000000..9c05b3b
--- /dev/null
+++ b/Squiggly/main/SpellingUI/src/com/adobe/linguistics/spelling/ui/HaloWordProcessor.as
@@ -0,0 +1,112 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package com.adobe.linguistics.spelling.ui
+{
+	import com.adobe.linguistics.utils.ITokenizer;
+	import com.adobe.linguistics.utils.TextTokenizer;
+	import com.adobe.linguistics.utils.Token;
+	
+	import flash.text.TextField;
+	import flash.text.TextFormat;
+	
+	import mx.controls.TextArea;
+	import mx.controls.TextInput;
+	import com.adobe.linguistics.spelling.ui.IWordProcessor;
+
+
+	public class HaloWordProcessor implements IWordProcessor
+	{
+		private var mTextField:TextField;
+
+		public function HaloWordProcessor(textField:TextField)
+		{
+			if (textField == null ) throw new Error("illegal argument."); 
+			mTextField = textField;
+		}
+				
+		
+		public function replaceText(token:Token, replacement:String):void {
+			var startIndex:int = token.first;
+			var endIndex:int = token.last;
+			
+			if ( replacement == null ) return;
+			
+			if (mTextField.text.length<endIndex || startIndex<0) {
+				return;
+			}
+			
+			var _misspellStart:int = startIndex;
+			var _misspellEnd:int = endIndex;
+			// Try to preserve the format, this works if the whole misspelled word is the same format
+			var tf:TextFormat = mTextField.getTextFormat(_misspellStart, _misspellEnd);
+			mTextField.replaceText(_misspellStart, _misspellEnd, replacement);	
+			mTextField.setTextFormat(tf, _misspellStart, _misspellStart+replacement.length);
+			
+			var ta:TextArea = mTextField.parent as TextArea;
+			var ti:TextInput = mTextField.parent as TextInput;
+			
+			if (ta != null) {
+				ta.selectionBeginIndex = _misspellStart + replacement.length;
+				ta.selectionEndIndex = _misspellStart + replacement.length;
+			}
+			else if (ti != null) {
+				ti.selectionBeginIndex = _misspellStart + replacement.length;
+				ti.selectionEndIndex = _misspellStart + replacement.length;				
+			}
+			else {
+				// Do nothing if it's not a valid text component
+			}
+		}
+
+		
+		public function getWordAtPoint(x:uint, y:uint, externalTokenizer:ITokenizer=null):Token
+		{
+			var _token:Token = tryGetWordAtPoint(x,y, externalTokenizer);
+			return _token;
+		}
+		
+		private function tryGetWordAtPoint(x:uint, y:uint, externalTokenizer:ITokenizer=null):Token {
+			// TODO: use a better alternative than _misspellStart, end
+			var index:uint = mTextField.getCharIndexAtPoint(x + mTextField.scrollH, y);
+			if (index >= mTextField.text.length) return null;
+
+			var tmpToken:Token = new Token(index,index);
+			var tokenizer:ITokenizer;
+			if ( externalTokenizer == null ) {
+				tokenizer = new TextTokenizer(mTextField.text);	
+			}else {
+				tokenizer = externalTokenizer;
+			}
+			
+			var result:Token = new Token(0,0);
+			
+			var preToken:Token = tokenizer.getPreviousToken(tmpToken);
+			var nextToken:Token = tokenizer.getNextToken(tmpToken);
+			if ( preToken.last == nextToken.first ) {
+				result.first = preToken.first;
+				result.last = nextToken.last;
+				return result;		
+			}else {
+				return null;
+			}
+		}
+
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingUI/src/com/adobe/linguistics/spelling/ui/IHighlighter.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingUI/src/com/adobe/linguistics/spelling/ui/IHighlighter.as b/Squiggly/main/SpellingUI/src/com/adobe/linguistics/spelling/ui/IHighlighter.as
new file mode 100644
index 0000000..3b5a309
--- /dev/null
+++ b/Squiggly/main/SpellingUI/src/com/adobe/linguistics/spelling/ui/IHighlighter.as
@@ -0,0 +1,67 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package com.adobe.linguistics.spelling.ui
+{
+	import com.adobe.linguistics.utils.Token;
+	import __AS3__.vec.Vector;
+	import flash.geom.Point;
+	
+	/**
+	 * The <code>IHighlighter</code> Interface.
+	 * This interface defines default methods which will be used for highlighting text in UI components.
+	 *
+	 * @playerversion Flash 10
+	 * @langversion 3.0
+	 */
+	
+	public interface IHighlighter
+	{
+		/**
+		 * Draw squiggly lines below a given token.
+		 * @param token <code>Token</code> information of the word to be highlighted.		 
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */
+		function drawSquiggleAt(token:Token):void;
+		/**
+		 * Clear all squiggly lines in the UI.		
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */
+		function clearSquiggles():void;
+		/**
+		 * Set offset point information for scrollable controls. This is used by the highlighter to move 
+		 * the squiggly lines as the text scrolls inside the control.	
+		 * @param op offset information as a <code>Point</code> instance.		 
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */		
+		function set offsetPoint(op:Point):void;
+		/**
+		 * Get offset point information for scrollable controls. This is used by the highlighter to move 
+		 * the squiggly lines as the text scrolls inside the control.	
+		 * @param op offset information as a <code>Point</code> instance.		 
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */		
+		function get offsetPoint():Point;
+		
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingUI/src/com/adobe/linguistics/spelling/ui/IWordProcessor.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingUI/src/com/adobe/linguistics/spelling/ui/IWordProcessor.as b/Squiggly/main/SpellingUI/src/com/adobe/linguistics/spelling/ui/IWordProcessor.as
new file mode 100644
index 0000000..8196691
--- /dev/null
+++ b/Squiggly/main/SpellingUI/src/com/adobe/linguistics/spelling/ui/IWordProcessor.as
@@ -0,0 +1,30 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package com.adobe.linguistics.spelling.ui
+{
+	import com.adobe.linguistics.utils.ITokenizer;
+	import com.adobe.linguistics.utils.Token;
+	
+	public interface IWordProcessor
+	{
+		function getWordAtPoint(x:uint, y:uint, externalTokenizer:ITokenizer=null):Token;
+		function replaceText(token:Token, replacement:String):void;
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingUI/src/com/adobe/linguistics/spelling/ui/SparkHighlighter.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingUI/src/com/adobe/linguistics/spelling/ui/SparkHighlighter.as b/Squiggly/main/SpellingUI/src/com/adobe/linguistics/spelling/ui/SparkHighlighter.as
new file mode 100644
index 0000000..ffe9653
--- /dev/null
+++ b/Squiggly/main/SpellingUI/src/com/adobe/linguistics/spelling/ui/SparkHighlighter.as
@@ -0,0 +1,229 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package com.adobe.linguistics.spelling.ui
+{
+	import com.adobe.linguistics.utils.Token;
+	import com.adobe.linguistics.utils.TextTokenizer;
+	import flash.geom.Point;
+	
+	import flash.display.Shape;
+	import flash.geom.Rectangle;
+	import flash.text.engine.TextLine;
+	
+	import flashx.textLayout.compose.TextFlowLine;
+	import flashx.textLayout.edit.SelectionManager;
+	import flashx.textLayout.elements.TextFlow;
+	import flashx.textLayout.tlf_internal;
+	
+	import spark.components.RichEditableText;
+	import com.adobe.linguistics.spelling.ui.IHighlighter;
+
+	use namespace tlf_internal;	
+	
+	/**
+	 * <p>This class facilitates drawing of squiggly lines below words for RichEditableText class. RichEditableText is a low-level UIComponent for displaying, 
+	 * scrolling, selecting, and editing richly-formatted text. This class is used in the skins of the Spark versions of TextInput and TextArea. 
+	 * SparkHighlighter could therefore be used for drawing squiggly lines in these Spark components.</p>
+	 * 	
+	 * @playerversion Flash 10
+	 * @langversion 3.0
+	 */
+	public class SparkHighlighter implements IHighlighter
+	{
+		
+		private var mTextField:RichEditableText;
+		private var mHighlighter:Shape;
+		/*
+		* offset point:
+		*/
+		private var _offsetPoint:Point;
+
+		/**
+		 * The constructor for SparkHighlighter.
+		 * @param richEditableText <code>RichEditableText</code> in which to enable highlighting.		 
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */
+		public function SparkHighlighter( richEditableText:RichEditableText )
+		{
+			if (richEditableText == null ) throw new Error("illegal argument."); 
+			mTextField = richEditableText;
+			mHighlighter = null;
+			this._offsetPoint = new Point(0,0);
+		}
+
+		/**
+		 * Draw squiggly lines below a given token.
+		 * @param token <code>Token</code> information of the word to be highlighted.		 
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */
+		public function drawSquiggleAt(token:Token):void
+		{
+			squiggleWord(token);
+		}
+		
+		/**
+		 * Clear all squiggly lines in the component.		
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */
+		public function clearSquiggles():void
+		{
+			if (mHighlighter) {
+				mTextField.removeChild(mHighlighter);
+				mHighlighter=null;
+			}		
+		}
+		
+		/**
+		 * Set offset point information for scrollable controls. This is used by the highlighter to move 
+		 * the squiggly lines as the text scrolls inside the control.	
+		 * @param op offset information as a <code>Point</code> instance.		 
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */		
+		public function set offsetPoint(op:Point):void{
+			_offsetPoint = op;
+		}
+		
+		/**
+		 * Get offset point information for scrollable controls. This is used by the highlighter to move 
+		 * the squiggly lines as the text scrolls inside the control.	
+		 * @param op offset information as a <code>Point</code> instance.		 
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */		
+		public function get offsetPoint():Point{
+			return _offsetPoint;
+		}
+
+		
+
+		// TODO: refactor this code to share with halo components, and support words that cross lines
+		private function squiggleWord(token:Token):void {
+					
+			var ta:RichEditableText = mTextField;
+			if (!ta) return;		
+			
+			if (!mHighlighter) {
+				mHighlighter= new Shape();
+				mHighlighter.graphics.clear();
+				mTextField.addChild(mHighlighter);	
+			}
+				
+		        drawSquigglyLineForRange(token.first, token.last);
+			
+			// Just adjust the left padding, top padding is not an issue 
+			//var pleft:uint = mTextField.getStyle("paddingLeft");
+			//mHighlighter.x += pleft;		
+		}
+		
+		// Draw squiggly line
+		private function drawSquigglyLineForRange(start:Number, end:Number):void
+		{
+			// draw squiggly line
+			var tf:TextFlow = mTextField.textFlow;
+			var tflFirst:TextFlowLine = tf.flowComposer.findLineAtPosition(start);
+			var tflLast:TextFlowLine = tf.flowComposer.findLineAtPosition(end);
+			var tflIndexFirst:int = tf.flowComposer.findLineIndexAtPosition(start);
+			var tflIndexLast:int = tf.flowComposer.findLineIndexAtPosition(end);
+			
+			// Pointer
+			var tflIndex:int = tflIndexFirst;
+			var tfl:TextFlowLine = tflFirst;
+			
+			if (tflIndexFirst == tflIndexLast) {
+				// Draw one line
+				drawSquigglyLineAtIndex(tflIndexFirst, start - tflFirst.absoluteStart, end - tflFirst.absoluteStart);
+			} else {
+				// Multiple lines (very long word)
+				drawSquigglyLineAtIndex(tflIndexFirst, start - tflFirst.absoluteStart);
+				
+				tflIndex++;
+				while (tflIndex != tflIndexLast) {
+					drawSquigglyLineAtIndex(tflIndex);
+					tflIndex++;
+				}
+				
+				drawSquigglyLineAtIndex(tflIndexLast, 0, end - tflLast.absoluteStart);
+			}
+		}
+		
+		// Draw a squiggly line at specific line for specific index range
+		private function drawSquigglyLineAtIndex(lineIndex:Number, startIndex:Number=0, endIndex:Number=0x7FFFFFFF):void
+		{
+			var tf:TextFlow = mTextField.textFlow;
+			var tfl:TextFlowLine = tf.flowComposer.getLineAt(lineIndex);
+			var rectLine:Rectangle = tfl.getBounds();
+			if (endIndex == 0x7FFFFFFF) {
+				drawSquigglyLineAtPoint(rectLine.left, rectLine.bottom, rectLine.right - rectLine.left);
+			}
+			else {
+				// Force to have a valid TextLine
+				var tl:TextLine = tfl.getTextLine(true);
+				if(tl==null) return;
+				var atomStartIndex:int= tl.getAtomIndexAtCharIndex(startIndex+ tl.textBlockBeginIndex);//fix for diacritic characters bug#2854971(adding textBlockBeginIndex since getAtomIndexAtCharIndex is relative to beginning of block)
+				var atomEndIndex:int= tl.getAtomIndexAtCharIndex(endIndex+tl.textBlockBeginIndex);//fix for diacritic characters bug#2854971
+				// TODO: atom index and char index is not matching for some chars, use try/catch to avoid crash
+				try {
+					var rectFirst:Rectangle = tl.getAtomBounds(atomStartIndex);
+					var rectLast:Rectangle = tl.getAtomBounds(atomEndIndex);
+					drawSquigglyLineAtPoint(rectFirst.left + tfl.x, rectLine.bottom, rectLast.right - rectFirst.left);
+				} catch (err:Error)
+				{
+					trace(err);
+				}
+			}
+				
+		}
+		// Draw a squiggly from point x,y with given width, the line is drew in mHighlighter 
+		private function drawSquigglyLineAtPoint(x:Number, y:Number, width:Number):void
+		{
+			mHighlighter.graphics.lineStyle(1, 0xfa0707, .65);
+			mHighlighter.graphics.moveTo(x, y);
+			var upDirection:Boolean = false;
+			var offset:uint = 0;
+			var stepLength:uint = 2;
+			for ( var i:uint = 1; offset <= width; i++) {
+				offset = offset + stepLength;
+				if ( upDirection )
+					mHighlighter.graphics.lineTo(x+offset,y);
+				else
+					mHighlighter.graphics.lineTo(x+offset,y+stepLength);
+				upDirection = !upDirection;
+			}	
+		}
+		
+		private function getValidFirstWordIndex():int{
+			var index:int = SelectionManager.computeSelectionIndex(mTextField.textFlow, mTextField, mTextField, 0 + mTextField.horizontalScrollPosition, 0 + mTextField.verticalScrollPosition);
+			return index;
+
+			
+		}
+		
+		private function getValidLastWordIndex():int{
+			var index:int = SelectionManager.computeSelectionIndex(mTextField.textFlow, mTextField, mTextField, mTextField.width+mTextField.horizontalScrollPosition, mTextField.height+mTextField.verticalScrollPosition);
+			return index;
+
+		}
+
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingUI/src/com/adobe/linguistics/spelling/ui/SparkWordProcessor.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingUI/src/com/adobe/linguistics/spelling/ui/SparkWordProcessor.as b/Squiggly/main/SpellingUI/src/com/adobe/linguistics/spelling/ui/SparkWordProcessor.as
new file mode 100644
index 0000000..3ae7a88
--- /dev/null
+++ b/Squiggly/main/SpellingUI/src/com/adobe/linguistics/spelling/ui/SparkWordProcessor.as
@@ -0,0 +1,133 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package com.adobe.linguistics.spelling.ui
+{
+	import com.adobe.linguistics.utils.ITokenizer;
+	import com.adobe.linguistics.utils.TextTokenizer;
+	import com.adobe.linguistics.utils.Token;
+	
+	import flashx.textLayout.edit.SelectionManager;
+	import flashx.textLayout.tlf_internal;
+	
+	import spark.components.RichEditableText;
+	import com.adobe.linguistics.spelling.ui.IWordProcessor;
+	
+	use namespace tlf_internal;	
+	
+	public class SparkWordProcessor implements IWordProcessor
+	{
+		private var mTextField:RichEditableText;
+
+		public function SparkWordProcessor(textField:RichEditableText)
+		{
+			if (textField == null ) throw new Error("illegal argument."); 
+			mTextField = textField;
+		}
+				
+		
+		public function replaceText(token:Token, replacement:String):void {
+			var startIndex:int = token.first;
+			var endIndex:int = token.last;
+			
+			var ta:RichEditableText = mTextField;
+			var end:int = getValidLastWordIndex();
+			
+			if ( replacement == null ) return;
+			
+			if (mTextField.text.length<endIndex || startIndex<0) {
+				return;
+			}
+			
+			var _misspellStart:int = startIndex;
+			var _misspellEnd:int = endIndex;
+			
+			// Workaround for Spark: changes in inactive components will trigger strange behavior			
+			//var selectedElementRange:ElementRange = ElementRange.createElementRange(ta.textFlow, _misspellStart, _misspellEnd);
+			//var selectedCharacterFormat:ITextLayoutFormat = ta.textFlow.interactionManager.activePosition == ta.textFlow.interactionManager.anchorPosition ? ta.textFlow.interactionManager.getCommonCharacterFormat() : selectedElementRange.characterFormat;
+			//var selectedParagraphFormat:ITextLayoutFormat = selectedElementRange.paragraphFormat;
+			//var selectedContainerFormat:ITextLayoutFormat = selectedElementRange.containerFormat;
+			
+			
+			
+			//var selectedCharacterFormat:ITextLayoutFormat = ta.textFlow.interactionManager.getCommonCharacterFormat();
+			//var selectedContainerFormat:ITextLayoutFormat = ta.textFlow.interactionManager.getCommonContainerFormat();
+			//var selectedParagraphFormat:ITextLayoutFormat = ta.textFlow.interactionManager.getCommonParagraphFormat();
+			
+			/*var tem:EditManager = new EditManager();
+			ta.textFlow.interactionManager = tem;	*/
+			
+			
+			ta.setFocus();
+			//ta.text = ta.text.substr(0, _misspellStart) + replacement + ta.text.substr(_misspellEnd);
+			
+			//tem.applyFormat(selectedCharacterFormat,selectedParagraphFormat,selectedContainerFormat);
+			//ta.textFlow.flowComposer.updateAllControllers();
+			
+			ta.textFlow;
+			//ta.selectRange(_misspellStart + replacement.length, _misspellStart + replacement.length);
+			ta.selectRange(_misspellStart+1, _misspellEnd);
+			ta.insertText(replacement);
+			ta.selectRange(_misspellStart, _misspellStart+1);
+			ta.insertText("");
+			
+			//ta.textFlow.interactionManager.applyFormat(selectedCharacterFormat,null,null);
+			
+			// Workaround for unexpected jump
+			ta.scrollToRange(end, end);
+		}
+		
+		public function getWordAtPoint(x:uint, y:uint, externalTokenizer:ITokenizer=null):Token
+		{
+			// TODO: use a better alternative than _misspellStart, end
+			var ta:RichEditableText = mTextField;	
+			var index:int = SelectionManager.computeSelectionIndex(ta.textFlow, ta, ta, x, y);
+
+			if (index >= ta.text.length) return null;
+
+			var tmpToken:Token = new Token(index,index);
+			var tokenizer:ITokenizer;
+			if ( externalTokenizer == null ) {
+				tokenizer = new TextTokenizer(mTextField.text);	
+			}else {
+				tokenizer = externalTokenizer;
+			}
+			
+			var result:Token = new Token(0,0);
+			var preToken:Token = tokenizer.getPreviousToken(tmpToken);
+			var nextToken:Token = tokenizer.getNextToken(tmpToken);
+			if ( preToken.last == nextToken.first ) {
+				result.first = preToken.first;
+				result.last = nextToken.last;
+				return result;		
+			}else {
+				return null;
+			}
+				
+		}
+
+		// TODO: workaround for unexpected jump when word replaced, to be refactored for code sharing
+		private function getValidLastWordIndex():int{
+			var index:int = SelectionManager.computeSelectionIndex(mTextField.textFlow, mTextField, mTextField, mTextField.width+mTextField.horizontalScrollPosition, mTextField.height+mTextField.verticalScrollPosition);
+			return index;
+		}
+
+
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingUI/src/com/adobe/linguistics/spelling/ui/SpellingHighlighter.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingUI/src/com/adobe/linguistics/spelling/ui/SpellingHighlighter.as b/Squiggly/main/SpellingUI/src/com/adobe/linguistics/spelling/ui/SpellingHighlighter.as
new file mode 100644
index 0000000..27cd2fb
--- /dev/null
+++ b/Squiggly/main/SpellingUI/src/com/adobe/linguistics/spelling/ui/SpellingHighlighter.as
@@ -0,0 +1,196 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package com.adobe.linguistics.spelling.ui
+{
+	import flash.display.Shape;
+	import flash.geom.Point;
+	import flash.geom.Rectangle;
+	import flash.text.TextLineMetrics;
+	
+	import mx.core.IUITextField;
+	import mx.flash.UIMovieClip;
+
+
+	public class SpellingHighlighter extends UIMovieClip
+	{
+		/*
+		* offset point:
+		*/
+		private var _offsetPoint:Point;
+		
+		/*
+		* Target TextField.
+		*/
+		private var _textField:IUITextField;
+		private static var InvalidIndexValue:int = -2;
+		public function SpellingHighlighter(textField:IUITextField) {
+			super();
+			this._textField = textField;
+			this._offsetPoint = new Point(0,0);
+		}
+		
+		public function drawSquigglyLine(firstCharIndex:int, lastCharIndex:int ):void {
+			var validFirstCharIndex:int = getValidFirstCharIndex(firstCharIndex);
+			var validLastCharIndex:int = getValidLastCharIndex(lastCharIndex);
+			if ( validFirstCharIndex == InvalidIndexValue || validLastCharIndex == InvalidIndexValue ){
+				return;
+			}
+			/* draw squiggly line here. */
+			if ( validFirstCharIndex <= validLastCharIndex ) {
+				var firstLine:int = _textField.getLineIndexOfChar(validFirstCharIndex);
+				var lastLine:int = _textField.getLineIndexOfChar(validLastCharIndex);
+				//only one line case.
+				if(lastLine==firstLine)
+				{
+					drawSingleSquigglyLine(validFirstCharIndex, validLastCharIndex);
+					return;
+				}
+				//more than one line.
+				//first line
+				drawSingleSquigglyLine(validFirstCharIndex, _textField.getLineOffset(firstLine)+_textField.getLineLength(firstLine)-1);
+				//middle....
+				for(var i:int=firstLine+1;i<lastLine;i++)
+				{
+					drawSingleSquigglyLine(_textField.getLineOffset(i), _textField.getLineOffset(i)+_textField.getLineLength(i)-1);
+				}
+				//last lines.
+				drawSingleSquigglyLine(_textField.getLineOffset(lastLine), validLastCharIndex);
+			}
+		}
+		
+		public function drawSingleSquigglyLine(firstCharIndex:int, lastCharIndex:int ):void {
+			var firstLine:int = _textField.getLineIndexOfChar(firstCharIndex);
+			var lastLine:int = _textField.getLineIndexOfChar(lastCharIndex);
+			if ( firstLine != lastLine ) {
+				return;
+			}else {
+				var rect1:Rectangle = _textField.getCharBoundaries(firstCharIndex);
+				var rect2:Rectangle = _textField.getCharBoundaries(lastCharIndex);
+				var line:int;
+				while(rect1==null){ 
+					line=_textField.getLineIndexOfChar(firstCharIndex);
+					if( (firstCharIndex+1)>(_textField.getLineOffset(line)+_textField.getLineLength(line)-1)||(firstCharIndex+1)>lastCharIndex) return;// go till the last character
+					firstCharIndex++;
+					rect1= _textField.getCharBoundaries(firstCharIndex);										
+				}
+				
+				while(rect2==null){//this case appears for diacritic characters made using Decomposed chars
+					line=_textField.getLineIndexOfChar(lastCharIndex);
+					if( lastCharIndex-1 < (_textField.getLineOffset(line))||firstCharIndex>(lastCharIndex-1) ) return; //go till the first character
+					lastCharIndex--;// check for the previos character
+					rect2= _textField.getCharBoundaries(lastCharIndex);										
+				}
+				
+				
+				var x:Number = rect1.x+_offsetPoint.x - _textField.scrollH;
+				var y:Number = rect1.y + rect1.height + 2;
+				var width:Number = rect2.x+rect2.width-rect1.x;
+				
+				// Avoid drawing outside the textField
+				if (x<0) 
+				{
+					if (x+width > 0) {
+						width += x;
+						x = 0;
+					} 
+					else
+						return;
+				}
+				if (x+width > _textField.width) 
+				{
+					if (x < _textField.width) {
+						width = textField.width - x;
+					} 	
+					else
+						return;
+				}
+				
+				// The rectangle that bound the string you want
+				// actual work here.
+				var myShape:Shape = new Shape();
+				myShape.graphics.clear();
+				//myShape.graphics.beginFill(0x0099CC, .35); 
+				myShape.graphics.lineStyle(1, 0xfa0707, .65);
+				//myShape.graphics.moveTo(0,0);
+				myShape.graphics.moveTo(x, y);
+				var upDirection:Boolean = false;
+				var offset:uint = 0;
+				var stepLength:uint = 2;
+				for ( var i:uint = 1; offset <= width; i++) {
+					offset = offset + stepLength;
+					if ( upDirection )
+						myShape.graphics.lineTo(x+offset,y);
+					else
+						myShape.graphics.lineTo(x+offset,y+stepLength);
+					upDirection = !upDirection;
+				}
+				//myShape.graphics.endFill();
+				this.addChild(myShape);	
+			}
+		}
+		
+		private function getValidFirstCharIndex(firstCharIndex:int):int{
+			if(firstCharIndex<0 || firstCharIndex>_textField.text.length-1) 
+			{
+				return InvalidIndexValue;
+			}
+			var firstLine:Number = _textField.getLineIndexOfChar(firstCharIndex);
+			
+			if(firstLine<_textField.scrollV-1)
+			{
+				firstLine = _textField.scrollV-1;
+				return _textField.getLineOffset(firstLine);
+			}
+			return firstCharIndex;
+		}
+		
+		private function getValidLastCharIndex(lastCharIndex:int):int{
+			if(lastCharIndex<0 || lastCharIndex>_textField.text.length-1) 
+			{
+				return InvalidIndexValue;
+			}
+			var lastLine:Number = _textField.getLineIndexOfChar(lastCharIndex);
+			if(lastLine>_textField.bottomScrollV-1)
+			{
+				lastLine = _textField.bottomScrollV-1;
+				return _textField.getLineOffset(lastLine)+_textField.getLineLength(lastLine)-1;
+			}
+			return lastCharIndex;
+		}
+					
+		public function set textField(tf:IUITextField):void{
+			_textField = tf;
+		}
+		
+		public function get textField():IUITextField{
+			return _textField;
+		}
+		
+		public function set offsetPoint(op:Point):void{
+			_offsetPoint = op;
+		}
+		
+		public function get offsetPoint():Point{
+			return _offsetPoint;
+		}
+
+
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingUI/src/com/adobe/linguistics/spelling/ui/TLFHighlighter.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingUI/src/com/adobe/linguistics/spelling/ui/TLFHighlighter.as b/Squiggly/main/SpellingUI/src/com/adobe/linguistics/spelling/ui/TLFHighlighter.as
new file mode 100644
index 0000000..92b7c71
--- /dev/null
+++ b/Squiggly/main/SpellingUI/src/com/adobe/linguistics/spelling/ui/TLFHighlighter.as
@@ -0,0 +1,252 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package com.adobe.linguistics.spelling.ui
+{
+	import com.adobe.linguistics.utils.TextTokenizer;
+	import com.adobe.linguistics.utils.Token;
+	
+	import flash.display.Graphics;
+	import flash.display.Shape;
+	import flash.display.Sprite;
+	import flash.geom.Point;
+	import flash.geom.Rectangle;
+	import flash.text.engine.TextLine;
+	import flash.utils.Dictionary;
+	
+	import flashx.textLayout.compose.TextFlowLine;
+	import flashx.textLayout.container.ContainerController;
+	import flashx.textLayout.edit.SelectionManager;
+	import flashx.textLayout.elements.TextFlow;
+	import flashx.textLayout.tlf_internal;
+	import com.adobe.linguistics.spelling.ui.IHighlighter;
+
+
+	use namespace tlf_internal;	
+
+	/**
+	 * <p>This class facilitates drawing of squiggly lines below words for TLF TextFlow class.</p>
+	 * <p>The TextFlow class is responsible for managing all 
+	 * the text content of a story. In TextLayout, text is stored in a hierarchical tree of elements. TextFlow is the root object of the element tree. 
+	 * All elements on the tree derive from the base class, FlowElement. </p> 
+	 * TLFHighlighter could be used for drawing squiggly lines in any of the custom visual components(probably based on <code>Sprite</code>) which make use 
+	 * of TextFlow to display text.
+	 * 	
+	 * @playerversion Flash 10
+	 * @langversion 3.0
+	 */
+	public class TLFHighlighter implements IHighlighter
+	{
+		
+		private var mTextFlow:TextFlow;
+		private var mHighlighter:Dictionary;
+	
+		//private var mHighlighter:Shape;
+		private var ccindex:int;
+		private var cc:ContainerController;
+		/*
+		* offset point:
+		*/
+		private var _offsetPoint:Point;
+
+		/**
+		 * The constructor for TLFHighlighter.
+		 * @param textFlow <code>TextFlow</code> in which to enable highlighting.		 
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */
+		public function TLFHighlighter( textFlow:TextFlow )
+		{
+			if (textFlow == null ) throw new Error("illegal argument."); 
+			mTextFlow = textFlow;
+			//mHighlighter = null;
+			mHighlighter = new Dictionary(true);
+			this._offsetPoint = new Point(0,0);
+		}
+		/**
+		 * Draw squiggly lines below a given token.
+		 * @param token <code>Token</code> information of the word to be highlighted.		 
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */
+		public function drawSquiggleAt(token:Token):void
+		{
+			squiggleWord(token);
+		}
+		/**
+		 * Clear all squiggly lines in the component.		
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */
+		public function clearSquiggles():void
+		{
+			
+			for (var idx:int = 0; idx < mTextFlow.flowComposer.numControllers; idx++)
+			{	
+				var cctmp:ContainerController = mTextFlow.flowComposer.getControllerAt(idx);
+				if (!cctmp) return;	
+				if (mHighlighter[cctmp.container] != null) {
+					
+					//ToDO: This assumes single container for whole of mTextFlow. Need to implement for multiple container case.
+					cctmp.container.removeChild((mHighlighter[cctmp.container] as Shape));
+					
+					mHighlighter[cctmp.container] = null;
+				}	
+			}
+		}
+	
+		/**
+		 * Set offset point information for scrollable controls. This is used by the highlighter to move 
+		 * the squiggly lines as the text scrolls inside the control.	
+		 * @param op offset information as a <code>Point</code> instance.		 
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */		
+		public function set offsetPoint(op:Point):void{
+			_offsetPoint = op;
+		}
+		/**
+		 * Get offset point information for scrollable controls. This is used by the highlighter to move 
+		 * the squiggly lines as the text scrolls inside the control.	
+		 * @param op offset information as a <code>Point</code> instance.		 
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */	
+		public function get offsetPoint():Point{
+			return _offsetPoint;
+		}
+
+		
+
+		// TODO: refactor this code to share with halo components, and support words that cross lines
+		private function squiggleWord(token:Token):void {					
+			var ta:TextFlow = mTextFlow;
+			
+			if (!ta) return;		
+			ccindex = ta.flowComposer.findControllerIndexAtPosition(token.first);
+			
+			cc = ta.flowComposer.getControllerAt(ccindex);
+			if (!cc) return;	
+			if (mHighlighter[cc.container] == null ) {
+				mHighlighter[cc.container]= new Shape();
+				(mHighlighter[cc.container] as Shape).graphics.clear();
+				//ccindex = ta.flowComposer.findControllerIndexAtPosition(token.first);
+				
+				//var cc:ContainerController = ta.flowComposer.getControllerAt(ccindex);
+				//ToDO: This assumes single container for whole of mTextFlow. Need to implement for multiple container case.
+				cc.container.addChild((mHighlighter[cc.container] as Shape));				
+			}
+					
+		    drawSquigglyLineForRange(token.first, token.last);
+			
+			// Just adjust the left padding, top padding is not an issue 
+			//var pleft:uint = mTextFlow.getStyle("paddingLeft");
+			//mHighlighter.x += pleft;		
+		}
+		
+		// Draw squiggly line
+		private function drawSquigglyLineForRange(start:Number, end:Number):void
+		{
+			// draw squiggly line
+			var tf:TextFlow = mTextFlow;
+			var tflFirst:TextFlowLine = tf.flowComposer.findLineAtPosition(start);
+			var tflLast:TextFlowLine = tf.flowComposer.findLineAtPosition(end);
+			var tflIndexFirst:int = tf.flowComposer.findLineIndexAtPosition(start);
+			var tflIndexLast:int = tf.flowComposer.findLineIndexAtPosition(end);
+			
+			// Pointer
+			var tflIndex:int = tflIndexFirst;
+			var tfl:TextFlowLine = tflFirst;
+			
+			if (tflIndexFirst == tflIndexLast) {
+				// Draw one line
+				drawSquigglyLineAtIndex(tflIndexFirst, start - tflFirst.absoluteStart, end - tflFirst.absoluteStart);
+			} else {
+				// Multiple lines (very long word)
+				drawSquigglyLineAtIndex(tflIndexFirst, start - tflFirst.absoluteStart);
+				
+				tflIndex++;
+				while (tflIndex != tflIndexLast) {
+					drawSquigglyLineAtIndex(tflIndex);
+					tflIndex++;
+				}
+				
+				drawSquigglyLineAtIndex(tflIndexLast, 0, end - tflLast.absoluteStart);
+			}
+		}
+		
+		// Draw a squiggly line at specific line for specific index range
+		private function drawSquigglyLineAtIndex(lineIndex:Number, startIndex:Number=0, endIndex:Number=0x7FFFFFFF):void
+		{
+			var tf:TextFlow = mTextFlow;
+			var tfl:TextFlowLine = tf.flowComposer.getLineAt(lineIndex);
+			var rectLine:Rectangle = tfl.getBounds(); 
+			if (endIndex == 0x7FFFFFFF) {
+				drawSquigglyLineAtPoint(rectLine.left, rectLine.bottom, rectLine.right - rectLine.left, lineIndex);
+			}
+			else {
+				// Force to have a valid TextLine
+				var tl:TextLine = tfl.getTextLine(true);
+				if(tl==null)return;
+				var atomStartIndex:int= tl.getAtomIndexAtCharIndex(startIndex+ tl.textBlockBeginIndex);//fix for diacritic characters bug#2854971
+				var atomEndIndex:int= tl.getAtomIndexAtCharIndex(endIndex+ tl.textBlockBeginIndex);//fix for diacritic characters bug#2854971
+				// TODO: atom index and char index is not matching for some chars, use try/catch to avoid crash
+				try {
+					var rectFirst:Rectangle = tl.getAtomBounds(atomStartIndex);
+					var rectLast:Rectangle = tl.getAtomBounds(atomEndIndex);
+					drawSquigglyLineAtPoint(rectFirst.left + tfl.x, rectLine.bottom, rectLast.right - rectFirst.left, lineIndex);
+				} catch (err:Error)
+				{
+					trace(err);
+				}
+			}
+				
+		}
+		// Draw a squiggly from point x,y with given width, the line is drawn in mHighlighter 
+		private function drawSquigglyLineAtPoint(x:Number, y:Number, width:Number, lineIndex:Number):void
+		{
+			var tf:TextFlow = mTextFlow;
+			var tfl:TextFlowLine = tf.flowComposer.getLineAt(lineIndex);
+			var tl:TextLine = tfl.getTextLine(true);
+						
+			(mHighlighter[cc.container] as Shape).graphics.lineStyle(1, 0xfa0707, .65);
+			(mHighlighter[cc.container] as Shape).graphics.moveTo(x, y);
+			var upDirection:Boolean = false;
+			var offset:uint = 0;
+			var stepLength:uint = 2;
+			for ( var i:uint = 1; offset <= width; i++) {
+				offset = offset + stepLength;
+				if ( upDirection )
+					(mHighlighter[cc.container] as Shape).graphics.lineTo(x+offset,y);
+				else
+					(mHighlighter[cc.container] as Shape).graphics.lineTo(x+offset,y+stepLength);
+				upDirection = !upDirection;
+			}
+			
+			//tl.addChild(mHighlighter);
+						
+			//tf.flowComposer.updateToController(ccindex);
+
+		}
+		
+
+	}
+	
+}
+

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingUI/src/com/adobe/linguistics/spelling/ui/TLFWordProcessor.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingUI/src/com/adobe/linguistics/spelling/ui/TLFWordProcessor.as b/Squiggly/main/SpellingUI/src/com/adobe/linguistics/spelling/ui/TLFWordProcessor.as
new file mode 100644
index 0000000..749e218
--- /dev/null
+++ b/Squiggly/main/SpellingUI/src/com/adobe/linguistics/spelling/ui/TLFWordProcessor.as
@@ -0,0 +1,159 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package com.adobe.linguistics.spelling.ui
+{
+	import com.adobe.linguistics.utils.ITokenizer;
+	import com.adobe.linguistics.utils.TextTokenizer;
+	import com.adobe.linguistics.utils.Token;
+	
+	import flashx.textLayout.edit.SelectionManager;
+	import flashx.textLayout.edit.EditManager;
+	import flashx.textLayout.tlf_internal;
+	import flashx.textLayout.elements.TextFlow;
+	
+	import flashx.textLayout.container.ContainerController;
+	import flashx.textLayout.elements.FlowLeafElement;
+	import flashx.textLayout.elements.ParagraphElement;
+	import com.adobe.linguistics.spelling.ui.IWordProcessor;
+	
+	use namespace tlf_internal;	
+	
+	public class TLFWordProcessor implements IWordProcessor
+	{
+		private var mTextFlow:TextFlow;
+		private var _containerController:ContainerController;
+
+		public function TLFWordProcessor(textFlow:TextFlow)
+		{
+			if (textFlow == null ) throw new Error("illegal argument."); 
+			mTextFlow = textFlow;
+		}
+				
+		
+		public function replaceText(token:Token, replacement:String):void {
+			var startIndex:int = token.first;
+			var endIndex:int = token.last;
+			
+			var ta:TextFlow = mTextFlow;
+			//var end:int = getValidLastWordIndex();
+			
+			if ( replacement == null ) return;
+			
+			/*if (mTextFlow.text.length<endIndex || startIndex<0) {
+				return;
+			}*/
+			
+			var _misspellStart:int = startIndex;
+			var _misspellEnd:int = endIndex;
+			
+			// Workaround for Spark: changes in inactive components will trigger strange behavior			
+			//var selectedElementRange:ElementRange = ElementRange.createElementRange(ta.textFlow, _misspellStart, _misspellEnd);
+			//var selectedCharacterFormat:ITextLayoutFormat = ta.textFlow.interactionManager.activePosition == ta.textFlow.interactionManager.anchorPosition ? ta.textFlow.interactionManager.getCommonCharacterFormat() : selectedElementRange.characterFormat;
+			//var selectedParagraphFormat:ITextLayoutFormat = selectedElementRange.paragraphFormat;
+			//var selectedContainerFormat:ITextLayoutFormat = selectedElementRange.containerFormat;
+			
+			
+			
+			//var selectedCharacterFormat:ITextLayoutFormat = ta.textFlow.interactionManager.getCommonCharacterFormat();
+			//var selectedContainerFormat:ITextLayoutFormat = ta.textFlow.interactionManager.getCommonContainerFormat();
+			//var selectedParagraphFormat:ITextLayoutFormat = ta.textFlow.interactionManager.getCommonParagraphFormat();
+			
+			var tem:EditManager = ta.interactionManager as EditManager;
+			
+			
+			
+			//ta.setFocus();
+			//ta.text = ta.text.substr(0, _misspellStart) + replacement + ta.text.substr(_misspellEnd);
+			
+			//tem.applyFormat(selectedCharacterFormat,selectedParagraphFormat,selectedContainerFormat);
+			//ta.textFlow.flowComposer.updateAllControllers();
+			
+			//ta.textFlow;
+			//ta.selectRange(_misspellStart + replacement.length, _misspellStart + replacement.length);
+			
+			
+			tem.selectRange(_misspellStart, _misspellEnd-1);
+			//tem.insertText(replacement);
+			//tem.selectRange(_misspellStart, _misspellStart+1);
+			//tem.insertText("");
+			tem.overwriteText(replacement);
+			
+			//ta.textFlow.interactionManager.applyFormat(selectedCharacterFormat,null,null);
+			
+			// Workaround for unexpected jump
+			//ta.scrollToRange(end, end);
+		}
+		
+		/**
+		 @private
+		 (This property is for Squiggly Developer use only.)
+		 */
+		public function set textFlowContainerController(value:ContainerController):void {
+			_containerController = value;
+		}
+		
+		public function getWordAtPoint(x:uint, y:uint, externalTokenizer:ITokenizer=null):Token
+		{
+			// TODO: use a better alternative than _misspellStart, end
+			var ta:TextFlow = mTextFlow;	
+									
+			var index:int = SelectionManager.computeSelectionIndex(ta, _containerController.container, _containerController.container, x, y);
+
+			if (index >= ta.textLength) return null;
+
+			var currentLeaf:FlowLeafElement = ta.findLeaf(index);
+			var currentParagraph:ParagraphElement = currentLeaf ? currentLeaf.getParagraph() : null;
+			
+			if (currentParagraph == null) return null;
+			var paraStart:uint = currentParagraph.getAbsoluteStart();
+				
+			//tokenizer = new TextTokenizer(currentParagraph.getText().substring());
+			
+			var tmpToken:Token = new Token(index - paraStart,index - paraStart);
+			var tokenizer:ITokenizer;
+			if ( externalTokenizer == null ) {
+				tokenizer = new TextTokenizer(currentParagraph.getText().substring());	
+			}else {
+				tokenizer = externalTokenizer;
+			}
+			
+			var result:Token = new Token(0,0);
+			var preToken:Token = tokenizer.getPreviousToken(tmpToken);
+			var nextToken:Token = tokenizer.getNextToken(tmpToken);
+			if ( preToken.last == nextToken.first ) {
+				result.first = preToken.first + paraStart;
+				result.last = nextToken.last + paraStart;
+				return result;		
+			}else {
+				return null;
+			}
+							
+		}
+
+		// TODO: workaround for unexpected jump when word replaced, to be refactored for code sharing
+		private function getValidLastWordIndex():int{
+			var index:int = 0;
+			//var index:int = SelectionManager.computeSelectionIndex(mTextFlow.textFlow, mTextFlow, mTextFlow, mTextFlow.width+mTextFlow.horizontalScrollPosition, mTextFlow.height+mTextFlow.verticalScrollPosition);
+			return index;
+		}
+
+
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingUIAPI/src/com/adobe/linguistics/spelling/ui/HaloHighlighter.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingUIAPI/src/com/adobe/linguistics/spelling/ui/HaloHighlighter.as b/Squiggly/main/SpellingUIAPI/src/com/adobe/linguistics/spelling/ui/HaloHighlighter.as
new file mode 100644
index 0000000..28f16e6
--- /dev/null
+++ b/Squiggly/main/SpellingUIAPI/src/com/adobe/linguistics/spelling/ui/HaloHighlighter.as
@@ -0,0 +1,87 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package com.adobe.linguistics.spelling.ui
+{
+	import __AS3__.vec.Vector;
+	
+	import com.adobe.linguistics.utils.Token;
+	
+	import flash.geom.Point;
+	import flash.text.TextField;
+	
+	import mx.core.IUITextField;
+
+
+	public class HaloHighlighter implements IHighlighter
+	{
+		private var mTextField:TextField;
+		private var mHighlighter:SpellingHighlighter;
+		/*
+		* offset point:
+		*/
+		private var _offsetPoint:Point;
+
+		public function HaloHighlighter( textField:TextField )
+		{
+			if (textField == null ) throw new Error("illegal argument."); 
+			mTextField = textField;
+			mHighlighter = null;
+			this._offsetPoint = new Point(0,0);
+		}
+		/*************************Public function************************************/
+		public function drawSquiggles(tokens:Vector.<Token>):void
+		{
+			spellCheckRange(tokens);
+		}
+		
+		public function clearSquiggles():void
+		{
+			if (mHighlighter) {
+				mTextField.parent.removeChild(mHighlighter);
+				mHighlighter=null;
+			}
+			
+		}
+
+		public function set offsetPoint(op:Point):void{
+			_offsetPoint = op;
+		}
+		
+		public function get offsetPoint():Point{
+			return _offsetPoint;
+		}
+
+
+		private function spellCheckRange(tokens:Vector.<Token>):void {
+			
+			mHighlighter= new SpellingHighlighter( mTextField as IUITextField);
+			
+			
+			for ( var i:int = 0; i< tokens.length; ++i ) {
+				var _token:Token = tokens[i];
+				mHighlighter.drawSquigglyLine(_token.first, _token.last);
+			}
+			
+			mTextField.parent.addChild(mHighlighter);	
+			mHighlighter.move(_offsetPoint.x, _offsetPoint.y);
+		}
+
+	}
+}
\ No newline at end of file


[36/50] [abbrv] git commit: [flex-utilities] [refs/heads/master] - one too many ApacheFlex in there

Posted by jm...@apache.org.
one too many ApacheFlex in there


Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/924b4272
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/924b4272
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/924b4272

Branch: refs/heads/master
Commit: 924b42723335201c8022a7fc07fd0664cd65d80a
Parents: 0e3fa32
Author: Justin Mclean <jm...@apache.org>
Authored: Thu Aug 28 11:44:23 2014 +1000
Committer: Justin Mclean <jm...@apache.org>
Committed: Thu Aug 28 11:44:23 2014 +1000

----------------------------------------------------------------------
 Squiggly/main/build.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/924b4272/Squiggly/main/build.xml
----------------------------------------------------------------------
diff --git a/Squiggly/main/build.xml b/Squiggly/main/build.xml
index 9328068..c19d925 100644
--- a/Squiggly/main/build.xml
+++ b/Squiggly/main/build.xml
@@ -186,7 +186,7 @@
             <arg value="-external-library-path"/>
             <arg value="${OUTPUT_DIR}/ApacheFlexSpellingUI.swc"/>
             <arg value="-output"/>
-            <arg value="${OUTPUT_DIR}/ApacheFlexApacheFlexSpellingUITLF.swc"/>
+            <arg value="${OUTPUT_DIR}/ApacheFlexSpellingUITLF.swc"/>
         </java>
     </target>
 


[24/50] [abbrv] remove Adobe from directory names (package name still contains Adobe)

Posted by jm...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/SuggestionManager.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/SuggestionManager.as b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/SuggestionManager.as
new file mode 100644
index 0000000..f792b5d
--- /dev/null
+++ b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/SuggestionManager.as
@@ -0,0 +1,1026 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+package com.adobe.linguistics.spelling.core
+{
+	import com.adobe.linguistics.spelling.core.env.InternalConstants;
+	import com.adobe.linguistics.spelling.core.rule.PrefixEntry;
+	import com.adobe.linguistics.spelling.core.rule.SuffixEntry;
+	import com.adobe.linguistics.spelling.core.utils.*;
+	
+	import flash.utils.Dictionary;
+	import flash.utils.getTimer;
+	
+	public class SuggestionManager
+	{
+		
+		private var _attributeMgr:LinguisticRule;
+		private var _maxSug:int;
+		private var _languageCode:String;
+		private var _ckey:String;
+		private var _cUpperTry:String;
+		private var _cLowerTry:String;
+		private var _cAllTry:String;
+		private var _maxngramsugs:int;
+		private var _fastMode:Boolean;
+		
+		private var _word:String;
+		private var _guessSuggestions:SuggestionsResult;
+		private var _guessWordList:SuggestionsResult;
+		private var guess:Array = new Array (InternalConstants.MAX_GUESS);
+		private var gscore:Array = new Array ( InternalConstants.MAX_GUESS);
+		
+		public function SuggestionManager( attrMgr:LinguisticRule, fastMode:Boolean = true )
+		{
+			this._maxSug = InternalConstants.MAXSUGGESTION;
+			this._attributeMgr = attrMgr;
+			this._ckey = this._attributeMgr.keyString;
+
+			this._cAllTry  = this._attributeMgr.tryString;
+			this._cUpperTry = "";
+			this._cLowerTry = ""; // lower and netual...
+			for ( var i:int = 0; (this._attributeMgr.tryString != null)&&(i < this._attributeMgr.tryString.length); ++i ) {
+				if ( this._attributeMgr.tryString.charAt(i) == this._attributeMgr.tryString.charAt(i).toLocaleLowerCase() ) {
+					this._cLowerTry+=this._attributeMgr.tryString.charAt(i);
+				} else {
+					this._cUpperTry+= this._attributeMgr.tryString.charAt(i);
+				}
+				
+			}
+
+			this._maxngramsugs = InternalConstants.MAXNGRAMSUGS;
+			this._fastMode = fastMode;
+			
+			//initialized viriable for performance...
+			_word=null;
+			_guessSuggestions = new SuggestionsResult(InternalConstants.MAX_ROOTS, compareSuggestion );
+			_guessWordList = new SuggestionsResult( InternalConstants.MAX_GUESS, compareSuggestion );
+			if ( this._attributeMgr.maxNgramSuggestions > 0 ) this._maxngramsugs = this._attributeMgr.maxNgramSuggestions;
+		}
+		
+		public function get fastMode():Boolean {
+			return this._fastMode;
+		}
+		
+		public function set fastMode( value:Boolean ) :void {
+			this._fastMode = value;
+		}
+		
+		private static function compareSuggestion( obj1:*, obj2:*):int {
+			return (obj1.score-obj2.score);
+		}
+		
+		
+		public function set languageCode(value:String) :void {
+			this._languageCode = value;	
+		}
+		
+		public function get languageCode():String {
+			return this._languageCode;
+		}
+		
+		public function nsuggest( result:Array, word:String ):int {
+
+			if ( !((result.length+this._maxngramsugs) <= this._maxSug) ) return result.length;
+
+
+			var nsug:int = result.length;
+			var i:int,j:int,sc:int, opt:int, n:int = word.length;
+			var arr:Array;
+			var sd:SquigglyDictionary;
+			var dict:Dictionary;
+			_word = word;
+			var initCap:Boolean = (word.charAt(0) == word.charAt(0).toLocaleLowerCase() )? false:true;
+			var wordCapValue:int = word.charAt(0).toLocaleUpperCase().charCodeAt(0);
+			_guessSuggestions.clear();
+			
+			/* A filter based on string length, it could be */
+			var rangeOffset:int =5;
+			var endRange:int = word.length + (rangeOffset-2);
+			var startRange:int =  (word.length>(rangeOffset+2)) ? (word.length-rangeOffset):2  ;
+	
+					var counter:Number=0
+					var startTime:Number = getTimer();
+
+			// exhaustively search through all root words
+			// keeping track of the MAX_ROOTS most similar root words
+			
+			// word reversing wrapper for complex prefixes
+			
+			// set character based ngram suggestion for words with non-BMP Unicode characters
+			
+			//a filter for performance improvement...
+			var firstCodeValue:Number =word.charCodeAt(0), lastCodeValue:Number = word.charCodeAt(word.length-1);
+			
+			
+			for ( i=0;i<this._attributeMgr.dictionaryManager.dictonaryList.length; ++i ) {
+				sd = this._attributeMgr.dictionaryManager.dictonaryList[i];
+				dict = sd.dictionary;
+				
+				var lowerS:String;
+				var he:HashEntry;
+				opt = InternalConstants.NGRAM_LONGER_WORSE + InternalConstants.NGRAM_LOWERING;
+				for( var key:String in dict ) {
+					if ( (key.length < startRange) || (key.length > endRange) ) continue;
+					if ( (this._fastMode) && (firstCodeValue != key.charCodeAt(0)) && (lastCodeValue != key.charCodeAt(key.length-1)) ) continue;
+					counter++;
+
+					sc = ngram( 3, _word,key,opt) + leftCommonSubString(_word, key, initCap, wordCapValue);
+					
+					if ( sc > 0  ) {
+						if ( _guessSuggestions.size < InternalConstants.MAX_ROOTS ) {
+							if ( dict[key].affixFlagVector && 
+								(dict[key].testAffix( this._attributeMgr.forbiddenWord ) ||
+								dict[key].testAffix( this._attributeMgr.onlyInCompound) ||
+								dict[key].testAffix( this._attributeMgr.noSuggest ) ||
+								dict[key].testAffix( InternalConstants.ONLYUPCASEFLAG )
+								)) continue; 
+							_guessSuggestions.insert( new SuggestionEntry(sc,key, dict[key] ) );
+							if ( _guessSuggestions.size == InternalConstants.MAX_ROOTS ) {
+								_guessSuggestions.buildheap();
+							}
+						}else {
+							if ( sc > _guessSuggestions.front.score ) {
+								_guessSuggestions.front.score = sc;
+								_guessSuggestions.front.key =  key;
+								_guessSuggestions.front.hashEntry = dict[key];
+								_guessSuggestions.updateFront();
+							}
+						}
+					}
+				}
+			}
+			
+			var thresh:int = 0;
+			var mw:String;
+			for ( var sp:int = 1; sp < 4; ++sp) {
+				mw = word;
+				for ( var k:int=sp; k<n; k+=4) {
+					mw = mw.substring(0,k) + "*" + mw.substring(k+1);
+				}
+				thresh = thresh + ngram( n, word, mw, InternalConstants.NGRAM_ANY_MISMATCH + InternalConstants.NGRAM_LOWERING);
+			}
+			thresh = thresh /3;
+			thresh --;
+
+			// now expand affixes on each of these root words and
+			// and use length adjusted ngram scores to select
+			// possible suggestions
+			_guessWordList.clear();
+
+
+			//work arround for inconsitent ordered Dictionary table. bof
+			if ( _guessSuggestions.isEmpty() ) return result.length;
+			var lowestScore:int = _guessSuggestions.front.score;
+			var indexArr:Array;
+			if ( _guessSuggestions.size != _guessSuggestions.maxSize ){
+				indexArr=_guessSuggestions.data.slice(0,_guessSuggestions.size).sortOn("key",Array.DESCENDING | Array.RETURNINDEXEDARRAY);
+			}else{
+				indexArr=_guessSuggestions.data.sortOn("key",Array.DESCENDING | Array.RETURNINDEXEDARRAY);
+			}
+			//work arround for inconsitent ordered Dictionary table. bof
+
+			// root list;
+			for each ( i in indexArr ) {
+				//work arround for inconsitent ordered Dictionary table. bof
+				if ( i==0 || _guessSuggestions.data[i].score == lowestScore ) continue;
+				//work arround for inconsitent ordered Dictionary table. bof
+				
+				var candList:Array = new Array();
+				var candOriginalList:Array = new Array();
+				expandRootWord(candList,candOriginalList, InternalConstants.MAX_WORDS, _guessSuggestions.data[i].key, _guessSuggestions.data[i].hashEntry, word );
+				for ( j=0; j < candList.length; ++j) {
+					sc = ngram ( n, word, candList[j], InternalConstants.NGRAM_ANY_MISMATCH + InternalConstants.NGRAM_LOWERING) + leftCommonSubString(word, candList[j],initCap, wordCapValue);
+					if ( (sc>thresh) ) {
+						if ( _guessWordList.size < InternalConstants.MAX_GUESS ) {
+							_guessWordList.insert( new GuessWord(sc,candList[j], null ) );
+							if ( _guessWordList.size == InternalConstants.MAX_GUESS ) {
+								_guessWordList.buildheap();
+							}
+						}else {
+							if ( sc > _guessWordList.front.score ) {
+								_guessWordList.front.score = sc;
+								_guessWordList.front.key =  candList[j];
+								_guessWordList.front.original = null;
+								_guessWordList.updateFront();
+							}
+						}
+						
+					}
+				}
+			}
+
+			// now we are done generating guesses
+			// sort in order of decreasing score
+			var guessArr:Array = _guessWordList.toArray().sortOn("score",Array.NUMERIC | Array.DESCENDING);
+
+
+			// weight suggestions with a similarity index, based on
+			// the longest common subsequent algorithm and resort
+			var refobj:RefObject = new RefObject(0);
+			var gl:String;
+			for ( i=guessArr.length-1;i>= 0; --i ) {
+				gl = guessArr[i].key.toLocaleLowerCase();
+				var _lcs:int = StringUtils.lcslen(word, gl);
+				// same characters with different casing
+				if ( (n==gl.length) && (n == _lcs) ) {
+					guessArr[i].score += 2000;
+					break;
+				}
+				// heuristic weigthing of ngram scores
+				guessArr[i].score += 
+					// length of longest common subsequent minus length difference
+					2 * _lcs - Math.abs((int) (n - guessArr[i].key.length)) +
+					// weight length of the left common substring
+					leftCommonSubString(word, gl,initCap, wordCapValue) +
+					// weight equal character positions
+					((_lcs == StringUtils.commonCharacterPositions(word, gl, refobj)) ? 1: 0) +
+					// swap character (not neighboring)
+					((refobj.ref) ? 1000 : 0);
+			}
+
+			guessArr = guessArr.sortOn("score", Array.NUMERIC | Array.DESCENDING);
+			
+			
+			// copy over
+			var oldnsug:int = nsug;
+			var same:int = 0;
+			for ( i=0;i< guessArr.length; ++i ) {
+				if ( (nsug < this._maxSug) && (result.length < (oldnsug + this._maxngramsugs)) && (!same || (guessArr[i].score > 1000)) ) {
+					var unique:int = 1;
+					// leave only excellent suggestions, if exists
+					if ( guessArr[i].score > 1000 ) same = 1;
+					// don't suggest previous suggestions or a previous suggestion with prefixes or affixes
+					for ( j=0;j< result.length; ++j) {
+						if ( ( guessArr[i].key.indexOf(result[j]) != -1) || !checkWord(guessArr[i].key) ) unique = 0;
+					}
+					if ( unique ) {
+						result.push( guessArr[i].key );
+					}
+				}
+				
+			}
+			
+					var endTime:Number = getTimer();
+			return nsug;
+		}
+		
+		private function testValidSuggestion(element:*, gw:GuessWord):Boolean {
+			if ( gw.key.indexOf( element ) ) 
+				return false;
+			if ( !checkWord(element) ) return false; 
+			return true;
+		}
+
+		private function expandRootWord(guessWordList:Array, guessOriginalList:Array, maxn:int, root:String, he:HashEntry, badWord:String) :void {
+			// first add root word to list
+			var nh:int = 0, i:int, j:int;
+			var sfx:SuffixEntry;
+			var pfx:PrefixEntry;
+			var newWord:String;
+			var crossFlagArray:Array = new Array();
+			if ( (guessWordList.length < maxn) && 
+			!( (he.affixFlagVector != null) &&
+			( (this._attributeMgr.needAffix && he.testAffix(this._attributeMgr.needAffix)) || ( this._attributeMgr.onlyInCompound && he.testAffix(this._attributeMgr.onlyInCompound))))
+			){
+				guessWordList[nh] = root;
+				guessOriginalList[nh] = root;
+				crossFlagArray[nh] = false;
+				nh++;
+			}
+			
+			// handle suffixes
+			for ( i=0; (he.affixFlagVector !=null) && (i<he.affixFlagVector.length);++i) {
+				sfx= this._attributeMgr.suffixFlagTable[he.affixFlagVector.charAt(i)];
+				while( sfx  ) {
+					var index:int = badWord.lastIndexOf(sfx.affixKey);
+					if ( (index != -1) && ( index== (badWord.length-sfx.affixKey.length)) ) {
+						newWord = sfx.add(root);
+						if ( newWord) {
+							guessWordList[nh] = newWord;
+							guessOriginalList[nh] = root;
+							crossFlagArray[nh] = sfx.permissionToCombine;
+							nh++;
+						}
+					}
+					sfx = sfx.nextElementWithFlag; 
+				}
+			}
+			
+			// handle cross products of prefixes and suffixes
+			var n:int = nh;
+			for ( j=1;j<n;++j) {
+				if( crossFlagArray[j] ) {
+					for ( i=0;(he.affixFlagVector !=null) && (i<he.affixFlagVector.length);++i) {
+						pfx = this._attributeMgr.prefixFlagTable[he.affixFlagVector.charAt(i)];
+						while( pfx ) {
+							if ( badWord.indexOf(pfx.affixKey)== 0 ) {
+								newWord = pfx.add(guessWordList[j]);
+								if ( newWord) {
+									guessWordList[nh] = newWord;
+									guessOriginalList[nh] = root;
+									crossFlagArray[nh] = pfx.permissionToCombine;
+									nh++;
+								}
+							}
+							pfx = pfx.nextElementWithFlag;
+						}
+					}
+				}
+			}
+			
+			// now handle pure prefixes
+			for ( i=0; (he.affixFlagVector !=null) && (i<he.affixFlagVector.length);++i) {
+				pfx= this._attributeMgr.prefixFlagTable[he.affixFlagVector.charAt(i)];
+				while( pfx  ) {
+					if ( badWord.indexOf(pfx.affixKey) == 0 ) {
+						newWord = pfx.add(root);
+						if ( newWord) {
+							guessWordList[nh] = newWord;
+							guessOriginalList[nh] = root;
+							crossFlagArray[nh] = pfx.permissionToCombine;
+							nh++;
+						}
+					}
+					pfx = pfx.nextElementWithFlag; 
+				}
+			}
+				
+		}
+		
+		/*
+		 * ToDo: Since this is a generic algorithm, we might want move this code to StringUtils class.
+		 */
+		private function ngram(n:int, s1:String, s2:String, opt:int):int {
+
+			var i:int,j:int,k:int,m:int,n:int;
+	    	var nscore:int = 0, ns:int, l1:int, l2:int;
+
+			l1 = s1.length;
+			l2 = s2.length;
+			if ( opt & InternalConstants.NGRAM_LOWERING ) s2=s2.toLowerCase();
+			for ( i = 0; i<l1; i++ ) {
+				if ( s2.indexOf( s1.charAt(i) ) != -1 ) ns++;
+			}
+			nscore = nscore + ns;
+			if ( ns >= 2 ) {
+				for (  j = 2; j<=n; j++ ) {
+					ns = 0;
+					for (  i = 0; i <=(l1-j); i++ ) {
+	//					var tmp:String = s1.substr(i,i+j);
+	//					tmp = s1.substring(i,i+j);
+						if ( s2.indexOf( s1.substring(i,i+j) ) != -1 ) ns++;   // it could be signaficantly optimized If we can avoid to use substr() function....
+					}
+					nscore = nscore + ns;
+					if (ns < 2) break;
+				}
+			}
+			ns = 0;
+			if (opt & InternalConstants.NGRAM_LONGER_WORSE) ns = (l2-l1)-2;
+			if (opt & InternalConstants.NGRAM_ANY_MISMATCH) ns = Math.abs(l2-l1)-2;
+			ns = (nscore - ((ns > 0) ? ns : 0));
+			return ns;
+			return 1;
+		}
+
+		
+		/*
+		 * Deprecated function for now...
+		 * History: 
+		 *          A pre-version of implementation for error correction. After I optimized the code for performance,
+		 *          I drop this function by that time, but you know performance meassuring is a tricky problem... 
+		 * ToDo: Need a revisit when we implementing complex-affix support and compound-word support.
+		 */
+		private function ngram1(n:int, s1:String, s2:String, opt:int):int {
+	    	var nscore:int = 0, ns:int, l1:int, l2:int;
+			
+			var i:int,j:int,k:int,m:int,n:int;
+			
+			l1 = s1.length;
+			l2 = s2.length;
+			if ( opt & InternalConstants.NGRAM_LOWERING ) s2=s2.toLowerCase();
+			for (  j = 1; j<=n; j++ ) {
+				ns = 0;
+				for (  i = 0; i <=(l1-j); i++ ) {
+//					var tmp:String = s1.substr(i,i+j);
+//					tmp = s1.substring(i,i+j);
+					if ( s2.indexOf( s1.substring(i,i+j) ) != -1 ) ns++;   // it could be signaficantly optimized If we can avoid to use substr() function....
+				}
+				nscore = nscore + ns;
+				if (ns < 2) break;
+			}
+			ns = 0;
+			if (opt & InternalConstants.NGRAM_LONGER_WORSE) ns = (l2-l1)-2;
+			if (opt & InternalConstants.NGRAM_ANY_MISMATCH) ns = Math.abs(l2-l1)-2;
+			ns = (nscore - ((ns > 0) ? ns : 0));
+			return ns;
+			return 1;
+		}
+		
+		/*
+		 * ToDo: since this is a generic algorithm, we might want to move this function to StringUtils class.
+		 */
+		private function leftCommonSubString(s1:String,s2:String, initCap:Boolean, s1CapValue:int):int {
+			var res:int = 1;
+			if ( s1.charCodeAt(0) != s2.charCodeAt(0) && ( !initCap ) && (s1CapValue != s2.charCodeAt(0)) ) return 0;
+			for( var i:int=1; (i< s1.length) && (s1.charCodeAt(i) == s2.charCodeAt(i)); ++i ) {
+				res++;
+			}
+			return res;
+		}
+		
+		
+		public function suggest( result:Array, word:String, capType:int):int {
+			var nsug:int = 0;
+
+			// suggestions for an uppercase word (html -> HTML)
+			if ( (nsug < this._maxSug) && (nsug > -1 ) ) {
+				nsug = capchars(result,word,nsug);
+			}
+			
+			// perhaps we made a typical fault of spelling
+			if ( (nsug < this._maxSug) && (nsug > -1 ) ) {
+				nsug = replchars( result, word, nsug );	
+			}
+			
+			// perhaps we made chose the wrong char from a related set
+			if ( (nsug < this._maxSug) && (nsug > -1 ) ) {
+				nsug = mapchars( result, word, nsug );	
+			}
+
+			// did we swap the order of chars by mistake
+			if ( (nsug < this._maxSug) && (nsug > -1 ) ) {
+				nsug = swapchar( result, word, nsug );	
+			}
+			
+			// did we swap the order of non adjacent chars by mistake
+			if ( (nsug < this._maxSug) && (nsug > -1 ) ) {
+				nsug = longswapchar( result, word, nsug );	
+			}
+
+			// did we just hit the wrong key in place of a good char (case and keyboard)
+			if ( (nsug < this._maxSug) && (nsug > -1 ) ) {
+				nsug = badcharkey( result, word, nsug );	
+			}
+			 // did we add a char that should not be there
+			if ( (nsug < this._maxSug) && (nsug > -1 ) ) {
+				nsug = extrachar( result, word, nsug );	
+			}
+			
+			// did we forgot a char
+			if ( (nsug < this._maxSug) && (nsug > -1 ) ) {
+				nsug = forgotchar( result, word, nsug, capType );	
+			}
+
+			// did we move a char
+			if ( (nsug < this._maxSug) && (nsug > -1 ) ) {
+				nsug = movechar( result, word, nsug );	
+			}
+
+			// did we just hit the wrong key in place of a good char
+			if ( (nsug < this._maxSug) && (nsug > -1 ) ) {
+				nsug = badchar( result, word, nsug, capType );	
+			}
+			
+			// did we double two characters
+			if ( (nsug < this._maxSug) && (nsug > -1 ) ) {
+				nsug = doubletwochars( result, word, nsug );	
+			}
+			
+			// perhaps we forgot to hit space and two words ran together
+			if ( (nsug < this._maxSug) && (nsug > -1 ) ) {
+				nsug = twowords( result, word, nsug );	
+			}
+
+			return nsug;
+		}
+		
+		
+		
+		private function mapchars( result:Array, word:String, nsug:int ) :int {
+			if (word.length < 2) return nsug;
+			if ( (nsug == this._maxSug) || (this._attributeMgr.mapFilterTable.length == 0) ) return nsug;
+			var mapTable:Array = this._attributeMgr.mapFilterTable;
+			var counter:int = 0;
+			nsug = map_related(result, word, nsug, 0 ,mapTable, counter);
+			
+			return nsug;
+		}		
+
+		private function map_related( result:Array, word:String, nsug:int, startIndex:int, mapTable:Array, counter:int) :int {
+			var totalCheckCount:int = 8; // for performance issue only... 8 means four level detection...
+			var candidate:String;
+			var in_map:int = 0;
+			var j:int;
+			counter++;
+			if ( counter > totalCheckCount ) return nsug; // for performance issue only...
+			if ( nsug == this._maxSug ) return nsug;
+			if ( startIndex == word.length ) {
+				var cwrd:int = 1;
+				for (  j=0; j < result.length; ++j ) {
+					if ( result[j]== word ) cwrd=0;
+				}
+				if ( cwrd && checkWord(word) ) {
+					result.push(word);
+					nsug++;
+				}
+				return nsug;
+				
+			}
+			for ( var i:int = 0;i<mapTable.length ;++i ) {
+				if ( mapTable[i].mapCharSet.indexOf(word.charAt(startIndex)) != -1 ) {
+					in_map= 1;
+					for ( j =0; j< mapTable[i].mapCharSet.length; ++j ) {
+						candidate = word.substring(0,startIndex) +mapTable[i].mapCharSet.charAt(j)+word.substring(startIndex+1);
+						nsug = map_related(result,candidate,nsug,(startIndex+1),mapTable, counter);
+					}
+				}				
+			}
+			
+			if( !in_map) {
+				nsug = map_related(result,word,nsug,(startIndex+1),mapTable, counter);
+			}
+			return nsug;
+		} 
+		
+		private function twowords( result:Array, word:String, nsug:int ) :int {
+			var candidate:String;
+			var cwrd:int=1;
+			var count:int=0;
+			if (word.length < 3) return result.length;
+			if ( result.length >= this._maxSug ) return result.length;
+			
+			for( var i:int=1;i<word.length;++i) {
+				candidate = word.substring(0,i);
+				if ( !checkWord(candidate) ) continue;
+				candidate = word.substring(i);
+				if ( checkWord(candidate) ) {
+					candidate = word.substring(0,i) +" " + word.substring(i);
+					for ( var j:int=0; j < result.length; ++j ) {
+						if ( result[j]== candidate ) cwrd=0;
+					}
+					if ( cwrd ) {
+						if ( result.length >= this._maxSug ) return result.length;
+						result.push(candidate);
+						nsug++;
+					}
+				}
+			}
+
+			return nsug;
+		}		
+
+		private function doubletwochars( result:Array, word:String, nsug:int ) :int {
+			var candidate:String;
+			var nstate:int=0;
+			if (word.length < 5) return nsug;
+			for (var i:int=2;i<word.length;++i) {
+				if( word.charCodeAt(i) == word.charCodeAt(i-2) ) {
+					nstate++;
+					if ( nstate==3) {
+						candidate = word.substring(0,i-1)+word.substring(i+1);
+						nsug = testSuggestion( result,candidate, nsug);
+						if ( nsug == -1 || nsug == this._maxSug ) return nsug;
+						nstate = 0;
+					}
+				}else {
+					nstate=0;
+				}
+			}
+			return nsug;
+		}
+
+		private function badchar( result:Array, word:String, nsug:int, capType:int ) :int {
+			if ( this._cAllTry == null ) return nsug;
+			if (word.length < 2) return nsug;
+			var candidate:String;
+			var i:int, j:int;			
+			switch(capType) {
+				case InternalConstants.NOCAP: {
+					// first for init capticalized case...
+					for ( i = 0; i< this._cAllTry.length;++i) {
+						candidate = this._cAllTry.charAt(i)+word.substring(1);
+						nsug = testSuggestion( result,candidate, nsug);
+						if ( nsug == -1 || nsug == this._maxSug ) return nsug;
+					}
+					// for the rest of the word...
+					for ( i = 0; i< this._cLowerTry.length;++i) {
+						for ( j=1;j<word.length;++j) {
+							candidate = word.substring(0,j)+this._cLowerTry.charAt(i)+word.substring(j+1);
+							nsug = testSuggestion( result,candidate, nsug);
+							if ( nsug == -1 || nsug == this._maxSug ) return nsug;
+						}
+					}
+					break;
+				}
+				case InternalConstants.INITCAP:{
+					// first for init capticalized case...
+					for ( i = 0; i< this._cAllTry.length;++i) {
+						candidate = this._cAllTry.charAt(i)+word.substring(1);
+						nsug = testSuggestion( result,candidate, nsug);
+						if ( nsug == -1 || nsug == this._maxSug ) return nsug;
+					}
+					// for the rest of the word...
+					for ( i = 0; i< this._cLowerTry.length;++i) {
+						for ( j=1;j<word.length;++j) {
+							candidate = word.substring(0,j)+this._cLowerTry.charAt(i)+word.substring(j+1);
+							nsug = testSuggestion( result,candidate, nsug);
+							if ( nsug == -1 || nsug == this._maxSug ) return nsug;
+						}
+					}
+					break;
+				}
+				case InternalConstants.HUHCAP: { 
+				}
+				case InternalConstants.HUHINITCAP:{ 
+					for ( i = 0; i< this._cAllTry.length;++i) {
+						for ( j=0;j<word.length;++j) {
+							candidate = word.substring(0,j)+this._cAllTry.charAt(i)+word.substring(j+1);
+							nsug = testSuggestion( result,candidate, nsug);
+							if ( nsug == -1 || nsug == this._maxSug ) return nsug;
+						}
+					}
+					break;
+				}
+				case InternalConstants.ALLCAP: {
+					for ( i = 0; i< this._cUpperTry.length;++i) {
+						for ( j=0;j<word.length;++j) {
+							candidate = word.substring(0,j)+this._cUpperTry.charAt(i)+word.substring(j+1);
+							nsug = testSuggestion( result,candidate, nsug);
+							if ( nsug == -1 || nsug == this._maxSug ) return nsug;
+						}
+					}
+					break;
+				}
+			}
+			
+			return nsug;
+		}		
+
+		// did we move a char
+		private function movechar( result:Array, word:String, nsug:int ) :int {
+			var candidate:String;
+			var i:int,j:int;
+			var char:String;
+			if (word.length < 3) return nsug;
+			for ( i=0;i<word.length-2;++i) {
+				char = word.charAt(i);
+				for ( j=i+2;j<word.length;++j) {
+					candidate = word.substring(0,i)+word.substring(i+1,j+1)+char+word.substring(j+1);
+					nsug = testSuggestion( result,candidate, nsug);
+					if ( nsug == -1 || nsug == this._maxSug ) return nsug;
+				}
+			}
+			
+			for ( i=word.length-1;i>=2;--i) {
+				char = word.charAt(i);
+				for ( j=i-2;j>=0; --j) {
+					candidate = word.substring(0,j)+char+word.substring(j,i)+word.substring(i+1);
+					nsug = testSuggestion( result,candidate, nsug);
+					if ( nsug == -1 || nsug == this._maxSug ) return nsug;
+				}
+			}
+			
+			return nsug;
+		}		
+
+		private function forgotchar( result:Array, word:String, nsug:int, capType:int ) :int {
+			if ( this._cAllTry == null ) return nsug;
+			var candidate:String;
+			var i:int, j:int;			
+			if (word.length < 2) return nsug;
+			switch(capType) {
+				case InternalConstants.NOCAP: {
+					for (i =0; i< this._cAllTry.length; ++i ) {
+						candidate= _cAllTry.charAt(i) + word.substring(0);
+						nsug = testSuggestion( result,candidate, nsug);
+						if ( nsug == -1 || nsug == this._maxSug ) return nsug;
+					}
+
+					for (i =0; i< this._cLowerTry.length; ++i ) {
+						for ( j=1; j< word.length;j++) {
+							candidate= word.substring(0,j)+_cLowerTry.charAt(i) + word.substring(j);
+							nsug = testSuggestion( result,candidate, nsug);
+							if ( nsug == -1 || nsug == this._maxSug ) return nsug;
+						}
+						candidate= word+_cLowerTry.charAt(i);
+						nsug = testSuggestion( result,candidate, nsug);
+						if ( nsug == -1 || nsug == this._maxSug ) return nsug;
+					}
+					break;
+				}
+				case InternalConstants.INITCAP:{
+					// first for init capticalized case...
+					for (i =0; i< this._cAllTry.length; ++i ) {
+						candidate= _cAllTry.charAt(i) + word.substring(0);
+						nsug = testSuggestion( result,candidate, nsug);
+						if ( nsug == -1 || nsug == this._maxSug ) return nsug;
+					}
+
+					for (i =0; i< this._cLowerTry.length; ++i ) {
+						for ( j=1; j< word.length;j++) {
+							candidate= word.substring(0,j)+_cLowerTry.charAt(i) + word.substring(j);
+							nsug = testSuggestion( result,candidate, nsug);
+							if ( nsug == -1 || nsug == this._maxSug ) return nsug;
+						}
+						candidate= word+_cLowerTry.charAt(i);
+						nsug = testSuggestion( result,candidate, nsug);
+						if ( nsug == -1 || nsug == this._maxSug ) return nsug;
+					}
+					break;
+				}
+				case InternalConstants.HUHCAP: { 
+				}
+				case InternalConstants.HUHINITCAP:{ 
+					for (i =0; i< this._cAllTry.length; ++i ) {
+						for ( j=1; j< word.length;j++) {
+							candidate= word.substring(0,j)+_cAllTry.charAt(i) + word.substring(j);
+							nsug = testSuggestion( result,candidate, nsug);
+							if ( nsug == -1 || nsug == this._maxSug ) return nsug;
+						}
+						candidate= word+_cAllTry.charAt(i);
+						nsug = testSuggestion( result,candidate, nsug);
+						if ( nsug == -1 || nsug == this._maxSug ) return nsug;
+					}
+					break;
+				}
+				case InternalConstants.ALLCAP: {
+					for (i =0; i< this._cUpperTry.length; ++i ) {
+						for ( j=0; j< word.length;j++) {
+							candidate= word.substring(0,j)+_cUpperTry.charAt(i) + word.substring(j);
+							nsug = testSuggestion( result,candidate, nsug);
+							if ( nsug == -1 || nsug == this._maxSug ) return nsug;
+						}
+						candidate= word+_cUpperTry.charAt(i);
+						nsug = testSuggestion( result,candidate, nsug);
+						if ( nsug == -1 || nsug == this._maxSug ) return nsug;
+					}
+					break;
+				}
+			}
+			return nsug;
+		}		
+
+		// error is word has an extra letter it does not need 
+		private function extrachar( result:Array, word:String, nsug:int ) :int {
+			var candidate:String;
+			if (word.length < 2) return nsug;
+			for ( var i:int=0; i< word.length ; ++i ) {
+				candidate = word.substring(0,i) + word.substring(i+1);
+				nsug = testSuggestion( result,candidate, nsug);
+				if ( nsug == -1 || nsug == this._maxSug ) return nsug;
+			}
+			return nsug;
+		}		
+		
+		// error is wrong char in place of correct one (case and keyboard related version)
+		private function badcharkey( result:Array, word:String, nsug:int ) :int {
+			var candidate:String;
+			if (word.length < 2) return nsug;
+			var startIndex:int = 0;
+			// swap out each char one by one and try uppercase and neighbor
+			// keyboard chars in its place to see if that makes a good word
+			for ( var i:int =0; i<word.length; ++i) {
+				// check with uppercase letters
+				if ( word.charAt(i).toLocaleUpperCase() != word.charAt(i) ) {
+					candidate = word.substring(0,i)+word.charAt(i).toLocaleUpperCase()+word.substring(i+1);
+					nsug = testSuggestion( result,candidate, nsug);
+					if ( nsug == -1 || nsug == this._maxSug ) return nsug;
+				}
+				// check neighbor characters in keyboard string
+				if ( this._ckey == null ) continue;
+				startIndex = this._ckey.indexOf(word.charAt(i),startIndex);
+				while ( startIndex != -1 ) {
+					if ( (startIndex!=0) && (_ckey.charAt(startIndex-1) != "|" ) ) {
+						candidate = word.substring(0,i)+_ckey.charAt(startIndex-1)+word.substring(i+1);
+						nsug = testSuggestion( result,candidate, nsug);
+						if ( nsug == -1 || nsug == this._maxSug ) return nsug;
+					}
+					if ( (_ckey.charAt(startIndex+1)!="|") && (startIndex != _ckey.length - 1) ) {
+						candidate = word.substring(0,i)+_ckey.charAt(startIndex+1) + word.substring(i+1);
+						nsug = testSuggestion( result,candidate, nsug);
+						if ( nsug == -1 || nsug == this._maxSug ) return nsug;
+					}
+					startIndex = this._ckey.indexOf(word.charAt(i),startIndex+1);
+				}
+			}
+			
+			return nsug;
+		}		
+
+		private function longswapchar( result:Array, word:String, nsug:int ) :int {
+			var candidate:String;
+			if (word.length < 2) return nsug;
+			for ( var i:int =0 ; i< word.length-2; ++i ) {
+				for ( var j:int = i+2;j< word.length;++j) {
+					candidate = word.substring(0,i)+ word.charAt(j) + word.substring(i+1,j) + word.charAt(i) + word.substring(j+1);
+					nsug = testSuggestion( result,candidate, nsug);
+					if ( nsug == -1 || nsug == this._maxSug ) return nsug;
+				}
+			}
+			return nsug;
+		}		
+
+		private function swapchar( result:Array, word:String, nsug:int ) :int {
+			var candidate:String;
+			if (word.length < 2) return nsug;
+			var i:int;
+			var wl:int = word.length;
+			// try swapping adjacent chars one by one
+			for (i=0;i< wl-1;++i) {
+				candidate = word.substring(0,i)+word.charAt(i+1)+word.charAt(i) + word.substring(i+2);
+				nsug = testSuggestion( result,candidate, nsug);
+				if ( nsug == -1 || nsug == this._maxSug ) return nsug;
+			}
+			
+			if ( wl == 4 || wl == 5 ) {
+				candidate = word.charAt(1) + word.charAt(0);
+				if ( wl == 5) candidate +=word.charAt(2);
+				candidate += word.charAt(wl - 1) + word.charAt(wl - 2); 
+				nsug = testSuggestion( result,candidate, nsug);
+				if ( nsug == -1 || nsug == this._maxSug ) return nsug;
+				if ( wl == 5 )  {
+					candidate = word.charAt(0) + word.charAt(2) + word.charAt(1) + candidate.substr(3);
+					nsug = testSuggestion( result,candidate, nsug);
+					if ( nsug == -1 || nsug == this._maxSug ) return nsug;
+				}
+			}
+			return nsug;
+			
+		}		
+		private function replchars( result:Array, word:String, nsug:int ) :int {
+			var candidate:String;
+			if (word.length < 2) return nsug;
+			var searchIndex:int=0;
+			if ( (this._attributeMgr.simpleFilterTable==null) || (this._attributeMgr.simpleFilterTable.length == 0) ) return nsug;
+			for ( var i:int = 0; i < this._attributeMgr.simpleFilterTable.length; ++i ) {
+				while ( (searchIndex = word.indexOf( this._attributeMgr.simpleFilterTable[i].matchString,searchIndex)) != -1 ){
+					searchIndex = searchIndex + this._attributeMgr.simpleFilterTable[i].matchString.length;
+					candidate = word.substr(0, searchIndex-this._attributeMgr.simpleFilterTable[i].matchString.length) + 
+					this._attributeMgr.simpleFilterTable[i].replacement + 
+					word.substr(searchIndex);
+					nsug = testSuggestion( result,candidate, nsug);
+					if ( nsug == -1 || nsug == this._maxSug ) return nsug;
+				}
+				
+			}
+			return nsug;
+		}
+		
+		private function capchars( result:Array, word:String, nsug:int) : int {
+			var candidate:String = word.toLocaleUpperCase();
+			return testSuggestion(result,candidate,nsug);
+		}
+		
+		private function testSuggestion(result:Array, word:String, nsug:int):int {
+			var cwrd:int=1;
+			if ( result.length >= this._maxSug ) return nsug;
+			for ( var i:int=0; i < result.length; ++i ) {
+				if ( result[i]== word ) cwrd=0;
+			}
+			
+			if ( (cwrd) && checkWord(word) ) {
+				result.push(word);
+				nsug++;
+			}
+			return nsug;
+		}
+
+		// see if a candidate suggestion is spelled correctly
+		// needs to check both root words and words with affixes
+		
+		// ToDo the following in next release...
+		// obsolote MySpell-HU modifications:
+		// return value 2 and 3 marks compounding with hyphen (-)
+		// `3' marks roots without suffix   
+
+		private function checkWord(word:String):int {
+			var rv:HashEntry = null;
+			var nosuffix:int =0;
+			if ( this._attributeMgr ) {
+				rv = _attributeMgr.lookup(word);
+				if ( rv ) {
+					if ( (rv.affixFlagVector) && ( rv.testAffix(this._attributeMgr.forbiddenWord) || rv.testAffix(this._attributeMgr.noSuggest) )  ){
+						return 0;
+					}
+					while ( rv ) {
+						if ( (rv.affixFlagVector) &&  ( rv.testAffix(this._attributeMgr.needAffix) || rv.testAffix(InternalConstants.ONLYUPCASEFLAG) || rv.testAffix(this._attributeMgr.onlyInCompound) )  ) {
+							rv = rv.next
+						}else break;
+					}
+				}else rv = _attributeMgr.optPrefixCheck2(word, 0,0) // only prefix, and prefix + suffix XXX
+				
+				if ( rv ) {
+					nosuffix = 1;
+				}else {
+					rv = _attributeMgr.optSuffixCheck2(word,0,null,0,0);
+				}
+				//this is added after we have two level suffix stripping
+				if (!rv &&  this._attributeMgr.haveContClass) {
+					rv = this._attributeMgr.optTwoSuffixCheck(word, 0, null, 0);
+					if (!rv) rv = this._attributeMgr.optTwoPrefixCheck(word,1, 0);
+				}
+				
+				// check forbidden words
+				if ( (rv) && (rv.affixFlagVector) && ( rv.testAffix(this._attributeMgr.forbiddenWord) || rv.testAffix(InternalConstants.ONLYUPCASEFLAG) 
+				|| rv.testAffix(this._attributeMgr.noSuggest) || rv.testAffix(this._attributeMgr.onlyInCompound) ) ) {
+					return 0;
+				}
+				if ( rv ) {
+					//// XXX obsolote ToDo
+					return 1;
+				}
+				
+			}
+			return 0;
+		}
+		
+	}
+}
+
+
+internal class GuessWord {
+	private var _score:int;
+	private var _key:String;
+	private var _original:String;
+	
+	public function GuessWord(score:int, key:String, original:String){
+		this.key = key;
+		this.score = score;
+		this.original = original;
+	}
+	
+	public function get score():int {
+		return this._score;
+	}
+	public function set score(value:int) :void {
+		this._score = value;
+	}
+	
+	public function get key():String {
+		return this._key;
+	}
+	public function set key(value:String) :void {
+		this._key = value;
+	}
+	public function get original():String {
+		return this._original;
+	}
+	public function set original(value:String) :void {
+		this._original = value;
+	}
+}
+
+internal class SuggestionEntry {
+	import com.adobe.linguistics.spelling.core.HashEntry;
+	private var _score:int;
+	private var _key:String;
+	private var _hashEntry:HashEntry; 
+	
+	public function SuggestionEntry(score:int, key:String, hashEntry:HashEntry) {
+		this.key = key;
+		this.score = score;
+		this.hashEntry = hashEntry;
+		
+	}
+	
+	public function get score():int {
+		return this._score;
+	}
+	public function set score(value:int) :void {
+		this._score = value;
+	}
+	
+	public function get key():String {
+		return this._key;
+	}
+	public function set key(value:String) :void {
+		this._key = value;
+	}
+	
+	public function get hashEntry():HashEntry {
+		return this._hashEntry;
+	}
+	
+	public function set hashEntry(value:HashEntry ) :void {
+		this._hashEntry = value;
+	}
+	
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/UserDictionaryEngine.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/UserDictionaryEngine.as b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/UserDictionaryEngine.as
new file mode 100644
index 0000000..93ba707
--- /dev/null
+++ b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/UserDictionaryEngine.as
@@ -0,0 +1,71 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+package com.adobe.linguistics.spelling.core
+{
+	import com.adobe.linguistics.spelling.UserDictionaryInternal;
+	
+	public class UserDictionaryEngine
+	{
+		// Private properties
+		private var _dictionaryList:Array;		// get only
+		private var _userDict:UserDictionaryInternal;
+
+		public function UserDictionaryEngine(ud:UserDictionaryInternal=null)
+		{
+			_dictionaryList = new Array();
+		}
+		public function addDictionary(userDictionary:UserDictionaryInternal):Boolean
+		{
+			if ( (userDictionary == null) ) return false;
+			
+			for ( var i:int = 0;i < _dictionaryList.length; ++i ) {
+				if ( userDictionary == _dictionaryList[i] )
+					return false;
+			} 
+			_dictionaryList.push(userDictionary);
+			return true;
+		}
+
+		public function removeDictionary(userDictionary:UserDictionaryInternal):Boolean
+		{
+			
+			for ( var i:int =0; i < _dictionaryList.length; ++i ) {
+				if ( userDictionary == _dictionaryList[i] ) {
+					_dictionaryList.splice(i,1);
+					return true;
+				}
+			}
+			return false;
+		}
+		
+		public function spell( word:String ) :Boolean {
+			var result:Boolean = false;
+			for ( var i:int =0; (i < _dictionaryList.length) && (!result);++i ) {
+				_userDict = _dictionaryList[i];
+				if ( _userDict ) {
+					result = (_userDict._wordList.lookup(word) != -1);
+				}
+			}
+			return result;
+		}
+
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/container/Collection.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/container/Collection.as b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/container/Collection.as
new file mode 100644
index 0000000..5954c21
--- /dev/null
+++ b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/container/Collection.as
@@ -0,0 +1,89 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+
+
+package com.adobe.linguistics.spelling.core.container
+{
+	/**
+	 * public interface Collection The root interface in the collection 
+	 * hierarchy. A collection represents a group of objects, known as 
+	 * its elements. Some collections allow duplicate elements and others 
+	 * do not. Some are ordered and others unordered. The SDK does not 
+	 * provide any direct implementations of this interface: it provides 
+	 * implementations of more specific subinterfaces like Set and List. 
+	 */
+	 
+	 /**
+	  * ToDo: add hashCode() function
+	  * 	add remove()/add() function
+	  */
+	 
+	public interface Collection
+	{
+
+		/**
+		 * The number of elements in this collection.
+		 * @Returns the number of elements in this collection.
+		 */
+		function get size():int;
+		
+		/**
+		 * Tests if the collection is empty.
+		 * 
+		 * @ Returns true if this collection contains no elements.
+		 */
+		function isEmpty():Boolean
+		
+		/**
+		 * Determines if the collection contains the specified element.
+		 * 
+		 * @ obj: element whose presence in this collection is to be tested.
+		 * 
+		 * @ Returns true if this collection contains the specified element.
+		 */
+		function contains( obj:* ) : Boolean
+		
+		/**
+		 * Removes all of the elements from this collection (optional operation).
+		 */
+		function clear():void
+		
+		/**
+		 * Returns an iterator over the elements in this collection. There are 
+		 * no guarantees concerning the order in which the elements are returned 
+		 * (unless this collection is an instance of some class that provides a guarantee). 
+		 *
+		 * @an Iterator over the elements in this collection
+		 */
+		function getIterator():Iterator
+		
+		/**
+		 * Returns an array containing all of the elements in this collection. 
+		 * If the collection makes any guarantees as to what order its elements 
+		 * are returned by its iterator, this method must return the elements 
+		 * in the same order.
+		 * 
+		 * @return An array.
+		 */
+		function toArray():Array
+		
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/container/Enumeration.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/container/Enumeration.as b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/container/Enumeration.as
new file mode 100644
index 0000000..16611ad
--- /dev/null
+++ b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/container/Enumeration.as
@@ -0,0 +1,28 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+package com.adobe.linguistics.spelling.core.container
+{
+	public interface Enumeration
+	{
+		function hasMoreElements():Boolean;
+		function nextElement():*;
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/container/HashTable.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/container/HashTable.as b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/container/HashTable.as
new file mode 100644
index 0000000..cf38c81
--- /dev/null
+++ b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/container/HashTable.as
@@ -0,0 +1,179 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+package com.adobe.linguistics.spelling.core.container
+{
+	import flash.utils.Dictionary;
+	
+	/**
+	 * A hash table
+	 */
+	public class HashTable implements Collection
+	{
+		protected var _map:Dictionary;
+		protected var _elementNum:int;
+		
+		/**
+		 * Initializes a new hash table.
+		 * 
+		 * @param size The size of the hash table.
+		 * @param hash A hashing function.
+		 */
+		public function HashTable(useWeakReferences:Boolean = true)
+		{
+			_map = new Dictionary( useWeakReferences );
+			_elementNum = 0;
+		}
+
+		public function put(key:*, value:*) : void
+		{
+			_map[key] = value;
+			++_elementNum;
+		}
+
+		public function remove(key:*) : void
+		{
+			delete _map[key];
+			--_elementNum;
+		}
+
+		public function containsKey(key:*) : Boolean
+		{
+			return _map.hasOwnProperty( key );
+		}
+		
+		public function containsValue(value:*) : Boolean
+		{
+			for ( var key:* in _map )
+			{
+				if ( _map[key] == value )
+				{
+					return true;
+				}
+			}
+			return false;
+		}
+
+		public function contains(value:*):Boolean {
+			return containsValue(value);
+		}
+
+		public function getElement(key:* ):* {
+			return _map[key];
+		}
+				
+		/**
+		 * @inheritDoc
+		 */
+		public function clear() : void
+		{
+			for ( var key:* in _map )
+			{
+				remove( key );
+			}
+		}
+		
+		/**
+		 * @inheritDoc
+		 */
+		public function getIterator():Iterator
+		{
+			return null;
+		}
+		
+		/**
+		 * @inheritDoc
+		 */
+		public function get size():int
+		{
+			return _elementNum;
+		}
+		
+		/**
+		 * @inheritDoc
+		 */
+		public function isEmpty():Boolean
+		{
+			return _elementNum == 0;
+		}
+
+		public function get keys() : Array
+		{
+			var _keys:Array = [];
+
+			for (var key:* in _map)
+			{
+				_keys.push( key );
+			}
+			return _keys;
+		}
+		
+		public function get elements() : Array
+		{
+			var _values:Array = [];
+
+ 			for each ( var value:* in _map ) {
+				_values.push( value );
+			}
+			return _values;
+		}
+
+		/**
+		 * @inheritDoc
+		 */
+		public function toArray():Array
+		{
+			return keys;
+		}
+		
+		/**
+		 * Prints out a string representing the current object.
+		 * 
+		 * @return A string representing the current object.
+		 */
+		public function toString():String
+		{
+			return "[HashTable, size=" + size + "]";
+		}
+		
+		public function get hashMap():Dictionary {
+			return this._map;
+		}
+		
+		/**
+		 * Need refine... Possible solution is that we can use two function paramter to control the input and output. 
+		 * 
+		 *
+		 */
+		public function watchEntries(func:Function=null):Array {
+			if ( func == null )
+				return null;
+			var res:Array = new Array();
+			for (var curKey:* in _map)
+			{
+				if ( func( curKey, _map[curKey] ) ) {
+					res.push( curKey );
+				}
+			}
+			return (res.length == 0)? null: res;
+		}
+		
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/container/Heap.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/container/Heap.as b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/container/Heap.as
new file mode 100644
index 0000000..555d6a3
--- /dev/null
+++ b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/container/Heap.as
@@ -0,0 +1,263 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+
+package com.adobe.linguistics.spelling.core.container
+{
+	/**
+	 * BinaryHeap implementation of priority queue. The heap is either a 
+	 * minimum or maximum heap as determined by parameters passed to constructor. 
+	 * 
+	 */
+	public final class Heap implements Collection
+	{
+		private var __size:int;
+		private var __count:int;
+		private var __compare:Function;
+		public var __heap:Array;
+		
+		/**
+		 * Create a new heap.
+		 * 
+		 * @param size The heap's maximum capacity.
+		 * @param compare A comparison function for sorting the heap's data.
+		 *        If no function is passed, the heap uses default function.
+		 */
+		public function Heap(size:int=1000, compare:Function = null)
+		{
+			__count = 0;
+			__heap = new Array(__size = size + 1);
+			
+			if (compare == null)
+				__compare = function(a:int, b:int):int { return a - b; };
+			else
+				__compare = compare;
+		}
+
+		/**
+		 * The maximum capacity.
+		 */
+		public function get maxSize():int
+		{
+			return __size;
+		}
+
+		public function isEmpty():Boolean
+		{
+			return false;
+		}
+		
+		public function toArray():Array
+		{
+			return __heap.slice(1, __count + 1);
+		}
+		
+		public function toString():String
+		{
+			return "[Heap, size=" + __size +"]";
+		}
+		
+		public function dump():String
+		{
+			var k:int = __count + 1;
+			var s:String = "Heap\n{\n";
+			for (var i:int = 1; i < k; i++)
+				s += "\t" + __heap[i] + "\n";
+			s += "\n}";
+			return s;
+		}
+		
+		/**
+		 * The front item.
+		 */
+		public function get front():*
+		{
+			return __heap[1];
+		}
+		
+		/**
+		 * Enqueues.
+		 * @param obj The data to enqueue.
+		 * @return False if the queue is full, otherwise true.
+		 */
+		public function enqueue(obj:*):Boolean
+		{
+			if (__count + 1 < __size){
+				__heap[++__count] = obj;
+				
+				var i:int = __count;
+				var tmp:* = __heap[i];
+				var v:*;
+				var parent:int = i >> 1;
+				
+				if (__compare != null)
+				{
+					while (parent > 0){
+						 v = __heap[parent];
+						if (__compare(tmp, v) < 0){
+							__heap[i] = v;
+							i = parent;
+							parent >>= 1;
+						}
+						else break;
+					}
+				}else{
+					while (parent > 0){
+						v = __heap[parent];
+						if (tmp - v < 0){
+							__heap[i] = v;
+							i = parent;
+							parent >>= 1;
+						}
+						else break;
+					}
+				}
+				__heap[i] = tmp;
+				return true;
+			}
+			return false;
+		}
+		
+		/**
+		 * Dequeues.
+		 * @return The heap's front item or null if it is empty.
+		 */
+		public function dequeue():*
+		{
+			if (__count >= 1){
+				var o:* = __heap[1];
+				
+				__heap[1] = __heap[__count];
+				delete __heap[__count];
+				
+				var tmp:* = __heap[i];
+				var i:int = 1;
+				var v:*;
+				var child:int = i << 1;
+				
+				if (__compare != null) {
+					while (child < __count) {
+						if (child < __count - 1) {
+							if (__compare(__heap[child], __heap[int(child + 1)]) > 0)
+								child++;
+						}
+						v = __heap[child];
+						if (__compare(tmp, v) > 0){
+							__heap[i] = v;
+							i = child;
+							child <<= 1;
+						}
+						else break;
+					}
+				}else{
+					while (child < __count){
+						if (child < __count - 1){
+							if (__heap[child] - __heap[int(child + 1)] > 0)
+								child++;
+						}
+						v = __heap[child];
+						if (tmp - v > 0){
+							__heap[i] = v;
+							i = child;
+							child <<= 1;
+						}
+						else break;
+					}
+				}
+				__count--;
+				__heap[i] = tmp;
+				return o;
+			}
+			return null;
+		}
+		
+		/**
+		 * Tests if a given item exists.
+		 */
+		public function contains(obj:*):Boolean
+		{
+			for (var i:int = 1; i <= __count; i++){
+				if (__heap[i] === obj)
+					return true;
+			}
+			return false;
+		}
+		
+		public function clear():void
+		{
+			__heap = new Array(__size);
+			__count = 0;
+		}
+		
+		public function getIterator():Iterator
+		{
+			return new HeapIterator(this);
+		}
+
+		public function get size():int
+		{
+			return __count;
+		}
+		
+	}
+}
+
+import com.adobe.linguistics.spelling.core.container.Heap;
+import com.adobe.linguistics.spelling.core.container.Iterator;
+
+internal class HeapIterator implements Iterator
+{
+	private var __values:Array;
+	private var __length:int;
+	private var __cursor:int;
+	
+	public function HeapIterator(heap:Heap)
+	{
+		__values = heap.toArray();
+		__cursor = 0;
+		__length = __values.length;
+	}
+	
+	public function get data():*
+	{
+		return __values[__cursor];
+	}
+	
+	public function set data(obj:*):void
+	{
+		__values[__cursor] = obj;
+	}
+	
+	public function start():void
+	{
+		__cursor = 0;
+	}
+	
+	public function hasNext():Boolean
+	{
+		return __cursor < __length;
+	}
+	
+	public function next():*
+	{
+		return __values[__cursor++];
+	}
+}
+

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/container/Iterator.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/container/Iterator.as b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/container/Iterator.as
new file mode 100644
index 0000000..4abe889
--- /dev/null
+++ b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/container/Iterator.as
@@ -0,0 +1,64 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+
+
+package com.adobe.linguistics.spelling.core.container
+{
+	/**
+	 * public interface Iterator
+	 * An iterator over a collection. Iterator takes the place of Enumeration 
+	 * in the AS collections framework. Iterators differ from enumerations in 
+	 * two ways:
+	 * Iterators allow the caller to remove elements from the underlying 
+	 * collection during the iteration with well-defined semantics.
+	 * Method names have been improved. 
+	 */
+	public interface Iterator
+	{
+
+		/**
+		 * Grants access to the current item being referenced by the iterator.
+		 * This provides a quick way to read or write the current data.
+		 * Dirty interface, will remove in next version.
+		 */
+		function get data():*
+		function set data(obj:*):void	
+
+		/**
+		 * Seek the iterator to the first item in the collection.
+		 */
+		function start():void
+
+		/**
+		 * Returns the next element in the iteration.
+		 * 
+		 */
+		function next():*
+		
+		/**
+		 * Returns true if the iteration has more elements.
+		 * 
+		 * @Returns true if the iteration has more elements.
+		 */
+		function hasNext():Boolean
+		
+		}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/container/Set.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/container/Set.as b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/container/Set.as
new file mode 100644
index 0000000..32525e7
--- /dev/null
+++ b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/container/Set.as
@@ -0,0 +1,195 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+
+
+package com.adobe.linguistics.spelling.core.container
+{
+	import flash.utils.Dictionary;
+	
+	/**
+	 * A collection that contains no duplicate elements. More formally, sets 
+	 * contain no pair of elements e1 and e2 such that e1.equals(e2), and at 
+	 * most one null element. As implied by its name, this interface models 
+	 * the mathematical set abstraction.
+	 */
+	public final class Set implements Collection
+	{
+		private var __size:int;
+		private var __set:Dictionary = new Dictionary(true);
+		
+		/**
+		 * Creates a empty set.
+		 */
+		public function Set()
+		{
+			__set = new Dictionary();			
+		}
+		
+
+		public function contains(obj:*):Boolean
+		{
+			return __set[obj] != undefined;
+		}
+		
+		public function clear():void
+		{
+			__set = new Dictionary();
+			__size = 0;
+		}
+		
+		public function get data():Dictionary {
+			return this.__set;
+		}
+		
+		public function getIterator():Iterator
+		{
+			return new SetIterator(this);
+		}
+		
+		public function get size():int
+		{
+			return __size;
+		}
+		
+		public function isEmpty():Boolean
+		{
+			return __size == 0;
+		}
+
+		/**
+		 * Reads an item from the set.
+		 * 
+		 * @param obj The item to retrieve.
+		 * @return The item matching the obj parameter or null.
+		 */
+		public function lookup(obj:*):*
+		{
+			var val:* = __set[obj];
+			return val != undefined ? val : null;
+		}
+
+		/**
+		 * Adds the specified element to this set if it is not already present (optional operation).
+		 * 
+		 * @param obj The item to be added.
+		 */
+		public function insert(obj:*):void
+		{
+			if (obj == null) return;
+			if (obj == undefined) return;
+			if (__set[obj]) return;
+			
+			__set[obj] = obj;
+			__size++;
+		}
+		
+		/**
+		 * Removes the specified element from this set if it is present (optional operation).
+		 * 
+		 * @param  obj The item to be removed
+		 * @return The removed item or null.
+		 */
+		public function remove(obj:*):Boolean
+		{
+			if (__set[obj] != undefined)
+			{
+				delete __set[obj];
+				__size--;
+				return true;
+			}
+			return false;
+		}
+		
+		public function toArray():Array
+		{
+			var a:Array = new Array(__size);
+			var j:int;
+			for (var i:* in __set) a[j++] = i;
+			return a;
+		}
+		
+		/**
+		 * Return a string representing the current object.
+		 */
+		public function toString():String
+		{
+			return "[Set, size=" + size + "]";
+		}
+		
+		/**
+		 * Prints out all elements (debug use only).
+		 */
+		public function dump():String
+		{
+			var s:String = "Set:\n";
+			for each (var i:* in __set)
+				s += "[val: " + i + "]\n";
+			return s;
+		}
+	}
+
+}
+
+
+import com.adobe.linguistics.spelling.core.container.Iterator
+import com.adobe.linguistics.spelling.core.container.Set;
+
+internal class SetIterator implements Iterator
+{
+	private var __cursor:int;
+	private var __size:int;
+	private var __s:Set;
+	private var __a:Array;
+
+	public function start():void
+	{
+		__cursor = 0;
+	}
+
+	public function get data():*
+	{
+		return __a[__cursor];
+	}
+	
+	public function set data(obj:*):void
+	{
+		__s.remove(__a[__cursor]);
+		__s.insert(obj);
+	}	
+	
+	public function SetIterator(s:Set)
+	{
+		__cursor = 0;
+		__size = s.size;
+		__s = s;
+		__a = s.toArray();
+	}
+	
+	public function next():*
+	{
+		return __a[__cursor++];
+	}
+	
+	public function hasNext():Boolean
+	{
+		return __cursor < __size;
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/container/SparseHashTable.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/container/SparseHashTable.as b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/container/SparseHashTable.as
new file mode 100644
index 0000000..3a0e8d1
--- /dev/null
+++ b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/container/SparseHashTable.as
@@ -0,0 +1,283 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+package com.adobe.linguistics.spelling.core.container
+{
+	import com.adobe.linguistics.spelling.core.utils.*;
+	public final class SparseHashTable implements Collection
+	{
+		
+		private var _keyTable:Array;
+		private var _elementTable:Array;
+		private var _hashSize:int;
+		private var _tableCapacity:int;
+		private var _loadFactor:Number;
+		private var _elementNum:int;
+		private var _deletedObject:Object = new Object();
+		
+		/**
+		 * A simple function for hashing strings.
+		 */
+		private function hashString(s:String):int
+		{
+			var hash:int = 0, i:int, k:int = s.length, ROTATE_LEN:int = 5;
+			for ( i =0; i < 4 && !isNaN(s.charCodeAt(i)); ++i ) {
+				hash = ( hash << 8 ) | ( s.charCodeAt(i) )
+			}
+			while ( !isNaN(s.charCodeAt(i)) ) {
+				(hash) = ((hash) << (ROTATE_LEN)) | (((hash) >> (32 - ROTATE_LEN)) & ((1 << (ROTATE_LEN))-1));
+				hash ^= ( s.charCodeAt(i) );
+				++i; 
+			}
+			return (hash > 0) ? hash : -hash; // or use uint conversion to convert minus number to plus number.... still debate//
+		}
+//		private function hashString(s:String):int
+//		{
+//			var hash:int = 0, i:int, k:int = s.length;
+//			for (i = 0; i < k; i++) hash += (i + 1) * s.charCodeAt(i);
+//			return hash;
+//		}
+		
+		/**
+		 * A simple function for hashing integers.
+		 */
+		private function hashNumber(n:Number):int
+		{
+			var i:int = int(n);
+			return int(i>0? i:-i);
+		}
+		
+		private function hash(key:*):int {
+			if (key is Number ) {
+				return hashNumber(key);
+			}else if (key is String ) {
+				return hashString(key);
+			}
+			
+			if (key.hasOwnProperty("hashCode"))
+            	return key.hashCode()>0 ? key.hashCode() : -key.hashCode();
+        	else
+            	return int(key)>0 ? int(key) : -int(key);
+		}
+
+		public function SparseHashTable(initialCapacity:int = 128, loadFactor:Number = 0.75)
+		{
+			initHash(initialCapacity, loadFactor);
+		}
+		
+		private function initHash(initialCapacity:int = 128, loadFactor:Number = 0.75):void {
+			if ( !(initialCapacity > 0) ||  !( loadFactor > 0 && loadFactor < 1) )
+				return; //input is invalid, should through exception or ...
+			_loadFactor = loadFactor;
+			_hashSize = initialCapacity;
+			_tableCapacity = MathUtils.nextPrime( int(_hashSize/loadFactor) );
+			_keyTable = new Array(_tableCapacity);
+			_elementTable = new Array(_tableCapacity);
+			_elementNum = 0;
+			clear();
+		}
+		
+		private function getKeyPosition(key:*):int {
+			var hashValue:int = hash(key);
+			var pos:int;
+			if ( hashValue < 0 ) {
+				trace ( "hashValue shouldn't be negative integer" );
+				return -1;
+			}
+			//Quadratic Probing
+			for ( var i:int =0; i < _tableCapacity; ++i ) {
+				pos = (hashValue+i*i)%_tableCapacity ; //hi=(h(key)+i*i)%m 0≤i≤m-1 
+				if ( _keyTable[pos] == null ) 
+					break;
+				if ( _keyTable[pos] == key ) {
+					return pos;
+				}
+			}
+			return -1;						
+		}
+
+		private function calculateKeyPostion(key:*):int {
+			var hashValue:int = hash(key);
+			var pos:int;
+			if ( hashValue < 0 ) {
+				trace ( "Position shouldn't be negative" );
+				return -1;
+			}
+			//Quadratic Probing
+			for ( var i:int =0; i < _tableCapacity; ++i ) {
+				pos = (hashValue+i*i)%_tableCapacity ; //hi=(h(key)+i*i)%m 0≤i≤m-1 
+				if ( (_keyTable[pos] == null ) || 
+				( _keyTable[pos] == _deletedObject ) ) {
+					// insert successfully
+					return pos;
+				}
+			}
+			return -1; // hash table is full now. it should never happen.
+			
+		}		
+		
+
+		protected function rehash():void {
+			if ( _hashSize == _elementNum ) {
+				var oldKeyTable:Array = _keyTable;
+				var oldElementTable:Array = _elementTable;
+				initHash(_hashSize*2, _loadFactor);
+				for ( var i:int =0 ; i < oldKeyTable.length; ++i ) {
+					if (oldKeyTable[i]==null 
+					|| oldKeyTable[i] == _deletedObject) {
+						continue;
+					}
+					put(oldKeyTable[i],oldElementTable[i] );
+				}
+				oldKeyTable=null;
+				oldElementTable=null;
+			}
+		}
+		
+		public function put( key:*, value:* ) :Boolean {
+			if ( _hashSize == _elementNum ) {
+				rehash();
+			}
+
+			if ( containsKey(key)  ) {
+				trace ( "Contains the same Key in the table" );
+				return false;
+			}
+			
+			var pos:int = calculateKeyPostion(key);
+			if ( pos < 0 ) {
+				trace ( "SparseHash internal error." );
+				return false;
+			}
+
+			++_elementNum;
+			_keyTable[pos] = key;
+			_elementTable[pos] = value;
+			return true;
+		}
+
+		public function remove(key:*):* {
+			var pos:int = getKeyPosition(key);
+			var res:* = (pos < 0) ? null:_elementTable[pos];
+			if ( pos >= 0 ) {
+				--_elementNum;
+				_keyTable[pos] =_deletedObject;
+				_elementTable[pos] = _deletedObject;
+			}
+			return res;
+		}
+		
+		public function contains(value:*):Boolean {
+			return containsValue(value);
+		}
+		
+		/**
+		 * Determines if the collection contains the specified element.
+		 * 
+		 * @ obj: element whose presence in this collection is to be tested.
+		 * 
+		 * @ Returns true if this collection contains the specified element.
+		 */
+		public function containsKey(key:*):Boolean {
+			var pos:int = getKeyPosition(key);
+			return (pos >= 0);	
+		}
+		
+		public function containsValue(value:*):Boolean {
+			for ( var i:int =0; i < _tableCapacity; ++i ) {
+				if ( (_keyTable[i] == null ) || 
+				( _keyTable[i] == _deletedObject ) ) {
+					continue;
+				}
+				if ( _elementTable[i].value == value ) 
+					return true;
+			}
+			return false;
+		}
+		
+		public function getElement(key:* ):* {
+			var pos:int = getKeyPosition(key);
+			return (pos < 0) ? null:_elementTable[pos];
+			
+		}
+
+		/**
+		 * The number of elements in this collection.
+		 * @Returns the number of elements in this collection.
+		 */
+		public function get size():int {
+			return _elementNum;
+		}
+		
+		public function get elements():Enumeration {
+			return null;
+		}
+		
+		public function get keys():Enumeration {
+			return null;
+		}
+		
+		/**
+		 * Tests if the collection is empty.
+		 * 
+		 * @ Returns true if this collection contains no elements.
+		 */
+		public function isEmpty():Boolean {
+			return (_elementNum==0);
+		}
+		
+		
+		/**
+		 * Removes all of the elements from this collection (optional operation).
+		 */
+		public function clear():void {
+			var i:int;
+			for( i=0;i< _tableCapacity;++i) {
+				_keyTable[i] = null;
+				_elementTable[i] = null;
+			}
+		}
+		
+		/**
+		 * Returns an iterator over the elements in this collection. There are 
+		 * no guarantees concerning the order in which the elements are returned 
+		 * (unless this collection is an instance of some class that provides a guarantee). 
+		 *
+		 * @an Iterator over the elements in this collection
+		 */
+		public function getIterator():Iterator {
+			return null;
+		}
+		
+		/**
+		 * Returns an array containing all of the elements in this collection. 
+		 * If the collection makes any guarantees as to what order its elements 
+		 * are returned by its iterator, this method must return the elements 
+		 * in the same order.
+		 * 
+		 * @return An array.
+		 */
+		public function toArray():Array {
+			return _keyTable;
+		}		
+		
+	}
+}
+

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/env/ExternalConstants.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/env/ExternalConstants.as b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/env/ExternalConstants.as
new file mode 100644
index 0000000..e38052e
--- /dev/null
+++ b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/env/ExternalConstants.as
@@ -0,0 +1,47 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+package com.adobe.linguistics.spelling.core.env
+{
+	/*
+	 * External-Internal public Constant properties...
+	 * In the future, we might want to merge this class with InternalConstant class...
+	 */
+	
+	public class ExternalConstants
+	{
+
+		// casing
+		static public const NOCAP:int =					0;
+		static public const INITCAP:int =				1;
+		
+		
+		static public const SPELL_COMPOUND:int=			(1 << 0);
+		static public const SPELL_FORBIDDEN:int=		(1 << 1);
+		static public const SPELL_ALLCAP:int=			(1 << 2);
+		static public const SPELL_NOCAP:int=			(1 << 3);
+		static public const SPELL_INITCAP:int=			(1 << 4);
+
+		public function ExternalConstants()
+		{
+		}
+
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/env/InternalConstants.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/env/InternalConstants.as b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/env/InternalConstants.as
new file mode 100644
index 0000000..e14fc31
--- /dev/null
+++ b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/env/InternalConstants.as
@@ -0,0 +1,87 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+package com.adobe.linguistics.spelling.core.env
+{
+	/*
+	 * Internal-Internal public Constant properties...
+	 * In the future, we might want to merge this class with ExternalConstant class...
+	 * This one is sharing by HunSpell related algorithm...
+	 */
+	public class InternalConstants
+	{
+		// casing
+		static public const NOCAP:int =					1;
+		static public const INITCAP:int =				2;
+		static public const ALLCAP:int =				4;
+		static public const HUHCAP:int =				8;
+		static public const HUHINITCAP:int =			16;
+
+		
+		static public const FLAG_LONG:int = 			1;
+		static public const FLAG_NUM:int = 				2;
+		static public const FLAG_UNI:int = 				3;
+		static public const FLAG_CHAR:int = 			0;
+
+		// default flags
+		static public const DEFAULTFLAGS:int = 			65510;
+		static public const FORBIDDENWORD:int = 		65511;
+		static public const ONLYUPCASEFLAG:int = 		65511;
+
+		static public const MAXWORDLEN:int =			100;
+
+		static public const FLAG_NULL:int = 			0x00;
+		
+		// affentry options
+		static public const aeXPRODUCT:int =			(1 << 0);
+		
+		static public const SPELL_KEYSTRING:String = 	"qwertyuiop|asdfghjkl|zxcvbnm"; 
+
+		// internal const for ngram algorithm.
+	    public static const NGRAM_LOWERING:int = 		(1 << 2);
+		public static const NGRAM_LONGER_WORSE:int = 	(1 << 0);
+		public static const NGRAM_ANY_MISMATCH:int = 	(1 << 1);
+
+	    static public const MAX_ROOTS:int = 			100;
+	    static public const MAX_WORDS:int = 			100;
+	    static public const MAX_GUESS:int = 			200;
+	    static public const MAXNGRAMSUGS:int=			4;
+	    static public const MAXPHONSUGS:int=			2;
+
+		static public const DEFAULTENCODING:String = 	"utf-8";
+		
+		
+		static public const MAXSUGGESTION:int =			10;
+		// internal const for ICONV or OCONV RULE.
+		static public const CONV_ICONV:Boolean=			true;
+		static public const CONV_OCONV:Boolean=			false;
+		
+		//Maximum word breaks allowed
+		static public const MAX_WORD_BREAKS:int=		10;
+		
+		//Constants for Loading of Dictionaries in Parts
+		static public const DICT_LOAD_DELAY:int=		10; //this is timeout delay between loading of two parts of dictionaries. In milliseconds
+		static public const WORDS_PER_SPLIT:int=		20000;// this is the default value of number of words to be loaded in each split.
+		public function InternalConstants()
+		{
+		}
+
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/error/ContentError.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/error/ContentError.as b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/error/ContentError.as
new file mode 100644
index 0000000..239b031
--- /dev/null
+++ b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/error/ContentError.as
@@ -0,0 +1,39 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+package com.adobe.linguistics.spelling.core.error
+{
+	/*
+	 *@private
+	 * Deprecated class for now...
+	 * History: 
+	 *          In the beginning, I would like to have our own error class for critical exception. 
+	 *          After sharing this with Xie, I was convinced to drop this idea by discussing with Xie. 
+	 * ToDo: Need a revisit after we have compound word support.
+	 */
+	public class ContentError extends Error
+	{
+		public function ContentError(message:String, errorID:int)
+		{
+			super(message, errorID);
+		}
+
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/error/ErrorTable.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/error/ErrorTable.as b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/error/ErrorTable.as
new file mode 100644
index 0000000..d2dba8a
--- /dev/null
+++ b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/error/ErrorTable.as
@@ -0,0 +1,41 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+package com.adobe.linguistics.spelling.core.error
+{
+	/*
+	 *@private
+	 * Deprecated class for now...
+	 * History: 
+	 *          In the beginning, I would like to have our own error class for critical exception. 
+	 *          After sharing this with Xie, I was convinced to drop this idea by discussing with Xie. 
+	 * ToDo: Need a revisit after we have compound word support.
+	 */
+	public class ErrorTable
+	{
+		
+		static public const CONTENTPARSINGERROR_ID:int=11235;
+		static public const CONTENTPARSINGERROR_MSG:String="null cannot be parsed to a squiggly dictionary";
+		public function ErrorTable()
+		{
+		}
+
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/logging/AbstractTarget.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/logging/AbstractTarget.as b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/logging/AbstractTarget.as
new file mode 100644
index 0000000..52e5dd6
--- /dev/null
+++ b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/logging/AbstractTarget.as
@@ -0,0 +1,167 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+package com.adobe.linguistics.spelling.core.logging
+{
+	import flash.errors.IllegalOperationError;
+public class AbstractTarget implements ILoggingTarget
+{
+	private var _usingLevelMaskMode:Boolean;
+    public function AbstractTarget(usingLevelMaskMode:Boolean = false)
+    {
+        super();
+        this._usingLevelMaskMode = usingLevelMaskMode;
+
+//        _id = UIDUtil.createUID();
+    }
+
+    private var _loggerCount:uint = 0;
+
+    private var _filters:Array = [ "*" ];
+
+    public function get filters():Array
+    {
+        return _filters;
+    }
+
+    public function set filters(value:Array):void
+    {
+        if (value && value.length > 0)
+        {
+            // a valid filter value will be fully qualified or have a wildcard
+            // in it.  the wild card can only be located at the end of the
+            // expression.  valid examples  xx*, xx.*,  *
+            var filter:String;
+            var index:int;
+            var message:String;
+            for (var i:uint = 0; i<value.length; i++)
+            {
+                filter = value[i];
+                  // check for invalid characters
+                if (Log.hasIllegalCharacters(filter))
+                {
+                    throw new IllegalOperationError("Please check for invalid characters.");
+                }
+
+                index = filter.indexOf("*");
+                if ((index >= 0) && (index != (filter.length -1)))
+                {
+                    throw new IllegalOperationError("Please check for invalid filters.");
+                }
+            } // for
+        }
+        else
+        {
+            // if null was specified then default to all
+            value = ["*"];
+        }
+
+        if (_loggerCount > 0)
+        {
+            Log.removeTarget(this);
+            _filters = value;
+            Log.addTarget(this);
+        }
+        else
+        {
+            _filters = value;
+        }
+    }
+
+    private var _id:String;
+
+     public function get id():String
+     {
+         return _id;
+     }
+    
+    private var _level:int = LogEventLevel.ALL;
+
+    public function get level():int
+    {
+        return _level;
+    }
+
+    /**
+     *  @private
+     */
+    public function set level(value:int):void
+    {
+    	if ( this._usingLevelMaskMode == false ) {
+	    	if ( !LogEventLevel.isValidLevel(value) ) {
+	    		throw new IllegalOperationError("Please set an valid level in the level setter.");
+	    	}
+	    	
+	    	this._mask = LogEventLevel.getUpperMask(value);
+    	}else {
+	    	if ( !LogEventLevel.isValidMask(value) ) {
+	    		throw new IllegalOperationError("Please set an valid mask in the mask setter.");
+	    	}
+	    	this._mask = value;
+    	}
+        // A change of level may impact the target level for Log.
+        Log.removeTarget(this);
+        _level = value;
+        Log.addTarget(this);        
+    }
+    
+    
+    private var _mask:int = LogEventLevel.ALL;
+    public function get mask():int {
+    	return this._mask;
+    }
+    
+    
+    public function addLogger(logger:ILogger):void
+    {
+        if (logger)
+        {
+            _loggerCount++;
+            logger.addEventListener(LogEvent.eventID, logHandler);
+        }
+    }
+
+    public function removeLogger(logger:ILogger):void
+    {
+        if (logger)
+        {
+            _loggerCount--;
+            logger.removeEventListener(LogEvent.eventID, logHandler);
+        }
+    }
+
+    public function initialized(document:Object, id:String):void
+    {
+        _id = id;
+        Log.addTarget(this);
+    }
+
+    public function logEvent(event:LogEvent):void
+    {
+    }
+
+    private function logHandler(event:LogEvent):void
+    {
+        if ( (event.level & mask) != 0)
+            logEvent(event);
+    }
+}
+
+}


[33/50] [abbrv] remove Adobe from directory names (package name still contains Adobe)

Posted by jm...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/LinguisticRule.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/LinguisticRule.as b/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/LinguisticRule.as
deleted file mode 100644
index 6ad78c6..0000000
--- a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/LinguisticRule.as
+++ /dev/null
@@ -1,1118 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-
-package com.adobe.linguistics.spelling.core
-{
-//	import com.adobe.linguistics.spelling.core.PhoneticTable;
-	import com.adobe.linguistics.spelling.core.env.*;
-	import com.adobe.linguistics.spelling.core.error.*;
-	import com.adobe.linguistics.spelling.core.rule.*;
-	import com.adobe.linguistics.spelling.core.utils.SimpleNumberParser;
-	
-	import flash.utils.Dictionary;
-
-
-	public class LinguisticRule
-	{
-
-
-		private var _encoding:String // ToDo, not sure how to handle this encoding stuff...
-
-		private var snp:SimpleNumberParser = new SimpleNumberParser();
-		
-		private var _prefixFlagTable:Array;
-		private var _prefixKeyTable:Array;
-		private var _suffixFlagTable:Array;
-		private var _suffixKeyTable:Array;
-		private var _optSuffixKeyTable:Dictionary;
-		private var _optPrefixKeyTable:Dictionary;
-//these are attributes
-		private var _keyString:String;
-		private var _tryString:String;
-		private var _noSuggest:Number;// don't suggest words signed with NOSUGGEST flag
-		private var _forbiddenWord:Number; // forbidden word signing flag
-		private var _circumfix:Number=0; //Circumfix Flag
-		private var _ignoredChars:String; // letters + spec. word characters
-		private var _wordChars:String; //extends tokenizer of Hunspell command line interface with additional word character. For example, dot, dash, n-dash, numbers, percent sign are word character in Hungarian.
-		private var _languageCode:String; 
-		private var _version:String;
-		private var _maxngramsugs:int = -1; // undefined
-		private var _nosplitsugs:int = 0;
-		private var _sugswithdots:int = 0;
-		private var _fullStrip:int;
-		private var _keepCase:Number;
-		private var _haveContClass:Boolean;//added to support (double) prefixes
-		
-		private var _flagMode:int;
-		private var _needAffix:Number;
-		private var _contClasses:Dictionary;//this is list of all possible contclasses
-		/* ToDo */
-		
-		private var _onlyInCompound:Number = 0;
-//		private var _phoneTable:PhoneticTable; //phone table
-/*
-
-
-ToDO: should be removed after we have complex-affix support and compound-word support..
-
-
-  pHMgr = ptr[0];
-  alldic = ptr;
-  maxdic = md;
-  keystring = NULL;
-  trystring = NULL;
-  encoding=NULL;
-  utf8 = 0;
-  complexprefixes = 0;
-  maptable = NULL;
-  nummap = 0;
-  breaktable = NULL;
-  numbreak = 0;
-  reptable = NULL;
-  numrep = 0;
-  iconvtable = NULL;
-  oconvtable = NULL;
-  checkcpdtable = NULL;
-  // allow simplified compound forms (see 3rd field of CHECKCOMPOUNDPATTERN)
-  simplifiedcpd = 0;
-  numcheckcpd = 0;
-  defcpdtable = NULL;
-  numdefcpd = 0;
-  phone = NULL;
-  compoundflag = FLAG_NULL; // permits word in compound forms
-  compoundbegin = FLAG_NULL; // may be first word in compound forms
-  compoundmiddle = FLAG_NULL; // may be middle word in compound forms
-  compoundend = FLAG_NULL; // may be last word in compound forms
-  compoundroot = FLAG_NULL; // compound word signing flag
-  compoundpermitflag = FLAG_NULL; // compound permitting flag for suffixed word
-  compoundforbidflag = FLAG_NULL; // compound fordidden flag for suffixed word
-  checkcompounddup = 0; // forbid double words in compounds
-  checkcompoundrep = 0; // forbid bad compounds (may be non compound word with a REP substitution)
-  checkcompoundcase = 0; // forbid upper and lowercase combinations at word bounds
-  checkcompoundtriple = 0; // forbid compounds with triple letters
-  simplifiedtriple = 0; // allow simplified triple letters in compounds (Schiff+fahrt -> Schiffahrt)
-  forbiddenword = FORBIDDENWORD; // forbidden word signing flag
-  nosuggest = FLAG_NULL; // don't suggest words signed with NOSUGGEST flag
-  lang = NULL; // language
-  langnum = 0; // language code (see http://l10n.openoffice.org/languages.html)
-  needaffix = FLAG_NULL; // forbidden root, allowed only with suffixes
-  cpdwordmax = -1; // default: unlimited wordcount in compound words
-  cpdmin = -1;  // undefined
-  cpdmaxsyllable = 0; // default: unlimited syllablecount in compound words
-  cpdvowels=NULL; // vowels (for calculating of Hungarian compounding limit, O(n) search! XXX)
-  cpdvowels_utf16=NULL; // vowels for UTF-8 encoding (bsearch instead of O(n) search)
-  cpdvowels_utf16_len=0; // vowels
-  pfxappnd=NULL; // previous prefix for counting the syllables of prefix BUG
-  sfxappnd=NULL; // previous suffix for counting a special syllables BUG
-  cpdsyllablenum=NULL; // syllable count incrementing flag
-  checknum=0; // checking numbers, and word with numbers
-  wordchars=NULL; // letters + spec. word characters
-  wordchars_utf16=NULL; // letters + spec. word characters
-  wordchars_utf16_len=0; // letters + spec. word characters
-  ignorechars=NULL; // letters + spec. word characters
-  ignorechars_utf16=NULL; // letters + spec. word characters
-  ignorechars_utf16_len=0; // letters + spec. word characters
-  version=NULL; // affix and dictionary file version string
-  havecontclass=0; // flags of possible continuing classes (double affix)
-  // LEMMA_PRESENT: not put root into the morphological output. Lemma presents
-  // in morhological description in dictionary file. It's often combined with PSEUDOROOT.
-  lemma_present = FLAG_NULL; 
-  circumfix = FLAG_NULL; 
-  onlyincompound = FLAG_NULL; 
-  maxngramsugs = -1; // undefined
-  nosplitsugs = 0;
-  sugswithdots = 0;
-  keepcase = 0;
-  checksharps = 0;
-  substandard = FLAG_NULL;
-  fullstrip = 0;
-  */
-		
-		private var _simpleFilterTable:Array;
-		private var _mapFilterTable:Array;
-		private var _iconvFilterTable:Array; //Contains conversion table for ICONV conversion
-		private var _oconvFilterTable:Array;//Contains conversion table for OCONV conversion
-		private var _breakTable:Array;//Contains list of characters in BREAK rule
-		private var _aliasfTable:Array;//Contains conversion table for AF rule
-		/* internal use only properties. */
-		private var _pfxEntry:PrefixEntry;
-		private var _sfxEntry:SuffixEntry;
-		private var _optSfxEntry:OptimizedSuffixEntry;
-		private var _optPfxEntry:OptimizedPrefixEntry;
-		private var _dictMgr:DictionaryManager;
-		
-		public function LinguisticRule()
-		{
-			
-			this._prefixFlagTable = new Array()
-			this._prefixKeyTable = new Array();
-			this._suffixFlagTable = new Array();
-			this._suffixKeyTable = new Array();
-			this._optSuffixKeyTable = new Dictionary(true);
-			this._optPrefixKeyTable = new Dictionary(true);
-			
-			this._simpleFilterTable = new Array();
-			this._mapFilterTable = new Array();
-			this._iconvFilterTable=new Array();
-			this._oconvFilterTable=new Array();
-			this._breakTable=new Array();//We are not adding any break points by default. Hunspell C does this for -, ^-, -$
-			this._aliasfTable=new Array();
-//			this._phoneTable=new PhoneticTable(); 
-			
-			
-			/* init the attributes */
-			this.noSuggest = InternalConstants.FLAG_NULL;
-			this.tryString= null;
-			this.keyString= null;
-			this.ignoredChars = null;
-			this.wordChars = null;
-			this.version = null;
-			this.languageCode = null;
-			this.forbiddenWord = InternalConstants.FORBIDDENWORD;
-			this.needAffix=InternalConstants.FLAG_NULL;
-			this.circumfix=InternalConstants.FLAG_NULL;
-			this.maxNgramSuggestions = -1; // undefined
-			this.nosplitSuggestions = 0;
-			this.suggestionsWithDots = 0;
-			this.fullStrip = 0;
-			this.keepCase = 0;
-			this.onlyInCompound = 0;
-			this.flagMode = InternalConstants.FLAG_CHAR;
-			this._contClasses= new Dictionary;
-			/* */
-			
-			
-			this._dictMgr = null;
-			
-
-		}
-
-		/*
-		 * Deprecated function for now...
-		 * History: 
-		 *          A pre-version of implementation for error detection. After I optimized the code for performance,
-		 *          I drop this function by that time, but you know performance meassuring is a tricky problem... 
-		 * ToDo: Need a revisit when we implementing complex-affix support and compound-word support.
-		 */
-		// check if word with affixes is correctly spelled
-		public function affixCheck( word:String, needFlag:int, inCompound:int ):HashEntry {
-			var rv:HashEntry = null;
-			// check all prefixes (also crossed with suffixes if allowed) 
-			rv = optSuffixCheck(word, needFlag, inCompound);
-			if( rv ) return rv;
-			// if still not found check all suffixes
-			rv = optPrefixCheck(word, 0, null, inCompound, needFlag);
-			return rv;
-		}
-
-		// This function checks if word with affixes is correctly spelled.
-		public function affixCheck2( word:String, needFlag:int, inCompound:int ):HashEntry {
-			var rv:HashEntry = null;
-			if ( word.length <2 ) return rv;
-			// check onelevel prefix case or one level prefix+one level suffix: un->run or under->taker (note: hypothetical words) also will check milli->litre->s and d'->autre->s
-			rv = optPrefixCheck2(word, inCompound, needFlag);
-			if( rv ) return rv;
-			// check all one level suffix drink->able or drink->s
-			rv = optSuffixCheck2(word,0,null, needFlag, inCompound);
-			
-			
-			//double affix checking 
-			if(this.haveContClass)
-			{
-				if(rv) return rv;
-				//check all 2 level suffixes case: drink->able->s
-				rv= optTwoSuffixCheck(word,0, null, needFlag,0);
-				
-				if(rv) return rv;
-				//check prefix and then 2 level suffix case un->drink->able->s
-				rv= optTwoPrefixCheck(word, 0, needFlag);
-				
-			}
-				
-				return rv;
-		}
-
-
-		/*
-		 * Deprecated function for now...
-		 * History: 
-		 *          A pre-version of implementation for error detection. After I optimized the code for performance,
-		 *          I drop this function by that time, but you know performance meassuring is a tricky problem... 
-		 * ToDo: Need a revisit when we implementing complex-affix support and compound-word support.
-		 */
-		public function optPrefixCheck(word:String, sfxopts:int, ppfx:AffixEntry, needFlag:int, inCompound:int) :HashEntry {
-			var rv:HashEntry = null;
-			var tmpWord:String;
-			// first handle the special case of 0 length prefixes
-			if ( _optPrefixKeyTable[''] != undefined ) {
-				_optPfxEntry = _optPrefixKeyTable[''];
-				while ( _optPfxEntry ) {
-					// fogemorpheme
-					// permit prefixes in compounds
-						// check prefix
-					rv = _optPfxEntry.checkWord(word, sfxopts, ppfx, inCompound, needFlag);
-					if ( rv ) {
-						return rv;
-					}
-					_optPfxEntry = _optPfxEntry.nextElementWithKey;
-				}
-			}
-			
-			// now handle the general case
-			for ( var i:int =1; i < word.length ; ++i ) {
-				tmpWord = word.substr(0,i);
-				if ( _optPrefixKeyTable[tmpWord] != undefined ) {
-					_optPfxEntry = _optPrefixKeyTable[tmpWord];
-					// fogemorpheme
-					// permit prefixes in compounds
-						// check prefix
-					while ( _optPfxEntry ) {
-						rv = _optPfxEntry.checkWord(word, sfxopts, ppfx, inCompound, needFlag);
-						if ( rv) {
-							return rv;
-						}
-						_optPfxEntry = _optPfxEntry.nextElementWithKey;
-					}
-				}
-			}
-			
-			return rv;
-		}
-
-// This function checks one level prefix OR one level prefix+ one level suffix
-		public function optPrefixCheck2(word:String, inCompound:int, needFlag:int) :HashEntry {
-			var rv:HashEntry = null;
-			var tmpWord:String;
-			var i:int;
-			var locOptPfxEntry:OptimizedPrefixEntry=null;//local optimised prefix entry added because we are adding optTwoPrefixCheck
-			// first handle the special case of 0 length prefixes
-			if ( _optPrefixKeyTable[''] != undefined ) {
-				for ( i=0; i<_optPrefixKeyTable[''].length; ++i ) {
-					locOptPfxEntry=_optPrefixKeyTable[''][i];
-					// fogemorpheme
-					// permit prefixes in compounds
-						// check prefix
-					while ( locOptPfxEntry ) {
-						rv = locOptPfxEntry.checkWord2(word, inCompound, needFlag);
-						if ( rv) {
-							return rv;
-						}
-						locOptPfxEntry = locOptPfxEntry.nextElementWithKey;
-					}
-				}
-			}
-			
-			// now handle the general case
-			var firstKeyStr:String = word.charAt(0);
-			var secondKeyNum:Number = word.charCodeAt(1);
-			var breakFlag:Boolean = false;
-			if ( _optPrefixKeyTable[firstKeyStr] != undefined ) {
-				for ( i=0; i< _optPrefixKeyTable[firstKeyStr].length; ++i ) {
-					locOptPfxEntry=_optPrefixKeyTable[firstKeyStr][i];
-					if ( (locOptPfxEntry.affixKey.length!=1) ) {
-						if ( locOptPfxEntry.affixKey.charCodeAt(1)> secondKeyNum )
-							break;
-						if ( locOptPfxEntry.affixKey.charCodeAt(1)< secondKeyNum) {
-							if (breakFlag) break;
-							else continue;
-						}
-						breakFlag = true;
-					}
-					if (word.indexOf(locOptPfxEntry.affixKey) != 0)
-						continue; 
-					// fogemorpheme
-					// permit prefixes in compounds
-						// check prefix
-					while ( locOptPfxEntry ) {
-						rv = locOptPfxEntry.checkWord2(word, inCompound, needFlag);
-						if ( rv) {
-							return rv;
-						}
-						locOptPfxEntry = locOptPfxEntry.nextElementWithKey;
-					}
-				}
-			}
-			
-			return rv;
-		}
-
-		// This is a new function added to include one level prefix checking followed by two level suffix checking
-		public function optTwoPrefixCheck(word:String, inCompound:int, needFlag:int) :HashEntry {
-			var rv:HashEntry = null;
-			//pfx=null;//TODO:Need to figure these out, seems they will be needed for compound rules. keeping for some time
-			//sfxrevkey=null;//TODO:Need to figure these out, seems they will be needed for compound rules. keeping for some time
-			var tmpWord:String;
-			var i:int;
-			var locOptPfxEntry:OptimizedPrefixEntry=null;//local optimised prefix entry
-			// first handle the special case of 0 length prefixes
-			if ( _optPrefixKeyTable[''] != undefined ) {
-				for ( i=0; i<_optPrefixKeyTable[''].length; ++i ) {
-					locOptPfxEntry=_optPrefixKeyTable[''][i];
-					
-					while ( locOptPfxEntry ) {
-						rv = locOptPfxEntry.checkTwoWord(word, inCompound, needFlag); 
-						if ( rv) {
-							return rv;
-						}
-						locOptPfxEntry = locOptPfxEntry.nextElementWithKey;
-					}
-				}
-			}
-			
-			// now handle the general case
-			var firstKeyStr:String = word.charAt(0);
-			var secondKeyNum:Number = word.charCodeAt(1);
-			var breakFlag:Boolean = false;
-			if ( _optPrefixKeyTable[firstKeyStr] != undefined ) {
-				for ( i=0; i< _optPrefixKeyTable[firstKeyStr].length; ++i ) {
-					locOptPfxEntry=_optPrefixKeyTable[firstKeyStr][i];
-					if ( (locOptPfxEntry.affixKey.length!=1) ) {
-						if ( locOptPfxEntry.affixKey.charCodeAt(1)> secondKeyNum )
-							break;
-						if ( locOptPfxEntry.affixKey.charCodeAt(1)< secondKeyNum) {
-							if (breakFlag) break;
-							else continue;
-						}
-						breakFlag = true;
-					}
-					if (word.indexOf(locOptPfxEntry.affixKey) != 0)
-						continue; 
-					while ( locOptPfxEntry ) {
-						rv = locOptPfxEntry.checkTwoWord(word, inCompound, needFlag);
-						if ( rv) {
-							return rv;
-						}
-						locOptPfxEntry = locOptPfxEntry.nextElementWithKey;
-					}
-				}
-			}
-			return rv;//this most certainly will return NULL
-		}
-		
-
-		/*
-		 * Deprecated function for now...
-		 * History: 
-		 *          A pre-version of implementation for error detection. After I optimized the code for performance,
-		 *          I drop this function by that time, but you know performance meassuring is a tricky problem... 
-		 * ToDo: Need a revisit when we implementing complex-affix support and compound-word support.
-		 */
-		public function optSuffixCheck( word:String, needFlag:int, inCompound:int):HashEntry {
-			var rv:HashEntry  = null;
-			var tmpWord:String;
-			// first handle the special case of 0 length suffixes
-			if ( this._optSuffixKeyTable[''] != undefined  ) {
-				_optSfxEntry = this._optSuffixKeyTable[''];
-				while ( _optSfxEntry ) {
-					// fogemorpheme
-					// permit prefixes in compounds
-						// check prefix
-					rv = _optSfxEntry.checkWord(word, inCompound, needFlag);
-					if ( rv ) {
-						return rv;
-					}
-					_optSfxEntry = _optSfxEntry.nextElementWithKey;
-				}
-				
-			}
-			// now handle the general case
-			for ( var i:int =word.length-1; i > 0 ; --i ) {
-				tmpWord = word.substr(i);
-				if ( _optSuffixKeyTable[tmpWord] != undefined ) {
-					_optSfxEntry = _optSuffixKeyTable[tmpWord];
-					// fogemorpheme
-					// permit prefixes in compounds
-						// check prefix
-					while ( _optSfxEntry ) {
-						rv = _optSfxEntry.checkWord(word, inCompound, needFlag);
-						if ( rv) {
-							return rv;
-						}
-						_optSfxEntry = _optSfxEntry.nextElementWithKey;
-					}
-				}
-			}
-			
-			return rv;
-		}
-
-//This function takes care of all one level suffix stripping. This is called from other affix stripping functions also
-		public function optSuffixCheck2( word:String, sfxopts:int, ppfx:AffixEntry, needFlag:int, inCompound:int, cclass:int=0, pfxcclass:int=0):HashEntry {
-			var rv:HashEntry  = null;
-			var tmpWord:String;
-			var locOptSfxEntry:OptimizedSuffixEntry=null;//local optimised suffic entry
-			// first handle the special case of 0 length suffixes
-			if ( this._optSuffixKeyTable[''] != undefined  ) {
-				locOptSfxEntry=this._optSuffixKeyTable[''];
-				while ( locOptSfxEntry ) {
-					//if(!cclass|| locOptSfxEntry.contclass)
-					//{
-						
-					
-					
-					// fogemorpheme
-					// permit prefixes in compounds
-						// check prefix
-						
-					//if((_optSfxEntry &&!(_optSfxEntry.contclass && HashEntry.TESTAFF(_optSfxEntry.contclass, this._needAffix)))||(ppfx&& !(ppfx.contclass && HashEntry.TESTAFF(ppfx.contclass,this._needAffix))))// needaffix on prefix or first suffix
-					//{
-						
-						rv = locOptSfxEntry.checkWord2(word, sfxopts, ppfx, inCompound, needFlag, cclass, pfxcclass);
-						if ( rv ) {
-							_optSfxEntry = locOptSfxEntry;//WIll possibily needed in compound check
-							return rv;
-						}
-				//	}
-					//}
-					locOptSfxEntry = locOptSfxEntry.nextElementWithKey;
-				}
-				
-			}
-			// now handle the general case
-			for ( var i:int =word.length-1; i >= 0 ; --i ) {
-				tmpWord = word.substr(i);
-				if ( _optSuffixKeyTable[tmpWord] != undefined ) {
-					locOptSfxEntry = (_optSuffixKeyTable[tmpWord] is OptimizedSuffixEntry)? _optSuffixKeyTable[tmpWord] : null;
-					// fogemorpheme
-					// permit prefixes in compounds
-						// check prefix
-					while ( locOptSfxEntry ) {
-						//if(_optSfxEntry &&HashEntry.TESTAFF(_optSfxEntry.contclass, this._needAffix)||(ppfx&& HashEntry.TESTAFF(ppfx.contclass,this._needAffix)))// needaffix on prefix or first suffix
-						//{
-							
-							rv = locOptSfxEntry.checkWord2(word, sfxopts, ppfx, inCompound, needFlag, cclass, pfxcclass);
-							if ( rv) {
-								_optSfxEntry = locOptSfxEntry;//WIll possibily needed in compound check
-								return rv;
-							}
-						//}
-							locOptSfxEntry = locOptSfxEntry.nextElementWithKey;
-					}
-				}
-			}
-			
-			return rv;
-		}
-		
-		// This is a new function added to include two level suffix checking
-		public function optTwoSuffixCheck(word:String, sfxopts:int, ppfx:AffixEntry,needFlag:int,pfxcclass:int=0) :HashEntry {
-			var rv:HashEntry  = null;
-			var tmpWord:String;
-			var locOptSfxEntry:OptimizedSuffixEntry;//local optimised suffic entry
-			// first handle the special case of 0 length suffixes
-			if ( this._optSuffixKeyTable[''] != undefined  ) 
-			{
-				locOptSfxEntry=this._optSuffixKeyTable[''];
-				while ( locOptSfxEntry ) 
-				{
-					for(var j:int=0; locOptSfxEntry.flags && j<locOptSfxEntry.flags.length; j++)
-					{
-						if(this.contClasses[locOptSfxEntry.flags[j]]==true)
-						{ //if this can be a possible contclass check furthur
-							rv = locOptSfxEntry.checkTwoWord(word, sfxopts, ppfx, needFlag, locOptSfxEntry.flags[j], pfxcclass );
-							if (rv) 
-							{
-								_optSfxEntry = locOptSfxEntry;//WIll possibily needed in compound check
-								return rv;
-							}
-						
-						}
-					}
-					// get next suffix entry from table
-					locOptSfxEntry = locOptSfxEntry.nextElementWithKey;
-				}
-			}
-
-			//now handle the general case
-			for ( var i:int =word.length-1; i >= 0 ; --i ) 
-			{
-				tmpWord = word.substr(i);
-				if ( _optSuffixKeyTable[tmpWord] != undefined ) 
-				{
-					locOptSfxEntry = (_optSuffixKeyTable[tmpWord] is OptimizedSuffixEntry)? _optSuffixKeyTable[tmpWord] : null;
-					
-					while ( locOptSfxEntry )
-					{
-						for(j=0;locOptSfxEntry.flags && j<locOptSfxEntry.flags.length; j++)
-						{
-							if(this.contClasses[locOptSfxEntry.flags[j]]==true)
-							{	
-							 //if this can be a possible contclass check furthur
-							rv = locOptSfxEntry.checkTwoWord(word, sfxopts, ppfx, needFlag,locOptSfxEntry.flags[j], pfxcclass );
-							if ( rv) 
-								{
-								_optSfxEntry = locOptSfxEntry;//WIll possibily needed in compound check
-								return rv;	
-								}
-							}
-						}
-						locOptSfxEntry = locOptSfxEntry.nextElementWithKey;
-					}
-				}
-			}
-			
-			return rv;//will be null in most cases
-			
-		}
-
-		/*
-		 * Deprecated function for now...
-		 * History: 
-		 *          A pre-version of implementation for error detection. After I optimized the code for performance,
-		 *          I drop this function by that time, but you know performance meassuring is a tricky problem... 
-		 * ToDo: Need a revisit when we implementing complex-affix support and compound-word support.
-		 */
-		public function suffixCheck2( word:String, sfxopts:int, ppfx:AffixEntry, needFlag:int, inCompound:int):HashEntry {
-			var rv:HashEntry  = null;
-			var tmpWord:String;
-			// first handle the special case of 0 length suffixes
-			if ( this._suffixKeyTable[''] != undefined  ) {
-				_sfxEntry = this._suffixKeyTable[''];
-				while ( _sfxEntry ) {
-					// fogemorpheme
-					// permit prefixes in compounds
-						// check prefix
-					rv = _sfxEntry.checkWord(word, sfxopts, ppfx, inCompound, needFlag);
-					if ( rv ) {
-						return rv;
-					}
-					_sfxEntry = _sfxEntry.nextElementWithKey;
-				}
-				
-			}
-			// now handle the general case
-			for ( var i:int =word.length-1; i > 0 ; --i ) {
-				tmpWord = word.substr(i);
-				if ( _suffixKeyTable[tmpWord] != undefined ) {
-					_sfxEntry = _suffixKeyTable[tmpWord];
-					// fogemorpheme
-					// permit prefixes in compounds
-						// check prefix
-					while ( _sfxEntry ) {
-						rv = _sfxEntry.checkWord(word, sfxopts, ppfx, inCompound, needFlag);
-						if ( rv) {
-							return rv;
-						}
-						_sfxEntry = _sfxEntry.nextElementWithKey;
-					}
-				}
-			}
-			
-			return rv;
-		}
-
-		
-		/*
-		 * Deprecated function for now...
-		 * History: 
-		 *          A pre-version of implementation for error detection. After I optimized the code for performance,
-		 *          I drop this function by that time, but you know performance meassuring is a tricky problem... 
-		 * ToDo: Need a revisit when we implementing complex-affix support and compound-word support.
-		 */
-		private function prefixCheck2(word:String, inCompound:int, needFlag:int) :HashEntry {
-			var rv:HashEntry = null;
-			var tmpWord:String;
-			// first handle the special case of 0 length prefixes
-			if ( _prefixKeyTable[''] != undefined ) {
-				_pfxEntry = _prefixKeyTable[''];
-				while ( _pfxEntry ) {
-					// fogemorpheme
-					// permit prefixes in compounds
-						// check prefix
-					rv = _pfxEntry.checkWord(word, inCompound, needFlag);
-					if ( rv ) {
-						return rv;
-					}
-					_pfxEntry = _pfxEntry.nextElementWithKey;
-				}
-			}
-			
-			// now handle the general case
-			for ( var i:int =1; i < word.length ; ++i ) {
-				tmpWord = word.substr(0,i);
-				if ( _prefixKeyTable[tmpWord] != undefined ) {
-					_pfxEntry = _prefixKeyTable[tmpWord];
-					// fogemorpheme
-					// permit prefixes in compounds
-						// check prefix
-					while ( _pfxEntry ) {
-						rv = _pfxEntry.checkWord(word, inCompound, needFlag);
-						if ( rv) {
-							return rv;
-						}
-						_pfxEntry = _pfxEntry.nextElementWithKey;
-					}
-				}
-			}
-			
-			return rv;
-		}
-		
-		public function lookup(word:String ):HashEntry {
-			var he:HashEntry = null;
-			var i:int;
-			// look word in hash table
-			for ( i=0; i < this._dictMgr.dictonaryList.length && !he; ++i ) {
-				he = this._dictMgr.dictonaryList[i].getElement(word);
-			}
-			return he;
-		}
-		
-		public function set flagMode(value:int) :void {
-			this._flagMode = value;
-		}
-		
-		public function get flagMode():int {
-			return this._flagMode;
-		}
-		
-		public function set encoding(value:String) :void {
-			this._encoding = value;
-		}
-		
-		public function get encoding():String {
-			return this._encoding;
-		}
-		
-		public function set keepCase(value:Number):void {
-			this._keepCase = value;
-		}
-		
-		public function get keepCase():Number {
-			return this._keepCase;
-		}
-		
-		public function set haveContClass(value:Boolean):void {
-			this._haveContClass = value;
-		}
-		
-		public function get haveContClass():Boolean {
-			return this._haveContClass;
-		}
-		
-		public function set needAffix(value:Number):void {
-			this._needAffix = value;
-		}
-		public function get needAffix():Number {
-			return this._needAffix;
-		}
-
-		
-		public function set circumfix(value:Number):void {
-			this._circumfix = value;
-		}
-		public function get circumfix():Number {
-			return this._circumfix;
-		}
-
-		public function set onlyInCompound(value:Number):void {
-			this._onlyInCompound = value;
-		}
-		public function get onlyInCompound():Number {
-			return this._onlyInCompound;
-		}
-
-		public function set dictionaryManager(value:DictionaryManager) :void {
-			this._dictMgr = value;
-		}
-		
-		public function get dictionaryManager():DictionaryManager {
-			return this._dictMgr;
-		}
-
-
-		public function set fullStrip(value:int):void {
-			this._fullStrip = value;
-		}
-		
-		public function get fullStrip():int {
-			return this._fullStrip;
-		}
-		
-		public function set suggestionsWithDots(value:int):void {
-			this._sugswithdots = value;
-		}
-		
-		public function get suggestionsWithDots():int {
-			return this._sugswithdots;
-		}
-		
-		public function set nosplitSuggestions(value:int ) :void {
-			this._nosplitsugs = value;
-		}
-		
-		public function get nosplitSuggestions():int {
-			return this._nosplitsugs;
-		}
-		
-		public function set maxNgramSuggestions(value:int ) :void {
-			this._maxngramsugs = value;
-		}
-		
-		public function get maxNgramSuggestions():int {
-			return this._maxngramsugs;
-		}
-		
-		public function set version(value:String) :void {
-			this._version = value;
-		}
-		
-		public function get version():String {
-			return this._version;
-		}
-		
-		public function set languageCode(value:String) :void {
-			this._languageCode = value;	
-		}
-		
-		public function get languageCode():String {
-			return this._languageCode;
-		}
-		
-		public function set wordChars(value:String):void {
-			this._wordChars= value;
-		}
-		
-		public function get wordChars():String {
-			return this._wordChars;
-		}
-
-		public function addMapFilter(mapString:String ):Boolean {
-			var mf:MapFilter = new MapFilter(mapString);
-			for ( var i:int; i< this._mapFilterTable.length; ++i ) {
-				if ( this._mapFilterTable[i].mapCharSet == mapString ) {
-					return false;
-				}
-			}
-			this._mapFilterTable.push(mf);
-			return true;
-		}
-
-		public function addSimpleFilter(matchString:String, replacement:String):Boolean {
-			var sf:SimpleFilter = new SimpleFilter( matchString, replacement);
-			for ( var i:int; i< this._simpleFilterTable.length; ++i ) {
-				if ( (this._simpleFilterTable[i].matchString==matchString) && (this._simpleFilterTable[i].replacement==replacement ) ) {
-					return false;
-				}
-			}
-			this._simpleFilterTable.push(sf);
-			return true;
-		}
-		
-	
-		//--adding to iconv/oconv table
-		
-		public function addConvFilter(matchString:String, replacement:String, ioflag:Boolean):Boolean {
-			var convTable:Array;
-			convTable=(ioflag==true)?this._iconvFilterTable:this._oconvFilterTable;
-			for ( var i:int; convTable && i< convTable.length; ++i ) {
-				if ( (convTable[i].matchString==matchString) && (convTable[i].replacement==replacement ) ) {
-					return false;
-				}
-			}
-			var sf:SimpleFilter = new SimpleFilter( matchString, replacement);
-			convTable.push(sf);
-			return true;
-		}
-		
-		public function addAffixEntry(affixFlag:int, stripString:String, affixValue:String, conditionsStr:String, morph:String = "", permission:Boolean = false, affixType:int = 0, contclass:String=null):Boolean{
-			if ( stripString == null || affixValue == null || conditionsStr==null || conditionsStr=="" ) return false;
-			if ( affixType == 0 ) {
-				if ( stripString == null || affixValue == null || conditionsStr==null || conditionsStr=="" ) return false;
-				var pfxEntry:PrefixEntry = new PrefixEntry(affixFlag,stripString,affixValue,conditionsStr,morph,permission,contclass);
-				pfxEntry.attributeManager = this;
-				addPrefixEntry(pfxEntry);
-				addOptPrefixEntry(pfxEntry);
-			}else {
-				if ( stripString == null || affixValue == null || conditionsStr==null || conditionsStr=="" ) return false;
-				var sfxEntry:SuffixEntry = new SuffixEntry(affixFlag,stripString,affixValue,conditionsStr,morph,permission,contclass);
-				sfxEntry.attributeManager = this;
-				addSuffixEntry(sfxEntry);	
-				addOptSuffixEntry(sfxEntry);
-			}
-			return true;
-		}
-
-		private function addOptPrefixEntry(pfxEntry:PrefixEntry):Boolean {
-			var optPfxEntry:OptimizedPrefixEntry
-			var hashKey:String = pfxEntry.affixKey.charAt(0);
-			optPfxEntry = new OptimizedPrefixEntry(pfxEntry);
-			optPfxEntry.attributeManager = this;
-			//insert prefix key table....
-			if ( _optPrefixKeyTable[hashKey] == undefined ) {
-				_optPrefixKeyTable[hashKey] = new Array();
-				_optPrefixKeyTable[hashKey].push(optPfxEntry);
-			}
-			else {
-				for each( var optPfxKeyEntry:OptimizedPrefixEntry  in _optPrefixKeyTable[hashKey] ){
-					if ( optPfxKeyEntry.affixKey == pfxEntry.affixKey ) {
-						while( optPfxKeyEntry.nextElementWithKey != null ) {
-							if ( optPfxKeyEntry.isSimilarObject(pfxEntry) ) {
-								optPfxKeyEntry.extendObject(pfxEntry);
-								return true;
-							}
-							optPfxKeyEntry = optPfxKeyEntry.nextElementWithKey; 
-						}
-						if ( optPfxKeyEntry.isSimilarObject(pfxEntry) ) {
-							optPfxKeyEntry.extendObject(pfxEntry);
-							return true;
-						}
-						optPfxKeyEntry.nextElementWithKey = optPfxEntry;
-						return true;
-					}
-				}
-				_optPrefixKeyTable[hashKey].push(optPfxEntry);
-				_optPrefixKeyTable[hashKey].sortOn("affixKey");
-			}				
-			return true;
-			
-		}
-
-		
-		private function addOptSuffixEntry(sfxEntry:SuffixEntry):Boolean {
-			var optSfxEntry:OptimizedSuffixEntry
-
-			//insert suffix key table....
-			if ( _optSuffixKeyTable[sfxEntry.affixKey] == undefined ) {
-				optSfxEntry = new OptimizedSuffixEntry(sfxEntry);
-				optSfxEntry.attributeManager = this;
-				_optSuffixKeyTable[sfxEntry.affixKey] = optSfxEntry;
-			}
-			else {
-				var optSfxKeyEntry:OptimizedSuffixEntry = _optSuffixKeyTable[sfxEntry.affixKey];
-				while( optSfxKeyEntry.nextElementWithKey != null ) {
-					if ( optSfxKeyEntry.isSimilarObject(sfxEntry) ) {
-						optSfxKeyEntry.extendObject(sfxEntry);
-						return true;
-					}
-					optSfxKeyEntry = optSfxKeyEntry.nextElementWithKey; 
-				}
-				if ( optSfxKeyEntry.isSimilarObject(sfxEntry) ) {
-					optSfxKeyEntry.extendObject(sfxEntry);
-					return true;
-				}
-				optSfxEntry = new OptimizedSuffixEntry(sfxEntry);
-				optSfxEntry.attributeManager = this;
-				optSfxKeyEntry.nextElementWithKey = optSfxEntry;
-			}				
-			return true;
-			
-		}
-		
-		
-		
-		private function addPrefixEntry(pfxEntry:PrefixEntry):Boolean {
-			// We may combine prefix/suffix insertion into one function in the future, it could be good for reduce the code size.
-			// Since may there is some difference between prefix and suffix, so leave it with different class and different table....
-			// need better consideration for performance and code style in next step...
-			var flagChar:String;
-			flagChar = String.fromCharCode(pfxEntry.flag);
-			// insert prefix flag table...
-			if ( _prefixFlagTable[flagChar] == undefined )
-				_prefixFlagTable[flagChar] = pfxEntry;
-			else {
-				var pfxFlagEntry:PrefixEntry = _prefixFlagTable[flagChar];
-				while( pfxFlagEntry.nextElementWithFlag != null ) {
-					pfxFlagEntry = pfxFlagEntry.nextElementWithFlag; 
-				}
-				pfxFlagEntry.nextElementWithFlag = pfxEntry;
-			}
-			
-			//insert prefix key table....
-			if ( _prefixKeyTable[pfxEntry.affixKey] == undefined ) 
-				_prefixKeyTable[pfxEntry.affixKey] = pfxEntry;
-			else {
-				var pfxKeyEntry:PrefixEntry = _prefixKeyTable[pfxEntry.affixKey];
-				while( pfxKeyEntry.nextElementWithKey != null ) {
-					pfxKeyEntry = pfxKeyEntry.nextElementWithKey; 
-				}
-				pfxKeyEntry.nextElementWithKey = pfxEntry;
-			}			
-			return true;
-		}
-		
-		private function addSuffixEntry(sfxEntry:SuffixEntry ):Boolean {
-			// We may combine prefix/suffix insertion into one function in the future, it could be good for reduce the code size.
-			// Since may there is some difference between prefix and suffix, so leave it with different class and different table....
-			// need better consideration for performance and code style in next step...
-			var flagChar:String;
-			flagChar = String.fromCharCode(sfxEntry.flag);
-			// insert suffix flag table...
-			if ( _suffixFlagTable[flagChar] == undefined )
-				_suffixFlagTable[flagChar] = sfxEntry;
-			else {
-				var sfxFlagEntry:SuffixEntry = _suffixFlagTable[flagChar];
-				while( sfxFlagEntry.nextElementWithFlag != null ) {
-					sfxFlagEntry = sfxFlagEntry.nextElementWithFlag; 
-				}
-				sfxFlagEntry.nextElementWithFlag = sfxEntry;
-			}
-			
-			//insert suffix key table....
-			if ( _suffixKeyTable[sfxEntry.affixKey] == undefined ) 
-				_suffixKeyTable[sfxEntry.affixKey] = sfxEntry;
-			else {
-				var sfxKeyEntry:SuffixEntry = _suffixKeyTable[sfxEntry.affixKey];
-				while( sfxKeyEntry.nextElementWithKey != null ) {
-					sfxKeyEntry = sfxKeyEntry.nextElementWithKey; 
-				}
-				sfxKeyEntry.nextElementWithKey = sfxEntry;
-			}				
-			
-			return true;
-		}
-		
-		/*
-		 * Deprecated function for now...
-		 * History: 
-		 *          A pre-version of implementation for error detection. After I optimized the code for performance,
-		 *          I drop this function by that time, but you know performance meassuring is a tricky problem... 
-		 * ToDo: Need a revisit when we implementing complex-affix support and compound-word support.
-		 */
-		public function addAffixEntry2(affixFlag:int, stripString:String, affixValue:String, conditionsStr:String, morph:String = "", permission:Boolean = false, affixType:int = 0):Boolean{
-			if ( stripString == null || affixValue == null || conditionsStr==null || conditionsStr=="" ) return false;
-			if ( affixType == 0 ) {
-				if ( stripString == null || affixValue == null || conditionsStr==null || conditionsStr=="" ) return false;
-				var pfxEntry:PrefixEntry = new PrefixEntry(affixFlag,stripString,affixValue,conditionsStr,morph,permission);
-				pfxEntry.attributeManager = this;
-				addPrefixEntry(pfxEntry);
-			}else {
-				if ( stripString == null || affixValue == null || conditionsStr==null || conditionsStr=="" ) return false;
-				var sfxEntry:SuffixEntry = new SuffixEntry(affixFlag,stripString,affixValue,conditionsStr,morph,permission);
-				sfxEntry.attributeManager = this;
-				addSuffixEntry(sfxEntry);	
-			}
-			return true;
-		}
-		
-		public function get prefixFlagTable():Array {
-			return this._prefixFlagTable;
-		}
-		
-		public function get prefixKeyTable():Array {
-			return this._prefixKeyTable;
-		}
-		
-		public function get suffixFlagTable():Array {
-			return this._suffixFlagTable;
-		}
-		
-		public function get suffixKeyTable():Array {
-			return this._suffixKeyTable;
-		}
-		
-		public function set forbiddenWord(value:Number) :void {
-			this._forbiddenWord = value;
-		}
-		
-		public function get forbiddenWord():Number {
-			return this._forbiddenWord;
-		}
-		
-		public function set ignoredChars(value:String ) :void {
-			this._ignoredChars = value;
-		}
-		
-		public function get ignoredChars():String {
-			return this._ignoredChars;
-		}
-		
-		public function set keyString(value:String):void {
-			this._keyString = value;
-		}
-		
-		public function get keyString():String {
-			if ( this._keyString == null ) this._keyString=InternalConstants.SPELL_KEYSTRING;
-			return this._keyString;
-		}
-		
-		public function set tryString(value:String):void {
-			this._tryString = value;
-		}
-		
-		public function get tryString():String {
-			return this._tryString;
-		}
-		
-		public function get contClasses():Dictionary {
-			return _contClasses;
-		}
-		
-		
-		public function set noSuggest(value:Number ):void {
-			this._noSuggest = value;
-		}
-		public function get noSuggest():Number {
-			return this._noSuggest;
-		}
-		
-		public function get simpleFilterTable():Array {
-			return this._simpleFilterTable;
-		}
-		
-		public function get iconvFilterTable():Array {
-			return this._iconvFilterTable;
-		}
-		
-		public function get oconvFilterTable():Array {
-			return this._oconvFilterTable;
-		}
-		
-/*		public function get phoneTable():PhoneticTable {
-			return this._phoneTable;
-		}
-*/		
-		public function get breakTable():Array {
-			return this._breakTable;
-		}
-		public function get aliasfTable():Array{
-			return this._aliasfTable;
-		}
-
-		
-		public function get mapFilterTable():Array {
-			return this._mapFilterTable;
-		}
-				
-	/*This function is used for supporting ICONV/OCONV rule. This function is called whenever an input or output conversion is needed.*/			
-		public function conv(word:String,convWord:Array,ioflag:Boolean):Boolean{
-			var searchIndex:int=0;
-			var change:Boolean=false;
-			var wspace:String;
-			var convTable:Array=(ioflag)?this._iconvFilterTable:this._oconvFilterTable;
-			if ( (convTable==null) || (convTable.length == 0) ) return false;
-			for ( var i:int = 0; i < convTable.length; ++i ) {
-				while ( (searchIndex = word.indexOf( convTable[i].matchString,searchIndex)) != -1 ){
-					searchIndex = searchIndex + convTable[i].matchString.length;
-					wspace = word.substr(0, searchIndex-convTable[i].matchString.length) + 
-						convTable[i].replacement + 
-						word.substr(searchIndex);
-					if(wspace)
-						word=wspace;
-					change=true;
-				}
-				
-			}
-			convWord.push(wspace);
-			return change;
-		}
-
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/SpellingInfo.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/SpellingInfo.as b/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/SpellingInfo.as
deleted file mode 100644
index 2b874dd..0000000
--- a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/SpellingInfo.as
+++ /dev/null
@@ -1,32 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-
-package com.adobe.linguistics.spelling.core
-{
-	public class SpellingInfo
-	{
-		public var Info:Number;
-		public function SpellingInfo(information:Number)
-		{
-			Info=information;
-		}
-
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/SquigglyDictionary.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/SquigglyDictionary.as b/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/SquigglyDictionary.as
deleted file mode 100644
index 4b80d7c..0000000
--- a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/SquigglyDictionary.as
+++ /dev/null
@@ -1,207 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-
-
-package  com.adobe.linguistics.spelling.core
-{
-
-	import com.adobe.linguistics.spelling.core.container.HashTable;
-	import com.adobe.linguistics.spelling.core.env.InternalConstants;
-	import com.adobe.linguistics.spelling.core.error.*;
-	import com.adobe.linguistics.spelling.core.utils.StringUtils;
-	
-	import flash.utils.Dictionary;
-	
-	
-	public class SquigglyDictionary
-	{
-		private var _hashtbl:HashTable;
-		private var _forbiddenword:int;
-		private var _ignoredCharSet:String;
-		private var _flag_mode:int;
-		private var _languageCode:String;
-
-
-
-		public function SquigglyDictionary(attrMgr:LinguisticRule)
-		{
-			_hashtbl = new HashTable( true ); // useWeakReferences:Boolean = true
-			
-			if ( !attrMgr) {
-				_forbiddenword = InternalConstants.FORBIDDENWORD;
-				_ignoredCharSet = null;
-				_flag_mode = InternalConstants.FLAG_CHAR;
-				_languageCode = null;
-			}
-		}
-		
-		private function set forbiddenword(value:int ) :void {
-			this._forbiddenword = value;
-		}
-		
-		public function get forbiddenword():int {
-			return this._forbiddenword;
-		}
-		
-		private function set ignoredCharSet(value:String):void {
-			this._ignoredCharSet = value;
-		}
-		
-		public function get ignoredCharSet():String {
-			return this._ignoredCharSet;
-		}
-		
-		private function set flag_mode(value:int):void {
-			this._flag_mode = value;
-		} 
-		
-		public function get flag_mode():int {
-			return this._flag_mode;
-		}
-		
-		private function set languageCode(value:String ) :void {
-			this._languageCode = value;
-		}
-		
-		public function get languageCode():String {
-			return this._languageCode;
-		}
-
-		public function containsKey(key:String ):Boolean
-		{
-			return _hashtbl.containsKey(key );
-		}
-		
-		public function getElement( key:String ):HashEntry {
-			var res:* = _hashtbl.getElement(key );
-			return (res is HashEntry) ? res:null;
-//			return _hashtbl.getElement(key );
-		}
-		
-		public function put(key:String, affixString:String=null, description:String = null):Boolean {
-			return addWord( key, affixString, description );	
-		}
-		
-		public function get dictionary():Dictionary {
-			return this._hashtbl.hashMap;
-		}
-		
-		public function filter( callback:Function, thisObject:* = null):Array {
-			var res:Array = new Array();
-			var index:int;
-			var dict:Dictionary = this._hashtbl.hashMap;
-			for ( var key:* in dict ) {
-				if ( callback( key, index, res ) ) {
-					res.push( key );
-				}
-			}
-			
-			return (res.length == 0) ? null: res;
-		}
-		
-		
-		public function addWord( word:String, affix:String = null, desc:String = null ) :Boolean {
-			var res:Boolean = false;
-			if ( word == null ) return false;
-			var captype:int = StringUtils.getCapType(word);
-			if ( addWordWithAffix(word,affix,desc,false ) )
-				res = true;
-			addHiddenCapitalizedWord(word,captype, affix,desc);
-			return res;		
-		}
-
-		private function addHiddenCapitalizedWord( word:String, captype:int, affix:String=null, desc:String=null ) :Boolean {
-			// add inner capitalized forms to handle the following allcap forms:
-			// Mixed caps: OpenOffice.org -> OPENOFFICE.ORG
-			// Allcaps with suffixes: CIA's -> CIA'S
-			if (((captype == InternalConstants.HUHCAP) || (captype == InternalConstants.HUHINITCAP) ||((captype == InternalConstants.ALLCAP) && (affix != null))) &&
-			!((affix != null) && HashEntry.TESTAFF(affix, _forbiddenword))) {
-				affix += String.fromCharCode(InternalConstants.ONLYUPCASEFLAG);
-				word = word.toLocaleLowerCase();
-				word = word.charAt(0).toLocaleUpperCase() + word.substr(1);
-				addWordWithAffix(word,affix,desc,true);
-			}
-			return true;
-		}
-
-		private function addWordWithAffix( word:String, affix:String, desc:String, onlyupcase:Boolean ):Boolean {
-			var upcasehomonym:Boolean = false;
-			if (_ignoredCharSet != null) {
-				word = StringUtils.removeIgnoredChars(word, _ignoredCharSet);
-			}
-//ToDo: the following comment should be removed after we have complex-affix support.
-//
-//			if (complexprefixes) {
-//				reverseword(word);
-//			}
-//        hp->var = H_OPT;
-//        if (aliasm) {
-//            hp->var += H_OPT_ALIASM;
-//            store_pointer(hpw + wbl + 1, get_aliasm(atoi(desc)));
-//        } else {
-//            strcpy(hpw + wbl + 1, desc);
-//            if (complexprefixes) {
-//                if (utf8) reverseword_utf(HENTRY_DATA(hp));
-//                else reverseword(HENTRY_DATA(hp));
-//            }
-//        }
-//        if (strstr(HENTRY_DATA(hp), MORPH_PHON)) hp->var += H_OPT_PHON;
-			
-			if ( _hashtbl.containsKey(word) ) {
-
-				var hentry:HashEntry = _hashtbl.getElement(word);
-				while ( hentry.next != null ) {
-					// remove hidden onlyupcase homonym
-					if ( !onlyupcase ) {
-						if ( (hentry.affixFlagVector != null) && hentry.testAffix(InternalConstants.ONLYUPCASEFLAG) ) {
-							hentry.affixFlagVector = affix;
-							hentry.variableFields = desc; /* need a better implementation,refer the beginning of this function */
-							return true;
-						}
-					}else {
-						upcasehomonym = true;
-					}
-					hentry = hentry.next;
-				}
-				// remove hidden onlyupcase homonym
-				if ( !onlyupcase ) {
-					if ( (hentry.affixFlagVector != null) && hentry.testAffix(InternalConstants.ONLYUPCASEFLAG) ) {
-						hentry.affixFlagVector = affix;
-						hentry.variableFields = desc; /* need a better implementation,refer the beginning of this function */
-						return true;
-					}
-				}else {
-					upcasehomonym = true;
-				}
-
-				if ( !upcasehomonym ) {
-					hentry.addEntry(affix,desc);
-					return true;
-				}else
-					return false;
-			}else {
-				_hashtbl.put(word, new HashEntry(affix,desc) );
-				return true;
-			}
-		}		
-
-
-	}
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/SquigglyEngine.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/SquigglyEngine.as b/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/SquigglyEngine.as
deleted file mode 100644
index d7fdc5c..0000000
--- a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/SquigglyEngine.as
+++ /dev/null
@@ -1,426 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-
-package com.adobe.linguistics.spelling.core
-{
-
-	import com.adobe.linguistics.spelling.core.env.ExternalConstants;
-	import com.adobe.linguistics.spelling.core.env.InternalConstants;
-	import com.adobe.linguistics.spelling.core.utils.*;
-	
-	public class SquigglyEngine
-	{
-
-		private var _ignoreCappedWord:Boolean;		// Hello is always correct
-		private var _ignoreAllUpperCase:Boolean;	// HELLO is always correct
-		private var _ignoreWordWithNumber:Boolean;	// win2003 is always correct
-		private var wordBreak:Array;				// Used to hold BREAK characters for BREAK rule
-		private const SPELL_COMPOUND:int =				(1 << 0);
-		private const SPELL_FORBIDDEN:int =				(1 << 1);
-		private const SPELL_ALLCAP:int =				(1 << 2);
-		private const SPELL_NOCAP:int =					(1 << 3);
-		private const SPELL_INITCAP:int =				(1 << 4);
-
-		private const MAXDIC:int =						20;
-		private const MAXSHARPS:int =					5;
-
-		private var attributeMgr:LinguisticRule;
-		private var dictMgr:DictionaryManager;
-		private var sugestionMgr:SuggestionManager;
-		private var encoding:String;
-		private var wordbreak:Array;//an Array that holds the word breaks
-		private var langCode:int;
-		private var complexPrefixes:int;
-		private var maxWordLength:int;
-
-		public function SquigglyEngine( rule:LinguisticRule, dict:SquigglyDictionary )
-		{
-			if ( rule == null ) throw new Error("illegal argument for constructor", 200901);
-			if ( dict == null ) throw new Error("illegal argument for constructor", 200901);
-			
-			maxWordLength = InternalConstants.MAXWORDLEN;
-			
-			dictMgr = new DictionaryManager();
-			dictMgr.addDictionary(dict);
-			attributeMgr = rule;
-			attributeMgr.dictionaryManager = dictMgr;
-			sugestionMgr = new SuggestionManager( rule, false);
-			this.wordbreak=attributeMgr.breakTable;
-			this.ignoreWordWithNumber = false;
-			this.ignoreCappedWord = false;
-			this.ignoreAllUpperCase = false;
-
-		}
-		
-		public function set ignoreWordWithNumber( value:Boolean):void {
-			this._ignoreWordWithNumber =value;
-		}
-		public function get ignoreWordWithNumber():Boolean {
-			return this._ignoreWordWithNumber;
-		}
-		
-		public function set ignoreCappedWord(value:Boolean):void {
-			this._ignoreCappedWord = value;
-		}
-		public function get ignoreCappedWord():Boolean {
-			return this._ignoreCappedWord;
-		}
-		
-		public function set ignoreAllUpperCase(value:Boolean ):void {
-			this._ignoreAllUpperCase = value;
-		}
-		public function get ignoreAllUpperCase():Boolean {
-			return this._ignoreAllUpperCase;
-		}
-		
-		public function set fastMode(value:Boolean ) :void {
-			this.sugestionMgr.fastMode = value;
-		}
-		
-		public function get fastMode():Boolean {
-			return this.sugestionMgr.fastMode;
-		}
-		
-		public function addDictionary( dict:SquigglyDictionary ) : Boolean {
-			return dictMgr.addDictionary(dict);
-		}
-		
-		public function spell( word:String ) :Boolean {
-			if ( word.length > maxWordLength ) return false;
-			
-			word = StringUtils.normalize(word);
-			
-			var captype:int = InternalConstants.NOCAP;
-			var hasNumber:Boolean =false; //assuming that there are no numbers;
-			var abbv:int = 0;
-			var i:int;
-			var rv:HashEntry = null;
-			var info:SpellingInfo = new SpellingInfo(0);
-			var wspace:String;
-			// input conversion USING ICONV TABLE
-/*	//Commented code is a unit test code
-			var teststr:String="marùvîà ";
-			var teststr2:String;
-this.attributeMgr.conv(teststr,convWord,true);
-	teststr2=convWord.pop();
-	if(teststr2){
-	trace("Called Word "+teststr+"converted word "+teststr2);
-	}
-	else 
-	trace("NUUUllll");
-*/
-
-			var convWord:Array=new Array;
-			if(this.attributeMgr && this.attributeMgr.iconvFilterTable && this.attributeMgr.iconvFilterTable.length!=0){
-			this.attributeMgr.conv(word,convWord,InternalConstants.CONV_ICONV);
-			wspace=convWord.pop();
-			if(wspace) word=wspace;
-			}
-			
-			// first skip over any leading or trailing blanks
-			word = StringUtils.trim( word );
-			
-			// now strip off any trailing periods (recording their presence)
-			for ( i = word.length-1; (i>=0) && (word.charCodeAt(i) == 46) ; --i ) { // '.'
-				abbv++;
-			}
-			word = word.substr(0, word.length- abbv );
-			captype = StringUtils.getCapType(word);
-			hasNumber=StringUtils.getHasNumber(word);
-			if ( (dictMgr.isEmpty()) || (word.length == 0) ) return false;
-			
-			// allow numbers with dots, dashes and commas (but forbid double separators: "..", "--" etc.)
-			const NBEGIN:int = 0, NNUM:int=1, NSEP:int=2;
-			var nstate:int = NBEGIN;
-			var charCode:int;
-			for ( i=0 ; i < word.length ; ++i ) {
-				charCode =  word.charCodeAt(i);
-				if ( (charCode <= 57 ) && ( charCode >= 48) ) { // '0' to '9'
-					nstate = NNUM;
-				}else if ( (charCode==44) || (charCode==45) || (charCode==46) ) { //',' or '.' or '-'
-					if ( (nstate == NSEP) || ( i==0 ) ) return false;
-					nstate = NSEP;
-				}else break;
-			}
-			if ( (i==word.length) && ( nstate == NNUM ) ) return true;//checks if all are just numbers
-			// ignore word with Number.
-			if ( ignoreWordWithNumber && hasNumber)return true;//Ignore word with numbers!
-				
-			// ignore cappitalized word  or ignore all upper case word.
-			if ( (ignoreCappedWord &&( (captype&InternalConstants.HUHINITCAP) || (captype&InternalConstants.INITCAP))&&(hasNumber==false) ) || (ignoreAllUpperCase&&(captype & InternalConstants.ALLCAP)&&(hasNumber==false)) ) return true;	//return only if it does not have number	
-			
-			
-			switch(captype) {
-				case InternalConstants.HUHCAP:
-				case InternalConstants.HUHINITCAP:
-				case InternalConstants.NOCAP:
-					rv = checkWord(word,info);
-					if ( (abbv!=0) && (rv == null ) ) {
-						word += ".";
-						rv = checkWord(word,info);
-					}
-					break;
-				case InternalConstants.ALLCAP:
-					rv = checkWord(word,info);
-					if( rv ) break;
-					if ( (abbv!=0 ) ) {
-						word +=".";
-						rv = checkWord(word,info);
-						if ( rv ) break;
-					}
-					// ToDo:   Spec. prefix handling for Catalan, French, Italian:
-					// prefixes separated by apostrophe (SANT'ELIA -> Sant'+Elia).
-					// need better understand...
-					
-					//sharps handle....
-
-					word = word.charAt(0).toUpperCase()+word.slice(1).toLocaleLowerCase();
-					
-				case InternalConstants.INITCAP: 
-					if (captype == InternalConstants.INITCAP) info.Info +=ExternalConstants.SPELL_INITCAP;
-					wspace = word.toLocaleLowerCase();
-					rv = checkWord(word,info);
-					if (captype == InternalConstants.INITCAP) info.Info -=ExternalConstants.SPELL_INITCAP;
-					
-					// forbid bad capitalization
-					// (for example, ijs -> Ijs instead of IJs in Dutch)
-					// use explicit forms in dic: Ijs/F (F = FORBIDDENWORD flag)
-					if (info.Info & ExternalConstants.SPELL_FORBIDDEN) {
-						rv = null;
-					}
-					
-					if ( rv && (captype == InternalConstants.ALLCAP ) ) {
-						if ( attributeMgr && rv.affixFlagVector && attributeMgr.keepCase && rv.testAffix(attributeMgr.keepCase) ) rv = null;
-					}
-					if ( rv) break;
-					
-					rv = checkWord(wspace,info);
-					if ( !rv && abbv ) {
-						wspace += ".";
-						rv = checkWord(wspace,info);
-						if ( !rv) {
-							word += ".";
-							if (captype == InternalConstants.INITCAP) info.Info +=ExternalConstants.SPELL_INITCAP;
-							rv = checkWord(word,info);
-							if (captype == InternalConstants.INITCAP) info.Info -=ExternalConstants.SPELL_INITCAP;
-							if ( rv && (captype == InternalConstants.ALLCAP ) ) {
-								if ( attributeMgr && rv.affixFlagVector && attributeMgr.keepCase && rv.testAffix(attributeMgr.keepCase) ) rv = null;
-							}
-						}
-					} 
-					if ( rv && (captype == InternalConstants.ALLCAP ) ) {
-						if ( attributeMgr && rv.affixFlagVector && attributeMgr.keepCase && rv.testAffix(attributeMgr.keepCase) ) rv = null;
-					}
-					break;
-				default:
-			}
-			
-			if ( rv ) return true;
-			
-			//implementation break-table... recursive breaking at break points
-			
-			if(wordbreak){
-				var nbr:int=0;
-				var parseArr:Array;
-				var searchIndex:int=0;
-				for(i=0; i<wordbreak.length;i++){
-					//Search for number of break points in this word
-					searchIndex=0;
-					wspace=word;
-					while (wspace && ((searchIndex=wspace.indexOf(wordbreak[i])) != -1 )) {
-						nbr++;
-						if(nbr>InternalConstants.MAX_WORD_BREAKS) return false;//Limiting maximum Word breaks
-						if(searchIndex<word.length)wspace=wspace.substr(searchIndex+1);
-					}		
-				}
-				 
-				
-				for(var j:int=0; j<wordbreak.length;j++){
-				
-					if(word.search(wordbreak[j])!=-1 && (parseArr=word.split(wordbreak[j]))!=null)
-					{
-									
-						for(i=0;i<parseArr.length;i++)
-							if(! spell(parseArr[i]) ) return false;//keep checking all parts of the input word. If any part is wrongly spelt send false
-						
-						return true;//no part is spelled wrong so send correct
-					}
-								
-				}
-							
-			}
-		
-			return false;
-		}
-		
-		public function suggest( word:String ) : Array {
-			if ( word.length > maxWordLength ) return null;
-			var captype:int = InternalConstants.NOCAP;
-			var capwords:int = 0;
-
-			var abbv:int = 0;
-			var i:int,ns:int;
-			var wspace:String;
-			var slst:Array = new Array();
-			var convWord:Array=new Array;
-			// input conversion USING ICONV TABLE
-			if(this.attributeMgr && this.attributeMgr.iconvFilterTable.length!=0){
-				this.attributeMgr.conv(word,convWord,InternalConstants.CONV_ICONV);
-			wspace=convWord.pop();
-			if(wspace)word=wspace;
-			}
-			
-			// first skip over any leading or trailing blanks
-			word = StringUtils.trim( word );
-			// now strip off any trailing periods (recording their presence)
-			for ( i = word.length-1; (i>=0) && (word.charCodeAt(i) == 46) ; --i ) { // '.'
-				abbv++;
-			}
-			word = word.substr(0, word.length- abbv );
-			captype = StringUtils.getCapType(word);
-			if ( (dictMgr.isEmpty()) || (word.length == 0) ) return null;
-			switch(captype) {
-				case InternalConstants.NOCAP: {
-					ns = sugestionMgr.suggest( slst, word, InternalConstants.NOCAP );
-					break;
-				}
-				case InternalConstants.INITCAP:{
-					capwords = 1;
-					ns = sugestionMgr.suggest( slst, word, InternalConstants.INITCAP );
-					if ( ns ==  -1) break;
-					wspace = word.toLocaleLowerCase();
-					ns = sugestionMgr.suggest( slst, wspace, InternalConstants.NOCAP );
-					break;
-				}
-				case InternalConstants.HUHINITCAP:{ 
-					capwords = 1;
-				}
-				case InternalConstants.HUHCAP: { // ToDo: still a lot of work...
-					ns = sugestionMgr.suggest( slst, word, InternalConstants.HUHCAP );
-					break;
-				}
-				case InternalConstants.ALLCAP: {
-					wspace = word.toLocaleLowerCase();
-					ns = sugestionMgr.suggest( slst, wspace, InternalConstants.NOCAP );
-					if ( ns ==  -1) break;
-					if ( this.attributeMgr.keepCase && spell(word ) ) {
-						//ns = insert_sug(slst, wspace, ns); ToDo
-					}
-					wspace = word.charAt(0).toUpperCase()+word.slice(1).toLocaleLowerCase();	
-					ns = sugestionMgr.suggest( slst, wspace, InternalConstants.INITCAP );
-					break;
-				}
-			}
-			
-			// try ngram approach since found nothing
-			if ( this.attributeMgr && (this.attributeMgr.maxNgramSuggestions != 0)) {
-				ns = sugestionMgr.nsuggest(slst,word);
-			}
-			
-			// try dash suggestion (Afo-American -> Afro-American)
-			
-			// capitalize
-			if (capwords) {
-				for ( i=0;i<slst.length; ++i ) {
-					slst[i] = slst[i].charAt(0).toUpperCase()+slst[i].slice(1);	
-				}
-			}
-			
-			// expand suggestions with dot(s)
-			if ( abbv && this.attributeMgr.suggestionsWithDots ) {
-				for ( i=0;i<slst.length; ++i ) {
-					slst[i] += ".";	
-				}
-				
-			}
-			
-			// remove bad capitalized and forbidden forms
-
-			// remove original one
-			for ( i=0;i<slst.length;++i) {
-				if ( slst[i] == word ) 
-					slst.splice(i,1);
-			}
-			
-			// remove duplications
-			
-			// output conversion
-			
-			if(this.attributeMgr && this.attributeMgr.oconvFilterTable && this.attributeMgr.oconvFilterTable.length!=0){
-				for(i=0;i<slst.length;++i){
-					if(this.attributeMgr.conv(slst[i],convWord,InternalConstants.CONV_OCONV))	
-					{wspace=convWord.pop();delete(slst[i]); slst[i]=wspace;} 
-				}
-			}
-			
-			// if suggestions removed by nosuggest, onlyincompound parameters
-
-
-			return (slst.length!=0) ? slst :null;
-		}
-		
-		private function checkWord( word:String, info:SpellingInfo ):HashEntry {
-			var i:int;
-			var he:HashEntry = null;
-			if ( attributeMgr.ignoredChars )  {
-				word = StringUtils.removeIgnoredChars(word, attributeMgr.ignoredChars);
-			}
-			// word reversing wrapper for complex prefixes
-			/*
-			if(complexprefixes) {
-				word=reverseword(word);
-			}
-			*/
-			
-			// look word in hash table
-			for ( i=0; i < dictMgr.dictonaryList.length && !he; ++i ) {
-				he = dictMgr.dictonaryList[i].getElement(word);
-				// check forbidden and onlyincompound words
-				if ( he && (he.affixFlagVector != null) && 
-					((attributeMgr) && ( he.testAffix(attributeMgr.forbiddenWord)))
-				
-				) {
-					// ToDo: LANG_hu section: set dash information for suggestions
-					return null;
-				}
-				// ToDo: he = next not needaffix, onlyincompound homonym or onlyupcase word
-/*				while (he && (he.affixFlagVector) &&
-					((attributeMgr.needAffix && testAffix(he.affixFlagVector, attributeMgr.needAffix)) ||
-						(pAMgr->get_onlyincompound() && TESTAFF(he->astr, pAMgr->get_onlyincompound(), he->alen)) ||
-						(info && (*info & SPELL_INITCAP) && TESTAFF(he->astr, ONLYUPCASEFLAG, he->alen))
-					)) //he = he.next; should maintain a next homonym which is not being maintained as of now next_homonym;
-*/			}
-					
-			// check with affixes
-			if ( !he && attributeMgr ) {
-				he = attributeMgr.affixCheck2(word,0,0);
-				//DO not allow affixed forms of forbidden words
-				if ( he && (he.affixFlagVector != null) && (attributeMgr) && he.testAffix(attributeMgr.forbiddenWord) ) {
-					// ToDo: LANG_hu section: set dash information for suggestions
-					return null;
-				}
-			}
-			
-			return he;
-		}
-		
-
-	}
-}
\ No newline at end of file


[48/50] [abbrv] git commit: [flex-utilities] [refs/heads/master] - update read me with instruction on use and where to get dictionaries from

Posted by jm...@apache.org.
update read me with instruction on use and where to get dictionaries from


Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/57e22380
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/57e22380
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/57e22380

Branch: refs/heads/master
Commit: 57e2238040eedc03a5a50b61040b4f7d5478001c
Parents: 4b0dd48
Author: Justin Mclean <jm...@apache.org>
Authored: Fri Aug 29 10:47:55 2014 +1000
Committer: Justin Mclean <jm...@apache.org>
Committed: Fri Aug 29 10:47:55 2014 +1000

----------------------------------------------------------------------
 Squiggly/README | 47 +++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/57e22380/Squiggly/README
----------------------------------------------------------------------
diff --git a/Squiggly/README b/Squiggly/README
index deabcf9..d06e67f 100644
--- a/Squiggly/README
+++ b/Squiggly/README
@@ -39,6 +39,7 @@ There are several other useful ant targets.
 
 	 compile-swc         compile squiggly swcs
 	 package             package up all source files
+	 generate-docs       generate asdocs
 	 package-binary-tar  tar up all source files and swcs
 	 package-binary-zip  zip up all source files and swcs
 	 package-source-tar  tar up all source files
@@ -55,3 +56,49 @@ How to check the code out of Git
 
 2.  Change directory to:
 	cd Squiggly
+	
+==========================================================================================
+How to use the Squiggly SDK
+==========================================================================================
+
+Please read the ASDoc first to understand the classes in Squiggly.
+
+If you are using the SpellChecker class directly, you need.
+- SpellingEngine.swc in [YourProject]/libs folder, you can find it from ./libs
+- Dictionary files in [YourProject]/src folder
+
+You can obtain dictionary files from:
+http://extensions.openoffice.org
+http://hunspell.sourceforge.net
+
+If you are using the simple UI integration feature (SpellUI class), in addition to what
+mentioned above, you also need:
+- SpellingConfig.xml in [YourProject]/src
+- SpellingUI.swc in [YourProject]/src
+- SpellingUIEx.swc if you need spark support in Flex 4) in [YourProject]/libs 
+
+You can download HunSpell dictionaries and use those by editing SpellingConfig.xml.
+
+The default name of the config file has changed from AdobeSpellingConfig.xml to
+SpellingConfig.xml.
+
+Here's the content of SpellingConfig.xml, each entry maps the languageCode with the
+relative path for resource files. 
+
+<SpellingConfig>
+  <LanguageResource language="English" languageCode="en_US"
+    ruleFile="dict/en_US/en_US.aff" dictionaryFile="dict/en_US/en_US.dic"/>
+</SpellingConfig>
+
+So if you are adding Spanish, you just need to get the hunspell dictionary
+ es_ES.aff/dic and add one line to your config file.
+  <LanguageResource language="Spanish" languageCode="es_ES"
+     ruleFile="dict/es_ES/es_ES.aff" dictionaryFile="dict/es_ES/es_ES.dic"/>
+
+Note that you can put the dictionaries in any location as long as you update
+the config file, but the config file itself MUST be in [YourProject]/src folder.
+
+
+
+
+	


[05/50] [abbrv] git commit: [flex-utilities] [refs/heads/master] - FLEX-34500 show total number of examples in Tour De Flex UI

Posted by jm...@apache.org.
FLEX-34500 show total number of examples in Tour De Flex UI


Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/eaff7558
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/eaff7558
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/eaff7558

Branch: refs/heads/master
Commit: eaff755831d1ce5c7f845c8d76df7d3a7e406de1
Parents: daf9841
Author: Justin Mclean <jm...@apache.org>
Authored: Wed Aug 27 14:17:56 2014 +1000
Committer: Justin Mclean <jm...@apache.org>
Committed: Wed Aug 27 14:17:56 2014 +1000

----------------------------------------------------------------------
 TourDeFlex/TourDeFlex3/src/explorer.mxml | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/eaff7558/TourDeFlex/TourDeFlex3/src/explorer.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/explorer.mxml b/TourDeFlex/TourDeFlex3/src/explorer.mxml
index 646827a..7a1443d 100755
--- a/TourDeFlex/TourDeFlex3/src/explorer.mxml
+++ b/TourDeFlex/TourDeFlex3/src/explorer.mxml
@@ -30,12 +30,17 @@
 		[Embed(source="explorer.xml", mimeType="application/octet-stream")]
 		private var XMLData:Class;
 			
+		[Bindable]
+		protected var noExamples:int = 0;
+			
 		private function init():void
 		{
 			var data:XML = XML(new XMLData());
 			
             explorerTree = XML(data.node);
             compLibTree.dataProvider = explorerTree;
+			
+			noExamples = (explorerTree..node.(hasOwnProperty("@app") && @app.length() > 0)).length();
 		}			
 
         private function treeChanged(event:Event):void
@@ -66,6 +71,8 @@
 	<mx:HBox width="100%">
 		<mx:Image source="./mx/controls/assets/ApacheFlexIcon.png" useHandCursor="true" buttonMode="true" click="gotoHome(event)" />
 		<mx:Label text="{FULL_TITLE}" fontSize="20" fontWeight="bold" />
+		<mx:Spacer width="100%" />
+		<mx:Label text="{noExamples} examples" />
 	</mx:HBox>
     <mx:HDividedBox width="100%" height="100%">
         <mx:Panel width="30%" height="100%" title="{TITLE}" dropShadowVisible="false">


[09/50] [abbrv] git commit: [flex-utilities] [refs/heads/master] - update release notes

Posted by jm...@apache.org.
update release notes


Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/f19d78d9
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/f19d78d9
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/f19d78d9

Branch: refs/heads/master
Commit: f19d78d940a799648a192cd40061d3c7433a162d
Parents: 9261237
Author: Justin Mclean <jm...@apache.org>
Authored: Wed Aug 27 15:32:21 2014 +1000
Committer: Justin Mclean <jm...@apache.org>
Committed: Wed Aug 27 15:32:21 2014 +1000

----------------------------------------------------------------------
 TourDeFlex/TourDeFlex3/RELEASE_NOTES | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/f19d78d9/TourDeFlex/TourDeFlex3/RELEASE_NOTES
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/RELEASE_NOTES b/TourDeFlex/TourDeFlex3/RELEASE_NOTES
index 0050233..9d1ef62 100644
--- a/TourDeFlex/TourDeFlex3/RELEASE_NOTES
+++ b/TourDeFlex/TourDeFlex3/RELEASE_NOTES
@@ -12,6 +12,7 @@ Changes since the version 1.0
 Bugs fixed:
 FLEX-34500 Show total number of examples in Tour De Flex UI
 FLEX-34495 Error loading source file
+FLEX-34489 Some examples are missing all source files tab
 FLEX-34488 Add favicon to TourDeFlex
 FLEX-34483 Make logo links to Apache Flex web site
 FLEX-34480 If TourDeFlex is run from an untrusted location you get an error


[26/50] [abbrv] remove Adobe from directory names (package name still contains Adobe)

Posted by jm...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingUITLF/src/com/adobe/linguistics/spelling/SquigglyCustomContainerController.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingUITLF/src/com/adobe/linguistics/spelling/SquigglyCustomContainerController.as b/Squiggly/main/AdobeSpellingUITLF/src/com/adobe/linguistics/spelling/SquigglyCustomContainerController.as
deleted file mode 100644
index 9ea0f9a..0000000
--- a/Squiggly/main/AdobeSpellingUITLF/src/com/adobe/linguistics/spelling/SquigglyCustomContainerController.as
+++ /dev/null
@@ -1,258 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-package com.adobe.linguistics.spelling
-{
-	import com.adobe.linguistics.spelling.SpellUIForTLF;
-	import com.adobe.linguistics.spelling.framework.SpellingService;
-	import com.adobe.linguistics.spelling.ui.IHighlighter;
-	import com.adobe.linguistics.spelling.ui.IWordProcessor;
-	import com.adobe.linguistics.spelling.ui.TLFHighlighter;
-	import com.adobe.linguistics.spelling.ui.TLFWordProcessor;
-	import com.adobe.linguistics.utils.TextTokenizer;
-	import com.adobe.linguistics.utils.Token;
-	
-	import flash.display.Sprite;
-	import flash.events.ContextMenuEvent;
-	import flash.events.Event;
-	import flash.events.EventDispatcher;
-	import flash.geom.Point;
-	import flash.geom.Rectangle;
-	import flash.ui.ContextMenu;
-	import flash.ui.ContextMenuItem;
-	
-	import flashx.textLayout.compose.StandardFlowComposer;
-	import flashx.textLayout.compose.TextFlowLine;
-	import flashx.textLayout.container.ContainerController;
-	import flashx.textLayout.conversion.TextConverter;
-	import flashx.textLayout.edit.SelectionManager;
-	import flashx.textLayout.elements.FlowLeafElement;
-	import flashx.textLayout.elements.ParagraphElement;
-	import flashx.textLayout.elements.TextFlow;
-	import flashx.textLayout.events.CompositionCompleteEvent;
-	import flashx.textLayout.events.StatusChangeEvent;
-	import flashx.textLayout.tlf_internal;
-	
-	/** Custom container controller for populating context menu and hanlding menu item selection  */
-	internal class SquigglyCustomContainerController extends ContainerController
-	{
-		private var disableMenuItem:ContextMenuItem = new ContextMenuItem("Disable spell checking",true);
-		private var enableMenuItem:ContextMenuItem = new ContextMenuItem("Enable spell checking");		
-		
-		private var controlMenuItemList:Array = new Array();
-		private var suggestionMenuItemList:Array = new Array();
-		private var _spellingEnabled:Boolean;
-		private var _contextMenu:ContextMenu;
-		private var mTextHighlighter:IHighlighter;
-		private var mWordProcessor:IWordProcessor;
-		private var mSpellEngine:SpellingService;
-		private var mTextFlow:TextFlow;
-		private var _ignoreWordFunctionProcessor:Function;
-		private var _misspelledToken:Token;
-		private var _misspelled:String;
-		
-		public function SquigglyCustomContainerController(container:Sprite,textHighlighter:IHighlighter, wordProcessor:IWordProcessor, engine:SpellingService,
-														  func:Function, compositionWidth:Number=100,compositionHeight:Number=100)
-		{
-			super (container, compositionWidth, compositionHeight);
-			mTextHighlighter = textHighlighter;
-			mWordProcessor = wordProcessor;
-			mSpellEngine = engine;
-			_ignoreWordFunctionProcessor = func;
-			
-			spellingEnabled = true;
-		}
-		
-		/** Overridden to add custom items to the context menu */
-		override protected function createContextMenu():ContextMenu
-		{
-			// Get the default context menu used by TLF for editable flows
-			_contextMenu = super.container.contextMenu;
-			if (_contextMenu == null)
-				_contextMenu = super.createContextMenu();
-				
-			
-			enableMenuItem.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, handleEnableSpellCheck);
-			disableMenuItem.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, handleDisableSpellCheck);
-			controlMenuItemList.push(enableMenuItem);
-			controlMenuItemList.push(disableMenuItem);
-			
-			_contextMenu.customItems.push(disableMenuItem);
-			_contextMenu.customItems.push(enableMenuItem);
-			
-			// Listen for menu selection
-			_contextMenu.addEventListener(ContextMenuEvent.MENU_SELECT, updateCustomMenuItems);
-			
-			return _contextMenu;
-		}
-		
-		/** Update the state of the custom menu items before the context menu is displayed */
-		private function updateCustomMenuItems(event:ContextMenuEvent):void 
-		{
-			/* Clear the context menu */
-			//spellingEnabled= mTextHighlighter.spellingEnabled;
-			//SpellUI.doSpelling1();
-			var removedNum:int = 0;
-			var count:uint = _contextMenu.customItems.length;
-			for (var j:uint=count; j>0; j--) {
-				if ( isWordItem(_contextMenu.customItems[j-1]) ) {
-					_contextMenu.customItems.splice(j-1,1);
-					removedNum++
-				}
-			}
-			if ( removedNum != suggestionMenuItemList.length ) {
-				trace("internal error");
-			}
-			
-			
-			suggestionMenuItemList = new Array();
-			
-			// localized entries
-			var entries:Object = SpellUIForTLF.getSpellingMenuEntries();
-			disableMenuItem.caption = entries.disable;
-			enableMenuItem.caption = entries.enable;				
-			
-			if (spellingEnabled == true) {
-				(mWordProcessor as TLFWordProcessor).textFlowContainerController = this;
-				
-				//trace("stageX " +  super.container.stage.mouseX);
-				//trace("stageY " +  super.container.stage.mouseY);
-				//trace("mouseX " +  super.container.mouseX);
-				//trace("mouseY " +  super.container.mouseY);
-				_misspelledToken = mWordProcessor.getWordAtPoint(this.container.mouseX, this.container.mouseY);
-				if (_misspelledToken==null) return;
-				var currentLeaf:FlowLeafElement = this.textFlow.findLeaf(_misspelledToken.first);
-				var currentParagraph:ParagraphElement = currentLeaf ? currentLeaf.getParagraph() : null;
-				_misspelled = 	currentParagraph.getText().substring(_misspelledToken.first - currentParagraph.getAbsoluteStart(), 
-																		_misspelledToken.last - currentParagraph.getAbsoluteStart());
-				if ((_misspelled==null) || (_misspelled == "")) return;
-				
-				if (mSpellEngine.checkWord(_misspelled)==true) return;				
-				
-				var suseAddToItem:ContextMenuItem = new ContextMenuItem(entries.add);
-				suseAddToItem.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, handleAddToItemSelect);
-				suggestionMenuItemList.push(suseAddToItem);
-				_contextMenu.customItems.splice(0,0,suseAddToItem);	
-				//var result:Array = mWordProcessor.getSuggestionsAtPoint();
-				var resultVector:Vector.<String> = mSpellEngine.getSuggestions(_misspelled);
-				var result:Array = new Array();
-				if (resultVector) {
-					for each (var w:String in resultVector)
-					result.push(w);
-				}
-				if (result!=null) {
-					for (var i:int=result.length-1;i>=0;i-- ) {
-						var suseMenuItem:ContextMenuItem = new ContextMenuItem(result[i]);
-						suseMenuItem.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, handleSuseItemSelect);
-						suggestionMenuItemList.push(suseMenuItem);
-						//_contextMenu.customItems.push(suseMenuItem);
-						_contextMenu.customItems.splice(0,0,suseMenuItem);
-					}
-				}
-			}
-		}
-		
-		private function handleAddToItemSelect(event:ContextMenuEvent):void
-		{
-			if ( _ignoreWordFunctionProcessor == null ) return;
-			
-			/*
-			var menuEntry:String = (event.currentTarget as ContextMenuItem).caption;
-			var start:uint = 5;
-			var end:uint = menuEntry.length - 15;
-			var word:String = menuEntry.substring(start, end);
-			*/
-			_ignoreWordFunctionProcessor(_misspelled);
-			SpellUIForTLF.UITable[SpellUIForTLF.parentComp[super.textFlow]].doSpellingJob();
-		}
-		
-		private function handleSuseItemSelect(event:ContextMenuEvent):void
-		{
-			mWordProcessor.replaceText(_misspelledToken, (event.currentTarget as ContextMenuItem).caption );
-			SpellUIForTLF.UITable[SpellUIForTLF.parentComp[super.textFlow]].doSpellingJob();
-		}
-			
-		private function set spellingEnabled(value:Boolean) :void {
-			_spellingEnabled = value;
-			disableMenuItem.visible=spellingEnabled;
-			enableMenuItem.visible=!spellingEnabled;
-		}
-		private function get spellingEnabled():Boolean {
-			return this._spellingEnabled;
-		}
-		
-		private function isWordItem(item:ContextMenuItem):Boolean {
-			
-			for ( var i:int=0; i<suggestionMenuItemList.length; ++i ) {
-				if ( suggestionMenuItemList[i] == item ) return true;
-			}
-			return false;
-		}
-		
-		private function isControlItem(item:ContextMenuItem):Boolean {
-			for (var i:int=0; i<controlMenuItemList.length; ++i) {
-				if ( controlMenuItemList[i] == item) return true;
-			}
-			return false;
-		}
-		
-		private function handleEnableSpellCheck(event:ContextMenuEvent):void
-		{
-			spellingEnabled= true;
-			//mTextHighlighter.spellingEnabled= spellingEnabled;
-			//SpellUI.doSpellingJob();
-			//dispatchEvent(new Event(Event.RENDER));
-			
-			SpellUIForTLF.UITable[SpellUIForTLF.parentComp[this.textFlow]].spellingEnabled = spellingEnabled;
-			SpellUIForTLF.UITable[SpellUIForTLF.parentComp[this.textFlow]].doSpellingJob();
-			//spellCheckRange(getValidFirstWordIndex(), getValidLastWordIndex());
-		}
-		private function handleDisableSpellCheck(event:ContextMenuEvent):void
-		{
-			spellingEnabled= false;
-			SpellUIForTLF.UITable[SpellUIForTLF.parentComp[this.textFlow]].spellingEnabled = spellingEnabled;
-			mTextHighlighter.clearSquiggles();
-		}
-		
-		public function cleanUpContextMenu():void
-		{
-			mTextHighlighter=null;
-			mWordProcessor=null;
-			spellingEnabled = false;
-			_ignoreWordFunctionProcessor=null;
-			
-			_contextMenu.removeEventListener(ContextMenuEvent.MENU_SELECT, updateCustomMenuItems);
-			
-			var removedNum:int = 0;
-			var count:uint = _contextMenu.customItems.length;
-			for (var j:uint=count; j>0; j--) {
-				if ( isWordItem(_contextMenu.customItems[j-1]) || isControlItem(_contextMenu.customItems[j-1]) ) {
-					_contextMenu.customItems.splice(j-1,1);
-					removedNum++
-				}
-			}
-			if ( removedNum != suggestionMenuItemList.length + controlMenuItemList.length ) {
-				trace("internal error");
-			}
-			
-			suggestionMenuItemList = null;
-			controlMenuItemList = null;
-		}
-		
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/LinguisticUtils/src/com/adobe/linguistics/utils/ITokenizer.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/LinguisticUtils/src/com/adobe/linguistics/utils/ITokenizer.as b/Squiggly/main/LinguisticUtils/src/com/adobe/linguistics/utils/ITokenizer.as
new file mode 100644
index 0000000..e40772d
--- /dev/null
+++ b/Squiggly/main/LinguisticUtils/src/com/adobe/linguistics/utils/ITokenizer.as
@@ -0,0 +1,76 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+
+
+package com.adobe.linguistics.utils
+{
+	/**
+	 * The <code>ITokenizer</code> Interface.
+	 * This interface defines default methods which will be used for Adobe Linguistic Service.
+	 * Be independent from any UI component or be able to adapt to a given UI component. 
+	 * Provide or define standardized way so that third-party can switch to their tokenizer.
+	 * Be able to use for any given language either by some kind of language specific handling or by some kind of unified logic for any given language.
+	 * More sophisticated implementations can be done for particular locales or environments in an application by implementing this interface.
+
+	 * @playerversion Flash 10
+	 * @langversion 3.0
+	 */
+	public interface ITokenizer
+	{
+		
+		/**
+		 * Return the first word in the text being scanned. 
+		 * 
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */		
+		function getFirstToken():Token;
+		
+		/**
+		 * Return the last word in the text being scanned. 
+		 * 
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */		
+		function getLastToken():Token;
+		
+		/**
+		 * Determine the next word following the current token.  
+		 * 
+		 * Return the token of the next word or <code>lastToken</code> object if all word have been returned.
+		 * @param token A <code>Token</code> object to be used for determining next word.
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */		
+		function getNextToken(token:Token):Token;
+		
+		/**
+		 * Determine the previous word preceding the current token.  
+		 * 
+		 * Return the token of the previous word or <code>firstToken</code> object if all word have been returned.
+		 * @param token A <code>Token</code> object to be used for determining previous word.
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */		
+		function getPreviousToken(token:Token):Token;
+
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/LinguisticUtils/src/com/adobe/linguistics/utils/TextTokenizer.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/LinguisticUtils/src/com/adobe/linguistics/utils/TextTokenizer.as b/Squiggly/main/LinguisticUtils/src/com/adobe/linguistics/utils/TextTokenizer.as
new file mode 100644
index 0000000..596481c
--- /dev/null
+++ b/Squiggly/main/LinguisticUtils/src/com/adobe/linguistics/utils/TextTokenizer.as
@@ -0,0 +1,393 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+package com.adobe.linguistics.utils
+{
+	import __AS3__.vec.Vector;
+	
+	import flash.utils.Dictionary;
+	
+    import flash.text.engine.TextBlock;
+    import flash.text.engine.TextElement;
+    import flash.text.engine.ElementFormat;
+
+		
+	/**
+	 * <p>The <code>TextTokenizer</code> class locates the boundaries of words in a 
+	 * block of text.</p>
+	 * 
+	 * Word boundary locations are found according to these general principles:
+	 * <ul>
+	 * 		<li> Be able to tokenize a block of text specified by start and end positions </li> 
+	 * 		<li> Default separator is Unicode white space character. Also break on newlines </li> 
+	 * 		<li> Tokens consist of either words or numbers in which case it may include commas, etc.. </li> 
+	 * 		<li> Apostrophes or hyphens within a word are kept with the word </li> 
+	 * 		<li> Punctuation, spaces and other characters that are not part of a token, are broken out separately </li> 
+	 * </ul>
+	 * <p>In the future versions, this class would also provide a way for the developers to customize the separators used by the tokenizer. </p>
+	 * 
+	 * @playerversion Flash 9.x
+ 	 * @langversion 3.0
+	*/
+	public class TextTokenizer implements ITokenizer
+	{
+		
+
+		private var _textBlock:TextBlock;
+		private var _textHolder:String;
+		private var _startIndex:int;
+		private var _endIndex:int;
+		private var _firstToken:Token;
+		private var _lastToken:Token;
+		
+		private var _ignoredCharactersDict:Dictionary = new Dictionary();
+
+
+		/**
+		 * The tokenizer for a String object.
+		 * This class implements the ITokenizer interface.
+		 * Constructs a new TextTokenizer object to break String to words by creating with a new piece of text. 
+		 * @param textHolder A <code>String</code> object to hold the text which will be processed by this tokenizer.
+		 * @param startIndex A <code>int</code> type input to hold the starting index of input text should be scanned.
+		 * @param endIndex A <code>int</code> type input to hold the ending index of input text should be scanned.
+		 * <span class="hide"> TODO param requestedLocaleIDName The LocaleID name to be used by this TextTokenizer object. </span>
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */
+		public function TextTokenizer(textHolder:String, startIndex:int=0, endIndex:int=int.MAX_VALUE)//, requestedLocaleIDName:String=null)
+		{
+			//requestedLocaleIDName parameter is useful for potential extension. won't handle it in the first round of implementation.
+			//  same comments for API: requestedLocaleIDName()/actualLocaleIDName()/getAvailableLocaleIDNames()
+            var textElement:TextElement = new TextElement(textHolder, new ElementFormat()); 
+            var textBlock:TextBlock = new TextBlock();
+            textBlock.content = textElement; 
+			
+			/* init a tokenizer object */
+			this._textBlock = textBlock;
+			this._textHolder = textHolder;
+			this._startIndex =  0;
+			this._endIndex = this._textBlock.content.text.length;
+			initDefaultIgnoredCharacters();
+			setStartIndex(startIndex);
+			setEndIndex(endIndex);
+			
+		}
+		
+		private function setStartIndex(value:int):void {
+			if ( value <= 0 ) 
+				this._startIndex = 0;
+			else if ( value >= this._endIndex ) 
+				this._startIndex = this._endIndex;
+			else
+				this._startIndex=value;
+		}
+		
+		// strange behaviour with String.substring() function... need more thinking....
+		private function setEndIndex(value:int):void {
+			if ( value >= this._textBlock.content.text.length ) 
+				this._endIndex = this._textBlock.content.text.length;
+			else if ( value <= this._startIndex ) 
+				this._endIndex = this._startIndex;
+			else
+				this._endIndex = value;
+		}
+
+		private function initDefaultIgnoredCharacters():void {
+			var ignoredCharsArray:Array = [
+				0x002d,
+				0x2010
+			];
+			var ignoredChars:String = "";
+			for ( var i:int=0; i< ignoredCharsArray.length; ++i ) {
+				ignoredChars=ignoredChars+String.fromCharCode(ignoredCharsArray[i]);
+			}
+			this.ignoredCharacters = ignoredChars;
+		}
+
+		private function getNextTokenByIndex( startPos:int ):Token{
+			var resultToken:Token = null;
+			/* calculate first token and return it. */
+			var i:int = (startPos > this._startIndex) ? startPos: this._startIndex;
+			while ( i< this._endIndex ) {
+				var begin:int = i;
+				i = this._textBlock.findNextWordBoundary(begin);
+				var end:int = ( i <= this._endIndex) ? i : this._endIndex;
+				if ( !isSingleSpecialCharacter( this._textHolder.substring(begin,end) ) ) {
+					resultToken = new Token(begin,end);
+					break;				
+				}
+			}
+			if ( resultToken==null ) resultToken = this.getLastToken();
+			return resultToken;
+		}
+		
+		private function getPreviousTokenByIndex( endPos:int):Token {
+			var resultToken:Token = null;
+			/* calculate first token and return it. */
+			var i:int = (endPos < this._endIndex) ? endPos: this._endIndex;
+			
+			/* special handling for last element in the word, bof */
+			var specialHandling:Boolean = false;
+			if ( i == this._endIndex ) {
+				specialHandling = true;
+				i = this._endIndex -1;
+			}
+			/* special handling for last element in the word, eof */
+			
+			while ( i > this._startIndex ) {
+				var end:int = i;
+				i = this._textBlock.findPreviousWordBoundary(end);
+				var begin:int = ( i > this._startIndex) ? i : this._startIndex;
+				
+				/* special handling for last element in the word, bof */
+				if ( specialHandling ) {
+					end = (this._textBlock.findNextWordBoundary(begin)<this._endIndex) ?this._textBlock.findNextWordBoundary(begin):this._endIndex;
+					specialHandling=false;
+					if ( (end != this._endIndex) && !isSingleSpecialCharacter(this._textHolder.substring(this._endIndex-1,this._endIndex)) ) {
+						begin = this._endIndex-1;
+						i=begin;
+						end = this._endIndex;
+					} 
+				}
+				/* special handling for last element in the word, eof */
+				
+				if ( !isSingleSpecialCharacter( this._textHolder.substring(begin,end) ) ) {
+					resultToken = new Token(begin,end);
+					break;	
+				}
+			}
+			if ( resultToken==null ) resultToken = this.getFirstToken();
+			return resultToken;
+		}
+		
+		private function isExceptionCharacter(word:String):Boolean {
+			if ( word.length != 1 ) return false;
+			if ( this._ignoredCharactersDict[word] == true ) return true;
+			return false;
+		}
+		
+		private function getNextFilteredTokenByIndex(startPos:int):Token {
+			var token:Token = getNextTokenByIndex(startPos);
+			var firstToken:Token = token;
+			var cursor:int=token.last+1;
+			
+			while ( (cursor < this._endIndex) ) {
+				if ( !isExceptionCharacter(this._textHolder.substring(cursor-1,cursor)) ) {
+					break;
+				}else {
+					//another request from Harish about handling case abc\\abc abc\.abc case...not 100% sure about the correct behavior...
+					/*bof*/
+					while( cursor < this._endIndex && isExceptionCharacter(this._textHolder.substring(cursor-1,cursor)) ) {
+						cursor++;
+					}
+					cursor--;
+					/*eof*/
+				}
+				token = getNextTokenByIndex(cursor);
+				if ( token.first != cursor ) {
+					token = firstToken;
+					break;
+				}
+				token.first=firstToken.first;
+				firstToken = token;
+				cursor = token.last+1;
+			} 
+			return token;
+		}
+
+		private function getPreviousFilteredTokenByIndex(endPos:int):Token {
+			var token:Token = getPreviousTokenByIndex(endPos);
+			var lastToken:Token = token;
+			var cursor:int=token.first-1;
+			
+			while ( ( cursor > this._startIndex ) ) {
+				if ( !isExceptionCharacter(this._textHolder.substring(cursor,cursor+1)) ) {
+					break;
+				}else {
+					//another request from Harish about handling case abc\\abc abc\.abc case...not 100% sure about the correct behavior...
+					/*bof*/
+					while( cursor > this._startIndex && isExceptionCharacter(this._textHolder.substring(cursor,cursor+1)) ) {
+						cursor--;
+					}
+					cursor++;
+					/*eof*/
+				}
+				token = getPreviousTokenByIndex(cursor);
+				if ( token.last != cursor ) {
+					token = lastToken;
+					break;
+				}
+				token.last=lastToken.last;
+				lastToken = token;
+				cursor = token.first-1;
+			} 
+			return token;
+		}
+
+		private function isSingleSpecialCharacter(word:String):Boolean{
+			if ( word.length != 1 ) return false;
+			if ( word.toLocaleLowerCase() == word.toLocaleUpperCase() ) return true;
+			return false;
+		}
+		
+		/** 
+		 * Set all of ignored separators to this tokenizer class.
+		 * 
+		 * A vector of int containing all of ignored separators code point which are used by this class. 
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */		
+		public function set ignoredSeparators(characters:Vector.<int>):void {
+			if ( characters == null || characters.length==0 ) return;
+			this._ignoredCharactersDict = new Dictionary();
+			for ( var i:int =0;i<characters.length;++i) {
+				this._ignoredCharactersDict[String.fromCharCode(characters[i])]=true;
+			}
+		}
+		
+		/**
+		 * Get all of ignored separators used by this tokenizer class.
+		 * 
+		 * A vector of int containing all of ignored separators code point which are used by this class. 
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */		
+		public function get ignoredSeparators():Vector.<int>{
+			var result:Vector.<int> = new Vector.<int>();
+			for ( var key:String in _ignoredCharactersDict) {
+				result.push(key.charCodeAt(0) );
+			}
+			return result;
+			
+		}
+		
+		private function set ignoredCharacters(value:String ) :void {
+			if( value == null || value == "" ) return;
+			var charArr:Array = value.split("");
+			this._ignoredCharactersDict = new Dictionary();
+			for ( var i:int = 0;i< charArr.length;++i) {
+				this._ignoredCharactersDict[charArr[i]]=true;
+			}
+		}
+		
+		private function get ignoredCharacters():String {
+			var result:String = "";
+			for ( var key:String in _ignoredCharactersDict) {
+				result +=key;
+			}
+			return result;
+		}
+		
+		/**
+		 * The name of the requested locale ID that was passed to the constructor of this TextTokenizer object. 
+		 * 
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */	/*	
+		public function get requestedLocaleIDName():String {
+			return null;
+		}
+		
+		
+		/**
+		 * The name of the actual locale ID used by this TextTokenizer object. 
+		 * 
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */	/*	
+		public function get actualLocaleIDName():String {
+			return null;
+		}
+		
+		/**
+		 * Lists all of the locale ID names supported by this class.
+		 * 
+		 * A vector of strings containing all of the locale ID names supported by this class. 
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */		/*
+		public static function getAvailableLocaleIDNames():Vector.<String>{ return null;}
+*/
+		/**
+		 * Return the first word in the text being scanned. 
+		 * <p> NOTE: In a special case when there are no valid tokens in text, it returns a pseudo token having first and last index set to int.MAX_VALUE. As a result<code> firstToken().first </code>equals int.MAX_VALUE and<code> firstToken().last </code>equals int.MAX_VALUE.</p>
+		 * 
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */		
+		public function getFirstToken():Token {
+			
+			/* return the cached one. */
+			if ( this._firstToken != null )
+				return this._firstToken;
+			
+			/* calculate first token and return it. */
+			//this._firstToken = getNextTokenByIndex(this._startIndex); // without any filter from LS, directly use FTE tokenizer...
+			this._firstToken = getNextFilteredTokenByIndex(this._startIndex);
+
+			return this._firstToken;
+		}
+		
+		/**
+		 * @private
+		 * Return the last word in the text being scanned. 
+		 * 
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */		
+		public function getLastToken():Token {
+			/* return the cached one. */
+			if ( this._lastToken != null )
+				return this._lastToken;
+				
+			/* calculate last token and return it. */
+			this._lastToken = new Token(int.MAX_VALUE,int.MAX_VALUE);
+			return this._lastToken;
+		}
+		
+		/**
+		 * Determine the next word following the current token.  
+		 * 
+		 * <p>Returns the token of the next word.</p><p> NOTE: When there are no more valid tokens, it returns a pseudo token having first and last index set to int.MAX_VALUE. As a result<code> getNextToken().first </code>equals int.MAX_VALUE and<code> getNextToken().last </code>equals int.MAX_VALUE.</p>
+		 * @param token A <code>Token</code> object to be used for determining next word.
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */		
+		public function getNextToken(token:Token):Token {
+			//return getNextTokenByIndex(token.last); // without any filter from LS, directly use FTE tokenizer...
+			return getNextFilteredTokenByIndex(token.last);
+		}
+		
+		/**
+		 * Determine the word preceding the current token.  
+		 * 
+		 * <p>Returns the token of the previous word or<code> getFirstToken </code>object if there is no preceding word.</p>
+		 * @param token A <code>Token</code> object to be used for determining previous word.
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */		
+		public function getPreviousToken(token:Token):Token {
+			//return getPreviousTokenByIndex( token.first );// without any filter from LS, directly use FTE tokenizer...
+			return getPreviousFilteredTokenByIndex( token.first )
+		}
+
+	}
+	
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/LinguisticUtils/src/com/adobe/linguistics/utils/Token.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/LinguisticUtils/src/com/adobe/linguistics/utils/Token.as b/Squiggly/main/LinguisticUtils/src/com/adobe/linguistics/utils/Token.as
new file mode 100644
index 0000000..27fcfb2
--- /dev/null
+++ b/Squiggly/main/LinguisticUtils/src/com/adobe/linguistics/utils/Token.as
@@ -0,0 +1,94 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+
+
+package com.adobe.linguistics.utils
+{
+	/**
+	 * A Token is an occurrence of a word in a block of text. It consists of the start and end offset of the word in the block of text.
+	 * The start and end offsets permit applications to re-associate a token with its source text, e.g., to display highlighted misspelled word in 
+	 * a block of text.
+	 * @playerversion Flash 10
+	 * @langversion 3.0
+	 */
+	public class Token
+	{
+		private var _first:uint;
+		private var _last:uint;
+		
+		/**
+		 * The Token class.
+		 * Constructs a Token with first and last offsets. . 
+		 * @param first A <code>int</code> type input to point start offset in the source text.
+		 * @param last A <code>int</code> type input to point end offset in the source text.
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */
+		public function Token(inFirst:int, inLast:int)
+		{
+			_first = inFirst;
+			_last = inLast;
+
+		}
+		
+		/**
+		 * Set the start offset in the source text. 
+		 * 
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */		
+		public function set first(value:int):void {
+			_first=value;
+		}
+		
+		/**
+		 * Return the start offset in the source text. 
+		 * 
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */		
+		public function get first():int
+		{
+			return _first;
+		}
+		
+		/**
+		 * Set the end offset in the source text. 
+		 * 
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */		
+		public function set last(value:int):void {
+			_last = value;
+		}
+		
+		/**
+		 * Return the end offset in the source text. 
+		 * 
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */		
+		public function get last():int
+		{
+			return _last;
+		}
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/HunspellDictionary.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/HunspellDictionary.as b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/HunspellDictionary.as
new file mode 100644
index 0000000..7ec0312
--- /dev/null
+++ b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/HunspellDictionary.as
@@ -0,0 +1,205 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+package com.adobe.linguistics.spelling
+{
+	import com.adobe.linguistics.spelling.core.LinguisticRule;
+	import com.adobe.linguistics.spelling.core.SquigglyDictionary;
+	import com.adobe.linguistics.spelling.core.utils.LinguisticRuleLoader;
+	import com.adobe.linguistics.spelling.core.utils.SquigglyDictionaryLoader;
+	
+	import flash.errors.IllegalOperationError;
+	import flash.events.ErrorEvent;
+	import flash.events.Event;
+	import flash.events.EventDispatcher;
+	import flash.events.IOErrorEvent;
+	import flash.events.SecurityErrorEvent;
+
+	/**
+	 *
+	 * This class enables creation and loading of spelling metadata including rules and dictionary data
+	 *
+	 * @playerversion Flash 10
+	 * @langversion 3.0
+	 * @includeExample Examples/Air/CheckWord/src/CheckWord.mxml -noswf
+	 */
+	 
+	public final class HunspellDictionary extends EventDispatcher implements ISpellingDictionary
+	{
+		private var _dict:SquigglyDictionary;
+		private var _attrMgr:LinguisticRule;
+		private var _rulePath:String;
+		private var _dictionaryPath:String;
+		
+		private var ruleLoader:LinguisticRuleLoader = new LinguisticRuleLoader();
+		private var dictLoader:SquigglyDictionaryLoader = new SquigglyDictionaryLoader();
+
+		private var _loaded:Boolean;
+		
+		//adding vars for loading dictionaries in parts
+		private var _enableDictionarySplit:Boolean;
+		private var _wordsPerDictionarySplit:int;
+
+		/**
+		 * Constructs a new <code>HunspellDictionary</code> which can later be used by a <code>SpellChecker</code> object.
+		 *
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */
+		public function HunspellDictionary()
+		{
+			_attrMgr = null;
+			_dict = null;
+			_rulePath = null ;
+			_dictionaryPath = null;
+			_loaded = false;
+			//giving default values in case user does not want to specify these
+			_enableDictionarySplit =false;
+			_wordsPerDictionarySplit= 20000;
+
+		}
+
+		/**
+			@private
+			(This property is for Squiggly Developer use only.)
+		*/
+		public function get linguisticRule():LinguisticRule {
+			return _attrMgr;
+		}
+		
+		/**
+			@private
+			(This property is for Squiggly Developer use only.)
+		*/
+		public function get squigglyDictionary():SquigglyDictionary {
+			return  _dict;
+		}
+		
+		/**
+		 * Loads a Hunspell dictionary and corresponding rules files as specified by the <code>dictionaryURL</code> and the <code>rulesURL</code>.
+		 *
+		 * <p>The actual loading is done asynchronously and
+		 *	the <code>HunspellDictionary</code> object will dispatch an <code>Event.COMPLETE</code> event.
+		 *	When an error condition occurs, it will dispatch an <code>IOErrorEvent.IO_ERROR</code> event.</p>
+		 * @param rulesURL The URL of rule file to be loaded.
+		 * @param dictionaryURL The URL of Dictionary file to be loaded.
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 * @example The following code shows how load API is called to load a Rule and Dictionary file to create a HunspellDictionay.
+		 * <listing version="3.0">
+		 * private var _newdict:HunspellDictionary = new HunspellDictionary();
+		 * _newdict.load("dictionaries/en_US/en_US.aff", "dictionaries/en_US/en_US.dic");
+		 * </listing>
+		 */
+		public function load(rulesURL:String, dictionaryURL:String):void {
+			if ( rulesURL == null || dictionaryURL == null ) {
+				throw new IllegalOperationError("load function did not receive two valid URLs.");
+			}
+			_rulePath = rulesURL;
+			_dictionaryPath = dictionaryURL;
+			
+			ruleLoader.addEventListener(Event.COMPLETE,loadRuleComplete);
+			ruleLoader.addEventListener(IOErrorEvent.IO_ERROR,handleError);
+			ruleLoader.addEventListener(SecurityErrorEvent.SECURITY_ERROR,handleError);
+			ruleLoader.load( _rulePath);
+			
+		}
+
+		/**
+		 * A flag that indicates if the dictionary has finished loading.
+		 * 
+		 * @return <code>true</code> if loading is completed. <code>false</code> if loading has not completed.
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */
+		public function get loaded():Boolean
+		{
+			return _loaded;
+		}
+
+		
+		// Private method to dispatch complete Event.
+		private function loadRuleComplete(evt:Event):void {
+			_attrMgr = ruleLoader.linguisticRule;
+			
+			dictLoader.linguisticRule = _attrMgr;
+			dictLoader.addEventListener(Event.COMPLETE,loadDictionaryComplete);
+			dictLoader.addEventListener(IOErrorEvent.IO_ERROR,handleError);
+			dictLoader.addEventListener(SecurityErrorEvent.SECURITY_ERROR,handleError);
+			dictLoader.load(_dictionaryPath, _enableDictionarySplit, _wordsPerDictionarySplit);
+		}
+
+		// Private method to dispatch complete Event.
+		private function loadDictionaryComplete(evt:Event):void {
+			_dict = dictLoader.squigglyDictionary;
+			_loaded = true;
+			dispatchEvent(new Event(Event.COMPLETE));
+		}
+		
+		//Private method to dispatch an error event.
+		private function handleError(evt:Event):void {
+			bounceEvent(evt);
+		}
+		
+		private function bounceEvent(evt:Event):void {
+			dispatchEvent(evt.clone());
+		}
+		
+		/**
+		 * This is a flag that enables/disables loading of dictionary in splits.
+		 * By default this flag is set to <code>false</code>. In case the initial loading time of dictionaries is found slow, this flag should be set to <code>true</code>. By enabling this, squiggly will load dictionary in splits with each split having <code>wordsPerDictionarySplit</code> number of words.
+		 * <p>NOTE: This property, if used, should be set before calling <code>HunspellDictionary.load</code>. Once <code>HunspellDictionary.load</code> is called dictionaries will be loaded according to default values, and this property will not be used. </p>
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */
+		public function get enableDictionarySplit():Boolean
+		{
+			return _enableDictionarySplit;	
+		}
+		
+		public function set enableDictionarySplit(enableDictionarySplit:Boolean):void
+		{
+			_enableDictionarySplit = enableDictionarySplit;
+		}
+		
+		/**
+		 * This property defines the number of words in one dictionary split.
+		 * By default the value of this property is set to 20000 words. This property is used only if <code>enableDictionarySplit</code> is set to <code>true</code>. If <code>enableDictionarySplit</code> is set to <code>flase</code> this property turns void.
+		 * <p>NOTE: This property, if used, should be defined before calling <code>HunspellDictionary.load</code>. Once <code>HunspellDictionary.load</code> is called dictionaries will be loaded according to default values, and this property will not be used. </p>
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */
+		public function get wordsPerDictionarySplit():int
+		{
+			
+			return _wordsPerDictionarySplit;	
+		}
+		
+		public function set wordsPerDictionarySplit(wordsPerDictionarySplit:int):void
+		{
+			if(wordsPerDictionarySplit<=0){
+				//Do error Handling
+				throw new IllegalOperationError("wordsPerDictionarySplit should be a positive non-zero value.");
+			}
+			_wordsPerDictionarySplit = wordsPerDictionarySplit;
+		}
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/ISpellChecker.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/ISpellChecker.as b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/ISpellChecker.as
new file mode 100644
index 0000000..34917bd
--- /dev/null
+++ b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/ISpellChecker.as
@@ -0,0 +1,62 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package com.adobe.linguistics.spelling
+{
+	/**
+	 * Interface for actual SpellChecker class implementations
+	 *
+	 * <p>If a new SpellChecker class is created, it must implement the methods and properties defined by this interface.
+	 * The <code>SpellChecker</code> class implements this interface.</p>
+	 * 
+	 * @playerversion Flash 10
+	 * @langversion 3.0
+	 */
+	public interface ISpellChecker
+	{	
+		/**
+		 * Spellchecks a word.
+		 * 
+		 * @param word	A string containing a word.
+		 * 			<p><strong>Note: </strong>Please be aware that it is the caller's responsibility to break down sentences into words that can be handled by this method.
+		 *  			For example, this method does not support punctuation marks such as comma, colon, quotes, etc.
+		 *				Punctuation marks should be stripped out from the word prior to calling this method.</p>
+		 * @return <code>true</code> if the word is properly spelled. <code>false</code> if the word is misspelled.
+		 *
+		 * @includeExample Examples/Flex/CheckWord/src/CheckWord.mxml
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */
+		function checkWord(word:String):Boolean;
+		
+		/**
+		 * Gets suggestions for a misspelled word. 
+		 *
+		 * @param word	A string containing a misspelled word.
+		 * 					<p>A properly spelled word does not generate any suggestions.</p>  
+		 * @return	A list of suggestions.
+		 *					If the input word is properly spelled, an empty list will be returned.</p>
+		 *
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */
+		function getSuggestions(word:String):Array;
+		
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/ISpellingDictionary.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/ISpellingDictionary.as b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/ISpellingDictionary.as
new file mode 100644
index 0000000..8a46ef4
--- /dev/null
+++ b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/ISpellingDictionary.as
@@ -0,0 +1,45 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+package com.adobe.linguistics.spelling
+{
+	import com.adobe.linguistics.spelling.core.LinguisticRule;
+	import com.adobe.linguistics.spelling.core.SquigglyDictionary;
+	public interface ISpellingDictionary
+	{
+
+		/**
+		 * @private
+		 * (This property is for Squiggly Developer use only.)
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */
+		function get linguisticRule():LinguisticRule;
+		
+		/**
+		 * @private
+		 * (This property is for Squiggly Developer use only.)
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */
+		function get squigglyDictionary():SquigglyDictionary;
+		
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/SpellChecker.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/SpellChecker.as b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/SpellChecker.as
new file mode 100644
index 0000000..bc23a91
--- /dev/null
+++ b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/SpellChecker.as
@@ -0,0 +1,387 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+package com.adobe.linguistics.spelling
+{	
+	import com.adobe.linguistics.spelling.core.*;
+
+	/**
+	 * The spelling engine.
+	 *
+	 * <p>This class implements the <code>ISpellChecker</code> interface.
+	 * This class performs spell&#x2d;checking and generates suggestion lists for misspelled words.
+	 * This class does not include any user-interface elements. Use this class if you want to offer 
+	 * control over how all upper case words are handled or words with numbers are handled, as this 
+	 * level of control is not offered by the SpellUI class.  However, please keep in mind that if 
+	 * you use this class, you will need to write your own UI.</p>
+	 *
+	 * <p>This class is based on the Hunspell algorithm and works with Hunspell/MySpell 
+	 * dictionaries and corresponding language rules files.</p>
+	 * <p>Currently, we support a subset of Hunspell rules(options). </p>
+	 * <p>The future of this class is to align as much as possible with existing Hunspell solution 
+	 * both for the algorithms and the content. </p> 
+	 * <p>In this version, users can also directly load Open-Office dictionaries to HunspellDictionary 
+	 * class and initialize a SpellChecker instance with this HunspellDictionary object. When using this 
+	 * class, the language of use is implied by the dictionary supplied.  Please make sure you load the 
+	 * appropriate dictionary based on the language the user selects to input.</p>
+	 * 
+	 * <p>Note: In the current implementation, only one main dictionary can be used at a time. In addition, 
+	 * in this version, suggestions for misspelled words do not include words from the user dictionary.</p>
+	 *
+	 * @includeExample Examples/Flex/TextEditor/src/TextEditor.mxml -noswf
+	 * 
+	 * @playerversion Flash 10
+	 * @langversion 3.0
+	 */
+	public class SpellChecker implements ISpellChecker
+	{
+		private var _spellingEngine:SquigglyEngine;
+		private var _rule:LinguisticRule;
+		private var _dict:SquigglyDictionary;
+		
+		private var _udEngine:UserDictionaryEngine;
+		
+		/**
+		 * Constructs a new <code>SpellChecker</code> object that performs language sensitive spell checking.
+		 * 
+		 * @param spellingDictionary A <code>ISpellingDictionary</code> interface to be used by this <code>SpellChecker</code>.
+		 * For example, you can pass a <code>HunspellDictonary</code> object which already implemented the <code>ISpellingDictionary</code> interface to this constructor.
+		 *
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */
+		public function SpellChecker(spellingDictionary:ISpellingDictionary)
+		{
+			_rule = spellingDictionary.linguisticRule;
+			_dict = spellingDictionary.squigglyDictionary;
+			_spellingEngine = new SquigglyEngine(_rule,_dict);
+			_spellingEngine.fastMode = true;
+			_udEngine = new UserDictionaryEngine();
+		}
+
+		/**
+		 * Add a user dictionary to the SpellChecker.
+		 * 
+		 * @return <code>true</code> if the operation is successful. <code>false</code> if the operation failed.
+		 * @param userDictionary A <code>UserDictionary</code> object to be added to this <code>SpellChecker</code>.
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */		
+		public function addUserDictionary(userDictionary:UserDictionary):Boolean
+		{
+			return _udEngine.addDictionary(userDictionary.internalUserDictionary);
+		}
+		
+		/**
+		 * Remove a user dictionary from the SpellChecker.
+		 * 
+		 * @return <code>true</code> if the operation is successful. <code>false</code> if the operation failed.
+		 * @param userDictionary A <code>UserDictionary</code> object to be removed from this <code>SpellChecker</code>.
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */		
+		public function removeUserDictionary(userDictionary:UserDictionary):Boolean
+		{
+			return _udEngine.removeDictionary(userDictionary.internalUserDictionary);
+		}
+
+		
+		/**
+		 * Spellchecks a word.
+		 * 
+		 * @param word	A string containing a word.
+		 * 			<p><strong>Notes:</strong></p>
+		 *				<ul>
+		 *					<li>
+		 *						Please be aware that it is the caller's responsibility to break down sentences into words that can be handled by this method.
+		 *  					For example, this method does not support punctuation marks such as comma, colon, quotes, etc.
+		 *						Punctuation marks should be stripped out from the word prior to calling this method.
+		 *						If a word contains white spaces (such as a regular space or non-breaking space), the word will be considered as misspelled.
+		 *					</li>
+		 *				</ul>
+		 * @return <code>true</code> if the word is properly spelled. <code>false</code> if the word is misspelled.
+		 *
+		 * @includeExample Examples/Flex/CheckWord/src/CheckWord.mxml -noswf
+		 * 
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */
+		public function checkWord(word:String):Boolean
+		{
+			return (_spellingEngine==null)? false:(_udEngine.spell(word) || _spellingEngine.spell(word));
+		}
+		
+		/**
+		 * Gets suggestions for a misspelled word. 
+		 *
+		 * @param word	A string containing a misspelled word.
+		 * 	
+		 * @return	A list of suggestions. <p>Up to ten suggestions may be returned.</p>
+		 *
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */
+		public function getSuggestions(word:String):Array
+		{
+			return (_spellingEngine==null)? null:_spellingEngine.suggest(word);
+		}
+
+
+		/** @private
+		 * The version of this <code>SpellChecker</code> class.
+		 * 
+		 * <p>Example: "0.3"</p>
+		 * 
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */
+		public static function get version():String
+		{
+			return "0.5";
+		}
+
+
+
+		/**
+		 * This property controls if Title Case Words should be considered as properly spelled.
+		 * 
+		 * <p>The default value is <code>false</code>.</p> 
+		 *
+		 * <p>If <code>ignoreTitleCase</code> is set to <code>true</code>, any words with first character capped are always considered as properly spelled.</p>
+		 * <p>If <code>ignoreWordWithTitleCase</code> is set to <code>true</code>, "Spel" will be considered as properly spelled even if the dictionary does not contain "spel" or "Spel".
+		 * If <code>ignoreWordWithTitleCase</code> is set to <code>false</code>, "Spel" will be considered as mispelled unless the dictionary contain "Spel".</p>
+		 *
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */
+		private function get ignoreWordWithTitleCase():Boolean
+		{
+			return _spellingEngine.ignoreCappedWord;
+		}
+		private function set ignoreWordWithTitleCase(value:Boolean):void
+		{
+			_spellingEngine.ignoreCappedWord = value;
+		}
+		
+		/**
+		 * This property controls if words in all upper case should be considered as properly spelled or not.
+		 * 
+		 * <table class="innertable">
+		 *		<tr>
+		 *			<td align="center"><strong><code>ignoreWordWithAllUpperCase</code></strong></td>
+		 *			<td align="center"><strong>&#160;</strong></td>
+		 *			<td align="center"><strong>Description</strong></td>
+		 *		</tr>
+		 *		<tr>
+		 *			<td><code>false</code></td>
+		 *			<td>Default</td>
+		 *			<td><p>Words with all characters in upper case are checked against the dictionary for proper spelling.</p>
+		 *				<p>Example: if <code>ignoreWordWithAllUpperCase = false</code>, "MISPEL" will be checked for proper spelling.</p></td>
+		 *		</tr>
+		 *		<tr>
+		 *			<td><code>true</code></td>
+		 *			<td>&#160;</td>
+		 *			<td><p>Any words with all characters in upper case are always considered as properly spelled,
+		 *					no matter whether the word is in the dictionary or not.</p>
+		 *				<p>Example: if <code>ignoreWordWithAllUpperCase = true</code>, "MISPEL" will be considered as properly spelled.</p></td>
+		 *		</tr>
+		 *	</table>
+		 *
+		 *	<!--
+		 *	<p>Following table contains some examples to show how this property works.</p>
+		 * 	<p>Assumption: <code>ignoreWordWithTitleCase</code> = <code>false</code></p>
+		 *	<table class="innertable">
+		 *		<tr>
+		 *			<td rowspan=2 align="center"><strong>Word in dictionary</strong></td>
+		 *			<td rowspan=2 align="center"><strong>Input word</strong></td>
+		 *			<td colspan=2 align="center"><strong><code>ignoreWordWithAllUpperCase</code></strong></td>
+		 *		</tr>
+		 *		<tr>
+		 *			<td align="center"><strong><code>false</code></strong></td>
+		 *			<td align="center"><strong><code>true</code></strong></td>
+		 *		</tr>
+		 *		<tr>
+		 *			<td rowspan="4">apple</td>
+		 *			<td>apple</td>
+		 *			<td>Properly spelled</td>
+		 *			<td>Properly spelled</td>
+		 *		</tr>
+		 *		<tr>
+		 *			<td>APPLE</td>
+		 *			<td>Properly spelled</td>
+		 *			<td>Properly spelled</td>
+		 *		</tr>
+		 *		<tr>
+		 *			<td>Apple</td>
+		 *			<td>Properly spelled</td>
+		 *			<td>Properly spelled</td>
+		 *		</tr>
+		 *		<tr>
+		 *			<td>aPPLe</td>
+		 *			<td>Properly spelled</td>
+		 *			<td>Properly spelled</td>
+		 *		</tr>
+		 *		<tr>
+		 *			<td rowspan="4">NATO</td>
+		 *			<td>nato</td>
+		 *			<td>Properly spelled</td>
+		 *			<td>Properly spelled</td>
+		 *		</tr>
+		 *		<tr>
+		 *			<td>NATO</td>
+		 *			<td>Properly spelled</td>
+		 *			<td>Properly spelled</td>
+		 *		</tr>
+		 *		<tr>
+		 *			<td>Nato</td>
+		 *			<td>Properly spelled</td>
+		 *			<td>Properly spelled</td>
+		 *		</tr>
+		 *		<tr>
+		 *			<td>NaTo</td>
+		 *			<td>Properly spelled</td>
+		 *			<td>Properly spelled</td>
+		 *		</tr>
+		 *		<tr>
+		 *			<td rowspan="4">London</td>
+		 *			<td>london</td>
+		 *			<td>Properly spelled</td>
+		 *			<td>Properly spelled</td>
+		 *		</tr>
+		 *		<tr>
+		 *			<td>LONDON</td>
+		 *			<td>Properly spelled</td>
+		 *			<td>Properly spelled</td>
+		 *		</tr>
+		 *		<tr>
+		 *			<td>London</td>
+		 *			<td>Properly spelled</td>
+		 *			<td>Properly spelled</td>
+		 *		</tr>
+		 *		<tr>
+		 *			<td>LoNDoN</td>
+		 *			<td>Properly spelled</td>
+		 *			<td>Properly spelled</td>
+		 *		</tr>
+		 *		<tr>
+		 *			<td rowspan="4">iPhone</td>
+		 *			<td>iphone</td>
+		 *			<td>Properly spelled</td>
+		 *			<td>Properly spelled</td>
+		 *		</tr>
+		 *		<tr>
+		 *			<td>IPHONE</td>
+		 *			<td>Properly spelled</td>
+		 *			<td>Properly spelled</td>
+		 *		</tr>
+		 *		<tr>
+		 *			<td>IPhone</td>
+		 *			<td>Properly spelled</td>
+		 *			<td>Properly spelled</td>
+		 *		</tr>
+		 *		<tr>
+		 *			<td>iPHoNe</td>
+		 *			<td>Properly spelled</td>
+		 *			<td>Properly spelled</td>
+		 *		</tr>
+		 *	</table>
+		 *	-->
+		 * 
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */
+		public function get ignoreWordWithAllUpperCase():Boolean
+		{
+			return _spellingEngine.ignoreAllUpperCase;
+		}
+		public function set ignoreWordWithAllUpperCase(value:Boolean):void
+		{
+			_spellingEngine.ignoreAllUpperCase = value;
+		}
+		
+		
+		/**
+		 * This property controls if words with numbers, such as windows95, should be considered as properly spelled.
+		 * 
+		 * <table class="innertable">
+		 *		<tr>
+		 *			<td align="center"><strong><code>ignoreWordWithNumber</code></strong></td>
+		 *			<td align="center"><strong>&#160;</strong></td>
+		 *			<td align="center"><strong>Description</strong></td>
+		 *		</tr>
+		 *		<tr>
+		 *			<td><code>false</code></td>
+		 *			<td>Default</td>
+		 *			<td><p>Any words containing digits are checked for proper spelling.</p>
+		 *				<p>Example: If <code>ignoreWordWithNumber</code> = <code>false</code>, "mispel99" will be checked for proper spelling.</p>
+		 *			</td>
+		 *		</tr>
+		 *		<tr>
+		 *			<td><code>true</code></td>
+		 *			<td>&#160;</td>
+		 *			<td><p>Words containing digits are always ignored/skipped regardless of the dictionary.</p>
+		 *				<p>Example: If <code>ignoreWordWithNumber</code> = <code>true</code>, "mispel99" will be considered as properly spelled.</p>
+		 *			</td>
+		 *		</tr>
+		 *	</table>
+		 *
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */
+		public function get ignoreWordWithNumber():Boolean 
+		{
+			return _spellingEngine.ignoreWordWithNumber;
+		}
+		public function set ignoreWordWithNumber(value:Boolean):void
+		{
+			_spellingEngine.ignoreWordWithNumber = value;
+		}
+
+
+		/**
+		 * <span class="hide">
+		 * TODO: Decide this block based API.
+		 * Check a block of text and find out all misspelled words in the text.
+		 * 
+		 * 
+		 * @param text	A string containing a block of texts.
+		 * @param separators	An array of separators.
+		 *
+		 * @return An Array of misspelled word tokens, each token contains the startIndex and length
+		 *
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 * 
+		 * Option 1:
+		 *
+		 * public function checkText(text:String, separators:Array):Array
+		 * {
+		 * }
+		 * 
+		 * Option 2:
+		 *
+		 * public function checkText(text:String, tokenizer:ITokenizer):SpellResultIterator
+		 * {
+		 * }
+		 * </span>
+		 */
+	}
+}
+

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/UserDictionary.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/UserDictionary.as b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/UserDictionary.as
new file mode 100644
index 0000000..d22f42c
--- /dev/null
+++ b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/UserDictionary.as
@@ -0,0 +1,113 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package com.adobe.linguistics.spelling
+{
+	import __AS3__.vec.Vector;
+	
+	import com.adobe.linguistics.spelling.UserDictionaryInternal;
+	/**
+	 * Represents a user dictionary.
+	 *
+	 * <p>This class represents a user dictionary that is used by the <code>SpellingService</code> class. This class itself is an in-memory object
+	 * and doesn't store persistent data. However, developers can import/export a <code>UserDictionary</code> object from/to a vector of String, 
+	 * and use other flash classes to keep the data persistent. You may want to consider using one of the following options for permanent storage:
+	 *
+	 * <ul>
+	 *	<li>SharedObject, which is used in our SpellingUI class to store words added from the ContextMenu</li>
+	 *	<li>File/FileStream, which is used in our UserDictionaryExample and can be shared across AIR applications</li>
+	 *	<li>Server side storage, for example database so that it can be shared across users</li>
+	 * </ul>
+	 * </p>
+	 * <p>If you are using our SpellingUI class the UserDictionary will be created behind the scene and stored in a SharedObject.</p>
+	 */	 
+	public class UserDictionary
+	{
+		private var _ud:UserDictionaryInternal;
+		
+		/**
+		 * @private
+		 */
+		public function get internalUserDictionary():UserDictionaryInternal
+		{
+			return _ud;
+		}
+		
+		/**
+		 * Constructs a new <code>UserDictionary</code> which can later be added to a <code>SpellingService</code> object.
+		 *
+		 * @param wordList A vector of words (String) to be added as the initial entries of this <code>UserDictionary</code>
+		 * @see UserDictionary.wordList
+		 *
+		 */
+		public function UserDictionary(wordList:Vector.<String>=null)
+		{
+			var array:Array = new Array();
+			if (wordList) {
+				for each (var w:String in wordList)
+					array.push(w);
+			}
+			
+			_ud = new UserDictionaryInternal(array);
+		}
+
+		/**
+		 * Add a word to the user dictionary.
+		 * 
+		 * @param word A word to be added to this <code>UserDictionary</code>.
+		 * @return <code>true</code> if the operation is successful. <code>false</code> if the operation is failed, for example if the word is already added.
+		 * @see UserDictionary.removeWord()
+		 * 
+		 */		
+		public function addWord(word:String):Boolean	
+		{
+			return _ud.addWord(word);
+		}
+
+		/**
+		 * Removes a word from the user dicitonary.
+		 * 
+		 * @param word A word to be removed from this <code>UserDictionary</code>.
+		 * @return True if the operation was successful, false if the operation was failed, for example if the word doesn't exist in the dictionary.
+		 * @see UserDictionary.addWord()
+		 * 
+		 */		
+		public function removeWord(word:String):Boolean
+		{
+			return _ud.removeWord(word);
+		}
+
+		/**
+		 * All words in this user dictionary.
+		 *
+		 * @return A vector of String that contains all words in this user dictionary
+		 * 
+		 */		
+		public function get wordList():Vector.<String>
+		{
+			var result:Vector.<String> = new Vector.<String>();
+			var array:Array = _ud.wordList;
+			
+			for each (var w:String in array)
+				result.push(w);
+			
+			return result;
+		}
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/UserDictionaryInternal.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/UserDictionaryInternal.as b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/UserDictionaryInternal.as
new file mode 100644
index 0000000..d4034a8
--- /dev/null
+++ b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/UserDictionaryInternal.as
@@ -0,0 +1,115 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+
+package com.adobe.linguistics.spelling
+{
+	import com.adobe.linguistics.spelling.utils.WordList;
+	
+	/**
+	 * Represents a user dictionary.
+	 *
+	 * <p>This class represents a user dictionary that is used by the <code>SpellChecker</code> class. This class itself is an in-memory object
+	 * and doesn't store persistent data. However, developers can import/export a <code>UserDictionaryInternal</code> object from/to an Array of String, 
+	 * and use other flash classes to keep the data persistent. You may want to consider using one of the following options for permanent storage:
+	 *
+	 * <ul>
+	 *	<li>SharedObject, which is used in our SpellUI class to store words added from the ContextMenu</li>
+	 *	<li>File/FileStream, which is used in our UserDictionaryInternalExample and can be shared across AIR applications</li>
+	 *	<li>Server side storage, for example database so that it can be shared across users</li>
+	 * </ul>
+	 * </p>
+	 * <p>If you are using our SpellUI class the UserDictionaryInternal will be created behind the scene and stored in a SharedObject.</p>
+	 * @includeExample Examples/Air/UserDictionaryInternalExample/src/UserDictionaryInternalExample.mxml -noswf
+	 * @playerversion Flash 10
+	 * @langversion 3.0
+	 */	 
+	public class UserDictionaryInternal
+	{
+		/**
+		 @private
+		 (This property is for Squiggly Developer use only.)
+		 */
+		public var _wordList:WordList;
+		
+		/**
+		 * Constructs a new <code>UserDictionaryInternal</code> which can later be added to a <code>SpellChecker</code> object.
+		 *
+		 * @param wordList An array of words (String) to be added as the initial entries of this <code>UserDictionaryInternal</code>
+		 * @see UserDictionaryInternal.wordList
+		 *
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */
+		public function UserDictionaryInternal(wordList:Array=null)
+		{
+			// TODO: exception if has some problem with insert
+			_wordList= new WordList();
+			if (wordList) {
+				for each (var w:String in wordList)
+				_wordList.insert(w); 
+			}
+		}
+		
+		/**
+		 * Add a word to the user dictionary.
+		 * 
+		 * @param word A word to be added to this <code>UserDictionaryInternal</code>.
+		 * @return <code>true</code> if the operation is successful. <code>false</code> if the operation is failed.
+		 * @see UserDictionaryInternal.removeWord()
+		 * 
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */		
+		public function addWord(word:String):Boolean	
+		{
+			return _wordList.insert(word);
+		}
+		
+		/**
+		 * Removes a word from the user dicitonary.
+		 * 
+		 * @param word A word to be removed from this <code>UserDictionaryInternal</code>.
+		 * @return <code>true</code> if the operation is successful. <code>false</code> if the operation is failed.
+		 * @see UserDictionaryInternal.addWord()
+		 * 
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */		
+		public function removeWord(word:String):Boolean
+		{
+			return _wordList.remove(word);
+		}
+		
+		/**
+		 * List of all words in this user dictionary.
+		 *
+		 * @return An Array of String that contains all words in this user dictionary
+		 * 
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */		
+		public function get wordList():Array
+		{
+			// TODO: make sure no return by reference
+			return _wordList.toArray();
+		}
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/DictionaryManager.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/DictionaryManager.as b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/DictionaryManager.as
new file mode 100644
index 0000000..cef5b0d
--- /dev/null
+++ b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/DictionaryManager.as
@@ -0,0 +1,73 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+package com.adobe.linguistics.spelling.core
+{
+	import com.adobe.linguistics.spelling.core.container.HashTable;
+	public class DictionaryManager
+	{
+		private var _table:Array;
+		public function DictionaryManager()
+		{
+			_table = new Array();
+		}
+		
+		public function addDictionary(dict:SquigglyDictionary):Boolean {
+			if ( dict == null ) return false;
+			for ( var i:int = 0; i< _table.length; ++i ) {
+				if ( dict == _table[i] )
+					return false;
+			}
+			_table.push(dict);
+			return true;
+		}
+		
+		public function removeDictionary(dict:SquigglyDictionary):Boolean {
+			if ( dict == null) return false;
+			for ( var i:int = 0; i< _table.length; ++i ) {
+				if ( dict == _table[i] ) {
+					_table = _table.slice(i,1); // remove dictionary from the table.
+				}
+			}
+			return true;
+			
+		}
+		
+		public function get dictonaryList():Array {
+			return this._table;
+		}
+		
+		public function isEmpty():Boolean {
+			return (this._table == null ) ? true : false;
+		}
+		
+		public function get size():int {
+			return this._table.length;
+		}
+		
+		public function lookup( word:String ) :HashEntry {
+			for ( var i:int = 0; i < _table.length; ++i ) {
+				if ( _table[i].containsKey(word) )
+					return _table[i].getElement(word);
+			}
+			return null;
+		}
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/HashEntry.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/HashEntry.as b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/HashEntry.as
new file mode 100644
index 0000000..64ac685
--- /dev/null
+++ b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/HashEntry.as
@@ -0,0 +1,108 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+package com.adobe.linguistics.spelling.core
+{
+	import com.adobe.linguistics.spelling.core.utils.StringUtils;
+	public class HashEntry
+	{
+		private var _affStr:String; // affix flag vector
+		private var _nextEntry:HashEntry;
+		
+		// Not sure now..just leave it here.
+		private var _variableFields:String;   // variable fields (only for special pronounciation yet)
+		
+		
+		public function HashEntry(affStr:String=null,desc:String = null)
+		{
+			this._affStr = StringUtils.sort(affStr);
+			this._variableFields = desc;
+			this._nextEntry = null;
+		}
+		
+		public function addEntry(affStr:String=null,desc:String = null):Boolean {
+			if ( this._nextEntry != null ) return false;
+			this._nextEntry = new HashEntry(affStr, desc);
+			return true;
+		}
+		
+		public function get next():HashEntry {
+			return this._nextEntry;
+		}
+		
+		public function get affixFlagVector():String {
+			return this._affStr;
+		}
+		
+		public function set affixFlagVector(affStr:String):void {
+			this._affStr = StringUtils.sort(affStr);
+		}
+		
+		public function get variableFields():String {
+			return this._variableFields;
+		}
+		
+		public function set variableFields( varF:String) :void {
+			this._variableFields = varF;
+		}
+		
+		public function testAffix(flag:Number):Boolean {
+			if ( this._affStr == null ) return false;
+			var mid:int, left:int=0, right:int= this._affStr.length - 1;
+			while ( left <= right ) {
+				mid = (right+left)/2;
+				if ( this._affStr.charCodeAt(mid) == flag )
+					return true;
+				if ( flag < this._affStr.charCodeAt(mid) ) right = mid -1;
+				else left = mid + 1;
+			}
+			return false;
+		}
+
+		public function testAffixs(flags:Array):Boolean {
+			for ( var i:int; i< flags.length; ++i) {
+				if( testAffix(flags[i]) )
+					return true;
+			}
+			return false;
+		}
+		//For develepors only, this function is made so that when flagmode=flag_long flags can be viewed.
+		public function printFlag(flag:Number):void{
+			var result:String =  String.fromCharCode(flag>>8) + String.fromCharCode(flag-((flag>>8)<<8));
+			
+		}
+
+		
+		static public function TESTAFF(affix:String, flag:Number):Boolean {
+			if ( affix == null ) return false;
+			affix =  StringUtils.sort(affix);
+			var mid:int, left:int=0, right:int= affix.length - 1;
+			while ( left <= right ) {
+				mid = (right+left)/2;
+				if ( affix.charCodeAt(mid) == flag )
+					return true;
+				if ( flag < affix.charCodeAt(mid) ) right = mid -1;
+				else left = mid + 1;
+			}
+			return false;
+			
+		}
+	}
+}
\ No newline at end of file


[34/50] [abbrv] git commit: [flex-utilities] [refs/heads/master] - remove Adobe from directory names (package name still contains Adobe)

Posted by jm...@apache.org.
remove Adobe from directory names (package name still contains Adobe)


Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/4e4f9830
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/4e4f9830
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/4e4f9830

Branch: refs/heads/master
Commit: 4e4f9830a0ac0551d1af6849f0a522a13b54ac98
Parents: 3c6863c
Author: Justin Mclean <jm...@apache.org>
Authored: Thu Aug 28 10:56:25 2014 +1000
Committer: Justin Mclean <jm...@apache.org>
Committed: Thu Aug 28 10:56:25 2014 +1000

----------------------------------------------------------------------
 .../com/adobe/linguistics/utils/ITokenizer.as   |   76 --
 .../adobe/linguistics/utils/TextTokenizer.as    |  393 ------
 .../src/com/adobe/linguistics/utils/Token.as    |   94 --
 .../linguistics/spelling/HunspellDictionary.as  |  205 ----
 .../adobe/linguistics/spelling/ISpellChecker.as |   62 -
 .../linguistics/spelling/ISpellingDictionary.as |   45 -
 .../adobe/linguistics/spelling/SpellChecker.as  |  387 ------
 .../linguistics/spelling/UserDictionary.as      |  113 --
 .../spelling/UserDictionaryInternal.as          |  115 --
 .../spelling/core/DictionaryManager.as          |   73 --
 .../linguistics/spelling/core/HashEntry.as      |  108 --
 .../linguistics/spelling/core/LinguisticRule.as | 1118 ------------------
 .../linguistics/spelling/core/SpellingInfo.as   |   32 -
 .../spelling/core/SquigglyDictionary.as         |  207 ----
 .../linguistics/spelling/core/SquigglyEngine.as |  426 -------
 .../spelling/core/SuggestionManager.as          | 1026 ----------------
 .../spelling/core/UserDictionaryEngine.as       |   71 --
 .../spelling/core/container/Collection.as       |   89 --
 .../spelling/core/container/Enumeration.as      |   28 -
 .../spelling/core/container/HashTable.as        |  179 ---
 .../linguistics/spelling/core/container/Heap.as |  263 ----
 .../spelling/core/container/Iterator.as         |   64 -
 .../linguistics/spelling/core/container/Set.as  |  195 ---
 .../spelling/core/container/SparseHashTable.as  |  283 -----
 .../spelling/core/env/ExternalConstants.as      |   47 -
 .../spelling/core/env/InternalConstants.as      |   87 --
 .../spelling/core/error/ContentError.as         |   39 -
 .../spelling/core/error/ErrorTable.as           |   41 -
 .../spelling/core/logging/AbstractTarget.as     |  167 ---
 .../spelling/core/logging/ILogger.as            |   40 -
 .../spelling/core/logging/ILoggingTarget.as     |   39 -
 .../linguistics/spelling/core/logging/Log.as    |  210 ----
 .../spelling/core/logging/LogEvent.as           |   87 --
 .../spelling/core/logging/LogEventLevel.as      |   76 --
 .../spelling/core/logging/LogLogger.as          |  102 --
 .../core/logging/targets/ArrayTarget.as         |   35 -
 .../core/logging/targets/CollectionTarget.as    |  107 --
 .../core/logging/targets/LineFormattedTarget.as |  104 --
 .../core/logging/targets/TextFieldTarget.as     |   52 -
 .../core/logging/targets/TraceTarget.as         |   37 -
 .../spelling/core/rule/AffixEntry.as            |  137 ---
 .../linguistics/spelling/core/rule/AffixRule.as |   92 --
 .../linguistics/spelling/core/rule/MapFilter.as |   39 -
 .../spelling/core/rule/OptimizedPrefixEntry.as  |  245 ----
 .../spelling/core/rule/OptimizedSuffixEntry.as  |  301 -----
 .../spelling/core/rule/PrefixEntry.as           |  102 --
 .../spelling/core/rule/ReplacementFilter.as     |   34 -
 .../spelling/core/rule/SimpleFilter.as          |   48 -
 .../spelling/core/rule/SuffixEntry.as           |  126 --
 .../spelling/core/utils/DictionaryLoader.as     |   94 --
 .../spelling/core/utils/LinguisticRuleLoader.as |  977 ---------------
 .../spelling/core/utils/MathUtils.as            |   66 --
 .../spelling/core/utils/RefObject.as            |   36 -
 .../spelling/core/utils/SimpleNumberParser.as   |   54 -
 .../core/utils/SquigglyDictionaryLoader.as      |  369 ------
 .../spelling/core/utils/StringUtils.as          |  333 ------
 .../spelling/core/utils/SuggestionsResult.as    |  142 ---
 .../adobe/linguistics/spelling/utils/Token.as   |   47 -
 .../linguistics/spelling/utils/Tokenizer.as     |   96 --
 .../linguistics/spelling/utils/WordList.as      |  120 --
 .../main/AdobeSpellingFramework/asdocgen.bat    |   18 -
 .../spelling/framework/ResourceTable.as         |  134 ---
 .../spelling/framework/SpellingConfiguration.as |  102 --
 .../spelling/framework/SpellingService.as       |  241 ----
 .../spelling/framework/ui/HaloHighlighter.as    |  124 --
 .../spelling/framework/ui/HaloWordProcessor.as  |  111 --
 .../spelling/framework/ui/IHighlighter.as       |   34 -
 .../spelling/framework/ui/IWordProcessor.as     |   30 -
 .../spelling/framework/ui/SparkHighlighter.as   |  225 ----
 .../spelling/framework/ui/SparkWordProcessor.as |  132 ---
 .../framework/ui/SpellingHighlighter.as         |  179 ---
 .../spelling/framework/ui/TLFHighlighter.as     |  248 ----
 .../spelling/framework/ui/TLFWordProcessor.as   |  156 ---
 .../com/adobe/linguistics/spelling/SpellUI.as   |  562 ---------
 .../linguistics/spelling/SpellingContextMenu.as |  243 ----
 .../linguistics/spelling/ui/HaloHighlighter.as  |  126 --
 .../spelling/ui/HaloWordProcessor.as            |  112 --
 .../linguistics/spelling/ui/IHighlighter.as     |   67 --
 .../linguistics/spelling/ui/IWordProcessor.as   |   30 -
 .../linguistics/spelling/ui/SparkHighlighter.as |  229 ----
 .../spelling/ui/SparkWordProcessor.as           |  133 ---
 .../spelling/ui/SpellingHighlighter.as          |  196 ---
 .../linguistics/spelling/ui/TLFHighlighter.as   |  252 ----
 .../linguistics/spelling/ui/TLFWordProcessor.as |  159 ---
 .../linguistics/spelling/ui/HaloHighlighter.as  |   87 --
 .../spelling/ui/HaloWordProcessor.as            |  109 --
 .../linguistics/spelling/ui/IHighlighter.as     |   34 -
 .../linguistics/spelling/ui/IWordProcessor.as   |   30 -
 .../linguistics/spelling/ui/SparkHighlighter.as |  190 ---
 .../spelling/ui/SparkWordProcessor.as           |  104 --
 .../spelling/ui/SpellingHighlighter.as          |  179 ---
 .../com/adobe/linguistics/spelling/SpellUI.as   |  577 ---------
 .../linguistics/spelling/SpellingContextMenu.as |  243 ----
 .../adobe/linguistics/spelling/SpellUIForTLF.as |  522 --------
 .../spelling/SpellingContextMenuForTLF.as       |  249 ----
 .../SquigglyCustomContainerController.as        |  258 ----
 .../com/adobe/linguistics/utils/ITokenizer.as   |   76 ++
 .../adobe/linguistics/utils/TextTokenizer.as    |  393 ++++++
 .../src/com/adobe/linguistics/utils/Token.as    |   94 ++
 .../linguistics/spelling/HunspellDictionary.as  |  205 ++++
 .../adobe/linguistics/spelling/ISpellChecker.as |   62 +
 .../linguistics/spelling/ISpellingDictionary.as |   45 +
 .../adobe/linguistics/spelling/SpellChecker.as  |  387 ++++++
 .../linguistics/spelling/UserDictionary.as      |  113 ++
 .../spelling/UserDictionaryInternal.as          |  115 ++
 .../spelling/core/DictionaryManager.as          |   73 ++
 .../linguistics/spelling/core/HashEntry.as      |  108 ++
 .../linguistics/spelling/core/LinguisticRule.as | 1118 ++++++++++++++++++
 .../linguistics/spelling/core/SpellingInfo.as   |   32 +
 .../spelling/core/SquigglyDictionary.as         |  207 ++++
 .../linguistics/spelling/core/SquigglyEngine.as |  426 +++++++
 .../spelling/core/SuggestionManager.as          | 1026 ++++++++++++++++
 .../spelling/core/UserDictionaryEngine.as       |   71 ++
 .../spelling/core/container/Collection.as       |   89 ++
 .../spelling/core/container/Enumeration.as      |   28 +
 .../spelling/core/container/HashTable.as        |  179 +++
 .../linguistics/spelling/core/container/Heap.as |  263 ++++
 .../spelling/core/container/Iterator.as         |   64 +
 .../linguistics/spelling/core/container/Set.as  |  195 +++
 .../spelling/core/container/SparseHashTable.as  |  283 +++++
 .../spelling/core/env/ExternalConstants.as      |   47 +
 .../spelling/core/env/InternalConstants.as      |   87 ++
 .../spelling/core/error/ContentError.as         |   39 +
 .../spelling/core/error/ErrorTable.as           |   41 +
 .../spelling/core/logging/AbstractTarget.as     |  167 +++
 .../spelling/core/logging/ILogger.as            |   40 +
 .../spelling/core/logging/ILoggingTarget.as     |   39 +
 .../linguistics/spelling/core/logging/Log.as    |  210 ++++
 .../spelling/core/logging/LogEvent.as           |   87 ++
 .../spelling/core/logging/LogEventLevel.as      |   76 ++
 .../spelling/core/logging/LogLogger.as          |  102 ++
 .../core/logging/targets/ArrayTarget.as         |   35 +
 .../core/logging/targets/CollectionTarget.as    |  107 ++
 .../core/logging/targets/LineFormattedTarget.as |  104 ++
 .../core/logging/targets/TextFieldTarget.as     |   52 +
 .../core/logging/targets/TraceTarget.as         |   37 +
 .../spelling/core/rule/AffixEntry.as            |  137 +++
 .../linguistics/spelling/core/rule/AffixRule.as |   92 ++
 .../linguistics/spelling/core/rule/MapFilter.as |   39 +
 .../spelling/core/rule/OptimizedPrefixEntry.as  |  245 ++++
 .../spelling/core/rule/OptimizedSuffixEntry.as  |  301 +++++
 .../spelling/core/rule/PrefixEntry.as           |  102 ++
 .../spelling/core/rule/ReplacementFilter.as     |   34 +
 .../spelling/core/rule/SimpleFilter.as          |   48 +
 .../spelling/core/rule/SuffixEntry.as           |  126 ++
 .../spelling/core/utils/DictionaryLoader.as     |   94 ++
 .../spelling/core/utils/LinguisticRuleLoader.as |  977 +++++++++++++++
 .../spelling/core/utils/MathUtils.as            |   66 ++
 .../spelling/core/utils/RefObject.as            |   36 +
 .../spelling/core/utils/SimpleNumberParser.as   |   54 +
 .../core/utils/SquigglyDictionaryLoader.as      |  369 ++++++
 .../spelling/core/utils/StringUtils.as          |  333 ++++++
 .../spelling/core/utils/SuggestionsResult.as    |  142 +++
 .../adobe/linguistics/spelling/utils/Token.as   |   47 +
 .../linguistics/spelling/utils/Tokenizer.as     |   96 ++
 .../linguistics/spelling/utils/WordList.as      |  120 ++
 Squiggly/main/SpellingFramework/asdocgen.bat    |   18 +
 .../spelling/framework/ResourceTable.as         |  134 +++
 .../spelling/framework/SpellingConfiguration.as |  102 ++
 .../spelling/framework/SpellingService.as       |  241 ++++
 .../spelling/framework/ui/HaloHighlighter.as    |  124 ++
 .../spelling/framework/ui/HaloWordProcessor.as  |  111 ++
 .../spelling/framework/ui/IHighlighter.as       |   34 +
 .../spelling/framework/ui/IWordProcessor.as     |   30 +
 .../spelling/framework/ui/SparkHighlighter.as   |  225 ++++
 .../spelling/framework/ui/SparkWordProcessor.as |  132 +++
 .../framework/ui/SpellingHighlighter.as         |  179 +++
 .../spelling/framework/ui/TLFHighlighter.as     |  248 ++++
 .../spelling/framework/ui/TLFWordProcessor.as   |  156 +++
 .../com/adobe/linguistics/spelling/SpellUI.as   |  562 +++++++++
 .../linguistics/spelling/SpellingContextMenu.as |  243 ++++
 .../linguistics/spelling/ui/HaloHighlighter.as  |  126 ++
 .../spelling/ui/HaloWordProcessor.as            |  112 ++
 .../linguistics/spelling/ui/IHighlighter.as     |   67 ++
 .../linguistics/spelling/ui/IWordProcessor.as   |   30 +
 .../linguistics/spelling/ui/SparkHighlighter.as |  229 ++++
 .../spelling/ui/SparkWordProcessor.as           |  133 +++
 .../spelling/ui/SpellingHighlighter.as          |  196 +++
 .../linguistics/spelling/ui/TLFHighlighter.as   |  252 ++++
 .../linguistics/spelling/ui/TLFWordProcessor.as |  159 +++
 .../linguistics/spelling/ui/HaloHighlighter.as  |   87 ++
 .../spelling/ui/HaloWordProcessor.as            |  109 ++
 .../linguistics/spelling/ui/IHighlighter.as     |   34 +
 .../linguistics/spelling/ui/IWordProcessor.as   |   30 +
 .../linguistics/spelling/ui/SparkHighlighter.as |  190 +++
 .../spelling/ui/SparkWordProcessor.as           |  104 ++
 .../spelling/ui/SpellingHighlighter.as          |  179 +++
 .../com/adobe/linguistics/spelling/SpellUI.as   |  577 +++++++++
 .../linguistics/spelling/SpellingContextMenu.as |  243 ++++
 .../adobe/linguistics/spelling/SpellUIForTLF.as |  522 ++++++++
 .../spelling/SpellingContextMenuForTLF.as       |  249 ++++
 .../SquigglyCustomContainerController.as        |  258 ++++
 192 files changed, 16805 insertions(+), 16805 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeLinguisticUtils/src/com/adobe/linguistics/utils/ITokenizer.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeLinguisticUtils/src/com/adobe/linguistics/utils/ITokenizer.as b/Squiggly/main/AdobeLinguisticUtils/src/com/adobe/linguistics/utils/ITokenizer.as
deleted file mode 100644
index e40772d..0000000
--- a/Squiggly/main/AdobeLinguisticUtils/src/com/adobe/linguistics/utils/ITokenizer.as
+++ /dev/null
@@ -1,76 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-
-
-
-package com.adobe.linguistics.utils
-{
-	/**
-	 * The <code>ITokenizer</code> Interface.
-	 * This interface defines default methods which will be used for Adobe Linguistic Service.
-	 * Be independent from any UI component or be able to adapt to a given UI component. 
-	 * Provide or define standardized way so that third-party can switch to their tokenizer.
-	 * Be able to use for any given language either by some kind of language specific handling or by some kind of unified logic for any given language.
-	 * More sophisticated implementations can be done for particular locales or environments in an application by implementing this interface.
-
-	 * @playerversion Flash 10
-	 * @langversion 3.0
-	 */
-	public interface ITokenizer
-	{
-		
-		/**
-		 * Return the first word in the text being scanned. 
-		 * 
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */		
-		function getFirstToken():Token;
-		
-		/**
-		 * Return the last word in the text being scanned. 
-		 * 
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */		
-		function getLastToken():Token;
-		
-		/**
-		 * Determine the next word following the current token.  
-		 * 
-		 * Return the token of the next word or <code>lastToken</code> object if all word have been returned.
-		 * @param token A <code>Token</code> object to be used for determining next word.
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */		
-		function getNextToken(token:Token):Token;
-		
-		/**
-		 * Determine the previous word preceding the current token.  
-		 * 
-		 * Return the token of the previous word or <code>firstToken</code> object if all word have been returned.
-		 * @param token A <code>Token</code> object to be used for determining previous word.
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */		
-		function getPreviousToken(token:Token):Token;
-
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeLinguisticUtils/src/com/adobe/linguistics/utils/TextTokenizer.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeLinguisticUtils/src/com/adobe/linguistics/utils/TextTokenizer.as b/Squiggly/main/AdobeLinguisticUtils/src/com/adobe/linguistics/utils/TextTokenizer.as
deleted file mode 100644
index 596481c..0000000
--- a/Squiggly/main/AdobeLinguisticUtils/src/com/adobe/linguistics/utils/TextTokenizer.as
+++ /dev/null
@@ -1,393 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-
-package com.adobe.linguistics.utils
-{
-	import __AS3__.vec.Vector;
-	
-	import flash.utils.Dictionary;
-	
-    import flash.text.engine.TextBlock;
-    import flash.text.engine.TextElement;
-    import flash.text.engine.ElementFormat;
-
-		
-	/**
-	 * <p>The <code>TextTokenizer</code> class locates the boundaries of words in a 
-	 * block of text.</p>
-	 * 
-	 * Word boundary locations are found according to these general principles:
-	 * <ul>
-	 * 		<li> Be able to tokenize a block of text specified by start and end positions </li> 
-	 * 		<li> Default separator is Unicode white space character. Also break on newlines </li> 
-	 * 		<li> Tokens consist of either words or numbers in which case it may include commas, etc.. </li> 
-	 * 		<li> Apostrophes or hyphens within a word are kept with the word </li> 
-	 * 		<li> Punctuation, spaces and other characters that are not part of a token, are broken out separately </li> 
-	 * </ul>
-	 * <p>In the future versions, this class would also provide a way for the developers to customize the separators used by the tokenizer. </p>
-	 * 
-	 * @playerversion Flash 9.x
- 	 * @langversion 3.0
-	*/
-	public class TextTokenizer implements ITokenizer
-	{
-		
-
-		private var _textBlock:TextBlock;
-		private var _textHolder:String;
-		private var _startIndex:int;
-		private var _endIndex:int;
-		private var _firstToken:Token;
-		private var _lastToken:Token;
-		
-		private var _ignoredCharactersDict:Dictionary = new Dictionary();
-
-
-		/**
-		 * The tokenizer for a String object.
-		 * This class implements the ITokenizer interface.
-		 * Constructs a new TextTokenizer object to break String to words by creating with a new piece of text. 
-		 * @param textHolder A <code>String</code> object to hold the text which will be processed by this tokenizer.
-		 * @param startIndex A <code>int</code> type input to hold the starting index of input text should be scanned.
-		 * @param endIndex A <code>int</code> type input to hold the ending index of input text should be scanned.
-		 * <span class="hide"> TODO param requestedLocaleIDName The LocaleID name to be used by this TextTokenizer object. </span>
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */
-		public function TextTokenizer(textHolder:String, startIndex:int=0, endIndex:int=int.MAX_VALUE)//, requestedLocaleIDName:String=null)
-		{
-			//requestedLocaleIDName parameter is useful for potential extension. won't handle it in the first round of implementation.
-			//  same comments for API: requestedLocaleIDName()/actualLocaleIDName()/getAvailableLocaleIDNames()
-            var textElement:TextElement = new TextElement(textHolder, new ElementFormat()); 
-            var textBlock:TextBlock = new TextBlock();
-            textBlock.content = textElement; 
-			
-			/* init a tokenizer object */
-			this._textBlock = textBlock;
-			this._textHolder = textHolder;
-			this._startIndex =  0;
-			this._endIndex = this._textBlock.content.text.length;
-			initDefaultIgnoredCharacters();
-			setStartIndex(startIndex);
-			setEndIndex(endIndex);
-			
-		}
-		
-		private function setStartIndex(value:int):void {
-			if ( value <= 0 ) 
-				this._startIndex = 0;
-			else if ( value >= this._endIndex ) 
-				this._startIndex = this._endIndex;
-			else
-				this._startIndex=value;
-		}
-		
-		// strange behaviour with String.substring() function... need more thinking....
-		private function setEndIndex(value:int):void {
-			if ( value >= this._textBlock.content.text.length ) 
-				this._endIndex = this._textBlock.content.text.length;
-			else if ( value <= this._startIndex ) 
-				this._endIndex = this._startIndex;
-			else
-				this._endIndex = value;
-		}
-
-		private function initDefaultIgnoredCharacters():void {
-			var ignoredCharsArray:Array = [
-				0x002d,
-				0x2010
-			];
-			var ignoredChars:String = "";
-			for ( var i:int=0; i< ignoredCharsArray.length; ++i ) {
-				ignoredChars=ignoredChars+String.fromCharCode(ignoredCharsArray[i]);
-			}
-			this.ignoredCharacters = ignoredChars;
-		}
-
-		private function getNextTokenByIndex( startPos:int ):Token{
-			var resultToken:Token = null;
-			/* calculate first token and return it. */
-			var i:int = (startPos > this._startIndex) ? startPos: this._startIndex;
-			while ( i< this._endIndex ) {
-				var begin:int = i;
-				i = this._textBlock.findNextWordBoundary(begin);
-				var end:int = ( i <= this._endIndex) ? i : this._endIndex;
-				if ( !isSingleSpecialCharacter( this._textHolder.substring(begin,end) ) ) {
-					resultToken = new Token(begin,end);
-					break;				
-				}
-			}
-			if ( resultToken==null ) resultToken = this.getLastToken();
-			return resultToken;
-		}
-		
-		private function getPreviousTokenByIndex( endPos:int):Token {
-			var resultToken:Token = null;
-			/* calculate first token and return it. */
-			var i:int = (endPos < this._endIndex) ? endPos: this._endIndex;
-			
-			/* special handling for last element in the word, bof */
-			var specialHandling:Boolean = false;
-			if ( i == this._endIndex ) {
-				specialHandling = true;
-				i = this._endIndex -1;
-			}
-			/* special handling for last element in the word, eof */
-			
-			while ( i > this._startIndex ) {
-				var end:int = i;
-				i = this._textBlock.findPreviousWordBoundary(end);
-				var begin:int = ( i > this._startIndex) ? i : this._startIndex;
-				
-				/* special handling for last element in the word, bof */
-				if ( specialHandling ) {
-					end = (this._textBlock.findNextWordBoundary(begin)<this._endIndex) ?this._textBlock.findNextWordBoundary(begin):this._endIndex;
-					specialHandling=false;
-					if ( (end != this._endIndex) && !isSingleSpecialCharacter(this._textHolder.substring(this._endIndex-1,this._endIndex)) ) {
-						begin = this._endIndex-1;
-						i=begin;
-						end = this._endIndex;
-					} 
-				}
-				/* special handling for last element in the word, eof */
-				
-				if ( !isSingleSpecialCharacter( this._textHolder.substring(begin,end) ) ) {
-					resultToken = new Token(begin,end);
-					break;	
-				}
-			}
-			if ( resultToken==null ) resultToken = this.getFirstToken();
-			return resultToken;
-		}
-		
-		private function isExceptionCharacter(word:String):Boolean {
-			if ( word.length != 1 ) return false;
-			if ( this._ignoredCharactersDict[word] == true ) return true;
-			return false;
-		}
-		
-		private function getNextFilteredTokenByIndex(startPos:int):Token {
-			var token:Token = getNextTokenByIndex(startPos);
-			var firstToken:Token = token;
-			var cursor:int=token.last+1;
-			
-			while ( (cursor < this._endIndex) ) {
-				if ( !isExceptionCharacter(this._textHolder.substring(cursor-1,cursor)) ) {
-					break;
-				}else {
-					//another request from Harish about handling case abc\\abc abc\.abc case...not 100% sure about the correct behavior...
-					/*bof*/
-					while( cursor < this._endIndex && isExceptionCharacter(this._textHolder.substring(cursor-1,cursor)) ) {
-						cursor++;
-					}
-					cursor--;
-					/*eof*/
-				}
-				token = getNextTokenByIndex(cursor);
-				if ( token.first != cursor ) {
-					token = firstToken;
-					break;
-				}
-				token.first=firstToken.first;
-				firstToken = token;
-				cursor = token.last+1;
-			} 
-			return token;
-		}
-
-		private function getPreviousFilteredTokenByIndex(endPos:int):Token {
-			var token:Token = getPreviousTokenByIndex(endPos);
-			var lastToken:Token = token;
-			var cursor:int=token.first-1;
-			
-			while ( ( cursor > this._startIndex ) ) {
-				if ( !isExceptionCharacter(this._textHolder.substring(cursor,cursor+1)) ) {
-					break;
-				}else {
-					//another request from Harish about handling case abc\\abc abc\.abc case...not 100% sure about the correct behavior...
-					/*bof*/
-					while( cursor > this._startIndex && isExceptionCharacter(this._textHolder.substring(cursor,cursor+1)) ) {
-						cursor--;
-					}
-					cursor++;
-					/*eof*/
-				}
-				token = getPreviousTokenByIndex(cursor);
-				if ( token.last != cursor ) {
-					token = lastToken;
-					break;
-				}
-				token.last=lastToken.last;
-				lastToken = token;
-				cursor = token.first-1;
-			} 
-			return token;
-		}
-
-		private function isSingleSpecialCharacter(word:String):Boolean{
-			if ( word.length != 1 ) return false;
-			if ( word.toLocaleLowerCase() == word.toLocaleUpperCase() ) return true;
-			return false;
-		}
-		
-		/** 
-		 * Set all of ignored separators to this tokenizer class.
-		 * 
-		 * A vector of int containing all of ignored separators code point which are used by this class. 
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */		
-		public function set ignoredSeparators(characters:Vector.<int>):void {
-			if ( characters == null || characters.length==0 ) return;
-			this._ignoredCharactersDict = new Dictionary();
-			for ( var i:int =0;i<characters.length;++i) {
-				this._ignoredCharactersDict[String.fromCharCode(characters[i])]=true;
-			}
-		}
-		
-		/**
-		 * Get all of ignored separators used by this tokenizer class.
-		 * 
-		 * A vector of int containing all of ignored separators code point which are used by this class. 
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */		
-		public function get ignoredSeparators():Vector.<int>{
-			var result:Vector.<int> = new Vector.<int>();
-			for ( var key:String in _ignoredCharactersDict) {
-				result.push(key.charCodeAt(0) );
-			}
-			return result;
-			
-		}
-		
-		private function set ignoredCharacters(value:String ) :void {
-			if( value == null || value == "" ) return;
-			var charArr:Array = value.split("");
-			this._ignoredCharactersDict = new Dictionary();
-			for ( var i:int = 0;i< charArr.length;++i) {
-				this._ignoredCharactersDict[charArr[i]]=true;
-			}
-		}
-		
-		private function get ignoredCharacters():String {
-			var result:String = "";
-			for ( var key:String in _ignoredCharactersDict) {
-				result +=key;
-			}
-			return result;
-		}
-		
-		/**
-		 * The name of the requested locale ID that was passed to the constructor of this TextTokenizer object. 
-		 * 
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */	/*	
-		public function get requestedLocaleIDName():String {
-			return null;
-		}
-		
-		
-		/**
-		 * The name of the actual locale ID used by this TextTokenizer object. 
-		 * 
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */	/*	
-		public function get actualLocaleIDName():String {
-			return null;
-		}
-		
-		/**
-		 * Lists all of the locale ID names supported by this class.
-		 * 
-		 * A vector of strings containing all of the locale ID names supported by this class. 
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */		/*
-		public static function getAvailableLocaleIDNames():Vector.<String>{ return null;}
-*/
-		/**
-		 * Return the first word in the text being scanned. 
-		 * <p> NOTE: In a special case when there are no valid tokens in text, it returns a pseudo token having first and last index set to int.MAX_VALUE. As a result<code> firstToken().first </code>equals int.MAX_VALUE and<code> firstToken().last </code>equals int.MAX_VALUE.</p>
-		 * 
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */		
-		public function getFirstToken():Token {
-			
-			/* return the cached one. */
-			if ( this._firstToken != null )
-				return this._firstToken;
-			
-			/* calculate first token and return it. */
-			//this._firstToken = getNextTokenByIndex(this._startIndex); // without any filter from LS, directly use FTE tokenizer...
-			this._firstToken = getNextFilteredTokenByIndex(this._startIndex);
-
-			return this._firstToken;
-		}
-		
-		/**
-		 * @private
-		 * Return the last word in the text being scanned. 
-		 * 
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */		
-		public function getLastToken():Token {
-			/* return the cached one. */
-			if ( this._lastToken != null )
-				return this._lastToken;
-				
-			/* calculate last token and return it. */
-			this._lastToken = new Token(int.MAX_VALUE,int.MAX_VALUE);
-			return this._lastToken;
-		}
-		
-		/**
-		 * Determine the next word following the current token.  
-		 * 
-		 * <p>Returns the token of the next word.</p><p> NOTE: When there are no more valid tokens, it returns a pseudo token having first and last index set to int.MAX_VALUE. As a result<code> getNextToken().first </code>equals int.MAX_VALUE and<code> getNextToken().last </code>equals int.MAX_VALUE.</p>
-		 * @param token A <code>Token</code> object to be used for determining next word.
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */		
-		public function getNextToken(token:Token):Token {
-			//return getNextTokenByIndex(token.last); // without any filter from LS, directly use FTE tokenizer...
-			return getNextFilteredTokenByIndex(token.last);
-		}
-		
-		/**
-		 * Determine the word preceding the current token.  
-		 * 
-		 * <p>Returns the token of the previous word or<code> getFirstToken </code>object if there is no preceding word.</p>
-		 * @param token A <code>Token</code> object to be used for determining previous word.
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */		
-		public function getPreviousToken(token:Token):Token {
-			//return getPreviousTokenByIndex( token.first );// without any filter from LS, directly use FTE tokenizer...
-			return getPreviousFilteredTokenByIndex( token.first )
-		}
-
-	}
-	
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeLinguisticUtils/src/com/adobe/linguistics/utils/Token.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeLinguisticUtils/src/com/adobe/linguistics/utils/Token.as b/Squiggly/main/AdobeLinguisticUtils/src/com/adobe/linguistics/utils/Token.as
deleted file mode 100644
index 27fcfb2..0000000
--- a/Squiggly/main/AdobeLinguisticUtils/src/com/adobe/linguistics/utils/Token.as
+++ /dev/null
@@ -1,94 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-
-
-
-package com.adobe.linguistics.utils
-{
-	/**
-	 * A Token is an occurrence of a word in a block of text. It consists of the start and end offset of the word in the block of text.
-	 * The start and end offsets permit applications to re-associate a token with its source text, e.g., to display highlighted misspelled word in 
-	 * a block of text.
-	 * @playerversion Flash 10
-	 * @langversion 3.0
-	 */
-	public class Token
-	{
-		private var _first:uint;
-		private var _last:uint;
-		
-		/**
-		 * The Token class.
-		 * Constructs a Token with first and last offsets. . 
-		 * @param first A <code>int</code> type input to point start offset in the source text.
-		 * @param last A <code>int</code> type input to point end offset in the source text.
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */
-		public function Token(inFirst:int, inLast:int)
-		{
-			_first = inFirst;
-			_last = inLast;
-
-		}
-		
-		/**
-		 * Set the start offset in the source text. 
-		 * 
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */		
-		public function set first(value:int):void {
-			_first=value;
-		}
-		
-		/**
-		 * Return the start offset in the source text. 
-		 * 
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */		
-		public function get first():int
-		{
-			return _first;
-		}
-		
-		/**
-		 * Set the end offset in the source text. 
-		 * 
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */		
-		public function set last(value:int):void {
-			_last = value;
-		}
-		
-		/**
-		 * Return the end offset in the source text. 
-		 * 
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */		
-		public function get last():int
-		{
-			return _last;
-		}
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/HunspellDictionary.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/HunspellDictionary.as b/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/HunspellDictionary.as
deleted file mode 100644
index 7ec0312..0000000
--- a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/HunspellDictionary.as
+++ /dev/null
@@ -1,205 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-
-package com.adobe.linguistics.spelling
-{
-	import com.adobe.linguistics.spelling.core.LinguisticRule;
-	import com.adobe.linguistics.spelling.core.SquigglyDictionary;
-	import com.adobe.linguistics.spelling.core.utils.LinguisticRuleLoader;
-	import com.adobe.linguistics.spelling.core.utils.SquigglyDictionaryLoader;
-	
-	import flash.errors.IllegalOperationError;
-	import flash.events.ErrorEvent;
-	import flash.events.Event;
-	import flash.events.EventDispatcher;
-	import flash.events.IOErrorEvent;
-	import flash.events.SecurityErrorEvent;
-
-	/**
-	 *
-	 * This class enables creation and loading of spelling metadata including rules and dictionary data
-	 *
-	 * @playerversion Flash 10
-	 * @langversion 3.0
-	 * @includeExample Examples/Air/CheckWord/src/CheckWord.mxml -noswf
-	 */
-	 
-	public final class HunspellDictionary extends EventDispatcher implements ISpellingDictionary
-	{
-		private var _dict:SquigglyDictionary;
-		private var _attrMgr:LinguisticRule;
-		private var _rulePath:String;
-		private var _dictionaryPath:String;
-		
-		private var ruleLoader:LinguisticRuleLoader = new LinguisticRuleLoader();
-		private var dictLoader:SquigglyDictionaryLoader = new SquigglyDictionaryLoader();
-
-		private var _loaded:Boolean;
-		
-		//adding vars for loading dictionaries in parts
-		private var _enableDictionarySplit:Boolean;
-		private var _wordsPerDictionarySplit:int;
-
-		/**
-		 * Constructs a new <code>HunspellDictionary</code> which can later be used by a <code>SpellChecker</code> object.
-		 *
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */
-		public function HunspellDictionary()
-		{
-			_attrMgr = null;
-			_dict = null;
-			_rulePath = null ;
-			_dictionaryPath = null;
-			_loaded = false;
-			//giving default values in case user does not want to specify these
-			_enableDictionarySplit =false;
-			_wordsPerDictionarySplit= 20000;
-
-		}
-
-		/**
-			@private
-			(This property is for Squiggly Developer use only.)
-		*/
-		public function get linguisticRule():LinguisticRule {
-			return _attrMgr;
-		}
-		
-		/**
-			@private
-			(This property is for Squiggly Developer use only.)
-		*/
-		public function get squigglyDictionary():SquigglyDictionary {
-			return  _dict;
-		}
-		
-		/**
-		 * Loads a Hunspell dictionary and corresponding rules files as specified by the <code>dictionaryURL</code> and the <code>rulesURL</code>.
-		 *
-		 * <p>The actual loading is done asynchronously and
-		 *	the <code>HunspellDictionary</code> object will dispatch an <code>Event.COMPLETE</code> event.
-		 *	When an error condition occurs, it will dispatch an <code>IOErrorEvent.IO_ERROR</code> event.</p>
-		 * @param rulesURL The URL of rule file to be loaded.
-		 * @param dictionaryURL The URL of Dictionary file to be loaded.
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 * @example The following code shows how load API is called to load a Rule and Dictionary file to create a HunspellDictionay.
-		 * <listing version="3.0">
-		 * private var _newdict:HunspellDictionary = new HunspellDictionary();
-		 * _newdict.load("dictionaries/en_US/en_US.aff", "dictionaries/en_US/en_US.dic");
-		 * </listing>
-		 */
-		public function load(rulesURL:String, dictionaryURL:String):void {
-			if ( rulesURL == null || dictionaryURL == null ) {
-				throw new IllegalOperationError("load function did not receive two valid URLs.");
-			}
-			_rulePath = rulesURL;
-			_dictionaryPath = dictionaryURL;
-			
-			ruleLoader.addEventListener(Event.COMPLETE,loadRuleComplete);
-			ruleLoader.addEventListener(IOErrorEvent.IO_ERROR,handleError);
-			ruleLoader.addEventListener(SecurityErrorEvent.SECURITY_ERROR,handleError);
-			ruleLoader.load( _rulePath);
-			
-		}
-
-		/**
-		 * A flag that indicates if the dictionary has finished loading.
-		 * 
-		 * @return <code>true</code> if loading is completed. <code>false</code> if loading has not completed.
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */
-		public function get loaded():Boolean
-		{
-			return _loaded;
-		}
-
-		
-		// Private method to dispatch complete Event.
-		private function loadRuleComplete(evt:Event):void {
-			_attrMgr = ruleLoader.linguisticRule;
-			
-			dictLoader.linguisticRule = _attrMgr;
-			dictLoader.addEventListener(Event.COMPLETE,loadDictionaryComplete);
-			dictLoader.addEventListener(IOErrorEvent.IO_ERROR,handleError);
-			dictLoader.addEventListener(SecurityErrorEvent.SECURITY_ERROR,handleError);
-			dictLoader.load(_dictionaryPath, _enableDictionarySplit, _wordsPerDictionarySplit);
-		}
-
-		// Private method to dispatch complete Event.
-		private function loadDictionaryComplete(evt:Event):void {
-			_dict = dictLoader.squigglyDictionary;
-			_loaded = true;
-			dispatchEvent(new Event(Event.COMPLETE));
-		}
-		
-		//Private method to dispatch an error event.
-		private function handleError(evt:Event):void {
-			bounceEvent(evt);
-		}
-		
-		private function bounceEvent(evt:Event):void {
-			dispatchEvent(evt.clone());
-		}
-		
-		/**
-		 * This is a flag that enables/disables loading of dictionary in splits.
-		 * By default this flag is set to <code>false</code>. In case the initial loading time of dictionaries is found slow, this flag should be set to <code>true</code>. By enabling this, squiggly will load dictionary in splits with each split having <code>wordsPerDictionarySplit</code> number of words.
-		 * <p>NOTE: This property, if used, should be set before calling <code>HunspellDictionary.load</code>. Once <code>HunspellDictionary.load</code> is called dictionaries will be loaded according to default values, and this property will not be used. </p>
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */
-		public function get enableDictionarySplit():Boolean
-		{
-			return _enableDictionarySplit;	
-		}
-		
-		public function set enableDictionarySplit(enableDictionarySplit:Boolean):void
-		{
-			_enableDictionarySplit = enableDictionarySplit;
-		}
-		
-		/**
-		 * This property defines the number of words in one dictionary split.
-		 * By default the value of this property is set to 20000 words. This property is used only if <code>enableDictionarySplit</code> is set to <code>true</code>. If <code>enableDictionarySplit</code> is set to <code>flase</code> this property turns void.
-		 * <p>NOTE: This property, if used, should be defined before calling <code>HunspellDictionary.load</code>. Once <code>HunspellDictionary.load</code> is called dictionaries will be loaded according to default values, and this property will not be used. </p>
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */
-		public function get wordsPerDictionarySplit():int
-		{
-			
-			return _wordsPerDictionarySplit;	
-		}
-		
-		public function set wordsPerDictionarySplit(wordsPerDictionarySplit:int):void
-		{
-			if(wordsPerDictionarySplit<=0){
-				//Do error Handling
-				throw new IllegalOperationError("wordsPerDictionarySplit should be a positive non-zero value.");
-			}
-			_wordsPerDictionarySplit = wordsPerDictionarySplit;
-		}
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/ISpellChecker.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/ISpellChecker.as b/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/ISpellChecker.as
deleted file mode 100644
index 34917bd..0000000
--- a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/ISpellChecker.as
+++ /dev/null
@@ -1,62 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-package com.adobe.linguistics.spelling
-{
-	/**
-	 * Interface for actual SpellChecker class implementations
-	 *
-	 * <p>If a new SpellChecker class is created, it must implement the methods and properties defined by this interface.
-	 * The <code>SpellChecker</code> class implements this interface.</p>
-	 * 
-	 * @playerversion Flash 10
-	 * @langversion 3.0
-	 */
-	public interface ISpellChecker
-	{	
-		/**
-		 * Spellchecks a word.
-		 * 
-		 * @param word	A string containing a word.
-		 * 			<p><strong>Note: </strong>Please be aware that it is the caller's responsibility to break down sentences into words that can be handled by this method.
-		 *  			For example, this method does not support punctuation marks such as comma, colon, quotes, etc.
-		 *				Punctuation marks should be stripped out from the word prior to calling this method.</p>
-		 * @return <code>true</code> if the word is properly spelled. <code>false</code> if the word is misspelled.
-		 *
-		 * @includeExample Examples/Flex/CheckWord/src/CheckWord.mxml
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */
-		function checkWord(word:String):Boolean;
-		
-		/**
-		 * Gets suggestions for a misspelled word. 
-		 *
-		 * @param word	A string containing a misspelled word.
-		 * 					<p>A properly spelled word does not generate any suggestions.</p>  
-		 * @return	A list of suggestions.
-		 *					If the input word is properly spelled, an empty list will be returned.</p>
-		 *
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */
-		function getSuggestions(word:String):Array;
-		
-	}
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/ISpellingDictionary.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/ISpellingDictionary.as b/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/ISpellingDictionary.as
deleted file mode 100644
index 8a46ef4..0000000
--- a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/ISpellingDictionary.as
+++ /dev/null
@@ -1,45 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-
-package com.adobe.linguistics.spelling
-{
-	import com.adobe.linguistics.spelling.core.LinguisticRule;
-	import com.adobe.linguistics.spelling.core.SquigglyDictionary;
-	public interface ISpellingDictionary
-	{
-
-		/**
-		 * @private
-		 * (This property is for Squiggly Developer use only.)
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */
-		function get linguisticRule():LinguisticRule;
-		
-		/**
-		 * @private
-		 * (This property is for Squiggly Developer use only.)
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */
-		function get squigglyDictionary():SquigglyDictionary;
-		
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/SpellChecker.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/SpellChecker.as b/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/SpellChecker.as
deleted file mode 100644
index bc23a91..0000000
--- a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/SpellChecker.as
+++ /dev/null
@@ -1,387 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-
-package com.adobe.linguistics.spelling
-{	
-	import com.adobe.linguistics.spelling.core.*;
-
-	/**
-	 * The spelling engine.
-	 *
-	 * <p>This class implements the <code>ISpellChecker</code> interface.
-	 * This class performs spell&#x2d;checking and generates suggestion lists for misspelled words.
-	 * This class does not include any user-interface elements. Use this class if you want to offer 
-	 * control over how all upper case words are handled or words with numbers are handled, as this 
-	 * level of control is not offered by the SpellUI class.  However, please keep in mind that if 
-	 * you use this class, you will need to write your own UI.</p>
-	 *
-	 * <p>This class is based on the Hunspell algorithm and works with Hunspell/MySpell 
-	 * dictionaries and corresponding language rules files.</p>
-	 * <p>Currently, we support a subset of Hunspell rules(options). </p>
-	 * <p>The future of this class is to align as much as possible with existing Hunspell solution 
-	 * both for the algorithms and the content. </p> 
-	 * <p>In this version, users can also directly load Open-Office dictionaries to HunspellDictionary 
-	 * class and initialize a SpellChecker instance with this HunspellDictionary object. When using this 
-	 * class, the language of use is implied by the dictionary supplied.  Please make sure you load the 
-	 * appropriate dictionary based on the language the user selects to input.</p>
-	 * 
-	 * <p>Note: In the current implementation, only one main dictionary can be used at a time. In addition, 
-	 * in this version, suggestions for misspelled words do not include words from the user dictionary.</p>
-	 *
-	 * @includeExample Examples/Flex/TextEditor/src/TextEditor.mxml -noswf
-	 * 
-	 * @playerversion Flash 10
-	 * @langversion 3.0
-	 */
-	public class SpellChecker implements ISpellChecker
-	{
-		private var _spellingEngine:SquigglyEngine;
-		private var _rule:LinguisticRule;
-		private var _dict:SquigglyDictionary;
-		
-		private var _udEngine:UserDictionaryEngine;
-		
-		/**
-		 * Constructs a new <code>SpellChecker</code> object that performs language sensitive spell checking.
-		 * 
-		 * @param spellingDictionary A <code>ISpellingDictionary</code> interface to be used by this <code>SpellChecker</code>.
-		 * For example, you can pass a <code>HunspellDictonary</code> object which already implemented the <code>ISpellingDictionary</code> interface to this constructor.
-		 *
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */
-		public function SpellChecker(spellingDictionary:ISpellingDictionary)
-		{
-			_rule = spellingDictionary.linguisticRule;
-			_dict = spellingDictionary.squigglyDictionary;
-			_spellingEngine = new SquigglyEngine(_rule,_dict);
-			_spellingEngine.fastMode = true;
-			_udEngine = new UserDictionaryEngine();
-		}
-
-		/**
-		 * Add a user dictionary to the SpellChecker.
-		 * 
-		 * @return <code>true</code> if the operation is successful. <code>false</code> if the operation failed.
-		 * @param userDictionary A <code>UserDictionary</code> object to be added to this <code>SpellChecker</code>.
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */		
-		public function addUserDictionary(userDictionary:UserDictionary):Boolean
-		{
-			return _udEngine.addDictionary(userDictionary.internalUserDictionary);
-		}
-		
-		/**
-		 * Remove a user dictionary from the SpellChecker.
-		 * 
-		 * @return <code>true</code> if the operation is successful. <code>false</code> if the operation failed.
-		 * @param userDictionary A <code>UserDictionary</code> object to be removed from this <code>SpellChecker</code>.
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */		
-		public function removeUserDictionary(userDictionary:UserDictionary):Boolean
-		{
-			return _udEngine.removeDictionary(userDictionary.internalUserDictionary);
-		}
-
-		
-		/**
-		 * Spellchecks a word.
-		 * 
-		 * @param word	A string containing a word.
-		 * 			<p><strong>Notes:</strong></p>
-		 *				<ul>
-		 *					<li>
-		 *						Please be aware that it is the caller's responsibility to break down sentences into words that can be handled by this method.
-		 *  					For example, this method does not support punctuation marks such as comma, colon, quotes, etc.
-		 *						Punctuation marks should be stripped out from the word prior to calling this method.
-		 *						If a word contains white spaces (such as a regular space or non-breaking space), the word will be considered as misspelled.
-		 *					</li>
-		 *				</ul>
-		 * @return <code>true</code> if the word is properly spelled. <code>false</code> if the word is misspelled.
-		 *
-		 * @includeExample Examples/Flex/CheckWord/src/CheckWord.mxml -noswf
-		 * 
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */
-		public function checkWord(word:String):Boolean
-		{
-			return (_spellingEngine==null)? false:(_udEngine.spell(word) || _spellingEngine.spell(word));
-		}
-		
-		/**
-		 * Gets suggestions for a misspelled word. 
-		 *
-		 * @param word	A string containing a misspelled word.
-		 * 	
-		 * @return	A list of suggestions. <p>Up to ten suggestions may be returned.</p>
-		 *
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */
-		public function getSuggestions(word:String):Array
-		{
-			return (_spellingEngine==null)? null:_spellingEngine.suggest(word);
-		}
-
-
-		/** @private
-		 * The version of this <code>SpellChecker</code> class.
-		 * 
-		 * <p>Example: "0.3"</p>
-		 * 
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */
-		public static function get version():String
-		{
-			return "0.5";
-		}
-
-
-
-		/**
-		 * This property controls if Title Case Words should be considered as properly spelled.
-		 * 
-		 * <p>The default value is <code>false</code>.</p> 
-		 *
-		 * <p>If <code>ignoreTitleCase</code> is set to <code>true</code>, any words with first character capped are always considered as properly spelled.</p>
-		 * <p>If <code>ignoreWordWithTitleCase</code> is set to <code>true</code>, "Spel" will be considered as properly spelled even if the dictionary does not contain "spel" or "Spel".
-		 * If <code>ignoreWordWithTitleCase</code> is set to <code>false</code>, "Spel" will be considered as mispelled unless the dictionary contain "Spel".</p>
-		 *
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */
-		private function get ignoreWordWithTitleCase():Boolean
-		{
-			return _spellingEngine.ignoreCappedWord;
-		}
-		private function set ignoreWordWithTitleCase(value:Boolean):void
-		{
-			_spellingEngine.ignoreCappedWord = value;
-		}
-		
-		/**
-		 * This property controls if words in all upper case should be considered as properly spelled or not.
-		 * 
-		 * <table class="innertable">
-		 *		<tr>
-		 *			<td align="center"><strong><code>ignoreWordWithAllUpperCase</code></strong></td>
-		 *			<td align="center"><strong>&#160;</strong></td>
-		 *			<td align="center"><strong>Description</strong></td>
-		 *		</tr>
-		 *		<tr>
-		 *			<td><code>false</code></td>
-		 *			<td>Default</td>
-		 *			<td><p>Words with all characters in upper case are checked against the dictionary for proper spelling.</p>
-		 *				<p>Example: if <code>ignoreWordWithAllUpperCase = false</code>, "MISPEL" will be checked for proper spelling.</p></td>
-		 *		</tr>
-		 *		<tr>
-		 *			<td><code>true</code></td>
-		 *			<td>&#160;</td>
-		 *			<td><p>Any words with all characters in upper case are always considered as properly spelled,
-		 *					no matter whether the word is in the dictionary or not.</p>
-		 *				<p>Example: if <code>ignoreWordWithAllUpperCase = true</code>, "MISPEL" will be considered as properly spelled.</p></td>
-		 *		</tr>
-		 *	</table>
-		 *
-		 *	<!--
-		 *	<p>Following table contains some examples to show how this property works.</p>
-		 * 	<p>Assumption: <code>ignoreWordWithTitleCase</code> = <code>false</code></p>
-		 *	<table class="innertable">
-		 *		<tr>
-		 *			<td rowspan=2 align="center"><strong>Word in dictionary</strong></td>
-		 *			<td rowspan=2 align="center"><strong>Input word</strong></td>
-		 *			<td colspan=2 align="center"><strong><code>ignoreWordWithAllUpperCase</code></strong></td>
-		 *		</tr>
-		 *		<tr>
-		 *			<td align="center"><strong><code>false</code></strong></td>
-		 *			<td align="center"><strong><code>true</code></strong></td>
-		 *		</tr>
-		 *		<tr>
-		 *			<td rowspan="4">apple</td>
-		 *			<td>apple</td>
-		 *			<td>Properly spelled</td>
-		 *			<td>Properly spelled</td>
-		 *		</tr>
-		 *		<tr>
-		 *			<td>APPLE</td>
-		 *			<td>Properly spelled</td>
-		 *			<td>Properly spelled</td>
-		 *		</tr>
-		 *		<tr>
-		 *			<td>Apple</td>
-		 *			<td>Properly spelled</td>
-		 *			<td>Properly spelled</td>
-		 *		</tr>
-		 *		<tr>
-		 *			<td>aPPLe</td>
-		 *			<td>Properly spelled</td>
-		 *			<td>Properly spelled</td>
-		 *		</tr>
-		 *		<tr>
-		 *			<td rowspan="4">NATO</td>
-		 *			<td>nato</td>
-		 *			<td>Properly spelled</td>
-		 *			<td>Properly spelled</td>
-		 *		</tr>
-		 *		<tr>
-		 *			<td>NATO</td>
-		 *			<td>Properly spelled</td>
-		 *			<td>Properly spelled</td>
-		 *		</tr>
-		 *		<tr>
-		 *			<td>Nato</td>
-		 *			<td>Properly spelled</td>
-		 *			<td>Properly spelled</td>
-		 *		</tr>
-		 *		<tr>
-		 *			<td>NaTo</td>
-		 *			<td>Properly spelled</td>
-		 *			<td>Properly spelled</td>
-		 *		</tr>
-		 *		<tr>
-		 *			<td rowspan="4">London</td>
-		 *			<td>london</td>
-		 *			<td>Properly spelled</td>
-		 *			<td>Properly spelled</td>
-		 *		</tr>
-		 *		<tr>
-		 *			<td>LONDON</td>
-		 *			<td>Properly spelled</td>
-		 *			<td>Properly spelled</td>
-		 *		</tr>
-		 *		<tr>
-		 *			<td>London</td>
-		 *			<td>Properly spelled</td>
-		 *			<td>Properly spelled</td>
-		 *		</tr>
-		 *		<tr>
-		 *			<td>LoNDoN</td>
-		 *			<td>Properly spelled</td>
-		 *			<td>Properly spelled</td>
-		 *		</tr>
-		 *		<tr>
-		 *			<td rowspan="4">iPhone</td>
-		 *			<td>iphone</td>
-		 *			<td>Properly spelled</td>
-		 *			<td>Properly spelled</td>
-		 *		</tr>
-		 *		<tr>
-		 *			<td>IPHONE</td>
-		 *			<td>Properly spelled</td>
-		 *			<td>Properly spelled</td>
-		 *		</tr>
-		 *		<tr>
-		 *			<td>IPhone</td>
-		 *			<td>Properly spelled</td>
-		 *			<td>Properly spelled</td>
-		 *		</tr>
-		 *		<tr>
-		 *			<td>iPHoNe</td>
-		 *			<td>Properly spelled</td>
-		 *			<td>Properly spelled</td>
-		 *		</tr>
-		 *	</table>
-		 *	-->
-		 * 
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */
-		public function get ignoreWordWithAllUpperCase():Boolean
-		{
-			return _spellingEngine.ignoreAllUpperCase;
-		}
-		public function set ignoreWordWithAllUpperCase(value:Boolean):void
-		{
-			_spellingEngine.ignoreAllUpperCase = value;
-		}
-		
-		
-		/**
-		 * This property controls if words with numbers, such as windows95, should be considered as properly spelled.
-		 * 
-		 * <table class="innertable">
-		 *		<tr>
-		 *			<td align="center"><strong><code>ignoreWordWithNumber</code></strong></td>
-		 *			<td align="center"><strong>&#160;</strong></td>
-		 *			<td align="center"><strong>Description</strong></td>
-		 *		</tr>
-		 *		<tr>
-		 *			<td><code>false</code></td>
-		 *			<td>Default</td>
-		 *			<td><p>Any words containing digits are checked for proper spelling.</p>
-		 *				<p>Example: If <code>ignoreWordWithNumber</code> = <code>false</code>, "mispel99" will be checked for proper spelling.</p>
-		 *			</td>
-		 *		</tr>
-		 *		<tr>
-		 *			<td><code>true</code></td>
-		 *			<td>&#160;</td>
-		 *			<td><p>Words containing digits are always ignored/skipped regardless of the dictionary.</p>
-		 *				<p>Example: If <code>ignoreWordWithNumber</code> = <code>true</code>, "mispel99" will be considered as properly spelled.</p>
-		 *			</td>
-		 *		</tr>
-		 *	</table>
-		 *
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */
-		public function get ignoreWordWithNumber():Boolean 
-		{
-			return _spellingEngine.ignoreWordWithNumber;
-		}
-		public function set ignoreWordWithNumber(value:Boolean):void
-		{
-			_spellingEngine.ignoreWordWithNumber = value;
-		}
-
-
-		/**
-		 * <span class="hide">
-		 * TODO: Decide this block based API.
-		 * Check a block of text and find out all misspelled words in the text.
-		 * 
-		 * 
-		 * @param text	A string containing a block of texts.
-		 * @param separators	An array of separators.
-		 *
-		 * @return An Array of misspelled word tokens, each token contains the startIndex and length
-		 *
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 * 
-		 * Option 1:
-		 *
-		 * public function checkText(text:String, separators:Array):Array
-		 * {
-		 * }
-		 * 
-		 * Option 2:
-		 *
-		 * public function checkText(text:String, tokenizer:ITokenizer):SpellResultIterator
-		 * {
-		 * }
-		 * </span>
-		 */
-	}
-}
-

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/UserDictionary.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/UserDictionary.as b/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/UserDictionary.as
deleted file mode 100644
index d22f42c..0000000
--- a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/UserDictionary.as
+++ /dev/null
@@ -1,113 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-package com.adobe.linguistics.spelling
-{
-	import __AS3__.vec.Vector;
-	
-	import com.adobe.linguistics.spelling.UserDictionaryInternal;
-	/**
-	 * Represents a user dictionary.
-	 *
-	 * <p>This class represents a user dictionary that is used by the <code>SpellingService</code> class. This class itself is an in-memory object
-	 * and doesn't store persistent data. However, developers can import/export a <code>UserDictionary</code> object from/to a vector of String, 
-	 * and use other flash classes to keep the data persistent. You may want to consider using one of the following options for permanent storage:
-	 *
-	 * <ul>
-	 *	<li>SharedObject, which is used in our SpellingUI class to store words added from the ContextMenu</li>
-	 *	<li>File/FileStream, which is used in our UserDictionaryExample and can be shared across AIR applications</li>
-	 *	<li>Server side storage, for example database so that it can be shared across users</li>
-	 * </ul>
-	 * </p>
-	 * <p>If you are using our SpellingUI class the UserDictionary will be created behind the scene and stored in a SharedObject.</p>
-	 */	 
-	public class UserDictionary
-	{
-		private var _ud:UserDictionaryInternal;
-		
-		/**
-		 * @private
-		 */
-		public function get internalUserDictionary():UserDictionaryInternal
-		{
-			return _ud;
-		}
-		
-		/**
-		 * Constructs a new <code>UserDictionary</code> which can later be added to a <code>SpellingService</code> object.
-		 *
-		 * @param wordList A vector of words (String) to be added as the initial entries of this <code>UserDictionary</code>
-		 * @see UserDictionary.wordList
-		 *
-		 */
-		public function UserDictionary(wordList:Vector.<String>=null)
-		{
-			var array:Array = new Array();
-			if (wordList) {
-				for each (var w:String in wordList)
-					array.push(w);
-			}
-			
-			_ud = new UserDictionaryInternal(array);
-		}
-
-		/**
-		 * Add a word to the user dictionary.
-		 * 
-		 * @param word A word to be added to this <code>UserDictionary</code>.
-		 * @return <code>true</code> if the operation is successful. <code>false</code> if the operation is failed, for example if the word is already added.
-		 * @see UserDictionary.removeWord()
-		 * 
-		 */		
-		public function addWord(word:String):Boolean	
-		{
-			return _ud.addWord(word);
-		}
-
-		/**
-		 * Removes a word from the user dicitonary.
-		 * 
-		 * @param word A word to be removed from this <code>UserDictionary</code>.
-		 * @return True if the operation was successful, false if the operation was failed, for example if the word doesn't exist in the dictionary.
-		 * @see UserDictionary.addWord()
-		 * 
-		 */		
-		public function removeWord(word:String):Boolean
-		{
-			return _ud.removeWord(word);
-		}
-
-		/**
-		 * All words in this user dictionary.
-		 *
-		 * @return A vector of String that contains all words in this user dictionary
-		 * 
-		 */		
-		public function get wordList():Vector.<String>
-		{
-			var result:Vector.<String> = new Vector.<String>();
-			var array:Array = _ud.wordList;
-			
-			for each (var w:String in array)
-				result.push(w);
-			
-			return result;
-		}
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/UserDictionaryInternal.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/UserDictionaryInternal.as b/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/UserDictionaryInternal.as
deleted file mode 100644
index d4034a8..0000000
--- a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/UserDictionaryInternal.as
+++ /dev/null
@@ -1,115 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-
-
-package com.adobe.linguistics.spelling
-{
-	import com.adobe.linguistics.spelling.utils.WordList;
-	
-	/**
-	 * Represents a user dictionary.
-	 *
-	 * <p>This class represents a user dictionary that is used by the <code>SpellChecker</code> class. This class itself is an in-memory object
-	 * and doesn't store persistent data. However, developers can import/export a <code>UserDictionaryInternal</code> object from/to an Array of String, 
-	 * and use other flash classes to keep the data persistent. You may want to consider using one of the following options for permanent storage:
-	 *
-	 * <ul>
-	 *	<li>SharedObject, which is used in our SpellUI class to store words added from the ContextMenu</li>
-	 *	<li>File/FileStream, which is used in our UserDictionaryInternalExample and can be shared across AIR applications</li>
-	 *	<li>Server side storage, for example database so that it can be shared across users</li>
-	 * </ul>
-	 * </p>
-	 * <p>If you are using our SpellUI class the UserDictionaryInternal will be created behind the scene and stored in a SharedObject.</p>
-	 * @includeExample Examples/Air/UserDictionaryInternalExample/src/UserDictionaryInternalExample.mxml -noswf
-	 * @playerversion Flash 10
-	 * @langversion 3.0
-	 */	 
-	public class UserDictionaryInternal
-	{
-		/**
-		 @private
-		 (This property is for Squiggly Developer use only.)
-		 */
-		public var _wordList:WordList;
-		
-		/**
-		 * Constructs a new <code>UserDictionaryInternal</code> which can later be added to a <code>SpellChecker</code> object.
-		 *
-		 * @param wordList An array of words (String) to be added as the initial entries of this <code>UserDictionaryInternal</code>
-		 * @see UserDictionaryInternal.wordList
-		 *
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */
-		public function UserDictionaryInternal(wordList:Array=null)
-		{
-			// TODO: exception if has some problem with insert
-			_wordList= new WordList();
-			if (wordList) {
-				for each (var w:String in wordList)
-				_wordList.insert(w); 
-			}
-		}
-		
-		/**
-		 * Add a word to the user dictionary.
-		 * 
-		 * @param word A word to be added to this <code>UserDictionaryInternal</code>.
-		 * @return <code>true</code> if the operation is successful. <code>false</code> if the operation is failed.
-		 * @see UserDictionaryInternal.removeWord()
-		 * 
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */		
-		public function addWord(word:String):Boolean	
-		{
-			return _wordList.insert(word);
-		}
-		
-		/**
-		 * Removes a word from the user dicitonary.
-		 * 
-		 * @param word A word to be removed from this <code>UserDictionaryInternal</code>.
-		 * @return <code>true</code> if the operation is successful. <code>false</code> if the operation is failed.
-		 * @see UserDictionaryInternal.addWord()
-		 * 
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */		
-		public function removeWord(word:String):Boolean
-		{
-			return _wordList.remove(word);
-		}
-		
-		/**
-		 * List of all words in this user dictionary.
-		 *
-		 * @return An Array of String that contains all words in this user dictionary
-		 * 
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */		
-		public function get wordList():Array
-		{
-			// TODO: make sure no return by reference
-			return _wordList.toArray();
-		}
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/DictionaryManager.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/DictionaryManager.as b/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/DictionaryManager.as
deleted file mode 100644
index cef5b0d..0000000
--- a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/DictionaryManager.as
+++ /dev/null
@@ -1,73 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-
-package com.adobe.linguistics.spelling.core
-{
-	import com.adobe.linguistics.spelling.core.container.HashTable;
-	public class DictionaryManager
-	{
-		private var _table:Array;
-		public function DictionaryManager()
-		{
-			_table = new Array();
-		}
-		
-		public function addDictionary(dict:SquigglyDictionary):Boolean {
-			if ( dict == null ) return false;
-			for ( var i:int = 0; i< _table.length; ++i ) {
-				if ( dict == _table[i] )
-					return false;
-			}
-			_table.push(dict);
-			return true;
-		}
-		
-		public function removeDictionary(dict:SquigglyDictionary):Boolean {
-			if ( dict == null) return false;
-			for ( var i:int = 0; i< _table.length; ++i ) {
-				if ( dict == _table[i] ) {
-					_table = _table.slice(i,1); // remove dictionary from the table.
-				}
-			}
-			return true;
-			
-		}
-		
-		public function get dictonaryList():Array {
-			return this._table;
-		}
-		
-		public function isEmpty():Boolean {
-			return (this._table == null ) ? true : false;
-		}
-		
-		public function get size():int {
-			return this._table.length;
-		}
-		
-		public function lookup( word:String ) :HashEntry {
-			for ( var i:int = 0; i < _table.length; ++i ) {
-				if ( _table[i].containsKey(word) )
-					return _table[i].getElement(word);
-			}
-			return null;
-		}
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/HashEntry.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/HashEntry.as b/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/HashEntry.as
deleted file mode 100644
index 64ac685..0000000
--- a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/HashEntry.as
+++ /dev/null
@@ -1,108 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-
-package com.adobe.linguistics.spelling.core
-{
-	import com.adobe.linguistics.spelling.core.utils.StringUtils;
-	public class HashEntry
-	{
-		private var _affStr:String; // affix flag vector
-		private var _nextEntry:HashEntry;
-		
-		// Not sure now..just leave it here.
-		private var _variableFields:String;   // variable fields (only for special pronounciation yet)
-		
-		
-		public function HashEntry(affStr:String=null,desc:String = null)
-		{
-			this._affStr = StringUtils.sort(affStr);
-			this._variableFields = desc;
-			this._nextEntry = null;
-		}
-		
-		public function addEntry(affStr:String=null,desc:String = null):Boolean {
-			if ( this._nextEntry != null ) return false;
-			this._nextEntry = new HashEntry(affStr, desc);
-			return true;
-		}
-		
-		public function get next():HashEntry {
-			return this._nextEntry;
-		}
-		
-		public function get affixFlagVector():String {
-			return this._affStr;
-		}
-		
-		public function set affixFlagVector(affStr:String):void {
-			this._affStr = StringUtils.sort(affStr);
-		}
-		
-		public function get variableFields():String {
-			return this._variableFields;
-		}
-		
-		public function set variableFields( varF:String) :void {
-			this._variableFields = varF;
-		}
-		
-		public function testAffix(flag:Number):Boolean {
-			if ( this._affStr == null ) return false;
-			var mid:int, left:int=0, right:int= this._affStr.length - 1;
-			while ( left <= right ) {
-				mid = (right+left)/2;
-				if ( this._affStr.charCodeAt(mid) == flag )
-					return true;
-				if ( flag < this._affStr.charCodeAt(mid) ) right = mid -1;
-				else left = mid + 1;
-			}
-			return false;
-		}
-
-		public function testAffixs(flags:Array):Boolean {
-			for ( var i:int; i< flags.length; ++i) {
-				if( testAffix(flags[i]) )
-					return true;
-			}
-			return false;
-		}
-		//For develepors only, this function is made so that when flagmode=flag_long flags can be viewed.
-		public function printFlag(flag:Number):void{
-			var result:String =  String.fromCharCode(flag>>8) + String.fromCharCode(flag-((flag>>8)<<8));
-			
-		}
-
-		
-		static public function TESTAFF(affix:String, flag:Number):Boolean {
-			if ( affix == null ) return false;
-			affix =  StringUtils.sort(affix);
-			var mid:int, left:int=0, right:int= affix.length - 1;
-			while ( left <= right ) {
-				mid = (right+left)/2;
-				if ( affix.charCodeAt(mid) == flag )
-					return true;
-				if ( flag < affix.charCodeAt(mid) ) right = mid -1;
-				else left = mid + 1;
-			}
-			return false;
-			
-		}
-	}
-}
\ No newline at end of file


[47/50] [abbrv] git commit: [flex-utilities] [refs/heads/master] - add description to asdic target

Posted by jm...@apache.org.
add description to asdic target


Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/4b0dd486
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/4b0dd486
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/4b0dd486

Branch: refs/heads/master
Commit: 4b0dd486d2996b4c77af8de09bafe9557d3f5b78
Parents: 8d679d8
Author: Justin Mclean <jm...@apache.org>
Authored: Fri Aug 29 10:47:21 2014 +1000
Committer: Justin Mclean <jm...@apache.org>
Committed: Fri Aug 29 10:47:21 2014 +1000

----------------------------------------------------------------------
 Squiggly/build.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4b0dd486/Squiggly/build.xml
----------------------------------------------------------------------
diff --git a/Squiggly/build.xml b/Squiggly/build.xml
index 8d75f24..af7dca7 100644
--- a/Squiggly/build.xml
+++ b/Squiggly/build.xml
@@ -52,7 +52,7 @@
 	<target name="package" description="package up all source files" depends="package-dir,generate-docs,package-source-tar,package-source-zip,package-binary-tar,package-binary-zip">
 	</target>
 	
-	<target name="generate-docs">
+	<target name="generate-docs" description="generate asdocs">
 		<!--
 		C:\flexsdk4.1\bin\asdoc" 
 		-package com.adobe.linguistics.spelling "This package providing spell checking functionality to your action script applications. This includes the core spell checking engine and the optional SpellUI class for easy integration with your existing Flex projects."


[42/50] [abbrv] git commit: [flex-utilities] [refs/heads/master] - no longer required

Posted by jm...@apache.org.
no longer required


Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/29548b27
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/29548b27
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/29548b27

Branch: refs/heads/master
Commit: 29548b27d29fea156c8cc36acffca3512a985bcc
Parents: 07653c9
Author: Justin Mclean <jm...@apache.org>
Authored: Fri Aug 29 10:20:19 2014 +1000
Committer: Justin Mclean <jm...@apache.org>
Committed: Fri Aug 29 10:20:19 2014 +1000

----------------------------------------------------------------------
 Squiggly/main/README.txt | 28 ----------------------------
 1 file changed, 28 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/29548b27/Squiggly/main/README.txt
----------------------------------------------------------------------
diff --git a/Squiggly/main/README.txt b/Squiggly/main/README.txt
deleted file mode 100644
index 00b9745..0000000
--- a/Squiggly/main/README.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-How to use the Squiggly SDK
-===================================
-
-Please read the ASDoc first to understand the classes in Squiggly.
-
-If you are using the SpellChecker class directly, you need.
-- AdobeSpellingEngine.swc in [YourProject]/libs folder, you can find it from ./libs
-- Dictionary files in [YourProject]/src folder, your can find them from ./src/dictionaries folder
-
-If you are using the simple UI integration feature (SpellUI class), in addition to what mentioned above, you also need
-- AdobeSpellingConfig.xml in [YourProject]/src
-- AdobeSpellingUI.swc (AdobeSpellingUIEx.swc if you need spark support in Flex 4) in [YourProject]/libs 
-
-This SDK came with English(US) dictionary. You can download additional HunSpell dictionaries, but for now, what we have tested are just English, Spanish, Portuguese and Italian. If you are doing this, you need to understand AdobeSpellingConfig.xml.
-
-Here's the content of AdobeSpellingConfig.xml, each entry maps the languageCode with the relative path for resource files. 
-<SpellingConfig>
-  <LanguageResource language="English" languageCode="en_US" ruleFile="dictionaries/en_US/en_US.aff" dictionaryFile="dictionaries/en_US/en_US.dic"/>
-</SpellingConfig>
-
-So if you are adding Spanish, you just need to get the hunspell dictionary es_ES.aff/dic and add one line to your config file.
-  <LanguageResource language="Spanish" languageCode="es_ES" ruleFile="dictionaries/es_ES/es_ES.aff" dictionaryFile="dictionaries/es_ES/es_ES.dic"/>
-
-Note that you can put the dictionaries in another location as long as you update the config file, the config file itself MUST be in [YourProject]/src folder.
-
-
-
-


[08/50] [abbrv] git commit: [flex-utilities] [refs/heads/master] - FLEX-34489 add missing source tabs

Posted by jm...@apache.org.
FLEX-34489 add missing source tabs


Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/92612379
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/92612379
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/92612379

Branch: refs/heads/master
Commit: 92612379a0d0a4ebd01a98bd9ba1efaafd2aa70a
Parents: 8fe00b4
Author: Justin Mclean <jm...@apache.org>
Authored: Wed Aug 27 15:29:32 2014 +1000
Committer: Justin Mclean <jm...@apache.org>
Committed: Wed Aug 27 15:29:32 2014 +1000

----------------------------------------------------------------------
 TourDeFlex/TourDeFlex3/src/explorer.xml | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/92612379/TourDeFlex/TourDeFlex3/src/explorer.xml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/explorer.xml b/TourDeFlex/TourDeFlex3/src/explorer.xml
index 93e9195..8506b29 100755
--- a/TourDeFlex/TourDeFlex3/src/explorer.xml
+++ b/TourDeFlex/TourDeFlex3/src/explorer.xml
@@ -238,8 +238,8 @@
 					<node label="List to Panel" app="spark/other/DragAndDrop2Example" />
 				</node>
 				<node label="Custom Components">
-					<node label="Search" app="spark/components/SearchExample" />
-					<node label="Video Player" app="spark/components/VideoPlayerExample" />
+					<node label="Search" app="spark/components/SearchExample" src="spark/components/SearchBox.as" />
+					<node label="Video Player" app="spark/components/VideoPlayerExample" src="spark/components/VideoPlayer.mxml" />
 				</node>
 				<node label="i18n">
 					<node label="Collator" app="spark/i18n/SparkCollatorExample"/>
@@ -260,9 +260,9 @@
 					<node label="Formatters" app="spark/i18n/SparkFormatterExample"/>
 				</node>	
 				<node label="Item Renderers">
-					<node label="List" app="spark/itemRenderers/ListItemRendererExample"/>
-					<node label="Scale Image" app="spark/itemRenderers/ItemRenderer1Example" />
-					<node label="3D Rotate" app="spark/itemRenderers/ItemRenderer2Example" />
+					<node label="List" app="spark/itemRenderers/ListItemRendererExample" src="spark/itemRenderers/MyListItemRenderer.mxml"/>
+					<node label="Scale Image" app="spark/itemRenderers/ItemRenderer1Example" src="spark/itemRenderers/renderers/ImageRenderer1.mxml" />
+					<node label="3D Rotate" app="spark/itemRenderers/ItemRenderer2Example" src="spark/itemRenderers/renderers/ImageRenderer2.mxml" />
 				</node>
 				<node label="Events">
 					<node label="Inline property" app="spark/events/EventExample1" />
@@ -288,11 +288,11 @@
 					<node label="ScrollBars" app="spark/other/ScrollBarsExample" />
 				</node>
 				<node label="Skinning">
-					<node label="Button With Icon" app="spark/skinning/ButtonWithIconExample"/>
-					<node label="Application" app="spark/skinning/SkinningApplication1Example"/>
-					<node label="Application" app="spark/skinning/SkinningApplication2Example"/>
-					<node label="Application" app="spark/skinning/SkinningApplication3Example"/>
-					<node label="Container" app="spark/skinning/SkinningContainerExample"/>
+					<node label="Button With Icon" app="spark/skinning/ButtonWithIconExample" src="spark/skinning/skins/CloseButtonSkin.mxml&amp;spark/skinning/skins/AddButtonSkin.mxml&amp;spark/skinning/skins/IconTextButtonSkin.mxml" />
+					<node label="Gradient Skin" app="spark/skinning/SkinningApplication1Example" src="spark/skinning/skins/GradientBackgroundAppSkin.mxml"/>
+					<node label="Background Image Skin" app="spark/skinning/SkinningApplication2Example" src="spark/skinning/skins/BackgroundImageAppSkin.mxml" />
+					<node label="Control Bar Skin" app="spark/skinning/SkinningApplication3Example" src="spark/skinning/skins/CustomControlBarAppSkin.mxml" />
+					<node label="Container Skin" app="spark/skinning/SkinningContainerExample" src="spark/skinning/skins/CustomSkinnableContainerSkin.mxml" />
 				</node>
 				<node label="Viewport">
 					<node label="Controlling Viewport" app="spark/other/ControllingViewportExample" />


[07/50] [abbrv] git commit: [flex-utilities] [refs/heads/master] - update release notes

Posted by jm...@apache.org.
update release notes


Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/8fe00b43
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/8fe00b43
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/8fe00b43

Branch: refs/heads/master
Commit: 8fe00b4336fdaf24113fdf9b1ac3779c912fad8a
Parents: 64b07cb
Author: Justin Mclean <jm...@apache.org>
Authored: Wed Aug 27 14:25:44 2014 +1000
Committer: Justin Mclean <jm...@apache.org>
Committed: Wed Aug 27 14:25:44 2014 +1000

----------------------------------------------------------------------
 TourDeFlex/TourDeFlex3/RELEASE_NOTES | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/8fe00b43/TourDeFlex/TourDeFlex3/RELEASE_NOTES
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/RELEASE_NOTES b/TourDeFlex/TourDeFlex3/RELEASE_NOTES
index 8727ea1..0050233 100644
--- a/TourDeFlex/TourDeFlex3/RELEASE_NOTES
+++ b/TourDeFlex/TourDeFlex3/RELEASE_NOTES
@@ -10,6 +10,8 @@ Changes since the version 1.0
 - Fixed a few minor issues
 
 Bugs fixed:
+FLEX-34500 Show total number of examples in Tour De Flex UI
+FLEX-34495 Error loading source file
 FLEX-34488 Add favicon to TourDeFlex
 FLEX-34483 Make logo links to Apache Flex web site
 FLEX-34480 If TourDeFlex is run from an untrusted location you get an error


[17/50] [abbrv] git commit: [flex-utilities] [refs/heads/master] - add initial readme and release notes

Posted by jm...@apache.org.
add initial readme and release notes


Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/3c6863c4
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/3c6863c4
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/3c6863c4

Branch: refs/heads/master
Commit: 3c6863c43c78b2c35b3f2a34ce8627574faf0805
Parents: 47a594e
Author: Justin Mclean <jm...@apache.org>
Authored: Thu Aug 28 10:55:10 2014 +1000
Committer: Justin Mclean <jm...@apache.org>
Committed: Thu Aug 28 10:55:10 2014 +1000

----------------------------------------------------------------------
 Squiggly/README        | 57 +++++++++++++++++++++++++++++++++++++++++++++
 Squiggly/RELEASE_NOTES |  7 ++++++
 2 files changed, 64 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/3c6863c4/Squiggly/README
----------------------------------------------------------------------
diff --git a/Squiggly/README b/Squiggly/README
new file mode 100644
index 0000000..ad06111
--- /dev/null
+++ b/Squiggly/README
@@ -0,0 +1,57 @@
+
+  The Apache Flex Squiggly is a ActionScript spell checking library.
+	 
+  This application is based on work donated by Adobe.
+  
+==========================================================================================
+Initial Setup Required
+==========================================================================================            
+  
+    FLEX_HOME is the absolute path to the Apache Flex SDK
+    If you omit this argument, and the system environment variable, FLEX_HOME exists,
+    it is used.
+  
+==========================================================================================
+How to build the installer using ant (no IDE is required)
+==========================================================================================
+
+1.  On Linux or Mac un tar/gzip the source distribution:
+	    tar -zxvf apache-flex-squiggly-1.0.tar.gz
+	Or if on windows unzip 
+		apache-flex-squiggly-1.0.zip
+
+2.  In the base directory, run:
+        ant compile
+        
+3. To optionally create a release source package, run:
+ 		ant package
+
+4. The compiled swcs can be found in the main/libs directory 
+
+5. To remove all of the compiled swcs:
+ 		ant clean
+ 		
+==========================================================================================
+Some other useful ant targets
+========================================================================================== 		
+	
+There are several other useful ant targets.
+
+	 compile-swc         compile squiggly swcs
+	 package             package up all source files
+	 package-binary-tar  tar up all source files and swcs
+	 package-binary-zip  zip up all source files and swcs
+	 package-source-tar  tar up all source files
+	 package-source-zip  zip up all source files
+ 		
+==========================================================================================
+How to check the code out of Git
+==========================================================================================
+
+1.  Check out the the code from the Apache Flex utilities project
+	 git clone https://git-wip-us.apache.org/repos/asf/flex-utilities.git flex-utilities
+	 cd flex-utilities
+	 git checkout develop 
+
+2.  Change directory to:
+	cd Squiggly

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/3c6863c4/Squiggly/RELEASE_NOTES
----------------------------------------------------------------------
diff --git a/Squiggly/RELEASE_NOTES b/Squiggly/RELEASE_NOTES
new file mode 100644
index 0000000..a4ae170
--- /dev/null
+++ b/Squiggly/RELEASE_NOTES
@@ -0,0 +1,7 @@
+------------------------------------------------
+Squiggly 1.0
+------------------------------------------------
+
+Initial parity release for Adobe's Squiggly library.
+
+Note that the ANE version of Squiggly may be added in a future release.
\ No newline at end of file


[25/50] [abbrv] remove Adobe from directory names (package name still contains Adobe)

Posted by jm...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/LinguisticRule.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/LinguisticRule.as b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/LinguisticRule.as
new file mode 100644
index 0000000..6ad78c6
--- /dev/null
+++ b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/LinguisticRule.as
@@ -0,0 +1,1118 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+package com.adobe.linguistics.spelling.core
+{
+//	import com.adobe.linguistics.spelling.core.PhoneticTable;
+	import com.adobe.linguistics.spelling.core.env.*;
+	import com.adobe.linguistics.spelling.core.error.*;
+	import com.adobe.linguistics.spelling.core.rule.*;
+	import com.adobe.linguistics.spelling.core.utils.SimpleNumberParser;
+	
+	import flash.utils.Dictionary;
+
+
+	public class LinguisticRule
+	{
+
+
+		private var _encoding:String // ToDo, not sure how to handle this encoding stuff...
+
+		private var snp:SimpleNumberParser = new SimpleNumberParser();
+		
+		private var _prefixFlagTable:Array;
+		private var _prefixKeyTable:Array;
+		private var _suffixFlagTable:Array;
+		private var _suffixKeyTable:Array;
+		private var _optSuffixKeyTable:Dictionary;
+		private var _optPrefixKeyTable:Dictionary;
+//these are attributes
+		private var _keyString:String;
+		private var _tryString:String;
+		private var _noSuggest:Number;// don't suggest words signed with NOSUGGEST flag
+		private var _forbiddenWord:Number; // forbidden word signing flag
+		private var _circumfix:Number=0; //Circumfix Flag
+		private var _ignoredChars:String; // letters + spec. word characters
+		private var _wordChars:String; //extends tokenizer of Hunspell command line interface with additional word character. For example, dot, dash, n-dash, numbers, percent sign are word character in Hungarian.
+		private var _languageCode:String; 
+		private var _version:String;
+		private var _maxngramsugs:int = -1; // undefined
+		private var _nosplitsugs:int = 0;
+		private var _sugswithdots:int = 0;
+		private var _fullStrip:int;
+		private var _keepCase:Number;
+		private var _haveContClass:Boolean;//added to support (double) prefixes
+		
+		private var _flagMode:int;
+		private var _needAffix:Number;
+		private var _contClasses:Dictionary;//this is list of all possible contclasses
+		/* ToDo */
+		
+		private var _onlyInCompound:Number = 0;
+//		private var _phoneTable:PhoneticTable; //phone table
+/*
+
+
+ToDO: should be removed after we have complex-affix support and compound-word support..
+
+
+  pHMgr = ptr[0];
+  alldic = ptr;
+  maxdic = md;
+  keystring = NULL;
+  trystring = NULL;
+  encoding=NULL;
+  utf8 = 0;
+  complexprefixes = 0;
+  maptable = NULL;
+  nummap = 0;
+  breaktable = NULL;
+  numbreak = 0;
+  reptable = NULL;
+  numrep = 0;
+  iconvtable = NULL;
+  oconvtable = NULL;
+  checkcpdtable = NULL;
+  // allow simplified compound forms (see 3rd field of CHECKCOMPOUNDPATTERN)
+  simplifiedcpd = 0;
+  numcheckcpd = 0;
+  defcpdtable = NULL;
+  numdefcpd = 0;
+  phone = NULL;
+  compoundflag = FLAG_NULL; // permits word in compound forms
+  compoundbegin = FLAG_NULL; // may be first word in compound forms
+  compoundmiddle = FLAG_NULL; // may be middle word in compound forms
+  compoundend = FLAG_NULL; // may be last word in compound forms
+  compoundroot = FLAG_NULL; // compound word signing flag
+  compoundpermitflag = FLAG_NULL; // compound permitting flag for suffixed word
+  compoundforbidflag = FLAG_NULL; // compound fordidden flag for suffixed word
+  checkcompounddup = 0; // forbid double words in compounds
+  checkcompoundrep = 0; // forbid bad compounds (may be non compound word with a REP substitution)
+  checkcompoundcase = 0; // forbid upper and lowercase combinations at word bounds
+  checkcompoundtriple = 0; // forbid compounds with triple letters
+  simplifiedtriple = 0; // allow simplified triple letters in compounds (Schiff+fahrt -> Schiffahrt)
+  forbiddenword = FORBIDDENWORD; // forbidden word signing flag
+  nosuggest = FLAG_NULL; // don't suggest words signed with NOSUGGEST flag
+  lang = NULL; // language
+  langnum = 0; // language code (see http://l10n.openoffice.org/languages.html)
+  needaffix = FLAG_NULL; // forbidden root, allowed only with suffixes
+  cpdwordmax = -1; // default: unlimited wordcount in compound words
+  cpdmin = -1;  // undefined
+  cpdmaxsyllable = 0; // default: unlimited syllablecount in compound words
+  cpdvowels=NULL; // vowels (for calculating of Hungarian compounding limit, O(n) search! XXX)
+  cpdvowels_utf16=NULL; // vowels for UTF-8 encoding (bsearch instead of O(n) search)
+  cpdvowels_utf16_len=0; // vowels
+  pfxappnd=NULL; // previous prefix for counting the syllables of prefix BUG
+  sfxappnd=NULL; // previous suffix for counting a special syllables BUG
+  cpdsyllablenum=NULL; // syllable count incrementing flag
+  checknum=0; // checking numbers, and word with numbers
+  wordchars=NULL; // letters + spec. word characters
+  wordchars_utf16=NULL; // letters + spec. word characters
+  wordchars_utf16_len=0; // letters + spec. word characters
+  ignorechars=NULL; // letters + spec. word characters
+  ignorechars_utf16=NULL; // letters + spec. word characters
+  ignorechars_utf16_len=0; // letters + spec. word characters
+  version=NULL; // affix and dictionary file version string
+  havecontclass=0; // flags of possible continuing classes (double affix)
+  // LEMMA_PRESENT: not put root into the morphological output. Lemma presents
+  // in morhological description in dictionary file. It's often combined with PSEUDOROOT.
+  lemma_present = FLAG_NULL; 
+  circumfix = FLAG_NULL; 
+  onlyincompound = FLAG_NULL; 
+  maxngramsugs = -1; // undefined
+  nosplitsugs = 0;
+  sugswithdots = 0;
+  keepcase = 0;
+  checksharps = 0;
+  substandard = FLAG_NULL;
+  fullstrip = 0;
+  */
+		
+		private var _simpleFilterTable:Array;
+		private var _mapFilterTable:Array;
+		private var _iconvFilterTable:Array; //Contains conversion table for ICONV conversion
+		private var _oconvFilterTable:Array;//Contains conversion table for OCONV conversion
+		private var _breakTable:Array;//Contains list of characters in BREAK rule
+		private var _aliasfTable:Array;//Contains conversion table for AF rule
+		/* internal use only properties. */
+		private var _pfxEntry:PrefixEntry;
+		private var _sfxEntry:SuffixEntry;
+		private var _optSfxEntry:OptimizedSuffixEntry;
+		private var _optPfxEntry:OptimizedPrefixEntry;
+		private var _dictMgr:DictionaryManager;
+		
+		public function LinguisticRule()
+		{
+			
+			this._prefixFlagTable = new Array()
+			this._prefixKeyTable = new Array();
+			this._suffixFlagTable = new Array();
+			this._suffixKeyTable = new Array();
+			this._optSuffixKeyTable = new Dictionary(true);
+			this._optPrefixKeyTable = new Dictionary(true);
+			
+			this._simpleFilterTable = new Array();
+			this._mapFilterTable = new Array();
+			this._iconvFilterTable=new Array();
+			this._oconvFilterTable=new Array();
+			this._breakTable=new Array();//We are not adding any break points by default. Hunspell C does this for -, ^-, -$
+			this._aliasfTable=new Array();
+//			this._phoneTable=new PhoneticTable(); 
+			
+			
+			/* init the attributes */
+			this.noSuggest = InternalConstants.FLAG_NULL;
+			this.tryString= null;
+			this.keyString= null;
+			this.ignoredChars = null;
+			this.wordChars = null;
+			this.version = null;
+			this.languageCode = null;
+			this.forbiddenWord = InternalConstants.FORBIDDENWORD;
+			this.needAffix=InternalConstants.FLAG_NULL;
+			this.circumfix=InternalConstants.FLAG_NULL;
+			this.maxNgramSuggestions = -1; // undefined
+			this.nosplitSuggestions = 0;
+			this.suggestionsWithDots = 0;
+			this.fullStrip = 0;
+			this.keepCase = 0;
+			this.onlyInCompound = 0;
+			this.flagMode = InternalConstants.FLAG_CHAR;
+			this._contClasses= new Dictionary;
+			/* */
+			
+			
+			this._dictMgr = null;
+			
+
+		}
+
+		/*
+		 * Deprecated function for now...
+		 * History: 
+		 *          A pre-version of implementation for error detection. After I optimized the code for performance,
+		 *          I drop this function by that time, but you know performance meassuring is a tricky problem... 
+		 * ToDo: Need a revisit when we implementing complex-affix support and compound-word support.
+		 */
+		// check if word with affixes is correctly spelled
+		public function affixCheck( word:String, needFlag:int, inCompound:int ):HashEntry {
+			var rv:HashEntry = null;
+			// check all prefixes (also crossed with suffixes if allowed) 
+			rv = optSuffixCheck(word, needFlag, inCompound);
+			if( rv ) return rv;
+			// if still not found check all suffixes
+			rv = optPrefixCheck(word, 0, null, inCompound, needFlag);
+			return rv;
+		}
+
+		// This function checks if word with affixes is correctly spelled.
+		public function affixCheck2( word:String, needFlag:int, inCompound:int ):HashEntry {
+			var rv:HashEntry = null;
+			if ( word.length <2 ) return rv;
+			// check onelevel prefix case or one level prefix+one level suffix: un->run or under->taker (note: hypothetical words) also will check milli->litre->s and d'->autre->s
+			rv = optPrefixCheck2(word, inCompound, needFlag);
+			if( rv ) return rv;
+			// check all one level suffix drink->able or drink->s
+			rv = optSuffixCheck2(word,0,null, needFlag, inCompound);
+			
+			
+			//double affix checking 
+			if(this.haveContClass)
+			{
+				if(rv) return rv;
+				//check all 2 level suffixes case: drink->able->s
+				rv= optTwoSuffixCheck(word,0, null, needFlag,0);
+				
+				if(rv) return rv;
+				//check prefix and then 2 level suffix case un->drink->able->s
+				rv= optTwoPrefixCheck(word, 0, needFlag);
+				
+			}
+				
+				return rv;
+		}
+
+
+		/*
+		 * Deprecated function for now...
+		 * History: 
+		 *          A pre-version of implementation for error detection. After I optimized the code for performance,
+		 *          I drop this function by that time, but you know performance meassuring is a tricky problem... 
+		 * ToDo: Need a revisit when we implementing complex-affix support and compound-word support.
+		 */
+		public function optPrefixCheck(word:String, sfxopts:int, ppfx:AffixEntry, needFlag:int, inCompound:int) :HashEntry {
+			var rv:HashEntry = null;
+			var tmpWord:String;
+			// first handle the special case of 0 length prefixes
+			if ( _optPrefixKeyTable[''] != undefined ) {
+				_optPfxEntry = _optPrefixKeyTable[''];
+				while ( _optPfxEntry ) {
+					// fogemorpheme
+					// permit prefixes in compounds
+						// check prefix
+					rv = _optPfxEntry.checkWord(word, sfxopts, ppfx, inCompound, needFlag);
+					if ( rv ) {
+						return rv;
+					}
+					_optPfxEntry = _optPfxEntry.nextElementWithKey;
+				}
+			}
+			
+			// now handle the general case
+			for ( var i:int =1; i < word.length ; ++i ) {
+				tmpWord = word.substr(0,i);
+				if ( _optPrefixKeyTable[tmpWord] != undefined ) {
+					_optPfxEntry = _optPrefixKeyTable[tmpWord];
+					// fogemorpheme
+					// permit prefixes in compounds
+						// check prefix
+					while ( _optPfxEntry ) {
+						rv = _optPfxEntry.checkWord(word, sfxopts, ppfx, inCompound, needFlag);
+						if ( rv) {
+							return rv;
+						}
+						_optPfxEntry = _optPfxEntry.nextElementWithKey;
+					}
+				}
+			}
+			
+			return rv;
+		}
+
+// This function checks one level prefix OR one level prefix+ one level suffix
+		public function optPrefixCheck2(word:String, inCompound:int, needFlag:int) :HashEntry {
+			var rv:HashEntry = null;
+			var tmpWord:String;
+			var i:int;
+			var locOptPfxEntry:OptimizedPrefixEntry=null;//local optimised prefix entry added because we are adding optTwoPrefixCheck
+			// first handle the special case of 0 length prefixes
+			if ( _optPrefixKeyTable[''] != undefined ) {
+				for ( i=0; i<_optPrefixKeyTable[''].length; ++i ) {
+					locOptPfxEntry=_optPrefixKeyTable[''][i];
+					// fogemorpheme
+					// permit prefixes in compounds
+						// check prefix
+					while ( locOptPfxEntry ) {
+						rv = locOptPfxEntry.checkWord2(word, inCompound, needFlag);
+						if ( rv) {
+							return rv;
+						}
+						locOptPfxEntry = locOptPfxEntry.nextElementWithKey;
+					}
+				}
+			}
+			
+			// now handle the general case
+			var firstKeyStr:String = word.charAt(0);
+			var secondKeyNum:Number = word.charCodeAt(1);
+			var breakFlag:Boolean = false;
+			if ( _optPrefixKeyTable[firstKeyStr] != undefined ) {
+				for ( i=0; i< _optPrefixKeyTable[firstKeyStr].length; ++i ) {
+					locOptPfxEntry=_optPrefixKeyTable[firstKeyStr][i];
+					if ( (locOptPfxEntry.affixKey.length!=1) ) {
+						if ( locOptPfxEntry.affixKey.charCodeAt(1)> secondKeyNum )
+							break;
+						if ( locOptPfxEntry.affixKey.charCodeAt(1)< secondKeyNum) {
+							if (breakFlag) break;
+							else continue;
+						}
+						breakFlag = true;
+					}
+					if (word.indexOf(locOptPfxEntry.affixKey) != 0)
+						continue; 
+					// fogemorpheme
+					// permit prefixes in compounds
+						// check prefix
+					while ( locOptPfxEntry ) {
+						rv = locOptPfxEntry.checkWord2(word, inCompound, needFlag);
+						if ( rv) {
+							return rv;
+						}
+						locOptPfxEntry = locOptPfxEntry.nextElementWithKey;
+					}
+				}
+			}
+			
+			return rv;
+		}
+
+		// This is a new function added to include one level prefix checking followed by two level suffix checking
+		public function optTwoPrefixCheck(word:String, inCompound:int, needFlag:int) :HashEntry {
+			var rv:HashEntry = null;
+			//pfx=null;//TODO:Need to figure these out, seems they will be needed for compound rules. keeping for some time
+			//sfxrevkey=null;//TODO:Need to figure these out, seems they will be needed for compound rules. keeping for some time
+			var tmpWord:String;
+			var i:int;
+			var locOptPfxEntry:OptimizedPrefixEntry=null;//local optimised prefix entry
+			// first handle the special case of 0 length prefixes
+			if ( _optPrefixKeyTable[''] != undefined ) {
+				for ( i=0; i<_optPrefixKeyTable[''].length; ++i ) {
+					locOptPfxEntry=_optPrefixKeyTable[''][i];
+					
+					while ( locOptPfxEntry ) {
+						rv = locOptPfxEntry.checkTwoWord(word, inCompound, needFlag); 
+						if ( rv) {
+							return rv;
+						}
+						locOptPfxEntry = locOptPfxEntry.nextElementWithKey;
+					}
+				}
+			}
+			
+			// now handle the general case
+			var firstKeyStr:String = word.charAt(0);
+			var secondKeyNum:Number = word.charCodeAt(1);
+			var breakFlag:Boolean = false;
+			if ( _optPrefixKeyTable[firstKeyStr] != undefined ) {
+				for ( i=0; i< _optPrefixKeyTable[firstKeyStr].length; ++i ) {
+					locOptPfxEntry=_optPrefixKeyTable[firstKeyStr][i];
+					if ( (locOptPfxEntry.affixKey.length!=1) ) {
+						if ( locOptPfxEntry.affixKey.charCodeAt(1)> secondKeyNum )
+							break;
+						if ( locOptPfxEntry.affixKey.charCodeAt(1)< secondKeyNum) {
+							if (breakFlag) break;
+							else continue;
+						}
+						breakFlag = true;
+					}
+					if (word.indexOf(locOptPfxEntry.affixKey) != 0)
+						continue; 
+					while ( locOptPfxEntry ) {
+						rv = locOptPfxEntry.checkTwoWord(word, inCompound, needFlag);
+						if ( rv) {
+							return rv;
+						}
+						locOptPfxEntry = locOptPfxEntry.nextElementWithKey;
+					}
+				}
+			}
+			return rv;//this most certainly will return NULL
+		}
+		
+
+		/*
+		 * Deprecated function for now...
+		 * History: 
+		 *          A pre-version of implementation for error detection. After I optimized the code for performance,
+		 *          I drop this function by that time, but you know performance meassuring is a tricky problem... 
+		 * ToDo: Need a revisit when we implementing complex-affix support and compound-word support.
+		 */
+		public function optSuffixCheck( word:String, needFlag:int, inCompound:int):HashEntry {
+			var rv:HashEntry  = null;
+			var tmpWord:String;
+			// first handle the special case of 0 length suffixes
+			if ( this._optSuffixKeyTable[''] != undefined  ) {
+				_optSfxEntry = this._optSuffixKeyTable[''];
+				while ( _optSfxEntry ) {
+					// fogemorpheme
+					// permit prefixes in compounds
+						// check prefix
+					rv = _optSfxEntry.checkWord(word, inCompound, needFlag);
+					if ( rv ) {
+						return rv;
+					}
+					_optSfxEntry = _optSfxEntry.nextElementWithKey;
+				}
+				
+			}
+			// now handle the general case
+			for ( var i:int =word.length-1; i > 0 ; --i ) {
+				tmpWord = word.substr(i);
+				if ( _optSuffixKeyTable[tmpWord] != undefined ) {
+					_optSfxEntry = _optSuffixKeyTable[tmpWord];
+					// fogemorpheme
+					// permit prefixes in compounds
+						// check prefix
+					while ( _optSfxEntry ) {
+						rv = _optSfxEntry.checkWord(word, inCompound, needFlag);
+						if ( rv) {
+							return rv;
+						}
+						_optSfxEntry = _optSfxEntry.nextElementWithKey;
+					}
+				}
+			}
+			
+			return rv;
+		}
+
+//This function takes care of all one level suffix stripping. This is called from other affix stripping functions also
+		public function optSuffixCheck2( word:String, sfxopts:int, ppfx:AffixEntry, needFlag:int, inCompound:int, cclass:int=0, pfxcclass:int=0):HashEntry {
+			var rv:HashEntry  = null;
+			var tmpWord:String;
+			var locOptSfxEntry:OptimizedSuffixEntry=null;//local optimised suffic entry
+			// first handle the special case of 0 length suffixes
+			if ( this._optSuffixKeyTable[''] != undefined  ) {
+				locOptSfxEntry=this._optSuffixKeyTable[''];
+				while ( locOptSfxEntry ) {
+					//if(!cclass|| locOptSfxEntry.contclass)
+					//{
+						
+					
+					
+					// fogemorpheme
+					// permit prefixes in compounds
+						// check prefix
+						
+					//if((_optSfxEntry &&!(_optSfxEntry.contclass && HashEntry.TESTAFF(_optSfxEntry.contclass, this._needAffix)))||(ppfx&& !(ppfx.contclass && HashEntry.TESTAFF(ppfx.contclass,this._needAffix))))// needaffix on prefix or first suffix
+					//{
+						
+						rv = locOptSfxEntry.checkWord2(word, sfxopts, ppfx, inCompound, needFlag, cclass, pfxcclass);
+						if ( rv ) {
+							_optSfxEntry = locOptSfxEntry;//WIll possibily needed in compound check
+							return rv;
+						}
+				//	}
+					//}
+					locOptSfxEntry = locOptSfxEntry.nextElementWithKey;
+				}
+				
+			}
+			// now handle the general case
+			for ( var i:int =word.length-1; i >= 0 ; --i ) {
+				tmpWord = word.substr(i);
+				if ( _optSuffixKeyTable[tmpWord] != undefined ) {
+					locOptSfxEntry = (_optSuffixKeyTable[tmpWord] is OptimizedSuffixEntry)? _optSuffixKeyTable[tmpWord] : null;
+					// fogemorpheme
+					// permit prefixes in compounds
+						// check prefix
+					while ( locOptSfxEntry ) {
+						//if(_optSfxEntry &&HashEntry.TESTAFF(_optSfxEntry.contclass, this._needAffix)||(ppfx&& HashEntry.TESTAFF(ppfx.contclass,this._needAffix)))// needaffix on prefix or first suffix
+						//{
+							
+							rv = locOptSfxEntry.checkWord2(word, sfxopts, ppfx, inCompound, needFlag, cclass, pfxcclass);
+							if ( rv) {
+								_optSfxEntry = locOptSfxEntry;//WIll possibily needed in compound check
+								return rv;
+							}
+						//}
+							locOptSfxEntry = locOptSfxEntry.nextElementWithKey;
+					}
+				}
+			}
+			
+			return rv;
+		}
+		
+		// This is a new function added to include two level suffix checking
+		public function optTwoSuffixCheck(word:String, sfxopts:int, ppfx:AffixEntry,needFlag:int,pfxcclass:int=0) :HashEntry {
+			var rv:HashEntry  = null;
+			var tmpWord:String;
+			var locOptSfxEntry:OptimizedSuffixEntry;//local optimised suffic entry
+			// first handle the special case of 0 length suffixes
+			if ( this._optSuffixKeyTable[''] != undefined  ) 
+			{
+				locOptSfxEntry=this._optSuffixKeyTable[''];
+				while ( locOptSfxEntry ) 
+				{
+					for(var j:int=0; locOptSfxEntry.flags && j<locOptSfxEntry.flags.length; j++)
+					{
+						if(this.contClasses[locOptSfxEntry.flags[j]]==true)
+						{ //if this can be a possible contclass check furthur
+							rv = locOptSfxEntry.checkTwoWord(word, sfxopts, ppfx, needFlag, locOptSfxEntry.flags[j], pfxcclass );
+							if (rv) 
+							{
+								_optSfxEntry = locOptSfxEntry;//WIll possibily needed in compound check
+								return rv;
+							}
+						
+						}
+					}
+					// get next suffix entry from table
+					locOptSfxEntry = locOptSfxEntry.nextElementWithKey;
+				}
+			}
+
+			//now handle the general case
+			for ( var i:int =word.length-1; i >= 0 ; --i ) 
+			{
+				tmpWord = word.substr(i);
+				if ( _optSuffixKeyTable[tmpWord] != undefined ) 
+				{
+					locOptSfxEntry = (_optSuffixKeyTable[tmpWord] is OptimizedSuffixEntry)? _optSuffixKeyTable[tmpWord] : null;
+					
+					while ( locOptSfxEntry )
+					{
+						for(j=0;locOptSfxEntry.flags && j<locOptSfxEntry.flags.length; j++)
+						{
+							if(this.contClasses[locOptSfxEntry.flags[j]]==true)
+							{	
+							 //if this can be a possible contclass check furthur
+							rv = locOptSfxEntry.checkTwoWord(word, sfxopts, ppfx, needFlag,locOptSfxEntry.flags[j], pfxcclass );
+							if ( rv) 
+								{
+								_optSfxEntry = locOptSfxEntry;//WIll possibily needed in compound check
+								return rv;	
+								}
+							}
+						}
+						locOptSfxEntry = locOptSfxEntry.nextElementWithKey;
+					}
+				}
+			}
+			
+			return rv;//will be null in most cases
+			
+		}
+
+		/*
+		 * Deprecated function for now...
+		 * History: 
+		 *          A pre-version of implementation for error detection. After I optimized the code for performance,
+		 *          I drop this function by that time, but you know performance meassuring is a tricky problem... 
+		 * ToDo: Need a revisit when we implementing complex-affix support and compound-word support.
+		 */
+		public function suffixCheck2( word:String, sfxopts:int, ppfx:AffixEntry, needFlag:int, inCompound:int):HashEntry {
+			var rv:HashEntry  = null;
+			var tmpWord:String;
+			// first handle the special case of 0 length suffixes
+			if ( this._suffixKeyTable[''] != undefined  ) {
+				_sfxEntry = this._suffixKeyTable[''];
+				while ( _sfxEntry ) {
+					// fogemorpheme
+					// permit prefixes in compounds
+						// check prefix
+					rv = _sfxEntry.checkWord(word, sfxopts, ppfx, inCompound, needFlag);
+					if ( rv ) {
+						return rv;
+					}
+					_sfxEntry = _sfxEntry.nextElementWithKey;
+				}
+				
+			}
+			// now handle the general case
+			for ( var i:int =word.length-1; i > 0 ; --i ) {
+				tmpWord = word.substr(i);
+				if ( _suffixKeyTable[tmpWord] != undefined ) {
+					_sfxEntry = _suffixKeyTable[tmpWord];
+					// fogemorpheme
+					// permit prefixes in compounds
+						// check prefix
+					while ( _sfxEntry ) {
+						rv = _sfxEntry.checkWord(word, sfxopts, ppfx, inCompound, needFlag);
+						if ( rv) {
+							return rv;
+						}
+						_sfxEntry = _sfxEntry.nextElementWithKey;
+					}
+				}
+			}
+			
+			return rv;
+		}
+
+		
+		/*
+		 * Deprecated function for now...
+		 * History: 
+		 *          A pre-version of implementation for error detection. After I optimized the code for performance,
+		 *          I drop this function by that time, but you know performance meassuring is a tricky problem... 
+		 * ToDo: Need a revisit when we implementing complex-affix support and compound-word support.
+		 */
+		private function prefixCheck2(word:String, inCompound:int, needFlag:int) :HashEntry {
+			var rv:HashEntry = null;
+			var tmpWord:String;
+			// first handle the special case of 0 length prefixes
+			if ( _prefixKeyTable[''] != undefined ) {
+				_pfxEntry = _prefixKeyTable[''];
+				while ( _pfxEntry ) {
+					// fogemorpheme
+					// permit prefixes in compounds
+						// check prefix
+					rv = _pfxEntry.checkWord(word, inCompound, needFlag);
+					if ( rv ) {
+						return rv;
+					}
+					_pfxEntry = _pfxEntry.nextElementWithKey;
+				}
+			}
+			
+			// now handle the general case
+			for ( var i:int =1; i < word.length ; ++i ) {
+				tmpWord = word.substr(0,i);
+				if ( _prefixKeyTable[tmpWord] != undefined ) {
+					_pfxEntry = _prefixKeyTable[tmpWord];
+					// fogemorpheme
+					// permit prefixes in compounds
+						// check prefix
+					while ( _pfxEntry ) {
+						rv = _pfxEntry.checkWord(word, inCompound, needFlag);
+						if ( rv) {
+							return rv;
+						}
+						_pfxEntry = _pfxEntry.nextElementWithKey;
+					}
+				}
+			}
+			
+			return rv;
+		}
+		
+		public function lookup(word:String ):HashEntry {
+			var he:HashEntry = null;
+			var i:int;
+			// look word in hash table
+			for ( i=0; i < this._dictMgr.dictonaryList.length && !he; ++i ) {
+				he = this._dictMgr.dictonaryList[i].getElement(word);
+			}
+			return he;
+		}
+		
+		public function set flagMode(value:int) :void {
+			this._flagMode = value;
+		}
+		
+		public function get flagMode():int {
+			return this._flagMode;
+		}
+		
+		public function set encoding(value:String) :void {
+			this._encoding = value;
+		}
+		
+		public function get encoding():String {
+			return this._encoding;
+		}
+		
+		public function set keepCase(value:Number):void {
+			this._keepCase = value;
+		}
+		
+		public function get keepCase():Number {
+			return this._keepCase;
+		}
+		
+		public function set haveContClass(value:Boolean):void {
+			this._haveContClass = value;
+		}
+		
+		public function get haveContClass():Boolean {
+			return this._haveContClass;
+		}
+		
+		public function set needAffix(value:Number):void {
+			this._needAffix = value;
+		}
+		public function get needAffix():Number {
+			return this._needAffix;
+		}
+
+		
+		public function set circumfix(value:Number):void {
+			this._circumfix = value;
+		}
+		public function get circumfix():Number {
+			return this._circumfix;
+		}
+
+		public function set onlyInCompound(value:Number):void {
+			this._onlyInCompound = value;
+		}
+		public function get onlyInCompound():Number {
+			return this._onlyInCompound;
+		}
+
+		public function set dictionaryManager(value:DictionaryManager) :void {
+			this._dictMgr = value;
+		}
+		
+		public function get dictionaryManager():DictionaryManager {
+			return this._dictMgr;
+		}
+
+
+		public function set fullStrip(value:int):void {
+			this._fullStrip = value;
+		}
+		
+		public function get fullStrip():int {
+			return this._fullStrip;
+		}
+		
+		public function set suggestionsWithDots(value:int):void {
+			this._sugswithdots = value;
+		}
+		
+		public function get suggestionsWithDots():int {
+			return this._sugswithdots;
+		}
+		
+		public function set nosplitSuggestions(value:int ) :void {
+			this._nosplitsugs = value;
+		}
+		
+		public function get nosplitSuggestions():int {
+			return this._nosplitsugs;
+		}
+		
+		public function set maxNgramSuggestions(value:int ) :void {
+			this._maxngramsugs = value;
+		}
+		
+		public function get maxNgramSuggestions():int {
+			return this._maxngramsugs;
+		}
+		
+		public function set version(value:String) :void {
+			this._version = value;
+		}
+		
+		public function get version():String {
+			return this._version;
+		}
+		
+		public function set languageCode(value:String) :void {
+			this._languageCode = value;	
+		}
+		
+		public function get languageCode():String {
+			return this._languageCode;
+		}
+		
+		public function set wordChars(value:String):void {
+			this._wordChars= value;
+		}
+		
+		public function get wordChars():String {
+			return this._wordChars;
+		}
+
+		public function addMapFilter(mapString:String ):Boolean {
+			var mf:MapFilter = new MapFilter(mapString);
+			for ( var i:int; i< this._mapFilterTable.length; ++i ) {
+				if ( this._mapFilterTable[i].mapCharSet == mapString ) {
+					return false;
+				}
+			}
+			this._mapFilterTable.push(mf);
+			return true;
+		}
+
+		public function addSimpleFilter(matchString:String, replacement:String):Boolean {
+			var sf:SimpleFilter = new SimpleFilter( matchString, replacement);
+			for ( var i:int; i< this._simpleFilterTable.length; ++i ) {
+				if ( (this._simpleFilterTable[i].matchString==matchString) && (this._simpleFilterTable[i].replacement==replacement ) ) {
+					return false;
+				}
+			}
+			this._simpleFilterTable.push(sf);
+			return true;
+		}
+		
+	
+		//--adding to iconv/oconv table
+		
+		public function addConvFilter(matchString:String, replacement:String, ioflag:Boolean):Boolean {
+			var convTable:Array;
+			convTable=(ioflag==true)?this._iconvFilterTable:this._oconvFilterTable;
+			for ( var i:int; convTable && i< convTable.length; ++i ) {
+				if ( (convTable[i].matchString==matchString) && (convTable[i].replacement==replacement ) ) {
+					return false;
+				}
+			}
+			var sf:SimpleFilter = new SimpleFilter( matchString, replacement);
+			convTable.push(sf);
+			return true;
+		}
+		
+		public function addAffixEntry(affixFlag:int, stripString:String, affixValue:String, conditionsStr:String, morph:String = "", permission:Boolean = false, affixType:int = 0, contclass:String=null):Boolean{
+			if ( stripString == null || affixValue == null || conditionsStr==null || conditionsStr=="" ) return false;
+			if ( affixType == 0 ) {
+				if ( stripString == null || affixValue == null || conditionsStr==null || conditionsStr=="" ) return false;
+				var pfxEntry:PrefixEntry = new PrefixEntry(affixFlag,stripString,affixValue,conditionsStr,morph,permission,contclass);
+				pfxEntry.attributeManager = this;
+				addPrefixEntry(pfxEntry);
+				addOptPrefixEntry(pfxEntry);
+			}else {
+				if ( stripString == null || affixValue == null || conditionsStr==null || conditionsStr=="" ) return false;
+				var sfxEntry:SuffixEntry = new SuffixEntry(affixFlag,stripString,affixValue,conditionsStr,morph,permission,contclass);
+				sfxEntry.attributeManager = this;
+				addSuffixEntry(sfxEntry);	
+				addOptSuffixEntry(sfxEntry);
+			}
+			return true;
+		}
+
+		private function addOptPrefixEntry(pfxEntry:PrefixEntry):Boolean {
+			var optPfxEntry:OptimizedPrefixEntry
+			var hashKey:String = pfxEntry.affixKey.charAt(0);
+			optPfxEntry = new OptimizedPrefixEntry(pfxEntry);
+			optPfxEntry.attributeManager = this;
+			//insert prefix key table....
+			if ( _optPrefixKeyTable[hashKey] == undefined ) {
+				_optPrefixKeyTable[hashKey] = new Array();
+				_optPrefixKeyTable[hashKey].push(optPfxEntry);
+			}
+			else {
+				for each( var optPfxKeyEntry:OptimizedPrefixEntry  in _optPrefixKeyTable[hashKey] ){
+					if ( optPfxKeyEntry.affixKey == pfxEntry.affixKey ) {
+						while( optPfxKeyEntry.nextElementWithKey != null ) {
+							if ( optPfxKeyEntry.isSimilarObject(pfxEntry) ) {
+								optPfxKeyEntry.extendObject(pfxEntry);
+								return true;
+							}
+							optPfxKeyEntry = optPfxKeyEntry.nextElementWithKey; 
+						}
+						if ( optPfxKeyEntry.isSimilarObject(pfxEntry) ) {
+							optPfxKeyEntry.extendObject(pfxEntry);
+							return true;
+						}
+						optPfxKeyEntry.nextElementWithKey = optPfxEntry;
+						return true;
+					}
+				}
+				_optPrefixKeyTable[hashKey].push(optPfxEntry);
+				_optPrefixKeyTable[hashKey].sortOn("affixKey");
+			}				
+			return true;
+			
+		}
+
+		
+		private function addOptSuffixEntry(sfxEntry:SuffixEntry):Boolean {
+			var optSfxEntry:OptimizedSuffixEntry
+
+			//insert suffix key table....
+			if ( _optSuffixKeyTable[sfxEntry.affixKey] == undefined ) {
+				optSfxEntry = new OptimizedSuffixEntry(sfxEntry);
+				optSfxEntry.attributeManager = this;
+				_optSuffixKeyTable[sfxEntry.affixKey] = optSfxEntry;
+			}
+			else {
+				var optSfxKeyEntry:OptimizedSuffixEntry = _optSuffixKeyTable[sfxEntry.affixKey];
+				while( optSfxKeyEntry.nextElementWithKey != null ) {
+					if ( optSfxKeyEntry.isSimilarObject(sfxEntry) ) {
+						optSfxKeyEntry.extendObject(sfxEntry);
+						return true;
+					}
+					optSfxKeyEntry = optSfxKeyEntry.nextElementWithKey; 
+				}
+				if ( optSfxKeyEntry.isSimilarObject(sfxEntry) ) {
+					optSfxKeyEntry.extendObject(sfxEntry);
+					return true;
+				}
+				optSfxEntry = new OptimizedSuffixEntry(sfxEntry);
+				optSfxEntry.attributeManager = this;
+				optSfxKeyEntry.nextElementWithKey = optSfxEntry;
+			}				
+			return true;
+			
+		}
+		
+		
+		
+		private function addPrefixEntry(pfxEntry:PrefixEntry):Boolean {
+			// We may combine prefix/suffix insertion into one function in the future, it could be good for reduce the code size.
+			// Since may there is some difference between prefix and suffix, so leave it with different class and different table....
+			// need better consideration for performance and code style in next step...
+			var flagChar:String;
+			flagChar = String.fromCharCode(pfxEntry.flag);
+			// insert prefix flag table...
+			if ( _prefixFlagTable[flagChar] == undefined )
+				_prefixFlagTable[flagChar] = pfxEntry;
+			else {
+				var pfxFlagEntry:PrefixEntry = _prefixFlagTable[flagChar];
+				while( pfxFlagEntry.nextElementWithFlag != null ) {
+					pfxFlagEntry = pfxFlagEntry.nextElementWithFlag; 
+				}
+				pfxFlagEntry.nextElementWithFlag = pfxEntry;
+			}
+			
+			//insert prefix key table....
+			if ( _prefixKeyTable[pfxEntry.affixKey] == undefined ) 
+				_prefixKeyTable[pfxEntry.affixKey] = pfxEntry;
+			else {
+				var pfxKeyEntry:PrefixEntry = _prefixKeyTable[pfxEntry.affixKey];
+				while( pfxKeyEntry.nextElementWithKey != null ) {
+					pfxKeyEntry = pfxKeyEntry.nextElementWithKey; 
+				}
+				pfxKeyEntry.nextElementWithKey = pfxEntry;
+			}			
+			return true;
+		}
+		
+		private function addSuffixEntry(sfxEntry:SuffixEntry ):Boolean {
+			// We may combine prefix/suffix insertion into one function in the future, it could be good for reduce the code size.
+			// Since may there is some difference between prefix and suffix, so leave it with different class and different table....
+			// need better consideration for performance and code style in next step...
+			var flagChar:String;
+			flagChar = String.fromCharCode(sfxEntry.flag);
+			// insert suffix flag table...
+			if ( _suffixFlagTable[flagChar] == undefined )
+				_suffixFlagTable[flagChar] = sfxEntry;
+			else {
+				var sfxFlagEntry:SuffixEntry = _suffixFlagTable[flagChar];
+				while( sfxFlagEntry.nextElementWithFlag != null ) {
+					sfxFlagEntry = sfxFlagEntry.nextElementWithFlag; 
+				}
+				sfxFlagEntry.nextElementWithFlag = sfxEntry;
+			}
+			
+			//insert suffix key table....
+			if ( _suffixKeyTable[sfxEntry.affixKey] == undefined ) 
+				_suffixKeyTable[sfxEntry.affixKey] = sfxEntry;
+			else {
+				var sfxKeyEntry:SuffixEntry = _suffixKeyTable[sfxEntry.affixKey];
+				while( sfxKeyEntry.nextElementWithKey != null ) {
+					sfxKeyEntry = sfxKeyEntry.nextElementWithKey; 
+				}
+				sfxKeyEntry.nextElementWithKey = sfxEntry;
+			}				
+			
+			return true;
+		}
+		
+		/*
+		 * Deprecated function for now...
+		 * History: 
+		 *          A pre-version of implementation for error detection. After I optimized the code for performance,
+		 *          I drop this function by that time, but you know performance meassuring is a tricky problem... 
+		 * ToDo: Need a revisit when we implementing complex-affix support and compound-word support.
+		 */
+		public function addAffixEntry2(affixFlag:int, stripString:String, affixValue:String, conditionsStr:String, morph:String = "", permission:Boolean = false, affixType:int = 0):Boolean{
+			if ( stripString == null || affixValue == null || conditionsStr==null || conditionsStr=="" ) return false;
+			if ( affixType == 0 ) {
+				if ( stripString == null || affixValue == null || conditionsStr==null || conditionsStr=="" ) return false;
+				var pfxEntry:PrefixEntry = new PrefixEntry(affixFlag,stripString,affixValue,conditionsStr,morph,permission);
+				pfxEntry.attributeManager = this;
+				addPrefixEntry(pfxEntry);
+			}else {
+				if ( stripString == null || affixValue == null || conditionsStr==null || conditionsStr=="" ) return false;
+				var sfxEntry:SuffixEntry = new SuffixEntry(affixFlag,stripString,affixValue,conditionsStr,morph,permission);
+				sfxEntry.attributeManager = this;
+				addSuffixEntry(sfxEntry);	
+			}
+			return true;
+		}
+		
+		public function get prefixFlagTable():Array {
+			return this._prefixFlagTable;
+		}
+		
+		public function get prefixKeyTable():Array {
+			return this._prefixKeyTable;
+		}
+		
+		public function get suffixFlagTable():Array {
+			return this._suffixFlagTable;
+		}
+		
+		public function get suffixKeyTable():Array {
+			return this._suffixKeyTable;
+		}
+		
+		public function set forbiddenWord(value:Number) :void {
+			this._forbiddenWord = value;
+		}
+		
+		public function get forbiddenWord():Number {
+			return this._forbiddenWord;
+		}
+		
+		public function set ignoredChars(value:String ) :void {
+			this._ignoredChars = value;
+		}
+		
+		public function get ignoredChars():String {
+			return this._ignoredChars;
+		}
+		
+		public function set keyString(value:String):void {
+			this._keyString = value;
+		}
+		
+		public function get keyString():String {
+			if ( this._keyString == null ) this._keyString=InternalConstants.SPELL_KEYSTRING;
+			return this._keyString;
+		}
+		
+		public function set tryString(value:String):void {
+			this._tryString = value;
+		}
+		
+		public function get tryString():String {
+			return this._tryString;
+		}
+		
+		public function get contClasses():Dictionary {
+			return _contClasses;
+		}
+		
+		
+		public function set noSuggest(value:Number ):void {
+			this._noSuggest = value;
+		}
+		public function get noSuggest():Number {
+			return this._noSuggest;
+		}
+		
+		public function get simpleFilterTable():Array {
+			return this._simpleFilterTable;
+		}
+		
+		public function get iconvFilterTable():Array {
+			return this._iconvFilterTable;
+		}
+		
+		public function get oconvFilterTable():Array {
+			return this._oconvFilterTable;
+		}
+		
+/*		public function get phoneTable():PhoneticTable {
+			return this._phoneTable;
+		}
+*/		
+		public function get breakTable():Array {
+			return this._breakTable;
+		}
+		public function get aliasfTable():Array{
+			return this._aliasfTable;
+		}
+
+		
+		public function get mapFilterTable():Array {
+			return this._mapFilterTable;
+		}
+				
+	/*This function is used for supporting ICONV/OCONV rule. This function is called whenever an input or output conversion is needed.*/			
+		public function conv(word:String,convWord:Array,ioflag:Boolean):Boolean{
+			var searchIndex:int=0;
+			var change:Boolean=false;
+			var wspace:String;
+			var convTable:Array=(ioflag)?this._iconvFilterTable:this._oconvFilterTable;
+			if ( (convTable==null) || (convTable.length == 0) ) return false;
+			for ( var i:int = 0; i < convTable.length; ++i ) {
+				while ( (searchIndex = word.indexOf( convTable[i].matchString,searchIndex)) != -1 ){
+					searchIndex = searchIndex + convTable[i].matchString.length;
+					wspace = word.substr(0, searchIndex-convTable[i].matchString.length) + 
+						convTable[i].replacement + 
+						word.substr(searchIndex);
+					if(wspace)
+						word=wspace;
+					change=true;
+				}
+				
+			}
+			convWord.push(wspace);
+			return change;
+		}
+
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/SpellingInfo.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/SpellingInfo.as b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/SpellingInfo.as
new file mode 100644
index 0000000..2b874dd
--- /dev/null
+++ b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/SpellingInfo.as
@@ -0,0 +1,32 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+package com.adobe.linguistics.spelling.core
+{
+	public class SpellingInfo
+	{
+		public var Info:Number;
+		public function SpellingInfo(information:Number)
+		{
+			Info=information;
+		}
+
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/SquigglyDictionary.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/SquigglyDictionary.as b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/SquigglyDictionary.as
new file mode 100644
index 0000000..4b80d7c
--- /dev/null
+++ b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/SquigglyDictionary.as
@@ -0,0 +1,207 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+
+package  com.adobe.linguistics.spelling.core
+{
+
+	import com.adobe.linguistics.spelling.core.container.HashTable;
+	import com.adobe.linguistics.spelling.core.env.InternalConstants;
+	import com.adobe.linguistics.spelling.core.error.*;
+	import com.adobe.linguistics.spelling.core.utils.StringUtils;
+	
+	import flash.utils.Dictionary;
+	
+	
+	public class SquigglyDictionary
+	{
+		private var _hashtbl:HashTable;
+		private var _forbiddenword:int;
+		private var _ignoredCharSet:String;
+		private var _flag_mode:int;
+		private var _languageCode:String;
+
+
+
+		public function SquigglyDictionary(attrMgr:LinguisticRule)
+		{
+			_hashtbl = new HashTable( true ); // useWeakReferences:Boolean = true
+			
+			if ( !attrMgr) {
+				_forbiddenword = InternalConstants.FORBIDDENWORD;
+				_ignoredCharSet = null;
+				_flag_mode = InternalConstants.FLAG_CHAR;
+				_languageCode = null;
+			}
+		}
+		
+		private function set forbiddenword(value:int ) :void {
+			this._forbiddenword = value;
+		}
+		
+		public function get forbiddenword():int {
+			return this._forbiddenword;
+		}
+		
+		private function set ignoredCharSet(value:String):void {
+			this._ignoredCharSet = value;
+		}
+		
+		public function get ignoredCharSet():String {
+			return this._ignoredCharSet;
+		}
+		
+		private function set flag_mode(value:int):void {
+			this._flag_mode = value;
+		} 
+		
+		public function get flag_mode():int {
+			return this._flag_mode;
+		}
+		
+		private function set languageCode(value:String ) :void {
+			this._languageCode = value;
+		}
+		
+		public function get languageCode():String {
+			return this._languageCode;
+		}
+
+		public function containsKey(key:String ):Boolean
+		{
+			return _hashtbl.containsKey(key );
+		}
+		
+		public function getElement( key:String ):HashEntry {
+			var res:* = _hashtbl.getElement(key );
+			return (res is HashEntry) ? res:null;
+//			return _hashtbl.getElement(key );
+		}
+		
+		public function put(key:String, affixString:String=null, description:String = null):Boolean {
+			return addWord( key, affixString, description );	
+		}
+		
+		public function get dictionary():Dictionary {
+			return this._hashtbl.hashMap;
+		}
+		
+		public function filter( callback:Function, thisObject:* = null):Array {
+			var res:Array = new Array();
+			var index:int;
+			var dict:Dictionary = this._hashtbl.hashMap;
+			for ( var key:* in dict ) {
+				if ( callback( key, index, res ) ) {
+					res.push( key );
+				}
+			}
+			
+			return (res.length == 0) ? null: res;
+		}
+		
+		
+		public function addWord( word:String, affix:String = null, desc:String = null ) :Boolean {
+			var res:Boolean = false;
+			if ( word == null ) return false;
+			var captype:int = StringUtils.getCapType(word);
+			if ( addWordWithAffix(word,affix,desc,false ) )
+				res = true;
+			addHiddenCapitalizedWord(word,captype, affix,desc);
+			return res;		
+		}
+
+		private function addHiddenCapitalizedWord( word:String, captype:int, affix:String=null, desc:String=null ) :Boolean {
+			// add inner capitalized forms to handle the following allcap forms:
+			// Mixed caps: OpenOffice.org -> OPENOFFICE.ORG
+			// Allcaps with suffixes: CIA's -> CIA'S
+			if (((captype == InternalConstants.HUHCAP) || (captype == InternalConstants.HUHINITCAP) ||((captype == InternalConstants.ALLCAP) && (affix != null))) &&
+			!((affix != null) && HashEntry.TESTAFF(affix, _forbiddenword))) {
+				affix += String.fromCharCode(InternalConstants.ONLYUPCASEFLAG);
+				word = word.toLocaleLowerCase();
+				word = word.charAt(0).toLocaleUpperCase() + word.substr(1);
+				addWordWithAffix(word,affix,desc,true);
+			}
+			return true;
+		}
+
+		private function addWordWithAffix( word:String, affix:String, desc:String, onlyupcase:Boolean ):Boolean {
+			var upcasehomonym:Boolean = false;
+			if (_ignoredCharSet != null) {
+				word = StringUtils.removeIgnoredChars(word, _ignoredCharSet);
+			}
+//ToDo: the following comment should be removed after we have complex-affix support.
+//
+//			if (complexprefixes) {
+//				reverseword(word);
+//			}
+//        hp->var = H_OPT;
+//        if (aliasm) {
+//            hp->var += H_OPT_ALIASM;
+//            store_pointer(hpw + wbl + 1, get_aliasm(atoi(desc)));
+//        } else {
+//            strcpy(hpw + wbl + 1, desc);
+//            if (complexprefixes) {
+//                if (utf8) reverseword_utf(HENTRY_DATA(hp));
+//                else reverseword(HENTRY_DATA(hp));
+//            }
+//        }
+//        if (strstr(HENTRY_DATA(hp), MORPH_PHON)) hp->var += H_OPT_PHON;
+			
+			if ( _hashtbl.containsKey(word) ) {
+
+				var hentry:HashEntry = _hashtbl.getElement(word);
+				while ( hentry.next != null ) {
+					// remove hidden onlyupcase homonym
+					if ( !onlyupcase ) {
+						if ( (hentry.affixFlagVector != null) && hentry.testAffix(InternalConstants.ONLYUPCASEFLAG) ) {
+							hentry.affixFlagVector = affix;
+							hentry.variableFields = desc; /* need a better implementation,refer the beginning of this function */
+							return true;
+						}
+					}else {
+						upcasehomonym = true;
+					}
+					hentry = hentry.next;
+				}
+				// remove hidden onlyupcase homonym
+				if ( !onlyupcase ) {
+					if ( (hentry.affixFlagVector != null) && hentry.testAffix(InternalConstants.ONLYUPCASEFLAG) ) {
+						hentry.affixFlagVector = affix;
+						hentry.variableFields = desc; /* need a better implementation,refer the beginning of this function */
+						return true;
+					}
+				}else {
+					upcasehomonym = true;
+				}
+
+				if ( !upcasehomonym ) {
+					hentry.addEntry(affix,desc);
+					return true;
+				}else
+					return false;
+			}else {
+				_hashtbl.put(word, new HashEntry(affix,desc) );
+				return true;
+			}
+		}		
+
+
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/SquigglyEngine.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/SquigglyEngine.as b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/SquigglyEngine.as
new file mode 100644
index 0000000..d7fdc5c
--- /dev/null
+++ b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/SquigglyEngine.as
@@ -0,0 +1,426 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+package com.adobe.linguistics.spelling.core
+{
+
+	import com.adobe.linguistics.spelling.core.env.ExternalConstants;
+	import com.adobe.linguistics.spelling.core.env.InternalConstants;
+	import com.adobe.linguistics.spelling.core.utils.*;
+	
+	public class SquigglyEngine
+	{
+
+		private var _ignoreCappedWord:Boolean;		// Hello is always correct
+		private var _ignoreAllUpperCase:Boolean;	// HELLO is always correct
+		private var _ignoreWordWithNumber:Boolean;	// win2003 is always correct
+		private var wordBreak:Array;				// Used to hold BREAK characters for BREAK rule
+		private const SPELL_COMPOUND:int =				(1 << 0);
+		private const SPELL_FORBIDDEN:int =				(1 << 1);
+		private const SPELL_ALLCAP:int =				(1 << 2);
+		private const SPELL_NOCAP:int =					(1 << 3);
+		private const SPELL_INITCAP:int =				(1 << 4);
+
+		private const MAXDIC:int =						20;
+		private const MAXSHARPS:int =					5;
+
+		private var attributeMgr:LinguisticRule;
+		private var dictMgr:DictionaryManager;
+		private var sugestionMgr:SuggestionManager;
+		private var encoding:String;
+		private var wordbreak:Array;//an Array that holds the word breaks
+		private var langCode:int;
+		private var complexPrefixes:int;
+		private var maxWordLength:int;
+
+		public function SquigglyEngine( rule:LinguisticRule, dict:SquigglyDictionary )
+		{
+			if ( rule == null ) throw new Error("illegal argument for constructor", 200901);
+			if ( dict == null ) throw new Error("illegal argument for constructor", 200901);
+			
+			maxWordLength = InternalConstants.MAXWORDLEN;
+			
+			dictMgr = new DictionaryManager();
+			dictMgr.addDictionary(dict);
+			attributeMgr = rule;
+			attributeMgr.dictionaryManager = dictMgr;
+			sugestionMgr = new SuggestionManager( rule, false);
+			this.wordbreak=attributeMgr.breakTable;
+			this.ignoreWordWithNumber = false;
+			this.ignoreCappedWord = false;
+			this.ignoreAllUpperCase = false;
+
+		}
+		
+		public function set ignoreWordWithNumber( value:Boolean):void {
+			this._ignoreWordWithNumber =value;
+		}
+		public function get ignoreWordWithNumber():Boolean {
+			return this._ignoreWordWithNumber;
+		}
+		
+		public function set ignoreCappedWord(value:Boolean):void {
+			this._ignoreCappedWord = value;
+		}
+		public function get ignoreCappedWord():Boolean {
+			return this._ignoreCappedWord;
+		}
+		
+		public function set ignoreAllUpperCase(value:Boolean ):void {
+			this._ignoreAllUpperCase = value;
+		}
+		public function get ignoreAllUpperCase():Boolean {
+			return this._ignoreAllUpperCase;
+		}
+		
+		public function set fastMode(value:Boolean ) :void {
+			this.sugestionMgr.fastMode = value;
+		}
+		
+		public function get fastMode():Boolean {
+			return this.sugestionMgr.fastMode;
+		}
+		
+		public function addDictionary( dict:SquigglyDictionary ) : Boolean {
+			return dictMgr.addDictionary(dict);
+		}
+		
+		public function spell( word:String ) :Boolean {
+			if ( word.length > maxWordLength ) return false;
+			
+			word = StringUtils.normalize(word);
+			
+			var captype:int = InternalConstants.NOCAP;
+			var hasNumber:Boolean =false; //assuming that there are no numbers;
+			var abbv:int = 0;
+			var i:int;
+			var rv:HashEntry = null;
+			var info:SpellingInfo = new SpellingInfo(0);
+			var wspace:String;
+			// input conversion USING ICONV TABLE
+/*	//Commented code is a unit test code
+			var teststr:String="marùvîà ";
+			var teststr2:String;
+this.attributeMgr.conv(teststr,convWord,true);
+	teststr2=convWord.pop();
+	if(teststr2){
+	trace("Called Word "+teststr+"converted word "+teststr2);
+	}
+	else 
+	trace("NUUUllll");
+*/
+
+			var convWord:Array=new Array;
+			if(this.attributeMgr && this.attributeMgr.iconvFilterTable && this.attributeMgr.iconvFilterTable.length!=0){
+			this.attributeMgr.conv(word,convWord,InternalConstants.CONV_ICONV);
+			wspace=convWord.pop();
+			if(wspace) word=wspace;
+			}
+			
+			// first skip over any leading or trailing blanks
+			word = StringUtils.trim( word );
+			
+			// now strip off any trailing periods (recording their presence)
+			for ( i = word.length-1; (i>=0) && (word.charCodeAt(i) == 46) ; --i ) { // '.'
+				abbv++;
+			}
+			word = word.substr(0, word.length- abbv );
+			captype = StringUtils.getCapType(word);
+			hasNumber=StringUtils.getHasNumber(word);
+			if ( (dictMgr.isEmpty()) || (word.length == 0) ) return false;
+			
+			// allow numbers with dots, dashes and commas (but forbid double separators: "..", "--" etc.)
+			const NBEGIN:int = 0, NNUM:int=1, NSEP:int=2;
+			var nstate:int = NBEGIN;
+			var charCode:int;
+			for ( i=0 ; i < word.length ; ++i ) {
+				charCode =  word.charCodeAt(i);
+				if ( (charCode <= 57 ) && ( charCode >= 48) ) { // '0' to '9'
+					nstate = NNUM;
+				}else if ( (charCode==44) || (charCode==45) || (charCode==46) ) { //',' or '.' or '-'
+					if ( (nstate == NSEP) || ( i==0 ) ) return false;
+					nstate = NSEP;
+				}else break;
+			}
+			if ( (i==word.length) && ( nstate == NNUM ) ) return true;//checks if all are just numbers
+			// ignore word with Number.
+			if ( ignoreWordWithNumber && hasNumber)return true;//Ignore word with numbers!
+				
+			// ignore cappitalized word  or ignore all upper case word.
+			if ( (ignoreCappedWord &&( (captype&InternalConstants.HUHINITCAP) || (captype&InternalConstants.INITCAP))&&(hasNumber==false) ) || (ignoreAllUpperCase&&(captype & InternalConstants.ALLCAP)&&(hasNumber==false)) ) return true;	//return only if it does not have number	
+			
+			
+			switch(captype) {
+				case InternalConstants.HUHCAP:
+				case InternalConstants.HUHINITCAP:
+				case InternalConstants.NOCAP:
+					rv = checkWord(word,info);
+					if ( (abbv!=0) && (rv == null ) ) {
+						word += ".";
+						rv = checkWord(word,info);
+					}
+					break;
+				case InternalConstants.ALLCAP:
+					rv = checkWord(word,info);
+					if( rv ) break;
+					if ( (abbv!=0 ) ) {
+						word +=".";
+						rv = checkWord(word,info);
+						if ( rv ) break;
+					}
+					// ToDo:   Spec. prefix handling for Catalan, French, Italian:
+					// prefixes separated by apostrophe (SANT'ELIA -> Sant'+Elia).
+					// need better understand...
+					
+					//sharps handle....
+
+					word = word.charAt(0).toUpperCase()+word.slice(1).toLocaleLowerCase();
+					
+				case InternalConstants.INITCAP: 
+					if (captype == InternalConstants.INITCAP) info.Info +=ExternalConstants.SPELL_INITCAP;
+					wspace = word.toLocaleLowerCase();
+					rv = checkWord(word,info);
+					if (captype == InternalConstants.INITCAP) info.Info -=ExternalConstants.SPELL_INITCAP;
+					
+					// forbid bad capitalization
+					// (for example, ijs -> Ijs instead of IJs in Dutch)
+					// use explicit forms in dic: Ijs/F (F = FORBIDDENWORD flag)
+					if (info.Info & ExternalConstants.SPELL_FORBIDDEN) {
+						rv = null;
+					}
+					
+					if ( rv && (captype == InternalConstants.ALLCAP ) ) {
+						if ( attributeMgr && rv.affixFlagVector && attributeMgr.keepCase && rv.testAffix(attributeMgr.keepCase) ) rv = null;
+					}
+					if ( rv) break;
+					
+					rv = checkWord(wspace,info);
+					if ( !rv && abbv ) {
+						wspace += ".";
+						rv = checkWord(wspace,info);
+						if ( !rv) {
+							word += ".";
+							if (captype == InternalConstants.INITCAP) info.Info +=ExternalConstants.SPELL_INITCAP;
+							rv = checkWord(word,info);
+							if (captype == InternalConstants.INITCAP) info.Info -=ExternalConstants.SPELL_INITCAP;
+							if ( rv && (captype == InternalConstants.ALLCAP ) ) {
+								if ( attributeMgr && rv.affixFlagVector && attributeMgr.keepCase && rv.testAffix(attributeMgr.keepCase) ) rv = null;
+							}
+						}
+					} 
+					if ( rv && (captype == InternalConstants.ALLCAP ) ) {
+						if ( attributeMgr && rv.affixFlagVector && attributeMgr.keepCase && rv.testAffix(attributeMgr.keepCase) ) rv = null;
+					}
+					break;
+				default:
+			}
+			
+			if ( rv ) return true;
+			
+			//implementation break-table... recursive breaking at break points
+			
+			if(wordbreak){
+				var nbr:int=0;
+				var parseArr:Array;
+				var searchIndex:int=0;
+				for(i=0; i<wordbreak.length;i++){
+					//Search for number of break points in this word
+					searchIndex=0;
+					wspace=word;
+					while (wspace && ((searchIndex=wspace.indexOf(wordbreak[i])) != -1 )) {
+						nbr++;
+						if(nbr>InternalConstants.MAX_WORD_BREAKS) return false;//Limiting maximum Word breaks
+						if(searchIndex<word.length)wspace=wspace.substr(searchIndex+1);
+					}		
+				}
+				 
+				
+				for(var j:int=0; j<wordbreak.length;j++){
+				
+					if(word.search(wordbreak[j])!=-1 && (parseArr=word.split(wordbreak[j]))!=null)
+					{
+									
+						for(i=0;i<parseArr.length;i++)
+							if(! spell(parseArr[i]) ) return false;//keep checking all parts of the input word. If any part is wrongly spelt send false
+						
+						return true;//no part is spelled wrong so send correct
+					}
+								
+				}
+							
+			}
+		
+			return false;
+		}
+		
+		public function suggest( word:String ) : Array {
+			if ( word.length > maxWordLength ) return null;
+			var captype:int = InternalConstants.NOCAP;
+			var capwords:int = 0;
+
+			var abbv:int = 0;
+			var i:int,ns:int;
+			var wspace:String;
+			var slst:Array = new Array();
+			var convWord:Array=new Array;
+			// input conversion USING ICONV TABLE
+			if(this.attributeMgr && this.attributeMgr.iconvFilterTable.length!=0){
+				this.attributeMgr.conv(word,convWord,InternalConstants.CONV_ICONV);
+			wspace=convWord.pop();
+			if(wspace)word=wspace;
+			}
+			
+			// first skip over any leading or trailing blanks
+			word = StringUtils.trim( word );
+			// now strip off any trailing periods (recording their presence)
+			for ( i = word.length-1; (i>=0) && (word.charCodeAt(i) == 46) ; --i ) { // '.'
+				abbv++;
+			}
+			word = word.substr(0, word.length- abbv );
+			captype = StringUtils.getCapType(word);
+			if ( (dictMgr.isEmpty()) || (word.length == 0) ) return null;
+			switch(captype) {
+				case InternalConstants.NOCAP: {
+					ns = sugestionMgr.suggest( slst, word, InternalConstants.NOCAP );
+					break;
+				}
+				case InternalConstants.INITCAP:{
+					capwords = 1;
+					ns = sugestionMgr.suggest( slst, word, InternalConstants.INITCAP );
+					if ( ns ==  -1) break;
+					wspace = word.toLocaleLowerCase();
+					ns = sugestionMgr.suggest( slst, wspace, InternalConstants.NOCAP );
+					break;
+				}
+				case InternalConstants.HUHINITCAP:{ 
+					capwords = 1;
+				}
+				case InternalConstants.HUHCAP: { // ToDo: still a lot of work...
+					ns = sugestionMgr.suggest( slst, word, InternalConstants.HUHCAP );
+					break;
+				}
+				case InternalConstants.ALLCAP: {
+					wspace = word.toLocaleLowerCase();
+					ns = sugestionMgr.suggest( slst, wspace, InternalConstants.NOCAP );
+					if ( ns ==  -1) break;
+					if ( this.attributeMgr.keepCase && spell(word ) ) {
+						//ns = insert_sug(slst, wspace, ns); ToDo
+					}
+					wspace = word.charAt(0).toUpperCase()+word.slice(1).toLocaleLowerCase();	
+					ns = sugestionMgr.suggest( slst, wspace, InternalConstants.INITCAP );
+					break;
+				}
+			}
+			
+			// try ngram approach since found nothing
+			if ( this.attributeMgr && (this.attributeMgr.maxNgramSuggestions != 0)) {
+				ns = sugestionMgr.nsuggest(slst,word);
+			}
+			
+			// try dash suggestion (Afo-American -> Afro-American)
+			
+			// capitalize
+			if (capwords) {
+				for ( i=0;i<slst.length; ++i ) {
+					slst[i] = slst[i].charAt(0).toUpperCase()+slst[i].slice(1);	
+				}
+			}
+			
+			// expand suggestions with dot(s)
+			if ( abbv && this.attributeMgr.suggestionsWithDots ) {
+				for ( i=0;i<slst.length; ++i ) {
+					slst[i] += ".";	
+				}
+				
+			}
+			
+			// remove bad capitalized and forbidden forms
+
+			// remove original one
+			for ( i=0;i<slst.length;++i) {
+				if ( slst[i] == word ) 
+					slst.splice(i,1);
+			}
+			
+			// remove duplications
+			
+			// output conversion
+			
+			if(this.attributeMgr && this.attributeMgr.oconvFilterTable && this.attributeMgr.oconvFilterTable.length!=0){
+				for(i=0;i<slst.length;++i){
+					if(this.attributeMgr.conv(slst[i],convWord,InternalConstants.CONV_OCONV))	
+					{wspace=convWord.pop();delete(slst[i]); slst[i]=wspace;} 
+				}
+			}
+			
+			// if suggestions removed by nosuggest, onlyincompound parameters
+
+
+			return (slst.length!=0) ? slst :null;
+		}
+		
+		private function checkWord( word:String, info:SpellingInfo ):HashEntry {
+			var i:int;
+			var he:HashEntry = null;
+			if ( attributeMgr.ignoredChars )  {
+				word = StringUtils.removeIgnoredChars(word, attributeMgr.ignoredChars);
+			}
+			// word reversing wrapper for complex prefixes
+			/*
+			if(complexprefixes) {
+				word=reverseword(word);
+			}
+			*/
+			
+			// look word in hash table
+			for ( i=0; i < dictMgr.dictonaryList.length && !he; ++i ) {
+				he = dictMgr.dictonaryList[i].getElement(word);
+				// check forbidden and onlyincompound words
+				if ( he && (he.affixFlagVector != null) && 
+					((attributeMgr) && ( he.testAffix(attributeMgr.forbiddenWord)))
+				
+				) {
+					// ToDo: LANG_hu section: set dash information for suggestions
+					return null;
+				}
+				// ToDo: he = next not needaffix, onlyincompound homonym or onlyupcase word
+/*				while (he && (he.affixFlagVector) &&
+					((attributeMgr.needAffix && testAffix(he.affixFlagVector, attributeMgr.needAffix)) ||
+						(pAMgr->get_onlyincompound() && TESTAFF(he->astr, pAMgr->get_onlyincompound(), he->alen)) ||
+						(info && (*info & SPELL_INITCAP) && TESTAFF(he->astr, ONLYUPCASEFLAG, he->alen))
+					)) //he = he.next; should maintain a next homonym which is not being maintained as of now next_homonym;
+*/			}
+					
+			// check with affixes
+			if ( !he && attributeMgr ) {
+				he = attributeMgr.affixCheck2(word,0,0);
+				//DO not allow affixed forms of forbidden words
+				if ( he && (he.affixFlagVector != null) && (attributeMgr) && he.testAffix(attributeMgr.forbiddenWord) ) {
+					// ToDo: LANG_hu section: set dash information for suggestions
+					return null;
+				}
+			}
+			
+			return he;
+		}
+		
+
+	}
+}
\ No newline at end of file


[29/50] [abbrv] remove Adobe from directory names (package name still contains Adobe)

Posted by jm...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingFramework/asdocgen.bat
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingFramework/asdocgen.bat b/Squiggly/main/AdobeSpellingFramework/asdocgen.bat
deleted file mode 100644
index b458486..0000000
--- a/Squiggly/main/AdobeSpellingFramework/asdocgen.bat
+++ /dev/null
@@ -1,18 +0,0 @@
-@echo off
-rem Licensed to the Apache Software Foundation (ASF) under one or more
-rem contributor license agreements.  See the NOTICE file distributed with
-rem this work for additional information regarding copyright ownership.
-rem The ASF licenses this file to You under the Apache License, Version 2.0
-rem (the "License"); you may not use this file except in compliance with
-rem the License.  You may obtain a copy of the License at
-rem
-rem     http://www.apache.org/licenses/LICENSE-2.0
-rem
-rem Unless required by applicable law or agreed to in writing, software
-rem distributed under the License is distributed on an "AS IS" BASIS,
-rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-rem See the License for the specific language governing permissions and
-rem limitations under the License.
-
-REM This generates the ASDoc for Engine and SInC. Modify the path as you need. TODO: move to build folder.
-"C:\Program Files\Adobe\Adobe Flash Builder 4\sdks\4.0.0\bin\asdoc" -source-path src -doc-classes com.adobe.linguistics.spelling.framework.ResourceConfig com.adobe.linguistics.spelling.framework.SpellingConfiguration com.adobe.linguistics.spelling.framework.SpellingService com.adobe.linguistics.spelling.framework.UserDictionary -library-path "C:\Program Files\Adobe\Adobe Flash Builder 4\sdks\4.0.0\frameworks\libs" -exclude-dependencies=true -output docs -main-title "AdobeSpellingFramework API Documentation 0.4" -package com.adobe.linguistics.spelling.framework "This package provides spell checking framework for easy integration with the Squiggly spelling engine."

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingFramework/src/com/adobe/linguistics/spelling/framework/ResourceTable.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingFramework/src/com/adobe/linguistics/spelling/framework/ResourceTable.as b/Squiggly/main/AdobeSpellingFramework/src/com/adobe/linguistics/spelling/framework/ResourceTable.as
deleted file mode 100644
index a72a95d..0000000
--- a/Squiggly/main/AdobeSpellingFramework/src/com/adobe/linguistics/spelling/framework/ResourceTable.as
+++ /dev/null
@@ -1,134 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-  
-package com.adobe.linguistics.spelling.framework
-{
-	import flash.utils.IDataInput;
-	import flash.utils.IDataOutput;
-	import flash.utils.IExternalizable;
-	
-	[RemoteClass(alias='com.adobe.linguistics.spelling.framework.ResourceConfig')]
-		
-	/**
-	 * The ResourceTable class contains a table mapping language to the spelling resources. Resources here imply the URL of rule file and dict file to be used for the language.
-	 * 
-	 * @includeExample ../Examples/Flex/ConfigExample/src/ConfigExample.mxml -noswf
-	 * @playerversion Flash 10
-	 * @langversion 3.0
-	 */
-	public class ResourceTable implements IExternalizable
-	{
-		private var _resources:Object;
-		
-		/**
-		 * Constructs a new ResourceTable object that performs language to resource mapping. 
-		 */
-		public function ResourceTable()
-		{
-			_resources = new Object();
-		}
-
-		/**
-		 * A list of languages supported in this ResourceTable
-		 */
-		public function get availableLanguages():Vector.<String>
-		{
-			var result:Vector.<String> = new Vector.<String>();
-			for (var i:String in _resources)
-			{
-				result.push(i);
-			}
-			return result;
-		}
-		
-		/**
-		 * Set the resource for the specified language.
-		 * 
-		 * @param language The language that you want to assign spelling resources to.
-		 * @param resource A <code>Object</code> that behave as an associated array, it 
-		 * contains the path(s) to the resource file(s). For the time being, the only 
-		 * supported resource is hunspell dictionary, which contains a rule file (.aff) and a 
-		 * dictionary file (.dic). 
-		 * 
-		 * @example The following code sets the resource for American English language.
-		 * <listing version="3.0">
-		 * var resourceTable:ResourceTable = new ResourceTable();
-		 * resourceTable.setResource("en_US", {rule:"en_US.aff", dict:"en_US.dic"});
-		 * </listing>
-		 */
-		public function setResource(language:String, resource:Object):void
-		{
-			_resources[language] = resource;
-		}
-		
-		/**
-		 * Get the resource for the specified language.
-		 * 
-		 * @param language The language associated with the resource you are looking for.
-		 * @return An <code>Object</code> that stores the resource file URL(s).
-		 * @example The following code gets and uses the resource for American English language.
-		 * <listing version="3.0">
-		 * var resource_en_US:Object = SpellingConfiguration.resourceTable.getResource("en_US");
-		 * trace("rule file:" + resource_en_US["rule"] + ", dictionary file:" + resource_en_US.dict);
-		 * </listing>
-		 */
-		public function getResource(language:String):Object
-		{
-			return _resources[language];
-		}
-		
-		/**
-		 * Overwrite toString() for debug purpose.
-		 * @private
-		 */
-		public function toString():String
-		{
-			var result:String = new String();
-			for (var i:String in _resources)
-			{
-				result += i;
-				result += ": ";
-				result += "[";
-				for (var j:String in getResource(i))
-				{
-					result += j + ":" + getResource(i)[j] + " "
-				}
-				result += "]";
-				result += "; ";
-			}
-			return result;
-		}
-		
-		/**
-		 * Implement this IExternalizable API so that it can be serialized to an ByteArray.
-		 * @private
-		 */
-		public function readExternal(input:IDataInput):void {
-			_resources = input.readObject();
-		}
-		
-		/**
-		 * Implement this IExternalizable API so that it can be serialized to an ByteArray.
-		 * @private
-		 */
-		public function writeExternal(output:IDataOutput):void {
-			output.writeObject(_resources);
-		}
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingFramework/src/com/adobe/linguistics/spelling/framework/SpellingConfiguration.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingFramework/src/com/adobe/linguistics/spelling/framework/SpellingConfiguration.as b/Squiggly/main/AdobeSpellingFramework/src/com/adobe/linguistics/spelling/framework/SpellingConfiguration.as
deleted file mode 100644
index 38f316a..0000000
--- a/Squiggly/main/AdobeSpellingFramework/src/com/adobe/linguistics/spelling/framework/SpellingConfiguration.as
+++ /dev/null
@@ -1,102 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-  
-  
-package com.adobe.linguistics.spelling.framework
-{
-	
-	
-	import flash.errors.IllegalOperationError;
-	import com.adobe.linguistics.spelling.core.env.InternalConstants;
-	import com.adobe.linguistics.spelling.framework.ResourceTable;
-	
-	/**
-	 * The SpellingConfiguration is for setting and getting the configuration for the spell checker.
-	 * 
-	 * @includeExample ../Examples/Flex/ConfigExample/src/ConfigExample.mxml -noswf
-	 * @playerversion Flash 10
-	 * @langversion 3.0
-	 */
-	
-	public class SpellingConfiguration
-	{
-		
-
-		private static var _resourceTable:ResourceTable = null;
-		private static var _enableDictionarySplit:Boolean=false;//static value so can be initialised here
-		private static var _wordsPerDictionarySplit:int=InternalConstants.WORDS_PER_SPLIT;
-		
-		/**
-		 * The resourceTable is used for mapping the language to resources.
-		 */
-		public static function get resourceTable():ResourceTable
-		{
-			// Lazy initialization for the default value
-			if (_resourceTable == null) {
-				_resourceTable = new ResourceTable();
-				//_resourceTable.setResource("en_US", {rule:"data/en_US.aff", dict:"data/en_US.dic"});
-			}
-			return _resourceTable;	
-		}
-		
-		public static function set resourceTable(resourceTable:ResourceTable):void
-		{
-			_resourceTable = resourceTable;
-		}
-		
-		/**
-		 * This is a flag that enables/disables loading of dictionary in splits.
-		 * By default this flag is set to <code>false</code>. In case the initial loading time of dictionaries is found slow, this flag should be set to <code>true</code>. By enabling this, squiggly will load dictionary in splits with each split having <code>wordsPerDictionarySplit</code> number of words.
-		 * <p>NOTE: This property, if used, should be set before calling <code>SpellUI.enableSpeliing</code>. Once <code>SpellUI.enableSpeliing</code> is called dictionaries will be loaded according to default values, and this property will not be used. </p>
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */
-		public static function get enableDictionarySplit():Boolean
-		{
-			return _enableDictionarySplit;	
-		}
-		
-		public static function set enableDictionarySplit(enableDictionarySplit:Boolean):void
-		{
-			_enableDictionarySplit = enableDictionarySplit;
-		}
-		
-		/**
-		 * This property defines the number of words in one dictionary split.
-		 * By default the value of this property is set to 20000 words. This property is used only if <code>enableDictionarySplit</code> is set to <code>true</code>. If <code>enableDictionarySplit</code> is set to <code>flase</code> this property turns void.
-		 * <p>NOTE: This property, if used, should be defined before calling <code>SpellUI.enableSpeliing</code>. Once <code>SpellUI.enableSpeliing</code> is called dictionaries will be loaded according to default values, and this property will not be used.</p>
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */
-		public static function get wordsPerDictionarySplit():int
-		{
-			
-			return _wordsPerDictionarySplit;	
-		}
-		
-		public static function set wordsPerDictionarySplit(wordsPerDictionarySplit:int):void
-		{
-			if(wordsPerDictionarySplit<=0){
-				//Do error Handling
-				throw new IllegalOperationError("wordsPerDictionarySplit should be a positive non-zero value.");
-			}
-			_wordsPerDictionarySplit = wordsPerDictionarySplit;
-		}
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingFramework/src/com/adobe/linguistics/spelling/framework/SpellingService.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingFramework/src/com/adobe/linguistics/spelling/framework/SpellingService.as b/Squiggly/main/AdobeSpellingFramework/src/com/adobe/linguistics/spelling/framework/SpellingService.as
deleted file mode 100644
index 9e687ee..0000000
--- a/Squiggly/main/AdobeSpellingFramework/src/com/adobe/linguistics/spelling/framework/SpellingService.as
+++ /dev/null
@@ -1,241 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-  
-  
-package com.adobe.linguistics.spelling.framework
-{
-	import com.adobe.linguistics.spelling.HunspellDictionary;
-	import com.adobe.linguistics.spelling.SpellChecker;
-	import com.adobe.linguistics.spelling.UserDictionary;
-	import com.adobe.linguistics.spelling.core.UserDictionaryEngine;
-	import com.adobe.linguistics.spelling.core.env.InternalConstants;
-	
-	import flash.events.Event;
-	import flash.events.EventDispatcher;
-//	import flash.utils.Timer;
-//	import flash.events.TimerEvent;
-	
-	/**
-	 * The SpellingService provides spell checking features for the specified language. 
-	 * This class makes use of SpellingConfiguration class to dynamically get the language dictionary location. The dictionaries are then loaded and SpellChecker object
-	 * created based on these dictionaries. SpellingService also caches SpellChecker and dictionary objects for individual languages for efficient reuse.
-	 * @includeExample ../Examples/Flex/SpellingServiceEsg/src/SpellingServiceEsg.mxml -noswf
-	 * @playerversion Flash 10
-	 * @langversion 3.0.
-	 * 
-	 */
-	public class SpellingService extends EventDispatcher
-	{
-		private var _language:String = null;
-		private var _engine:SpellChecker = null;
-		private var _udEngine:UserDictionaryEngine = null;
-		private var _userDictionaries:Array = new Array();
-		
-				
-		// Static table for caching engines and fixed dictionaries
-		private static var _engines:Array = new Array();
-		private static var _dicts:Array = new Array();
-		
-		/**
-		 * Constructs a spelling service object.
-		 *
-		 * @param language The language used to create a <code>SpellingService</code>.
-		 */
-		public function SpellingService(language:String)
-		{
-			_language = language;		
-		}
-
-		/**
-		 * Initialize the <code>SpellingService</code>. Once the initialization is done, an <code>Event.COMPLETE</code> event will be dispatched
-		 * and the <code>SpellingService</code> is ready to be used.
-		 */		
-		public function init():void
-		{
-			_udEngine = new UserDictionaryEngine();
-			
-			// Since the engine and dictionary are shared, the loading has three status
-			// Loaded
-			if (_engines[_language] != null)
-			{
-				loadDictComplete(null);
-			}
-			// Loading
-			else if (_dicts[_language] != null)
-			{
-				_dicts[_language].addEventListener(Event.COMPLETE, loadDictComplete);
-			}
-			// Loading not started
-			else
-			{			
-				var urls:Object = SpellingConfiguration.resourceTable.getResource(_language);
-				var hunspellDict:HunspellDictionary = new HunspellDictionary();
-				_dicts[_language] = hunspellDict;
-				hunspellDict.addEventListener(Event.COMPLETE, loadDictComplete);
-				/*added for check on 10-12-2010
-				var mytimer:Timer =new Timer(50,0);
-				mytimer.start();
-				var initTime:int =mytimer.currentCount;
-				trace(initTime);*/
-				
-				//adding code for enabling loading in parts. Since spelling service class needs SpellingConfiguration so it this property uses it.
-				hunspellDict.enableDictionarySplit=SpellingConfiguration.enableDictionarySplit;//user has to be freed from this. So we have to put a default value in SpellingConfiguration class.
-				hunspellDict.wordsPerDictionarySplit=SpellingConfiguration.wordsPerDictionarySplit;//user has to be freed from this. So we have to put a default value in SpellingConfiguration class.
-				
-				hunspellDict.load(urls["rule"], urls["dict"]);
-				/*var timePassed:int =mytimer.currentCount;
-				trace(timePassed);*/
-			}
-		}
-		
-		private function loadDictComplete(e:Event):void
-		{
-			if (_engines[_language] == null) {
-				_engines[_language] = new SpellChecker(_dicts[_language]);
-			}
-			_engine = _engines[_language];
-			dispatchEvent(new Event(Event.COMPLETE));
-		}
-	
-		/**
-		 * Check the spelling of a word.
-		 *
-		 * @param word The word to be checked.
-		 * @return True if the word is correctly spelled, false if it is misspelled.
-		 */		
-		public function checkWord(word:String):Boolean
-		{
-			return ((_udEngine.spell(word)) || (_engine.checkWord(word)));
-		}
-
-		/**
-		 * Get the suggestion of a misspelled word. 
-		 *
-		 * @param word The word to be checked.
-		 * @return A vector containing all suggestions for the misspelled word, ordered by similarity to the original word. 
-		 * Note that if a word is already correctly spelled, an empty Vector is returned.
-		 * @internal TODO: get the suggestions from user dicitonaries
-		 */			
-		public function getSuggestions(word:String):Vector.<String>
-		{
-			var resultArray:Array = _engine.getSuggestions(word);
-			
-			var resultVector:Vector.<String> = new Vector.<String>();
-			for each (var i:String in resultArray) {
-				resultVector.push(i);		
-			}
-			
-			return resultVector;
-		}
-		
-		/** 
-		 * Add a <code>UserDictionary</code> to the <code>SpellingService</code>.
-		 * 
-		 * @param userDictionary The UserDictionary to be added.
-		 * @return True if the UserDictionary is added successfully, false if any error occurs. An example error scenario: Trying to add a previously added user dictionary. 
-		 * @see UserDictionary
-		 */
-		public function addUserDictionary(userDictionary:UserDictionary):Boolean
-		{
-			if  (_udEngine.addDictionary(userDictionary.internalUserDictionary) == true)
-			{
-				_userDictionaries.push(userDictionary);
-				return true;
-			} 
-			
-			return false;
-		}
-
-		/** 
-		 * Remove a <code>UserDictionary</code> from the <code>SpellingService</code>.
-		 * 
-		 * @param userDictionary The UserDictionary to be removed.
-		 * @return True if the UserDictionary is removed successfully, false if any error occurs. An example error scenario: Trying to remove a user dictionary that has not been added previously. 
-		 * @see UserDictionary
-		 */		
-		public function removeUserDictionary(userDictionary:UserDictionary):Boolean
-		{
-			if (_udEngine.removeDictionary(userDictionary.internalUserDictionary) == true)
-			{
-				for ( var i:int =0; i < _userDictionaries.length; ++i ) {
-					if ( userDictionary == _userDictionaries[i] ) {
-						_userDictionaries.splice(i,1);
-						return true;
-					}
-				}
-			}
-			
-			return false;
-		}
-		
-		/**
-		 * A <code>Vector</code> of user dictionaries added to this <code>SpellingService</code>.
-		 * 
-		 * @return A <code>Vector</code> of <code>UserDictionary</code> objects.
-		 * @see UserDictionary
-		 */
-		public function get userDictionaries():Vector.<UserDictionary>
-		{	
-			var resultVector:Vector.<UserDictionary> = new Vector.<UserDictionary>;
-			for each (var i:UserDictionary in _userDictionaries) {
-				resultVector.push(i);		
-			}
-			
-			return resultVector;
-		}
-		
-		/**
-		 * This property controls if words in all upper-case should be considered as properly spelled or not.
-		 * 
-		 * <table class="innertable">
-		 *		<tr>
-		 *			<td align="center"><strong><code>ignoreWordWithAllUpperCase</code></strong></td>
-		 *			<td align="center"><strong>&#160;</strong></td>
-		 *			<td align="center"><strong>Description</strong></td>
-		 *		</tr>
-		 *		<tr>
-		 *			<td><code>false</code></td>
-		 *			<td>Default</td>
-		 *			<td><p>Words with all characters in upper case are checked against the dictionary for proper spelling.</p>
-		 *				<p>Example: if <code>ignoreWordWithAllUpperCase = false</code>, "MISPEL" will be checked for proper spelling.</p></td>
-		 *		</tr>
-		 *		<tr>
-		 *			<td><code>true</code></td>
-		 *			<td>&#160;</td>
-		 *			<td><p>Any words with all characters in upper case are always considered as properly spelled,
-		 *					no matter whether the word is in the dictionary or not.</p>
-		 *				<p>Example: if <code>ignoreWordWithAllUpperCase = true</code>, "MISPEL" will be considered as properly spelled.</p></td>
-		 *		</tr>
-		 *	</table>
-		 * */
-		/* Getter Function for ignoring all word with all upper case*/
-		public function get ignoreWordWithAllUpperCase():Boolean
-		{
-			return _engine.ignoreWordWithAllUpperCase;
-		}
-		/* Setter Function for ignoring all word with all upper case*/
-		public function set ignoreWordWithAllUpperCase(value:Boolean):void
-		{
-			_engine.ignoreWordWithAllUpperCase=value;
-		}
-		
-	}
-}
-
-

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/HaloHighlighter.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/HaloHighlighter.as b/Squiggly/main/AdobeSpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/HaloHighlighter.as
deleted file mode 100644
index 6945e20..0000000
--- a/Squiggly/main/AdobeSpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/HaloHighlighter.as
+++ /dev/null
@@ -1,124 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-package com.adobe.linguistics.spelling.framework.ui
-{
-	import __AS3__.vec.Vector;
-	
-	import com.adobe.linguistics.utils.Token;
-	
-	import flash.geom.Point;
-	import flash.text.TextField;
-	
-	import mx.core.IUITextField;
-
-	/**
-	 * <p>This class facilitates drawing of squiggly lines below words for TextField class. TextField class is used to create display objects for text display 
-	 * and input for Halo TextArea and TextInput components. HaloHighlighter could therefore be used for drawing squiggly lines in these Halo components.</p>
-	 * 	
-	 * @playerversion Flash 9.x
-	 * @langversion 3.0
-	 */
-
-	public class HaloHighlighter implements IHighlighter
-	{
-		private var mTextField:TextField;
-		private var mHighlighter:SpellingHighlighter;
-		/*
-		* offset point:
-		*/
-		private var _offsetPoint:Point;
-
-		/**
-		 * The constructor for HaloHighlighter.
-		 * @param textField <code>TextField</code> in which to enable highlighting.		 
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */
-		public function HaloHighlighter( textField:TextField )
-		{
-			if (textField == null ) throw new Error("illegal argument."); 
-			mTextField = textField;
-			mHighlighter = null;
-			this._offsetPoint = new Point(0,0);
-		}
-		/**
-		 * Draw squiggly lines below a given token.
-		 * @param token <code>Token</code> information of the word to be highlighted.		 
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */
-		public function drawSquiggleAt(token:Token):void
-		{
-			squiggleWord(token);
-		}
-		
-		/**
-		 * Clear all squiggly lines in the TextField.		
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */
-		public function clearSquiggles():void
-		{
-			if (mHighlighter) {
-				mTextField.parent.removeChild(mHighlighter);
-				mHighlighter=null;
-			}
-			
-		}
-		
-		/**
-		 * Set offset point information for scrollable controls. This is used by the highlighter to move 
-		 * the squiggly lines as the text scrolls inside the control.	
-		 * @param op offset information as a <code>Point</code> instance.		 
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */		
-		public function set offsetPoint(op:Point):void{
-			_offsetPoint = op;
-		}
-		
-		/**
-		 * Get offset point information for scrollable controls. This is used by the highlighter to move 
-		 * the squiggly lines as the text scrolls inside the control.	
-		 * @param op offset information as a <code>Point</code> instance.		 
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */		
-		public function get offsetPoint():Point{
-			return _offsetPoint;
-		}
-		
-
-		private function squiggleWord(token:Token):void {
-						
-			if (!mHighlighter) {
-				mHighlighter= new SpellingHighlighter( mTextField as IUITextField);
-				mTextField.parent.addChild(mHighlighter);				
-			}
-						
-			mHighlighter.drawSquigglyLine(token.first, token.last);
-		
-		
-			//mTextField.parent.addChild(mHighlighter);	
-			mHighlighter.move(_offsetPoint.x, _offsetPoint.y);
-		}
-
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/HaloWordProcessor.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/HaloWordProcessor.as b/Squiggly/main/AdobeSpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/HaloWordProcessor.as
deleted file mode 100644
index cf77943..0000000
--- a/Squiggly/main/AdobeSpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/HaloWordProcessor.as
+++ /dev/null
@@ -1,111 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-package com.adobe.linguistics.spelling.framework.ui
-{
-	import com.adobe.linguistics.utils.ITokenizer;
-	import com.adobe.linguistics.utils.TextTokenizer;
-	import com.adobe.linguistics.utils.Token;
-	
-	import flash.text.TextField;
-	import flash.text.TextFormat;
-	
-	import mx.controls.TextArea;
-	import mx.controls.TextInput;
-
-
-	public class HaloWordProcessor implements IWordProcessor
-	{
-		private var mTextField:TextField;
-
-		public function HaloWordProcessor(textField:TextField)
-		{
-			if (textField == null ) throw new Error("illegal argument."); 
-			mTextField = textField;
-		}
-				
-		
-		public function replaceText(token:Token, replacement:String):void {
-			var startIndex:int = token.first;
-			var endIndex:int = token.last;
-			
-			if ( replacement == null ) return;
-			
-			if (mTextField.text.length<endIndex || startIndex<0) {
-				return;
-			}
-			
-			var _misspellStart:int = startIndex;
-			var _misspellEnd:int = endIndex;
-			// Try to preserve the format, this works if the whole misspelled word is the same format
-			var tf:TextFormat = mTextField.getTextFormat(_misspellStart, _misspellEnd);
-			mTextField.replaceText(_misspellStart, _misspellEnd, replacement);	
-			mTextField.setTextFormat(tf, _misspellStart, _misspellStart+replacement.length);
-			
-			var ta:TextArea = mTextField.parent as TextArea;
-			var ti:TextInput = mTextField.parent as TextInput;
-			
-			if (ta != null) {
-				ta.selectionBeginIndex = _misspellStart + replacement.length;
-				ta.selectionEndIndex = _misspellStart + replacement.length;
-			}
-			else if (ti != null) {
-				ti.selectionBeginIndex = _misspellStart + replacement.length;
-				ti.selectionEndIndex = _misspellStart + replacement.length;				
-			}
-			else {
-				// Do nothing if it's not a valid text component
-			}
-		}
-
-		
-		public function getWordAtPoint(x:uint, y:uint, externalTokenizer:ITokenizer=null):Token
-		{
-			var _token:Token = tryGetWordAtPoint(x,y, externalTokenizer);
-			return _token;
-		}
-		
-		private function tryGetWordAtPoint(x:uint, y:uint, externalTokenizer:ITokenizer=null):Token {
-			// TODO: use a better alternative than _misspellStart, end
-			var index:uint = mTextField.getCharIndexAtPoint(x + mTextField.scrollH, y);
-			if (index >= mTextField.text.length) return null;
-
-			var tmpToken:Token = new Token(index,index);
-			var tokenizer:ITokenizer;
-			if ( externalTokenizer == null ) {
-				tokenizer = new TextTokenizer(mTextField.text);	
-			}else {
-				tokenizer = externalTokenizer;
-			}
-			
-			var result:Token = new Token(0,0);
-			
-			var preToken:Token = tokenizer.getPreviousToken(tmpToken);
-			var nextToken:Token = tokenizer.getNextToken(tmpToken);
-			if ( preToken.last == nextToken.first ) {
-				result.first = preToken.first;
-				result.last = nextToken.last;
-				return result;		
-			}else {
-				return null;
-			}
-		}
-
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/IHighlighter.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/IHighlighter.as b/Squiggly/main/AdobeSpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/IHighlighter.as
deleted file mode 100644
index a8b826f..0000000
--- a/Squiggly/main/AdobeSpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/IHighlighter.as
+++ /dev/null
@@ -1,34 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-package com.adobe.linguistics.spelling.framework.ui
-{
-	import com.adobe.linguistics.utils.Token;
-	import __AS3__.vec.Vector;
-	import flash.geom.Point;
-	
-	public interface IHighlighter
-	{
-		function drawSquiggleAt(token:Token):void;
-		function clearSquiggles():void;
-		function set offsetPoint(op:Point):void;
-		function get offsetPoint():Point;
-		
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/IWordProcessor.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/IWordProcessor.as b/Squiggly/main/AdobeSpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/IWordProcessor.as
deleted file mode 100644
index 76c3c8e..0000000
--- a/Squiggly/main/AdobeSpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/IWordProcessor.as
+++ /dev/null
@@ -1,30 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-package com.adobe.linguistics.spelling.framework.ui
-{
-	import com.adobe.linguistics.utils.ITokenizer;
-	import com.adobe.linguistics.utils.Token;
-	
-	public interface IWordProcessor
-	{
-		function getWordAtPoint(x:uint, y:uint, externalTokenizer:ITokenizer=null):Token;
-		function replaceText(token:Token, replacement:String):void;
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/SparkHighlighter.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/SparkHighlighter.as b/Squiggly/main/AdobeSpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/SparkHighlighter.as
deleted file mode 100644
index fc5308d..0000000
--- a/Squiggly/main/AdobeSpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/SparkHighlighter.as
+++ /dev/null
@@ -1,225 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-package com.adobe.linguistics.spelling.framework.ui
-{
-	import com.adobe.linguistics.utils.Token;
-	import com.adobe.linguistics.utils.TextTokenizer;
-	import flash.geom.Point;
-	
-	import flash.display.Shape;
-	import flash.geom.Rectangle;
-	import flash.text.engine.TextLine;
-	
-	import flashx.textLayout.compose.TextFlowLine;
-	import flashx.textLayout.edit.SelectionManager;
-	import flashx.textLayout.elements.TextFlow;
-	import flashx.textLayout.tlf_internal;
-	
-	import spark.components.RichEditableText;
-	use namespace tlf_internal;	
-	
-	/**
-	 * <p>This class facilitates drawing of squiggly lines below words for RichEditableText class. RichEditableText is a low-level UIComponent for displaying, 
-	 * scrolling, selecting, and editing richly-formatted text. This class is used in the skins of the Spark versions of TextInput and TextArea. 
-	 * SparkHighlighter could therefore be used for drawing squiggly lines in these Spark components.</p>
-	 * 	
-	 * @playerversion Flash 10
-	 * @langversion 3.0
-	 */
-	public class SparkHighlighter implements IHighlighter
-	{
-		
-		private var mTextField:RichEditableText;
-		private var mHighlighter:Shape;
-		/*
-		* offset point:
-		*/
-		private var _offsetPoint:Point;
-
-		/**
-		 * The constructor for SparkHighlighter.
-		 * @param richEditableText <code>RichEditableText</code> in which to enable highlighting.		 
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */
-		public function SparkHighlighter( richEditableText:RichEditableText )
-		{
-			if (richEditableText == null ) throw new Error("illegal argument."); 
-			mTextField = richEditableText;
-			mHighlighter = null;
-			this._offsetPoint = new Point(0,0);
-		}
-
-		/**
-		 * Draw squiggly lines below a given token.
-		 * @param token <code>Token</code> information of the word to be highlighted.		 
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */
-		public function drawSquiggleAt(token:Token):void
-		{
-			squiggleWord(token);
-		}
-		
-		/**
-		 * Clear all squiggly lines in the component.		
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */
-		public function clearSquiggles():void
-		{
-			if (mHighlighter) {
-				mTextField.removeChild(mHighlighter);
-				mHighlighter=null;
-			}		
-		}
-		
-		/**
-		 * Set offset point information for scrollable controls. This is used by the highlighter to move 
-		 * the squiggly lines as the text scrolls inside the control.	
-		 * @param op offset information as a <code>Point</code> instance.		 
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */		
-		public function set offsetPoint(op:Point):void{
-			_offsetPoint = op;
-		}
-		
-		/**
-		 * Get offset point information for scrollable controls. This is used by the highlighter to move 
-		 * the squiggly lines as the text scrolls inside the control.	
-		 * @param op offset information as a <code>Point</code> instance.		 
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */		
-		public function get offsetPoint():Point{
-			return _offsetPoint;
-		}
-
-		
-
-		// TODO: refactor this code to share with halo components, and support words that cross lines
-		private function squiggleWord(token:Token):void {
-					
-			var ta:RichEditableText = mTextField;
-			if (!ta) return;		
-			
-			if (!mHighlighter) {
-				mHighlighter= new Shape();
-				mHighlighter.graphics.clear();
-				mTextField.addChild(mHighlighter);	
-			}
-					
-		        drawSquigglyLineForRange(token.first, token.last);
-			
-			// Just adjust the left padding, top padding is not an issue 
-			//var pleft:uint = mTextField.getStyle("paddingLeft");
-			//mHighlighter.x += pleft;		
-		}
-		
-		// Draw squiggly line
-		private function drawSquigglyLineForRange(start:Number, end:Number):void
-		{
-			// draw squiggly line
-			var tf:TextFlow = mTextField.textFlow;
-			var tflFirst:TextFlowLine = tf.flowComposer.findLineAtPosition(start);
-			var tflLast:TextFlowLine = tf.flowComposer.findLineAtPosition(end);
-			var tflIndexFirst:int = tf.flowComposer.findLineIndexAtPosition(start);
-			var tflIndexLast:int = tf.flowComposer.findLineIndexAtPosition(end);
-			
-			// Pointer
-			var tflIndex:int = tflIndexFirst;
-			var tfl:TextFlowLine = tflFirst;
-			
-			if (tflIndexFirst == tflIndexLast) {
-				// Draw one line
-				drawSquigglyLineAtIndex(tflIndexFirst, start - tflFirst.absoluteStart, end - tflFirst.absoluteStart);
-			} else {
-				// Multiple lines (very long word)
-				drawSquigglyLineAtIndex(tflIndexFirst, start - tflFirst.absoluteStart);
-				
-				tflIndex++;
-				while (tflIndex != tflIndexLast) {
-					drawSquigglyLineAtIndex(tflIndex);
-					tflIndex++;
-				}
-				
-				drawSquigglyLineAtIndex(tflIndexLast, 0, end - tflLast.absoluteStart);
-			}
-		}
-		
-		// Draw a squiggly line at specific line for specific index range
-		private function drawSquigglyLineAtIndex(lineIndex:Number, startIndex:Number=0, endIndex:Number=0x7FFFFFFF):void
-		{
-			var tf:TextFlow = mTextField.textFlow;
-			var tfl:TextFlowLine = tf.flowComposer.getLineAt(lineIndex);
-			var rectLine:Rectangle = tfl.getBounds();
-			if (endIndex == 0x7FFFFFFF) {
-				drawSquigglyLineAtPoint(rectLine.left, rectLine.bottom, rectLine.right - rectLine.left);
-			}
-			else {
-				// Force to have a valid TextLine
-				var tl:TextLine = tfl.getTextLine(true);
-				
-				// TODO: atom index and char index is not matching for some chars, use try/catch to avoid crash
-				try {
-					var rectFirst:Rectangle = tl.getAtomBounds(startIndex);
-					var rectLast:Rectangle = tl.getAtomBounds(endIndex);
-					drawSquigglyLineAtPoint(rectFirst.left + tfl.x, rectLine.bottom, rectLast.right - rectFirst.left);
-				} catch (err:Error)
-				{
-					//TODO: report error
-				}
-			}
-				
-		}
-		// Draw a squiggly from point x,y with given width, the line is drew in mHighlighter 
-		private function drawSquigglyLineAtPoint(x:Number, y:Number, width:Number):void
-		{
-			mHighlighter.graphics.lineStyle(1, 0xfa0707, .65);
-			mHighlighter.graphics.moveTo(x, y);
-			var upDirection:Boolean = false;
-			var offset:uint = 0;
-			var stepLength:uint = 2;
-			for ( var i:uint = 1; offset <= width; i++) {
-				offset = offset + stepLength;
-				if ( upDirection )
-					mHighlighter.graphics.lineTo(x+offset,y);
-				else
-					mHighlighter.graphics.lineTo(x+offset,y+stepLength);
-				upDirection = !upDirection;
-			}	
-		}
-		
-		private function getValidFirstWordIndex():int{
-			var index:int = SelectionManager.computeSelectionIndex(mTextField.textFlow, mTextField, mTextField, 0 + mTextField.horizontalScrollPosition, 0 + mTextField.verticalScrollPosition);
-			return index;
-
-			
-		}
-		
-		private function getValidLastWordIndex():int{
-			var index:int = SelectionManager.computeSelectionIndex(mTextField.textFlow, mTextField, mTextField, mTextField.width+mTextField.horizontalScrollPosition, mTextField.height+mTextField.verticalScrollPosition);
-			return index;
-
-		}
-
-	}
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/SparkWordProcessor.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/SparkWordProcessor.as b/Squiggly/main/AdobeSpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/SparkWordProcessor.as
deleted file mode 100644
index c174eee..0000000
--- a/Squiggly/main/AdobeSpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/SparkWordProcessor.as
+++ /dev/null
@@ -1,132 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-package com.adobe.linguistics.spelling.framework.ui
-{
-	import com.adobe.linguistics.utils.ITokenizer;
-	import com.adobe.linguistics.utils.TextTokenizer;
-	import com.adobe.linguistics.utils.Token;
-	
-	import flashx.textLayout.edit.SelectionManager;
-	import flashx.textLayout.tlf_internal;
-	
-	import spark.components.RichEditableText;
-	
-	use namespace tlf_internal;	
-	
-	public class SparkWordProcessor implements IWordProcessor
-	{
-		private var mTextField:RichEditableText;
-
-		public function SparkWordProcessor(textField:RichEditableText)
-		{
-			if (textField == null ) throw new Error("illegal argument."); 
-			mTextField = textField;
-		}
-				
-		
-		public function replaceText(token:Token, replacement:String):void {
-			var startIndex:int = token.first;
-			var endIndex:int = token.last;
-			
-			var ta:RichEditableText = mTextField;
-			var end:int = getValidLastWordIndex();
-			
-			if ( replacement == null ) return;
-			
-			if (mTextField.text.length<endIndex || startIndex<0) {
-				return;
-			}
-			
-			var _misspellStart:int = startIndex;
-			var _misspellEnd:int = endIndex;
-			
-			// Workaround for Spark: changes in inactive components will trigger strange behavior			
-			//var selectedElementRange:ElementRange = ElementRange.createElementRange(ta.textFlow, _misspellStart, _misspellEnd);
-			//var selectedCharacterFormat:ITextLayoutFormat = ta.textFlow.interactionManager.activePosition == ta.textFlow.interactionManager.anchorPosition ? ta.textFlow.interactionManager.getCommonCharacterFormat() : selectedElementRange.characterFormat;
-			//var selectedParagraphFormat:ITextLayoutFormat = selectedElementRange.paragraphFormat;
-			//var selectedContainerFormat:ITextLayoutFormat = selectedElementRange.containerFormat;
-			
-			
-			
-			//var selectedCharacterFormat:ITextLayoutFormat = ta.textFlow.interactionManager.getCommonCharacterFormat();
-			//var selectedContainerFormat:ITextLayoutFormat = ta.textFlow.interactionManager.getCommonContainerFormat();
-			//var selectedParagraphFormat:ITextLayoutFormat = ta.textFlow.interactionManager.getCommonParagraphFormat();
-			
-			/*var tem:EditManager = new EditManager();
-			ta.textFlow.interactionManager = tem;	*/
-			
-			
-			ta.setFocus();
-			//ta.text = ta.text.substr(0, _misspellStart) + replacement + ta.text.substr(_misspellEnd);
-			
-			//tem.applyFormat(selectedCharacterFormat,selectedParagraphFormat,selectedContainerFormat);
-			//ta.textFlow.flowComposer.updateAllControllers();
-			
-			ta.textFlow;
-			//ta.selectRange(_misspellStart + replacement.length, _misspellStart + replacement.length);
-			ta.selectRange(_misspellStart+1, _misspellEnd);
-			ta.insertText(replacement);
-			ta.selectRange(_misspellStart, _misspellStart+1);
-			ta.insertText("");
-			
-			//ta.textFlow.interactionManager.applyFormat(selectedCharacterFormat,null,null);
-			
-			// Workaround for unexpected jump
-			ta.scrollToRange(end, end);
-		}
-		
-		public function getWordAtPoint(x:uint, y:uint, externalTokenizer:ITokenizer=null):Token
-		{
-			// TODO: use a better alternative than _misspellStart, end
-			var ta:RichEditableText = mTextField;	
-			var index:int = SelectionManager.computeSelectionIndex(ta.textFlow, ta, ta, x, y);
-
-			if (index >= ta.text.length) return null;
-
-			var tmpToken:Token = new Token(index,index);
-			var tokenizer:ITokenizer;
-			if ( externalTokenizer == null ) {
-				tokenizer = new TextTokenizer(mTextField.text);	
-			}else {
-				tokenizer = externalTokenizer;
-			}
-			
-			var result:Token = new Token(0,0);
-			var preToken:Token = tokenizer.getPreviousToken(tmpToken);
-			var nextToken:Token = tokenizer.getNextToken(tmpToken);
-			if ( preToken.last == nextToken.first ) {
-				result.first = preToken.first;
-				result.last = nextToken.last;
-				return result;		
-			}else {
-				return null;
-			}
-				
-		}
-
-		// TODO: workaround for unexpected jump when word replaced, to be refactored for code sharing
-		private function getValidLastWordIndex():int{
-			var index:int = SelectionManager.computeSelectionIndex(mTextField.textFlow, mTextField, mTextField, mTextField.width+mTextField.horizontalScrollPosition, mTextField.height+mTextField.verticalScrollPosition);
-			return index;
-		}
-
-
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/SpellingHighlighter.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/SpellingHighlighter.as b/Squiggly/main/AdobeSpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/SpellingHighlighter.as
deleted file mode 100644
index 5095331..0000000
--- a/Squiggly/main/AdobeSpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/SpellingHighlighter.as
+++ /dev/null
@@ -1,179 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-package com.adobe.linguistics.spelling.framework.ui
-{
-	import flash.display.Shape;
-	import flash.geom.Point;
-	import flash.geom.Rectangle;
-	import flash.text.TextLineMetrics;
-	
-	import mx.core.IUITextField;
-	import mx.flash.UIMovieClip;
-
-
-	public class SpellingHighlighter extends UIMovieClip
-	{
-		/*
-		* offset point:
-		*/
-		private var _offsetPoint:Point;
-		
-		/*
-		* Target TextField.
-		*/
-		private var _textField:IUITextField;
-		private static var InvalidIndexValue:int = -2;
-		public function SpellingHighlighter(textField:IUITextField) {
-			super();
-			this._textField = textField;
-			this._offsetPoint = new Point(0,0);
-		}
-		
-		public function drawSquigglyLine(firstCharIndex:int, lastCharIndex:int ):void {
-			var validFirstCharIndex:int = getValidFirstCharIndex(firstCharIndex);
-			var validLastCharIndex:int = getValidLastCharIndex(lastCharIndex);
-			if ( validFirstCharIndex == InvalidIndexValue || validLastCharIndex == InvalidIndexValue ){
-				return;
-			}
-			/* draw squiggly line here. */
-			if ( validFirstCharIndex <= validLastCharIndex ) {
-				var firstLine:int = _textField.getLineIndexOfChar(validFirstCharIndex);
-				var lastLine:int = _textField.getLineIndexOfChar(validLastCharIndex);
-				//only one line case.
-				if(lastLine==firstLine)
-				{
-					drawSingleSquigglyLine(validFirstCharIndex, validLastCharIndex);
-					return;
-				}
-				//more than one line.
-				//first line
-				drawSingleSquigglyLine(validFirstCharIndex, _textField.getLineOffset(firstLine)+_textField.getLineLength(firstLine)-1);
-				//middle....
-				for(var i:int=firstLine+1;i<lastLine;i++)
-				{
-					drawSingleSquigglyLine(_textField.getLineOffset(i), _textField.getLineOffset(i)+_textField.getLineLength(i)-1);
-				}
-				//last lines.
-				drawSingleSquigglyLine(_textField.getLineOffset(lastLine), validLastCharIndex);
-			}
-		}
-		
-		public function drawSingleSquigglyLine(firstCharIndex:int, lastCharIndex:int ):void {
-			var firstLine:int = _textField.getLineIndexOfChar(firstCharIndex);
-			var lastLine:int = _textField.getLineIndexOfChar(lastCharIndex);
-			if ( firstLine != lastLine ) {
-				return;
-			}else {
-				var rect1:Rectangle = _textField.getCharBoundaries(firstCharIndex);
-				var rect2:Rectangle = _textField.getCharBoundaries(lastCharIndex);
-				var x:Number = rect1.x+_offsetPoint.x - _textField.scrollH;
-				var y:Number = rect1.y + rect1.height + 2;
-				var width:Number = rect2.x+rect2.width-rect1.x;
-				
-				// Avoid drawing outside the textField
-				if (x<0) 
-				{
-					if (x+width > 0) {
-						width += x;
-						x = 0;
-					} 
-					else
-						return;
-				}
-				if (x+width > _textField.width) 
-				{
-					if (x < _textField.width) {
-						width = textField.width - x;
-					} 	
-					else
-						return;
-				}
-				
-				// The rectangle that bound the string you want
-				// actual work here.
-				var myShape:Shape = new Shape();
-				myShape.graphics.clear();
-				//myShape.graphics.beginFill(0x0099CC, .35); 
-				myShape.graphics.lineStyle(1, 0xfa0707, .65);
-				myShape.graphics.moveTo(x, y);
-				var upDirection:Boolean = false;
-				var offset:uint = 0;
-				var stepLength:uint = 2;
-				for ( var i:uint = 1; offset <= width; i++) {
-					offset = offset + stepLength;
-					if ( upDirection )
-						myShape.graphics.lineTo(x+offset,y);
-					else
-						myShape.graphics.lineTo(x+offset,y+stepLength);
-					upDirection = !upDirection;
-				}
-				//myShape.graphics.endFill();
-				this.addChild(myShape);	
-			}
-		}
-		
-		private function getValidFirstCharIndex(firstCharIndex:int):int{
-			if(firstCharIndex<0 || firstCharIndex>_textField.text.length-1) 
-			{
-				return InvalidIndexValue;
-			}
-			var firstLine:Number = _textField.getLineIndexOfChar(firstCharIndex);
-			
-			if(firstLine<_textField.scrollV-1)
-			{
-				firstLine = _textField.scrollV-1;
-				return _textField.getLineOffset(firstLine);
-			}
-			return firstCharIndex;
-		}
-		
-		private function getValidLastCharIndex(lastCharIndex:int):int{
-			if(lastCharIndex<0 || lastCharIndex>_textField.text.length-1) 
-			{
-				return InvalidIndexValue;
-			}
-			var lastLine:Number = _textField.getLineIndexOfChar(lastCharIndex);
-			if(lastLine>_textField.bottomScrollV-1)
-			{
-				lastLine = _textField.bottomScrollV-1;
-				return _textField.getLineOffset(lastLine)+_textField.getLineLength(lastLine)-1;
-			}
-			return lastCharIndex;
-		}
-					
-		public function set textField(tf:IUITextField):void{
-			_textField = tf;
-		}
-		
-		public function get textField():IUITextField{
-			return _textField;
-		}
-		
-		public function set offsetPoint(op:Point):void{
-			_offsetPoint = op;
-		}
-		
-		public function get offsetPoint():Point{
-			return _offsetPoint;
-		}
-
-
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/TLFHighlighter.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/TLFHighlighter.as b/Squiggly/main/AdobeSpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/TLFHighlighter.as
deleted file mode 100644
index 75f6576..0000000
--- a/Squiggly/main/AdobeSpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/TLFHighlighter.as
+++ /dev/null
@@ -1,248 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-package com.adobe.linguistics.spelling.framework.ui
-{
-	import com.adobe.linguistics.utils.TextTokenizer;
-	import com.adobe.linguistics.utils.Token;
-	
-	import flash.display.Graphics;
-	import flash.display.Shape;
-	import flash.display.Sprite;
-	import flash.geom.Point;
-	import flash.geom.Rectangle;
-	import flash.text.engine.TextLine;
-	import flash.utils.Dictionary;
-	
-	import flashx.textLayout.compose.TextFlowLine;
-	import flashx.textLayout.container.ContainerController;
-	import flashx.textLayout.edit.SelectionManager;
-	import flashx.textLayout.elements.TextFlow;
-	import flashx.textLayout.tlf_internal;
-
-
-	use namespace tlf_internal;	
-
-	/**
-	 * <p>This class facilitates drawing of squiggly lines below words for TLF TextFlow class.</p>
-	 * <p>The TextFlow class is responsible for managing all 
-	 * the text content of a story. In TextLayout, text is stored in a hierarchical tree of elements. TextFlow is the root object of the element tree. 
-	 * All elements on the tree derive from the base class, FlowElement. </p> 
-	 * TLFHighlighter could be used for drawing squiggly lines in any of the custom visual components(probably based on <code>Sprite</code>) which make use 
-	 * of TextFlow to display text.
-	 * 	
-	 * @playerversion Flash 10
-	 * @langversion 3.0
-	 */
-	public class TLFHighlighter implements IHighlighter
-	{
-		
-		private var mTextFlow:TextFlow;
-		private var mHighlighter:Dictionary;
-	
-		//private var mHighlighter:Shape;
-		private var ccindex:int;
-		private var cc:ContainerController;
-		/*
-		* offset point:
-		*/
-		private var _offsetPoint:Point;
-
-		/**
-		 * The constructor for TLFHighlighter.
-		 * @param textFlow <code>TextFlow</code> in which to enable highlighting.		 
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */
-		public function TLFHighlighter( textFlow:TextFlow )
-		{
-			if (textFlow == null ) throw new Error("illegal argument."); 
-			mTextFlow = textFlow;
-			//mHighlighter = null;
-			mHighlighter = new Dictionary(true);
-			this._offsetPoint = new Point(0,0);
-		}
-		/**
-		 * Draw squiggly lines below a given token.
-		 * @param token <code>Token</code> information of the word to be highlighted.		 
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */
-		public function drawSquiggleAt(token:Token):void
-		{
-			squiggleWord(token);
-		}
-		/**
-		 * Clear all squiggly lines in the component.		
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */
-		public function clearSquiggles():void
-		{
-			
-			for (var idx:int = 0; idx < mTextFlow.flowComposer.numControllers; idx++)
-			{	
-				var cctmp:ContainerController = mTextFlow.flowComposer.getControllerAt(idx);
-				if (mHighlighter[cctmp.container] != null) {
-					
-					//ToDO: This assumes single container for whole of mTextFlow. Need to implement for multiple container case.
-					cctmp.container.removeChild((mHighlighter[cctmp.container] as Shape));
-					
-					mHighlighter[cctmp.container] = null;
-				}	
-			}
-		}
-	
-		/**
-		 * Set offset point information for scrollable controls. This is used by the highlighter to move 
-		 * the squiggly lines as the text scrolls inside the control.	
-		 * @param op offset information as a <code>Point</code> instance.		 
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */		
-		public function set offsetPoint(op:Point):void{
-			_offsetPoint = op;
-		}
-		/**
-		 * Get offset point information for scrollable controls. This is used by the highlighter to move 
-		 * the squiggly lines as the text scrolls inside the control.	
-		 * @param op offset information as a <code>Point</code> instance.		 
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */	
-		public function get offsetPoint():Point{
-			return _offsetPoint;
-		}
-
-		
-
-		// TODO: refactor this code to share with halo components, and support words that cross lines
-		private function squiggleWord(token:Token):void {					
-			var ta:TextFlow = mTextFlow;
-			
-			if (!ta) return;		
-			ccindex = ta.flowComposer.findControllerIndexAtPosition(token.first);
-			
-			cc = ta.flowComposer.getControllerAt(ccindex);
-			
-			if (mHighlighter[cc.container] == null ) {
-				mHighlighter[cc.container]= new Shape();
-				(mHighlighter[cc.container] as Shape).graphics.clear();
-				//ccindex = ta.flowComposer.findControllerIndexAtPosition(token.first);
-				
-				//var cc:ContainerController = ta.flowComposer.getControllerAt(ccindex);
-				//ToDO: This assumes single container for whole of mTextFlow. Need to implement for multiple container case.
-				cc.container.addChild((mHighlighter[cc.container] as Shape));				
-			}
-					
-		    drawSquigglyLineForRange(token.first, token.last);
-			
-			// Just adjust the left padding, top padding is not an issue 
-			//var pleft:uint = mTextFlow.getStyle("paddingLeft");
-			//mHighlighter.x += pleft;		
-		}
-		
-		// Draw squiggly line
-		private function drawSquigglyLineForRange(start:Number, end:Number):void
-		{
-			// draw squiggly line
-			var tf:TextFlow = mTextFlow;
-			var tflFirst:TextFlowLine = tf.flowComposer.findLineAtPosition(start);
-			var tflLast:TextFlowLine = tf.flowComposer.findLineAtPosition(end);
-			var tflIndexFirst:int = tf.flowComposer.findLineIndexAtPosition(start);
-			var tflIndexLast:int = tf.flowComposer.findLineIndexAtPosition(end);
-			
-			// Pointer
-			var tflIndex:int = tflIndexFirst;
-			var tfl:TextFlowLine = tflFirst;
-			
-			if (tflIndexFirst == tflIndexLast) {
-				// Draw one line
-				drawSquigglyLineAtIndex(tflIndexFirst, start - tflFirst.absoluteStart, end - tflFirst.absoluteStart);
-			} else {
-				// Multiple lines (very long word)
-				drawSquigglyLineAtIndex(tflIndexFirst, start - tflFirst.absoluteStart);
-				
-				tflIndex++;
-				while (tflIndex != tflIndexLast) {
-					drawSquigglyLineAtIndex(tflIndex);
-					tflIndex++;
-				}
-				
-				drawSquigglyLineAtIndex(tflIndexLast, 0, end - tflLast.absoluteStart);
-			}
-		}
-		
-		// Draw a squiggly line at specific line for specific index range
-		private function drawSquigglyLineAtIndex(lineIndex:Number, startIndex:Number=0, endIndex:Number=0x7FFFFFFF):void
-		{
-			var tf:TextFlow = mTextFlow;
-			var tfl:TextFlowLine = tf.flowComposer.getLineAt(lineIndex);
-			var rectLine:Rectangle = tfl.getBounds(); 
-			if (endIndex == 0x7FFFFFFF) {
-				drawSquigglyLineAtPoint(rectLine.left, rectLine.bottom, rectLine.right - rectLine.left, lineIndex);
-			}
-			else {
-				// Force to have a valid TextLine
-				var tl:TextLine = tfl.getTextLine(true);
-				
-				// TODO: atom index and char index is not matching for some chars, use try/catch to avoid crash
-				try {
-					var rectFirst:Rectangle = tl.getAtomBounds(startIndex);
-					var rectLast:Rectangle = tl.getAtomBounds(endIndex);
-					drawSquigglyLineAtPoint(rectFirst.left + tfl.x, rectLine.bottom, rectLast.right - rectFirst.left, lineIndex);
-				} catch (err:Error)
-				{
-					//TODO: report error
-				}
-			}
-				
-		}
-		// Draw a squiggly from point x,y with given width, the line is drawn in mHighlighter 
-		private function drawSquigglyLineAtPoint(x:Number, y:Number, width:Number, lineIndex:Number):void
-		{
-			var tf:TextFlow = mTextFlow;
-			var tfl:TextFlowLine = tf.flowComposer.getLineAt(lineIndex);
-			var tl:TextLine = tfl.getTextLine(true);
-						
-			(mHighlighter[cc.container] as Shape).graphics.lineStyle(1, 0xfa0707, .65);
-			(mHighlighter[cc.container] as Shape).graphics.moveTo(x, y);
-			var upDirection:Boolean = false;
-			var offset:uint = 0;
-			var stepLength:uint = 2;
-			for ( var i:uint = 1; offset <= width; i++) {
-				offset = offset + stepLength;
-				if ( upDirection )
-					(mHighlighter[cc.container] as Shape).graphics.lineTo(x+offset,y);
-				else
-					(mHighlighter[cc.container] as Shape).graphics.lineTo(x+offset,y+stepLength);
-				upDirection = !upDirection;
-			}
-			
-			//tl.addChild(mHighlighter);
-						
-			//tf.flowComposer.updateToController(ccindex);
-
-		}
-		
-
-	}
-	
-}
-

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/TLFWordProcessor.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/TLFWordProcessor.as b/Squiggly/main/AdobeSpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/TLFWordProcessor.as
deleted file mode 100644
index f506227..0000000
--- a/Squiggly/main/AdobeSpellingFramework/src/com/adobe/linguistics/spelling/framework/ui/TLFWordProcessor.as
+++ /dev/null
@@ -1,156 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-package com.adobe.linguistics.spelling.framework.ui
-{
-	import com.adobe.linguistics.utils.ITokenizer;
-	import com.adobe.linguistics.utils.TextTokenizer;
-	import com.adobe.linguistics.utils.Token;
-	
-	import flashx.textLayout.edit.SelectionManager;
-	import flashx.textLayout.edit.EditManager;
-	import flashx.textLayout.tlf_internal;
-	import flashx.textLayout.elements.TextFlow;
-	
-	import flashx.textLayout.container.ContainerController;
-	import flashx.textLayout.elements.FlowLeafElement;
-	import flashx.textLayout.elements.ParagraphElement;
-	
-	use namespace tlf_internal;	
-	
-	public class TLFWordProcessor implements IWordProcessor
-	{
-		private var mTextFlow:TextFlow;
-		private var _containerController:ContainerController;
-
-		public function TLFWordProcessor(textFlow:TextFlow)
-		{
-			if (textFlow == null ) throw new Error("illegal argument."); 
-			mTextFlow = textFlow;
-		}
-				
-		
-		public function replaceText(token:Token, replacement:String):void {
-			var startIndex:int = token.first;
-			var endIndex:int = token.last;
-			
-			var ta:TextFlow = mTextFlow;
-			//var end:int = getValidLastWordIndex();
-			
-			if ( replacement == null ) return;
-			
-			/*if (mTextFlow.text.length<endIndex || startIndex<0) {
-				return;
-			}*/
-			
-			var _misspellStart:int = startIndex;
-			var _misspellEnd:int = endIndex;
-			
-			// Workaround for Spark: changes in inactive components will trigger strange behavior			
-			//var selectedElementRange:ElementRange = ElementRange.createElementRange(ta.textFlow, _misspellStart, _misspellEnd);
-			//var selectedCharacterFormat:ITextLayoutFormat = ta.textFlow.interactionManager.activePosition == ta.textFlow.interactionManager.anchorPosition ? ta.textFlow.interactionManager.getCommonCharacterFormat() : selectedElementRange.characterFormat;
-			//var selectedParagraphFormat:ITextLayoutFormat = selectedElementRange.paragraphFormat;
-			//var selectedContainerFormat:ITextLayoutFormat = selectedElementRange.containerFormat;
-			
-			
-			
-			//var selectedCharacterFormat:ITextLayoutFormat = ta.textFlow.interactionManager.getCommonCharacterFormat();
-			//var selectedContainerFormat:ITextLayoutFormat = ta.textFlow.interactionManager.getCommonContainerFormat();
-			//var selectedParagraphFormat:ITextLayoutFormat = ta.textFlow.interactionManager.getCommonParagraphFormat();
-			
-			var tem:EditManager = ta.interactionManager as EditManager;
-			
-			
-			
-			//ta.setFocus();
-			//ta.text = ta.text.substr(0, _misspellStart) + replacement + ta.text.substr(_misspellEnd);
-			
-			//tem.applyFormat(selectedCharacterFormat,selectedParagraphFormat,selectedContainerFormat);
-			//ta.textFlow.flowComposer.updateAllControllers();
-			
-			//ta.textFlow;
-			//ta.selectRange(_misspellStart + replacement.length, _misspellStart + replacement.length);
-			
-			
-			tem.selectRange(_misspellStart+1, _misspellEnd);
-			tem.insertText(replacement);
-			tem.selectRange(_misspellStart, _misspellStart+1);
-			tem.insertText("");
-			
-			//ta.textFlow.interactionManager.applyFormat(selectedCharacterFormat,null,null);
-			
-			// Workaround for unexpected jump
-			//ta.scrollToRange(end, end);
-		}
-		
-		/**
-		 @private
-		 (This property is for Squiggly Developer use only.)
-		 */
-		public function set textFlowContainerController(value:ContainerController):void {
-			_containerController = value;
-		}
-		
-		public function getWordAtPoint(x:uint, y:uint, externalTokenizer:ITokenizer=null):Token
-		{
-			// TODO: use a better alternative than _misspellStart, end
-			var ta:TextFlow = mTextFlow;	
-									
-			var index:int = SelectionManager.computeSelectionIndex(ta, _containerController.container, _containerController.container, x, y);
-
-			if (index >= ta.textLength) return null;
-
-			var currentLeaf:FlowLeafElement = ta.findLeaf(index);
-			var currentParagraph:ParagraphElement = currentLeaf ? currentLeaf.getParagraph() : null;
-			
-			var paraStart:uint = currentParagraph.getAbsoluteStart();
-				
-			//tokenizer = new TextTokenizer(currentParagraph.getText().substring());
-			
-			var tmpToken:Token = new Token(index - paraStart,index - paraStart);
-			var tokenizer:ITokenizer;
-			if ( externalTokenizer == null ) {
-				tokenizer = new TextTokenizer(currentParagraph.getText().substring());	
-			}else {
-				tokenizer = externalTokenizer;
-			}
-			
-			var result:Token = new Token(0,0);
-			var preToken:Token = tokenizer.getPreviousToken(tmpToken);
-			var nextToken:Token = tokenizer.getNextToken(tmpToken);
-			if ( preToken.last == nextToken.first ) {
-				result.first = preToken.first + paraStart;
-				result.last = nextToken.last + paraStart;
-				return result;		
-			}else {
-				return null;
-			}
-							
-		}
-
-		// TODO: workaround for unexpected jump when word replaced, to be refactored for code sharing
-		private function getValidLastWordIndex():int{
-			var index:int = 0;
-			//var index:int = SelectionManager.computeSelectionIndex(mTextFlow.textFlow, mTextFlow, mTextFlow, mTextFlow.width+mTextFlow.horizontalScrollPosition, mTextFlow.height+mTextFlow.verticalScrollPosition);
-			return index;
-		}
-
-
-	}
-}
\ No newline at end of file


[19/50] [abbrv] remove Adobe from directory names (package name still contains Adobe)

Posted by jm...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingUIAPI/src/com/adobe/linguistics/spelling/ui/HaloWordProcessor.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingUIAPI/src/com/adobe/linguistics/spelling/ui/HaloWordProcessor.as b/Squiggly/main/SpellingUIAPI/src/com/adobe/linguistics/spelling/ui/HaloWordProcessor.as
new file mode 100644
index 0000000..9360f0b
--- /dev/null
+++ b/Squiggly/main/SpellingUIAPI/src/com/adobe/linguistics/spelling/ui/HaloWordProcessor.as
@@ -0,0 +1,109 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package com.adobe.linguistics.spelling.ui
+{
+	import com.adobe.linguistics.utils.ITokenizer;
+	import com.adobe.linguistics.utils.TextTokenizer;
+	import com.adobe.linguistics.utils.Token;
+	
+	import flash.text.TextField;
+	import flash.text.TextFormat;
+	
+	import mx.controls.TextArea;
+	import mx.controls.TextInput;
+
+
+	public class HaloWordProcessor implements IWordProcessor
+	{
+		private var mTextField:TextField;
+
+		public function HaloWordProcessor(textField:TextField)
+		{
+			if (textField == null ) throw new Error("illegal argument."); 
+			mTextField = textField;
+		}
+
+		
+		public function replaceText(startIndex:int, endIndex:int, replacement:String):void {
+			
+			if ( replacement == null ) return;
+			
+			if (mTextField.text.length<endIndex || startIndex<0) {
+				return;
+			}
+			
+			var _misspellStart:int = startIndex;
+			var _misspellEnd:int = endIndex;
+			// Try to preserve the format, this works if the whole misspelled word is the same format
+			var tf:TextFormat = mTextField.getTextFormat(_misspellStart, _misspellEnd);
+			mTextField.replaceText(_misspellStart, _misspellEnd, replacement);	
+			mTextField.setTextFormat(tf, _misspellStart, _misspellStart+replacement.length);
+			
+			var ta:TextArea = mTextField.parent as TextArea;
+			var ti:TextInput = mTextField.parent as TextInput;
+			
+			if (ta != null) {
+				ta.selectionBeginIndex = _misspellStart + replacement.length;
+				ta.selectionEndIndex = _misspellStart + replacement.length;
+			}
+			else if (ti != null) {
+				ti.selectionBeginIndex = _misspellStart + replacement.length;
+				ti.selectionEndIndex = _misspellStart + replacement.length;				
+			}
+			else {
+				// Do nothing if it's not a valid text component
+			}
+		}
+
+
+		public function getWordAtPoint(x:uint, y:uint, externalTokenizer:ITokenizer=null):Token
+		{
+			var _token:Token = tryGetWordAtPoint(x,y, externalTokenizer);
+			return _token;
+		}
+		
+		private function tryGetWordAtPoint(x:uint, y:uint, externalTokenizer:ITokenizer=null):Token {
+			// TODO: use a better alternative than _misspellStart, end
+			var index:uint = mTextField.getCharIndexAtPoint(x + mTextField.scrollH, y);
+			if (index >= mTextField.text.length) return null;
+
+			var tmpToken:Token = new Token(index,index);
+			var tokenizer:ITokenizer;
+			if ( externalTokenizer == null ) {
+				tokenizer = new TextTokenizer(mTextField.text);	
+			}else {
+				tokenizer = externalTokenizer;
+			}
+			
+			var result:Token = new Token(0,0);
+			
+			var preToken:Token = tokenizer.getPreviousToken(tmpToken);
+			var nextToken:Token = tokenizer.getNextToken(tmpToken);
+			if ( preToken.last == nextToken.first ) {
+				result.first = preToken.first;
+				result.last = nextToken.last;
+				return result;		
+			}else {
+				return null;
+			}
+		}
+
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingUIAPI/src/com/adobe/linguistics/spelling/ui/IHighlighter.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingUIAPI/src/com/adobe/linguistics/spelling/ui/IHighlighter.as b/Squiggly/main/SpellingUIAPI/src/com/adobe/linguistics/spelling/ui/IHighlighter.as
new file mode 100644
index 0000000..ea702da
--- /dev/null
+++ b/Squiggly/main/SpellingUIAPI/src/com/adobe/linguistics/spelling/ui/IHighlighter.as
@@ -0,0 +1,34 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package com.adobe.linguistics.spelling.ui
+{
+	import com.adobe.linguistics.utils.Token;
+	import __AS3__.vec.Vector;
+	import flash.geom.Point;
+	
+	public interface IHighlighter
+	{
+		function drawSquiggles(tokens:Vector.<Token>):void;
+		function clearSquiggles():void;
+		function set offsetPoint(op:Point):void;
+		function get offsetPoint():Point;
+		
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingUIAPI/src/com/adobe/linguistics/spelling/ui/IWordProcessor.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingUIAPI/src/com/adobe/linguistics/spelling/ui/IWordProcessor.as b/Squiggly/main/SpellingUIAPI/src/com/adobe/linguistics/spelling/ui/IWordProcessor.as
new file mode 100644
index 0000000..919acbd
--- /dev/null
+++ b/Squiggly/main/SpellingUIAPI/src/com/adobe/linguistics/spelling/ui/IWordProcessor.as
@@ -0,0 +1,30 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package com.adobe.linguistics.spelling.ui
+{
+	import com.adobe.linguistics.utils.ITokenizer;
+	import com.adobe.linguistics.utils.Token;
+	
+	public interface IWordProcessor
+	{
+		function getWordAtPoint(x:uint, y:uint, externalTokenizer:ITokenizer=null):Token;
+		function replaceText(startIndex:int, endIndex:int, replacement:String):void;
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingUIAPI/src/com/adobe/linguistics/spelling/ui/SparkHighlighter.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingUIAPI/src/com/adobe/linguistics/spelling/ui/SparkHighlighter.as b/Squiggly/main/SpellingUIAPI/src/com/adobe/linguistics/spelling/ui/SparkHighlighter.as
new file mode 100644
index 0000000..f847584
--- /dev/null
+++ b/Squiggly/main/SpellingUIAPI/src/com/adobe/linguistics/spelling/ui/SparkHighlighter.as
@@ -0,0 +1,190 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package com.adobe.linguistics.spelling.ui
+{
+	import com.adobe.linguistics.utils.Token;
+	import com.adobe.linguistics.utils.TextTokenizer;
+	import flash.geom.Point;
+	
+	import flash.display.Shape;
+	import flash.geom.Rectangle;
+	import flash.text.engine.TextLine;
+	
+	import flashx.textLayout.compose.TextFlowLine;
+	import flashx.textLayout.edit.SelectionManager;
+	import flashx.textLayout.elements.TextFlow;
+	import flashx.textLayout.tlf_internal;
+	
+	import spark.components.RichEditableText;
+	use namespace tlf_internal;	
+
+	public class SparkHighlighter implements IHighlighter
+	{
+		
+		private var mTextField:RichEditableText;
+		private var mHighlighter:Shape;
+		/*
+		* offset point:
+		*/
+		private var _offsetPoint:Point;
+
+
+		public function SparkHighlighter( textField:RichEditableText )
+		{
+			if (textField == null ) throw new Error("illegal argument."); 
+			mTextField = textField;
+			mHighlighter = null;
+			this._offsetPoint = new Point(0,0);
+		}
+
+		public function drawSquiggles(tokens:Vector.<Token>):void
+		{
+			spellCheckRange(tokens);
+		}
+		
+		public function clearSquiggles():void
+		{
+			if (mHighlighter) {
+				mTextField.removeChild(mHighlighter);
+				mHighlighter=null;
+			}		
+		}
+
+		public function set offsetPoint(op:Point):void{
+			_offsetPoint = op;
+		}
+		
+		public function get offsetPoint():Point{
+			return _offsetPoint;
+		}
+
+
+
+		// TODO: refactor this code to share with halo components, and support words that cross lines
+		private function spellCheckRange(tokens:Vector.<Token>):void {
+
+			var ta:RichEditableText = mTextField;
+			if (!ta) return;		
+
+			mHighlighter= new Shape();
+			mHighlighter.graphics.clear();
+			
+			for ( var i:int = 0; i< tokens.length; ++i ) {
+				var _token:Token = tokens[i];
+				drawSquigglyLineForRange(_token.first, _token.last);
+			}
+			
+			// Just adjust the left padding, top padding is not an issue 
+			//var pleft:uint = mTextField.getStyle("paddingLeft");
+			//mHighlighter.x += pleft;			
+			mTextField.addChild(mHighlighter);	
+			
+
+		}
+		
+		// Draw squiggly line
+		private function drawSquigglyLineForRange(start:Number, end:Number):void
+		{
+			// draw squiggly line
+			var tf:TextFlow = mTextField.textFlow;
+			var tflFirst:TextFlowLine = tf.flowComposer.findLineAtPosition(start);
+			var tflLast:TextFlowLine = tf.flowComposer.findLineAtPosition(end);
+			var tflIndexFirst:int = tf.flowComposer.findLineIndexAtPosition(start);
+			var tflIndexLast:int = tf.flowComposer.findLineIndexAtPosition(end);
+			
+			// Pointer
+			var tflIndex:int = tflIndexFirst;
+			var tfl:TextFlowLine = tflFirst;
+			
+			if (tflIndexFirst == tflIndexLast) {
+				// Draw one line
+				drawSquigglyLineAtIndex(tflIndexFirst, start - tflFirst.absoluteStart, end - tflFirst.absoluteStart);
+			} else {
+				// Multiple lines (very long word)
+				drawSquigglyLineAtIndex(tflIndexFirst, start - tflFirst.absoluteStart);
+				
+				tflIndex++;
+				while (tflIndex != tflIndexLast) {
+					drawSquigglyLineAtIndex(tflIndex);
+					tflIndex++;
+				}
+				
+				drawSquigglyLineAtIndex(tflIndexLast, 0, end - tflLast.absoluteStart);
+			}
+		}
+		
+		// Draw a squiggly line at specific line for specific index range
+		private function drawSquigglyLineAtIndex(lineIndex:Number, startIndex:Number=0, endIndex:Number=0x7FFFFFFF):void
+		{
+			var tf:TextFlow = mTextField.textFlow;
+			var tfl:TextFlowLine = tf.flowComposer.getLineAt(lineIndex);
+			var rectLine:Rectangle = tfl.getBounds();
+			if (endIndex == 0x7FFFFFFF) {
+				drawSquigglyLineAtPoint(rectLine.left, rectLine.bottom, rectLine.right - rectLine.left);
+			}
+			else {
+				// Force to have a valid TextLine
+				var tl:TextLine = tfl.getTextLine(true);
+				
+				// TODO: atom index and char index is not matching for some chars, use try/catch to avoid crash
+				try {
+					var rectFirst:Rectangle = tl.getAtomBounds(startIndex);
+					var rectLast:Rectangle = tl.getAtomBounds(endIndex);
+					drawSquigglyLineAtPoint(rectFirst.left + tfl.x, rectLine.bottom, rectLast.right - rectFirst.left);
+				} catch (err:Error)
+				{
+					//TODO: report error
+				}
+			}
+				
+		}
+		// Draw a squiggly from point x,y with given width, the line is drew in mHighlighter 
+		private function drawSquigglyLineAtPoint(x:Number, y:Number, width:Number):void
+		{
+			mHighlighter.graphics.lineStyle(1, 0xfa0707, .65);
+			mHighlighter.graphics.moveTo(x, y);
+			var upDirection:Boolean = false;
+			var offset:uint = 0;
+			var stepLength:uint = 2;
+			for ( var i:uint = 1; offset <= width; i++) {
+				offset = offset + stepLength;
+				if ( upDirection )
+					mHighlighter.graphics.lineTo(x+offset,y);
+				else
+					mHighlighter.graphics.lineTo(x+offset,y+stepLength);
+				upDirection = !upDirection;
+			}	
+		}
+		
+		private function getValidFirstWordIndex():int{
+			var index:int = SelectionManager.computeSelectionIndex(mTextField.textFlow, mTextField, mTextField, 0 + mTextField.horizontalScrollPosition, 0 + mTextField.verticalScrollPosition);
+			return index;
+
+			
+		}
+		
+		private function getValidLastWordIndex():int{
+			var index:int = SelectionManager.computeSelectionIndex(mTextField.textFlow, mTextField, mTextField, mTextField.width+mTextField.horizontalScrollPosition, mTextField.height+mTextField.verticalScrollPosition);
+			return index;
+
+		}
+
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingUIAPI/src/com/adobe/linguistics/spelling/ui/SparkWordProcessor.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingUIAPI/src/com/adobe/linguistics/spelling/ui/SparkWordProcessor.as b/Squiggly/main/SpellingUIAPI/src/com/adobe/linguistics/spelling/ui/SparkWordProcessor.as
new file mode 100644
index 0000000..81e155b
--- /dev/null
+++ b/Squiggly/main/SpellingUIAPI/src/com/adobe/linguistics/spelling/ui/SparkWordProcessor.as
@@ -0,0 +1,104 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package com.adobe.linguistics.spelling.ui
+{
+	import com.adobe.linguistics.utils.TextTokenizer;
+	import com.adobe.linguistics.utils.Token;
+	import com.adobe.linguistics.utils.ITokenizer;
+	
+	import flashx.textLayout.edit.SelectionManager;
+	import flashx.textLayout.tlf_internal;
+	
+	import spark.components.RichEditableText;
+	
+	use namespace tlf_internal;	
+	
+	public class SparkWordProcessor implements IWordProcessor
+	{
+		private var mTextField:RichEditableText;
+
+		public function SparkWordProcessor(textField:RichEditableText)
+		{
+			if (textField == null ) throw new Error("illegal argument."); 
+			mTextField = textField;
+		}
+		
+		
+		public function replaceText(startIndex:int, endIndex:int, replacement:String):void {
+			var ta:RichEditableText = mTextField;
+			var end:int = getValidLastWordIndex();
+			
+			if ( replacement == null ) return;
+			
+			if (mTextField.text.length<endIndex || startIndex<0) {
+				return;
+			}
+			
+			var _misspellStart:int = startIndex;
+			var _misspellEnd:int = endIndex;
+
+			// Workaround for Spark: changes in inactive components will trigger strange behavior			
+			ta.setFocus();
+			ta.text = ta.text.substr(0, _misspellStart) + replacement + ta.text.substr(_misspellEnd);
+			ta.textFlow;
+			ta.selectRange(_misspellStart + replacement.length, _misspellStart + replacement.length);
+			
+			// Workaround for unexpected jump
+			ta.scrollToRange(end, end);
+		}
+		
+		public function getWordAtPoint(x:uint, y:uint, externalTokenizer:ITokenizer=null):Token
+		{
+			// TODO: use a better alternative than _misspellStart, end
+			var ta:RichEditableText = mTextField;	
+			var index:int = SelectionManager.computeSelectionIndex(ta.textFlow, ta, ta, x, y);
+
+			if (index >= ta.text.length) return null;
+
+			var tmpToken:Token = new Token(index,index);
+			var tokenizer:ITokenizer;
+			if ( externalTokenizer == null ) {
+				tokenizer = new TextTokenizer(mTextField.text);	
+			}else {
+				tokenizer = externalTokenizer;
+			}
+			
+			var result:Token = new Token(0,0);
+			var preToken:Token = tokenizer.getPreviousToken(tmpToken);
+			var nextToken:Token = tokenizer.getNextToken(tmpToken);
+			if ( preToken.last == nextToken.first ) {
+				result.first = preToken.first;
+				result.last = nextToken.last;
+				return result;		
+			}else {
+				return null;
+			}
+				
+		}
+
+		// TODO: workaround for unexpected jump when word replaced, to be refactored for code sharing
+		private function getValidLastWordIndex():int{
+			var index:int = SelectionManager.computeSelectionIndex(mTextField.textFlow, mTextField, mTextField, mTextField.width+mTextField.horizontalScrollPosition, mTextField.height+mTextField.verticalScrollPosition);
+			return index;
+		}
+
+
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingUIAPI/src/com/adobe/linguistics/spelling/ui/SpellingHighlighter.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingUIAPI/src/com/adobe/linguistics/spelling/ui/SpellingHighlighter.as b/Squiggly/main/SpellingUIAPI/src/com/adobe/linguistics/spelling/ui/SpellingHighlighter.as
new file mode 100644
index 0000000..2292a61
--- /dev/null
+++ b/Squiggly/main/SpellingUIAPI/src/com/adobe/linguistics/spelling/ui/SpellingHighlighter.as
@@ -0,0 +1,179 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package com.adobe.linguistics.spelling.ui
+{
+	import flash.display.Shape;
+	import flash.geom.Point;
+	import flash.geom.Rectangle;
+	import flash.text.TextLineMetrics;
+	
+	import mx.core.IUITextField;
+	import mx.flash.UIMovieClip;
+
+
+	public class SpellingHighlighter extends UIMovieClip
+	{
+		/*
+		* offset point:
+		*/
+		private var _offsetPoint:Point;
+		
+		/*
+		* Target TextField.
+		*/
+		private var _textField:IUITextField;
+		private static var InvalidIndexValue:int = -2;
+		public function SpellingHighlighter(textField:IUITextField) {
+			super();
+			this._textField = textField;
+			this._offsetPoint = new Point(0,0);
+		}
+		
+		public function drawSquigglyLine(firstCharIndex:int, lastCharIndex:int ):void {
+			var validFirstCharIndex:int = getValidFirstCharIndex(firstCharIndex);
+			var validLastCharIndex:int = getValidLastCharIndex(lastCharIndex);
+			if ( validFirstCharIndex == InvalidIndexValue || validLastCharIndex == InvalidIndexValue ){
+				return;
+			}
+			/* draw squiggly line here. */
+			if ( validFirstCharIndex <= validLastCharIndex ) {
+				var firstLine:int = _textField.getLineIndexOfChar(validFirstCharIndex);
+				var lastLine:int = _textField.getLineIndexOfChar(validLastCharIndex);
+				//only one line case.
+				if(lastLine==firstLine)
+				{
+					drawSingleSquigglyLine(validFirstCharIndex, validLastCharIndex);
+					return;
+				}
+				//more than one line.
+				//first line
+				drawSingleSquigglyLine(validFirstCharIndex, _textField.getLineOffset(firstLine)+_textField.getLineLength(firstLine)-1);
+				//middle....
+				for(var i:int=firstLine+1;i<lastLine;i++)
+				{
+					drawSingleSquigglyLine(_textField.getLineOffset(i), _textField.getLineOffset(i)+_textField.getLineLength(i)-1);
+				}
+				//last lines.
+				drawSingleSquigglyLine(_textField.getLineOffset(lastLine), validLastCharIndex);
+			}
+		}
+		
+		public function drawSingleSquigglyLine(firstCharIndex:int, lastCharIndex:int ):void {
+			var firstLine:int = _textField.getLineIndexOfChar(firstCharIndex);
+			var lastLine:int = _textField.getLineIndexOfChar(lastCharIndex);
+			if ( firstLine != lastLine ) {
+				return;
+			}else {
+				var rect1:Rectangle = _textField.getCharBoundaries(firstCharIndex);
+				var rect2:Rectangle = _textField.getCharBoundaries(lastCharIndex);
+				var x:Number = rect1.x+_offsetPoint.x - _textField.scrollH;
+				var y:Number = rect1.y + rect1.height + 2;
+				var width:Number = rect2.x+rect2.width-rect1.x;
+				
+				// Avoid drawing outside the textField
+				if (x<0) 
+				{
+					if (x+width > 0) {
+						width += x;
+						x = 0;
+					} 
+					else
+						return;
+				}
+				if (x+width > _textField.width) 
+				{
+					if (x < _textField.width) {
+						width = textField.width - x;
+					} 	
+					else
+						return;
+				}
+				
+				// The rectangle that bound the string you want
+				// actual work here.
+				var myShape:Shape = new Shape();
+				myShape.graphics.clear();
+				//myShape.graphics.beginFill(0x0099CC, .35); 
+				myShape.graphics.lineStyle(1, 0xfa0707, .65);
+				myShape.graphics.moveTo(x, y);
+				var upDirection:Boolean = false;
+				var offset:uint = 0;
+				var stepLength:uint = 2;
+				for ( var i:uint = 1; offset <= width; i++) {
+					offset = offset + stepLength;
+					if ( upDirection )
+						myShape.graphics.lineTo(x+offset,y);
+					else
+						myShape.graphics.lineTo(x+offset,y+stepLength);
+					upDirection = !upDirection;
+				}
+				//myShape.graphics.endFill();
+				this.addChild(myShape);	
+			}
+		}
+		
+		private function getValidFirstCharIndex(firstCharIndex:int):int{
+			if(firstCharIndex<0 || firstCharIndex>_textField.text.length-1) 
+			{
+				return InvalidIndexValue;
+			}
+			var firstLine:Number = _textField.getLineIndexOfChar(firstCharIndex);
+			
+			if(firstLine<_textField.scrollV-1)
+			{
+				firstLine = _textField.scrollV-1;
+				return _textField.getLineOffset(firstLine);
+			}
+			return firstCharIndex;
+		}
+		
+		private function getValidLastCharIndex(lastCharIndex:int):int{
+			if(lastCharIndex<0 || lastCharIndex>_textField.text.length-1) 
+			{
+				return InvalidIndexValue;
+			}
+			var lastLine:Number = _textField.getLineIndexOfChar(lastCharIndex);
+			if(lastLine>_textField.bottomScrollV-1)
+			{
+				lastLine = _textField.bottomScrollV-1;
+				return _textField.getLineOffset(lastLine)+_textField.getLineLength(lastLine)-1;
+			}
+			return lastCharIndex;
+		}
+					
+		public function set textField(tf:IUITextField):void{
+			_textField = tf;
+		}
+		
+		public function get textField():IUITextField{
+			return _textField;
+		}
+		
+		public function set offsetPoint(op:Point):void{
+			_offsetPoint = op;
+		}
+		
+		public function get offsetPoint():Point{
+			return _offsetPoint;
+		}
+
+
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingUIEx/src/com/adobe/linguistics/spelling/SpellUI.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingUIEx/src/com/adobe/linguistics/spelling/SpellUI.as b/Squiggly/main/SpellingUIEx/src/com/adobe/linguistics/spelling/SpellUI.as
new file mode 100644
index 0000000..69c9aab
--- /dev/null
+++ b/Squiggly/main/SpellingUIEx/src/com/adobe/linguistics/spelling/SpellUI.as
@@ -0,0 +1,577 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package com.adobe.linguistics.spelling
+{
+	import com.adobe.linguistics.spelling.UserDictionary;
+	import com.adobe.linguistics.spelling.framework.ResourceTable;
+	import com.adobe.linguistics.spelling.framework.SpellingConfiguration;
+	import com.adobe.linguistics.spelling.framework.SpellingService;
+    import com.adobe.linguistics.spelling.ui.HaloHighlighter;
+    import com.adobe.linguistics.spelling.ui.IHighlighter;
+    import com.adobe.linguistics.spelling.ui.SparkHighlighter;
+    import com.adobe.linguistics.spelling.ui.HaloWordProcessor;
+    import com.adobe.linguistics.spelling.ui.IWordProcessor;
+    import com.adobe.linguistics.spelling.ui.SparkWordProcessor;
+	import com.adobe.linguistics.utils.TextTokenizer;
+	import com.adobe.linguistics.utils.Token;
+	
+	import flash.events.Event;
+	import flash.events.FocusEvent;
+	import flash.geom.Point;
+	import flash.geom.Rectangle;
+	import flash.net.SharedObject;
+	import flash.net.URLLoader;
+	import flash.net.URLRequest;
+	import flash.text.TextField;
+	import flash.utils.Dictionary;
+	
+	import mx.controls.RichTextEditor;
+	import mx.controls.TextArea;
+	import mx.controls.TextInput;
+	import mx.core.UIComponent;
+	import mx.core.mx_internal;
+	import mx.events.ScrollEvent;
+	
+	import spark.components.RichEditableText;
+	import spark.components.TextArea;
+	import spark.components.TextInput;
+	
+	import flashx.textLayout.tlf_internal;
+	import flashx.textLayout.compose.TextFlowLine;
+	import flashx.textLayout.edit.SelectionManager;
+	import flashx.textLayout.elements.TextFlow;
+	
+	use namespace mx_internal;
+	
+	use namespace tlf_internal;	
+	/**
+	 * UI implementation for spelling.
+	 *
+	 * <p>This class is a simple UI for some standard Flex UI components.
+	 *	It is not intended to address a complete user interface.
+	 *	Instead, it presents a basic user interface for some commonly used Flex UI components.</p>
+	 *
+	 * <p>For advanced text editing applications, more complex features are likely required.
+	 *	For those applications, we recommend bypassing this class and utilizing the <code>SpellChecker</code> class directly.</p>
+	 *
+	 * @playerversion Flash 10
+	 * @langversion 3.0
+	 */
+	public class SpellUI
+	{
+		private var hh:IHighlighter;
+		private var hw:IWordProcessor;
+		
+		private var _checkLastWord:Boolean = true;
+		private var _spellingEnabled:Boolean;
+		
+		private var _actualParent:*;
+		private var isHaloComponent:Boolean;
+		private var isSparkComponent:Boolean;
+
+        //New Added below
+		private var mTextField:*;
+		
+		//private var mTextField:RichEditableText;
+
+		private var _dictname:String = new String();			
+		private var _hundict:HunspellDictionary = new HunspellDictionary();		
+		private var _userdict:UserDictionary = null;
+		private var _sharedobj:SharedObject = null;
+		private var scm:SpellingContextMenu;
+		
+		private var _newchecker:SpellChecker = null;
+		private var _resource_locale:Object = null;
+		private var _spellingservice:SpellingService = null;
+
+		private static var _contextMenuEntries:Object = {enable:"Enable Spelling", disable:"Disable Spelling", add:"Add to dictionary"};		
+		private static var _spellingConfigUrl:String = "AdobeSpellingConfig.xml";
+		private static var _UITable:Dictionary= new Dictionary();
+		private static var _parentTable:Dictionary= new Dictionary();
+		private static var _cacheDictTable:Dictionary= new Dictionary();
+		
+		private static var _configXML:XML = null;
+		private static var _configXMLLoading:Boolean = false;
+		private static var _configXMLLoader:URLLoader = new URLLoader();
+		
+		// Work around for the memory usage problem, ideally a better fix is to provide a dicitonary unload function
+		private static var _cache:Object = new Object();
+
+		/**
+		 * Enables the spell checking feature for a UI component.
+		 * 
+		 * <p>Note: This version provides only enabling function but no disabling function.</p>
+		 *
+		 * @param comp	A text editing Flex UI component.
+		 				It can be a <code>TextArea</code>, <code>TextInput</code> or <code>RichTextEditor</code>.
+		 * @param dict	A URL for the dictionary to be used with the <code>SpellChecker.</code>
+		 *
+		 * @includeExample Examples/Flex/SquigglyUIExample/src/SquigglyUIExample.mxml
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */
+		public static function enableSpelling(comp:UIComponent, lang:String):void
+		{
+			if ( lang == null ) return;
+		 	// TODO: Change dict parameter type to a SpellCheck class or a URL string.
+			var txt:* = getComponentTextModel(comp);
+			/*var comp1:UIComponent = txt.parent;
+			var comp2:UIComponent = txt.owner;
+			var comp3:UIComponent = txt.parentApplication;
+			var comp4:UIComponent = txt.parentDocument;
+			var comp5:UIComponent = txt.parentDocument.hostComponent; <--spark parent UICOmponent*/
+			if ( txt==null || _UITable[comp]!=undefined )
+				return;	
+			
+			// TODO: dangerous, is garbage collection going to clear this?
+			_UITable[comp]=new SpellUI(txt, lang);
+			_parentTable[txt] = comp;
+			_cacheDictTable[comp]=lang;
+		}
+
+		// Customize the spelling related entry in spelling contextMenu
+		public static function setSpellingMenuEntries(entries:Object):Boolean
+		{
+			if (entries.enable && entries.disable && entries.add && (entries.enable != "") && (entries.disable != "") && (entries.add != ""))
+			{
+				_contextMenuEntries = entries;
+				return true;
+			}
+			else
+				return false;
+		}
+		
+		/**
+		 * Get the spelling context menu entries. 
+		 * 
+		 * @return A flex <code>Object</code> containing the spelling context menu entries. If you haven't customized the entries, you get the default associative array <code>{enable:"Enable Spelling", disable:"Disable Spelling", add:"Add to dictionary"}</code>
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */		
+		public static function getSpellingMenuEntries():Object
+		{
+			return _contextMenuEntries;
+		}
+		
+		/**
+		 * The URL for the spelling config xml file. If you haven't specify it, the default URL is [applicationDirectory]/AdobeSpellingConfig.xml. Note that we don't validate the URL, if the file doesn't exist, you will get an error when calling enableSpelling() function.
+		 *
+		 * @example The following code customize the spellingConfigUrl before enabling spell checking.
+		 * <listing version="3.0">
+		 * SpellUI.spellingConfigUrl = "./config/MySpellingConfig.xml";
+		 * SpellUI.enableSpelling(textArea, "en_US");
+		 * </listing>
+		 */
+		public static function get spellingConfigUrl():String
+		{
+			return _spellingConfigUrl;
+		}
+		
+		public static function set spellingConfigUrl(url:String):void
+		{
+			if (url == null) throw new Error("URL can't be null");
+			_spellingConfigUrl = url;
+		}
+		
+
+		
+		/**
+		 * Disable the spell checking feature for a UI component.
+		 * 
+		 * @param comp	A text editing Flex UI component.
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */
+		public static function disableSpelling(comp:UIComponent):void{
+			if ( _UITable[comp] == undefined )
+				return;
+			var _ui:SpellUI = _UITable[comp];
+			if ( _ui != null) _ui.cleanUp();
+			var dictName:String = _cacheDictTable[comp];
+			var cleanUPDictionaryCount:int = 0;
+			for each ( var _dictName:String in _cacheDictTable ) {
+				if ( _dictName == dictName  )
+					cleanUPDictionaryCount++;
+			}
+			if ( cleanUPDictionaryCount == 1 ) {
+				_cache[dictName] = undefined;
+			}
+			delete _UITable[comp];
+			delete _cacheDictTable[comp];
+			
+		}
+		
+		/**
+		 @private
+		 (This property is for Squiggly Developer use only.)
+		 */
+		public static function get UITable():Dictionary {
+			return _UITable;
+		}
+		
+		/**
+		 @private
+		 (This property is for Squiggly Developer use only.)
+		 */
+		public function set spellingEnabled(value:Boolean):void {
+			_spellingEnabled = value;
+		}
+		
+		/**
+		 @private
+		 (This property is for Squiggly Developer use only.)
+		 */
+		public static function get parentComp():Dictionary {
+			return _parentTable;
+		}
+		
+		private static function getComponentTextModel(comp:UIComponent):* {
+			var txt:TextField = null;
+			var txt2:RichEditableText = null;
+			if ( (comp == null) || !( (comp is mx.controls.TextArea) || (comp is mx.controls.TextInput) || (comp is RichTextEditor) 
+								|| (comp is spark.components.TextArea) || (comp is spark.components.TextInput) || (comp is spark.components.RichEditableText)) )
+				return null;
+			if ((comp as RichTextEditor) != null) {
+				txt = (comp as RichTextEditor).textArea.getTextField() as TextField;
+			}
+			else if ((comp as mx.controls.TextArea) != null){
+				txt = (comp as mx.controls.TextArea).getTextField() as TextField;
+			}
+			else if ((comp as mx.controls.TextInput) != null) {
+				txt = (comp as mx.controls.TextInput).getTextField() as TextField;
+			}
+			else if ((comp as spark.components.TextArea) != null) {
+                if ((comp as spark.components.TextArea).textDisplay is TextField)
+                    txt = (comp as spark.components.TextArea).textDisplay as TextField;
+                else
+    				txt2 = (comp as spark.components.TextArea).textDisplay as RichEditableText;
+			}
+			else if ((comp as spark.components.TextInput) != null) {
+                if ((comp as spark.components.TextInput).textDisplay is TextField)
+                    txt = (comp as spark.components.TextInput).textDisplay as TextField;
+                else
+    				txt2 = (comp as spark.components.TextInput).textDisplay as RichEditableText;
+			}
+			else if ((comp as spark.components.RichEditableText) !=null) {
+				txt2 = comp as RichEditableText;
+			}
+			else {
+				// do nothing if it's not a valid text component
+				return null;
+			}
+			if (txt != null) 
+				return txt;
+			else 
+				return txt2;
+		}
+		
+		/**
+		 * Constructs a SpellUI object.
+		 *
+		 *	@param	textFiled	A Flex UI component to include spell-check capability
+		 *	@param	dict		A URL for Squiggly spelling dictionary.
+		 *
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */			
+		public function SpellUI(textModel:*, lang:String)
+		{		
+			// TODO: Consider making this method invisible to user, only expose the static function.
+			if ( textModel is TextField ) {
+				isHaloComponent=true;
+				//New Added below -- check if text field needs to be extracted from textModel
+				//mTextField = textModel;
+			}else if (textModel is RichEditableText ) {
+				isSparkComponent=true;
+				textModel.setFocus();
+				textModel.selectRange(textModel.text.length, textModel.text.length);
+				//New Added below -- check if text field needs to be extracted from textModel
+				//mTextField = textModel ;
+			}else {
+				// do nothing, we only accept textField and TextFlow here....
+				return;
+			}
+			_actualParent = textModel;
+			mTextField = textModel ;
+									
+			mTextField.addEventListener(FocusEvent.FOCUS_OUT, handleFocusOut);
+			mTextField.addEventListener(FocusEvent.FOCUS_IN, handleFocusIn);
+			mTextField.addEventListener(ScrollEvent.SCROLL, spellCheckScreen);
+			mTextField.parent.addEventListener(Event.RENDER, spellCheckScreen);
+			mTextField.parent.addEventListener(Event.CHANGE, handleChangeEvent);
+			_dictname = lang;			
+			loadConfig();
+			
+		}
+		
+		private function spellCheckScreen(event:Event):void
+		{
+			doSpellingJob();
+		}
+		
+		private function handleFocusOut(event:FocusEvent):void
+		{
+			_checkLastWord = true;
+			doSpellingJob();
+		}
+						
+		private function handleFocusIn(event:FocusEvent):void
+		{
+			_checkLastWord = false;
+			doSpellingJob();
+		}
+		
+		private function handleChangeEvent( event:Event ) :void {
+			_checkLastWord = false;
+			spellCheckScreen(event);
+		}
+		
+		/*private function doSpelling():void
+		{
+			_checkLastWord = true;
+			doSpellingJob();
+		}*/
+				
+		/**
+		 @private
+		 (This property is for Squiggly Developer use only.)
+		 */		
+		public function doSpellingJob():void
+		{
+			if (_spellingEnabled == false) return;
+			spellCheckRange(getValidFirstWordIndex(), getValidLastWordIndex());
+		}
+		
+		private function spellCheckRange(start:uint, end:uint):void {
+			//hh.preSpellCheckRange(start, end);
+			hh.clearSquiggles();
+			if ( isHaloComponent ) {
+				//if (end <= start) return;
+				var firstLine:int = mTextField.getLineIndexOfChar(start);
+				var rect:Rectangle = mTextField.getCharBoundaries(start);
+				var counter:uint = start;
+				var numLines:Number = 0;
+				
+				/* mTextField.getCharBoundaries returns null for blank lines and for end of line characters. Placing this workaround
+				to count line heights until a non-null bounding rectangle is found */
+				while (rect == null) {
+					if (++counter > end) {
+						rect = new Rectangle(0,0,0,0);
+						break;
+					}
+					numLines += mTextField.getLineMetrics(firstLine).height;
+					firstLine++;
+					rect = mTextField.getCharBoundaries(counter);
+				}
+				
+				var yoffset:Number = rect.y - numLines;	
+				var pleft:uint = (mTextField.parent as UIComponent).getStyle("paddingLeft");
+				var ptop:uint = (mTextField.parent as UIComponent).getStyle("paddingTop");
+				
+				var offsetPoint:Point = new Point(pleft, ptop-yoffset); 
+								
+				hh.offsetPoint = offsetPoint;
+			}
+			
+			var tokenizer:TextTokenizer = new TextTokenizer(mTextField.text.substring(start,end));
+			var tokens:Vector.<Token> = new Vector.<Token>();
+			
+			for ( var token:Token = tokenizer.getFirstToken(); token != tokenizer.getLastToken(); token= tokenizer.getNextToken(token) ) {
+				var result:Boolean=_spellingservice.checkWord(mTextField.text.substring(token.first+start, token.last+start));					
+				if (!result){
+					if (_checkLastWord || (token.last+start != mTextField.text.length))
+						//hh.highlightWord(token.first+start, token.last+start-1);
+						//tokens.push(new Token(token.first+start, token.last+start-1));
+						hh.drawSquiggleAt(new Token(token.first+start, token.last+start-1));
+				}
+				
+			}
+			//hh.postSpellCheckRange(start, end);
+			//hh.offsetPoint = offsetPoint;
+			//hh.drawSquiggles(tokens);
+		}
+		
+		
+		
+		private function getValidFirstWordIndex():int{			
+			var index:int;
+			if ( mTextField is TextField ) {
+				index = mTextField.getLineOffset(mTextField.scrollV-1);
+			}else if (mTextField is RichEditableText ) {			
+				// Check for computeSelectionIndexInContainer which throws when lineindex == 0
+				try {
+					index = SelectionManager.computeSelectionIndex(mTextField.textFlow, mTextField, mTextField, 0 + mTextField.horizontalScrollPosition, 0 + mTextField.verticalScrollPosition);
+				
+				} catch (err:Error)
+				{
+					//TODO: report error
+					index = 0;
+				}
+			}
+			return index;
+		}
+		
+		private function getValidLastWordIndex():int{			
+			var index:int;
+			if ( mTextField is TextField ) {
+				index = mTextField.getLineOffset(mTextField.bottomScrollV-1)+mTextField.getLineLength(mTextField.bottomScrollV-1);
+			}else if (mTextField is RichEditableText ) {	
+				// Check for computeSelectionIndexInContainer which throws when lineindex == 0
+				try {
+					index = SelectionManager.computeSelectionIndex(mTextField.textFlow, mTextField, mTextField, mTextField.width+mTextField.horizontalScrollPosition, mTextField.height+mTextField.verticalScrollPosition);
+				} catch (err:Error)
+				{
+					//TODO: report error
+					index = 0;
+				}
+			}				
+			return index;
+		}
+
+			private function loadConfig():void{
+			_resource_locale = SpellingConfiguration.resourceTable.getResource(_dictname);
+			
+			if ((_resource_locale != null) || (SpellUI._configXML != null)) 
+				loadConfigComplete(null);
+			else {	
+				SpellUI._configXMLLoader.addEventListener(Event.COMPLETE, loadConfigComplete);
+			
+				if (SpellUI._configXMLLoading == false)
+				{
+					SpellUI._configXMLLoader.load(new URLRequest(_spellingConfigUrl));
+					SpellUI._configXMLLoading = true;
+				}
+			}
+		}
+		
+		private function loadConfigComplete(evt:Event):void{
+			if (_resource_locale == null) {
+			if (SpellUI._configXML == null)
+				SpellUI._configXML= new XML(evt.target.data);
+			
+				SpellingConfiguration.resourceTable.setResource(_dictname,{rule:SpellUI._configXML.LanguageResource.(@languageCode==_dictname).@ruleFile, 
+																		dict:SpellUI._configXML.LanguageResource.(@languageCode==_dictname).@dictionaryFile});
+		}
+                //New Added
+			_spellingservice = new SpellingService(_dictname);
+			_spellingservice.addEventListener(Event.COMPLETE, loadDictComplete);
+			_spellingservice.init();
+		}
+		
+				
+				
+		
+		private function loadDictComplete(evt:Event):void
+		{					
+			//_newchecker = new SpellChecker(_hundict);
+			
+			// Lazy loading the UD only when the main dict is loaded successfully
+			if ((SpellUI._cache["Squiggly_UD"] as UserDictionary) == null)
+			{
+				_sharedobj = SharedObject.getLocal("Squiggly_v03");
+				var vec:Vector.<String> = new Vector.<String>();
+				if (_sharedobj.data.ud) {
+					for each (var w:String in _sharedobj.data.ud)
+					vec.push(w);
+				}
+				_userdict = new UserDictionary(vec);
+				
+				SpellUI._cache["Squiggly_SO"] = _sharedobj;
+				SpellUI._cache["Squiggly_UD"] = _userdict;
+			}
+			else 
+			{
+				_sharedobj = SpellUI._cache["Squiggly_SO"];
+				_userdict = SpellUI._cache["Squiggly_UD"];
+			}
+			_spellingservice.addUserDictionary(_userdict);
+			
+			
+			// Add the context menu, this might be not successful
+			scm = null;
+			try {
+				addContextMenu(null);
+			}
+			catch (err:Error)
+			{
+				// TODO: error handling here
+			}
+			_actualParent.addEventListener(Event.ADDED_TO_STAGE, addContextMenu);
+		}
+		
+		
+		private function addContextMenu(event:Event):void
+		{
+			if ( scm != null ) return;
+			if ( isHaloComponent ) {
+				hh= new HaloHighlighter( _actualParent);
+				hw= new HaloWordProcessor( _actualParent );
+			}else if ( isSparkComponent ){
+				hh = new SparkHighlighter( _actualParent);
+				hw = new SparkWordProcessor( _actualParent);
+			} else {
+				trace("error now, later will be true");
+			}
+		
+			scm =  new SpellingContextMenu(hh, hw, _spellingservice, _actualParent, _actualParent.contextMenu); 
+			scm.setIgnoreWordCallback( addWordToUserDictionary );
+			
+			// Halo need this
+			if (_actualParent.contextMenu == null)
+			{
+				_actualParent.contextMenu = scm.contextMenu;
+			}
+			
+			//hh.spellingEnabled=true;
+			_spellingEnabled = true;
+			try {
+				doSpellingJob();
+			}
+			catch (err:Error)
+			{
+				// If it fails here, it should later triggered by the render event, so no need to do anything
+			}
+		}
+		
+		private function addWordToUserDictionary(word:String):void
+		{
+			_userdict.addWord(word);
+		
+			// TODO: serialization here might affect ther performance
+			_sharedobj.data.ud = _userdict.wordList;
+			
+		}
+		/**
+		 *	@private
+		 */
+		private function cleanUp():void {
+			hh.clearSquiggles();
+			scm.cleanUp();
+			_actualParent.removeEventListener(Event.ADDED_TO_STAGE, addContextMenu);
+			
+			mTextField.removeEventListener(ScrollEvent.SCROLL, spellCheckScreen);
+			mTextField.parent.removeEventListener(Event.RENDER, spellCheckScreen);
+			mTextField.parent.removeEventListener(Event.CHANGE, handleChangeEvent);
+			mTextField.removeEventListener(FocusEvent.FOCUS_OUT, handleFocusOut);
+			mTextField.removeEventListener(FocusEvent.FOCUS_IN, handleFocusIn);
+		}
+		
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingUIEx/src/com/adobe/linguistics/spelling/SpellingContextMenu.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingUIEx/src/com/adobe/linguistics/spelling/SpellingContextMenu.as b/Squiggly/main/SpellingUIEx/src/com/adobe/linguistics/spelling/SpellingContextMenu.as
new file mode 100644
index 0000000..fc71ce3
--- /dev/null
+++ b/Squiggly/main/SpellingUIEx/src/com/adobe/linguistics/spelling/SpellingContextMenu.as
@@ -0,0 +1,243 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package com.adobe.linguistics.spelling
+{
+	import com.adobe.linguistics.spelling.SpellUI;
+	import com.adobe.linguistics.spelling.framework.SpellingService;
+	import com.adobe.linguistics.spelling.ui.*;
+	import com.adobe.linguistics.utils.Token;
+	import com.adobe.linguistics.utils.TextTokenizer;
+	
+	import flash.events.ContextMenuEvent;
+	import flash.events.Event;
+	import flash.events.EventDispatcher;
+	
+	import flash.ui.ContextMenu;
+	import flash.ui.ContextMenuItem;
+	
+	import flash.text.TextField;
+	import mx.core.UIComponent;
+	
+	import flash.geom.Point;
+	import flash.geom.Rectangle;
+	
+	public class SpellingContextMenu
+	{
+		private var disableMenuItem:ContextMenuItem = new ContextMenuItem("Disable spell checking",true);
+		private var enableMenuItem:ContextMenuItem = new ContextMenuItem("Enable spell checking");
+		private var controlMenuItemList:Array = new Array();
+		private var suggestionMenuItemList:Array = new Array();
+		private var _spellingEnabled:Boolean;
+		private var _contextMenu:ContextMenu;
+		private var mTextHighlighter:IHighlighter;
+		private var mWordProcessor:IWordProcessor;
+		private var mSpellEngine:SpellingService;
+		private var mParentTextField:*;
+		private var _ignoreWordFunctionProcessor:Function;
+		private var _misspelledToken:Token;
+		private var _misspelled:String;
+		public function SpellingContextMenu(textHighlighter:IHighlighter, wordProcessor:IWordProcessor, engine:SpellingService, actualParent:*, contextMenu:ContextMenu=null)
+		{
+			
+			if ( textHighlighter == null || wordProcessor == null ||  engine == null) throw new Error("illegal argument."); 
+			mTextHighlighter = textHighlighter;
+			mWordProcessor = wordProcessor;
+			mSpellEngine = engine;
+			mParentTextField = actualParent;
+			if (contextMenu != null) {
+				_contextMenu =contextMenu;
+			}else {
+				_contextMenu = new ContextMenu();
+			}
+			enableMenuItem.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, handleEnableSpellCheck);
+			disableMenuItem.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, handleDisableSpellCheck);
+			controlMenuItemList.push(enableMenuItem);
+			controlMenuItemList.push(disableMenuItem);
+			
+			_contextMenu.customItems.push(disableMenuItem);
+			_contextMenu.customItems.push(enableMenuItem);
+			spellingEnabled = true; //default value
+			//spellingEnabled= mTextHighlighter.spellingEnabled;
+			_contextMenu.addEventListener(ContextMenuEvent.MENU_SELECT, handleContextMenuSelect);
+			_ignoreWordFunctionProcessor=null;
+		}
+		
+		public function cleanUp():void
+		{
+			mTextHighlighter=null;
+			mWordProcessor=null;
+			spellingEnabled = false;
+			_ignoreWordFunctionProcessor=null;
+			
+			_contextMenu.removeEventListener(ContextMenuEvent.MENU_SELECT, handleContextMenuSelect);
+			
+			var removedNum:int = 0;
+			var count:uint = _contextMenu.customItems.length;
+			for (var j:uint=count; j>0; j--) {
+				if ( isWordItem(_contextMenu.customItems[j-1]) || isControlItem(_contextMenu.customItems[j-1]) ) {
+					_contextMenu.customItems.splice(j-1,1);
+					removedNum++
+				}
+			}
+			if ( removedNum != suggestionMenuItemList.length + controlMenuItemList.length ) {
+				trace("internal error");
+			}
+			
+			suggestionMenuItemList = null;
+			controlMenuItemList = null;
+		}
+		
+		public function get contextMenu():ContextMenu {
+			return this._contextMenu;
+		}
+
+		private function handleContextMenuSelect(event:ContextMenuEvent):void
+		{
+			/* Clear the context menu */
+			//spellingEnabled= mTextHighlighter.spellingEnabled;
+			//SpellUI.doSpelling1();
+			var removedNum:int = 0;
+			var count:uint = _contextMenu.customItems.length;
+			for (var j:uint=count; j>0; j--) {
+				if ( isWordItem(_contextMenu.customItems[j-1]) ) {
+					_contextMenu.customItems.splice(j-1,1);
+					removedNum++
+				}
+			}
+			if ( removedNum != suggestionMenuItemList.length ) {
+				trace("internal error");
+			}
+			
+			
+			suggestionMenuItemList = new Array();
+	
+			// localized entries
+			var entries:Object = SpellUI.getSpellingMenuEntries();
+			disableMenuItem.caption = entries.disable;
+			enableMenuItem.caption = entries.enable;				
+
+			if (spellingEnabled == true) {
+				_misspelledToken = mWordProcessor.getWordAtPoint(mParentTextField.mouseX, mParentTextField.mouseY);
+				if (_misspelledToken==null) return;
+				_misspelled = 	mParentTextField.text.substring(_misspelledToken.first, _misspelledToken.last);
+				if ((_misspelled==null) || (_misspelled == "")) return;
+				
+				if (mSpellEngine.checkWord(_misspelled)==true) return;				
+				
+				var suseAddToItem:ContextMenuItem = new ContextMenuItem(entries.add);
+				suseAddToItem.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, handleAddToItemSelect);
+				suggestionMenuItemList.push(suseAddToItem);
+				_contextMenu.customItems.splice(0,0,suseAddToItem);	
+				//var result:Array = mWordProcessor.getSuggestionsAtPoint();
+				var resultVector:Vector.<String> = mSpellEngine.getSuggestions(_misspelled);
+				var result:Array = new Array();
+				if (resultVector) {
+					for each (var w:String in resultVector)
+					result.push(w);
+				}
+				if (result!=null) {
+					for (var i:int=result.length-1;i>=0;i-- ) {
+						var suseMenuItem:ContextMenuItem = new ContextMenuItem(result[i]);
+						suseMenuItem.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, handleSuseItemSelect);
+						suggestionMenuItemList.push(suseMenuItem);
+						//_contextMenu.customItems.push(suseMenuItem);
+						_contextMenu.customItems.splice(0,0,suseMenuItem);
+					}
+				}
+			}
+			
+
+			
+		}
+		
+		public function setIgnoreWordCallback(func:Function ) :void {
+			if ( func != null )
+			_ignoreWordFunctionProcessor = func;
+		}
+		
+		private function handleAddToItemSelect(event:ContextMenuEvent):void
+		{
+			if ( _ignoreWordFunctionProcessor == null ) return;
+			
+			/*
+			var menuEntry:String = (event.currentTarget as ContextMenuItem).caption;
+			var start:uint = 5;
+			var end:uint = menuEntry.length - 15;
+			var word:String = menuEntry.substring(start, end);
+			*/
+			_ignoreWordFunctionProcessor(_misspelled);
+			//SpellUI.UITable[SpellUI.parentComp[mParentTextField]].doSpellingJob();
+			//now implicitly calling dospelling on all text areas
+			for each (var tempUIComponent:SpellUI in SpellUI.UITable)
+			{
+				tempUIComponent.doSpellingJob();
+			}
+		}
+
+		private function isWordItem(item:ContextMenuItem):Boolean {
+			
+			for ( var i:int=0; i<suggestionMenuItemList.length; ++i ) {
+				if ( suggestionMenuItemList[i] == item ) return true;
+			}
+			return false;
+		}
+		
+		private function isControlItem(item:ContextMenuItem):Boolean {
+			for (var i:int=0; i<controlMenuItemList.length; ++i) {
+				if ( controlMenuItemList[i] == item) return true;
+			}
+			return false;
+		}
+
+		private function handleSuseItemSelect(event:ContextMenuEvent):void
+		{
+			mWordProcessor.replaceText(_misspelledToken, (event.currentTarget as ContextMenuItem).caption );
+			SpellUI.UITable[SpellUI.parentComp[mParentTextField]].doSpellingJob();
+		}
+
+		
+		private function set spellingEnabled(value:Boolean) :void {
+			_spellingEnabled = value;
+			disableMenuItem.visible=spellingEnabled;
+			enableMenuItem.visible=!spellingEnabled;
+		}
+		private function get spellingEnabled():Boolean {
+			return this._spellingEnabled;
+		}
+		private function handleEnableSpellCheck(event:ContextMenuEvent):void
+		{
+			spellingEnabled= true;
+			//mTextHighlighter.spellingEnabled= spellingEnabled;
+			//SpellUI.doSpellingJob();
+			//dispatchEvent(new Event(Event.RENDER));
+			
+			SpellUI.UITable[SpellUI.parentComp[mParentTextField]].spellingEnabled = spellingEnabled;
+			SpellUI.UITable[SpellUI.parentComp[mParentTextField]].doSpellingJob();
+			//spellCheckRange(getValidFirstWordIndex(), getValidLastWordIndex());
+		}
+		private function handleDisableSpellCheck(event:ContextMenuEvent):void
+		{
+			spellingEnabled= false;
+			SpellUI.UITable[SpellUI.parentComp[mParentTextField]].spellingEnabled = spellingEnabled;
+			mTextHighlighter.clearSquiggles();
+		}
+				
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingUITLF/src/com/adobe/linguistics/spelling/SpellUIForTLF.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingUITLF/src/com/adobe/linguistics/spelling/SpellUIForTLF.as b/Squiggly/main/SpellingUITLF/src/com/adobe/linguistics/spelling/SpellUIForTLF.as
new file mode 100644
index 0000000..4128cd4
--- /dev/null
+++ b/Squiggly/main/SpellingUITLF/src/com/adobe/linguistics/spelling/SpellUIForTLF.as
@@ -0,0 +1,522 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package com.adobe.linguistics.spelling
+{
+	import com.adobe.linguistics.spelling.UserDictionary;
+	import com.adobe.linguistics.spelling.framework.ResourceTable;
+	import com.adobe.linguistics.spelling.framework.SpellingConfiguration;
+	import com.adobe.linguistics.spelling.framework.SpellingService;
+	import com.adobe.linguistics.spelling.ui.IHighlighter;
+	import com.adobe.linguistics.spelling.ui.IWordProcessor;
+	import com.adobe.linguistics.spelling.ui.TLFHighlighter;
+	import com.adobe.linguistics.spelling.ui.TLFWordProcessor;
+	import com.adobe.linguistics.utils.TextTokenizer;
+	import com.adobe.linguistics.utils.Token;
+	
+	import flash.events.Event;
+	import flash.events.FocusEvent;
+	import flash.geom.Point;
+	import flash.geom.Rectangle;
+	import flash.net.SharedObject;
+	import flash.net.URLLoader;
+	import flash.net.URLRequest;
+	import flash.utils.Dictionary;
+	
+	import flashx.textLayout.compose.StandardFlowComposer;
+	import flashx.textLayout.compose.TextFlowLine;
+	import flashx.textLayout.container.ContainerController;
+	import flashx.textLayout.conversion.TextConverter;
+	import flashx.textLayout.edit.SelectionManager;
+	import flashx.textLayout.elements.FlowLeafElement;
+	import flashx.textLayout.elements.ParagraphElement;
+	import flashx.textLayout.elements.TextFlow;
+	import flashx.textLayout.events.CompositionCompleteEvent;
+	
+	import flashx.textLayout.tlf_internal;
+	
+	
+	use namespace tlf_internal;	
+	/**
+	 * <p>A comprehensive convenience class that bundles a context menu UI, 
+	 * the spelling engine, the dictionary loader, and user dictionary support 
+	 * to enable a single-line integration of spell checking functionality into 
+	 * any custom UI component built around TLF TextFlow.  </p>
+	 * 
+	 *
+	 * <p>For advanced text editing applications, more complex features are likely required.
+	 *	For those applications, we recommend bypassing this class and utilizing the <code>SpellChecker</code> class directly.</p>
+	 *
+	 * In order to display Squiggly custom right-click context menu, SpellUIForTLF extends TLF <code>ContainerController</code> class and overrides createContextMenu() method 
+	 * of <code>ContainerController</code>. This could have the following side-effects for a Squiggly client:
+	 * <ul>
+	 * 		<li>In case the Squiggly client application uses a derived controller that inherits from ContainerController class in order to show custom context menu items, Squiggly
+	 * 			context menu will override that. That essentially means that after SpellUIForTLF.enableSpelling() is called, client's own custom right-click menu items, if any, will not be
+	 * 			accessible. </li>
+	 * 		<li>Incase any ContainerController api needs to be called after SpellUIForTLF.enableSpelling() has been called, the client application will need to get the controller objects afresh 
+	 * 			from the TextFlow's FlowComposer. This is needed since SpellUIForTLF replaces ContainerController objects with new SquigglyCustomContainerController(derived from ContainerController) objects. </li> 
+	 * </ul>
+	 * 
+	 * 
+	 * <p><code>SpellUIForTLF</code> uses the AdobeSpellingConfig.xml file to lookup corresponding resource files for a given locale.
+	 * The default location of AdobeSpellingConfig.xml is [yourapplicationDirectory]/AdobeSpellingConfig.xml. This could be customized using 
+	 * <code>spellingConfigUrl</code> property of <code>SpellUI</code>. You don't have to change the content of this file. However,
+	 * if you want to add a new language, to use an alternative dictionary or to customize the location for your dictionaries, you can modify it. 
+	 * There's an known issue with IIS web server when loading dictionary files with unknown extensions, in which case you can modify the XML to work around it.</p><p>
+	 * A sample AdobeSpellingConfig.xml will look as follows:
+	 * <listing version="3.0">
+	 * <pre class="preWrapper">
+	 * &lt;?xml version=&quot;1.0&quot; encoding='UTF-8'?&gt;
+	 * &lt;SpellingConfig&gt;
+	 *   	&lt;LanguageResource language=&quot;English&quot; 	  languageCode=&quot;en_US&quot; ruleFile=&quot;dictionaries/en_US/en_US.aff&quot; dictionaryFile=&quot;dictionaries/en_US/en_US.dic&quot;/&gt;
+	 *    	&lt;LanguageResource language=&quot;Spanish&quot;    languageCode=&quot;es_ES&quot; ruleFile=&quot;dictionaries/es_ES/es_ES.aff&quot; dictionaryFile=&quot;dictionaries/es_ES/es_ES.dic&quot;/&gt;
+	 *   	&lt;LanguageResource language=&quot;Portuguese&quot; languageCode=&quot;pt_PT&quot; ruleFile=&quot;dictionaries/pt_PT/pt_PT.aff&quot; dictionaryFile=&quot;dictionaries/pt_PT/pt_PT.dic&quot;/&gt;
+	 *  	 &lt;LanguageResource language=&quot;Italian&quot; 	  languageCode=&quot;it_IT&quot; ruleFile=&quot;dictionaries/it_IT/it_IT.aff&quot; dictionaryFile=&quot;dictionaries/it_IT/it_IT.dic&quot;/&gt;
+	 * &lt;/SpellingConfig&gt;</pre>
+	 *
+	 * </listing>
+	 * Note: The languageCode can be an arbitrary value, as long as you are consistent when passing them to the Squiggly classes. 
+	 * However, we highly encourage you to follow the two part Unicode language identifier format. 
+	 * For more information, please consult the latest Unicode Technical Standard that can be found at: http://unicode.org/reports/tr35/.</p>
+	 * 
+	 * @playerversion Flash 10
+	 * @langversion 3.0
+	 */
+	public class SpellUIForTLF
+	{
+		private var hh:IHighlighter;
+		private var hw:IWordProcessor;
+		
+		private var _checkLastWord:Boolean = true;
+		private var _spellingEnabled:Boolean;
+		
+		private var _actualParent:*;
+		
+
+        //New Added below
+		private var mTextFlow:TextFlow;
+		
+		
+		private var _dictname:String = new String();			
+
+		private var _userdict:UserDictionary = null;
+		private var _sharedobj:SharedObject = null;
+		private var scm:SpellingContextMenuForTLF;
+		
+		private var _newchecker:SpellChecker = null;
+		private var _resource_locale:Object = null;
+		private var _spellingservice:SpellingService = null;
+
+		private static var _contextMenuEntries:Object = {enable:"Enable Spelling", disable:"Disable Spelling", add:"Add to dictionary"};		
+		private static var _spellingConfigUrl:String = "AdobeSpellingConfig.xml";
+		private static var _UITable:Dictionary= new Dictionary();
+		private static var _parentTable:Dictionary= new Dictionary();
+		private static var _cacheDictTable:Dictionary= new Dictionary();
+		
+		private static var _configXML:XML = null;
+		private static var _configXMLLoading:Boolean = false;
+		private static var _configXMLLoader:URLLoader = new URLLoader();
+		
+		// Work around for the memory usage problem, ideally a better fix is to provide a dicitonary unload function
+		private static var _cache:Object = new Object();
+
+		/**
+		 * Enables the spell checking feature for a TLF TextFlow. Once a TextFlow is spell checking enabled, misspelled words will be highlighted with a squiggly line. Users can 
+		 * right click on a misspelled word to see the suggestions in the context menu.
+		 * 
+		 * @param comp	A TLF TextFlow object
+		 * @param lang	The language code used for spell checking, for example <code>en_US</code>. it will lookup the AdobeSpellingConfig.xml file to access corresponding resource files.
+		 * AdobeSpellingConfig.xml should located at the same folder as your main mxml source file. You don't have to change the content of this file. However,
+		 * if you want to add a new language, to use an alternative dictionary or to customize the location for your dictionaries, you can modify it. There's an known issue with
+		 * IIS web server when loading dictionary files with unknown extensions, in which case you can modify the XML to work around it.
+		 * 
+		 * 
+		 * @includeExample Examples/ActionScript/SquigglyTLFExample/src/SquigglyTLFExample.as
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */
+
+		public static function enableSpelling(comp:TextFlow, lang:String):void
+		{
+			if ( lang == null ) return;
+			if ( comp==null || _UITable[comp]!=undefined )
+				return;	
+			
+			// TODO: dangerous, is garbage collection going to clear this?
+			_UITable[comp]=new SpellUIForTLF(comp, lang);
+			_parentTable[comp] = comp;
+			_cacheDictTable[comp]=lang;			
+		}	
+	
+		/**
+		 * Set the spelling context menu entries. This uses the ActionScript Object class as an associative array for extensibility. 
+		 * <code>entries</code> should have all the customized contextMenu entries including <code>enable (spelling), 
+		 * disable (spelling) and add (to dictionary)</code>. To ensure a consistent contextMenu within your application, 
+		 * the spelling context menu entries you provide here are applied to all UI components. We recommend you use this API
+		 * to localize the context menu strings.
+		 *  
+		 * @param entries A Object that looks like <code>entries:Object = {enable:"Enable Spelling", disable:"Disable Spelling", 
+		 * add:"Add to dictionary"}</code>. If you don't customize the contextMenu, the default contextMenu in English will be used.
+		 * 
+		 * @return <code>True</code> if the spelling menu is successfully customized, <code>false</code> if it fails. Possible failure 
+		 * reasons include passing the wrong object or missing some required entries. If the function fails, the contextMenu is left unchanged.
+		 * 
+		 * 
+		 * @IncludeExample Examples/Flex/CustomContextMenu/src/CustomContextMenu.mxml
+		 * @IncludeExample Examples/Flex/ContextMenuWithResource/src/ContextMenuWithResource.mxml
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */
+		public static function setSpellingMenuEntries(entries:Object):Boolean
+		{
+			if (entries.enable && entries.disable && entries.add && (entries.enable != "") && (entries.disable != "") && (entries.add != ""))
+			{
+				_contextMenuEntries = entries;
+				return true;
+			}
+			else
+				return false;
+		}
+		
+		/**
+		 * Get the spelling context menu entries. 
+		 * 
+		 * @return A actionScript <code>Object</code> containing the spelling context menu entries. If you haven't customized the entries, you get the default associative array <code>{enable:"Enable Spelling", disable:"Disable Spelling", add:"Add to dictionary"}</code>
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */		
+		public static function getSpellingMenuEntries():Object
+		{
+			return _contextMenuEntries;
+		}
+		
+		/**
+		 * The URL for the spelling config xml file. If you haven't specify it, the default URL is [applicationDirectory]/AdobeSpellingConfig.xml. Note that we don't validate the URL, if the file doesn't exist, you will get an error when calling enableSpelling() function.
+		 *
+		 * @example The following code customize the spellingConfigUrl before enabling spell checking.
+		 * <listing version="3.0">
+		 * SpellUIForTLF.spellingConfigUrl = "./config/MySpellingConfig.xml";
+		 * SpellUIForTLF.enableSpelling(textFlow, "en_US");
+		 * </listing>
+		 */
+		public static function get spellingConfigUrl():String
+		{
+			return _spellingConfigUrl;
+		}
+		
+		public static function set spellingConfigUrl(url:String):void
+		{
+			if (url == null) throw new Error("URL can't be null");
+			_spellingConfigUrl = url;
+		}
+		
+
+		
+		/**
+		 * Disable the spell checking feature for a TLF TextFlow.
+		 * 
+		 * @param comp	TLF TextFlow object on which to disable spell check.
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */
+		public static function disableSpelling(comp:TextFlow):void{
+			if ( _UITable[comp] == undefined )
+				return;
+			var _ui:SpellUIForTLF = _UITable[comp];
+			if ( _ui != null) _ui.cleanUp();
+			var dictName:String = _cacheDictTable[comp];
+			var cleanUPDictionaryCount:int = 0;
+			for each ( var _dictName:String in _cacheDictTable ) {
+				if ( _dictName == dictName  )
+					cleanUPDictionaryCount++;
+			}
+			if ( cleanUPDictionaryCount == 1 ) {
+				_cache[dictName] = undefined;
+			}
+			delete _UITable[comp];
+			delete _cacheDictTable[comp];
+			
+		}
+		
+		/**
+		 @private
+		 (This property is for Squiggly Developer use only.)
+		 */
+		public static function get UITable():Dictionary {
+			return _UITable;
+		}
+		
+		/**
+		 @private
+		 (This property is for Squiggly Developer use only.)
+		 */
+		public function set spellingEnabled(value:Boolean):void {
+			_spellingEnabled = value;
+		}
+		
+		/**
+		 @private
+		 (This property is for Squiggly Developer use only.)
+		 */
+		public static function get parentComp():Dictionary {
+			return _parentTable;
+		}
+		
+				
+		/**
+		 * Constructs a SpellUI object.
+		 *  @private
+		 *	@param	textFiled	A Flex UI component to include spell-check capability
+		 *	@param	dict		A URL for Squiggly spelling dictionary.
+		 *
+		 * @playerversion Flash 10
+		 * @langversion 3.0
+		 */			
+		public function SpellUIForTLF(textModel:TextFlow, lang:String)
+		{		
+		
+			_actualParent = textModel;
+			mTextFlow = textModel;					
+			
+			mTextFlow.addEventListener(flashx.textLayout.events.CompositionCompleteEvent.COMPOSITION_COMPLETE, spellCheckScreen,false, 0,true);
+			//mTextFlow.addEventListener(flashx.textLayout.events.StatusChangeEvent.INLINE_GRAPHIC_STATUS_CHANGE, spellCheckScreen);
+			
+			_dictname = lang;			
+			loadConfig();			
+		}
+		
+		private function spellCheckScreen(event:Event):void
+		{
+			doSpellingJob();
+		}
+		
+				
+		/**
+		 @private
+		 (This property is for Squiggly Developer use only.)
+		 */		
+		public function doSpellingJob():void
+		{
+			if (_spellingEnabled == false) return;
+			
+			hh.clearSquiggles();
+			for (var idx:int = 0; idx < mTextFlow.flowComposer.numControllers; idx++)
+			{
+				var testController:ContainerController = mTextFlow.flowComposer.getControllerAt(idx); 
+				//if (getValidFirstWordIndexTLF(testController) != -1) 
+					spellCheckRangeTLF(getValidFirstWordIndexTLF(testController), getValidLastWordIndexTLF(testController));
+			}
+			
+		}
+			
+		
+		private function spellCheckRangeTLF(start:uint, end:uint):void {
+			var tokenizer:TextTokenizer;
+			//hh.clearSquiggles();
+			var tt:TextFlow = mTextFlow;
+			//var currentLeaf:FlowLeafElement = tt.getFirstLeaf();
+			var currentLeaf:FlowLeafElement = tt.findLeaf(start);
+			var currentParagraph:ParagraphElement = currentLeaf ? currentLeaf.getParagraph() : null;
+			while (currentParagraph) { // iterate over all paragraphs in the text flow
+				var paraStart:uint = currentParagraph.getAbsoluteStart();
+				if (paraStart > end)
+					break; 
+				
+				//var offsetPoint:Point = new Point(currentParagraph.paddingLeft, currentParagraph.paddingTop); 
+				//hh.offsetPoint = offsetPoint;
+				tokenizer = new TextTokenizer(currentParagraph.getText().substring());
+				//var tokens:Vector.<Token> = new Vector.<Token>();
+				
+				for ( var token:Token = tokenizer.getFirstToken(); token != tokenizer.getLastToken(); token= tokenizer.getNextToken(token) ) {
+					var result:Boolean=_spellingservice.checkWord(currentParagraph.getText().substring(token.first, token.last));					
+					if (!result){
+						//if (_checkLastWord || (token.last+paraStart != currentParagraph.getText().length))
+							//hh.highlightWord(token.first+start, token.last+start-1);
+							//tokens.push(new Token(token.first+start, token.last+start-1));
+							hh.drawSquiggleAt(new Token(token.first+paraStart, token.last+paraStart-1));
+					}
+					
+				}
+				currentParagraph = currentParagraph.getNextParagraph();
+				
+			}
+			//hh.postSpellCheckRange(start, end);
+			//hh.offsetPoint = offsetPoint;
+			//hh.drawSquiggles(tokens);
+		}
+		private function getValidFirstWordIndexTLF(containerController:ContainerController):int{			
+			var index:int;
+					
+			// Check for computeSelectionIndexInContainer which throws when lineindex == 0
+			try {
+				//index = SelectionManager.computeSelectionIndex(mTextFlow, containerController.container, containerController.container, 0 + containerController.horizontalScrollPosition, 0 + containerController.verticalScrollPosition);
+				// SelectionManager.computeSelectionIndex() sometimes gives index as -1. in the same scenarios below logic works better 
+				var tl:TextFlowLine = containerController.getFirstVisibleLine();
+				var firstVisiblePosition:int = tl.absoluteStart;
+				index = firstVisiblePosition;
+				
+			} catch (err:Error)
+			{
+				//TODO: report error
+				index = 0;
+			}
+				
+			return index;
+		}
+		
+		private function getValidLastWordIndexTLF(containerController:ContainerController):int{			
+			var index:int;
+			
+			// Check for computeSelectionIndexInContainer which throws when lineindex == 0
+			try {
+				//index = SelectionManager.computeSelectionIndex(mTextFlow, containerController.container, containerController.container, containerController.container.width+containerController.horizontalScrollPosition, containerController.container.height+containerController.verticalScrollPosition);
+				var tl:TextFlowLine = containerController.getLastVisibleLine();
+				var lastVisiblePosition:int = tl.absoluteStart + tl.textLength;
+				index = lastVisiblePosition;
+			} catch (err:Error)
+			{
+				//TODO: report error
+				index = 0;
+			}
+				
+			return index;
+		}
+		
+
+		private function loadConfig():void{
+			_resource_locale = SpellingConfiguration.resourceTable.getResource(_dictname);
+			
+			if ((_resource_locale != null) || (SpellUIForTLF._configXML != null)) 
+				loadConfigComplete(null);
+			else {	
+				SpellUIForTLF._configXMLLoader.addEventListener(Event.COMPLETE, loadConfigComplete);
+			
+				if (SpellUIForTLF._configXMLLoading == false)
+				{
+					SpellUIForTLF._configXMLLoader.load(new URLRequest(_spellingConfigUrl));
+					SpellUIForTLF._configXMLLoading = true;
+				}
+			}
+		}
+		
+		private function loadConfigComplete(evt:Event):void{
+			if (_resource_locale == null) {
+			if (SpellUIForTLF._configXML == null)
+				SpellUIForTLF._configXML= new XML(evt.target.data);
+			
+				SpellingConfiguration.resourceTable.setResource(_dictname,{rule:SpellUIForTLF._configXML.LanguageResource.(@languageCode==_dictname).@ruleFile, 
+																		dict:SpellUIForTLF._configXML.LanguageResource.(@languageCode==_dictname).@dictionaryFile});
+		}
+                //New Added
+			_spellingservice = new SpellingService(_dictname);
+			_spellingservice.addEventListener(Event.COMPLETE, loadDictComplete);
+			_spellingservice.init();
+		}
+		
+				
+				
+		
+		private function loadDictComplete(evt:Event):void
+		{					
+			//_newchecker = new SpellChecker(_hundict);
+			
+			// Lazy loading the UD only when the main dict is loaded successfully
+			if ((SpellUIForTLF._cache["Squiggly_UD"] as UserDictionary) == null)
+			{
+				_sharedobj = SharedObject.getLocal("Squiggly_v03");
+				var vec:Vector.<String> = new Vector.<String>();
+				if (_sharedobj.data.ud) {
+					for each (var w:String in _sharedobj.data.ud)
+					vec.push(w);
+				}
+				_userdict = new UserDictionary(vec);
+				
+				SpellUIForTLF._cache["Squiggly_SO"] = _sharedobj;
+				SpellUIForTLF._cache["Squiggly_UD"] = _userdict;
+			}
+			else 
+			{
+				_sharedobj = SpellUIForTLF._cache["Squiggly_SO"];
+				_userdict = SpellUIForTLF._cache["Squiggly_UD"];
+			}
+			_spellingservice.addUserDictionary(_userdict);
+			
+			
+			// Add the context menu, this might be not successful
+			scm = null;
+			try {
+				addContextMenu(null);
+			}
+			catch (err:Error)
+			{
+				// TODO: error handling here
+			}
+			_actualParent.addEventListener(Event.ADDED_TO_STAGE, addContextMenu);
+		}
+		
+		
+		private function addContextMenu(event:Event):void
+		{
+			if ( scm != null ) return;
+			
+			hh = new TLFHighlighter( _actualParent);
+			hw = new TLFWordProcessor( _actualParent);	
+						
+			scm =  new SpellingContextMenuForTLF(hh, hw, _spellingservice, _actualParent, addWordToUserDictionary); 
+			//scm.setIgnoreWordCallback( addWordToUserDictionary );
+			
+			// Halo need this
+			//if (_actualParent.contextMenu == null)
+			//{
+				//_actualParent.contextMenu = scm.contextMenu;
+			//}
+			
+			//hh.spellingEnabled=true;
+			_spellingEnabled = true;
+			try {
+				doSpellingJob();
+			}
+			catch (err:Error)
+			{
+				// If it fails here, it should later triggered by the render event, so no need to do anything
+			}
+		}
+		
+		private function addWordToUserDictionary(word:String):void
+		{
+			_userdict.addWord(word);
+		
+			// TODO: serialization here might affect ther performance
+			_sharedobj.data.ud = _userdict.wordList;
+			
+		}
+		/**
+		 *	@private
+		 */
+		private function cleanUp():void {
+			hh.clearSquiggles();
+			scm.cleanUp();
+			_actualParent.removeEventListener(Event.ADDED_TO_STAGE, addContextMenu);
+			
+			mTextFlow.removeEventListener(flashx.textLayout.events.CompositionCompleteEvent.COMPOSITION_COMPLETE, spellCheckScreen);
+			//mTextFlow.removeEventListener(flashx.textLayout.events.StatusChangeEvent.INLINE_GRAPHIC_STATUS_CHANGE, spellCheckScreen);
+		}
+		
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingUITLF/src/com/adobe/linguistics/spelling/SpellingContextMenuForTLF.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingUITLF/src/com/adobe/linguistics/spelling/SpellingContextMenuForTLF.as b/Squiggly/main/SpellingUITLF/src/com/adobe/linguistics/spelling/SpellingContextMenuForTLF.as
new file mode 100644
index 0000000..ccc3c78
--- /dev/null
+++ b/Squiggly/main/SpellingUITLF/src/com/adobe/linguistics/spelling/SpellingContextMenuForTLF.as
@@ -0,0 +1,249 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package com.adobe.linguistics.spelling
+{
+	import com.adobe.linguistics.spelling.SpellUIForTLF;
+	import com.adobe.linguistics.spelling.SquigglyCustomContainerController;
+	import com.adobe.linguistics.spelling.framework.SpellingService;
+	import com.adobe.linguistics.spelling.ui.IHighlighter;
+	import com.adobe.linguistics.spelling.ui.IWordProcessor;
+	import com.adobe.linguistics.spelling.ui.TLFHighlighter;
+	import com.adobe.linguistics.spelling.ui.TLFWordProcessor;
+	import com.adobe.linguistics.utils.TextTokenizer;
+	import com.adobe.linguistics.utils.Token;
+	
+	import flash.events.ContextMenuEvent;
+	import flash.events.Event;
+	import flash.events.EventDispatcher;
+	import flash.geom.Point;
+	import flash.geom.Rectangle;
+	import flash.ui.ContextMenu;
+	import flash.ui.ContextMenuItem;
+	import flash.utils.describeType;
+	import flash.utils.getQualifiedClassName;
+		
+	import flashx.textLayout.compose.StandardFlowComposer;
+	import flashx.textLayout.compose.TextFlowLine;
+	import flashx.textLayout.container.ContainerController;
+	import flashx.textLayout.conversion.TextConverter;
+	import flashx.textLayout.edit.SelectionManager;
+	import flashx.textLayout.elements.FlowLeafElement;
+	import flashx.textLayout.elements.ParagraphElement;
+	import flashx.textLayout.elements.TextFlow;
+	import flashx.textLayout.events.CompositionCompleteEvent;
+	import flashx.textLayout.events.StatusChangeEvent;
+	import flashx.textLayout.tlf_internal;
+	
+	
+	use namespace tlf_internal;	
+	
+	public class SpellingContextMenuForTLF
+	{
+		private var disableMenuItem:ContextMenuItem = new ContextMenuItem("Disable spell checking",true);
+		private var enableMenuItem:ContextMenuItem = new ContextMenuItem("Enable spell checking");		
+		
+		private var controlMenuItemList:Array = new Array();
+		private var suggestionMenuItemList:Array = new Array();
+		private var _spellingEnabled:Boolean;
+		private var _contextMenu:ContextMenu;
+		private var mTextHighlighter:IHighlighter;
+		private var mWordProcessor:IWordProcessor;
+		private var mSpellEngine:SpellingService;
+		private var mTextFlow:TextFlow;
+		private var _ignoreWordFunctionProcessor:Function;
+		private var _misspelledToken:Token;
+		private var _misspelled:String;
+		public function SpellingContextMenuForTLF(textHighlighter:IHighlighter, wordProcessor:IWordProcessor, engine:SpellingService, actualParent:*, func:Function)
+		{
+			
+			if ( textHighlighter == null || wordProcessor == null ||  engine == null) throw new Error("illegal argument."); 
+			mTextHighlighter = textHighlighter;
+			mWordProcessor = wordProcessor;
+			mSpellEngine = engine;
+			mTextFlow = actualParent;
+			
+			
+			var numControllers:int = mTextFlow.flowComposer.numControllers;
+			for (var idx:int = 0; idx < numControllers; idx++)
+			{	
+				var containerController:ContainerController = mTextFlow.flowComposer.getControllerAt(idx);
+				var squigglyContainerController:SquigglyCustomContainerController = new SquigglyCustomContainerController(containerController.container, mTextHighlighter, mWordProcessor, 
+																								mSpellEngine, func, containerController.compositionWidth, containerController.compositionHeight);	
+				copyObject(containerController, squigglyContainerController);
+				mTextFlow.flowComposer.removeController(containerController);
+				containerController = null; // make it null so that the associated memory is garbage collected
+				mTextFlow.flowComposer.addControllerAt(squigglyContainerController, idx);
+				
+			}
+			mTextFlow.flowComposer.updateAllControllers();
+			
+			
+			spellingEnabled = true; //default value
+			//spellingEnabled= mTextHighlighter.spellingEnabled;
+			
+			_ignoreWordFunctionProcessor=null;
+		}
+		
+		/**
+		 * copies a source object to a destination object
+		 * @param sourceObject the source object
+		 * @param destinationObject the destination object
+		 *
+		 */
+		private function copyObject(sourceObject:ContainerController, destinationObject:SquigglyCustomContainerController):void
+		{
+			// check if the objects are not null
+			if((sourceObject) && (destinationObject)) {
+				try
+				{
+					//retrive information about the source object via XML
+					var sourceInfo:XML = describeType(sourceObject);
+					var objectProperty:XML;
+					var propertyName:String;
+					
+					// loop through the properties
+					for each(objectProperty in sourceInfo.variable)
+					{
+						propertyName = objectProperty.@name;
+						if(sourceObject[objectProperty.@name] != null)
+						{
+							if(destinationObject.hasOwnProperty(objectProperty.@name)) {
+								destinationObject[objectProperty.@name] = sourceObject[objectProperty.@name];
+							}
+						}
+					}
+					//loop through the accessors
+					for each(objectProperty in sourceInfo.accessor) {
+						if(objectProperty.@access == "readwrite") {
+							propertyName = objectProperty.@name;
+							if(sourceObject[objectProperty.@name] != null)
+							{
+								if(destinationObject.hasOwnProperty(objectProperty.@name)) {
+									destinationObject[objectProperty.@name] = sourceObject[objectProperty.@name];
+								}
+							}
+						}
+					}
+				}
+				catch (err:*) {
+					;
+				}
+			}
+		}
+		
+		public function cleanUp():void
+		{
+			mTextHighlighter=null;
+			mWordProcessor=null;
+			spellingEnabled = false;
+			_ignoreWordFunctionProcessor=null;
+			
+			var numControllers:int = mTextFlow.flowComposer.numControllers;
+			for (var idx:int = 0; idx < numControllers; idx++)
+			{	
+				 //if (getQualifiedClassName(mTextFlow.flowComposer.getControllerAt(idx)) == "SquigglyCustomContainerController"){
+					 var containerController:ContainerController = mTextFlow.flowComposer.getControllerAt(idx);
+					 //Use try-catch incase some controller not of type SquigglyCustomContainerController comes across
+					 try {
+					 (containerController as SquigglyCustomContainerController).cleanUpContextMenu();
+					 }
+					 catch (err:Error)
+					 {
+						 // TODO: error handling here
+					 }
+				 //}
+				
+			}
+			
+		}
+		
+		public function get contextMenu():ContextMenu {
+			return this._contextMenu;
+		}
+		
+		public function setIgnoreWordCallback(func:Function ) :void {
+			if ( func != null )
+			_ignoreWordFunctionProcessor = func;
+		}
+		
+		private function handleAddToItemSelect(event:ContextMenuEvent):void
+		{
+			if ( _ignoreWordFunctionProcessor == null ) return;
+			
+			/*
+			var menuEntry:String = (event.currentTarget as ContextMenuItem).caption;
+			var start:uint = 5;
+			var end:uint = menuEntry.length - 15;
+			var word:String = menuEntry.substring(start, end);
+			*/
+			_ignoreWordFunctionProcessor(_misspelled);
+			SpellUIForTLF.UITable[SpellUIForTLF.parentComp[mTextFlow]].doSpellingJob();
+		}
+
+		private function isWordItem(item:ContextMenuItem):Boolean {
+			
+			for ( var i:int=0; i<suggestionMenuItemList.length; ++i ) {
+				if ( suggestionMenuItemList[i] == item ) return true;
+			}
+			return false;
+		}
+		
+		private function isControlItem(item:ContextMenuItem):Boolean {
+			for (var i:int=0; i<controlMenuItemList.length; ++i) {
+				if ( controlMenuItemList[i] == item) return true;
+			}
+			return false;
+		}
+
+		private function handleSuseItemSelect(event:ContextMenuEvent):void
+		{
+			mWordProcessor.replaceText(_misspelledToken, (event.currentTarget as ContextMenuItem).caption );
+			SpellUIForTLF.UITable[SpellUIForTLF.parentComp[mTextFlow]].doSpellingJob();
+		}
+
+		
+		private function set spellingEnabled(value:Boolean) :void {
+			_spellingEnabled = value;
+			disableMenuItem.visible=spellingEnabled;
+			enableMenuItem.visible=!spellingEnabled;
+		}
+		private function get spellingEnabled():Boolean {
+			return this._spellingEnabled;
+		}
+		private function handleEnableSpellCheck(event:ContextMenuEvent):void
+		{
+			spellingEnabled= true;
+			//mTextHighlighter.spellingEnabled= spellingEnabled;
+			//SpellUI.doSpellingJob();
+			//dispatchEvent(new Event(Event.RENDER));
+			
+			SpellUIForTLF.UITable[SpellUIForTLF.parentComp[mTextFlow]].spellingEnabled = spellingEnabled;
+			SpellUIForTLF.UITable[SpellUIForTLF.parentComp[mTextFlow]].doSpellingJob();
+			//spellCheckRange(getValidFirstWordIndex(), getValidLastWordIndex());
+		}
+		private function handleDisableSpellCheck(event:ContextMenuEvent):void
+		{
+			spellingEnabled= false;
+			SpellUIForTLF.UITable[SpellUIForTLF.parentComp[mTextFlow]].spellingEnabled = spellingEnabled;
+			mTextHighlighter.clearSquiggles();
+		}
+				
+	}
+}


[37/50] [abbrv] git commit: [flex-utilities] [refs/heads/master] - swap points 3 and 4

Posted by jm...@apache.org.
swap points 3 and 4


Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/6e0d435b
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/6e0d435b
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/6e0d435b

Branch: refs/heads/master
Commit: 6e0d435b29cd293f2d718f7f08b1b53b4ec93824
Parents: 924b427
Author: Justin Mclean <jm...@apache.org>
Authored: Thu Aug 28 14:08:42 2014 +1000
Committer: Justin Mclean <jm...@apache.org>
Committed: Thu Aug 28 14:08:42 2014 +1000

----------------------------------------------------------------------
 Squiggly/README | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/6e0d435b/Squiggly/README
----------------------------------------------------------------------
diff --git a/Squiggly/README b/Squiggly/README
index ad06111..deabcf9 100644
--- a/Squiggly/README
+++ b/Squiggly/README
@@ -22,12 +22,12 @@ How to build the installer using ant (no IDE is required)
 
 2.  In the base directory, run:
         ant compile
+
+3. The compiled swcs can be found in the main/libs directory 
         
-3. To optionally create a release source package, run:
+4. To optionally create a release source package, run:
  		ant package
 
-4. The compiled swcs can be found in the main/libs directory 
-
 5. To remove all of the compiled swcs:
  		ant clean
  		


[41/50] [abbrv] git commit: [flex-utilities] [refs/heads/master] - Change default config file name

Posted by jm...@apache.org.
Change default config file name


Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/07653c95
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/07653c95
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/07653c95

Branch: refs/heads/master
Commit: 07653c959c02433031d11a94f934762d58bda1f8
Parents: 49839ae
Author: Justin Mclean <jm...@apache.org>
Authored: Fri Aug 29 09:47:37 2014 +1000
Committer: Justin Mclean <jm...@apache.org>
Committed: Fri Aug 29 09:47:37 2014 +1000

----------------------------------------------------------------------
 .../main/SpellingUI/src/com/adobe/linguistics/spelling/SpellUI.as  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/07653c95/Squiggly/main/SpellingUI/src/com/adobe/linguistics/spelling/SpellUI.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingUI/src/com/adobe/linguistics/spelling/SpellUI.as b/Squiggly/main/SpellingUI/src/com/adobe/linguistics/spelling/SpellUI.as
index 426ca4c..ae0f89a 100644
--- a/Squiggly/main/SpellingUI/src/com/adobe/linguistics/spelling/SpellUI.as
+++ b/Squiggly/main/SpellingUI/src/com/adobe/linguistics/spelling/SpellUI.as
@@ -115,7 +115,7 @@ package com.adobe.linguistics.spelling
 		private var _spellingservice:SpellingService = null;
 		
 		private static var _contextMenuEntries:Object = {enable:"Enable Spelling", disable:"Disable Spelling", add:"Add to dictionary"};
-		private static var _spellingConfigUrl:String = "AdobeSpellingConfig.xml";
+		private static var _spellingConfigUrl:String = "SpellingConfig.xml";
 		
 		private static var _UITable:Dictionary= new Dictionary();
 		private static var _parentTable:Dictionary= new Dictionary();


[38/50] [abbrv] FLEX-34506 remove Adobe from file names and directories

Posted by jm...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/fd2bc5a5/Squiggly/main/Tools/AdobeSpellingDictGen/src/UIWord.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/Tools/AdobeSpellingDictGen/src/UIWord.as b/Squiggly/main/Tools/AdobeSpellingDictGen/src/UIWord.as
deleted file mode 100644
index 74c32e5..0000000
--- a/Squiggly/main/Tools/AdobeSpellingDictGen/src/UIWord.as
+++ /dev/null
@@ -1,37 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-package
-{
-	public class UIWord
-	{
-		public var index:uint;
-		public var word:String;
-		public var meta:String;
-		
-		public function UIWord(inIndex:uint, inWord:String)
-		{
-			index = inIndex;
-			word = inWord;
-			meta = "";
-		}
-	
-	}
-	
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/fd2bc5a5/Squiggly/main/Tools/SpellingDictGen/README.txt
----------------------------------------------------------------------
diff --git a/Squiggly/main/Tools/SpellingDictGen/README.txt b/Squiggly/main/Tools/SpellingDictGen/README.txt
new file mode 100644
index 0000000..5326ed6
--- /dev/null
+++ b/Squiggly/main/Tools/SpellingDictGen/README.txt
@@ -0,0 +1,16 @@
+Squiggly Dictionary Generator v0.1
+
+README
+===================================
+
+This is a simple AIR application that converts a plain text word list file to an Adobe Spelling Dictionary file. 
+
+Here's what each step is doing:
+1. Load a plain text file, each line in the file contains one word, a sampleWOrdList.txt is provided
+2. Calculate the metaphone, which will improve spell checker performance and result
+3. Generate a Squiggly Dictionary object
+4. Export the the Squiggly Dictionary object to a compressed binary file (recommend using *.zwl extension)
+
+Once you have the zwl file, you can use it in your Flex/AIR project.
+
+

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/fd2bc5a5/Squiggly/main/Tools/SpellingDictGen/sample/sampleWordList.txt
----------------------------------------------------------------------
diff --git a/Squiggly/main/Tools/SpellingDictGen/sample/sampleWordList.txt b/Squiggly/main/Tools/SpellingDictGen/sample/sampleWordList.txt
new file mode 100644
index 0000000..3c6e8ce
--- /dev/null
+++ b/Squiggly/main/Tools/SpellingDictGen/sample/sampleWordList.txt
@@ -0,0 +1,13 @@
+adobe
+apple
+amazon
+microsoft
+intel
+ibm
+google
+yahoo
+ebay
+vmware
+sun
+orcale
+facebook
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/fd2bc5a5/Squiggly/main/Tools/SpellingDictGen/src/SpellingDictGen-app.xml
----------------------------------------------------------------------
diff --git a/Squiggly/main/Tools/SpellingDictGen/src/SpellingDictGen-app.xml b/Squiggly/main/Tools/SpellingDictGen/src/SpellingDictGen-app.xml
new file mode 100644
index 0000000..ecff5e3
--- /dev/null
+++ b/Squiggly/main/Tools/SpellingDictGen/src/SpellingDictGen-app.xml
@@ -0,0 +1,153 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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.
+ 
+ -->
+<application xmlns="http://ns.adobe.com/air/application/1.5">
+
+<!-- Adobe AIR Application Descriptor File Template.
+
+	Specifies parameters for identifying, installing, and launching AIR applications.
+
+	xmlns - The Adobe AIR namespace: http://ns.adobe.com/air/application/1.5
+			The last segment of the namespace specifies the version 
+			of the AIR runtime required for this application to run.
+			
+	minimumPatchLevel - The minimum patch level of the AIR runtime required to run 
+			the application. Optional.
+-->
+
+	<!-- The application identifier string, unique to this application. Required. -->
+	<id>AdobeSpellingDictGen</id>
+
+	<!-- Used as the filename for the application. Required. -->
+	<filename>AdobeSpellingDictGen</filename>
+
+	<!-- The name that is displayed in the AIR application installer. 
+	     May have multiple values for each language. See samples or xsd schema file. Optional. -->
+	<name>AdobeSpellingDictGen</name>
+
+	<!-- An application version designator (such as "v1", "2.5", or "Alpha 1"). Required. -->
+	<version>v1</version>
+
+	<!-- Description, displayed in the AIR application installer.
+	     May have multiple values for each language. See samples or xsd schema file. Optional. -->
+	<!-- <description></description> -->
+
+	<!-- Copyright information. Optional -->
+	<!-- <copyright></copyright> -->
+
+	<!-- Settings for the application's initial window. Required. -->
+	<initialWindow>
+		<!-- The main SWF or HTML file of the application. Required. -->
+		<!-- Note: In Flex Builder, the SWF reference is set automatically. -->
+		<content>[This value will be overwritten by Flex Builder in the output app.xml]</content>
+		
+		<!-- The title of the main window. Optional. -->
+		<!-- <title></title> -->
+
+		<!-- The type of system chrome to use (either "standard" or "none"). Optional. Default standard. -->
+		<!-- <systemChrome></systemChrome> -->
+
+		<!-- Whether the window is transparent. Only applicable when systemChrome is none. Optional. Default false. -->
+		<!-- <transparent></transparent> -->
+
+		<!-- Whether the window is initially visible. Optional. Default false. -->
+		<!-- <visible></visible> -->
+
+		<!-- Whether the user can minimize the window. Optional. Default true. -->
+		<!-- <minimizable></minimizable> -->
+
+		<!-- Whether the user can maximize the window. Optional. Default true. -->
+		<!-- <maximizable></maximizable> -->
+
+		<!-- Whether the user can resize the window. Optional. Default true. -->
+		<!-- <resizable></resizable> -->
+
+		<!-- The window's initial width. Optional. -->
+		<!-- <width></width> -->
+
+		<!-- The window's initial height. Optional. -->
+		<!-- <height></height> -->
+
+		<!-- The window's initial x position. Optional. -->
+		<!-- <x></x> -->
+
+		<!-- The window's initial y position. Optional. -->
+		<!-- <y></y> -->
+
+		<!-- The window's minimum size, specified as a width/height pair, such as "400 200". Optional. -->
+		<!-- <minSize></minSize> -->
+
+		<!-- The window's initial maximum size, specified as a width/height pair, such as "1600 1200". Optional. -->
+		<!-- <maxSize></maxSize> -->
+	</initialWindow>
+
+	<!-- The subpath of the standard default installation location to use. Optional. -->
+	<!-- <installFolder></installFolder> -->
+
+	<!-- The subpath of the Programs menu to use. (Ignored on operating systems without a Programs menu.) Optional. -->
+	<!-- <programMenuFolder></programMenuFolder> -->
+
+	<!-- The icon the system uses for the application. For at least one resolution,
+		 specify the path to a PNG file included in the AIR package. Optional. -->
+	<!-- <icon>
+		<image16x16></image16x16>
+		<image32x32></image32x32>
+		<image48x48></image48x48>
+		<image128x128></image128x128>
+	</icon> -->
+
+	<!-- Whether the application handles the update when a user double-clicks an update version
+	of the AIR file (true), or the default AIR application installer handles the update (false).
+	Optional. Default false. -->
+	<!-- <customUpdateUI></customUpdateUI> -->
+	
+	<!-- Whether the application can be launched when the user clicks a link in a web browser.
+	Optional. Default false. -->
+	<!-- <allowBrowserInvocation></allowBrowserInvocation> -->
+
+	<!-- Listing of file types for which the application can register. Optional. -->
+	<!-- <fileTypes> -->
+
+		<!-- Defines one file type. Optional. -->
+		<!-- <fileType> -->
+
+			<!-- The name that the system displays for the registered file type. Required. -->
+			<!-- <name></name> -->
+
+			<!-- The extension to register. Required. -->
+			<!-- <extension></extension> -->
+			
+			<!-- The description of the file type. Optional. -->
+			<!-- <description></description> -->
+			
+			<!-- The MIME content type. -->
+			<!-- <contentType></contentType> -->
+			
+			<!-- The icon to display for the file type. Optional. -->
+			<!-- <icon>
+				<image16x16></image16x16>
+				<image32x32></image32x32>
+				<image48x48></image48x48>
+				<image128x128></image128x128>
+			</icon> -->
+			
+		<!-- </fileType> -->
+	<!-- </fileTypes> -->
+
+</application>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/fd2bc5a5/Squiggly/main/Tools/SpellingDictGen/src/SpellingDictGen.mxml
----------------------------------------------------------------------
diff --git a/Squiggly/main/Tools/SpellingDictGen/src/SpellingDictGen.mxml b/Squiggly/main/Tools/SpellingDictGen/src/SpellingDictGen.mxml
new file mode 100644
index 0000000..2399910
--- /dev/null
+++ b/Squiggly/main/Tools/SpellingDictGen/src/SpellingDictGen.mxml
@@ -0,0 +1,210 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+
+-->
+<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" width="800" height="600" fontSize="12">
+
+
+	<mx:Script>
+		<![CDATA[
+			
+			import com.adobe.linguistics.spelling.utils.WordList;
+			import com.adobe.linguistics.spelling.engine.dictionary.SuseDictionary;
+			import com.adobe.linguistics.spelling.codec.language.MetaPhone;
+			
+			// For debug only
+			private var tsStart:int
+			private var tsEnd:int;
+			
+			// An array with words only
+			private var basicWordList:Array;
+			
+			// A suse dictionary object (hash) as defined in suse engine
+			private var suse:SuseDictionary;
+			
+			// An array with index, word, metaphone
+			[Bindable]
+			private var advWordList:Array;
+			
+			private var src:File = File.applicationDirectory;
+			private var dest:File = File.applicationDirectory;
+			
+			
+			private function browseInFile():void
+			{
+				try {
+					src.browseForOpen("Select a TXT file");
+					src.addEventListener(Event.SELECT, inFileSelected);
+				} catch (error:Error)
+				{
+					trace("Failed:", error.message);
+				}
+			}
+			
+			private function inFileSelected(event:Event):void
+			{	
+				tsStart = getTimer();
+				var file:File = event.target as File;
+				var stream:FileStream = new FileStream();
+				stream.open(file, FileMode.READ);
+				var fileData:String = stream.readUTFBytes(stream.bytesAvailable);
+				
+				if (fileData.charAt(fileData.indexOf("\n")-2) == "\r")		//Strange, but happened when generating the text file from mac
+				{
+					basicWordList = fileData.split("\r\r\n");
+				}
+				else if (fileData.charAt(fileData.indexOf("\n")-1) == "\r")
+				{
+					basicWordList = fileData.split("\r\n");			//Windows
+				}
+				else 
+				{
+					basicWordList = fileData.split("\n");			//Mac and linux
+				}
+				
+				loadTxtInfo.text = file.nativePath + " (" + basicWordList.length.toString() + " words, " + file.size.toString() + " bytes)";
+				loadTxtInfo.setStyle("color", "green");
+				
+				// Debug log
+				tsEnd = getTimer();
+				debugInfo.text += "DebugInfo\n================\n" + "TxtLoaded: "+ file.nativePath + " " + (tsEnd - tsStart).toString() + "ms" + "\n";
+				prepareToShow();
+			}
+			
+			
+			private function browseOutFile():void
+			{
+				try {
+					dest.browseForSave("Output ZWL file");
+					dest.addEventListener(Event.SELECT, outFileSelected);
+				} catch (error:Error)
+				{
+					trace("Failed:", error.message);
+				}
+			}
+			
+			private function outFileSelected(event:Event):void
+			{				
+				tsStart = getTimer();
+				var bytes:ByteArray = new ByteArray();
+	    		bytes.writeObject(suse);
+	    		bytes.position = 0;
+	    		bytes.compress();
+	    		bytes.position = 0;
+	    		var outFile:File = new File((event.target as File).nativePath);
+	    		var outStream:FileStream = new FileStream();
+	    		outStream.open(outFile, FileMode.WRITE);
+	    		outStream.writeBytes(bytes, 0, bytes.length);
+	    		outStream.close();
+	    		
+	    		exportInfo.text = outFile.nativePath + " (" + outFile.size.toString() + " bytes)";
+				exportInfo.setStyle("color", "green");
+				
+				// Debug log
+	    		tsEnd = getTimer();
+	    		debugInfo.text += "\nZwlExported: " + outFile.nativePath + " " + (tsEnd - tsStart).toString() + "ms\n";
+				
+			}
+			
+	
+			
+			private function prepareToShow():void
+			{
+				
+				advWordList = new Array();
+				for (var i:uint=0; i<basicWordList.length; i++) {
+					// In case some empty string are there
+					if (basicWordList[i] != "")
+						advWordList.push(new UIWord(i, basicWordList[i]));
+				}
+			}
+			
+			private function genMeta():void
+			{
+
+				var _metaphone:MetaPhone= new MetaPhone();
+				tsStart = getTimer();
+				for (var i:uint=0; i<advWordList.length; i++) {
+					advWordList[i].meta = _metaphone.meta(advWordList[i].word, 4);
+				}
+				genMetaInfo.text = "Metaphone index generated";
+				genMetaInfo.setStyle("color", "green");
+				myDataGrid.dataProvider= advWordList;
+				// Debug log
+				tsEnd = getTimer();
+				debugInfo.text += "\nMetaGenerated: " + (tsEnd - tsStart).toString() + "ms\n";
+			}
+			
+			private function genSuseDict():void
+			{
+				suse = new SuseDictionary();
+				tsStart = getTimer();
+				for (var i:uint=0; i<advWordList.length; i++) {
+					if (suse.MetaPhoneHash[advWordList[i].meta]) {
+						suse.MetaPhoneHash[advWordList[i].meta].insert(advWordList[i].word);
+					}
+					else {
+						if ((advWordList[i].meta == "") || (advWordList[i].meta == "-nde")) continue;
+						suse.MetaPhoneHash[advWordList[i].meta] = new WordList();
+						suse.MetaPhoneHash[advWordList[i].meta].insert(advWordList[i].word);
+					}
+				}
+				genDictInfo.text = "SquigglyDict object generated";
+				genDictInfo.setStyle("color", "green");
+				
+				// Debug log
+				tsEnd = getTimer();
+				debugInfo.text += "\nSquigglyDictGenerated: " + (tsEnd - tsStart).toString() + "ms\n"; 	
+			}
+			
+		]]>
+	</mx:Script>
+	<mx:HBox width="100%">
+		<mx:Label text="Squiggly Dictionary Generator v0.1 (txt2zwl)" fontSize="25"/>		
+	</mx:HBox>
+	<mx:HBox width="100%">
+		<mx:Button label="1. Load TXT File" click="browseInFile()"/>
+		<mx:HRule visible="false" width="100%"/>
+		<mx:Label id="loadTxtInfo" text="Not loaded" color="red"/>
+	</mx:HBox>
+	<mx:HBox width="100%">
+		<mx:Button label="2. Calculate Metaphone" click="genMeta()"/>
+		<mx:HRule visible="false" width="100%"/>
+		<mx:Label id="genMetaInfo" text="Not calculated" color="red"/>
+	</mx:HBox>
+	<mx:HBox width="100%">
+		<mx:Button label="3. Generate SquigglyDict" click="genSuseDict()"/>		
+		<mx:HRule visible="false" width="100%"/>
+		<mx:Label id="genDictInfo" text="Not generated" color="red"/>
+	</mx:HBox>
+	<mx:HBox width="100%">
+		<mx:Button label="4. Export ZWL File" click = "browseOutFile()"/>
+		<mx:HRule visible="false" width="100%"/>
+		<mx:Label id="exportInfo" text="Not exported" color="red"/>
+	</mx:HBox>
+	<mx:HBox width="100%" height="100%">
+		<mx:DataGrid height="100%" id="myDataGrid" dataProvider = "{ advWordList }" width="70%">
+			<mx:columns>
+				<mx:DataGridColumn headerText="Index" dataField="index"/>
+				<mx:DataGridColumn headerText="Word" dataField="word"/>
+				<mx:DataGridColumn headerText="Metaphone" dataField="meta"/>
+			</mx:columns>
+		</mx:DataGrid>
+		<mx:TextArea id="debugInfo" height="100%" width="30%" />
+	</mx:HBox>
+</mx:WindowedApplication>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/fd2bc5a5/Squiggly/main/Tools/SpellingDictGen/src/UIWord.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/Tools/SpellingDictGen/src/UIWord.as b/Squiggly/main/Tools/SpellingDictGen/src/UIWord.as
new file mode 100644
index 0000000..74c32e5
--- /dev/null
+++ b/Squiggly/main/Tools/SpellingDictGen/src/UIWord.as
@@ -0,0 +1,37 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+package
+{
+	public class UIWord
+	{
+		public var index:uint;
+		public var word:String;
+		public var meta:String;
+		
+		public function UIWord(inIndex:uint, inWord:String)
+		{
+			index = inIndex;
+			word = inWord;
+			meta = "";
+		}
+	
+	}
+	
+
+}
\ No newline at end of file


[40/50] [abbrv] git commit: [flex-utilities] [refs/heads/master] - removed company names

Posted by jm...@apache.org.
removed company names


Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/49839ae0
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/49839ae0
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/49839ae0

Branch: refs/heads/master
Commit: 49839ae081d84a4b49fcf30f203279c2b149f751
Parents: fd2bc5a
Author: Justin Mclean <jm...@apache.org>
Authored: Thu Aug 28 14:52:33 2014 +1000
Committer: Justin Mclean <jm...@apache.org>
Committed: Thu Aug 28 14:52:33 2014 +1000

----------------------------------------------------------------------
 .../SpellingDictGen/sample/sampleWordList.txt   | 20 +++++++-------------
 1 file changed, 7 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/49839ae0/Squiggly/main/Tools/SpellingDictGen/sample/sampleWordList.txt
----------------------------------------------------------------------
diff --git a/Squiggly/main/Tools/SpellingDictGen/sample/sampleWordList.txt b/Squiggly/main/Tools/SpellingDictGen/sample/sampleWordList.txt
index 3c6e8ce..5ac6fae 100644
--- a/Squiggly/main/Tools/SpellingDictGen/sample/sampleWordList.txt
+++ b/Squiggly/main/Tools/SpellingDictGen/sample/sampleWordList.txt
@@ -1,13 +1,7 @@
-adobe
-apple
-amazon
-microsoft
-intel
-ibm
-google
-yahoo
-ebay
-vmware
-sun
-orcale
-facebook
\ No newline at end of file
+red
+orange
+yellow
+green
+blue
+indigo
+violet
\ No newline at end of file


[39/50] [abbrv] git commit: [flex-utilities] [refs/heads/master] - FLEX-34506 remove Adobe from file names and directories

Posted by jm...@apache.org.
FLEX-34506 remove Adobe from file names and directories


Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/fd2bc5a5
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/fd2bc5a5
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/fd2bc5a5

Branch: refs/heads/master
Commit: fd2bc5a547146c6034a3da71efd3f1e294b74255
Parents: 6e0d435
Author: Justin Mclean <jm...@apache.org>
Authored: Thu Aug 28 14:32:27 2014 +1000
Committer: Justin Mclean <jm...@apache.org>
Committed: Thu Aug 28 14:32:27 2014 +1000

----------------------------------------------------------------------
 .../SimpleEditor/src/AdobeSpellingConfig.xml    |  22 --
 .../Demo/SimpleEditor/src/SpellingConfig.xml    |  22 ++
 .../src/AdobeSpellingFrameworkExample.mxml      |  80 -------
 .../src/SpellingFrameworkExample.mxml           |  80 +++++++
 .../src/AdobeSpellingAirDemo-app.xml            | 153 --------------
 .../src/AdobeSpellingAirDemo.mxml               |  39 ----
 .../src/AdobeSpellingAirDemoEx-app.xml          | 153 --------------
 .../src/AdobeSpellingAirDemoEx.mxml             |  71 -------
 .../src/AdobeSpellingConfig.xml                 |  26 ---
 .../src/AdobeSpellingDemo.mxml                  |  72 -------
 .../src/AdobeSpellingConfig.xml                 |  27 ---
 .../src/AdobeSpellingDemoEx.mxml                |  70 -------
 .../SpellingAirDemo/src/SpellingAirDemo-app.xml | 153 ++++++++++++++
 .../SpellingAirDemo/src/SpellingAirDemo.mxml    |  39 ++++
 .../src/SpellingAirDemoEx-app.xml               | 153 ++++++++++++++
 .../src/SpellingAirDemoEx.mxml                  |  71 +++++++
 .../Demo/SpellingDemo/src/SpellingConfig.xml    |  26 +++
 .../Demo/SpellingDemo/src/SpellingDemo.mxml     |  72 +++++++
 .../Demo/SpellingDemoEx/src/SpellingConfig.xml  |  27 +++
 .../main/Tools/AdobeSpellingDictGen/README.txt  |  16 --
 .../sample/sampleWordList.txt                   |  13 --
 .../src/AdobeSpellingDictGen-app.xml            | 153 --------------
 .../src/AdobeSpellingDictGen.mxml               | 210 -------------------
 .../Tools/AdobeSpellingDictGen/src/UIWord.as    |  37 ----
 Squiggly/main/Tools/SpellingDictGen/README.txt  |  16 ++
 .../SpellingDictGen/sample/sampleWordList.txt   |  13 ++
 .../SpellingDictGen/src/SpellingDictGen-app.xml | 153 ++++++++++++++
 .../SpellingDictGen/src/SpellingDictGen.mxml    | 210 +++++++++++++++++++
 .../main/Tools/SpellingDictGen/src/UIWord.as    |  37 ++++
 29 files changed, 1072 insertions(+), 1142 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/fd2bc5a5/Squiggly/ane/Squiggly/Demo/SimpleEditor/src/AdobeSpellingConfig.xml
----------------------------------------------------------------------
diff --git a/Squiggly/ane/Squiggly/Demo/SimpleEditor/src/AdobeSpellingConfig.xml b/Squiggly/ane/Squiggly/Demo/SimpleEditor/src/AdobeSpellingConfig.xml
deleted file mode 100644
index 19c97ba..0000000
--- a/Squiggly/ane/Squiggly/Demo/SimpleEditor/src/AdobeSpellingConfig.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding='UTF-8'?>
-<!--
-
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You 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.
-
--->
-<SpellingConfig>
-  <ThirdPartyResourceLocation URL="D:\\Program Files\\Common Files\\adobe\\linguistics\\ThirdPartyResources" />
-</SpellingConfig>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/fd2bc5a5/Squiggly/ane/Squiggly/Demo/SimpleEditor/src/SpellingConfig.xml
----------------------------------------------------------------------
diff --git a/Squiggly/ane/Squiggly/Demo/SimpleEditor/src/SpellingConfig.xml b/Squiggly/ane/Squiggly/Demo/SimpleEditor/src/SpellingConfig.xml
new file mode 100644
index 0000000..d115126
--- /dev/null
+++ b/Squiggly/ane/Squiggly/Demo/SimpleEditor/src/SpellingConfig.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding='UTF-8'?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+
+-->
+<SpellingConfig>
+  <ThirdPartyResourceLocation URL="D:\\Program Files\\Common Files\\adobe\\linguistics\\ThirdPartyResources" />
+</SpellingConfig>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/fd2bc5a5/Squiggly/main/ASDocExamples/com/adobe/linguistics/spelling/Examples/Flex/SpellingServiceExample/src/AdobeSpellingFrameworkExample.mxml
----------------------------------------------------------------------
diff --git a/Squiggly/main/ASDocExamples/com/adobe/linguistics/spelling/Examples/Flex/SpellingServiceExample/src/AdobeSpellingFrameworkExample.mxml b/Squiggly/main/ASDocExamples/com/adobe/linguistics/spelling/Examples/Flex/SpellingServiceExample/src/AdobeSpellingFrameworkExample.mxml
deleted file mode 100644
index 0fc24f3..0000000
--- a/Squiggly/main/ASDocExamples/com/adobe/linguistics/spelling/Examples/Flex/SpellingServiceExample/src/AdobeSpellingFrameworkExample.mxml
+++ /dev/null
@@ -1,80 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You 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.
-
--->
-<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
-			   xmlns:s="library://ns.adobe.com/flex/spark" 
-			   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" initialize="init();">
-	<fx:Declarations>
-		<!-- Place non-visual elements (e.g., services, value objects) here -->
-	</fx:Declarations>
-	<fx:Script>
-		<![CDATA[
-			import com.adobe.linguistics.spelling.framework.*;
-			import com.adobe.linguistics.spelling.*;
-			
-			private var spellingService:SpellingService = null;
-			
-			private function init():void {
-				result.text += "AdobeSpellingServiceFramework tests\n===================\n";
-				result.text += "Setting SpellingConfiguration and initializing SpellingService ...\n";
-				
-				var resourceTable:ResourceTable = new ResourceTable();
-				resourceTable.setResource("en_US", {rule:"data/en_US.aff", dict:"data/en_US.dic"});			
-				SpellingConfiguration.resourceTable = resourceTable;
-				
-				spellingService = new SpellingService("en_US");
-				spellingService.addEventListener(Event.COMPLETE, spellingServiceReady);
-				spellingService.init();
-			}
-			
-			private function spellingServiceReady(e:Event):void {
-				result.text += "SpellingService ready for use\n";
-				
-				result.text += "Checking \"hello\" ... " + spellingService.checkWord("hello") + "\n";
-				result.text += "Checking \"heello\" ... " + spellingService.checkWord("heello") + "\n";
-				result.text += "Getting suggestions for \"heello\" ... " + spellingService.getSuggestions("heello") + "\n";
-				
-				
-				var ud:UserDictionary = new UserDictionary();
-				result.text += "Adding \"heello\" to UserDictionary ..." + ud.addWord("heello") + "\n";
-				result.text += "Adding UserDicitonary to SpellingService ..." + spellingService.addUserDictionary(ud) +"\n";
-				result.text += "Checking \"heello\" again, expect true ..." + spellingService.checkWord("heello") + "\n";
-				
-				result.text += "Removing \"heello\" from UserDictionary ..." + ud.removeWord("heello") + "\n"
-				result.text += "Checking \"heello\" again, expect false ..." + spellingService.checkWord("heello") + "\n";
-				
-				result.text += "Number of UserDictionary, expect 1 ..." + spellingService.userDictionaries.length + "\n";
-				
-				var ud2:UserDictionary = new UserDictionary();				
-				result.text += "Adding UserDicitonary 2 to SpellingService ..." + spellingService.addUserDictionary(ud2) +"\n";
-				result.text += "Adding \"heello\" to UserDictionary 2 ..." + ud2.addWord("heello") + "\n";
-				result.text += "Checking \"heello\" again, expect true ..." + spellingService.checkWord("heello") + "\n";
-				result.text += "Number of UserDictionary, expect 2 ..." + spellingService.userDictionaries.length + "\n";
-				
-				spellingService.removeUserDictionary(ud);
-				spellingService.removeUserDictionary(ud2);
-				result.text += "Checking \"heello\" again after removing all UserDictionaries, expect false ..." + spellingService.checkWord("heello") + "\n";
-				result.text += "Number of UserDictionary, expect 0 ..." + spellingService.userDictionaries.length + "\n";
-
-			}
-
-		]]>
-	</fx:Script>
-	<mx:Text id="result"/>
-</s:Application>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/fd2bc5a5/Squiggly/main/ASDocExamples/com/adobe/linguistics/spelling/Examples/Flex/SpellingServiceExample/src/SpellingFrameworkExample.mxml
----------------------------------------------------------------------
diff --git a/Squiggly/main/ASDocExamples/com/adobe/linguistics/spelling/Examples/Flex/SpellingServiceExample/src/SpellingFrameworkExample.mxml b/Squiggly/main/ASDocExamples/com/adobe/linguistics/spelling/Examples/Flex/SpellingServiceExample/src/SpellingFrameworkExample.mxml
new file mode 100644
index 0000000..0fc24f3
--- /dev/null
+++ b/Squiggly/main/ASDocExamples/com/adobe/linguistics/spelling/Examples/Flex/SpellingServiceExample/src/SpellingFrameworkExample.mxml
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+
+-->
+<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
+			   xmlns:s="library://ns.adobe.com/flex/spark" 
+			   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" initialize="init();">
+	<fx:Declarations>
+		<!-- Place non-visual elements (e.g., services, value objects) here -->
+	</fx:Declarations>
+	<fx:Script>
+		<![CDATA[
+			import com.adobe.linguistics.spelling.framework.*;
+			import com.adobe.linguistics.spelling.*;
+			
+			private var spellingService:SpellingService = null;
+			
+			private function init():void {
+				result.text += "AdobeSpellingServiceFramework tests\n===================\n";
+				result.text += "Setting SpellingConfiguration and initializing SpellingService ...\n";
+				
+				var resourceTable:ResourceTable = new ResourceTable();
+				resourceTable.setResource("en_US", {rule:"data/en_US.aff", dict:"data/en_US.dic"});			
+				SpellingConfiguration.resourceTable = resourceTable;
+				
+				spellingService = new SpellingService("en_US");
+				spellingService.addEventListener(Event.COMPLETE, spellingServiceReady);
+				spellingService.init();
+			}
+			
+			private function spellingServiceReady(e:Event):void {
+				result.text += "SpellingService ready for use\n";
+				
+				result.text += "Checking \"hello\" ... " + spellingService.checkWord("hello") + "\n";
+				result.text += "Checking \"heello\" ... " + spellingService.checkWord("heello") + "\n";
+				result.text += "Getting suggestions for \"heello\" ... " + spellingService.getSuggestions("heello") + "\n";
+				
+				
+				var ud:UserDictionary = new UserDictionary();
+				result.text += "Adding \"heello\" to UserDictionary ..." + ud.addWord("heello") + "\n";
+				result.text += "Adding UserDicitonary to SpellingService ..." + spellingService.addUserDictionary(ud) +"\n";
+				result.text += "Checking \"heello\" again, expect true ..." + spellingService.checkWord("heello") + "\n";
+				
+				result.text += "Removing \"heello\" from UserDictionary ..." + ud.removeWord("heello") + "\n"
+				result.text += "Checking \"heello\" again, expect false ..." + spellingService.checkWord("heello") + "\n";
+				
+				result.text += "Number of UserDictionary, expect 1 ..." + spellingService.userDictionaries.length + "\n";
+				
+				var ud2:UserDictionary = new UserDictionary();				
+				result.text += "Adding UserDicitonary 2 to SpellingService ..." + spellingService.addUserDictionary(ud2) +"\n";
+				result.text += "Adding \"heello\" to UserDictionary 2 ..." + ud2.addWord("heello") + "\n";
+				result.text += "Checking \"heello\" again, expect true ..." + spellingService.checkWord("heello") + "\n";
+				result.text += "Number of UserDictionary, expect 2 ..." + spellingService.userDictionaries.length + "\n";
+				
+				spellingService.removeUserDictionary(ud);
+				spellingService.removeUserDictionary(ud2);
+				result.text += "Checking \"heello\" again after removing all UserDictionaries, expect false ..." + spellingService.checkWord("heello") + "\n";
+				result.text += "Number of UserDictionary, expect 0 ..." + spellingService.userDictionaries.length + "\n";
+
+			}
+
+		]]>
+	</fx:Script>
+	<mx:Text id="result"/>
+</s:Application>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/fd2bc5a5/Squiggly/main/Demo/AdobeSpellingAirDemo/src/AdobeSpellingAirDemo-app.xml
----------------------------------------------------------------------
diff --git a/Squiggly/main/Demo/AdobeSpellingAirDemo/src/AdobeSpellingAirDemo-app.xml b/Squiggly/main/Demo/AdobeSpellingAirDemo/src/AdobeSpellingAirDemo-app.xml
deleted file mode 100644
index 36fb899..0000000
--- a/Squiggly/main/Demo/AdobeSpellingAirDemo/src/AdobeSpellingAirDemo-app.xml
+++ /dev/null
@@ -1,153 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You 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.
- 
- -->
-<application xmlns="http://ns.adobe.com/air/application/1.5">
-
-<!-- Adobe AIR Application Descriptor File Template.
-
-	Specifies parameters for identifying, installing, and launching AIR applications.
-
-	xmlns - The Adobe AIR namespace: http://ns.adobe.com/air/application/1.5
-			The last segment of the namespace specifies the version 
-			of the AIR runtime required for this application to run.
-			
-	minimumPatchLevel - The minimum patch level of the AIR runtime required to run 
-			the application. Optional.
--->
-
-	<!-- The application identifier string, unique to this application. Required. -->
-	<id>AdobeSpellingAirDemo</id>
-
-	<!-- Used as the filename for the application. Required. -->
-	<filename>AdobeSpellingAirDemo</filename>
-
-	<!-- The name that is displayed in the AIR application installer. 
-	     May have multiple values for each language. See samples or xsd schema file. Optional. -->
-	<name>AdobeSpellingAirDemo</name>
-
-	<!-- An application version designator (such as "v1", "2.5", or "Alpha 1"). Required. -->
-	<version>v1</version>
-
-	<!-- Description, displayed in the AIR application installer.
-	     May have multiple values for each language. See samples or xsd schema file. Optional. -->
-	<!-- <description></description> -->
-
-	<!-- Copyright information. Optional -->
-	<!-- <copyright></copyright> -->
-
-	<!-- Settings for the application's initial window. Required. -->
-	<initialWindow>
-		<!-- The main SWF or HTML file of the application. Required. -->
-		<!-- Note: In Flex Builder, the SWF reference is set automatically. -->
-		<content>[This value will be overwritten by Flex Builder in the output app.xml]</content>
-		
-		<!-- The title of the main window. Optional. -->
-		<!-- <title></title> -->
-
-		<!-- The type of system chrome to use (either "standard" or "none"). Optional. Default standard. -->
-		<!-- <systemChrome></systemChrome> -->
-
-		<!-- Whether the window is transparent. Only applicable when systemChrome is none. Optional. Default false. -->
-		<!-- <transparent></transparent> -->
-
-		<!-- Whether the window is initially visible. Optional. Default false. -->
-		<!-- <visible></visible> -->
-
-		<!-- Whether the user can minimize the window. Optional. Default true. -->
-		<!-- <minimizable></minimizable> -->
-
-		<!-- Whether the user can maximize the window. Optional. Default true. -->
-		<!-- <maximizable></maximizable> -->
-
-		<!-- Whether the user can resize the window. Optional. Default true. -->
-		<!-- <resizable></resizable> -->
-
-		<!-- The window's initial width. Optional. -->
-		<!-- <width></width> -->
-
-		<!-- The window's initial height. Optional. -->
-		<!-- <height></height> -->
-
-		<!-- The window's initial x position. Optional. -->
-		<!-- <x></x> -->
-
-		<!-- The window's initial y position. Optional. -->
-		<!-- <y></y> -->
-
-		<!-- The window's minimum size, specified as a width/height pair, such as "400 200". Optional. -->
-		<!-- <minSize></minSize> -->
-
-		<!-- The window's initial maximum size, specified as a width/height pair, such as "1600 1200". Optional. -->
-		<!-- <maxSize></maxSize> -->
-	</initialWindow>
-
-	<!-- The subpath of the standard default installation location to use. Optional. -->
-	<!-- <installFolder></installFolder> -->
-
-	<!-- The subpath of the Programs menu to use. (Ignored on operating systems without a Programs menu.) Optional. -->
-	<!-- <programMenuFolder></programMenuFolder> -->
-
-	<!-- The icon the system uses for the application. For at least one resolution,
-		 specify the path to a PNG file included in the AIR package. Optional. -->
-	<!-- <icon>
-		<image16x16></image16x16>
-		<image32x32></image32x32>
-		<image48x48></image48x48>
-		<image128x128></image128x128>
-	</icon> -->
-
-	<!-- Whether the application handles the update when a user double-clicks an update version
-	of the AIR file (true), or the default AIR application installer handles the update (false).
-	Optional. Default false. -->
-	<!-- <customUpdateUI></customUpdateUI> -->
-	
-	<!-- Whether the application can be launched when the user clicks a link in a web browser.
-	Optional. Default false. -->
-	<!-- <allowBrowserInvocation></allowBrowserInvocation> -->
-
-	<!-- Listing of file types for which the application can register. Optional. -->
-	<!-- <fileTypes> -->
-
-		<!-- Defines one file type. Optional. -->
-		<!-- <fileType> -->
-
-			<!-- The name that the system displays for the registered file type. Required. -->
-			<!-- <name></name> -->
-
-			<!-- The extension to register. Required. -->
-			<!-- <extension></extension> -->
-			
-			<!-- The description of the file type. Optional. -->
-			<!-- <description></description> -->
-			
-			<!-- The MIME content type. -->
-			<!-- <contentType></contentType> -->
-			
-			<!-- The icon to display for the file type. Optional. -->
-			<!-- <icon>
-				<image16x16></image16x16>
-				<image32x32></image32x32>
-				<image48x48></image48x48>
-				<image128x128></image128x128>
-			</icon> -->
-			
-		<!-- </fileType> -->
-	<!-- </fileTypes> -->
-
-</application>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/fd2bc5a5/Squiggly/main/Demo/AdobeSpellingAirDemo/src/AdobeSpellingAirDemo.mxml
----------------------------------------------------------------------
diff --git a/Squiggly/main/Demo/AdobeSpellingAirDemo/src/AdobeSpellingAirDemo.mxml b/Squiggly/main/Demo/AdobeSpellingAirDemo/src/AdobeSpellingAirDemo.mxml
deleted file mode 100644
index 4c68739..0000000
--- a/Squiggly/main/Demo/AdobeSpellingAirDemo/src/AdobeSpellingAirDemo.mxml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You 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.
-
--->
-<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" width="1024" height="768" initialize="init()">		
-			<mx:Script>
-			<![CDATA[
-
-				import com.adobe.linguistics.spelling.SpellUI;
-				
-				public function init():void
-				{
-					SpellUI.enableSpelling(ti, "usa.zwl");
-					SpellUI.enableSpelling(ta, "usa.zwl");
-					SpellUI.enableSpelling(rte, "usa.zwl");
-				}	
-			]]>
-    		</mx:Script>
-    		
-			<mx:Label text="Squiggly Spell Checker Air Demo v0.1" fontSize="30"/>
-    		<mx:TextInput id="ti" width="50%" fontSize="30"/>
-			<mx:TextArea id="ta" width="50%" height="50%" fontSize="30"/>
-			<mx:RichTextEditor id="rte" width="50%" height="50%" fontSize="30"/>	
-</mx:WindowedApplication>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/fd2bc5a5/Squiggly/main/Demo/AdobeSpellingAirDemoEx/src/AdobeSpellingAirDemoEx-app.xml
----------------------------------------------------------------------
diff --git a/Squiggly/main/Demo/AdobeSpellingAirDemoEx/src/AdobeSpellingAirDemoEx-app.xml b/Squiggly/main/Demo/AdobeSpellingAirDemoEx/src/AdobeSpellingAirDemoEx-app.xml
deleted file mode 100644
index 95c29b4..0000000
--- a/Squiggly/main/Demo/AdobeSpellingAirDemoEx/src/AdobeSpellingAirDemoEx-app.xml
+++ /dev/null
@@ -1,153 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="no"?>
-<!--
- 
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You 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.
- 
- -->
-<application xmlns="http://ns.adobe.com/air/application/1.5.2">
-
-<!-- Adobe AIR Application Descriptor File Template.
-
-	Specifies parameters for identifying, installing, and launching AIR applications.
-
-	xmlns - The Adobe AIR namespace: http://ns.adobe.com/air/application/1.5.2
-			The last segment of the namespace specifies the version 
-			of the AIR runtime required for this application to run.
-			
-	minimumPatchLevel - The minimum patch level of the AIR runtime required to run 
-			the application. Optional.
--->
-
-	<!-- The application identifier string, unique to this application. Required. -->
-	<id>AdobeSpellingAirDemoEx</id>
-
-	<!-- Used as the filename for the application. Required. -->
-	<filename>AdobeSpellingAirDemoEx</filename>
-
-	<!-- The name that is displayed in the AIR application installer. 
-	     May have multiple values for each language. See samples or xsd schema file. Optional. -->
-	<name>AdobeSpellingAirDemoEx</name>
-
-	<!-- An application version designator (such as "v1", "2.5", or "Alpha 1"). Required. -->
-	<version>v1</version>
-
-	<!-- Description, displayed in the AIR application installer.
-	     May have multiple values for each language. See samples or xsd schema file. Optional. -->
-	<!-- <description></description> -->
-
-	<!-- Copyright information. Optional -->
-	<!-- <copyright></copyright> -->
-
-	<!-- Settings for the application's initial window. Required. -->
-	<initialWindow>
-		<!-- The main SWF or HTML file of the application. Required. -->
-		<!-- Note: In Flash Builder, the SWF reference is set automatically. -->
-		<content>[This value will be overwritten by Flash Builder in the output app.xml]</content>
-		
-		<!-- The title of the main window. Optional. -->
-		<!-- <title></title> -->
-
-		<!-- The type of system chrome to use (either "standard" or "none"). Optional. Default standard. -->
-		<!-- <systemChrome></systemChrome> -->
-
-		<!-- Whether the window is transparent. Only applicable when systemChrome is none. Optional. Default false. -->
-		<!-- <transparent></transparent> -->
-
-		<!-- Whether the window is initially visible. Optional. Default false. -->
-		<!-- <visible></visible> -->
-
-		<!-- Whether the user can minimize the window. Optional. Default true. -->
-		<!-- <minimizable></minimizable> -->
-
-		<!-- Whether the user can maximize the window. Optional. Default true. -->
-		<!-- <maximizable></maximizable> -->
-
-		<!-- Whether the user can resize the window. Optional. Default true. -->
-		<!-- <resizable></resizable> -->
-
-		<!-- The window's initial width. Optional. -->
-		<!-- <width></width> -->
-
-		<!-- The window's initial height. Optional. -->
-		<!-- <height></height> -->
-
-		<!-- The window's initial x position. Optional. -->
-		<!-- <x></x> -->
-
-		<!-- The window's initial y position. Optional. -->
-		<!-- <y></y> -->
-
-		<!-- The window's minimum size, specified as a width/height pair, such as "400 200". Optional. -->
-		<!-- <minSize></minSize> -->
-
-		<!-- The window's initial maximum size, specified as a width/height pair, such as "1600 1200". Optional. -->
-		<!-- <maxSize></maxSize> -->
-	</initialWindow>
-
-	<!-- The subpath of the standard default installation location to use. Optional. -->
-	<!-- <installFolder></installFolder> -->
-
-	<!-- The subpath of the Programs menu to use. (Ignored on operating systems without a Programs menu.) Optional. -->
-	<!-- <programMenuFolder></programMenuFolder> -->
-
-	<!-- The icon the system uses for the application. For at least one resolution,
-		 specify the path to a PNG file included in the AIR package. Optional. -->
-	<!-- <icon>
-		<image16x16></image16x16>
-		<image32x32></image32x32>
-		<image48x48></image48x48>
-		<image128x128></image128x128>
-	</icon> -->
-
-	<!-- Whether the application handles the update when a user double-clicks an update version
-	of the AIR file (true), or the default AIR application installer handles the update (false).
-	Optional. Default false. -->
-	<!-- <customUpdateUI></customUpdateUI> -->
-	
-	<!-- Whether the application can be launched when the user clicks a link in a web browser.
-	Optional. Default false. -->
-	<!-- <allowBrowserInvocation></allowBrowserInvocation> -->
-
-	<!-- Listing of file types for which the application can register. Optional. -->
-	<!-- <fileTypes> -->
-
-		<!-- Defines one file type. Optional. -->
-		<!-- <fileType> -->
-
-			<!-- The name that the system displays for the registered file type. Required. -->
-			<!-- <name></name> -->
-
-			<!-- The extension to register. Required. -->
-			<!-- <extension></extension> -->
-			
-			<!-- The description of the file type. Optional. -->
-			<!-- <description></description> -->
-			
-			<!-- The MIME content type. -->
-			<!-- <contentType></contentType> -->
-			
-			<!-- The icon to display for the file type. Optional. -->
-			<!-- <icon>
-				<image16x16></image16x16>
-				<image32x32></image32x32>
-				<image48x48></image48x48>
-				<image128x128></image128x128>
-			</icon> -->
-			
-		<!-- </fileType> -->
-	<!-- </fileTypes> -->
-
-</application>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/fd2bc5a5/Squiggly/main/Demo/AdobeSpellingAirDemoEx/src/AdobeSpellingAirDemoEx.mxml
----------------------------------------------------------------------
diff --git a/Squiggly/main/Demo/AdobeSpellingAirDemoEx/src/AdobeSpellingAirDemoEx.mxml b/Squiggly/main/Demo/AdobeSpellingAirDemoEx/src/AdobeSpellingAirDemoEx.mxml
deleted file mode 100644
index e8912c9..0000000
--- a/Squiggly/main/Demo/AdobeSpellingAirDemoEx/src/AdobeSpellingAirDemoEx.mxml
+++ /dev/null
@@ -1,71 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You 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.
-
--->
-<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" 
-					   xmlns:s="library://ns.adobe.com/flex/spark" 
-					   xmlns:mx="library://ns.adobe.com/flex/mx">
-	<s:layout>
-		<s:VerticalLayout/>
-	</s:layout>
-	
-	<fx:Script>
-		<![CDATA[
-			
-			import com.adobe.linguistics.spelling.SpellUI;   		           
-			
-			private function EnableAll(evt:MouseEvent):void {
-				SpellUI.enableSpelling(halo1, "usa.zwl");
-				SpellUI.enableSpelling(halo2, "usa.zwl");
-				SpellUI.enableSpelling(halo3, "usa.zwl");
-				SpellUI.enableSpelling(spark1, "usa.zwl");
-				SpellUI.enableSpelling(spark2, "usa.zwl");
-				
-			}
-			
-			private function DisableAll(evt:MouseEvent):void {
-				SpellUI.disableSpelling(halo1);
-				SpellUI.disableSpelling(halo2);
-				SpellUI.disableSpelling(halo3);
-				SpellUI.disableSpelling(spark1);
-				SpellUI.disableSpelling(spark2);
-			}
-			
-		]]>
-	</fx:Script>
-	
-	<mx:Label text="Squiggly Spell Checker Flex Demo v0.2" fontSize="30"/>
-	<s:HGroup>
-		<s:Button label="EnableSpelling" click="EnableAll(event)"/>	
-		<s:Button label="DisableSpelling" click="DisableAll(event)"/>		
-	</s:HGroup>
-	
-	<s:HGroup width="100%" height="100%">
-		<s:VGroup width="50%" height="100%">
-			<mx:Label fontSize="30" text="Halo Components"/>
-			<mx:TextInput id="halo1" width="80%" fontSize="30" text="Spell cheecking in halo TextInput"/>
-			<mx:TextArea id="halo2" width="80%" height="50%" fontSize="30" text="Spell cheecking in halo TextArea"/>
-			<mx:RichTextEditor id="halo3" width="80%" height="50%" fontSize="30" text="Spell cheecking in halo RichTextEditor"/>
-		</s:VGroup>
-		<s:VGroup width="50%" height="100%">
-			<mx:Label fontSize="30" text="Spark Components"/>
-			<s:TextInput id="spark1" width="80%" fontSize="30" text="Spell cheecking in spark TextInput"/>
-			<s:TextArea id="spark2" width="80%" height="50%" fontSize="30" text="Spell cheecking in spark TextArea"/>
-		</s:VGroup>
-	</s:HGroup>
-</s:WindowedApplication>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/fd2bc5a5/Squiggly/main/Demo/AdobeSpellingDemo/src/AdobeSpellingConfig.xml
----------------------------------------------------------------------
diff --git a/Squiggly/main/Demo/AdobeSpellingDemo/src/AdobeSpellingConfig.xml b/Squiggly/main/Demo/AdobeSpellingDemo/src/AdobeSpellingConfig.xml
deleted file mode 100644
index 4b2a819..0000000
--- a/Squiggly/main/Demo/AdobeSpellingDemo/src/AdobeSpellingConfig.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding='UTF-8'?>
-<!--
-
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You 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.
-
--->
-<SpellingConfig>
-  <LanguageResource language="English" languageCode="en_US" ruleFile="data/en_US.aff" dictionaryFile="data/en_US.dic"/>
-  <LanguageResource language="Spanish" languageCode="es_ES" ruleFile="data/es_ES.aff" dictionaryFile="data/es_ES.dic"/>
-  <LanguageResource language="Portuguese" languageCode="pt_PT" ruleFile="data/pt_PT.aff" dictionaryFile="data/pt_PT.dic"/>
-  <LanguageResource language="Italian" languageCode="it_IT" ruleFile="data/it_IT.aff" dictionaryFile="data/it_IT.dic"/>
-  <LanguageResource language="French" languageCode="fr_FR" ruleFile="data/fr_FR.aff" dictionaryFile="data/fr_FR.dic"/>
-</SpellingConfig>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/fd2bc5a5/Squiggly/main/Demo/AdobeSpellingDemo/src/AdobeSpellingDemo.mxml
----------------------------------------------------------------------
diff --git a/Squiggly/main/Demo/AdobeSpellingDemo/src/AdobeSpellingDemo.mxml b/Squiggly/main/Demo/AdobeSpellingDemo/src/AdobeSpellingDemo.mxml
deleted file mode 100644
index 462c8e9..0000000
--- a/Squiggly/main/Demo/AdobeSpellingDemo/src/AdobeSpellingDemo.mxml
+++ /dev/null
@@ -1,72 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements.  See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You 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.
-
--->
-<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" viewSourceURL="srcview/index.html" applicationComplete="init()">		
-			<mx:Script>
-			<![CDATA[
-				import com.adobe.linguistics.spelling.SpellUI;
-				import com.adobe.linguistics.spelling.framework.SpellingConfiguration;
-				import com.adobe.linguistics.spelling.framework.ResourceTable;
-				
-				
-				public function init():void
-				{
-					var resourceTable:ResourceTable = new ResourceTable();
-					resourceTable.setResource("en_US", {rule:"data/en_US.aff", dict:"data/en_US.dic"});
-					resourceTable.setResource("es_ES", {rule:"data/es_ES.aff", dict:"data/es_ES.dic"});
-					resourceTable.setResource("it_IT", {rule:"data/it_IT.aff", dict:"data/it_IT.dic"});
-					resourceTable.setResource("pt_PT", {rule:"data/pt_PT.aff", dict:"data/pt_PT.dic"});	
-					resourceTable.setResource("fr_FR", {rule:"data/fr_FR.aff", dict:"data/fr_FR.dic"});
-					SpellingConfiguration.resourceTable = resourceTable;
-				}
-			]]>
-    		</mx:Script>
-    		
-			<mx:Label text="Squiggly Spell Checker Flex Demo v0.6" fontSize="30"/>
-
-    		<mx:TabNavigator width="60%" height="100%" fontSize="20">
-    		    <mx:Canvas label="English" width="100%" height="100%">
-    		    	<mx:TextArea id="ta_en" width="100%" height="100%" 
-    		    		text="I know Enlish. Use the context menu to see the suggestions of the missbelled word. "
-    		    		creationComplete="SpellUI.enableSpelling(ta_en, 'en_US');"/>
-    		    </mx:Canvas>
-    		    <mx:Canvas label="Spanish" width="100%" height="100%">
-    		    	<mx:TextArea id="ta_es" width="100%" height="100%" 
-    		    		text="Sé esbañol. Utilice el menú contextual para ver las sugerencias de la palabra mal eskrita. "
-    		    		creationComplete="SpellUI.enableSpelling(ta_es, 'es_ES');" />
-    		    </mx:Canvas>
-    		    <mx:Canvas label="Portuguese" width="100%" height="100%">
-    		    	<mx:TextArea id="ta_pt" width="100%" height="100%" 
-    		    		text="Eu sei Portoguês. Use o menu de contexto para ver as sugestões da palavra grafada incorectamente."
-    		    		creationComplete="SpellUI.enableSpelling(ta_pt, 'pt_PT');"/>
-    		    </mx:Canvas>	
-    		    <mx:Canvas label="Italian" width="100%" height="100%">
-    		    	<mx:TextArea id="ta_it" width="100%" height="100%" 
-    		    		text="So italianou. Utilizzare il menu di scelta rapida per visualizzare le suggestioni della parola erreta. "
-    		    		creationComplete="SpellUI.enableSpelling(ta_it, 'it_IT');" />
-    		    </mx:Canvas> 		
-				<mx:Canvas label="French" width="100%" height="100%">
-					<mx:TextArea id="ta_fr" width="100%" height="100%" 
-								 text="Je sais que le frnçais. Utilisez le menu contextuel pour voir les suggestions du mot mal orthogrrraphié. "
-								 creationComplete="SpellUI.enableSpelling(ta_fr, 'fr_FR');" />
-				</mx:Canvas>
-    		</mx:TabNavigator>	
-</mx:Application>
-
-

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/fd2bc5a5/Squiggly/main/Demo/AdobeSpellingDemoEx/src/AdobeSpellingConfig.xml
----------------------------------------------------------------------
diff --git a/Squiggly/main/Demo/AdobeSpellingDemoEx/src/AdobeSpellingConfig.xml b/Squiggly/main/Demo/AdobeSpellingDemoEx/src/AdobeSpellingConfig.xml
deleted file mode 100644
index 7386b63..0000000
--- a/Squiggly/main/Demo/AdobeSpellingDemoEx/src/AdobeSpellingConfig.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding='UTF-8'?>
-<!--
-
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You 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.
-
--->
-<SpellingConfig>
-  <LanguageResource language="English" languageCode="en_US" ruleFile="data/en_US.aff" dictionaryFile="data/en_US.dic"/>
-  <LanguageResource language="Spanish" languageCode="es_ES" ruleFile="data/es_ES.aff" dictionaryFile="data/es_ES.dic"/>
-  <LanguageResource language="Portuguese" languageCode="pt_PT" ruleFile="data/pt_PT.aff" dictionaryFile="data/pt_PT.dic"/>
-  <LanguageResource language="Portuguese(Brazil)" languageCode="pt_BR" ruleFile="data/pt_BR.aff" dictionaryFile="data/pt_BR.dic"/>  
-  <LanguageResource language="Italian" languageCode="it_IT" ruleFile="data/it_IT.aff" dictionaryFile="data/it_IT.dic"/>
-  <LanguageResource language="Romanian" languageCode="ro_RO" ruleFile="data/ro_RO.aff" dictionaryFile="data/ro_RO.dic"/>
-</SpellingConfig>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/fd2bc5a5/Squiggly/main/Demo/AdobeSpellingDemoEx/src/AdobeSpellingDemoEx.mxml
----------------------------------------------------------------------
diff --git a/Squiggly/main/Demo/AdobeSpellingDemoEx/src/AdobeSpellingDemoEx.mxml b/Squiggly/main/Demo/AdobeSpellingDemoEx/src/AdobeSpellingDemoEx.mxml
deleted file mode 100644
index 9badc49..0000000
--- a/Squiggly/main/Demo/AdobeSpellingDemoEx/src/AdobeSpellingDemoEx.mxml
+++ /dev/null
@@ -1,70 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You 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.
-
--->
-<!-- Simple example to demonstrate the Spark TextArea control. -->
-<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
-			   xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" viewSourceURL="srcview/index.html" applicationComplete="init()">
-	<s:layout>
-		<s:VerticalLayout/>
-	</s:layout>
-	
-	<fx:Script>
-		<![CDATA[
-			import com.adobe.linguistics.spelling.SpellUI;
-			import com.adobe.linguistics.spelling.framework.SpellingConfiguration;
-			import com.adobe.linguistics.spelling.framework.ResourceTable;
-			
-			
-			public function init():void
-			{
-				var resourceTable:ResourceTable = new ResourceTable();
-				resourceTable.setResource("en_US", {rule:"data/en_US.aff", dict:"data/en_US.dic"});
-				resourceTable.setResource("es_ES", {rule:"data/es_ES.aff", dict:"data/es_ES.dic"});
-				resourceTable.setResource("it_IT", {rule:"data/it_IT.aff", dict:"data/it_IT.dic"});
-				resourceTable.setResource("pt_PT", {rule:"data/pt_PT.aff", dict:"data/pt_PT.dic"});	
-				SpellingConfiguration.resourceTable = resourceTable;
-			}
-		]]>
-	</fx:Script>
-	
-	<mx:Label text="Squiggly Spell Checker Flex Demo v0.3" fontSize="30"/>
-	
-	<mx:TabNavigator width="70%" height="100%" fontSize="25">
-		<s:NavigatorContent label="English" width="100%" height="100%">
-			<s:TextArea id="ta_en" width="100%" height="100%" 
-						 text="I know Enlish. Use the context menu to see the suggestions of the missbelled word. "
-						 creationComplete="SpellUI.enableSpelling(ta_en, 'en_US');"/>
-		</s:NavigatorContent>
-		<s:NavigatorContent label="Spanish" width="100%" height="100%">
-			<s:TextArea id="ta_es" width="100%" height="100%" 
-						 text="Sé esbañol. Utilice el menú contextual para ver las sugerencias de la palabra mal eskrita. "
-						 creationComplete="SpellUI.enableSpelling(ta_es, 'es_ES');" />
-		</s:NavigatorContent>
-		<s:NavigatorContent label="Portuguese" width="100%" height="100%">
-			<s:TextArea id="ta_pt" width="100%" height="100%" 
-						 text="Eu sei Portoguês. Use o menu de contexto para ver as sugestões da palavra grafada incorectamente."
-						 creationComplete="SpellUI.enableSpelling(ta_pt, 'pt_PT');"/>
-		</s:NavigatorContent>	
-		<s:NavigatorContent label="Italian" width="100%" height="100%">
-			<s:TextArea id="ta_it" width="100%" height="100%" 
-						 text="So italianou. Utilizzare il menu di scelta rapida per visualizzare le suggestioni della parola erreta. "
-						 creationComplete="SpellUI.enableSpelling(ta_it, 'it_IT');"/>
-		</s:NavigatorContent>
-	</mx:TabNavigator>
-</s:Application>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/fd2bc5a5/Squiggly/main/Demo/SpellingAirDemo/src/SpellingAirDemo-app.xml
----------------------------------------------------------------------
diff --git a/Squiggly/main/Demo/SpellingAirDemo/src/SpellingAirDemo-app.xml b/Squiggly/main/Demo/SpellingAirDemo/src/SpellingAirDemo-app.xml
new file mode 100644
index 0000000..36fb899
--- /dev/null
+++ b/Squiggly/main/Demo/SpellingAirDemo/src/SpellingAirDemo-app.xml
@@ -0,0 +1,153 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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.
+ 
+ -->
+<application xmlns="http://ns.adobe.com/air/application/1.5">
+
+<!-- Adobe AIR Application Descriptor File Template.
+
+	Specifies parameters for identifying, installing, and launching AIR applications.
+
+	xmlns - The Adobe AIR namespace: http://ns.adobe.com/air/application/1.5
+			The last segment of the namespace specifies the version 
+			of the AIR runtime required for this application to run.
+			
+	minimumPatchLevel - The minimum patch level of the AIR runtime required to run 
+			the application. Optional.
+-->
+
+	<!-- The application identifier string, unique to this application. Required. -->
+	<id>AdobeSpellingAirDemo</id>
+
+	<!-- Used as the filename for the application. Required. -->
+	<filename>AdobeSpellingAirDemo</filename>
+
+	<!-- The name that is displayed in the AIR application installer. 
+	     May have multiple values for each language. See samples or xsd schema file. Optional. -->
+	<name>AdobeSpellingAirDemo</name>
+
+	<!-- An application version designator (such as "v1", "2.5", or "Alpha 1"). Required. -->
+	<version>v1</version>
+
+	<!-- Description, displayed in the AIR application installer.
+	     May have multiple values for each language. See samples or xsd schema file. Optional. -->
+	<!-- <description></description> -->
+
+	<!-- Copyright information. Optional -->
+	<!-- <copyright></copyright> -->
+
+	<!-- Settings for the application's initial window. Required. -->
+	<initialWindow>
+		<!-- The main SWF or HTML file of the application. Required. -->
+		<!-- Note: In Flex Builder, the SWF reference is set automatically. -->
+		<content>[This value will be overwritten by Flex Builder in the output app.xml]</content>
+		
+		<!-- The title of the main window. Optional. -->
+		<!-- <title></title> -->
+
+		<!-- The type of system chrome to use (either "standard" or "none"). Optional. Default standard. -->
+		<!-- <systemChrome></systemChrome> -->
+
+		<!-- Whether the window is transparent. Only applicable when systemChrome is none. Optional. Default false. -->
+		<!-- <transparent></transparent> -->
+
+		<!-- Whether the window is initially visible. Optional. Default false. -->
+		<!-- <visible></visible> -->
+
+		<!-- Whether the user can minimize the window. Optional. Default true. -->
+		<!-- <minimizable></minimizable> -->
+
+		<!-- Whether the user can maximize the window. Optional. Default true. -->
+		<!-- <maximizable></maximizable> -->
+
+		<!-- Whether the user can resize the window. Optional. Default true. -->
+		<!-- <resizable></resizable> -->
+
+		<!-- The window's initial width. Optional. -->
+		<!-- <width></width> -->
+
+		<!-- The window's initial height. Optional. -->
+		<!-- <height></height> -->
+
+		<!-- The window's initial x position. Optional. -->
+		<!-- <x></x> -->
+
+		<!-- The window's initial y position. Optional. -->
+		<!-- <y></y> -->
+
+		<!-- The window's minimum size, specified as a width/height pair, such as "400 200". Optional. -->
+		<!-- <minSize></minSize> -->
+
+		<!-- The window's initial maximum size, specified as a width/height pair, such as "1600 1200". Optional. -->
+		<!-- <maxSize></maxSize> -->
+	</initialWindow>
+
+	<!-- The subpath of the standard default installation location to use. Optional. -->
+	<!-- <installFolder></installFolder> -->
+
+	<!-- The subpath of the Programs menu to use. (Ignored on operating systems without a Programs menu.) Optional. -->
+	<!-- <programMenuFolder></programMenuFolder> -->
+
+	<!-- The icon the system uses for the application. For at least one resolution,
+		 specify the path to a PNG file included in the AIR package. Optional. -->
+	<!-- <icon>
+		<image16x16></image16x16>
+		<image32x32></image32x32>
+		<image48x48></image48x48>
+		<image128x128></image128x128>
+	</icon> -->
+
+	<!-- Whether the application handles the update when a user double-clicks an update version
+	of the AIR file (true), or the default AIR application installer handles the update (false).
+	Optional. Default false. -->
+	<!-- <customUpdateUI></customUpdateUI> -->
+	
+	<!-- Whether the application can be launched when the user clicks a link in a web browser.
+	Optional. Default false. -->
+	<!-- <allowBrowserInvocation></allowBrowserInvocation> -->
+
+	<!-- Listing of file types for which the application can register. Optional. -->
+	<!-- <fileTypes> -->
+
+		<!-- Defines one file type. Optional. -->
+		<!-- <fileType> -->
+
+			<!-- The name that the system displays for the registered file type. Required. -->
+			<!-- <name></name> -->
+
+			<!-- The extension to register. Required. -->
+			<!-- <extension></extension> -->
+			
+			<!-- The description of the file type. Optional. -->
+			<!-- <description></description> -->
+			
+			<!-- The MIME content type. -->
+			<!-- <contentType></contentType> -->
+			
+			<!-- The icon to display for the file type. Optional. -->
+			<!-- <icon>
+				<image16x16></image16x16>
+				<image32x32></image32x32>
+				<image48x48></image48x48>
+				<image128x128></image128x128>
+			</icon> -->
+			
+		<!-- </fileType> -->
+	<!-- </fileTypes> -->
+
+</application>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/fd2bc5a5/Squiggly/main/Demo/SpellingAirDemo/src/SpellingAirDemo.mxml
----------------------------------------------------------------------
diff --git a/Squiggly/main/Demo/SpellingAirDemo/src/SpellingAirDemo.mxml b/Squiggly/main/Demo/SpellingAirDemo/src/SpellingAirDemo.mxml
new file mode 100644
index 0000000..4c68739
--- /dev/null
+++ b/Squiggly/main/Demo/SpellingAirDemo/src/SpellingAirDemo.mxml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+
+-->
+<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" width="1024" height="768" initialize="init()">		
+			<mx:Script>
+			<![CDATA[
+
+				import com.adobe.linguistics.spelling.SpellUI;
+				
+				public function init():void
+				{
+					SpellUI.enableSpelling(ti, "usa.zwl");
+					SpellUI.enableSpelling(ta, "usa.zwl");
+					SpellUI.enableSpelling(rte, "usa.zwl");
+				}	
+			]]>
+    		</mx:Script>
+    		
+			<mx:Label text="Squiggly Spell Checker Air Demo v0.1" fontSize="30"/>
+    		<mx:TextInput id="ti" width="50%" fontSize="30"/>
+			<mx:TextArea id="ta" width="50%" height="50%" fontSize="30"/>
+			<mx:RichTextEditor id="rte" width="50%" height="50%" fontSize="30"/>	
+</mx:WindowedApplication>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/fd2bc5a5/Squiggly/main/Demo/SpellingAirDemoEx/src/SpellingAirDemoEx-app.xml
----------------------------------------------------------------------
diff --git a/Squiggly/main/Demo/SpellingAirDemoEx/src/SpellingAirDemoEx-app.xml b/Squiggly/main/Demo/SpellingAirDemoEx/src/SpellingAirDemoEx-app.xml
new file mode 100644
index 0000000..95c29b4
--- /dev/null
+++ b/Squiggly/main/Demo/SpellingAirDemoEx/src/SpellingAirDemoEx-app.xml
@@ -0,0 +1,153 @@
+<?xml version="1.0" encoding="utf-8" standalone="no"?>
+<!--
+ 
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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.
+ 
+ -->
+<application xmlns="http://ns.adobe.com/air/application/1.5.2">
+
+<!-- Adobe AIR Application Descriptor File Template.
+
+	Specifies parameters for identifying, installing, and launching AIR applications.
+
+	xmlns - The Adobe AIR namespace: http://ns.adobe.com/air/application/1.5.2
+			The last segment of the namespace specifies the version 
+			of the AIR runtime required for this application to run.
+			
+	minimumPatchLevel - The minimum patch level of the AIR runtime required to run 
+			the application. Optional.
+-->
+
+	<!-- The application identifier string, unique to this application. Required. -->
+	<id>AdobeSpellingAirDemoEx</id>
+
+	<!-- Used as the filename for the application. Required. -->
+	<filename>AdobeSpellingAirDemoEx</filename>
+
+	<!-- The name that is displayed in the AIR application installer. 
+	     May have multiple values for each language. See samples or xsd schema file. Optional. -->
+	<name>AdobeSpellingAirDemoEx</name>
+
+	<!-- An application version designator (such as "v1", "2.5", or "Alpha 1"). Required. -->
+	<version>v1</version>
+
+	<!-- Description, displayed in the AIR application installer.
+	     May have multiple values for each language. See samples or xsd schema file. Optional. -->
+	<!-- <description></description> -->
+
+	<!-- Copyright information. Optional -->
+	<!-- <copyright></copyright> -->
+
+	<!-- Settings for the application's initial window. Required. -->
+	<initialWindow>
+		<!-- The main SWF or HTML file of the application. Required. -->
+		<!-- Note: In Flash Builder, the SWF reference is set automatically. -->
+		<content>[This value will be overwritten by Flash Builder in the output app.xml]</content>
+		
+		<!-- The title of the main window. Optional. -->
+		<!-- <title></title> -->
+
+		<!-- The type of system chrome to use (either "standard" or "none"). Optional. Default standard. -->
+		<!-- <systemChrome></systemChrome> -->
+
+		<!-- Whether the window is transparent. Only applicable when systemChrome is none. Optional. Default false. -->
+		<!-- <transparent></transparent> -->
+
+		<!-- Whether the window is initially visible. Optional. Default false. -->
+		<!-- <visible></visible> -->
+
+		<!-- Whether the user can minimize the window. Optional. Default true. -->
+		<!-- <minimizable></minimizable> -->
+
+		<!-- Whether the user can maximize the window. Optional. Default true. -->
+		<!-- <maximizable></maximizable> -->
+
+		<!-- Whether the user can resize the window. Optional. Default true. -->
+		<!-- <resizable></resizable> -->
+
+		<!-- The window's initial width. Optional. -->
+		<!-- <width></width> -->
+
+		<!-- The window's initial height. Optional. -->
+		<!-- <height></height> -->
+
+		<!-- The window's initial x position. Optional. -->
+		<!-- <x></x> -->
+
+		<!-- The window's initial y position. Optional. -->
+		<!-- <y></y> -->
+
+		<!-- The window's minimum size, specified as a width/height pair, such as "400 200". Optional. -->
+		<!-- <minSize></minSize> -->
+
+		<!-- The window's initial maximum size, specified as a width/height pair, such as "1600 1200". Optional. -->
+		<!-- <maxSize></maxSize> -->
+	</initialWindow>
+
+	<!-- The subpath of the standard default installation location to use. Optional. -->
+	<!-- <installFolder></installFolder> -->
+
+	<!-- The subpath of the Programs menu to use. (Ignored on operating systems without a Programs menu.) Optional. -->
+	<!-- <programMenuFolder></programMenuFolder> -->
+
+	<!-- The icon the system uses for the application. For at least one resolution,
+		 specify the path to a PNG file included in the AIR package. Optional. -->
+	<!-- <icon>
+		<image16x16></image16x16>
+		<image32x32></image32x32>
+		<image48x48></image48x48>
+		<image128x128></image128x128>
+	</icon> -->
+
+	<!-- Whether the application handles the update when a user double-clicks an update version
+	of the AIR file (true), or the default AIR application installer handles the update (false).
+	Optional. Default false. -->
+	<!-- <customUpdateUI></customUpdateUI> -->
+	
+	<!-- Whether the application can be launched when the user clicks a link in a web browser.
+	Optional. Default false. -->
+	<!-- <allowBrowserInvocation></allowBrowserInvocation> -->
+
+	<!-- Listing of file types for which the application can register. Optional. -->
+	<!-- <fileTypes> -->
+
+		<!-- Defines one file type. Optional. -->
+		<!-- <fileType> -->
+
+			<!-- The name that the system displays for the registered file type. Required. -->
+			<!-- <name></name> -->
+
+			<!-- The extension to register. Required. -->
+			<!-- <extension></extension> -->
+			
+			<!-- The description of the file type. Optional. -->
+			<!-- <description></description> -->
+			
+			<!-- The MIME content type. -->
+			<!-- <contentType></contentType> -->
+			
+			<!-- The icon to display for the file type. Optional. -->
+			<!-- <icon>
+				<image16x16></image16x16>
+				<image32x32></image32x32>
+				<image48x48></image48x48>
+				<image128x128></image128x128>
+			</icon> -->
+			
+		<!-- </fileType> -->
+	<!-- </fileTypes> -->
+
+</application>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/fd2bc5a5/Squiggly/main/Demo/SpellingAirDemoEx/src/SpellingAirDemoEx.mxml
----------------------------------------------------------------------
diff --git a/Squiggly/main/Demo/SpellingAirDemoEx/src/SpellingAirDemoEx.mxml b/Squiggly/main/Demo/SpellingAirDemoEx/src/SpellingAirDemoEx.mxml
new file mode 100644
index 0000000..e8912c9
--- /dev/null
+++ b/Squiggly/main/Demo/SpellingAirDemoEx/src/SpellingAirDemoEx.mxml
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+
+-->
+<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" 
+					   xmlns:s="library://ns.adobe.com/flex/spark" 
+					   xmlns:mx="library://ns.adobe.com/flex/mx">
+	<s:layout>
+		<s:VerticalLayout/>
+	</s:layout>
+	
+	<fx:Script>
+		<![CDATA[
+			
+			import com.adobe.linguistics.spelling.SpellUI;   		           
+			
+			private function EnableAll(evt:MouseEvent):void {
+				SpellUI.enableSpelling(halo1, "usa.zwl");
+				SpellUI.enableSpelling(halo2, "usa.zwl");
+				SpellUI.enableSpelling(halo3, "usa.zwl");
+				SpellUI.enableSpelling(spark1, "usa.zwl");
+				SpellUI.enableSpelling(spark2, "usa.zwl");
+				
+			}
+			
+			private function DisableAll(evt:MouseEvent):void {
+				SpellUI.disableSpelling(halo1);
+				SpellUI.disableSpelling(halo2);
+				SpellUI.disableSpelling(halo3);
+				SpellUI.disableSpelling(spark1);
+				SpellUI.disableSpelling(spark2);
+			}
+			
+		]]>
+	</fx:Script>
+	
+	<mx:Label text="Squiggly Spell Checker Flex Demo v0.2" fontSize="30"/>
+	<s:HGroup>
+		<s:Button label="EnableSpelling" click="EnableAll(event)"/>	
+		<s:Button label="DisableSpelling" click="DisableAll(event)"/>		
+	</s:HGroup>
+	
+	<s:HGroup width="100%" height="100%">
+		<s:VGroup width="50%" height="100%">
+			<mx:Label fontSize="30" text="Halo Components"/>
+			<mx:TextInput id="halo1" width="80%" fontSize="30" text="Spell cheecking in halo TextInput"/>
+			<mx:TextArea id="halo2" width="80%" height="50%" fontSize="30" text="Spell cheecking in halo TextArea"/>
+			<mx:RichTextEditor id="halo3" width="80%" height="50%" fontSize="30" text="Spell cheecking in halo RichTextEditor"/>
+		</s:VGroup>
+		<s:VGroup width="50%" height="100%">
+			<mx:Label fontSize="30" text="Spark Components"/>
+			<s:TextInput id="spark1" width="80%" fontSize="30" text="Spell cheecking in spark TextInput"/>
+			<s:TextArea id="spark2" width="80%" height="50%" fontSize="30" text="Spell cheecking in spark TextArea"/>
+		</s:VGroup>
+	</s:HGroup>
+</s:WindowedApplication>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/fd2bc5a5/Squiggly/main/Demo/SpellingDemo/src/SpellingConfig.xml
----------------------------------------------------------------------
diff --git a/Squiggly/main/Demo/SpellingDemo/src/SpellingConfig.xml b/Squiggly/main/Demo/SpellingDemo/src/SpellingConfig.xml
new file mode 100644
index 0000000..4b2a819
--- /dev/null
+++ b/Squiggly/main/Demo/SpellingDemo/src/SpellingConfig.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding='UTF-8'?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+
+-->
+<SpellingConfig>
+  <LanguageResource language="English" languageCode="en_US" ruleFile="data/en_US.aff" dictionaryFile="data/en_US.dic"/>
+  <LanguageResource language="Spanish" languageCode="es_ES" ruleFile="data/es_ES.aff" dictionaryFile="data/es_ES.dic"/>
+  <LanguageResource language="Portuguese" languageCode="pt_PT" ruleFile="data/pt_PT.aff" dictionaryFile="data/pt_PT.dic"/>
+  <LanguageResource language="Italian" languageCode="it_IT" ruleFile="data/it_IT.aff" dictionaryFile="data/it_IT.dic"/>
+  <LanguageResource language="French" languageCode="fr_FR" ruleFile="data/fr_FR.aff" dictionaryFile="data/fr_FR.dic"/>
+</SpellingConfig>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/fd2bc5a5/Squiggly/main/Demo/SpellingDemo/src/SpellingDemo.mxml
----------------------------------------------------------------------
diff --git a/Squiggly/main/Demo/SpellingDemo/src/SpellingDemo.mxml b/Squiggly/main/Demo/SpellingDemo/src/SpellingDemo.mxml
new file mode 100644
index 0000000..462c8e9
--- /dev/null
+++ b/Squiggly/main/Demo/SpellingDemo/src/SpellingDemo.mxml
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You 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.
+
+-->
+<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" viewSourceURL="srcview/index.html" applicationComplete="init()">		
+			<mx:Script>
+			<![CDATA[
+				import com.adobe.linguistics.spelling.SpellUI;
+				import com.adobe.linguistics.spelling.framework.SpellingConfiguration;
+				import com.adobe.linguistics.spelling.framework.ResourceTable;
+				
+				
+				public function init():void
+				{
+					var resourceTable:ResourceTable = new ResourceTable();
+					resourceTable.setResource("en_US", {rule:"data/en_US.aff", dict:"data/en_US.dic"});
+					resourceTable.setResource("es_ES", {rule:"data/es_ES.aff", dict:"data/es_ES.dic"});
+					resourceTable.setResource("it_IT", {rule:"data/it_IT.aff", dict:"data/it_IT.dic"});
+					resourceTable.setResource("pt_PT", {rule:"data/pt_PT.aff", dict:"data/pt_PT.dic"});	
+					resourceTable.setResource("fr_FR", {rule:"data/fr_FR.aff", dict:"data/fr_FR.dic"});
+					SpellingConfiguration.resourceTable = resourceTable;
+				}
+			]]>
+    		</mx:Script>
+    		
+			<mx:Label text="Squiggly Spell Checker Flex Demo v0.6" fontSize="30"/>
+
+    		<mx:TabNavigator width="60%" height="100%" fontSize="20">
+    		    <mx:Canvas label="English" width="100%" height="100%">
+    		    	<mx:TextArea id="ta_en" width="100%" height="100%" 
+    		    		text="I know Enlish. Use the context menu to see the suggestions of the missbelled word. "
+    		    		creationComplete="SpellUI.enableSpelling(ta_en, 'en_US');"/>
+    		    </mx:Canvas>
+    		    <mx:Canvas label="Spanish" width="100%" height="100%">
+    		    	<mx:TextArea id="ta_es" width="100%" height="100%" 
+    		    		text="Sé esbañol. Utilice el menú contextual para ver las sugerencias de la palabra mal eskrita. "
+    		    		creationComplete="SpellUI.enableSpelling(ta_es, 'es_ES');" />
+    		    </mx:Canvas>
+    		    <mx:Canvas label="Portuguese" width="100%" height="100%">
+    		    	<mx:TextArea id="ta_pt" width="100%" height="100%" 
+    		    		text="Eu sei Portoguês. Use o menu de contexto para ver as sugestões da palavra grafada incorectamente."
+    		    		creationComplete="SpellUI.enableSpelling(ta_pt, 'pt_PT');"/>
+    		    </mx:Canvas>	
+    		    <mx:Canvas label="Italian" width="100%" height="100%">
+    		    	<mx:TextArea id="ta_it" width="100%" height="100%" 
+    		    		text="So italianou. Utilizzare il menu di scelta rapida per visualizzare le suggestioni della parola erreta. "
+    		    		creationComplete="SpellUI.enableSpelling(ta_it, 'it_IT');" />
+    		    </mx:Canvas> 		
+				<mx:Canvas label="French" width="100%" height="100%">
+					<mx:TextArea id="ta_fr" width="100%" height="100%" 
+								 text="Je sais que le frnçais. Utilisez le menu contextuel pour voir les suggestions du mot mal orthogrrraphié. "
+								 creationComplete="SpellUI.enableSpelling(ta_fr, 'fr_FR');" />
+				</mx:Canvas>
+    		</mx:TabNavigator>	
+</mx:Application>
+
+

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/fd2bc5a5/Squiggly/main/Demo/SpellingDemoEx/src/SpellingConfig.xml
----------------------------------------------------------------------
diff --git a/Squiggly/main/Demo/SpellingDemoEx/src/SpellingConfig.xml b/Squiggly/main/Demo/SpellingDemoEx/src/SpellingConfig.xml
new file mode 100644
index 0000000..7386b63
--- /dev/null
+++ b/Squiggly/main/Demo/SpellingDemoEx/src/SpellingConfig.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding='UTF-8'?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+
+-->
+<SpellingConfig>
+  <LanguageResource language="English" languageCode="en_US" ruleFile="data/en_US.aff" dictionaryFile="data/en_US.dic"/>
+  <LanguageResource language="Spanish" languageCode="es_ES" ruleFile="data/es_ES.aff" dictionaryFile="data/es_ES.dic"/>
+  <LanguageResource language="Portuguese" languageCode="pt_PT" ruleFile="data/pt_PT.aff" dictionaryFile="data/pt_PT.dic"/>
+  <LanguageResource language="Portuguese(Brazil)" languageCode="pt_BR" ruleFile="data/pt_BR.aff" dictionaryFile="data/pt_BR.dic"/>  
+  <LanguageResource language="Italian" languageCode="it_IT" ruleFile="data/it_IT.aff" dictionaryFile="data/it_IT.dic"/>
+  <LanguageResource language="Romanian" languageCode="ro_RO" ruleFile="data/ro_RO.aff" dictionaryFile="data/ro_RO.dic"/>
+</SpellingConfig>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/fd2bc5a5/Squiggly/main/Tools/AdobeSpellingDictGen/README.txt
----------------------------------------------------------------------
diff --git a/Squiggly/main/Tools/AdobeSpellingDictGen/README.txt b/Squiggly/main/Tools/AdobeSpellingDictGen/README.txt
deleted file mode 100644
index 5326ed6..0000000
--- a/Squiggly/main/Tools/AdobeSpellingDictGen/README.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-Squiggly Dictionary Generator v0.1
-
-README
-===================================
-
-This is a simple AIR application that converts a plain text word list file to an Adobe Spelling Dictionary file. 
-
-Here's what each step is doing:
-1. Load a plain text file, each line in the file contains one word, a sampleWOrdList.txt is provided
-2. Calculate the metaphone, which will improve spell checker performance and result
-3. Generate a Squiggly Dictionary object
-4. Export the the Squiggly Dictionary object to a compressed binary file (recommend using *.zwl extension)
-
-Once you have the zwl file, you can use it in your Flex/AIR project.
-
-

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/fd2bc5a5/Squiggly/main/Tools/AdobeSpellingDictGen/sample/sampleWordList.txt
----------------------------------------------------------------------
diff --git a/Squiggly/main/Tools/AdobeSpellingDictGen/sample/sampleWordList.txt b/Squiggly/main/Tools/AdobeSpellingDictGen/sample/sampleWordList.txt
deleted file mode 100644
index 3c6e8ce..0000000
--- a/Squiggly/main/Tools/AdobeSpellingDictGen/sample/sampleWordList.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-adobe
-apple
-amazon
-microsoft
-intel
-ibm
-google
-yahoo
-ebay
-vmware
-sun
-orcale
-facebook
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/fd2bc5a5/Squiggly/main/Tools/AdobeSpellingDictGen/src/AdobeSpellingDictGen-app.xml
----------------------------------------------------------------------
diff --git a/Squiggly/main/Tools/AdobeSpellingDictGen/src/AdobeSpellingDictGen-app.xml b/Squiggly/main/Tools/AdobeSpellingDictGen/src/AdobeSpellingDictGen-app.xml
deleted file mode 100644
index ecff5e3..0000000
--- a/Squiggly/main/Tools/AdobeSpellingDictGen/src/AdobeSpellingDictGen-app.xml
+++ /dev/null
@@ -1,153 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You 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.
- 
- -->
-<application xmlns="http://ns.adobe.com/air/application/1.5">
-
-<!-- Adobe AIR Application Descriptor File Template.
-
-	Specifies parameters for identifying, installing, and launching AIR applications.
-
-	xmlns - The Adobe AIR namespace: http://ns.adobe.com/air/application/1.5
-			The last segment of the namespace specifies the version 
-			of the AIR runtime required for this application to run.
-			
-	minimumPatchLevel - The minimum patch level of the AIR runtime required to run 
-			the application. Optional.
--->
-
-	<!-- The application identifier string, unique to this application. Required. -->
-	<id>AdobeSpellingDictGen</id>
-
-	<!-- Used as the filename for the application. Required. -->
-	<filename>AdobeSpellingDictGen</filename>
-
-	<!-- The name that is displayed in the AIR application installer. 
-	     May have multiple values for each language. See samples or xsd schema file. Optional. -->
-	<name>AdobeSpellingDictGen</name>
-
-	<!-- An application version designator (such as "v1", "2.5", or "Alpha 1"). Required. -->
-	<version>v1</version>
-
-	<!-- Description, displayed in the AIR application installer.
-	     May have multiple values for each language. See samples or xsd schema file. Optional. -->
-	<!-- <description></description> -->
-
-	<!-- Copyright information. Optional -->
-	<!-- <copyright></copyright> -->
-
-	<!-- Settings for the application's initial window. Required. -->
-	<initialWindow>
-		<!-- The main SWF or HTML file of the application. Required. -->
-		<!-- Note: In Flex Builder, the SWF reference is set automatically. -->
-		<content>[This value will be overwritten by Flex Builder in the output app.xml]</content>
-		
-		<!-- The title of the main window. Optional. -->
-		<!-- <title></title> -->
-
-		<!-- The type of system chrome to use (either "standard" or "none"). Optional. Default standard. -->
-		<!-- <systemChrome></systemChrome> -->
-
-		<!-- Whether the window is transparent. Only applicable when systemChrome is none. Optional. Default false. -->
-		<!-- <transparent></transparent> -->
-
-		<!-- Whether the window is initially visible. Optional. Default false. -->
-		<!-- <visible></visible> -->
-
-		<!-- Whether the user can minimize the window. Optional. Default true. -->
-		<!-- <minimizable></minimizable> -->
-
-		<!-- Whether the user can maximize the window. Optional. Default true. -->
-		<!-- <maximizable></maximizable> -->
-
-		<!-- Whether the user can resize the window. Optional. Default true. -->
-		<!-- <resizable></resizable> -->
-
-		<!-- The window's initial width. Optional. -->
-		<!-- <width></width> -->
-
-		<!-- The window's initial height. Optional. -->
-		<!-- <height></height> -->
-
-		<!-- The window's initial x position. Optional. -->
-		<!-- <x></x> -->
-
-		<!-- The window's initial y position. Optional. -->
-		<!-- <y></y> -->
-
-		<!-- The window's minimum size, specified as a width/height pair, such as "400 200". Optional. -->
-		<!-- <minSize></minSize> -->
-
-		<!-- The window's initial maximum size, specified as a width/height pair, such as "1600 1200". Optional. -->
-		<!-- <maxSize></maxSize> -->
-	</initialWindow>
-
-	<!-- The subpath of the standard default installation location to use. Optional. -->
-	<!-- <installFolder></installFolder> -->
-
-	<!-- The subpath of the Programs menu to use. (Ignored on operating systems without a Programs menu.) Optional. -->
-	<!-- <programMenuFolder></programMenuFolder> -->
-
-	<!-- The icon the system uses for the application. For at least one resolution,
-		 specify the path to a PNG file included in the AIR package. Optional. -->
-	<!-- <icon>
-		<image16x16></image16x16>
-		<image32x32></image32x32>
-		<image48x48></image48x48>
-		<image128x128></image128x128>
-	</icon> -->
-
-	<!-- Whether the application handles the update when a user double-clicks an update version
-	of the AIR file (true), or the default AIR application installer handles the update (false).
-	Optional. Default false. -->
-	<!-- <customUpdateUI></customUpdateUI> -->
-	
-	<!-- Whether the application can be launched when the user clicks a link in a web browser.
-	Optional. Default false. -->
-	<!-- <allowBrowserInvocation></allowBrowserInvocation> -->
-
-	<!-- Listing of file types for which the application can register. Optional. -->
-	<!-- <fileTypes> -->
-
-		<!-- Defines one file type. Optional. -->
-		<!-- <fileType> -->
-
-			<!-- The name that the system displays for the registered file type. Required. -->
-			<!-- <name></name> -->
-
-			<!-- The extension to register. Required. -->
-			<!-- <extension></extension> -->
-			
-			<!-- The description of the file type. Optional. -->
-			<!-- <description></description> -->
-			
-			<!-- The MIME content type. -->
-			<!-- <contentType></contentType> -->
-			
-			<!-- The icon to display for the file type. Optional. -->
-			<!-- <icon>
-				<image16x16></image16x16>
-				<image32x32></image32x32>
-				<image48x48></image48x48>
-				<image128x128></image128x128>
-			</icon> -->
-			
-		<!-- </fileType> -->
-	<!-- </fileTypes> -->
-
-</application>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/fd2bc5a5/Squiggly/main/Tools/AdobeSpellingDictGen/src/AdobeSpellingDictGen.mxml
----------------------------------------------------------------------
diff --git a/Squiggly/main/Tools/AdobeSpellingDictGen/src/AdobeSpellingDictGen.mxml b/Squiggly/main/Tools/AdobeSpellingDictGen/src/AdobeSpellingDictGen.mxml
deleted file mode 100644
index 2399910..0000000
--- a/Squiggly/main/Tools/AdobeSpellingDictGen/src/AdobeSpellingDictGen.mxml
+++ /dev/null
@@ -1,210 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You 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.
-
--->
-<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" width="800" height="600" fontSize="12">
-
-
-	<mx:Script>
-		<![CDATA[
-			
-			import com.adobe.linguistics.spelling.utils.WordList;
-			import com.adobe.linguistics.spelling.engine.dictionary.SuseDictionary;
-			import com.adobe.linguistics.spelling.codec.language.MetaPhone;
-			
-			// For debug only
-			private var tsStart:int
-			private var tsEnd:int;
-			
-			// An array with words only
-			private var basicWordList:Array;
-			
-			// A suse dictionary object (hash) as defined in suse engine
-			private var suse:SuseDictionary;
-			
-			// An array with index, word, metaphone
-			[Bindable]
-			private var advWordList:Array;
-			
-			private var src:File = File.applicationDirectory;
-			private var dest:File = File.applicationDirectory;
-			
-			
-			private function browseInFile():void
-			{
-				try {
-					src.browseForOpen("Select a TXT file");
-					src.addEventListener(Event.SELECT, inFileSelected);
-				} catch (error:Error)
-				{
-					trace("Failed:", error.message);
-				}
-			}
-			
-			private function inFileSelected(event:Event):void
-			{	
-				tsStart = getTimer();
-				var file:File = event.target as File;
-				var stream:FileStream = new FileStream();
-				stream.open(file, FileMode.READ);
-				var fileData:String = stream.readUTFBytes(stream.bytesAvailable);
-				
-				if (fileData.charAt(fileData.indexOf("\n")-2) == "\r")		//Strange, but happened when generating the text file from mac
-				{
-					basicWordList = fileData.split("\r\r\n");
-				}
-				else if (fileData.charAt(fileData.indexOf("\n")-1) == "\r")
-				{
-					basicWordList = fileData.split("\r\n");			//Windows
-				}
-				else 
-				{
-					basicWordList = fileData.split("\n");			//Mac and linux
-				}
-				
-				loadTxtInfo.text = file.nativePath + " (" + basicWordList.length.toString() + " words, " + file.size.toString() + " bytes)";
-				loadTxtInfo.setStyle("color", "green");
-				
-				// Debug log
-				tsEnd = getTimer();
-				debugInfo.text += "DebugInfo\n================\n" + "TxtLoaded: "+ file.nativePath + " " + (tsEnd - tsStart).toString() + "ms" + "\n";
-				prepareToShow();
-			}
-			
-			
-			private function browseOutFile():void
-			{
-				try {
-					dest.browseForSave("Output ZWL file");
-					dest.addEventListener(Event.SELECT, outFileSelected);
-				} catch (error:Error)
-				{
-					trace("Failed:", error.message);
-				}
-			}
-			
-			private function outFileSelected(event:Event):void
-			{				
-				tsStart = getTimer();
-				var bytes:ByteArray = new ByteArray();
-	    		bytes.writeObject(suse);
-	    		bytes.position = 0;
-	    		bytes.compress();
-	    		bytes.position = 0;
-	    		var outFile:File = new File((event.target as File).nativePath);
-	    		var outStream:FileStream = new FileStream();
-	    		outStream.open(outFile, FileMode.WRITE);
-	    		outStream.writeBytes(bytes, 0, bytes.length);
-	    		outStream.close();
-	    		
-	    		exportInfo.text = outFile.nativePath + " (" + outFile.size.toString() + " bytes)";
-				exportInfo.setStyle("color", "green");
-				
-				// Debug log
-	    		tsEnd = getTimer();
-	    		debugInfo.text += "\nZwlExported: " + outFile.nativePath + " " + (tsEnd - tsStart).toString() + "ms\n";
-				
-			}
-			
-	
-			
-			private function prepareToShow():void
-			{
-				
-				advWordList = new Array();
-				for (var i:uint=0; i<basicWordList.length; i++) {
-					// In case some empty string are there
-					if (basicWordList[i] != "")
-						advWordList.push(new UIWord(i, basicWordList[i]));
-				}
-			}
-			
-			private function genMeta():void
-			{
-
-				var _metaphone:MetaPhone= new MetaPhone();
-				tsStart = getTimer();
-				for (var i:uint=0; i<advWordList.length; i++) {
-					advWordList[i].meta = _metaphone.meta(advWordList[i].word, 4);
-				}
-				genMetaInfo.text = "Metaphone index generated";
-				genMetaInfo.setStyle("color", "green");
-				myDataGrid.dataProvider= advWordList;
-				// Debug log
-				tsEnd = getTimer();
-				debugInfo.text += "\nMetaGenerated: " + (tsEnd - tsStart).toString() + "ms\n";
-			}
-			
-			private function genSuseDict():void
-			{
-				suse = new SuseDictionary();
-				tsStart = getTimer();
-				for (var i:uint=0; i<advWordList.length; i++) {
-					if (suse.MetaPhoneHash[advWordList[i].meta]) {
-						suse.MetaPhoneHash[advWordList[i].meta].insert(advWordList[i].word);
-					}
-					else {
-						if ((advWordList[i].meta == "") || (advWordList[i].meta == "-nde")) continue;
-						suse.MetaPhoneHash[advWordList[i].meta] = new WordList();
-						suse.MetaPhoneHash[advWordList[i].meta].insert(advWordList[i].word);
-					}
-				}
-				genDictInfo.text = "SquigglyDict object generated";
-				genDictInfo.setStyle("color", "green");
-				
-				// Debug log
-				tsEnd = getTimer();
-				debugInfo.text += "\nSquigglyDictGenerated: " + (tsEnd - tsStart).toString() + "ms\n"; 	
-			}
-			
-		]]>
-	</mx:Script>
-	<mx:HBox width="100%">
-		<mx:Label text="Squiggly Dictionary Generator v0.1 (txt2zwl)" fontSize="25"/>		
-	</mx:HBox>
-	<mx:HBox width="100%">
-		<mx:Button label="1. Load TXT File" click="browseInFile()"/>
-		<mx:HRule visible="false" width="100%"/>
-		<mx:Label id="loadTxtInfo" text="Not loaded" color="red"/>
-	</mx:HBox>
-	<mx:HBox width="100%">
-		<mx:Button label="2. Calculate Metaphone" click="genMeta()"/>
-		<mx:HRule visible="false" width="100%"/>
-		<mx:Label id="genMetaInfo" text="Not calculated" color="red"/>
-	</mx:HBox>
-	<mx:HBox width="100%">
-		<mx:Button label="3. Generate SquigglyDict" click="genSuseDict()"/>		
-		<mx:HRule visible="false" width="100%"/>
-		<mx:Label id="genDictInfo" text="Not generated" color="red"/>
-	</mx:HBox>
-	<mx:HBox width="100%">
-		<mx:Button label="4. Export ZWL File" click = "browseOutFile()"/>
-		<mx:HRule visible="false" width="100%"/>
-		<mx:Label id="exportInfo" text="Not exported" color="red"/>
-	</mx:HBox>
-	<mx:HBox width="100%" height="100%">
-		<mx:DataGrid height="100%" id="myDataGrid" dataProvider = "{ advWordList }" width="70%">
-			<mx:columns>
-				<mx:DataGridColumn headerText="Index" dataField="index"/>
-				<mx:DataGridColumn headerText="Word" dataField="word"/>
-				<mx:DataGridColumn headerText="Metaphone" dataField="meta"/>
-			</mx:columns>
-		</mx:DataGrid>
-		<mx:TextArea id="debugInfo" height="100%" width="30%" />
-	</mx:HBox>
-</mx:WindowedApplication>


[44/50] [abbrv] git commit: [flex-utilities] [refs/heads/master] - Change default config file name to SpellingConfig.xml in docs

Posted by jm...@apache.org.
Change default config file name to SpellingConfig.xml in docs


Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/730b1b5a
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/730b1b5a
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/730b1b5a

Branch: refs/heads/master
Commit: 730b1b5ace981108672cfe9edb487103428348f1
Parents: 20eedd5
Author: Justin Mclean <jm...@apache.org>
Authored: Fri Aug 29 10:41:06 2014 +1000
Committer: Justin Mclean <jm...@apache.org>
Committed: Fri Aug 29 10:41:06 2014 +1000

----------------------------------------------------------------------
 .../SquigglyTLFExample/src/SquigglyTLFExample.as      |  2 +-
 .../src/com/adobe/linguistics/spelling/SpellUI.as     | 12 ++++++------
 .../src/com/adobe/linguistics/spelling/SpellUI.as     |  4 ++--
 .../com/adobe/linguistics/spelling/SpellUIForTLF.as   | 14 +++++++-------
 4 files changed, 16 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/730b1b5a/Squiggly/main/ASDocExamples/com/adobe/linguistics/spelling/Examples/ActionScript/SquigglyTLFExample/src/SquigglyTLFExample.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/ASDocExamples/com/adobe/linguistics/spelling/Examples/ActionScript/SquigglyTLFExample/src/SquigglyTLFExample.as b/Squiggly/main/ASDocExamples/com/adobe/linguistics/spelling/Examples/ActionScript/SquigglyTLFExample/src/SquigglyTLFExample.as
index e4df4bf..b2453c6 100644
--- a/Squiggly/main/ASDocExamples/com/adobe/linguistics/spelling/Examples/ActionScript/SquigglyTLFExample/src/SquigglyTLFExample.as
+++ b/Squiggly/main/ASDocExamples/com/adobe/linguistics/spelling/Examples/ActionScript/SquigglyTLFExample/src/SquigglyTLFExample.as
@@ -28,7 +28,7 @@
  *  </li>
  * </ol>
  * 
- * Note: to make this example work properly, please make sure you have the proper dictionary files and AdobeSpellingConfig.xml file in the specified folder 
+ * Note: to make this example work properly, please make sure you have the proper dictionary files and SpellingConfig.xml file in the specified folder 
  * and put the Squiggly AdobeSpellingUITLF.swc library in your libs folder.
  */
 package

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/730b1b5a/Squiggly/main/SpellingUI/src/com/adobe/linguistics/spelling/SpellUI.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingUI/src/com/adobe/linguistics/spelling/SpellUI.as b/Squiggly/main/SpellingUI/src/com/adobe/linguistics/spelling/SpellUI.as
index ae0f89a..20a229d 100644
--- a/Squiggly/main/SpellingUI/src/com/adobe/linguistics/spelling/SpellUI.as
+++ b/Squiggly/main/SpellingUI/src/com/adobe/linguistics/spelling/SpellUI.as
@@ -65,12 +65,12 @@ package com.adobe.linguistics.spelling
 	 * <p>For advanced text editing applications, more complex features are likely required.
 	 *	For those applications, we recommend bypassing this class and utilizing the <code>SpellChecker</code> class directly.</p>
 	 *
-	 * <p><code>SpellUI</code> uses the AdobeSpellingConfig.xml file to lookup corresponding resource files for a given locale.
-	 * The default location of AdobeSpellingConfig.xml is [yourapplicationDirectory]/AdobeSpellingConfig.xml. This could be customized using 
+	 * <p><code>SpellUI</code> uses the SpellingConfig.xml file to lookup corresponding resource files for a given locale.
+	 * The default location of SpellingConfig.xml is [yourapplicationDirectory]/SpellingConfig.xml. This could be customized using 
 	 * <code>spellingConfigUrl</code> property of <code>SpellUI</code>. You don't have to change the content of this file. However,
 	 * if you want to add a new language, to use an alternative dictionary or to customize the location for your dictionaries, you can modify it. 
 	 * There's an known issue with IIS web server when loading dictionary files with unknown extensions, in which case you can modify the XML to work around it.</p><p>
-	 * A sample AdobeSpellingConfig.xml will look as follows:
+	 * A sample SpellingConfig.xml will look as follows:
 	 * <listing version="3.0">
 	 * <pre class="preWrapper">
  	 * &lt;?xml version=&quot;1.0&quot; encoding='UTF-8'?&gt;
@@ -138,8 +138,8 @@ package com.adobe.linguistics.spelling
 		 *
 		 * @param comp	A text editing Flex UI component. It can be a mx <code>TextArea</code>, <code>TextInput</code> or <code>RichTextEditor</code>. 
 		 * If you are using AdobeSpellingUIEx.swc, it can also be a spark <code>TextArea</code> or <code>TextInput</code>.
-		 * @param lang	The language code used for spell checking, for example <code>en_US</code>. it will lookup the AdobeSpellingConfig.xml file to access corresponding resource files.
-		 * AdobeSpellingConfig.xml should be located at the same folder as your main mxml source file. You don't have to change the content of this file. However,
+		 * @param lang	The language code used for spell checking, for example <code>en_US</code>. it will lookup the SpellingConfig.xml file to access corresponding resource files.
+		 * SpellingConfig.xml should be located at the same folder as your main mxml source file. You don't have to change the content of this file. However,
 		 * if you want to add a new language, to use an alternative dictionary or to customize the location for your dictionaries, you can modify it. There's an known issue with
 		 * IIS web server when loading dictionary files with unknown extensions, in which case you can modify the XML to work around it.
 		 * 
@@ -209,7 +209,7 @@ package com.adobe.linguistics.spelling
 		}
 			
 		/**
-		 * The URL for the spelling config xml file. If you haven't specified it, the default URL is [applicationDirectory]/AdobeSpellingConfig.xml. Note that we don't validate the URL, if the file doesn't exist, you will get an error when calling enableSpelling() function.
+		 * The URL for the spelling config xml file. If you haven't specified it, the default URL is [applicationDirectory]/SpellingConfig.xml. Note that we don't validate the URL, if the file doesn't exist, you will get an error when calling enableSpelling() function.
 		 *
 		 * @example The following code customize the spellingConfigUrl before enabling spell checking.
 		 * <listing version="3.0">

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/730b1b5a/Squiggly/main/SpellingUIEx/src/com/adobe/linguistics/spelling/SpellUI.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingUIEx/src/com/adobe/linguistics/spelling/SpellUI.as b/Squiggly/main/SpellingUIEx/src/com/adobe/linguistics/spelling/SpellUI.as
index 69c9aab..317e05b 100644
--- a/Squiggly/main/SpellingUIEx/src/com/adobe/linguistics/spelling/SpellUI.as
+++ b/Squiggly/main/SpellingUIEx/src/com/adobe/linguistics/spelling/SpellUI.as
@@ -102,7 +102,7 @@ package com.adobe.linguistics.spelling
 		private var _spellingservice:SpellingService = null;
 
 		private static var _contextMenuEntries:Object = {enable:"Enable Spelling", disable:"Disable Spelling", add:"Add to dictionary"};		
-		private static var _spellingConfigUrl:String = "AdobeSpellingConfig.xml";
+		private static var _spellingConfigUrl:String = "SpellingConfig.xml";
 		private static var _UITable:Dictionary= new Dictionary();
 		private static var _parentTable:Dictionary= new Dictionary();
 		private static var _cacheDictTable:Dictionary= new Dictionary();
@@ -171,7 +171,7 @@ package com.adobe.linguistics.spelling
 		}
 		
 		/**
-		 * The URL for the spelling config xml file. If you haven't specify it, the default URL is [applicationDirectory]/AdobeSpellingConfig.xml. Note that we don't validate the URL, if the file doesn't exist, you will get an error when calling enableSpelling() function.
+		 * The URL for the spelling config xml file. If you haven't specify it, the default URL is [applicationDirectory]/SpellingConfig.xml. Note that we don't validate the URL, if the file doesn't exist, you will get an error when calling enableSpelling() function.
 		 *
 		 * @example The following code customize the spellingConfigUrl before enabling spell checking.
 		 * <listing version="3.0">

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/730b1b5a/Squiggly/main/SpellingUITLF/src/com/adobe/linguistics/spelling/SpellUIForTLF.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingUITLF/src/com/adobe/linguistics/spelling/SpellUIForTLF.as b/Squiggly/main/SpellingUITLF/src/com/adobe/linguistics/spelling/SpellUIForTLF.as
index 4128cd4..e2bbb60 100644
--- a/Squiggly/main/SpellingUITLF/src/com/adobe/linguistics/spelling/SpellUIForTLF.as
+++ b/Squiggly/main/SpellingUITLF/src/com/adobe/linguistics/spelling/SpellUIForTLF.as
@@ -74,12 +74,12 @@ package com.adobe.linguistics.spelling
 	 * </ul>
 	 * 
 	 * 
-	 * <p><code>SpellUIForTLF</code> uses the AdobeSpellingConfig.xml file to lookup corresponding resource files for a given locale.
-	 * The default location of AdobeSpellingConfig.xml is [yourapplicationDirectory]/AdobeSpellingConfig.xml. This could be customized using 
+	 * <p><code>SpellUIForTLF</code> uses the SpellingConfig.xml file to lookup corresponding resource files for a given locale.
+	 * The default location of SpellingConfig.xml is [yourapplicationDirectory]/SpellingConfig.xml. This could be customized using 
 	 * <code>spellingConfigUrl</code> property of <code>SpellUI</code>. You don't have to change the content of this file. However,
 	 * if you want to add a new language, to use an alternative dictionary or to customize the location for your dictionaries, you can modify it. 
 	 * There's an known issue with IIS web server when loading dictionary files with unknown extensions, in which case you can modify the XML to work around it.</p><p>
-	 * A sample AdobeSpellingConfig.xml will look as follows:
+	 * A sample SpellingConfig.xml will look as follows:
 	 * <listing version="3.0">
 	 * <pre class="preWrapper">
 	 * &lt;?xml version=&quot;1.0&quot; encoding='UTF-8'?&gt;
@@ -124,7 +124,7 @@ package com.adobe.linguistics.spelling
 		private var _spellingservice:SpellingService = null;
 
 		private static var _contextMenuEntries:Object = {enable:"Enable Spelling", disable:"Disable Spelling", add:"Add to dictionary"};		
-		private static var _spellingConfigUrl:String = "AdobeSpellingConfig.xml";
+		private static var _spellingConfigUrl:String = "SpellingConfig.xml";
 		private static var _UITable:Dictionary= new Dictionary();
 		private static var _parentTable:Dictionary= new Dictionary();
 		private static var _cacheDictTable:Dictionary= new Dictionary();
@@ -141,8 +141,8 @@ package com.adobe.linguistics.spelling
 		 * right click on a misspelled word to see the suggestions in the context menu.
 		 * 
 		 * @param comp	A TLF TextFlow object
-		 * @param lang	The language code used for spell checking, for example <code>en_US</code>. it will lookup the AdobeSpellingConfig.xml file to access corresponding resource files.
-		 * AdobeSpellingConfig.xml should located at the same folder as your main mxml source file. You don't have to change the content of this file. However,
+		 * @param lang	The language code used for spell checking, for example <code>en_US</code>. it will lookup the SpellingConfig.xml file to access corresponding resource files.
+		 * SpellingConfig.xml should located at the same folder as your main mxml source file. You don't have to change the content of this file. However,
 		 * if you want to add a new language, to use an alternative dictionary or to customize the location for your dictionaries, you can modify it. There's an known issue with
 		 * IIS web server when loading dictionary files with unknown extensions, in which case you can modify the XML to work around it.
 		 * 
@@ -207,7 +207,7 @@ package com.adobe.linguistics.spelling
 		}
 		
 		/**
-		 * The URL for the spelling config xml file. If you haven't specify it, the default URL is [applicationDirectory]/AdobeSpellingConfig.xml. Note that we don't validate the URL, if the file doesn't exist, you will get an error when calling enableSpelling() function.
+		 * The URL for the spelling config xml file. If you haven't specify it, the default URL is [applicationDirectory]/SpellingConfig.xml. Note that we don't validate the URL, if the file doesn't exist, you will get an error when calling enableSpelling() function.
 		 *
 		 * @example The following code customize the spellingConfigUrl before enabling spell checking.
 		 * <listing version="3.0">


[04/50] [abbrv] git commit: [flex-utilities] [refs/heads/master] - update release notes

Posted by jm...@apache.org.
update release notes


Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/daf98410
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/daf98410
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/daf98410

Branch: refs/heads/master
Commit: daf98410fad065bfc81dd5e8413a3afc8fb6c493
Parents: f105652
Author: Justin Mclean <jm...@apache.org>
Authored: Wed Aug 27 14:00:07 2014 +1000
Committer: Justin Mclean <jm...@apache.org>
Committed: Wed Aug 27 14:00:07 2014 +1000

----------------------------------------------------------------------
 TourDeFlex/TourDeFlex3/RELEASE_NOTES | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/daf98410/TourDeFlex/TourDeFlex3/RELEASE_NOTES
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/RELEASE_NOTES b/TourDeFlex/TourDeFlex3/RELEASE_NOTES
index 6137b71..8727ea1 100644
--- a/TourDeFlex/TourDeFlex3/RELEASE_NOTES
+++ b/TourDeFlex/TourDeFlex3/RELEASE_NOTES
@@ -10,10 +10,13 @@ Changes since the version 1.0
 - Fixed a few minor issues
 
 Bugs fixed:
+FLEX-34488 Add favicon to TourDeFlex
+FLEX-34483 Make logo links to Apache Flex web site
 FLEX-34480 If TourDeFlex is run from an untrusted location you get an error
 FLEX-34479 Change naming format of TourDeFlex
 FLEX-34474 TourDeFlex effects example bad styles and modifying default destination scaling
 
+
 ------------------------------------------------
 Apache Flex Tour De Flex Component Explorer 1.0
 ------------------------------------------------


[11/50] [abbrv] git commit: [flex-utilities] [refs/heads/master] - Look for app parameter when loading application

Posted by jm...@apache.org.
Look for app parameter when loading application


Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/02c5bdbb
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/02c5bdbb
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/02c5bdbb

Branch: refs/heads/master
Commit: 02c5bdbbc456e475a2950beaffb7c9052c4b66e8
Parents: 668810a
Author: Justin Mclean <jm...@apache.org>
Authored: Wed Aug 27 16:59:18 2014 +1000
Committer: Justin Mclean <jm...@apache.org>
Committed: Wed Aug 27 16:59:18 2014 +1000

----------------------------------------------------------------------
 TourDeFlex/TourDeFlex3/src/explorer.mxml | 66 +++++++++++++++++++++++----
 1 file changed, 57 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/02c5bdbb/TourDeFlex/TourDeFlex3/src/explorer.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/explorer.mxml b/TourDeFlex/TourDeFlex3/src/explorer.mxml
index 7a1443d..059f687 100755
--- a/TourDeFlex/TourDeFlex3/src/explorer.mxml
+++ b/TourDeFlex/TourDeFlex3/src/explorer.mxml
@@ -18,11 +18,12 @@
 
 <mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:explorer="*"
     width="100%" height="100%" pageTitle="{TITLE}"
-    initialize="init()" layout="vertical">
+    initialize="init()" creationComplete="checkParameters()" layout="vertical">
 
     <fx:Script>
         <![CDATA[
-			
+		import mx.core.FlexGlobals;
+
 		static protected const VERSION:String = "1.1";	
 		static protected const TITLE:String = "Tour De Flex Component Explorer";
 		static protected const FULL_TITLE:String = "Apache Flex™ Tour De Flex Component Explorer " + VERSION;
@@ -41,15 +42,27 @@
             compLibTree.dataProvider = explorerTree;
 			
 			noExamples = (explorerTree..node.(hasOwnProperty("@app") && @app.length() > 0)).length();
-		}			
+		}
+		
+		protected function checkParameters():void
+		{		
+			var parameters:Object = FlexGlobals.topLevelApplication.parameters;
+			
+			if (parameters.hasOwnProperty("app")) {
+				var application:String = parameters.app;
+				var source:String = explorerTree..node.(hasOwnProperty("@app") && @app == application).@src;
+				loadApp(application, source);
+				openNode(application);
+			}			
+		}
 
         private function treeChanged(event:Event):void
         {
             var nodeApp:String = compLibTree.selectedItem.@app;
+			
             if (nodeApp != null && nodeApp != "")
             {
-                swfLoader.loadApp(nodeApp + ".swf");
-                vs.loadSource(nodeApp, compLibTree.selectedItem.@src);
+				loadApp(nodeApp, compLibTree.selectedItem.@src);
             }
             else
             {
@@ -57,11 +70,46 @@
             }
         }
 			
-		private function gotoHome(event:Event):void {
+		private function loadApp(application:String, source:String):void
+		{
+			swfLoader.loadApp(application + ".swf");
+            vs.loadSource(application, source);
+		}
+			
+		private function gotoHome(event:Event):void
+		{
 			var urlRequest:URLRequest = new URLRequest("http://flex.apache.org/download-tourdeflex.html");
 			navigateToURL(urlRequest);
-		}		
-        ]]>
+		}	
+		
+		private function openNode(application:String):void
+		{
+			var node:XML = explorerTree..node.(hasOwnProperty("@app") && @app == application)[0];
+			var parent:XML;
+			var nodes:Array = [];
+			 
+			if (!node) {
+				return;
+			}
+			
+			parent = node.parent();
+			 
+			while (parent != null) {
+			    if (!compLibTree.isItemOpen(parent)) {
+			        nodes.push(parent);
+			    }
+			    parent = parent.parent();
+			}
+			 
+			for each (var expand:XML in nodes) {
+			    compLibTree.expandItem(expand, true);
+			}
+			 
+			compLibTree.selectedIndex = compLibTree.getItemIndex(node);
+			compLibTree.scrollToIndex(explorerTree.selectedIndex);
+		}
+	
+		]]>
     </fx:Script>
 
 	<fx:Declarations>
@@ -89,4 +137,4 @@
 	<mx:HBox width="100%">
 		<mx:Label fontSize="9" width="100%" text="Copyright © 2014 The Apache Software Foundation, Licensed under the Apache License, Version 2.0. Apache Flex is trademark of The Apache Software Foundation." />
 	</mx:HBox>
-</mx:Application>
+</mx:Application>
\ No newline at end of file


[03/50] [abbrv] git commit: [flex-utilities] [refs/heads/master] - add spark rich text editor example

Posted by jm...@apache.org.
add spark rich text editor example


Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/f1056520
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/f1056520
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/f1056520

Branch: refs/heads/master
Commit: f105652060a9ac0eb653f463054d9e6f966564be
Parents: 4c3cb13
Author: Justin Mclean <jm...@apache.org>
Authored: Wed Aug 27 13:59:44 2014 +1000
Committer: Justin Mclean <jm...@apache.org>
Committed: Wed Aug 27 13:59:44 2014 +1000

----------------------------------------------------------------------
 .../controls/SparkRichTextEditorExample.mxml    | 55 ++++++++++++++++++++
 1 file changed, 55 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/f1056520/TourDeFlex/TourDeFlex3/src/apache/controls/SparkRichTextEditorExample.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/apache/controls/SparkRichTextEditorExample.mxml b/TourDeFlex/TourDeFlex3/src/apache/controls/SparkRichTextEditorExample.mxml
new file mode 100644
index 0000000..64baead
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/apache/controls/SparkRichTextEditorExample.mxml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+
+-->
+<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+			   xmlns:s="library://ns.adobe.com/flex/spark"
+			   xmlns:mx="library://ns.adobe.com/flex/mx">
+	<fx:Script>
+		<![CDATA[
+			import spark.components.RichTextEditor;
+			import spark.events.TextOperationEvent;
+
+			private var rte:RichTextEditor;
+
+			protected override function createChildren():void
+			{
+				super.createChildren();
+				rte = new RichTextEditor();
+				rte.htmlText = '<b>This is great!</b><br/><font color="#FF0000">Another Line.</font>';
+				rte.addEventListener(TextOperationEvent.CHANGE, handleChange);
+				container.addElementAt(rte, 0);
+				handleChange();
+			}
+
+			private function handleChange(e:TextOperationEvent = null):void
+			{
+				richTextEditorOutput.text = rte.htmlText;
+			}
+		]]>
+	</fx:Script>	
+	<s:Panel title="Millisecond Format" width="100%" height="100%" borderAlpha="0.15">
+		<s:layout>
+			<s:VerticalLayout paddingLeft="20" paddingTop="20" gap="10" />
+		</s:layout>
+		<s:VGroup id="container" width="600" paddingBottom="10" paddingLeft="10" paddingRight="10" paddingTop="10">
+			<s:Label text="HTML Output:" fontSize="20"/>
+			<s:Label id="richTextEditorOutput" width="100%"/>
+		</s:VGroup>
+	</s:Panel>
+</s:Application>
\ No newline at end of file


[28/50] [abbrv] remove Adobe from directory names (package name still contains Adobe)

Posted by jm...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingUI/src/com/adobe/linguistics/spelling/SpellUI.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingUI/src/com/adobe/linguistics/spelling/SpellUI.as b/Squiggly/main/AdobeSpellingUI/src/com/adobe/linguistics/spelling/SpellUI.as
deleted file mode 100644
index 426ca4c..0000000
--- a/Squiggly/main/AdobeSpellingUI/src/com/adobe/linguistics/spelling/SpellUI.as
+++ /dev/null
@@ -1,562 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
- 
-package com.adobe.linguistics.spelling
-{
-	import com.adobe.linguistics.spelling.UserDictionary;
-	import com.adobe.linguistics.spelling.framework.ResourceTable;
-	import com.adobe.linguistics.spelling.framework.SpellingConfiguration;
-	import com.adobe.linguistics.spelling.framework.SpellingService;
-    import com.adobe.linguistics.spelling.ui.HaloHighlighter;
-    import com.adobe.linguistics.spelling.ui.HaloWordProcessor;
-    import com.adobe.linguistics.spelling.ui.IHighlighter;
-    import com.adobe.linguistics.spelling.ui.IWordProcessor;
-	import com.adobe.linguistics.utils.TextTokenizer;
-	import com.adobe.linguistics.utils.Token;
-	
-	import flash.events.Event;
-	import flash.events.FocusEvent;
-	import flash.geom.Point;
-	import flash.geom.Rectangle;
-	import flash.net.SharedObject;
-	import flash.net.URLLoader;
-	import flash.net.URLRequest;
-	import flash.text.TextField;
-	import flash.utils.Dictionary;
-	
-	import mx.controls.RichTextEditor;
-	import mx.controls.TextArea;
-	import mx.controls.TextInput;
-	import mx.core.UIComponent;
-	import mx.core.mx_internal;
-	import mx.events.ScrollEvent;
-	
-	use namespace mx_internal;
-	
-	/**
-	 * <p>A comprehensive convenience class that bundles a context menu UI, 
-	 * the spelling engine, the dictionary loader, and user dictionary support 
-	 * to enable a single-line integration of spell checking functionality into 
-	 * any text related Flex UI component.  While this class drastically simplifies 
-	 * the effort to enable spell checking functionality in a Flex UI component, 
-	 * it does shield the developer form controlling detailed behaviors of the spell 
-	 * checker and the user dictionary storage options. </p>
-	 *
-	 * <p>This class provides a simple UI for some standard Flex UI components.
-	 *	It is not intended to address a complete user interface.
-	 *	Instead, it presents a basic user interface for some commonly used Flex UI components.</p>
-	 *
-	 * <p>For advanced text editing applications, more complex features are likely required.
-	 *	For those applications, we recommend bypassing this class and utilizing the <code>SpellChecker</code> class directly.</p>
-	 *
-	 * <p><code>SpellUI</code> uses the AdobeSpellingConfig.xml file to lookup corresponding resource files for a given locale.
-	 * The default location of AdobeSpellingConfig.xml is [yourapplicationDirectory]/AdobeSpellingConfig.xml. This could be customized using 
-	 * <code>spellingConfigUrl</code> property of <code>SpellUI</code>. You don't have to change the content of this file. However,
-	 * if you want to add a new language, to use an alternative dictionary or to customize the location for your dictionaries, you can modify it. 
-	 * There's an known issue with IIS web server when loading dictionary files with unknown extensions, in which case you can modify the XML to work around it.</p><p>
-	 * A sample AdobeSpellingConfig.xml will look as follows:
-	 * <listing version="3.0">
-	 * <pre class="preWrapper">
- 	 * &lt;?xml version=&quot;1.0&quot; encoding='UTF-8'?&gt;
- 	 * &lt;SpellingConfig&gt;
- 	 *   	&lt;LanguageResource language=&quot;English&quot; 	  languageCode=&quot;en_US&quot; ruleFile=&quot;dictionaries/en_US/en_US.aff&quot; dictionaryFile=&quot;dictionaries/en_US/en_US.dic&quot;/&gt;
-	 *    	&lt;LanguageResource language=&quot;Spanish&quot;    languageCode=&quot;es_ES&quot; ruleFile=&quot;dictionaries/es_ES/es_ES.aff&quot; dictionaryFile=&quot;dictionaries/es_ES/es_ES.dic&quot;/&gt;
- 	 *   	&lt;LanguageResource language=&quot;Portuguese&quot; languageCode=&quot;pt_PT&quot; ruleFile=&quot;dictionaries/pt_PT/pt_PT.aff&quot; dictionaryFile=&quot;dictionaries/pt_PT/pt_PT.dic&quot;/&gt;
- 	 *  	 &lt;LanguageResource language=&quot;Italian&quot; 	  languageCode=&quot;it_IT&quot; ruleFile=&quot;dictionaries/it_IT/it_IT.aff&quot; dictionaryFile=&quot;dictionaries/it_IT/it_IT.dic&quot;/&gt;
- 	 * &lt;/SpellingConfig&gt;</pre>
-	 *
-	 * </listing>
-	 * Note: The languageCode can be an arbitrary value, as long as you are consistent when passing them to the Squiggly classes. 
-	 * However, we highly encourage you to follow the two part Unicode language identifier format. 
-	 * For more information, please consult the latest Unicode Technical Standard that can be found at: http://unicode.org/reports/tr35/.</p>
-	 * 
-	 * @playerversion Flash 10
-	 * @langversion 3.0
-	 */
-	public class SpellUI
-	{
-		private var hh:IHighlighter;
-		private var hw:IWordProcessor;
-				
-		
-		private var _checkLastWord:Boolean = true;
-		
-		private var _spellingEnabled:Boolean;
-		
-		private var _actualParent:*;
-		private var isHaloComponent:Boolean;
-
-		//New Added below
-		private var mTextField:TextField;
-				
-		private var _dictname:String = new String();	
-		
-		private var _userdict:UserDictionary = null;
-		private var _sharedobj:SharedObject = null;
-		private var scm:SpellingContextMenu;	
-		private var _newchecker:SpellChecker = null;
-		private var _resource_locale:Object = null;
-		private var _spellingservice:SpellingService = null;
-		
-		private static var _contextMenuEntries:Object = {enable:"Enable Spelling", disable:"Disable Spelling", add:"Add to dictionary"};
-		private static var _spellingConfigUrl:String = "AdobeSpellingConfig.xml";
-		
-		private static var _UITable:Dictionary= new Dictionary();
-		private static var _parentTable:Dictionary= new Dictionary();
-		private static var _cacheDictTable:Dictionary= new Dictionary();
-		
-		private static var _configXML:XML = null;
-		private static var _configXMLLoading:Boolean = false;
-		private static var _configXMLLoader:URLLoader = new URLLoader();
-		
-		
-		
-		// Work around for the memory usage problem, ideally a better fix is to provide a dicitonary unload function
-		private static var _cache:Object = new Object();
-
-		/**
-		 * Enable the spell checking feature in the specified language for a UI component. Once a component is spell checking enabled, misspelled words will be highlighted with a squiggly line. Users can 
-		 * right click on a misspelled word to see the suggestions in the context menu.
-		 * 
-		 *
-		 *
-		 * @param comp	A text editing Flex UI component. It can be a mx <code>TextArea</code>, <code>TextInput</code> or <code>RichTextEditor</code>. 
-		 * If you are using AdobeSpellingUIEx.swc, it can also be a spark <code>TextArea</code> or <code>TextInput</code>.
-		 * @param lang	The language code used for spell checking, for example <code>en_US</code>. it will lookup the AdobeSpellingConfig.xml file to access corresponding resource files.
-		 * AdobeSpellingConfig.xml should be located at the same folder as your main mxml source file. You don't have to change the content of this file. However,
-		 * if you want to add a new language, to use an alternative dictionary or to customize the location for your dictionaries, you can modify it. There's an known issue with
-		 * IIS web server when loading dictionary files with unknown extensions, in which case you can modify the XML to work around it.
-		 * 
-		 * 
-		 *
-		 * @includeExample Examples/Flex/SquigglyUIExample/src/SquigglyUIExample.mxml
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */
-		public static function enableSpelling(comp:UIComponent, lang:String):void
-		{
-			if ( lang == null ) return;
-		 	// TODO: Change dict parameter type to a SpellCheck class or a URL string.
-			var txt:* = getComponentTextModel(comp);
-			
-			if ( txt==null || _UITable[comp]!=undefined )
-				return;
-			
-			// TODO: dangerous, is garbage collection going to clear this?
-			_UITable[comp]=new SpellUI(txt, lang);
-			_parentTable[txt] = comp;
-			_cacheDictTable[comp]=lang;
-		}
-		
-		/**
-		 * Set the spelling context menu entries. This uses the flex object as an associative array for extensibility. 
-		 * <code>entries</code> should have all the customized contextMenu entries including <code>enable (spelling), 
-		 * disable (spelling) and add (to dictionary)</code>. To ensure a consistent contextMenu within your application, 
-		 * the spelling context menu entries you provide here are applied to all UI components. We recommend you use this API
-		 * with Flex resource for localization. Make sure to also have a look at the Flex localization documentation.
-		 * 
-		 * @see http://livedocs.adobe.com/flex/3/html/help.html?content=l10n_1.html 
-		 * 
-		 * @param entries A flex Ojbect that looks like <code>entries:Object = {enable:"Enable Spelling", disable:"Disable Spelling", 
-		 * add:"Add to dictionary"}</code>. If you don't customize the contextMenu, the default contextMenu in English will be used.
-		 * We recommend that you use the Flex localization resource to obtain these strings. 
-		 * @return <code>True</code> if the spelling menu is successfully customized, <code>false</code> if it fails. Possible failure 
-		 * reasons include passing the wrong object or missing some required entries. If the function fails, the contextMenu is left unchanged.
-		 * 
-		 * 
-		 * @includeExample Examples/Flex/CustomContextMenu/src/CustomContextMenu.mxml
-		 * @includeExample Examples/Flex/ContextMenuWithResource/src/ContextMenuWithResource.mxml
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */
-		public static function setSpellingMenuEntries(entries:Object):Boolean
-		{
-			if (entries.enable && entries.disable && entries.add && (entries.enable != "") && (entries.disable != "") && (entries.add != ""))
-			{
-					_contextMenuEntries = entries;
-					return true;
-			}
-			else
-				return false;
-		}
-
-		/**
-		 * Get the spelling context menu entries. 
-		 * 
-		 * @return A flex <code>Object</code> containing the spelling context menu entries. If you haven't customized the entries, you get the default associative array <code>{enable:"Enable Spelling", disable:"Disable Spelling", add:"Add to dictionary"}</code>
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */		
-		public static function getSpellingMenuEntries():Object
-		{
-			return _contextMenuEntries;
-		}
-			
-		/**
-		 * The URL for the spelling config xml file. If you haven't specified it, the default URL is [applicationDirectory]/AdobeSpellingConfig.xml. Note that we don't validate the URL, if the file doesn't exist, you will get an error when calling enableSpelling() function.
-		 *
-		 * @example The following code customize the spellingConfigUrl before enabling spell checking.
-		 * <listing version="3.0">
-		 * SpellUI.spellingConfigUrl = "./config/MySpellingConfig.xml";
-		 * SpellUI.enableSpelling(textArea, "es_ES");
-		 * </listing>
-		 */
-		public static function get spellingConfigURL():String
-		{
-			return _spellingConfigUrl;
-		}
-		
-		public static function set spellingConfigURL(url:String):void
-		{
-			if (url == null) throw new Error("URL can't be null");
-			_spellingConfigUrl = url;
-		}
-		
-
-			
-		/**
-		 * Disable the spell checking feature for a UI component.
-		 * 
-		 * @param comp	A text editing Flex UI component.
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */
-		public static function disableSpelling(comp:UIComponent):void{
-			if ( _UITable[comp] == undefined )
-				return;
-			var _ui:SpellUI = _UITable[comp];
-			if ( _ui != null) _ui.cleanUp();
-			var dictName:String = _cacheDictTable[comp];
-			var cleanUPDictionaryCount:int = 0;
-			for each ( var _dictName:String in _cacheDictTable ) {
-				if ( _dictName == dictName  )
-					cleanUPDictionaryCount++;
-			}
-			if ( cleanUPDictionaryCount == 1 ) {
-				_cache[dictName] = undefined;
-			}
-			delete _UITable[comp];
-			delete _cacheDictTable[comp];
-			
-		}
-		
-		/**
-		 @private
-		 (This property is for Squiggly Developer use only.)
-		 */
-		public static function get UITable():Dictionary {
-			return _UITable;
-		}
-		
-		/**
-		 @private
-		 (This property is for Squiggly Developer use only.)
-		 */
-		public function set spellingEnabled(value:Boolean):void {
-			_spellingEnabled = value;
-		}
-		
-		/**
-		 @private
-		 (This property is for Squiggly Developer use only.)
-		 */
-		public static function get parentComp():Dictionary {
-			return _parentTable;
-		}
-		
-		private static function getComponentTextModel(comp:UIComponent):* {
-			var txt:TextField = null;
-			if ( (comp == null) || !( (comp is TextArea) || (comp is TextInput) || (comp is RichTextEditor) ) )
-				return null;
-			if ((comp as RichTextEditor) != null) {
-				txt = (comp as RichTextEditor).textArea.getTextField() as TextField;
-			}
-			else if ((comp as TextArea) != null){
-				txt = (comp as TextArea).getTextField() as TextField;
-			}
-			else if ((comp as TextInput) != null) {
-				txt = (comp as TextInput).getTextField() as TextField;
-			}
-			else {
-				// do nothing if it's not a valid text component
-				return null;
-			}
-			return txt;
-		}
-		
-		/**
-		 * Constructs a SpellUI object.
-		 *	@private
-		 *
-		 *	@param	textFiled	A Flex UI component to include spell-check capability
-		 * 	@param lang	The language code used for spell checking
-		 *
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */			
-		public function SpellUI(textModel:*, lang:String)
-		{		
-			// TODO: Consider making this method invisible to user, only expose the static function.
-			if ( textModel is TextField ) {
-				isHaloComponent=true;
-			}else {
-				// do nothing, we only accept textField and TextFlow here....
-				return;
-			}
-			_actualParent = textModel;
-			
-			//New Added below -- check if text field needs to be extracted from textModel
-			mTextField = textModel;
-						
-			mTextField.addEventListener(FocusEvent.FOCUS_OUT, handleFocusOut);
-			mTextField.addEventListener(ScrollEvent.SCROLL, spellCheckScreen);
-			mTextField.parent.addEventListener(Event.RENDER, spellCheckScreen);
-			mTextField.parent.addEventListener(Event.CHANGE, handleChangeEvent);
-			_dictname = lang;			
-			loadConfig();
-			
-		}
-		
-		private function spellCheckScreen(event:Event):void
-		{
-			doSpellingJob();
-		}
-		
-		private function handleFocusOut(event:FocusEvent):void
-		{
-			_checkLastWord = true;
-			doSpellingJob();
-		}
-		
-		private function handleChangeEvent( event:Event ) :void {
-			_checkLastWord = false;
-			doSpellingJob();
-		}
-				
-		/*private function doSpelling():void
-		{
-			_checkLastWord = true;
-			doSpellingJob();
-		}*/
-		
-		/**
-		 @private
-		 (This property is for Squiggly Developer use only.)
-		 */		
-		public function doSpellingJob():void
-		{
-			if (_spellingEnabled == false) return;
-			spellCheckRange(getValidFirstWordIndex(), getValidLastWordIndex());
-		}
-		
-		private function spellCheckRange(start:uint, end:uint):void {
-			//hh.preSpellCheckRange(start, end);
-			hh.clearSquiggles();
-			
-			//if (end <= start) return;
-			var firstLine:int = mTextField.getLineIndexOfChar(start);
-			var rect:Rectangle = mTextField.getCharBoundaries(start);
-			var counter:uint = start;
-			var numLines:Number = 0;
-			
-			/* mTextField.getCharBoundaries returns null for blank lines and for end of line characters. Placing this workaround
-			to count line heights until a non-null bounding rectangle is found */
-			
-			while (rect == null) {
-				if (counter+1 > end) {
-						rect = new Rectangle(0,0,0,0);
-						break;
-					}				
-				if(mTextField.text.charCodeAt(counter)<0x0300 || mTextField.text.charCodeAt(counter)>0x036F)//not in diacritic combining range
-				{
-					numLines += mTextField.getLineMetrics(firstLine).height;
-					firstLine++;
-				}
-				counter++;
-				rect = mTextField.getCharBoundaries(counter);
-			}
-			
-			var yoffset:Number = rect.y - numLines;	
-			var pleft:uint = (mTextField.parent as UIComponent).getStyle("paddingLeft");
-			var ptop:uint = (mTextField.parent as UIComponent).getStyle("paddingTop");
-			
-			var offsetPoint:Point = new Point(pleft, ptop-yoffset); 
-						
-			var tokenizer:TextTokenizer = new TextTokenizer(mTextField.text.substring(start,end));
-			//var seps:Vector.<int> = new Vector.<int>();
-			//seps.push(new int(34));
-			//tokenizer.ignoredSeperators = seps;
-			var tokens:Vector.<Token> = new Vector.<Token>();
-			
-			hh.offsetPoint = offsetPoint;
-			
-			for ( var token:Token = tokenizer.getFirstToken(); token != tokenizer.getLastToken(); token= tokenizer.getNextToken(token) ) {
-				var result:Boolean=_spellingservice.checkWord(mTextField.text.substring(token.first+start, token.last+start));					
-				if (!result){
-					if (_checkLastWord || (token.last+start != mTextField.text.length)) 
-						//hh.highlightWord(token.first+start, token.last+start-1);
-						//tokens.push(new Token(token.first+start, token.last+start-1));
-						hh.drawSquiggleAt(new Token(token.first+start, token.last+start-1));
-				}
-				
-			}
-			//hh.postSpellCheckRange(start, end);
-			//hh.offsetPoint = offsetPoint;
-			//hh.drawSquiggles(tokens);
-		}
-		
-		
-		private function getValidFirstWordIndex():int{
-			return mTextField.getLineOffset(mTextField.scrollV-1);
-		}
-		
-		private function getValidLastWordIndex():int{
-			return mTextField.getLineOffset(mTextField.bottomScrollV-1)+mTextField.getLineLength(mTextField.bottomScrollV-1);
-		}
-
-		private function loadConfig():void{
-			_resource_locale = SpellingConfiguration.resourceTable.getResource(_dictname);
-			
-			if ((_resource_locale != null) || (SpellUI._configXML != null)) 
-				loadConfigComplete(null);
-			else {	
-				SpellUI._configXMLLoader.addEventListener(Event.COMPLETE, loadConfigComplete);
-			
-				if (SpellUI._configXMLLoading == false)
-				{
-					SpellUI._configXMLLoader.load(new URLRequest(_spellingConfigUrl));
-					SpellUI._configXMLLoading = true;
-				}
-			}
-		}
-		
-		private function loadConfigComplete(evt:Event):void{
-			if (_resource_locale == null) {
-				if (SpellUI._configXML == null)
-					SpellUI._configXML= new XML(evt.target.data);
-			
-				SpellingConfiguration.resourceTable.setResource(_dictname,{rule:SpellUI._configXML.LanguageResource.(@languageCode==_dictname).@ruleFile, 
-																		dict:SpellUI._configXML.LanguageResource.(@languageCode==_dictname).@dictionaryFile});
-			}
-			//New Added
-			_spellingservice = new SpellingService(_dictname);
-			_spellingservice.addEventListener(Event.COMPLETE, loadDictComplete);
-			_spellingservice.init();
-		}
-		
-
-		
-		
-		private function loadDictComplete(evt:Event):void
-		{					
-			
-			
-			// Lazy loading the UD only when the main dict is loaded successfully
-			if ((SpellUI._cache["Squiggly_UD"] as UserDictionary) == null)
-			{
-				_sharedobj = SharedObject.getLocal("Squiggly_v03");
-				var vec:Vector.<String> = new Vector.<String>();
-				if (_sharedobj.data.ud) {
-					for each (var w:String in _sharedobj.data.ud)
-						vec.push(w);
-				}
-				_userdict = new UserDictionary(vec);
-				
-				SpellUI._cache["Squiggly_SO"] = _sharedobj;
-				SpellUI._cache["Squiggly_UD"] = _userdict;
-			}
-			else 
-			{
-				_sharedobj = SpellUI._cache["Squiggly_SO"];
-				_userdict = SpellUI._cache["Squiggly_UD"];
-			}
-			_spellingservice.addUserDictionary(_userdict);
-			//Adding default behaviour to accomodate ignoring of abbreviations bug#2756840
-			_spellingservice.ignoreWordWithAllUpperCase=true;
-			
-			
-			// Add the context menu, this might be not successful
-			scm = null;
-			try {
-				addContextMenu(null);
-			}
-			catch (err:Error)
-			{
-				// TODO: error handling here
-			}
-			_actualParent.addEventListener(Event.ADDED_TO_STAGE, addContextMenu);
-		}
-		
-
-		private function addContextMenu(event:Event):void
-		{
-			if ( scm != null ) return;
-			if ( isHaloComponent ) {
-				hh= new HaloHighlighter( _actualParent);
-				hw= new HaloWordProcessor( _actualParent);
-			}else {
-				trace("error now, later will be true");
-			}
-		
-			scm =  new SpellingContextMenu(hh, hw, _spellingservice, _actualParent, _actualParent.contextMenu); 
-			scm.setIgnoreWordCallback( addWordToUserDictionary );
-			
-			// Halo need this
-			if (_actualParent.contextMenu == null)
-			{
-				_actualParent.contextMenu = scm.contextMenu;
-			}
-			
-			//hh.spellingEnabled=true;
-			_spellingEnabled = true;
-			try {
-				doSpellingJob();
-			}
-			catch (err:Error)
-			{
-				// If it fails here, it should later triggered by the render event, so no need to do anything
-			}
-			
-			
-		}
-		
-		private function addWordToUserDictionary(word:String):void
-		{
-			_userdict.addWord(word);
-			
-			// TODO: serialization here might affect ther performance
-			_sharedobj.data.ud = _userdict.wordList;
-			
-		}
-		/**
-		 *	@private
-		 */
-		private function cleanUp():void {
-			hh.clearSquiggles();
-			scm.cleanUp();
-			_actualParent.removeEventListener(Event.ADDED_TO_STAGE, addContextMenu);
-			
-			mTextField.removeEventListener(ScrollEvent.SCROLL, spellCheckScreen);
-			mTextField.parent.removeEventListener(Event.RENDER, spellCheckScreen);
-			mTextField.parent.removeEventListener(Event.CHANGE, handleChangeEvent);
-			mTextField.removeEventListener(FocusEvent.FOCUS_OUT, handleFocusOut);	
-		}
-		
-	}
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingUI/src/com/adobe/linguistics/spelling/SpellingContextMenu.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingUI/src/com/adobe/linguistics/spelling/SpellingContextMenu.as b/Squiggly/main/AdobeSpellingUI/src/com/adobe/linguistics/spelling/SpellingContextMenu.as
deleted file mode 100644
index d84f325..0000000
--- a/Squiggly/main/AdobeSpellingUI/src/com/adobe/linguistics/spelling/SpellingContextMenu.as
+++ /dev/null
@@ -1,243 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-package com.adobe.linguistics.spelling
-{
-	import com.adobe.linguistics.spelling.framework.SpellingService;
-	import com.adobe.linguistics.utils.Token;
-	import com.adobe.linguistics.utils.TextTokenizer;
-	
-	import flash.events.ContextMenuEvent;
-	import flash.events.Event;
-	import flash.events.EventDispatcher;
-	
-	import flash.ui.ContextMenu;
-	import flash.ui.ContextMenuItem;
-	
-	import flash.text.TextField;
-	import mx.core.UIComponent;
-	
-	import flash.geom.Point;
-	import flash.geom.Rectangle;
-	import com.adobe.linguistics.spelling.ui.IHighlighter;
-	import com.adobe.linguistics.spelling.ui.IWordProcessor;
-	
-	public class SpellingContextMenu
-	{
-		private var disableMenuItem:ContextMenuItem = new ContextMenuItem("Disable spell checking",true);
-		private var enableMenuItem:ContextMenuItem = new ContextMenuItem("Enable spell checking");
-		private var controlMenuItemList:Array = new Array();
-		private var suggestionMenuItemList:Array = new Array();
-		private var _spellingEnabled:Boolean;
-		private var _contextMenu:ContextMenu;
-		private var mTextHighlighter:IHighlighter;
-		private var mWordProcessor:IWordProcessor;
-		private var mSpellEngine:SpellingService;
-		private var mParentTextField:TextField;
-		private var _ignoreWordFunctionProcessor:Function;
-		private var _misspelledToken:Token;
-		private var _misspelled:String;
-		public function SpellingContextMenu(textHighlighter:IHighlighter, wordProcessor:IWordProcessor, engine:SpellingService, actualParent:*, contextMenu:ContextMenu=null)
-		{
-			
-			if ( textHighlighter == null || wordProcessor == null ||  engine == null) throw new Error("illegal argument."); 
-			mTextHighlighter = textHighlighter;
-			mWordProcessor = wordProcessor;
-			mSpellEngine = engine;
-			mParentTextField = actualParent;
-			if (contextMenu != null) {
-				_contextMenu =contextMenu;
-			}else {
-				_contextMenu = new ContextMenu();
-			}
-			enableMenuItem.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, handleEnableSpellCheck);
-			disableMenuItem.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, handleDisableSpellCheck);
-			controlMenuItemList.push(enableMenuItem);
-			controlMenuItemList.push(disableMenuItem);
-			
-			_contextMenu.customItems.push(disableMenuItem);
-			_contextMenu.customItems.push(enableMenuItem);
-			spellingEnabled = true; //default value
-			//spellingEnabled= mTextHighlighter.spellingEnabled;
-			_contextMenu.addEventListener(ContextMenuEvent.MENU_SELECT, handleContextMenuSelect);
-			_ignoreWordFunctionProcessor=null;
-		}
-		
-		public function cleanUp():void
-		{
-			mTextHighlighter=null;
-			mWordProcessor=null;
-			spellingEnabled = false;
-			_ignoreWordFunctionProcessor=null;
-			
-			_contextMenu.removeEventListener(ContextMenuEvent.MENU_SELECT, handleContextMenuSelect);
-			
-			var removedNum:int = 0;
-			var count:uint = _contextMenu.customItems.length;
-			for (var j:uint=count; j>0; j--) {
-				if ( isWordItem(_contextMenu.customItems[j-1]) || isControlItem(_contextMenu.customItems[j-1]) ) {
-					_contextMenu.customItems.splice(j-1,1);
-					removedNum++
-				}
-			}
-			if ( removedNum != suggestionMenuItemList.length + controlMenuItemList.length ) {
-				trace("internal error");
-			}
-			
-			suggestionMenuItemList = null;
-			controlMenuItemList = null;
-		}
-		
-		public function get contextMenu():ContextMenu {
-			return this._contextMenu;
-		}
-
-		private function handleContextMenuSelect(event:ContextMenuEvent):void
-		{
-			/* Clear the context menu */
-			//spellingEnabled= mTextHighlighter.spellingEnabled;
-			//SpellUI.doSpelling1();
-			var removedNum:int = 0;
-			var count:uint = _contextMenu.customItems.length;
-			for (var j:uint=count; j>0; j--) {
-				if ( isWordItem(_contextMenu.customItems[j-1]) ) {
-					_contextMenu.customItems.splice(j-1,1);
-					removedNum++
-				}
-			}
-			if ( removedNum != suggestionMenuItemList.length ) {
-				trace("internal error");
-			}
-			
-			
-			suggestionMenuItemList = new Array();
-	
-			// localized entries
-			var entries:Object = SpellUI.getSpellingMenuEntries();
-			disableMenuItem.caption = entries.disable;
-			enableMenuItem.caption = entries.enable;				
-
-			if (spellingEnabled == true) {
-				_misspelledToken = mWordProcessor.getWordAtPoint(mParentTextField.mouseX, mParentTextField.mouseY);
-				if (_misspelledToken==null) return;
-				_misspelled = 	mParentTextField.text.substring(_misspelledToken.first, _misspelledToken.last);
-				if ((_misspelled==null) || (_misspelled == "")) return;
-				
-				if (mSpellEngine.checkWord(_misspelled)==true) return;				
-				
-				var suseAddToItem:ContextMenuItem = new ContextMenuItem(entries.add);
-				suseAddToItem.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, handleAddToItemSelect);
-				suggestionMenuItemList.push(suseAddToItem);
-				_contextMenu.customItems.splice(0,0,suseAddToItem);	
-				//var result:Array = mWordProcessor.getSuggestionsAtPoint();
-				var resultVector:Vector.<String> = mSpellEngine.getSuggestions(_misspelled);
-				var result:Array = new Array();
-				if (resultVector) {
-					for each (var w:String in resultVector)
-					result.push(w);
-				}
-				if (result!=null) {
-					for (var i:int=result.length-1;i>=0;i-- ) {
-						var suseMenuItem:ContextMenuItem = new ContextMenuItem(result[i]);
-						suseMenuItem.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, handleSuseItemSelect);
-						suggestionMenuItemList.push(suseMenuItem);
-						//_contextMenu.customItems.push(suseMenuItem);
-						_contextMenu.customItems.splice(0,0,suseMenuItem);
-					}
-				}
-			}
-			
-
-			
-		}
-		
-		public function setIgnoreWordCallback(func:Function ) :void {
-			if ( func != null )
-			_ignoreWordFunctionProcessor = func;
-		}
-		
-		private function handleAddToItemSelect(event:ContextMenuEvent):void
-		{
-			if ( _ignoreWordFunctionProcessor == null ) return;
-			
-			/*
-			var menuEntry:String = (event.currentTarget as ContextMenuItem).caption;
-			var start:uint = 5;
-			var end:uint = menuEntry.length - 15;
-			var word:String = menuEntry.substring(start, end);
-			*/
-			_ignoreWordFunctionProcessor(_misspelled);
-			//SpellUI.UITable[SpellUI.parentComp[mParentTextField]].doSpellingJob();//Reason bug#2713972 Fix Added Under
-			//now implicitly calling dospelling on all text areas
-			for each (var tempUIComponent:SpellUI in SpellUI.UITable)
-			{
-				tempUIComponent.doSpellingJob();
-			}
-		}
-
-		private function isWordItem(item:ContextMenuItem):Boolean {
-			
-			for ( var i:int=0; i<suggestionMenuItemList.length; ++i ) {
-				if ( suggestionMenuItemList[i] == item ) return true;
-			}
-			return false;
-		}
-		
-		private function isControlItem(item:ContextMenuItem):Boolean {
-			for (var i:int=0; i<controlMenuItemList.length; ++i) {
-				if ( controlMenuItemList[i] == item) return true;
-			}
-			return false;
-		}
-
-		private function handleSuseItemSelect(event:ContextMenuEvent):void
-		{
-			mWordProcessor.replaceText(_misspelledToken, (event.currentTarget as ContextMenuItem).caption );
-			SpellUI.UITable[SpellUI.parentComp[mParentTextField]].doSpellingJob();
-		}
-
-		
-		private function set spellingEnabled(value:Boolean) :void {
-			_spellingEnabled = value;
-			disableMenuItem.visible=spellingEnabled;
-			enableMenuItem.visible=!spellingEnabled;
-		}
-		private function get spellingEnabled():Boolean {
-			return this._spellingEnabled;
-		}
-		private function handleEnableSpellCheck(event:ContextMenuEvent):void
-		{
-			spellingEnabled= true;
-			//mTextHighlighter.spellingEnabled= spellingEnabled;
-			//SpellUI.doSpellingJob();
-			//dispatchEvent(new Event(Event.RENDER));
-			
-			SpellUI.UITable[SpellUI.parentComp[mParentTextField]].spellingEnabled = spellingEnabled;
-			SpellUI.UITable[SpellUI.parentComp[mParentTextField]].doSpellingJob();
-			//spellCheckRange(getValidFirstWordIndex(), getValidLastWordIndex());
-		}
-		private function handleDisableSpellCheck(event:ContextMenuEvent):void
-		{
-			spellingEnabled= false;
-			SpellUI.UITable[SpellUI.parentComp[mParentTextField]].spellingEnabled = spellingEnabled;
-			mTextHighlighter.clearSquiggles();
-		}
-				
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingUI/src/com/adobe/linguistics/spelling/ui/HaloHighlighter.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingUI/src/com/adobe/linguistics/spelling/ui/HaloHighlighter.as b/Squiggly/main/AdobeSpellingUI/src/com/adobe/linguistics/spelling/ui/HaloHighlighter.as
deleted file mode 100644
index 91b0d5f..0000000
--- a/Squiggly/main/AdobeSpellingUI/src/com/adobe/linguistics/spelling/ui/HaloHighlighter.as
+++ /dev/null
@@ -1,126 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-package com.adobe.linguistics.spelling.ui
-{
-	import __AS3__.vec.Vector;
-	
-	import com.adobe.linguistics.utils.Token;
-	
-	import flash.geom.Point;
-	import flash.text.TextField;
-	
-	import mx.core.IUITextField;
-	import com.adobe.linguistics.spelling.ui.IHighlighter;
-	import com.adobe.linguistics.spelling.ui.SpellingHighlighter;
-
-	/**
-	 * <p>This class facilitates drawing of squiggly lines below words for TextField class. TextField class is used to create display objects for text display 
-	 * and input for Halo TextArea and TextInput components. HaloHighlighter could therefore be used for drawing squiggly lines in these Halo components.</p>
-	 * 	
-	 * @playerversion Flash 10
-	 * @langversion 3.0
-	 */
-
-	public class HaloHighlighter implements IHighlighter
-	{
-		private var mTextField:TextField;
-		private var mHighlighter:SpellingHighlighter;
-		/*
-		* offset point:
-		*/
-		private var _offsetPoint:Point;
-
-		/**
-		 * The constructor for HaloHighlighter.
-		 * @param textField <code>TextField</code> in which to enable highlighting.		 
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */
-		public function HaloHighlighter( textField:TextField )
-		{
-			if (textField == null ) throw new Error("illegal argument."); 
-			mTextField = textField;
-			mHighlighter = null;
-			this._offsetPoint = new Point(0,0);
-		}
-		/**
-		 * Draw squiggly lines below a given token.
-		 * @param token <code>Token</code> information of the word to be highlighted.		 
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */
-		public function drawSquiggleAt(token:Token):void
-		{
-			squiggleWord(token);
-		}
-		
-		/**
-		 * Clear all squiggly lines in the TextField.		
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */
-		public function clearSquiggles():void
-		{
-			if (mHighlighter) {
-				mTextField.parent.removeChild(mHighlighter);
-				mHighlighter=null;
-			}
-			
-		}
-		
-		/**
-		 * Set offset point information for scrollable controls. This is used by the highlighter to move 
-		 * the squiggly lines as the text scrolls inside the control.	
-		 * @param op offset information as a <code>Point</code> instance.		 
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */		
-		public function set offsetPoint(op:Point):void{
-			_offsetPoint = op;
-		}
-		
-		/**
-		 * Get offset point information for scrollable controls. This is used by the highlighter to move 
-		 * the squiggly lines as the text scrolls inside the control.	
-		 * @param op offset information as a <code>Point</code> instance.		 
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */		
-		public function get offsetPoint():Point{
-			return _offsetPoint;
-		}
-		
-
-		private function squiggleWord(token:Token):void {
-						
-			if (!mHighlighter) {
-				mHighlighter= new SpellingHighlighter( mTextField as IUITextField);
-				mTextField.parent.addChild(mHighlighter);				
-			}
-						
-			mHighlighter.drawSquigglyLine(token.first, token.last);
-		
-		
-			//mTextField.parent.addChild(mHighlighter);	
-			mHighlighter.move(_offsetPoint.x, _offsetPoint.y);
-		}
-
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingUI/src/com/adobe/linguistics/spelling/ui/HaloWordProcessor.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingUI/src/com/adobe/linguistics/spelling/ui/HaloWordProcessor.as b/Squiggly/main/AdobeSpellingUI/src/com/adobe/linguistics/spelling/ui/HaloWordProcessor.as
deleted file mode 100644
index 9c05b3b..0000000
--- a/Squiggly/main/AdobeSpellingUI/src/com/adobe/linguistics/spelling/ui/HaloWordProcessor.as
+++ /dev/null
@@ -1,112 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-package com.adobe.linguistics.spelling.ui
-{
-	import com.adobe.linguistics.utils.ITokenizer;
-	import com.adobe.linguistics.utils.TextTokenizer;
-	import com.adobe.linguistics.utils.Token;
-	
-	import flash.text.TextField;
-	import flash.text.TextFormat;
-	
-	import mx.controls.TextArea;
-	import mx.controls.TextInput;
-	import com.adobe.linguistics.spelling.ui.IWordProcessor;
-
-
-	public class HaloWordProcessor implements IWordProcessor
-	{
-		private var mTextField:TextField;
-
-		public function HaloWordProcessor(textField:TextField)
-		{
-			if (textField == null ) throw new Error("illegal argument."); 
-			mTextField = textField;
-		}
-				
-		
-		public function replaceText(token:Token, replacement:String):void {
-			var startIndex:int = token.first;
-			var endIndex:int = token.last;
-			
-			if ( replacement == null ) return;
-			
-			if (mTextField.text.length<endIndex || startIndex<0) {
-				return;
-			}
-			
-			var _misspellStart:int = startIndex;
-			var _misspellEnd:int = endIndex;
-			// Try to preserve the format, this works if the whole misspelled word is the same format
-			var tf:TextFormat = mTextField.getTextFormat(_misspellStart, _misspellEnd);
-			mTextField.replaceText(_misspellStart, _misspellEnd, replacement);	
-			mTextField.setTextFormat(tf, _misspellStart, _misspellStart+replacement.length);
-			
-			var ta:TextArea = mTextField.parent as TextArea;
-			var ti:TextInput = mTextField.parent as TextInput;
-			
-			if (ta != null) {
-				ta.selectionBeginIndex = _misspellStart + replacement.length;
-				ta.selectionEndIndex = _misspellStart + replacement.length;
-			}
-			else if (ti != null) {
-				ti.selectionBeginIndex = _misspellStart + replacement.length;
-				ti.selectionEndIndex = _misspellStart + replacement.length;				
-			}
-			else {
-				// Do nothing if it's not a valid text component
-			}
-		}
-
-		
-		public function getWordAtPoint(x:uint, y:uint, externalTokenizer:ITokenizer=null):Token
-		{
-			var _token:Token = tryGetWordAtPoint(x,y, externalTokenizer);
-			return _token;
-		}
-		
-		private function tryGetWordAtPoint(x:uint, y:uint, externalTokenizer:ITokenizer=null):Token {
-			// TODO: use a better alternative than _misspellStart, end
-			var index:uint = mTextField.getCharIndexAtPoint(x + mTextField.scrollH, y);
-			if (index >= mTextField.text.length) return null;
-
-			var tmpToken:Token = new Token(index,index);
-			var tokenizer:ITokenizer;
-			if ( externalTokenizer == null ) {
-				tokenizer = new TextTokenizer(mTextField.text);	
-			}else {
-				tokenizer = externalTokenizer;
-			}
-			
-			var result:Token = new Token(0,0);
-			
-			var preToken:Token = tokenizer.getPreviousToken(tmpToken);
-			var nextToken:Token = tokenizer.getNextToken(tmpToken);
-			if ( preToken.last == nextToken.first ) {
-				result.first = preToken.first;
-				result.last = nextToken.last;
-				return result;		
-			}else {
-				return null;
-			}
-		}
-
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingUI/src/com/adobe/linguistics/spelling/ui/IHighlighter.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingUI/src/com/adobe/linguistics/spelling/ui/IHighlighter.as b/Squiggly/main/AdobeSpellingUI/src/com/adobe/linguistics/spelling/ui/IHighlighter.as
deleted file mode 100644
index 3b5a309..0000000
--- a/Squiggly/main/AdobeSpellingUI/src/com/adobe/linguistics/spelling/ui/IHighlighter.as
+++ /dev/null
@@ -1,67 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-package com.adobe.linguistics.spelling.ui
-{
-	import com.adobe.linguistics.utils.Token;
-	import __AS3__.vec.Vector;
-	import flash.geom.Point;
-	
-	/**
-	 * The <code>IHighlighter</code> Interface.
-	 * This interface defines default methods which will be used for highlighting text in UI components.
-	 *
-	 * @playerversion Flash 10
-	 * @langversion 3.0
-	 */
-	
-	public interface IHighlighter
-	{
-		/**
-		 * Draw squiggly lines below a given token.
-		 * @param token <code>Token</code> information of the word to be highlighted.		 
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */
-		function drawSquiggleAt(token:Token):void;
-		/**
-		 * Clear all squiggly lines in the UI.		
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */
-		function clearSquiggles():void;
-		/**
-		 * Set offset point information for scrollable controls. This is used by the highlighter to move 
-		 * the squiggly lines as the text scrolls inside the control.	
-		 * @param op offset information as a <code>Point</code> instance.		 
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */		
-		function set offsetPoint(op:Point):void;
-		/**
-		 * Get offset point information for scrollable controls. This is used by the highlighter to move 
-		 * the squiggly lines as the text scrolls inside the control.	
-		 * @param op offset information as a <code>Point</code> instance.		 
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */		
-		function get offsetPoint():Point;
-		
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingUI/src/com/adobe/linguistics/spelling/ui/IWordProcessor.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingUI/src/com/adobe/linguistics/spelling/ui/IWordProcessor.as b/Squiggly/main/AdobeSpellingUI/src/com/adobe/linguistics/spelling/ui/IWordProcessor.as
deleted file mode 100644
index 8196691..0000000
--- a/Squiggly/main/AdobeSpellingUI/src/com/adobe/linguistics/spelling/ui/IWordProcessor.as
+++ /dev/null
@@ -1,30 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-package com.adobe.linguistics.spelling.ui
-{
-	import com.adobe.linguistics.utils.ITokenizer;
-	import com.adobe.linguistics.utils.Token;
-	
-	public interface IWordProcessor
-	{
-		function getWordAtPoint(x:uint, y:uint, externalTokenizer:ITokenizer=null):Token;
-		function replaceText(token:Token, replacement:String):void;
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingUI/src/com/adobe/linguistics/spelling/ui/SparkHighlighter.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingUI/src/com/adobe/linguistics/spelling/ui/SparkHighlighter.as b/Squiggly/main/AdobeSpellingUI/src/com/adobe/linguistics/spelling/ui/SparkHighlighter.as
deleted file mode 100644
index ffe9653..0000000
--- a/Squiggly/main/AdobeSpellingUI/src/com/adobe/linguistics/spelling/ui/SparkHighlighter.as
+++ /dev/null
@@ -1,229 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-package com.adobe.linguistics.spelling.ui
-{
-	import com.adobe.linguistics.utils.Token;
-	import com.adobe.linguistics.utils.TextTokenizer;
-	import flash.geom.Point;
-	
-	import flash.display.Shape;
-	import flash.geom.Rectangle;
-	import flash.text.engine.TextLine;
-	
-	import flashx.textLayout.compose.TextFlowLine;
-	import flashx.textLayout.edit.SelectionManager;
-	import flashx.textLayout.elements.TextFlow;
-	import flashx.textLayout.tlf_internal;
-	
-	import spark.components.RichEditableText;
-	import com.adobe.linguistics.spelling.ui.IHighlighter;
-
-	use namespace tlf_internal;	
-	
-	/**
-	 * <p>This class facilitates drawing of squiggly lines below words for RichEditableText class. RichEditableText is a low-level UIComponent for displaying, 
-	 * scrolling, selecting, and editing richly-formatted text. This class is used in the skins of the Spark versions of TextInput and TextArea. 
-	 * SparkHighlighter could therefore be used for drawing squiggly lines in these Spark components.</p>
-	 * 	
-	 * @playerversion Flash 10
-	 * @langversion 3.0
-	 */
-	public class SparkHighlighter implements IHighlighter
-	{
-		
-		private var mTextField:RichEditableText;
-		private var mHighlighter:Shape;
-		/*
-		* offset point:
-		*/
-		private var _offsetPoint:Point;
-
-		/**
-		 * The constructor for SparkHighlighter.
-		 * @param richEditableText <code>RichEditableText</code> in which to enable highlighting.		 
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */
-		public function SparkHighlighter( richEditableText:RichEditableText )
-		{
-			if (richEditableText == null ) throw new Error("illegal argument."); 
-			mTextField = richEditableText;
-			mHighlighter = null;
-			this._offsetPoint = new Point(0,0);
-		}
-
-		/**
-		 * Draw squiggly lines below a given token.
-		 * @param token <code>Token</code> information of the word to be highlighted.		 
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */
-		public function drawSquiggleAt(token:Token):void
-		{
-			squiggleWord(token);
-		}
-		
-		/**
-		 * Clear all squiggly lines in the component.		
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */
-		public function clearSquiggles():void
-		{
-			if (mHighlighter) {
-				mTextField.removeChild(mHighlighter);
-				mHighlighter=null;
-			}		
-		}
-		
-		/**
-		 * Set offset point information for scrollable controls. This is used by the highlighter to move 
-		 * the squiggly lines as the text scrolls inside the control.	
-		 * @param op offset information as a <code>Point</code> instance.		 
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */		
-		public function set offsetPoint(op:Point):void{
-			_offsetPoint = op;
-		}
-		
-		/**
-		 * Get offset point information for scrollable controls. This is used by the highlighter to move 
-		 * the squiggly lines as the text scrolls inside the control.	
-		 * @param op offset information as a <code>Point</code> instance.		 
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */		
-		public function get offsetPoint():Point{
-			return _offsetPoint;
-		}
-
-		
-
-		// TODO: refactor this code to share with halo components, and support words that cross lines
-		private function squiggleWord(token:Token):void {
-					
-			var ta:RichEditableText = mTextField;
-			if (!ta) return;		
-			
-			if (!mHighlighter) {
-				mHighlighter= new Shape();
-				mHighlighter.graphics.clear();
-				mTextField.addChild(mHighlighter);	
-			}
-				
-		        drawSquigglyLineForRange(token.first, token.last);
-			
-			// Just adjust the left padding, top padding is not an issue 
-			//var pleft:uint = mTextField.getStyle("paddingLeft");
-			//mHighlighter.x += pleft;		
-		}
-		
-		// Draw squiggly line
-		private function drawSquigglyLineForRange(start:Number, end:Number):void
-		{
-			// draw squiggly line
-			var tf:TextFlow = mTextField.textFlow;
-			var tflFirst:TextFlowLine = tf.flowComposer.findLineAtPosition(start);
-			var tflLast:TextFlowLine = tf.flowComposer.findLineAtPosition(end);
-			var tflIndexFirst:int = tf.flowComposer.findLineIndexAtPosition(start);
-			var tflIndexLast:int = tf.flowComposer.findLineIndexAtPosition(end);
-			
-			// Pointer
-			var tflIndex:int = tflIndexFirst;
-			var tfl:TextFlowLine = tflFirst;
-			
-			if (tflIndexFirst == tflIndexLast) {
-				// Draw one line
-				drawSquigglyLineAtIndex(tflIndexFirst, start - tflFirst.absoluteStart, end - tflFirst.absoluteStart);
-			} else {
-				// Multiple lines (very long word)
-				drawSquigglyLineAtIndex(tflIndexFirst, start - tflFirst.absoluteStart);
-				
-				tflIndex++;
-				while (tflIndex != tflIndexLast) {
-					drawSquigglyLineAtIndex(tflIndex);
-					tflIndex++;
-				}
-				
-				drawSquigglyLineAtIndex(tflIndexLast, 0, end - tflLast.absoluteStart);
-			}
-		}
-		
-		// Draw a squiggly line at specific line for specific index range
-		private function drawSquigglyLineAtIndex(lineIndex:Number, startIndex:Number=0, endIndex:Number=0x7FFFFFFF):void
-		{
-			var tf:TextFlow = mTextField.textFlow;
-			var tfl:TextFlowLine = tf.flowComposer.getLineAt(lineIndex);
-			var rectLine:Rectangle = tfl.getBounds();
-			if (endIndex == 0x7FFFFFFF) {
-				drawSquigglyLineAtPoint(rectLine.left, rectLine.bottom, rectLine.right - rectLine.left);
-			}
-			else {
-				// Force to have a valid TextLine
-				var tl:TextLine = tfl.getTextLine(true);
-				if(tl==null) return;
-				var atomStartIndex:int= tl.getAtomIndexAtCharIndex(startIndex+ tl.textBlockBeginIndex);//fix for diacritic characters bug#2854971(adding textBlockBeginIndex since getAtomIndexAtCharIndex is relative to beginning of block)
-				var atomEndIndex:int= tl.getAtomIndexAtCharIndex(endIndex+tl.textBlockBeginIndex);//fix for diacritic characters bug#2854971
-				// TODO: atom index and char index is not matching for some chars, use try/catch to avoid crash
-				try {
-					var rectFirst:Rectangle = tl.getAtomBounds(atomStartIndex);
-					var rectLast:Rectangle = tl.getAtomBounds(atomEndIndex);
-					drawSquigglyLineAtPoint(rectFirst.left + tfl.x, rectLine.bottom, rectLast.right - rectFirst.left);
-				} catch (err:Error)
-				{
-					trace(err);
-				}
-			}
-				
-		}
-		// Draw a squiggly from point x,y with given width, the line is drew in mHighlighter 
-		private function drawSquigglyLineAtPoint(x:Number, y:Number, width:Number):void
-		{
-			mHighlighter.graphics.lineStyle(1, 0xfa0707, .65);
-			mHighlighter.graphics.moveTo(x, y);
-			var upDirection:Boolean = false;
-			var offset:uint = 0;
-			var stepLength:uint = 2;
-			for ( var i:uint = 1; offset <= width; i++) {
-				offset = offset + stepLength;
-				if ( upDirection )
-					mHighlighter.graphics.lineTo(x+offset,y);
-				else
-					mHighlighter.graphics.lineTo(x+offset,y+stepLength);
-				upDirection = !upDirection;
-			}	
-		}
-		
-		private function getValidFirstWordIndex():int{
-			var index:int = SelectionManager.computeSelectionIndex(mTextField.textFlow, mTextField, mTextField, 0 + mTextField.horizontalScrollPosition, 0 + mTextField.verticalScrollPosition);
-			return index;
-
-			
-		}
-		
-		private function getValidLastWordIndex():int{
-			var index:int = SelectionManager.computeSelectionIndex(mTextField.textFlow, mTextField, mTextField, mTextField.width+mTextField.horizontalScrollPosition, mTextField.height+mTextField.verticalScrollPosition);
-			return index;
-
-		}
-
-	}
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingUI/src/com/adobe/linguistics/spelling/ui/SparkWordProcessor.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingUI/src/com/adobe/linguistics/spelling/ui/SparkWordProcessor.as b/Squiggly/main/AdobeSpellingUI/src/com/adobe/linguistics/spelling/ui/SparkWordProcessor.as
deleted file mode 100644
index 3ae7a88..0000000
--- a/Squiggly/main/AdobeSpellingUI/src/com/adobe/linguistics/spelling/ui/SparkWordProcessor.as
+++ /dev/null
@@ -1,133 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-package com.adobe.linguistics.spelling.ui
-{
-	import com.adobe.linguistics.utils.ITokenizer;
-	import com.adobe.linguistics.utils.TextTokenizer;
-	import com.adobe.linguistics.utils.Token;
-	
-	import flashx.textLayout.edit.SelectionManager;
-	import flashx.textLayout.tlf_internal;
-	
-	import spark.components.RichEditableText;
-	import com.adobe.linguistics.spelling.ui.IWordProcessor;
-	
-	use namespace tlf_internal;	
-	
-	public class SparkWordProcessor implements IWordProcessor
-	{
-		private var mTextField:RichEditableText;
-
-		public function SparkWordProcessor(textField:RichEditableText)
-		{
-			if (textField == null ) throw new Error("illegal argument."); 
-			mTextField = textField;
-		}
-				
-		
-		public function replaceText(token:Token, replacement:String):void {
-			var startIndex:int = token.first;
-			var endIndex:int = token.last;
-			
-			var ta:RichEditableText = mTextField;
-			var end:int = getValidLastWordIndex();
-			
-			if ( replacement == null ) return;
-			
-			if (mTextField.text.length<endIndex || startIndex<0) {
-				return;
-			}
-			
-			var _misspellStart:int = startIndex;
-			var _misspellEnd:int = endIndex;
-			
-			// Workaround for Spark: changes in inactive components will trigger strange behavior			
-			//var selectedElementRange:ElementRange = ElementRange.createElementRange(ta.textFlow, _misspellStart, _misspellEnd);
-			//var selectedCharacterFormat:ITextLayoutFormat = ta.textFlow.interactionManager.activePosition == ta.textFlow.interactionManager.anchorPosition ? ta.textFlow.interactionManager.getCommonCharacterFormat() : selectedElementRange.characterFormat;
-			//var selectedParagraphFormat:ITextLayoutFormat = selectedElementRange.paragraphFormat;
-			//var selectedContainerFormat:ITextLayoutFormat = selectedElementRange.containerFormat;
-			
-			
-			
-			//var selectedCharacterFormat:ITextLayoutFormat = ta.textFlow.interactionManager.getCommonCharacterFormat();
-			//var selectedContainerFormat:ITextLayoutFormat = ta.textFlow.interactionManager.getCommonContainerFormat();
-			//var selectedParagraphFormat:ITextLayoutFormat = ta.textFlow.interactionManager.getCommonParagraphFormat();
-			
-			/*var tem:EditManager = new EditManager();
-			ta.textFlow.interactionManager = tem;	*/
-			
-			
-			ta.setFocus();
-			//ta.text = ta.text.substr(0, _misspellStart) + replacement + ta.text.substr(_misspellEnd);
-			
-			//tem.applyFormat(selectedCharacterFormat,selectedParagraphFormat,selectedContainerFormat);
-			//ta.textFlow.flowComposer.updateAllControllers();
-			
-			ta.textFlow;
-			//ta.selectRange(_misspellStart + replacement.length, _misspellStart + replacement.length);
-			ta.selectRange(_misspellStart+1, _misspellEnd);
-			ta.insertText(replacement);
-			ta.selectRange(_misspellStart, _misspellStart+1);
-			ta.insertText("");
-			
-			//ta.textFlow.interactionManager.applyFormat(selectedCharacterFormat,null,null);
-			
-			// Workaround for unexpected jump
-			ta.scrollToRange(end, end);
-		}
-		
-		public function getWordAtPoint(x:uint, y:uint, externalTokenizer:ITokenizer=null):Token
-		{
-			// TODO: use a better alternative than _misspellStart, end
-			var ta:RichEditableText = mTextField;	
-			var index:int = SelectionManager.computeSelectionIndex(ta.textFlow, ta, ta, x, y);
-
-			if (index >= ta.text.length) return null;
-
-			var tmpToken:Token = new Token(index,index);
-			var tokenizer:ITokenizer;
-			if ( externalTokenizer == null ) {
-				tokenizer = new TextTokenizer(mTextField.text);	
-			}else {
-				tokenizer = externalTokenizer;
-			}
-			
-			var result:Token = new Token(0,0);
-			var preToken:Token = tokenizer.getPreviousToken(tmpToken);
-			var nextToken:Token = tokenizer.getNextToken(tmpToken);
-			if ( preToken.last == nextToken.first ) {
-				result.first = preToken.first;
-				result.last = nextToken.last;
-				return result;		
-			}else {
-				return null;
-			}
-				
-		}
-
-		// TODO: workaround for unexpected jump when word replaced, to be refactored for code sharing
-		private function getValidLastWordIndex():int{
-			var index:int = SelectionManager.computeSelectionIndex(mTextField.textFlow, mTextField, mTextField, mTextField.width+mTextField.horizontalScrollPosition, mTextField.height+mTextField.verticalScrollPosition);
-			return index;
-		}
-
-
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingUI/src/com/adobe/linguistics/spelling/ui/SpellingHighlighter.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingUI/src/com/adobe/linguistics/spelling/ui/SpellingHighlighter.as b/Squiggly/main/AdobeSpellingUI/src/com/adobe/linguistics/spelling/ui/SpellingHighlighter.as
deleted file mode 100644
index 27cd2fb..0000000
--- a/Squiggly/main/AdobeSpellingUI/src/com/adobe/linguistics/spelling/ui/SpellingHighlighter.as
+++ /dev/null
@@ -1,196 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-package com.adobe.linguistics.spelling.ui
-{
-	import flash.display.Shape;
-	import flash.geom.Point;
-	import flash.geom.Rectangle;
-	import flash.text.TextLineMetrics;
-	
-	import mx.core.IUITextField;
-	import mx.flash.UIMovieClip;
-
-
-	public class SpellingHighlighter extends UIMovieClip
-	{
-		/*
-		* offset point:
-		*/
-		private var _offsetPoint:Point;
-		
-		/*
-		* Target TextField.
-		*/
-		private var _textField:IUITextField;
-		private static var InvalidIndexValue:int = -2;
-		public function SpellingHighlighter(textField:IUITextField) {
-			super();
-			this._textField = textField;
-			this._offsetPoint = new Point(0,0);
-		}
-		
-		public function drawSquigglyLine(firstCharIndex:int, lastCharIndex:int ):void {
-			var validFirstCharIndex:int = getValidFirstCharIndex(firstCharIndex);
-			var validLastCharIndex:int = getValidLastCharIndex(lastCharIndex);
-			if ( validFirstCharIndex == InvalidIndexValue || validLastCharIndex == InvalidIndexValue ){
-				return;
-			}
-			/* draw squiggly line here. */
-			if ( validFirstCharIndex <= validLastCharIndex ) {
-				var firstLine:int = _textField.getLineIndexOfChar(validFirstCharIndex);
-				var lastLine:int = _textField.getLineIndexOfChar(validLastCharIndex);
-				//only one line case.
-				if(lastLine==firstLine)
-				{
-					drawSingleSquigglyLine(validFirstCharIndex, validLastCharIndex);
-					return;
-				}
-				//more than one line.
-				//first line
-				drawSingleSquigglyLine(validFirstCharIndex, _textField.getLineOffset(firstLine)+_textField.getLineLength(firstLine)-1);
-				//middle....
-				for(var i:int=firstLine+1;i<lastLine;i++)
-				{
-					drawSingleSquigglyLine(_textField.getLineOffset(i), _textField.getLineOffset(i)+_textField.getLineLength(i)-1);
-				}
-				//last lines.
-				drawSingleSquigglyLine(_textField.getLineOffset(lastLine), validLastCharIndex);
-			}
-		}
-		
-		public function drawSingleSquigglyLine(firstCharIndex:int, lastCharIndex:int ):void {
-			var firstLine:int = _textField.getLineIndexOfChar(firstCharIndex);
-			var lastLine:int = _textField.getLineIndexOfChar(lastCharIndex);
-			if ( firstLine != lastLine ) {
-				return;
-			}else {
-				var rect1:Rectangle = _textField.getCharBoundaries(firstCharIndex);
-				var rect2:Rectangle = _textField.getCharBoundaries(lastCharIndex);
-				var line:int;
-				while(rect1==null){ 
-					line=_textField.getLineIndexOfChar(firstCharIndex);
-					if( (firstCharIndex+1)>(_textField.getLineOffset(line)+_textField.getLineLength(line)-1)||(firstCharIndex+1)>lastCharIndex) return;// go till the last character
-					firstCharIndex++;
-					rect1= _textField.getCharBoundaries(firstCharIndex);										
-				}
-				
-				while(rect2==null){//this case appears for diacritic characters made using Decomposed chars
-					line=_textField.getLineIndexOfChar(lastCharIndex);
-					if( lastCharIndex-1 < (_textField.getLineOffset(line))||firstCharIndex>(lastCharIndex-1) ) return; //go till the first character
-					lastCharIndex--;// check for the previos character
-					rect2= _textField.getCharBoundaries(lastCharIndex);										
-				}
-				
-				
-				var x:Number = rect1.x+_offsetPoint.x - _textField.scrollH;
-				var y:Number = rect1.y + rect1.height + 2;
-				var width:Number = rect2.x+rect2.width-rect1.x;
-				
-				// Avoid drawing outside the textField
-				if (x<0) 
-				{
-					if (x+width > 0) {
-						width += x;
-						x = 0;
-					} 
-					else
-						return;
-				}
-				if (x+width > _textField.width) 
-				{
-					if (x < _textField.width) {
-						width = textField.width - x;
-					} 	
-					else
-						return;
-				}
-				
-				// The rectangle that bound the string you want
-				// actual work here.
-				var myShape:Shape = new Shape();
-				myShape.graphics.clear();
-				//myShape.graphics.beginFill(0x0099CC, .35); 
-				myShape.graphics.lineStyle(1, 0xfa0707, .65);
-				//myShape.graphics.moveTo(0,0);
-				myShape.graphics.moveTo(x, y);
-				var upDirection:Boolean = false;
-				var offset:uint = 0;
-				var stepLength:uint = 2;
-				for ( var i:uint = 1; offset <= width; i++) {
-					offset = offset + stepLength;
-					if ( upDirection )
-						myShape.graphics.lineTo(x+offset,y);
-					else
-						myShape.graphics.lineTo(x+offset,y+stepLength);
-					upDirection = !upDirection;
-				}
-				//myShape.graphics.endFill();
-				this.addChild(myShape);	
-			}
-		}
-		
-		private function getValidFirstCharIndex(firstCharIndex:int):int{
-			if(firstCharIndex<0 || firstCharIndex>_textField.text.length-1) 
-			{
-				return InvalidIndexValue;
-			}
-			var firstLine:Number = _textField.getLineIndexOfChar(firstCharIndex);
-			
-			if(firstLine<_textField.scrollV-1)
-			{
-				firstLine = _textField.scrollV-1;
-				return _textField.getLineOffset(firstLine);
-			}
-			return firstCharIndex;
-		}
-		
-		private function getValidLastCharIndex(lastCharIndex:int):int{
-			if(lastCharIndex<0 || lastCharIndex>_textField.text.length-1) 
-			{
-				return InvalidIndexValue;
-			}
-			var lastLine:Number = _textField.getLineIndexOfChar(lastCharIndex);
-			if(lastLine>_textField.bottomScrollV-1)
-			{
-				lastLine = _textField.bottomScrollV-1;
-				return _textField.getLineOffset(lastLine)+_textField.getLineLength(lastLine)-1;
-			}
-			return lastCharIndex;
-		}
-					
-		public function set textField(tf:IUITextField):void{
-			_textField = tf;
-		}
-		
-		public function get textField():IUITextField{
-			return _textField;
-		}
-		
-		public function set offsetPoint(op:Point):void{
-			_offsetPoint = op;
-		}
-		
-		public function get offsetPoint():Point{
-			return _offsetPoint;
-		}
-
-
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingUI/src/com/adobe/linguistics/spelling/ui/TLFHighlighter.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingUI/src/com/adobe/linguistics/spelling/ui/TLFHighlighter.as b/Squiggly/main/AdobeSpellingUI/src/com/adobe/linguistics/spelling/ui/TLFHighlighter.as
deleted file mode 100644
index 92b7c71..0000000
--- a/Squiggly/main/AdobeSpellingUI/src/com/adobe/linguistics/spelling/ui/TLFHighlighter.as
+++ /dev/null
@@ -1,252 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-package com.adobe.linguistics.spelling.ui
-{
-	import com.adobe.linguistics.utils.TextTokenizer;
-	import com.adobe.linguistics.utils.Token;
-	
-	import flash.display.Graphics;
-	import flash.display.Shape;
-	import flash.display.Sprite;
-	import flash.geom.Point;
-	import flash.geom.Rectangle;
-	import flash.text.engine.TextLine;
-	import flash.utils.Dictionary;
-	
-	import flashx.textLayout.compose.TextFlowLine;
-	import flashx.textLayout.container.ContainerController;
-	import flashx.textLayout.edit.SelectionManager;
-	import flashx.textLayout.elements.TextFlow;
-	import flashx.textLayout.tlf_internal;
-	import com.adobe.linguistics.spelling.ui.IHighlighter;
-
-
-	use namespace tlf_internal;	
-
-	/**
-	 * <p>This class facilitates drawing of squiggly lines below words for TLF TextFlow class.</p>
-	 * <p>The TextFlow class is responsible for managing all 
-	 * the text content of a story. In TextLayout, text is stored in a hierarchical tree of elements. TextFlow is the root object of the element tree. 
-	 * All elements on the tree derive from the base class, FlowElement. </p> 
-	 * TLFHighlighter could be used for drawing squiggly lines in any of the custom visual components(probably based on <code>Sprite</code>) which make use 
-	 * of TextFlow to display text.
-	 * 	
-	 * @playerversion Flash 10
-	 * @langversion 3.0
-	 */
-	public class TLFHighlighter implements IHighlighter
-	{
-		
-		private var mTextFlow:TextFlow;
-		private var mHighlighter:Dictionary;
-	
-		//private var mHighlighter:Shape;
-		private var ccindex:int;
-		private var cc:ContainerController;
-		/*
-		* offset point:
-		*/
-		private var _offsetPoint:Point;
-
-		/**
-		 * The constructor for TLFHighlighter.
-		 * @param textFlow <code>TextFlow</code> in which to enable highlighting.		 
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */
-		public function TLFHighlighter( textFlow:TextFlow )
-		{
-			if (textFlow == null ) throw new Error("illegal argument."); 
-			mTextFlow = textFlow;
-			//mHighlighter = null;
-			mHighlighter = new Dictionary(true);
-			this._offsetPoint = new Point(0,0);
-		}
-		/**
-		 * Draw squiggly lines below a given token.
-		 * @param token <code>Token</code> information of the word to be highlighted.		 
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */
-		public function drawSquiggleAt(token:Token):void
-		{
-			squiggleWord(token);
-		}
-		/**
-		 * Clear all squiggly lines in the component.		
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */
-		public function clearSquiggles():void
-		{
-			
-			for (var idx:int = 0; idx < mTextFlow.flowComposer.numControllers; idx++)
-			{	
-				var cctmp:ContainerController = mTextFlow.flowComposer.getControllerAt(idx);
-				if (!cctmp) return;	
-				if (mHighlighter[cctmp.container] != null) {
-					
-					//ToDO: This assumes single container for whole of mTextFlow. Need to implement for multiple container case.
-					cctmp.container.removeChild((mHighlighter[cctmp.container] as Shape));
-					
-					mHighlighter[cctmp.container] = null;
-				}	
-			}
-		}
-	
-		/**
-		 * Set offset point information for scrollable controls. This is used by the highlighter to move 
-		 * the squiggly lines as the text scrolls inside the control.	
-		 * @param op offset information as a <code>Point</code> instance.		 
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */		
-		public function set offsetPoint(op:Point):void{
-			_offsetPoint = op;
-		}
-		/**
-		 * Get offset point information for scrollable controls. This is used by the highlighter to move 
-		 * the squiggly lines as the text scrolls inside the control.	
-		 * @param op offset information as a <code>Point</code> instance.		 
-		 * @playerversion Flash 10
-		 * @langversion 3.0
-		 */	
-		public function get offsetPoint():Point{
-			return _offsetPoint;
-		}
-
-		
-
-		// TODO: refactor this code to share with halo components, and support words that cross lines
-		private function squiggleWord(token:Token):void {					
-			var ta:TextFlow = mTextFlow;
-			
-			if (!ta) return;		
-			ccindex = ta.flowComposer.findControllerIndexAtPosition(token.first);
-			
-			cc = ta.flowComposer.getControllerAt(ccindex);
-			if (!cc) return;	
-			if (mHighlighter[cc.container] == null ) {
-				mHighlighter[cc.container]= new Shape();
-				(mHighlighter[cc.container] as Shape).graphics.clear();
-				//ccindex = ta.flowComposer.findControllerIndexAtPosition(token.first);
-				
-				//var cc:ContainerController = ta.flowComposer.getControllerAt(ccindex);
-				//ToDO: This assumes single container for whole of mTextFlow. Need to implement for multiple container case.
-				cc.container.addChild((mHighlighter[cc.container] as Shape));				
-			}
-					
-		    drawSquigglyLineForRange(token.first, token.last);
-			
-			// Just adjust the left padding, top padding is not an issue 
-			//var pleft:uint = mTextFlow.getStyle("paddingLeft");
-			//mHighlighter.x += pleft;		
-		}
-		
-		// Draw squiggly line
-		private function drawSquigglyLineForRange(start:Number, end:Number):void
-		{
-			// draw squiggly line
-			var tf:TextFlow = mTextFlow;
-			var tflFirst:TextFlowLine = tf.flowComposer.findLineAtPosition(start);
-			var tflLast:TextFlowLine = tf.flowComposer.findLineAtPosition(end);
-			var tflIndexFirst:int = tf.flowComposer.findLineIndexAtPosition(start);
-			var tflIndexLast:int = tf.flowComposer.findLineIndexAtPosition(end);
-			
-			// Pointer
-			var tflIndex:int = tflIndexFirst;
-			var tfl:TextFlowLine = tflFirst;
-			
-			if (tflIndexFirst == tflIndexLast) {
-				// Draw one line
-				drawSquigglyLineAtIndex(tflIndexFirst, start - tflFirst.absoluteStart, end - tflFirst.absoluteStart);
-			} else {
-				// Multiple lines (very long word)
-				drawSquigglyLineAtIndex(tflIndexFirst, start - tflFirst.absoluteStart);
-				
-				tflIndex++;
-				while (tflIndex != tflIndexLast) {
-					drawSquigglyLineAtIndex(tflIndex);
-					tflIndex++;
-				}
-				
-				drawSquigglyLineAtIndex(tflIndexLast, 0, end - tflLast.absoluteStart);
-			}
-		}
-		
-		// Draw a squiggly line at specific line for specific index range
-		private function drawSquigglyLineAtIndex(lineIndex:Number, startIndex:Number=0, endIndex:Number=0x7FFFFFFF):void
-		{
-			var tf:TextFlow = mTextFlow;
-			var tfl:TextFlowLine = tf.flowComposer.getLineAt(lineIndex);
-			var rectLine:Rectangle = tfl.getBounds(); 
-			if (endIndex == 0x7FFFFFFF) {
-				drawSquigglyLineAtPoint(rectLine.left, rectLine.bottom, rectLine.right - rectLine.left, lineIndex);
-			}
-			else {
-				// Force to have a valid TextLine
-				var tl:TextLine = tfl.getTextLine(true);
-				if(tl==null)return;
-				var atomStartIndex:int= tl.getAtomIndexAtCharIndex(startIndex+ tl.textBlockBeginIndex);//fix for diacritic characters bug#2854971
-				var atomEndIndex:int= tl.getAtomIndexAtCharIndex(endIndex+ tl.textBlockBeginIndex);//fix for diacritic characters bug#2854971
-				// TODO: atom index and char index is not matching for some chars, use try/catch to avoid crash
-				try {
-					var rectFirst:Rectangle = tl.getAtomBounds(atomStartIndex);
-					var rectLast:Rectangle = tl.getAtomBounds(atomEndIndex);
-					drawSquigglyLineAtPoint(rectFirst.left + tfl.x, rectLine.bottom, rectLast.right - rectFirst.left, lineIndex);
-				} catch (err:Error)
-				{
-					trace(err);
-				}
-			}
-				
-		}
-		// Draw a squiggly from point x,y with given width, the line is drawn in mHighlighter 
-		private function drawSquigglyLineAtPoint(x:Number, y:Number, width:Number, lineIndex:Number):void
-		{
-			var tf:TextFlow = mTextFlow;
-			var tfl:TextFlowLine = tf.flowComposer.getLineAt(lineIndex);
-			var tl:TextLine = tfl.getTextLine(true);
-						
-			(mHighlighter[cc.container] as Shape).graphics.lineStyle(1, 0xfa0707, .65);
-			(mHighlighter[cc.container] as Shape).graphics.moveTo(x, y);
-			var upDirection:Boolean = false;
-			var offset:uint = 0;
-			var stepLength:uint = 2;
-			for ( var i:uint = 1; offset <= width; i++) {
-				offset = offset + stepLength;
-				if ( upDirection )
-					(mHighlighter[cc.container] as Shape).graphics.lineTo(x+offset,y);
-				else
-					(mHighlighter[cc.container] as Shape).graphics.lineTo(x+offset,y+stepLength);
-				upDirection = !upDirection;
-			}
-			
-			//tl.addChild(mHighlighter);
-						
-			//tf.flowComposer.updateToController(ccindex);
-
-		}
-		
-
-	}
-	
-}
-

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingUI/src/com/adobe/linguistics/spelling/ui/TLFWordProcessor.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingUI/src/com/adobe/linguistics/spelling/ui/TLFWordProcessor.as b/Squiggly/main/AdobeSpellingUI/src/com/adobe/linguistics/spelling/ui/TLFWordProcessor.as
deleted file mode 100644
index 749e218..0000000
--- a/Squiggly/main/AdobeSpellingUI/src/com/adobe/linguistics/spelling/ui/TLFWordProcessor.as
+++ /dev/null
@@ -1,159 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-package com.adobe.linguistics.spelling.ui
-{
-	import com.adobe.linguistics.utils.ITokenizer;
-	import com.adobe.linguistics.utils.TextTokenizer;
-	import com.adobe.linguistics.utils.Token;
-	
-	import flashx.textLayout.edit.SelectionManager;
-	import flashx.textLayout.edit.EditManager;
-	import flashx.textLayout.tlf_internal;
-	import flashx.textLayout.elements.TextFlow;
-	
-	import flashx.textLayout.container.ContainerController;
-	import flashx.textLayout.elements.FlowLeafElement;
-	import flashx.textLayout.elements.ParagraphElement;
-	import com.adobe.linguistics.spelling.ui.IWordProcessor;
-	
-	use namespace tlf_internal;	
-	
-	public class TLFWordProcessor implements IWordProcessor
-	{
-		private var mTextFlow:TextFlow;
-		private var _containerController:ContainerController;
-
-		public function TLFWordProcessor(textFlow:TextFlow)
-		{
-			if (textFlow == null ) throw new Error("illegal argument."); 
-			mTextFlow = textFlow;
-		}
-				
-		
-		public function replaceText(token:Token, replacement:String):void {
-			var startIndex:int = token.first;
-			var endIndex:int = token.last;
-			
-			var ta:TextFlow = mTextFlow;
-			//var end:int = getValidLastWordIndex();
-			
-			if ( replacement == null ) return;
-			
-			/*if (mTextFlow.text.length<endIndex || startIndex<0) {
-				return;
-			}*/
-			
-			var _misspellStart:int = startIndex;
-			var _misspellEnd:int = endIndex;
-			
-			// Workaround for Spark: changes in inactive components will trigger strange behavior			
-			//var selectedElementRange:ElementRange = ElementRange.createElementRange(ta.textFlow, _misspellStart, _misspellEnd);
-			//var selectedCharacterFormat:ITextLayoutFormat = ta.textFlow.interactionManager.activePosition == ta.textFlow.interactionManager.anchorPosition ? ta.textFlow.interactionManager.getCommonCharacterFormat() : selectedElementRange.characterFormat;
-			//var selectedParagraphFormat:ITextLayoutFormat = selectedElementRange.paragraphFormat;
-			//var selectedContainerFormat:ITextLayoutFormat = selectedElementRange.containerFormat;
-			
-			
-			
-			//var selectedCharacterFormat:ITextLayoutFormat = ta.textFlow.interactionManager.getCommonCharacterFormat();
-			//var selectedContainerFormat:ITextLayoutFormat = ta.textFlow.interactionManager.getCommonContainerFormat();
-			//var selectedParagraphFormat:ITextLayoutFormat = ta.textFlow.interactionManager.getCommonParagraphFormat();
-			
-			var tem:EditManager = ta.interactionManager as EditManager;
-			
-			
-			
-			//ta.setFocus();
-			//ta.text = ta.text.substr(0, _misspellStart) + replacement + ta.text.substr(_misspellEnd);
-			
-			//tem.applyFormat(selectedCharacterFormat,selectedParagraphFormat,selectedContainerFormat);
-			//ta.textFlow.flowComposer.updateAllControllers();
-			
-			//ta.textFlow;
-			//ta.selectRange(_misspellStart + replacement.length, _misspellStart + replacement.length);
-			
-			
-			tem.selectRange(_misspellStart, _misspellEnd-1);
-			//tem.insertText(replacement);
-			//tem.selectRange(_misspellStart, _misspellStart+1);
-			//tem.insertText("");
-			tem.overwriteText(replacement);
-			
-			//ta.textFlow.interactionManager.applyFormat(selectedCharacterFormat,null,null);
-			
-			// Workaround for unexpected jump
-			//ta.scrollToRange(end, end);
-		}
-		
-		/**
-		 @private
-		 (This property is for Squiggly Developer use only.)
-		 */
-		public function set textFlowContainerController(value:ContainerController):void {
-			_containerController = value;
-		}
-		
-		public function getWordAtPoint(x:uint, y:uint, externalTokenizer:ITokenizer=null):Token
-		{
-			// TODO: use a better alternative than _misspellStart, end
-			var ta:TextFlow = mTextFlow;	
-									
-			var index:int = SelectionManager.computeSelectionIndex(ta, _containerController.container, _containerController.container, x, y);
-
-			if (index >= ta.textLength) return null;
-
-			var currentLeaf:FlowLeafElement = ta.findLeaf(index);
-			var currentParagraph:ParagraphElement = currentLeaf ? currentLeaf.getParagraph() : null;
-			
-			if (currentParagraph == null) return null;
-			var paraStart:uint = currentParagraph.getAbsoluteStart();
-				
-			//tokenizer = new TextTokenizer(currentParagraph.getText().substring());
-			
-			var tmpToken:Token = new Token(index - paraStart,index - paraStart);
-			var tokenizer:ITokenizer;
-			if ( externalTokenizer == null ) {
-				tokenizer = new TextTokenizer(currentParagraph.getText().substring());	
-			}else {
-				tokenizer = externalTokenizer;
-			}
-			
-			var result:Token = new Token(0,0);
-			var preToken:Token = tokenizer.getPreviousToken(tmpToken);
-			var nextToken:Token = tokenizer.getNextToken(tmpToken);
-			if ( preToken.last == nextToken.first ) {
-				result.first = preToken.first + paraStart;
-				result.last = nextToken.last + paraStart;
-				return result;		
-			}else {
-				return null;
-			}
-							
-		}
-
-		// TODO: workaround for unexpected jump when word replaced, to be refactored for code sharing
-		private function getValidLastWordIndex():int{
-			var index:int = 0;
-			//var index:int = SelectionManager.computeSelectionIndex(mTextFlow.textFlow, mTextFlow, mTextFlow, mTextFlow.width+mTextFlow.horizontalScrollPosition, mTextFlow.height+mTextFlow.verticalScrollPosition);
-			return index;
-		}
-
-
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingUIAPI/src/com/adobe/linguistics/spelling/ui/HaloHighlighter.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingUIAPI/src/com/adobe/linguistics/spelling/ui/HaloHighlighter.as b/Squiggly/main/AdobeSpellingUIAPI/src/com/adobe/linguistics/spelling/ui/HaloHighlighter.as
deleted file mode 100644
index 28f16e6..0000000
--- a/Squiggly/main/AdobeSpellingUIAPI/src/com/adobe/linguistics/spelling/ui/HaloHighlighter.as
+++ /dev/null
@@ -1,87 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-package com.adobe.linguistics.spelling.ui
-{
-	import __AS3__.vec.Vector;
-	
-	import com.adobe.linguistics.utils.Token;
-	
-	import flash.geom.Point;
-	import flash.text.TextField;
-	
-	import mx.core.IUITextField;
-
-
-	public class HaloHighlighter implements IHighlighter
-	{
-		private var mTextField:TextField;
-		private var mHighlighter:SpellingHighlighter;
-		/*
-		* offset point:
-		*/
-		private var _offsetPoint:Point;
-
-		public function HaloHighlighter( textField:TextField )
-		{
-			if (textField == null ) throw new Error("illegal argument."); 
-			mTextField = textField;
-			mHighlighter = null;
-			this._offsetPoint = new Point(0,0);
-		}
-		/*************************Public function************************************/
-		public function drawSquiggles(tokens:Vector.<Token>):void
-		{
-			spellCheckRange(tokens);
-		}
-		
-		public function clearSquiggles():void
-		{
-			if (mHighlighter) {
-				mTextField.parent.removeChild(mHighlighter);
-				mHighlighter=null;
-			}
-			
-		}
-
-		public function set offsetPoint(op:Point):void{
-			_offsetPoint = op;
-		}
-		
-		public function get offsetPoint():Point{
-			return _offsetPoint;
-		}
-
-
-		private function spellCheckRange(tokens:Vector.<Token>):void {
-			
-			mHighlighter= new SpellingHighlighter( mTextField as IUITextField);
-			
-			
-			for ( var i:int = 0; i< tokens.length; ++i ) {
-				var _token:Token = tokens[i];
-				mHighlighter.drawSquigglyLine(_token.first, _token.last);
-			}
-			
-			mTextField.parent.addChild(mHighlighter);	
-			mHighlighter.move(_offsetPoint.x, _offsetPoint.y);
-		}
-
-	}
-}
\ No newline at end of file


[49/50] [abbrv] git commit: [flex-utilities] [refs/heads/master] - add package descriptions

Posted by jm...@apache.org.
add package descriptions


Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/249e685a
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/249e685a
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/249e685a

Branch: refs/heads/master
Commit: 249e685a14d9f4c3674df8ab0207c301dc99f785
Parents: 57e2238
Author: Justin Mclean <jm...@apache.org>
Authored: Fri Aug 29 11:17:58 2014 +1000
Committer: Justin Mclean <jm...@apache.org>
Committed: Fri Aug 29 11:17:58 2014 +1000

----------------------------------------------------------------------
 Squiggly/build.xml | 22 ++++++++++++----------
 1 file changed, 12 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/249e685a/Squiggly/build.xml
----------------------------------------------------------------------
diff --git a/Squiggly/build.xml b/Squiggly/build.xml
index af7dca7..7c68f2f 100644
--- a/Squiggly/build.xml
+++ b/Squiggly/build.xml
@@ -53,17 +53,10 @@
 	</target>
 	
 	<target name="generate-docs" description="generate asdocs">
-		<!--
-		C:\flexsdk4.1\bin\asdoc" 
-		-package com.adobe.linguistics.spelling "This package providing spell checking functionality to your action script applications. This includes the core spell checking engine and the optional SpellUI class for easy integration with your existing Flex projects."
-		-package com.adobe.linguistics.spelling.ui "This package provides text highlighting related functionalities"
-		-package com.adobe.linguistics.spelling.framework "This package provides spelling service and spelling configuration related functionalities"
-		-package com.adobe.linguistics.utils "This package provides text parsing and tokenizing related classes"
-		-->
-		<asdoc output="out\docs" lenient="true" failonerror="true" warnings="false" strict="false" locale="en_US" fork="true"
+		<asdoc output="docs" lenient="true" failonerror="true" warnings="false" strict="false" locale="en_US" fork="true"
 			exclude-dependencies="true"  
-			window-title="Squiggly API Documentation ${version}"
-            main-title="${version} API Reference">
+			window-title="Apache Flex Squiggly API Documentation ${version}"
+            main-title="Apache Flex Squiggly API${version} API Reference">
 
 		    <doc-classes class="com.adobe.linguistics.spelling.SpellUI"/>
 		    <doc-classes class="com.adobe.linguistics.spelling.SpellUIForTLF"/>
@@ -85,6 +78,11 @@
 			<compiler.source-path path-element="main/SpellingEngine/src"/>
 			<compiler.source-path path-element="main/LinguisticUtils/src"/>
 			<compiler.source-path path-element="main/SpellingFramework/src"/>
+			
+			<package name="com.adobe.linguistics.spelling" description="This package providing spell checking functionality to your action script applications. This includes the core spell checking engine and the optional SpellUI class for easy integration with your existing Flex projects." />
+			<package name="com.adobe.linguistics.spelling.ui" description="This package provides text highlighting related functionalities." />
+			<package name="com.adobe.linguistics.spelling.framework" description="This package provides spelling service and spelling configuration related functionalities." />
+			<package name="com.adobe.linguistics.utils" description="This package provides text parsing and tokenizing related classes." />
 		</asdoc>
 	</target>
 	
@@ -110,6 +108,7 @@
             	<include name="**/*.py" />
             	<include name="**/*.sh" />
             	<include name="**/*.properties" />
+            	<include name="docs/**" />
             	<exclude name="ane/**" />
             	<exclude name="main/ASDocExamples/**" />
             	<exclude name="main/Automation/**" />
@@ -135,6 +134,7 @@
             	<include name="**/*.py" />
             	<include name="**/*.sh" />
             	<include name="**/*.properties" />
+            	<include name="docs/**" />
             	<exclude name="ane/**" />
             	<exclude name="main/ASDocExamples/**" />
             	<exclude name="main/Automation/**" />
@@ -162,6 +162,7 @@
 	            	<include name="**/*.py" />
 	            	<include name="**/*.sh" />
 	            	<include name="**/*.properties" />
+	            	<include name="docs/**" />
 	                <include name="**/*.swc" />
 	            	<exclude name="ane/**" />
 	            	<exclude name="main/ASDocExamples/**" />
@@ -188,6 +189,7 @@
 	            	<include name="**/*.py" />
 	            	<include name="**/*.sh" />
 	            	<include name="**/*.properties" />
+	            	<include name="docs/**" />
 	                <include name="**/*.swc" />
 	            	<exclude name="ane/**" />
 	            	<exclude name="main/ASDocExamples/**" />


[43/50] [abbrv] git commit: [flex-utilities] [refs/heads/master] - made how to use a bit more obvious and removed author tag

Posted by jm...@apache.org.
made how to use a bit more obvious and removed author tag


Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/20eedd5d
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/20eedd5d
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/20eedd5d

Branch: refs/heads/master
Commit: 20eedd5d531867fb48e99bbec4faa9adf6d5f746
Parents: 29548b2
Author: Justin Mclean <jm...@apache.org>
Authored: Fri Aug 29 10:20:50 2014 +1000
Committer: Justin Mclean <jm...@apache.org>
Committed: Fri Aug 29 10:20:50 2014 +1000

----------------------------------------------------------------------
 Squiggly/main/Data/genTextWordlist.sh | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/20eedd5d/Squiggly/main/Data/genTextWordlist.sh
----------------------------------------------------------------------
diff --git a/Squiggly/main/Data/genTextWordlist.sh b/Squiggly/main/Data/genTextWordlist.sh
old mode 100644
new mode 100755
index d4e31e5..2299a2b
--- a/Squiggly/main/Data/genTextWordlist.sh
+++ b/Squiggly/main/Data/genTextWordlist.sh
@@ -15,15 +15,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-
-
-
-
-# Author (U)  Zhigang Qi (zhigang.qi@gmail.com) XieFang (xfang@adobe.com)
-# Created  02/26/2010
-
-
-# Put your selected word lists in squigglyWordlist folder, then run this #
+echo "Put your selected word lists in squigglyWordlist folder"
 
 
 cat squigglyWordlist/* | sort > usatemp.txt


[02/50] [abbrv] git commit: [flex-utilities] [refs/heads/master] - add place holder for Apache Flex 4.14

Posted by jm...@apache.org.
add place holder for Apache Flex 4.14


Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/4c3cb13e
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/4c3cb13e
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/4c3cb13e

Branch: refs/heads/master
Commit: 4c3cb13ee798a6815a257b5ca78d5633f06466a9
Parents: e0e3533
Author: Justin Mclean <jm...@apache.org>
Authored: Wed Aug 27 13:58:56 2014 +1000
Committer: Justin Mclean <jm...@apache.org>
Committed: Wed Aug 27 13:58:56 2014 +1000

----------------------------------------------------------------------
 .../src/apache/ApacheFlex4_14_0.mxml            | 51 ++++++++++++++++++++
 1 file changed, 51 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4c3cb13e/TourDeFlex/TourDeFlex3/src/apache/ApacheFlex4_14_0.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/apache/ApacheFlex4_14_0.mxml b/TourDeFlex/TourDeFlex3/src/apache/ApacheFlex4_14_0.mxml
new file mode 100644
index 0000000..1f988e2
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/apache/ApacheFlex4_14_0.mxml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+
+-->
+<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
+			   xmlns:s="library://ns.adobe.com/flex/spark" 
+			   xmlns:mx="library://ns.adobe.com/flex/mx">
+	<s:layout>
+		<s:VerticalLayout paddingLeft="20" paddingTop="20" />
+	</s:layout>
+	
+	<s:HGroup>
+		<s:Image source="@Embed('/assets/ApacheFlexLogo.png')" width="50" height="50" />
+		<s:VGroup height="100%" verticalAlign="middle">
+			<s:Label text="Apache Flex 4.14" fontSize="20" fontWeight="bold" />
+			<s:Label text="Released MMM DD, 2014" />
+		</s:VGroup>	
+	</s:HGroup>
+	
+	<s:RichText width="100%">
+		<s:p />
+		<s:p>Apache Flex community releases Flex 4.14.0.</s:p>
+		<s:p />
+		<s:p>Differences and highlights include:</s:p>
+		<s:list>
+			<s:li>Support for Flash Player 15.0 and AIR runtime 15.0</s:li>
+			<s:li>New modern Android skins</s:li>
+			<s:li>New spark RichTextEditor component</s:li>
+			<s:li>Over XX bugs fixed</s:li>
+		</s:list>
+		<s:p />
+		<s:p>For a full list of changes please see the README.</s:p>
+		<s:p />
+	</s:RichText>
+	<s:Label text="Content from Wikipedia licenced under a Creative Commons Attribution-ShareAlike 3.0 Unported License" fontSize="9" />
+</s:Application>


[12/50] [abbrv] git commit: [flex-utilities] [refs/heads/master] - Added buttons to copy code, copy link to code and goto github (FLEX-34502, FLEX-34492 and FLEX-34482)

Posted by jm...@apache.org.
Added buttons to copy code, copy link to code and goto github (FLEX-34502, FLEX-34492 and FLEX-34482)


Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/ca30f444
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/ca30f444
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/ca30f444

Branch: refs/heads/master
Commit: ca30f4442113e04498b20fd491d13293bc874c08
Parents: 02c5bdb
Author: Justin Mclean <jm...@apache.org>
Authored: Wed Aug 27 17:00:39 2014 +1000
Committer: Justin Mclean <jm...@apache.org>
Committed: Wed Aug 27 17:00:39 2014 +1000

----------------------------------------------------------------------
 TourDeFlex/TourDeFlex3/src/SourceTab.mxml | 30 ++++++++++++++++++++++++--
 1 file changed, 28 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/ca30f444/TourDeFlex/TourDeFlex3/src/SourceTab.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/SourceTab.mxml b/TourDeFlex/TourDeFlex3/src/SourceTab.mxml
index b9450cf..c9d8f7c 100755
--- a/TourDeFlex/TourDeFlex3/src/SourceTab.mxml
+++ b/TourDeFlex/TourDeFlex3/src/SourceTab.mxml
@@ -26,6 +26,8 @@
         import mx.rpc.events.FaultEvent;
         import mx.controls.Alert;
 
+		public var app:String;
+			
         public function set source(file:String):void
         {
             label = file.substring(file.lastIndexOf("/")+1);
@@ -46,6 +48,25 @@
         {
             Alert.show("Error loading source file");
         }
+			
+		private function copyCode():void
+        {
+        	System.setClipboard(ta.text);
+        }
+		
+		private function copyLink():void
+        {
+			var linkText:String = "http://flex.apache.org/tourdeflex/?app=" + app;
+			
+        	System.setClipboard(linkText);
+        }
+			
+		private function viewInGitHub():void
+		{
+			var gitHubLink:String = "https://github.com/apache/flex-utilities/tree/master/TourDeFlex/TourDeFlex3/src/" + srv.url;
+			var urlRequest:URLRequest = new URLRequest(gitHubLink);
+			navigateToURL(urlRequest, "_blank");
+		}
 
         ]]>
     </fx:Script>
@@ -54,6 +75,11 @@
     	<mx:HTTPService id="srv" useProxy="false" resultFormat="text" result="resultHandler(event)" fault="faultHandler(event)"/>
 	</fx:Declarations>
 	
-    <mx:TextArea id= "ta" color="#0000A0" fontFamily="Courier" editable="false" wordWrap="false" width="100%" height="100%"/>
-
+    <mx:TextArea id="ta" color="#0000A0" fontFamily="Courier" editable="false" wordWrap="false" width="100%" height="100%"/>
+	<mx:HBox width="100%">
+		<mx:Spacer width="100%" />
+		<mx:Button label="Copy" click="copyCode()" />
+		<mx:Button label="Copy Link" click="copyLink()" />
+		<mx:Button label="GitHub" click="viewInGitHub()" />
+	</mx:HBox>
 </mx:VBox>
\ No newline at end of file


[23/50] [abbrv] remove Adobe from directory names (package name still contains Adobe)

Posted by jm...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/logging/ILogger.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/logging/ILogger.as b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/logging/ILogger.as
new file mode 100644
index 0000000..37df37e
--- /dev/null
+++ b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/logging/ILogger.as
@@ -0,0 +1,40 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+
+package com.adobe.linguistics.spelling.core.logging
+{
+
+import flash.events.IEventDispatcher;
+
+public interface ILogger extends IEventDispatcher
+{
+    function get category():String;
+
+    function log(level:int, message:String, ... rest):void;
+    function debug(message:String, ... rest):void;
+    function error(message:String, ... rest):void;
+
+    function fatal(message:String, ... rest):void;
+    function info(message:String, ... rest):void;
+    function warn(message:String, ... rest):void;
+}
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/logging/ILoggingTarget.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/logging/ILoggingTarget.as b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/logging/ILoggingTarget.as
new file mode 100644
index 0000000..47ed7ac
--- /dev/null
+++ b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/logging/ILoggingTarget.as
@@ -0,0 +1,39 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+package com.adobe.linguistics.spelling.core.logging
+{
+public interface ILoggingTarget 
+{
+    function get filters():Array;
+    
+    function set filters(value:Array):void;
+    function get level():int;
+
+    function set level(value:int):void;
+    
+    function get mask():int;
+
+    function addLogger(logger:ILogger):void;
+
+    function removeLogger(logger:ILogger):void;
+}
+
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/logging/Log.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/logging/Log.as b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/logging/Log.as
new file mode 100644
index 0000000..e9a720d
--- /dev/null
+++ b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/logging/Log.as
@@ -0,0 +1,210 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+package com.adobe.linguistics.spelling.core.logging
+{
+	import flash.errors.IllegalOperationError;
+public class Log
+{
+
+    private static var _targetLevel:int = LogEventLevel.NONE;
+        // Initialize target level to a value out of range.
+
+    private static var _loggers:Array;
+
+    private static var _targets:Array = [];
+
+	
+    public static function isFatal():Boolean
+    {
+        return (_targetLevel & LogEventLevel.FATAL) ? true : false;
+    }
+    
+    public static function isError():Boolean
+    {
+        return (_targetLevel & LogEventLevel.ERROR) ? true : false;
+    }
+    
+    public static function isWarn():Boolean
+    {
+        return (_targetLevel & LogEventLevel.WARN) ? true : false;
+    }
+
+    public static function isInfo():Boolean
+    {
+        return (_targetLevel & LogEventLevel.INFO) ? true : false;
+    }
+    
+    public static function isDebug():Boolean
+    {
+        return (_targetLevel & LogEventLevel.DEBUG) ? true : false;
+    }
+
+    public static function addTarget(target:ILoggingTarget):void
+    {
+        if (target)
+        {
+            var filters:Array = target.filters;
+            var logger:ILogger;
+            // need to find what filters this target matches and set the specified
+            // target as a listener for that logger.
+            for (var i:String in _loggers)
+            {
+                if (categoryMatchInFilterList(i, filters))
+                    target.addLogger(ILogger(_loggers[i]));
+            }
+            // if we found a match all is good, otherwise we need to
+            // put the target in a waiting queue in the event that a logger
+            // is created that this target cares about.
+            _targets.push(target);
+            
+            if (_targetLevel == LogEventLevel.NONE)
+                _targetLevel = target.mask;
+            else{
+            	_targetLevel = _targetLevel | target.mask;
+            }
+        }
+        else
+        {
+            throw new IllegalOperationError("addTarget function did not receive null object.");
+        }
+    }
+
+    public static function removeTarget(target:ILoggingTarget):void
+    {
+        if (target)
+        {
+            var filters:Array = target.filters;
+            var logger:ILogger;
+            // Disconnect this target from any matching loggers.
+            for (var i:String in _loggers)
+            {
+                if (categoryMatchInFilterList(i, filters))
+                {
+                    target.removeLogger(ILogger(_loggers[i]));
+                }                
+            }
+            // Remove the target.
+            for (var j:int = 0; j<_targets.length; j++)
+            {
+                if (target == _targets[j])
+                {
+                    _targets.splice(j, 1);
+                    j--;
+                }
+            }
+            resetTargetLevel();
+        }
+        else
+        {
+            throw new IllegalOperationError("addHandle function did not receive null object.");
+        }
+    }
+
+    public static function getLogger(category:String):ILogger
+    {
+        checkCategory(category);
+        if (!_loggers)
+            _loggers = [];
+		var newFlag:Boolean = false;
+        // get the logger for the specified category or create one if it
+        // doesn't exist
+        var result:ILogger = _loggers[category];
+        if (result == null)
+        {
+            result = new LogLogger(category);
+            _loggers[category] = result;
+            newFlag = true;
+        }
+
+        // check to see if there are any targets waiting for this logger.
+        var target:ILoggingTarget;
+        for (var i:int = 0; (i < _targets.length)&&(newFlag); i++)
+        {
+            target = ILoggingTarget(_targets[i]);
+            if (categoryMatchInFilterList(category, target.filters))
+                target.addLogger(result);
+        }
+
+        return result;
+    }
+
+    public static function flush():void
+    {
+        _loggers = [];
+        _targets = [];
+        _targetLevel = LogEventLevel.NONE;
+    }
+
+    public static function hasIllegalCharacters(value:String):Boolean
+    {
+        return value.search(/[\[\]\~\$\^\&\\(\)\{\}\+\?\/=`!@#%,:;'"<>\s]/) != -1;
+    }
+
+    private static function categoryMatchInFilterList(category:String, filters:Array):Boolean
+    {
+        var result:Boolean = false;
+        var filter:String;
+        var index:int = -1;
+        for (var i:uint = 0; i < filters.length; i++)
+        {
+            filter = filters[i];
+            // first check to see if we need to do a partial match
+            // do we have an asterisk?
+            index = filter.indexOf("*");
+
+            if (index == 0)
+                return true;
+
+            index = index < 0 ? index = category.length : index -1;
+
+            if (category.substring(0, index) == filter.substring(0, index))
+                return true;
+        }
+        return false;
+    }
+
+    private static function checkCategory(category:String):void
+    {
+        var message:String;
+        
+        if (category == null || category.length == 0)
+        {
+            throw new IllegalOperationError("checkCategory function did not receive null object.");
+        }
+
+        if (hasIllegalCharacters(category) || (category.indexOf("*") != -1))
+        {
+            throw new IllegalOperationError("checkCategory function did not receive invalid characters.");
+        }
+    }
+    
+    private static function resetTargetLevel():void
+    {	
+    	var res:int = 0;
+        for (var i:int = 0; i < _targets.length; i++)
+        {
+            res = ( res | (_targets[i].mask) );
+        }
+        _targetLevel = res;
+    }
+}
+
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/logging/LogEvent.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/logging/LogEvent.as b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/logging/LogEvent.as
new file mode 100644
index 0000000..d90098d
--- /dev/null
+++ b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/logging/LogEvent.as
@@ -0,0 +1,87 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+package com.adobe.linguistics.spelling.core.logging
+{
+
+import flash.events.Event;
+
+public class LogEvent extends Event
+{
+    public static const eventID:String = "com.adobe.linguistics.spelling.core.logging.LogEvent";
+
+    public static function getLevelString(value:uint):String
+    {
+        switch (value)
+        {
+            case LogEventLevel.INFO:
+			{
+                return "INFO";
+			}
+
+            case LogEventLevel.DEBUG:
+			{
+                return "DEBUG";
+            }
+
+            case LogEventLevel.ERROR:
+			{
+                return "ERROR";
+            }
+
+            case LogEventLevel.WARN:
+			{
+                return "WARN";
+            }
+
+            case LogEventLevel.FATAL:
+			{
+                return "FATAL";
+            }
+
+            case LogEventLevel.ALL:
+			{
+                return "ALL";
+            }
+		}
+
+		return "UNKNOWN";
+    }
+
+    public function LogEvent(message:String = "",
+							 level:int = 31 /* LogEventLevel.ALL */)
+    {
+        super(LogEvent.eventID, false, false);
+
+        this.message = message;
+        this.level = level;
+    }
+
+    public var level:int;
+
+    public var message:String;
+
+    override public function clone():Event
+    {
+        return new LogEvent(message, /*type,*/ level);
+    }
+}
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/logging/LogEventLevel.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/logging/LogEventLevel.as b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/logging/LogEventLevel.as
new file mode 100644
index 0000000..a12098b
--- /dev/null
+++ b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/logging/LogEventLevel.as
@@ -0,0 +1,76 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+package com.adobe.linguistics.spelling.core.logging
+{
+	import flash.errors.IllegalOperationError;
+public final class LogEventLevel
+{
+	    public static const FATAL:int = 16;
+	
+	    public static const ERROR:int = 8;
+	    
+	    public static const WARN:int = 4;
+	    
+	    public static const INFO:int = 2;
+	    
+	    public static const DEBUG:int = 1;
+	    
+	    public static const ALL:int = (DEBUG | INFO | WARN | ERROR | FATAL);
+	
+	    public static const NONE:int = 0;
+	    
+	    public static const LoggerLevelList:Array = [DEBUG, INFO, WARN, ERROR, FATAL, ALL];
+    
+		public static function isValidLevel(level:int) :Boolean {
+			for ( var i:int = 0; i < LoggerLevelList.length ; ++i ) {
+				if ( (LoggerLevelList[i] == level) )
+					return true;
+			}
+			return false;
+		}
+		
+		public static function isValidMask(mask:int ):Boolean {
+			var allMask:int = 0;
+			for ( var i:int = 0; i< LoggerLevelList.length; ++i ) {
+				allMask = (allMask | (LoggerLevelList[i]));
+			}
+			if ( (allMask | mask ) == allMask ) return true;
+			return false;
+		}
+		
+		public static function getUpperMask(level:int ) :int {
+			var result:int = 0;
+			if ( !isValidLevel(level) ) {
+				throw new IllegalOperationError("Please input an valid level for getUpperMask.");
+			} 
+			if ( level == ALL) return level;
+			for ( var i:int =0; i< LoggerLevelList.length; ++i ) {
+				if ( (LoggerLevelList[i] >= level) && (LoggerLevelList[i] < ALL) ) {
+					result =result | LoggerLevelList[i];
+				}
+			}
+			return result;
+		}
+
+
+}
+
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/logging/LogLogger.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/logging/LogLogger.as b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/logging/LogLogger.as
new file mode 100644
index 0000000..b5a23be
--- /dev/null
+++ b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/logging/LogLogger.as
@@ -0,0 +1,102 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+package com.adobe.linguistics.spelling.core.logging
+{
+	import flash.errors.IllegalOperationError;
+	import flash.events.EventDispatcher;
+public class LogLogger extends EventDispatcher implements ILogger
+{
+	public function LogLogger(category:String)
+	{
+		super();
+
+		_category = category;
+	}
+
+	/**
+	 *  @private
+	 *  Storage for the category property.
+	 */
+	private var _category:String;
+
+	/**
+	 *  The category this logger send messages for.
+	 *  
+	 */	
+	public function get category():String
+	{
+		return _category;
+	}
+	
+	public function log(level:int, msg:String, ... rest):void
+	{
+		dispatchLoggerEvent( level, msg, rest);
+	}
+
+	public function debug(msg:String, ... rest):void
+	{
+		dispatchLoggerEvent( LogEventLevel.DEBUG, msg, rest);
+	}
+
+	public function error(msg:String, ... rest):void
+	{
+		dispatchLoggerEvent( LogEventLevel.ERROR, msg, rest);
+	}
+
+	public function fatal(msg:String, ... rest):void
+	{
+		dispatchLoggerEvent( LogEventLevel.FATAL, msg, rest);
+	}
+
+	public function info(msg:String, ... rest):void
+	{
+		dispatchLoggerEvent( LogEventLevel.INFO, msg, rest);
+	}
+
+	public function warn(msg:String, ... rest):void
+	{
+		dispatchLoggerEvent( LogEventLevel.WARN, msg, rest);
+	}
+	
+	private function dispatchLoggerEvent(level:int, msg:String, options:Array):void {
+		// we don't want to allow people to log messages at the 
+		// Log.Level.ALL level, so throw a RTE if they do
+		if ( !LogEventLevel.isValidLevel( level ) )
+		{
+			throw new IllegalOperationError("Please check for level permit.");
+		}
+        	
+		if (hasEventListener(LogEvent.eventID))
+		{
+			// replace all of the parameters in the msg string
+			for (var i:int = 0; i < options.length; i++)
+			{
+				msg = msg.replace(new RegExp("\\{"+i+"\\}", "g"), options[i]);
+			}
+
+			dispatchEvent(new LogEvent(msg, level));
+		}
+		
+	}
+	
+}
+
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/logging/targets/ArrayTarget.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/logging/targets/ArrayTarget.as b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/logging/targets/ArrayTarget.as
new file mode 100644
index 0000000..61a5a4a
--- /dev/null
+++ b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/logging/targets/ArrayTarget.as
@@ -0,0 +1,35 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+package com.adobe.linguistics.spelling.core.logging.targets
+{
+	public class ArrayTarget extends CollectionTarget
+	{
+		public var items:Array;
+		public function ArrayTarget(arr:Array, usingLevelMaskMode:Boolean = false)
+		{
+			this.items = arr;
+			super(usingLevelMaskMode);
+		}
+		public override function internalLog(msg:String,lvl:int):void {
+			items.push( {date:this.date, time:this.time, category:this.category, levelString:this.levelString, message:msg, level:lvl } );
+		}
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/logging/targets/CollectionTarget.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/logging/targets/CollectionTarget.as b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/logging/targets/CollectionTarget.as
new file mode 100644
index 0000000..b355f04
--- /dev/null
+++ b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/logging/targets/CollectionTarget.as
@@ -0,0 +1,107 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+package com.adobe.linguistics.spelling.core.logging.targets
+{
+	import com.adobe.linguistics.spelling.core.logging.*;
+	public class CollectionTarget extends AbstractTarget
+	{
+	    public var fieldSeparator:String = " ";
+	
+	    public var includeCategory:Boolean;
+	
+	    public var includeDate:Boolean;
+	
+	    public var includeLevel:Boolean;
+	
+	    public var includeTime:Boolean;
+
+	    protected var date:String = "";
+	    protected var time:String = "";
+	    protected var levelString:String = "";
+	    protected var category:String = "";
+		
+		public function CollectionTarget(usingLevelMaskMode:Boolean = false)
+		{
+	        super(usingLevelMaskMode);
+	        includeTime = false;
+	        includeDate = false;
+	        includeCategory = false;
+	        includeLevel = false;
+		}
+
+	    override public function logEvent(event:LogEvent):void
+	    {
+	    	date = "";
+	    	time = "";
+	    	levelString = "";
+	    	category = "";
+	        if (includeDate || includeTime)
+	        {
+	            var d:Date = new Date();
+	            if (includeDate)
+	            {
+	                date = Number(d.getMonth() + 1).toString() + "/" +
+	                       d.getDate().toString() + "/" + 
+	                       d.getFullYear();
+	            }   
+	            if (includeTime)
+	            {
+	                time += padTime(d.getHours()) + ":" +
+	                        padTime(d.getMinutes()) + ":" +
+	                        padTime(d.getSeconds()) + "." +
+	                        padTime(d.getMilliseconds(), true);
+	            }
+	        }
+	        
+	        if (includeLevel)
+	        {
+	            levelString = LogEvent.getLevelString(event.level);
+	        }
+	
+	        category = includeCategory ? ILogger(event.target).category:"";
+	
+	        internalLog(event.message,event.level);
+	    }
+	    
+	    private function padTime(num:Number, millis:Boolean = false):String
+	    {
+	        if (millis)
+	        {
+	            if (num < 10)
+	                return "00" + num.toString();
+	            else if (num < 100)
+	                return "0" + num.toString();
+	            else 
+	                return num.toString();
+	        }
+	        else
+	        {
+	            return num > 9 ? num.toString() : "0" + num.toString();
+	        }
+	    }
+	
+	    public function internalLog(message:String, level:int):void
+	    {
+	        // override this method to perform the redirection to the desired output
+	    }
+
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/logging/targets/LineFormattedTarget.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/logging/targets/LineFormattedTarget.as b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/logging/targets/LineFormattedTarget.as
new file mode 100644
index 0000000..c1b66eb
--- /dev/null
+++ b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/logging/targets/LineFormattedTarget.as
@@ -0,0 +1,104 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+package com.adobe.linguistics.spelling.core.logging.targets
+{
+	import com.adobe.linguistics.spelling.core.logging.*;
+public class LineFormattedTarget extends AbstractTarget
+{
+    public function LineFormattedTarget(usingLevelMaskMode:Boolean = false)
+    {
+        super(usingLevelMaskMode);
+
+        includeTime = false;
+        includeDate = false;
+        includeCategory = false;
+        includeLevel = false;
+    }
+
+    public var fieldSeparator:String = " ";
+
+    public var includeCategory:Boolean;
+
+    public var includeDate:Boolean;
+
+    public var includeLevel:Boolean;
+
+    public var includeTime:Boolean;
+
+    override public function logEvent(event:LogEvent):void
+    {
+        var date:String = ""
+        if (includeDate || includeTime)
+        {
+            var d:Date = new Date();
+            if (includeDate)
+            {
+                date = Number(d.getMonth() + 1).toString() + "/" +
+                       d.getDate().toString() + "/" + 
+                       d.getFullYear() + fieldSeparator;
+            }   
+            if (includeTime)
+            {
+                date += padTime(d.getHours()) + ":" +
+                        padTime(d.getMinutes()) + ":" +
+                        padTime(d.getSeconds()) + "." +
+                        padTime(d.getMilliseconds(), true) + fieldSeparator;
+            }
+        }
+        
+        var level:String = "";
+        if (includeLevel)
+        {
+            level = "[" + LogEvent.getLevelString(event.level) +
+                    "]" + fieldSeparator;
+        }
+
+        var category:String = includeCategory ?
+                              ILogger(event.target).category + fieldSeparator :
+                              "";
+
+        internalLog(date + category+ level  + event.message,event.level);
+    }
+    
+    private function padTime(num:Number, millis:Boolean = false):String
+    {
+        if (millis)
+        {
+            if (num < 10)
+                return "00" + num.toString();
+            else if (num < 100)
+                return "0" + num.toString();
+            else 
+                return num.toString();
+        }
+        else
+        {
+            return num > 9 ? num.toString() : "0" + num.toString();
+        }
+    }
+
+    public function internalLog(message:String, level:int):void
+    {
+        // override this method to perform the redirection to the desired output
+    }
+}
+
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/logging/targets/TextFieldTarget.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/logging/targets/TextFieldTarget.as b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/logging/targets/TextFieldTarget.as
new file mode 100644
index 0000000..bb4d75b
--- /dev/null
+++ b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/logging/targets/TextFieldTarget.as
@@ -0,0 +1,52 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+package com.adobe.linguistics.spelling.core.logging.targets
+{
+    
+    import flash.text.TextField;
+    public class TextFieldTarget extends LineFormattedTarget 
+    {
+        public var autoScroll:Boolean = true ;
+        public var textfield:TextField ;
+
+        public function TextFieldTarget( textfield:TextField,usingLevelMaskMode:Boolean = false )
+        {
+            super(usingLevelMaskMode);
+            this.textfield = textfield ;
+        }
+        
+        public override function internalLog( message:String , level:int ):void
+        {
+            if ( textfield != null )
+            {
+				textfield.appendText( message + "\r");
+                if ( autoScroll )
+                {
+                    textfield.scrollV  = textfield.maxScrollV ;
+                }
+            }
+            else
+            {
+                throw new ReferenceError( "The internal textfield reference of the target not must be null." ) ;
+            }
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/logging/targets/TraceTarget.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/logging/targets/TraceTarget.as b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/logging/targets/TraceTarget.as
new file mode 100644
index 0000000..5571fcd
--- /dev/null
+++ b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/logging/targets/TraceTarget.as
@@ -0,0 +1,37 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+package com.adobe.linguistics.spelling.core.logging.targets
+{
+
+public class TraceTarget extends LineFormattedTarget
+{
+    public function TraceTarget(usingLevelMaskMode:Boolean = false)
+    {
+        super(usingLevelMaskMode);
+    }
+
+    public override function internalLog(message:String,level:int):void
+    {
+        trace(message);
+    }
+}
+
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/rule/AffixEntry.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/rule/AffixEntry.as b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/rule/AffixEntry.as
new file mode 100644
index 0000000..4ec678d
--- /dev/null
+++ b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/rule/AffixEntry.as
@@ -0,0 +1,137 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+package com.adobe.linguistics.spelling.core.rule
+{
+	import com.adobe.linguistics.spelling.core.LinguisticRule;
+	
+	public class AffixEntry
+	{
+		private var _flag:int;
+		private var _stripValue:String; /*stripping characters from beginning (at prefix rules) or end (at suffix rules) of the word  */
+		private var _affixValue:String; /* affix (optionally with flags of continuation classes, separated by a slash)  */
+		private var _conditionString:String; /*Zero stripping or affix are indicated by zero. 
+		Zero condition is indicated by dot. Condition is a simplified, regular expression-like pattern, 
+		which must be met before the affix can be applied. (Dot signs an arbitrary character. Characters 
+		in braces sign an arbitrary character from the character subset. Dash hasn’t got special meaning, 
+		but circumflex (^) next the first brace sets the complementer character set.)  */
+		private var _conditionPattern:RegExp;
+		private var _permissionToCombine:Boolean; /* Cross product (permission to combine prefixes and suffixes). Possible values: Y (yes) or N (no) */
+		private var _type:int; // 0 means prefix, 1 means suffix...
+		private var _morphologicalFields:String; //Optional morphological fields separated by spaces or tabulators. 
+		private var _contclass:String; //Added for Double affix support
+		
+		private var _attrMgr:LinguisticRule;		
+
+		
+		public function AffixEntry(affixFlag:int, stripString:String, affixValue:String, conditionStr:String, morph:String = "", permission:Boolean = false, affixType:int = 0, contclass:String=null)
+		{
+			this.flag = affixFlag;
+			this.conditionString = conditionStr;
+			this.stripValue = stripString;
+			this.affixKey = affixValue;
+			this.permissionToCombine = permission;
+			this.type = affixType;
+			this.morphologicalFields = morph;
+			this.attributeManager = null;
+			this.contclass=contclass;//can be null too
+			this._conditionPattern = (affixType == 0) ? new RegExp("^"+conditionStr+".*"+"$"): new RegExp("^"+".*"+conditionStr+"$");
+		}
+		
+		public function set attributeManager( attrMgr:LinguisticRule):void {
+			this._attrMgr = attrMgr;
+		}
+		
+		public function get attributeManager( ):LinguisticRule {
+			return this._attrMgr;
+		}
+		
+		public function set morphologicalFields(value:String):void {
+			this._morphologicalFields = value;
+		}
+		
+		public function get morphologicalFields():String {
+			return this._morphologicalFields;
+		}
+		
+		public function set permissionToCombine(value:Boolean) : void {
+			this._permissionToCombine = value;
+		}
+		
+		public function get permissionToCombine():Boolean {
+			return this._permissionToCombine;
+		}
+		
+		public function get flag():int {
+			return this._flag;
+		}
+		public function set flag(affixFlag:int):void {
+			this._flag = affixFlag;
+		}
+		
+		public function get type():int {
+			return this._type;
+		}
+		
+		public function set type(affixType:int):void {
+			this._type = affixType;
+		}
+		
+		public function set stripValue(value:String):void {
+			this._stripValue = value;
+		} 
+		
+		public function get stripValue():String {
+			return this._stripValue;
+		}
+		
+		public function set affixKey(value:String):void {
+			this._affixValue = value;
+		}
+		
+		public function get affixKey():String {
+			return this._affixValue;
+		}
+		
+		public function set contclass(value:String):void {
+			this._contclass = value;
+		}
+		
+		public function get contclass():String {
+			return this._contclass;
+		}
+		
+		public function get conditionString():String {
+			return this._conditionString;
+		}
+		
+		public function set conditionString(value:String):void {
+			this._conditionString  = value;
+		}
+		
+		public function get conditionPattern():RegExp {
+			return this._conditionPattern;
+		}
+		public function set conditionPattern(value:RegExp):void {
+			this._conditionPattern = value;
+		}
+
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/rule/AffixRule.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/rule/AffixRule.as b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/rule/AffixRule.as
new file mode 100644
index 0000000..2633bd6
--- /dev/null
+++ b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/rule/AffixRule.as
@@ -0,0 +1,92 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+package  com.adobe.linguistics.spelling.core.rule
+{
+	
+	public class AffixRule
+	{
+		private var _name:String;
+		private var _type:uint;
+		private var _stripValue:String;
+		private var _affixValue:String;
+		private var _conditionPattern:String;
+		private var _permissionToCombine:Boolean;
+		
+		public function AffixRule(affixName:String, affixType:uint, stripString:String, affixString:String, conditionString:String, permission:Boolean = true)
+		{
+			this.name = affixName;
+			this._conditionPattern = conditionString;
+			this.type = affixType;
+			this.stripValue = stripString;
+			this.affixValue = affixString;
+			this.permissionToCombine = permission;
+			
+		}
+		
+		public function set permissionToCombine(value:Boolean) : void {
+			this._permissionToCombine = value;
+		}
+		
+		public function get permissionToCombine():Boolean {
+			return this._permissionToCombine;
+		}
+		
+		public function get name():String {
+			return this._name;
+		}
+		public function set name(affixName:String):void {
+			this._name = affixName;
+		}
+		
+		public function get type():uint {
+			return this._type;
+		}
+		
+		public function set type(affixType:uint):void {
+			this._type = affixType;
+		}
+		
+		public function set stripValue(value:String):void {
+			this._stripValue = value;
+		} 
+		
+		public function get stripValue():String {
+			return this._stripValue;
+		}
+		
+		public function set affixValue(value:String):void {
+			this._affixValue = value;
+		}
+		
+		public function get affixValue():String {
+			return this._affixValue;
+		}
+		
+		public function get conditionPattern():String {
+			return this._conditionPattern;
+		}
+		
+		public function set conditionPattern(value:String):void {
+			this._conditionPattern  = value;
+		}
+
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/rule/MapFilter.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/rule/MapFilter.as b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/rule/MapFilter.as
new file mode 100644
index 0000000..3c241ed
--- /dev/null
+++ b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/rule/MapFilter.as
@@ -0,0 +1,39 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+package  com.adobe.linguistics.spelling.core.rule
+{
+	
+	public class MapFilter
+	{
+		private var _mapCharSet:String;
+		public function MapFilter(mapString:String)
+		{
+			this.mapCharSet = mapString;
+		}
+		public function get mapCharSet():String {
+			return this._mapCharSet;
+		}
+		public function set mapCharSet(value:String) : void {
+			this._mapCharSet = value;
+		}
+
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/rule/OptimizedPrefixEntry.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/rule/OptimizedPrefixEntry.as b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/rule/OptimizedPrefixEntry.as
new file mode 100644
index 0000000..b448338
--- /dev/null
+++ b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/rule/OptimizedPrefixEntry.as
@@ -0,0 +1,245 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+package com.adobe.linguistics.spelling.core.rule
+{
+	import com.adobe.linguistics.spelling.core.HashEntry;
+	import com.adobe.linguistics.spelling.core.env.InternalConstants;
+	public class OptimizedPrefixEntry extends AffixEntry
+	{
+		private var _flagNext:OptimizedPrefixEntry;
+		private var _keyNext:OptimizedPrefixEntry;
+		private var _flags:Array;
+		private var _pfxTable:Array;
+		public function OptimizedPrefixEntry(pfxEntry:PrefixEntry)
+		{
+			
+			super(pfxEntry.flag,pfxEntry.stripValue,pfxEntry.affixKey,pfxEntry.conditionString,pfxEntry.morphologicalFields, pfxEntry.permissionToCombine, 0,pfxEntry.contclass);
+			_flags = new Array();
+			this._pfxTable = new Array();
+			this.nextElementWithFlag = null;
+			this.nextElementWithKey = null;
+			_flags.push(this.flag);
+			this._pfxTable.push(pfxEntry);
+			this.flag = -1;
+			this.conditionString = "";
+		}
+
+		public function isSimilarObject(pfxEntry:PrefixEntry):Boolean {
+			var chkString:String=this.contclass+pfxEntry.contclass;
+			if(chkString)chkString=chkString.split('').sort().join('').replace(/(.)\1+/gi,'$1');//this pattern removes any repetition from strings. this will work only because we are converting n' or q' to Long numbers in decode flags
+			if ( (this.stripValue == pfxEntry.stripValue) && (this.affixKey == pfxEntry.affixKey) && (this.permissionToCombine == pfxEntry.permissionToCombine) && (this.morphologicalFields == pfxEntry.morphologicalFields)&&(this.contclass==chkString) )	return true;
+			return false;
+		} 
+		
+		public function extendObject( pfxEntry:PrefixEntry ):Boolean {
+			if ( !isSimilarObject(pfxEntry) )	{
+				return false;
+			}
+			_flags.push( pfxEntry.flag);
+			this._pfxTable.push( pfxEntry );
+		
+			var newConditionString:String;
+			newConditionString = this.conditionPattern.source + "|" + "^"+pfxEntry.conditionString+".*"+"$";
+			this.conditionPattern  = new RegExp ( newConditionString);
+			this.contclass=pfxEntry.contclass;
+			return true;
+		}
+
+		public function get nextElementWithKey():OptimizedPrefixEntry {
+			return this._keyNext;
+		}
+		
+		public function set nextElementWithKey(pfxEntry:OptimizedPrefixEntry):void {
+			this._keyNext = pfxEntry;
+		}
+		
+		public function get nextElementWithFlag():OptimizedPrefixEntry {
+			return this._flagNext;
+		}
+		
+		public function set nextElementWithFlag(pfxEntry:OptimizedPrefixEntry):void {
+			this._flagNext = pfxEntry;
+		}
+		
+		public function get flags():Array {
+			return this._flags;
+		}
+
+		/*
+		 * Deprecated function for now...
+		 * History: 
+		 *          A pre-version of implementation for error detection. After I optimized the code for performance,
+		 *          I drop this function by that time, but you know performance meassuring is a tricky problem... 
+		 * ToDo: Need a revisit when we implementing complex-affix support and compound-word support.
+		 */
+		// check if this prefix entry matches
+		public function checkWord( word:String, sfxopts:int, ppfx:AffixEntry, inCompound:int, needFlag:int):HashEntry {
+			var disLen:int = word.length - this.affixKey.length;
+			var he:HashEntry = null;
+			var i:int;
+			// if this suffix is being cross checked with a prefix
+			// but it does not support cross products skip it
+			if ( (sfxopts& InternalConstants.aeXPRODUCT) != 0 && this.permissionToCombine != true ) return null;
+			// on entry prefix is 0 length or already matches the beginning of the word.
+			// So if the remaining root word has positive length
+			// and if there are enough chars in root word and added back strip chars
+			// to meet the number of characters conditions, then test it
+			if ( disLen > 0 || (disLen == 0 && this.attributeManager.fullStrip) ) {
+				// generate new root word by removing prefix and adding
+				// back any characters that would have been stripped
+				word = this.stripValue + word.substr(this.affixKey.length);
+				// now make sure all of the conditions on characters
+				// are met.  Please see the appendix at the end of
+				// this file for more info on exactly what is being
+				// tested
+				// if all conditions are met then check if resulting
+				// root word in the dictionary
+				if ( this.conditionPattern.test( word ) ) {
+					// look word in hash table
+					for ( i=0; i < this.attributeManager.dictionaryManager.dictonaryList.length && !he; ++i ) {
+						he = this.attributeManager.dictionaryManager.dictonaryList[i].getElement(word);
+						while( he ) {
+							if ( he.testAffixs(this._flags) && ( (!needFlag) || he.testAffix(needFlag) ) ) {
+								return he;
+							}
+							he = he.next;
+						}
+					}
+				} 
+				
+			}
+			return he;
+		}
+
+		// check if this prefix entry matches
+		public function checkWord2( word:String, inCompound:int, needFlag:int):HashEntry {
+			var disLen:int = word.length - this.affixKey.length;
+			var he:HashEntry = null;
+			var i:int,j:int;
+			// on entry prefix is 0 length or already matches the beginning of the word.
+			// So if the remaining root word has positive length
+			// and if there are enough chars in root word and added back strip chars
+			// to meet the number of characters conditions, then test it
+			if ( disLen > 0 || (disLen == 0 && this.attributeManager.fullStrip) ) {
+				// generate new root word by removing prefix and adding
+				// back any characters that would have been stripped
+				word = this.stripValue + word.substr(this.affixKey.length);
+				// now make sure all of the conditions on characters
+				// are met.  Please see the appendix at the end of
+				// this file for more info on exactly what is being
+				// tested
+				// if all conditions are met then check if resulting
+				// root word in the dictionary
+				if ( this.conditionPattern.test( word ) ) {
+					// look word in hash table
+					for ( i=0; i < this.attributeManager.dictionaryManager.dictonaryList.length && !he; ++i ) {
+						he = this.attributeManager.dictionaryManager.dictonaryList[i].getElement(word);
+						while( he ) {
+							if ( he.testAffixs(this._flags) && ( (!needFlag) || he.testAffix(needFlag) ) ) {
+								for ( j=0;j<this._pfxTable.length;++j) {
+									if ( (this._pfxTable[j] ).conditionPattern.test(word) ) {
+										if ( he.testAffix(this._flags[j]) ){
+											return he;
+										}
+									}
+								}
+							}
+							he = he.next;
+						}
+					}
+					//if ((opts & aeXPRODUCT) && in_compound)
+					if ( this.permissionToCombine ) {
+						for(i=0; j<this.flags[i];i++)
+						{
+							he = this.attributeManager.optSuffixCheck2(word, InternalConstants.aeXPRODUCT,this, needFlag, inCompound,this.flags[i]);
+							
+							if (he) 
+							{
+							
+								for ( j=0;j<this._pfxTable.length;++j) 
+								{
+									if ( (this._pfxTable[j] ).conditionPattern.test(word) && (this._pfxTable[j].flag ==this.flags[i]) )
+									{
+										
+											return he;
+										
+									}
+								}
+							he = null;	
+							} 
+						}
+					}
+				} 
+				
+			}
+			return he;
+		}
+		 
+		//checkTwoWord
+		public function checkTwoWord( word:String, inCompound:int, needFlag:int):HashEntry {
+			var disLen:int = word.length - this.affixKey.length;
+			var he:HashEntry = null;
+			var i:int,j:int;
+			// on entry prefix is 0 length or already matches the beginning of the word.
+			// So if the remaining root word has positive length
+			// and if there are enough chars in root word and added back strip chars
+			// to meet the number of characters conditions, then test it
+			if ( disLen > 0 || (disLen == 0 && this.attributeManager.fullStrip) ) {
+				// generate new root word by removing prefix and adding
+				// back any characters that would have been stripped
+				word = this.stripValue + word.substr(this.affixKey.length);
+				// now make sure all of the conditions on characters
+				// are met.  Please see the appendix at the end of
+				// this file for more info on exactly what is being
+				// tested
+				// if all conditions are met then check if resulting
+				// root word in the dictionary
+				if ( this.conditionPattern.test( word ) ) {
+					// do not look word in hash table
+					
+					//if ((opts & aeXPRODUCT) && in_compound)
+					if ( this.permissionToCombine && inCompound!=1/*IN_CPD_BEGIN*/) {//TODO: figure this constant
+						for(i=0; j<this.flags[i];i++)
+						{
+						
+							he = this.attributeManager.optTwoSuffixCheck(word, InternalConstants.aeXPRODUCT,this,needFlag,this.flags[i]);//this is the c2
+							if (he) {
+								for ( j=0;j<this._pfxTable.length;++j) { //Squiggly will handle undrinkables from here
+									if ( (this._pfxTable[j] ).conditionPattern.test(word)&& (this._pfxTable[j].flag ==this.flags[i]) ) 
+									{
+									
+											return he;
+										
+									}
+								}
+								he = null;
+							}
+						}
+					}
+				} 
+				
+			}
+			return he;
+		}
+		//--
+
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/rule/OptimizedSuffixEntry.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/rule/OptimizedSuffixEntry.as b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/rule/OptimizedSuffixEntry.as
new file mode 100644
index 0000000..7d6ee58
--- /dev/null
+++ b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/rule/OptimizedSuffixEntry.as
@@ -0,0 +1,301 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+package com.adobe.linguistics.spelling.core.rule
+{
+	import com.adobe.linguistics.spelling.core.HashEntry;
+	import com.adobe.linguistics.spelling.core.env.InternalConstants;
+	import com.adobe.linguistics.spelling.core.utils.StringUtils;
+	
+	public class OptimizedSuffixEntry  extends AffixEntry
+	{
+		private var _flagNext:OptimizedSuffixEntry;
+		private var _keyNext:OptimizedSuffixEntry;
+		private var _flags:Array;
+		private var _sfxTable:Array;
+		private var _reverseAffixKey:String;
+		public function OptimizedSuffixEntry(sfxEntry:SuffixEntry)
+		{
+			super(sfxEntry.flag,sfxEntry.stripValue,sfxEntry.affixKey,sfxEntry.conditionString,sfxEntry.morphologicalFields, sfxEntry.permissionToCombine, sfxEntry.type,sfxEntry.contclass);
+			_flags = new Array();
+			_sfxTable = new Array();
+			this.nextElementWithFlag = null;
+			this.nextElementWithKey = null;
+			_flags.push(this.flag);
+			_sfxTable.push(sfxEntry);
+			this.reverseAffixKey = StringUtils.reverseString(this.affixKey);
+			this.flag = -1;
+			this.conditionString = "";
+		}
+		
+		public function isSimilarObject(sfxEntry:SuffixEntry):Boolean {
+			var chkString:String=this.contclass+sfxEntry.contclass;
+			if(chkString)chkString=chkString.split('').sort().join('').replace(/(.)\1+/gi,'$1');//this pattern removes any repetition from strings. this will work only because we are converting n' or q' to Long numbers in decode flags
+			if ( (this.stripValue == sfxEntry.stripValue) && (this.affixKey == sfxEntry.affixKey) && (this.permissionToCombine == sfxEntry.permissionToCombine) && (this.morphologicalFields == sfxEntry.morphologicalFields) &&(this.contclass==chkString) )	return true;
+			return false;
+		} 
+		
+		public function extendObject( sfxEntry:SuffixEntry ):Boolean {
+			
+			 if ( !isSimilarObject(sfxEntry) ) return false;
+			_flags.push(sfxEntry.flag);
+			_sfxTable.push(sfxEntry);
+			var newConditionString:String;
+			newConditionString = this.conditionPattern.source + "|" + "^"+".*"+sfxEntry.conditionString+"$";
+			this.conditionPattern  = new RegExp ( newConditionString);
+			//now add in contclass
+			this.contclass=sfxEntry.contclass;
+			return true;
+		}
+		
+		public function set reverseAffixKey(value:String):void {
+			this._reverseAffixKey = value;
+		}
+		
+		public function get reverseAffixKey():String {
+			return this._reverseAffixKey;
+		}
+		
+		public function get nextElementWithKey():OptimizedSuffixEntry {
+			return this._keyNext;
+		}
+		
+		public function set nextElementWithKey(pfxEntry:OptimizedSuffixEntry):void {
+			this._keyNext = pfxEntry;
+		}
+		
+		public function get nextElementWithFlag():OptimizedSuffixEntry {
+			return this._flagNext;
+		}
+		
+		public function set nextElementWithFlag(pfxEntry:OptimizedSuffixEntry):void {
+			this._flagNext = pfxEntry;
+		}
+		
+		public function get flags():Array {
+			return this._flags;
+		}
+		
+		/*
+		 * Deprecated function for now...
+		 * History: 
+		 *          A pre-version of implementation for error detection. After I optimized the code for performance,
+		 *          I drop this function by that time, but you know performance meassuring is a tricky problem... 
+		 * ToDo: Need a revisit when we implementing complex-affix support and compound-word support.
+		 */
+		// see if this suffix is present in the word
+		public function checkWord( word:String, needFlag:int, inCompound:int):HashEntry {
+			var disLen:int = word.length - this.affixKey.length;
+			var he:HashEntry = null;
+			var i:int;
+
+			// upon entry suffix is 0 length or already matches the end of the word.
+			// So if the remaining root word has positive length
+			// and if there are enough chars in root word and added back strip chars
+			// to meet the number of characters conditions, then test it
+			if ( (disLen > 0 || (disLen == 0 && this.attributeManager.fullStrip)) ) {
+				// generate new root word by removing suffix and adding
+				// back any characters that would have been stripped or
+				// or null terminating the shorter string
+				word = word.substr(0, word.length - this.affixKey.length) + this.stripValue;
+				// now make sure all of the conditions on characters
+				// are met.  Please see the appendix at the end of
+				// this file for more info on exactly what is being
+				// tested
+				// if all conditions are met then check if resulting
+				// root word in the dictionary
+				if ( this.conditionPattern.test( word ) ) {
+					// look word in hash table
+					for ( i=0; i < this.attributeManager.dictionaryManager.dictonaryList.length && !he; ++i ) {
+						he = this.attributeManager.dictionaryManager.dictonaryList[i].getElement(word);
+						while( he ) {
+							if ( he.testAffixs(this._flags) && ( (!needFlag) || he.testAffix(needFlag) ) ) {
+								return he;
+							}
+							he = he.next;
+						}
+					}
+					//if ((opts & aeXPRODUCT) && in_compound)
+					if ( this.permissionToCombine ) {
+						he = this.attributeManager.optPrefixCheck(word, InternalConstants.aeXPRODUCT,this, needFlag, inCompound);
+						if (he) return he; 
+					}
+				} 
+				
+			}
+			return he;
+		}
+		
+		//for develepors only, function used for printing flags when flag_mode=FLAG.LONG presently not being called anywhere
+		public function printFlag(flag:Number):void{
+			var result:String =  String.fromCharCode(flag>>8) + String.fromCharCode(flag-((flag>>8)<<8));
+			var x:String= this.affixKey;
+		}
+		// see if this suffix is present in the word
+		public function checkWord2( word:String, sfxopts:int, ppfx:AffixEntry, needFlag:int, inCompound:int, cclass:int, pfxcclass:int=0):HashEntry {
+			var disLen:int = word.length - this.affixKey.length;
+			var he:HashEntry = null;
+			var i:int;
+
+			// if this suffix is being cross checked with a prefix
+			// but it does not support cross products skip it
+			if ( (sfxopts& InternalConstants.aeXPRODUCT) != 0 && this.permissionToCombine != true ) return null;
+
+			// upon entry suffix is 0 length or already matches the end of the word.
+			// So if the remaining root word has positive length
+			// and if there are enough chars in root word and added back strip chars
+			// to meet the number of characters conditions, then test it
+			if ( (disLen > 0 || (disLen == 0 && this.attributeManager.fullStrip)) ) {
+				// generate new root word by removing suffix and adding
+				// back any characters that would have been stripped or
+				// or null terminating the shorter string
+				word = word.substr(0, word.length - this.affixKey.length) + this.stripValue;
+				// now make sure all of the conditions on characters
+				// are met.  Please see the appendix at the end of
+				// this file for more info on exactly what is being
+				// tested
+				// if all conditions are met then check if resulting
+				// root word in the dictionary
+				if ( this.conditionPattern.test( word ) ) {
+					// look word in hash table
+					for ( i=0; i < this.attributeManager.dictionaryManager.dictonaryList.length && !he; ++i ) {
+						he = this.attributeManager.dictionaryManager.dictonaryList[i].getElement(word);
+						while( he ) {
+							if (  (( he.testAffixs(this._flags) ) && ( (!needFlag) || he.testAffix(needFlag) ))||(ppfx && ppfx.contclass) ) {
+								for ( var j:int=0;j<this._sfxTable.length;++j) {
+									if ( (this._sfxTable[j] ).conditionPattern.test(word) ) {
+										if(!ppfx)
+										{
+											if(cclass)
+											{
+												if (he.testAffix(this._flags[j]) && HashEntry.TESTAFF(this.contclass,cclass) )//should handle cases like drink->able->s also in un-run-able-s if run-->able and able-->s and s-->un this should suffice
+													return he;
+											}
+											else											
+											{	if(he.testAffix(this._flags[j]))//should handle all normal cases like drink->able or drink->s
+												return he;
+											}
+											
+																						
+										}
+										else
+										{
+											if(this.contclass && he.testAffix(this._flags[j]) && HashEntry.TESTAFF(this.contclass,cclass) && !pfxcclass) // handle when suffix has contclass like l'->autre->s
+											{
+											return he;
+											}
+											if(ppfx.contclass && HashEntry.TESTAFF(ppfx.contclass,this._flags[j]) && he.testAffix(cclass) && !pfxcclass) //handle when prefix has contclass like milli->litre->s
+											{
+												return he;	
+											}
+											if(he.testAffix(this._flags[j]) && he.testAffix(cclass))//handle normal cases when both pfx and sfx exist in hash affix string
+											{
+											return he;
+											}
+											
+											//special case of un-drink-able-s
+											if(    (he.testAffix(pfxcclass) && ppfx.contclass && HashEntry.TESTAFF(ppfx.contclass,this._flags[j]) && this.contclass && HashEntry.TESTAFF(this.contclass,cclass)) 
+											   ||  (he.testAffix(this._flags[j]) && this.contclass && HashEntry.TESTAFF(this.contclass,cclass) && HashEntry.TESTAFF(this.contclass,pfxcclass))
+											   )
+											{
+												return he;
+											}
+											
+																						
+										}
+											
+										}
+								}
+							}
+							he = he.next;
+						}
+					}
+
+				} 
+				
+			}
+			return he;
+		}
+		
+		// Function for two level suffix checkword
+		// see if this suffix is present in the word
+		public function checkTwoWord( word:String, sfxopts:int, ppfx:AffixEntry, needFlag:int, cclass:int, pfxcclass:int=0):HashEntry {
+			var disLen:int = word.length - this.affixKey.length;
+			var he:HashEntry = null;
+			var i:int;
+			
+			// if this suffix is being cross checked with a prefix
+			// but it does not support cross products skip it
+			if ( (sfxopts& InternalConstants.aeXPRODUCT) != 0 && this.permissionToCombine != true ) return null;
+			
+			// upon entry suffix is 0 length or already matches the end of the word.
+			// So if the remaining root word has positive length
+			// and if there are enough chars in root word and added back strip chars
+			// to meet the number of characters conditions, then test it
+			if ( (disLen > 0 || (disLen == 0 && this.attributeManager.fullStrip)) ) {
+				// generate new root word by removing suffix and adding
+				// back any characters that would have been stripped or
+				// or null terminating the shorter string
+				word = word.substr(0, word.length - this.affixKey.length) + this.stripValue;
+				// now make sure all of the conditions on characters
+				// are met.  Please see the appendix at the end of
+				// this file for more info on exactly what is being
+				// tested
+				// if all conditions are met then see if for conditional suffix and if this has been stripped by a possible
+				// contclass check the remaining word 
+				// eg: if drinkables was original word and after possible stripping of s we have drinkable very if 
+				// now check drinkable, able will be stripped and drink will be found that hash entry will then be returned
+				if ( this.conditionPattern.test( word ) ) {//checks a whole group of 
+					
+					if(ppfx)
+					{ //check for conditional suffix
+						if( contclass!=null && HashEntry.TESTAFF(contclass, pfxcclass))
+						{
+							he = this.attributeManager.optSuffixCheck2(word, 0, null,needFlag,0,cclass,pfxcclass);//we are not sending ppfx here as it will not be needed.
+						}
+						else
+						{
+							he = this.attributeManager.optSuffixCheck2(word, sfxopts, ppfx,needFlag,0,cclass,pfxcclass);
+						}
+					}
+					else
+					{
+						he = this.attributeManager.optSuffixCheck2(word, 0, null,needFlag,0,cclass,0);
+					}
+					if (he) {
+						for ( var j:int=0;j<this._sfxTable.length;++j) { //Squiggly will handle drink->able->s from here
+							if ( (this._sfxTable[j]).conditionPattern.test(word) && cclass==(this._sfxTable[j]).flag) {//only permit words which end with s in drinkables
+								
+									return he;
+							
+							}
+						}
+						he = null;
+					}
+					
+				} 
+				
+			}
+			
+			return he;
+		}
+		//--
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/rule/PrefixEntry.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/rule/PrefixEntry.as b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/rule/PrefixEntry.as
new file mode 100644
index 0000000..7df2e55
--- /dev/null
+++ b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/rule/PrefixEntry.as
@@ -0,0 +1,102 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+package com.adobe.linguistics.spelling.core.rule
+{
+	import com.adobe.linguistics.spelling.core.HashEntry;
+	import com.adobe.linguistics.spelling.core.env.InternalConstants;
+	public class PrefixEntry extends AffixEntry
+	{
+		private var _flagNext:PrefixEntry;
+		private var _keyNext:PrefixEntry;
+		public function PrefixEntry(affixFlag:int, stripString:String, affixValue:String, conditionString:String, morph:String = "", permission:Boolean = false,contclass:String=null)
+		{
+			super(affixFlag,stripString,affixValue,conditionString,morph, permission, 0,contclass);
+			this.nextElementWithFlag = null;
+			this.nextElementWithKey = null;
+		}
+		
+		public function add(root:String):String {
+			if ( this.conditionPattern.test(root) )
+				return this.affixKey + root.substring(this.stripValue.length );
+			return null; 
+		}
+		
+		public function get nextElementWithKey():PrefixEntry {
+			return this._keyNext;
+		}
+		
+		public function set nextElementWithKey(pfxEntry:PrefixEntry):void {
+			this._keyNext = pfxEntry;
+		}
+		
+		public function get nextElementWithFlag():PrefixEntry {
+			return this._flagNext;
+		}
+		
+		public function set nextElementWithFlag(pfxEntry:PrefixEntry):void {
+			this._flagNext = pfxEntry;
+		}
+		
+		// check if this prefix entry matches
+		public function checkWord( word:String, inCompound:int, needFlag:int):HashEntry {
+			var disLen:int = word.length - this.affixKey.length;
+			var he:HashEntry = null;
+			var i:int;
+			// on entry prefix is 0 length or already matches the beginning of the word.
+			// So if the remaining root word has positive length
+			// and if there are enough chars in root word and added back strip chars
+			// to meet the number of characters conditions, then test it
+			if ( disLen > 0 || (disLen == 0 && this.attributeManager.fullStrip) ) {
+				// generate new root word by removing prefix and adding
+				// back any characters that would have been stripped
+				word = this.stripValue + word.substr(this.affixKey.length);
+				// now make sure all of the conditions on characters
+				// are met.  Please see the appendix at the end of
+				// this file for more info on exactly what is being
+				// tested
+				// if all conditions are met then check if resulting
+				// root word in the dictionary
+				if ( this.conditionPattern.test( word ) ) {
+					// look word in hash table
+					for ( i=0; i < this.attributeManager.dictionaryManager.dictonaryList.length && !he; ++i ) {
+						he = this.attributeManager.dictionaryManager.dictonaryList[i].getElement(word);
+						while( he ) {
+							if ( he.testAffix(this.flag) && ( (!needFlag) || he.testAffix(needFlag) ) ) {
+								return he;
+							}
+							he = he.next;
+						}
+					}
+					//if ((opts & aeXPRODUCT) && in_compound)
+					if ( this.permissionToCombine ) {
+						he = this.attributeManager.suffixCheck2(word, InternalConstants.aeXPRODUCT,this, needFlag, inCompound);
+						if (he) return he; 
+					}
+				} 
+				
+			}
+			return he;
+		}
+
+
+
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/rule/ReplacementFilter.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/rule/ReplacementFilter.as b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/rule/ReplacementFilter.as
new file mode 100644
index 0000000..8f0b1d9
--- /dev/null
+++ b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/rule/ReplacementFilter.as
@@ -0,0 +1,34 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+package com.adobe.linguistics.spelling.core.rule
+{
+		/*
+		 * Deprecated class for now...
+		 * ToDo: It is a place holder for metaphone algorithm in the rule based engine.
+		 */
+	public class ReplacementFilter
+	{
+		public function ReplacementFilter()
+		{
+		}
+
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/rule/SimpleFilter.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/rule/SimpleFilter.as b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/rule/SimpleFilter.as
new file mode 100644
index 0000000..4763059
--- /dev/null
+++ b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/rule/SimpleFilter.as
@@ -0,0 +1,48 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+package com.adobe.linguistics.spelling.core.rule
+{
+	public class SimpleFilter
+	{
+		private var _matchString:String;
+		private var _replacementString:String;
+		public function SimpleFilter(matchingString:String, replacementString:String)
+		{
+			this.matchString = matchingString;
+			this.replacement = replacementString;
+		}
+		
+		public function set matchString(value:String) :void {
+			this._matchString = value;
+		}
+		public function get matchString():String {
+			return this._matchString;
+		}
+		
+		public function set replacement(value:String) :void {
+			this._replacementString = value;
+		}
+		public function get replacement() :String {
+			return this._replacementString;
+		}
+
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/rule/SuffixEntry.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/rule/SuffixEntry.as b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/rule/SuffixEntry.as
new file mode 100644
index 0000000..313ada3
--- /dev/null
+++ b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/rule/SuffixEntry.as
@@ -0,0 +1,126 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+package com.adobe.linguistics.spelling.core.rule
+{
+	import com.adobe.linguistics.spelling.core.HashEntry;
+	import com.adobe.linguistics.spelling.core.env.InternalConstants;
+
+	public class SuffixEntry extends AffixEntry
+	{
+		private var _flagNext:SuffixEntry;
+		private var _keyNext:SuffixEntry;
+		private var _conditionPattern2:RegExp = null;;
+		private var _noTestFlag:Boolean = false;
+		public function SuffixEntry(affixFlag:int, stripString:String, affixValue:String, conditionString:String, morph:String = "", permission:Boolean = false, contclass:String=null)
+		{
+			super(affixFlag,stripString,affixValue,conditionString,morph, permission, 1,contclass);
+			this.nextElementWithFlag = null;
+			this.nextElementWithKey = null;
+			if ( this.stripValue != "" ) {
+				if ( this.conditionString == "." ) {
+						this._conditionPattern2 = null;
+						this._noTestFlag = true;
+					
+				}else {
+					var stripPattern:RegExp = new RegExp ( "^(.*)"+this.stripValue+"$" );
+					var strArr:Array;
+					if ( (strArr = this.conditionString.match(stripPattern) ) != null ) {
+						if ( strArr[1] != "" ) {
+							this._conditionPattern2 = new RegExp( "^.*" + strArr[1] + "$" );
+						}else {
+							this._conditionPattern2 = null;
+							this._noTestFlag = true;
+						}
+					}else {
+						this._conditionPattern2 = this.conditionPattern;
+					}
+				}
+			}
+			
+		}
+		
+		public function add(root:String):String {
+			if ( this.conditionPattern.test(root) )
+				return root.substring(0, (root.length-this.stripValue.length) ) + this.affixKey;
+			return null; 
+		}
+		
+		public function get nextElementWithKey():SuffixEntry {
+			return this._keyNext;
+		}
+		
+		public function set nextElementWithKey(pfxEntry:SuffixEntry):void {
+			this._keyNext = pfxEntry;
+		}
+		
+		public function get nextElementWithFlag():SuffixEntry {
+			return this._flagNext;
+		}
+		
+		public function set nextElementWithFlag(pfxEntry:SuffixEntry):void {
+			this._flagNext = pfxEntry;
+		}
+
+		// see if this suffix is present in the word
+		public function checkWord( word:String, sfxopts:int, ppfx:AffixEntry, needFlag:int, inCompound:int):HashEntry {
+			var disLen:int = word.length - this.affixKey.length;
+			var he:HashEntry = null;
+			var i:int;
+
+			// if this suffix is being cross checked with a prefix
+			// but it does not support cross products skip it
+			if ( (sfxopts& InternalConstants.aeXPRODUCT) != 0 && this.permissionToCombine != true ) return null;
+
+			// upon entry suffix is 0 length or already matches the end of the word.
+			// So if the remaining root word has positive length
+			// and if there are enough chars in root word and added back strip chars
+			// to meet the number of characters conditions, then test it
+			if ( (disLen > 0 || (disLen == 0 && this.attributeManager.fullStrip)) ) {
+				// generate new root word by removing suffix and adding
+				// back any characters that would have been stripped or
+				// or null terminating the shorter string
+				word = word.substr(0, word.length - this.affixKey.length) + this.stripValue;
+				// now make sure all of the conditions on characters
+				// are met.  Please see the appendix at the end of
+				// this file for more info on exactly what is being
+				// tested
+				// if all conditions are met then check if resulting
+				// root word in the dictionary
+				if ( this._noTestFlag || this.conditionPattern.test( word ) ) {
+					// look word in hash table
+					for ( i=0; i < this.attributeManager.dictionaryManager.dictonaryList.length && !he; ++i ) {
+						he = this.attributeManager.dictionaryManager.dictonaryList[i].getElement(word);
+						while( he ) {
+							if ( he.testAffix(this.flag) && ( (!needFlag) || he.testAffix(needFlag) ) ) {
+								return he;
+							}
+							he = he.next;
+						}
+					}
+
+				} 
+				
+			}
+			return he;
+		}
+
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/utils/DictionaryLoader.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/utils/DictionaryLoader.as b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/utils/DictionaryLoader.as
new file mode 100644
index 0000000..1092179
--- /dev/null
+++ b/Squiggly/main/SpellingEngine/src/com/adobe/linguistics/spelling/core/utils/DictionaryLoader.as
@@ -0,0 +1,94 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+
+package com.adobe.linguistics.spelling.core.utils
+{
+	import flash.events.Event;
+	import flash.events.EventDispatcher;
+	import flash.events.IOErrorEvent;
+	import flash.events.SecurityErrorEvent;
+	import flash.net.URLLoader;
+	import flash.net.URLLoaderDataFormat;
+	import flash.net.URLRequest;
+	import flash.utils.ByteArray;
+	import flash.utils.getTimer;
+	
+	public class DictionaryLoader extends EventDispatcher
+	{
+		private var dataloader:URLLoader;
+		private var _data:ByteArray;
+		public function DictionaryLoader(request:URLRequest=null)
+		{
+			dataloader = new URLLoader();
+			dataloader.dataFormat = URLLoaderDataFormat.BINARY;
+			dataloader.addEventListener(Event.COMPLETE,handleComplete);
+			dataloader.addEventListener(IOErrorEvent.IO_ERROR,handleError);
+			dataloader.addEventListener(SecurityErrorEvent.SECURITY_ERROR,handleError);
+			if (request) { 
+				try {
+					load(request); 
+				}
+				catch (error:Error) {
+									
+				}
+			}
+			else 
+			{
+				dispatchEvent(new Event(Event.COMPLETE));
+			}
+		}
+		
+		public function get bytesTotal():uint {
+			return dataloader.bytesTotal;
+		}
+		
+		public function get data():ByteArray {
+			return this._data;
+		}
+
+		public function load(request:URLRequest):void {
+			_data = null;
+			//trace("Before Actual load: "+getTimer()+" "+dataloader.bytesLoaded);
+			dataloader.load(request);
+			
+		}
+
+		private function handleComplete(evt:Event):void {
+			// add to-do function.
+			this._data = (dataloader.data as ByteArray);
+			dispatchEvent(new Event(Event.COMPLETE));
+		}
+
+		private function handleError(evt:Event):void {
+			bounceEvent(evt);
+		}
+		
+		private function bounceEvent(evt:Event):void {
+			dispatchEvent(evt.clone());
+		}
+		
+		public function getData(): ByteArray {
+			return this._data;
+		}
+		
+
+	}
+}
\ No newline at end of file


[32/50] [abbrv] remove Adobe from directory names (package name still contains Adobe)

Posted by jm...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/SuggestionManager.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/SuggestionManager.as b/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/SuggestionManager.as
deleted file mode 100644
index f792b5d..0000000
--- a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/SuggestionManager.as
+++ /dev/null
@@ -1,1026 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-
-package com.adobe.linguistics.spelling.core
-{
-	import com.adobe.linguistics.spelling.core.env.InternalConstants;
-	import com.adobe.linguistics.spelling.core.rule.PrefixEntry;
-	import com.adobe.linguistics.spelling.core.rule.SuffixEntry;
-	import com.adobe.linguistics.spelling.core.utils.*;
-	
-	import flash.utils.Dictionary;
-	import flash.utils.getTimer;
-	
-	public class SuggestionManager
-	{
-		
-		private var _attributeMgr:LinguisticRule;
-		private var _maxSug:int;
-		private var _languageCode:String;
-		private var _ckey:String;
-		private var _cUpperTry:String;
-		private var _cLowerTry:String;
-		private var _cAllTry:String;
-		private var _maxngramsugs:int;
-		private var _fastMode:Boolean;
-		
-		private var _word:String;
-		private var _guessSuggestions:SuggestionsResult;
-		private var _guessWordList:SuggestionsResult;
-		private var guess:Array = new Array (InternalConstants.MAX_GUESS);
-		private var gscore:Array = new Array ( InternalConstants.MAX_GUESS);
-		
-		public function SuggestionManager( attrMgr:LinguisticRule, fastMode:Boolean = true )
-		{
-			this._maxSug = InternalConstants.MAXSUGGESTION;
-			this._attributeMgr = attrMgr;
-			this._ckey = this._attributeMgr.keyString;
-
-			this._cAllTry  = this._attributeMgr.tryString;
-			this._cUpperTry = "";
-			this._cLowerTry = ""; // lower and netual...
-			for ( var i:int = 0; (this._attributeMgr.tryString != null)&&(i < this._attributeMgr.tryString.length); ++i ) {
-				if ( this._attributeMgr.tryString.charAt(i) == this._attributeMgr.tryString.charAt(i).toLocaleLowerCase() ) {
-					this._cLowerTry+=this._attributeMgr.tryString.charAt(i);
-				} else {
-					this._cUpperTry+= this._attributeMgr.tryString.charAt(i);
-				}
-				
-			}
-
-			this._maxngramsugs = InternalConstants.MAXNGRAMSUGS;
-			this._fastMode = fastMode;
-			
-			//initialized viriable for performance...
-			_word=null;
-			_guessSuggestions = new SuggestionsResult(InternalConstants.MAX_ROOTS, compareSuggestion );
-			_guessWordList = new SuggestionsResult( InternalConstants.MAX_GUESS, compareSuggestion );
-			if ( this._attributeMgr.maxNgramSuggestions > 0 ) this._maxngramsugs = this._attributeMgr.maxNgramSuggestions;
-		}
-		
-		public function get fastMode():Boolean {
-			return this._fastMode;
-		}
-		
-		public function set fastMode( value:Boolean ) :void {
-			this._fastMode = value;
-		}
-		
-		private static function compareSuggestion( obj1:*, obj2:*):int {
-			return (obj1.score-obj2.score);
-		}
-		
-		
-		public function set languageCode(value:String) :void {
-			this._languageCode = value;	
-		}
-		
-		public function get languageCode():String {
-			return this._languageCode;
-		}
-		
-		public function nsuggest( result:Array, word:String ):int {
-
-			if ( !((result.length+this._maxngramsugs) <= this._maxSug) ) return result.length;
-
-
-			var nsug:int = result.length;
-			var i:int,j:int,sc:int, opt:int, n:int = word.length;
-			var arr:Array;
-			var sd:SquigglyDictionary;
-			var dict:Dictionary;
-			_word = word;
-			var initCap:Boolean = (word.charAt(0) == word.charAt(0).toLocaleLowerCase() )? false:true;
-			var wordCapValue:int = word.charAt(0).toLocaleUpperCase().charCodeAt(0);
-			_guessSuggestions.clear();
-			
-			/* A filter based on string length, it could be */
-			var rangeOffset:int =5;
-			var endRange:int = word.length + (rangeOffset-2);
-			var startRange:int =  (word.length>(rangeOffset+2)) ? (word.length-rangeOffset):2  ;
-	
-					var counter:Number=0
-					var startTime:Number = getTimer();
-
-			// exhaustively search through all root words
-			// keeping track of the MAX_ROOTS most similar root words
-			
-			// word reversing wrapper for complex prefixes
-			
-			// set character based ngram suggestion for words with non-BMP Unicode characters
-			
-			//a filter for performance improvement...
-			var firstCodeValue:Number =word.charCodeAt(0), lastCodeValue:Number = word.charCodeAt(word.length-1);
-			
-			
-			for ( i=0;i<this._attributeMgr.dictionaryManager.dictonaryList.length; ++i ) {
-				sd = this._attributeMgr.dictionaryManager.dictonaryList[i];
-				dict = sd.dictionary;
-				
-				var lowerS:String;
-				var he:HashEntry;
-				opt = InternalConstants.NGRAM_LONGER_WORSE + InternalConstants.NGRAM_LOWERING;
-				for( var key:String in dict ) {
-					if ( (key.length < startRange) || (key.length > endRange) ) continue;
-					if ( (this._fastMode) && (firstCodeValue != key.charCodeAt(0)) && (lastCodeValue != key.charCodeAt(key.length-1)) ) continue;
-					counter++;
-
-					sc = ngram( 3, _word,key,opt) + leftCommonSubString(_word, key, initCap, wordCapValue);
-					
-					if ( sc > 0  ) {
-						if ( _guessSuggestions.size < InternalConstants.MAX_ROOTS ) {
-							if ( dict[key].affixFlagVector && 
-								(dict[key].testAffix( this._attributeMgr.forbiddenWord ) ||
-								dict[key].testAffix( this._attributeMgr.onlyInCompound) ||
-								dict[key].testAffix( this._attributeMgr.noSuggest ) ||
-								dict[key].testAffix( InternalConstants.ONLYUPCASEFLAG )
-								)) continue; 
-							_guessSuggestions.insert( new SuggestionEntry(sc,key, dict[key] ) );
-							if ( _guessSuggestions.size == InternalConstants.MAX_ROOTS ) {
-								_guessSuggestions.buildheap();
-							}
-						}else {
-							if ( sc > _guessSuggestions.front.score ) {
-								_guessSuggestions.front.score = sc;
-								_guessSuggestions.front.key =  key;
-								_guessSuggestions.front.hashEntry = dict[key];
-								_guessSuggestions.updateFront();
-							}
-						}
-					}
-				}
-			}
-			
-			var thresh:int = 0;
-			var mw:String;
-			for ( var sp:int = 1; sp < 4; ++sp) {
-				mw = word;
-				for ( var k:int=sp; k<n; k+=4) {
-					mw = mw.substring(0,k) + "*" + mw.substring(k+1);
-				}
-				thresh = thresh + ngram( n, word, mw, InternalConstants.NGRAM_ANY_MISMATCH + InternalConstants.NGRAM_LOWERING);
-			}
-			thresh = thresh /3;
-			thresh --;
-
-			// now expand affixes on each of these root words and
-			// and use length adjusted ngram scores to select
-			// possible suggestions
-			_guessWordList.clear();
-
-
-			//work arround for inconsitent ordered Dictionary table. bof
-			if ( _guessSuggestions.isEmpty() ) return result.length;
-			var lowestScore:int = _guessSuggestions.front.score;
-			var indexArr:Array;
-			if ( _guessSuggestions.size != _guessSuggestions.maxSize ){
-				indexArr=_guessSuggestions.data.slice(0,_guessSuggestions.size).sortOn("key",Array.DESCENDING | Array.RETURNINDEXEDARRAY);
-			}else{
-				indexArr=_guessSuggestions.data.sortOn("key",Array.DESCENDING | Array.RETURNINDEXEDARRAY);
-			}
-			//work arround for inconsitent ordered Dictionary table. bof
-
-			// root list;
-			for each ( i in indexArr ) {
-				//work arround for inconsitent ordered Dictionary table. bof
-				if ( i==0 || _guessSuggestions.data[i].score == lowestScore ) continue;
-				//work arround for inconsitent ordered Dictionary table. bof
-				
-				var candList:Array = new Array();
-				var candOriginalList:Array = new Array();
-				expandRootWord(candList,candOriginalList, InternalConstants.MAX_WORDS, _guessSuggestions.data[i].key, _guessSuggestions.data[i].hashEntry, word );
-				for ( j=0; j < candList.length; ++j) {
-					sc = ngram ( n, word, candList[j], InternalConstants.NGRAM_ANY_MISMATCH + InternalConstants.NGRAM_LOWERING) + leftCommonSubString(word, candList[j],initCap, wordCapValue);
-					if ( (sc>thresh) ) {
-						if ( _guessWordList.size < InternalConstants.MAX_GUESS ) {
-							_guessWordList.insert( new GuessWord(sc,candList[j], null ) );
-							if ( _guessWordList.size == InternalConstants.MAX_GUESS ) {
-								_guessWordList.buildheap();
-							}
-						}else {
-							if ( sc > _guessWordList.front.score ) {
-								_guessWordList.front.score = sc;
-								_guessWordList.front.key =  candList[j];
-								_guessWordList.front.original = null;
-								_guessWordList.updateFront();
-							}
-						}
-						
-					}
-				}
-			}
-
-			// now we are done generating guesses
-			// sort in order of decreasing score
-			var guessArr:Array = _guessWordList.toArray().sortOn("score",Array.NUMERIC | Array.DESCENDING);
-
-
-			// weight suggestions with a similarity index, based on
-			// the longest common subsequent algorithm and resort
-			var refobj:RefObject = new RefObject(0);
-			var gl:String;
-			for ( i=guessArr.length-1;i>= 0; --i ) {
-				gl = guessArr[i].key.toLocaleLowerCase();
-				var _lcs:int = StringUtils.lcslen(word, gl);
-				// same characters with different casing
-				if ( (n==gl.length) && (n == _lcs) ) {
-					guessArr[i].score += 2000;
-					break;
-				}
-				// heuristic weigthing of ngram scores
-				guessArr[i].score += 
-					// length of longest common subsequent minus length difference
-					2 * _lcs - Math.abs((int) (n - guessArr[i].key.length)) +
-					// weight length of the left common substring
-					leftCommonSubString(word, gl,initCap, wordCapValue) +
-					// weight equal character positions
-					((_lcs == StringUtils.commonCharacterPositions(word, gl, refobj)) ? 1: 0) +
-					// swap character (not neighboring)
-					((refobj.ref) ? 1000 : 0);
-			}
-
-			guessArr = guessArr.sortOn("score", Array.NUMERIC | Array.DESCENDING);
-			
-			
-			// copy over
-			var oldnsug:int = nsug;
-			var same:int = 0;
-			for ( i=0;i< guessArr.length; ++i ) {
-				if ( (nsug < this._maxSug) && (result.length < (oldnsug + this._maxngramsugs)) && (!same || (guessArr[i].score > 1000)) ) {
-					var unique:int = 1;
-					// leave only excellent suggestions, if exists
-					if ( guessArr[i].score > 1000 ) same = 1;
-					// don't suggest previous suggestions or a previous suggestion with prefixes or affixes
-					for ( j=0;j< result.length; ++j) {
-						if ( ( guessArr[i].key.indexOf(result[j]) != -1) || !checkWord(guessArr[i].key) ) unique = 0;
-					}
-					if ( unique ) {
-						result.push( guessArr[i].key );
-					}
-				}
-				
-			}
-			
-					var endTime:Number = getTimer();
-			return nsug;
-		}
-		
-		private function testValidSuggestion(element:*, gw:GuessWord):Boolean {
-			if ( gw.key.indexOf( element ) ) 
-				return false;
-			if ( !checkWord(element) ) return false; 
-			return true;
-		}
-
-		private function expandRootWord(guessWordList:Array, guessOriginalList:Array, maxn:int, root:String, he:HashEntry, badWord:String) :void {
-			// first add root word to list
-			var nh:int = 0, i:int, j:int;
-			var sfx:SuffixEntry;
-			var pfx:PrefixEntry;
-			var newWord:String;
-			var crossFlagArray:Array = new Array();
-			if ( (guessWordList.length < maxn) && 
-			!( (he.affixFlagVector != null) &&
-			( (this._attributeMgr.needAffix && he.testAffix(this._attributeMgr.needAffix)) || ( this._attributeMgr.onlyInCompound && he.testAffix(this._attributeMgr.onlyInCompound))))
-			){
-				guessWordList[nh] = root;
-				guessOriginalList[nh] = root;
-				crossFlagArray[nh] = false;
-				nh++;
-			}
-			
-			// handle suffixes
-			for ( i=0; (he.affixFlagVector !=null) && (i<he.affixFlagVector.length);++i) {
-				sfx= this._attributeMgr.suffixFlagTable[he.affixFlagVector.charAt(i)];
-				while( sfx  ) {
-					var index:int = badWord.lastIndexOf(sfx.affixKey);
-					if ( (index != -1) && ( index== (badWord.length-sfx.affixKey.length)) ) {
-						newWord = sfx.add(root);
-						if ( newWord) {
-							guessWordList[nh] = newWord;
-							guessOriginalList[nh] = root;
-							crossFlagArray[nh] = sfx.permissionToCombine;
-							nh++;
-						}
-					}
-					sfx = sfx.nextElementWithFlag; 
-				}
-			}
-			
-			// handle cross products of prefixes and suffixes
-			var n:int = nh;
-			for ( j=1;j<n;++j) {
-				if( crossFlagArray[j] ) {
-					for ( i=0;(he.affixFlagVector !=null) && (i<he.affixFlagVector.length);++i) {
-						pfx = this._attributeMgr.prefixFlagTable[he.affixFlagVector.charAt(i)];
-						while( pfx ) {
-							if ( badWord.indexOf(pfx.affixKey)== 0 ) {
-								newWord = pfx.add(guessWordList[j]);
-								if ( newWord) {
-									guessWordList[nh] = newWord;
-									guessOriginalList[nh] = root;
-									crossFlagArray[nh] = pfx.permissionToCombine;
-									nh++;
-								}
-							}
-							pfx = pfx.nextElementWithFlag;
-						}
-					}
-				}
-			}
-			
-			// now handle pure prefixes
-			for ( i=0; (he.affixFlagVector !=null) && (i<he.affixFlagVector.length);++i) {
-				pfx= this._attributeMgr.prefixFlagTable[he.affixFlagVector.charAt(i)];
-				while( pfx  ) {
-					if ( badWord.indexOf(pfx.affixKey) == 0 ) {
-						newWord = pfx.add(root);
-						if ( newWord) {
-							guessWordList[nh] = newWord;
-							guessOriginalList[nh] = root;
-							crossFlagArray[nh] = pfx.permissionToCombine;
-							nh++;
-						}
-					}
-					pfx = pfx.nextElementWithFlag; 
-				}
-			}
-				
-		}
-		
-		/*
-		 * ToDo: Since this is a generic algorithm, we might want move this code to StringUtils class.
-		 */
-		private function ngram(n:int, s1:String, s2:String, opt:int):int {
-
-			var i:int,j:int,k:int,m:int,n:int;
-	    	var nscore:int = 0, ns:int, l1:int, l2:int;
-
-			l1 = s1.length;
-			l2 = s2.length;
-			if ( opt & InternalConstants.NGRAM_LOWERING ) s2=s2.toLowerCase();
-			for ( i = 0; i<l1; i++ ) {
-				if ( s2.indexOf( s1.charAt(i) ) != -1 ) ns++;
-			}
-			nscore = nscore + ns;
-			if ( ns >= 2 ) {
-				for (  j = 2; j<=n; j++ ) {
-					ns = 0;
-					for (  i = 0; i <=(l1-j); i++ ) {
-	//					var tmp:String = s1.substr(i,i+j);
-	//					tmp = s1.substring(i,i+j);
-						if ( s2.indexOf( s1.substring(i,i+j) ) != -1 ) ns++;   // it could be signaficantly optimized If we can avoid to use substr() function....
-					}
-					nscore = nscore + ns;
-					if (ns < 2) break;
-				}
-			}
-			ns = 0;
-			if (opt & InternalConstants.NGRAM_LONGER_WORSE) ns = (l2-l1)-2;
-			if (opt & InternalConstants.NGRAM_ANY_MISMATCH) ns = Math.abs(l2-l1)-2;
-			ns = (nscore - ((ns > 0) ? ns : 0));
-			return ns;
-			return 1;
-		}
-
-		
-		/*
-		 * Deprecated function for now...
-		 * History: 
-		 *          A pre-version of implementation for error correction. After I optimized the code for performance,
-		 *          I drop this function by that time, but you know performance meassuring is a tricky problem... 
-		 * ToDo: Need a revisit when we implementing complex-affix support and compound-word support.
-		 */
-		private function ngram1(n:int, s1:String, s2:String, opt:int):int {
-	    	var nscore:int = 0, ns:int, l1:int, l2:int;
-			
-			var i:int,j:int,k:int,m:int,n:int;
-			
-			l1 = s1.length;
-			l2 = s2.length;
-			if ( opt & InternalConstants.NGRAM_LOWERING ) s2=s2.toLowerCase();
-			for (  j = 1; j<=n; j++ ) {
-				ns = 0;
-				for (  i = 0; i <=(l1-j); i++ ) {
-//					var tmp:String = s1.substr(i,i+j);
-//					tmp = s1.substring(i,i+j);
-					if ( s2.indexOf( s1.substring(i,i+j) ) != -1 ) ns++;   // it could be signaficantly optimized If we can avoid to use substr() function....
-				}
-				nscore = nscore + ns;
-				if (ns < 2) break;
-			}
-			ns = 0;
-			if (opt & InternalConstants.NGRAM_LONGER_WORSE) ns = (l2-l1)-2;
-			if (opt & InternalConstants.NGRAM_ANY_MISMATCH) ns = Math.abs(l2-l1)-2;
-			ns = (nscore - ((ns > 0) ? ns : 0));
-			return ns;
-			return 1;
-		}
-		
-		/*
-		 * ToDo: since this is a generic algorithm, we might want to move this function to StringUtils class.
-		 */
-		private function leftCommonSubString(s1:String,s2:String, initCap:Boolean, s1CapValue:int):int {
-			var res:int = 1;
-			if ( s1.charCodeAt(0) != s2.charCodeAt(0) && ( !initCap ) && (s1CapValue != s2.charCodeAt(0)) ) return 0;
-			for( var i:int=1; (i< s1.length) && (s1.charCodeAt(i) == s2.charCodeAt(i)); ++i ) {
-				res++;
-			}
-			return res;
-		}
-		
-		
-		public function suggest( result:Array, word:String, capType:int):int {
-			var nsug:int = 0;
-
-			// suggestions for an uppercase word (html -> HTML)
-			if ( (nsug < this._maxSug) && (nsug > -1 ) ) {
-				nsug = capchars(result,word,nsug);
-			}
-			
-			// perhaps we made a typical fault of spelling
-			if ( (nsug < this._maxSug) && (nsug > -1 ) ) {
-				nsug = replchars( result, word, nsug );	
-			}
-			
-			// perhaps we made chose the wrong char from a related set
-			if ( (nsug < this._maxSug) && (nsug > -1 ) ) {
-				nsug = mapchars( result, word, nsug );	
-			}
-
-			// did we swap the order of chars by mistake
-			if ( (nsug < this._maxSug) && (nsug > -1 ) ) {
-				nsug = swapchar( result, word, nsug );	
-			}
-			
-			// did we swap the order of non adjacent chars by mistake
-			if ( (nsug < this._maxSug) && (nsug > -1 ) ) {
-				nsug = longswapchar( result, word, nsug );	
-			}
-
-			// did we just hit the wrong key in place of a good char (case and keyboard)
-			if ( (nsug < this._maxSug) && (nsug > -1 ) ) {
-				nsug = badcharkey( result, word, nsug );	
-			}
-			 // did we add a char that should not be there
-			if ( (nsug < this._maxSug) && (nsug > -1 ) ) {
-				nsug = extrachar( result, word, nsug );	
-			}
-			
-			// did we forgot a char
-			if ( (nsug < this._maxSug) && (nsug > -1 ) ) {
-				nsug = forgotchar( result, word, nsug, capType );	
-			}
-
-			// did we move a char
-			if ( (nsug < this._maxSug) && (nsug > -1 ) ) {
-				nsug = movechar( result, word, nsug );	
-			}
-
-			// did we just hit the wrong key in place of a good char
-			if ( (nsug < this._maxSug) && (nsug > -1 ) ) {
-				nsug = badchar( result, word, nsug, capType );	
-			}
-			
-			// did we double two characters
-			if ( (nsug < this._maxSug) && (nsug > -1 ) ) {
-				nsug = doubletwochars( result, word, nsug );	
-			}
-			
-			// perhaps we forgot to hit space and two words ran together
-			if ( (nsug < this._maxSug) && (nsug > -1 ) ) {
-				nsug = twowords( result, word, nsug );	
-			}
-
-			return nsug;
-		}
-		
-		
-		
-		private function mapchars( result:Array, word:String, nsug:int ) :int {
-			if (word.length < 2) return nsug;
-			if ( (nsug == this._maxSug) || (this._attributeMgr.mapFilterTable.length == 0) ) return nsug;
-			var mapTable:Array = this._attributeMgr.mapFilterTable;
-			var counter:int = 0;
-			nsug = map_related(result, word, nsug, 0 ,mapTable, counter);
-			
-			return nsug;
-		}		
-
-		private function map_related( result:Array, word:String, nsug:int, startIndex:int, mapTable:Array, counter:int) :int {
-			var totalCheckCount:int = 8; // for performance issue only... 8 means four level detection...
-			var candidate:String;
-			var in_map:int = 0;
-			var j:int;
-			counter++;
-			if ( counter > totalCheckCount ) return nsug; // for performance issue only...
-			if ( nsug == this._maxSug ) return nsug;
-			if ( startIndex == word.length ) {
-				var cwrd:int = 1;
-				for (  j=0; j < result.length; ++j ) {
-					if ( result[j]== word ) cwrd=0;
-				}
-				if ( cwrd && checkWord(word) ) {
-					result.push(word);
-					nsug++;
-				}
-				return nsug;
-				
-			}
-			for ( var i:int = 0;i<mapTable.length ;++i ) {
-				if ( mapTable[i].mapCharSet.indexOf(word.charAt(startIndex)) != -1 ) {
-					in_map= 1;
-					for ( j =0; j< mapTable[i].mapCharSet.length; ++j ) {
-						candidate = word.substring(0,startIndex) +mapTable[i].mapCharSet.charAt(j)+word.substring(startIndex+1);
-						nsug = map_related(result,candidate,nsug,(startIndex+1),mapTable, counter);
-					}
-				}				
-			}
-			
-			if( !in_map) {
-				nsug = map_related(result,word,nsug,(startIndex+1),mapTable, counter);
-			}
-			return nsug;
-		} 
-		
-		private function twowords( result:Array, word:String, nsug:int ) :int {
-			var candidate:String;
-			var cwrd:int=1;
-			var count:int=0;
-			if (word.length < 3) return result.length;
-			if ( result.length >= this._maxSug ) return result.length;
-			
-			for( var i:int=1;i<word.length;++i) {
-				candidate = word.substring(0,i);
-				if ( !checkWord(candidate) ) continue;
-				candidate = word.substring(i);
-				if ( checkWord(candidate) ) {
-					candidate = word.substring(0,i) +" " + word.substring(i);
-					for ( var j:int=0; j < result.length; ++j ) {
-						if ( result[j]== candidate ) cwrd=0;
-					}
-					if ( cwrd ) {
-						if ( result.length >= this._maxSug ) return result.length;
-						result.push(candidate);
-						nsug++;
-					}
-				}
-			}
-
-			return nsug;
-		}		
-
-		private function doubletwochars( result:Array, word:String, nsug:int ) :int {
-			var candidate:String;
-			var nstate:int=0;
-			if (word.length < 5) return nsug;
-			for (var i:int=2;i<word.length;++i) {
-				if( word.charCodeAt(i) == word.charCodeAt(i-2) ) {
-					nstate++;
-					if ( nstate==3) {
-						candidate = word.substring(0,i-1)+word.substring(i+1);
-						nsug = testSuggestion( result,candidate, nsug);
-						if ( nsug == -1 || nsug == this._maxSug ) return nsug;
-						nstate = 0;
-					}
-				}else {
-					nstate=0;
-				}
-			}
-			return nsug;
-		}
-
-		private function badchar( result:Array, word:String, nsug:int, capType:int ) :int {
-			if ( this._cAllTry == null ) return nsug;
-			if (word.length < 2) return nsug;
-			var candidate:String;
-			var i:int, j:int;			
-			switch(capType) {
-				case InternalConstants.NOCAP: {
-					// first for init capticalized case...
-					for ( i = 0; i< this._cAllTry.length;++i) {
-						candidate = this._cAllTry.charAt(i)+word.substring(1);
-						nsug = testSuggestion( result,candidate, nsug);
-						if ( nsug == -1 || nsug == this._maxSug ) return nsug;
-					}
-					// for the rest of the word...
-					for ( i = 0; i< this._cLowerTry.length;++i) {
-						for ( j=1;j<word.length;++j) {
-							candidate = word.substring(0,j)+this._cLowerTry.charAt(i)+word.substring(j+1);
-							nsug = testSuggestion( result,candidate, nsug);
-							if ( nsug == -1 || nsug == this._maxSug ) return nsug;
-						}
-					}
-					break;
-				}
-				case InternalConstants.INITCAP:{
-					// first for init capticalized case...
-					for ( i = 0; i< this._cAllTry.length;++i) {
-						candidate = this._cAllTry.charAt(i)+word.substring(1);
-						nsug = testSuggestion( result,candidate, nsug);
-						if ( nsug == -1 || nsug == this._maxSug ) return nsug;
-					}
-					// for the rest of the word...
-					for ( i = 0; i< this._cLowerTry.length;++i) {
-						for ( j=1;j<word.length;++j) {
-							candidate = word.substring(0,j)+this._cLowerTry.charAt(i)+word.substring(j+1);
-							nsug = testSuggestion( result,candidate, nsug);
-							if ( nsug == -1 || nsug == this._maxSug ) return nsug;
-						}
-					}
-					break;
-				}
-				case InternalConstants.HUHCAP: { 
-				}
-				case InternalConstants.HUHINITCAP:{ 
-					for ( i = 0; i< this._cAllTry.length;++i) {
-						for ( j=0;j<word.length;++j) {
-							candidate = word.substring(0,j)+this._cAllTry.charAt(i)+word.substring(j+1);
-							nsug = testSuggestion( result,candidate, nsug);
-							if ( nsug == -1 || nsug == this._maxSug ) return nsug;
-						}
-					}
-					break;
-				}
-				case InternalConstants.ALLCAP: {
-					for ( i = 0; i< this._cUpperTry.length;++i) {
-						for ( j=0;j<word.length;++j) {
-							candidate = word.substring(0,j)+this._cUpperTry.charAt(i)+word.substring(j+1);
-							nsug = testSuggestion( result,candidate, nsug);
-							if ( nsug == -1 || nsug == this._maxSug ) return nsug;
-						}
-					}
-					break;
-				}
-			}
-			
-			return nsug;
-		}		
-
-		// did we move a char
-		private function movechar( result:Array, word:String, nsug:int ) :int {
-			var candidate:String;
-			var i:int,j:int;
-			var char:String;
-			if (word.length < 3) return nsug;
-			for ( i=0;i<word.length-2;++i) {
-				char = word.charAt(i);
-				for ( j=i+2;j<word.length;++j) {
-					candidate = word.substring(0,i)+word.substring(i+1,j+1)+char+word.substring(j+1);
-					nsug = testSuggestion( result,candidate, nsug);
-					if ( nsug == -1 || nsug == this._maxSug ) return nsug;
-				}
-			}
-			
-			for ( i=word.length-1;i>=2;--i) {
-				char = word.charAt(i);
-				for ( j=i-2;j>=0; --j) {
-					candidate = word.substring(0,j)+char+word.substring(j,i)+word.substring(i+1);
-					nsug = testSuggestion( result,candidate, nsug);
-					if ( nsug == -1 || nsug == this._maxSug ) return nsug;
-				}
-			}
-			
-			return nsug;
-		}		
-
-		private function forgotchar( result:Array, word:String, nsug:int, capType:int ) :int {
-			if ( this._cAllTry == null ) return nsug;
-			var candidate:String;
-			var i:int, j:int;			
-			if (word.length < 2) return nsug;
-			switch(capType) {
-				case InternalConstants.NOCAP: {
-					for (i =0; i< this._cAllTry.length; ++i ) {
-						candidate= _cAllTry.charAt(i) + word.substring(0);
-						nsug = testSuggestion( result,candidate, nsug);
-						if ( nsug == -1 || nsug == this._maxSug ) return nsug;
-					}
-
-					for (i =0; i< this._cLowerTry.length; ++i ) {
-						for ( j=1; j< word.length;j++) {
-							candidate= word.substring(0,j)+_cLowerTry.charAt(i) + word.substring(j);
-							nsug = testSuggestion( result,candidate, nsug);
-							if ( nsug == -1 || nsug == this._maxSug ) return nsug;
-						}
-						candidate= word+_cLowerTry.charAt(i);
-						nsug = testSuggestion( result,candidate, nsug);
-						if ( nsug == -1 || nsug == this._maxSug ) return nsug;
-					}
-					break;
-				}
-				case InternalConstants.INITCAP:{
-					// first for init capticalized case...
-					for (i =0; i< this._cAllTry.length; ++i ) {
-						candidate= _cAllTry.charAt(i) + word.substring(0);
-						nsug = testSuggestion( result,candidate, nsug);
-						if ( nsug == -1 || nsug == this._maxSug ) return nsug;
-					}
-
-					for (i =0; i< this._cLowerTry.length; ++i ) {
-						for ( j=1; j< word.length;j++) {
-							candidate= word.substring(0,j)+_cLowerTry.charAt(i) + word.substring(j);
-							nsug = testSuggestion( result,candidate, nsug);
-							if ( nsug == -1 || nsug == this._maxSug ) return nsug;
-						}
-						candidate= word+_cLowerTry.charAt(i);
-						nsug = testSuggestion( result,candidate, nsug);
-						if ( nsug == -1 || nsug == this._maxSug ) return nsug;
-					}
-					break;
-				}
-				case InternalConstants.HUHCAP: { 
-				}
-				case InternalConstants.HUHINITCAP:{ 
-					for (i =0; i< this._cAllTry.length; ++i ) {
-						for ( j=1; j< word.length;j++) {
-							candidate= word.substring(0,j)+_cAllTry.charAt(i) + word.substring(j);
-							nsug = testSuggestion( result,candidate, nsug);
-							if ( nsug == -1 || nsug == this._maxSug ) return nsug;
-						}
-						candidate= word+_cAllTry.charAt(i);
-						nsug = testSuggestion( result,candidate, nsug);
-						if ( nsug == -1 || nsug == this._maxSug ) return nsug;
-					}
-					break;
-				}
-				case InternalConstants.ALLCAP: {
-					for (i =0; i< this._cUpperTry.length; ++i ) {
-						for ( j=0; j< word.length;j++) {
-							candidate= word.substring(0,j)+_cUpperTry.charAt(i) + word.substring(j);
-							nsug = testSuggestion( result,candidate, nsug);
-							if ( nsug == -1 || nsug == this._maxSug ) return nsug;
-						}
-						candidate= word+_cUpperTry.charAt(i);
-						nsug = testSuggestion( result,candidate, nsug);
-						if ( nsug == -1 || nsug == this._maxSug ) return nsug;
-					}
-					break;
-				}
-			}
-			return nsug;
-		}		
-
-		// error is word has an extra letter it does not need 
-		private function extrachar( result:Array, word:String, nsug:int ) :int {
-			var candidate:String;
-			if (word.length < 2) return nsug;
-			for ( var i:int=0; i< word.length ; ++i ) {
-				candidate = word.substring(0,i) + word.substring(i+1);
-				nsug = testSuggestion( result,candidate, nsug);
-				if ( nsug == -1 || nsug == this._maxSug ) return nsug;
-			}
-			return nsug;
-		}		
-		
-		// error is wrong char in place of correct one (case and keyboard related version)
-		private function badcharkey( result:Array, word:String, nsug:int ) :int {
-			var candidate:String;
-			if (word.length < 2) return nsug;
-			var startIndex:int = 0;
-			// swap out each char one by one and try uppercase and neighbor
-			// keyboard chars in its place to see if that makes a good word
-			for ( var i:int =0; i<word.length; ++i) {
-				// check with uppercase letters
-				if ( word.charAt(i).toLocaleUpperCase() != word.charAt(i) ) {
-					candidate = word.substring(0,i)+word.charAt(i).toLocaleUpperCase()+word.substring(i+1);
-					nsug = testSuggestion( result,candidate, nsug);
-					if ( nsug == -1 || nsug == this._maxSug ) return nsug;
-				}
-				// check neighbor characters in keyboard string
-				if ( this._ckey == null ) continue;
-				startIndex = this._ckey.indexOf(word.charAt(i),startIndex);
-				while ( startIndex != -1 ) {
-					if ( (startIndex!=0) && (_ckey.charAt(startIndex-1) != "|" ) ) {
-						candidate = word.substring(0,i)+_ckey.charAt(startIndex-1)+word.substring(i+1);
-						nsug = testSuggestion( result,candidate, nsug);
-						if ( nsug == -1 || nsug == this._maxSug ) return nsug;
-					}
-					if ( (_ckey.charAt(startIndex+1)!="|") && (startIndex != _ckey.length - 1) ) {
-						candidate = word.substring(0,i)+_ckey.charAt(startIndex+1) + word.substring(i+1);
-						nsug = testSuggestion( result,candidate, nsug);
-						if ( nsug == -1 || nsug == this._maxSug ) return nsug;
-					}
-					startIndex = this._ckey.indexOf(word.charAt(i),startIndex+1);
-				}
-			}
-			
-			return nsug;
-		}		
-
-		private function longswapchar( result:Array, word:String, nsug:int ) :int {
-			var candidate:String;
-			if (word.length < 2) return nsug;
-			for ( var i:int =0 ; i< word.length-2; ++i ) {
-				for ( var j:int = i+2;j< word.length;++j) {
-					candidate = word.substring(0,i)+ word.charAt(j) + word.substring(i+1,j) + word.charAt(i) + word.substring(j+1);
-					nsug = testSuggestion( result,candidate, nsug);
-					if ( nsug == -1 || nsug == this._maxSug ) return nsug;
-				}
-			}
-			return nsug;
-		}		
-
-		private function swapchar( result:Array, word:String, nsug:int ) :int {
-			var candidate:String;
-			if (word.length < 2) return nsug;
-			var i:int;
-			var wl:int = word.length;
-			// try swapping adjacent chars one by one
-			for (i=0;i< wl-1;++i) {
-				candidate = word.substring(0,i)+word.charAt(i+1)+word.charAt(i) + word.substring(i+2);
-				nsug = testSuggestion( result,candidate, nsug);
-				if ( nsug == -1 || nsug == this._maxSug ) return nsug;
-			}
-			
-			if ( wl == 4 || wl == 5 ) {
-				candidate = word.charAt(1) + word.charAt(0);
-				if ( wl == 5) candidate +=word.charAt(2);
-				candidate += word.charAt(wl - 1) + word.charAt(wl - 2); 
-				nsug = testSuggestion( result,candidate, nsug);
-				if ( nsug == -1 || nsug == this._maxSug ) return nsug;
-				if ( wl == 5 )  {
-					candidate = word.charAt(0) + word.charAt(2) + word.charAt(1) + candidate.substr(3);
-					nsug = testSuggestion( result,candidate, nsug);
-					if ( nsug == -1 || nsug == this._maxSug ) return nsug;
-				}
-			}
-			return nsug;
-			
-		}		
-		private function replchars( result:Array, word:String, nsug:int ) :int {
-			var candidate:String;
-			if (word.length < 2) return nsug;
-			var searchIndex:int=0;
-			if ( (this._attributeMgr.simpleFilterTable==null) || (this._attributeMgr.simpleFilterTable.length == 0) ) return nsug;
-			for ( var i:int = 0; i < this._attributeMgr.simpleFilterTable.length; ++i ) {
-				while ( (searchIndex = word.indexOf( this._attributeMgr.simpleFilterTable[i].matchString,searchIndex)) != -1 ){
-					searchIndex = searchIndex + this._attributeMgr.simpleFilterTable[i].matchString.length;
-					candidate = word.substr(0, searchIndex-this._attributeMgr.simpleFilterTable[i].matchString.length) + 
-					this._attributeMgr.simpleFilterTable[i].replacement + 
-					word.substr(searchIndex);
-					nsug = testSuggestion( result,candidate, nsug);
-					if ( nsug == -1 || nsug == this._maxSug ) return nsug;
-				}
-				
-			}
-			return nsug;
-		}
-		
-		private function capchars( result:Array, word:String, nsug:int) : int {
-			var candidate:String = word.toLocaleUpperCase();
-			return testSuggestion(result,candidate,nsug);
-		}
-		
-		private function testSuggestion(result:Array, word:String, nsug:int):int {
-			var cwrd:int=1;
-			if ( result.length >= this._maxSug ) return nsug;
-			for ( var i:int=0; i < result.length; ++i ) {
-				if ( result[i]== word ) cwrd=0;
-			}
-			
-			if ( (cwrd) && checkWord(word) ) {
-				result.push(word);
-				nsug++;
-			}
-			return nsug;
-		}
-
-		// see if a candidate suggestion is spelled correctly
-		// needs to check both root words and words with affixes
-		
-		// ToDo the following in next release...
-		// obsolote MySpell-HU modifications:
-		// return value 2 and 3 marks compounding with hyphen (-)
-		// `3' marks roots without suffix   
-
-		private function checkWord(word:String):int {
-			var rv:HashEntry = null;
-			var nosuffix:int =0;
-			if ( this._attributeMgr ) {
-				rv = _attributeMgr.lookup(word);
-				if ( rv ) {
-					if ( (rv.affixFlagVector) && ( rv.testAffix(this._attributeMgr.forbiddenWord) || rv.testAffix(this._attributeMgr.noSuggest) )  ){
-						return 0;
-					}
-					while ( rv ) {
-						if ( (rv.affixFlagVector) &&  ( rv.testAffix(this._attributeMgr.needAffix) || rv.testAffix(InternalConstants.ONLYUPCASEFLAG) || rv.testAffix(this._attributeMgr.onlyInCompound) )  ) {
-							rv = rv.next
-						}else break;
-					}
-				}else rv = _attributeMgr.optPrefixCheck2(word, 0,0) // only prefix, and prefix + suffix XXX
-				
-				if ( rv ) {
-					nosuffix = 1;
-				}else {
-					rv = _attributeMgr.optSuffixCheck2(word,0,null,0,0);
-				}
-				//this is added after we have two level suffix stripping
-				if (!rv &&  this._attributeMgr.haveContClass) {
-					rv = this._attributeMgr.optTwoSuffixCheck(word, 0, null, 0);
-					if (!rv) rv = this._attributeMgr.optTwoPrefixCheck(word,1, 0);
-				}
-				
-				// check forbidden words
-				if ( (rv) && (rv.affixFlagVector) && ( rv.testAffix(this._attributeMgr.forbiddenWord) || rv.testAffix(InternalConstants.ONLYUPCASEFLAG) 
-				|| rv.testAffix(this._attributeMgr.noSuggest) || rv.testAffix(this._attributeMgr.onlyInCompound) ) ) {
-					return 0;
-				}
-				if ( rv ) {
-					//// XXX obsolote ToDo
-					return 1;
-				}
-				
-			}
-			return 0;
-		}
-		
-	}
-}
-
-
-internal class GuessWord {
-	private var _score:int;
-	private var _key:String;
-	private var _original:String;
-	
-	public function GuessWord(score:int, key:String, original:String){
-		this.key = key;
-		this.score = score;
-		this.original = original;
-	}
-	
-	public function get score():int {
-		return this._score;
-	}
-	public function set score(value:int) :void {
-		this._score = value;
-	}
-	
-	public function get key():String {
-		return this._key;
-	}
-	public function set key(value:String) :void {
-		this._key = value;
-	}
-	public function get original():String {
-		return this._original;
-	}
-	public function set original(value:String) :void {
-		this._original = value;
-	}
-}
-
-internal class SuggestionEntry {
-	import com.adobe.linguistics.spelling.core.HashEntry;
-	private var _score:int;
-	private var _key:String;
-	private var _hashEntry:HashEntry; 
-	
-	public function SuggestionEntry(score:int, key:String, hashEntry:HashEntry) {
-		this.key = key;
-		this.score = score;
-		this.hashEntry = hashEntry;
-		
-	}
-	
-	public function get score():int {
-		return this._score;
-	}
-	public function set score(value:int) :void {
-		this._score = value;
-	}
-	
-	public function get key():String {
-		return this._key;
-	}
-	public function set key(value:String) :void {
-		this._key = value;
-	}
-	
-	public function get hashEntry():HashEntry {
-		return this._hashEntry;
-	}
-	
-	public function set hashEntry(value:HashEntry ) :void {
-		this._hashEntry = value;
-	}
-	
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/UserDictionaryEngine.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/UserDictionaryEngine.as b/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/UserDictionaryEngine.as
deleted file mode 100644
index 93ba707..0000000
--- a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/UserDictionaryEngine.as
+++ /dev/null
@@ -1,71 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-
-package com.adobe.linguistics.spelling.core
-{
-	import com.adobe.linguistics.spelling.UserDictionaryInternal;
-	
-	public class UserDictionaryEngine
-	{
-		// Private properties
-		private var _dictionaryList:Array;		// get only
-		private var _userDict:UserDictionaryInternal;
-
-		public function UserDictionaryEngine(ud:UserDictionaryInternal=null)
-		{
-			_dictionaryList = new Array();
-		}
-		public function addDictionary(userDictionary:UserDictionaryInternal):Boolean
-		{
-			if ( (userDictionary == null) ) return false;
-			
-			for ( var i:int = 0;i < _dictionaryList.length; ++i ) {
-				if ( userDictionary == _dictionaryList[i] )
-					return false;
-			} 
-			_dictionaryList.push(userDictionary);
-			return true;
-		}
-
-		public function removeDictionary(userDictionary:UserDictionaryInternal):Boolean
-		{
-			
-			for ( var i:int =0; i < _dictionaryList.length; ++i ) {
-				if ( userDictionary == _dictionaryList[i] ) {
-					_dictionaryList.splice(i,1);
-					return true;
-				}
-			}
-			return false;
-		}
-		
-		public function spell( word:String ) :Boolean {
-			var result:Boolean = false;
-			for ( var i:int =0; (i < _dictionaryList.length) && (!result);++i ) {
-				_userDict = _dictionaryList[i];
-				if ( _userDict ) {
-					result = (_userDict._wordList.lookup(word) != -1);
-				}
-			}
-			return result;
-		}
-
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/container/Collection.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/container/Collection.as b/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/container/Collection.as
deleted file mode 100644
index 5954c21..0000000
--- a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/container/Collection.as
+++ /dev/null
@@ -1,89 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-
-
-
-package com.adobe.linguistics.spelling.core.container
-{
-	/**
-	 * public interface Collection The root interface in the collection 
-	 * hierarchy. A collection represents a group of objects, known as 
-	 * its elements. Some collections allow duplicate elements and others 
-	 * do not. Some are ordered and others unordered. The SDK does not 
-	 * provide any direct implementations of this interface: it provides 
-	 * implementations of more specific subinterfaces like Set and List. 
-	 */
-	 
-	 /**
-	  * ToDo: add hashCode() function
-	  * 	add remove()/add() function
-	  */
-	 
-	public interface Collection
-	{
-
-		/**
-		 * The number of elements in this collection.
-		 * @Returns the number of elements in this collection.
-		 */
-		function get size():int;
-		
-		/**
-		 * Tests if the collection is empty.
-		 * 
-		 * @ Returns true if this collection contains no elements.
-		 */
-		function isEmpty():Boolean
-		
-		/**
-		 * Determines if the collection contains the specified element.
-		 * 
-		 * @ obj: element whose presence in this collection is to be tested.
-		 * 
-		 * @ Returns true if this collection contains the specified element.
-		 */
-		function contains( obj:* ) : Boolean
-		
-		/**
-		 * Removes all of the elements from this collection (optional operation).
-		 */
-		function clear():void
-		
-		/**
-		 * Returns an iterator over the elements in this collection. There are 
-		 * no guarantees concerning the order in which the elements are returned 
-		 * (unless this collection is an instance of some class that provides a guarantee). 
-		 *
-		 * @an Iterator over the elements in this collection
-		 */
-		function getIterator():Iterator
-		
-		/**
-		 * Returns an array containing all of the elements in this collection. 
-		 * If the collection makes any guarantees as to what order its elements 
-		 * are returned by its iterator, this method must return the elements 
-		 * in the same order.
-		 * 
-		 * @return An array.
-		 */
-		function toArray():Array
-		
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/container/Enumeration.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/container/Enumeration.as b/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/container/Enumeration.as
deleted file mode 100644
index 16611ad..0000000
--- a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/container/Enumeration.as
+++ /dev/null
@@ -1,28 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-
-package com.adobe.linguistics.spelling.core.container
-{
-	public interface Enumeration
-	{
-		function hasMoreElements():Boolean;
-		function nextElement():*;
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/container/HashTable.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/container/HashTable.as b/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/container/HashTable.as
deleted file mode 100644
index cf38c81..0000000
--- a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/container/HashTable.as
+++ /dev/null
@@ -1,179 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-
-package com.adobe.linguistics.spelling.core.container
-{
-	import flash.utils.Dictionary;
-	
-	/**
-	 * A hash table
-	 */
-	public class HashTable implements Collection
-	{
-		protected var _map:Dictionary;
-		protected var _elementNum:int;
-		
-		/**
-		 * Initializes a new hash table.
-		 * 
-		 * @param size The size of the hash table.
-		 * @param hash A hashing function.
-		 */
-		public function HashTable(useWeakReferences:Boolean = true)
-		{
-			_map = new Dictionary( useWeakReferences );
-			_elementNum = 0;
-		}
-
-		public function put(key:*, value:*) : void
-		{
-			_map[key] = value;
-			++_elementNum;
-		}
-
-		public function remove(key:*) : void
-		{
-			delete _map[key];
-			--_elementNum;
-		}
-
-		public function containsKey(key:*) : Boolean
-		{
-			return _map.hasOwnProperty( key );
-		}
-		
-		public function containsValue(value:*) : Boolean
-		{
-			for ( var key:* in _map )
-			{
-				if ( _map[key] == value )
-				{
-					return true;
-				}
-			}
-			return false;
-		}
-
-		public function contains(value:*):Boolean {
-			return containsValue(value);
-		}
-
-		public function getElement(key:* ):* {
-			return _map[key];
-		}
-				
-		/**
-		 * @inheritDoc
-		 */
-		public function clear() : void
-		{
-			for ( var key:* in _map )
-			{
-				remove( key );
-			}
-		}
-		
-		/**
-		 * @inheritDoc
-		 */
-		public function getIterator():Iterator
-		{
-			return null;
-		}
-		
-		/**
-		 * @inheritDoc
-		 */
-		public function get size():int
-		{
-			return _elementNum;
-		}
-		
-		/**
-		 * @inheritDoc
-		 */
-		public function isEmpty():Boolean
-		{
-			return _elementNum == 0;
-		}
-
-		public function get keys() : Array
-		{
-			var _keys:Array = [];
-
-			for (var key:* in _map)
-			{
-				_keys.push( key );
-			}
-			return _keys;
-		}
-		
-		public function get elements() : Array
-		{
-			var _values:Array = [];
-
- 			for each ( var value:* in _map ) {
-				_values.push( value );
-			}
-			return _values;
-		}
-
-		/**
-		 * @inheritDoc
-		 */
-		public function toArray():Array
-		{
-			return keys;
-		}
-		
-		/**
-		 * Prints out a string representing the current object.
-		 * 
-		 * @return A string representing the current object.
-		 */
-		public function toString():String
-		{
-			return "[HashTable, size=" + size + "]";
-		}
-		
-		public function get hashMap():Dictionary {
-			return this._map;
-		}
-		
-		/**
-		 * Need refine... Possible solution is that we can use two function paramter to control the input and output. 
-		 * 
-		 *
-		 */
-		public function watchEntries(func:Function=null):Array {
-			if ( func == null )
-				return null;
-			var res:Array = new Array();
-			for (var curKey:* in _map)
-			{
-				if ( func( curKey, _map[curKey] ) ) {
-					res.push( curKey );
-				}
-			}
-			return (res.length == 0)? null: res;
-		}
-		
-	}
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/container/Heap.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/container/Heap.as b/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/container/Heap.as
deleted file mode 100644
index 555d6a3..0000000
--- a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/container/Heap.as
+++ /dev/null
@@ -1,263 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-
-
-package com.adobe.linguistics.spelling.core.container
-{
-	/**
-	 * BinaryHeap implementation of priority queue. The heap is either a 
-	 * minimum or maximum heap as determined by parameters passed to constructor. 
-	 * 
-	 */
-	public final class Heap implements Collection
-	{
-		private var __size:int;
-		private var __count:int;
-		private var __compare:Function;
-		public var __heap:Array;
-		
-		/**
-		 * Create a new heap.
-		 * 
-		 * @param size The heap's maximum capacity.
-		 * @param compare A comparison function for sorting the heap's data.
-		 *        If no function is passed, the heap uses default function.
-		 */
-		public function Heap(size:int=1000, compare:Function = null)
-		{
-			__count = 0;
-			__heap = new Array(__size = size + 1);
-			
-			if (compare == null)
-				__compare = function(a:int, b:int):int { return a - b; };
-			else
-				__compare = compare;
-		}
-
-		/**
-		 * The maximum capacity.
-		 */
-		public function get maxSize():int
-		{
-			return __size;
-		}
-
-		public function isEmpty():Boolean
-		{
-			return false;
-		}
-		
-		public function toArray():Array
-		{
-			return __heap.slice(1, __count + 1);
-		}
-		
-		public function toString():String
-		{
-			return "[Heap, size=" + __size +"]";
-		}
-		
-		public function dump():String
-		{
-			var k:int = __count + 1;
-			var s:String = "Heap\n{\n";
-			for (var i:int = 1; i < k; i++)
-				s += "\t" + __heap[i] + "\n";
-			s += "\n}";
-			return s;
-		}
-		
-		/**
-		 * The front item.
-		 */
-		public function get front():*
-		{
-			return __heap[1];
-		}
-		
-		/**
-		 * Enqueues.
-		 * @param obj The data to enqueue.
-		 * @return False if the queue is full, otherwise true.
-		 */
-		public function enqueue(obj:*):Boolean
-		{
-			if (__count + 1 < __size){
-				__heap[++__count] = obj;
-				
-				var i:int = __count;
-				var tmp:* = __heap[i];
-				var v:*;
-				var parent:int = i >> 1;
-				
-				if (__compare != null)
-				{
-					while (parent > 0){
-						 v = __heap[parent];
-						if (__compare(tmp, v) < 0){
-							__heap[i] = v;
-							i = parent;
-							parent >>= 1;
-						}
-						else break;
-					}
-				}else{
-					while (parent > 0){
-						v = __heap[parent];
-						if (tmp - v < 0){
-							__heap[i] = v;
-							i = parent;
-							parent >>= 1;
-						}
-						else break;
-					}
-				}
-				__heap[i] = tmp;
-				return true;
-			}
-			return false;
-		}
-		
-		/**
-		 * Dequeues.
-		 * @return The heap's front item or null if it is empty.
-		 */
-		public function dequeue():*
-		{
-			if (__count >= 1){
-				var o:* = __heap[1];
-				
-				__heap[1] = __heap[__count];
-				delete __heap[__count];
-				
-				var tmp:* = __heap[i];
-				var i:int = 1;
-				var v:*;
-				var child:int = i << 1;
-				
-				if (__compare != null) {
-					while (child < __count) {
-						if (child < __count - 1) {
-							if (__compare(__heap[child], __heap[int(child + 1)]) > 0)
-								child++;
-						}
-						v = __heap[child];
-						if (__compare(tmp, v) > 0){
-							__heap[i] = v;
-							i = child;
-							child <<= 1;
-						}
-						else break;
-					}
-				}else{
-					while (child < __count){
-						if (child < __count - 1){
-							if (__heap[child] - __heap[int(child + 1)] > 0)
-								child++;
-						}
-						v = __heap[child];
-						if (tmp - v > 0){
-							__heap[i] = v;
-							i = child;
-							child <<= 1;
-						}
-						else break;
-					}
-				}
-				__count--;
-				__heap[i] = tmp;
-				return o;
-			}
-			return null;
-		}
-		
-		/**
-		 * Tests if a given item exists.
-		 */
-		public function contains(obj:*):Boolean
-		{
-			for (var i:int = 1; i <= __count; i++){
-				if (__heap[i] === obj)
-					return true;
-			}
-			return false;
-		}
-		
-		public function clear():void
-		{
-			__heap = new Array(__size);
-			__count = 0;
-		}
-		
-		public function getIterator():Iterator
-		{
-			return new HeapIterator(this);
-		}
-
-		public function get size():int
-		{
-			return __count;
-		}
-		
-	}
-}
-
-import com.adobe.linguistics.spelling.core.container.Heap;
-import com.adobe.linguistics.spelling.core.container.Iterator;
-
-internal class HeapIterator implements Iterator
-{
-	private var __values:Array;
-	private var __length:int;
-	private var __cursor:int;
-	
-	public function HeapIterator(heap:Heap)
-	{
-		__values = heap.toArray();
-		__cursor = 0;
-		__length = __values.length;
-	}
-	
-	public function get data():*
-	{
-		return __values[__cursor];
-	}
-	
-	public function set data(obj:*):void
-	{
-		__values[__cursor] = obj;
-	}
-	
-	public function start():void
-	{
-		__cursor = 0;
-	}
-	
-	public function hasNext():Boolean
-	{
-		return __cursor < __length;
-	}
-	
-	public function next():*
-	{
-		return __values[__cursor++];
-	}
-}
-

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/container/Iterator.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/container/Iterator.as b/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/container/Iterator.as
deleted file mode 100644
index 4abe889..0000000
--- a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/container/Iterator.as
+++ /dev/null
@@ -1,64 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-
-
-
-package com.adobe.linguistics.spelling.core.container
-{
-	/**
-	 * public interface Iterator
-	 * An iterator over a collection. Iterator takes the place of Enumeration 
-	 * in the AS collections framework. Iterators differ from enumerations in 
-	 * two ways:
-	 * Iterators allow the caller to remove elements from the underlying 
-	 * collection during the iteration with well-defined semantics.
-	 * Method names have been improved. 
-	 */
-	public interface Iterator
-	{
-
-		/**
-		 * Grants access to the current item being referenced by the iterator.
-		 * This provides a quick way to read or write the current data.
-		 * Dirty interface, will remove in next version.
-		 */
-		function get data():*
-		function set data(obj:*):void	
-
-		/**
-		 * Seek the iterator to the first item in the collection.
-		 */
-		function start():void
-
-		/**
-		 * Returns the next element in the iteration.
-		 * 
-		 */
-		function next():*
-		
-		/**
-		 * Returns true if the iteration has more elements.
-		 * 
-		 * @Returns true if the iteration has more elements.
-		 */
-		function hasNext():Boolean
-		
-		}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/container/Set.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/container/Set.as b/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/container/Set.as
deleted file mode 100644
index 32525e7..0000000
--- a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/container/Set.as
+++ /dev/null
@@ -1,195 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-
-
-
-package com.adobe.linguistics.spelling.core.container
-{
-	import flash.utils.Dictionary;
-	
-	/**
-	 * A collection that contains no duplicate elements. More formally, sets 
-	 * contain no pair of elements e1 and e2 such that e1.equals(e2), and at 
-	 * most one null element. As implied by its name, this interface models 
-	 * the mathematical set abstraction.
-	 */
-	public final class Set implements Collection
-	{
-		private var __size:int;
-		private var __set:Dictionary = new Dictionary(true);
-		
-		/**
-		 * Creates a empty set.
-		 */
-		public function Set()
-		{
-			__set = new Dictionary();			
-		}
-		
-
-		public function contains(obj:*):Boolean
-		{
-			return __set[obj] != undefined;
-		}
-		
-		public function clear():void
-		{
-			__set = new Dictionary();
-			__size = 0;
-		}
-		
-		public function get data():Dictionary {
-			return this.__set;
-		}
-		
-		public function getIterator():Iterator
-		{
-			return new SetIterator(this);
-		}
-		
-		public function get size():int
-		{
-			return __size;
-		}
-		
-		public function isEmpty():Boolean
-		{
-			return __size == 0;
-		}
-
-		/**
-		 * Reads an item from the set.
-		 * 
-		 * @param obj The item to retrieve.
-		 * @return The item matching the obj parameter or null.
-		 */
-		public function lookup(obj:*):*
-		{
-			var val:* = __set[obj];
-			return val != undefined ? val : null;
-		}
-
-		/**
-		 * Adds the specified element to this set if it is not already present (optional operation).
-		 * 
-		 * @param obj The item to be added.
-		 */
-		public function insert(obj:*):void
-		{
-			if (obj == null) return;
-			if (obj == undefined) return;
-			if (__set[obj]) return;
-			
-			__set[obj] = obj;
-			__size++;
-		}
-		
-		/**
-		 * Removes the specified element from this set if it is present (optional operation).
-		 * 
-		 * @param  obj The item to be removed
-		 * @return The removed item or null.
-		 */
-		public function remove(obj:*):Boolean
-		{
-			if (__set[obj] != undefined)
-			{
-				delete __set[obj];
-				__size--;
-				return true;
-			}
-			return false;
-		}
-		
-		public function toArray():Array
-		{
-			var a:Array = new Array(__size);
-			var j:int;
-			for (var i:* in __set) a[j++] = i;
-			return a;
-		}
-		
-		/**
-		 * Return a string representing the current object.
-		 */
-		public function toString():String
-		{
-			return "[Set, size=" + size + "]";
-		}
-		
-		/**
-		 * Prints out all elements (debug use only).
-		 */
-		public function dump():String
-		{
-			var s:String = "Set:\n";
-			for each (var i:* in __set)
-				s += "[val: " + i + "]\n";
-			return s;
-		}
-	}
-
-}
-
-
-import com.adobe.linguistics.spelling.core.container.Iterator
-import com.adobe.linguistics.spelling.core.container.Set;
-
-internal class SetIterator implements Iterator
-{
-	private var __cursor:int;
-	private var __size:int;
-	private var __s:Set;
-	private var __a:Array;
-
-	public function start():void
-	{
-		__cursor = 0;
-	}
-
-	public function get data():*
-	{
-		return __a[__cursor];
-	}
-	
-	public function set data(obj:*):void
-	{
-		__s.remove(__a[__cursor]);
-		__s.insert(obj);
-	}	
-	
-	public function SetIterator(s:Set)
-	{
-		__cursor = 0;
-		__size = s.size;
-		__s = s;
-		__a = s.toArray();
-	}
-	
-	public function next():*
-	{
-		return __a[__cursor++];
-	}
-	
-	public function hasNext():Boolean
-	{
-		return __cursor < __size;
-	}
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/container/SparseHashTable.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/container/SparseHashTable.as b/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/container/SparseHashTable.as
deleted file mode 100644
index 3a0e8d1..0000000
--- a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/container/SparseHashTable.as
+++ /dev/null
@@ -1,283 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-
-package com.adobe.linguistics.spelling.core.container
-{
-	import com.adobe.linguistics.spelling.core.utils.*;
-	public final class SparseHashTable implements Collection
-	{
-		
-		private var _keyTable:Array;
-		private var _elementTable:Array;
-		private var _hashSize:int;
-		private var _tableCapacity:int;
-		private var _loadFactor:Number;
-		private var _elementNum:int;
-		private var _deletedObject:Object = new Object();
-		
-		/**
-		 * A simple function for hashing strings.
-		 */
-		private function hashString(s:String):int
-		{
-			var hash:int = 0, i:int, k:int = s.length, ROTATE_LEN:int = 5;
-			for ( i =0; i < 4 && !isNaN(s.charCodeAt(i)); ++i ) {
-				hash = ( hash << 8 ) | ( s.charCodeAt(i) )
-			}
-			while ( !isNaN(s.charCodeAt(i)) ) {
-				(hash) = ((hash) << (ROTATE_LEN)) | (((hash) >> (32 - ROTATE_LEN)) & ((1 << (ROTATE_LEN))-1));
-				hash ^= ( s.charCodeAt(i) );
-				++i; 
-			}
-			return (hash > 0) ? hash : -hash; // or use uint conversion to convert minus number to plus number.... still debate//
-		}
-//		private function hashString(s:String):int
-//		{
-//			var hash:int = 0, i:int, k:int = s.length;
-//			for (i = 0; i < k; i++) hash += (i + 1) * s.charCodeAt(i);
-//			return hash;
-//		}
-		
-		/**
-		 * A simple function for hashing integers.
-		 */
-		private function hashNumber(n:Number):int
-		{
-			var i:int = int(n);
-			return int(i>0? i:-i);
-		}
-		
-		private function hash(key:*):int {
-			if (key is Number ) {
-				return hashNumber(key);
-			}else if (key is String ) {
-				return hashString(key);
-			}
-			
-			if (key.hasOwnProperty("hashCode"))
-            	return key.hashCode()>0 ? key.hashCode() : -key.hashCode();
-        	else
-            	return int(key)>0 ? int(key) : -int(key);
-		}
-
-		public function SparseHashTable(initialCapacity:int = 128, loadFactor:Number = 0.75)
-		{
-			initHash(initialCapacity, loadFactor);
-		}
-		
-		private function initHash(initialCapacity:int = 128, loadFactor:Number = 0.75):void {
-			if ( !(initialCapacity > 0) ||  !( loadFactor > 0 && loadFactor < 1) )
-				return; //input is invalid, should through exception or ...
-			_loadFactor = loadFactor;
-			_hashSize = initialCapacity;
-			_tableCapacity = MathUtils.nextPrime( int(_hashSize/loadFactor) );
-			_keyTable = new Array(_tableCapacity);
-			_elementTable = new Array(_tableCapacity);
-			_elementNum = 0;
-			clear();
-		}
-		
-		private function getKeyPosition(key:*):int {
-			var hashValue:int = hash(key);
-			var pos:int;
-			if ( hashValue < 0 ) {
-				trace ( "hashValue shouldn't be negative integer" );
-				return -1;
-			}
-			//Quadratic Probing
-			for ( var i:int =0; i < _tableCapacity; ++i ) {
-				pos = (hashValue+i*i)%_tableCapacity ; //hi=(h(key)+i*i)%m 0≤i≤m-1 
-				if ( _keyTable[pos] == null ) 
-					break;
-				if ( _keyTable[pos] == key ) {
-					return pos;
-				}
-			}
-			return -1;						
-		}
-
-		private function calculateKeyPostion(key:*):int {
-			var hashValue:int = hash(key);
-			var pos:int;
-			if ( hashValue < 0 ) {
-				trace ( "Position shouldn't be negative" );
-				return -1;
-			}
-			//Quadratic Probing
-			for ( var i:int =0; i < _tableCapacity; ++i ) {
-				pos = (hashValue+i*i)%_tableCapacity ; //hi=(h(key)+i*i)%m 0≤i≤m-1 
-				if ( (_keyTable[pos] == null ) || 
-				( _keyTable[pos] == _deletedObject ) ) {
-					// insert successfully
-					return pos;
-				}
-			}
-			return -1; // hash table is full now. it should never happen.
-			
-		}		
-		
-
-		protected function rehash():void {
-			if ( _hashSize == _elementNum ) {
-				var oldKeyTable:Array = _keyTable;
-				var oldElementTable:Array = _elementTable;
-				initHash(_hashSize*2, _loadFactor);
-				for ( var i:int =0 ; i < oldKeyTable.length; ++i ) {
-					if (oldKeyTable[i]==null 
-					|| oldKeyTable[i] == _deletedObject) {
-						continue;
-					}
-					put(oldKeyTable[i],oldElementTable[i] );
-				}
-				oldKeyTable=null;
-				oldElementTable=null;
-			}
-		}
-		
-		public function put( key:*, value:* ) :Boolean {
-			if ( _hashSize == _elementNum ) {
-				rehash();
-			}
-
-			if ( containsKey(key)  ) {
-				trace ( "Contains the same Key in the table" );
-				return false;
-			}
-			
-			var pos:int = calculateKeyPostion(key);
-			if ( pos < 0 ) {
-				trace ( "SparseHash internal error." );
-				return false;
-			}
-
-			++_elementNum;
-			_keyTable[pos] = key;
-			_elementTable[pos] = value;
-			return true;
-		}
-
-		public function remove(key:*):* {
-			var pos:int = getKeyPosition(key);
-			var res:* = (pos < 0) ? null:_elementTable[pos];
-			if ( pos >= 0 ) {
-				--_elementNum;
-				_keyTable[pos] =_deletedObject;
-				_elementTable[pos] = _deletedObject;
-			}
-			return res;
-		}
-		
-		public function contains(value:*):Boolean {
-			return containsValue(value);
-		}
-		
-		/**
-		 * Determines if the collection contains the specified element.
-		 * 
-		 * @ obj: element whose presence in this collection is to be tested.
-		 * 
-		 * @ Returns true if this collection contains the specified element.
-		 */
-		public function containsKey(key:*):Boolean {
-			var pos:int = getKeyPosition(key);
-			return (pos >= 0);	
-		}
-		
-		public function containsValue(value:*):Boolean {
-			for ( var i:int =0; i < _tableCapacity; ++i ) {
-				if ( (_keyTable[i] == null ) || 
-				( _keyTable[i] == _deletedObject ) ) {
-					continue;
-				}
-				if ( _elementTable[i].value == value ) 
-					return true;
-			}
-			return false;
-		}
-		
-		public function getElement(key:* ):* {
-			var pos:int = getKeyPosition(key);
-			return (pos < 0) ? null:_elementTable[pos];
-			
-		}
-
-		/**
-		 * The number of elements in this collection.
-		 * @Returns the number of elements in this collection.
-		 */
-		public function get size():int {
-			return _elementNum;
-		}
-		
-		public function get elements():Enumeration {
-			return null;
-		}
-		
-		public function get keys():Enumeration {
-			return null;
-		}
-		
-		/**
-		 * Tests if the collection is empty.
-		 * 
-		 * @ Returns true if this collection contains no elements.
-		 */
-		public function isEmpty():Boolean {
-			return (_elementNum==0);
-		}
-		
-		
-		/**
-		 * Removes all of the elements from this collection (optional operation).
-		 */
-		public function clear():void {
-			var i:int;
-			for( i=0;i< _tableCapacity;++i) {
-				_keyTable[i] = null;
-				_elementTable[i] = null;
-			}
-		}
-		
-		/**
-		 * Returns an iterator over the elements in this collection. There are 
-		 * no guarantees concerning the order in which the elements are returned 
-		 * (unless this collection is an instance of some class that provides a guarantee). 
-		 *
-		 * @an Iterator over the elements in this collection
-		 */
-		public function getIterator():Iterator {
-			return null;
-		}
-		
-		/**
-		 * Returns an array containing all of the elements in this collection. 
-		 * If the collection makes any guarantees as to what order its elements 
-		 * are returned by its iterator, this method must return the elements 
-		 * in the same order.
-		 * 
-		 * @return An array.
-		 */
-		public function toArray():Array {
-			return _keyTable;
-		}		
-		
-	}
-}
-

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/env/ExternalConstants.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/env/ExternalConstants.as b/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/env/ExternalConstants.as
deleted file mode 100644
index e38052e..0000000
--- a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/env/ExternalConstants.as
+++ /dev/null
@@ -1,47 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-
-package com.adobe.linguistics.spelling.core.env
-{
-	/*
-	 * External-Internal public Constant properties...
-	 * In the future, we might want to merge this class with InternalConstant class...
-	 */
-	
-	public class ExternalConstants
-	{
-
-		// casing
-		static public const NOCAP:int =					0;
-		static public const INITCAP:int =				1;
-		
-		
-		static public const SPELL_COMPOUND:int=			(1 << 0);
-		static public const SPELL_FORBIDDEN:int=		(1 << 1);
-		static public const SPELL_ALLCAP:int=			(1 << 2);
-		static public const SPELL_NOCAP:int=			(1 << 3);
-		static public const SPELL_INITCAP:int=			(1 << 4);
-
-		public function ExternalConstants()
-		{
-		}
-
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/env/InternalConstants.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/env/InternalConstants.as b/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/env/InternalConstants.as
deleted file mode 100644
index e14fc31..0000000
--- a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/env/InternalConstants.as
+++ /dev/null
@@ -1,87 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-
-package com.adobe.linguistics.spelling.core.env
-{
-	/*
-	 * Internal-Internal public Constant properties...
-	 * In the future, we might want to merge this class with ExternalConstant class...
-	 * This one is sharing by HunSpell related algorithm...
-	 */
-	public class InternalConstants
-	{
-		// casing
-		static public const NOCAP:int =					1;
-		static public const INITCAP:int =				2;
-		static public const ALLCAP:int =				4;
-		static public const HUHCAP:int =				8;
-		static public const HUHINITCAP:int =			16;
-
-		
-		static public const FLAG_LONG:int = 			1;
-		static public const FLAG_NUM:int = 				2;
-		static public const FLAG_UNI:int = 				3;
-		static public const FLAG_CHAR:int = 			0;
-
-		// default flags
-		static public const DEFAULTFLAGS:int = 			65510;
-		static public const FORBIDDENWORD:int = 		65511;
-		static public const ONLYUPCASEFLAG:int = 		65511;
-
-		static public const MAXWORDLEN:int =			100;
-
-		static public const FLAG_NULL:int = 			0x00;
-		
-		// affentry options
-		static public const aeXPRODUCT:int =			(1 << 0);
-		
-		static public const SPELL_KEYSTRING:String = 	"qwertyuiop|asdfghjkl|zxcvbnm"; 
-
-		// internal const for ngram algorithm.
-	    public static const NGRAM_LOWERING:int = 		(1 << 2);
-		public static const NGRAM_LONGER_WORSE:int = 	(1 << 0);
-		public static const NGRAM_ANY_MISMATCH:int = 	(1 << 1);
-
-	    static public const MAX_ROOTS:int = 			100;
-	    static public const MAX_WORDS:int = 			100;
-	    static public const MAX_GUESS:int = 			200;
-	    static public const MAXNGRAMSUGS:int=			4;
-	    static public const MAXPHONSUGS:int=			2;
-
-		static public const DEFAULTENCODING:String = 	"utf-8";
-		
-		
-		static public const MAXSUGGESTION:int =			10;
-		// internal const for ICONV or OCONV RULE.
-		static public const CONV_ICONV:Boolean=			true;
-		static public const CONV_OCONV:Boolean=			false;
-		
-		//Maximum word breaks allowed
-		static public const MAX_WORD_BREAKS:int=		10;
-		
-		//Constants for Loading of Dictionaries in Parts
-		static public const DICT_LOAD_DELAY:int=		10; //this is timeout delay between loading of two parts of dictionaries. In milliseconds
-		static public const WORDS_PER_SPLIT:int=		20000;// this is the default value of number of words to be loaded in each split.
-		public function InternalConstants()
-		{
-		}
-
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/error/ContentError.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/error/ContentError.as b/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/error/ContentError.as
deleted file mode 100644
index 239b031..0000000
--- a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/error/ContentError.as
+++ /dev/null
@@ -1,39 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-
-package com.adobe.linguistics.spelling.core.error
-{
-	/*
-	 *@private
-	 * Deprecated class for now...
-	 * History: 
-	 *          In the beginning, I would like to have our own error class for critical exception. 
-	 *          After sharing this with Xie, I was convinced to drop this idea by discussing with Xie. 
-	 * ToDo: Need a revisit after we have compound word support.
-	 */
-	public class ContentError extends Error
-	{
-		public function ContentError(message:String, errorID:int)
-		{
-			super(message, errorID);
-		}
-
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/error/ErrorTable.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/error/ErrorTable.as b/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/error/ErrorTable.as
deleted file mode 100644
index d2dba8a..0000000
--- a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/error/ErrorTable.as
+++ /dev/null
@@ -1,41 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-
-package com.adobe.linguistics.spelling.core.error
-{
-	/*
-	 *@private
-	 * Deprecated class for now...
-	 * History: 
-	 *          In the beginning, I would like to have our own error class for critical exception. 
-	 *          After sharing this with Xie, I was convinced to drop this idea by discussing with Xie. 
-	 * ToDo: Need a revisit after we have compound word support.
-	 */
-	public class ErrorTable
-	{
-		
-		static public const CONTENTPARSINGERROR_ID:int=11235;
-		static public const CONTENTPARSINGERROR_MSG:String="null cannot be parsed to a squiggly dictionary";
-		public function ErrorTable()
-		{
-		}
-
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4e4f9830/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/logging/AbstractTarget.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/logging/AbstractTarget.as b/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/logging/AbstractTarget.as
deleted file mode 100644
index 52e5dd6..0000000
--- a/Squiggly/main/AdobeSpellingEngine/src/com/adobe/linguistics/spelling/core/logging/AbstractTarget.as
+++ /dev/null
@@ -1,167 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-
-package com.adobe.linguistics.spelling.core.logging
-{
-	import flash.errors.IllegalOperationError;
-public class AbstractTarget implements ILoggingTarget
-{
-	private var _usingLevelMaskMode:Boolean;
-    public function AbstractTarget(usingLevelMaskMode:Boolean = false)
-    {
-        super();
-        this._usingLevelMaskMode = usingLevelMaskMode;
-
-//        _id = UIDUtil.createUID();
-    }
-
-    private var _loggerCount:uint = 0;
-
-    private var _filters:Array = [ "*" ];
-
-    public function get filters():Array
-    {
-        return _filters;
-    }
-
-    public function set filters(value:Array):void
-    {
-        if (value && value.length > 0)
-        {
-            // a valid filter value will be fully qualified or have a wildcard
-            // in it.  the wild card can only be located at the end of the
-            // expression.  valid examples  xx*, xx.*,  *
-            var filter:String;
-            var index:int;
-            var message:String;
-            for (var i:uint = 0; i<value.length; i++)
-            {
-                filter = value[i];
-                  // check for invalid characters
-                if (Log.hasIllegalCharacters(filter))
-                {
-                    throw new IllegalOperationError("Please check for invalid characters.");
-                }
-
-                index = filter.indexOf("*");
-                if ((index >= 0) && (index != (filter.length -1)))
-                {
-                    throw new IllegalOperationError("Please check for invalid filters.");
-                }
-            } // for
-        }
-        else
-        {
-            // if null was specified then default to all
-            value = ["*"];
-        }
-
-        if (_loggerCount > 0)
-        {
-            Log.removeTarget(this);
-            _filters = value;
-            Log.addTarget(this);
-        }
-        else
-        {
-            _filters = value;
-        }
-    }
-
-    private var _id:String;
-
-     public function get id():String
-     {
-         return _id;
-     }
-    
-    private var _level:int = LogEventLevel.ALL;
-
-    public function get level():int
-    {
-        return _level;
-    }
-
-    /**
-     *  @private
-     */
-    public function set level(value:int):void
-    {
-    	if ( this._usingLevelMaskMode == false ) {
-	    	if ( !LogEventLevel.isValidLevel(value) ) {
-	    		throw new IllegalOperationError("Please set an valid level in the level setter.");
-	    	}
-	    	
-	    	this._mask = LogEventLevel.getUpperMask(value);
-    	}else {
-	    	if ( !LogEventLevel.isValidMask(value) ) {
-	    		throw new IllegalOperationError("Please set an valid mask in the mask setter.");
-	    	}
-	    	this._mask = value;
-    	}
-        // A change of level may impact the target level for Log.
-        Log.removeTarget(this);
-        _level = value;
-        Log.addTarget(this);        
-    }
-    
-    
-    private var _mask:int = LogEventLevel.ALL;
-    public function get mask():int {
-    	return this._mask;
-    }
-    
-    
-    public function addLogger(logger:ILogger):void
-    {
-        if (logger)
-        {
-            _loggerCount++;
-            logger.addEventListener(LogEvent.eventID, logHandler);
-        }
-    }
-
-    public function removeLogger(logger:ILogger):void
-    {
-        if (logger)
-        {
-            _loggerCount--;
-            logger.removeEventListener(LogEvent.eventID, logHandler);
-        }
-    }
-
-    public function initialized(document:Object, id:String):void
-    {
-        _id = id;
-        Log.addTarget(this);
-    }
-
-    public function logEvent(event:LogEvent):void
-    {
-    }
-
-    private function logHandler(event:LogEvent):void
-    {
-        if ( (event.level & mask) != 0)
-            logEvent(event);
-    }
-}
-
-}


[13/50] [abbrv] git commit: [flex-utilities] [refs/heads/master] - set application in source tab needed for FLEX-34492

Posted by jm...@apache.org.
set application in source tab needed for FLEX-34492


Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/7ce2575f
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/7ce2575f
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/7ce2575f

Branch: refs/heads/master
Commit: 7ce2575fc735af82c32ee2cfc8264de859fa83ae
Parents: ca30f44
Author: Justin Mclean <jm...@apache.org>
Authored: Wed Aug 27 17:01:21 2014 +1000
Committer: Justin Mclean <jm...@apache.org>
Committed: Wed Aug 27 17:01:21 2014 +1000

----------------------------------------------------------------------
 TourDeFlex/TourDeFlex3/src/viewsource.mxml | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/7ce2575f/TourDeFlex/TourDeFlex3/src/viewsource.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/viewsource.mxml b/TourDeFlex/TourDeFlex3/src/viewsource.mxml
index dbf83bf..d4d436a 100755
--- a/TourDeFlex/TourDeFlex3/src/viewsource.mxml
+++ b/TourDeFlex/TourDeFlex3/src/viewsource.mxml
@@ -46,6 +46,7 @@
 						tabs[i] = new SourceTab();
 						tn.addChild(tabs[i]);
 						tabs[i].source = files[i];
+						tabs[i].app = appUrl;
     	    		}
 				}
 			}