Is it possible to have nested example-files section for huge projects? - doxygen

Suppose you have a huge project with hundreds of class and therefore you have more than several example files, but a hundred of example. How to create a nested structure in TREEVIEW for Examples section like following?
- Modules
- Class
- Files
- Examples
- Triangle
- triangle_1.cpp
- triangle_2.cpp
- ...
- Rectangle
- rectangle_1.cpp
- ...
- Circle
...
The idea is similar as Grouping, but I'm not sure if this is possible. I've tried to make several sub-folders under the EXAMPLE-PATH and also tried to separately specify each path in config-file. But unlike Files, in the end they are just merged together under the only Example section.
(Doxygen-version: 1.9.1)

Related

VS Code Regex search to remove references based on containing text in string

I am attempting to remove all references of a managed package that is going to be uninstalled that spans throughout code base in VS Code
I have using a query to find the field permissions but am wondering if there is a way to search for the reference outside of specifying the exact field name compared to the field containing only "agf" since they are all using it.
Below is the search query:
<fieldPermissions>
<editable>false</editable>
<field>User.agf_Certified_Product_Owner__c</field>
<readable>false</readable>
</fieldPermissions>
In the field, I want to be able to find and delete the 5 associated lines from multiple files if they match "agf" in any combination. Something like the below:
<fieldPermissions>
<editable>false</editable>
<field>agf</field>
<readable>false</readable>
</fieldPermissions>
With any combination of agf in the field, delete all from any file it appears in.
Not an answer but too long for a comment
You don't have to? Profiles/perm sets don't block package's delete. Probably neither do reports.
You'd use your time better by searching for all instances of agf__ (that's with double underscore), should find fields, objects... used in classes, flows, page layouts etc. And search for agf. (with dot) should find all instances where your Apex code calls their classes marked as global.
Alternatively Apex / VF pages with dependencies on package will have it listed in their "meta.xml", for example
<?xml version="1.0" encoding="UTF-8"?>
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>54.0</apiVersion>
<packageVersions>
<majorNumber>236</majorNumber>
<minorNumber>1</minorNumber>
<namespace>SBQQ</namespace>
</packageVersions>
<status>Active</status>
</ApexClass>
Last but not least - why not just spawn a dev sandbox and attempt the delete there? If it succeeds - great. If not - it'll list the dependencies that blocked the delete. It'll be "the real thing", it'll smite you even if your VSCode project doesn't contain all flows, layouts and thus could lull you into false sense of security. I'd seriously do it in sandbox and then run all tests for good measure, just in case there are some dynamic soql queries that don't count as hard, delete-blocking references.
After delete's done - fetch Profiles / Permsets from this org and the field references will be gone from the xml.

Prevent dynamic owl:import in Jena OntModel

I'm trying to read an owl file in jena.
I would like related owl files specified by the property owl:import not being automatically imported.
Is that possible ?
I'm reading the model like this:
OntModel onto = ModelFactory.createOntologyModel();
onto.read(rdfURL);
with rdfURL being "https://<mymodel>.owl"
Here triples importing other owl files:
<rdf:RDF xml:base="http://www.ontologydesignpatterns.org/cp/owl/agentrole.owl">
<owl:Ontology rdf:about="http://www.ontologydesignpatterns.org/cp/owl/agentrole.owl">
<owl:imports rdf:resource="http://www.ontologydesignpatterns.org/cp/owl/objectrole.owl"/>
<owl:imports rdf:resource="http://www.ontologydesignpatterns.org/schemas/cpannotationschema.owl"/>
</owl:Ontology>
</rdf:RDF>
The reason for this is that i don't want Classes and Properties defined in imported models to be in the result of queries against the read one.
There are different way that may work here:
1 - Control imports via the OntModel document manager:
onto.getDocumentManager().setProcessImports(false);
before reading into the model.
2 - Depending on what information to make visible, it might be more useful to modify the data: read into a plain RDF model, remove the imports statements and then put into an OntModel.

"Two output file names resolved to the same output path" error when nesting more than one .resx file within form in .NET application

I have a Windows Forms .NET application in Visual Studio. Making a form "Localizable" adds a Form1.resx file nested below the form. I also want to add a separate .resx file for each form (Form1Resources.resx). This is used for custom form-specific resources, e.g. messages generated using the code behind.
This is set up as follows:
It would be tidier to nest the custom .resx file beneath the form (see this question for details about nest how to do this), as follows:
However, this results in the following error when I build the application:
Two output file names resolved to the same output path:
"obj\Debug\WindowsFormsApp1.Form1.resources" WindowsFormsApp1
I'm guessing that MSBuild uses some logic to find nested .resx files and generate .resources file based on its parent. Is there any way that this can be resolved?
Note that it is not possible to add custom messages to the Form1.resx file - this is for design-specific resources only and any resources that you add get overwritten when you save changes in design mode.
The error comes from the GenerateResource task because the 2 resx files (EmbeddedResource items in msbuild) passed both have the same ManifestResourceName metadata value. That values gets created by the CreateManifestResourceNames task and assumingly when it sees an EmbeddedResource which has the DependentUpon metadata set (to Form1.cs in your case) it always generates something of the form '$(RootNamespace).%(DependentUpon)': both your resx files end up with WindowsFormsApp1.Form1 as ManifestResourceName. Which could arguably be treated as the reason why having all resx files under Form1 is not tidier: it's not meant for it, requires extra fiddling, moreover it could be confusing for others since they'd typcially expect to contain the resx fils placed beneath a form to contain what it always does.
Anyway: there's at least 2 ways to work around this:
there's a Target called CreateCustomManifestResourceNames which is meant to be used for custom ManifestResourceName creation. A bit too much work for your case probably, just mentioning it for completeness
manually declare a ManifestResourceName yourself which doesn't clash with the other(s); if the metadata is already present it won't get overwritten by
Generic code sample:
<EmbeddedResource Include="Form1Resources.resx">
<DependentUpon>Form1.cs</DependentUpon>
<ManifestResourceName>$(RootNamespace).%(FileName)</ManifestResourceName>
...
</EmbeddedResource>

Change Material in MeshRenderer

I have a number of materials in my project and there paths are listed as followed:
Assets/3DModels/Materials/01 - white.mat
Assets/3DModels/Materials/02 - black.mat
Assets/3DModels/Materials/03 - red.mat
Assets/3DModels/Materials/04 - green.mat
Assets/3DModels/Materials/05 - blue.mat
Assets/3DModels/Materials/06 - purple.mat
I also have some 3D models created using 3ds max and imported into Unity. The models have the component Mesh Renderer, which contains an array called Materials. As set in 3ds max, all the models use 01 - white.mat as Element0 in array Materials.
During runtime, I want to change the Element0 of the array Materials to 04 - green.mat using C# script. Thus, I have the following code:
public void changeMaterial(){
MeshRenderer mr = this.Transform.GetComponent<MeshRenderer>();
mr.material = Resources.Load("3DModels/Materials/04 - green.mat", typeof(Material)) as Material;
}
When I run it, the Element0 of the object becomes None(Material). I think the there are some mistakes in my code. Please help, many thanks!
First of all, many thanks to Bart.
As Bart mentioned, I put the folder 3DModel under Resources folder. In my program, I changed a little bit, so I have
Resources.Load("3DModels/Materials/04 - green", typeof(Material)) as Material;
There's no need to put Assets/Resources/ at the front as Resources.Load always search assets in this folder. There's also no need to put .mat And now I can change the materials.
Again, many thanks to Bart
If you want assets to be available at run-time and load them via a Resources.Load() call, you'll have to put them in a Resources folder. So put them in something like Assets/Resources/3DModels/Materials
In addition your code has one other little snag. Some of the properties in Unity behave in an unexpected manner. In this case, setting a material won't work. You'll have to create an array of materials (even if it has just one element) and assign it to mr.materials.
I believe that with those corrections it should work.

Getting IntelliJ 12 to put GWT output in the right location

For reasons that I have to ask you to accept as a given, I need to have my GWT application be built such that all the output is available at "/Foo/bar/1.0", rather than the normal "/".
Specifically, I need the result of compiling my GWT app inside of IntelliJ to look like this:
~/.IntelliJIdea12/system/gwt/Project.534b2263/Test.ef6cd448/run/www/
- Foo
- bar
- 1.0
- Testing.html
- Testing.css
- (other files in here too, like favicon.ico, etc...)
- WEB-INF
- (contents left out here)
- testing
- testing.devmode.js
- testing.nocache.js
The best I can seem to do is to get the Testing.html, Testing.css, etc... in the right place. I get this by setting the "Output Relative Path" for my GWT module to "/Foo/bar/1.0/" and the "Path Relative to DeploymentRoot" for my Web Resource Directory to the same "/Foo/bar/1.0/".
However, the "testing" directory, containing the testing.devmode.js and testing.nocache.js seem to wind up in the ~/.IntelliJIdea12/system/gwt/Project/534b2263/Test.ef6cd448/run/www/testing directory.
Obviously, this means that when the Testing.html tries to include the testing/testing.nocache.js it cannot be found, and my GWT app doesn't work.
Hopefully I'm just missing something easy, but I've been digging around for hours...
For those who may be interested, I've created a sample project to illustrate the problem and posted it, along with this same basic question, at the IntelliJ Forums: http://devnet.jetbrains.com/thread/442050.
(Copied from IntelliJ forums)
If you need to put GWT compiler output somewhere you need to create an artifact (File | Project Structure | Artifacts) and add 'GWT Compiler Output'
element to it. Also you can put 'Web facet resources' element to the same artifact. If you need to place the GWT output into a subfolder under the
artifact output root use 'New Folder' action in the 'Output layout' tree in the artifact editor.
Just for future reference and easy of finding this answer, the final result (see http://devnet.jetbrains.com/thread/442050) it is not possible to control the location of the output of the GWT compiler.
Practically what this means (for my project anyways) is that I have to do a runtime check: GWT.isProdMode() and then load resources from different locations.