Gluon Mobile: Access JavaDoc from within NetBeans - netbeans

I would like to access the Javadoc documentation of Gluon using the NetBeans context menu option Show Javadoc:
This fails with Cannot perform Show Javadoc here:
Showing the Javadoc for classes belonging to the Java standard library (for example javafx.scene.Scene) works as expected. Hence, I need to set the url to the Gluon Mobile documentation (http://docs.gluonhq.com/mobile/javadoc) manually. As Gluon projects are managed by Gradle, the project settings dialog appears to have no way of specifying an url. As a workaround I tried setting the url as part of the Javadoc urls for the Java core libs (as I said: workaround) but this did not help either.
As an alternative, I tried downloading the sources from within NetBeans but this did not help, too.
So, the questions boils down to: Where can I specify the url to the Gluon Mobile Javadoc so that NetBeans will pick it up? Thanks in advance.

Gluon Mobile Javadoc is available at the repository with the regular jar (i.e, for the current 3.0.0).
The problem with the gradle plugin for NetBeans is that it doesn't download it.
A possible solution is, according to the plugin author, this one:
For every Gluon project, edit the build.gradle file, and insert this, right after the jfxmobile plugin:
apply plugin: 'idea'
idea.module.downloadJavadoc = true
Save the file, and reload the project (right click on the Project name -> Reload Project).
Now, on the Dependencies folder, right click and select Download Sources.
After a few seconds, the javadoc jar will be added to the project, and you will have the required inline help for Gluon Mobile.

Related

Installing JPA in Intellij

I have Intellij Idea community Edition and I am programming in Scala.
My #Entity annotations are highlighted with the message "Cannot resolve symbol."
I looked at this question IntelliJ IDEA highlights #Entity class names with "Cannot resolve symbol" in JP QL, which has the same issue.
The answer there says that I should install the JPA plugin for Intellij.
I looked here: https://www.jetbrains.com/idea/help/enabling-jpa-support.html
However, when I search for a plugin called JPA or Java EE in Intellij I can not find anything.
Any idea about why this is happening?
Am I not searching for the correct plugin?
For IDEA to resolve the symbols, you need to add the relevant dependency in the same way you'd add any other dependency. Either (the better option) to your build system (SBT, Gradle, or Maven) or directly to the IDEA project if you don't use any of those:
Open the Project Structure dialog (e.g. Ctrl+Shift+Alt+S).
In the left-hand pane of the dialog, select Modules.
In the pane to the right, select the module of interest.
In the right-hand part of the dialog, on the Module page, select the Dependencies tab.
On the Dependencies tab, click add and select Library.
In the Choose Libraries dialog, click New Library.
If suggested, select:
Java to create a Java library. Select the files and folders to be included in the library in the dialog that opens.
From Maven to download a Java library from a public Maven repository. Specify the artifact to be downloaded and the associated settings in the Download Library from Maven Repository dialog.
In the Configure Library dialog:
Specify the library name.
Select the library level (global, project or module).
Configure the library contents using add, iconLibExclude and delete.
Click OK.
In the Choose Libraries dialog, click Add Selected.
If necessary, select the Export option and change the dependency scope.
Click OK in the Project Structure dialog.
Of course, this won't give you any special JPA support. In particular, the linked question is talking about errors shown in JPQL strings, not on the annotations themselves.

Java Decompiler plugin in Eclipse with JavaDoc

I add a decompiler plugin JadClipse in Eclipse but I am facing a issue that decompiler removes the JavaDoc from the code. Only the simple code is made available, can anybody suggest me any available Eclipse plugin to resolve the problem.
JAD doesn't remove the JavaDoc - there simply is no JavaDoc in compiled code.
What you want is to add JavaDoc to decompiled code. There is no plugin for that (and I think writing one wouldn't be easy).
If you have the JavaDoc as a JAR, you can tell Eclipse to show it in the project's settings. That way, you might be able to see the docs when you hover over a place where a method is used - if you hover over the decompiled method, this probably won't work (I think the decompiled source will take precedence over anything else).
The solution to add manually each javadoc is a bit heavy if you have many librairies in your project, which is often the case.
If you have Maven integration, the solution to have the javadoc accessible is to tell Maven to download it.
In Eclipse Project Explorer :
Right-click on your projet -> Maven -> Download JavaDoc
There should be an equivalent for Graddle which I've never used yet.

Eclipse RCP: Plugin does not start

I wrote a new plugin for my eclipse rcp application and added the plugin to the dependencies of my product. I also tried to set the auto-start value of the new plugin to true but it does not start. It shows up as resolved but not as started.
Basically the only thing that this plugin does is to add a help file (table of contents) via the extension point org.eclipse.help.toc.
Any idea why the plugin code isn't executed?
Also: the plugin adds its content if I execute it from inside eclipse. The problem occures after I export it.
Just to be clear ... you're not expecting 'code' to run, but when you launch the exported RCP application standalone, the help contents does not appear in the TOC, right?
How did you define your RCP product? As a feature or plug-in based product?
If based on plug-in's, did you define all the necessary plug-in's on the product dependencies tab?
If based on features, did you add the new plug-in to the feature?

Checkstyle: Custom Rules - Eclipse Plugin

I have written few custom checkstyle rules using checkstyle API. They run fine using Maven (after I add the new project as a dependency to the checkstyle plugin).
Now I want these rules to be used by the Eclipse Checkstyle plugin. And this is where I am stuggling.
I've downloaded the sample plugin project (as suggested here and here).
I do not understand what to do next after reading these links.
Do I need to export my project as a JAR?
How do I plug it into my existing Checkstyle plugin?
Thanks
You can do it like following :
Create plugin project and add your custom checks there.
Make appropriate changes to plugin.xml, checkstyle_packages.xml.
Export the project as Deployable Plug-ins and fragments (Export > Plug-in Developement)
Copy the jar file to Eclipse Plugin folde, so no need to install your custom check .
You can refer this tutorial
You already have the correct links that will eventually get you there. As for your questions:
All your custom checks can go into one JAR file. That JAR file must be an Eclipse plugin JAR. I simply install it by copying it to the Eclipse dropins folder, but there may be more elegant ways to do that.
So you end up with two plugins: The original, unmodified Eclipse-CS, and your own plugin which contains the custom checks. When both are independently installed in Eclipse, the Eclipse-CS configuration dialog will offer your custom checks for use in Checkstyle configurations.

JPA Facet cannot be activated in Eclipse

If I try to activate the "JPA Facet" for my Eclipse (Juno) project and point it to a user library containing the JPA libraries (in my case OpenJPA) I get the error:
"The class 'javax.persistence.Entity' is required to be in the selected libraries."
But this class is present there!
"Solution": The JPA libraries were contained in an Eclipse project folder. If I copy it somewhere outside and create another user library with them it works perfectly (although it has exactly the same content as the one before with the libraries located in the Eclipse project!). Seems like an Eclipse bug...
Just create a user library that contains the javax.persistence... JAR in it (It is located in Eclipse/plugins) and add this library at "JPA Implementation"
I'm using Spring Tool Suite (STS). The problem I was facing is that in the default installation the M2E-WTP plugin does not include the Optional component "m2e-wtp - JPA Configurator for WTP".
So I went to Help -> Eclipse Marketplace... and searched "m2e-wtp".
Click on the Installed button and it will become Change. Click on the Change button and select the optional component "m2e-wtp - JPA Configurator for WTP". Apply changes.
This solved for me.