How can I change custom perspective's icon in eclipse? - 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)

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.

No more tabs in Properties File Editor

I am using Eclipse Neon.3 (4.6.3). In the past, Eclipse used to have several tabs on the bottom of the editor window, when a file was opened in the Properties File Editor mode. There you could choose to view the file either in a table-like view or as a plain text file.
I usually edit my resource files in plain text, which still works fine. However, the table view had one nice feature: Duplicate entries were highlighted in red color in the table-view.
But this view is no longer available, since there are no tabs in the Properties File Editor anymore. Did I miss anything? Where has this tab gone? Do I need an additional plug-in for this feature? As far as I can tell, this used to be a built-in feature of Eclipse.
I still had an old installation of Eclipse Mars and found out, that the feature in question is not built-in to Eclipse. The feature is provided by the JBoss Tools Properties Editor, which is part of Red Hat's Hibernate Tools.
To install on Eclipse Mars, follow the instructions of this StackOverflow post.

Eclipse plugin: Using components of another perspective

I already created a new Eclipse perspective, but I would like to know if it is possible to use the same elements and buttons (toolbar ones) that are in the C/C++ perspective?
Is there a way to use them in my own perspective?
Usually all plug-ins has a folder called icons in it. Look into this folder and copy the icons to your plug-in.
For C/C++ perspective icons look at all jars(inside <eclipseInstallationLocation>\plugins folder) containing the name 'cdt` copy all icon files from these jars to your plugin.

Eclipse javadoc configuration (for own project)

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.

Eclipse Project Explorer Icons or Name

In the Eclipse Project Explorer, I wish to add either a special icon or modify the name of a project to display whether a certain project parameter is set for a project. Is this possible, if yes how can I do it? I do not want to change the name of the project because that will mess up other items.
This can only be done by creating an Eclipse plugin. I believe following may fit the bill:
Label decorators (Decorators extension point)
Project natures/nature images (Nature images extension point)