Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 342640

Summary: Ability to create build console dynamically
Product: [Tools] CDT Reporter: Andrew Gvozdev <angvoz.dev>
Component: cdt-buildAssignee: Andrew Gvozdev <angvoz.dev>
Status: RESOLVED FIXED QA Contact: Andrew Gvozdev <angvoz.dev>
Severity: normal    
Priority: P3 CC: cdtdoug, jjohnstn
Version: 8.0   
Target Milestone: 8.0   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 342069    
Attachments:
Description Flags
dynamic build console
none
final patch angvoz.dev: iplog-

Description Andrew Gvozdev CLA 2011-04-12 17:05:06 EDT
Currently the process of creating new build console (one example is Autotools) is a bit cumbersome and involves copy-paste of internal class CBuildConsole (utilizing more external stuff) and registering it via extension point. Furthermore, the real obstacle is that that does not allow creating a console dynamically on request as bug 342069 would require.
Comment 1 Andrew Gvozdev CLA 2011-04-12 17:07:36 EDT
Created attachment 193096 [details]
dynamic build console

The patch.
Comment 2 Andrew Gvozdev CLA 2011-04-12 17:38:35 EDT
Created attachment 193099 [details]
final patch

The final patch for the commit. Put a restriction to a new method CUIPlugin.getConsoleManager(...) in order not to introduce it as API.
Comment 3 Andrew Gvozdev CLA 2011-04-12 17:46:27 EDT
Committed to the HEAD. Jeff, that lets to create a console like the one you create in Autotools simply with call 
   IConsole console = CCorePlugin.getDefault().getBuildConsole(consoleId, consoleName, iconUrl);
No extension is required.
Comment 4 Jeff Johnston CLA 2011-04-12 17:53:09 EDT
(In reply to comment #3)
> Committed to the HEAD. Jeff, that lets to create a console like the one you
> create in Autotools simply with call 
>    IConsole console = CCorePlugin.getDefault().getBuildConsole(consoleId,
> consoleName, iconUrl);
> No extension is required.

Sounds good.  I will give it a try.  Does this also solve the Global CDT Console issue indirectly?
Comment 5 Andrew Gvozdev CLA 2011-04-12 17:57:49 EDT
No but I wanted to commit this part so it won't dangle.
Besides global console issue, there is also issue with build log being overwritten from unrelated consoles.
Comment 6 CDT Genie CLA 2011-04-12 18:23:07 EDT
*** cdt cvs genie on behalf of agvozdev ***
bug 342640: Ability to create build console dynamically

[*] CBuildConsole.java 1.6 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/CBuildConsole.java?root=Tools_Project&r1=1.5&r2=1.6
[*] BuildConsole.java 1.11 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsole.java?root=Tools_Project&r1=1.10&r2=1.11
[*] BuildConsoleManager.java 1.29 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsoleManager.java?root=Tools_Project&r1=1.28&r2=1.29

[*] CUIPlugin.java 1.101 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/CUIPlugin.java?root=Tools_Project&r1=1.100&r2=1.101

[*] IConsole.java 1.9 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.core/src/org/eclipse/cdt/core/resources/IConsole.java?root=Tools_Project&r1=1.8&r2=1.9

[+] ICConsole.java  http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/ICConsole.java?root=Tools_Project&revision=1.1&view=markup

[*] CCorePlugin.java 1.160 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.core/src/org/eclipse/cdt/core/CCorePlugin.java?root=Tools_Project&r1=1.159&r2=1.160
Comment 7 Andrew Gvozdev CLA 2011-04-12 18:36:30 EDT
Added also a test. Closing the task.
Comment 8 CDT Genie CLA 2011-04-12 19:23:07 EDT
*** cdt cvs genie on behalf of agvozdev ***
bug 342640: Ability to create build console dynamically

[*] BuildConsoleTests.java 1.6 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/buildconsole/BuildConsoleTests.java?root=Tools_Project&r1=1.5&r2=1.6
Comment 10 CDT Genie CLA 2011-04-28 09:23:11 EDT
*** cdt cvs genie on behalf of agvozdev ***
bug 342640: comment adjusted

[*] CCorePlugin.java 1.161 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.core/src/org/eclipse/cdt/core/CCorePlugin.java?root=Tools_Project&r1=1.160&r2=1.161