how to add config file in scala-eclipse

193 views
Skip to first unread message

Bill Turner

unread,
Oct 20, 2014, 8:42:39 AM10/20/14
to scalasty...@googlegroups.com
This should be a no-brainer, but... I have what I believe to be the latest Scala-eclipse - I downloaded it just before the start of the Coursera class FP in Scala began a few weeks ago. I recently installed the scala-style plugin. Then, downloaded the config file to my workspace. When I go to preferences, I do not see the file. I have tried selecting "add" and it still does not show up. I moved the config into a project, navigated into the project and it still does not show. What am I missing?

Bill Turner

unread,
Oct 21, 2014, 9:24:35 PM10/21/14
to scalasty...@googlegroups.com
So, the scala-ide site states the following:

After installing the plugin one needs to add the Scalastyle configuration of the Scala IDE. This can easily be done in Window Preferences Scalastyle Browse/Add, where the configuration can be found at <path-to-scala-ide>/org.scala-ide.sdt.core/scala-ide-style-config.xml. The Scalastyle builder is already added to all projects that should be checked, thus no further configuration is required.

However, since the page I am referencing is about the scala-ide plugin, perhaps there is not such path as <path-to-scala-ide>/org.scala-ide.sdt.core/. At least not that I can find (I installed scala-eclipse, not the plugin). Still, my question remains, why doesn't the "add" feature work? Should I create new and copy and paste the downloaded scala-style-config? This seems to force me to create one in each project, not a global config. It is not very DRY to have multiple copies of the config, one for each project, when they would all be the same.

Matthew Farwell

unread,
Oct 22, 2014, 4:26:05 AM10/22/14
to scalasty...@googlegroups.com
Did you add the scalastyle-config.xml into your project? If so, you may need to refresh the project - Select the project in the project/package explorer and press F5 ( or Refresh when you right click). Then the file should appear as an option in the Windows -> Preferences.

Once you've added the file in WIndows -> Preferences, go to the project properties (Right click on the project, select Properties) and make sure the scalastyle settings are correct there. Then at the next compile, you should start getting errors.

Thanks.

Matthew Farwell.

--
Vous recevez ce message, car vous êtes abonné au groupe Google Groupes "Scalastyle users".
Pour vous désabonner de ce groupe et ne plus recevoir d'e-mails le concernant, envoyez un e-mail à l'adresse scalastyle-use...@googlegroups.com.
Pour envoyer un message à ce groupe, envoyez un e-mail à l'adresse scalasty...@googlegroups.com.
Visitez ce groupe à l'adresse http://groups.google.com/group/scalastyle-users.
Pour obtenir davantage d'options, consultez la page https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages