Giter Site home page Giter Site logo

Comments (5)

afdia avatar afdia commented on June 1, 2024 1

Thanks for the suggestion, but I would defer such a fundamental refactoring until we have the demand for that (especially because the multi-platform structure is already quite complex and hard to get into for new developers, so I would avoid further modularization for now)

from umlet.

afdia avatar afdia commented on June 1, 2024

Hi

If you just want a method to access and clear the map, I would suggest to use Java Reflection:

HandlerElementMap.setHandlerForElement(null, null);
Field field = HandlerElementMap.class.getDeclaredField("gridElementToHandlerMapping");
field.setAccessible(true);
HashMap<GridElement, DiagramHandler> gridElementToHandlerMapping = (HashMap<GridElement, DiagramHandler>) field.get(null);
gridElementToHandlerMapping.clear();

Changing the code at this location which is referenced several 100 times at various locations is quite risky so I would avoid it for the moment.

Btw: Kroki looks like a real nice project :) As Umlet is quite old and was never designed to run 24/7 I hope there is no other bug which cause problems.
Maybe you could also run Umlet batch exports as a subprocess (as described in e.g. https://stackoverflow.com/questions/636367/executing-a-java-application-in-a-separate-process), then it should be guaranteed to cleanup everything (but of course the overhead would be higher I guess) and you would have the guarantee of a stable API

from umlet.

ggrossetie avatar ggrossetie commented on June 1, 2024

Maybe you could also run Umlet batch exports as a subprocess (as described in e.g. stackoverflow.com/questions/636367/executing-a-java-application-in-a-separate-process), then it should be guaranteed to cleanup everything (but of course the overhead would be higher I guess) and you would have the guarantee of a stable API

Yes, I've successfully created a native image of UMlet from my fork: https://github.com/yuzutech/umlet/tree/mini.
If it's something that might interest you (i.e., a CLI with a native-image produced by GraalVM), I can see how to integrate it upstream.

Cheers!

from umlet.

ggrossetie avatar ggrossetie commented on June 1, 2024

Alright, should I close this issue?

from umlet.

afdia avatar afdia commented on June 1, 2024

I will close it thanks!

from umlet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.