I'm using IntelliJ 2021.2 Community Edition Build #C 212.4746.92, built on July 27, 2021.
The IDE sometimes recognizes comments "//TODO", "// TODO" and sometimes not. They're recognized when they are printed in yellow.
When these comments aren't recognized I add or remove a space but it works just for some minutes ... then they gone grey again ...
Does anybody knows how to fix this?
EDIT: Config in Intellij Editor / TODO
Treat indented text on the following lines as part of the same TODO (MARKED)
Under Patterns:
\btodo\b.* (case sensitive not marked)
\bfixme\b.* (case sensitive not marked)
Related
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?
For some reason, when using IntelliJ and Scalafmt 2.7.5, typing /** followed by [ENTER] results in the following sort of docstring:
As you can see, the first asterisk has no indentation... Since I have "format on save" enabled, hitting [CTRL]+[S] results in a correctly formatted docstring:
It doesn't surprise me that the initial format wouldn't match up with scalafmt's, and that the formatting isn't really applied until saving or compiling (if that's enabled). However, the lack of indentation on the first asterisk -- even if it's only present until I save or compile -- is driving me mad.
Does anyone know how to resolve this without using the built-in IntelliJ formatter? This is actually tempting me to scrap scalafmt and just use the IntelliJ formatter for my team's project. Thanks :)
Here's the .scalafmt.conf for reference:
version = 2.7.5
project.git = true
preset = IntelliJ
I know there are a bunch of posts about this already, stackoverflow: word wrap in netbeans, for one, and there are some people that say it is already included in netbeans 7, but for the most part they are all old, or inconclusive. I use netbeans 7.0.1 and the included word wrap is half-assed and glitchy at best. Going to Tools > Options > Editor > Formatting > Line Wrap and setting it to either "After Words" or "Anywhere" both result in practically the same sort of wrapping and neither one is very reliable. On occasions it will wrap as expected, but more often than not you can end up with anywhere from one word to an entire paragraph past the vertical scrollbar. Is there something I am missing or is that really the way that's supposed to work?
I'm still looking and will post any significant finds, but does anyone know of a way to fix this, or a plugin to install for it, or anything? I would have figured after 4 years of inquiries (2008 is the oldest post I've found about this) netbeans would have fixed it :(
BTW: Not looking for reasons why my code shouldn't be more than 80 character long, there's no helping it sometimes and that answer isn't helpful. I have also tried adding "-J-Dorg.netbeans.editor.linewrap=true" in the netbeans.conf file, but from what I gather that is for enabling the feature in older version and did nothing in mine (I removed it).
On Netbeans 7 and 8, you can use Tools/Options/Editor/Formatting/LineWrap.
It can only be globally enabled.
you can do it from:
1) Tools -> Options -> Editor -> Formatting(Tab)
2) Select Your Language in "Language Drop down"
3) Select "Wrapping" from "Category and do what ever you want
Note: this is for Windows OS
I have done it in netbeans 8.0
Goto -> Tools-> options-> Editor-> Formatting-> language(dropdown-All languages) -> Category(dropdown-Tabs and indents) -> Line wrap(After word)
Make sure you re-open the file to see the change.
In case any one is looking for this with NetBeans 8 on OSX and ends up here, it's preferences/Options/Editor/Formatting/LineWrap
you can do it from:
1) Tools -> Options -> Editor -> Formatting(Tab)
2) Select Your Language in "Language Drop down"
3) Select "Tabs and Indents" from "Category
4) Dropdown" select any of the desired option from "Line Wrap drop down"
i.e After words or Anywhere
Note: this is for Windows OS
In Netbeans 7.2 it's actually, "Wrapping" instead of "Line Wrapping" and it's "If Long" instead of "After Words", but that probably doesn't answer your question.
You posted this almost one year ago, and you still haven't found anything yet?
I don't like how they decide to wrap by way of creating actual new lines in the editor. I would prefer if it just line-wrapped but you didn't have to make a new line - like, what you have with Notepad. However, I would prefer if you had a symbol to show that you're line wrapping on the next line, like I have seen in other IDE's before.
I done in Netbeans 8.0.2 as following way :
NetBeans->preferences/Options/Editor/Formatting/LineWrap
Hope this is useful.
I'm a long-time eclipse user looking to use netbeans now that I've tried netbeans out a bit. I mostly like what I see, except there's a few aesthetics missing. Anyone have ideas on if the following are available in NetBeans?:
Eclipse highlights modified & inserted lines in the left margin / gutter
Eclipse highlights the currently edited function in the left margin / gutter
Eclipse highlights TODO / FIXME comments in the right margin
For example:
alt text http://img507.imageshack.us/img507/5471/forso.png
... any ideas on how I can get Netbeans to do this sort if stuff ?
If your project is connected to source control netbeans will show added lines with a green block at the beginning of the line, modified lines with a blue block, and deleted lines with a red arrow. It also marks these in the right margin/gutter. This is based off of compared to last commit, not last save however.
As for the other two I could not find a way to implement them but I may just be missing something
My system: Ubuntu 9.10. Eclipse 3.5.1 with Java EE 1.2.1 (manual install - NOT from synaptic). Web Developer Tools 3.1.1
I've recently adopted someone else's code (a Dynamic Web Project), and run into lots of errors, warnings and incorrect syntax highlighting in Eclipse. I've narrowed it down to these 4 lines of code (create a new Dynamic Web Project, and then a new JSP page, and put this in the body):
${(1<2)? "" : "no"}
<%for (int i = 0; i < 5; i++) {%>
<div>${5}</div>
<%}%>
Errors / Warnings / Incorrect syntax highlighting
line1: yellow warning line under '<': Invalid character used in text string
(${(1<2)? "yes" : "no"}).
line2: red error line under 'f':
Multiple annotations found at this line: 1) Syntax error, insert "Finally" to complete TryStatement. 2) Syntax error, insert "}" to complete ClassBody
line2: red error line under ')': Syntax error on token ")", try expected after this token
line3: yellow warning line under 'div': No end tag (/div).
line3: yellow warning line under '<' of closing div: Multiple annotations
found at this line: 1) Invalid character used in text string (${5} <%}%>). 2) Invalid character used in text string (${5} <%}%>).
line3: '/div' is black and purple (for scriptlet code?) instead of green for HTML code
line4: The opening and closing scriplet tags '<%' and '%>' are black instead of orange
The page works as expected in a browser: you get '5' five times. If you change the empty quotes on line 1 to "yes" then save, close the file in the editor, r click it in the project explorer > validate, then re-open it: all errors / warnings / incorrect syntax highlighting disappear, except the first one (invalid character). This is incredibly irritating. Any thoughts would be greatly appreciated.
Eclipse WTP is great, but exactly this problem is an epic fail in Eclipse WTP for me as well. They seem to be working on that, but until then I just disable/set-to-ignore all of the validation related to this stuff in the workspace preferences through Web > JSP Files > Validation > scroll list to very bottom and set all EL validation settings to Ignore. Also in the main Validation preference uncheck all checkboxes related to JSP. This however doesn't seem to remove every warning/error, but it at least minimizes the annoyance.
IntelliJ IDEA handles JSP/EL validation much better.
To me, the symptoms make me think that WTP is using regexp instead of a stackbased parser to validate HTML/JSP/EL. This is a big no-no in case of structured markup.