How to attach java docs to jar in osgi plugin? - java

I'm trying to attach the java docs in my eclipse IDE and I am a little bit confused.
I've seen an answer where I had to click on project> properties> JavaDoc location> then insert java doc/api.
Yet another said I had to click on Window> prefernce> Installed Jre>edit> select /usr/lib/jvm/java-7-oracle/jre/lib/rt.jar.> attach java doc/api. I did that for all the jar files
In both cases, it doesn't seem to work. I still see the not attached java doc message for packagejavax.jms. I'd like to have the doc for all the classes I have in my eclipse project. It is an osgi project so I'd like to do it for the whole project and not for individual plugins.
****UPDATE****
Also tried using maven eclipse integration i.e install plugin> click on download artifact source and javaDoc. Didn't work.
It looks like it has to do with the plugin dependencies. When I attach the java doc to the jar in the plugin dependency and restart eclipse there's no javadoc attached. I guess there's another way of doing so with jars found in Plug-in dependencies.
Can anyone help? Thanks.

Related

How to debug third-party Intellij IDEA plugin?

So, I am using a plugin from the Intellij IDEA Marketplace and I'd like to modify it to my needs. The plugin is Open Source(Apache License) but I couldn't find its source code on the internet. I know that plugins are located under Users directory in Windows, so I could decompile the jar and see the source code. But the problem is that this plugin contains some dll files as well.
Is there an easy way to debug the plugin and set breakpoints etc. to see where I will need to modify the code(the other option would be to include the decompiled java source files in a new plugin build but I don't know what to do with the existing dll files).
Thank you.
Intellij Idea plugin development requires a project structure and it requires gradle-intellij-plugin. If you are able to compile the source code, you have to create gradle project with gradle-intellij-plugin. First of all follow the links to create a small plugin to understand how to create a plugin.
https://www.jetbrains.org/intellij/sdk/docs/tutorials/build_system.html
As a sample project, you can refer below the github project.
https://github.com/debjava/ddlab-gitpusher-idea

Eclipse plugin installation from Project File

I want to install eclipse plugin Agilereview from following link:
https://github.com/AgileReview-Project/AgileReview-EclipsePlugin
I downloaded the zip and unzipped it. I added it in eclipse as project and many projects added into workspace. When I tried to select all those projects and export them as deploy-able plugins in eclipse repository, eclipse doesn't allow it and always show error like plugin file missing. A problem is the zip file include many folders and many of those folder has its own plugin.xml file. Therefore, I think this Agilereview plugin itself is a combination of many plugins. I am sure that plugin is okay and its my mistake to install it.
Can anyone tell me, what is the mistake I am doing while installation? I want to install this plugin manually since later I need to optimize it.
Each of the folders org.agilereview.xxx is a separate Eclipse project. So you should use 'Import > Existing Projects into Workspace' to import these projects.
Since there are pom.xml files it looks like you should use maven and tycho to build the code.
For building RCP applications and plugins like Agilereview, which itself is a combination of many projects, you can check out the following tutorial:
http://www.vogella.com/tutorials/EclipseTycho/article.html
Eclipsetycho provides support for building eclipse components.
Install the maven eclipse tool, which will make your work easy.
http://download.eclipse.org/technology/m2e/releases
This is a pretty complex process, so spend some time to learn from the tutorial.

Add Java Libraries to Eclipse

I am quite new to Java and Eclipse.
I am trying to call some functions from the jpf library from a program that I am writing in Eclipse.
Can anyone help me load or install these libraries into my Eclipse project? The .zip files are here. If these are already in the Eclipse program or there is some better way to get them, can someone also post that answer in addition to how to load any arbitrary java library.
Thanks for the help.
The JPF project page, to which you already linked in your question, contains a section about setting up the Eclipse IDE for JPF projects. A more general webpage on how to add external jars to your eclipse project might be helpful as well
download desired jar in to your local machine - add those jar to your project using below
right click on your project - configure build path - libraries - add
external jars - browse downloaded jars - add
Download and extract jpf-bin-1.5.1.zip. In here, you will find one or more JAR files. Add them into your Eclipse project, under something like a "lib" folder. Right-click on the JAR files from there, then choose "Build Path" / "Add to Build Path".
Or better yet, investigate the use of Apache Maven, and let it handle all of the dependency resolution for you. (Per http://jpf.sourceforge.net/roadmap.html, this project is at least Maven-enabled.) At least the 1.5 version is also available from the central Maven repository at http://repo1.maven.org/maven2/net/sf/jpf/jpf/. I don't see 1.5.1, but the jpf-bin-1.5.1.zip contains a "MAVEN.txt" that explains how to install it into a local Maven repository for use.
check how add libraries in eclipse.
http://wiki.eclipse.org/FAQ_How_do_I_add_an_extra_library_to_my_project%27s_classpath%3F
Also check this how make user libraries in Eclipse and then add them in your project.
http://i-proving.com/2006/07/18/user-libraries-in-eclipse

How to get java runtime source?

I am using maven, when I click some method of JDK from Eclipse, I received the error like
"Source not found". I am wondering how to get the source code of JDK from Maven?
Which class(es) are you attempting to look at? Assuming you installed a JDK and configured Eclipse to use it - and not a JRE, which doesn't contain the src.zip with the source code, this should work in most cases. An exception is for many (if not all) of the com.sun.* classes and others that are only available under the SCSL or the JRL licenses - which is available through a separate download from Oracle, after accepting one of these licenses.
I don't know what Maven has to do with this. You can find the JDK source in the src.zip that comes with your JDK. I don't know how to tell Eclipse to use it: I'm an IntelliJ user. There must be an attach source plug-in or command hidden in there somewhere. Point it at your src.zip and you're in business.
If you want to attach the source code of JDK, please reference Attach the Java Source Code
If the source you want to look is from third-party library like spring, you can tell maven to download the source code when you generate eclipse project
mvn eclipse:eclipse -DdownloadSources=true
But not all source can be download unless the source code maven artifact is published to maven repository.
Even more you can download Java doc with this argument when generating eclipse project
mvn eclipse:eclipse -DdownloadJavadocs=true
You can get more info from Maven Eclipse Plugin Link
Hope this will help you.

Compiling Izpack project

I'm trying to build the Izpack project in Eclipse to add my own panels.
I was able to build the sample provided on the command line, but not in eclipse.
I've read the documentation and I'm still a bit confused.
My questions, does the actual Izpack source code have to be included with the project (if so which components and where) or is it enough to have the install.xml ?
I've set up the debug config like the doc says but Eclipse can't find the compiler class to run.
Hello
In the link below you will find a nice help about izpack installer.
http://www.imrantariq.com/blog/?p=89
Link below contains a detailed pdf to make installer with izpack.
http://www.imrantariq.com/blog/?attachment_id=112
cheers
Imran tariq
I managed to build the izpack project as follows
Checkout as java project
On 'Run configurations' make a Maven Build (eclipse m2e plugin). On workspace
select the root directory of the checked out project and on Goals put 'clean install'
I managed to build working izpack up to 5.0.6 with this way.

Categories

Resources