Is there a color picker plugin for Eclipse? - eclipse

I'm using Eclipse Galileo PDT for my work. I also use it to edit my CSS files.
Is there a plugin that lets me pick a color (from a palette or even anywhere from the screen) and which returns the HEX value of that color into my CSS file?

Jspresso Colors 'n Fonts
Just select any java string literal and right click on it to open the contextual popup menu... then select Jspresso>Choose Color... or select Jspresso>Choose Font...
Supports also tooltip : fly over your string literal to display the current color or font... and activate hyperlink to open the editor popup !

Aptana Studio has really great support for CSS. CSS color picking is easy, you can grab a color from anywhere on the screen.
You can install Aptana as a plug into an existing Eclipse installation.
http://docs.aptana.com/docs/index.php/Plugging_Aptana_into_an_existing_Eclipse_configuration

I would recommend to use external software: http://www.colorschemer.com/online.html
You can integrate it into Eclipse.

I have used this plugin called colors in both Galymeade and I just dropped into Galileo.
http://www.eclipseplugincentral.com/Web_Links-index-req-viewlink-cid-1281.html you can copy the color code to/from clipboard or editor. Slider bar for coloring, color picker etc. I used it to edit css files on a recent project. Good Luck.

You might want to check out the second example at http://eclipsescript.org/#example-scripts.

I created a Groovy Monkey script that opens Eclipse's color picker. It was inspired by what fornwall pointed at (second example of Eclipse Script plugin). It's also able to recognize if current selection is a color so it can be selected it in the picker.
The script is on gist.github, instructions included.
Having a shortcut key for a script is not (yet?) possible in Groovy Monkey, but Crtl+Alt+M runs the last executed script.

A good plugin to consider is the Designerator Color Plugin from the Designerator project. It contributes a Colors view as explained in this blog post. No need to install the whole software, the color view is in a separate feature that can be installed by itself.
The Sampler plugin could also be of interest. However it does not show a color picker dialog where one can select a color, it only has the color picker tool for selecting a color from the screen.

There are a few plugins at the Eclipse plugins site that might meet your needs.
CSS Designer looks promising:
JointLogic CSS Designer is an Eclipse plugin that provides CSS authoring facilities like - CSS Styles view, CSS declaration designer with preview and web-oriented color picker. It integrates with Eclipse Web Tools Platform (WTP) to allow CSS authoring while editing CSS and HTML files.
Here's a screesnhot from the homepage:

Related

How to edit Javadoc popup link color in Eclipse

I am using the Dark theme in Eclipse Oxygen. When I hover over a class to view the Javadoc, the links are in blue and very hard to see
I have tried editing the hyperlink color in Preferences -> General -> Appearance -> Colors and Fonts -> Basic -> Hyperlink text color but that didn't work. Under the Java section in Colors and Fonts there is an entry to edit Javadoc background and Javadoc text color, but I see nothing for Javadoc hyperlink color or something like that. I could change the background color as a workaround but that breaks the dark theme and I'd rather not.
The short answer is you can't because it's system dependent.
Among the many other ongoing dark-theme bugs that need to be fixed, the particular bug you've found has been recently reported here as bug 517393. The target fix for this bug is in Eclipse Photon (4.8) Milestone 2.
I've figured out a workaround for this issue at least for Windows.
On Windows, Eclipse's html renderer follows Internet Explorer's option for changing color of webpage. So, if you do not use Internet Explorer or just do not mind such change of all webpage, let's go!
Please note that some desciption below may not be accurate since I do not use an English version of Windows.
Open IE, click GEAR icon at top right corner - choose Internet Optioin - click Color at the bottom - uncheck Use Windows Color - change the color of Visited and Unvisited, and the rest two to suit your need if you use dark theme in Eclipse. Apply the change.
Then click Accessibility (on the right of Font) - check Omit Color - Apply the change.
It's done.
For those who are like me still stuck with an older Eclipse IDE like 4.7.3 (without the fix of the bug mentioned in the first answer) and are using Windows:
The workaround in the previous answer does not work if you have Microsoft Edge installed instead of Internet Explorer. Reason: Microsoft Edge does not let you change the link color. There are Chrome Extension that you can install but this didn't work for me either.
Another solution could be to switch Windows to "High contrast mode". Someone even managed to change the link color for Eclipse. I accidently found this "temporary" workaround:
Start Eclipse
Activate Windows "High contrast mode"
Eclipse wants to be restarted. Say yes.
Deactivate Windows "High contrast mode"
Again, Eclipse wants to be restarted. Again, say yes.
Now the Javadoc popup looks like in "Light" theme!? So links are very easy to see now.
However, that's not a really comfortable workaround: it needs some time and you have to repeat these steps after every reboot. My "favorite workaround" for now, is to select the link text in the Javadoc popup with the mouse, so that the link text is displayed with a more readable background/foreground color combination.

In an eclipse plugin: How can I programmatically highlight lines of codes in the java editor?

I am trying to develop an eclipse plugin that does some documentation check on java code and highlights some lines of code in the editor.
To achieve my goal, I DON'T want to create a new editor in eclipse, I simply want to extend the default java editor to draw a line under (or highlight) the methods that do not satisfy some set of predetermined requirements.
Do I need to create a PresentationReconciler? If yes, how do I make the JDT or workbench use my reconciler.
I have never done plugin development and this is my first attempt.
Several starting points for you:
Annotations are an UI feature of JFace's text editor that allows you to visually mark some places in an open editor.
Markers are a Workbench feature, more high-level. They are generic "objects that may be associated with Workbench resources", and they can display in several places: in text editors (as annotations) or in the Problems view, for example.
Depending on what you want to do, you would plug in your plug-in into extension points related to either of those.
The Eclipse Java editor is located in the org.eclipse.jdt.internal.ui.javaeditor.JavaEditor package.
The "internal" in the package name means that the Eclipse development team can change how the Java editor works with new revisions.
Try this help page: Juno Help on syntax highlighting
At the end of the page, it describes how to dynamically add a PresentationReconciler, which is used for syntax highlighting. See if that fits the problem that you want to solve.
I assume you already have a plugin project.
In your plugin.xml, open the tab Extensions, click Add..., search for org.eclipse.ui.editors, then you should see a template named Editor, which will produce a simple xml editor to experiment and play with. Also, you will be able to see the needed structure to define a custom editor.
Hope this helps...
I don't know if you still have a need for this, but you are going to want to use Annotations to keep track of what parts of the editor you need to highlight.
For actually doing the graphical effect of highlighting, you could do syntax highlighting via a PresentationReconciler, but I have no experience with that.
We used a technique we borrowed from http://editbox.sourceforge.net/, replacing the background image of the editor Shell. Its open source, so check it out. (Our code might also help -- its at https://github.com/IDE4edu/EclipseEditorOverlay )

Is there anyway to edit the actual theme of the Eclipse IDE?

I'm not talking about the themes we can easily import and edit the textpad and code coloring with.
What I'm wondering is just like the firefox themes where the frame of the window and buttons can change colors. Is there a theme option for the actual editor not the text pad?
This might be what you're looking for
http://ikool.wordpress.com/2008/07/06/eclipse-skins-to-make-your-eclipse-ide-spicy/
http://www.eclipse.org/nebula/widgets/presentation_shelf/presentation_shelf.phpalthough it doesn't change everything.
If you are using Eclipse Juno (4.2), there is a plugin for this: https://github.com/jeeeyul/eclipse-themes (of course, the .css files in the application can also be edited manually)

Eclipse's Package explorer background color follows windows theme. I want to change the color without changing windows' theme. Possible?

Maybe a way to alter the colors locally (as in application dependant)?
A background color of eclipse is white, the same white of windows' active window background color. If I change the color on the theme, eclipse changes to the color.
I want to change this software's color without changing the whole theme (because then every program gets weird colors). Is this possible? I thought that maybe there was a way to apply different windows themes to different programs, or something.
I'm using windows XP, classic windows theme.
Install the "Eclipse 4 Chrome Theme" from
http://marketplace.eclipse.org/content/eclipse-4-chrome-theme
Then you can customize a lot of the Eclipse UI widgets.
But not what you want, at least not out of the box.
For that you should go to the CSS tab (in Eclipse 4 Chrome Theme) and paste this:
Tree, List, Table {
background-color: #202020;
color: #d0d0d0;
}
You can change almost anything, the problem is finding out what, and the fact that some things are bitmaps that you can't change (so if the bitmap is dark and you set a dark background you will "loose" the bitmap)
This list of widgets might help, http://download.eclipse.org/rt/rap/doc/1.5/help/html/reference/theming/index.html but they give you generic info on the widget names, not the Eclipse info (with IDs and all), so be careful :-)
== Very late addition ==
Everything you need in one place, including links to a custom dark theme: http://mihai-nita.net/2013/09/19/dark-eclipse/
Mac Screen Shot Example as of Sept 2013 (please be sure to restart Eclipse after changing file):
Just search "Theme" in the Eclipse Market Place. Install Moonrise. (Should be first option). Then go to the General, appearance, Click on appearance, change theme to moonrise, Then there you go.
Knowing the way the workbench is built, I'm sure your request is not possible on the Eclipse side. You can do this for the editors, because they are StyledText widgets, and you are exposed some preferences to customize these.
The other views are various widgets, some are Trees, some are Text, some are composed from various other widgets. All of them are created with the default constructor which just uses the Windows theme.
I don't know of a way to change every Eclipse window to your color scheme, but I can get you at least as far as changing some of the editing windows...
Open up "Window -> Preferences", then under "General | Editors | Text Editors" you will find a section that will allow you to set the "Appearance color options", Background color is one of those options.
PS: I'm using Eclipse 3.6 (Helios)
Sadly, this is not possible (which is crazy).
However, Aptana Studio (which is an Eclipse derivative) lets you theme the entire IDE.
I did some research and found that actualy it is posible to change all colors, but abit harder.
there are two methods that I found so far.
first since eclipse is using OS themes, you can change your OS background settings, like folder background etc., or just change the whole theme if your using windows, but the downside is that all windowses will be same color, in linux and mac os it is also posible, but in different way, I did read it somewhere, but can't remember where :)
second creating a specific theme for eclipse, for example http://rogerdudler.github.io/eclipse-ui-themes/ or any other theme like google chrome etc.
Install the theme from here as per the instruction in the github:
https:// github.com/guari/eclipse-ui-theme
If you don't like the editor color theme, there are bunch of 'em here
http://eclipsecolorthemes.org/
Combination of both just works like charm for me!

Eclipse syntax colors for HTML files

I'm using eclipse for a few months, I realy like gvim better but eclipse makes my life easier with pydev and phpeclipse. Everything is pretty nice, I have a black fluxbox and black GTK themes, I've changed the syntax colors for py and php and now everything is dark background, light foreground (including the eclipse menu/borders/etc), very nice.
But.. I can't find a way to change the syntax colors for html files. It's really bad, occasionally I will want to open a html file in eclipse and standard text is black (same as my background). I've changed every background-related color setting I could find but the html editor's colors don't change. Am I missing something? Does anyone know how to change this?
You need to install the WTP plugin to add all that HTML/JS/CSS support.
I would also recommend using the PDT plugin for all your PHP needs.
After installing these plugins.. you should be able to access their properties in Window>Preferences...
Hope this helps :)
For others who may not be as familiar with the Preferences for Eclipse you can find most of these color settings (once you have the plugins mentioned here installed) at:
Preferences > Text editors > Appearance color options
and
Preferences > Appearance > Colors and Fonts
Don't forget to use the search features built into the Eclipse preference panes to find the exact element you are trying to modify.