Blog

Tuesday, 7 January 2014

Workaround for LESS Compiler in Intellij IDEA 13

After updating IntelliJ Idea to version 13, plugin which compiles LESS files to CSS stopped working, but we've got it working.
If you are using the latest version of Intellij IDEA or others IDE made by JetBrains you have probably the same issue. I couldn't set source/output directory in LESS Profile settings due to following exception:
com.intellij.openapi.fileChooser.FileChooser.chooseFile(Lcom/intellij/openapi/project/Project;Lcom/intellij/openapi/fileChooser/FileChooserDescriptor;Lcom/intellij/openapi/vfs/VirtualFile;)Lcom/intellij/openapi/vfs/VirtualFile;: com.intellij.openapi.fileChooser.FileChooser.chooseFile(Lcom/intellij/openapi/project/Project;Lcom/intellij/openapi/fileChooser/FileChooserDescriptor;Lcom/intellij/openapi/vfs/VirtualFile;)Lcom/intellij/openapi/vfs/VirtualFile;
java.lang.NoSuchMethodError: com.intellij.openapi.fileChooser.FileChooser.chooseFile(Lcom/intellij/openapi/project/Project;Lcom/intellij/openapi/fileChooser/FileChooserDescriptor;Lcom/intellij/openapi/vfs/VirtualFile;)Lcom/intellij/openapi/vfs/VirtualFile;
 at net.andydvorak.intellij.lessc.ui.configurable.LessProfileConfigurableForm.promptForFilePath(LessProfileConfigurableForm.java:234)
 at net.andydvorak.intellij.lessc.ui.configurable.LessProfileConfigurableForm.promptForFilePath(LessProfileConfigurableForm.java:225)
 at net.andydvorak.intellij.lessc.ui.configurable.LessProfileConfigurableForm.addRow(LessProfileConfigurableForm.java:190)
 at net.andydvorak.intellij.lessc.ui.configurable.LessProfileConfigurableForm.access$100(LessProfileConfigurableForm.java:58)
 at net.andydvorak.intellij.lessc.ui.configurable.LessProfileConfigurableForm$3.run(LessProfileConfigurableForm.java:159)
 at net.andydvorak.intellij.lessc.ui.configurable.LessProfileConfigurableForm$3.run(LessProfileConfigurableForm.java:156)
 at com.intellij.ui.ToolbarDecorator$3.doAdd(ToolbarDecorator.java:407)
 at com.intellij.ui.CommonActionsPanel$Buttons.performAction(CommonActionsPanel.java:65)
 at com.intellij.ui.CommonActionsPanel$MyActionButton.actionPerformed(CommonActionsPanel.java:222)
 at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:162)
 at com.intellij.openapi.actionSystem.impl.ActionButton.a(ActionButton.java:170)
 at com.intellij.openapi.actionSystem.impl.ActionButton.a(ActionButton.java:133)
 at com.intellij.openapi.actionSystem.impl.ActionButton.processMouseEvent(ActionButton.java:311)
 at java.awt.Component.processEvent(Component.java:6270)
 at java.awt.Container.processEvent(Container.java:2229)
 at java.awt.Component.dispatchEventImpl(Component.java:4861)
 at java.awt.Container.dispatchEventImpl(Container.java:2287)
 at java.awt.Component.dispatchEvent(Component.java:4687)
 at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
 at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
 at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
 at java.awt.Container.dispatchEventImpl(Container.java:2273)
 at java.awt.Window.dispatchEventImpl(Window.java:2719)
 at java.awt.Component.dispatchEvent(Component.java:4687)
 at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735)
 at java.awt.EventQueue.access$200(EventQueue.java:103)
 at java.awt.EventQueue$3.run(EventQueue.java:694)
 at java.awt.EventQueue$3.run(EventQueue.java:692)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
 at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
 at java.awt.EventQueue$4.run(EventQueue.java:708)
 at java.awt.EventQueue$4.run(EventQueue.java:706)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
 at java.awt.EventQueue.dispatchEvent(EventQueue.java:705)
 at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:696)
 at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:520)
 at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:335)
 at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
 at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
 at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:154)
 at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:182)
 at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:221)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:219)
 at java.awt.Dialog.show(Dialog.java:1082)
 at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:786)
 at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:462)
 at com.intellij.openapi.ui.DialogWrapper.showAndGetOk(DialogWrapper.java:1543)
 at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:1511)
 at com.intellij.ide.actions.ShowSettingsUtilImpl.a(ShowSettingsUtilImpl.java:72)
 at com.intellij.ide.actions.ShowSettingsUtilImpl.showSettingsDialog(ShowSettingsUtilImpl.java:54)
 at com.intellij.ide.actions.ShowSettingsAction.actionPerformed(ShowSettingsAction.java:63)
 at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:162)
 at com.intellij.openapi.actionSystem.impl.ActionButton.a(ActionButton.java:170)
 at com.intellij.openapi.actionSystem.impl.ActionButton.a(ActionButton.java:133)
 at com.intellij.openapi.actionSystem.impl.ActionButton.processMouseEvent(ActionButton.java:311)
 at java.awt.Component.processEvent(Component.java:6270)
 at java.awt.Container.processEvent(Container.java:2229)
 at java.awt.Component.dispatchEventImpl(Component.java:4861)
 at java.awt.Container.dispatchEventImpl(Container.java:2287)
 at java.awt.Component.dispatchEvent(Component.java:4687)
 at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
 at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
 at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
 at java.awt.Container.dispatchEventImpl(Container.java:2273)
 at java.awt.Window.dispatchEventImpl(Window.java:2719)
 at java.awt.Component.dispatchEvent(Component.java:4687)
 at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735)
 at java.awt.EventQueue.access$200(EventQueue.java:103)
 at java.awt.EventQueue$3.run(EventQueue.java:694)
 at java.awt.EventQueue$3.run(EventQueue.java:692)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
 at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
 at java.awt.EventQueue$4.run(EventQueue.java:708)
 at java.awt.EventQueue$4.run(EventQueue.java:706)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
 at java.awt.EventQueue.dispatchEvent(EventQueue.java:705)
 at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:696)
 at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:520)
 at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:335)
 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)
You can use as a temporary solution build from this repo and wait until author of original plugin fixes this in official repository. You need to extract two files from lessc-plugin.zip archive (asual-lesscss-engine-1.0.jar and lessc-plugin.jar) and put them into ~/.IntelliJIdea13/config/plugins/lessc-plugin/lib/ directory. Then restart your IDE and everything should works as you expect it.

No comments:

Post a Comment