Package-level declarations

Entry point of the plugin. Contains main classes, shared classes, and helper classes.

Types

Link copied to clipboard
data class Box<T : Any>(val generator: () -> T, var value: T? = null)

A lazily-instantiated reference to an object of type T.

Link copied to clipboard
object Bundle

Simple accessor for working with internationalized strings.

Link copied to clipboard
enum CapitalizationMode(val transform: (String, Random) -> String) : Enum<CapitalizationMode>

A mode in which a word should be capitalized.

Link copied to clipboard
class DataGenerationException(message: String? = null, cause: Throwable? = null) : Exception

Thrown if a random datum could not be generated.

Link copied to clipboard
abstract class DecoratorScheme : Scheme

Transparently extends or alters the functionality of a Scheme with a decorating function.

Link copied to clipboard
internal class ErrorReporter : ErrorReportSubmitter

Reports exceptions on GitHub.

Link copied to clipboard
private class GitHubReporter

Knows how to report IssueData to GitHub.

Link copied to clipboard
private object GitHubScrambler

A GitHub authentication token that is slightly scrambled (and NOT SECURE).

Link copied to clipboard
object Icons

Basic Randomness icons.

Link copied to clipboard
abstract class InsertAction(val repeat: Boolean = false, val text: String, description: String? = null, icon: Icon? = null) : AnAction

Inserts strings in the editor.

Link copied to clipboard
private class IssueData(val events: List<IdeaLoggingEvent>, val additionalInfo: String?, val pluginDescriptor: PluginDescriptor)

Contains a variety of metadata on an issue to report, and knows how to format the issue in a textual form.

Link copied to clipboard
internal class Notifier : ProjectActivity

Displays notifications when a project is opened.

Link copied to clipboard
data class OverlayedIcon(val base: Icon, val overlays: List<Icon> = emptyList()) : Icon

An icon with various icons displayed on top of it as overlays.

Link copied to clipboard
data class OverlayIcon(val base: Icon, val background: Icon? = null) : Icon

An overlay icon, which can be displayed on top of other icons.

Link copied to clipboard
internal class PersistentSettings : PersistentStateComponent<Element>

The persistent Settings instance, stored as an Element to allow custom conversion for backwards compatibility.

Link copied to clipboard
class PopupAction : AnAction

Shows a popup for all available Randomness actions.

Link copied to clipboard
class RadialColorReplacementFilter(val colors: List<Color>, val center: Pair<Int, Int>? = null) : RGBImageFilter

Replaces all colors with one of colors depending on the angle relative to center.

Link copied to clipboard
abstract class Scheme : State

A scheme is a State that is also a configurable random number generator.

Link copied to clipboard
abstract class SchemeEditor<S : Scheme>(val scheme: S) : Disposable

An editor for a Scheme.

Link copied to clipboard
data class Settings(var version: String = CURRENT_VERSION, val templateList: TemplateList = TemplateList()) : State

Contains references to various State objects.

Link copied to clipboard
private class SimpleAbstractAction(val myActionPerformed: (ActionEvent?) -> Unit) : AbstractAction

An AbstractAction that uses myActionPerformed as the implementation of its actionPerformed method.

Link copied to clipboard
abstract class State

A state holds variables that can be configured, validated, copied, and loaded.

Link copied to clipboard
object Timely

Functions relating to time-limited behavior.

Link copied to clipboard
data class TypeIcon(val base: Icon, val text: String, val colors: List<Color>) : Icon

A colored icon with some text in it.

Functions

Link copied to clipboard
fun Element.addProperty(name: String, value: String? = null)

Adds a property with given name and value.

Link copied to clipboard
fun Element.getMultiProperty(name: String): List<Element>

Returns all children with attribute name="[name]".

Link copied to clipboard
fun Element.getProperty(name: String): Element?

Returns the single child with attribute name="[name]", or null if there is not exactly one such child.

Link copied to clipboard
fun Element.getPropertyByPath(vararg names: String?): Element?

Traverses a path of Elements based on their names by monadically either calling getProperty (if the name is not null) or taking the single child (if the name is null).

Link copied to clipboard
fun Element.getPropertyValue(name: String): String?

Returns the value of the value attribute of property name, or null if the property does not exist or if the property has no value.

Link copied to clipboard
fun Element.getSchemes(): List<Element>

Assuming this is the Element representation of a Settings instance, returns the list of Elements of the contained com.fwdekker.randomness.Schemes.

Link copied to clipboard
fun Element.getTemplateList(): Element?

Assuming this is the Element representation of a Settings instance, returns the Element of the contained com.fwdekker.randomness.template.TemplateList, or null if no such Element could be found.

Link copied to clipboard
fun Element.getTemplates(): List<Element>

Assuming this is the Element representation of a Settings instance, returns the list of Elements of the contained com.fwdekker.randomness.template.Templates.

Link copied to clipboard
fun String.matchesFormat(format: String, vararg args: String): Boolean

Returns true if format is a format string for this string, optionally after inserting args into format.

Link copied to clipboard
fun ListPopupImpl.registerModifierActions(captionModifier: (ActionEvent?) -> String)

Registers actions such that actions can be selected while holding (combinations of) modifier keys.

Link copied to clipboard
fun Element.renameProperty(oldName: String, newName: String)

Renames the property from oldName to newName.

Link copied to clipboard
fun <E> MutableCollection<E>.setAll(collection: Collection<E>)

Removes all elements from this collection and adds all elements from collection.

Link copied to clipboard
fun Element.setPropertyValue(name: String, value: String)

Sets the value of the value attribute of property name, or adds the property if it does not exist.

Link copied to clipboard
private operator fun <E> List<List<E>>.times(other: List<List<E>>): List<List<E>>

Returns the cartesian product of this and other.

Link copied to clipboard
private fun Char.toRandomCase(random: Random): Char

Randomly converts this character to uppercase or lowercase using random as a source of randomness.

Link copied to clipboard
private fun String.toSentenceCase(): String

Turns the first character uppercase while all other characters become lowercase.