eclipse c++ exclude multiple files from build at once? - c++

Instead of right clicking each one individually, ticking 'exclude from build', etc
And how to include them back en masse ?
Thanks

Highlight one of your file's by left clicking it. Then, to select multiple files, hold down shift or control then left click on another file. Shift will select all files between what you selected. Control will add just the one. Then, let go of shift (or control), then right click one of the selected files, then chose "Resource Configurations > Exclude from build...". It will exclude them all. Similarly, repeat the step to add them back.

Create a new folder inside Eclipse (let's name it excluded). Right-click on excluded and use Resource Configuration->Exclude From Build..., check which builds you want it excluded from and dismiss the dialog. Now you can disable files by selecting a group of files and dragging them to this folder. Include them back in the build by dragging them from excluded back to their original location. Note that once marked as excluded the folder appears near the bottom with a new icon with a slash through it.

Related

Is there a easy method to copy Stored Process in SAS?

I am creating 40+ Stored Processes in SAS EG (Programs already written) and I am creating Stored Processes so that end users can run them without my intervention.
Its a sloooow progress! Each SP has to be created individually. The SPs are generally all the same with a few differences (eg. program name)
Is there a copy paste or similar I can use to speed up the creation process?
Are you using management console?
If so,
In detail pane
Select one or more STP
Right click and choose copy.
In folder pane
Right click and choose paste (can be the same folder)
If same folder, the new copies will get a (#) suffix added but have the same
properties.
In detail pane
Change properties
Rename to what you what
Change Execution property to appropriate program (already written)
Save
You might need to right click the folder and choose Select if the new entries (copies of STP) are not automatically shown.
Yes i have the same issue, but the thing i do is to copy the whole sascode and paste it in new stored process and make the small changes like table name … etc, and create the inputs then finish

Visual Studio go to bookmark only inside current file

Is it possible to go to the next/prev bookmark only inside the current file? I'm using VS 2010 and I find it extremly annoying that it jumps always across all files when I want to navigate inside the current file only.
Yes. Go to "customize" (right click on the toolbox area, choose customize) ->commands->keyboard, choose edit.NextBookmarkInDocument and associate it with a shortcut.
In addition, you can add it as a button in the text editor toolbar. Go to to text editor toolbar, press the little mark on the bottom-right,and choose the appropriate button to add.
Set bookmarks to stay in one file in Visual Studio 2019
In the Search box at the very top menu, put in ‘customize’ and hit Enter’.
A complex box comes up, but I simply clicked on a button at the bottom labelled ‘Keyboard’, which is where keyboard shortcuts can be set up.
That brings up another huge box. In the left hand pane is Environment and under that is Keyboard. I guess that the way I went in is why this was expanded and already selected, so there must be other ways to get to the same place.
In a right hand pane is now a huge list of commands that can have shortcuts attached!
The ones to scroll to (enlarge the box or the scroll bar is a joke. A slight move scrolls dozens of lines!) are Edit.NextBookmarkInDocument and Edit.PreviousBookmarkInDocument. (similar commands without ‘inDocument on the end are what f2/ shift f2 do by default and jumps between files rather than staying in the same document.)
When you select a command you can then just click on the field labelled ‘Press shortcut keys’ and then press the keys you want to be the shortcut for that command.
I assigned Edit.NextBookmarkInDocument to f2, which then replaces the old f2 that jumps from file to file, and shift f2 for Edit.PreviousBookmarkInDocument. You have to press the ‘Assign’ button to make VS remember the change. After this, bookmark jumps stay in the same file. I guess you could choose any shortcut you fancy, and it does at least show you if that shortcut is assigned and what it is assigned to.
There are some features which I have not explored, like when I use f2 it shows it is assigned to ‘Rename’ but it seems to not effect that function at all when you reassign and just takes it away from the jump between files command version. Maybe someone would like to delve deeper, but what I did worked without any side effects and renames outside of VS still worked with f2 so I have no idea what it was going on about.

Highlighting of a makefile in eclipse

I have two makefiles in Eclipse, one is named all.mak and the second is called Makefile.
My Problem is that Makefile is highlighted correctly when opend with the Makefile-Editor but alle.mak is not.
I know that under Window→Preferences→General→Editors→File Associations one can set the Makefile-Editor to open this file and I did so (but no highlighting for all.mak).
Is there another preference I have to make for correct highlighting of the all.mak-File?
Yes, there is another preference to set. Go to..
Open the preferences view: Window → Preferences
General (in left panel)
Content Types
In the right panel ("Content types"): Text
Makefile
Press the 'Add' button, and enter the same filename as you did in the File Association view.

Disabling/Enabling choose button of QFileDialog based on specific criteria

I have a QFileDialog prompting the user to select a directory. I am running QT version 4.3.5. I do not have the option of upgrading either.
I want the user to only be able to choose directories that contain two files with specific names. Something along the lines of disabling the "Choose" button if it does not contain these two specific files.
The searching I have done has only led me to ways of filtering the results, which is not what I want to do since the user needs to be able to browse all directories and all sub directories. If a directory is selected, then the check should be made to disable/enable the "Choose" button based on the above criteria.
Like I said, the only half close solutions I have found are explained in this thread QFileDialog for directories that have certain content
or this thread qfiledialog - Filtering Folders?
Both of those half solutions to my question require the use of QFileSystemModel, which wasn't introduced until QT 4.4.
How can I enable/disable the "Choose" button of a QFileDialog with QFileDialog::Directory set as the FileMode based on whether or not the selected/activated directory contains two specific files?
Thanks
You need to copy the file dialog's sources over to your project, modify the name of the class, and start tweaking it. That's the only way, unfortunately.

Team City Artifact Limit

I need to limit the number of Artifacts a particular build is keeping. This one build generates very large artifact output which will eat through disk space. Ideally I would like to configure just that build to keep a maximum of the last 3 successful builds but I don't want this limit applied to all projects.
Go to:
Administration
Build History Clean-up (right menu)
At the bottom select your project / build under "Manage cleanup rules for"
Click "Edit"
In the popup, select "Custom" for "Clean artifacts"
Put "3" in "Older than the -th successful build"
Save.
This is as close to what you want. The only devation being that it will only discard artifacts after the nth successful build.
Or, another option presented in the settings is cleanup based on a date, like "Only keep the past 7 days".
Update for TeamCity 9.x and above:
Administration
Click the Edit link for any of your branches or <root project>*
Clean-up rules on left hand menu
Under What to clean-up choose the Edit link.
Under the Artifacts section, put a value in the box: Older than the []-th successful build.
*Please note that TeamCity uses inheritance so if you edit the <root project>, all your projects will be affected. This is also the case if you set options for project groups.
Update for TeamCity 2019
Find the builds of the project you want to change.
Select Edit Build Configuration in the top right.
Find the project inheritance hierarchy breadcrumb in the top left.
It will look similar to: Administration / <Root project> / YourParentProject
Click on the project that is the direct parent to the project you want to edit. (YourParentProject in the example above.)
Click on Clean-up Rules from the menu on the left.
Find you project in the list shown in the main window and click the edit button found at the end of the project's row.
Select retention rules as desired.