AST (abstract syntax tree) view in Netbeans - eclipse

Eclipse offers a plugin, which displays the abstract tree view of Java projects. After installing the plugin, the view becomes available. http://www.eclipse.org/jdt/ui/astview/index.php
Is there such a functionality / plugin also available for the Netbeans IDE? I didn't find an answer in stackoverflow. The results in Google dealing with AST in Netbeans are somewhat old (2007-2009).
I know that there are standalone tools which display the AST and also other IDEs which are more useful, if such functionality is required (like IntelliJ Idea).
My question is Netbeans-specific - if this is not possible with Netbeans (without using other tools) a simple "No" will be enough! I am using Netbeans 7.3.

Did you look at these ? It is more recent (2012).
http://netbeans.dzone.com/nb-javac-ast-visualization
https://bitbucket.org/crazyjavahacking

The dev builds of NB already contain such a view in the navigator. Not pretty but it works

Related

Netbeans + Codename One - Avoid importing packages or classes not suitable for CN1

I'm using Netbeans IDE. It's quite annoying and it's a cause of errors the import of Java packages and/or classes that are not provided by Codename One. (Codename One use its own implementation of a subset of Java8 and it cannot support the full Java API).
For example, sometimes Netbeans imports automatically wrong packages (such as "java.awt.BorderLayout" instead of "com.codename1.ui.layouts.BorderLayout"), other times it shows me methods and Javadocs that are not available in Codename One.
Is it possible to force Netbeans to show me only packages, classes, methods and javadocs that are supported by Codename One? It could be useful to avoid errors.
We'd love to but unfortunately the only way NetBeans allows you to do that is if you build your own Java language package. That's what some other plugins like NBAndroid did AFAIK but when we implemented the plugin we didn't want to create something too complex.
If NetBeans supported a "bootclasspath" option for the JDK it would have solved everything. It does have support for plugging in an alternative JDK which can be a micro-profile but because we don't comply with the micro-profile spec I'm not sure if that will work.
At times, NetBeans suggests to import more than one package from the drop-down list. When you check carefully before pressing ENTER this might avoid importing the wrong package.
I use NetBeans for quite a while with CN1 and faced the same problem at the beginning.

Making org.eclipse.e4.ui.workbench.swt.E4Application work with org.eclipse.ui.IStartup

I am quite new to the RCP world and need some help.
I want to have E4Application work with IStartup. According to the documentation, I should use the "LifeCycleHandler" approach as in these 2 links.
How to make something on startup in Eclipse E4 application?
and
Eclipse e4 : IStartup extension not working
But I can't use them as I don't want to make code changes to my plugin. So I also went through the link below which talks about "Use the Compatibility Layer" but I could not really understand much. I would be great to have a solution to this since I can't modify the plugin code(may be by putting some plugin in the plugins dir etc).
My RCP is eclipse 4.6.2 based.
Observation: Eclipse 4.6.2 IDE is able to load my plugin but with version 4.6.2 based RCP, its not loading.
TIA
A pure e4 RCP using E4Application cannot use IStartup or any of the other org.eclipse.ui.xxxx extension points and classes. You will have to use the Life Cycle class and rewrite your code.
If you want to use org.eclipse.ui.xxx classes and extension point stick to the traditional Eclipse RCP (which uses 3.x compatibility mode).

Shortcut for reference searching in Scala IDE (cmd+shift+G)

I'd like to find all references to certain methods within my workspace. I used to do this using Eclipse's ⌘+shift+G / ctrl+shift+G hotkeys for all my Java classes, but now nothing shows up when searching in Scala classes using the Eclipse Scala IDE.
I'm currently using Scala IDE for Eclipse v3.0.3.
Is this reference searching functionality already supported in the Scala IDE, and if so, what is the shortcut for it?
Thanks.
I had this problem too and I ended up installing the Eclipse Quick Search plugin from the Spring team that normally ships as part of STS. It has no Spring dependencies and is easy to install separately from the Eclipse Marketplace. Use ⌘+shift+L and start typing and you get incremental search results.
Find references is implemented as feature but it is far away from being as powerful as the Java implementation.
You can find the actual key combination if you do a right click in the editor area and navigate to the "References" entry.
However, if the find references feature doesn't find anything, then it is clearly a bug and it would be nice if you could report your use case in the ticket tracker.
Did you try using Scala-Search? It's available from the same update site as the Scala IDE itself, and it should find Scala references. See Features docs.

Are there any Eclipse language IDEs -plugins- that use JavaCC?

I'm using JavaCC to create a language plugin for Eclipse and I wanted to know if there are any stable language IDEs for Eclipse that use JavaCC to create their AST representations and Lexer/Parser files. Thanks.
I don't know of any stable ones, however, the Eclipse IMP project supports creating IDE using any parser generator. Sadly, the project does not seem especially active (the last release is almost a year old), and documentation is a bit scarce.
However, it features a half-working example (crated with LPG), that I believe it could be adapted for JavaCC as well.
I tried a Google search for
"import org.eclipse" "import org.javacc"
hoping to find a web page with the text of a .java file from some plugin that included both. No results came up. Nonetheless there may well be a plugin that uses JavaCC, but completely segregates the code that depends on JavaCC from code that depends on Eclipse. Hmm.

using eclipse for other languages than java?

I came to know that eclipse can be used for other languages as well. But will it give the same comfort level as using java? Is there anybody who has used eclipse for other languages?
I've used Eclipse for both C/C++, Ruby, Erlang, and a few others. None of these are as tightly integrated with Eclipse as Java is, but CDT (C/C++) gives Visual Studio a good run for its money. I usually use Emacs for the other ones.
Yes, you can use Eclipse for many languages other than Java. I personally use Eclipse to code in C++, Perl, PHP, and do JavaScript as well inside of it. While it also supports plugins for connecting and executing queries against databases, I tend to prefer other options there such as Toad or Oracle SQL Developer. There are numerous other plugins to support many other languages that you can find either through the Update Manager or a simple Google search, many of which are excellent.
As a side note, if you're not using Mylyn, you're missing out.
Eclipse is used as a base for other language and tool:
for example As3 with FlashBuilder; PHP, Javascript with Aptana studio, C,Python,... with other plugins, etc...
You can found here for example some plugins for other languages.
I've used it for Javascript (jQuery): compile-time checks are a godsend to the barren lands of javascript.
For Java developement I feel most comfortable using Eclipse.
I tried using Eclipse for coding with Python. There is PyDev, an Eclipse plugin that can be used to work with the Python code in Eclipse. Though PyDev provides features like Code Completion, Syntax highlighting etc, I felt comfortable to use editors like gvim or emacs rather than Eclipse
for working with Python code. YMMV
Yes, Eclipse supports many other languages.
But you knew that already when you saw http://www.eclipse.org/downloads/
So, I guess that you are asking how well it supports them...
It is possible to have Eclipse without Java. Imagine taking that and then adding Java support. Compare that with CDT for C++ and - in my experience - they are pretty much the same.
Yes, Eclipse is slanted at Java, and I doubt that anyone will deny that, but at the same time it tries to be fair and generic and pretty much achieves it. Any few % less other language support doesn't matter when you realize that no other IDE compares.
Bottom line, whatever your language, you will be hard pushed to beat Eclipse.
And that's before I get started on the myriad plugins ...
Not only programming, debugging with Eclipse is sweet. Beside Java, the other languages I mostly work on Eclipse are PHP and Python.
While I was working on the Eclipse Web Tools Platform (WTP) project we often said that the Java Development Tools (JDT) were the model that we referenced for features for Web related languages. I think JDT has set the bar and many other projects that implement language specific tooling try to reach the JDT bar. I don't know that any have or that copying everything about JDT is the point but I do think the Java tools are exemplary development tools.