►
From YouTube: Source Editor Architecture discussion. 09/27/2021
Description
Discussing the PoC for the Inversion of Control architecture for the extensions in Source Editor.
A
Hello,
we
are
here
to
talk
about
to
continue
talking
about
the
source,
editor
architecture.
In
regards
to
the
extensions,
and
today
we
are
going
to
talk
about
the
conversion
of
control
architecture
applicable
for
applicable
to
to
source
editor
extensions.
A
So,
based
on
the
discussions
we
had
last
week
during
the
architecture
session
and
during
the
deep
dive
I've,
I've
started
exploring
the
inversion
control
architecture,
a
version
of
control
pattern
for
for
the
extensions,
and
he
came
up
with
with
the
poc
so
far,
hey
paul
I've
linked
the
the
snippet
in
on
the
channel.
A
B
A
The
link
it's
in
g
underscore
create
underscore
editor
slack
channel.
D
A
So
I
can,
let
me
just
add
the
things
to
the
to
the
agenda.
Apparently,
since
we
keep
doing
this
in
the
agenda,
so
okay
today
is
27th
of
september.
Time
flies.
A
Okay,
do
you
see
my
screen
now
cool,
so
this
snippet
has
three
things:
it
has
the
two
extensions
one
extension
two
extension
and
the
the
actual
like
implementation
with
with
some
visual
tests.
So
again
I
want
to
to
work
with
this
in
isolation,
not
within
the
product
just
yet
so
to
be
able
to
catch
the
things
early
on
and
iterate
faster.
So
technically,
if
you
want,
you
can
also
copy
the
thing
and
then
go
to.
A
Canine
I'm
wondering
yeah
I
can.
I
can
get
all
the
all
the
output
here
right
away,
so
the.
A
The
way
I
did
this
so
technically,
this
poc
contains
pretty
much
everything
we
were
talking
about
and
addresses.
Most
of
the
issues
raised
during
the
previous
calls.
A
Let
me
just
make
the
brief
introduction
into
how
this
is
built,
so,
instead
of
the
that
pattern
with
the
russian
russian
doll,
where
we
have
extension
wrapping
in
the
instance
with
the
proxy
and
then
another
extension
wrapping
with
another
proxy,
so
building
this
this
structure
now
we
have
it
a
bit
differently.
So
now
we
have
instance,
it's
not
muta
mutating
as
it
used
to
be
in
the
russian
doll
architecture.
A
However,
this
is
this.
Is
this
second
path
that
I
mentioned
during
the
deep
dive
where
we
have
the
separate
registry
for
the
extensions
and
instead
of
instantiating
proxy
every
time,
every
time
we
call
use
on
the
instance
and
then
x,
it's
out,
it
becomes
up
to
the
extension
to
generate
the
proxy
and
return
the
proxy.
A
A
This
is
sort
of
the
part
of
this
shift
of
paradigm,
so
we
move
the
control
from
from
the
extension
to
the
to
the
source,
editor
itself
and
in
this
scenario
like
let's
look
at
this
extension,
two
dot
gs.
So
this
is
simplest
version.
So
technically
this
on
setup
on
before
and
use
on
use,
these
are
not
required
things
like
I.
A
I
went
with
the
with
a
class
extension
here,
so
this
is
the
thing
I
was
trying
to
follow
more
or
less
the
patterns
established
by
by
view,
so
we
define
the
methods
in
a
separate,
separate
block.
So
these
are
the
methods
from
this
extension
and
the
life
cycle
of
an
extension
has.
If
we
take
a
look
at
the
extension
one
has
this
four
main
points
so
first
on
setup,
this
is
for
setting
up
the
extension.
A
This
is
useful
when
you
need
to
get
access
to
the
monaco
api
before
like
you,
when
you
do
not
need
your
instance,
but
you
want
to
reach
out
to
the
monaco
api.
For
example,
when
you
set
up
a
monaco
action
or
key
keystroke,
or
something
like
this,
you
you
set
up
things
that
are
native
in
monaco
world,
so
you
don't
have
access
to
the
to
the
like.
A
You
have
the
access
to
the
instance
here
only
through
this
option
that
is
injected
by
source
editor
itself,
so
you
do
not
need
to
pass
to
pass
instance
here
manually
this.
This
part,
the
instance,
is
passed
to
the
options
from
source
editor.
A
So
this
is
this
is
before
we
even
register
the
extension
with
source
editor,
then
on
use
is
called
right
after
the
extension
is
registered
with
the
instance,
and
here
you
have
access
to
all
of
the
instances,
methods
on
before
unused.
This
is
when
you
on
before
you
unuse
the
the
extension
so
to
clean
out
to
do
some
cleanup,
while
the
extension
is
still
available
and
then
on
use.
A
This
is
for
major
cleanup
after
your
extension
has
been
unregistered
from
source
header
and
removed
from
the
from
the
instance,
so
very
basic
functions
here,
just
to
test
so
architecture
wise
wise
when
one
requests
a
method
from
from
the
instance.
Let's,
let's
take
a
look
at
one
of
the
tests,
for
example,
so
let's
take
this
one,
so
we
create
the
new
instance.
A
We
use
extension.
So
this
signature
of
of
how
we
use
the
extension
we
pass.
Two
parameters.
Options
is
optional
and
definition
is
what
you
actually
want
to
pass.
As
the
definition
of
your
extension
options
is,
options
is
the
object
containing
parameters
that
will
be
used
for
setting
up
the
extension
if,
if
the
extension
needs
to
be
set
up,
so
that's
that's
pretty
easy,
pretty
simple,
so
this
definition
can
be
a
function
can
be
class.
A
What
is
changed
in
this
implementation
is
that
now
we
do
not
accept
playing
objects,
so
it's
only
either
function
or
a
class.
A
We
can
restrict
it
even
more
and
say
only
functions
or
only
classes
are
accepted,
but
I
don't
really
see
any
viable
point
in
this
restriction.
To
be
honest,
so
this
is
how
we
use
the
extension
and
technically,
like
this
basic
comes
method,
comes
from
the
extension
itself.
The
alpha
method
comes
from
the
instance
itself.
A
What
is
interesting
here
is
paul
asked
a
very,
very
like
raised
a
very
good
concern
during
the
last
week's
architectural
discussion
when
he,
when
looking
at
the
at
that
russian
doll
architecture,
he
noticed
that,
since
every
time
we
use
an
extension,
we
were
returning
a
proxy.
A
This
means
that
every
time
you
were
referencing
instance
before
using
any
extension
that
reference
didn't
know
anything
about
the
extension,
so
that
was
that
was
a
major
flaw
of
the
architecture
in
this
case,
since
we
moved
the
proxy
to
the
instance
level
instant
instance
will
know
about
any
currently
registered
extensions,
no
matter
where
it's
wrap
it's
being
referenced.
A
We
if
we
take
a
look
at
the
at
this
method,
so
from
the
methods
here
we
have
access
to,
we
can
set
up.
It
can
pass
properties
to
the
methods
so
just
like.
A
Right
so
just
like
regular
regular
parameters
or
as
an
object,
it
will
will
keep
keep
working
just
fine.
We
have
access
to
the
instance,
so
the
the
one
and
only
place
where
we
register
reference
to
the
instance
on
this
extension
is
in
the
setup
process.
A
If
we
take
a
look
at
the
at
the
implementation
so
technically-
and
this
is
so
this-
this
is
the
entry
point
where
we
get
reference
where
we
reference
the
instance.
That's
why
we
do
not
pass
instance
to
any
of
the
methods
or
in
this
thing
so
instance,
is
already
here.
A
If
we
take
a
look
at
the
implementation
right,
so
we
have
a
couple
of
static.
So
here
is
the
the
main,
the
main
proxy
when
we
create
the
new
editor
instance.
This
is
what
we
get.
We
get
the
proxy
with
the
get
handler
that
manages
so
that
dispatches
the
request,
whether
to
return
a
thing
from
from
an
extension
from
one
of
the
registered
extensions
or
from
the
instance
itself.
A
We
have
two
maps
on
the
instance
now
one
that
stores
extensions
as
underscoring
extensions.
It
stores
the
relationship
between
name
as
a
string
and
the
actual
extension,
and
then
we
have
methods
this
one
has
the
relationship
between
the
method
of
method,
name
and
all
the
extension
names
that
provide
this
method.
So
the
principle
of
lasting
for
style
is
still
preserved
here.
So
the
last
extension
registering.
A
With
the
name,
conflict
will
be
prioritized
so
that
that
extension
will
return
the
result,
but
this
map
is
al
also
allows
us
to
actually
appropriately
unuse
extensions
when
we,
when
we
need
to
do
that,
and
if
you,
if
you
have
any
questions,
just
stop
me
and
pause
me
anytime.
You
want,
since
this
is
not
any
deep
dive
or
anything
like
like
that.
B
A
Well
view,
for
example,
it
proxies
pretty
much
everything
like
get
set,
I
think
applied,
but
for
for
our
needs
we
don't
we
don't
need
that.
B
A
E
It's
very
noisy,
but
yeah.
We
don't
really
have
a
proxy
patent,
but
as
as
paul
had
mentioned
in
in
in
last
session
that
we
have
something
like
we
have
different
sort
of
event,
handlers
that
all
the
extensions
can
subscribe
to.
So
we
have
a
couple
of
let's
say
it's
like
an
interface,
so
each
extension
has
to
follow
an
interface.
E
So
we
have
a
couple
of
functions
and
the
extensions
just
follow
the
interface
and
extend
certain
methods
and
basically
hooking
up
to
certain
functionality
of
the
the.
C
That's
that's!
What's
really
cool
with
with
this,
this
extension
approach
that
you're
showing
dennis
because
there
is
a
specific
interface
that
extensions
have
yeah.
I
see
like
there's
this
life
cycle
methods.
I
want
to
provide.
A
C
This
is
how
you
do
it,
and
it's.
A
Like
I
did,
I
didn't
I
wanted
to
keep
the
the
number
of
the
slight
cycle,
events
to
the
bare
minimum,
so
that
yeah,
so
that
it's
like
it's
not
over
complicated
and.
C
When
I've
used
it,
I
need
to
do
some
setup,
and
then
you
know
when
I'm
not
being
used.
I
need
to
do
some
teardown
yep
and
that's
that's
about.
I
think,
like
exactly.
B
C
Right
now
and
yeah,
it
sounds
that
that
looks
great.
I
think
I
think
that
there's
a
a
little
bit
of
confusion
on
what
is
the
problem
we're
wanting
to
solve
with
the
proxies.
I'm
really
not
sure.
Why
do
we
want
extensions
to
expose
methods
like
like,
because
that's
still
and
that
still
keeps
some
coupling
where
you
know
my
my
type?
What
I
can
do
is
gonna
change
based
on.
What's
I've
done
at
runtime?
C
A
Let's,
let
me
just
do
this
thing,
so
this
is,
let
me
just
move
it
here,
so
this
is
my
local
sort
of
environment.
If
we
go
back
go
to
to
an
extension,
let's,
let's
take
this
simple
one.
So
technically
what
we
can
do
is
we
can
say
here.
A
A
A
Class,
this
is
a
regular
class
that
right
that
that
doesn't
sort
of
doesn't
really
expose
the
things
it's
just.
We
we
get
access
to
these
methods
in
the
source
header
in
order
to
build
that
map
of
relationship
between
method,
name
and
the
and
particular
extensions
that
that
provide
this
method.
C
So
here
these
methods
that
we're
providing
those
are
only
ex
expected
to
be
called
within
this
extension.
Other
extensions
may
not
know
that
these
methods
exist.
A
No,
no,
the
no,
the
other
other
extensions
do
not
have
access
to
the
methods
they
might
have.
The
they
will
have
the
access
to
the
methods
that
are
registered
by
source
editor
because
those
are
like.
Technically,
if
you
do
the
instance
dot
something
we
will,
the
proxy
will
kick
in
and
if,
if
some
other
extension
registers
this
method,
we
will
get
access
to
this,
but
attacking,
but
other
extensions
won't
have
access
to
these
internal
methods
really.
C
And
like
and
not
feel,
like
extension
from
extension
yeah,
and
I
think,
and
I
think
we'd
like
I
think
in
the
long
run,
we
can
avoid
a
lot
of
weird
coupling
things
that
come
up.
C
If
we
don't
want,
if
we
just
land
on
now,
we
don't
want
extensions
to
call
other
extensions
methods
and
we
rely
on
other
means
of
like
message
passing
if
there
has
to
be
some
sort
of
communication,
if
we
use
some
sort
of
event
hub,
maybe
using
the
instance
as
an
event
hub.
I
don't
know.
If
monaco,
how
like
flexible,
you
can
be
with
events
that
are
emitted
or
listened
to,
but.
A
This
would
would
pretty
much
over
complicate
the
the
end
user,
the
yeah,
the
end
usage
of
the
things.
So
if,
for
example,
I
have
like
I'm
building
the
the
complete
experience
like,
I
have,
for
example,
two
extensions
that
kind
of
like
one
of
the
extensions
relies
and
depends
on
on
the
other
extension.
So
I
have
to
have
the
access
to
the
methods
of
the
first
extension
from
the
second
one.
A
In
order
to
build
like,
let
me
give
you
an
example,
so
the
the
toolbar
for
the
for
the
source
header,
the
very
first
thing-
will
be
the
extension
of
providing
the
content
panels.
So
the
panels
that
sit
within
the
content
within
the
editor
area,
one
can
set
it
up
to
be
placed
on
the
left
on
the
right
on
the
top
of
the
bottom
of
the
editor
and
then
at
the
actual,
toolbar
extension
will
be.
A
You
will
be
depending
on
that
extension
because
it
will
be
introduced
as
the
content
panel
above
the
the
editor,
so
the
toolbar
extension
in
this
case
will
have
to
have
access
to
potentially
will
have
to
have
access
some
access
to
the
to
the
content
panel.
Extensions
methods,
like
methods
introduced
by
that
content
panel,
obviously
the
communication
will
happen
through
the
through
the
instance,
so
extension
won't
be
talking
to
the
to
the
to
each
other
directly.
C
D
A
For,
for
example,
in
the
in
the
toolbars
extension
I'm
on
in
the
on
setup
callback,
I
might
already
want
to
set
up
that
panel
for
for
the
toolbar.
So
I
do
expect
the
panel
being
there
when
I'm
calling
the
extension
and
if
the
panel
is
not
or
like
the
functionality
for
the
content
panels,
and
if
the
content
panel's
functionality
is
not
there.
I
just
stop
and
do
not
do
anything,
because
without
that
extension,
it
doesn't
make
sense.
A
Obviously
I
can
do
class
toolbar
extends
the
content
panel
class,
but
that's
that's
not
really
optimal,
because
that's
exactly
what
builds
the
the
dependencies.
Also,
that
won't
work
in
the.
If
somebody,
if
we
decide
to
go
with
the
with
the
extensions
that
are
functions,
not
classes.
C
So
hamachu
does
does
tip
tap
or
whatever
tip
tap
is
based
off
of
I
forgot,
or
maybe
the
other
thing
do
we
ever
have
extensions
that
are
are
required
from
other
extensions
like
for
this
extension
to
work.
You
need
to
have
this
extension
loaded
or
like.
E
We
sorry
we
sort
of
had
a
situation
where
we
would
require
other
extensions,
but
tiptap
doesn't
normally
do
that.
So
we
came
up
with
an
alternate
solution
where
we
don't
really
need
to
rely
on
another
extension
source
so
that
sort
of
smell
like
sounds
like
a
cold
smell.
So
what
we
did
was
we
abstracted
that
piece
of
code
into
a
separate
utility
so
that
utility
can
be
shared
across
different
extensions.
A
And
this
is
this:
is
beauty
beautiful
here
as
well,
because,
technically
you
can.
You
can
use
this
exactly
the
same
approach
here
as
well
right,
but
this
would
be
sort
of
artificial
limitation
if
we
would
not
allow
extend,
because
you
know
in
order
to
like
just
think
about
the
life
cycle
of
the
of
the
extension.
So
we
have
bare
like
plane
instance
without
any
extensions,
then
we
we
say
okay
instance
use
content
panel
extension
and
toolbar
extension.
A
So,
first
of
all
the
content
panel
extension
will
be
applied
to
to
the
instance,
then
the
toolbar,
so
technically,
we
will
also
have
to
to
be
able
to
just
to
differentiate
whether
a
requested
method
comes
from
the
instance
or
the
method
request.
That
comes
is
sort
of
expected
to
be
somewhere
on
the
extension
so
that
we
like,
we
could
introduce
the
the
the
good
patterns
notifying
the
user
like
okay.
We
should
not
write
extensions
requiring
or
expecting
methods
from
another
extension.
This
is
sort
of
like
unnecessary.
C
I
get,
I
think
I
get
some
of
the
problems
at
hand
and
and
and
that
helps-
and
so
this
this
desire
to
to
for
an
extension
to
expose
methods
and
what
it's
making
me
think
of
like
if
you
ever
dealt
with
like
wordpress,
plugins
and
php,
it's
like
you'd
install
a
plug-in
and
then
some
plug-ins
require
other
plug-ins
and
every
plug-in
can
provide.
You
know
some
public
methods
that
other
things
can
call
and,
like
all
of
that
was
helpful.
C
C
What
if
we
did
some
sort
of
providing
and
injecting
pattern
here,
where
an
extension
can
say,
I
require
panels
and
some
extension
before
me
had
better,
have
registered
and
injected
say
here's
panels
and
here's.
You
know
the
object
for
running
panels
or
whatever
so
like
on
use.
C
I
could
say
something
you
know
we're
gonna
know
like
or
maybe
maybe
it's
one
of
like
our
functions
that
we
return
or
like
I
inject
panels.
Here's
the
object
for
it,
and
so
people
can
call
add
panel
or
or
whatever
it
is,
and
that
way
we're
not
just
writing
to
this
one.
God
object,
that's
just
going
to
keep
growing
and
hopefully
doesn't
have
name
collisions
and
things
like
that-
and
this
is
very
similar.
C
B
E
E
I
mean
it
could
work,
but
we
don't
use
extensions
for
that
in
content
later,
and
the
second
point
I
wanted
to
highlight
was
that
monaco
has,
I
mean
intentionally
separated
view
and
model
into
separate,
separate
modules,
and
what
we
are
doing
here
is
we
are
combining
both
of
them
into
a
single
thing
that
can
be
consumed
by
anyone.
So
that
is
like.
I
think
we
should
still
try
to
keep
both
of
those
separate
it's
it's.
E
They
have
separated
it
for
a
very
good
reason,
and
by
combining
everything
in
a
single
class,
we
are
sort
of
doing
like
everything
in
like,
like,
as
paul
mentioned,
a
sort
of
a
god-like
object
which,
which
could
be
a
cause
for
problem,
maybe
not
now,
but
as
the
extensions
keep
growing
I
mean
it
could
be
problematic
in
the
future.
C
Can
you
can
you
clarify
what
you
mean
by
putting
everything
in
one
object
or
one
class.
E
I
mean
you're
accessing
the
model
and
updating
the
view
in
the
same
class
and
exposing
those
functions
for
other
extensions
to
use.
I
would
rather
I
mean
I
would
rather
expose
those
functions
separately
and
maybe
not
even
call
this
whole
architecture.
Extensions
to
just
expose
the
functions
and
whoever
wants
to
use
those
functions
can
just
import
the
functions.
E
A
This
is
I
like,
okay,
maybe
I
I
didn't
explain
this
correctly.
So,
okay,
I'm
I'm
not
sure.
I
hear
anything
that
would
contradict
the
current
implementation.
To
be
honest,
so
again,
extensions
do
not
get
access
to
to
each
other
methods
directly
right,
so
the
where?
Is
it
yeah?
So
it's
it's.
The
editor
editor
instance
through
the
proxy
figures
out
the
all
of
the
extensions
registered
for
a
particular
method.
A
Where
is
it
like
right,
so
register
extension
for
extension
methods,
so
registers
all
the
methods
for
the
extension
and
then
when
the
request
is
like
when,
when
the
client
requests
any
particular
method
from
this
instance,
the
instance
will
return
from
the
extension
that
is,
that
is,
register
registered
last
for
for
this
for
this
method.
A
So
the
the
direct
dependency
might
might
occur
on
the
on
the
level
of
the
of
the
extension
itself,
but
that's
inevitable,
like
the
the
problem
is
that
extensions
in
we
are
dealing
with
here
and
extensions
in
tiptop
are
a
bit
different
things,
so
extensions
that
that
are
possible
to
create
with
them
with
the
with
the
monaco
with
source
header
are
like
they're
much
broader
in
scope
by
by
design
much
broader
than
scope
than
than
those
of
tip
top.
A
I'm
not
sure
how
how
to
break
sort
of
that
dependency
and
whether
the
dependency
has
to
be
broken
at
all,
because
technically,
by
registering
the
content.
Panel
extension
once
happens
exactly
the
same
thing
that
you
pull
described
so
any
extension
can
actually
get
can
can
get
access
to
to
those
methods
through
the
through
the
instance
not
directly
through
the
instance
and
that's
technically
from
from
minus,
and
that's
that's
what
has
been
described
so
far,
so
we
register
extension
once
and
then
we
can.
A
We
can
use
it
or
request
information
from
it
at
any
point
of
time
of
from
off
another
extension,
for
example,
or
the
instance
itself.
So
I'm
not
sure
I
I'm
I'm
following
what
is
what
is
the
flaw
here.
E
This
is
what
we've
done
in
the
in
the
web
ide.
So
in
the
web
ide
we
have
a
separate
model
controller
that
controls
multiple
models
and
we
have
sort
of
a
manager
so
and
the
view
is
taken
care
of
like,
but
but
even
in
the
web
ids,
it's
like
a
single
editor
class
that
takes
care
of
everything
and
controls.
Everything.
A
I
think
we
we've
got
rid
of
that
of
that
complexity
in
web
ide
when
we
were
migrating
to
the
source.
Editor
extension.
A
E
I
mean
yes,
it's
it
may
not
be
in
use,
but
we're
still
using
the
same
pattern
and
associated
as
well.
A
The
gs
is
there
simply
because
I
didn't
remove
it
so
yeah
like
the
whole
process
of
creating
the
source.
Editor
extension
for
webii
was
just
taking
what
we
had
in
editor.js
wrapping
it
into
the
extension
format
and
do
the
very
very
rough
cleanup
of
what
is
what
is
going
on
there.
A
So
that's
editor.gs
so
that
editor.js.
D
It
looks
like
it
might
still
have
okay,
so
this
one
this
one.
A
A
It's
much
smaller,
it's
much
smaller
and
that's
that's
the
thing
like
I
that's
why
I
say
I
think
I've
got
rid
of
that
complexity
of
of
models
being
separated
from
the
from
the
views
or
no.
There
is
the
model
model
manager
here.
Okay,
I'm
sorry!
I
didn't
get
a
read
of
that.
C
A
C
E
I
mean
right
now
all
the
extensions
that
we
use
in
source
writer
are,
I
mean,
except
for
the
web
id?
They
don't
really
touch
the
model
which
in
which,
which
kind
of
makes
all
the
extensions.
Like
view
only
extensions
I
mean,
except
for
maybe
the
the
gitlab
ci
one
which
which
does
change
the
model,
I
guess
a
little
bit,
but
but
yeah
I
mean
it's
just
like
my
preference,
like
I
sort
of
prefer
like
a
functional
programming
approach
where
just
you
just
call
functions.
E
A
But
okay,
like
in
in
this
in
this
approach,
what
prevents
you
from
actually
managing
modal
and
view
separately
and
that
just
wrap
it
into
the
same
cloud
into
one
class
like
what
prevents
you
from
doing
that.
Yeah.
E
That's
the
point:
if
you.
E
I
think,
but
the
the
paradigm
has
already
been
established
like
we
are
already
combining
both
model
and
view
in
every
extension.
So.
C
Are
you
thinking
that
maybe
we
could
have
extensions
that
are
just
model
specific
and
extensions
that
are
just
presentation,
specific,
like
having
multiple
extensions
targeting
those
different
parts
or
yes?
But.
C
Yeah,
I
think,
I
think
think
something's
an
extent
we're
calling
an
extension-
and
I
think
you
know
plug-in-
is
kind
of
synonymous
with
it.
If
I'm
I'm
picturing
from
the
view
component,
which
is
my
desired
interface
for
creating
a
source,
editor
instance,
I
would
love
to
just
say
here's
the
list
of
things
to
here's
the
list
of
types
of
what
I
want
to
extend
the
core
behavior
with
this
and.
C
So
I
think
that
yeah,
these
are
just
mod
modules.
An
extension
can
just
be
just
the
glue
code,
part
of
it,
but
it
is
nice
having
one
type
that
you're
referencing,
for
you
know,
here's
how
we
want
to
extend
the
main
source
center,
but
if
we
want
to
do
something
for
all
of
source,
editing
like
for
every
instance
of
source
editor
it
brings
questions
of.
C
When
is
something
an
extension,
and
when
is
something
you
know,
maybe
the
core
part
of
when
we
initialize
the
editor
or
something,
and
especially
for
doing
something
with,
especially
if
we're
doing
something
with
panels.
A
Technically,
what
the
model
only
functionality
can
be
totally
like
can
be
totally
achieved
like
this,
and
then
you
just
you
just
create
only
on
setup
in
your
extension
and
then
you
do
you
deal
with
the
with
the
model.
A
Yeah
like
you,
do
not
need
all
of
these
things,
or
actually
you
might
want
to
to
to
keep
the
one
before
unused
or
unused
to
tear
down
the
or
reset
the
modal
changes.
A
B
C
And
so
the
extension
is
naturally
going
to
you
know:
hey
we're
extending
you
know
what
you
could
do
with
monaco
here's
the
instance.
Well,
you
know,
and
so
I
think
it's
worth
keeping
responsibilities
small,
because
then
we're
going
to
be
able
to
reuse
them,
and
I
think
that's
something
you'd
want
to
want
to
keep
keep
an
eye
on.
I
do
see
benefit
to
having
extension
classes
or
even
extension
functions
which
may
just
be
a
used
function
with
you
know
which
returns
how
to
dispose
it
like.
C
I
think
I
can
see
a
functional
interface
for
this.
I
think,
having
those
you
know,
usables
ie,
plugins,
ie
extensions.
It's
really
valuable
because
I
think
when
I'm
thinking
of
this
interface
with
view
components,
I
see
that
being
helpful.
C
If
I
understood
you
correctly,
it's
not
like
you're
saying
for
some
things.
We
might
not
even
need
an
extension
and-
and
I
think
that
might
be
right-
I
think
it
is
nice.
Having
extensions
be
this
glue
code
because
you
on
some
instances
of
source
editor,
you
may
not
want
to
have
certain
behavior
or
whatever,
and
turning
that
on
through
these
references
sounds
nice
yeah.
I
can
actually
give
you
an.
E
Example
of
that
like,
for
example,
like
themes
and
registering
different
languages.
Ideally
we
could
have
an
extension
for
that,
but
we
don't
we
actually
just
initialize
monaco
and
call
the
function
just
passing
it
to
the
the
editor
object
and
it
just
does
the
job.
E
So,
ideally,
that
could
also
have
been
a
separate
exchange
and
we
could
have
just
sort
of
used
it,
but
it's
not
so
yeah.
So
we
can
think
of
situations.
Where
I
mean
does
it
really
need
to
be
an
extension,
and
can
it
be
just
a
function
where
you
just
pass
it
and
add
an
object
and
it
does
what
it
needs
to
do.
A
Can't
that,
for
example,
be
just
just
a
separate
like
okay-
it's
not
an
extension,
but
it's
just
a
module
that
you
that
we
might
simply
make
part
of
the
source
editor
core.
A
E
I
mean
yes,
it
can
definitely
be
an
extension
as
well,
but
it's
not
right
now
at
least,
and
we
could
make
it
an
extension
or
we
could.
Alternatively,
we
could
also
like
use
the
same
approach
for
extensions
and
and
associated
as
well,
because
that
would
be
much
simpler.
You
wouldn't
really
need
a
proxy
just
describe
a
couple
of
functions.
B
C
What's
and
I
apologize
for
keep
bringing
this
up,
but
when
I
think
of
I
want
to
interfaces
through
a
view
component,
I'm
not
going
to
have
access
to
the
monaco
instance
at
that
time.
Like
I'm
creating
my
view
component
monaco
hasn't
been
set
up,
then
I
want
to
pass
the
list
of
extensions
without
with
and
and
and
I
like-
that,
I
don't
even
want
to
know
monica's
being
used.
I
just
want
to
say
here's
source
editor,
here's
a
list
of
extensions,
just
devices
from.
C
Yeah
I
I
want
to
I
want
to
I
want
to,
and
hamachi
mentioned
you
know,
I
have
a
preferring
functional
style
and
I
think
that
there's
an
api
change
we
could
make
that
would
I
want
us
to
be
thinking
about
what
would
the
functions
for
these
kind
of
extensions
look
like
and
yes
here
it
is.
We
could
yes,
we
could
do
it
like
this,
but
you
see
we're
still
kind
of
quite
stateful
of
like
saving
off
the
incident.
The
incidents
and
and
things
of
that
nature.
C
I
want
to
propose
a
functional
interface
for
this
and
see
what
everyone
thinks
so
here
with
this
with
this
function.
Extension:
what
if
we
received
the
options
at
the
top
level
function
and
because,
when
I'm
creating
my
from
the
view
component
perspective,
I
want
to
say
I
want
to
use
this
with
these
options
and
I
want
to
just
create.
I
don't,
and
I
want.
C
A
You
mean,
let
me
just
let
me
just
do
this,
so
here
is
the
functional
this
one's.
A
This
one,
no,
I
just
you
know
in
order
to
not
have
the
comments
there,
I
will.
I
will
create
the
new
snippet
or
append
that
ones
with
the
with
a
functional
thing,
so
you
mean
paul
something
like.
A
Of
like
this,
with,
like
my
oh
yeah
yeah
this
this,
this
should
be
possible.
So
the
problem
is
that
I
wanted
to
to
keep
to
keep
the
options
and
the
definition
for
the
for
the
extension
separate
in
order
to
properly
register
the
the
things,
the
methods
and
the
definition
of
the
extension
in
the
registry
of
the
of
the
source
editor.
That
was
the
main.
The
main
reason
for
this
so
technically.
C
Wouldn't
that
be
in
the
and
the
use
of
it
like
that's,
I
think
the
I
think
one
I
was
gonna
show
how
this
would
work
with
like
a
functional
interface,
but
looking
at
this
class
interface,
I
like-
and
I
see
on
that
line-
oh
yeah
yeah,
I
so
even
oh
yeah
yeah,
I
think
it'd
be
really
cool
for
this
ioc
extension
like
I
feel
like
I'd
like
to
be
able
to
create
it,
I
like
to
be
able
to
say
here's
a
new
ioc
extension
with
options,
and
I
know
I'm
also
thinking
like
you
know,
some
of
the
ruby,
plugins
and
stuff
how
we
do
this
and
on
the
use
and
before
unused.
C
A
That's
that's
totally
possible,
that's
like
that's,
that's
absolutely
possible
and
we
can.
We
can.
D
C
C
I
could
have
an
extension
that
technically
lives
beyond
a
instance
if
we
need
to
dispose
and
create
instances
real
fast,
and
maybe
this.
A
I
have
a
I
have
a
question
about
this
approach,
though
so,
if
we
take
a
look
at
this
at
this
extension,
so
if
we
pass
the
instance
to
let's
say
on
setup
on
use
on
on
anything
so
technically,
we
have
to
pass
the
instance
to
every
single
method
as
well.
When
it's
get
when
it
gets
cold
right
because,
for
example,
we
would
where
is
it
like
yeah,
for
example?
I
would
like
to
be
able
to
have
access
to
instance
from
from
method.
Probably
I
don't
know
like.
A
D
C
A
That
that's
how
it
used
to
be
earlier
today.
That's
how
it
used
to
be
I
just
I
don't
know.
I
just
thought
it's
nice
to
have
one
entry
point
and
just
store
the
instance
on
the.
A
We
can
we
can.
We
can
easily
do
that
because,
as
I
said
like
it
used
to
be
this
way
at
some
point
and
it
it's
like
it's
very
fast
change
to
to
to
get
to
that
state.
A
C
So
the
way
what
I
would
anticipate
is
we
would
receive
the
instance
in
the
life
cycle
methods,
and
then
I
may
define
some
like
private
methods
that
I'm
calling
her
passing
along
the
instance
and
or
I
it
sounds
like
I
may
need
to
find
new
methods
or
some
that's
where
things
I
think
make
it
interesting.
C
That's
going
to
create
a
nicer
api
for
when
I'm
wanting
to
bootstrap
the
source
editor,
because
then
I
can
just
instantiate
these
extensions
as
constants
and
just
just
leave
it,
and-
and
I
think
I
like
how
how
you're
thinking
about
removing
the
awkwardness
of
like
already
you're,
saying,
here's
the
definition
based
on
the
class
and
the
options
you're
going
to
pass
to
it,
and
I
like
how
you're
thinking
I
I'm
I'm
going
to
reference
these
I'm
going
to
break
the
because
right
now,
there's
some
awkward
code,
where
you're
doing
something,
like
instance,
that
use
equals
new
extension.
C
Here's
the
instance
currently
in
the
code-
and
I
like
how
we
were
breaking
that.
I
wonder.
Maybe
we
want
to
go
all
the
way
and
now
I
can
actually
create
new
ones
of
these.
I
don't
have
to.
I
don't
have
to
do
this
definition,
object
or
anything.
I
can
just
instantiate
these
yes
with
functions.
I
can
just
call
a
function,
and
that
might
be
nice,
and
this.
A
So
technically
we
we
now,
I
have
removed
this
instance
from
so
we
do
not
store
instance
on
the
on
the
on
the
on
the
extension
class.
So
we
just
directly
pass
instance
to
the
to
the
method,
so
instance
will
be
the
first
argument
in
the
list.
So
there
might
be
other
things
I
don't
know
like
foo
or
something
but
technically
instance
will
be
passed
as
the
first
argument
or
wait
a
second.
But
if
we
pass
other
arguments
then
we
should
make
it
like
no
or
something
well.
C
Something
may
not
something
may
not
need,
so
I
think
if
we
have
an
extension
and
it's
using
and
unusing
instances,
I
am
then
going
to
if
I'm,
if
I'm
being
used,
we
then
want
to
provide
certain
functions
and
those
at
that
time,
when
we
provide
those
functions,
those
can
be
instance
bound
or
not,
but
I
definitely-
and
this
is
another-
this
is
there's
a
side
topic.
I
know
we're
at
or
have
time
this
one
to
just
think
about.
C
I
don't
have
a
clear
picture
in
my
head
and
I
think,
as
we
talk
about
it
and
wrestle
with
it
and
figure
out
what
works
and
what
doesn't
we'll
find
a
nice
place,
the
with
methods
I'd
really
really
like
to
separate
what
are
we
publicly
providing,
and
what
can
I
just
call
and
what,
like
I
I'd
like
I'd
like
to
make
a
distinction
between
public
and
private
methods
and,
I
think,
provide
an
inject
pattern-
is
a
and
you
kind
of
already
have
that
infrastructure
set
up
with
these
maps
and
stuff.
A
This
is,
this
is
technically.
This
is
what
is
done,
like
anything
that
is
within
methods
is
the
public
right,
so
anything
that
is
outside
of
it
is
private.
Technically,
so
only
the
methods
from
this
methods
thing
become
the
pub
sort
of
constitute
the
public
interface
of
the
instance
later
yeah.
C
Here,
I
think
I
think
that's
awesome
and
I
would
love
to
then
see
if
this
means
we
could
actually
catch
potential
issues
early
and
that'd
be
really
sweet
because
I
would
love
to
see
here
I'm
an
extension,
and
I
require
these
things.
Yeah.
A
C
A
Also,
you
know
like
we
can
even
introduce
the
dependency,
for
example,
if
we
have
any
sort
of
dependency
on
some
on
another
extension.
But
it's
only
for
one
small
specific
case.
Then
we
could
even
use
something,
like
instance,
use
on
the
left.
Oops
instance
use
on
the
on
that
particular
method
level,
so
that
we
do
not
sort
of
blow
up
the
whole
performance
chart.
But
just
for
this
one
particular
case,
we
will
have
access
to
this
as
well.
C
C
We
could
eagerly
blow
up,
which
is
actually
a
good
thing,
because
then
we
wouldn't
then
have
to
incur
the
cost
of
like
using
something
you
know,
while
we're
trying
to
process
a
user
event
or
something
like
that,
and
I
don't
know
what
could
require
there
but,
like
I
do
think
it's
cool
having
one
section
where
we're
defining.
What's
public,
that's
really
sweet,
and
I
I
have
some
ideas.
I
think
we
can
even
drop
that
inside
of
the
on
use
and
name
space
them
too
would
be
really
cool,
and
so
I
think
this
is.
C
This
is
a
really.
I
really
love
the
restrictions
with
this
interface
that
we
have
here
and
I
and
I
think,
I'm
excited
about
making
these
extensions
a
little
less
stateful
and
and
being
even
more
explicit-
and
this
is
this-
is
cool
yeah,
thanks
for
thanks
for
putting
together
this,
this
poc
that
we
can
play
around
with.
E
Yeah,
I
just
wanted
to
add
one
more
thing
that
instead
of
having
this
sort
of
on
use
and
on
unused
approach,
we
could
possibly
have
a
setup
and
teardown
approach
where
you
you
just
declare
a
function.
E
That
expects
the
editor
object
and
then
you
return
a
teardown
function
that
that's
usually
what
other
libraries
do
when
they're
registering
events
and
returning
an
unregistered
function
back
and
you
could
also
follow
like
in
angular
there
used
to
be
a
I
mean,
even
in
view
there
is
this
factory
pattern
where
you
just
declare
a
factory
function
where
you
could
pass
the
options
and
it
returns
another
function
that
takes
the
the
edited
object.
E
So
you
don't
really
have
to
I
mean
you
can
configure
the
extension,
but
you
don't
really
have
to
have
the
item
object
beforehand
before
you
instantiate
the
extension,
so
you
wouldn't
really
need
all
these
functions.
You
can
I
mean
you
can
have
all
these
functions
as
private
functions
inside
the
closure
so
and
whatever
you
return,
is
sort
of.
C
E
C
E
C
That'd
be
awesome
dennis
thanks
so
much
this
was
awesome,
yep
cool.
Thank
you
very.