Eclipse plugin that shows the META-INF of a jar library - eclipse

Currently in eclipse when you open a library jar, it shows all the packages and classes, but if you want to see the META-INF content (e.g. manifest.mf), you have to open the file externally (e.g. using winrar)
Is there a simple way buit-in in eclipse to do so, or a plugin that does this?

you can use the Project Explorer view (part of Eclipse Java EE) instead of the Package Explorer view, and view everything inside the jar, including properties files, xmls, etc.

Jar-Plug will do the trick
http://jar-plug.sourceforge.net/

Under Linux, I simply associate (inside Eclipse) the jar extension with the file-roller application, which lets you browse the innards of packed files. Works fine for me. This doesn't directly display META-INF, of course, but I can go there and click on the file (e.g. manifest.mf). This is very convenient.
Under Windows, I suppose you could similarly link out to something like 7Zip. I have no experience to contribute there, alas.

Related

Acceleo UI doesn't generate any files

I have a GMF editor and an Acceleo UI project that I would like to bundle in a single plugin. That's not the matter though.
You see, when executed in the runtime (Run as > Eclipse Application), both the GMF editor and the Acceleo UI project work fine and dandy.
However, when exported as plugins and installed into Eclipse, only the GMF editor will work. The Acceleo UI item WILL show up in the context menu, and it will create the target folder for the files. But this folder will be empty.
Is there a reason why one plugin would work properly while the other does not? Is there any additional configuring that must be done in the Acceleo UI for it to work outside the runtime?
Searching the Eclipse Forums, I found something about adding a line 'outputFolder="${target.folder}"' to a file "acceleo.build", but I can't find neither the file nor the line anywhere.
Any help would be greatly appreciated. I'm working on Eclipse Mars with version 3.6.3.201602090916 of Acceleo.
So, I know nobody ever replied to me, but I found out the problem so I might as well post it in case someone runs into the same issue in the future.
The issue was that Acceleo needs a file with extension .emtl to work. This file wasn't showing up anywhere when exporting the plugin, though. I thought it was failing to compile it (as the .etml is actually a compiled form of the .mtl file).
After some digging, I found out Acceleo does actually create said file, but it doesn't put it in the same place where the .mtl is - it actually places it in a folder called "bin", which isn't created by default when exporting the plugin. In order to see this "bin" folder, I had to mark it in "Build Configuration", in the build.properties file.
Then, I manually copied the .etml in "bin" to the plugin's "main" folder (where the .mtl file resides) and that was it, it worked like a charm.

How to display the source code of an external JAR in Eclipse?

In Eclipse, I just imported an external JAR. Viewing any of the classes in the Package Explorer will instead of showing a source code open a Class File Editor with saying "Source not found". The folder of the JAR I have downloaded, however, has only JAR, no lib, no src, no docs.
Is there still a way how to view/generate a view the source code so then I can view it in Eclipse properly?
.jar files don't contain source code but are more like binary files for Java.
You can either get the source code from the projects page (if it is an OpenSource project of course)
An other possible way to view the source code of a .jar file is by using a decompiler (http://jd.benow.ca/; Also has a Eclipse plugin I think). This method can be very painful though when an obfuscator has been used by the developer who generated the .jar file.
Try this :
Download java decompiler from http://jd.benow.ca/ and now double
click on jd-gui and click on open file.
Then open .jar file from that folder.
Now you get class files and save all these class files (click on file
then click "save all sources" in jd-gui) by src name.
You cannot view the source form a .jar files as it contains binaries.Use a java decompiler instead to decompile the .class files and view their sources.
If possible I suggest you to use Maven for manage dependencies of your project, in most cases it did the trick for you.
See: Get source JARs from Maven repository

java API source files in eclipse

In some eclipse installations I have noted that they are able to view all the source files inside a jar(may be if the jar has source files packaged in it or another jar for source?).
If we ctrl+click or f3 on a class type, then it shows the source code of the JAVA API for that class. Likewise for many classes. even for some third party classes like apache's. But in my installation i just get a white screen with the name of the jar and some mess of unreadable content. And also previously I have got javadocs of JAVA API very well before when i hover my mouse over the class or function names. But in my current installation even that is gone.
How to get java docs and source file viewing in eclipse? i am using eclipse juno... downloaded within 6months..
Make sure that Eclipse is using a full JDK rather than just a JRE. Look in Preferences / Java / Installed JREs to see what Eclipse is using.

Why we just can't download a jar file of Javadocs of SWT from the main website

For almost every library I've come to see a link of the JAVADOCS jar to be downloaded, plain and simple. Why There is no jar for SWT ? and if there is why it's not on their website ..
Please note that I know there is a version in Eclipse help, and there is an online version, which I can't link to cause It doesn't validate cause it's in php ! no Index.html found
Though that's not what I'm looking for I tried it, I'm using SWT.jar and I want to attach the javadocs jar to it so when CTRL+Space and highlight a method I just see the docs right away beside etc you know..
Anyway Because I think SWT is so great I feel like there is a simple way to do that and I just can't see it maybe. if there is nothing I think I should file a feature request or somethin' to them.
Ok I kinda knew this question was not going to get much interest, so I gave it another try and I came back cause I don't want anyone to waste 1 hour of trying to figure out something like that..
Download the swt zip
Go to eclipse and load existing project
you'll find src.zip in that project
unzip src.zip and copy the folder "org" org\eclipse\swt..
paste that folder in src (inside the project)
select org folder in eclipse then go to project >> generate javadocs
If you're in windows you probably going to press on (Configure) to pick up the Javadoc.exe file it's in the C:\programFiles\java\jdk-xyz\bin\
choose where you want to drop the doc files, next then finish
ok, just go to the files and zip it, P.S zip the files don't zip the folder which contains the files cause when you load the docs as archive and validate it won't see the index.html
if you want to know how to load the archive, google it's in (in project properties>> java buildpath >> libraries tab >> swt jar >> add jar >> add your SWT.jar then expand and edit the javadoc location..
That was Robo detailed I know, I just don't want someone to read this and still can't do it
The suggested way to develop SWT apps is by following the instructions at Developing SWT applications using Eclipse. Each download page of eclipse includes an SWT section with SWT source complete zips.
The second way as mentioned is to look in your eclipse/plugins directory and use the 2 arch compatible jars provided there:
org.eclipse.swt.gtk.linux.x86_64_3.7.0.v3735b.jar
org.eclipse.swt.gtk.linux.x86_64.source_3.7.0.v3735b.jar
The source jar can be attached so as to provide javadoc. The javadoc (for most of the API shipped with eclipse) is stored in the eclipse/plugins/org.eclipse.platform.doc.isv_3.7.0.v20110602-0800.jar jar. If you unzip that, it should be in reference/api
I know that Eclipse is setting up a maven repository, although a quick scan for org.eclipse.swt only found 3.6.2 binaries and source. See http://maven.eclipse.org. They're still in they trail phase.

Is there a way to make NetBeans hide specific files/folders?

I'm working on a joomla project and for debugging/type hinting/auto-complete have my whole joomla install as a project. Is there a way I can hide the folders I don't need in file or project view?
Ideally I would have a project that scans all of the folders but simply displays this:
administrator
components
com_myproject
(display all files under this)
components
com_myproject
(display all files under this)
You can hide any directories you'd like in Netbeans 6.9.1. Right click on the project, select properties, and select the "Ignored Folders" category. In this section you can add all the directories you don't want to see.
No, you cannot do it with NetBeans like this.
However, you can do it little differently... this is going to be component development.
Basically for every custom component you will need to have a separate project.
Create project with folder structure like Joomla
|
|-administrator
|-componnets
|-my_component
|
|-componnets
|-my_component
After this step, right click the project and go into properties. In the properties go to PHP Include Path, map path to Joomla directory, this is what is going to give you autocomplete feature for Joomla code.
Also, to improve auto-complete for Joomla, go to Tools->Properteis->Editor->Code Copletion
Select PHP from language drop down.
Check Also Non-Static methods after ::, this will give your auto-complete for methods like JFactory::getDBO(), etc...
Obviously it makes it hard to test right now, because component is not inside of Joomla... and copying it manually makes it a hassle. Go to project properties (right click project->properties) and enabled "copy files from Sources Folder to another location" and math the path. NetBeans will no allow you to setup copy into existing directory, workaround is simple.
Setup copy support into temp direcotry /tmp
In NetBeans windows, go to Files of your component project
Expand the nbproject node
Open project.properties
Manually modify the copy path
If you want something more advanced and runt test's, you can use Ant and create build.xml files. Read more about it on Sun's blog about NetBeans PHP and Ant.
Heres a video that will help u to do the same using netbeans IDE. Keeping yout component file into a seperate directory and do the development making full use of IDE features using the Apache ANt build procedures.
The Ant build file.
http://docs.joomla.org/Building_Joomla_Extensions_with_Apache_Ant
The video to help you setup netbeans for component development.
http://www.vimeo.com/13167176