Coder Social home page Coder Social logo

jeehut / swiftplantuml-xcode-extension Goto Github PK

View Code? Open in Web Editor NEW

This project forked from marcoeidinger/swiftplantuml-xcode-extension

1.0 1.0 0.0 4.43 MB

Xcode Extension for generating class diagrams from Swift code (powered by PlantUML)

Home Page: https://github.com/MarcoEidinger/SwiftPlantUML

License: MIT License

Swift 100.00%

swiftplantuml-xcode-extension's Introduction

SwiftPlantUML

Build Swift 5.3 Twitter

SwiftPlantUML-Xcode-Extension

Generate and view a class diagram for Swift code in Xcode with this extension.

This Source Editor Extension makes use of SwiftPlantUML Swift package. You can also use SwiftPlantUML as a command-line tool.

Features

  • ๐Ÿ“Š Create class diagram from Swift file
  • ๐Ÿ”ฆ Create class diagram from selected Swift code

Example

SwiftPlantUML Xcode Extension - Usage Demo

Install

Homebrew

brew install swiftplantumlapp

Installation through Homebrew

Alternative

  • Download latest SwiftPlantUML package from the Releases.
  • Copy SwiftPlantUML to your Applications folder.

Enable Extension

  • Launch SwiftPlantUML.

    SwiftPlantUML user interface
  • Enable extension in System Preferences > Extensions > Xcode Source Editor > select SwiftPlantUML

    SwiftPlantUML Xcode Extension - Installation

Configure

Optional:

Preferences - Elements

Preferences - Members

Preferences - Others

Troubleshooting

The command "Open editable diagram in browser" is still busy

Xcode Source Code Extension initialization might take up ~ 30 seconds on initial launch.

If the prompt does not appear within 60 seconds

image

then check for a crash report related to XPC service in Console app of your MacOS.

CrashReportXPCServiceExample

If you see such crash report related to fatal error: Loading sourcekitd.framework/Versions/A/sourcekitd failed please check the installation path of Xcode. If it's installed under /Applications/Xcode.app, please run:

sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

If it's installed elsewhere, please replace the /Applications/Xcode.app path in the command above with the location where you've installed Xcode.

Technical Details

This Source Editor Extension makes use of XPC service to run the app sandboxed and use SwiftPlantUML (and its dependency SourceKitten). Source Editor Extensions using SourceKitten (either directly or indirectly) have to either run in a non-sandboxed app (and could not be distributed via the App Store) or use XPC service to outsource the use of SourceKitten to a different process.

Acknowledgements

These awesome blog posts helped me to dive into Xcode Source Editor Extensions and XPC services

swiftplantuml-xcode-extension's People

Contributors

marcoeidinger avatar

Stargazers

 avatar

Watchers

 avatar

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.