Skip to content
Browse files

Clean-up formatter preference access

  • Loading branch information...
1 parent f4712c7 commit f3ed38be708ef77c73bd3af8fbaffab76066634b @mdr mdr committed Apr 9, 2011
Showing with 3 additions and 4 deletions.
  1. +3 −4 org.scala-ide.sdt.core/src/scala/tools/eclipse/ui/ScalaIndenter.scala
View
7 org.scala-ide.sdt.core/src/scala/tools/eclipse/ui/ScalaIndenter.scala
@@ -23,7 +23,8 @@ import java.lang.Math.min
import scala.collection.mutable.Map
import scala.annotation.tailrec
import scala.tools.eclipse.ScalaPlugin
-import scala.tools.eclipse.formatter.FormatterPreferences
+import scala.tools.eclipse.formatter.FormatterPreferences._
+import scalariform.formatter.preferences.IndentSpaces
// TODO Move this out into a new file
trait PreferenceProvider {
@@ -59,10 +60,8 @@ class JdtPreferenceProvider(val project : IJavaProject) extends PreferenceProvid
put(PreferenceConstants.EDITOR_SMART_TAB,
preferenceStore.getBoolean(PreferenceConstants.EDITOR_SMART_TAB).toString)
- // TODO: Matt -- use better pref lookup when merged with formatter-preferences-page branch
val scalaPrefs = ScalaPlugin.plugin.getPreferenceStore
- val key = FormatterPreferences.PREFIX + scalariform.formatter.preferences.IndentSpaces.key
- val indent = scalaPrefs.getInt(key)
+ val indent = scalaPrefs(IndentSpaces)
put(ScalaIndenter.TAB_SIZE, indent.toString)
put(ScalaIndenter.INDENT_SIZE, indent.toString)

0 comments on commit f3ed38b

Please sign in to comment.
Something went wrong with that request. Please try again.