Eclipse CDT, stop auto find - eclipse

I've recently been trying to setup a little toolchain for something with Eclipse CDT but I'm being driven insane by the default behaviors of Eclipse. It's just so against the grain of other IDEs for C/C++.
Is there anyway to disable the automatic searching of folders in the project directory for the source files? I want to manually add the files for it to compile instead of having to manually exclude all the files I don't want it to compile between multiple configurations.

you can use your own makefile instead on relying on the eclipse auto generated makefile

Related

VSCode Language Support for Java extesion automatically adds .settings, .project and .classpath to directory

I have a Maven project with Scala and Java. I generally develop it using Intellij IDEA, however, I sometimes open it in Visual Studio Code.
Whenever I do that, it automatically adds .settings directory, .project file and .classpath file to the root of each module in the project.
This is seemed to occur due to the Language Support for Java by Red hat extension.
I would very much like to avoid this, how would I do that?
The Language Support for Java(TM) by Red Hat (aka vscode-java) extension generate those Eclipse files, because, under the hood, a customized, headless Eclipse process (jdt.ls) is providing all the Java support. You can not remove these files, if you expect proper Java support by this VS Code extension.
So your alternatives are:
add these files to your .gitignore (if you're using git, else, ignore them from whatever SCM you use)
disable or uninstall vscode-java and use a different Java extension in VS Code

How to remove associate file type from eclipse?

Eclipse recognizes *.glsl files as C++-Header files. This causes the IDE to scan over the content of my *.glsl files and mark a lot of it's content as problems who aren't. Because of this, it's harder to actually get to the real bugs and errors. Sadly, for some stupid reason, someone thought it was a bright idea and lock the control over this away from the user, so i can't delete it in the "File Types"-Settings and i'm pulling my hair how to get eclipse to ignore those files.
You should be able to get Eclipse to ignore them by defining a Resource Filter in Project Properties.
As far as I'm aware, removal of the content type association can only be done by an Eclipse plugin.
The *.glsl (and numerous other extensions in your list) are being provided by some tool other than Eclipse CDT. The Eclipse CDT project does not ship editors/associations for OpenGL projects.
This is the default associations in a clean Eclipse Oxygen for C/C++ Developers:
Therefore, if you have additional tooling installed for glsl files, you may find it easiest to uninstall them, or be in touch with the provider of those plug-ins.

Project-specific setting with cmake -> eclipse CDT project generator?

Generating eclipse project file from a cmake based projects works really good. We no longer need to commit eclipse project files to the repository.
But what is with the project specific settings like 'code style'. In a fixed eclipse project I could save and commit this setting. Is it possible within a cmake based project with generated project files for eclipse?
I do not see a solution to this as cmake completely regenerates the project. That's the reason why I use Makefile projekts with eclipse. I don't see any drawback of this as eclipse can easily trigger the make command.

Specific plugins per workspace

I came across this post and wondered if there is a way to activate only a few of all of my installed plugins depending on the workspace I currently work in.
For example - If I organized my workspaces like this
/workspaces
/java
/jee
/php
...
I don't need the Android-Plugin if I'm working on my Java EE-Projects and so on.
I also came accross this, suggesting to deactivate some capabilities for each workspace. But this not an option, as apparently no plugin is registered as capability.
Thanks, m
Edit: BTW, I am using Eclipse 3.5 Galileo
Maybe you can achieve your goal but it needs lots of "customization work" so I would not do it for myself :)
Create a "minimal" Eclipse install with plugins you use all of your workspaces.
Create one dropins folder for every workspace and put all of your "workspace-specific plugins" into that folder.
Create an Eclipse shortcut for all workspaces and use something like "-data _workspacedir_ -vmargs -Dorg.eclipse.equinox.p2.reconciler.dropins.directory=_dropindir_" in the shortcut.
Start eclipse with one of your new shortcuts.
Note that in this case you cannot switch workspace within Eclipse, you have to close the current one and start the new one using the corresponding shortcut.
UPDATE: I have found some Eclipse feature request for making this kind of setup easier if they will be implemented:
Software Update must allow to install plug-ins into extension location
Support for multiple bundle pools
You can use a different configuration folder for each Eclipse instance using the -configuration option when starting Eclipse.
On Windows, I would use a batch file (e.g. run-eclipse.cmd) which looks a bit like this (a bit different on Unix, more complex on OS X because of the app packaging):
eclipsec.exe -clean -configuration configs/%1/configuration
Execute it with your environment ID (e.g. run-eclipse.cmd java). I use eclipsec because I need the console output, but you can use the plain eclipse.exe executable. The -clean is not mandatory either.
Under my Eclipse installation folder, I will have a configs folder and under this folder I will have multiple configurations. Each config folder can have its' own plugins and folders. AFAIK, if you install plugins they will be installed in your configuration folder and not your main installation folder.
The structure you get is like this:
Eclipse Folder
plugins
features
configs
java
plugins
features
configuration
Eclipse plugins are expected to start only as needed, in a lazy manner. I'm not saying that all behave exactly that way, but if you write your own plugin, you'll see this is how the technology works, your plugin gets called only as needed.
So in Eclipse, if you configure your starting Perspective (Java for me) to have only the Views you need, the plugins that are used for other views should not be started.
To do this, take the view away and save your perspective (Windows - Save perspective as).
In addition, in Ganymede, in Windows - Preferences - General - Startup and Shutdown,
there is a list of plugins that should be started on startup, so you can edit that list.
I didn't try to see if this works per workspace though.
Although my solution won't let you install plugins per workspace but will solve the problem.
The best way i found to do this is using different eclipse copies:
Extract officialeclipse.zip to two different places and install plugins you like per eclipse.
A bit late answer but if you want to manage many workspaces shortcut the following tool is very simple and helpful : http://www.xdreamteam.ch/downloads/eclipselauncher/
I use it for sorting my projects by customers and workspaces, and it launch the right workspace with all the necessary configurations needed for each.

Forcing Eclipse to generate standard Unix makefiles

I have an Eclipse project I've been working on for some time now, and I'd like to open source it. But to do that I'd like to have a clean Makefile like the majority of other open source programs. I understand I could make my own, but it would be better if Eclipse could manage it for me. Getting Eclipse to generate a CMake file would be even better, but I can settle for a plain makefile if that is easiest. So, how can I get Eclipse to do this? There are a few posts on the internet that suggest selecting "Managed make" when creating a project, but they were from a few years ago and are outdated. When I try to create a C project, there is the option to create a "Makefile project", but it creates the makefile in a folder called "Linux GCC" and makes everything cluttered. Any suggestions?
I've been a *nix guy for 25+ years and am a big fan of make. However, making your Eclipse project dependent upon make is going to exclude the Mac and Windows community. Why don't you just export the Eclipse project and open source it as an Eclipse project? Then users can can have it ready to extend if they choose. You didn't specify the language your project is written in, if it's Java (pretty common for Eclipse) why not create an ant build file for the project?
Just a thought.
I ended up just creating a CMake project by hand. CMake files are really not that hard to make, and it's a lot easier than trying to get Eclipse to do it for you. Plus, they're cross-platform.
Would a CMakeBuilder eclipse plugin, associated with this tutorial be a good fit for what you are trying to do?
The end result would be something like:
(source: vtk.org)
If you've been building your project using the Debug configuration the makefile Eclipse generates is stored in the Debug folder of your project (or the Release folder if you've built it using the release configuration).