PMD error coloring on eclipse project level? - pmd

Is there any way to color the errors differently in the eclipse PMD plugin?
I know the way via workspace settings, but I need it on project level so I can commit the changes for the full team.
Any hints?

You can't set the colour on the project level so you can share it with your team. I created eclipse-pmd and thought about this when I added the preferences for styling your PMD violations. I came to the conclusion that style is a personal preference as different people can have very different requirements. Some people prefer a dark theme over a light theme with respective colours for their annotations. Some people need a high contrast theme or are colour blind and find it difficult to distinguish certain colours. For all of those reasons I implemented it the way it is now.
But I'm open to different requirements. So if you have a good reason that also takes the issues I mentioned into account, then go ahead and open a new feature request on Github. I'd be very interested to hear what kind of problem you want to solve with this feature.

Related

Sharing an Eclipse Perspective

I have created an Eclipse Python perspective to suit what I need, and have deleted most of the menus and toolbar icons. I want to keep it this way. However, the goal of this perspective is to be used by others, so I want to share it as it is exactly.
I've tried multiple methods, File>Export>General>Preferences, using the Yatta Profiles tool, and others, none of it worked (Yatta Profiles works fine, using in my own computer, but on another computer, all the default menus are back).
Does anyone have a solution for this, where one can share an Eclipse perspective EXACTLY as it is?
The solution to this is to create an Eclipse plug-in providing that Perspective (via https://help.eclipse.org/2020-12/topic/org.eclipse.platform.doc.isv/reference/extension-points/org_eclipse_ui_perspectives.html?cp=2_1_1_196), or convince the developers of the Python plug-in you're using to provide it for you.

Filter entries in the Eclipse Variables View

Is there any built-in way (or plug-in) allowing for searching through the whole variable tree without manually expanding nodes?
I can't understand why isn't it done by default, just as I can't understand, why isn't search bar built into Variables view (browser style) and this unhandy, inconvenient dialog is opened instead. It makes my work, which is mainly debugging complex applications, a nightmare.
The Eclipse version is Luna, if it matters.
The watch expression feature is not what I want because it just doesn't work in this case, tried to fix it but none of the common ways to do that help me.
Such a feature has been requested earlier here: https://bugs.eclipse.org/bugs/show_bug.cgi?id=170396
You may want to reopen this bug to state your interest in this enhancement. And if you have experience in developing Eclipse IDE plug-ins, I am sure the maintainers would be happy to review a patch.
I usually use Alt+Shift+Right/Alt+Shift+Left and Ctrl+Shift+I to select and inspect variables and expressions, but this certainly depends on personal preferences.

How to disable this Netbeans highlighting?

I'm not sure if StackOverflow is the right site for this question but i don't think I'd get better help from other than developers here.
Basically Netbeans keeps highlighting scripting in ERB or HTML files. I tried to disable many things in tools -> options -> fonts & colors. But none worked.
Any one knows how to get rid of that? It appears on all themes.
Old Queston, but still relevant, (and in other IDEs as well). For Netbeans v8, you will find most of the old links / themes unusable. But there is a way.
Go to Tools -> Plugins and search 'theme' and you will get "Dark Look And Feel Themes"
The default that came up after a reboot did NOT have the ugly highlighting on scripts, and it is easy on the eyes (unlike the default theme), plus it has good color-highlighting for "html.erb" files. The controller code could use some work on the highlighting, but I can live with it.
And before anyone points it out - yes, official support was dropped by NB for Ruby. The community, however, has done a great job via plugins keeping the Ruby/Rails support working.

Marker Support Extension Point enabled only for a concrete Perspective

We have developed our own perspective, and we want to limit all shown markers so they fit our own Project Explorer content provider, which contains a subset of all project files and folders.
We have already added an org.eclipse.ui.ide.markerSupport to plugin extension points, but we found this markers content configuration applies to all perspectives.
Is there a way to enable this configuration only for our perspective?
As a first aproximation, we have added our content provider to PerspectiveListeners, so we will be able to do something (already don't know what) when our perspective changes or activates. This may not be the correct or simplest way to start, so any help would be very apreciated.
Thanks in advance!
The markers are not tied with perspectives. So all the markers will be available in all the perspectives. There are no plans to do that, so you are on your own.

Is there a simple, consistent way to change the color scheme of Eclipse editors?

I'm going crazy trying to get all of the editors to look similarly. It looks like there's a different color editor option for each file type/code type, which means it takes FOREVER to customize the view.
Add to that: each code/file type color option seems to honor the default set in the generic options only if it feels like it (seems buggy).
I'm currently using Eclipse 3.4.1 (Ganymede).
Is there a version that is less buggy or is there a more consistent way to change the text colors?
Barring that, has anyone gotten a Zenburn-like color scheme in Eclipse that would be willing to share?
I'm working on an Eclipse plugin for this:
http://marketplace.eclipse.org/content/eclipse-color-theme
It's by no means complete, but it does work quite well already.
It sounds like there isn't currently a good way of doing this because of the way Eclipse was designed: there's not a good, flexible, inheritable syntax highlight framework to bring consistency to everything.
While you can export & import preferences as Wijnand Warren's answer states, and that does work... kind of... actually going in and editing the preference files to make sure that you're only sharing color information is probably a huge pain in the butt, so not simple. Also, that still leaves the problem of finding someone who has put in the effort & time to create the syntax coloring in the first place.
Also, every time you add a new type of structured text editor (new language per year anyone?), you'll have to go back into settings & edit the highlighting for that language as well.
I have no experience developing for the Eclipse platform, but if someone with more experience would be willing to point me in the right direction (documentation, explanation of how things fit together, etc.), please let me know.
I've searched high and low for an answer to the same question and have all but given up. It is not easy to change the color scheme because, as you said, each language has its own options buried deep in the Configuration tree.
I've read a little about why 'themes' aren't available, and it has something to do with the complexity of Eclipse's XML storage technique. I'm sorry that I can't provide a real solid answer, but I just wanted to let you know that you're not alone in your frustrations.
I've been looking for this too and after a bit of research found a workable solution.
This is based on the FDT editor for Eclipse, but I'm sure you could apply the same logic to other editors.
My blog post: Howto create a color-scheme for FDT
Hope this helps!
Install the color theme plugin from http://eclipse-color-theme.github.com/update. It already consists of some good themes that you can use.
Then just go to menu Window → Preferences → General → Appearance → color theme to apply the themes.
You can download more themes from http://www.eclipsecolorthemes.org.