Main Content

mw.fileTypes.groups Extension Point (Beta)

Create group of file types

Since R2024b

Note

Extension points are available only as part of the new desktop for MATLAB®. The new desktop for MATLAB is in beta development and should not be used for development or production activities. For more information, see Get Started with the New Desktop for MATLAB (Beta).

You can create groups of file types in MATLAB using the mw.fileTypes.groups extension point. Creating groups allows you to customize multiple file types at the same time.

To create and use a group of file types in MATLAB:

  1. Create a JSON-formatted file named extensions.json and place it in a folder named resources.

  2. Add a set of JSON declarations to extensions.json that defines one or more groups.

  3. Add the folder containing the resources folder to the MATLAB path. To add the folder to the path, use the addpath function or right-click the folder in the Files panel and select Add to Path > Selected Folders and Subfolders.

This JSON code shows the basic structure of the mw.fileTypes.groups extension point and how to use it.

{
    "mw.fileTypes.groups": {
        "images": ["jpg", "jpeg", "tif", "tiff", "png"],
        "matlabCodeFiles": ["m", "mlx"]
    }
    "mw.fileTypes.icons": [
    {
        "groups.images": "./imageIcon.svg",
        "groups.matlabCodeFiles": "./codeFileIcon.svg",
        "xlsx": "./excelWorksheetIcon.svg",
        "docx": "./wordDocIcon.svg"
    }]
}

For more information about using extension points, see Extend MATLAB Using Extension Points (Beta).

Properties

expand all

Required Properties

File type group used for customizing multiple file types, specified as a JSON string.

Specify the property name as the name of the group that you want to create. Specify the property value as an array of lowercase file type extensions that you want to include in the group.

Example: "images": ["jpg", "jpeg", "tif", "tiff", "png"]

Version History

Introduced in R2024b