doxygen is not creating class for child interface - doxygen

I am creating document for .hal files using doxygen with enabling idl support.I have file called A.hal with following content.
/**
* A.hal
*/
interface A extends B {
//some content
}
If i generate document for above file, i could able to see class name as B under class list (in doxygen output file i.e index.html). But, my expectation is A should come under class list. What is solution to achieve this? If extends B is not present, then A is coming in class list.
I am using following configuration.
JAVADOC_AUTOBRIEF = NO
OPTIMIZE_OUTPUT_JAVA = NO
EXTENSION_MAPPING = hal=idl
IDL_PROPERTY_SUPPORT = YES
CASE_SENSE_NAMES = YES
FILE_PATTERNS = *.hal

Related

Can we customize mapping file names in Wiremock?

I am recording the application through Wiremock using JAVA DSL, Do we have the option to customize the mapping file names? instead of getting the filename which is generated from wiremock..
Example: searchpanel_arrivalairport_th-72f9b8b7-076f-4102-b6a8-aa38710fde1b.json (Generated form wiremock using java )
I am expecting the above file name with my desired naming convention like
seacrpanel_airport_LGW.json
Custom filenames can be added by customizing StubMappingJsonRecorder.
I added CustomStubMappingJsonRecorder and override writeToMappingAndBodyFile method.
if(fileName!=null && !fileName.equals("")){
mappingFileName=fileName+"-mapping.json";
bodyFileName=fileName+"-body.json";
}else {
mappingFileName = UniqueFilenameGenerator.generate(request.getUrl(),
"mapping", filed);
bodyFileName = UniqueFilenameGenerator.generate(request.getUrl(), "body",
fileId, ContentTypes.determineFileExtension(request.getUrl(),
response.getHeaders().getContentTypeHeader(), body));
}
There's no easy way to do this at the moment. It is however possible. As #santhiya-ps says you need to write your own implementation of RequestListener, probably using StubMappingJsonRecorder as a template.
You can't extend it and override writeToMappingAndBodyFile as that method is private, but that is the method you probably want to change.
import com.github.tomakehurst.wiremock.common.*;
import com.github.tomakehurst.wiremock.core.*;
import com.github.tomakehurst.wiremock.http.*;
import java.util.List;
import static com.github.tomakehurst.wiremock.core.WireMockApp.*;
class NameTemplateStubMappingJsonRecorder implements RequestListener {
private final FileSource mappingsFileSource;
private final FileSource filesFileSource;
private final Admin admin;
private final List<CaseInsensitiveKey> headersToMatch;
private final IdGenerator idGenerator = new VeryShortIdGenerator();
public NameTemplateStubMappingJsonRecorder(Admin admin) {
this.mappingsFileSource = admin.getOptions().filesRoot().child(MAPPINGS_ROOT);
this.filesFileSource = admin.getOptions().filesRoot().child(FILES_ROOT);
this.admin = admin;
this.headersToMatch = admin.getOptions().matchingHeaders();
}
#Override
public void requestReceived(Request request, Response response) {
// TODO copy StubMappingJsonRecorder changing as required...
}
}
You can then register your RequestListener as so:
WireMockServer wireMockServer = new WireMockServer();
wireMockServer.addMockServiceRequestListener(
new NameTemplateStubMappingJsonRecorder(wireMockServer)
);
wireMockServer.start();
So long as you still store the mapping files in the expected directory (stored in FileSource mappingsFileSource above, which will be ${rootDir}/mappings, where rootDir is configured as explained in Configuration - File Locations) they should be loaded successfully as all files with extension json in that dir are loaded as mappings.
It would be much easier if StubMappingJsonRecorder took a strategy for generating these names - it might be worth creating an issue on the WireMock repo asking for an easier way to do this. I'd suggest getting an agreement on a basic design before raising a PR though.

How to include comments for a package with scaladoc?

So, for scaladoc, you can specify comments for a particular component of your code like so:
package connector
import java.io.RandomAccessFile;
/** Fs class guides file opening
*
*/
object fs {
def printFile(path:String):Unit = {
val fl = new RandomAccessFile(path, "rw");
println(fl.readLine());
println(fl.getFilePointer());
fl.close();
}
}
However, I don't see where or how you would include a comment that will appear in the index.html generated by scaladoc for the package starting page. How is this done?
Create a package object (package.scala) and add you documentation there:
/**
* Fs class guides file opening
*/
package object connector {}

Is there a way to create objects/ table entries during the extension installation in TYPO3?

I want to create objects during the installation of an extension. For example I have the following two simple domain models:
class Product extends AbstractEntity
{
protected $name = '';
protected $sku = '';
...
}
class Location extends AbstractEntity
{
protected $name = '';
protected $city = '';
...
}
and a third domain model like:
class Mapper extends AbstractEntity
{
protected $domainModelName = '';
protected $domainModelProperty = '';
}
Now I want too add entries like this:
domain_model_name | domain_model_property
Product | name
Product | sku
Location | city
....
during the extension installation or directly after the installation, so that the tx_foxexample_domain_model_mapper table will be filled automatically, is this possible?
I know that I can use a initializeAction, but then the entries will only be generated if I add a plugin and visit the page etc., but I want that the entries/ objects already exists before I use a plugin or add some objects.
You can store your static data in the file ext_tables_static+adt.sql which must be located in the root folder of your extension.
According to the TYPO3 API, you must should use the following command to export your static data
mysqldump --password=[password] [database name] [tablename] --add-drop-table > ./ext_tables_static.sql
Also make sure, that the table structure of static tables is present in the ext_tables.sql file.
The extension static_info_tables makes use of this technique. You can have a look at the extension here for more details.

Inheritance of TYPO3 models

I have a tricky question about the inheritance of TYPO3 models:
I want to extend the extension powermail with two seperate/independed (!) extensions. The first extend powermail TCA-forms and needs the new fields in the fluid template. The second extends also the TCA-forms, but not need an output in the frontend.
Now I use the mixed-ins hack from Franz Koch http://lists.typo3.org/pipermail/typo3-project-typo3v4mvc/2010-September/006497.html which using the delete field as record type. But this solution works only for one extension. According to the loading of the TS persistence settings either the first or the second model of the extension will be loaded.
If I use an own field for the record type – eg. for the field record of powermail – I can use only one record type for the one extension, but can't access to the other.
Is there a way to "merge" ALL models related to the base model?
Next current TS config:
config.tx_extbase {
persistence {
classes {
# Using mixed-ins hack from Franz Koch to make map table extendable.
# #see http://lists.typo3.org/pipermail/typo3-project-typo3v4mvc/2010-September/006497.html
Tx_Powermail_Domain_Model_Fields {
mapping.recordType = 0
subclasses.0 = Vendor\MyExtension\Domain\Model\Powermail\Fields
}
Vendor\MyExtension\Domain\Model\Powermail\Fields {
mapping {
tableName = tx_powermail_domain_model_fields
recordType = 0
columns {
tx_myfirstextension_field_one.mapOnProperty = FieldOne
}
}
}
}
}
}
ext_tables.php:
// Using mixed-ins hack from Franz Koch to make map table extendable.
// #see http://lists.typo3.org/pipermail/typo3-project-typo3v4mvc/2010-September/006497.html
$TCA['tx_powermail_domain_model_forms']['ctrl']['type'] = 'deleted';
$TCA['tx_powermail_domain_model_pages']['ctrl']['type'] = 'deleted';
$TCA['tx_powermail_domain_model_fields']['ctrl']['type'] = 'deleted';

How can I selectively apply a VSTemplate?

I am creating a custom VSTemplate for MVC 4 applications for my company that uses a wizard that is comparable to the wizard that appears when you create a new MVC4 application. I have one of two templates I would like to apply when the developer creates a new app of this type as shown here:
Both of those entries correspond to templates that are defined inside my VSIX project under a folder called ProjectTemplates:
My question is, how do I apply the correct template when the wizard runs? I know how to create a vstemplate with multiple projects (using the ProjectCollection node in the vstemplate), but that's not really what I want to do since they will never be deployed together. I see that I can add both vstemplates as Assets to my vsixmanifest file, but I'm not really sure how to apply just one template conditionally.
Thanks!
You'll need to include the files for your "optional" template(s) in sub directories of the the "root" template folder but EXCLUDE them from the TemplateContent Element of the "root" template.
Your IWizard implementation needs to keep a reference to the EnvDTE.DTE object (the first parameter of RunStarted) and use it in the ProjectFinishedGenerating to add the projects to the solution using the template(s) that match what the user selected.
public class SelectTemplatesWizard : IWizard
{
private EnvDTE.DTE _dte = null;
private string _solutionDir = null;
private string _templateDir = null;
public void RunStarted(object automationObject, Dictionary<string, string> replacementsDictionary, WizardRunKind runKind, object[] customParams)
{
// Store the reference to the environment for later use
_dte = automationObject as EnvDTE.DTE;
/*
The value of the item in the replacements dictionary for the key
$destinationdirectory$ is populated with the physical location of
the directory (named based on the user entered project name) created
sibling to the solution file.
The solution directory will be this directories parent
when the Type attribute of the VSTemplate element is ProjectGroup
*/
_solutionDir = System.IO.Path.GetDirectoryName(replacementsDictionary["$destinationdirectory$"]);
// customParams[0] is a default custom param that contains the physical location of the template that is currently being applied
_templateDir = System.IO.Path.GetDirectoryName(customParams[0] as string);
}
public void ProjectFinishedGenerating(Project project)
{
int userSelected = 1;
string name= null, projectPath= null, templatePath = null;
switch (userSelected)
{
case 0:
{
name = "Angular";
projectPath = System.IO.Path.Combine(_solutionDir, "Angular");
templatePath = System.IO.Path.Combine(_templateDir , "Angular\Angular.vstemplate");
}
break;
case 1:
{
name = "MVC4";
projectPath = System.IO.Path.Combine(_solutionDir, "MVC4");
templatePath = System.IO.Path.Combine(_templateDir , "MVC4\MVC4.vstemplate");
}
break;
}
_dte.Solution.AddFromTemplate(templatePath, projectPath, name);
}
/* Other IWizard methods excluded for brevity */
}