Telelogic Synergy equivalent of svn blame? - cm-synergy

Is there an equivalent in Synergy to the blame command in Subversion?
I'd like to be able to see, for a given version of a file, the originating change request or task for each line of that file.
I'm using Synergy version 6.5.4105.

Synergy has no official equivalent of blame in it's command set (hopefully later they have one).
Although this page speculates, that it is possible via their scripting language.

Parasoft C++Test provides a 'Show author at line' menu option in Eclipse, that works when the CM system is configured for CMSynergy. It provides the date & author & comment, but not the task id! Versions I'm using are:
Eclipse 3.5.2 (with CDT)
CppTest 7.3.2
CMSynergy 7.1
Best regards,
Aaron

Related

How do you enable C++17 in Netbeans?

In Tools > Options > C/C++ > Other, there is no option for C++17 as the default standard.
How do you compile code that requires C++17?
Updated 3/28/21 for NetBeans 12, as documented at the end of this answer.
The C++17 standard was published over a year after NetBeans 8.2 was released, so C++17 is not available as an option in the standard release of 8.2.
However, NetBeans Bug Report Bug 271136 - Support C++17 standard addressed this deficiency, and if you download and install any of the most recent nightly builds of NetBeans 8.2 from 2018 the issue is resolved; C++17 is available as an option when creating a C++ project:
If you then select {project} > Properties > Build > C++ Compiler you can verify that the C++17 standard is being used:
Notes:
When you create subsequent C++ projects, the project wizard will continue to use the C++17 standard by default, so it becomes "the default standard" unless/until you select an alternative.
Using a nightly build of NetBeans 8.2 instead of the standard release is also preferable because it contains many unrelated bug fixes.
An even better alternative (if it is possible for you) is to download and install the latest release of NetBeans, Apache NetBeans 11.2 which also provides C++17 as an option.
If you install a nightly build of NetBeans 8.2, or NetBeans 11.2, your existing installation of NetBeans 8.x will not be touched, so you can safely revert if necessary.
Updated 1/21/20 and 1/22/20:
These are the steps needed to make C++17 available on NetBeans 11.2:
Opening the project wizard using File > New Project... shows that C/C++ projects cannot be created by default.
Select Tools > Plugins > Settings then click the Add button.
In the Update Customizer Center screen, set Name to NBDevDarkThemes and URL to http://bits.netbeans.org/dev/nbms-and-javadoc/lastSuccessfulBuild/artifact/nbbuild/nbms/updates.xml.gz and click OK.
Ensure that only the entry for NbDevDarkBeans on the Settings tab is checked.
Install the C/C++ plugin by clicking the Available Plugins tab, then checking the entry for C/C++. The version for that plugin should be 1.31.5.1. Click the Install button.
After the plugin has been installed, click the Installed Plugins tab, check the Show Details checkbox and scroll down to verify that the C/C++ plugin is installed and Active:
Go to Tools > Options > C/C++ >, click the Build Tools tab and configure your external C/C++ environment as required. For example:
Now go to File > New Project... and you should be able to select C/C++ > C/C++ Application.
Click Next >. On the Project Name and Location screen you should now be able to select C++17 for the standard:
Updated 3/28/21 for NetBeans releases 12.x:
Bad news: NetBeans no longer officially supports C++! See the definitive response from Geertjan Welenga, leader of the NetBeans Team, dated 3/25/21 in response to the recent bug report NETBEANS-5501 C++17 no longer available:
*At the moment, NetBeans doesn't support C/C++, the plugins you were/are using from 8.2 are not really officially supported, though work on this is ongoing here, with an end goal to having it officially part of NetBeans, though that will take a while:
https://lists.apache.org/thread.html/r4ac84633554ce80d99b0710e7a803ce1dc322680c914b18058876b51%40%3Cdev.netbeans.apache.org%3E
You're welcome to join in with the discussions on dev above.*
That said, there is an unofficial workaround, as detailed in bug report NETBEANS-4452 The Plugin Installer found problem timeout of loading C/C++ Remote Development API... while install the following plugins: C++. That is:
Download JDK 8 (if necessary).
Temporarily set the JDK NetBeans 12 uses to JDK 8 by editing netbeans.conf, then restart NetBeans.
Install the relevant C/C++ plugins.
Reset the JDK NetBeans 12 uses to the one you were using originally - presumably to JDK 14 for most users - by editing netbeans.conf, then restarting NetBeans.
C++ 17 should then be available on NetBeans 12, on the clear understanding that it is not officially supported.
The accepted answer completely valid, but the old plugins repository was shut down, and oracle now redirects all links to their infrastructure to the apache site. It means that we can now download plugins only provided by apache.
To add support for C++ 17 to NetBeans 11 (was tested only on 11.0, but some reported that it worked on 12.3, see the comments), you need to do the following
Manually add plugins of the CND module that provides such support. The version of the plugins should be more than 1.31.5.1
Ensure that NetBeans uses JDK8 because old plugins required a upack200 module. It's unavailable, for example, in JDK14.
Steps to install it manually
I downloaded all plugins (NBM files) you need for C++17 support. You can download it here. Beare in mind that the pack was tested only with 11.00 NetBeans. Please, use 11.0 NetBeans.
Then you need to unpack the archive to a folder
Start NetBeans, go-to Tools -> Plugins -> Downloaded.
Click Add Plugins and select all plugins in the archive. Check that you have 64 plugins for installation. Why you need so many plugins? Because the C++ plugin depends on other plugins. So you need to provide the newer versions.
Click install. There will be a warning that additional plugins will be installed:
After installation, go to the Installed tab, check Show details option and find the C/C++ Plugin. Verify that the version is 1.31.5.1:
Automatic installation
The truth is the nightly builds repository was not completely shutdown. You need to know the exact IP address for accessing it.
So you could use all the steps from the accepted answer but instead of the link
http://bits.netbeans.org/dev/nbms-and-javadoc/lastSuccessfulBuild/artifact/nbbuild/nbms/updates.xml.gz
you should use:
http://137.254.56.27/dev/nbms-and-javadoc/lastSuccessfulBuild/artifact/nbbuild/nbms/updates.xml.gz
But oracle can restrict access to it at any moment. And also, ensure that your NetBeans runs on JDK8 (upack200 issue).
NetBeans 8.2 Dev Build with C++17 support
If you are looking for old 8.2 release with C++17 support here the last dev build (20180420) from oracle. It runs only on JDK 1.8

View the source code C++ in Eclipse - Ubuntu environtment

I had loaded the project to Eclipse but when I open the .cpp file, it like to open a text file.
Anyone know how to display the code-view in eclipse?
Please support.
Thank you so much.
I cannot find C/C++ in Window -> Preferences
Then you have no CDT installed – I suppose you got the version direct from the initial download page, but that's actually the java package – there's a link 'download packages' below, where you would have found the C++ package. Not too obvious, admitted.
Never mind, you don't need to re-install: Help -> About will reveil you your installed version's name ('Kepler', 'Luna', ...); via Help -> Install new packages you can add CDT plugin to your installation. Select under work with your release version of eclipse repository, e. g. http://download.eclipse.org/releases/photon.
Minimally, you need: C/C++ Development Tools, other plugins might be useful, too, like standalone debugger, call graph visualisation, unit testing support, auto tools support (configure, make; especially under linux), possibly LLVM support (if you want to use clang compiler), ...
My issue had been fixed.
Just do below steps in ubuntu:
Go to
https://www.eclipse.org/cdt/downloads.php and download newest CDT(C/C++ Develop Tool) version.
Copy the download file
eclipse-cpp-2018-12-R-linux-gtk-x86_64.tar.gz
to your folder in Ubuntu.
Extract
eclipse-cpp-2018-12-R-linux-gtk-x86_64.tar.gz
Run execute eclipse file -> Done.

VSCode "go to definition" not working

I installed Visual Studio Code 1.1 with the C/C++ extension,
opened my C++ project and tried to use "Go to definition" in vain.
The "Go to definition" is not working at all.
Example, go to definition of a class member:
int i = m_myVar;
(I opened a simpler project with one file and it was working for this one)
In the end, what I want is good indexation of my big project, is there a way to install Intellisense?
I had a the same issue: F12 and Ctrl + Click and Right Click "Go To Definition" wasn't working.
The fix for me was:
Go to Extensions
Click "Disable All Installed Extensions"
Close and Reopen VS Code
Back to Extensions and "Enable All Extensions"
Essentially enable/disable all extensions fixed the issue.
I recently came across this same issue and after trying all of the suggested solutions I could find with no success, I found this article:
https://code.visualstudio.com/docs/setup/linux#_visual-studio-code-is-unable-to-watch-for-file-changes-in-this-large-workspace-error-enospc
Basically my project grew too large and VS code was no longer able to track all files, which messed up the "go to definition" functionality.
After following the steps on the link to increase the maximum number of files to be tracked, the issue was resolved.
The correction is pretty simple (tested on Ubuntu 18.04):
Add this line:
fs.inotify.max_user_watches=524288
to the end of the file /etc/sysctl.conf
After saving, run the following command:
sudo sysctl -p
Hopefully this will be useful to someone else, this has been bothering me for the last few days.
I had a similar problem except with Python and google searches for solutions kept bringing me back to this post so I figured I'd post my solution here in the hopes that it might help other people.
I was working on a remote cluster through VScode Remote and was getting similar errors to the original question(all 'go to ___' functionality was unavailable and was even getting a 'too large to track' error) and I thought I had to increase the number of watches, which didn't end up helping.
All I needed to do was install a python interpreter on the remote VScode server. This fixed my problem.
I believe vscode 1.1 (well, 1.1.1 actually) + the C++ extension (cpptools) is as much Intellisense as we can get for now.
You should load your big project with the "open folder" function to make vscode know about the other files.
https://blogs.msdn.microsoft.com/vcblog/2016/03/31/cc-extension-for-visual-studio-code/ warns about letting the indexing finish first (red icon in lower right corner during indexing) and mentions the current limitations on the source code parsing.
It wasn't working on my laptop as well after installing a few VSCode extensions. I decided to close and re-open VSCode with administrator permission and suddenly it sorted out.
I have been trying to fix this for a long time. In the end, what worked for me was simply reinstalling VSCode, then installing the latest C/C++ extension (v0.18.1). Then, in your .vscode/c_cpp_properties.json file, under includePath, add your include folder which has all your header files.
I tried the methods mentioned in this thread none of them seemed to work for me. A simple solution that worked for me is that I closed the current workspace and created a new workspace, added the folders which I required(same as the old workspace), and saved the new workspace. Waited for a couple of minutes to index and IntelliSense is able to find definitions now.
I am using VSCode 1.52.1 on Ubuntu 20.04.
In my case, for whatever reason,c_cpp_properties.json has become set to Disabled in ~/.config/Code/User/settings.json.
Manually changing it to Enabled solved the problem.
Fixed mine by UNCHECKING C_Cpp > Default > Limit Symbols To Included Headers
Your mileage may vary. Good luck!
Have you saved your workspace? Or did you just open a folder with File->Open Folder? This question already has many answers, but none of them address this case, which was my issue.
The question is not specific enough for me to know if you are having the exact same symptoms as my case.
If:
You have not saved your workspace. vscode doesn't say "(workspace)" at the top of the window.
None of the goto functions are working, but instead report: "No ___ found for ____"
The tag parser database icon in the bottom right is always there but only reports "Parsing open files", rather than telling you how many files have been parsed.
Then:
Try saving your workspace.
If you have multiple versions of a language on your PC, specify the exact language you are using in the VScode(in my case, I am using Python, so I must specify the version to the python Interpreter in VS Code)
If you could not do it whatsoever, then uninstall all the other versions that you don't use and then if you go to VS Code, it will ask the version to be used, and you would have only one version, so when you select the version, the "Go To Definition" will be activated.
I was having a similar issue with java on Ubuntu 20.04 using OpenJDK version 11 (openjdk-11-jdk in apt). At first I didn't have the JRE installed, so I installed it and it still didn't work.
Afterwards, I went to the CTRL + SHIFT + P menu and then to Java: Configure Java Runtime, there I saw in the Java Tooling Runtime tab that /usr/lib/jvm/java-11-openjdk-amd64 was selected, changed it to /usr/lib/jvm/java-1.11.0-openjdk-amd64 just to see if it would work, and after a restart it did. I'm not sure why this is, but I hope it may help somone else.
For python ensure your code analysis settings are correct. In my case the languageServer was accidentally set to 'None'. Reverting it to 'default' or 'pylance' did the trick.
Just to inform if none of above works then
In my case i was using Kite extension in my VS code, I just disabled it and it worked. I think kite extension is blocking this feature.
OS: Linux Ubuntu 22.04
if you encountered with following error:
"The .NET Core SDK cannot be located. .NET Core debugging will not be enabled. Make sure the .NET Core SDK is installed and is on the path."
Normally Vscode remains unable to locate .Net sdk. need to set path manually.
sudo ln -s /snap/dotnet-sdk/current/dotnet /usr/local/bin/dotnet
restart omnisharp & restart vscode
No need to do anything. Just close and re-open. It will work.
I also faced similar problem. In my mac os cmnd + 'click' is used to 'go to definition' then it suddenly stoped working. If that is the case then please follow these steps:
restart vs code
restart pc
uninstall all extensions and reinstall again followed by a pc restart.
I had a similar issue with the extension C/C++ installed. I solved it by downloading an older version of the extension and upgrading to the last version. Somehow it solved the problem...

How to do automatic g++ compilation after each save?

I'm writing simple C++ code (one "cpp" file). Now I compile my program by manually running g++ from command line. But I was wondering if there is any way to do automatic g++ compilation after each save of file.
I'm using Ubuntu and Sublime Text 3.
There are also much fancier solutions available:
YouCompleteMe compiles and analyses the code in background while you type, for Vim
Emacs-ycmd is one of several ports to Emacs
RStudio IDE does the for C++ code (when though it is an R environment)
You can 'cook' similar things much simpler by using Linux kernel hooks in userspace to react whenever a file you watch is saved. Here you'd simply call g++, or as others already said, you probably want make.
One of the hooks is inotify; there are several Ubuntu packages accessing this (which I have yet to use). Here is one:
edd#max:~$ apt-cache show entr
Package: entr
Priority: optional
Section: universe/misc
Installed-Size: 61
Maintainer: Ubuntu Developers <ubuntu-devel-discuss#lists.ubuntu.com>
Original-Maintainer: Yuri D'Elia <wavexx#thregr.org>
Architecture: amd64
Version: 2.6-1
Depends: libbsd0 (>= 0.6.0), libc6 (>= 2.4)
Filename: pool/universe/e/entr/entr_2.6-1_amd64.deb
Size: 11310
MD5sum: 818b54114577b8d15d619577acf52c97
SHA1: b8422ee12546843f3357c1114bf1f5eeea8c863e
SHA256: ada9aa2ea218fc9f7a255b576d5069dda06da369ecc4000bb596e398b04eeafd
Description-en: Run arbitrary commands when files change
The Event Notify Test Runner (entr) runs arbitrary commands when
files change. Changes are detected through the kqueue/inotify
kernel interface.
Description-md5: 52fe22e37b3719b7c736bf46a6d8c9b7
Homepage: http://entrproject.org/
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu
edd#max:~$
Create a makefile. Most editors have a shortcut keypress that executes make.
You can use make command.
Example: Imagine the file name is test.cpp then you can execute the following command:
make test
It will automatically compile using g++ as the extension is .cpp
If you are using VS Code, you can install the extension C/C++ Compile Run for the VS Code.
Once you change the code, just click F6 for executing it without passing any additional arguments, or F7 to type the passing arguments in the Command Palette, which will be passed to the code at the beginning of the execution.
C/C++ Compile Run
Use a proper build system that integrates with your IDE/editor.
There are many to choose from. My personal preference is SCons (http://scons.org/) but there are also options like CMake (https://cmake.org/) or autotools (https://en.m.wikipedia.org/wiki/GNU_Build_System) available or simply a plain Makefile.
And there are many more less known ones as well.
Check them out and pick what suits your needs best.

Eclipse CDT Custom Compiler Error Parsing Plugin

I'm using an uncommon C compiler with Eclipse CDT. I have a make file setup which is nice, but I'd like IDE integration with the error / warning output of my compiler.
Does anybody know what steps I can take to write a plugin for parsing / supporting my compilers output? I think it should be easy but there is a barrier of entry of figuring out where to start. Would be nice if Eclipse would let me do New -> Compiler Error Parser Plugin, or something like that.
Thanks
It's not quite that simple...
First of all make sure you have the Eclipse PDE (Plug-in Development Environment) and CDT SDK installed. If not then you'll need to tell Eclipse to download them (Help -> Install New Software).
Then, create a new Plug-In project. In its Extensions tab, add a new extension against point org.eclipse.cdt.core.ErrorParser. You will then have to write some java code to actually implement it. Fortunately the PDE makes the meta-work relatively straightforward; you put the name of your class in the appropriate box and click on the "class*" hyperlink and it will offer to create a skeleton class for you.
I suggest you grab the source code to the CDT and have a look at GCCErrorParser.java as an illustration of the sorts of things yours will have to do.
Finally, when you're ready to test it, set up a debug configuration of type Eclipse Application. (This will spawn a second instance of Eclipse; it has to use a different workbench.) Go into the properties of your C project, Settings panel, Error Parsers tab and switch on your shiny new error parser.
In Eclipse CDT 7.0.1 it's pretty simple. Just add a new error parser
under Window -> Preferences -> C/C++ Build -> Settings
and add regular expression with 3 groups: filename, linenumber and error description.
For example, for Visual Studio compiler regexp will be:
(.*?)\((\d*)\)\s:\s(.*error.*)
$1 - filename
$2 - line number
$3 - error description
IBM has published a step-by-step guide to how you can write your own CDT parser, its available here
Relevant google search for future proofing should be:
https://www.google.com/search?q=ibm+eclipse+write+cdt+parser&oq=ibm+eclipse+write+cdt+error+parser
In CDT 7 there is going to be a regular expression error parser included which should make this sort of thing much simpler. There are some details on the faq.
CDT 7.0 won't be released until the end of June, but you could try milestone builds to see if it does what you want. These can be downloaded here. You'll need to have a matching milestone version of the eclipse platform too.
I am using this plugin:
http://www.isystem.com/downloads/downloads/204-Eclipse-Downloads.html
is this working ?
(.*)\((\d+)\)\s:\sError(.*)
file: $1
line: $2
desc: $3
.
srkos
In CDT 8 this functionality does not require a plugin. I have support for several compilers and build systems using simple regular expressions. See screenshot here. You can test the regexes directly in the console output before copying them to this dialog. If you need to move them between machines, the resulting parsers are stored in your workspace under .metadata/.plugins/org.eclipse.cdt.core