Eclipse - Two Console Windows display the same output - eclipse

According to this thread I added a secound Console window to my Eclipse. I want to Debug two applications at the same time, so I selected the first application in one console tab and the other application in the other one.
Unfortunately whenever I start one application both Console windows switch to that one. They always switch to the application which had the last output..!
Thank you!
EDIT: After reopening the windows a few times it worked! Its kinda buggy but it works now. Thanks.

Eclipse have two options in the view's toolbar:
One is a Show console shen standard out changesand other Show console shen standard error changes.
Keep both deselected, so you can control which console do you want to view...

Related

How to clear all console logs from different runs in eclipse?

I have almost 10 running micro services, each printing their logs in console. for a specific reason, instead of traversing between console logs and hit clear button, I want to clear all once. Is there straightforward way?
IMHO there is no way to clear all consoles at once. You can write your own plugin to do this.
Also note that you can traverse(loop through) each console just by clicking on console icon() in the console view toolbar again and again. No need to use down arrow button of console icon then switch to each console then clear.

How can I stick a process to a specific console while having more that one console open?

I am using Eclipse Mars to write test applications. Sometimes I need to run two apps at the same time so I open two consoles on my Eclipse. I can change the process being viewed on one of the consoles, but as soon as the other process prints something, it switches both consoles to show that. How can I stick a process to a specific console?
As far as I know you can't assign a process to a console. BUT you can make a process appear on a specific console none the less. To reach that you must click 'Pin Console' for the program you don't want to be changed on startup. Then in the console of the other program uncheck 'Pin Console'. The next program you start will show up in the unpinned console. So you will have to pin and unpin before each start of either one of your programs.
Maybe someone else is interested in the other steps besides the pinning and unpinning:
In the console view uncheck the buttons for
Show console view when standard out changes
and
Show console view when standard error changes
then go to the drop down menu of the console view and click
new console view
then start your first part of the application and assign one of the available consoles to that process and then start the next part and assign that to the other console. You can position both consoles as you are used to with eclipse and watch both of them simultaneously.
I tested this for eclipse luna and neon (so mars (which is in between) should have the same feature).

Programmatically affecting load order of perspectives

So, I'm working on an Eclipse Plugin which includes a custom view based on analysis of source code. The majority of the time, it works great. However, if I quit Eclipse with that view open, when I reopen it, it runs into an error with either IWorkbenchWindow.getActivePage() or IWorkbenchPage.getEditorReferences() returning null. This inconsistency seems to be because the view has the focus when Eclipse quits and is the first thing that Eclipse tries to reconstruct on start up. the focus is on a non-window shell (I don't fully understand this, but that's what this said). Is there a workaround so that I can ensure that Eclipse fully loads its IWorkbenchWindow before my custom plugin regardless of what has the focus when Eclipse closes?
Thanks
You can consider using the site instead: getSite().getPage()...
Tonny Madsen pointed out in the comments that, from within a View, I can access the Active Page from getSite().getPage(), which solved the issues.

Running my program from PyDev with one click?

I am developing using the PyDev plugin in Eclipse. My program uses several classes in several files. I usually run the program using the green "play" icon or using Control+F11. The only problem is that it will run the file, which is currently in "focus". Usually this is not the one containing the starting point of my application. As I run my program something like 200 times a day, this means that I need 200 extra click on the mouse and often forget about this.
Is there any way of setting the default file to launch?
Yes, change the launching to rerun the last launched, so Ctrl+F11 will launch the last one -- and use F9 to launch the one with focus -- See instructions and details at: http://pydev.org/manual_101_run.html
For me, the shortcut is Ctrl+Shift+F9. I don't think I've changed any keybindings, so its strange that it would be different from the official documentation.
Go to Run->Run History, and select the run that is your 'main' run. Now you should be able to use Ctrl-Shift+F9 from any other file to rerun your main. If it isn't Ctrl+Shift+F9 for you, look on the console window that should be at the bottom of your screen showing the stdout after every run. There is an icon on the top of it that has the green start arrow with a yellow arrow underneath it pointing to the right. That is the command to relaunch with the same configuration. If you hover over that, it should tell you the keyboard shortcut you need.

Where do Eclipse sub-processes (launched with the "run" menu) show up?

I'm using Eclipse 3.4.1, moving my first steps. When I run my project (a server process) a console opens. But for some reasons after a while I can't find it anymore (even if the process is still up). I'd like to find it to be able to see its output and/or kill it.
Is there a place in Eclipse where I can find all running sub-processes?
There is a small button that looks like a monitor in the console panel. It lists all open consoles.
I'm ashamed I didn't find it myself before posting the question, but maybe it will be useful to someone.
If you are talking about "eclipse console", there is only one "console view", but several console instances.
You can browse the different consoles by clicking on the second button from the left in the console view (the one looking like a monitor)
Your console may 'disappear' because another message is displayed in the main console (stdout) process, while your server still runs with the other console instance.
An easier way if you are dealing with lots of processes is to use the Debug view (note: NOT the debug perspective, just the debug 'view' or 'window').
It shows a list of running processes, including processes started with Run instead of Debug. Selecting a process in the Debug view will open the corresponding Console, and visa-versa.
I put the Debug view above the Console view and size it to show just a few lines.