Skip to content
Permalink
Browse files

Kotlin 1.3.40

  • Loading branch information...
ingokegel committed Jun 20, 2019
1 parent e0062ce commit 5310bca19faa8621d0d10eeb52cae0bcac3dfdd4
@@ -21,11 +21,13 @@
<w>bintray</w>
<w>bipush</w>
<w>bootstrapmethod</w>
<w>bytecode</w>
<w>caload</w>
<w>carreira</w>
<w>castore</w>
<w>checkcast</w>
<w>classfile</w>
<w>clinit</w>
<w>cpinfo</w>
<w>cpool</w>
<w>dadd</w>
@@ -65,9 +67,13 @@
<w>freturn</w>
<w>fstore</w>
<w>fsub</w>
<w>gapleft</w>
<w>gapright</w>
<w>gapy</w>
<w>getfield</w>
<w>getstatic</w>
<w>gridy</w>
<w>growx</w>
<w>hotfix</w>
<w>httpcomponents</w>
<w>iadd</w>
@@ -81,6 +87,7 @@
<w>icmple</w>
<w>icmplt</w>
<w>icmpne</w>
<w>iconexperience</w>
<w>iconified</w>
<w>iconst</w>
<w>idiv</w>
@@ -97,9 +104,12 @@
<w>iload</w>
<w>impdep</w>
<w>imul</w>
<w>incors</w>
<w>ineg</w>
<w>ingo</w>
<w>ingokegel</w>
<w>instanceof</w>
<w>invokedynamic</w>
<w>invokeinterface</w>
<w>invokespecial</w>
<w>invokestatic</w>
@@ -113,8 +123,10 @@
<w>iushr</w>
<w>ixor</w>
<w>jcenter</w>
<w>jclasslib</w>
<w>jfrog</w>
<w>jvms</w>
<w>kegel</w>
<w>kotlinx</w>
<w>ladd</w>
<w>laload</w>
@@ -142,20 +154,25 @@
<w>monitorexit</w>
<w>multianewarray</w>
<w>newarray</w>
<w>nogrid</w>
<w>opcodes</w>
<w>putfield</w>
<w>putstatic</w>
<w>redistributors</w>
<w>resetter</w>
<w>saload</w>
<w>sastore</w>
<w>scroller</w>
<w>shrinkprio</w>
<w>sipush</w>
<w>sourcefile</w>
<w>spanx</w>
<w>splitup</w>
<w>supertype</w>
<w>tableswitch</w>
<w>targettype</w>
<w>typeannotation</w>
<w>unrel</w>
<w>vetoable</w>
<w>vitor</w>
</words>
@@ -1 +1 @@
kotlinVersion=1.3.30
kotlinVersion=1.3.40
@@ -36,6 +36,8 @@ import javax.swing.*
import javax.swing.event.PopupMenuEvent
import javax.swing.event.PopupMenuListener
import javax.xml.transform.OutputKeys
import kotlin.math.max
import kotlin.math.min

class BrowserFrame : JFrame() {

@@ -595,8 +597,8 @@ class BrowserFrame : JFrame() {
// sanitize frame bounds
val screenSize = Toolkit.getDefaultToolkit().screenSize
val screenBounds = Rectangle(screenSize)
frameBounds.translate(-minOf(0, frameBounds.x), -Math.min(0, frameBounds.y))
frameBounds.translate(-maxOf(0, frameBounds.x + frameBounds.width - screenSize.width), -Math.max(0, frameBounds.y + frameBounds.height - screenSize.height))
frameBounds.translate(-minOf(0, frameBounds.x), -min(0, frameBounds.y))
frameBounds.translate(-maxOf(0, frameBounds.x + frameBounds.width - screenSize.width), -max(0, frameBounds.y + frameBounds.height - screenSize.height))

bounds = screenBounds.intersection(frameBounds)

@@ -19,6 +19,7 @@ import java.io.File
import java.io.PrintStream
import java.util.*
import javax.swing.UIManager
import kotlin.system.exitProcess

const val applicationTitle = "Bytecode viewer"
const val lafDefaultSystemProperty = "jclasslib.laf.default"
@@ -71,10 +72,9 @@ fun getPreviousBrowserFrame(browserFrame: BrowserFrame) : BrowserFrame = getBrow
fun getActiveBrowserFrame(): BrowserFrame? = getBrowserFrames().firstOrNull { it.isActive }

fun exit() {
System.exit(0)
exitProcess(0)
}


private fun registerStartupListener() {
StartupNotification.registerStartupListener { argLine ->
splitupCommandLine(argLine).let { startupArgs ->
@@ -18,13 +18,13 @@ import javax.swing.event.DocumentListener

abstract class FilterPane<out T, in S : Structure>(private val detailPane: DetailPane<*>) : JPanel() {

private val filterCheckboxes = getAllFilterKeys().associate {
it to JCheckBox(it.toString()).apply {
addActionListener {
updateFilter()
}
private val filterCheckboxes = getAllFilterKeys().associateWith {
JCheckBox(it.toString()).apply {
addActionListener {
updateFilter()
}
}
}

protected abstract fun getAllFilterKeys(): Collection<T>
protected abstract fun isElementTextFiltered(element: S, filterText: String): Boolean
@@ -64,8 +64,8 @@ abstract class FilterPane<out T, in S : Structure>(private val detailPane: Detai
layout = MigLayout("insets 0, wrap", "[grow]")

add(TitledSeparator("Filter"), "growx")
add(buttonGroup.radioButtons[FilterMode.ALL])
add(buttonGroup.radioButtons[FilterMode.SELECTED], "wrap unrel")
add(buttonGroup.getButton(FilterMode.ALL))
add(buttonGroup.getButton(FilterMode.SELECTED), "wrap unrel")
addComponents()
}

@@ -187,7 +187,7 @@ abstract class TableDetailPane<T : AttributeInfo>(elementClass: Class<T>, servic

private fun isLinkLabelHit(point: Point, row: Int, column: Int): Boolean {
val renderer = table.getCellRenderer(row, column) as LinkRenderer
renderer.getTableCellRendererComponent(table, table.model.getValueAt(row, column), false, false, row, column)
renderer.getTableCellRendererComponent(table, table.model.getValueAt(row, column), isSelected = false, hasFocus = false, row = row, column = column)
val cellRect = table.getCellRect(row, column, false)
val translatedPoint = Point(point.x - cellRect.x, point.y - cellRect.y)
return renderer.isLinkLabelHit(translatedPoint)
@@ -26,8 +26,7 @@ class CodeAttributeDetailPane(services: BrowserServices) : DetailPane<CodeAttrib
val miscDetailPane = MiscDetailPane(services)

private val detailsPanes: List<DetailPane<*>> = listOf(byteCodeDetailPane, exceptionTableDetailPane, miscDetailPane)
private val displayComponentToDetailPane: Map<JComponent, DetailPane<*>> =
detailsPanes.associate { it.displayComponent to it }
private val displayComponentToDetailPane: Map<JComponent, DetailPane<*>> = detailsPanes.associateBy { it.displayComponent }

private val tabbedPane: TabbedPaneFacade = tabPaneFactory().apply {
detailsPanes.forEach {
@@ -39,7 +39,7 @@ abstract class AttributeDocument(protected val styles: StyleContext, protected v
val documentModification = DocumentModification()
documentModification.block()
documentModification.modifiedRanges.forEach { range ->
fireChangedUpdate(DefaultDocumentEvent(range.start, range.last - range.first, DocumentEvent.EventType.CHANGE))
fireChangedUpdate(DefaultDocumentEvent(range.first, range.last - range.first, DocumentEvent.EventType.CHANGE))
}
} finally {
writeUnlock()
@@ -12,14 +12,16 @@ import javax.swing.JRadioButton

class EnumButtonGroup<E : Enum<E>>(values: Array<E>, actionListener: (E) -> Unit = {}) : ButtonGroup() {

val radioButtons = values.associate {
it to JRadioButton(it.toString()).apply {
val radioButtons = values.toList().associateWith {
JRadioButton(it.toString()).apply {
addActionListener {
actionListener(selectedValue)
}
}
}

fun getButton(value: E): JRadioButton = radioButtons[value] ?: error("value $value not found in radio button group")

var selectedValue: E
get() {
for ((value, radioButton) in radioButtons) {
@@ -18,7 +18,6 @@ import org.gjt.jclasslib.util.*
import java.awt.Color
import javax.swing.JComponent
import javax.swing.SwingConstants
import com.intellij.openapi.editor.colors.ColorKey as IJColorKey

fun initUiFacades() {
splitterFactory = ::JBSplitterFacade

0 comments on commit 5310bca

Please sign in to comment.
You can’t perform that action at this time.