Why is Eclipse constantly searching for main types and how do I stop it? - eclipse

How do I stop Eclipse from searching for main types every time I run a Java application I have written? Doesn't matter which file it is or how big it is, every time I run it I get the following (sorry I can't embed the image, you'll have to use the link):
Searching for main types
It ALWAYS takes ages to do this, which means that I have a LONG delay before I can run programs. It's frustrating as I teach Java and my students are always left wondering what's going on....
I've looked at other Stack Overflow questions in which people suggested setting up a run configuration, but when I do that I get the same problem.

Related

Unity: just keep loading infitely on "Application.Reload" every time i enter in play mode

The problem
Hi, I have been experiencing this kind of loading infitely on the window screen: "Application.Reload" since two or three days ago. This just happened spontaneously without any reason. I have been seaching for a solution, but the uniques fixes i had found are not working for me.
The unique not permanet solution that I came up is just use the Task Manager and close up Unity.
The possible fixes that I have tried:
"Just locate the project folder in the system explorer and click on properties" (This only work one time per application or maybe it just do not work.)
"You can check to see if there is any place in your project path that is not in English" (It just do not work.)
These are the fixes that I have tried.
Example of the problem
Meanwhile I am writing this question, I want to re-confirm this is a infinite load. So I open up my Unity Proyect, enter in the Play Mode and write this question.
This is the result:
https://i.stack.imgur.com/sTA48.png
Edit: the image actually shows the longest time i have been waiting. (1:48:34hs)
Thank in advance for any kind of help!
As I know, this problem persist as well in any Unity Operation, it can happen on Reload, Importing, Asset Indexer, etc. Is just a problem that doesn't affect Unity, and devs marked it as WNF (We'll Not Fix).
I have been struggling with this problem for some years now and the only solution I found was to close it from Task Manager and reopen it.

Debugging broadly multithreaded programs with Eclipse CDT: Finding threads

TLDR: C program, hundreds of threads, Eclipse (Oxygen 3) CDT debug view with lengthy tree. How to search?
I'm debugging some software I've written (in C, FWIW) that can generate several hundred threads. About 300 of these are started at launch, and about as many others are started dynamically to perform tasks at runtime. During certain operations I can have well over 500 threads running.
In earlier versions of the software it was possible to exercise a problem to debug it in such a way that only a handful of threads were running when the failure (eg. segfault etc) occurred, so it was reasonable to just look through the thread list in the Debug view and have an understanding of what's going on. More recently I've made many more threads launch at the beginning and while that's had a huge benefit on performance, it means that at any time I'll have a list of threads that's just too long to manually look through.
How can I find a thread based on something I know about the thread, i.e. what function it was started with (passed to pthread_create())? Specifically, how can I search through the tree displayed in the Debug window? Alternatively, I've found a way to copy the contents of this view to the clipboard, but (inexplicably) this only copies what's visible, not the actual tree contents -- how can I auto-expand the entire tree so I can copy it and search in a text editor? Clicking the little arrows to expand each of hundreds of threads to their respective call stacks is just not reasonable.
I'm developing on a RHEL 6 platform (long story, migration to modernity is pending), and for the moment I've found roadblocks in upgrading beyond Eclipse Oxygen 3a (4.7.3a), so that's what I'm stuck with for now.
EDIT: I should clarify -- it's true that I can just press Ctrl-F in the Debug window, and I get a search dialog. However, and I'm seriously dropping my jaw in disbelief here, it also only searches what's visible, not the actual contents of the tree. So for this to be useful, I'd still have to expand every thread in the list manually; there still appears to be no command to do this.
It appears that there is simply no way of searching the list of threads within the Debug view in Eclipse, in a way that is actually useful. Again, the "Find" and "Copy Stack" functions (accessible via right-click) only operate on the text that's visible in the GUI view, not the real contents of the tree.
So, as far as I can tell the only way to get the information I want is to query gdb directly, through the Debugger Console view:
thread apply all bt
OF COURSE, the contents of the Debugger Console view are not directly searchable (unlike the regular Console and most other views in Eclipse), so the text listing must then be copied and pasted into some other editor and searched, to find the thread I'm looking for. Then, with that information I can scroll to it in the Debug list, expand that thread's trace, and continue debugging.

How do I get the full compile log in Activator?

I have a large (> 25k) app that I've been developing in Scala/Akka/Play for a couple of years now. I'm in the process of upgrading it to the current version of the world (everything was a major version or two behind), which means getting it running in Activator. I'm gradually wrestling my way through that, but I'm somewhat stymied by the fact that Activator's "compile" window is very short -- only a few screens long -- so most of my 50-some-odd remaining compile errors are scrolling off the top. I'd really like to be able to read the entire thing, since I assume that most of these are knock-on errors, and only a few are really significant.
Where does the actual compile log go? How can I get to the whole thing?
It sounds like you're trying to use the UI mode when you were happy with the command line mode in Play 2.2; the command line mode is still there, see http://typesafe.com/blog/typesafe-activator---an-update-and-roadmap-preview for some background. Just run "activator" instead of "activator ui". The UI mode is not something that's "production hardened" yet, it is primarily intended for tutorials (though we are working to change that).
That said the compile log should not be truncated in the UI and we appreciate bug reports at https://github.com/typesafehub/activator/issues including one about this truncation.

Multiple folders to reports in TestNG Eclipse plugin

I'm running Test Cases with TestNG Eclipse plugin. How can I specify a distinct folder as output to the HTML reports by configurating testng.xml?
I've seen Cedric's answer to this very similar question (http://stackoverflow.com/questions/5401746/generating-testng-reports/), but I couldn't obtain the same on TestNG Eclipse plugin. I've tried , and another bunch of similar things I've seen in the doc and nothing worked.
Extending the question a bit, we want to be able to run tests repeatedly and pick at any time the last n (say 20) reports, is it possible? It happens sometimes we use TestNG to do a lot of exploratory test. As some fails are rare and hard to repeat (and in the first approach they may not be predicted as such), sometimes the "explorer" just re-run the test and lose that inconstant fail.
Thanks in advance to any answer to the primary or a bit extended question, Regards, Henrique
try by passing argument -doutputdir in arguments tab

Automating Eclipse tasks

I'm currently looking for ways to automate some tasks in Eclipse.
For instance, let's say I have a couple of ant files that I'll want to run a couple of times per hour. Being able to assign a hot key to each one of them, so that I could easily run them without having to click, bring the context menu up and click again would bring joy into my life.
Other example would be build/run configurations. I have a couple of them on my project and I'd love to have a way of running each one of them with a different hot key configuration.
Moreover, the very nature of a project I'm currently working on involves a lot of experimentation and trying, so having to click and use my mouse a lot is definitely driving me insane. There are other similar things that I would like to get automated as well (for example, each time I do a commit I'd like to also run some command over my project's folder, etc).
Is there some tool for Eclipse(or outside it) that'll somehow allow me to automate these kinds of tasks? Would Vim for Eclipse help me anyhow?
After some years coding I feel like I have hit a stone wall. I came to the conclusion that I am losing way too much time with my mouse. Yes, I know that a lot of Eclipse actions have correspondent hot keys, but a lot of others don't. I want the ultimate solution !
There are several solutions:
Use a console. Consoles allow to remember the last commands (on Unix, you can even search). So instead of mouse-fu, it's Alt-TabUpReturn
There was Eclipse Monkey to script Eclipse. Not sure if it still works but it might.
On Sourceforge is Practical Macro. No documentation that I could find, though.
EclipseShell might also work, not sure.
Update (Year 2022). Aaron has provided many options in his answer. It seems any of those are working. I am going to try the old ant builder.
https://www.vogella.com/tutorials/ApacheAnt/article.html