Skip to main content

Changes in Next Design V4.0

Changes in extension functions

The following is an overview of the changes to the extension functions in Next Design V4.0. For details, please refer to the "List of applicable APIs" below.

  • Changes to behavior of rich text operation API
    • When setting the value of HTML format, the value of TEXT format is now automatically set.
    • The value of XAML format is no longer set.
    • If the value of HTML format does not contain the body tag, an exception occurs and it can no longer be set. It is now possible to set it without containing the html tag.
  • API enhancements to support V4 functions
    • Editor-related APIs have been enhanced in line with the addition of the multi-tab and floating functions.
    • Profile-related APIs have been enhanced in line with the addition of the profile tailoring function.
    • An API has been added that allows you to specify the split and import destination folders for model files in line with the model file hierarchy.
  • Changes, additions, and enhancements to APIs to enhance extensibility through extensions
    • The API can now be used to change the class of an existing model.
    • It is now possible to search for models that can be associated with a specified field.
    • The validation content can now be specified as an option when validating errors.
    • The document output option now allows you to suppress the automatic opening of files after output.
    • The inheritance relationship of classes defined in the metamodel can now be deleted using the API.
    • The path of the external file used by the script when it is executed can now be specified as a relative path.
    • The schema version of the execution environment can now be obtained using the API.
    • Guarding against unauthorized API operations has been strengthened.

List of Applicable APIs

The applicable APIs are listed below for each change in the extension function in Next Design V4.0. For details on each API, please refer to API Specifications.

Changes to behavior of rich text operation APIs

Changes to behavior of APIs for setting rich text fields

  • Overview
    • The behavior of APIs for setting rich text fields has been changed so that the display and output do not differ between GUI and API operations.
  • Target APIs
APIChanges
IModel.SetRichTextField method​・When setting the value of HTML format, the value of TEXT format is now automatically set as well.
・The value of XAML format is no longer set.
・If the body tag is not included as the value of HTML format, an exception occurs and it can no longer be set. It is now possible to set it without including the html tag.

API enhancements to support V4 features

Multi-tab/floating feature support

API enhancements according to active tab

  • Overview
    • With support for multi-tab/floating display, the active tab is the target of API operations. In addition to model editors, trace documents and class diagrams can also be displayed in the active tab. For this reason, APIs that depend on the type of editor and display state have been enhanced.
  • Target APIs
APIChanges
IEditorPage.CurrentEditorView propertyNow returns null if the active tab is not a model editor.
IEditorPage.MainEditorView propertyNow returns null if the active tab is not a model editor.
IEditorPage.SubEditorView propertyNow returns null if the active tab is not a model editor.
IEditorPage.IsTraceLineVisible propertyNow returns false if the active tab is not a model editor.
IEditorPage.IsIndicatorVisible propertyNow returns false if the active tab is not a model editor.
IEditorPage.IsFeatureMarkVisible propertyNow returns false if the active tab is not a model editor.
IEditorPage.IsTraceLineVisible propertyNow throws an exception when you set the value if the active tab is not a model editor.
IEditorPage.IsIndicatorVisible propertyNow throws an exception when you set the value if the active tab is not a model editor.
IEditorPage.IsFeatureMarkVisible propertyNow throws an exception when you set the value if the active tab is not a model editor.
IEditorPage.SubEditorMode PropertyNow returns SubEditorMode.Manual if the active tab is not a model editor.
IEditorPage.SetSubEditorMode MethodNow throws an exception if the active tab is not a model editor.
IEditorPage.SetSubEditorMode MethodNow throws an exception if the active tab is not a model editor.
ICommandManager.ExecuteCommand MethodNow executes the active tab when the following system commands are specified as the command identifier.
・View.ToggleSwapEditorLayout
・View.ToggleTraceLinkVisibility
・View.ToggleIndicatorVisibility
IWorkspaceState.ActiveEditorSelectedModel PropertyNow you can get the selected element of the active tab.
If the active tab is not displaying a model editor document, null is returned.
If the selected element of the active tab changes when switching tabs, the IWorkspaceState.EditorSelectionChanged event is notified.
IEditorPage.IsTraceLineVisible propertyThe last set state of the editor display state can now be obtained regardless of the active tab.
IEditorPage.IsIndicatorVisible propertyThe last set state of the editor display state can now be obtained regardless of the active tab.
IEditorPage.IsFeatureMarkVisible propertyThe last set state of the editor display state can now be obtained regardless of the active tab.
IEditorPage.IsTraceLineVisible propertyThe settings for the editor display state are now reflected on all tabs when the display state is switched.
IEditorPage.IsIndicatorVisible propertyThe settings for the editor display state are now reflected on all tabs when the display state is switched.
IEditorPage.IsFeatureMarkVisible propertyWhen you switch the display state of the editor, the setting is now reflected in all tabs.
IWorkspaceWindow.ActivePage propertyIf a trace document is displayed in the active tab, the trace page is now considered to be displayed.
When you set "Editor", a fixed tab is displayed.
IWorkspaceWindow.TracePage propertyIf a trace document is displayed in the active tab, the trace page is now considered to be displayed.
IWorkspaceWindow.EditorPage propertyIf a trace document is displayed in the active tab, the trace page is now considered to be displayed.
IEditorPage.IsSubEditorVisible propertyThe type and message of the exception when the editor display state cannot be changed have been changed.
IEditorPage.IsTraceLineVisible propertyThe type and message of the exception when the editor display state cannot be changed have been changed.
IEditorPage.SetSubEditorMode methodThe exception message when the editor display state cannot be changed has been changed.
IEditorPage.SetSubEditorMode methodThe exception message when the editor display state cannot be changed has been changed.

Support for profile tailoring function

Extended API for specifying classes

  • Overview
    • The method of determination for API for specifying class names has been changed.
      • The method of determination for fuzzy class name search has been changed to backward matching including namespace.
      • A method of specification has been added to limit the class search range to a specific profile reference package.
        Format: {profile name}::{class name or class name including namespace}
    • An overloaded method has been added to expand the method of specifying classes.
  • Target APIs
    • IModel
      • IModel.Is method
      • IModel.IsIn method
      • IModel.As method
      • IModel.AsIn method
      • IModel.FindOwnerByClass method
      • IModel.FindChildrenByClass method
      • IModel.GetRefRelatedModels method
      • IModel.GetDerivedModels method
      • IModel.GetDerivingModels method
      • IModel.AddNewModel method
      • IModel.AddNewModelAt method
      • IModel.AddNewModelTo method
    • IMetamodels
      • IMetamodels.GetClass method
      • IMetamodels.FindClassesByName method
      • IMetamodels.GetEnum method
      • IMetamodels.MoveToPackage method
      • IMetamodels.AddSuperClasses method
      • IMetamodels.RemoveSuperClasses method
      • IMetamodels.AddPathConstraint method
      • IMetamodels.RemovePathConstraint method
      • IMetamodels.RegisterGetFieldCallback method
      • IMetamodels.RegisterSetFieldCallback method
      • IMetamodels.RegisterRelateFieldCallback method
      • IMetamodels.UnregisterFieldCallback method
    • IProject
      • IProject.AddNewRootModel method

Enhancements to the settings API that specifies fields

  • Overview
    • If the target field is invalid for the settings API that specifies fields, an exception is thrown to prevent the value from being set incorrectly.
  • Target APIs
    • IModel
      • IModel.SetField method
      • IModel.SetFieldAt method
      • IModel.AddNewModel method
      • IModel.AddNewModelAt method
      • IModel.AddNewModelTo method
      • IModel.RemoveField method
      • IModel.RemoveFieldAt method
      • IModel.MoveTo method
      • IModel.Take method
      • IModel.Relate method
      • IModel.RelateAt method
    • IRelationship
      • IRelationship.Relate method

Added APIs for handling profiles and packages

  • Overview
    • Added APIs for checking profile information and profile reference information.
  • Target APIs
    • IProfile
      • IProfile.DisplayName property
      • IProfile.Description property
      • IProfile.Version property
      • IProfile.Category property
      • IProfile.GetProfileReferencePackageFor method
    • IPackage
      • IPackage.OwnedTypes property
      • IPackage.ProfileReference property
      • IPackage.GetAllTypes method
      • IPackage.GetAllClasses method
      • IPackage.GetAllEnums method
      • IPackage.GetAllSubPackages method
      • IPackage.GetOwnerPackages method
      • IPackage.GetTypeByName method
      • IPackage.GetTypesByName method
    • IMetamodels
      • IMetamodels.GetPackage method
      • IMetamodels.GetPackageById method
      • IMetamodels.FindPackageByName Methods
      • IMetamodels.FindPackageByName method
    • IProfileReference (added interface)
    • IProfileDependency (added interface)

Added API to realize profile reference

  • Overview
    • Added properties required to realize profile reference function.
    • Added a method to obtain profile reference package, which is useful for specifying scope when using API that handles class names.
  • Target APIs
    • INamedElement
      • INamedElement.BaseId property
      • INamedElement.IsDisabled property
      • INamedElement.GetProfileReferencePackage method
    • IViewDefnition
      • IViewDefnition.BaseId property
      • IViewDefnition.IsDisabled property

Added API to operate view definitions

  • Overview
    • Added API to register conditional style callbacks for multiple editor elements at once.
  • Target APIs
    • IViewDefnitions
      • IViewDefnitions.FindEditorDefByClass method
      • IViewDefnitions.FindElementDefByClass method
      • IViewDefnitions.RegisterGetStyleCallback method
      • IViewDefnitions.RegisterGetStyleCallback method
      • IViewDefnitions.RegisterGetTextStyleCallback method
      • IViewDefnitions.RegisterGetTextStyleCallback method
      • IViewDefnitions.RegisterGetCompartmentItemTextStyleCallback method
      • IViewDefnitions.RegisterGetCompartmentItemTextStyleCallback method
      • IViewDefnitions.RegisterTextValueCallback method
      • IViewDefnitions.RegisterCompartmentItemTextValueCallback method
      • IViewDefnitions.UnregisterStyleCallback method

Model file hierarchical function support

Added API to specify split and import folders for model files

  • Overview
    • Added API to specify split and import folders for model files in accordance with the hierarchical model file structure.
  • Target APIs
    • IProjectUnitManager.SplitModelUnit method
    • IProjectUnitManager.SplitModelUnits method
    • IProjectUnitManager.ImportModelUnits method

Enhanced API functionality to enhance extensibility through extensions

Added API for model operations

  • Overview
    • Added a method to change the class of an existing model.
    • Added a method to search for models that can be associated with a specified field.
    • Added a property to obtain and set the error code for error validation.
    • Added a property to control the automatic opening of files after document output.
  • Target APIs
APIChanges
IModel.GetChangeableMetaclasses MethodAdded a method to get all changeable classes from an existing model.
IModel.CanChangeMetaclassTo MethodAdded a method to determine whether the class of an existing model can be changed to a specified class.
IModel.ChangeMetaclassTo MethodAdded a method to change the class of an existing model.
IModel.FindRelatableModels MethodAdded a method to search for models that can be related to a specified field.
ValidationOptions.ErrorFilter PropertyAdded a property to get and set the error code for error validation.
DocumentGenerationOptions.OpenDocument PropertyAdded a property to control the automatic opening of a file after document output.

Added API for metamodel definition

  • Overview
    • Added an API to delete the inheritance relationship of classes defined in the metamodel.
    • A property has been added to obtain the enumeration that declares the enumeration literal.
    • IType has been added as a type concept common to IClass and IEnum.
  • Target APIs
APIChanges
IClass.RemoveSuperClass MethodA method has been added to remove a specified class from the superclasses of this class.
IClass.RemoveSuperClasses MethodA method has been added to remove a specified group of classes from the superclasses of this class.
IMetamodels.RemoveSuperClasses MethodA method has been added to remove the superclasses of a specified class.
IEnumLiteral.OwnerEnum PropertyA property has been added to obtain the enumeration that declares the enumeration literal.
IType Interface (Added)IType has been added as a type concept common to IClass and IEnum.
Inheritance Source: INamedElement, Inheritance Destination: IClass, IEnum
IClass InterfaceChanged the inheritance source from INamedElement to IType.
IEnum interfaceThe inheritance source has been changed from INamedElement to IType.

Expanded API functions of the extension mechanism

  • Overview
    • Improved so that the path of the external file used by the script when it is executed can be specified as a relative path.
    • Added a property to obtain the schema version of the execution environment.
  • Target APIs
APIChanges
IApplication.ExecuteScriptCode methodImproved so that the path of the external file used in the script when it is executed can be specified as a relative path.
IEnv.SchemaVersion propertyAdded a property to obtain the schema version of the execution environment.

Strengthened protection against invalid API operations

  • Overview
    • Changed to return null when retrieving the IPackage.Parent property for the root package of a profile.
    • Changed to throw an exception if the specified parameter is invalid in the IViewDefinitions interface API.
  • Target APIs
APIChanges
IPackage.Parent propertyChanged to return null when retrieving the IPackage.Parent property for the root package of a profile.
IViewDefinitions.FindElementDefByClass methodChanged to throw an exception if the specified parameter is invalid.
IViewDefinitions.RegisterGetStyleCallback methodChanged to throw an exception if the specified parameter is invalid.
IViewDefinitions.RegisterGetTextStyleCallback methodChanged to throw an exception if the specified parameter is invalid.
IViewDefinitions.RegisterGetCompartmentItemTextStyleCallback methodChanged to throw an exception if the specified parameter is invalid.
IViewDefinitions.RegisterTextValueCallback methodChanged to throw an exception if the specified parameter is invalid.
IViewDefinitions.RegisterCompartmentItemTextValueCallback methodChanged to throw an exception if the specified parameter is invalid.
IViewDefinitions.UnregisterStyleCallback methodChanged to throw an exception if the specified parameter is invalid.