Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception when running the textGenGen while no TextGen Aspect exists #6

Open
neumantm opened this issue Jul 5, 2023 · 0 comments
Open

Comments

@neumantm
Copy link

neumantm commented Jul 5, 2023

When running the Gen TextGen action, while the language has no TextGen Aspect, I get the following error.
The TextGen Aspect is created, but empty after this.

java.lang.Throwable: Assertion failed: Write access is allowed inside write-action only (see com.intellij.openapi.application.Application.runWriteAction())
	at com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:220)
	at com.intellij.openapi.application.impl.ApplicationImpl.assertWriteAccessAllowed(ApplicationImpl.java:1336)
	at jetbrains.mps.ide.vfs.IdeaFile.openOutputStream(IdeaFile.java:499)
	at jetbrains.mps.extapi.persistence.FileDataSource.openOutputStream(FileDataSource.java:118)
	at jetbrains.mps.util.JDOMUtil.writeDocument(JDOMUtil.java:132)
	at jetbrains.mps.smodel.persistence.def.ModelPersistence.saveModel(ModelPersistence.java:238)
	at jetbrains.mps.persistence.DefaultModelPersistence$PersistenceFacility.saveModel(DefaultModelPersistence.java:370)
	at jetbrains.mps.smodel.DefaultSModelDescriptor.saveModel(DefaultSModelDescriptor.java:138)
	at jetbrains.mps.extapi.model.EditableSModelBase.save0(EditableSModelBase.java:280)
	at jetbrains.mps.extapi.model.EditableSModelBase.save(EditableSModelBase.java:238)
	at jetbrains.mps.project.SModuleOperations.createModelWithAdjustments(SModuleOperations.java:132)
	at jetbrains.mps.project.SModuleOperations.createModelWithAdjustments(SModuleOperations.java:107)
	at jetbrains.mps.smodel.LanguageAspect.createNew(LanguageAspect.java:169)
	at jetbrains.mps.smodel.LanguageAspect.createNew(LanguageAspect.java:156)
	at TextGenGen.plugin.plugin.TextGenGenerationProcessor.executeGenerateAction(TextGenGenerationProcessor.java:76)
	at TextGenGen.plugin.plugin.TextGenGenerationProcessor.lambda$generateTextGen$0(TextGenGenerationProcessor.java:51)
	at TextGenGen.plugin.plugin.AsyncWriteAction.lambda$execute$0(AsyncWriteAction.java:19)
	at jetbrains.mps.smodel.ActionDispatcher.dispatch(ActionDispatcher.java:98)
	at jetbrains.mps.smodel.ActionDispatcher.lambda$wrap$0(ActionDispatcher.java:135)
	at jetbrains.mps.smodel.LockRunnable.run(LockRunnable.java:60)
	at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:915)
	at jetbrains.mps.smodel.WorkbenchModelAccess.runWriteAction(WorkbenchModelAccess.java:100)
	at jetbrains.mps.smodel.ModelAccessBase.runWriteAction(ModelAccessBase.java:66)
	at TextGenGen.plugin.plugin.AsyncWriteAction.lambda$execute$1(AsyncWriteAction.java:18)
	at java.base/java.lang.Thread.run(Thread.java:833)

Version 2022.2-beta2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant