/// <summary> /// /// </summary> /// <param name="LanguageID"></param> /// <param name="load_files_options"></param> public CSyntacticUnitsInfoProvider(LANGUAGES LanguageID, CLoadFilesOptions load_files_options) : base(load_files_options) { m_Extension = CAvailableExtentions.GetExtention(LanguageID); m_SynUnitsCollection = new CSyntacticUnitsCollection(); m_CountOfSyntacticUnits = 0; }
private void LoadSettings() { CodeLocationTextBox.Text = Properties.Settings.Default.DCSLastChoosenFolder; ChoosenFilesExtensionsTextBox.Text = Properties.Settings.Default.DCSLastChoosenFilesExtensions; var LangComboBoxInitializer = new CComboBoxInitializer <ICloneExtension>(ref ChooseLangComboBox, new EventHandler(ChooseLangComboBox_DropDownClosed), CAvailableExtentions.GetExtentionsList().Values, CAvailableExtentions.GetExtention((LANGUAGES)Properties.Settings.Default.CSWLastChoosenLanguage)); }
/// <summary> /// Загрузить параметры /// </summary> public override void LoadSettings() { MemorizeLastRunParamsCheckBox.Checked = Properties.Settings.Default.CSWMemorizeLastRunParams; CodeLocationTextBox.Text = Properties.Settings.Default.CSWLastChoosenFolder; SkippingFoldersTextBox.Text = Properties.Settings.Default.CSWSkippingFolders; IsUseParallelExtensionsCheckBox.Checked = Properties.Settings.Default.CSWIsUseParallelExtensions; var LangComboBoxInitializer = new CComboBoxInitializer <ICloneExtension>(ref ChooseLangComboBox, new EventHandler(ChooseLangComboBox_DropDownClosed), CAvailableExtentions.GetExtentionsList().Values, CAvailableExtentions.GetExtention((LANGUAGES)Properties.Settings.Default.CSWLastChoosenLanguage)); var AlgorithmComboBoxInitializer = new CComboBoxInitializer <CBaseCloneSearchStrategy>(ref ChooseAlgorithmComboBox, new EventHandler(ChooseAlgorithmComboBox_DropDownClosed), CAvailableCloneSearchAlgorithms.GetAlgorithmsList().Values, CAvailableCloneSearchAlgorithms.GetAlgorithm((CloneSearchAlgoritms)Properties.Settings.Default.CSWLastChoosenAlgorithm)); }
public void GetExtentionTest1() { LANGUAGES Lang = LANGUAGES.LANGUAGE_C_PLUS_PLUS; ICloneExtension actual = CAvailableExtentions.GetExtention(Lang); Assert.IsNotNull(actual); Assert.AreEqual(actual.LanguageID(), Lang); Lang = LANGUAGES.LANGUAGE_C_SHARP; actual = CAvailableExtentions.GetExtention(Lang); Assert.IsNotNull(actual); Assert.AreEqual(actual.LanguageID(), Lang); }
public void GetExtentionsListTest() { const int DllCount = 2; Dictionary <LANGUAGES, ICloneExtension> actual = CAvailableExtentions.GetExtentionsList(); Assert.AreEqual(DllCount, actual.Count); foreach (var extension in actual.Values) { Assert.AreNotEqual(string.Empty, extension.GetCommentSymbols()); Assert.AreNotEqual(string.Empty, extension.GetSourceFileExtentions()); } }
public void GetExtentionTest4() { ICloneExtension actual = CAvailableExtentions.GetExtention(LANGUAGES.LANGUAGE_JAVA); }
public void GetExtentionTest2() { ICloneExtension actual = CAvailableExtentions.GetExtention(LANGUAGES.LANGUAGE_UNKNOWN); }
public CloneSearchWindow() { InitializeComponent(); InitUI(); LoadSettings(); CCloneSearchOptionsGroup.InitCodeEncodingComboBox(ref CodeEncodingComboBox); m_CloneSearchExecutor = new CBaseCloneSearchExecutor(CAvailableCloneSearchAlgorithms.GetAlgorithm((CloneSearchAlgoritms)Properties.Settings.Default.CSWLastChoosenAlgorithm), CAvailableExtentions.GetExtention((LANGUAGES)Properties.Settings.Default.CSWLastChoosenLanguage)); m_CloneSearchExecutor.CloneSearchExecutingEnd += new MessageEventHandler(ReportCloneSearchExecutingEnd); m_CloneSearchExecutor.CloneSearchExecutingStart += new MessageEventHandler(ReportCloneSearchExecutingStart); m_CloneSearchExecutor.CloneSearchExecutingProgress += new MessageEventHandler(ReportCloneSearchExecutingProgress); m_StopWatch = new Stopwatch(); KminValue.Value = CCodeFragment.Kmin; }
public void LoadTest3() { string filename = Path.GetFullPath("MimeTypeDetection.cs"); Assert.IsTrue(File.Exists(filename)); CTokenizerParms args = new CTokenizerParms(filename, new CSourceFileID()); CTokenSourceFileContentLoader target = new CTokenSourceFileContentLoader(args, CAvailableExtentions.GetExtention(LANGUAGES.LANGUAGE_C_SHARP)); CCodeUnitsCollection actual = target.Load(); Assert.AreEqual(796, actual.Size()); }