在 IntelliJ 中制作 UML class 时出现语法错误,我该如何解决?

I am getting a syntex error when making a UML class in IntelliJ, how can i fix it?

我正在使用“Sketch it!”在 IntelliJ 中制作 UML class 图。插件,但它说第 5 行有语法错误,它第一次说命名空间。我不明白为什么,因为它在下面多次说同样的话,也没有错误。我在网上找不到这个程序的教程,所以我无法修复它。

@startuml

title __STREAMINGSERVICE's Class Diagram__\n

  namespace  {    \   <--- this is where I get the syntax error!!
    class ChangeLoginGUI {
    }
  }
  

  namespace  {
    class Episode {
    }
  }
  

  namespace  {
    class EpisodeGUI {
    }
  }
  

  namespace  {
    class FileReader {
    }
  }
  

  namespace  {
    class IncorrectLoginException {
    }
  }
  

  namespace  {
    class InfoGUI {
    }
  }
  

  namespace  {
    class InfoSGUI {
    }
  }
  

  namespace  {
    abstract class InfoSuper {
    }
  }
  

  namespace  {
    class LoginGUI {
    }
  }
  

  namespace  {
    class Main {
    }
  }
  

  namespace  {
    class MainGUI {
    }
  }
  

  namespace  {
    abstract class Media {
    }
  }
  

  namespace  {
    class MediaLibrary {
    }
  }
  

  namespace  {
    class MediaPlayer {
    }
  }
  

  namespace  {
    class Movie {
    }
  }
  

  namespace  {
    class MovieGenerator {
    }
  }
  

  namespace  {
    class MovieGeneratorTest {
    }
  }
  

  namespace  {
    class NotificationGUI {
    }
  }
  

  namespace  {
    abstract class ObjectGenerator {
    }
  }
  

  namespace  {
    interface Playable {
    }
  }
  

  namespace  {
    class SearchEngine {
    }
  }
  

  namespace  {
    class SearchEngineTest {
    }
  }
  

  namespace  {
    class Series {
    }
  }
  

  namespace  {
    class SeriesGenerator {
    }
  }
  

  namespace  {
    class SeriesGeneratorTest {
    }
  }
  

  namespace  {
    class User {
    }
  }
  

  namespace  {
    class UserList {
    }
  }
  

  ChangeLoginGUI -up-|> javax.swing.JFrame
  ChangeLoginGUI o-- User : user
  ChangeLoginGUI o-- UserList : userList
  Episode .up.|> Playable
  EpisodeGUI -up-|> javax.swing.JFrame
  EpisodeGUI o-- MediaPlayer : play
  EpisodeGUI o-- Series : media
  EpisodeGUI o-- MediaLibrary : ml
  EpisodeGUI o-- User : user
  InfoGUI -up-|> InfoSuper
  InfoSGUI -up-|> InfoSuper
  InfoSuper -up-|> javax.swing.JFrame
  InfoSuper o-- Media : media
  InfoSuper o-- MediaPlayer : play
  InfoSuper o-- User : user
  LoginGUI -up-|> javax.swing.JFrame
  LoginGUI o-- MainGUI : launchProgram
  LoginGUI o-- UserList : userList
  MainGUI -up-|> javax.swing.JFrame
  MainGUI o-- MediaLibrary : mediaLibrary
  MainGUI o-- SearchEngine : searchEngine
  MainGUI o-- User : user
  MediaLibrary o-- SeriesGenerator : m1
  MediaLibrary o-- MovieGenerator : m2
  MediaPlayer -up-|> javax.swing.JFrame
  Movie .up.|> Playable
  Movie -up-|> Media
  MovieGenerator -up-|> ObjectGenerator
  MovieGeneratorTest o-- FileReader : fr
  MovieGeneratorTest o-- MovieGenerator : mg
  MovieGeneratorTest o-- MovieGeneratorTest : mgt
  ObjectGenerator o-- FileReader : fr
  SearchEngine o-- MediaLibrary : mediaLibrary
  SearchEngineTest o-- SearchEngine : searchEngine
  Series -up-|> Media
  SeriesGenerator -up-|> ObjectGenerator
  SeriesGeneratorTest o-- FileReader : fr
  SeriesGeneratorTest o-- SeriesGenerator : sg


right footer


PlantUML diagram generated by SketchIt! (https://bitbucket.org/pmesmeur/sketch.it)
For more information about this tool, please contact philippe.mesmeur@gmail.com
endfooter

@enduml

定义与PlantUML语法不兼容,所有这些namespace {..}都没有命名命名空间,这些{}在引入每个class

之后

将前两个 classes 放在专用命名空间中,而不是下一个 :

@startuml

title __STREAMINGSERVICE's Class Diagram__\n

namespace A {    
     class ChangeLoginGUI 
}

  namespace B {
     class Episode
  }
  

  class   EpisodeGUI
 
   class  FileReader
 
   class  IncorrectLoginException
 
    class InfoGUI
  
    class InfoSGUI 
 
    abstract class InfoSuper
  
    class LoginGUI

    class Main

    class MainGUI 
  
    abstract class Media

    class MediaLibrary 

    class MediaPlayer

    class Movie

    class MovieGenerator 

    class MovieGeneratorTest

    class NotificationGUI

    abstract class ObjectGenerator

    interface Playable

    class SearchEngine 

    class SearchEngineTest

    class Series

    class SeriesGenerator

    class SeriesGeneratorTest

    class User 

    class UserList

  ChangeLoginGUI -up-|> javax.swing.JFrame
  ChangeLoginGUI o-- User : user
  ChangeLoginGUI o-- UserList : userList
  Episode .up.|> Playable
  EpisodeGUI -up-|> javax.swing.JFrame
  EpisodeGUI o-- MediaPlayer : play
  EpisodeGUI o-- Series : media
  EpisodeGUI o-- MediaLibrary : ml
  EpisodeGUI o-- User : user
  InfoGUI -up-|> InfoSuper
  InfoSGUI -up-|> InfoSuper
  InfoSuper -up-|> javax.swing.JFrame
  InfoSuper o-- Media : media
  InfoSuper o-- MediaPlayer : play
  InfoSuper o-- User : user
  LoginGUI -up-|> javax.swing.JFrame
  LoginGUI o-- MainGUI : launchProgram
  LoginGUI o-- UserList : userList
  MainGUI -up-|> javax.swing.JFrame
  MainGUI o-- MediaLibrary : mediaLibrary
  MainGUI o-- SearchEngine : searchEngine
  MainGUI o-- User : user
  MediaLibrary o-- SeriesGenerator : m1
  MediaLibrary o-- MovieGenerator : m2
  MediaPlayer -up-|> javax.swing.JFrame
  Movie .up.|> Playable
  Movie -up-|> Media
  MovieGenerator -up-|> ObjectGenerator
  MovieGeneratorTest o-- FileReader : fr
  MovieGeneratorTest o-- MovieGenerator : mg
  MovieGeneratorTest o-- MovieGeneratorTest : mgt
  ObjectGenerator o-- FileReader : fr
  SearchEngine o-- MediaLibrary : mediaLibrary
  SearchEngineTest o-- SearchEngine : searchEngine
  Series -up-|> Media
  SeriesGenerator -up-|> ObjectGenerator
  SeriesGeneratorTest o-- FileReader : fr
  SeriesGeneratorTest o-- SeriesGenerator : sg


right footer


PlantUML diagram generated by SketchIt! (https://bitbucket.org/pmesmeur/sketch.it)
For more information about this tool, please contact philippe.mesmeur@gmail.com
endfooter
@enduml

产生:

请注意您的图表不容易阅读,因为包含很多 classes,其中一些是孤立的。

页脚表明这是由 SketchIt 生成的,我不知道,也许该工具需要在命名空间而不是命名空间外定义所有 classes?