how to add a tool to eclipse-cdt to automatically generate a header file during make - eclipse

I have a tool that converts an data file into a C header file for inclusion into my project.
Now I would like to have this tool run automatically during make whenever the data file changes.
Where can I tell Eclipse CDT which tool to run and what data file the header depends on?

The article "Extending the Eclipse CDT Managed Build System" can give a concrete example of the managed build system (MBS) of CDT.
The MBS can be extended by modifying/adding a "tool" to the tool-chain (An ordered set of tools used to transform the project resources into the final output (build artifacts) of the project)
You should be able to add your tool, and set it up to be active for each file modification.

Open the properties of your project. There is an entry "Builders" where you can add other executables to the build.

Related

How do I convert/ build .juce file to vst3 plugin

The following repository contains a .juce file along with c++ source file. The operating system I am currently working on is Ubuntu. I want to be able to build this file into a .vst3 file so that it can be added as a plugin in any DAW which has that capability. When I open the .juce file in Projucer, it only lists Visual Studio 2017 as an exporter option, with no option to add exporters (usually for Linux, the options are Code::Blocks and Makefile). How do I build the source files here to create a .vst3 plugin file?
In the projucer application, if you click on the plus icon in the bottom left, you will get a menu with which you can specify which exporter configuration you want to add to the project.
After adding the linux makefile as an exporter configuration, you should save the projucer file which will generate the makefiles.
Then you can use "make" via terminal to compile the plugin in the specified formats.
Please make sure to enable the VST3 option in the settings page.

Debugging eclipse e4 source code

I have an Eclipse e4 RCP project using the compatibility layer.
The targets include org.eclipse.e4.* plug-ins and their source code. For example:
$ ls org.eclipse.e4.core.di*
org.eclipse.e4.core.di.extensions.source_0.12.0.v20140417-2033.jar
org.eclipse.e4.core.di.extensions_0.12.0.v20140417-2033.jar
org.eclipse.e4.core.di.source_1.4.0.v20140414-1837.jar
org.eclipse.e4.core.di_1.4.0.v20140414-1837.jar
The launcher configurations include the plug-ins without source code.
Source code for classes within those plug-ins is not being found with Navigate>Open Type or when debugging. In the debugger, I'm given a button Edit Source Lookup Path -- but I'd like the source path to automatically update when I switch targets.
I can make that happen by adding these plug-ins to the manifest of one of my plug-ins. However, these are not direct dependencies, and it seems inelegant to list these here.
Adding the plug-ins to the product configuration file does not appear to help.
How can I automatically access the current target's source code within the org.eclipse.e4 packages, when debugging, and when using Navigate>Open Type?
You include the target platform plugins in the Java searches (including Navigate > Open Type) by checking the
Include all plug-ins from target in Java search
check box on the Preferences > Plug-in Development preference page.
The first time after this that you use Navigate > Open Type or another search it may be a bit slow while the Java indexer runs on the extra source files. It should run normally once the indexes are built.

How to change Eclipse RCP product exe properties

I am using Maven with Tycho plugin to materialize the Eclipse RCP product. What I need is when I right-click the product exe file and choose properties I need some relevant information onthe Details tab (File Description, Product Name, Product Version...).
Now I have found so far, that this could be achieved with .rc file with VERSIONINFO statement
(see Comment 10 at this bug). I also found in tycho-user mailing list that rc file CAN be included in Tycho build to achieve the desired behavior. Nontheless I was unable to find out where to put the rc file, or how to name it or where to set its location.
Thanks
You are misreading the bugzilla discussion, as that is only possible by self-compiling the eclipse launcher source (with a modified rc file).
However, there is an alternative: You can patch the launcher executable manually (using any kind of resource editor) and then put it into your product as root file. This works with tycho, I use that approach. The drawback is of course that this executable will not be updated, if you change branding details in the product definition file.
Alternatively to a root file you could also overwrite the launcher executable during an installation creation (outside of Eclipse). E.g. we create an NSIS installer around an RCP app and can also modify it there.

Eclipse showing lots of unrelated files in project explorer

I'm new to Eclipse, having done a lot of development in Visual Studio and XCode.
When I create a C++ project in my source tree the project explorer shows all the files in that folder and sub-folders. However there are lots of unrelated files that I don't want to see.
In Visual Studio and XCode I have to manually link source code to the project. This allows me to control the clutter of the project. Non-project files are "hidden" by default, because they aren't added to the project. In Eclipse everything is added by default. It seems that you can't decouple the file system's storage from the view you see in the project explorer.
Also I have a bunch of source in my tree that I don't want to compile as part of this project. Because it's for a different platform. I can't see how to remove these files from the compile list without also removing them from the file system.
Reading the docs hasn't helped much. What am I missing here?
There are 2 parts to this solution. First file name filters can be defined as described in this post:
Eclipse: how to hide custom files in Project Explorer
2nd the remaining files that I don't want compiled can be excluded by right clicking on them and Properties -> C++ build -> Exclude resource from build.
So it's more a negative space thing. In traditional systems, you have to explicitly add code to the project. In Eclipse you have to explicitly REMOVE code from the project. I prefer the old way because sometimes you want to include code from disparate regions on the disk and that just makes the all inclusive model of eclipse break. But I guess I'll cross that bridge when I get to it. sigh

Can NetBeans auto-build java free-form (Ant) projects?

After every save I need to right-click on the project in the project browser and click on build.
Is there a way to configure NetBeans to auto-build the project when I save a file?
See Compile on Save FAQ: http://wiki.netbeans.org/FaqCompileOnSave
I don't use CoS myself, I highly recommend Jenkins for your auto-build needs (and so much more): http://jenkins-ci.org/
The compile on save option is not available for free-form projects as of NetBeans version 8.0. And I don't think it will be made available in future too. The very idea of free-form is that that IDE does not know anything about your project and completely relies on the ant-scripts and the mappings you provide.
If you don't want to build an entire project every time you make changes to a file, create a target in ant to compile a single file and map it to the IDE command compile.single. You could add a context menu for that if required, although the existing keyboard shortcut F9 should suffice.
You can read more on the advance free-form configuration here - Advanced Free-Form Project Configuration