Skip to content
Closed
Changes from 15 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
100 changes: 100 additions & 0 deletions modules/ROOT/pages/int-migrate-studio-to-acb.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,106 @@ 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

* Studio uses an Eclipse workspace that contains multiple projects. Anypoint Code Builder uses a folder-based VS Code workspace, typically with one or more projects per workspace. So Anypoint Code Builder workspace can be physically in the same location as your Studio workspace.
Comment thread
Crispy-Salesforce marked this conversation as resolved.
Outdated
Comment thread
Crispy-Salesforce marked this conversation as resolved.
Outdated
* All your projects within a workspace must use the same Mule run-time 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.
. Click *Restart Anyway*.
. Open the `.code-workspace` file.
. Add your configurations in JSON format.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is this? I have not seen this prompt

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned by the title (Add Configurations to a Workspace), it's not a prompt but an option for customers to configure their workspace. Should we provide this option?


For example, you can define settings that apply to all projects in the workspace:
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to confirm with Subhash if these are honored for sure

[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.

=== Import Studio Workspace into Anypoint Code Builder

Import your Anypoint Studio workspace into Anypoint Code Builder as a VS Code workspace.
Comment thread
Crispy-Salesforce marked this conversation as resolved.
Outdated

. In Anypoint Code Builder, go to *File* > *Open Folder*.
. Go to your Studio workspace.
. Select the individual project folder. Don't select the entire workspace.

=== 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]