本文整理汇总了Java中com.intellij.ide.startup.impl.StartupManagerImpl类的典型用法代码示例。如果您正苦于以下问题:Java StartupManagerImpl类的具体用法?Java StartupManagerImpl怎么用?Java StartupManagerImpl使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
StartupManagerImpl类属于com.intellij.ide.startup.impl包,在下文中一共展示了StartupManagerImpl类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: setUp
import com.intellij.ide.startup.impl.StartupManagerImpl; //导入依赖的package包/类
@Override
public void setUp() throws Exception {
super.setUp();
TestRunnerUtil.replaceIdeEventQueueSafely();
EdtTestUtil.runInEdtAndWait(new ThrowableRunnable<Throwable>() {
@Override
public void run() throws Throwable {
myProjectFixture.setUp();
myTempDirFixture.setUp();
VirtualFile tempDir = myTempDirFixture.getFile("");
PlatformTestCase.synchronizeTempDirVfs(tempDir);
myPsiManager = (PsiManagerImpl)PsiManager.getInstance(getProject());
configureInspections(LocalInspectionTool.EMPTY_ARRAY, getProject(), Collections.<String>emptyList(), getTestRootDisposable());
DaemonCodeAnalyzerImpl daemonCodeAnalyzer = (DaemonCodeAnalyzerImpl)DaemonCodeAnalyzer.getInstance(getProject());
daemonCodeAnalyzer.prepareForTest();
DaemonCodeAnalyzerSettings.getInstance().setImportHintEnabled(false);
ensureIndexesUpToDate(getProject());
((StartupManagerImpl)StartupManagerEx.getInstanceEx(getProject())).runPostStartupActivities();
}
});
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:27,代码来源:CodeInsightTestFixtureImpl.java
示例2: setUp
import com.intellij.ide.startup.impl.StartupManagerImpl; //导入依赖的package包/类
@Override
public void setUp() throws Exception {
super.setUp();
UIUtil.invokeAndWaitIfNeeded(new Runnable() {
@Override
public void run() {
try {
myProjectFixture.setUp();
myTempDirFixture.setUp();
}
catch (Exception e) {
throw new RuntimeException(e);
}
myPsiManager = (PsiManagerImpl)PsiManager.getInstance(getProject());
configureInspections(myInspections == null ? LocalInspectionTool.EMPTY_ARRAY : myInspections);
DaemonCodeAnalyzerImpl daemonCodeAnalyzer = (DaemonCodeAnalyzerImpl)DaemonCodeAnalyzer.getInstance(getProject());
daemonCodeAnalyzer.prepareForTest();
DaemonCodeAnalyzerSettings.getInstance().setImportHintEnabled(false);
ensureIndexesUpToDate(getProject());
((StartupManagerImpl)StartupManagerEx.getInstanceEx(getProject())).runPostStartupActivities();
}
});
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:27,代码来源:CodeInsightTestFixtureImpl.java
示例3: getProject
import com.intellij.ide.startup.impl.StartupManagerImpl; //导入依赖的package包/类
private Project getProject() {
String path = "R:/_github.com/consulo/mssdw";
try {
final Project project;
ProjectManagerEx projectManager = ProjectManagerEx.getInstanceEx();
Project[] openProjects = projectManager.getOpenProjects();
if (openProjects.length > 0) {
project = openProjects[0];
}
else {
project = projectManager.loadProject(path);
projectManager.openTestProject(project);
final StartupManagerImpl startupManager = (StartupManagerImpl)StartupManager.getInstance(project);
startupManager.runStartupActivities();
startupManager.startCacheUpdate();
}
return project;
}
catch (Exception e) {
e.getMessage();
}
return null;
}
开发者ID:consulo,项目名称:consulo,代码行数:25,代码来源:GwtTransportServiceImpl.java
示例4: projectOpened
import com.intellij.ide.startup.impl.StartupManagerImpl; //导入依赖的package包/类
@Override
public void projectOpened()
{
// StartupManagerImpl.getInstance( _project ).registerStartupActivity(
// () -> ApplicationManager.getApplication().invokeLater(
// () -> ApplicationManager.getApplication().runWriteAction(
// () -> ManProject.manProjectFrom( _project ).projectOpened() ) ) );
StartupManagerImpl.getInstance( _project ).registerStartupActivity( () ->
ApplicationManager.getApplication().runReadAction( () -> ManProject.manProjectFrom( _project ).projectOpened() ) );
}
开发者ID:manifold-systems,项目名称:manifold-ij,代码行数:12,代码来源:ManProjectComponent.java
示例5: setUp
import com.intellij.ide.startup.impl.StartupManagerImpl; //导入依赖的package包/类
@Override
protected void setUp() throws Exception {
super.setUp();
final LocalInspectionTool[] tools = configureLocalInspectionTools();
CodeInsightTestFixtureImpl.configureInspections(tools, getProject(), Collections.<String>emptyList(),
getTestRootDisposable());
DaemonCodeAnalyzerImpl daemonCodeAnalyzer = (DaemonCodeAnalyzerImpl)DaemonCodeAnalyzer.getInstance(getProject());
daemonCodeAnalyzer.prepareForTest();
final StartupManagerImpl startupManager = (StartupManagerImpl)StartupManagerEx.getInstanceEx(getProject());
startupManager.runStartupActivities();
startupManager.startCacheUpdate();
startupManager.runPostStartupActivities();
DaemonCodeAnalyzerSettings.getInstance().setImportHintEnabled(false);
if (isPerformanceTest()) {
IntentionManager.getInstance().getAvailableIntentionActions(); // hack to avoid slowdowns in PyExtensionFactory
PathManagerEx.getTestDataPath(); // to cache stuff
ReferenceProvidersRegistry.getInstance(); // pre-load tons of classes
InjectedLanguageManager.getInstance(getProject()); // zillion of Dom Sem classes
LanguageAnnotators.INSTANCE.allForLanguage(JavaLanguage.INSTANCE); // pile of annotator classes loads
LanguageAnnotators.INSTANCE.allForLanguage(StdLanguages.XML);
ProblemHighlightFilter.EP_NAME.getExtensions();
Extensions.getExtensions(ImplicitUsageProvider.EP_NAME);
Extensions.getExtensions(XmlSchemaProvider.EP_NAME);
Extensions.getExtensions(XmlFileNSInfoProvider.EP_NAME);
Extensions.getExtensions(ExternalAnnotatorsFilter.EXTENSION_POINT_NAME);
Extensions.getExtensions(IndexPatternBuilder.EP_NAME);
}
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:33,代码来源:DaemonAnalyzerTestCase.java
示例6: tearDown
import com.intellij.ide.startup.impl.StartupManagerImpl; //导入依赖的package包/类
@Override
protected void tearDown() throws Exception {
try {
DaemonCodeAnalyzerSettings.getInstance().setImportHintEnabled(true); // return default value to avoid unnecessary save
final Project project = getProject();
if (project != null) {
((StartupManagerImpl)StartupManager.getInstance(project)).checkCleared();
((DaemonCodeAnalyzerImpl)DaemonCodeAnalyzer.getInstance(project)).cleanupAfterTest();
}
}
finally {
super.tearDown();
}
//((VirtualFilePointerManagerImpl)VirtualFilePointerManager.getInstance()).assertPointersDisposed();
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:DaemonAnalyzerTestCase.java
示例7: setUp
import com.intellij.ide.startup.impl.StartupManagerImpl; //导入依赖的package包/类
@Before
public void setUp() throws Exception {
super.setUp();
UIUtil.invokeAndWaitIfNeeded(new Runnable() {
@Override
public void run() {
try {
final IdeaTestFixtureFactory fixtureFactory = IdeaTestFixtureFactory.getFixtureFactory();
myTempDirFixture = fixtureFactory.createTempDirTestFixture();
myTempDirFixture.setUp();
myClientRoot = new File(myTempDirFixture.getTempDirPath(), "clientroot");
myClientRoot.mkdir();
initProject(myClientRoot, IgnoredFilesTest.this.getTestName());
((StartupManagerImpl)StartupManager.getInstance(myProject)).runPostStartupActivities();
myChangeListManager = ChangeListManager.getInstance(myProject);
myVcs = SvnVcs.getInstance(myProject);
myVcsManager = (ProjectLevelVcsManagerImpl)ProjectLevelVcsManager.getInstance(myProject);
myVcsManager.registerVcs(myVcs);
myVcsManager.setDirectoryMapping(myWorkingCopyDir.getPath(), myVcs.getName());
myVcsDirtyScopeManager = VcsDirtyScopeManager.getInstance(myProject);
myLocalFileSystem = LocalFileSystem.getInstance();
}
catch (Exception e) {
throw new RuntimeException(e);
}
}
});
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:34,代码来源:IgnoredFilesTest.java
示例8: setUp
import com.intellij.ide.startup.impl.StartupManagerImpl; //导入依赖的package包/类
@Before
public void setUp() throws Exception {
UIUtil.invokeAndWaitIfNeeded(new Runnable() {
@Override
public void run() {
try {
final IdeaTestFixtureFactory fixtureFactory = IdeaTestFixtureFactory.getFixtureFactory();
myTempDirFixture = fixtureFactory.createTempDirTestFixture();
myTempDirFixture.setUp();
myClientRoot = new File(myTempDirFixture.getTempDirPath(), "clientroot");
myClientRoot.mkdir();
initProject(myClientRoot, IgnoredFilesTest.this.getTestName());
((StartupManagerImpl)StartupManager.getInstance(myProject)).runPostStartupActivities();
myChangeListManager = ChangeListManager.getInstance(myProject);
myVcs = SvnVcs.getInstance(myProject);
myVcsManager = (ProjectLevelVcsManagerImpl)ProjectLevelVcsManager.getInstance(myProject);
myVcsManager.registerVcs(myVcs);
myVcsManager.setDirectoryMapping(myWorkingCopyDir.getPath(), myVcs.getName());
myVcsDirtyScopeManager = VcsDirtyScopeManager.getInstance(myProject);
myLocalFileSystem = LocalFileSystem.getInstance();
}
catch (Exception e) {
throw new RuntimeException(e);
}
}
});
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:33,代码来源:IgnoredFilesTest.java
示例9: startChangeProvider
import com.intellij.ide.startup.impl.StartupManagerImpl; //导入依赖的package包/类
protected void startChangeProvider() {
((StartupManagerImpl) StartupManager.getInstance(myProject)).runPostStartupActivities();
myChangeListManager = ChangeListManager.getInstance(myProject);
((ProjectComponent) myChangeListManager).projectOpened();
myDirtyScopeManager = VcsDirtyScopeManager.getInstance(myProject);
((ProjectComponent) myDirtyScopeManager).projectOpened();
// mapping
myVcsManager = ProjectLevelVcsManager.getInstance(myProject);
myVcsManager.setDirectoryMappings(Collections.singletonList(new VcsDirectoryMapping(myBaseVf.getPath(), FossilVcs.NAME)));
}
开发者ID:irengrig,项目名称:fossil4idea,代码行数:11,代码来源:BaseFossilTest.java
示例10: tearDown
import com.intellij.ide.startup.impl.StartupManagerImpl; //导入依赖的package包/类
@Override
protected void tearDown() throws Exception {
((StartupManagerImpl)StartupManager.getInstance(getProject())).checkCleared();
((DaemonCodeAnalyzerImpl)DaemonCodeAnalyzer.getInstance(getProject())).cleanupAfterTest();
super.tearDown();
//((VirtualFilePointerManagerImpl)VirtualFilePointerManager.getInstance()).assertPointersDisposed();
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:8,代码来源:DaemonAnalyzerTestCase.java
示例11: setUpProject
import com.intellij.ide.startup.impl.StartupManagerImpl; //导入依赖的package包/类
private void setUpProject() throws Exception {
new WriteCommandAction.Simple(null) {
@Override
protected void run() throws Throwable {
File projectFile = FileUtil.createTempFile(myName+"_", PROJECT_FILE_SUFFIX);
FileUtil.delete(projectFile);
myFilesToDelete.add(projectFile);
LocalFileSystem.getInstance().refreshAndFindFileByIoFile(projectFile);
ByteArrayOutputStream buffer = new ByteArrayOutputStream();
new Throwable(projectFile.getPath()).printStackTrace(new PrintStream(buffer));
myProject = PlatformTestCase.createProject(projectFile, buffer.toString());
for (ModuleFixtureBuilder moduleFixtureBuilder: myModuleFixtureBuilders) {
moduleFixtureBuilder.getFixture().setUp();
}
StartupManagerImpl sm = (StartupManagerImpl)StartupManager.getInstance(myProject);
sm.runStartupActivities();
sm.startCacheUpdate();
sm.runPostStartupActivities();
ProjectManagerEx.getInstanceEx().openTestProject(myProject);
LightPlatformTestCase.clearUncommittedDocuments(myProject);
}
}.execute().throwException();
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:28,代码来源:HeavyIdeaTestFixtureImpl.java
示例12: simulateProjectOpen
import com.intellij.ide.startup.impl.StartupManagerImpl; //导入依赖的package包/类
protected void simulateProjectOpen() {
ModuleManagerImpl mm = (ModuleManagerImpl)ModuleManager.getInstance(myProject);
StartupManagerImpl sm = (StartupManagerImpl)StartupManager.getInstance(myProject);
mm.projectOpened();
setUpJdk();
sm.runStartupActivities();
sm.startCacheUpdate();
// extra init for libraries
sm.runPostStartupActivities();
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:12,代码来源:PlatformTestCase.java
示例13: setUp
import com.intellij.ide.startup.impl.StartupManagerImpl; //导入依赖的package包/类
@BeforeMethod
@Override
public void setUp(Method method) throws Exception {
super.setUp(method);
myFiles = GitTestUtil.createFileStructure(myProject, myRepo, "a.txt", "b.txt", "dir/c.txt", "dir/subdir/d.txt");
myRepo.addCommit();
myRepo.refresh();
myFile = myFiles.get("a.txt"); // the file is commonly used, so save it in a field.
((StartupManagerImpl) StartupManager.getInstance(myProject)).runPostStartupActivities();
myChangeListManager = ChangeListManager.getInstance(myProject);
myShelveChangesManager = ShelveChangesManager.getInstance(myProject);
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:15,代码来源:GitShelveUnshelveTest.java
示例14: setUpProject
import com.intellij.ide.startup.impl.StartupManagerImpl; //导入依赖的package包/类
private void setUpProject() throws Exception {
new WriteCommandAction.Simple(null) {
@Override
protected void run() throws Throwable {
File projectDir = FileUtil.createTempDirectory(myName + "_", "project");
FileUtil.delete(projectDir);
myFilesToDelete.add(projectDir);
LocalFileSystem.getInstance().refreshAndFindFileByIoFile(projectDir);
ByteArrayOutputStream buffer = new ByteArrayOutputStream();
new Throwable(projectDir.getPath()).printStackTrace(new PrintStream(buffer));
myProject = PlatformTestCase.createProject(projectDir, buffer.toString());
for (ModuleFixtureBuilder moduleFixtureBuilder : myModuleFixtureBuilders) {
moduleFixtureBuilder.getFixture().setUp();
}
StartupManagerImpl sm = (StartupManagerImpl)StartupManager.getInstance(myProject);
sm.runStartupActivities();
sm.startCacheUpdate();
sm.runPostStartupActivities();
ProjectManagerEx.getInstanceEx().openTestProject(myProject);
LightPlatformTestCase.clearUncommittedDocuments(myProject);
}
}.execute().throwException();
}
开发者ID:consulo,项目名称:consulo,代码行数:28,代码来源:HeavyIdeaTestFixtureImpl.java
示例15: simulateProjectOpen
import com.intellij.ide.startup.impl.StartupManagerImpl; //导入依赖的package包/类
protected void simulateProjectOpen() {
ModuleManagerImpl mm = (ModuleManagerImpl)ModuleManager.getInstance(myProject);
StartupManagerImpl sm = (StartupManagerImpl)StartupManager.getInstance(myProject);
mm.projectOpened();
sm.runStartupActivities();
sm.startCacheUpdate();
// extra init for libraries
sm.runPostStartupActivities();
}
开发者ID:consulo,项目名称:consulo,代码行数:11,代码来源:PlatformTestCase.java
示例16: tearDown
import com.intellij.ide.startup.impl.StartupManagerImpl; //导入依赖的package包/类
@Override
protected void tearDown() throws Exception
{
((StartupManagerImpl) StartupManager.getInstance(getProject())).checkCleared();
((DaemonCodeAnalyzerImpl) DaemonCodeAnalyzer.getInstance(getProject())).cleanupAfterTest();
super.tearDown();
//((VirtualFilePointerManagerImpl)VirtualFilePointerManager.getInstance()).assertPointersDisposed();
}
开发者ID:consulo,项目名称:consulo-java,代码行数:9,代码来源:DaemonAnalyzerTestCase.java
示例17: runStartupActivities
import com.intellij.ide.startup.impl.StartupManagerImpl; //导入依赖的package包/类
protected void runStartupActivities() {
final StartupManagerImpl startupManager = (StartupManagerImpl)StartupManager.getInstance(myProject);
startupManager.runStartupActivities();
startupManager.startCacheUpdate();
startupManager.runPostStartupActivities();
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:7,代码来源:PlatformTestCase.java
示例18: openProject
import com.intellij.ide.startup.impl.StartupManagerImpl; //导入依赖的package包/类
@Override
public boolean openProject(@NotNull final Project project) {
if (isLight(project)) {
((ProjectImpl)project).setTemporarilyDisposed(false);
boolean isInitialized = StartupManagerEx.getInstanceEx(project).startupActivityPassed();
if (isInitialized) {
addToOpened(project);
// events already fired
return true;
}
}
if (!addToOpened(project)) {
return false;
}
fireProjectOpened(project);
DumbService.allowStartingDumbModeInside(DumbModePermission.MAY_START_BACKGROUND, new Runnable() {
@Override
public void run() {
DumbService.getInstance(project).queueTask(new DumbModeTask() {
@Override
public void performInDumbMode(@NotNull ProgressIndicator indicator) {
waitForFileWatcher(indicator);
}
@Override
public String toString() {
return "wait for file watcher";
}
});
}
});
final StartupManagerImpl startupManager = (StartupManagerImpl)StartupManager.getInstance(project);
boolean ok = myProgressManager.runProcessWithProgressSynchronously(new Runnable() {
@Override
public void run() {
startupManager.runStartupActivities();
// dumb mode should start before post-startup activities
// only when startCacheUpdate is called from UI thread, we can guarantee that
// when the method returns, the application has entered dumb mode
UIUtil.invokeAndWaitIfNeeded(new Runnable() {
@Override
public void run() {
startupManager.startCacheUpdate();
}
});
startupManager.runPostStartupActivitiesFromExtensions();
UIUtil.invokeLaterIfNeeded(new Runnable() {
@Override
public void run() {
if (!project.isDisposed()) {
startupManager.runPostStartupActivities();
Application application = ApplicationManager.getApplication();
if (!(application.isHeadlessEnvironment() || application.isUnitTestMode())) {
StorageUtil.checkUnknownMacros(project, true);
}
}
}
});
}
}, ProjectBundle.message("project.load.progress"), canCancelProjectLoading(), project);
if (!ok) {
closeProject(project, false, false, true);
notifyProjectOpenFailed();
return false;
}
return true;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:77,代码来源:ProjectManagerImpl.java
示例19: checkLifeCycle
import com.intellij.ide.startup.impl.StartupManagerImpl; //导入依赖的package包/类
private boolean checkLifeCycle() {
return !myStarted || !((StartupManagerImpl)myStartupManager).startupActivityPassed();
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:UpdateRequestsQueue.java
示例20: openProject
import com.intellij.ide.startup.impl.StartupManagerImpl; //导入依赖的package包/类
@Override
public boolean openProject(final Project project) {
if (isLight(project)) {
throw new AssertionError("must not open light project");
}
final Application application = ApplicationManager.getApplication();
if (!application.isUnitTestMode() && !((ProjectEx)project).getStateStore().checkVersion()) {
return false;
}
synchronized (myOpenProjects) {
if (myOpenProjects.contains(project)) {
return false;
}
myOpenProjects.add(project);
cacheOpenProjects();
}
fireProjectOpened(project);
final StartupManagerImpl startupManager = (StartupManagerImpl)StartupManager.getInstance(project);
waitForFileWatcher(project);
boolean ok = myProgressManager.runProcessWithProgressSynchronously(new Runnable() {
@Override
public void run() {
startupManager.runStartupActivities();
// dumb mode should start before post-startup activities
// only when startCacheUpdate is called from UI thread, we can guarantee that
// when the method returns, the application has entered dumb mode
UIUtil.invokeAndWaitIfNeeded(new Runnable() {
@Override
public void run() {
startupManager.startCacheUpdate();
}
});
startupManager.runPostStartupActivitiesFromExtensions();
UIUtil.invokeLaterIfNeeded(new Runnable() {
@Override
public void run() {
startupManager.runPostStartupActivities();
}
});
}
}, ProjectBundle.message("project.load.progress"), true, project);
if (!ok) {
closeProject(project, false, false, true);
notifyProjectOpenFailed();
return false;
}
if (!application.isHeadlessEnvironment() && !application.isUnitTestMode()) {
// should be invoked last
startupManager.runWhenProjectIsInitialized(new Runnable() {
@Override
public void run() {
final TrackingPathMacroSubstitutor macroSubstitutor =
((ProjectEx)project).getStateStore().getStateStorageManager().getMacroSubstitutor();
if (macroSubstitutor != null) {
StorageUtil.notifyUnknownMacros(macroSubstitutor, project, null);
}
}
});
}
return true;
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:71,代码来源:ProjectManagerImpl.java
注:本文中的com.intellij.ide.startup.impl.StartupManagerImpl类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论