TAB Key does not work in NetBeans 8 - java

I'm working with Netbeans 8 on a Linux Mint 13 (Cinnamon). Here the TAB Key does not work. For example if I want to make a Line comment and use the TAB Key to indent a few tabs, then nothing happens. Even manual intendation of code using the TAB Key does not work. The TAB Key of my keyboard is not broken because it works in other programs. It is not a major issue but with time it is getting a little annoying.
NetBeans has GUI problems in Cinnamon in general (I heard it has to do with Cinnamon using muffin instead of mutter) could that be linked?

I just had this issue. Turned out it was caused by setting Tools -> Options -> Editor -> Formatting -> Category: Tabs and Indents -> Number of Spaces per Indent: 0
Setting the number of spaces per indent to a positive value fixed it in my case. Strangely, this value may affect your tabbing even if you aren't replacing tabs with spaces.

Had same problem on MATE # Ubuntu + NetBeans 8 beta.
TAB Key not inserting tabs/spaces insted of displaying [TAB] icon in status bar.
Key doesnt work on .java files, but it does on .txt or others format files.
What i did to fix it was deleting ~/.netbeans configuration folder.
Now i lost configuration but TAB is working again.

I also face the same problem, then i try to find out the solution and i just change the version of netbeans 12.6 to 12.0 with the jdk version 8 and it works!!!

Related

Eclipse WindowBuilder Glitch in Text

I'm getting strange results in my Eclipse WindowBuilder whenever I try to run my GUI, the top left area has glitchy text (I don't really know what else to call this problem). I've tried searching everywhere but apparently no one else is getting this problem.
Problems with the image: Display is being displayed as Displa, 'Search' is scrambled.
Problem image:
I've tried creating a new project, tried reinstalling eclipse, deleting all my eclipse metafiles, redownloading WindowBuilder, I even uninstalled Java JDK and Java from my computer and reinstalled it.
I'm running
Windows 7 Ultimate Service pack 1 64bit.
Java 8 Update 25 (64-bit).
Java SE Development Kit Update 25 (64-bit).
Eclipse IDE for Java Developers
Version: Luna Service Release 1 (4.4.1)
Build id: 20140925-1800
Here is my using WindowBuilder process to give you guys an insight, as I maybe doing something wrong:
Create a new project, creating new application window under WindowBuilder. Go to design, add JTabbedPane in the center, and then add JPanel(s), apply GridBagLayout under all of my tabs and then add regardless of what element I put, the first element is always affected by this glitch and so are the tabs themselves affected.
I've tried supplied all the information I can please ask me if you want to know more to try to help me figure out what is wrong.
My layout of GridBagLayout:
Other notes:
I've also noticed that even after clean and fresh installs sometimes or often whenever I add a new element to my GUI after reopening or anything I get a big error and have to spam "Reparse" button a few times before I can go back to editing.
UPDATE:
I also noticed if I type anything in the text fields it will glitch out and I won't be able to see what I'm typing.
Same problem, got it after I downloaded and installed JavaJDK.
Not sure how to fix it other then just try to resize the window a few times, and you might be able to see what it says. Also I by browser doesn't detect my java install.
EDIT:
I found this:
Swing rendering appears broken in JDK 1.8, correct in JDK 1.7
I did what the best answer said and it worked :) And yes, indeed I have NVIDIA GeForce driver and java 8 installed (that is why).
I am from norway so the text is as well... Just try to click on what I have clicked on :)
http://i.imgur.com/aZeUdCw.png
I never got to updating this question with an answer, the solution was running Eclipse using the Nvidia Graphics card rather than Integrated.

How to fix Eclipse autocomplete not working

The autocomplete of eclipse is not working now and I searched for hours but I couldn't find an answer to solve it. I haven't used it for long time then the first thing after opening it was to install SWT and windows builder even though I had swing installed. What I mean is, it is may possibly be because of some conflict caused by swt and swing(I read something about a conflict but I don't if this is possible).
Strange thing is it doesn't show anything when I press ctrl+space but when I go Edit-> Content Assist -> Default(it says Ctrl+Space nearby it), it shows things needed to be shown/works as desired.
public class Dsada {
String sssss;
public Dsada(){
sss //pressing ctrl+space is not working,Edit->ContentAssist->Default works fine
}
}
The solution is not to tick/untick some stuff under Windows->Preferences->...->Content Assist-> Advanced. I checked if "ctrl+space" is hijacked by some other thing which is not and checked keyboard language which is English(Those are suggested in mkyong).
I read something about a bug but I couldn't understand. I tried to delete eclipse and re-install again but I guess some settings just stayed in the machine so that it didn't work.
This is recurring for me. I'm using Eclipse 2019-03 in Windows 10.
The steps below work for my case, and does not require a restart.
Window->Preferences->Java->Editor->Content Assist->Advanced
The following options are de-selected, and when I set them the autocomplete worked as before. No restart needed.
1. Java Non-Type Proposals
2. Java Proposals
3. Java Type Proposals
4. Java Proposals (Task-focused)
I don't know what's triggering this but it only happens after I've created a new project. Usually doesn't. It simply doesn't happen often enough for me to notice a pattern to follow up on more.
Clearly this problem occurs with a variety of causes, so review the other answers to see if they match your case.
The hot key combination ctrl+space might be conflict with other settings in system if you are using windows.
Try modify this combination like alt+/, i always use this one since the first time i knew eclipse. It works well.
Hope it works for you.
Window->Preferences->Java->Editor->Content Assist->Advanced
The following options have to be selected, then the autocomplete worked . No restart is required.
Java Proposals (must be selected, not sure the follows)
Java Non-Type Proposals
Java Type Proposals
Java Proposals (Task-focused)
I was facing the same issue. If you use OS X Eclipse Ctrl+Space shortcut can be interfering with OS X system's "Selecting previous input source" using Ctrl+Space shortcut as default.
It is necessary to
edit System Preferencies/Keyboard/Shortcuts/Input Source and uncheck the "Selecting previous input source" or change the shortcut on something else. Eclipse should work after that even without restart.
I faced hot key problem with use Ctrl+Space. I tried to fix the issue first by Windows->Preferences->...->Content Assist-> Advanced and selected
Select the proposal kinds contained in the 'default' content assist list:
Other Java Proposals,
List item
SWT Template Proposals
Template Proposals
Type Proposals
but didn't help.
Therefore, I tried another solution. There would be multiple languages on your computer which could be eating up your Ctrl command. To solve this Go to Control Panel -> Region and Language -> Keyboards and Languages (tab) and then Change Keyboards.
You’ll see a list of languages installed – remove any that you don’t want (click the language and then click the Remove button) until you only have the ones you want left. That fixed it for me, but you can also check the Advanced Key Settings tab to make sure that none of the keyboard short-cuts that are set include Ctrl-Space.
Once you’ve done that, Ctrl-Space should work nicely!!!!
I had the same Problem on Ubuntu 14.04. The problem for me was that ibus used Ctrl+Space as a shortcut. I solved it by starting the program ibus-setup and chaning the shortcut to something else than Ctrl+Space.
Go to Windows >> Preferences » Java » Editor » Content Assist. Then Check the Auto activation triggers for java, Add this in the text box .abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
Recently, I also faced this issue. When I install neon version eclipse.
By (1) deleting respective class, (2) restoring defaults appearance and (3) restarting eclipse, solved the problem for me.
Hope it will help someone.
Go to Preferences » Java » Editor » Content Assist » Advanced. Make sure Other Java Proposals is ticked/checked.
I checked windows has no conflict of ctrl+space (of eclipse autosuggestion) with windows.
This is mere configuration issue of eclipse. reinstallation would fix it.
Thanks.
I select all the parameters in Preferences -> Java -> Editor -> Content Assist -> Advanced.
It help me and resolve the my problem.
Cltr+space work using this step.
Saving my work and restarting Eclipse solved this for me. I hadn't shut down Eclipse in a while, maybe weeks.
I had the same problem (MacOS Monterey, Eclipse 06-2022). Turned out it works with pressed fn button.
For Mac user, you can try : Preferences -> Java > Editor > Content Assist and then :
tick the field "Enable auto activation"
in the field Auto activation trigger for Java, you can input the text alphabet ".abcdefghijklmnopqrstuvwxyz"

Content asistant of eclipse is opening but description no

i am using eclipse KEPLER 64 bit for windows 7 ,when i am pressing Ctr l+space the content assistant will appear but when i am clicking on each of them the description will not appear,i checked everything even in preferences>> Java tab ,but really doesn't work yet..
additional info can not be find!!!
i find how to fix this problem,after several hours challenge with the menus of Eclipse,
Window>>Preferences>>Java>>Editor>>Content Assist>>Advanced>>Check Java Proposal
& Window>>Preferences>>Java>>Editor>>Content Assist>>Folding>>>Check Comments & Header Comments & Imports,
the problem will be solved ....
that's it!!!

Issue in comparing files in eclipse

As i am using Windows 7 64 bit, i installed SVN plugin version 1.8 from the site
http://subclipse.tigris.org/update_1.8.x
When i compare any file with latest from repository then the comparison is not shown properly. Please refer the screen shot and suggest if i am missing something. I faced this in eclipse indigo also.
I got the issue, Actually it was considering white-spaces during comparison by default for all files.
Open Window > Preferences from the menu bar
Select General > Compare/Patch in the left-side tree menu
Check "Ignore white space"
Press Apply, then OK
Do you mean the Syncrhonize Perspective?
Hit Ctrl+F8 and select it from the list.
If it isnot there, click that "window with a plus icon" next to MyEclipse Java ..., and select it from the appearing list.

Eclipse does not highlight matching variables

Eclipse does not highlight matching variables for me:
I've already tried to change "Mark occurrences" via
Window -> Preferences -> Java -> Editor -> Mark Occurrences
but it didn't work. I am not sure why this is not working while others
have been able to fix the problem.
Can anyone tell me how can I set highlighting matching variables?
Looking for same variables with my eyes really bothering me too much.
Try:
window > preferences > java > editor > mark occurrences
Select all options available there.
Also go to:
Preferences > General > Editors > Text Editors > Annotations
Compare the settings for 'Occurrences' and 'Write Occurrences'
Make sure that you don't have the 'Text as higlighted' option checked for one of them.
This should fix it.
Alt + Shift + o
Will solve your problem and agree with #Korhan Ozturk as well :)
This is known as Toggle Mark occurrence (Alt + Shift + O), Means will highlight all occurrence of focused variable.
Same thing can be achieved from tool bar as follows
In same tool bar there is another switch if you turn that on you will see complete path for opened file, That is Breadcrumb
there are some more very useful switches like word wrap, Show white Characters just after toggle mark occurrence
There is a bug in Eclipse Juno (and probably others) but I have a workaround!
If you have already checked all the configurations mentioned in the top answers here and it's STILL not working try this.
To confirm the problem:
Select a variable
Notice the highlight didn't work
Click away from eclipse so the editor loses focus.
Click on eclipse's title bar so it regains focus, your variable should be highlighted.
If this is happening for you, you must close ALL of your open files and reopen them. This bug seems to also make weird things happen with Ctrl+S saving of an individual file. My guess is that something is happening whereby internally eclipse believes a certain file has focus but it actually doesn't, and the UI's state is rendered as though a different file is being edited.
Edit: If it's STILL not working, you might need to restart eclipse, but if you don't want to, try selecting the item you want to see occurrences of then disable and re-enable the Mark Occurences Toggle button.
The only that worked for me was:
Java > Editor > Mark Occurrences:
Check "Mark occurrences of te selected element in the current file."
... and maybe all the ones below.
Using Alt + Shift + o
It works for me!
For others running into this without any of the above solutions working AND you have modified the default theme, you might want to check the highlight color for occurrences.
Preferences > General > Editors > Text Editors > Annotations
Then select Occurrences in the Annotation Types, and change the Color Box to something other than your background color in your editor. You can also change the Highlight to a outline box by Checking "Text as" and selecting "Box" from the drop-down box (which is easier to see various syntax colors then with the highlights)
I wish I could have read the response by #Ján Lazár.
In addition to all the configurations mentioned in the accepted answer, below setting solved my misery:
For large files the scalability mode must be turned off. Enabling scalability mode will disable reference highlighting.
PS: #Rob Hruska It would be great if this point is added in the accepted answer. Most of the readers do not bother to read the last response.
For PHP you can set
window > preferences > PHP > editor > mark occurrences
Please check first checkbox (Mark occurrences of selected element in the current file)
And also check
Preferences > General > Editors > Text Editors > Annotations
'Occurrences' and 'Write Occurrences' with different style and color
If highlighting is not working for large files, scalability mode has to be off.
Properties / (c/c++) / Editor / Scalability
.
Java - Editor - Mark Occurrences
Eclipse Java EE IDE for Web Developers.
Version: Photon Release (4.8.0)
maybe because it not supports code highlights inside scriplets. not sure though.
You can try using one of the eclipse plugin like 'glance search' which works great.
Here's a link for that-
http://code.google.com/p/eclipse-glance/
I just unchecked all, applied, checked all again, applied and it worked :) hopefully helps others.
Eclipse Toolbar > Windows > Preferences > General (Right side) > Editors (Right side) > Text Editors (Right side) > Annotations (Right side)
For Occurrences and Write Occurrences, make sure you DO have the 'Text as highlighted' option checked for all of them. See screenshot below:
I was having the same issue and the "make occurrences" and "annotations" solutions above did not help. If you are using Maven, I had to convert the project to a Maven project (right click on it in the Package Explorer and go down to configure), then build the project. Then the syntax coloring and highlighting worked correctly.
This is what worked for me (credit to YardenST from another thread):
Instead of double clicking file when opening, right click on file -> Open with -> Java editor
In Scala IDE click on this button in the toolbox to activate Mark Occurrences (off by default).
link to the screenshot
Sometimes problems in your project build path can cause this, make sure you resolve it first, in my case the prolem was :
And when fix it highlights come back.
I had this issue with Eclipse Mars for PHP developers, 64 bit edition for Windows. I now discovered that highlighting works out-of-the-box with the 32 bit version. Even with a fresh download of the equivalent 64 bit build, highlighting does not work. So I will switch back to 32 bit (this is actually not the first problem I observe with Eclipse 64 bit).
Edit:
I thought this was the solution, so I installed the 32 bit version in C:\Program Files (x86) and set a shortcut in the "Start" menu. When I started Eclipse from there, highlighting again ceased to work. I now got it working again by deleting the .metadata directory in the workspace (i.e. resetting the workspace settings) and re-importing the projects.

Categories

Resources