Eclipse Plugin Wizard that takes a zipfile and expands it - eclipse

I am attempting to design an Eclipse plugin. It is going to be an editor and project creator. For the project creator wizard, I want to know if it were possible to have the wizard create a standard folder (obviously possible), and then also take a zip file from the user and expand its contents into the standard created folder? The contents would then be modified by the custom editor I am creating.
thanks!

Related

Is it possible to have the E4 Application Model updated in an Eclipse project copy?

I want to create another copy of one of my Eclipse RCP projects.
In Project Explorer I can do a Copy and Paste and it will prompt me to rename the new copy but it seems like it does not update the Application Model with the new bundle name, so Handlers and Parts, for example, have Class URIs that still point to the original project.
Is there a way to get this updated, even possibly using a different copy technique?
I don't think there is anything to do this update.
The Application.e4xmi file is just an XML file so it could be edited fairly easily.

eclipse custom project plugin

I have already read many articles but never succeeded to do what I need.
I would like to make a plugin for eclipse.
this plugin should add new wizard category to the 'File->New->Project',
this category should have 3 items under it, lets say 'X', 'Y', 'Z'.
when pressing each of them, no matter which,
a new 'Create a Java Project' window open.
after entering the 'name' for the project,
a new Folder needs to be create at the project manager at the same chosen 'name'.
this folder must have all other items inside, just like creating a new normal java project.
also should be a new package under the 'src' folder, package name is 'X' ('Y', or 'Z')..
and inside the package should be a java file (with my own default template), its name should be 'name'.jave.
is it possible to make such plugin to eclipse?
even not making the plugin with eclipse itself.
will really appreciate your answer,
Thanks!
Yes, it is possible. You will have to learn how to make Eclipse plugins though. Start with some basic tutorial like this or this. Then when you know the basics, you can look into the newWizard extension point that you want to use.
You can do this in any editor, even a text editor if you want. But you will have a huge advantage by doing this in Eclipse since there are editors and tools to help you out.
http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fextension-points%2Forg_eclipse_ui_newWizards.html

Eclipse How To Import External Library's Documentation

When we import the external library to eclipse Java project, we can use the auto-correction feature of eclipse for the imported methods from new libraries but we can't see what the methods specifically do. We have to import library's documentation.
Question1: How can I import documentation into eclipse project?
Question2: What does Java Documentation look like?
Question3: Which file format does Java documentation use?
Right click on your project->properties->java build path
select the libraries (its generally .jar file)
click on the dropdown of the libraries to expand the settings-> select source attachment none and click on edit
select the source to the doc ( java documents generally represented by JavaDoc)
click okay.
Question1: How can I import documentation into eclipse project?
In the project explorer, right-click on the library and select Properties. In the resulting dialog, choose "Javadoc Location" and complete the information.
Question2: What is Java Documentation looks like?
A set of directories with HTML files for each class. There is typically an index.hml at the root, plus often a package-list file too. Eclipse searches for these when you "validate" the location.
Question3: Which file format java documentation using?
Eclipse accepts a URL (to a file or a web page), a ZIP or a JAR.
In your package explorer (and most likely on other places as well) you can see your jar file (the external library). Right click on that and choose 'properties'. There you've got the options to attach the sources and the javadoc. After you've done that you can view their javadoc as you view your own (i.e. hover, 'javadoc-view', F3 ...)
Formatted text
Javadoc http://www.oracle.com/technetwork/java/javase/documentation/index-137868.html
as far as i know for your Question1: How can i import documentation into eclipse project?
suppose you are using AXIS.jar and u want to get its doc properties then :
In the Package Explorer view expand your project and its library folder for the Axis library.
Right-click the Axis jar and select Properties.
In the Properties dialog, select Javadoc Location in the tree on the left.
With the Javadoc URL option selected, click Browse.
Navigate to the appropriate folder (see table that follows) and click OK twice to exit the Properties dialog.
Question2: What is Java Documentation looks like? and Question3:Which file format java documentation using?
HTML,zip or jar i guess :))
and
COvayurt, you cannot see what methods do specifically because you have added libraries for those methods not the java docoumentation for those libraries, so in order to add java doc for libraries simply provide the path of your docs location(if you have got docs for those libraries).
right click on your project then under properties set the javadoc path.
java documentation are html files created from the standard classes.you can create java doc for your own project too. see this link
and if you want to see standard java api documentation here-it-is

How to set up customized project type?

I want to ask how to create a customized project type in Eclipse. For example, when I create my project, a project with some built-in read-only folders will appear and in these folders, some files are added. Any help will be appreciated.
Best regards.
You have to create a New project wizard using the extension point org.eclipse.ui.newWizards.
Then in the implementation you could rely on an existing wizard (look the plug-in spy to get the contributor plug-in of the wizard you are using - select the contribution of the first page in the New wizard, and press Alt+Shift+F3), and override the performFinish method to create your own content. However, you could also create your brand new wizard.
For creating the project/contents, you have to use the Eclipse resources API. A quick tutorial is included in the Java AST tutorial of Lars Vogel - it is Java specific, but has some information about creating files/folders.

How to make a new Eclipse project template?

I am using a kind of framework where every time I make a new Java project. I have to arrange the files in the appropriate packages and reference the appropriate external JAR libraries. How do I make a new project template like in the New Project dialog under a new folder?
I've just done a bit of research on this for our own nefarious purposes, and found the answer.
You need to create an Eclipse plugin that uses the org.eclipse.ui.newWizards package. You can define your own category or use an existing one once you find the category ID. To create a new project wizard rather than a new resource wizard, you need to set the "project=true".
Also, your plugin must contain a class that implement org.eclipse.ui.INewWizard. Clicking on the class link from the plugin.xml editor will do the trick.
That class must do all the work in the performFinish override, and must return true to indicate that it actually did its thing and the wizard can close. This is where you create files, directories, set natures, and so forth.
You need to write an Eclipse plugin for that, and concentrate on New Project Wizard.
Writing Eclipse plugins is covered in Stack Overflow question How to write a plugin for Eclipse?.