Classloader problems with Typescript?

Answered

I am trying to access a Typescript file living in the same project with my DSL.

I am able to access it by doing this crazy thing:

((JSFileImpl) me.getContainingFile().getParent().getParent().getParent().getParent().getChildren()[10].getChildren()[2].getChildren()[21].getChildren()[2]).getFileType().getClass()

That returns  `class com.intellij.lang.javascript.TypeScriptFileType`, as it should.

However, when I try to do

Class.forName("com.intellij.lang.javascript.TypeScriptFileType")

I get

"Method threw 'java.lang.ClassNotFoundException' exception."

However, IntelliJ does not paint it red:

 

Help!

Thank you,

Irina

 

0
2 comments

Do you have the javascript dependency in your plugin.xml? <depends>JavaScript</depends> 

0

LOL, thank you! That took care of it.

0

Please sign in to leave a comment.