Eclipse javadoc configuration (for own project) - eclipse

We can configure a library's (jar) javadoc in a Project in Eclipse by:
- Opening the Preferences window
- Select the Java Build Path (menu)
- Open the Libraries tab
- Select a jar and Edit the Javadoc location.
If you have a Javadoc view opened (in Eclipse) whenever you select an object from that specific library you will be able to display the Javadoc content inside the window. I find it quite useful.
My question is:
If you generate your project's javadoc, is it possible to configure its location in the project and display the content (the same way as mentionned above)?
Thanks in advance,

I think as soon as you have generated your Javadoc for your project inside Eclipse. Any Javadoc content from a selected object will appear in the Javadoc view.

Related

Eclipse to IntelliJ transfer

I have copied my src package structure from eclipse to intellij and it makes this structure within src folder:
How do I make it dz1.drugi so I can one click expand all to my classes?
Another question is how to select default project folder as it is "workspace" at \Users\{Name} for eclipse. Right now, when I create new project like this:
it saves it without workspace (or projects folder) at \Users\{Name}.
Click on the cog icon at the top-right of the explorer view, and check the "Flatten packages" option.
That said, If you get used to keyboard shortcuts top open classes and files, and navigate through recently opened files, you'll quickly see that you'll amost never use the explorer view anymore.
Project view has an option to compact empty middle packages, enable it. You can also use Flatten packages option. Actually, your question is a duplicate of this one.
IntelliJ IDEA remembers the last location you've used when creating a new project. Once you want to create another project, the location one level upper of the previous project directory would be suggested. So, create a project in C:\Users\someuser\workspace\myproject1 and IDE will suggest C:\Users\someuser\workspace\myproject2 for your new myproject2.

How can I change custom perspective's icon in eclipse?

I want to change my custom perspective's icon in eclipse. I have searched a lot but I didn't find any solution.
The icon for a perspective can be changed by updating the iconURI attribute of the perspective's definition in workbench.xmi file. This file is located inside the .metadata directory of the workspace. e.g. /My-Workspace/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi.
There are usually two lines with the iconURI attribute. For example:
<children xsi:type="advanced:Perspective" ... iconURI="platform:/plugin/com.atlassian.clover.eclipse.core/icons/cview16/clover.gif" tooltip="Clover">
and
<snippets xsi:type="advanced:Perspective" ... iconURI="platform:/plugin/com.atlassian.clover.eclipse.core/icons/cview16/clover.gif" tooltip="Clover">
The icon URI is a path to an image within an Eclipse plugin. (Plugins are located at {ECLIPSE_HOME}/plugins directory.)
The workbench.xmi file needs to be edited after closing the Eclipse IDE, because the file gets overwritten when you exit from Eclipse.
In this example I created a custom perspective named Clover by modifying the Java Perspective available in Eclipse, and saving it as "Clover". Initially my perspective had the same icon as the Java perspective:
So I closed Eclipse, changed the icon paths in workbench.xmi, saved the file, reopened the IDE, and got the new icon displayed:
Note: I use Eclipse 4.6.0 (Neon) but this solution would work for all Eclipse 4 versions.
If you stored an existing perspective under a different name as your custom perspective, then it is not possible to change the icon.
You would have to define the perspective by writing a small Eclipse plugin to be able to change the icon.
Open plugin.xml for your plugin; go to the Extensions page; and select your perspective extension (in org.eclipse.ui.perspectives: you should have your custom prspective entered in here). There is an icon attribute you can set for your custom perspective. (I am using Neon2)

Adding menu item in Eclipse

I want to write an Eclipse plug-in that adds an item to the Refactor menu in Eclipse JDT? How can I do this?
Thanks a lot
Recently, I was writing a plug-in that performs some re factoring.
Writing the refactoring was not too complicated, but figuring out how add the menu items correctly into the Refactor menu took a lot of time.
Here is the correct plugin.xml snippet:
The Refactor menu tag is a copy of the original "Refactor" menu definition from org.eclipse.jdt.ui. It is important to copy all the separator definitions. For my plug-in, I have also added a new separator called spartanGroup.
The path for the Refactor menu is org.eclipse.jdt.ui.refactoring.menu.
It is possible to figure this information by looking at plugin.xml of the org.eclipse.jdt.ui plug-in. You can find it online (for example here) or you can import the source code of your eclipse build following these steps:
1 File -> Import
2 Select Plug-ins and Fragments and click next.
3 In the "Import From" section choose "The active target platform".
4 In the "Import As" section choose "Project with source folders"
5 In the next screen, locate your plug-in (org.eclipse.jdt.ui) and add it.
6 Click finish and the source code of the plug-in will be imported into your workspace.
You could write a plug-in that utilizes the Platform Command Framework. For details see the official wiki page, that provides several tutorial links: http://wiki.eclipse.org/index.php/Platform_Command_Framework
Basically, you define a command to execute, a menu contribution (where to display it) and a command handler (what to execute).

Is it possible to prevent Eclipse's indexer from presenting matches for `.class` files?

I'm working on a new Eclipse workspace and my setup is very simple:
My source folder is named src, my classes folder is named classes and I have in my classpath also the classes from the build on the server located under server_classes.
When I use the Find Type option in Eclipse it shows me the .java files under src and the .class files under server_classes.
Is there anyway to instruct it ton exclude those files by default? (I want to keep them in the classpath - just not run into them by mistake when looking for a particular class)
When you open the Open Type window (ctrl-shift-t), at the top right there is a little black triangle. Click on that and select "Select Working Set..."
You can then create your own working set that only includes your source directory.
Open the Search Dialogue by pressing Ctrl+H, and select the "Java Search" Tab. The "Search In" Section should be self describing.
If you don't see a "Java Search" Tab press the Customize button.

what can I do to make display the bin folder on eclipse?

can anyone help me solve the issue that I have ?
in fact when I create a project on eclipse, the bin folder doesn't display and I am able to create a javadoc for my project. I need help please.
I don't know what the reason for your question but you can see the bin directory in Project Explorer (not Package Explorer). Here you click the triangle and select Customize View... and remove the click on Java output folders
To change this behaviour and hide the “.class” files you need to do the following.
Find your class output folder in the “Project explorer” window. This is usually called “bin” or “target” for Maven projects
Right-click this folder and click “Properties”
Tick the “Derived” checkbox and click “OK”
“.class” files will now be hidden in future.
Source: http://ayubmalik.co.uk/2011/12/hide-class-files-when-opening-a-type-or-resource-in-eclipse-ide/
If your Eclipse version doesn't allow you to show "Java Output Folders" as mentioned by nanda, then try the Navigator View (From the main menu: Window > Show View > Navigator). The Navigator View shows the bin folder.
Your question is a bit vague but try right clicking on the project and choosing build path, and see if the output directory for your java classes is set to bin. It may not appear in your unless you add some Java source code