Adding/removing menus in Eclipse 4.1 (Customize Perspective not implemented) - eclipse

According to the Eclipse wiki, Eclipse 4.x does not have the "customize perspective" option:
Given the increased flexibility allowed by a modeled UI, we have not put effort in the 4.x release into modeling the same perspective functionality as in Eclipse 3.x.
My question, of course is: how, then, do I add or remove menus from a perspective when I need to?
For example, I need the "Team" menu visible in order to use source control (I still have access via the context menu, but for some reason key shortcuts do not work). Also, I'd like to jettison menus I never use, like "Commands", "Run" and "Navigate"

Related

Eclipse "top level elements" changes to "Working sets" on change of perspective

When I close my perspective B, and open it again, even if the B perspective "top level elements" property was "Projects", it gets changed to "top level elements".
However please note that when I open up the perspective the very first time, the property was "Projects".
I am sorry if this question is very elementary but I am quite new to Eclipse development.
Does anyone know which class this property belongs to, so I can override it when the Perspective is opened?
I suspect it should belong Common Navigator Framework and specifically the CommonNavigator class?
P.S. What would be the correct way to know such things, i.e. where is such an action defined and what function is it bind to? Is there any direct way or does it need a person with full knowledge of the eclipse framework?
Well just closing and opening a normal Project Explorer view always seems to revert to Working Sets so it looks like the view does not persist this setting.
You can find out some things about what classes are used by using Eclipse plug-in spy. You can also look at the plugin definitions and the source code. Project Explorer is in the org.eclipse.ui.navigator.resources plugin.
It looks like org.eclipse.ui.internal.navigator.workingsets.WorkingSetsContentProvider deals with this setting but I don't see an obvious way to change it.

Swiching between different perspective in Eclipse?

What is the difference between 'Java Perspective', 'J2EE Perspective' and 'JPA Perspective' in Eclipse ?
Will it hamper anything to the code if i switch between perspectives?
Thanks,
Sudhansu.
"A perspective is a visual container for a set of views and editors (parts)" eclipse.org/.../PerspectiveArticle.html
As an example, in the "J2EE Perspective" is the "Server"-view already added. This view does not make any sense at "Java Perspective".
So perspecitves (and views, editors) are only about the User-Interface. The perspectives do not have any effect on the code.
No changes in code result if you switch between perspectives which are layouts in Eclipse
Check out these links
Eclipse - Perspectives(http://www.tutorialspoint.com/eclipse/eclipse_perspectives.htm),
Java Perspectives(http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Fconcepts%2Fconcept-java-perspective.htm)
A perspective in Eclipse is the way it will show you code and tools. Every perspective is made for an individual workflow. "Java" e.g. is for simple coding in Java and focusses on the Code in the middle. "Debug" e.g. perspective does not focus on the code but instead shows you tools which help you to analyze you actual problem (Thread Monitor, Variable Monitor etc.)

Eclipse 4.2 release perspective issue

I've downloaded latest Eclipse platform 4.2.1 and faced issue with configuring views for different perspectives.
I'm unable to configure views independently for different perspectives, after configuring some perspective and switching to another I can see my changes were applied to all perspectives. This is undesirable for me. Is there a way to use old "independent" style of perspectives configuration?
What you're probably running into is a new "feature" in Eclipse 4.2 (Juno), namely the ability to drag views out of the Perspective. This new "area" for views shows up regardless of what Perspective, so what you're seeing is that you've put views there and now they show up in all Perspectives, making it seem like all Perspectives have been changed.
They (the Eclipse Platform UI team) are working on some improvements to the drag-and-drop of views that will, supposedly, make it harder to do this and thus less confusing to users.
See https://bugs.eclipse.org/bugs/show_bug.cgi?id=367920 and https://bugs.eclipse.org/bugs/show_bug.cgi?id=349867

Eclipse look & feel customization

I need to customize the look & feel of my RCP application.
I took a look at Eclipse Presentation API and I suppose it allows to customize everything in workbench except controls.
So is there any solution to customize controls?
I made some research work and implemented some ad-hoc SWT cunstomization using control canvas drawning. May be there are better solutions?
In Swing you can use Synth theme. It would be great if some 'skin' framework exists for SWT.
One way of customizing an RCP app is by using a plugin_customization.ini file. Like this:
Create a new file called "plugin_customization.ini" in the root of your project.
If you have not already done so, create a product configuration and define a Product.
In your plugin's manifest editor, on the "Extensions" tab, locate the "org.eclipse.core.runtime.products" extension, expand the node, right click on your product node and select "New > property" from the context menu.
Enter "preferenceCustomization" in the "name" field and "plugin_customization.ini" in the "value" field.
Select "File > Save" from the main menu.
You can then customize a lot of things simply by editing plugin_customization.ini file. For example, adding the following line
org.eclipse.ui/SHOW_TRADITIONAL_STYLE_TABS=false
will give you rounded tabs on your views and editors (similar to those that Eclipse IDE has) instead of the default ones.
You can find other constants that you can use in IWorkbenchPreferenceConstants javadoc.
Also, check out the Eclipse skins project, if you haven't already.
There is also the possibility to use CSS to change the look & feel of your app, but that is still in development and can be buggy
As for customizing the SWT controls themselves, the only way to do that (apart from small customizations such as changing the background colour of a control etc.) is by creating your own custom controls by extending Canvas or Composite, but you already know that. Keep in mind that the point of SWT is to use native controls, so if you desire the ability to completely customize your controls, perhaps using Swing would be a better option. However, if you're going to use Swing, it may be better to use another RCP entirely - namely, NetBeans RCP. I haven't tried it out yet, but I know that whereas Eclipse RCP uses SWT as a widget toolkit, NetBeans RCP relies on Swing, so that may save you from some headaches regarding compatibility problems and so on.
The new Eclipse 4 work contains plugins that allow the L&F to be customized using CSS. These plugins can be run in a 3.7 Eclipse environment. See Kai's blog for a presentation on the subject: http://www.toedter.com/blog/?p=477
The Eclipse 4 Styling Tutorial has a slide (p.66) on where to get an 3.7 based RCP example.

IntelliJ IDEA Scala plugin turning off

I'm using Scala plugin for IntelliJ IDEA and my project has a few thousands lines of source code.
Unfortunatelly, when I'm typing the code IDE freezes frequently(i.e. on code completion etc.). I tried to switch off inspection, but there was no effect.
Is there a way to turning off all plugin's features for using it just as syntax highlighter and build tool?
Try closing or reconfiguring all views that show detail at the level of individual class members (methods, vals and vars, basically). Specifically, that's the Structure view and the Project view when the "Show Members" option (in the "cogwheel" menu at the top right) is enabled. It is reported that maintaining these views slows the Scala plug-in appreciably.
You should also get the 9.0.4 EAP of IDEA (currently #95.538) and stay up-to-date with the Scala plug-in nightly releases. There sometimes bugs, but as a rule, quality is good and progress is sufficient to warrant doing this.
Edit:
The two views that do (or can) present information at the class member level of detail and which can slow the plug-in substantially are:
The Structure tool window (Window -> Tool Windows -> Structure / Alt+7)
The Project tool window (Window -> Tools Windows -> Project / Alt+1)
The Structure tool window always shows the class member level of detail, so if it's open, you're susceptible to this slow-down. The Project tool window only shows class members if you configure it to do so. The way this option is controlled is in the menu that is attached to the "cog wheel" or "gear" icon in that window's upper-right corner. The option to disable in that menu is "Show Members."
Try IDEA X EAP plugin version. It's much faster.