How to get graphical UML class diagrams in Eclipse PDT?
Asked Answered
T

1

6

I am an Eclipse-PDT user, who wants to have some graphical aids in OOP Class designing and refactoring process.

My IDE: Eclipse Mars.1 Release (4.5.1)

I have used Eclipse for Java Developing, and know there are plenty of tools which can help. The Eclipse PHP Developing Tools are still behind in the integration and support.

There are some tools written in php like phpuml, which help with the generation of xmi (v2.1). Currently phpuml (v1.6.2) does not generate a valid xmi because of outdated xmlns urls:

<?xml version="1.0" encoding="iso-8859-1"?>
<xmi:XMI xmi:version="2.1" 
        xmlns:uml="http://schema.omg.org/spec/UML/2.1.2"
        xmlns:xmi="http://schema.omg.org/spec/XMI/2.1"
        xmlns:php="http://schemas/phpdoc/56af3cdf127e68.04124969">

These URLs cause Exceptions by trying opening in Eclipse Ecore Model Editor View:

org.eclipse.emf.ecore.xmi.PackageNotFoundException: 
Package with uri 'http://schema.omg.org/spec/XMI/2.1' not found

org.eclipse.emf.ecore.xmi.ClassNotFoundException: 
Class 'Documentation' is not found or is abstract.

Did someone know how i can fix this?

But generally I find such external tools as just temporary workarounds until something "integrated" is available.

A better approach could be direct implementation and generation in run-time. So the synchronization issue could be skipped by:

  1. Using eclipse internal parsing and analyzing of php classes. The information displayed in the Outline-View-Panel is basically the single class diagram. There could be a few steps from full class diagram:
  2. Just follow the inheritance tree upwards
  3. Display a folder or selected resources in a graphical class diagram overview.

This is at least the theory.

The Questions:

  • Am i thinking in the right direction?
  • Is there already something similar, which works language-independent, based on eclipse parsing?
  • How to get graphical UML class diagrams in Eclipse PDT?
Tortious answered 1/2, 2016 at 12:42 Comment(0)
O
1

Not an eclipse-related suggestion, but you can try out the IntelliJ IDEA-based Phpstorm.

It supports the generation of class diagrams from PHP code and also supports refactoring from within the class diagram, as well as "jump to code" from within the diagrams.

Source: https://confluence.jetbrains.com/display/PhpStorm/Working+with+UML+class+diagrams

While the IDE isn't free, you can download a 30-day trial to see if it can solve this problem of yours: https://www.jetbrains.com/phpstorm/

Osman answered 21/2, 2016 at 14:40 Comment(1)
Thank you for your suggestion. I am looking for a eclipse-related solution. If external, than just a proper uml-file generarion.Tortious

© 2022 - 2024 — McMap. All rights reserved.