Ejemplo n.º 1
0
		public override void FixtureTeardown()
		{
			m_textsDefn = null;
			m_tagRepo = null;
			if (m_tagChild != null)
				m_tagChild.Dispose();
			m_tagChild = null;

			base.FixtureTeardown();
		}
Ejemplo n.º 2
0
        private Dictionary <Tuple <ISegment, int>, ITsString> m_tagStrings;       // Cache tag strings by ISegment and index

        /// <summary>
        /// Initializes a new instance of the <see cref="InterlinTaggingVc"/> class.
        /// </summary>
        /// <param name="cache">The cache.</param>
        public InterlinTaggingVc(LcmCache cache)
            : base(cache)
        {
            m_cache       = cache;
            m_lenEndTag   = ITextStrings.ksEndTagSymbol.Length;
            m_lenStartTag = ITextStrings.ksStartTagSymbol.Length;
            SetAnalysisRightToLeft();
            m_emptyAnalysisStr = TsStringUtils.EmptyString(m_cache.DefaultAnalWs);
            m_tagRepo          = m_cache.ServiceLocator.GetInstance <ITextTagRepository>();
            m_tagStrings       = new Dictionary <Tuple <ISegment, int>, ITsString>();
        }
        public override void FixtureTeardown()
        {
            m_textsDefn = null;
            m_tagRepo   = null;
            if (m_tagChild != null)
            {
                m_tagChild.Dispose();
            }
            m_tagChild = null;

            base.FixtureTeardown();
        }
        /// <summary>
        /// non-undoable task
        /// </summary>
        private void DoSetupFixture()
        {
            // setup default vernacular ws.
            m_wsXkal = Cache.ServiceLocator.WritingSystemManager.Set("qaa-x-kal");
            m_wsXkal.DefaultFontName = "Times New Roman";
            Cache.ServiceLocator.WritingSystems.VernacularWritingSystems.Add(m_wsXkal);
            Cache.ServiceLocator.WritingSystems.CurrentVernacularWritingSystems.Insert(0, m_wsXkal);
            m_textsDefn = new XmlDocument();
            m_tagRepo   = Cache.ServiceLocator.GetInstance <ITextTagRepository>();
            ConfigurationFilePath("Language Explorer/Configuration/Words/AreaConfiguration.xml");
            m_text1 = LoadTestText("FDO/FDOTests/TestData/ParagraphParserTestTexts.xml", 1, m_textsDefn);
            m_para1 = m_text1.ContentsOA.ParagraphsOS[0] as IStTxtPara;
            ParseTestText();

            m_tagChild = new TestTaggingChild(Cache);
            m_tagChild.SetText(m_text1.ContentsOA);

            // This could change, but at least it gives a reasonably stable list to test from.
            m_textMarkupTags = Cache.LangProject.GetDefaultTextTagList();
            LoadTagListPossibilities();
        }
Ejemplo n.º 5
0
        /// <summary>
        /// non-undoable task
        /// </summary>
        private void DoSetupFixture()
        {
            // setup default vernacular ws.
            m_wsXkal             = Cache.ServiceLocator.WritingSystemManager.Set("qaa-x-kal");
            m_wsXkal.DefaultFont = new FontDefinition("Times New Roman");
            Cache.ServiceLocator.WritingSystems.VernacularWritingSystems.Add(m_wsXkal);
            Cache.ServiceLocator.WritingSystems.CurrentVernacularWritingSystems.Insert(0, m_wsXkal);
            m_textsDefn = new XmlDocument();
            m_tagRepo   = Cache.ServiceLocator.GetInstance <ITextTagRepository>();
            string textDefinitionsPath = Path.Combine(FwDirectoryFinder.SourceDirectory, "LexText", "Interlinear", "ITextDllTests",
                                                      "ParagraphParserTestTexts.xml");

            m_text1 = LoadTestText(textDefinitionsPath, 1, m_textsDefn);
            m_para1 = m_text1.ContentsOA.ParagraphsOS[0] as IStTxtPara;
            ParseTestText();

            m_tagChild = new TestTaggingChild(Cache);
            m_tagChild.SetText(m_text1.ContentsOA);

            // This could change, but at least it gives a reasonably stable list to test from.
            m_textMarkupTags = Cache.LangProject.GetDefaultTextTagList();
            LoadTagListPossibilities();
        }
Ejemplo n.º 6
0
		/// <summary>
		/// non-undoable task
		/// </summary>
		private void DoSetupFixture()
		{
			// setup default vernacular ws.
			m_wsXkal = Cache.ServiceLocator.WritingSystemManager.Set("qaa-x-kal");
			m_wsXkal.DefaultFontName = "Times New Roman";
			Cache.ServiceLocator.WritingSystems.VernacularWritingSystems.Add(m_wsXkal);
			Cache.ServiceLocator.WritingSystems.CurrentVernacularWritingSystems.Insert(0, m_wsXkal);
			m_textsDefn = new XmlDocument();
			m_tagRepo = Cache.ServiceLocator.GetInstance<ITextTagRepository>();
			ConfigurationFilePath("Language Explorer/Configuration/Words/AreaConfiguration.xml");
			m_text1 = LoadTestText("FDO/FDOTests/TestData/ParagraphParserTestTexts.xml", 1, m_textsDefn);
			m_para1 = m_text1.ContentsOA.ParagraphsOS[0] as IStTxtPara;
			ParseTestText();

			m_tagChild = new TestTaggingChild(Cache);
			m_tagChild.SetText(m_text1.ContentsOA);

			// This could change, but at least it gives a reasonably stable list to test from.
			m_textMarkupTags = Cache.LangProject.GetDefaultTextTagList();
			LoadTagListPossibilities();
		}
Ejemplo n.º 7
0
		private Dictionary<Tuple<ISegment, int>, ITsString> m_tagStrings; // Cache tag strings by ISegment and index

		/// <summary>
		/// Initializes a new instance of the <see cref="InterlinTaggingVc"/> class.
		/// </summary>
		/// <param name="cache">The cache.</param>
		public InterlinTaggingVc(FdoCache cache)
			: base(cache)
		{
			m_cache = cache;
			m_lenEndTag = ITextStrings.ksEndTagSymbol.Length;
			m_lenStartTag = ITextStrings.ksStartTagSymbol.Length;
			SetAnalysisRightToLeft();
			m_emptyAnalysisStr = m_cache.ServiceLocator.GetInstance<ITsStrFactory>().EmptyString(Cache.DefaultAnalWs);
			m_tagRepo = m_cache.ServiceLocator.GetInstance<ITextTagRepository>();
			m_tagStrings = new Dictionary<Tuple<ISegment, int>, ITsString>();
		}