FxLanguage not as singleton in guice but as constant somewhere

Sad for haveing to backtrackWhen I moved over to use Guice instead of just static singletons I already knew I was going to have to still use those static singletons in some instances. Today I discovered I will have to use it for the Language object. It seems even if you create it outside of the Host IDEA. The Langauge class you inherit from still prohibits you to create more then one with the same name anyway. (I was trying to just go new FxLangauge() in my unit test and since the Tokens already created a instance it all went haywire). So I moved it to a constant on FxLanguage.INSTANCE. I still think it’s better then the way the examples are done with for instance GroovyFileType.LANGUAGE. I think there might be more places where I will have to do this and then so be it. I’m still going to be on the lookout if there’s another way to solve it.

0 Responses to “FxLanguage not as singleton in guice but as constant somewhere”



  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s





Follow

Get every new post delivered to your Inbox.