本文整理汇总了Java中com.tagmycode.plugin.Framework.start方法的典型用法代码示例。如果您正苦于以下问题:Java Framework.start方法的具体用法?Java Framework.start怎么用?Java Framework.start使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.tagmycode.plugin.Framework
的用法示例。
在下文中一共展示了Framework.start方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: selectASnippetAndSeeDetailsOnRightPanel
import com.tagmycode.plugin.Framework; //导入方法依赖的package包/类
@Test
public void selectASnippetAndSeeDetailsOnRightPanel() throws Exception {
Framework framework = createFramework(createStorageEngineWithData());
mockTagMyCodeReturningValidAccountData(framework);
framework.getData().setAccount(resourceGenerate.aUser());
framework.getData().setSnippets(resourceGenerate.aSnippetCollection());
framework.getData().saveAll();
framework.start();
JFrame jFrame = new JFrame();
jFrame.add(framework.getMainWindow().getMainComponent());
jFrame.pack();
JPanel snippetViewFormPane = framework.getMainWindow().getSnippetsPanel().getSnippetViewFormPane();
assertEquals("welcome view", snippetViewFormPane.getComponent(0).getName());
framework.getMainWindow().getSnippetsPanel().getSnippetsTable().getJTable().setRowSelectionInterval(1, 1);
assertEquals("snippet view", snippetViewFormPane.getComponent(0).getName());
}
示例2: languagesArePopulatedAfterLogin
import com.tagmycode.plugin.Framework; //导入方法依赖的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());
}
示例3: fillData
import com.tagmycode.plugin.Framework; //导入方法依赖的package包/类
@Test
public void fillData() throws Exception {
Framework framework = createFramework();
framework.start();
SettingsForm settingsForm = new SettingsForm(framework, null);
settingsForm.display();
assertEquals(resourceGenerate.aUser().getEmail(), settingsForm.email.getText());
}
示例4: afterLogoutLSetLastSnippetsUpdateIsCleared
import com.tagmycode.plugin.Framework; //导入方法依赖的package包/类
@Test
public void afterLogoutLSetLastSnippetsUpdateIsCleared() throws Exception {
Framework framework = createFramework(createStorageEngineWithData());
framework.start();
mockTagMyCodeReturningValidAccountData(framework);
Framework frameworkSpy = spy(framework);
assertTrue(frameworkSpy.isInitialized());
assertDataIsValid(framework.getData());
framework.logout();
assertDataIsCleared(framework.getData());
}
示例5: networkingEnabledAfterRestart
import com.tagmycode.plugin.Framework; //导入方法依赖的package包/类
@Test
public void networkingEnabledAfterRestart() throws Exception {
StorageEngine storage = createStorageEngine();
storage.saveNetworkingEnabledFlag(true);
Framework framework = createFramework(storage);
mockTagMyCodeReturningValidAccountData(framework);
framework.start();
assertTrue(framework.getData().isNetworkingEnabled());
assertTrue(framework.getMainWindow().getSnippetsPanel().getButtonNetworking().getIcon().toString().contains("/icons/connected.png"));
}
示例6: networkingDisabledAfterRestart
import com.tagmycode.plugin.Framework; //导入方法依赖的package包/类
@Test
public void networkingDisabledAfterRestart() throws Exception {
StorageEngine storageEngineWithData = createStorageEngineWithData();
storageEngineWithData.saveNetworkingEnabledFlag(false);
final Framework framework = new FrameworkBuilder().setStorageEngine(storageEngineWithData).build();
mockTagMyCodeReturningValidAccountData(framework);
framework.start();
waitForFalse(framework.getData().isNetworkingEnabled());
waitForTrue(framework.getMainWindow().getSnippetsPanel().getButtonNetworking().getIcon().toString().contains("/icons/disconnected.png"));
}
示例7: initFramework
import com.tagmycode.plugin.Framework; //导入方法依赖的package包/类
private void initFramework() throws SQLException, IOException {
DbService dbService = new DbService(new SaveFilePath(getOrCreateNamespace()));
FrameworkConfig frameworkConfig = new FrameworkConfig(new PasswordKeyChain(project), dbService, new MessageManager(project), new TaskFactory(this), new IntelliJVersion(), getMainFrame());
framework = new Framework(new TagMyCodeApiProduction(), frameworkConfig, new Secret());
try {
framework.start();
} catch (TagMyCodeException e) {
throw new RuntimeException(e);
}
configureTheme();
}
示例8: initTagMyCode
import com.tagmycode.plugin.Framework; //导入方法依赖的package包/类
private void initTagMyCode() {
try {
DbService dbService = new DbService(new SaveFilePath(getOrCreateNamespace()));
FrameworkConfig frameworkConfig = new FrameworkConfig(new PasswordKeyChain(), dbService, new MessageManager(), new TaskFactory(), new NetBeansVersion(), getMainFrame());
framework = new Framework(new TagMyCodeApiProduction(), frameworkConfig, new Secret());
framework.start();
} catch (IOException | SQLException | TagMyCodeException e) {
throw new RuntimeException(e);
}
}