Persisting State of Components not working

Well, its not working. GetState gets called and it returns data, but when i open the project again its empty. I also don't find any information in my intellij logs.

I obtain the service via 

ModuleServiceManager.getService(module, classOf[HPackageModule])

its registered as 

<!-- Module HPackage -->
<moduleService serviceImplementation="com.haskforce.system.packages.HPackageModule"/>

and here are the relevant classes:

the main state wrapper is https://github.com/LeanderK/intellij-haskforce/blob/architecture-abstractions/src/com/haskforce/tools/cabal/packages/CabalPackageState.java

the interface for the wrapped state is here https://github.com/LeanderK/intellij-haskforce/blob/architecture-abstractions/src/com/haskforce/system/packages/HPackage.scala (HPackageState)

and the implementing class is here https://github.com/LeanderK/intellij-haskforce/blob/architecture-abstractions/src/com/haskforce/tools/cabal/packages/CabalPackageState.java 

here is my service: https://github.com/LeanderK/intellij-haskforce/blob/architecture-abstractions/src/com/haskforce/system/packages/HPackageModule.scala

i am not quite sure if i got the annotation right, but i don't find any persitet xml-data in any file in the project.

0
3 comments
Avatar
Leander Kurscheidt

its not calling loadState.

I don't think i retrieve all logs for plugin development. Is there a way to enable logging for plugin development (i debug it via the plugin run configuration)?

0

this should work:

<projectService id="serviceA"
serviceInterface="IServiceA"
serviceImplementation="ServiceA"/>


ServiceA imp = ServiceManager.getService(project, IServiceA.class).Get()

 

0
Avatar
Leander Kurscheidt

ok, i solved it, but i only got Strings working (just encoded everything in strings). I think @Attribute is also needed. If anybody has similar problems the code linked above can help.

0

Please sign in to leave a comment.