Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
** xref:start-add-folders.adoc[]
** xref:start-open-output-panel.adoc[]
** xref:start-scm.adoc[]
** xref:start-workspaces.adoc[]

// TUTORIALS
* xref:tutorials.adoc[]
Expand Down
1 change: 1 addition & 0 deletions modules/ROOT/pages/af-create-agent-network.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,4 @@ If you run operations within a CI/CD environment, you can use Anypoint CLI's plu
== See Also

* xref:af-define-your-agent-network-specification.adoc[]
* xref:start-workspaces.adoc[]
4 changes: 3 additions & 1 deletion modules/ROOT/pages/des-create-api-specs.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -283,9 +283,11 @@ If you created an OAS 3.0 (YAML) project, you can replace the initial spec with

== See Also


* xref:start-acb.adoc[]
* xref:tutorials.adoc[]
* xref:access-management::business-groups.adoc[]
* xref:start-discover-ui.adoc#use-autocomplete[Use Auto-Complete in the Editors]
* xref:tut-af-design-am-flights-api.adoc[] Tutorial
* xref:des-delete-api-projects.adoc[]
* xref:des-delete-api-projects.adoc[]
* xref:start-workspaces.adoc[]
43 changes: 5 additions & 38 deletions modules/ROOT/pages/imp-implement-local-apis.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ For your projects to work properly, the `.code-workspace` file _must not reside_

In addition, Anypoint Code Builder permits only one pair of iterative design and implementation project folders per multi-root workspace.

For more information, see https://code.visualstudio.com/docs/editor/multi-root-workspaces[Multi-root Workspaces^] in the VS Code documentation.
For general information about using workspaces in Anypoint Code Builder, see xref:start-workspaces.adoc[].

For more information about VS Code workspaces, see https://code.visualstudio.com/docs/editor/multi-root-workspaces[Multi-root Workspaces^] in the VS Code documentation.


== Before You Begin
Expand Down Expand Up @@ -120,7 +122,7 @@ which you then implement within a Mule application.
You can switch between the spec and the implementation project in the Explorer view.


To close your multi-root workspace, see <<close-workspace>>.
To close or reopen your workspace later, see xref:start-workspaces.adoc[Working with Workspaces].


[[rescaffold-api-spec]]
Expand All @@ -143,42 +145,7 @@ After you see the message that your project was rescaffolded successfully, navig
//TODO:
// ADD NOTE ABOUT caveats for rescaffolding AsyncAPI specs?

[[close-workspace]]
== Close a Multi-Root Workspace

To close the workspace:

// Pointer to Command Palette
include::partial$acb-reusable-steps.adoc[tags="open-command-palette"]
. Select the following command:
+
[source,command]
----
Workspaces: Close Workspace
----

After closing, you can reopen a synchronized project from the workspace that you created when implementing the API.
See <<open-workspace>>.

[[open-workspace]]
== Open a Multi-Root Workspace

To open a multi-root workspace from the `.code-workspace` file:

// Pointer to Command Palette
include::partial$acb-reusable-steps.adoc[tags="open-command-palette"]
. Select the following command:
+
[source,command]
----
File: Open Workspace from File...
----
. Navigate to your home directory and double-click the `.code-workspace` file for the workspace.
+
The projects open in the Explorer view, and the folder name for the multi-root workspace includes *(WORKSPACE)*, for example:
+
image::imp-local-api-open-workspace.png["A multi-root workspace in Explorer view"]

== See Also

* xref:start-workspaces.adoc[]
* xref:tut-local-api-specification.adoc[] Tutorial
1 change: 1 addition & 0 deletions modules/ROOT/pages/int-create-integrations.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ The file's canvas provides the same options for building your project file that

== See Also

* xref:start-workspaces.adoc[]
* xref:acb-reference.adoc[]
* xref:int-work-with-code-snippets.adoc[]
* xref:debugging-mule-apps.adoc[]
5 changes: 5 additions & 0 deletions modules/ROOT/pages/int-import-mule-project.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -183,3 +183,8 @@ include::partial$acb-open-packaged-sources.adoc[tags="open-workspace-root"]
include::partial$acb-open-packaged-sources.adoc[tags="load-project"]
//step: test project
include::partial$acb-open-packaged-sources.adoc[tags="test-project"]

== See Also

* xref:start-workspaces.adoc[]
* xref:int-export-mule-project.adoc[]
1 change: 1 addition & 0 deletions modules/ROOT/pages/int-migrate-studio-to-acb.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ include::partial$acb-project-migration.adoc[tag="import-mule-project-into-acb"]

== See Also

* xref:start-workspaces.adoc[]
* xref:int-import-mule-project.adoc[]
132 changes: 132 additions & 0 deletions modules/ROOT/pages/start-workspaces.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
= Working with Workspaces
:page-deployment-options: cloud-ide, desktop-ide

include::reuse::partial$beta-banner.adoc[tag="anypoint-code-builder"]

Organize your Mule projects, API specifications, and agent networks in workspaces to ensure all Anypoint Code Builder features work correctly. Workspaces help you manage multiple related projects and avoid build-time and design-time issues.

[[valid-setups]]
== Valid Setups for Anypoint Code Builder

Anypoint Code Builder requires one of the following project configurations to function properly:

* A single Mule project open at the root of your directory
* A multi-root workspace pointing directly to one or more Mule projects

If your directory structure doesn't meet these requirements, Anypoint Code Builder displays a message with steps to resolve the issue, such as opening a Mule project or creating a workspace.

[[create-project-workspace]]
== Create a Project in a Workspace

When you create a new project (API specification, integration, or agent network), add it to a workspace. This setup enables you to add more projects later without restructuring your environment.

To create a project in a workspace:

. Start the project creation process using one of the following methods:
+
** From the *Quick Actions* menu, select the project type
+
For example, *Design an API* or *Develop an Integration*.
** From the Command Palette, run the appropriate command
+
For example, `MuleSoft: Design an API`.
** Ask MuleSoft Vibes to create the project using natural language.

. In the project creation form, select *Create in workspace*.
. Complete the remaining project configuration options.
. Click *Create Project*.
+
Anypoint Code Builder creates the project and adds it to a workspace. If no workspace is open, a new workspace is created.

[[import-studio-workspace]]
== Import an Anypoint Studio Workspace

If you have existing projects in Anypoint Studio, you can import your Studio workspace into Anypoint Code Builder.

To import a Studio workspace:

// Pointer to Command Palette
include::partial$acb-reusable-steps.adoc[tags="open-command-palette"]
. Select the following command:
+
[source,command]
----
MuleSoft: Import Studio Workspace
----
. Navigate to the location of your Studio workspace and select it.
. Choose a location to save the new workspace file.
+
Anypoint Code Builder creates a workspace that references your existing Studio projects. Changes made to the original Studio workspace are automatically reflected in Anypoint Code Builder.

[[switch-workspaces]]
== Open and Switch Between Workspaces

You can open or switch between workspaces using the menu, the Command Palette, or MuleSoft Vibes.

=== Open a Workspace Manually

. Open the workspace file using one of these methods:
+
* From the menu bar, select *File* > *Open Workspace from File...*.
* From the Command Palette, run the command `File: Open Workspace from File...`.
. Navigate to your home directory or the location where you saved the `.code-workspace` file, and select it.
+
The projects open in the Explorer view, and the folder name for the workspace includes *(WORKSPACE)* to indicate that you're working in a multi-root workspace:
+
image::imp-local-api-open-workspace.png["A multi-root workspace in Explorer view"]

=== Open a Workspace with MuleSoft Vibes

You can ask MuleSoft Vibes to switch workspaces using natural language prompts, such as:

* "Open my American Flights workspace"
* "Switch to the `<YourWorkspaceName>` workspace"

[[close-workspace]]
== Close a Workspace

To close the current workspace:

// Pointer to Command Palette
include::partial$acb-reusable-steps.adoc[tags="open-command-palette"]
. Select the following command:
+
[source,command]
----
Workspaces: Close Workspace
----

[[actions-in-workspaces]]
== Actions in Workspaces

Anypoint Code Builder organizes actions based on their scope:

[cols="1,2"]
|===
| Action Type | Location

| *Global actions*
| Always available from the Command Palette. These actions don't depend on a specific project, such as creating a new project, importing assets from Exchange, or opening ACB settings.

| *Project-specific actions*
| Available from the context menu (right-click) in the Explorer view. These actions apply to a specific project, such as running, debugging, deploying, or exporting a project.
|===

When working with multiple projects in a workspace, select the target project before running project-specific actions. For example, when you run or debug, you must select which project in the workspace to execute.

[[workspace-file]]
== Workspace File Location

VS Code stores workspace configuration in a file with the `.code-workspace` extension. This file maps the folders for your projects.

[IMPORTANT]
====
The `.code-workspace` file must not reside within any of your project folders. Save it in a separate directory, such as your home directory or a dedicated workspaces folder.
====

== See Also

* xref:imp-implement-local-apis.adoc[Iteratively Design and Implement APIs]
* xref:int-create-integrations.adoc[Creating Integrations]
* xref:des-create-api-specs.adoc[Creating and Importing API Specifications]
* https://code.visualstudio.com/docs/editor/multi-root-workspaces[Multi-root Workspaces^] in the VS Code documentation
2 changes: 1 addition & 1 deletion modules/ROOT/pages/troubleshoot-loading-errors.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ File: Open Folder...
+
The root is the top-level folder that Anypoint Code Builder generates when it creates a project. Do not navigate to the project's parent or ancestor directory or to one of its child or descendant directories.

See also xref:int-import-mule-project.adoc[].
See also xref:int-import-mule-project.adoc[] and xref:start-workspaces.adoc[].

[[mule-dx]]
== Mule DX API Component Was Not Installed
Expand Down
1 change: 0 additions & 1 deletion modules/ROOT/pages/vibes-conversation-history.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
= View Conversation History
:page-aliases: a4d-mcp-server.adoc

MuleSoft Vibes allows you to return to tasks you have previously started and continue working from where you left off.

Expand Down