mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-25 01:45:33 +02:00
bug 309113: Ability to have a single build console for a multi-project build
This commit is contained in:
parent
c1d17327f3
commit
99da99fdd1
1 changed files with 19 additions and 1 deletions
|
@ -30,6 +30,7 @@ import org.eclipse.cdt.ui.tests.BaseUITestCase;
|
|||
|
||||
import org.eclipse.cdt.internal.ui.buildconsole.BuildConsole;
|
||||
import org.eclipse.cdt.internal.ui.buildconsole.BuildConsolePage;
|
||||
import org.eclipse.cdt.internal.ui.buildconsole.ConsoleMessages;
|
||||
|
||||
/**
|
||||
* BuildConsoleTests.
|
||||
|
@ -80,7 +81,8 @@ public class BuildConsoleTests extends BaseUITestCase {
|
|||
for (org.eclipse.ui.console.IConsole next : consoles) {
|
||||
if (next instanceof BuildConsole) {
|
||||
buildConsole = (BuildConsole) next;
|
||||
break;
|
||||
if (buildConsole.getName().contains(simpleProject.getName()))
|
||||
break;
|
||||
}
|
||||
}
|
||||
assertNotNull("Couldn't find the build console", buildConsole);
|
||||
|
@ -108,4 +110,20 @@ public class BuildConsoleTests extends BaseUITestCase {
|
|||
buildConsole = (BuildConsole) new Accessor(page).invoke("getConsole");
|
||||
assertTrue("Project console not selected", buildConsole.getName().contains(simpleProject.getName()));
|
||||
}
|
||||
|
||||
public void testGlobalCdtConsole() throws IOException, CoreException {
|
||||
IBuildConsoleManager mgr = CUIPlugin.getDefault().getConsoleManager();
|
||||
IConsole globalConsole = mgr.getGlobalConsole();
|
||||
assertNotNull(globalConsole);
|
||||
|
||||
// the console view
|
||||
org.eclipse.ui.console.IConsole[] consoles = ConsolePlugin.getDefault().getConsoleManager().getConsoles();
|
||||
boolean isConsoleFound = false;
|
||||
for (org.eclipse.ui.console.IConsole console : consoles) {
|
||||
isConsoleFound = console.getName().equals(ConsoleMessages.BuildConsole_GlobalConsole);
|
||||
if (isConsoleFound)
|
||||
break;
|
||||
}
|
||||
assertTrue("Global CDT Console is not found", isConsoleFound);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue