0

Multiline text editor in MPS (de.slisson.mps.editor.multiline)

Hello everyone :).
I'm trying to use multi-line editor as mentioned by MPS Hero Markus Voelter here: http://www.youtube.com/watch?v=Y96HU44FjZ4 .

I installed the relevant MPS plugin.

Now I'm trying to enrich my concept editor with the multi-line editing.

I'm not sure how it should be used...

I've tried through cell provider:
         
Custom cell:            
cell provider (editorContext, node)->AbstractCellProvider {
    new MultilineCellProvider(node, editorContext);
}

Nothing new seems to show while actually editing my concept instances.
And how do I specify which property/role it should use?

Any help greatly appreciated!


I also got this exception:

<null>
java.lang.NullPointerException
java.lang.NullPointerException
 at java.util.concurrent.ConcurrentHashMap.hash(ConcurrentHashMap.java:333)
 at java.util.concurrent.ConcurrentHashMap.containsKey(ConcurrentHashMap.java:1016)
 at jetbrains.mps.smodel.runtime.base.BaseConstraintsDescriptor.getProperty(BaseConstraintsDescriptor.java:224)
 at jetbrains.mps.smodel.SNodeAccessUtilImpl.getPropertyImpl(SNodeAccessUtilImpl.java:58)
 at org.jetbrains.mps.openapi.model.SNodeAccessUtil.getProperty(SNodeAccessUtil.java:35)
 at jetbrains.mps.nodeEditor.cells.PropertyAccessor$1.compute(PropertyAccessor.java:92)
 at jetbrains.mps.nodeEditor.cells.PropertyAccessor$1.compute(PropertyAccessor.java:86)
 at jetbrains.mps.smodel.NodeReadAccessCasterInEditor.runCleanPropertyAccessAction(NodeReadAccessCasterInEditor.java:115)
 at jetbrains.mps.nodeEditor.cells.PropertyAccessor.doGetValue(PropertyAccessor.java:86)
 at jetbrains.mps.nodeEditor.cells.PropertyAccessor.getText(PropertyAccessor.java:69)
 at de.slisson.mps.editor.multiline.cells.EditorCell_Multiline.<init>(Unknown Source)
 at de.slisson.mps.editor.multiline.cells.EditorCell_Multiline.create(Unknown Source)
 at de.slisson.mps.editor.multiline.cellProviders.MultilineCellProvider.createEditorCell(Unknown Source)
 at ProteinLang.editor.StringField_Editor.createCustom_e1wy3l_d0(StringField_Editor.java:312)
 at ProteinLang.editor.StringField_Editor.createCollection_e1wy3l_a(StringField_Editor.java:35)
 at ProteinLang.editor.StringField_Editor.createEditorCell(StringField_Editor.java:25)
 at jetbrains.mps.nodeEditor.cells.EditorCellFactoryImpl.createEditorCell(EditorCellFactoryImpl.java:75)
 at jetbrains.mps.nodeEditor.EditorManager.createEditorCell_internal(EditorManager.java:417)
 at jetbrains.mps.nodeEditor.EditorManager.createEditorCell(EditorManager.java:374)
 at jetbrains.mps.nodeEditor.EditorContext.createNodeCell(EditorContext.java:161)
 at jetbrains.mps.nodeEditor.EditorContext.createNodeCell(EditorContext.java:202)
 at jetbrains.mps.lang.editor.cellProviders.RefNodeListHandler.createNodeCell(RefNodeListHandler.java:86)
 at jetbrains.mps.lang.editor.cellProviders.RefNodeListHandler.createNodeCell(RefNodeListHandler.java:74)
 at jetbrains.mps.nodeEditor.DefaultEditor$ListHandler.createNodeCell(DefaultEditor.java:478)
 at jetbrains.mps.nodeEditor.cellProviders.AbstractCellListHandler.createInnerCells(AbstractCellListHandler.java:195)
 at jetbrains.mps.nodeEditor.cellProviders.AbstractCellListHandler.createCells(AbstractCellListHandler.java:175)
 at jetbrains.mps.nodeEditor.cellProviders.AbstractCellListHandler.createCells(AbstractCellListHandler.java:158)
 at jetbrains.mps.nodeEditor.DefaultEditor.addChildCellForNonNullConcept(DefaultEditor.java:336)
 at jetbrains.mps.nodeEditor.DefaultEditor.addChildren(DefaultEditor.java:326)
 at jetbrains.mps.nodeEditor.DefaultEditor.addPropertiesAndChildren(DefaultEditor.java:121)
 at jetbrains.mps.nodeEditor.DefaultEditor.createEditorCell(DefaultEditor.java:98)
 at jetbrains.mps.nodeEditor.cells.EditorCellFactoryImpl.createEditorCell(EditorCellFactoryImpl.java:87)
 at jetbrains.mps.nodeEditor.EditorManager.createEditorCell_internal(EditorManager.java:417)
 at jetbrains.mps.nodeEditor.EditorManager.createEditorCell(EditorManager.java:374)
 at jetbrains.mps.nodeEditor.EditorContext.createNodeCell(EditorContext.java:161)
 at jetbrains.mps.nodeEditor.EditorContext.createNodeCell(EditorContext.java:202)
 at jetbrains.mps.nodeEditor.EditorContext.createNodeCell(EditorContext.java:58)
 at jetbrains.mps.lang.editor.cellProviders.RefNodeCellProvider.createRefCell(RefNodeCellProvider.java:36)
 at jetbrains.mps.lang.editor.cellProviders.AbstractReferentCellProvider.createCell_internal(AbstractReferentCellProvider.java:145)
 at jetbrains.mps.lang.editor.cellProviders.AbstractReferentCellProvider.createEditorCell(AbstractReferentCellProvider.java:101)
 at jetbrains.mps.nodeEditor.DefaultEditor.addChildCellForNonNullConcept(DefaultEditor.java:344)
 at jetbrains.mps.nodeEditor.DefaultEditor.addChildren(DefaultEditor.java:326)
 at jetbrains.mps.nodeEditor.DefaultEditor.addPropertiesAndChildren(DefaultEditor.java:121)
 at jetbrains.mps.nodeEditor.DefaultEditor.createEditorCell(DefaultEditor.java:98)
 at jetbrains.mps.nodeEditor.cells.EditorCellFactoryImpl.createEditorCell(EditorCellFactoryImpl.java:87)
 at jetbrains.mps.nodeEditor.EditorManager.createEditorCell_internal(EditorManager.java:417)
 at jetbrains.mps.nodeEditor.EditorManager.createEditorCell(EditorManager.java:374)
 at jetbrains.mps.nodeEditor.EditorManager.createRootCell(EditorManager.java:161)
 at jetbrains.mps.nodeEditor.EditorManager.createRootCell(EditorManager.java:134)
 at jetbrains.mps.nodeEditor.EditorContext.createRootCell(EditorContext.java:167)
 at jetbrains.mps.nodeEditor.NodeEditorComponent.createRootCell(NodeEditorComponent.java:128)
 at jetbrains.mps.nodeEditor.EditorComponent$33$1.run(EditorComponent.java:1902)
 at jetbrains.mps.nodeEditor.EditorComponent.runSwapCellsActions(EditorComponent.java:2863)
 at jetbrains.mps.nodeEditor.EditorComponent.access$3400(EditorComponent.java:219)
 at jetbrains.mps.nodeEditor.EditorComponent$33.run(EditorComponent.java:1898)
 at jetbrains.mps.ide.smodel.WorkbenchModelAccess.runReadAction(WorkbenchModelAccess.java:105)
 at jetbrains.mps.project.ProjectRepository$ProjectModelAccess.runReadAction(ProjectRepository.java:99)
 at jetbrains.mps.nodeEditor.EditorComponent.rebuildEditorContent(EditorComponent.java:1880)
 at jetbrains.mps.nodeEditor.EditorComponent.handleEvents(EditorComponent.java:3006)
 at jetbrains.mps.nodeEditor.EditorComponent.access$4600(EditorComponent.java:219)
 at jetbrains.mps.nodeEditor.EditorComponent$MyEventsCollector.eventsHappened(EditorComponent.java:3345)
 at jetbrains.mps.smodel.EventsCollector$2.run(EventsCollector.java:203)
 at jetbrains.mps.ide.smodel.WorkbenchModelAccess.runWriteAction(WorkbenchModelAccess.java:148)
 at jetbrains.mps.smodel.EventsCollector.flush(EventsCollector.java:198)
 at jetbrains.mps.smodel.EventsCollector$MyModelAccessAdapter.commandFinished(EventsCollector.java:243)
 at jetbrains.mps.ide.smodel.WorkbenchModelAccess.onCommandFinished(WorkbenchModelAccess.java:793)
 at jetbrains.mps.ide.smodel.WorkbenchModelAccess.decCommandLevel(WorkbenchModelAccess.java:750)
 at jetbrains.mps.ide.smodel.WorkbenchModelAccess.access$2900(WorkbenchModelAccess.java:55)
 at jetbrains.mps.ide.smodel.WorkbenchModelAccess$CommandRunnable$1.run(WorkbenchModelAccess.java:833)
 at jetbrains.mps.ide.smodel.WorkbenchModelAccess$4.run(WorkbenchModelAccess.java:161)
 at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:1013)
 at jetbrains.mps.ide.smodel.WorkbenchModelAccess.runWriteAction(WorkbenchModelAccess.java:168)
 at jetbrains.mps.ide.smodel.WorkbenchModelAccess$CommandRunnable.run(WorkbenchModelAccess.java:826)
 at com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java:124)
 at com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java:99)
 at jetbrains.mps.ide.smodel.WorkbenchModelAccess.runWriteActionInCommand(WorkbenchModelAccess.java:637)
 at jetbrains.mps.ide.smodel.WorkbenchModelAccess.runWriteActionInCommand(WorkbenchModelAccess.java:632)
 at jetbrains.mps.project.ProjectRepository$ProjectModelAccess.executeCommand(ProjectRepository.java:119)
 at jetbrains.mps.nodeEditor.EditorComponent.executeCommand(EditorComponent.java:2577)
 at jetbrains.mps.nodeEditor.EditorContext.executeCommand(EditorContext.java:447)
 at jetbrains.mps.nodeEditor.actions.ActionHandlerImpl.executeAction(ActionHandlerImpl.java:52)
 at jetbrains.mps.nodeEditor.actions.ActionHandlerImpl.executeAction(ActionHandlerImpl.java:42)
 at jetbrains.mps.ide.editor.actions.EditorActionUtils.callInsertAction(EditorActionUtils.java:78)
 at jetbrains.mps.ide.editor.actions.Insert_Action.doExecute(Insert_Action.java:71)
 at jetbrains.mps.workbench.action.BaseAction.actionPerformed(BaseAction.java:138)
 at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher$3.performAction(IdeKeyEventDispatcher.java:564)
 at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:611)
 at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.inInitState(IdeKeyEventDispatcher.java:463)
 at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.dispatchKeyEvent(IdeKeyEventDispatcher.java:206)
 at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:480)
 at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:334)
 at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
 at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
 at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
 at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
 at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
 at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

10 comments

Please sign in to leave a comment.