Is there a shortcut for color chooser in NetBeans? - netbeans

Is there a shortcut for color chooser in NetBeans?
I found this same query on NetBeans website, it was said that this was possible but I can't find an actual answer how to do it.
I mean this: when I am in a CSS file and I am editing a property that involves a color, the color chooser pops up automatically. I would like to have the color chooser pop up on demand when I am editing any file (e.g. a PHP file). It would be very helpful.
I already looked in Options -> Keymap and there seems to be no shortcut containing the word "color".
Thanks.

In the editor, click the text representing the color (you don't even have to highlight the whole thing), then hit Ctrl+Spacebar.

While it's not ideal in Netbeans 8.0.2 you can do the following:
open any CSS file that contains a rule with a property that takes colour as value and place the cursor inside the declaration block of that rule,
in the top menu click on Window -> Web -> CSS Styles,
click on the dropdown with colour values and scroll right to the top,
click on Choose Color and a colour chooser will appear.
You can now close the CSS file (if you like) and open any type of file - the CSS Styles window will stay and you can repeat the above procedure starting from step 3.
P.S. Netbeans has a bug tracker that is not just for reporting bugs:
Issues = Bugs, Feature Requests, and Enhancements

Related

In Eclipse, how do you change the foreground and background color in the default text editor for plain text files with no file extension?

In Eclipse for C/C++, how do you change the foreground and background color in the default text editor for plain text files, that is, files with no file extension?
I tried going to window > preferences > general > editors > text editors > appearance color options.
Here it says foreground color and background color, and after hitting 'apply', the color of the text changes briefly, but returns to default as soon as you close the 'preferences' window.
The other thing I tried is to set file associations and try to set a different internal editor as the default for plain files. However it seems to only work for files that have an extension.
I often have to deal with existing files in a repository that are actually bash scripts, but the files have no extension. It is annoying then to not even be able to configure the settings of the editor. If I can't find a solution for this, it looks like I either have to 'embrace the suck' or use a different editor outside of Eclipse.
I'm working on Kubuntu 2020-04 with Eclipse 2020-06 and using the dark theme.
It looks like the same problem as here, but I couldn't find any satisfying solution. The problem was reported there on 2020-01-03, so it actually predates my Eclipse version.
Thanks to #howlger for suggesting to upgrade. After upgrading to Eclipse version 2020-12, the first method I mentioned in the question works, that is, going to window > preferences > general > editors > text editors > appearance color options. Here you can change the foreground color and background color and it will actually stay the color you selected.

Is there a way to programmatically change the color of an editor tab in my Eclipse Plugin?

I have a SharedHeaderFormEditor in my Eclipse RCP plugin.
One of my requirements is to draw attention to the editor's tab when something happens outside of the editor and it needs a refresh.
Some of the ideas discussed included
changing the color of the tab
adding an icon to the editor's text (instead of the standard * for a dirty editor)
Are either of those possible? I've been looking around and have not found anything that could address this issue.
Thanks!
ViewPart and EditorPart both allow changing the title label and icon (setPartName(…) and setTitleImage(…) respectively). The Eclipse Workbench also offers an IWorkbenchPartProgressService to each part, which allows a part to indicate that it's busy (via incrementBusy()/decrementBusy()) and that its content has changed (via warnOfContentChange()). You can see this used in the Search and Console views (org.eclipse.search2.internal.ui.SearchView and org.eclipse.ui.internal.console.ConsoleView).

Color - Changing Backcolor on Eclipse

Im using Eclipse to code. There is some problem with it which can be seen on this picture.
Is there anyway to remove the backcolor or simply change it to white? Because it is hurting my eyes. Thanks!
To change the background color for occurrences:
Select Window > Preferences > General > Editors > Text Editors > Annotations
Select occurrences (org.eclipse...) from the list of Annotation types. There are two, but it doesn't matter which one you select since they both get updated.
Click the rectangle containing the current color and pick another color (or customize your own) in the Color dialog.
Click the Apply and close button.
Done! If you want to see the new color for a file that is already open in the editor it seems that you have to reopen it.
UPDATE (3/30/18)
My original answer above is wrong. Based on feedback from the OP in the comments below I have updated and corrected this answer to show how to change the background color for Warnings rather than Occurrences:
To change the background color for Warnings:
Select Window > Preferences > General > Editors > Text Editors > Annotations
Select Warnings from the list of Annotation types.
Click the rectangle containing the current color and pick another color (or customize your own) in the Color dialog.
Click the Apply and close button.
The screen shot above was taken on Eclipse Oxygen.3 Release (4.7.3), and obviously your list of Annotation types may differ from those in the screen shot.

How do I disable brace highlighting in JetBrains RubyMine?

I want to disable brace contents highlighting in RubyMine. It's very distracting. Instead of having the entire string highlighted I only want the braces themselves highlighted and if that is not possible I need it disabled. Is this possible?
Things I've done already to no success:
Enabled/disabled all highlight options under Settings/General to no
effect. I'm running RubyMine v8.0.3.
Read the documentation.
jetbrains.com/idea/help/highlighting-braces.html?search=highlighting
I've also read this document that states how to disable highlighting
of usages by simply pressing escape - it does not work.
jetbrains.com/idea/help/highlighting-usages.html#3
current brace highlighting that I need disabled
Your file type seems to be HAML.
In Settings, go to Editor > Colors & Fonts > HAML. In the lower right area, you see demo code in HAML. Look for the right spot in the code and click on it.
You will probably click on the second line because there is some code in braces. In this case, RubyMine will select the entry Injected code in the list. The check box Use inherited attributes tells you that this settings is inherited.
Now you have to choose:
If you want to change the setting for Editor > Colors & Fonts > HAML - Injected code, switch off Use inherited settings, then switch off "Background".
If you want to the settings for injected code in all languages: Click on the link "General" (on the right). RubyMine will switch to Editor > Colors & Fonts > General - Injected language frament. Now switch off "Background"
Before modifing anything, you have to create a new scheme. The default scheme is read only. Click on Save As..., choose a name and press 'OK'.
Open the Settings/Preferences dialog.
In the Editor page of the IDE Settings, select the check box Highlight usages of element at caret to enable automatic usage highlighting.

Change NetBeans "DoubleClick Highlighted" Text Background

In NetBeans 7.4.0, when I doubleclick certain words in the code, NetBeans highlights all of them (in my case, in yellow). For the sake of clarity, and hopefully to avoid any kneejerk downvotes, I am not referring to the background color of selected text, or the text on the caret's current row.
Having recently decided to change the editor's colors (tools --> options, fonts & colors tab), I have been unable to figure out the offical name of this doubleclick highlighting to address it's color. I have been through the entire list of choices on the syntax, highlighting, annotation, diff, and versioning sub-tabs without finding an entry with a background color that seemed to match the doubleclick highlighting.
How do I change the background color of this doubleclick highlighted text?
Well the thing your looking for is called occurrences and it can be found in the path:
tools -> options -> fonts&color -> syntax
except it's not in all of the languages, try highlighting the specific language you want this to be a different color in and then you should have the option to change "Mark Occurrences"