M2Doc | M2Doc technology enables the generation of Office Open XML

 by   ObeoNetwork Java Version: 3.3.0 License: EPL-1.0

kandi X-RAY | M2Doc Summary

kandi X-RAY | M2Doc Summary

M2Doc is a Java library typically used in Utilities applications. M2Doc has no bugs, it has no vulnerabilities, it has build file available, it has a Weak Copyleft License and it has low support. You can download it from GitHub.

The M2Doc technology enables the generation of Office Open XML documents from models. These plugins are released under the EPL Open-Source License. Visit our web site :
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              M2Doc has a low active ecosystem.
              It has 31 star(s) with 20 fork(s). There are 12 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 62 open issues and 289 have been closed. On average issues are closed in 145 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of M2Doc is 3.3.0

            kandi-Quality Quality

              M2Doc has 0 bugs and 0 code smells.

            kandi-Security Security

              M2Doc has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              M2Doc code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              M2Doc is licensed under the EPL-1.0 License. This license is Weak Copyleft.
              Weak Copyleft licenses have some restrictions, but you can use them in commercial projects.

            kandi-Reuse Reuse

              M2Doc releases are available to install and integrate.
              Build file is available. You can build the component from source.

            Top functions reviewed by kandi - BETA

            kandi has reviewed M2Doc and discovered the below as its top functions. This is intended to give you an instant insight into M2Doc implemented functionality, and help decide if they suit your requirements.
            • Create the page controls
            • Create a model
            • Initialize the editing domain for the model editor
            • Set the current content viewer
            • Create the control
            • Creates the M2Doc version
            • Validates the page with the given custom properties
            • Creates the controls for the generation
            • Creates the template URI
            • Initializes the HTML color mapping
            • Override this method to validate the repetition
            • Create the EObject for the given class
            • Produces an HTML page of the HTML page
            • Create the contents of the wizard
            • Creates the custom area
            • Validates the condition
            • Set the value of the feature
            • Add a generation
            • Creates the components
            • The NotificationListener interface
            • Returns the case of the given class
            • Performs the actual work
            • Executes the command
            • Create the variables for this control
            • Determine if the next token is a valid token
            • Returns the next token
            Get all kandi verified functions for this library.

            M2Doc Key Features

            No Key Features are available at this moment for M2Doc.

            M2Doc Examples and Code Snippets

            No Code Snippets are available at this moment for M2Doc.

            Community Discussions

            QUESTION

            How to automate M2Doc generation including the settings?
            Asked 2021-Aug-23 at 13:01

            I've applied the guidance on programmatic usage of M2Doc (also with this help) to successfully generate a document via the API, which was previously prepared by using the M2Doc GUI (configured .docx plus a .genconf file). It seems to also work with a configured .docx, but without a .genconf file.

            Now I would like to go a step further and ease the user interface in our application. The user should come with a .docx, include the {m:...} fields there, especially for variable definition, and then in our Eclipse application just assign model elements to the list of variables. Finally press "generate". The rest I would like to handle via the M2Doc API:

            • Get list of variables from the .docx
            • Tell M2Doc the variable objects (and their types and other required information, if that is separately necessary)
            • Provide M2Doc with sufficient information to handle AQL expressions like projectmodel::PJDiagram.allInstances() in the Word fields

            I tried to analyse the M2Doc source code for this, but have some questions to achieve the goal:

            1. The parse/generate API does not create any config information into the .docx or .genconf files, right? What would be the API to at least generate the .docx config information?
            2. The source code mentions "if you are using a Generation" - what is meant with that? The use of a .genconf file (which seems to be optional for the generate API)?
            3. Where can I get the list of variables from, which M2Doc found in a .docx (during parse?), so that I can present it to the user for Object (Model Element) assignment?
            4. Do I have to tell M2Doc the types of the variables, and in which resource file they are located, besides handing over the variable objects? My guess is no, as using a blank .docx file without any M2Doc information stored also worked for the variables themselves (not for any additional AQL expressions using other types, or .oclAsType() type castings).
            5. How can I provide M2Doc with the types information for the AQL expressions mentioned above, which I normally tell it via the nsURI configuration? I handed over the complete resourceSet of my application, but that doesn't seem to be enough.

            Any help would be very much appreciated!

            To give you an impression of my code so far, see below - note that it's actually Javascript instead of Java, as our application has a built-in JS-Java interface.

            ...

            ANSWER

            Answered 2021-Aug-23 at 13:01
            1. No the API used to parse an generate don't modifies the template file nor the .genconf file. To modify the configuration of the template you will need to use the TemplateCustomProperties class. That will allow you to register your metamodels and service classes. This instormation is then used to configure the IQueryEnvironment, so you might also want to directly configure the IQueryEnvironment in your code.

            2. The generation in this context referes to the .genconf file. Note The genconf file is also an EMF model, so you can also craft one in memory to launch you generation if it's easier for you. But yes the use of a .genconf file is optional like in your code example.

            3. To the list of variables in the template you can use the class TemplateCustomProperties:

            • TemplateCustomProperties.getVariables() will list the variables that are declared with their type
            • TemplateCustomProperties.getMissingVariables() to list varaibles that are used in the template but not declared

            You can also find le list of used metamodels (EPackage nsURIs) and imported services classes.

            1. The type of variables is not needed at generation time, it's only needed if you want to validate your template. At generation time you need to pass a map from the variable name to its value as you did in your example. The value of a variable can be a any object from your model (an EObject), a String, an Integer, ... If you want to use something like oclIsKindOf(pkg::MyEClass) you will need to register the nsURI of pkg first see the next point.

            2. The code you provided should let you use something like projectmodel::PJDiagram.allInstances(). This service needs a ResourceSetRootEObjectProvider() that is initialized in M2DocUtils.getQueryEnvironment(). But you need to declare the nsURI of your metamodel in your template (see TemplateCustomProperties). This will register it in the IQueryEnvironment. You can also register it yourself using IQueryEnvironment.registerEPackage().

            This should help you finding the missing parts in the configuration of the AQL environment. Your code seems good and should work when you add the configuration part.

            Source https://stackoverflow.com/questions/68891842

            QUESTION

            What is the M2DOC Eclipse Capella command to maximize an image in a Word page?
            Asked 2021-Apr-27 at 09:52

            What is the M2DOC Eclipse Capella command to maximize an image in a Word page?

            I try this code:

            ...

            ANSWER

            Answered 2021-Apr-27 at 09:52

            You are using the DRepresentation to call the service getHeight(), you should call it on the MImage:

            Source https://stackoverflow.com/questions/67279005

            QUESTION

            M2doc Sirius session programmatically
            Asked 2020-Jul-27 at 08:47

            I'm tried to generate document template using m2doc. In my template I want to use some sirius services.

            It'works manually. I want to do it programmatically in a custom service.

            Can i generate document with sirius service directly from the DocumentTemplate without generation? How can I set the “SiriusSession” option?

            ...

            ANSWER

            Answered 2020-Jul-27 at 08:47

            So I use a Generation (genconf file)and set the sirius session like this :

            Source https://stackoverflow.com/questions/63034431

            QUESTION

            invalid type literal import - How to import and use my custom service
            Asked 2020-Mar-28 at 22:22

            So I created a simple service with a single class, without constructor : services.RecursiveQuery and added it as a plugin to my Eclipse instance as described in this question.

            According to the documentation the next step would be to import it in my template file file so I tried this:

            ...

            ANSWER

            Answered 2020-Mar-28 at 22:22

            The M2Doc documentation may be unclear on this point: {m:import...} is not a valid statement in a M2Doc template file. It should be used in MS Word document properties, not in the docx template file.

            You should use the template properties wizard to change imports along with the solution you mentionned here.

            For a better understanding of how to use custom services you can check examples in M2Doc sources.

            Source https://stackoverflow.com/questions/60886312

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install M2Doc

            You can download it from GitHub.
            You can use M2Doc like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the M2Doc component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/ObeoNetwork/M2Doc.git

          • CLI

            gh repo clone ObeoNetwork/M2Doc

          • sshUrl

            git@github.com:ObeoNetwork/M2Doc.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Java Libraries

            CS-Notes

            by CyC2018

            JavaGuide

            by Snailclimb

            LeetCodeAnimation

            by MisterBooo

            spring-boot

            by spring-projects

            Try Top Libraries by ObeoNetwork

            UML-Designer

            by ObeoNetworkJava

            InformationSystem

            by ObeoNetworkJava

            BPMN-Designer

            by ObeoNetworkJava

            UML-Java-Generation

            by ObeoNetworkJava

            SysML-Designer

            by ObeoNetworkJava