Are Apache Ant Javadocs Included in the Eclipse Plugin? - java

I was trying to add Ant libraries to a project in eclipse, and I used the ones that were part of eclipse's plugins folder. When I tried to associate them with Javadocs, I couldn't locate them in the plugin folder. I searched for them online, and I found this page, in which they say the docs are not provided online because they are part of every distribution. So where can I find the docs in the distribution that came bundled in Eclipse?

The ant javadocs may or may not be included with eclipse, depending on which version you have. Edit: Anyway, it's better not to depend on the version bundled with the IDE. Otherwise everyone who works on the project will have to use the same version of the IDE, and eclipse automatic updates can break your project.
Download the ant binary distribution and ant source distribution
Take the eclipse ant distribution out of your project and replace it with the binary jars (extracted from the zip).
In the eclipse java build path window attach the source zip to the binary jars. (Click the plus, double click "Source attachment" and select the source zip. You'll be able view the source if you want, and the javadoc will appear in the appropriate views.

I do not completely agree with Motlin's answer:
the process described is correct ("attach the source zip to the binary jars"), except the source code of all ant components is provided with eclipse distribution.
If ant is a plugin for eclipse, in [eclipsePath]\eclipse\plugin\org.apache.ant_1.7.1, [eclipsePath]\eclipse\pluginalso contains org.apache.ant.source_1.7.1.jar, including within it all the sources.
I confirm [eclipsePath]\eclipse\plugin\org.apache.ant_1.7.1 is there, but only in the SDK distributions of eclipse with sources included:
SDK eclipse (or "classic eclipse)
Modeling
RCP for plugin development.
This table summarizes the eclipse distros which come with sources included.
So, in the event you do not have access to any other ant stand-alone deliveries, you could use one of this eclipse distros to program and find in it a full ant distribution.
However, as pointed by Motlin, that is not the safest path to consider.

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.

How to search sourceforge.net for Java projects that are built in Eclipse

Sourceforge.net has a filter for Java projects, but I'm looking for a way to narrow them down to ones that are meant to be built in Eclipse.
Edit I'm using Eclipse Metrics and Omondo plug-ins to analyze open-source Java projects. I'm looking for a quick way to find Eclipse open-source projects that can build quickly in Eclipse, so I can use these tools on them for analysis.
I presume that a project that is "meant to be built in Eclipse" is one that has an Eclipse .project file and other stuff checked into the source repository.
First, checking in Eclipse-specific stuff can a bad idea because it is easy to include stuff (e.g. build pathnames, preferences) that are specific to the developer. You then get problems if there are multiple committers ...
Second, this should unnecessary. Most of the stuff in the .project file can be generated when you import the project. If that's not possible, then the project should provide instructions for setting up the buildpath etcetera. (Note that if the project uses Maven, this is all taken care of for you.)
Third, any project worth its salt will include build scripts of some kind that allow you to rebuild without using any IDE.
Finally, any project that only supports building using Eclipse is excluding the significant subset of developers who use other Java IDEs.
Note that neither Maven or Ant builds require Eclipse to work. Both of these build tools can run from the command line, or from other Java IDEs.
OK. I understand your requirements now. You don't actually care what the project is ... or that it is sound / worthwhile project. You just need it for testing your plugin. (I won't comment on the "validity" of doing this. It depends on what you hope to achieve.)
I suggest that you install the m2eclipse plugin and look for projects with a "pom.xml" file. The projects don't need to be eclipse specific. The m2eclipse plugin automatically creates the ".project", ".classpath" and so on based on the "pom.xml" file. There's no need to exclude any particular version control system, because the m2eclipse plugin can import Maven projects that you checked out from the command line.

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.

Categories

Resources