Пример #1
0
 /// <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;
 }
Пример #2
0
        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);
        }
Пример #3
0
 public void GetExtentionTest4()
 {
     ICloneExtension actual = CAvailableExtentions.GetExtention(LANGUAGES.LANGUAGE_JAVA);
 }
Пример #4
0
 public void GetExtentionTest2()
 {
     ICloneExtension actual = CAvailableExtentions.GetExtention(LANGUAGES.LANGUAGE_UNKNOWN);
 }
Пример #5
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));
 }
Пример #6
0
        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;
        }
Пример #7
0
 /// <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));
 }
Пример #8
0
        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());
        }