Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Source code processing method and device

A processing method and source code technology, applied in the field of computer software, can solve problems such as cumbersome operation and error-prone, and achieve the effect of improving the efficiency of development

Active Publication Date: 2019-04-12
BEIJING GRIDSUM TECH CO LTD
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] The main purpose of the present invention is to provide a source code processing method and device to solve the problem in the prior art that when adding source code, a large amount of source code must be manually copied into the XML file, and the operation is cumbersome and error-prone

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Source code processing method and device
  • Source code processing method and device
  • Source code processing method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0021] The embodiment of the present invention provides a source code processing method.

[0022] figure 1 It is a flowchart of a source code processing method according to an embodiment of the present invention. Such as figure 1 As shown, the method includes the following steps:

[0023] In step S10, the source code file containing the source code is added to the designated directory, and the source code file path is generated according to the location of the source code file in the designated directory.

[0024] Specifically, the foregoing source code may be sample code. In an alternative embodiment, the foregoing sample may be a Toolkit control sample in the Silverlight Toolkit application. In this solution, the foregoing sample code may be first Add any designated directory, and generate a path based on the specific location of the above sample code in the above designated directory, through which the above sample code can be obtained.

[0025] Optionally, multiple different sour...

Embodiment 2

[0097] The embodiment of the present invention also provides a source code processing device, such as figure 2 As shown, the device may include:

[0098] The adding unit 20 is used to add a source code file containing the source code to a designated directory, and generate a source code file path according to the location of the source code file in the designated directory.

[0099] Specifically, the above source code may be sample code. In an alternative embodiment, the above sample may be a Toolkit control sample in the Silverlight Toolkit application. In this solution, the above sample code can be first Add any designated directory, and generate a path based on the specific location of the above sample code in the above designated directory, through which the above sample code can be obtained.

[0100] The creating unit 30 is used to create an XML file using the T4 template, where the XML file contains the source code file obtained according to the source code file path.

[0101] ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a source code processing method and device. The source code processing method includes that adding a source code file with source codes to an appointed catalog, and generating a source code file route according to the position of the source code file in the appointed catalog; using a T4 template to create an XML file, wherein the XML file comprises the source code file acquired according to the source code file route; constructing a source code file array according to the source code file acquired through analyzing the XML file; constructing a dictionary according to the source code file in the source code file array and the name thereof, wherein keys of the dictionary are the name of the source code file, and the key values corresponding to the keys of the dictionary are the content of the source code file. The source code processing method and device solve the problem of the prior art that the source code adding is easy to make mistakes due to tedious operation due to the fact that a lot of source codes must be manually copied to the XML file, realize to automatically add sample codes and improve the development efficiency.

Description

Technical field [0001] The present invention relates to the field of computer software, and in particular, to a source code processing method and device. Background technique [0002] The application Silverlight Toolkit provides many examples for its Toolkit controls. The examples include C#, VB, and XAML (eXtensible Application Markup Language) codes to help understand how to use these controls. If you download and After installing the application Silverlight Toolkit, you can view the source code of the sample project in the application, and developers can also add new sample code to the application. [0003] What needs to be explained here is that when adding a new sample to an existing sample framework, the following problem often occurs: every time a new control sample is added, the source code of the control sample must be manually added to the XAML file (Extensible MarkupLanguage, Extensible Markup Language), used to define the display logic, such as several Buttons, Button ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): G06F8/38
CPCG06F8/38
Inventor 马燕龙
Owner BEIJING GRIDSUM TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products