Working with Methods > Overview > The Method Toolbar

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 on the Method toolbar.
The Main Section
This section contains buttons for moving to various windows and creating new forms and methods.
Click the Model Builder button () to switch from the Application Builder to the Model Builder windows and the standard COMSOL Desktop.
Click the New Form button () to create a new form using the New Form wizard. See Working with a Form and Using the New Form Wizard.
Click the New Method button () to create a new Method node in the model and open its code in a new editor tab. See The Method Nodes and Method Editor Windows.
Click the Record a New Method button () to create a new method start a recording session of operations on the embedded model that you can later use as code in that method. When the recording starts, the button changes to the Stop Recording button (), which you click to end the recording. See Recording Code.
Click the Settings button () to open or close the Settings window.
Click the Preview button () to show or hide the Preview window for a live preview of the forms and methods in the application. In the Preview window you can scroll to get a preview of all forms and methods in the application, which can be useful, for example, if you are working on a method that interacts with a form. To show a preview of a form in the Preview window, select a form or method node in the Application Builder window.
Click the Editor Tools button () to show or hide the Editor Tools window, where you can choose common COMSOL Multiphysics model operations and insert them into a method or generate form objects based on them. See Adding Model Code and Form Objects.
The Libraries Section
This section contains buttons for including external code and utility classes.
Click 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.
Click the External Java Library button () to create a new External Java Library node in the model. See The External Java Library Node.
Click 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:
Click 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 buttons that deal with the code more directly.
Click 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.
Click 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.
Click 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 Errors and Warnings window. See The Errors and Warnings Window.
Click 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 Node the Source Code is Mapped To.
Click 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.
Click the Extract Variable button () to extract a local member field variable to replace an expression of a certain form. See Extracting Variables.
The Debug Section
This section contains buttons for debugging methods. See Debugging Methods for Applications.
Click the Continue button () to continue debugging a method after stopping at a breakpoint.
Click the Step button () to step forward in a method.
Click the Step Into button () to step into another method or utility method.
Click the Stop button () to force the running of the current method to stop.
Click the Debug Log button () to open the Debug Log window.
The Breakpoints Section
This section contains buttons for removing and disabling all breakpoints.
Click the Remove All button () to remove all breakpoints in all methods.
Click the Disable All button () to disable or enable all breakpoints in all methods.
The Test Section
This section contains tools for testing the application.
Click the Test Application button () to launch the application in a separate window so that you can test it. See Testing the Application.
Click 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.
Click the Test in Web Browser button () to test run the application in a web browser. See Testing the Application.
The View Section
The View section contains buttons for rearranging the views in the Application Builder desktop window.
Click the Tile () and Move To () buttons to rearrange the windows in the Application Builder.
Click the Reset Desktop button () to reset the desktop layout to the default state.