diff --git a/modules/ROOT/pages/int-migrate-studio-to-acb.adoc b/modules/ROOT/pages/int-migrate-studio-to-acb.adoc index fa5ac0c0c..d204ece59 100644 --- a/modules/ROOT/pages/int-migrate-studio-to-acb.adoc +++ b/modules/ROOT/pages/int-migrate-studio-to-acb.adoc @@ -18,6 +18,98 @@ include::partial$acb-project-migration.adoc[tag="exporting-considerations-from-s include::partial$acb-project-migration.adoc[tag="import-mule-project-into-acb"] +== Understand Workspaces + +An IDE workspace is a logical environment that groups your projects. It also contains all associated settings, configurations, and state for development. Workspaces are primarily used for: + +* Managing multiple related projects +* Keeping plugin-specific settings and environments consistent +* Isolating different development contexts + +=== Workspace Considerations + +* Anypoint Code Builder uses a folder-based VS Code workspace, typically with one or more projects per workspace. +* All your projects within a workspace must use the same Mule runtime and Java version. + +=== Create a New Workspace + +. In Anypoint Code Builder, go to *File* > *Open Folder*. +. Go to the folder where you want to create your workspace. +. Click *New Folder*. +. Enter a name for your workspace. +. Click *Create*. + +=== Add Projects to a Workspace + +. In Anypoint Code Builder, open the project to add to the Anypoint Code Builder workspace. +. Go to *File* > *Add Folder to Workspace*. +. Select the folder where you want to add your project. +. Click *Add*. +. Click *Restart Anyway*. + +=== Add Configurations to a Workspace + +Group multiple project folders into one top-level workspace if working on several related projects at one time. + +A workspace configuration file (`.code-workspace`) is created to store workspace-specific settings. This file is located in the root folder. + +. Go to *File* > *Save Workspace As*. +. Select a location for your `.code-workspace` file and click *Save*. +. Click *Restart Anyway*. +. Open the `.code-workspace` file. +. Add your configurations in JSON format. + +For example, you can define settings that apply to all projects in the workspace: +[source,json] +---- +{ + "folders": [ + { + "path": "project-a" + }, + { + "path": "project-b" + } + ], + "settings": { + "java.home": "/path/to/your/jdk" + } +} +---- + +You can add any VS Code setting to the `settings` section of your `.code-workspace` file. + +=== Verify Workspace Setup + +After importing your project into Anypoint Code Builder, verify that the setup is correct. + +* The `pom.xml` file is compatible with Anypoint Code Builder +* The Mule runtime version is supported in Anypoint Code Builder +* The Maven dependencies resolve correctly +* The project builds successfully after running `mvn clean package` +* Your Mule application runs as expected in the new Anypoint Code Builder workspace +* Debug configurations are set up to troubleshoot your application +* The configuration XML file show no errors +* The canvas loads correctly, which means that the component dependencies resolve correctly + +=== Troubleshooting Migration Issues + +==== Canvas Loading Issues + +If the canvas is stuck loading flows, update your Mule projects in the workspace to use the same Java and Mule runtime versions. See xref:int-version.adoc#select-mule-and-java-versions-for-a-project[Select Mule and Java Versions for a Project]. + +==== Mule Runtime or Java Version Issues + +If the Mule runtime or Java version in the project isn't compatible with the IDE, it shows a *Mule runtime or Java version requires further action* error. + +. Click *Set Version* to update the Mule runtime or Java version. See xref:int-version.adoc#select-mule-and-java-versions-for-a-project[Select Mule and Java Versions for a Project]. +. After selecting compatible Mule runtime and Java versions, click *Apply*. +. Open the *Mule Config XML* file in your project. ++ +The error disappears, and you can work on your project. + == See Also * xref:int-import-mule-project.adoc[] +* https://code.visualstudio.com/docs/editing/workspaces/workspaces[Visual Studio Code Workspace] +