Bakalářská práce se zabývá návrhem a implementací nového rozšíření pro editor Visual Studio Code, které slouží k automatizovanému generování UML diagramů tříd a kopenogramů ze zdrojového kódu v jazyce Python. Práce reaguje na nedostatky dřívějších řešení vyvíjených na VŠE, která trpěla nestabilitou vývojového prostředí a sémantickými chybami v diagramech. Hlavním cílem je vytvořit plně funkční, stabilní a interaktivní edukační i analytickou pomůcku. První část práce vymezuje teoretický základ UML diagramů a kopenogramů a vysvětluje princip fungování abstraktního syntaktického stromu. Následně analyzuje existující vizualizační nástroje na trhu a kriticky zhodnocuje předchozí akademické práce. Z této analýzy jsou vyvozeny přesné požadavky na novou architekturu, která zjištěné problémy eliminuje. Druhá část je věnována samotnému vývoji pluginu. Popisuje navrženou dvouvrstvou architekturu izolovaných procesů, implementaci analytického backendu v jazyce Python a klientského frontendu v jazyce TypeScript. Pozornost je věnována grafickému vykreslení pomocí technologie Webview, testování řešení a možnostem budoucího rozvoje. Součástí je i podrobná uživatelská příručka. Výsledkem práce je stabilní a otestované rozšíření, které uživatelům poskytuje okamžitou vizuální zpětnou vazbu pomocí funkce živého náhledu a umožňuje snadný export diagramů.
This bachelor thesis focuses on the design and implementation of a new extension for the Visual Studio Code editor, which serves for the automated generation of UML class diagrams and kopenograms from Python source code. The thesis responds to the shortcomings of previous solutions developed at VŠE, which suffered from IDE instability and semantic errors in the diagrams. The main goal is to create a fully functional, stable, and interactive educational and analytical tool. The first part defines the theoretical basis of UML diagrams and kopenograms and explains the principles of the Abstract Syntax Tree. It then analyzes existing visualization tools on the market and critically evaluates previous academic works. From this analysis, precise requirements for a new architecture that eliminates the identified problems are derived. The second part is dedicated to the actual development of the plugin. It describes the proposed two-tier architecture of isolated processes, the implementation of the analytical backend in Python, and the client frontend in TypeScript. Attention is paid to graphical rendering using Webview technology, testing of the solution, and possibilities for future development. A detailed user manual is also included. The result of the thesis is a stable and tested extension that provides users with immediate visual feedback through a live preview function and allows for easy diagram export.
Klíčová slova:
plugin; code visualization; kopenogram; Abstract Syntax Tree; Visual Studio Code; Python; UML class diagram; AST; TypeScript