Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] How do resource files get copied from 'src' to 'bin'?

The CDT source repository contains a file core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/ColorSettingPreviewCode.txt, which contains the source code shown in the preview window on the Syntax Coloring preference page.

The contents of this file are loaded using Class.getResourceAsStream() (see [1] and [2]).

At some point during the build process, this file gets copied from its original location to core/org.eclipse.cdt.ui/bin/org/eclipse/cdt/internal/ui/preferences/ColorSettingPreviewCode.txt (that's the same path as the original location, but with 'src' replaced with 'bin').

It appears that it is the copy of the file in the 'bin' folder that is actually being read, at least when Eclipse is run from the development workspace by right-clicking on the org.eclipse.cdt.ui project and selecting Run As -> Eclipse Application.

How is this file getting copied from the 'src' folder to the 'bin' folder? As part of a bug I'm working on, I tried adding another .txt file in the 'src' folder, but it did not automatically get copied into the 'bin'
folder. So, I'm thinking there must be a configuration file or build script somewhere that specifies that the ColorSettingPreviewCode.txt file needs to be copied into 'bin'. However, I wasn't able to find it. Does someone know where it is?

Thanks,
Nate

[1] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/tree/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CEditorColoringConfigurationBlock.java#n823
[2] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/tree/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CEditorColoringConfigurationBlock.java#n839

Back to the top