Slicing Tools for Eclipse - java

Does anyone know if there are any open source tools for eclipse that can generate static program slices according to the slicing technique outlined by Mark Weiser (http://en.wikipedia.org/wiki/Program_slicing)? I can only seem to find JSlice, which only works for Fedora. Any pointers about how I could tackle this (and libraries out there, or example algorithms for java) would be great.

Disclaimer: I haven't tried the tool listed below.
Indus. It appears to make itself useful via the Kaveri plugin in Eclipse.
It would be worth noting that apart from JSlice and Indus, no other known code slicers for Java appear to be available, although there are quite a few papers that discuss building a code slicer for Java. Sadly, the authors do not appear to have made these tools available for further research.

How about WALA and javaslicer.

Related

Where to find design patterns, best practices for Eclipse plugin development

Our team is developing a Eclipse based IDE (typically a plugins), currently we are progressing good but I feel somehow we are feeling smell of bad practices in code. Example I can give here is, eventListeners :
Consider we have button named button1 and in the same java file (just below the button) we are adding selection listener to it like:
button1.addSelectionListener(new SelectionListener() {
//Remaining code here
}
Which I feel is completly bad idea, and my question, is there any design pattern, best practices etc available for eclipse plugin development? Or do you have any small tips/suggestions for the same? I know there are books available like Code Complete 2 etc etc, but I need bit suggestions respect to eclipse plugin development.
I tried in Google and didn't get much good informations regarding same, I got this IBM's article. But I feel it's not very useful, any suggestions or tip is appreciated.
Note: Please let me know if it is not appropriate here or is it good for anyother stackexchange networks (like programmers), I can move it there.
After several years of plugin development, I find these resources to be most useful for me when I find myself struggling on how to implement new feature:
Eclipse sources. Nothing will beat this. Try to find some already existing analogic part of what you're just doing and look how Eclipse developers did it - what patterns and extensions they used and so on. Helps to keep you plugins consistent with other parts of Eclipse. Eclipse Plugin Spy is your friend here (Alt + Shift + F1/F2).
Platform Plug-in Developer Guide - will guide you through basic concepts of Eclipse, like how to create menus properly, implement an editor, or save user preferences.
Eclipse Plug-ins (4th Edition) - Well known must-have for plugins developer.
And, of course, Stack overflow :)
I like to add some more resources that I have found useful to dreo's answer. The eclipse sources are invaluable, if you want to understand something in detail. To understand global concepts however, I suggest to read as much tutorials as you can. I can recommend the following websites:
Eclipse Corner Articles Has a lot of tutorials ranging from basic concepts to plugins specific topics.
Vogella Eclipse Tutorials Also a good tutorial website. It deals with a lot of topics that are important for Eclipse RCP development.
SWT Snippets More than 100 code snippets. Really useful, if you want to learn more about SWT and its capabilities.
The Official Eclipse FAQs Last but not least, I can recommend the official Eclipse FAQs. They provide compact solutions for a variety of topics.

Advice for mapping an undocumented Java Eclipse Project

I have started at a new firm and as part of my duties am making small changes on a Java Project that was developed previously. The problem is that it is mostly undocumented and very complex. By undocumented I mean no comments, no Java doc, no documentation guide, nothing. It's a website Java project developed in Eclipse and built using Ant. My question is what tools are available to help me map out the project to better understand it. Or is there any advice on the best set of steps to follow.
Thank you for your time.
Look into reverse engineering tools that can create UML diagrams for java, like omondo. If the ant build script is complex aswell - I once visualized some complex ant build script using yEd, that helped a lot.
I personally found that UML-based tools do not scale well in such cases, except for some very specific cases, where sequence diagrams might help a lot.
Instead, I would refer to the following book (available online) for a general approach to the problem:
http://scg.unibe.ch/download/oorp/
And try out some research tools for code visualization to get an overview, for example:
http://www.inf.usi.ch/faculty/lanza/codecrawler.html
(would love to post more links, but can't due to stackoverflow's spam prevention mechanism)

open source swing based application that employs good practices

I'm trying to learn swing and I was thinking you guys may know a really good swing based open source application that I could study and inspire from. I'm looking for something that has a real world use, not just some concepts explained (like examples in most books and tutorials).
Thank you!
It's certainly less well-known than some of the other projects mentioned here, but have a look at GoGrinder. The code is well written and documented.
It might also be a good idea to look for something that you'll actually use. I find it easier to read the source of applications that I'm familiar with from using them.
In the same spirit as the answer suggesting to check NetBeans, I would suggest to get the sources of IntelliJ IDEA Community Edition and IntelliJ Platform from their git repository. At some point, IDEA was IMO a state of the art Swing application (fast, responsive, not ugly, nice user experience, etc).
Maybe you could have a look at the open source NetBeans IDE. It is huge, but it is using Swing intensively and is well designed and documented. Moreover, it is also a generic platform to build modular GUI applications.
The Swing Tutorial is filled with excellent code, and the Swing code itself is available for study in most IDEs.
jEdit is a programmer's text editor that I wrote some plugins for a few years ago. Partially due to the plugin system, the code is well documented, and after having been in development for many years is generally very high quality.
You could take a look at the jgoodies examples. They are not plain swing though, and I don't know the license.

Modeling software using Eclipse plugin

I am brand new to modeling software (my greatest reference so far has been the Wikipedia page on UML). Are there any free tools that I can use with Eclipse to auto-generate diagrams?
Thanks
EDIT:Just to clarify, I am not necessarily looking for the 'right' solution, as I don't have a specific problem. I am just trying to see what is out there that other people use!
EDIT: Tried eUML2 . Worked ok. It destroys the look of the code (if you have ever seen auto-generated HTML code or the code created by NetBeans, image that now) by adding comments everywhere. The background says evaluation in huge letters, which is also annoying. The UML is decent, but definitely not standard. All in all, not what i'm looking for. On to something else...
EDIT: Tried UMLet. Works well, very easy to get the hang of. Unfortunately it does not auto-pull any information from the source code. Will likely leave it installed for now
You may take a look at eUML. It creates nice looking UML diagrams. However, what I don't like with it is that it is very strictly connected to the source code and thus lacks some flexibility. Any change in the source code changes the diagrams and the other way around - and this is IMO not always desirable.
Check Eclipse MDT (Model Developing Tools)
You have plenty of UML tools with Galileo and will have UML tools for Helios in the next six months.
I am a paid customer so got today the Helios UML build from Omondo.Please note that if you are not a paid up customer then you will not be able to download the lastest Helios build !!

For someone coming from Visual Studio/C# background and wants to learn Java - Which should I get: Netbeans or Eclipse?

I'm looking for the following:
A nice debugger that allows me to easily view variable values if I use breakpoints.
Works very nicely in Windows 7.
Has something similar to the Toolbox pane in Visual Studio.
Built in intellisense, and code completion with the TAB key.
Long term support. I mean something that will last and stay in active development for years. I don't want a pet project IDE that will stop developing in a year. I'm just learning so it'll be very dificult at first to switch IDE's.
I'm new so I don't really know which IDE provides what I need between the two. Any help?
Well, I switched from Eclipse to Visual Studio, and I use both just about every day.
I found it hard to get used to the little differences at first, but now I am proficient in both IDEs.
I can't speak to whether or not Netbeans would be easier to learn, but Eclipse shouldn't be hard at all.
Both IDEs will provide all of the features that you have listed, and you should be able to customize both of them to get them to work almost exactly like Visual Studio.
So you want to learn Java and your first question is about which IDE to learn ? I suggest you look at BlueJ which is an IDE designed for people who want to learn Java. From my, I admit limited, experience with the IDEs you mention, BlueJ is the one which gets least in one's way when trying to learn Java as opposed to learning the IDE. Once you've exhausted BlueJ's capabilities there is an easy progression to NetBeans through a plug-in but you would probably not find it too difficult to step up to Eclipse instead.
Yes, I know you want to choose between Eclipse and NetBeans but BlueJ might be of interest.
This is a common debate, and there are obviously merits on both sides (this might be better served as a community wiki page). I prefer Eclipse, but to answer your questions as well as I can briefly:
Works very nicely in Windows 7.
Both are fine.
Has something similar to the Toolbox pane in Visual Studio.
Sorry, not familiar. Neither are short on panes, though Eclipse has a richer cache of third party plugins that might give you the experience you want.
Built in intellisense, and code completion with the TAB key.
I believe both are Ctrl-Space by default. If you're working in Java in Eclipse, there's an automated pop-up after a half second delay each time you type a separator (.) character.
Long term support. I mean something that will last and stay in active development for >years. I don't want a pet project IDE that will stop developing in a year. I'm just >learning so it'll be very dificult at first to switch IDE's.
Both are very mature products. I'd imagine Eclipse's fortunes are a little more secure simply because NetBeans might experience some turbulence during the Oracle acquisition of Sun.
My only other comment is that it's always seemed to me that Netbeans had far nicer "click-and-go" project templates out of the box, while Eclipse offered richer third party library integrations and a better debugger.
Probably both will do. Personally, I'd rather use Netbeans, because it's easier to get started right-out-of-the box. Eclipse depends more on plugins.
Why not try both and see which one suits your individual tastes more?
Both are find but if you want to build GUI's, Netbeans has the edge as it has a built in GUI builder, including a toolbox of controls to use with it.
Eclipse does not have a GUI builder. The commercial Eclipse distribution, MyEclipse does have a GUI builder - it's actually the one from Netbeans.
Neither Intellij IDEA is the Cadillac of Java IDEs
Netbeans = Great out of box experiance
Eclipse = Highly customizable with plugins and (so I've heard) slightly better intellisence-like capabilities.
If possible, I'd say try both (despite the bandwidth problem). If you get basic Java Development versions, the sizes aren't that big (48 MB for NetBeans and 92 MB for Eclipse)
I personally prefer NetBean's in-built capabilities since I don't like having to install plugins to make my experience the way I want it (and not all Eclipse plugins are free) but most of my fellow java devs prefer Eclipse's simplicity and ease of use.
I think you should try Intellij Idea, it the most powerful-intuitive java IDE I've never seen (http://www.jetbrains.com/idea/index.html). The new Community Edition is free and more than enough for java developpement. As it is highly configurable you can choose 'TAB' for auto completion, but I think you can learn from existing combinations that are well design.
Regards.
Java has some really nice IDEs available and many will do what you require.
I dont know you, but I use VS with Resharper so I m very used to those shortcuts, if you do too then have a look at IntelliJ ( they have a comunity edition)
Otherwise you can get eclipse and get the IntelliJ keymap ( or try to get the default VS keymap)
Netbeans is nice too, but I had some problems with it ( ie didnt build, rancomly crashing, etc)
Also most offer Source Control integration ( in Eclipse you have many flavours of subversion for example)
I guess you ll have to play around and find what suits you
Cheers

Categories