How to generate code with custom templates? [closed] - code-generation

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
Is there any tool to generate code (text files) with custom templates which I define?
For example it should have possibility to include multiple templates of some functions (which I can specify and parameterize) and put them in one class file template.
Do you know any advanced software which help me with that?
File templates in IDE (like Webstorm) are too simple for me.

Telosys could help you, it's a code generator
working with customizable templates (Velocity templates).
You can also create your own templates.
Telosys is available as a simple Command Line Interface tool and as an Eclipse Plugin. Everything is Open Source (tool and templates).
See the main web site http://www.telosys.org/
and Eclipse Plugin https://marketplace.eclipse.org/content/telosys-tools
The customizable templates are available on GitHub (https://github.com/telosys-templates-v3).

I use Telosys (http://www.telosys.org/) to generate Python code.
It works fine. You can use it to generate any kind of text file.

I made my own tool for this.
parameterized with json file
use Apache Velocity templates
https://github.com/latata/simple-code-generator

check this one https://code.gencode.net you can generate code from simple text templates and SQL server, the output files can be in any programming language.
This is a tool I have developed and personally use to generate the code for all CRUD files an application may need, basically gets database information, field names, datatypes, foreign keys ,primary keys and merges your text templates replacing variables between [], also have sections that can be iterated like fields names in a class or stored procedure, these are replaced in the main template, more information on how it works can be found in www.gencode.net and also there are some sample templates that can be used to see how it works
Answering the question since templates are based on your own code you can add references to custom functions, classes, security validations, anything you want in the templates. Also you can have multiple templates, include them in a group of templates, and include these groups in a project, which has the link to the SQL database

Related

Eclipse Project description - NOT .project file - is there such a thing? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I have a whole bunch of Eclipse projects, large and small, that I want to keep organized. I'm trying to figure out if there is some sort of property that can be attached to the project in order to provide a description of what the project is or what it was created to do or test. I would hope that this field can be easily viewed at the time you are browsing through a list of projects. It would be nice if I could put descriptive text into this field and not have to consider giving my projects names like 'TwitterOAuth2TestImplementationUsingScribe'
Anything that would allow you to browse your projects in a way similar to this (each line represents an Eclipse project):
Myproj1 Simple Test Project
LogTest3 Test new logging class
NetworkUDPTests Testing UDP classes
OAuth2Example Sample project for Oauth2
Unfortunately, project "description" is the name of the .project file that stores each project's settings, so it is a bit harder to search for information on this.
Thats an interesting question we also face. Currently there does not seem to exist a solution for this problem. The only thing that could come near to providing one is the Mylyn Intent project, as it aims to provide a comprehensive documentation on design decisions, which takes into account the inter-dependencies between plugins.
This inter-dependency is exactly the problem. There exist solutions to document the purpose of java packages which is limited to the classes however.
Our solution is a readme.textile embedded in the root of each plugin, providing this specific information. It would, however, be interesting to introduce the documentation used for packages for bundle documentation, which could be used to autogenerate an overview documentation.
There is a comment tag in the .project file: http://help.eclipse.org/luna/topic/org.eclipse.platform.doc.isv/reference/misc/project_description_file.html
However it looks like Eclipse itself doesn't use the content of this tag. I changed it manually but after that I've never seen the text I entered anywhere in Eclipse

What UI mockup tools can be used to produce Eclipse UI "screenshots"? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
What UI mockup tools exist that could be used to produce designs that look like Eclipse UI? Perhaps there is an Eclipse project available for this? (http://www.eclipse.org/projects/listofprojects.php doesn't make it easy to browse through all the projects and learn about them.) I would consider tools for any platform.
They are wireframe sketches rather than Eclipse-UI like mockups, but I find http://wireframesketcher.com/ or http://marketplace.eclipse.org/content/wireframesketcher very useful.
It's quick and easy to use, see the feature list here:
http://wireframesketcher.com/features.html
One thing they don't seem to mention there is their SWT Spy plugin which "allows you to convert your existing SWT UI into a wireframe that you can edit and revise afterwards" (their words from the help content of the wireframe sketcher feature).
They have a 14 day trial.
I ended up buying SwordSoft Layout in the Mac OS X App Store. It's inexpensive ($6.99) and easy to use. While it doesn't have Eclipse-specific templates, it wasn't hard to create mockups that looked close enough to what I'm proposing.
We use balsamiq Balsamiq site. You can use their web version for free. Web version
However, the web version doesn't save. So you need to manually store the xml. Use export as xml and copy paste to a local file and use again import as xml to restart.
You can take a look at ForeUI, which can help creating UI mockup with various styles (Handdrawn, Wireframe, Windows xp, Mac OS X and Windows 7), and allows you to define behavior of your mockup then run HTML5 simulation in web browser.
For reference, Eclipse has a project
http://eclipse.org/windowbuilder/
that actually can be used for constructing plugin mockups and to start off the plugin project through generating much of the UI stuff. Since it is an Eclipse project using all Eclipse artefacts as they show in Eclipse, there's probably no better tool at the moment.
You can use MockupUI. It is a desktop user interface mockup software. Not using Eclipse, but it lets you draw high fidelity UI screens with a native Windows 7,8 or 10 look and feel.

How to program a plug-in? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
Hey Folks, I need to create a plug-in that updates an application.
Look, I have a host application, but probably I will update it with to more functions. I am working in Windows with Delphi 7.
Basically, "my plugin" should add 2 or 3 new functions to the host application.
How can I program a plug-in (or a functionality) that inserts new code (new functions) in the host application without re-compiling it??
Note: I am sorry about my English. My natural language is Spanish.
Thanks anymore,
Yulien.
You didn't specify the language or the platform on which you are working, so I can only give you a generic answer.
Plugins can be implemented in several different ways. The simplest (YMMV) is to compile the plugin to a Dynamically Linked Library (DLL in Windows) or a Shared Object (.so under Linux), and then you use the appropriate function to get specific functions from the DLL and call them.
Search the internet for the function LoadLibrary() on Windows or dlopen() on Un*x/Linux systems for more information.
An alternative is to embed a scripting language interpreter in your program. Firefox, for example, is implemented in C/C++ and exposes its internals to its JavaScript interpreter (SpiderMonkey) - in this way, all Firefox plugins can be written in JavaScript.
There are different ways to accomplish this, I will give you one of the most basic.
Say you are programming with C# on Windows (Other languages and environments are similar)
Part 1. You need to be able to load an assembly (if C++ a DLL). You might want to take this from a configuration file. Do this for every piece of functionality you want the plugin applications to extend.
Part 2. You need to be able to invoke code from this plugin, so put the functionality in an interface. For example, the main application will code to an interface IMyPluginCapability and your plugin will include some class which implements this interface. You can figure out which class through reflection.
Part 3. Invoke the functions you wish your plugin to extend.
Your language, environment will surely have similar capabilities. You can lookup details for that environment.

What is a good tool for writing a user manual (help file), which integrates with version control [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
The people writing the user manual are not necessarily programmers, and they need a visual editor. A major issue is the internal format of the authoring tool; it should be readable text/html, so it's easy to compare versions of individual pages checked into version control.
DocBook
(source: docbook.org)
Microsoft HTML Help Workshop can be used to create good quality professional CHM help files. All you need is a bunch of HTML files. The tool "compiles" all these and bundles into a single Help file.
The HTML files can be generated using Microsoft Word/Frontpage or even Dreamweaver. You might want to consider source controlling these HTML files.
Latex. Lyx provides WYSIWYM for writing latex files.
At my old job they used a tool by madcap software called flare.
It seemed to work really well.
There are other professional products which allow help file writing and they have support of "context ID" which makes context sensitive help possible. Doc To Help and RoboHelp are these type of products.
A good combination to consider is Subversion, DocBook and Publican.
Version control = Subversion
Content Authoring = DocBook
Publishing = Publican
Optional WYSIWYG = Serna
At the moment, this is one of the toolchains in use by the world's largest provider of open source solutions, and the name behind much of the world's use of Linux-based operation systems in the enterprise market. Most (and close to all) of Red Hat's official documentation is created in such a manner. Same goes for Fedora.
The major "pro" here is that these are freely available tools, with a strong overlap in the market of technical writers. All of which will be able to (but might not want to) write in XML, and picking up DocBook is like picking up HTML in the 90's. Subversion is a very common version control tool, that like DocBook is relatively easy to implement and use. Publican is a great publishing tool that can take DocBook XML, and publish it to PDF, HTML, HTML-single, etc. Obviously your writers can use a WYSIWYG like Serna, but I use snippets in Geany (on Fedora) or TextMate (on OS X) personally.
The major "con" is the perception of technicality. Your writers might want WYSIWYG (and can have it), and depending on your documentation needs, this might be what you end up using. As you would know, there's a market out there for "Technical Writers" who specialize in fixing Microsoft Word styles (and markup), so the arguments for separating "authoring" from "publishing" are based on proven but distinct use cases for organizations that require documentation to be held up to the same standards of the engineering/programming/source production.
Some of the extreme advice you will get comes from people and companies that have been exposed to the value of XML documentation, and especially those in the realms of DITA, where certain multi-nationals have a reputation for acquisitions that are influenced by the format and availability of the product knowledge. there are also the arguments that locking your documentation into a "sticky" or closed format doesn't help the future maintenance requirements. This is where the open source options gain support on a corporate level. Plus, obviously, it's free.
You can use Subversion and MGTEK Help Producer. Help Producer makes help files from Word documents. TortoiseSVN comes with scripts to compare different revisions of Word documents, in Word itself (Word has a version compare tool).
Your users are going to want a visual diff tool that resembles the one they are editing in. If they are just slightly not-technical, DocBook or Latex aren't going to work (I've tried giving my users both, and I even tried Epic Editor as a DocBook editor which is very expensive but didn't work out very well after all). Sticking to something they know (Word) will prevent you many headaches.
I was very reluctant to go this route at first too, because I wanted a solution that was more 'technically perfect', but I realized over time that having happy and productive users was more important. Just saying that I know where you're coming from, but try the Word route - it works much better in practice than all the 'pure' text-based solutions that are out there. Regular users don't like markup based editing.
If you're using Visual Studio, take a look at SandCastle - http://www.codeplex.com/Sandcastle.
There's also a couple of tools that help you build sandcastle files, try searching "sandcastle" on codeplex. One of them is SandCastle Help File Builder (http://www.codeplex.com/SHFB), but I've never used it so I don't know if non-technical users will be happy with that.
Mapcap Flare is the best commercial tool around. Written by the ex-developers of Robodoc
I created a documentation system called Mandown (Markdown/Html/Javascript/file-based relatively linked documents for portability) which would easily go under version control. The visual editor part you would have to figure out separately - I sometimes use HTML-Kit which at least has a preview feature.
See What is the best way to store software documentation?
Here's another tool to check out: Xilize
We are using APT. It integrates well with the CI (standard build artifact) and is more alive than for instance word document. It is also possible to generate PDFs and other formats when needed.

Task/issue tracking system with command-line interface [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
Are the any task tracking systems with command-line interface?
Here is a list of features I'm interested in:
Simple task template
Something like plain-text file with property:type pairs, for example:
description:string
some-property:integer required
command line interface
for example:
// Creates task
<task tracker>.exe -create {description: "Foo", some-property: 1}
// Search for tasks with description field starting from F
<task tracker>.exe -find { description: "F*" }
XCopy deployment
It should not require to install heavy DBMS
Multiple users support
So it's not just a to-do list for a single person
Ditz is a simple, light-weight distributed issue tracker designed to work
with distributed version control systems like darcs and git.
Ditz: http://web.archive.org/web/20121212202849/http://gitorious.org/ditz
Also cloned here: https://github.com/jashmenn/ditz
Interesting idea; the closest thing I have heard of is todo.txt.
Alternatively, you could roll your own by just using a database (e.g. sqllite) and SQL. Optionally, write a wrapper script that parses your plain-text file and command-line options, and generates the corresponding SQL.
Have you seen ticgit. It sounds like it might do just what you guys are after.
Erlangs Ticket System
Created by Peter Högfeldt in 1986. This is the ticket system that was used in the Erlang distribution.
Source: Joe Armstrong's blog
http://roundup.sourceforge.net/
#Peter Hilton,
I'm going to create such system. So I'm wondering whether such system exists. General idea is to keep it as simple as possible: command line utility to manage tasks & simple server wit REST interface. I used dozen different task tracking system and come to conclusion that I don't need fancy UI. It should be like Subversion - you can happily work with command-line based svn.exe
I've abused the cal and calendar commandline tools regularly for this type of task.
ciss issue tracker is a simple commandline tool for managing your ISSUES.txt file.
Fogbugz has a Command Line Client.
Have a look at Pitz and Bugs Everywhere.
I use org-mode with emacs in terminal mode (emacs -nw).
We have used a few tools earlier. We now use a GitHub private repository to maintain various developer TBD lists (as .md files) and issue tracking because of the following advantages:
Developers are already using GitHub and they don't need to learn anything new.
Developers can use whatever tool they are comfortable with to maintain TBD list; command line or graphical editors, GitHub web interface or plenty of mobile clients
Markdown support
Reliable backup
Merging and revision history
Flexible file organization for different projects and modules