what does mps.LanguageLibrary tag mean in plugin.xml

hi
i am developing a Project Component for my Project and when i try to deploy it ,i am getting class not found excpetion. So can you please help me in this aspect .Thanks in advance
In my plugin.xml
i have written like this
<extensions defaultExtensionNs="com.intellij">
    <mps.LanguageLibrary dir="/" />
  </extensions>
  <project-components>
    <component>
      <implementation-class>com.plugin.loader.component.projectcomponent.ProjectLoaderComponent
          </implementation-class>
    </component>
  </project-components>
This is the error message after i deploy the plugin.
java.lang.ClassNotFoundException: com.plugin.loader.component.projectcomponent.ProjectLoaderComponentPluginClassLoader[com.plugin.loader, 1.0]
java.lang.ClassNotFoundException: com.plugin.loader.component.projectcomponent.ProjectLoaderComponentPluginClassLoader[com.plugin.loader, 1.0]
 at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:68)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
 at java.lang.Class.forName0(Native Method)
 at java.lang.Class.forName(Class.java:270)
 at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentsRegistry.loadClasses(ComponentManagerImpl.java:408)
 at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentsRegistry.loadClasses(ComponentManagerImpl.java:398)
 at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentsRegistry.access$000(ComponentManagerImpl.java:384)
 at com.intellij.openapi.components.impl.ComponentManagerImpl.createComponents(ComponentManagerImpl.java:107)
 at com.intellij.openapi.components.impl.ComponentManagerImpl.init(ComponentManagerImpl.java:89)
 at com.intellij.openapi.project.impl.ProjectImpl.init(ProjectImpl.java:296)
 at com.intellij.openapi.project.impl.ProjectManagerImpl.initProject(ProjectManagerImpl.java:281)
 at com.intellij.openapi.project.impl.ProjectManagerImpl.access$300(ProjectManagerImpl.java:83)
 at com.intellij.openapi.project.impl.ProjectManagerImpl$9.compute(ProjectManagerImpl.java:569)
 at com.intellij.openapi.project.impl.ProjectManagerImpl$9.compute(ProjectManagerImpl.java:565)
 at com.intellij.openapi.progress.impl.ProgressManagerImpl$4.run(ProgressManagerImpl.java:240)
 at com.intellij.openapi.progress.impl.ProgressManagerImpl$TaskRunnable.run(ProgressManagerImpl.java:464)
 at com.intellij.openapi.progress.impl.ProgressManagerImpl$6.run(ProgressManagerImpl.java:274)
 at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:178)
 at com.intellij.openapi.progress.ProgressManager.executeProcessUnderProgress(ProgressManager.java:209)
 at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:212)
 at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:171)
 at com.intellij.openapi.application.impl.ApplicationImpl$10$1.run(ApplicationImpl.java:645)
 at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:419)
 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
 at java.util.concurrent.FutureTask.run(FutureTask.java:262)
 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
 at java.lang.Thread.run(Thread.java:745)
0
3 comments
Hi mps_beginner!
Regarding mps.LanguageLibrary, it specifies relative path to where modules will be searched for. It is relative to plugin root. That dir will be scanned and modules loaded into repository. So, in your case it's "/" which means the whole of plugin dir. So, all the modules you drop into plugin dir should be picked up.
Regarding the exception. If you look into your plugin directory (not the source, but the deployed bundle), can you find the class there? If yes, where is it?
0
Hi Daniil,

How about <mps.LanguageLibrary dir=""/>. Does it means it will not scan any of directory or it will just scan any default dir. I understand it will scan lib directory?Please suggest

Thanks
0
Hi Kunal
No, it would mean the same as "/" – the root of plugin dir.
For reference, see class PluginLibrariesContributor
   String libraryPath = pluginPath + library.dir;

where library.dir is exactly that xml argument
0

Please sign in to leave a comment.