Skip to content

Editor

This page is AI-generated

This guide is written and maintained with AI assistance so it keeps pace with the editor’s behaviour as it evolves. If anything here doesn’t match what you see, the editor itself is the source of truth — please let us know so we can update it.

How the Method Sketch editor helps you write sketches: autocomplete, inline validation, and navigation. Everything here runs in the editor itself — no backend round-trip is needed for it to work.

Autocomplete

Opening the menu

The completion menu appears in three ways:

  • As you type — start typing and relevant suggestions appear automatically.
  • On demand — press Ctrl+Space anywhere to ask for suggestions.
  • Automatically, at the natural spot — the editor opens the menu for you when you arrive somewhere a choice is expected (see Auto-open below).

In the menu: / to move, Enter or Tab to accept, Esc to dismiss. Suggestions you’ve used recently float to the top; the rest are alphabetical.

The top-level construct menu

Snippets and tab-stops

Most structural suggestions insert a small template with tab-stops. After you accept one, the first placeholder is selected — type to replace it, then press Tab to jump to the next placeholder. For example, accepting UseCase inserts the following, with the name selected first and the body as the next stop:

A snippet just inserted, with its first tab-stop (the name) selected

Auto-open

The menu opens by itself when you reach a place where the next thing is a choice:

  • Press Enter onto a blank line between top-level blocks → the construct menu (start a new UseCase, DTO, …). You need a clear blank line below the previous } first, so a construct is never glued directly under a closing brace.
  • Press Enter onto a new line inside a UseCase body → the call menu (start the next call).
  • Tab into a slot that expects a specific value → e.g. after naming a UseCase and tabbing into its body, or tabbing past an Identifier / Value name into its type slot.

If you don’t want a suggestion, just press Esc and carry on.

What gets suggested, and where

Top level — constructs

On a blank top-level line you’re offered every top-level construct: StaticAspect, UseCase, Activity, Flow, DTO, DTO : Base, Doc, Identifier, Value, and Section. Typing a prefix filters the list (e.g. UsUseCase, DDoc / DTO / DTO : Base).

Inside a StaticAspect — component types

A component is written as a name followed by a type suffix, e.g. OrderManager, CustomerClient. To get there, type the name and then the first letter of the category and accept the suggestion:

Category Example
Client CustomerClient
Manager OrderManager
Engine PricingEngine
Access OrderAccess
Resource OrderResource
Utility CacheUtility

Resource has backend variants — the suffix picks one (plain Resource is relational, the default):

Suggestion Backend
Resource relational (default)
Resource:a API
Resource:f file
Resource:n NoSQL

Component-type suggestions inside a StaticAspect

Inside a UseCase — call chains

A use case is a sequence of calls:

The editor suggests:

  • The first component in a chain must be an entry point, so only Client and Utility components are offered there.
  • Subsequent targets are the other components (clients are excluded), plus the call arrow ->.
  • Operations / facets on the component you’re calling — known operations are offered, otherwise scaffolding (Operation() and the I… interface).
  • Transport suffixes on a call: :a (async) and :q (queued). Plain synchronous (:s) is the default, so it isn’t offered — leave the suffix off for a synchronous call.

Call suggestions inside a use case

Identifier and Value — primitive types

After you name an identifier or value object, the editor offers the primitive types for its (optional) type slot, and opens that menu automatically when you tab into the slot:

Types offered: bool, byte, sbyte, char, decimal, double, float, int, uint, long, ulong, short, ushort, string, Guid.

Primitive-type suggestions in an Identifier’s type slot

Inside a DTO — property types

At the start of a property line, the editor suggests valid property types: primitives, your declared Identifier / Value types, your declared DTOs, and common system types (Uri, DateTime, object). It won’t interrupt while you’re typing the property name.

DTO property-type suggestions

For arrays and generics, pick the base type and add [] / <…> yourself.

DTO base types

After : in a DTO header, the base suggestions include:

  • every declared DTO,
  • any operation parameter/response type whose name ends in Base, and
  • the implicit base the backend creates for an operation that’s called with several different DTOs — {Operation}RequestBase / {Operation}ResponseBase (or, if the first such type already ends in Base, that name).

Base-type suggestions after  in a DTO header

Inline validation

Problems are underlined as you type (hover for the message):

  • Syntax errors (red) — something the grammar can’t parse.
  • Undefined component (warning) — a component used in a use case that isn’t declared in a StaticAspect. Declare it, or fix the name.
  • “… mixes value and reference types” (warning) — a facet operation is called with a value type (a primitive, Identifier, or Value) in one place and a reference type (a DTO — or a type you never declared) in another. Every call to the same operation must use all value types or all reference types for its parameters (and, separately, its responses). The usual cause is a typo or an undeclared id/DTO — for example, using GadgetId without an Identifier GadgetId Guid declaration alongside a declared id like WidgetId. Declare the missing type (or fix the name) and the warning clears. This is the same check the backend runs when generating diagrams, surfaced inline so you catch it early.

The value/reference type-mix warning

Bookmarks (Ctrl+K chords)

  • Ctrl+K Ctrl+K — toggle a bookmark on the current line
  • Ctrl+K Ctrl+N — jump to the next bookmark
  • Ctrl+K Ctrl+P — jump to the previous bookmark
  • Ctrl+K Ctrl+L — clear all bookmarks

A bookmark marker in the gutter

Sections

Sections (| "Name" … |) group related declarations. Within the Ctrl+K family, the second stroke is bare (no Ctrl):

  • Ctrl+K then ] / [ — move to the next / previous section (or the top-level “(none)” group)
  • Ctrl+K then . / , — cycle through the landmark keywords in the current section

You can also jump straight to an artifact by selecting it in the navigation panel.

Tips

  • Recently-used suggestions are promoted to the top of the menu, so your common components and types stay one keystroke away.
  • If an auto-opened menu gets in the way, Esc dismisses it without changing anything.
  • The validation warnings mirror what the backend enforces, so a clean editor generally means clean diagram generation.