Package org.gnome.gtksourceview
Class VimIMContext.Builder<B extends VimIMContext.Builder<B>>
java.lang.Object
io.github.jwharm.javagi.gobject.Builder<B>
org.gnome.gobject.GObject.Builder<B>
org.gnome.gtk.IMContext.Builder<B>
org.gnome.gtksourceview.VimIMContext.Builder<B>
- Type Parameters:
B
- the type of the Builder that is returned
- All Implemented Interfaces:
BuilderInterface
- Enclosing class:
VimIMContext
public static class VimIMContext.Builder<B extends VimIMContext.Builder<B>>
extends IMContext.Builder<B>
Inner class implementing a builder pattern to construct a GObject with
properties.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Finish building theVimIMContext
object.onEdit
(VimIMContext.EditCallback handler) Requests the application open the file found atpath
.The signal is emitted when a command should be executed.Requests that the application format the text betweenbegin
andend
.onWrite
(VimIMContext.WriteCallback handler) Requests the application save the file.Methods inherited from class org.gnome.gtk.IMContext.Builder
onCommit, onDeleteSurrounding, onPreeditChanged, onPreeditEnd, onPreeditStart, onRetrieveSurrounding, setInputHints, setInputHints, setInputPurpose
Methods inherited from class org.gnome.gobject.GObject.Builder
onNotify
Methods inherited from class io.github.jwharm.javagi.gobject.Builder
addBuilderProperty, connect, connect, connectSignals, getArena, getNames, getValues
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilder
object.
-
-
Method Details
-
build
Finish building theVimIMContext
object. This will callGObject.withProperties(org.gnome.glib.Type, java.lang.String[], org.gnome.gobject.Value[])
to create a new GObject instance, which is then cast toVimIMContext
.- Overrides:
build
in classIMContext.Builder<B extends VimIMContext.Builder<B>>
- Returns:
- a new instance of
VimIMContext
with the properties that were set in the Builder object.
-
onEdit
Requests the application open the file found atpath
.If
path
isnull
, then the current file should be reloaded from storage.This may be executed in relation to the user running the
:edit
or:e
commands.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onExecuteCommand
The signal is emitted when a command should be executed. This might be something like:wq
or:e <path>
.If the application chooses to implement this, it should return
true
from this signal to indicate the command has been handled.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onFormatText
Requests that the application format the text betweenbegin
andend
.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onWrite
Requests the application save the file.If a filename was provided, it will be available to the signal handler as
path
. This may be executed in relation to the user running the:write
or:w
commands.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-