Meta-Model Processing Method, Device and Medium in IDEA Development Environment

By initializing the metamodel enhancement plug-in, dynamic indexing and synchronous update cache in the IDEA development environment, providing intelligent completion and jump detection processing, the problems of inefficient and incomplete metamodel processing in the existing technology are solved, and efficient metamodel processing and code intelligence are achieved.

CN119166117BActive Publication Date: 2025-06-24GUANGZHOU SIE CONSULTING CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411198014.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-29
Publication Date
2025-06-24
Estimated Expiration
2044-08-29

AI Technical Summary

Technical Problem

The existing technology cannot efficiently handle model files in large-scale projects under the IDEA development environment, the dynamic indexing and synchronous update efficiency are low, the method parameters of custom annotation label lack effective completion prompts and shading navigation support, and the generation functions of static variables and custom getter setter methods are not perfect, resulting in insufficient development efficiency and accuracy.

Method used

It provides a meta-model processing method in the IDEA development environment. By initializing the meta-model enhancement plug-in, dynamic indexing and synchronous update cache, it provides intelligent completion, shading, jump and detection processing, performs attribute intelligent prompts and jump detection of custom annotations, and generates static variables and custom getter setter methods.

Benefits of technology

It significantly improves the efficiency and accuracy of meta-model processing in the IDEA development environment, provides smarter code completion, jump and detection functions, simplifies the workflow of developers, and improves coding efficiency and code standardization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119166117B_ABST
    Figure CN119166117B_ABST
Patent Text Reader

Abstract

The present application proposes a method, device and medium for meta-model processing in the IDEA development environment. The method includes: initializing and configuring the dependency libraries and environment variables required for the meta-model enhancement plug-in in the IIDP platform; calling the meta-model enhancement plug-in to perform the following operations, and then saving the processed meta-model on the IIDP platform: dynamically indexing and synchronously updating the cache of the file information related to the meta-model in the current project; performing intelligent completion, coloring, jumping and detection processing on the target method parameters in the meta-model; performing intelligent hint and jump detection processing on the attributes of the custom annotations in the meta-model; generating static variables related to the model information according to the specified annotations in the meta-model, and providing intelligent completion hints for the static variables; automatically generating 'get' methods and'set' methods applicable to the meta-model according to the '@Getter' annotation and '@Setter' annotation on the model attributes of the meta-model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and particularly to a method, apparatus, and medium for processing a meta-model in an IDEA development environment. Background Art

[0002] Currently, the enhancement technologies of the IDEA (fully named IntelliJ IDEA, an integrated environment for Java language development) development environment mainly focus on code completion, syntax coloring, and jump navigation. Although there are already various plugins that can provide similar functions, there are still obvious deficiencies in the processing and optimization of the IIDP platform for complex meta-models.

[0003] For example, the existing methods cannot efficiently perform dynamic indexing and synchronous update of model files in large-scale projects, and lack effective completion prompts and coloring navigation support for method parameters annotated with custom annotations. In addition, the functions of generating static variables and generating custom getter and setter methods have not been perfectly applied in the current IDEA development environment, and cannot effectively improve the development efficiency of the IDEA development environment. Summary of the Invention

[0004] Embodiments of the present application provide a method, apparatus, and medium for processing a meta-model in an IDEA development environment to solve the problems existing in the related technologies. The technical solutions are as follows:

[0005] In a first aspect, an embodiment of the present application provides a method for processing a meta-model in an IDEA development environment, which is characterized by including:

[0006] Initializing a meta-model enhancement plugin in the IIDP platform and configuring the dependency libraries and environment variables required by the meta-model enhancement plugin;

[0007] Invoking the meta-model enhancement plugin to perform dynamic indexing and synchronous update caching on file information related to the meta-model in the current project;

[0008] Invoking the meta-model enhancement plugin to perform intelligent completion, coloring, jump, and detection processing on target method parameters in the meta-model, where the target method parameters refer to method parameters annotated with custom annotations;

[0009] Invoking the meta-model enhancement plugin to perform intelligent hint and jump detection processing on the attributes of custom annotations in the meta-model;

[0010] Invoking the meta-model enhancement plugin to generate static variables related to model information according to specified annotations in the meta-model and provide intelligent completion prompts for the static variables;

[0011] Call the meta-model enhancement plug-in to automatically generate `get` methods and `set` methods applicable to the meta-model according to the `@Getter` annotation and `@Setter` annotation on the model attributes of the meta-model;

[0012] Save the processed meta-model on the IIDP platform.

[0013] In one implementation, calling the meta-model enhancement plug-in to perform dynamic indexing and synchronous update caching on the file information related to the meta-model in the current project includes:

[0014] Call the meta-model enhancement plug-in to traverse all files in the current project and identify the files containing the meta-model definition among all the files to obtain meta-model files;

[0015] Extract the model name, model attributes, and model methods of the meta-model file to obtain file information related to the meta-model;

[0016] Cache the file information in memory and establish a target index between the file information and the meta-model;

[0017] Call the meta-model enhancement plug-in to access the meta-model according to the target index, and after the meta-model is updated, synchronously update the file information cached in the memory.

[0018] In one implementation, calling the meta-model enhancement plug-in to perform intelligent completion, coloring, jumping, and detection processing on the target method parameters in the meta-model includes:

[0019] Call the meta-model enhancement plug-in to parse the annotation information in the target method parameters and identify the annotation types of the target method parameters;

[0020] Call the meta-model enhancement plug-in to perform syntax coloring processing on the target method parameters according to the annotation types;

[0021] Call the meta-model enhancement plug-in to add a jump navigation function to the target method parameters;

[0022] Call the meta-model enhancement plug-in to provide intelligent completion prompts for the target method parameters and perform syntax and logic detection processing.

[0023] In one implementation, calling the meta-model enhancement plug-in to perform intelligent hinting and jump detection processing on the attributes of the custom annotations in the meta-model includes:

[0024] Call the meta-model enhancement plug-in to parse the custom annotation and extract the target attributes in the custom annotation;

[0025] Invoke the meta-model enhancement plug-in to provide intelligent completion tips for the target attribute;

[0026] Invoke the meta-model enhancement plug-in to perform syntax coloring on the specified attribute in the target attribute and add a jump function;

[0027] Invoke the meta-model enhancement plug-in to perform validity detection on the specified attribute.

[0028] In one implementation, invoking the meta-model enhancement plug-in to generate static variables related to model information according to the specified annotations in the meta-model and provide intelligent completion tips for the static variables includes:

[0029] Invoke the meta-model enhancement plug-in to parse the specified annotation and generate the static variable according to the parsing result;

[0030] Invoke the meta-model enhancement plug-in to provide intelligent completion tips for the static variable.

[0031] In one implementation, invoking the meta-model enhancement plug-in to automatically generate 'get' methods and'set' methods applicable to the meta-model according to the '@Getter' annotation and '@Setter' annotation on the model attributes of the meta-model includes:

[0032] Invoke the meta-model enhancement plug-in to parse the '@Getter' annotation, obtain the attribute type and name of the '@Getter' annotation, and automatically generate a custom 'get' method according to the attribute type and name of the '@Getter' annotation;

[0033] Invoke the meta-model enhancement plug-in to parse the '@Setter' annotation, obtain the attribute type and name of the '@Getter' annotation, and automatically generate a custom'set' method according to the attribute type and name of the '@Getter' annotation;

[0034] Insert the 'get' method and the'set' method into the corresponding model class in the meta-model.

[0035] In one implementation, the method further includes:

[0036] Invoke the meta-model enhancement plug-in to count the total number of meta-models, model attributes, and model methods for the file information related to the meta-model in the cache and display the statistical results;

[0037] The method further includes:

[0038] Invoke the meta-model enhancement plugin to provide a user interface operation entry, and the user interface operation entry allows to manually start the scanning process of the file information related to the meta-model in the cache.

[0039] In a second aspect, an embodiment of the present application further provides a meta-model processing device in the IDEA development environment, including:

[0040] A configuration unit for initializing the meta-model enhancement plugin in the IIDP platform and configuring the dependency libraries and environment variables required by the meta-model enhancement plugin;

[0041] A processing unit for invoking the meta-model enhancement plugin to perform dynamic indexing and synchronous update of the cache on the file information related to the meta-model in the current project; invoking the meta-model enhancement plugin to perform intelligent completion, coloring, jump, and detection processing on the target method parameters in the meta-model, where the target method parameters refer to the method parameters annotated with custom annotations; invoking the meta-model enhancement plugin to perform intelligent hint and jump detection processing on the attributes of the custom annotations in the meta-model; invoking the meta-model enhancement plugin to generate static variables related to model information according to the specified annotations in the meta-model and provide intelligent completion hints for the static variables; invoking the meta-model enhancement plugin to automatically generate 'get' methods and'set' methods applicable to the meta-model according to the '@Getter' annotation and '@Setter' annotation on the model attributes of the meta-model; saving the processed meta-model on the IIDP platform.

[0042] In one implementation, when the processing unit is used to invoke the meta-model enhancement plugin to perform dynamic indexing and synchronous update of the cache on the file information related to the meta-model in the current project, it is specifically used for:

[0043] Invoke the meta-model enhancement plugin to traverse all files in the current project and identify the files containing meta-model definitions among all the files to obtain meta-model files;

[0044] Extract the model name, model attributes, and model methods of the meta-model files to obtain file information related to the meta-model;

[0045] Cache the file information in the memory and establish a target index between the file information and the meta-model;

[0046] Invoke the meta-model enhancement plugin to access the meta-model according to the target index, and after the meta-model is updated, synchronously update the file information cached in the memory.

[0047] In one embodiment, when the processing unit is used to call the meta-model enhancement plug-in to perform intelligent completion, coloring, jumping, and detection processing on the target method parameters in the meta-model, it is specifically used for:

[0048] Call the meta-model enhancement plug-in to parse the annotation information in the target method parameter and identify the annotation type of the target method parameter;

[0049] Call the meta-model enhancement plug-in to perform syntax coloring processing on the target method parameter according to the annotation type;

[0050] Call the meta-model enhancement plug-in to add a jump navigation function to the target method parameter;

[0051] Call the meta-model enhancement plug-in to provide intelligent completion prompts for the target method parameter and perform syntax and logic detection processing.

[0052] In one embodiment, when the processing unit is used to call the meta-model enhancement plug-in to perform intelligent prompting and jump detection processing on the attributes of the custom annotation in the meta-model, it is specifically used for:

[0053] Call the meta-model enhancement plug-in to parse the custom annotation and extract the target attributes in the custom annotation;

[0054] Call the meta-model enhancement plug-in to provide intelligent completion prompts for the target attributes;

[0055] Call the meta-model enhancement plug-in to perform syntax coloring processing on the specified attributes in the target attributes and add a jump function;

[0056] Call the meta-model enhancement plug-in to perform validity detection processing on the specified attributes.

[0057] In one embodiment, when the processing unit is used to call the meta-model enhancement plug-in to generate static variables related to model information according to the specified annotation in the meta-model and provide intelligent completion prompts for the static variables, it is specifically used for:

[0058] Call the meta-model enhancement plug-in to parse the specified annotation and generate the static variables according to the parsing result;

[0059] Call the meta-model enhancement plug-in to provide intelligent completion prompts for the static variables.

[0060] In one implementation, when the processing unit is used to call the meta-model enhancement plug-in to automatically generate the `get` method and `set` method applicable to the meta-model according to the `@Getter` annotation and `@Setter` annotation on the model attributes of the meta-model, it is specifically used for:

[0061] Call the meta-model enhancement plug-in to parse the `@Getter` annotation, obtain the attribute type and name of the `@Getter` annotation, and automatically generate a custom `get` method according to the attribute type and name of the `@Getter` annotation;

[0062] Call the meta-model enhancement plug-in to parse the `@Setter` annotation, obtain the attribute type and name of the `@Getter` annotation, and automatically generate a custom `set` method according to the attribute type and name of the `@Getter` annotation;

[0063] Insert the `get` method and the `set` method into the corresponding model class in the meta-model.

[0064] In one implementation, the processing unit is further used for: calling the meta-model enhancement plug-in to count the total number of meta-models, model attributes, and model methods for the file information related to the meta-model in the cache, and displaying the statistical results;

[0065] The processing unit is further used for: calling the meta-model enhancement plug-in to provide a user interface operation entry, and the user interface operation entry allows the manual start of the scanning process for scanning the file information related to the meta-model in the cache.

[0066] In a third aspect, an embodiment of the present application further provides a computer device, which includes: a memory and a processor. Instructions are stored in the memory, and the instructions are loaded and executed by the processor to implement the method in any one of the above aspects. Among them, the memory and the processor communicate with each other through an internal connection path.

[0067] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. When the computer program runs on a computer, the method in any one of the above aspects is implemented.

[0068] The advantages or beneficial effects in the above technical solutions at least include:

[0069] This application can effectively improve the efficiency and accuracy of meta-model processing in the IDEA development environment, provide more intelligent code completion, jump, and detection functions, solve the problems of efficiency, accuracy, and maintenance existing in the prior art in the IDEA development environment, simplify the work process and maintenance difficulty for developers in the development based on the IIDP platform, and further improve the coding efficiency and code standardization.

[0070] The above summary is only for the purpose of the specification and is not intended to be limiting in any way. In addition to the illustrative aspects, embodiments, and features described above, further aspects, embodiments, and features of this application will be readily apparent by reference to the drawings and the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0071] In the drawings, unless otherwise specified, the same reference numerals throughout the several views represent the same or similar components or elements. These drawings are not necessarily drawn to scale. It should be understood that these drawings only depict some embodiments disclosed in this application and should not be regarded as limiting the scope of this application.

[0072] Figure 1 It is a flowchart example of a meta-model processing method in the IDEA development environment provided by an embodiment of this application;

[0073] Figure 2 It is a flowchart example of a meta-model processing method in the IDEA development environment provided by an embodiment of this application;

[0074] Figure 3 It is a flowchart example of another meta-model processing method in the IDEA development environment provided by an embodiment of this application;

[0075] Figure 4 It is a structural block diagram of a meta-model processing device in the IDEA development environment provided by an embodiment of this application;

[0076] Figure 5 It is a structural block diagram of a computer device provided by an embodiment of this application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0077] In the following, only some exemplary embodiments are briefly described. As those skilled in the art can recognize, the described embodiments can be modified in various different ways without departing from the spirit or scope of this application. Therefore, the drawings and the description are considered to be exemplary in nature rather than restrictive.

[0078] In the related art, it is impossible to efficiently perform dynamic indexing and synchronous updating on model files in large-scale projects, and there is a lack of effective completion prompts and coloring navigation support for method parameters marked with custom annotations. In addition, the functions of generating static variables and generating custom getter and setter methods have not been perfectly applied in the current IDEA development environment, and the development efficiency of the IDEA development environment cannot be effectively improved.

[0079] Specifically, the existing technologies mainly face the following problems:

[0080] (1) Dynamic indexing and synchronization problems: Traditional methods usually perform a global static scan of the entire project, which not only takes a long time but also cannot achieve real-time updates when there are local changes in the model files, resulting in the mismatch between the index data and the actual project content, thus affecting the development efficiency and accuracy.

[0081] (2) Lack of processing for method parameters: The current IDEA plugins can only provide basic coloring and jump support for method parameters marked with specific annotations, lacking precise completion prompts and error detection for method parameters. In particular, the semantics of custom annotations cannot be parsed, seriously affecting the convenience and reliability of code writing.

[0082] (3) Limitations in annotation processing: Existing methods cannot automatically prompt and complete the attributes in complex annotations, such as name and parent in the @Model annotation. This causes developers to make mistakes easily when manually filling in annotation attributes, and also lacks functions for jumping and detecting annotation content, increasing the difficulty of code maintenance.

[0083] (4) Generation and prompting of static variables: In traditional methods, generating static variables usually relies on manual operations, which is both time-consuming and error-prone. Moreover, the existing prompt system cannot effectively provide real-time completion prompts for the generated static variables, affecting the fluency and accuracy of code writing.

[0084] Based on this, the embodiments of the present application provide a meta-model processing solution in the IDEA development environment to effectively solve the above problems:

[0085] (1) Support dynamic indexing and synchronous updating: Index and cache the model files in the current project, which can effectively support synchronous updating after local changes in the model name, model attributes, and methods, ensuring the real-time accuracy of the index.

[0086] (2) Enhanced processing of method parameters: Support coloring, jumping, detecting, and completion prompting for method parameters marked with @ModelName, @ModelField, and @ModelMethod annotations in method parameters, greatly improving the code writing experience and accuracy.

[0087] (3) Intelligent hint for annotation attributes: Support the completion hint for name and parent in the @Model annotation, making the annotation writing faster and more accurate. At the same time, colorize, jump to, and detect the parent, simplifying the code maintenance work.

[0088] (4) Newly added static variable, getter, and setter method generation and completion functions: Based on the @StaticVar, @Getter, and @Setter annotations, automatically generate static variables and getter / setter methods related to model information, including model names, model attributes, and model methods, and provide intelligent hint completion for static variables, improving development efficiency.

[0089] Through the above improvements provided by the embodiments of the present application, the efficiency and accuracy of meta-model processing can be significantly improved, bringing significant convenience to code writing and maintenance in the IDEA development environment.

[0090] The technical solutions provided by the embodiments of the present application will be described in detail below with reference to the accompanying drawings.

[0091] Figure 1 The flowchart of the meta-model processing method in the IDEA development environment according to an embodiment of the present application is shown. As Figure 1 shown, the method may include the following steps:

[0092] S110. Initialize the meta-model enhancement plugin in the IIDP platform, and configure the dependency libraries and environment variables required by the meta-model enhancement plugin.

[0093] In one implementation, step S110 may include correctly installing the Java development environment and the Java package sie-iidp-plugin.

[0094] In the embodiments of the present application, by executing buS10, it can be ensured that the meta-model enhancement plugin can work properly in the IDEA development environment.

[0095] S120. Call the meta-model enhancement plugin to perform dynamic indexing and synchronous update caching on the file information related to the meta-model in the current project.

[0096] In one implementation, the implementation process of step S120 may include the following steps:

[0097] S121. Call the meta-model enhancement plugin to traverse all files in the current project, and identify the files containing meta-model definitions in all files to obtain meta-model files.

[0098] Exemplarily, in step S121, all files that may contain model definitions in the current project can be traversed, and then the files containing model definitions can be identified according to the file content.

[0099] As an example, according to the development specifications of the IIDP platform, all meta-model definitions are unified under the model package and declared through the @Model annotation. For example:

[0100] @Model(name = "operator_log", parent = "operator_log", displayName = "Operation Log", isAutoLog = Bool.True,

[0101] type = Model.ModelType.Buss)

[0102] public class OperatorLog extends BaseModel <operatorlog>{

[0103] @Property(displayName = "id")

[0104] private String id;

[0105] @Property(displayName = "Access Time", dataType = DataType.DATE_TIME)

[0106] private Date accessStartTime;

[0107] @Property(displayName = "App Name")

[0108] private String appName;

[0109] @Property(displayName = "Model Name")

[0110] private String logModelName;

[0111] @Property(displayName = "Service Name")

[0112] private String serviceName;

[0113] @MethodService(auth = "search", description = "Create")

[0114] public List <operatorlog>search(RecordSet r,Filter filter,List <string>properties, Integer limit, Integer offset, String order) {

[0115] return LogStorageService.queryLog(filter, properties, limit, offset, order);

[0116] }

[0117] }

[0118] From the above example, the files containing model definitions can be identified based on the model package.

[0119] S122. Extract the model name, model properties, and model methods of this metamodel file to obtain file information related to the metamodel.

[0120] Exemplarily, from the above example, the model operator_log annotated with @Model, the properties id, appName, serviceName, etc. annotated with @Property, and the method search annotated with @MethodService can be extracted.

[0121] S123. Cache the file information related to the metamodel in memory and establish a target index between this file information and the metamodel.

[0122] Exemplarily, based on the above example, the information related to the metamodel operator_log can be obtained. All this information will be cached as metadata in the in-memory map. In this case, the target index can use the model name as the key of the map, and the value is the detailed information of the metamodel operator_log, including the model name, fully qualified name, property list, method list, parent model, etc.

[0123] S124. Call this metamodel enhancement plugin to access the metamodel according to the target index, and after the metamodel is updated, synchronously update the file information related to the metamodel cached in memory.

[0124] Exemplarily, in the actual usage process, based on the above example, by calling the metamodel enhancement plugin, the detailed information of the metamodel can be quickly indexed by the model name according to the target index. In addition, the information of the parent model can also be quickly indexed by the parent model. Since the in-memory map is used, fast access and update can be achieved.

[0125] In the embodiment of the present application, by executing step S120, it is possible to dynamically index and synchronously update the file information related to the meta-model in the current project, so as to ensure that when the meta-model undergoes partial changes, the index information can be automatically synchronously updated.

[0126] S130. Invoke the meta-model enhancement plug-in to perform intelligent completion, coloring, jump, and detection processing on the target method parameters in the meta-model.

[0127] In one implementation, the target method parameter is a method parameter annotated with a custom annotation.

[0128] Exemplarily, the target method parameter can be a method parameter annotated with the `@ModelName`, `@ModelField`, or `@ModelMethod` annotation.

[0129] In one implementation, the implementation process of step S130 may include the following steps:

[0130] S131. Invoke the meta-model enhancement plug-in to parse the annotation information in the target method parameter and identify the annotation type of the target method parameter.

[0131] S132. Invoke the meta-model enhancement plug-in to perform syntax coloring processing on the target method parameter according to the annotation type.

[0132] In the embodiment of the present application, by executing step S132, it is convenient to identify the target method parameter.

[0133] S133. Invoke the meta-model enhancement plug-in to add a jump navigation function to the target method parameter.

[0134] In the embodiment of the present application, by executing step S133, it is possible to support developers to quickly locate relevant model information.

[0135] S134. Invoke the meta-model enhancement plug-in to provide intelligent completion prompts for the target method parameter and perform syntax and logic detection processing.

[0136] In the embodiment of the present application, by executing step S134, it is possible to ensure the correctness of the code of the target method parameter.

[0137] In the embodiment of the present application, by executing step S130, it is possible to provide intelligent processing and completion prompts for method parameter annotations, support intelligent prompts and jump detection for annotation attributes, and achieve the purpose of effectively providing completion prompts and coloring navigation support for method parameters annotated with custom annotations.

[0138] S140. Invoke the meta-model enhancement plug-in to perform intelligent prompt and jump detection processing on the attributes of the custom annotation in the meta-model.

[0139] In one implementation, the implementation process of step S140 may include the following steps:

[0140] S141. Invoke the meta-model enhancement plug-in to parse the custom annotation in the meta-model and extract the target attributes in the custom annotation.

[0141] As an example, taking the custom annotation as the '@Model' annotation, the meta-model enhancement plug-in can be invoked to parse the '@Model' annotation in the meta-model and extract the 'name' attribute and the 'parent' attribute in the '@Model' annotation. That is, in this example, the target attributes include the 'name' attribute and the 'parent' attribute.

[0142] S142. Invoke the meta-model enhancement plug-in to provide intelligent completion hints for the target attributes.

[0143] Exemplarily, according to the above example, the meta-model enhancement plug-in can be invoked to provide intelligent completion hints for the 'name' attribute and the 'parent' attribute.

[0144] For example, when building a filter query in business code, as follows:

[0145] Filter f1 = Filter.equal("appName", valuesList.stream().map(m -> m.get("appN ame")).collect(Collectors.toList()));

[0146] Filter f2 = Filter.equal("logModelName", valuesList.stream().map(m -> m.get("logModelName")).collect(Collectors.toList()));

[0147] Filter f3 = Filter.equal("serviceName", valuesList.stream().map(m -> m.get("ser viceName")).collect(Collectors.toList()));

[0148] List<Map<String, Object>> ret = recordSet.getMeta().get(Blacklist.MODEL_NAME).search(Filter.AND(f1, f2, f3), Collections.singletonList("id"), 1, 0, null);

[0149] When a string with the word "app" is entered as the input parameter of Filter.equal(), the conventional intelligent prompt cannot help with completion because it is an ordinary string. However, when step S142 is executed, the meta-model enhancement plugin will recognize that the declaration of the equal method requires a model name (because the formal parameter contains the @ModelName annotation), and it will automatically scan the previously created in-memory map and match all model names starting with "app" according to the prefix. Similarly, when a parent model is required, it can also be indexed from the previously created in-memory map.

[0150] In the embodiment of the present application, by executing step S142, manual input errors can be reduced.

[0151] S143. Invoke the meta-model enhancement plugin to perform syntax coloring processing on the specified attribute in the target attribute and add a jump function.

[0152] As an example, taking the custom annotation as the '@Model' annotation, the specified attribute can be the 'parent' attribute.

[0153] In the embodiment of the present application, by executing step S143, it is possible to support jump detection for custom annotation attributes based on common methods in the industry combined with the syntax rules and language elements of the IIDP platform itself, facilitating developers to quickly locate the relevant parent model.

[0154] S144. Invoke the meta-model enhancement plugin to perform validity detection processing on the specified attribute.

[0155] In specific implementation, all validity detections and corrections are performed based on the information of the scanned meta-model file and files related to the meta-model that are saved in the in-memory map. If there is information on files related to the meta-model, it can be correctly referenced and detected; otherwise, a warning is given.

[0156] Although 'parent' in the above example is a language element of the IIDP platform, it is also an ordinary meta-model and can naturally be detected and judged.

[0157] In the embodiments of the present application, by executing step S144, it can be ensured that the referenced parent model exists and is correct.

[0158] In the embodiments of the present application, by executing step S140, it is possible to support intelligent prompting and jump detection for custom annotation attributes. For example, it supports intelligent completion prompts for the 'name' attribute and 'parent' attribute in the '@Model' annotation, and supports coloring, jumping, and detection functions for the 'parent' attribute.

[0159] Currently, although many IDEs also provide functions such as element coloring, jump navigation, and intelligent completion, they are all for the existing programming languages that everyone in the industry is using, such as Java, etc. However, the present application is directed to the IIDP platform, which has its own syntax rules and language elements. Conventional coloring and jumping functions cannot meet the requirements, so it is necessary to re-develop the language intelligent recognition function in combination with the unique features of the IIDP platform. By executing the above steps S130 and S140, the present application can support re-developing the language intelligent recognition function for the unique features of the IIDP platform itself.

[0160] S150. Call the meta-model enhancement plug-in to generate static variables related to model information according to the specified annotation in the meta-model, and provide intelligent completion prompts for the static variables.

[0161] As an example, the specified annotation can be the '@StaticVar' annotation.

[0162] In one implementation, the static variables may include but are not limited to: model names, model attributes, and model methods.

[0163] In one implementation, the implementation process of step S150 may include the following steps:

[0164] S151. Call the meta-model enhancement plug-in to parse the specified annotation and generate static variables according to the parsing result.

[0165] As an example, step S151 can be executed based on the industry's Pluggable Annotations Processing API (Insertable Annotation Processing API), and its implementation method is different from the method commonly used in the industry to generate getter and setter methods, that is, the meta-model enhancement plug-in combines the characteristics of the IIDP platform to generate static meta-model information. For example, in the following example, many static variable representations of property literals are generated for the User meta-model:

[0166] public class User extends BaseModel{

[0167] public static final String F_BOOK_SUBCLASS_LIST = "bookSubclassList";

[0168] public static final String F_USER_I_D = "userID";

[0169] public static final String F_FULL_NAME = "fullName";

[0170] public static final String F_REMARK = "remark";

[0171] public static final String F_CLASSIFICATION_NAME = "classificationName";

[0172] public static final String F_CLASSIFICATION_CODE = "classificationCode";

[0173] public static final String F_IS_ENABLE = "isEnable";

[0174] public static final String M_EXCEL_EXPORT = "excelExport";

[0175] public static final String M_GEN_CLASSIFICATION_CODE = "genClassificationCode";

[0176] public static final String MODEL_NAME = "user";

[0177] }

[0178] S152. Call the meta-model enhancement plug-in to provide intelligent completion tips for this static variable.

[0179] As an example, the open interface provided by IDEA can be used to execute step S152.

[0180] In the embodiment of the present application, by executing step S152, it is convenient for developers to quickly use static variables.

[0181] In the embodiment of the present application, by executing step S150, it is possible to support the generation and prompting function of static variables for newly added model information.

[0182] S160. Call the meta-model enhancement plug-in to automatically generate the 'get' method and'set' method applicable to the meta-model according to the '@Getter' annotation and '@Setter' annotation on the model attributes of the meta-model.

[0183] In one implementation manner, the implementation process of step S160 may include the following steps:

[0184] S161. Call the meta-model enhancement plug-in to parse the '@Getter' annotation, obtain the attribute type and name of the '@Getter' annotation, and automatically generate a custom 'get' method according to the attribute type and name of the '@Getter' annotation.

[0185] S162. Call the meta-model enhancement plug-in to parse the '@Setter' annotation, obtain the attribute type and name of the '@Getter' annotation, and automatically generate a custom'set' method according to the attribute type and name of the '@Getter' annotation.

[0186] In specific implementation, step S161 and step S162 may be executed synchronously, or step S161 and step S162 may be executed in a corresponding sequence. The embodiment of the present application does not limit this.

[0187] S163. Insert the 'get' method and the'set' method into the corresponding model class in the meta-model.

[0188] In the embodiment of the present application, by executing step S163, the code standardization and integrity of the meta-model can be ensured.

[0189] As an example, in combination with the User meta-model in the above example, the above steps S161 - S163 can be implemented by the following code:

[0190] public User setBookSubclassList(List <person>bookSubclassList){

[0191] this.set("bookSubclassList", bookSubclassList);

[0192] return this;

[0193] }

[0194] public User setUserID(Integer userID){

[0195] this.set("userID", userID);

[0196] return this;

[0197] }

[0198] public User setFullName(String fullName){

[0199] this.set("fullName", fullName);

[0200] return this;

[0201] }

[0202] public User setRemark(String remark){

[0203] this.set("remark", remark);

[0204] return this;

[0205] }

[0206] public User setClassificationName(String classificationName){

[0207] this.set("classificationName", classificationName);

[0208] return this;

[0209] }

[0210] public User setClassificationCode(String classificationCode){

[0211] this.set("classificationCode",classificationCode);

[0212] return this;

[0213] }

[0214] public User setIsEnable(Boolean isEnable){

[0215] this.set("isEnable",isEnable);

[0216] return this;

[0217] }

[0218] In the embodiment of the present application, by executing step S160, it is possible to support automatically generating `get` methods and `set` methods applicable to the meta-model according to the `@Getter` annotation and `@Setter` annotation on the model attributes of the meta-model. Moreover, in the embodiment of the present application, the `getter` methods and `setter` methods generated by the meta-model enhancement plug-in are customized by the IIDP platform.

[0219] S170. Save the processed meta-model on the IIDP platform.

[0220] In summary, the meta-model processing method provided in the embodiment of the present application in the IDEA development environment can effectively improve the processing efficiency and accuracy of the meta-model in the IDEA development environment, provide more intelligent code completion, jump, and detection functions, solve the problems of efficiency, accuracy, and maintenance existing in the prior art in the IDEA development environment, simplify the work process and maintenance difficulty of developers in developing based on the IIDP platform, and further improve the coding efficiency and code standardization.

[0221] In practical applications, the current IDEA development tool lacks support for the statistical information of the scanned model, and developers cannot intuitively understand the distribution and total amount of models, attributes, and methods in the project, which is not conducive to the overall control and optimization of the project.

[0222] In view of the above problems, in an applicable scenario provided by the embodiments of the present application, a function for viewing model statistics information can be provided: support for viewing the model statistics information after scanning, including the total number of models, the total number of attributes, and the total number of methods, so that developers can globally control the distribution of models in the project.

[0223] Specifically, in the above scenario, in combination with Figure 1 and Figure 2 as shown, the method for processing the meta-model in the IDEA development environment provided by the embodiments of the present application may further include the following steps:

[0224] S180. Invoke the meta-model enhancement plugin to count the total number of meta-models, model attributes, and model methods for the file information related to the meta-model in the cache, and display the statistical results.

[0225] In one implementation manner, it can be known from the above step S120 that the entire meta-model information has been scanned and stored in the memory map, so the meta-model information can be counted according to specific requirements, such as how many meta-models are included, what the specific attributes and methods included in each meta-model are, etc. That is, in the embodiments of the present application, the meta-model enhancement plugin provides a visual interface for users to query this information.

[0226] In one implementation manner, the statistical results can be displayed in the tool view of IDEA, enabling developers to intuitively understand the model situation in the project.

[0227] In practical applications, due to the lack of an efficient dynamic scanning function for project files in the existing methods, when it is necessary to obtain the latest model information, developers can only rely on manual operations, which increases the complexity and uncertainty of the work.

[0228] In view of the above problems, in another applicable scenario provided by the embodiments of the present application, a manual scanning support function can be provided: support for manually scanning the model information of the entire project files and the currently open file, ensuring that the latest data can be obtained at any time.

[0229] Specifically, in the above scenario, in combination with Figures 1-3 as shown, the method for processing the meta-model in the IDEA development environment provided by the embodiments of the present application may further include the following steps:

[0230] S190. Invoke the meta-model enhancement plugin to provide a user interface operation entry.

[0231] In one implementation manner, this user interface operation entry allows the manual initiation of the scanning process of the file information related to the meta-model in the cache.

[0232] In one implementation manner, the above scanning process may be as follows:

[0233] According to the above step S120, scan the project file or the currently opened file, and update the cache information; then update the model statistics information according to the scan results.

[0234] In specific implementation, the embodiments of the present application do not limit the execution order of step S180 and step S190.

[0235] From the above description, it can be seen that the present application can effectively improve the processing efficiency and accuracy of the meta-model in the IDEA development environment, provide more intelligent code completion, jump, and detection functions, solve the problems of efficiency, accuracy, and maintenance in the existing technology in the IDEA development environment, simplify the work process and maintenance difficulty of developers in developing based on the IIDP platform, and further improve the coding efficiency and code standardization.

[0236] Figure 4 The structural block diagram of the meta-model processing device in the IDEA development environment according to an embodiment of the present application is shown. As Figure 4 shown, the device may include:

[0237] A configuration unit 210, configured to initialize the meta-model enhancement plug-in in the IIDP platform, and configure the dependency libraries and environment variables required by the meta-model enhancement plug-in;

[0238] A processing unit 220, configured to call the meta-model enhancement plug-in to perform dynamic indexing and synchronous update of the cache on the file information related to the meta-model in the current project; call the meta-model enhancement plug-in to perform intelligent completion, coloring, jump, and detection processing on the target method parameters in the meta-model, where the target method parameters refer to the method parameters annotated with custom annotations; call the meta-model enhancement plug-in to perform intelligent hint and jump detection processing on the attributes of the custom annotations in the meta-model; call the meta-model enhancement plug-in to generate static variables related to the model information according to the specified annotations in the meta-model, and provide intelligent completion hints for the static variables; call the meta-model enhancement plug-in to automatically generate `get` methods and `set` methods applicable to the meta-model according to the `@Getter` annotation and `@Setter` annotation on the model attributes of the meta-model; save the processed meta-model on the IIDP platform.

[0239] In an implementation manner, when the processing unit 220 is used to call the meta-model enhancement plug-in to perform dynamic indexing and synchronous update of the cache on the file information related to the meta-model in the current project, it is specifically used for:

[0240] Call the meta-model enhancement plug-in to traverse all files in the current project, and identify the files containing the meta-model definition in all files to obtain the meta-model files;

[0241] Extract the model name, model attributes, and model methods of the meta-model file to obtain file information related to the meta-model;

[0242] Cache the file information in memory and establish a target index between the file information and the meta-model;

[0243] Call the meta-model enhancement plugin to access the meta-model according to the target index, and synchronously update the file information cached in memory after the meta-model is updated.

[0244] In one implementation, when the processing unit 220 is used to call the meta-model enhancement plugin to perform intelligent completion, coloring, jumping, and detection processing on the target method parameters in the meta-model, it is specifically used for:

[0245] Call the meta-model enhancement plugin to parse the annotation information in the target method parameters and identify the annotation types of the target method parameters;

[0246] Call the meta-model enhancement plugin to perform syntax coloring processing on the target method parameters according to the annotation types;

[0247] Call the meta-model enhancement plugin to add a jump navigation function to the target method parameters;

[0248] Call the meta-model enhancement plugin to provide intelligent completion prompts for the target method parameters and perform syntax and logic detection processing.

[0249] In one implementation, when the processing unit 220 is used to call the meta-model enhancement plugin to perform intelligent hinting and jump detection processing on the attributes of custom annotations in the meta-model, it is specifically used for:

[0250] Call the meta-model enhancement plugin to parse the custom annotation and extract the target attributes in the custom annotation;

[0251] Call the meta-model enhancement plugin to provide intelligent completion prompts for the target attributes;

[0252] Call the meta-model enhancement plugin to perform syntax coloring processing on the specified attributes in the target attributes and add a jump function;

[0253] Call the meta-model enhancement plugin to perform validity detection processing on the specified attributes.

[0254] In one implementation, when the processing unit 220 is used to call the meta-model enhancement plugin to generate static variables related to model information according to the specified annotations in the meta-model and provide intelligent completion prompts for the static variables, it is specifically used for:

[0255] Call the meta-model enhancement plugin to parse the specified annotation and generate static variables according to the parsing results;

[0256] Call the meta-model enhancement plug-in to provide intelligent completion tips for static variables.

[0257] In one embodiment, when the processing unit 220 is used to call the meta-model enhancement plug-in to automatically generate the 'get' method and'set' method applicable to the meta-model according to the '@Getter' annotation and '@Setter' annotation on the model attributes of the meta-model, it is specifically used for:

[0258] Call the meta-model enhancement plug-in to parse the '@Getter' annotation, obtain the attribute type and name of the '@Getter' annotation, and automatically generate a custom 'get' method according to the attribute type and name of the '@Getter' annotation;

[0259] Call the meta-model enhancement plug-in to parse the '@Setter' annotation, obtain the attribute type and name of the '@Getter' annotation, and automatically generate a custom'set' method according to the attribute type and name of the '@Getter' annotation;

[0260] Insert the 'get' method and'set' method into the corresponding model class in the meta-model.

[0261] In one embodiment, the processing unit 220 is further used for: calling the meta-model enhancement plug-in to count the total number of meta-models, model attributes, and model methods for the file information related to the meta-model in the cache, and display the statistical results;

[0262] The processing unit 220 is further used for: calling the meta-model enhancement plug-in to provide a user interface operation entry, and the user interface operation entry allows the manual start of the scanning process of scanning the file information related to the meta-model in the cache.

[0263] For the functions of each unit in the meta-model processing device in the IDEA development environment in the embodiments of the present application, reference can be made to the corresponding descriptions in the above methods, which will not be elaborated here.

[0264] Figure 5 Show a structural block diagram of a computer device according to an embodiment of the present application. As Figure 5 shown, the computer device includes: a memory 310 and a processor 320. Instructions are stored in the memory 310, and the instructions are loaded and executed by the processor 320 to implement the meta-model processing method in the IDEA development environment in the above embodiments. The number of the memory 310 and the processor 320 can be one or more.

[0265] The computer device further includes:

[0266] A communication interface 330, used to communicate with external devices for data interaction and transmission.

[0267] If the memory 310, the processor 320, and the communication interface 330 are implemented independently, the memory 310, the processor 320, and the communication interface 330 can be interconnected via a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 only a thick line is used to represent it in Figure 5 , but it does not mean that there is only one bus or one type of bus.

[0268] Optionally, in a specific implementation, if the memory 310, the processor 320, and the communication interface 330 are integrated on a single chip, the memory 310, the processor 320, and the communication interface 330 can communicate with each other through an internal interface.

[0269] The embodiments of the present application provide a computer-readable storage medium. A computer program is stored in the computer-readable storage medium. When the computer program runs on a computer, the methods provided in the embodiments of the present application are implemented.

[0270] The embodiments of the present application also provide a chip. The chip includes a processor for calling and running instructions stored in a memory, so that a communication device installed with the chip executes the methods provided in the embodiments of the present application.

[0271] The embodiments of the present application also provide a chip, including: an input interface, an output interface, a processor, and a memory. The input interface, the output interface, the processor, and the memory are connected through an internal connection path. The processor is used to execute the code in the memory. When the code is executed, the processor is used to execute the methods provided in the embodiments of the application.

[0272] It should be understood that the above-mentioned processor can be a Central Processing Unit (CPU), or other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc. It is worth noting that the processor can be a processor that supports the Advanced RISC Machines (ARM) architecture.

[0273] Further, optionally, the above-mentioned memory can include a read-only memory and a random access memory, and can also include a non-volatile random access memory. The memory can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can include a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can include a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available. For example, static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct rambus random access memory (DR RAM).

[0274] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions according to the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium.

[0275] In the description of this specification, the descriptions referring to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples", etc. mean that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. Moreover, the specific features, structures, materials, or characteristics described can be combined in a suitable manner in any one or more embodiments or examples. In addition, without contradiction, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples.

[0276] Any process or method description represented in the flowchart or described in other ways herein can be understood to represent a module, segment, or part of code including one or more executable instructions for implementing a specific logical function or process. And the scope of the preferred embodiments of the present application includes additional implementations, where the functions can be executed in a substantially simultaneous manner or in a reverse order according to the involved functions, rather than in the order shown or discussed.

[0277] The logic and / or steps represented in the flowchart or described in other ways herein, for example, can be considered as a sequenced list of executable instructions for implementing a logical function, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other systems that can fetch and execute instructions from the instruction execution system, apparatus, or device), or in combination with these instruction execution systems, apparatus, or devices.

[0278] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. All or part of the steps of the method in the above embodiments can be completed by a program instructing relevant hardware. The program can be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of the steps of the method embodiment.

[0279] In addition, each functional unit in various embodiments of the present application may be integrated into a processing module, or each unit may exist physically alone, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the above-mentioned integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium. The storage medium may be a read-only memory, a magnetic disk, an optical disc, or the like.

[0280] The above are only specific embodiments of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art within the technical scope disclosed in the present application can easily think of various changes or substitutions, and these should all be covered within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.< / person> < / string> < / operatorlog> < / operatorlog>

Claims

1. A metamodel processing method in an IDEA development environment, characterized in that: include: Initialize the metamodel enhancement plug-in in the IIDP platform, and configure the dependent libraries and environment variables required by the metamodel enhancement plug-in; Calling the metamodel enhancement plug-in to dynamically index and synchronously update cache of file information related to the metamodel in the current project; Calling the metamodel enhancement plug-in to perform intelligent completion, coloring, jump and detection processing on the target method parameters in the metamodel, wherein the target method parameters refer to the method parameters annotated with custom annotations; Calling the metamodel enhancement plug-in to perform intelligent prompting and jump detection processing on the custom annotations in the metamodel; Calling the metamodel enhancement plug-in to generate static variables related to model information according to specified annotations in the metamodel, and providing intelligent completion prompts for the static variables; Calling the metamodel enhancement plug-in to automatically generate a get method and a set method applicable to the metamodel according to the @Getter annotation and the @Setter annotation on the model attribute of the metamodel; Saving the processed meta-model on the IIDP platform; The step of calling the metamodel enhancement plug-in to intelligently complete, colorize, jump, and detect target method parameters in the metamodel includes: Calling the metamodel enhancement plug-in to parse the annotation information in the target method parameter and identify the annotation type of the target method parameter; Calling the metamodel enhancement plug-in to perform syntax coloring on the target method parameters according to the annotation type; Calling the metamodel enhancement plug-in to add a jump navigation function to the target method parameter; Calling the metamodel enhancement plug-in to provide intelligent completion prompts for the target method parameters, and performing syntax and logic detection processing; The step of calling the metamodel enhancement plug-in to perform intelligent prompt and jump detection processing on the custom annotations in the metamodel includes: Calling the metamodel enhancement plug-in to parse the custom annotation and extract the target attribute in the custom annotation; Calling the metamodel enhancement plug-in to provide intelligent completion prompts for the target attributes; Calling the metamodel enhancement plug-in to perform syntax coloring processing on the specified attribute in the target attribute and add a jump function; The metamodel enhancement plug-in is called to perform validity detection processing on the specified attribute.

2. The method according to claim 1, characterized in that Calling the metamodel enhancement plug-in to dynamically index and synchronously update cache of file information related to the metamodel in the current project includes: Calling the metamodel enhancement plug-in to traverse all files in the current project, and identifying files containing metamodel definitions among all the files to obtain metamodel files; Extracting the model name, model attributes and model methods of the metamodel file to obtain file information related to the metamodel; Cache the file information into a memory, and establish a target index between the file information and the meta-model; The metamodel enhancement plug-in is called to access the metamodel according to the target index, and after the metamodel is updated, the file information cached in the memory is synchronously updated.

3. The method according to claim 1, characterized in that Calling the metamodel enhancement plug-in to generate static variables related to model information according to the specified annotations in the metamodel, and providing intelligent completion prompts for the static variables includes: Calling the metamodel enhancement plug-in to parse the specified annotation, and generating the static variable according to the parsing result; The metamodel enhancement plug-in is called to provide intelligent completion prompts for the static variables.

4. The method according to claim 1, characterized in that Calling the metamodel enhancement plug-in to automatically generate a get method and a set method applicable to the metamodel according to the @Getter annotation and the @Setter annotation on the model attribute of the metamodel includes: Calling the metamodel enhancement plug-in to parse the @Getter annotation, obtaining the attribute type and name of the @Getter annotation, and automatically generating a custom get method according to the attribute type and name of the @Getter annotation; Calling the metamodel enhancement plug-in to parse the @Setter annotation, obtain the attribute type and name of the @Getter annotation, and automatically generate a custom set method according to the attribute type and name of the @Getter annotation; The get method and the set method are inserted into the corresponding model class in the metamodel.

5. The method according to any one of claims 1 to 4, characterized in that The method further comprises: Calling the metamodel enhancement plug-in to count the total number of metamodels, model attributes and model methods for the file information related to the metamodel in the cache, and displaying the statistical results; The method further comprises: The meta-model enhancement plug-in is called to provide a user interface operation entry, and the user interface operation entry allows manual initiation of a scanning process for file information related to the meta-model in the scanning cache.

6. A metamodel processing device in an IDEA development environment, characterized in that: include: A configuration unit, used to initialize the metamodel enhancement plug-in in the IIDP platform and configure the dependent libraries and environment variables required by the metamodel enhancement plug-in; A processing unit, used to call the metamodel enhancement plug-in to dynamically index and synchronously update cache of file information related to the metamodel in the current project; Calling the metamodel enhancement plug-in to perform intelligent completion, coloring, jump and detection processing on the target method parameters in the metamodel, wherein the target method parameters refer to the method parameters annotated with custom annotations; calling the metamodel enhancement plug-in to perform intelligent prompts and jump detection processing on the attributes of the custom annotations in the metamodel; calling the metamodel enhancement plug-in to generate static variables related to the model information according to the specified annotations in the metamodel, and provide intelligent completion prompts for the static variables; calling the metamodel enhancement plug-in to automatically generate the get method and set method applicable to the metamodel according to the @Getter annotation and @Setter annotation on the model attributes of the metamodel; saving the processed metamodel on the IIDP platform; Wherein, when the processing unit is used to call the metamodel enhancement plug-in to perform intelligent completion, coloring, jump and detection processing on the target method parameters in the metamodel, it is specifically used to: Calling the metamodel enhancement plug-in to parse the annotation information in the target method parameter and identify the annotation type of the target method parameter; Calling the metamodel enhancement plug-in to perform syntax coloring on the target method parameters according to the annotation type; Calling the metamodel enhancement plug-in to add a jump navigation function to the target method parameter; Calling the metamodel enhancement plug-in to provide intelligent completion prompts for the target method parameters, and performing syntax and logic detection processing; Wherein, when the processing unit is used to call the metamodel enhancement plug-in to perform intelligent prompt and jump detection processing on the custom annotation in the metamodel, it is specifically used to: Calling the metamodel enhancement plug-in to parse the custom annotation and extract the target attribute in the custom annotation; Calling the metamodel enhancement plug-in to provide intelligent completion prompts for the target attributes; Calling the metamodel enhancement plug-in to perform syntax coloring processing on the specified attribute in the target attribute and add a jump function; The metamodel enhancement plug-in is called to perform validity detection processing on the specified attribute.

7. A computer device, characterized in that: include: A memory and a processor, wherein the memory stores instructions, and the instructions are loaded and executed by the processor to implement the method according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed on a computer, the method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Method and device for creating cloud development environment, electronic equipment and storage medium

    CN116225394A

  • Entity object information synchronization method and device and storage medium

    CN116303759A