Skip to content

Commit

Permalink
#81: fixes imports
Browse files Browse the repository at this point in the history
  • Loading branch information
rladstaetter committed May 2, 2022
1 parent 0564e2d commit f0173d5
Show file tree
Hide file tree
Showing 33 changed files with 50 additions and 88 deletions.
8 changes: 3 additions & 5 deletions app/src/main/scala/app/logorrr/conf/LogoRRRGlobals.scala
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
package app.logorrr.conf

import app.logorrr.conf.SettingsIO.renderOptions
import app.logorrr.conf.mut.{MutLogFileSettings, MutSettings, MutStageSettings}
import app.logorrr.conf.mut.{MutLogFileSettings, MutSettings}
import app.logorrr.io.{FilePaths, Fs}
import app.logorrr.model.LogFileSettings
import app.logorrr.util.{CanLog, JfxUtils}
import app.logorrr.util.CanLog
import javafx.application.HostServices
import javafx.beans.property.{SimpleListProperty, SimpleMapProperty, SimpleObjectProperty, SimpleStringProperty}
import javafx.collections.FXCollections
import javafx.scene.Scene
import javafx.beans.property.SimpleObjectProperty
import javafx.stage.Window
import pureconfig.ConfigWriter

Expand Down
9 changes: 0 additions & 9 deletions app/src/main/scala/app/logorrr/conf/RecentFileSettings.scala

This file was deleted.

5 changes: 2 additions & 3 deletions app/src/main/scala/app/logorrr/conf/SettingsIO.scala
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
package app.logorrr.conf

import app.logorrr.io.{FilePaths, Fs}
import app.logorrr.model.LogFileSettings
import app.logorrr.io.FilePaths
import app.logorrr.util.CanLog
import com.typesafe.config.ConfigRenderOptions
import pureconfig.{ConfigSource, ConfigWriter}
import pureconfig.ConfigSource

import java.nio.file.Path
import scala.util.{Failure, Success, Try}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package app.logorrr.conf.mut

import app.logorrr.conf.{BlockSettings, StageSettings}
import app.logorrr.conf.BlockSettings
import javafx.beans.property.SimpleIntegerProperty

object MutBlockSettings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package app.logorrr.conf.mut

import app.logorrr.conf.BlockSettings
import app.logorrr.model.{LogEntryInstantFormat, LogFileSettings}
import app.logorrr.views.{Filter, Fltr}
import javafx.beans.property.{SimpleDoubleProperty, SimpleIntegerProperty, SimpleListProperty, SimpleLongProperty, SimpleMapProperty, SimpleObjectProperty, SimpleStringProperty}
import app.logorrr.views.Filter
import javafx.beans.property._
import javafx.collections.FXCollections

import scala.jdk.CollectionConverters._
Expand Down
5 changes: 2 additions & 3 deletions app/src/main/scala/app/logorrr/conf/mut/MutSettings.scala
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package app.logorrr.conf.mut

import app.logorrr.conf.LogoRRRGlobals.settings
import app.logorrr.conf.{Settings, StageSettings}
import app.logorrr.model.LogFileSettings
import javafx.beans.property.{SimpleListProperty, SimpleMapProperty, SimpleObjectProperty, SimpleStringProperty}
import javafx.beans.property.{SimpleMapProperty, SimpleObjectProperty}
import javafx.collections.FXCollections

import java.util
Expand All @@ -17,7 +16,7 @@ object MutSettings {

def apply(settings: Settings): MutSettings = {
val s = new MutSettings
//s.setStageSettings(settings.stageSettings)
s.setStageSettings(settings.stageSettings)
s.setLogFileSettings(settings.logFileSettings)
s.setSomeActive(settings.someActive)
s
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package app.logorrr.conf.mut

import app.logorrr.conf.{LogoRRRGlobals, SettingsIO, StageSettings}
import app.logorrr.conf.{LogoRRRGlobals, StageSettings}
import app.logorrr.util.JfxUtils
import javafx.beans.property.{SimpleDoubleProperty, SimpleIntegerProperty}
import javafx.stage.Window
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/scala/app/logorrr/model/LogEntry.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package app.logorrr.model

import app.logorrr.views.{Filter, Fltr}
import app.logorrr.views.block.BlockView
import app.logorrr.views.{Filter, Fltr}
import javafx.geometry.Insets
import javafx.scene.layout.{Background, BackgroundFill, CornerRadii}
import javafx.scene.paint.Color
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import java.util.stream
import java.util.stream.Collectors
import scala.language.postfixOps
import scala.util.{Failure, Success, Try}
import scala.jdk.CollectionConverters._

object LogFileReader {
def readFromFile(logFile: Path): util.List[String] = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package app.logorrr.model
import app.logorrr.views.SimpleRange
import pureconfig.generic.semiauto.{deriveReader, deriveWriter}

import java.time.{Instant, LocalDateTime, ZoneId, ZoneOffset}
import java.time.format.DateTimeFormatter
import java.time.{Instant, LocalDateTime, ZoneId, ZoneOffset}
import scala.util.Try

object LogEntryInstantFormat {
Expand Down
5 changes: 3 additions & 2 deletions app/src/main/scala/app/logorrr/model/LogFileSettings.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package app.logorrr.model

import app.logorrr.conf.BlockSettings
import app.logorrr.util.CanLog
import app.logorrr.views.{Filter, Fltr}
import app.logorrr.views.Filter
import javafx.collections.{FXCollections, ObservableList}
import javafx.scene.paint.Color
import pureconfig.generic.semiauto.{deriveReader, deriveWriter}
Expand All @@ -18,7 +18,8 @@ object LogFileSettings {

val DefaultDividerPosition = 0.5
val DefaultBlockSettings = BlockSettings(10)
val DefaultLogFormat: Option[LogEntryInstantFormat] = Option(LogEntryInstantFormat.Default)
//val DefaultLogFormat: Option[LogEntryInstantFormat] = Option(LogEntryInstantFormat.Default)
val DefaultLogFormat: Option[LogEntryInstantFormat] = None

val finest: Filter = new Filter("FINEST", Color.GREY.toString)
val info: Filter = new Filter("INFO", Color.GREEN.toString)
Expand Down
1 change: 0 additions & 1 deletion app/src/main/scala/app/logorrr/util/HLink.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package app.logorrr.util

import app.logorrr.conf.LogoRRRGlobals
import javafx.application.HostServices
import javafx.scene.control.Hyperlink

import java.net.URL
Expand Down
2 changes: 0 additions & 2 deletions app/src/main/scala/app/logorrr/util/LogEntryListener.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import javafx.collections.ObservableList
import javafx.scene.paint.Color
import org.apache.commons.io.input.{Tailer, TailerListener}

import java.time.Instant

/**
* Inform observable list about events from Tailer.
*
Expand Down
1 change: 0 additions & 1 deletion app/src/main/scala/app/logorrr/views/Fltr.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package app.logorrr.views

import app.logorrr.views.Filter.{ExistsMatcher, LMatcher, NotExistsMatcher}
import javafx.scene.paint.Color
import pureconfig.generic.semiauto.{deriveReader, deriveWriter}



Expand Down
11 changes: 4 additions & 7 deletions app/src/main/scala/app/logorrr/views/LogFileTab.scala
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
package app.logorrr.views

import app.logorrr.conf.{BlockSettings, LogoRRRGlobals, Settings, SettingsIO}
import app.logorrr.model.{LogEntry, LogEntryFileReader, LogFileSettings}
import app.logorrr.conf.{BlockSettings, LogoRRRGlobals}
import app.logorrr.model.LogEntry
import app.logorrr.util._
import app.logorrr.views.visual.LogVisualView
import javafx.application.HostServices
import javafx.beans.binding.{Bindings, StringExpression}
import javafx.beans.property.{SimpleBooleanProperty, SimpleIntegerProperty, SimpleListProperty, SimpleObjectProperty}
import javafx.beans.property.{SimpleListProperty, SimpleObjectProperty}
import javafx.beans.value.ChangeListener
import javafx.beans.{InvalidationListener, Observable}
import javafx.collections.{ListChangeListener, ObservableList}
import javafx.collections.transformation.FilteredList
import javafx.collections.{ListChangeListener, ObservableList}
import javafx.scene.control._
import javafx.scene.layout._
import org.apache.commons.io.input.Tailer

import java.nio.file.Paths
import java.time.Instant
import java.util.function.UnaryOperator
import java.util.stream.Collectors
import scala.collection.mutable
import scala.concurrent.ExecutionContext.Implicits.global
Expand Down
7 changes: 2 additions & 5 deletions app/src/main/scala/app/logorrr/views/LogoRRRMainTabPane.scala
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
package app.logorrr.views

import app.logorrr.conf.{LogoRRRGlobals, SettingsIO}
import app.logorrr.model.{LogEntry, LogEntryFileReader, LogFileSettings}
import app.logorrr.conf.LogoRRRGlobals
import app.logorrr.model.LogEntry
import app.logorrr.util.{CanLog, JfxUtils}
import app.logorrr.views.main.LogoRRRMainBorderPane
import javafx.application.HostServices
import javafx.beans.property.SimpleIntegerProperty
import javafx.collections.ObservableList
import javafx.scene.control.{Tab, TabPane}

import java.nio.file.{Files, Path, Paths}
import scala.collection.mutable
import scala.jdk.CollectionConverters._
import scala.util.{Failure, Success, Try}

object LogoRRRMainTabPane {

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/scala/app/logorrr/views/OpsBorderPane.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package app.logorrr.views

import app.logorrr.views.block.{HasBlockSizeProperty, RectButton}
import javafx.beans.property.{SimpleDoubleProperty, SimpleIntegerProperty}
import javafx.beans.property.SimpleIntegerProperty
import javafx.geometry.Pos
import javafx.scene.control.{Control, ToolBar}
import javafx.scene.layout.BorderPane
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package app.logorrr.views

import app.logorrr.conf.LogoRRRGlobals
import app.logorrr.model.{LogEntryInstantFormat, LogFileSettings}
import app.logorrr.model.LogEntryInstantFormat
import app.logorrr.util.HLink
import javafx.application.HostServices
import javafx.scene.control._
import javafx.scene.layout.BorderPane

Expand Down
4 changes: 1 addition & 3 deletions app/src/main/scala/app/logorrr/views/SettingsToolBar.scala
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
package app.logorrr.views

import app.logorrr.conf.{LogoRRRGlobals, SettingsIO}
import app.logorrr.model.{LogEntryInstantFormat, LogFileSettings}
import app.logorrr.model.LogEntryInstantFormat
import app.logorrr.util.JfxUtils
import javafx.application.HostServices
import javafx.scene.Scene
import javafx.scene.control.{Button, ToolBar}
import javafx.stage.{Modality, Stage}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package app.logorrr.views.about

import app.logorrr.meta.AppMeta
import app.logorrr.util.{HLink, ImageCp, LogoRRRFonts}
import javafx.application.HostServices
import javafx.geometry.Insets
import javafx.scene.control._
import javafx.scene.image.ImageView
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/scala/app/logorrr/views/block/BlockView.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package app.logorrr.views.block

import app.logorrr.util.{CanLog, JfxUtils}
import javafx.beans.property.{ReadOnlyDoubleProperty, SimpleDoubleProperty, SimpleIntegerProperty, SimpleListProperty, SimpleObjectProperty}
import javafx.beans.property.{ReadOnlyDoubleProperty, SimpleIntegerProperty, SimpleListProperty, SimpleObjectProperty}
import javafx.beans.value.ChangeListener
import javafx.collections.FXCollections
import javafx.event.EventHandler
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
package app.logorrr.views.block

import app.logorrr.util.{CanLog, JfxUtils}
import javafx.beans.property.{SimpleDoubleProperty, SimpleIntegerProperty, SimpleListProperty, SimpleObjectProperty}
import javafx.beans.{InvalidationListener, Observable}
import javafx.beans.property.{SimpleIntegerProperty, SimpleListProperty, SimpleObjectProperty}
import javafx.collections.{FXCollections, ListChangeListener, ObservableList}
import javafx.event.{ActionEvent, EventHandler}
import javafx.geometry.{Insets, Orientation}
import javafx.scene.control._
import javafx.scene.input.{KeyCode, KeyEvent}
import javafx.scene.layout.{Border, BorderPane, BorderStroke, VBox}
import javafx.scene.layout.VBox
import javafx.scene.paint.Color

import scala.collection.mutable.ListBuffer
Expand All @@ -33,7 +31,7 @@ class BlockViewPane[Elem <: BlockView.E]
with HasBlockSizeProperty
with CanLog {

override val blockSizeProperty: SimpleIntegerProperty = {
override val blockSizeProperty: SimpleIntegerProperty = {
val p = new SimpleIntegerProperty()
p.addListener(_ => repaint())
p
Expand Down
5 changes: 2 additions & 3 deletions app/src/main/scala/app/logorrr/views/main/LogoRRRMain.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@ package app.logorrr.views.main
import app.logorrr.conf.{LogoRRRGlobals, Settings}
import app.logorrr.model.{LogEntry, LogFileSettings}
import app.logorrr.util.{CanLog, JfxUtils}
import javafx.collections.{FXCollections, ObservableList}
import javafx.collections.FXCollections
import javafx.scene.layout.BorderPane

import java.nio.file.{Path, Paths}
import java.nio.file.Path
import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.Future
import scala.util.{Failure, Success}

class LogoRRRMain(closeStage: => Unit
, settings: Settings) extends BorderPane
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
package app.logorrr.views.main

import app.logorrr.conf.{LogoRRRGlobals, SettingsIO, StageSettings}
import app.logorrr.conf.LogoRRRGlobals
import app.logorrr.model.{LogEntry, LogFileSettings}
import app.logorrr.util.CanLog
import app.logorrr.views.{Filter, Fltr, LogoRRRMainTabPane}
import javafx.application.HostServices
import app.logorrr.views.LogoRRRMainTabPane
import javafx.beans.property.SimpleIntegerProperty
import javafx.collections.ObservableList
import javafx.scene.input.{DragEvent, TransferMode}
import javafx.scene.layout.BorderPane

import java.nio.file.{Files, Path}
import java.nio.file.Files
import scala.jdk.CollectionConverters.ListHasAsScala


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package app.logorrr.views.main
import app.logorrr.model.LogFileSettings
import app.logorrr.util.{CanLog, OsUtil}
import app.logorrr.views.menubar.{FileMenu, HelpMenu}
import javafx.application.HostServices
import javafx.scene.control.MenuBar

import java.nio.file.Path
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package app.logorrr.views.main

import app.logorrr.conf.{LogoRRRGlobals, Settings}
import app.logorrr.conf.mut.MutStageSettings
import app.logorrr.conf.{LogoRRRGlobals, Settings}
import app.logorrr.meta.AppMeta
import app.logorrr.util.JfxUtils
import app.logorrr.views.LogoRRRAccelerators
Expand Down
5 changes: 2 additions & 3 deletions app/src/main/scala/app/logorrr/views/menubar/FileMenu.scala
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
package app.logorrr.views.menubar

import app.logorrr.model
import app.logorrr.model.{LogEntry, LogFileSettings}
import app.logorrr.model.LogFileSettings
import app.logorrr.util.{CanLog, LogoRRRFileChooser, OsUtil}
import javafx.scene.control.{Menu, MenuItem}

import java.nio.file.{Files, Path}
import java.nio.file.Path

object FileMenu {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package app.logorrr.views.menubar
import app.logorrr.meta.AppMeta
import app.logorrr.views.about.AboutScreen
import app.logorrr.views.menubar.HelpMenu.AboutMenuItem
import javafx.application.HostServices
import javafx.scene.Scene
import javafx.scene.control.{Menu, MenuItem}
import javafx.stage.{Modality, Stage}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package app.logorrr.conf.mut

import app.logorrr.conf.Settings
import app.logorrr.conf.{Settings, StageSettings}
import org.scalacheck.Prop
import org.scalatest.wordspec.AnyWordSpec
import org.scalatestplus.scalacheck.Checkers
Expand All @@ -9,6 +9,10 @@ import org.scalatestplus.scalacheck.Checkers
class MutSettingsSpec extends AnyWordSpec with Checkers {

"MutSettings" should {
"dese" in {
val s = Settings(StageSettings(0.15142984837327833,0.5216122226307276,1,1),Map(),None)
assert(s == MutSettings(s).petrify())
}
"de/serialize" in {
check(Prop.forAll(SettingsSpec.gen) {
expected: Settings => expected == MutSettings(MutSettings(expected).petrify()).petrify()
Expand Down
Loading

0 comments on commit f0173d5

Please sign in to comment.