UMLGraph icon indicating copy to clipboard operation
UMLGraph copied to clipboard

@opt is ignored

Open jurjevic opened this issue 12 years ago • 10 comments

Any option setting in javadoc headers seem to be ignored. Example:

  • @opt attributes
  • @opt visibility
  • @opt types

These options have no effect on a class. Using other tags like "@composed 1 has * Vehicle" works fine.

jurjevic avatar Aug 16 '13 11:08 jurjevic

Thank you! Can you please supply a minimal test case, or, even better, a patch?

dspinellis avatar Aug 16 '13 12:08 dspinellis

Unfortunately, I have to patch yet. But I can describe the Issue a bit better:

I use the doclet to generate the javadoc with uml diagrams. I like pattern "the code is the truth" and UMLGraph helps a lot to visualize important informations. Therefore - thanks a lot for your effort.

ant.javadoc(classpath: classpath.asPath, sourcefiles: filesAsString, packagenames: '', destdir: destinationDir, protected: 'true', docletpath: configurations.umljavadoc.asPath) { doclet(name: 'org.umlgraph.doclet.UmlGraphDoc') { param(name: '-inferdepinpackage') param(name: '-inferrel') param(name: '-qualify') param(name: '-postfixpackage') param(name: '-hide', value: 'java.') param(name: '-hide', value: 'com.vaadin.') param(name: '-hide', value: '..Builder$') param(name: '-hide', value: '._Exception$') param(name: '-hide', value: '._Logger$') param(name: '-nodefontsize', value: '10') param(name: '-nodefontpackagesize', value: '9') } }

This work so far. The problem I get is found in the java files. e.g.

/**

  • The vehicle ...

  • @opt operation <=== I want to show the operations of this class, but nothing happens

  • @composed 1 - 4 Tyre <=== These ones work fine

  • @composed 1 - 1 Engine

  • @composed 1 - 1 Body

  • @hidden <== This one also works fine

  • @opt hide <== But opt againg is not working */ public class Vehicle {

    private String name;

    // Prevent instantiation private VehicleClass() { }

    /**

    • The name of the vehicle
    • @return */ public String getName() { return name; }

    private void setName(String name) { this.name = name; } }

Any idea? Thanks a lot.

jurjevic avatar Aug 16 '13 12:08 jurjevic

The options were created for UMLGraph working as a stand-alone tool to create UML diagrams in a declarative way. They are probably not supported correctly by UmlGraphDoc.

dspinellis avatar Aug 16 '13 14:08 dspinellis

You are right. UmlGraph works fine with options. Any chance to fix it in UmlGraphDoc? I would try to fix it if you could give me a hint where to look at first.

jurjevic avatar Aug 16 '13 16:08 jurjevic

I suggest to look at the two ends: the point where the UmlGraphDoc options are processed for each class, and the point where the offending parts are generated.

dspinellis avatar Aug 16 '13 21:08 dspinellis

Ok - I've fixed it. Are you looking to include it in the next release? I would provided it back in that case.

The problem was that PackageView and ContextView ignored the "overrideForClass" usage.

jurjevic avatar Aug 17 '13 12:08 jurjevic

Well done! Of course, please submit a pull request.

dspinellis avatar Aug 17 '13 17:08 dspinellis

Hi, I am using the 5.6.6 version of the doclet and this is still not working. Is there a new version I shall try? thanks!

joret avatar Dec 10 '13 14:12 joret

There isn't a version that fixes the problem. But you might want to try submitting a fix through a pull request by following the suggestion made by @jurjevic.

dspinellis avatar Dec 10 '13 17:12 dspinellis

Hi, I found that https://github.com/dspinellis/UMLGraph/commit/0435986b9292feda52424fba0dc15f1a18c9e178 seems to fix this issue (although I did not try all variants). Would it be possible to cut a release 5.6.7 soon? Thanks a lot!

treitmayr avatar Jul 15 '14 12:07 treitmayr