holgerbrandl / r4intellij

An integration of the R programming language into Intellij IDEA
BSD 2-Clause "Simplified" License
148 stars 28 forks source link

IntelliJ Unresolved reference #118

Open SamirRehm opened 7 years ago

SamirRehm commented 7 years ago

In my code, it looks like things that shouldn't be underlined are being underlined with the plugin...see screenshot image

zxj5470 commented 7 years ago

I have this problem as well. I could only alt+enter and make Disable inspection,which I don't want. I wanna have a popup when I press li then the list function would come up. Pardon my poor english.

LeeBergstrand commented 7 years ago

I believe that this is related to https://github.com/holgerbrandl/r4intellij/issues/119 and https://github.com/holgerbrandl/r4intellij/issues/120. If the skeleton is not built properly (or at all) then the editor will start underlining standard syntax.

LeeBergstrand commented 7 years ago

@holgerbrandl What do you think?

gzrcm commented 7 years ago

Having a similar issue to those in #120. I have tried multiple R builds, all without success.

LeeBergstrand commented 7 years ago

@gzrcm @zxj5470 @SamirRehm

What OS are you using and how did you install R?

I am currently using MacOS Sierra 10.12.6 and R version 3.4.1 My R was installed via Homebrew at /usr/local/bin/R

I additionally have tried this plugin with Pycharm 2017.2 and 2017.3 and Intellij IDEA 2017.2. All have the same issue.

gzrcm commented 7 years ago

I am using windows 7. I also noticed that if I check the packages in the tool window inside pycharm my missing libraries are not installed. Also if I connect to a repository from inside pycharm to add packages I do not get a full list of libraries available. I manually added the ones I typically use, same result.

gzrcm commented 7 years ago

Just updated to the latest patch released on 12/08/2017. Still getting the same problem. I also now get and IDE error when trying to access the plugin repository.

java.lang.String cannot be cast to com.r4intellij.packages.remote.RRepository java.lang.ClassCastException: java.lang.String cannot be cast to com.r4intellij.packages.remote.RRepository at com.r4intellij.packages.remote.ui.RManageRepoDialog.doOKAction(RManageRepoDialog.java:129) at com.intellij.openapi.ui.DialogWrapper$OkAction.doAction(DialogWrapper.java:1867) at com.intellij.openapi.ui.DialogWrapper$DialogWrapperAction.actionPerformed(DialogWrapper.java:1828) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252) at java.awt.Component.processMouseEvent(Component.java:6541) at javax.swing.JComponent.processMouseEvent(JComponent.java:3324) at java.awt.Component.processEvent(Component.java:6306) at java.awt.Container.processEvent(Container.java:2237) at java.awt.Component.dispatchEventImpl(Component.java:4897) at java.awt.Container.dispatchEventImpl(Container.java:2295) at java.awt.Component.dispatchEvent(Component.java:4719) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4889) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4526) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4467) at java.awt.Container.dispatchEventImpl(Container.java:2281) at java.awt.Window.dispatchEventImpl(Window.java:2746) at java.awt.Component.dispatchEvent(Component.java:4719) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764) at java.awt.EventQueue.access$500(EventQueue.java:98) at java.awt.EventQueue$3.run(EventQueue.java:715) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90) at java.awt.EventQueue$4.run(EventQueue.java:737) at java.awt.EventQueue$4.run(EventQueue.java:735) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80) at java.awt.EventQueue.dispatchEvent(EventQueue.java:734) at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:821) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:645) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:365) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109) at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:190) at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:235) at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:233) at java.security.AccessController.doPrivileged(Native Method) at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:233) at java.awt.Dialog.show(Dialog.java:1084) at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:736) at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:458) at com.intellij.openapi.ui.DialogWrapper.invokeShow(DialogWrapper.java:1686) at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:1635) at com.r4intellij.packages.remote.ui.RManagePackagesDialog$1.actionPerformed(RManagePackagesDialog.java:36) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252) at java.awt.Component.processMouseEvent(Component.java:6541) at javax.swing.JComponent.processMouseEvent(JComponent.java:3324) at java.awt.Component.processEvent(Component.java:6306) at java.awt.Container.processEvent(Container.java:2237) at java.awt.Component.dispatchEventImpl(Component.java:4897) at java.awt.Container.dispatchEventImpl(Container.java:2295) at java.awt.Component.dispatchEvent(Component.java:4719) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4889) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4526) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4467) at java.awt.Container.dispatchEventImpl(Container.java:2281) at java.awt.Window.dispatchEventImpl(Window.java:2746) at java.awt.Component.dispatchEvent(Component.java:4719) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764) at java.awt.EventQueue.access$500(EventQueue.java:98) at java.awt.EventQueue$3.run(EventQueue.java:715) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90) at java.awt.EventQueue$4.run(EventQueue.java:737) at java.awt.EventQueue$4.run(EventQueue.java:735) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80) at java.awt.EventQueue.dispatchEvent(EventQueue.java:734) at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:821) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:645) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:365) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109) at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:190) at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:235) at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:233) at java.security.AccessController.doPrivileged(Native Method) at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:233) at java.awt.Dialog.show(Dialog.java:1084) at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:736) at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:458) at com.intellij.openapi.ui.DialogWrapper.invokeShow(DialogWrapper.java:1686) at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:1635) at com.intellij.webcore.packaging.InstalledPackagesPanel$4.actionPerformed(InstalledPackagesPanel.java:98) at com.intellij.openapi.actionSystem.ex.ActionUtil$1.run(ActionUtil.java:216) at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:233) at com.intellij.openapi.actionSystem.impl.ActionButton.actionPerformed(ActionButton.java:192) at com.intellij.openapi.actionSystem.impl.ActionButton.performAction(ActionButton.java:155) at com.intellij.openapi.actionSystem.impl.ActionButton.processMouseEvent(ActionButton.java:329) at java.awt.Component.processEvent(Component.java:6306) at java.awt.Container.processEvent(Container.java:2237) at java.awt.Component.dispatchEventImpl(Component.java:4897) at java.awt.Container.dispatchEventImpl(Container.java:2295) at java.awt.Component.dispatchEvent(Component.java:4719) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4889) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4526) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4467) at java.awt.Container.dispatchEventImpl(Container.java:2281) at java.awt.Window.dispatchEventImpl(Window.java:2746) at java.awt.Component.dispatchEvent(Component.java:4719) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764) at java.awt.EventQueue.access$500(EventQueue.java:98) at java.awt.EventQueue$3.run(EventQueue.java:715) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90) at java.awt.EventQueue$4.run(EventQueue.java:737) at java.awt.EventQueue$4.run(EventQueue.java:735) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80) at java.awt.EventQueue.dispatchEvent(EventQueue.java:734) at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:821) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:645) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:365) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

gzrcm commented 7 years ago

Also received this IDE error after clearing the previous.

Failed to generate a valid skeleton for 'base'.helperOutputNull=false skeletonFile_exists=false isComplete=false isCurrentSkelVersion=false OS=Windows 7 6.1 Please file a ticket under https://github.com/holgerbrandl/r4intellij/issues java.lang.Throwable at com.intellij.openapi.diagnostic.Logger.error(Logger.java:132) at com.r4intellij.packages.RSkeletonGenerator.lambda$updateSkeletons$1(RSkeletonGenerator.java:256) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)

LeeBergstrand commented 7 years ago

@gzrcm R 3.2.0 and R 3.2.1 still work with this plugin.

gzrcm commented 7 years ago

I was able to get it running on my macbook with the latest PyCharm and R versions. Still struggling on windows with R 3.2.

holgerbrandl commented 7 years ago

Only R 3.3 and later are currently supported by the plugin. Since I just do it as a hobby I can not test very old legacy versions of R. Sorry for inconvenience.

The other error about the class-cast-exception was just fixed in d172f44d9 but has not yet been released.

For problems with indexing base package please comment on #120

zxj5470 commented 7 years ago

I'm using windows 10.15086 and R version 3.4.1 and Idea 2017.1.4.... print list were Unresolved referencewith red underline... any functions were like this. (the program can run successfully but it looks like ugly.) and I don't know how to solve it. Beg my poor English.

print('hello world')
^^^^^
a=list(2,1,4,6,1)
  ^^^^
gzrcm commented 7 years ago

No worries @holgerbrandl This plugin is great!

yumere commented 6 years ago

I think I also have similar problem, I'm using windows 10. I can solve this problem as follows.

I have two R.exe files in R/R-3.5.0/bin directory.

First, R/R-3.5.0/bin/R.exe Second thing is R/R-3.5.0/bin/x64/R,exe

When I used the first thing, I had a same problem as well, but when used R.exe under x64 directory I can't see any red underlines.

I would like to this comment help someone who has same problem.