The Method Toolbar
The Method contextual ribbon toolbar provides access to most of the functionality for creating, editing, and debugging methods. It is available when a Method Editor window is active. This section briefly describes the buttons in the Method toolbar.
The Libraries Section
This section contains the following buttons for including external code and utility classes:
The Utility Class button (), to create a new Utility Class node in the model and open its code in a new editor tab. See The Utility Class Node.
The External Java Library button (), to create a new External Java Library node in the model. See The External Java Library Node.
The External C Library button (), to create a new External C Library node in the model. See The External C Library Node.
The Edit Section
The Edit section contains the following button:
The Revert to Saved button (), to discard the changes made since the method was last saved and revert to the saved version.
The Code Section
This section contains the following buttons, which deal with the code more directly:
The Language Elements button (), to show or hide the Language Elements window, where you can choose and insert language elements into a method. See Adding Language Elements.
The Model Expressions button (), to show or hide the Model Expression window, where you can choose and insert COMSOL Multiphysics model expressions into a method. See Adding Model Expressions.
The Record Method button (), to record changes to the application to a new method. See Recording a New Method
The Check Syntax button (), to check the syntax for all of the methods that you have created. Syntax errors and warnings in the methods appear in the Method Errors and Warnings window. See The Method Errors and Warnings Window.
The Go to Node button (), to move to the node in the embedded model that corresponds to a model entity in the selected source code. See Going to the Node to Which the Source Code Is Mapped.
The Record Code button (), to start a recording session of operations on the embedded model that you can later use as code in a method. When the recording starts, the button changes to the Stop Recording button (), which you click to end the recording. See Recording Code.
The Use Shortcut button (), to create a local member field variable to use as a shortcut in an expression of a certain form. See Using Shortcuts.
The Create Local Variable button (), to add a local variable and its type declaration in the Method Editor. See Creating Local Variables and Their Type Declarations.
The Send to Chatbot button (), to send the method to the Chatbot window for a general conversation about, for finding bugs in, or for suggesting improvements to the method. See Using a Chatbot in the COMSOL Multiphysics Reference Manual.
The Debug Section
This section contains buttons for debugging methods. See Debugging and Running Methods for Applications. The buttons include:
The Continue button (), to continue debugging a method after stopping at a breakpoint.
The Step button (), to step forward in a method.
The Step Into button (), to step into another method or utility method.
The Step Out button (), to step out from the current method.
The Stop button (), to force the current method to stop.
The Break button (), to suspend the currently running method as soon as possible.
The Debug Log button (), to open the Debug Log window.
The Java Shell button (), to open the Java Shell window.
The Breakpoints Section
This section contains the following buttons for removing and disabling all breakpoints:
The Breakpoints button (), to open or close the Breakpoints window.
The Remove All button (), to remove all breakpoints in all methods.
The Disable All button (), to disable or enable all breakpoints in all methods.
The Test Section
This section contains the following tools for testing the application:
The Test Application button (), to launch the application in a separate window so that you can test it. See Testing the Application.
The Apply Changes button (), to compile and apply code changes to the running application (so-called hot code swap). See Applying Changes to a Running Application.
The Test in Web Browser button (), to test the application in a web browser. See Testing the Application.