This repository has been archived by the owner on Apr 3, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 286
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
701a722
commit 3b3fcb0
Showing
4 changed files
with
112 additions
and
65 deletions.
There are no files selected for viewing
70 changes: 35 additions & 35 deletions
70
..._ide.core.tests/src-lang/melnorme/lang/ide/core/project_model/BundleModelManagerTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,36 +1,36 @@ | |||
/******************************************************************************* | /******************************************************************************* | ||
* Copyright (c) 2015 Bruno Medeiros and other Contributors. | * Copyright (c) 2015 Bruno Medeiros and other Contributors. | ||
* All rights reserved. This program and the accompanying materials | * All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | * are made available under the terms of the Eclipse Public License v1.0 | ||
* which accompanies this distribution, and is available at | * which accompanies this distribution, and is available at | ||
* http://www.eclipse.org/legal/epl-v10.html | * http://www.eclipse.org/legal/epl-v10.html | ||
* | * | ||
* Contributors: | * Contributors: | ||
* Bruno Medeiros - initial API and implementation | * Bruno Medeiros - initial API and implementation | ||
*******************************************************************************/ | *******************************************************************************/ | ||
package melnorme.lang.ide.core.project_model; | package melnorme.lang.ide.core.project_model; | ||
|
|
||
import org.junit.Test; | import org.junit.Test; | ||
|
|
||
import melnorme.lang.ide.core.LangCore_Actual; | import melnorme.lang.ide.core.LangCore_Actual; | ||
import melnorme.lang.ide.core.tests.CommonCoreTest; | import melnorme.lang.ide.core.tests.CommonCoreTest; | ||
import melnorme.utilbox.concurrency.LatchRunnable; | import melnorme.utilbox.concurrency.LatchRunnable; | ||
|
|
||
public class BundleModelManagerTest extends CommonCoreTest { | public class BundleModelManagerTest extends CommonCoreTest { | ||
|
|
||
@Test | @Test | ||
public void testShutdown() throws Exception { testShutdown$(); } | public void testShutdown() throws Exception { testShutdown$(); } | ||
public void testShutdown$() throws Exception { | public void testShutdown$() throws Exception { | ||
BundleModelManager<?> bundleMgr = LangCore_Actual.createBundleModelManager(); | BundleModelManager<?> bundleMgr = LangCore_Actual.createBundleModelManager(); | ||
bundleMgr.startManager(); | bundleMgr.startManager(); | ||
|
|
||
final LatchRunnable latchRunnable = new LatchRunnable(); | final LatchRunnable latchRunnable = new LatchRunnable(); | ||
bundleMgr.getModelAgent().submit(latchRunnable); | bundleMgr.getModelAgent().submit(latchRunnable); | ||
|
|
||
latchRunnable.awaitTaskEntry(); | latchRunnable.awaitTaskEntry(); | ||
|
|
||
// Test that shutdown happens successfully even with pending task, and no log entries are made. | // Test that shutdown happens successfully even with pending task, and no log entries are made. | ||
bundleMgr.shutdownManager(); | bundleMgr.shutdownManager(); | ||
} | } | ||
|
|
||
} | } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
plugin_ide.core/src-lang/melnorme/lang/ide/core/LangCore2.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,33 @@ | |||
/******************************************************************************* | |||
* Copyright (c) 2014 Bruno Medeiros and other Contributors. | |||
* All rights reserved. This program and the accompanying materials | |||
* are made available under the terms of the Eclipse Public License v1.0 | |||
* which accompanies this distribution, and is available at | |||
* http://www.eclipse.org/legal/epl-v10.html | |||
* | |||
* Contributors: | |||
* Bruno Medeiros - initial API and implementation | |||
*******************************************************************************/ | |||
package melnorme.lang.ide.core; | |||
|
|||
public class LangCore2 extends LangCore_Actual { | |||
|
|||
public LangCore2() { | |||
} | |||
|
|||
protected void shutdown() { | |||
buildManager.dispose(); | |||
bundleManager.shutdownManager(); | |||
sourceModelManager.dispose(); | |||
toolManager.shutdownNow(); | |||
} | |||
|
|||
/** | |||
* Start core agents, and do other initizaliation after UI is started. | |||
* @param langCore TODO | |||
*/ | |||
public void startAgentsAfterUIStart(LangCore langCore) { | |||
bundleManager.startManager(); | |||
} | |||
|
|||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters