Netbeans 12.1 not applying code assistance properly on C headers - netbeans

I recently updated Netbeans from 12.0 to 12.1 on my Ubuntu 18.04 platform and I have noticed that code assistance has stopped working on C header files (*.h). Among other issues:
Selecting a hyphenated name like MY_C_MACRO by double clicking on it doesn't work; it only selects a token from the name ("MY", "C" or "MACRO") instead of the whole word.
Ctrl-clicking on a name doesn't switch to the definition of that name anymore.
Auto-tabbing doesn't work anymore (hitting ENTER brings the cursor to the beginning of the next line instead of placing it below the previous line's beginning.
Typing /** and hitting ENTER doesn't automatically insert the template for documenting the symbol below anymore.
Has anyone found the same problem and know how to fix it?

Related

PHP Eclipse - Do not select $ when selecting PHP Variable

I have recently been using PHP Eclipse and have got everything set up the way i like it with just one exception.
When i double click on a variable it also highlights the $ which makes it difficult to move to the next occurrence if it is later used without the $ as part of $this as an example.
Does anybody know how or if this can be achieved?
Just use Ctrl-F and search for the exact text you want.

Sublime text build system, using ~ and /home/username directories

I have my own build system for perl test files, and it works just fine except when capturing input. If I have an open file called, e.g., ~/projects/something.pm, on error the output of the build system will be something like Failed test at /home/username/projects/something.pm line 66.
The regex for capturing works fine, the problem is that sublime thinks that the two files are in different paths, so it opens a new tab, and I just want the open file to be brought up front.
Is there any setting to make this "match"?
EDIT: My .sublime-build file is generated every time I run the build, to support the fact that I may want to run a single test instead of all the file.
I have my own plugin that detects which test I'm using the cursor position and appends that to the command line. It makes no difference though, since the behaviour is always the same, even with a "standard" build.
The contents of the .sublime-build file are like this:
{
"shell_cmd" : "prove $file_path/$file_name" ,
"working_dir" : "/home/username/projects/",
"file_regex": " at (.*.pm) line ([0-9]*)",
}
I've tried replacing /home/username with the ~ character, but for some reason this breaks the build system, and when building I just get a black output panel, with the status bar saying "Building...".
I've found the real problem with a workaround anyway, posted that as an answer.
The problem in this case was that I didn't notice that the main directory of the project (which is generated beforehand), is actually a link to a directory of another user.
This means that if you add a folder to your project and that folder is a link, in the output you'll get the "real" directory, not the link.
Solved by removing the symbolic link folder from the project and adding the destination of the link as a folder to the project and now it works fine.

How to disable RubyMine code completion after comment line ending in period?

I am using RubyMine 6.3.2. When I type the following line and press return/enter:
# This is a comment.
the editor inserts additional text, resulting in:
# This is a comment.after() do
end
I understand that this happens because "aft" is the first item on the dropdown that appears after typing ".". I can preventing the insertion by pressing space after return/enter, but that adds a space to the end of the line, and I have to remember to do it.
Is there a way to disable code completion within comments?
It is a bug: http://youtrack.jetbrains.com/issue/RUBY-15127
It was fixed in 6.3.3, which was released yesterday: http://blog.jetbrains.com/ruby/2014/06/rubymine-6-3-3-rspec-3-code-insight-other-fixes/
This duplicate bug report http://youtrack.jetbrains.com/issue/RUBY-15195 gives a workaround, which is to go to RubyMine's registry (Control-Shift-A and type "registry") and uncheck "show.live.templates.in.completion". That works, and it revealed to me the existence of RubyMine's registry, so that's cool.

Unexpected 'INDENT' in CoffeeScript Example Code

As I was playing around for the first time with CoffeeScript, I ran in to a problem. In order to debug my problem, I tried replacing my whole file with one of the example bits of code from the coffee script site:
kids =
brother:
name: "Max"
age: 11
sister:
name: "Ida"
age: 9
However, when I try to compile that code, I get:
Error: In coffee/main.coffee, Parse error on line 3: Unexpected 'INDENT'
at Object.parseError (/usr/lib/coffeescript/parser.js:501:11)
at Object.parse (/usr/lib/coffeescript/parser.js:573:32)
at Object.compile (/usr/lib/coffeescript/coffee-script.js:23:22)
at /usr/lib/coffeescript/command.js:99:27
at /usr/lib/coffeescript/command.js:72:28
at fs:84:13
at node.js:773:9
In coffee/main.coffee, Parse error on line 3: Unexpected 'INDENT'
Since this is code from the CoffeeScript site, I assume the code itself isn't the problem. However, the compiler also seems to be working properly; if I compile:
a = 2
it generates a file with:
(function(){
var a;
a = 2;
})();
as expected. So in other words, the code is good, the compiler is good, and yet somehow I'm getting this Unexpected 'IDENT' error ... can anyone help me understand what is going on?
I am pretty sure this is a tabs-vs-spaces issue. Tell your editor not to convert spaces to tabs if it does that. Also, go through your code with the cursor and make sure it doesn't jump over blank areas.
The issue is that while normal editors see a tab as equivalent to two or four spaces, coffeescript sees it as one space, so the indentation gets messed up.
If this all doesn't help, make sure you have a recent coffeescript version, e.g. 1.1.0 or newer.
If you are using a JetBrains IDE (IntelliJ, PHPStorm, etc) the change of setting that worked for me is:
File > Settings > Project Settings > Code Style > CoffeeScript > Tabs
and Indents
Tick "Use tab character" & "Smart tabs"
Code is fine. Make sure you haven't messed up the whitespace (strange control chars showing as blanks, tabs or similar).
If you have the same problem, but your indentation is okay,
then you must be suffering from bug 2868.
Basically, the error is misleading. Check for indentation
errors in the required files.
When in Atom you can automatically convert tabs to spaces:
Packages > Whitespace > Convert Tabs to Spaces
You can resolve this two ways
1. IF using webstorm File->Default Settings as said above
2. Other workaround, is to use a different editor like Sublime, there u can press enter on earlier line and it will auto tab it for you with spaces

Eclipse: Can you put your cursor on all lines?

In IDEA you had the possibility to put your cursor on all lines.
Is this possible in Eclipse?
Eclipse 3.5 should have a column mode (which is what I think you're asking about) - use Alt+Shift+A:
http://update.eclipse.org/downloads/drops/R-3.5-200906111540/eclipse-news-part1.html#Text
I haven't tried this since I'm stuck at version 3.4.1 for the time being. There's a patch that claims to work for 3.4.0 (http://tkilla.ch/column_mode/), but it's not working for my 3.4.1 install.
If you refer to the ability to select a group of lines (like a all function), you can use the outline view
alt text http://publib.boulder.ibm.com/infocenter/radhelp/v7r5/topic/org.eclipse.jdt.doc.user/whatsNew/images/drag-and-drop-outline.png
From there, you can move/rearrange/delete all block of text.
If it is about column mode, see my answer here.
alt text http://update.eclipse.org/downloads/drops/R-3.5-200906111540/images/block-selection-mode.png