当前位置: 首页>>代码示例>>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;未经允许,请勿转载。