UML to HUTN (Human-Usable Textual Notation) - transformation

The epsilon project (based on eclipse) promises here to transform XMI to HUTN. I can't find any documentation for this purpose. Is it too trivial? I don't get it
Thanks for any advice

The page you reference has all the information. However, for this to work you need to have an Eclipse IDE with Epsilon installed. (You can get an Epsilon-ready Eclipse from the Epsilon website here.)
Then, as instructed in the page you can craete a HUTN model using the HUTN editor. Once you have your model, follow the instructions at the bottom of the page to generate the respective XMI version. Note that it is possible that the extension of the generated model is .model, but nonetheless its contents are in the XMI format and can be used anywhere an XMI model is expected.

Related

How to integrate Microsoft.CodeAnalysis in a VSIX extension

As the title says, I would like to build a VS extension that's able to react to certain changes made on the editor window (for various languages). Not necessarily an adornment.
To do this I would like to be able to analyse the editor document through the Roslyn service API (that if I understood well is now part for the Microsoft.CodeAnalysis).
Can someone indicate some documentation?
What's the best practice to do this?
What are the interface to import via MEF?
As example you can export a custom ISuggestedActionsSourceProvider to add new feature in the light bulb, you can use ExportCodeRefactoringProviderAttribute to add a new refactoring, also you can export IClassifierProvider and ITagProvider to classificate a elements in the text editor, import ITextDocumentFactoryService to retrieve the current VS Document by ITextBuffer and etc.
Also you wouldn't be enough to use only Microsoft.CodeAnalysis for some kind of analyzing, so you will need to add a some additional packages in these cases. As example these packages can be Microsoft.CodeAnalysis.EditorFeatures.Text, Microsoft.CodeAnalysis.Workspaces.Common and etc.
If you want to get from community the more concrete answer you should concrete what exactly do you want in the question.
Also you can check a more useful links and examples: Roslynator are refactoring and analyzing a code, Getting start editor extensions, Light bulb guide, Classification elements for highlighting

Implementing Lucas Rocha's smoothie

I am trying to implement the excellent library provided by Lucas Rocha. This library allows for very efficient scrolling on ListViews.
https://github.com/lucasr/smoothie
His text states 1.Add Smoothie's jar as a dependency to your project. but I am not able to find any jar file in the package.
I have emailed him but his response simply refers to the narrative within his modules. There is no user friendly guide on how to go about implementing this.
It is clearly directed at experienced programmers but it would be useful if all the "not so experienced" programmers are able to progress with this.
So my question:
Can anyone provide clear step by step guidance on how to implement the smoothie libray.
Thanks in advance
The JAR needs to be compiled from source as a compiled version is not available for direct download. You can see my sample application to see Smoothie in action. The sample application also contains a JAR file compiled from the latest Smoothie source code.
At a bare minimum, you need to write two classes, one extending android.support.v4.widget.CursorAdapter and another extending org.lucasr.smoothie.ItemLoader. The sample application mentioned above contains ContactAdapter and ContactLoader classes that extend these aforementioned ones.
The order in which these classes are coded does not really matter, but I found it easier to implement ContactAdapter and therefore coded it first.

Ruby equivalent of Sphinx documentation generator?

Ruby has a few good document generators like Yard, rDoc, even Glyph. The thing is that Sphinx does websites, PDF's, epub, LaTex...etc. It does all these things in restructuredtext.
Is there an alternative to this in the Ruby world? Maybe a combination of programs? If I could use Markdown as well that would be even better.
Since version 1.0, Sphinx has had a concept of "domains" which are ways of marking up code entities (like method calls, objects, functions, whatever) from lannguages other than Python and/or C.
There is a ruby domain, so you could just use Sphinx itself. The only thing you would be missing (I think) is Sphinx's ability to create documentation from source automatically using the autodoc extension, which works specifically on Python code.
If you want to use Markdown, you might check out JDoc, which is a very simple, Ruby-based documentation framework that lets you use widely-supported markup and put it under source control. It lets you edit the documentation in your text editor of choice, and it supports:
Markdown or Textile
syntax highlighting
easy internal links
a hierarchical documentation structure (useful for large projects)
customizable styling and structure (but it looks nice out of the box, too)
It generates static HTML, so the resulting documentation is easy to host and doesn't have much of an impact on your server load.
To see it in action, check out wpmvc.org.
Another couple of options would be to use Middleman which is a static site generator that accepts either Kramdown or Markdown as input.
There are also frameworks that are designed specifically for technical documentation that use Middleman (both of which are on GitHub) including lord/slate and pnerger/dpslate (the later is a fork of the former and provides some enhancements that were not appropriate for pulling). The Slate format provides a format for documentation that includes many of the features of Sphinx with some additional enhancements. It features a three-pane view of a document which includes an automatically generated Table of Contents, a Main center body, and then sample code panel to the right. Like Sphinx the sample code has syntax highlighting.

SugarCRM: Pdf generation

I'm a newbie to SugarCRM development. In my project, I have to generate a pdf for one entity details(say Account details). On details page, I have added "Print PDF" button, upon clicking this button I have one independent script (I mean to say that it was not implemented as per Sugar framework). In this script we are querying database for the required details and building one html string. Using html2pdf library, converting this html string to pdf.
I dont know whether it is an efficient implementation or not, but everything is working fine as per the requirement. But we have one problem when the original string contains some special characters like currency symbols of different countries. We are getting the html fine, but in pdf getting question marks (?) for those special characters.
While trying to fix this issue, when I looked into SugarCRM code, I found some pdf classed inside includes/ directory that creating an impression that Sugar itself has some built-in library to generate pdf's. Is it true?
If that is true, will it solve my problem, i.e. displaying different countries currency symbols in pdf.
Can anybody please help me to in resolving this. Thanks in advance.
-Venkat Nehatha
Venkat, SugarCRM does indeed have its own pdf generation ability. We use it to generate customer orders, quotes, invoices, and statements.
Though I've done some work on the pdf generation myself, I don't think I'm really experienced enough to be able to guide someone else in detail in the use of Sugar's pdf capabilities. I can tell you that we use pdf generation only in our own custom modules, so the files are found in [sugarRoot]/modules/[customModule]/. (You may know that unless you know exactly what you're doing, NEVER modify the main SugarCRM files in the [root]/modules/ folder!) In the previously mentioned custom module folder are two sub-folders, "sugarpdf", which has the code that accesses the modules/database to get the information to write to the pdf, and a "tpls" folder that holds the layout information for the header, body, and footer of the pdf, in HTML format, using the information from the sugarpdf folder's file.
I strongly recommend you visit the SugarCRM developer forums where you will be in touch with many developers much more experienced than me in Sugar.
I hope this helps in some way.

Code Documentation for ASP.NET + VB.NET application

We have a very old application dating back to ASP era which we are gradually refactoring to ASP.NET + VB.NET codebase.
It contains a lots of files with the below types:
aspx, asmx, ascx, vb, js (JavaScript), html, vbs (VBScript).
The backend database is SQL Server 2005 with lots of sprocs.
We would like to create a code documentation automatically generated from the comments in the code files. I liked Doxygen very much but seems like it does not support the above technologies. Can you please suggest some document generator tools, preferably a single tool or a group of tools?
Thanks a lot.
Ajit.
You can take a look at Microsoft's Sandcastle tool. I've used it many times, and it generates documentation based on the comments provided in your .NET code. If I remember correctly, it can also generate documentation for JavaScript libraries.
There are some out there:
SandCastle
NDOC
i've used SandCastle and it works too good if you have xml comments in your code.
You first enable xml documentation in your project by setting it in Project Properties -> Compile -> Generate XML Documentation.
Once done you may have to set treat warnings as errors, so that the studio can point out to you where and all the XML comments are missing.
To add an XML Comment, you place your cursor before a class definition or a function definition and type
///
This will automatically generate xml tags for documentation and then once you are done, you can import the project and start to build the documentation.
The good part is, if you have documented your classes well, when you use those functions in your application upon mouse over you can find the description which you wrote, much like how intellisense documentation works.
Let me know if you run into any other issues.
My last suggestion, make a hello world project and xml document it and get used to sandcastle with it.

Resources