Eclipse content assist broken only in one file - eclipse-jdt

Content assist always shows "No Default Proposals" in one of my Java classes, but it works as expected elsewhere in the project/workspace. It worked at one point in that file too, but stopped working for no reason that I can see.
I'm using Eclipse Classic 3.7.1, Java 6 update 30. My settings are the default in Java -> Editor -> Content Assist -> Advanced. I've tried to clean/rebuild project. I also tried removing and re-adding the class.

Try deleting all index database files in your workspace directory
.metadata/.plugins/org.eclipse.dltk.core.index.sql.h2/
and restart Eclipse. Also close/reopen the file in question.

Related

Only partial syntax highlighting in Kotlin script file

I opened a folder in Android Studio which contains a Kotlin script file (.kts). I configured a JDK as SDK in Project Structure (but I added no gradle files), and running the file as Kotlin script works fine. However the syntax highlighting is only PARTIALLY working, see below example (Linux Mint 19.3 and AS 4.1.3):
Some of the stuff missing:
unused variable should be gray (val unused)
to/forEach keyword should be yellow and italic
misspelled variable names should be red
bad style such as extra spaces should be underlined
etc.
What's even going on here? Is this some sort of "fallback" mode?
Any way to use the "full" syntax highlighting from normal Android projects, so I can spot mistakes earlier?
For reference, this is what it "should" look like (pasted into a random Android project):
Renaming the file to end in *.main.kts (scriptname.main.kts) enabled full highlighting for me!
I get this type of issues from time to time with IntelliJ IDEA. I haven't found the reason why it happens, neither do I know the 100% working solution. But here are the options that usually help me solve it:
Restart IDE
Invalidating caches: File > Invalidate Caches...
Re-import the project. Remove the .idea folder and the project.iml file and try to import the project again.
Update the IDE. Last time I had this issue, nothing helped but updating IDEA to 2021.1.
I hope some of these options will help.

javax.microedition.io.file does not exist in BlueJ

Trying j2me app development. I got a simple Hello to work, and a simple TextBox user as well. But when I tried to compile code for a file browser I got "javax.microedition.io.file does not exist".
The WTK according to the Sun website is supposed to include JSR75. And there's a camera demo .java file that uses it.
I've looked in various places (the WTK, BlueJ, even Netbeans) for menu options to turn it on. Nothing. And a search of this forum turned up exactly ONE message and it pertains to another IDE, and it seemed to work for him in BlueJ.
So what am I missing and how do I get it?
In NetBeans, you go to Project Properties (right-click the project, and select Properties). Then click "Platform" and mark "File Connection and PIM Optional Packages 1.0".
On a whim I did a search for JSR75 jar download and found a few zipped jar files that seemed to contain the file classes. I unzipped one of them and put it in the Libraries/Userlib directory of BlueJ; and now I seem to have the File... Classes. Reading and writing seem to work in the emulator.
I'll take another look at Netbeans when I get a chance.

Hide specific files in IntelliJ IDEA

I know from Intellij IDEA. Hide .iml files that I can hide from the Project Tool Window specific file extensions on all directories. However, I have unsuccessfully tried to hide specific files (e.g. mymodule/blah.tgz) without getting all tgz files to hide as well. In Settings -> Editor -> File Type, at the bottom, I have tried specifying full and relative paths (e.g. ~/projects/mymodules/blah.tgz) without luck.
How can I achieve this? Is this supported at all? I'm using IntelliJ 14 Ultimate.
Please see the following comment.
How to hide unnecessary files from intellij project view?
I usually use the scope support in Idea to filter in/out files/folders in project tool window and other windows, i.e. Find.
I hope this helps.

No index in Eclipse CDT project checked out from SVN

I have checked out a cross-compilation project from SVN on Eclipse (on a Linux system). I am unable to open a functions declaration from the functions's right-click context menu (or by pressing F3). Upon research, I found out I don't even have anything like Index -> .. in the project's right-click menu. I have tried a lot with the Preferences -> C/C++ -> indexer but no useful results. I am not using Eclipse to build it but there are no errors since I can build it using makefile
PS: Though there are a few questions with the matching title, but none of them helped me
Here is the solution found after a million attempts. The project should be checked-out as C/C++ project, by selecting import using new project wizard.. The index will NOT be available in the SVN projects checked-out directly. Hope it saves some one's time
Eclipse Kepler SR2 on Windows 7 here.
Faced the same issue, the following sequence of inputs made it work for me:
Import...
"Checkout projects from SVN."
Select branch etc.
Check the "Check out project configured using the New Project Wizard" radio button.
Select "C/C++ -> C Project."
Pick a toolchain, doesn't matter which if you use an external one.
Now you can right click on the project (once fully checked out) and rebuild the indexer.
I am using Indigo and solved it as follows (without checking out again!)
Right click on project in question and select New->Convert to a C/C++ Project
After selecting toolchain, indexing gets built automatically.

IntelliJ and Groovy test source disappearing

I've recently upgraded to IntelliJ 11 and use it for writing both Java and Groovy.
When I adjust the Project Structure to include src/test/groovy as a Test Source, the setting takes initially.
After a short while, the setting is reverted and src/test/groovy displays as a normal file structure.
Searching around, in Settings > File Associations, *.groovy is indicated as a valid source file.
I've been using IntelliJ for a while, but I'm stumped on this one.
Thanks!
The answer for me turned out to be to correct any Project Structure appears reported by IntelliJ as mentioned above.
At some time I realized this problem would occur every time I changed a POM. To resolve it (at least for now...), under Settings > Maven > Importing, I checked "Keep source and test folder on reimport", and the situation appears to have resolved itself.

Resources