Why doesn't my ecplise console start with StatET - eclipse

I just installed Eclipse with StatET, everything standard, and now my console does not seem to load when I open the StatET perspective.
Any ideas why?

I also use StatEt. It has the same behaviour here. To start an R console I would have to select it from the "run-button-menu".
I think this is the normal behaviour. For example this makes sence if you tell StatEt to use the projects-path as working directory for R. Therefore you would have to select a project and start the R-console afterwards.
[edit]
BTW, do you already know those instructions: video, pdf

Related

Issue running golang Hello World in eclipse

Alright, so just a disclaimer I suspect this question will be a duplicate of another question however I'm not even sure what to search for.
I have never used Eclipse or Golang before and am attempting to get a basic hello world application to work.
I have installed the goclipse plugin, created a new go package and go command source file. From what I have read to run a project in Eclipse you right click the package, select Run as then set the run configurations. The problem occurs when I attempt to select the go package as none shows up and if I leave it blank it throws a 'Go package not found' exception.
Thank you for any help you can provide.
EDIT: Upon the answers advice I have decided to go with the basic command line, however a friend did also recommend LiteIDE. I will "assume" tmichels answer is correct in regards to getting Go to work within eclipse.
If you don't use the GOPATH environment variable and you don't put your project folder under $GOPATH/src the compiler won't find it. As I see it goclipse lets you skip the GOPATH entirely but in this case you have to put your code under the src directory that you can see in the Project Explorer. See the related section of the goclipe documentation.
Although I think you make your life harder by using a full-fetched IDE for go development. Just use the command line tools. And it has the added benefit that you will actually understand what's going on (IDEs hide this from you).
So for building you can use go build or go install. The latter will copy the binary to your $GOPATH/bin directory. For running test just call go test or go test path/to/package. There is a hidden gem in the go tool: when you are working with multiple packages in the same directory you can use go test ./... to test all of them at once. This also works with other go commands.

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 PDT + XDEBUG - source lookup not working entirely

I'm having trouble with a PHP project using Yii framework.
My setup is the following: Win7 + Eclipse4.2 + PDT 3.1 + Yiiclipse PDT extension + WAMP Server with XDEBUG enabled.
Pretty much everything works ok. The debug session starts, it's going through project's index.php source, but when it has to jump to framework's files, it doesn't open them up. I edited source lookup and added framework's local path but it simply cannot find them.
Here is a screenshot: http://img607.imageshack.us/img607/3687/eclipsepdt.png
This isn't necessarily an answer - but your question isn't necessarily a question either, so I feel like this is fair game :D
I've had so many problems with Eclipse PDT + xdebug in the past with debugging, code completion, etc., that I gave up on it a while ago and switched to Netbeans for PHP Debugging. It's now the defacto standard on my development team for debugging PHP; even though we all still have our own favorite editors, when we need to debug we'll still use Netbeans.
Code completion, phpdoc 'tooltips' on completion, and debugging all work flawlessly for me regardless of what platform I'm developing on (Windows, OS X, Linux) and I cannot say the same about Eclipse PDT (code completion would often miss, I'd run into problems or crashes debugging,etc.) in my personal experience.
So, I apologize in advance if this is a non-answer to a non-question - but maybe try out Netbeans?
Are you sure, you can use Xdebug to debug Yii (or any other framework-based) applications at all? Since Yii introduces URL-rewriting based on MVC pattern, I think you can't.
I don't have much experience with Xdebug, but from what I have found I clearly see, that it (along with Eclipse PDT) strongly depends on URL shown in Eclipse's internal browser, when debugging.
So, taking for example an URL from your screenshot:
http://localhost/testdrive/index.php?r=dispozitive
As you mentioned, Eclipse has correctly opened index.php, which is normal, as it is directly referenced in URL and you problably pointed it out as start file in debug configuration window.
Buth going further. How would you like Eclipse to understand, that route dispozitive (where route itself is a completely Yii concept (or similar framework) and Eclipse / Xdebug / PHP knows nothing about it) or that ?r=dispozitive URL parts corresponds to executing protected/SiteController.php file in your file system and calling default actionIndex() from it? So it could know it should open it in IDE and possibly stop execution on there defined breakpoints.
This process and concept (routing) is 100% authored by Yii and done by it internally, so how would you like Eclipse or Xdebug to know anything about it?
As I wrote, I don't have much experience in debugging Yii applications, but from what I have found until know, I clearly see, that you can't debug PHP applications with Xdebug, if they are using any kind of URL-rewriting methods. This technique (debugging with Xdebug) works IMHO only in case of applications, where URL changes directly reflects files in filesystem in your application contents.
EDIT: Additionally, check which version (package) of Eclipse you have? It turns out, that Helios package has some bugs and doesn't stops on breakpoints. Which makes it pretty useless for debugging process. You should consider using Galileo Package Eclipse for PHP Developers instead.

(Eclipse) How to interact with console view?

Eclipse uses console view as read-only.
How can I type command in console view? Is it possible? E.g: ls, mvn install...
Edited:
Thanks Ben and Kelly.
I understand I can interact with Eclipse's console when my application is running. However, I meant I want an embedded console as like as the one in Kate, Dolphin (press F4 in Dolphin)... So I can use bash script in Eclipse's console. Is that possible? Or is there a plugin for that? I have googled but perhaps my keywords were not right...
Edited
Edward has found duplicate question here: Is there an Eclipse plugin to run system shell in the Console?
And it was answered :-)
I don't know how to mark this one as solved. So I place message here, I got the answer.
Edited
But it is not useful. It doesn't have auto complete feature, when I need to type a long file name, or want a hint for a forgotten name,... it is worst :-(
When the console is waiting for input it shows a green prompt that allows you type.
You can test it out by making a simple console application that reads from standard input.
You are trying to think of the Eclipse console as if it were connected to a command-line process. It is actually connected to the JVM used to execute your Java code. Thus, it only shows output that your program sends to System.out and conversely only is available for input if the Java code you are running is requesting input from System.in.
A decent exercise would be to write a small Java program that redirects the input and output to a child process of your favorite shell, for example: http://www.devdaily.com/java/edu/pj/pj010016
The Eclipse Console view is used for communicating with an executed program (typically Java, or similar). If you want to use it as a console, as mentioned in the comment under #Ben S's answer, the Target Management Eclipse project provides a view that can be used for that reason. I don't have it installed right now, so I cannot tell you the required plug-in/view name, but I have used it to connect to the local computer and works.

How does one install 'rj' in StatET plugin for Eclipse?

I have started to try to use StatET and Texlipse with a view to producing SWEAVE reports. When starting the R console in the StatET plug-in for Eclipse (OS X 10.6.4), I get the message:
[INFO] The R package 'rj' is not available, R-StatET tools cannot be initialized.
Information on http://www.walware.de/goto/statet states:
"The package only works in the default R Console (RJ) in StatET. Therefore you have to install and update it using the command line":
R CMD INSTALL --no-test-load rj_*.tar.gz
What does this mean exactly?
In Eclipse under "Install new Software" and the site
WalWare - http://download.walware.de/eclipse-3.6
it states that
RJ Core Library 0.5.0.b201008271600sw
is already installed.
Any helpful guidance gratefully received.
[rant] I also lack the reputation to put my response where it belongs. And there's no button there indicating this. Just a big screen full of nowhere desired to click upon. Negative discoverability sucks. It sucks in Eclipse and it sucks here, too. [/rant]
I'm finding rj frustrating under Ubuntu. On my system, with each major Ubuntu upgrade with a new version of R, I have to go through this procedure over again.
One time I tried to use a tilde (~) character in a path name within some Eclipse configuration field. This failed silently.
My current configuration is as follows. In my ~/.Renviron file:
R_LIBS_USER=~/etc/R/amd64/2.11
Once rJava works, there is an rJava directory here. Just so I don't drive myself insane, in ~/etc/R/README I put a note that my current R configuration is controlled by ~/.Renviron
Somehow at one point I ended up with permission problems where
R CMD javareconf
was failing. Once in frustration I foolishly ran this under sudo to work around this problem, and ended up with permission problems on the generated files. Stupid! The correct fix was to make all the files in /etc/R world readable. Maybe javareconf is only important if you mess with your default Java. Previously, I was running the Sun's JRE. Since 10.10 I'm running icedtea6 and it seems to be working OK. One time it was just the thing to make my configuration work again.
Once I have the right Java binding, from command line R:
install.packages("rJava")
I've had file permission problems running this in the past. I think it was fixed by making all files in /etc/R world readable.
The following is a useful diagnostic to see if this worked, from within any R console:
> system.file("jri",package="rJava")
[1] "/home/allan/etc/R/amd64/2.11/rJava/jri"
If it doesn't look right under Eclipse, there is also some startup debugging available, though it took forever before I noticed this in the docs at StatET.
I created an R Console run configuration for R 2.11 debug In the JRE tab add -Dde.walware.rj.verbose=true. In the Common tab, click Allocate additional Error Log Consoles.
The main configuration options are as follows. Main tab, Launch Type: RJ. R_Config tab, you need to select a Configured R Installation, or create/edit one if you don't have one that works. Mine is Name=R, Location=/usr/lib64/R In the Environment tab I have R_LIBS_USER=/home/USER/etc/R/amd64/2.11 according to how I set things up above. Do not use the tilde (~) character here!
If you end up mucking about with this problem as much as I did, you end up killing a lot of dead consoles. In the Main tab I added the program option --no-save. I don't think this does anything, since I can't end my console by pressing CTRL-D. In the R_Console tab, I added the following R snippet:
q <- function(save = "no", status = 0, runLast = TRUE){
.Internal(quit(save, status, runLast))
#<environment: namespace:base>
}
This gets rid of the annoying "save workspace" prompt when killing an R console with the red square (is that symbolic?) My current workspace also includes a C project, so my R console constantly comes up underneath a blank C-Build console. Annoying as all hell! Haven't solved that yet, but I did discover that from within a StatET code windows the keybinding CTRL-R C pulls the R console to the top.
With my R 2.11 debug configuration I get an extra console titled /usr/lib/jvm/java-6-openjdk/bin/java. You'll have to spelunk the console drop-down to find it. The following is a pertinent snippet of a successful initialization:
CONFIG: JR library path:
/home/allan/etc/R/amd64/2.11
/usr/local/lib64/R/site-library
/usr/lib64/R/library
10-Dec-2010 7:56:47 AM org.rosuda.rj.JRClassLoader addClassPath
FINE: Added '/home/allan/etc/R/amd64/2.11/rJava/java' to classpath of URL loader
A lot more spoo, then finally:
10-Dec-2010 7:56:48 AM de.walware.rj.server.jriImpl.RosudaJRIServer start
INFO: R engine started successfully. New Client-State: 'Connected'.
Looks good, right? But lo and behold in the R console:
[INFO] The R package 'rj' is not available, R-StatET tools cannot be initialized.
Ignore the lying bastard! Turns out my rj is working just fine. No idea why this failure message persists.
Every time around the block with this problem some new amazing piece of gravel ends up in my sneaker.
I don't know whether I've covered everything, but I've written enough for now. Maybe if there are comments I'll come back and fill in the blanks.
Note: found an Eclipse plugin for console switching by keyboard here: Eclipse: Keyboard shortcut for switching between consoles?
It looks like you need to install the RJ library which can be downloaded from the StatET site here: http://download.walware.de/rj/rj_0.5.0-5.tar.gz (more recent versions of RJ can be found at http://www.walware.de/it/downloads/rj.mframe)
If you save that file on your desktop, you can then load it into R with the command they provided R CMD INSTALL --no-test-load rj_*.tar.gz after navigating to your desktop or wherever you saved the library file. Alternatively, you MAY be able to use the GUI interface and select Install packages from local ZIP files under Packages in R, though I haven't used R on a Mac so the layout may be slightly different.
After installing rj with in the R console using
install.packages(c("rj", "rj.gd"), repos="http://download.walware.de/rj-1.1")
(See http://www.walware.de/?page=/it/statet/troubleshooting.mframe for the correct rj version),
do not forget to update the R_LIBS variable in Eclipse (Windows -> Preferences -> StatET -> Run/Debug -> R Environments -> Edit). To find out the value just type in the R console:
packageDescription("rj").
In my windows 8 installation this returns C:/Users/Fibonacci.PYTHAGORAS/Documents/R/win-library/3.0/rj/Meta/package.rds. The value of R_LIBS I set to
C:/Users/Fibonacci.PYTHAGORAS/Documents/R/win-library/3.0
which is the path where all libraries are installed.
As stated in http://www.walware.de/?page=/it/statet/troubleshooting.mframe newer versions (Versions > 0.5.5) do not need the R CMD INSTALL etc... command.
Here the quite similar I had and the solution I found.
I originally installed Statet using the Eclipse built-in tool "Install new software ...."
I seems it downloaded Statet + rj and that the installation process went well.
After this first installation, I tried to install both packages again. Eclipse refused reading that they already are installed. And, both packages/programs were actually listed in the window of Eclipse.
But, the R console still refused to launch, the dialog box reading that I had to check whether rj was available and that the file paths were correct. Another strange thing was that window explorer had been unable to locate rj on my disk.
???
To solve my whole problem, I simply downloaded rj from http://www.walware.de/ and installed this package via the r console and using the basic install.packages() command.
It now works perfectly .
But, I still don't understand everything ..... :-)
I'd make a comment but I lack the necessary reputation. For Windows, the procedure is the same. There's no zip file. Use the tar.gz. Worked for me. The command, working from the same folder as the downloaded file:
$ G:\R-2.12.0\bin\i386\R.exe CMD INSTALL --no-test-load rj_*.tar.gz
The project is now hosted on GitLab, see
https://gitlab.com/walware/de.walware.rj-server.gr/-/wikis/Installation.
To install:
install.packages(c("rj", "rj.gd"), repos="https://download.walware.de/rj-4.0")
Note that binary packages are available for Windows.
As explained in this message from Stephan Wahlbrink on 2022-02-03 announcing StatET 4.5 release, this version works with R 3.6 to 4.1, and RJ-4.0.
For current information on StatET, check the home page and especially the news.