How to profile Eclipse plug-in startup time? - eclipse

I'm trying to profile an Eclipse plugin, specifically it's start-up time. I'm not terribly familiar with Eclipse nor its profiling tools, and it seems that plugins are somewhat of a special case: I tried using JVM Monitor, but it cannot seem to detect the JVM running on localhost (even after I made sure to run the JDK instead of JRE and other things suggested in the FAQ). I then found a guide for profiling plugins with TPTP, but as I understood TPTP is no longer maintained and isn't even available for the latest Eclipse release, Juno.
Any tools, preferably simple to setup, to let me profile the startup time of my plugin?

I like using YourKit. They have very good Eclipse integration. It is not free, but well worth the cost if you will be doing lots of profiling.

Eclipse has been OSGi-based since 3.0.
Just use an SS console command in the OSGi console view to check the bundle(your plugin) status.
See more here.

Related

Eclipse is not starting on macOs

I have an issue with Eclipse,
Eclipse macOS High Sierra version 10.13.6
I keep getting JVM terminated exit code=1
I have tried too many times but the response is same after launching it.
I have downloaded it from Stanford's SEE section and still unable to launch. The error message is here.
I downloaded your course material, and it does indeed contain a really old version of Eclipse - as greg-449 pointed out, there's no way this is going to work on macOS High Sierra. Really surprised instructions from 2007 haven't been updated, but that's another matter.
It would seem that your course just requires Java, so you can use the automated Installer that you find on this page: https://www.eclipse.org/downloads/ and then choose the Eclipse IDE for Java Developers in the wizard. Or you can download that package directly here, and install it.
Looking at your course material, it does appear that they have a custom plugin that makes regular Eclipse actions easier to execute, by adding a number of buttons to the Eclipse toolbar, you won't find these in a vanilla install. If you can find that plugin, you could try to install it into this version of Eclipse too, it might still work. If not, you can perform those steps manually - this video will help, as he shows you how to import and run these projects without those plugins, it's not hard!
It's not possible to say if the plugin adds functionality beyond what is normally possible in general Eclipse distributions, but I doubt it does. Good luck!

Netbeans 7.3 annoyances

I recently switched from Eclipse to Netbeans 7.3 and experiencing a lot of quirks and i'm wondering if anyone else experienced them and/or got a solution. Because of these 'problems' i'm considering switching back to Eclipse again but i'm in doubt because NB has a lot of good things too !
These are the quirks:
when creating a new Java class, and make some typo's e.g. somewhere in a method, NB does not recognize / display the errors directly, but after a very long wait or a restart of NB.
This also happens to existing classes.
background scanning tasks is sometimes stuck at 100%
code completion does take forever. Don't even think about refactoring or renaming a class because it takes >3 minutes to scan the classpath (why, it's a new class for crying out load)
hot-deployment: changes are not always synchronized correctly with the (Glassfish) server.
Sometimes a complete undeploy and deploy is needed to reflect the changes made in the source.
NB manipules my pom.xml and glassfish-web.xml: it adds a deploy hint to the pom.xml and also changes or removes the context-root in the glassfish-web.xml. Please stop doing this!
Why o why can't i do a 'Fix imports' on my entire project. You can do a 'organize import' on the entire project, but this won't add the missing imports. See http://netbeans.org/bugzilla/show_bug.cgi?id=167031#c2
Running NB 7.3 on Windows XP, 3GB RAM, 2+GHz cpu
The project is a Java 7 maven project containing 12 modules / sub projects
I strongly recommend that you DO NOT attempt to install the ScanOnDemand plugin. It completely trashed my Netbeans, forcing me to use the Task Manager to kill the process. No existing projects were found; they were all listed as "unrecognized project; missing plug-in?". I had to re-install Netbeans.
One thing to look for is max heap allowed. Try adding "-J-Xmx2000M" to the Netbeans startup.
ref: Setting Heap Size
I suggest stick to your favourite IDE. Eclipse is still popular and Juno packages are doing good and Kepler is already available. You can try around latest packages.
IntelliJ IDEA looks better than other Java IDEs (light weight, faster, nice integration with SCM(source configuration) tools, possibility of easy cloud deployment, except that if you have freedom to choose your IDE whether you are part of a big/small teams, Otherwise there is no need to shift from one to other.
IntelliJ is the first IDE to give nice in-built support to Play framework
Google Android ADT is completely moving towards AndroidStudio based on community version of IntelliJ IDEA for faster and better GUI and app development.
As a Java developer it is not bad to try the other IDE to do some experiments or for any reason it strikes your mind.
Eg: Netbeans comes with sample apps in Java EE,Java7/Java2EE which looks better, nice examples for websockets, Servlet3.0, NIO examples etc,...but just try it or just ignore if it does not work. It is very easy to generate Entities from Database Tables, creating REST Endpoints in NetBeansIt may come with lot of in-built plugin-support for various java frameworks like RESTful webservice frameworks, JSF2.x, Primefaces3.x, SpringMVC, Struts but you may not sure to use the same version of framework. Some plugins may not work sufficient according to your business needs. Even if you okay with existing version it is not very friendly to develop Rich real-time UI development because Netbeans with Primefaces, instead you need to manually create XHTML templates.
Netbeans comes with nice support for Glassfish and tomcat, (other servers I am not sure but support is in-built). You can remote deployment with ease. Netbeans learning tutorials on JavaEE nice for beginners in the subject.
Netbeans also available as zipped bundle, hence no need to install even on Windows machines.
Eclipse has got better support with Java RoboCode learning tool (initiated by developed by IBM long ago.).
Also Netbeans comes with nice support for HTML5, Groovy, PHP, C++ as well (according to posts by users community, because I did not use them).

IntelliJ vs STS (SpringSource Tool Suite), what am I missing by using one or the other and can I make them feature equivalent for comparsion?

I've been using STS (just started to use and learn it slowly) but some users here where I work use IntelliJ. I was wondering what exactly STS comes with that can make it better/easier to use vs. IntelliJ and vice versa. Also I was wondering if there are any plugins or ways to make IntelliJ feature equivalent to whatever could be possibly missing vs STS and vice versa so I can do an equal and fair comparison.
Thanks!
Edit,
I will say that STS takes AGES to load vs IntelliJ for some reason so if someone knows how to tweak STS to open faster I'd love to know. Even on this new MBP 15" with i7 and 4GB of ram it feels way too slow opening up and is excruciatingly frustrating when it hangs.
It's 2016 and STS has come a long way. I favor it over IntelliJ for many reasons. Some are Eclipse specific and others are pre-packaged with STS (but can be installed into an Eclipse distro).
The most valuable is the Quick Text Search. STS will index all the text in all files in your project. Ctrl+Shift+L opens the dialog and you can type any text in the bar. All occurences of the string instantly appear across all files.
I like the ability to organize imports in over IntelliJ and greatly favor the look and feel of the IDE. I've used Eclipse/STS for much longer than I have IntelliJ so I am a bit biased here.
The ability to natively handle different file types and frameworks is IntelliJ's greatest strength. I work on Grails projects from time to time and support for the latest and greatest with Grails is non-existent anymore within the Eclipse/STS family, whereas IntelliJ provides good support.
BTW: STS is free(!) whereas you can't even buy IntelliJ anymore. You merely lease the software for a year under their new subscription model.
Go to Window->Preferences->Validation
Uncheck what you don't need. That will speed up the loading a bit.
Modify eclipse.ini to set the Xmn(new generation size), Xms and Xmx, enable parallel GC
-Xmn128m
-Xms1024m
-Xmx1024m
-Xss2m
-XX:PermSize=128m
-XX:MaxPermSize=128m
-XX:+UseParallelGC
I used STS for around 2 years, and recently tried Intelij [Community] for spring web development.
I found IntelliJ much better in
performance
usability
features
Keyboard shortcuts save a lot of time (No need to use a mouse at all)
File formats supported
Debugging window
But web development and spring development is not supported in community version of Intelij, so you need enterprise version, which costs a lot [At least for Indian customers]
So, for spring development I always prefer STS and for other development (I work on Vertx as well) I prefer Intelij
I have used both STS and Intellij community edition.Here is my personal experience.
Intellij has more handy shortcuts than STS
Auto completion feature of intellij is awersome (not my priority)
Itellij has caching issues.(Major and critical). You may need to restart the IDE by clearing the cache. I have never faced such issues in STS.
Some provided plugins does not work at all (e.g Smart Tomcat).Where as STS never fails here.
I felt intellij slower than STS.
Every time I restart intellij it starts indexing which I really dont like.
When I try to import multiple projects each opens in separate windows.When you try to import as module certain configuration does not work.
All the above listed points are from my personal experince. One may disagree with this. As of now I would choose STS over intellij.

Boostrapping new Eclipse machines with all the Plugins

Bootstrapping Eclipse on new machines is such a time consuming process, you wind up asking yourself whether you really need each plugin. But there all handy, and help develop consistent habits.
Eclipse bootstrapping problems include:
Explaining / documenting what needs to happen
The actual time pasting in the right URLs and downloading
Version compatibility and dependencies
Eclipse likes to restart after each one
The changeover to the Eclipse Marketplace means that some plugins and instructions you find on the web tend to be inconsistent, depending on when they were written.
The Licenses... over and over and over... yes, yes, yes... I understand that the person installing needs to be aware of it, and have a chance to review them, but there's got to be a better way.
It'd be nice to have "patch file" (either binary or meta) that spells out what I want to add on top of stock Eclipse installation. I'd really like to find (or create) a 1 or 2 step process that sets up Eclipse, plus a favorite batch of plugins:
subclipse
m2eclipse
jetty support like runjettyrun
android sdk and plugin (or at least just the plugin)
aspectj
Web Objects / WOLiops
python, other langs
JVM Monitor, maybe EclEmma
probably a git plugin pretty soon.
Does command line maven help with any of this? It seems like its repository management would fit at least part of the functionality.
On a machine with an Eclipse installation matching your needs use File -> Export -> Install -> Installed software items to file. Import the generated file using the same menu on all other machines.
As Scott says, a good approach is to simply package a fully prepared Eclipse installation once all the plugins you need are installed. The downside is that you have to update most plugins afterwards.
Another option is to use Yoxos. With it, you can create a profile and configure it with all the plugins you need (and apparently Yoxos can do more than that).
Finally, this page might interest you concerning the configuration side of things.
Solution 1 is too search for more advanced Eclipse distributions.
For example, STS (Spring Tool Suite) comes with
AspectJ
EGit
m2e
(and of course) Spring IDE
One small trick can be done with m2e-android - Android Configurator for M2E Maven Integration. If installing it on clean Eclipse, it will also automatically resolve to install :
m2e
Android Developer Tools (ADT)

Why Aptana when they are based on Eclipse?

I'm not sure if I'm missing something. If Aptana is entirely based on Eclipse, why would anyone choose it, when they can get the original Eclipse (especially that the Eclipse development is not lagging in anyway)? I understand why/benefits Aptana started their project, but why would I use theirs instead of Eclipse? I don't know much about this IDE and I'm still trying to choose, so maybe I'm missing something that's obvious to the rest.
NetBeans isn't based on Eclipse -- it's from Sun, who traditionally haven't been a supporter of Eclipse (look at the names).
Aptana is a helpful packaging of a variety of useful web and scripting development tools. The nice thing about Aptana is that you just download it and it works. Aptana also provides a commercial version with a variety of additional features.
You may also want to look at Genuitec's MyEclipse, which packages up a variety of other components and provides some support for minimal cost.
I think they come with proprietary plugins that you can't necessarily get with a stock install of Eclipse. Same with the Zend IDE. You can get most of the same functionality with Eclipse but you have to install it yourself and you get no support that way.
Netbeans is not based on Eclipse.
As has already been stated, Aptana simply provides a nice set of plugins that work together to ease development. That's one reason to use it. Not only do you get the advantage of the Aptana plugins, but you get the Eclipse platform itself, which is still extensible, even beyond what Aptana does.
I have another reason as well: I run a dual boot system, XP/Ubuntu, and for development I like to use the same software in both OS's. I ran into problems using PHPEclipse on Ubuntu, so I switched to Aptana.