[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [modisco-dev] Problems discovering a model from Java code
|
Hi
In principle, if you have a non-model-to-model problem, MoDisco is the
correct approach.
Unfortunately the original enthusiasts who developed MoDisco have moved
on and so MoDisco is now just supported by me. I stepped up to stop what
I perceive to be an important part of the modelling infrastructure
vanishing even though I have never actually used it.
Well done for finding the duplicate. Main comments on the bug. So
trivial I cannot not fix it.
(A pity you didn't report it a couple of weeks ago; MoDisco 1.5.3 is now
pretty much frozen prior to official release on 6 Dec.)
Regards
Ed Willink
On 27/11/2023 18:12, Steve Brown via modisco-dev wrote:
Hi,
I'm new to this. I'm trying to get Modisco to generate a mode from a
Java project in Eclipse 2023-09. I'm following the instructions in
this
[url=https://stackoverflow.com/questions/51786/how-to-generate-uml-diagrams-especially-sequence-diagrams-from-java-code]StackOverflow
article[/url], starting at [code]The Answer (Oct 11th, 2013)[/code].
I've installed "Papyrus for UML" version Papyrus for UML version
6.5.0.202306070926 and Modisco Version 1.5.2.v20211130-1518.
When I navigate to "project name -> Discovery -> Discoverers ->
Discover Java and inventory model from java project...", I get this NPE:
[code]
java.lang.NullPointerException: Cannot invoke "Object.equals(Object)"
because the return value of
"org.eclipse.modisco.java.composition.javaapplication.Java2Directory.getJavaPackage()"
is null
at
org.eclipse.modisco.java.composition.discoverer.AbstractDiscoverKDMSourceAndJavaModel.getJava2DirectoryFromPackage(AbstractDiscoverKDMSourceAndJavaModel.java:514)
at
org.eclipse.modisco.java.composition.discoverer.AbstractDiscoverKDMSourceAndJavaModel.weaveCompilationUnit(AbstractDiscoverKDMSourceAndJavaModel.java:447)
at
org.eclipse.modisco.java.composition.discoverer.AbstractDiscoverKDMSourceAndJavaModel.finishBuildingModel(AbstractDiscoverKDMSourceAndJavaModel.java:224)
at
org.eclipse.modisco.kdm.source.extension.discovery.AbstractComposedKDMSourceDiscoverer2.basicDiscoverElement(AbstractComposedKDMSourceDiscoverer2.java:89)
at
org.eclipse.modisco.infra.discovery.core.AbstractDiscoverer.discoverElement(AbstractDiscoverer.java:93)
at
org.eclipse.modisco.infra.discovery.core.AbstractModelDiscoverer.discoverElement(AbstractModelDiscoverer.java:184)
at
org.eclipse.modisco.infra.discovery.ui.internal.actions.MoDiscoMenuSelectionListener.discovererElement(MoDiscoMenuSelectionListener.java:229)
at
org.eclipse.modisco.infra.discovery.ui.internal.actions.MoDiscoMenuSelectionListener$1.run(MoDiscoMenuSelectionListener.java:168)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
[/code]
I did some investigation and found this bug in
[url=https://bugs.eclipse.org/bugs/show_bug.cgi?id=397384]Bugzilla[/url].
I've looked at the org.eclipse.modisco.git Git repository. The
[url=https://git.eclipse.org/c/modisco/org.eclipse.modisco.git/tree/org.eclipse.modisco.java.composition.discoverer/src/org/eclipse/modisco/java/composition/discoverer/AbstractDiscoverKDMSourceAndJavaModel.java]AbstractDiscoverKDMSourceAndJavaModel
class[/url] seems to be returning null is a package has no files in it.
This bug in
[url=https://bugs.eclipse.org/bugs/show_bug.cgi?id=397384]Bugzilla[/url]
seems to replicate my issue.
I have two questions:
1. Am I barking up the wrong tree by trying to use MoDisco,?
2. If so, how can I fix this issue?
Any help will be gratefully received.
Many thanks,
Steve Brown
_______________________________________________
modisco-dev mailing list
modisco-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/modisco-dev