I am a newbie in Eclipse Indigo.
Actually, my task is to Develop a PLUGIN which will READ THE UML MODELS through the ECLIPSE INDIGO. i.e., When i run that plugin IT SHOULD READ EVERY THING IN THAT UML MODEL, such as CLASSES, METHODS etc.,
So can i get any guidelines for this ??
May i get any kind of sample coding for this ??
Thanks
Sriram R.
There are likely to be several existing eclipse plug-ins that will do what you're asking, so I would suggest looking at these before committing to create your own plugin.
If you are set on making your own plugin, then the solution will depend on the format of the UML files you need to parse. Some of the UML plug-ins use EMF (Eclipse Modelling Framework), in which case you would want to base your plugin on EMF. Others use XML, in which case you have many options including straight forward parsing or using XML object frameworks like XMLBeans or JAXB.
Sorry I can't be more specific but your question is rather vague.
Very unclear what you are looking for. You should start by searching this site for more information, there are plenty of Eclipse plugins that handles UML, see for example this question. Then when you have evaluated the alternatives, find what you need that the existing plugins dont do.
Related
I've an android project opensource written in Java (Eclipse). There are about 300 classes..I wanna to be able to understand the code quicker and to have a general representation of all the classes, interfaces and to know how they are connected each other.
Is there a way in Eclips or an external utility that could help retrieve the class structure of the project?
I have not tried it, but this looks good: http://sourceforge.net/projects/jug/
EDIT: Well this one looks even better: http://www.objectaid.com/home
EDIT 2: See this, too: http://www.nwiresoftware.com/
I haven't done that yet with Java, but you can try some of the options discussed here:
How to generate UML diagrams (especially sequence diagrams) from Java code
to get UML diagrams of your code
There are quite a few UML plugins available out there for Eclipse. It's really about how much information you want and which you feel comfortable with. The most popular one I found is Object Aid but a quick Google search for UML plugins for Eclipse returns a number of options.
If you want detailed UML diagrams then I highly recommend taking a look at Enterprise Architect. It provides tight integration with Eclipse. The desktop version is quite affordable.
I want to write some plugin to analysis Java source code. Which part of eclipse's plugin I have to know? I know this is a stupid question, but I really don't know where I have to start and I don't have too much time. I am not an actual programmer, I am a computer repair technician. So I just can write plugin (I love it) in spare time.
I am really grateful if someone give me a few pointers.
I didn't mean to be snarky above. So, I'd first recommend getting to understand the Eclipse architecture, plugin model and APIs. Here is an old, but still relevant tutorial:
http://eclipsepluginsite.com/#
It doesn't go into JDT at all, but does give you an idea about Eclipse plugins in general. So, once you understand that tutorial, you can move on to JDT:
http://www.vogella.com/articles/EclipseJDT/article.html
You'll need to master quite a lot -- the Builder API to hook into the incremental build process and get notified when files change, the IResource type hierarchy to get to the source files, the Java AST classes (there's a big bunch of those), some quirks concerning type bindings, etc. There is no simple pointer to give.
I've had several classes - university level - on Java.
However, what these classes lack is some practical approach to Java - or, to programming as a whole. Things you can only learn in a business.
However, since I am not allowed to use Java on the workfloor, I don't get to learn this now - even though I would like to.
So I guess what I'm asking for is any number of plain have-to-know Java resources. Things concering, for example, what Ant is and why and how to use it; using revision control systems from your IDE; standard Java libraries you would use often ... Anything that would help with actual software development, really.
As some side information, I've been using Eclipse for about four years now, and I feel at home there.
I have a system that works fairly well for class assignments and for projects as well. Firstly, I create one Eclipse project per class. This way I can re-use classes from previous assignments. You can also customize your classpath by adding another project as a library.
I use the Maven plugin for Eclipse M2Eclipse. Not only does this give you the ability to search for libraries and add them easily but the exec:java plugin is an easy way to execute your code from the command line. It's helpful because when it executes your code, it uses a classpath that includes all linked Maven dependencies. If you aren't using external libraries, you might not need Maven but I've found it to be helpful to learn in preparation for the job market. It's fairly simple to start with plus there are a ton useful plugins for open source projects.
Next, for revision control I recommend Subclipse. You can get a free SVN account with a single login from Unfuddle.com. Link that up to your Eclipse environment and Import your project.
When I want to get a particular class specification, I go to Sun's Java documentation.
Another excellent resource that will certainly give you the reference material (searchable!) to answer any java question would be this torrent containing ~100 ebooks on Java, sorted by directory on various topics (like Ant, Eclipse, or Swing).
I have been tasked with porting a large Java codebase to the Android platform. The project makes extensive use of AWT which isn't' supported on Android.
I'm looking for a tool that lets me visualize all of the classes in the project. I'd like to be able to see all of the relationships between classes so that I can get a good idea of where to start the port.
If you have any suggestions that would help in this task I'd like to hear about them.
I use Structure101 almost daily to visualize and understand our code base. A great tool and quite reasonably priced too.
This question has been touched at StackOverflow many times before and here are some links:
Is there some tool to visualize java class hierarchies and relations?
Tool to visualize code flow in Java?
Recommended Eclipse plugins to generate UML from Java code
Good free UML tool for Java/Eclipse?
IntelliJ IDEA also has some tools to help, like Graphical Navigator in IDEA 8 and Code Navigator plugin.
Netbeans has an OK reverse engineering tool which spits out a heaps of UML. I haven't used it in a while, but when I did it was a tad buggy.
There is an Eclipse plugin called Creole which you could also try. http://www.thechiselgroup.com/creole
I've just started to play around with Eclipse GMF.
Has anyone used the framework?
Any good or bad experiences you had using it?
Any alternatives for graphical modeling you could suggest?
EDIT: What good examples are available?
Has anyone used the framework? Yes, I am using it right now. It works, but it is typically quite a bit of coding for the graphical figures. I currently am struggling to leverage the IBM RSA/RSM UML editparts/figures/nodes etc built on top of GMF.
Any good or bad experiences you made using it? Looking back on my initial dives into GMF/EMF/GEF etc I can say for certain, study the examples. There are important patterns that you have to pick-up on from the examples and not the documentation. I would also suggest a new book (Eclipse Modeling Project: A Domain-Specific Language (DSL)) specific for GMF Modeling in Eclipse. I paged through it and it seemed to be the missing manual to some of the more basic concepts. Why the book is good is that is focuses on the key to making UML/Models useful through constraining it to a specific domain and providing a tool that only allows for valid models to be created. There is not a lot of documentation online and the API only tells you so much. WATCH OUT for repaint/paint loops caused by calling setBounds() or other set methods on children, it crashes the eclipse instance, not fun. Oh yes and the APIs are split between eclipse help documentation versions or not included at all.
Any alternatives for graphical modeling you could suggest?
Consider UML profiles with custom images and icons rather than full shape generation. It takes about 2 hours to put together a pretty good Image/Icon editor building on top of UML graphical objects and UML profiles. The IBM RSM tool UML Profile tooling project does this quickly. There is a lot you can do with constrained UML profiles (via Eclipse plug-ins or OCL). Entering GMF land is more than a order of magnitude effort increase, from 1 to 10 hours no problem.
Consider pure DSL (Domain specific language) tools out there. Google will provide a good list. From what I have seen the main reason to use GMF is eclipse integration and leveraging existing ecore/UML models, this is why I use GMF.
Ask yourself do I need model which is easy, or do I need a tool for creating instances of this model. If there are only 1-5 expert users there may not be a need for a sleek tool.
The TOPCASED project makes use of GMF. It provides various graphical editors for UML and other diagrams.
With GMF, most of the editor code is generated for you, but the main complexity arises from having to modify it.
As most recent alternatives, you might try Graphiti and Spray. Here is a comparison and another between GMF and Graphiti.