"selection cannot be launched and there are no recent launches" when using pydev/eclipse - eclipse

I am getting the above error when launching a python file that worked in the past. I think I know how this happened but not sure how to fix it. I have 2 computers dual booting different os and use dropbox to stay synced between them all. In the past I synced my eclipse workspace with my mac and windows computers this way and everything worked fine(except I would have to change the location of the python interpreter depending on what system I was using).
I started getting the above message after I added a linux(fedora) to share dropbox files. But my problem is now when I try to update my python interpreter(in windows) it doesn't save my setting. I can hit autoconfig and it'll find the python path and all the files and I hit apply/okay, but when I go back its all blank. I'm pretty sure the linux machine messaged my settings up, but I need to develop on all 3 boxes so I need them to be kind of synced.
Wondering how to fix this and if there's another way to do this so I don't have this problem in the future?
update: this def. has something to do with my workspace. When I change the default workspace to a new folder and set the python interpreter it works. Still not sure how to permanently fix this(don't want to have to copy code back and forth to new workspaces.

I think an answer of how to share workspace among other enviroments is still very helpful but if anyone is having a simlair problem and just needs to fix it to work quickly here's the solution:
go to File, switch workspaces and figure out where your workspace is located
Go to that folder and rename the .metadata folder and relaunch eclipse
In eclipse everything will be missing, so go to file-->import and import the folder with all your projects(do the root folder of all the projects so you don't have to import each one individually).
setup any customizations you had before
This is not the best solution but it works. Hopefully someone else has a way of preventing this problem from happening in multiple environments.

It seems the preferred way is through F9: http://pydev.org/manual_adv_launch.html

eclipse run as same as what it run last time.
then first time run in this way.
in package explorer (left).
doubleclick res then menu.
then rightclick main menu (name.xml).
frmo menu select run then run as application.
and you can run as default in next time(from menu or shortcut).

This problem can often be solved by exiting out of eclipse and restarting (if that happens to be convenient for you). Changing workspaces midstream can often confuse Eclipse even if PyDev is correctly configured.

Related

STS 3.8.3 Mac-OS forgets all settings (and installed plugins) on reboot

So very weird, first time I ever saw this, problem install STS version 3.8.3-release on Macbook Pro running mac osSerria v10.12.3. Here's what's I do:
Down load the STS distro spring-tool-suite-3.8.3.RELEASE-e4.6.2-macosx-cocoa-x86_64.tar.gz from https://spring.io/tools/sts/all
Move the zip file to my Applications folder
Extract the distro. This creates the sts-bundle folder, and; under that, the STS programs exists.
I then just run STS. Since this is a first-time I do get the pop-up for selecting the default workspace. I change it to where I want the workspace and I also check the "Don't ask again".
Install some plug-ins, do work, everything is normal.
I can exit the app throughout the day and, when I go back in all is cool.
Now...the problem...
1. Shutdown the laptop for the day. This is to say I select Apple->Shut Down..
2. The next day I come in, boot-up the laptop.
3. Open Applications and select STS and run STS.
At this point, I get the "Select default workspace" popup again...all my preferences, and installed plug-ins are forgotten, and it's like I'm running the application again for the first time?? It is especially weird that any plug-ins I installed are also forgotten??
I have completely removed STS, and reinstalled several times and it is pretty consistent. Also, I have installed STS on several iMac desktops without issue. This smells like a permissions problem but not errors just...all customized preferences are simply gone.
Any ideas would be greatly appreciated.
The answer to this is App Translocation, which is done by OSX. For details, take a look here, we analyzed this in detail:
STS.app on Mac 10.12.1 always creates a new org.springsource.sts folder in .eclipse

Intellisense in IntelliJ no longer working

I'm currently running IntelliJ IDEA 13.1. While running IntelliJ 13 intellisense/autocomplete stopped working. I tried upgrading and it still doesn't work.
I can explicitly invoke code completion using ctrl+space. I looked in Settings->Editor->Code Completion and nothing looks out of place. Is there somewhere else that turns this feature on/off?
For me it was because I did not have a folder marked as Source Root (it appears in blue).
To fix, right click your root source directory -> Mark As -> Source Root.
Check to see if you accidentally turned on Power Save (File/Power Save Mode) I myself just discovered that File/Power Save Mode does turn it off. I was having the same problem and must have accidentally set Power Save Mode to on.
I'm using Mac and when I upgraded to Big Sur my intellisense stopped working.
This is due Big Sur has a shortcut for Input Source. By disabling Mac shortcut, will make Intellisense work again.
You can see the option to disable in mac:
File -> Settings-> Editor-> General -> Code Completion-> Auto pop up code Completion
If other options mentioned is already true for you,try Setting up Sources/Test folder as Sources Root/Test Sources root as it did the trick for me. I had forgot it.
Right click on folder, choose "Mark Directory as" Test Sources or Sources Root, or whatever applicable. :)
Try disabling all plugins you have. I installed Codota and it turns out to be garbage. I uninstalled it and disabled the plugin in IntelliJ and it worked
Had the same problem and none of these helped. What I realized was that on mac, control + space is used by the OS to change language inputs and it overrides intellij. So if you are on mac having multiple input languages on your keyboard, consider changing the shortcut for it :)
I tried all the above option and it did not solve the issue. In my case:
THE ISSUE: node_modules was not loaded in the file structure of the project.
THE SOLUTION: go to explorer(finder/nautilus) find the .idea folder in the project and delete it. Then re-import the project. Once I re imported the project it loaded the node_modules folder as library root
Note: It will take a few seconds for IntelliJ to index all the libraries. You will see a loader on the bottom right next to line number info.
In my case, I restarted the Intellij and everything came back to normal.
Had the same problem until:
Third party JDK installed
Configured in module settings: right click on project name, then "Open module settings" -> SDKs -> "+". Pick the jdk root folder and Idea will take care of the rest.
Re-indexed a bunch of things. It happens automatically, just be patient
For me, it was I hadn't yet set up the JDK.
Type something out, Ctrl+Space to try to autocomplete. If it fails, do Alt+Space and if the option comes up to setup JDK, do that.
In IntelliJ 2017-2 to configure Autocompletion:
Settings -> Editor -> General -> Code Completion
In case this helps anyone; for me it was a windowing glitch of some kind. The suggestions popup showed on the wrong monitor, which I didn't notice the first time it happened.. after a while I saw what was happening. Resizing the window seemed to fix it.
If you're too lazy to restart your machine to fix the issue, you can kill the process taskkill /F /PID pid_number_of_idea64.exe (task manager -- view>select columns>PID) and then open CMD, head over to C:\Program Files\JetBrains\IntelliJ IDEA xxxx.xx.xx\bin, start idea.bat. Let this CMD window open.
Please note that even after executing taskkill, idea64.exe process doesn't disappear from task manager. Try executing the same command again and you'd know that process doesn't exist anymore.
For me the code completion suddenly stopped working because I had nudged the IDEA window slightly off-screen, maybe just a pixel or two, which caused the code completion pop-up to (presumably) appear off-screen. Making sure the application window was fully visible fixed the problem.
In case none of these work for you, if you are using IdeaVim, make sure your ~/.ideavimrc does not override Ctrl+Space, you can check this in vim:
:verbose map <c-space>
In my case, it was set by ~/.vim_runtime:
Last set from ~/.vim_runtime/vimrcs/basic.vim line 208
Thanks #s1n7ax for the tip!
IMPORTANT
If you had your email logged-in on IntelliJ Idea for a while and its token expire the Intellij will suddenly stop working or crash(My Version 2020.1.1).
Do two things.
1. file > sync settings with JetBrains account (log in here)
enter code here.
2. file > Invalidate cache / restart
I'm using Maven project, it works by:
File > Project Structure > Modules > Sources
and then marked java files dir as Sources.
reference link.
Spent hours to fix this problem too. For me, the answer was to disable a plugin.
Which one to disable? Just find out using trial and error since all kinds of plugins can cause errors...
It depends which product, for Intellij I might have to right click and import the .iml file from the root, or in Rider right click the solution file and open that. I'm only making this mistake 4 or 10 more times, and then it is never happening again.

Eclipse - loading launch configurations from old system

My system died, and IT has moved me to a new machine. The old HD has been stuffed into the box as a secondary, and I've access to my old data and development. I restored the files from the repository and whatever was missing from the old HD and I'm back to developing.
Trouble is, while my launch configurations are there in each project, I'm not seeing them in Eclipse.
Is there a way I can recover these, without going through the painful process of recreating all of them?
Found it!
Select File/Import and expand Run/Debug.
Select Launch Configuration and hit Next.
Browse to old location and hit Finish

Google App Engine Eclipse Launch Local Host Multiple App Conflict?

I have two GAE projects created through pydev in eclipse 4.2 (windows 7) and the first one I had no issues running the localhost:8080 but when I created a second project, I duplicated the Run Configuration for local run adn just changed the project name to the new one.
However- when I run that config the inital HelloWorld project shows up[ in my browser, I tried completely removing the first project, but then it just ocmplains it cant fint app.yaml in the old directory (because the old directory isnt where it was).
So clearly I'm missing some setting in the launch procedure where it sets the root path.
The run config is a PyDeb Google App Run, main module points to
C:\program files (x86)\google\google_appengine\dev_appserver.py
And the arguments are
${project_loc}\src
Everything else is on the default settings.
Any help would be greatly appreciated as pushing to Google (which works fine for both) for every little debug iteration is driving me a bit crazy.
Thanks!
*EDIT: Forgot to mention I have already tried to delete all runconfigs and remake.
Have you tried Run as : PyDev Google App Engine Run, to create a new runconfig?
Turns out I'm just a bit silly. In eclipse, I wasn't properly turning off (not sure on the correct term there) the LocalHost for the first project before starting the second. To fix, I needed to go Into eclipses console window, and select "display selected console" and choose the project I wanted to stop and hit the stop all button. Then it runs fine.
Hope this helps someone in the future, that is as determined as me that "It can't be my fault".
Cheers.

Eclipse randomly stopped starting

I've been using Eclipse a lot recently, and haven't had any problems with it. Last night, I was working on it perfectly fine. However, this morning, whenever I load it up, the program stops working half way the loading splash screen (before the actual workspace opens up). The information says "Loading Workbench" and just stays there forever. When I click on it multiple times, I get a message saying that Java(TM) Platform SE binary is not responding.
Google hasn't been a ton of help, and seems to just give a lot of responses about Minecraft. I'm slightly confused as to where I need to start looking, since nothing had changed since I successfully used it last. No updates to Java or Eclipse or anything else. Thanks for the help, and let me know if you need any more information!
I was actually able to fix it by just renaming my WorkSpace to WorkSpace1. Apparently it got corrupted somehow, and with the rename Eclipse was able to recreate a new one. Here's the link that helped me out:
http://spacetech.dk/eclipse-failed-java-was-started-but-returned-exit-code-805306369.html
Two things to check when you have problems with Eclipse:
First, always check the .log file, located in the .metadata directory (<workspace path>/.metadata/.log) of your workspace (not the Eclipse installation directory). Keep in mind that this is a hidden file under Linux or Mac OS. It usually contains the exception that is causing the crash. I usually delete any existing .log file before firing up Eclipse, just to make sure I am looking at the relevant log entries (the file will be recreated at startup).
If #1 does not help, you can try deleting the .metadata directory altogether. It will be recreated on startup (this is basically what you did by changing the workspace). In my experience with Eclipse, I noticed that some files can get corrupted inside .metadata, making Eclipse act weirdly. Keep in mind that this directory contains customizations you made in Eclipse and its plugins for the workspace and you might need to make them again.
Hope this helps.
Eclipse tends to be weird sometimes. If you move stuff around outside of the directories it was initially installed in, it usually won't load. I don't know if that's what you did, but your best bet is to back up your workspace, and reinstall eclipse. I'm sure that will do the trick.
Try a reinstall if possible or else, check the eclipse error log, which would be present at'/.metadata/.plugins/org.eclipse.ui.workbench/log'.
This will help you knowing the problem.