Eclipse plugin: Using components of another perspective - eclipse

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.

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.

Filtering eclipse's project explorer view from library entries

How can I remove those lines shaded in blue?
Working with multiple open projects in eclipse becomes a nightmare with this verbosity... it is very hard to navigate between the projects' sources with this excessive screen estate.
I don't think there's a configuration option to hide them in Project Explorer, unfortunately. But if you use Package Explorer you can filter those out (plus, they're grouped under the Referenced Libraries node so they're easily collapsible).

How to move Eclipse project to Netbeans IDE

There is MyProject folder in my eclipse workspace. It consist of gui class and main class. I want to move this project to Netbeans IDE. Because I think Eclipse's Window builder is awkward to design gui and has weaker function than netbeans one. Anyway, when I move to file to Netbeans , I couldn't see the tab named GUI that easily move/add/delete components. The only I can see, just a code.
How to move my gui class to Netbeans IDE? I want to add/delete swing components in there. How can I do that?
I found Import eclipse proect . However, I can't manipluate my gui in Netbeans GUI Builder.
yes, you will need to recreate the GUI panels in netbeans.
Netbeans doesn't support 2 way editing of forms, it stores and read the data from the .form file and regenerates parts of the java file on changes.

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)

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)