Skip to content

Commit

Permalink
Remove o.s.u.ui.SWTUtils
Browse files Browse the repository at this point in the history
This is a duplicate of `o.s.u.eclipse.SWTUtils`.

Fixes #1002288
  • Loading branch information
kiritsuku committed Nov 7, 2014
1 parent eb9ae0c commit e853928
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 28 deletions.
Expand Up @@ -9,8 +9,7 @@ import org.scalaide.core.IScalaPlugin
import org.scalaide.ui.syntax.ScalaSyntaxClasses
import org.scalaide.ui.syntax.ScalaSyntaxClasses._
import org.scalaide.ui.syntax.preferences.BaseSyntaxColoringPreferencePage
import org.scalaide.util.eclipse.SWTUtils.noArgFnToSelectionAdapter
import org.scalaide.util.ui.SWTUtils.gridData
import org.scalaide.util.eclipse.SWTUtils._
import org.scalaide.core.internal.decorators.semantichighlighting.Position
import scalariform.lexer.ScalaLexer
import org.scalaide.core.internal.decorators.semantichighlighting.classifier.SymbolTypes
Expand All @@ -24,8 +23,6 @@ class SyntaxColoringPreferencePage extends BaseSyntaxColoringPreferencePage(
SyntaxColoringPreferencePage.PreviewText,
SemanticPreviewerFactoryConfiguration) {

import org.scalaide.util.ui.SWTUtils._

private var enableSemanticHighlightingCheckBox: Button = _
private var extraAccuracyCheckBox: Button = _
private var strikethroughDeprecatedCheckBox: Button = _
Expand Down
Expand Up @@ -23,7 +23,6 @@ import org.scalaide.ui.syntax.ScalaSyntaxClass.Category
import org.scalaide.ui.syntax.ScalaSyntaxClasses
import org.scalaide.util.eclipse.EclipseUtils._
import org.scalaide.util.eclipse.SWTUtils._
import org.scalaide.util.ui.SWTUtils.gridData
import org.scalaide.ui.internal.preferences.PreviewerFactory

/** Base class to create a syntax coloring preference page.
Expand Down Expand Up @@ -54,8 +53,6 @@ abstract class BaseSyntaxColoringPreferencePage(categories: List[ScalaSyntaxClas
*/
def additionalPerformDefaults() {}

import org.scalaide.util.ui.SWTUtils._

setPreferenceStore(preferenceStore)
protected val overlayStore = makeOverlayPreferenceStore
private val previewerFactory = new PreviewerFactory(previewerFactoryConfiguration)
Expand Down
Expand Up @@ -3,7 +3,9 @@ package org.scalaide.util.eclipse
import org.eclipse.jface.preference._
import org.eclipse.jface.util._
import org.eclipse.jface.viewers._
import org.eclipse.swt.SWT
import org.eclipse.swt.events._
import org.eclipse.swt.layout._
import org.eclipse.swt.widgets._
import org.scalaide.util.ui.DisplayThread
import org.eclipse.ui.PlatformUI
Expand Down Expand Up @@ -165,4 +167,17 @@ object SWTUtils {
getChangeControl(parent) addSelectionListener { (e: SelectionEvent) => f(e) }
}

/** Returns a [[GridData]] configuration, with the given properties.
*
* The possible values for alignment are: [[SWT.BEGINNING]], [[SWT.CENTER]], [[SWT.END]], [[SWT.FILL]]
*/
def gridData(
horizontalAlignment: Int = SWT.BEGINNING,
verticalAlignment: Int = SWT.CENTER,
grabExcessHorizontalSpace: Boolean = false,
grabExcessVerticalSpace: Boolean = false,
horizontalSpan: Int = 1,
verticalSpan: Int = 1): GridData =
new GridData(horizontalAlignment, verticalAlignment, grabExcessHorizontalSpace, grabExcessVerticalSpace, horizontalSpan, verticalSpan)

}
21 changes: 0 additions & 21 deletions org.scala-ide.sdt.core/src/org/scalaide/util/ui/SWTUtils.scala

This file was deleted.

0 comments on commit e853928

Please sign in to comment.