當前位置: 首頁>>代碼示例>>Java>>正文


Java LanguagesCollection類代碼示例

本文整理匯總了Java中com.tagmycode.sdk.model.LanguagesCollection的典型用法代碼示例。如果您正苦於以下問題:Java LanguagesCollection類的具體用法?Java LanguagesCollection怎麽用?Java LanguagesCollection使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


LanguagesCollection類屬於com.tagmycode.sdk.model包,在下文中一共展示了LanguagesCollection類的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: populateSnippetDialogWithExistentLanguageOverridePreferredLanguage

import com.tagmycode.sdk.model.LanguagesCollection; //導入依賴的package包/類
@Test
public void populateSnippetDialogWithExistentLanguageOverridePreferredLanguage() throws Exception {
    final Framework framework = createFramework();

    LanguagesCollection languageCollection = resourceGenerate.aLanguageCollection();
    Language customLanguage = new Language();
    customLanguage.setId(88);
    customLanguage.setName("Custom");
    customLanguage.setCode("custom");
    languageCollection.add(customLanguage);

    framework.setLanguageCollection(languageCollection);
    framework.getStorageEngine().saveLastLanguageUsed(customLanguage);

    SnippetDialog snippetDialog = createSnippetDialog(framework);

    assertEquals(customLanguage, snippetDialog.getLanguageComboBox().getSelectedItem());

    Snippet expectedSnippet = resourceGenerate.aSnippet();
    snippetDialog.populateFieldsWithSnippet(expectedSnippet);

    assertEquals(expectedSnippet.getLanguage(), snippetDialog.getLanguageComboBox().getSelectedItem());
}
 
開發者ID:massimozappino,項目名稱:tagmycode-java-plugin-framework,代碼行數:24,代碼來源:SnippetDialogTest.java

示例2: languagesArePopulatedAfterLogin

import com.tagmycode.sdk.model.LanguagesCollection; //導入依賴的package包/類
@Test
public void languagesArePopulatedAfterLogin() throws Exception {
    Framework framework = createFramework();
    framework.getStorageEngine().saveLanguageCollection(new LanguagesCollection());
    framework.start();

    framework.getStorageEngine().saveLanguageCollection(resourceGenerate.aLanguageCollection());

    SnippetDialog snippetDialog = createSnippetDialog(framework);
    framework.getData().loadAll();
    snippetDialog.setSnippet(resourceGenerate.aSnippet());

    assertEquals(2, framework.getData().getLanguages().size());
    assertEquals(2, snippetDialog.getLanguageComboBox().getItemCount());
}
 
開發者ID:massimozappino,項目名稱:tagmycode-java-plugin-framework,代碼行數:16,代碼來源:SnippetDialogTest.java

示例3: fetchLanguages

import com.tagmycode.sdk.model.LanguagesCollection; //導入依賴的package包/類
@Test
public void fetchLanguages() throws Exception {
    Client client = new Client(new TagMyCodeApiProduction(), "123", "456", new VoidOauthWallet());
    client.setOauthToken(new OauthToken("123", "456"));

    LanguagesCollection languages = new TagMyCode(client).fetchLanguages();
    assertTrue(languages.size() > 0);
}
 
開發者ID:massimozappino,項目名稱:tagmycode-java-sdk,代碼行數:9,代碼來源:IntegrationTest.java

示例4: setLanguageCollection

import com.tagmycode.sdk.model.LanguagesCollection; //導入依賴的package包/類
public void setLanguageCollection(LanguagesCollection languageCollection) throws TagMyCodeStorageException {
    getStorageEngine().saveLanguageCollection(languageCollection);
}
 
開發者ID:massimozappino,項目名稱:tagmycode-java-plugin-framework,代碼行數:4,代碼來源:Framework.java

示例5: setLanguages

import com.tagmycode.sdk.model.LanguagesCollection; //導入依賴的package包/類
public TagMyCodeMockBuilder setLanguages(LanguagesCollection languages) throws TagMyCodeException {
    when(mockTagMyCode.fetchLanguages()).thenReturn(languages);
    return this;

}
 
開發者ID:massimozappino,項目名稱:tagmycode-java-plugin-framework,代碼行數:6,代碼來源:TagMyCodeMockBuilder.java

示例6: withLanguagesCollection

import com.tagmycode.sdk.model.LanguagesCollection; //導入依賴的package包/類
private StorageEngineBuilder withLanguagesCollection(LanguagesCollection languages) throws TagMyCodeStorageException, IOException, TagMyCodeJsonException {
    storageEngine.saveLanguageCollection(languages);
    return this;
}
 
開發者ID:massimozappino,項目名稱:tagmycode-java-plugin-framework,代碼行數:5,代碼來源:StorageEngineBuilder.java

示例7: findLanguage

import com.tagmycode.sdk.model.LanguagesCollection; //導入依賴的package包/類
private Language findLanguage(TagMyCodeProject tagMyCodeProject, VirtualFile virtualFile) {
    LanguagesCollection languages = tagMyCodeProject.getFramework().getData().getLanguages();
    return new IntelliJFileToLanguage(languages).find(virtualFile);
}
 
開發者ID:massimozappino,項目名稱:tagmycode-intellij,代碼行數:5,代碼來源:AddSnippetAction.java

示例8: IntelliJFileToLanguage

import com.tagmycode.sdk.model.LanguagesCollection; //導入依賴的package包/類
IntelliJFileToLanguage(LanguagesCollection languages) {
    this.languages = languages;
}
 
開發者ID:massimozappino,項目名稱:tagmycode-intellij,代碼行數:4,代碼來源:IntelliJFileToLanguage.java


注:本文中的com.tagmycode.sdk.model.LanguagesCollection類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。