How to properly manage javaSettings and webSettings in Workspace API

Hello!

I’m working on migration from legacy Project API to new Workspace API and would like to know how to properly manage such entities as:

  • JavaModuleSettingsEntity
  • WebSettingsEntity , to create com.intellij.javaee.web.facet.WebFacet

related builders marked as internal:

workspaceModel.update("Changing framework/language specific entities") { storage ->
 storage.modifyModuleEntity(moduleEntity) {
  this.webSettings += webSettingsEntity
 }
 storage.modifyModuleEntity(moduleEntity) module@{
   this.javaSettings = javaSettingsEntity
 }
}

‘javaSettings$delegate’ is unstable because its signature references unstable ‘com.intellij.platform.workspace.storage.impl.WorkspaceEntityExtensionDelegateMutable’ marked with @ApiStatus.Internal

Facets code probably should not be migrated at all, as even our plugins still use WebFacet for this and not workspace API

1 Like

We also do not create new facet types in plugins so they will just probably die at some point.

Nowadays people do not set up anything manually in IDE, decent features had better work out of the box or don’t exist.

@yuriy.artamonov , indeed, that’s why for SAP Commerce (e.g. Hybris) it is important to automate project configuration as it relies on multiple languages and frameworks. It is kinda Android Studio packed into a Plugin → https://plugins.jetbrains.com/plugin/12867-sap-commerce-developers-toolset?noRedirect=true.

I hope that I misunderstood you, and that JetBrains are not actually planning to drop a possibility to configure various Facets by 3rd-party plugins, otherwise it will a blocker for some functionalities.

For sure there are no plans do drop them anytime soon

1 Like