Unable to set up Ballerina slalpha2 as SDK in IntelliJ - intellij-idea

I have recently reinstalled Ballerina on MacOS Catalina. My current distribution is set to slalpha2. The distribution is located in the standard place, /Library/Ballerina/distributions/ballerina-slalpha2.
I'm trying to set this up as an SDK in IntelliJ, where I'm using the Ballerina plugin, but when selecting that directory, I get the message "The selected directory is not a valid home for Ballerina SDK". I've tried a few of its subdirectories but those didn't work either. What should I be pointing it to?

Please note that the Ballerina IntelliJ plugin development is currently on hold and therefore the Swan Lake support is yet to be added.
You can still use the intellij plugin for Ballerina 1.x versions but I'm afraid your only option would be using the vscode plugin for the moment, if you are using Ballerina Swan Lake versions.

Related

How to copy module ('com.intellij.modules.java') integrated into Intellij to other JetBrain's product?

After downloading and importing plugin "Fortify Analysis" to IntelliJ ewerything is working, but when I try to do the same plugin into e.g. PyCharm I see error message like that:
In IntelliJ's documentation I see that the module 'com.intellij.modules.java' is built into IntelliJ. On the other hand support from the company which is responsible for the plugin "Fortify Analysis" are telling me that their plugin should work on PyCharm (I'm using version according to their documentation) and the problem I see is not connected with their product.
I've also tried the solution to comment the line:
<depends>com.intellij.modules.java</depends>
in plugin zip file: META-INF/plugin.xml
I tried to find the module and copy manually but I can't find the module file after downloading IntelliJ IDEA Community Edition.2020.3.4.tag.gz.
I've also tried to install every module I can find in repository apt-cache search intellij:
sudo apt-get install libintellij-core-java libgradle-plugins-java libintellij-extensions-java libintellij-platform-api-java libintellij-platform-impl-java libintellij-utils-java libtrove-intellij-java
But it didn't solved my problem.
So the only solution I see is to copy the plugin from IntelliJ to PyCharm, but I don't know how to do this?
Bad news: I think that you misunderstood the documentation of the manufacturer of the plugin compatibility.
The documentation you mentioned lists the "Fortify Analysis Plugin" only compatible with Android Studio 4.x and IntelliJ IDEA 2020.x, but the "Fortify Remediation Plugin" in addition also compatible with PyCharm 2020.x and WebStorm 2020.x
At least your screenshot shows the "Fortify Analysis" plugin, so that's not compatible with PyCharm according to the manufacturer.

Java docs not available on IntelliJ

I setup Spring boot project with Java 8 on IntelliJ latest version (2018.2). I was able to do download Spring documentation using Maven->Download Sources and Documentation. But Java docs are not available in my project when I do CTRL+Click, all I see is the source code of the class. When docs loaded properly, we should be able to see documentation on top of method definition. I checked Project Structure -> SDK -> Documentation paths and it has valid URL to Oracle docs. When I clicked on any class, all I see is source code for the class but documentation is missing. I tried to include docs from the Oracle website manually, it did not work either. I am on Ubuntu 18.04 operating system.
The docs URL setting has nothing to do with the code you see when you navigate to a class from the Java API. Rather, you can place your cursor in a class or method name and press Ctrl+Q to view the documentation in a popup window.
I figured out the issue. In my Ubuntu machine, I installed open-jdk8 and added as SDK in IntelliJ. But OpenJDK did not download sources along with JDK. I tried to download the sources manually, but I got 404 on OpenJDK sources website. So, uninstalled OpenJDK and installed Oracle JDK. Everything works now. Thanks everyone for the help
What worked for me on Fedora 31
download zip from page https://jdk.java.net/java-se-ri/11
(for Java 11, for Java 13, replace with "/13" etc.)
or direct link for Java 11:
https://download.java.net/openjdk/jdk11/ri/openjdk-11+28_src.zip
save in a custom location, e.g. ~/java/sources
open IntelliJ Idea's
Project Structure -> SDKs -> Sourcepath
point point to the zip
e.g. ~/java/sources/openjdk-11+28_src.zip
now Ctrl+Q opens real javadoc in the editor

Plugin Compatibility Issue Eclipse Oxygen (4.7) and Java 9

We upgraded one of our Eclipse 3.x plugins to work with Java 9.
But when we generated the plugin update site content, and used Eclipse Update functionality to install the new version of the plugin, we encountered the following error in Eclipse Oxygen.
Removing part descriptor with the 'pluginxxx.bla.bla' id and the 'bla bla' description. Points to the invalid 'bundleclass://org.eclipse.ui.workbench/org.eclipse.ui.internal.e4.compatibility.CompatibilityView' class.
This error also appears due to some of the bundled plugins of Eclipse Oxygen itself.
After a hard week we had to
Uninstall our plugin
Remove the older versions of the plugin from the Eclipse/plugins folder
Export the plugin as a deployable plugin under the eclipse plugins directory. (Eclipse/plugins/blabla.jar)
Restart Eclipse and it worked.
Right click the eclipse plugin project and Run as "Eclipse Application" works fine, but installing the plugin from an "Update Site" causes the plugin to fail loading.
We could not find a solution yet, but it certainly effects our delivery of the plugin. The plugin is used by almost 500 CS students on their personal computers, and 200 lab computers. So the update should be installed using regular Eclipse Update functionality, not by copying the jar into the plugins directory.
Was there a better way to fix this, or something quicker we could've tried (in case this happens again)?
Update (7 days into the problem)
We have a workaround:
Export the feature project with the following settings in the Export Wizard
Destination/ Directory: Folder of your Plugin Update Site project
Options/ Package as individual JAR archieves (selected)
Options/ Generate p2 repository (selected)
Options/ Allow for binary cycles in target platform (selected)
Options/ Use class files compiled in the workspace (essentially selected)
Install (or update) the plugin from the local (or remote) plugin update site, and the CompatibilityView problem is solved.
In order to have the category listing displayed correctly during install/update new software operations, we added a category.xml file (File/New/Other/Plugin-in Development/Category Definition) in the update site project, defined the categories, and added the feature (versioned as "qualifier").
This is certainly not the way it should be, and we just hope it will be solved in the future Eclipse releases.
By the way current Eclipse Photon integration version has the same problem unfortunately.

go lang plugin for Intellij IDEA 14.0.x

Is it possible to setup go language pluing for Intellij IDEA 14.0.3 version?
I tried to download the binary plugin (jar) from https://plugins.jetbrains.com/plugin/5047?pr=idea but the version 0.9.15.3 listed here is old and does not recognize GOROOT and GOPATH.
I tried to build the latest plugin using sources from https://github.com/go-lang-plugin-org/go-lang-idea-plugin using Intellij but failed to setup the SDK.
Is there a latest binary version of the go lang plugin available?
Update to IDEA 14.1+ or use the IntelliJ Community.
Original answer:
You can use the free version of IntelliJ Community with the latest version of the plugin and everything should work fine. Also, Android Studio for example is compatible with the plugin as well.
Unfortunately the plugin has some internal dependencies which makes it hard to port back and maintain for multiple IDEA versions. Hope this helps
It might be not the exact answer your are looking for but their is a separate IDE for go developer . it has some unique features you must try GOLAND First month is free.
I also faced up this problem couple days ago. You can download nightly version of go plugin from this link.
You must install this plugin via browse your download folder not repository

Force Eclipse (Helios) to use a newer version of SWT at application runtime

I'm developing an RCP project using Eclipse-Helios.
The version of SWT that is installed (in the plugins directory) is [org.eclipse.swt-win32-3.6.2, & org.eclipse.swt.jar]
I require new API functionality that is only available from swt-3.8. (specifically, I wish to set the custom colours, for an SWT color dialog before opening.)
I have downloaded 3.8.1 from the SWT/Eclipse downloads site [ http://download.eclipse.org/eclipse/downloads/drops/R-3.8-201206081200/#SWT ]
The SWT download is NOT a plugin (couple of jars, src.zip and some readme files), so I am unable to add it to my "Target Platform" (it doesn't appear as an available jar even after adding the containing directory in "locations")
I was unable to find an update site for SWT (or any site where i could get a plugin for the newer version)
If I add the swt.3.8.jar to my classpath (and then increase it's order-priority in the project build-path), I am able to access the newer api functionality from my code (as well as view the source).
When I run the application however, it seems as though the runtime is still using the older SWT jar, as i get an unknown method error, when attempting to access the newer functionality.
Questions:
Is there an SWT repository location that I can use to download a newer version of SWT using the eclipse install manager?
If not, is there a way I can force the runtime to ignore the older version (I assume via plugin.xml)?
Is there a better way to achieve what I am trying to do?
What is the difference between the two SWT jars currently in the helios plugins directory (as the 3.8 download only contains the win-32 version)?
Thanks in advance.
SWT is downloadable as a separate plugin here:
http://download.eclipse.org/eclipse/downloads/drops/R-3.8-201206081200/#SWT
Eclipse 3.8 contains regular plugins including the SWT (the win32 specific as well as the generic "org.eclipse.swt_.jar"). I am currently using the 3.8 version and they appear as plugins.
I also have Eclipse 3.6 (Helios) and I was able to import the swt plugins using the "File->Import->Plug-in Development->Plug-ins and Fragments" wizard. I just specified the eclipse 3.8 directory and could import them in my workspace. Once imported I can of-course use them to be included in the runtime environment. Eclipse should use the latest version automatically.