Eclipse is formatting javadoc tooltips very poorly on Ubuntu - eclipse

I've been using Eclipse on Windows a lot, and recently started using it on Ubuntu for work.
My problem is, that the Javadoc tool til mostly is unformatted, E.g. <code> tags, links, etc. have no effect. Only line chages by b, br or ,pre tags plus bold seems to be rendered. (pre don't change font.). See the first example below.
Are there any tweaks I can do, to get something like the second image?
Extra: A fix to the colors, would be also be awesome, but not as important.
Thanks.
What I see now:
What I'll like to see
Soruce: http://codeblessyou.com/wp-content/uploads/2011/07/2011-07-01_115631.jpg

Got the same problem with the rendering of HTML inside the tooltips. After some fiddling around I got the solution:
Install libwebkitgtk-1.0-0 from the official Ubuntu repositories. It'S used by eclipse (and most likely other GTK applications) to render the HTML, but neither pre-installed on Kubuntu nor listed as a dependency in the eclipse packages.

It turns out this is caused by two problems:
Eclipse needs webkitgtk
Eclipse color scheme is messed up on ubuntu.
The solution is thus two-fold.
Part 1: Install webkitgtk
Just run this command in the terminal
sudo apt-get -y install libwebkitgtk-1.0-0 libwebkitgtk-3.0-0
Thanks to Johannes H. for this bit
Part 2: Update the color scheme
First create a new configuration in your home directory.
gedit ~/.gtkrc-eclipse
And paste this content:
# Customs color settings for Eclipse.
# Load Eclipse as follows:
# GTK2_RC_FILES=~/.gtkrc-eclipse eclipse
#
# Sources:
# http://stackoverflow.com/a/24043778/722929
# http://askubuntu.com/a/131348/18533
# http://weblog.avp-ptr.de/20120728/how-to-fix-eclipse-colors-for-autocompletion-and-tooltips/
# Tooltip background color.
style "eclipse-tooltips" {
bg[NORMAL] = "#f5f5b5"
fg[NORMAL] = "#000000"
}
# Load settings.
widget "gtk-tooltip*" style "eclipse-tooltips"
Find the eclipse43.desktop file and edit it (If you are using another version of Eclipse than 4.3 update the commands accordingly):
locate eclipse43.desktop
# Use the location from above
sudo gedit /usr/share/applications/eclipse43.desktop
Find the line that starts with Exec=... and change it from something like this:
Exec=/usr/bin/eclipse43
to something like this
Exec=/bin/bash -c "GTK2_RC_FILES=~/.gtkrc-eclipse /usr/bin/eclipse43"
Voila, beautiful colors. (or as beautiful as Eclipse gets)

For the question of background color, the problem certainly comes from the GTK settings.
You should get a solution here https://askubuntu.com/questions/70599/how-to-change-tooltip-background-color-in-unity

For Eclipse Mars methods with GTK2 don't work anymore. You should only edit usr/share/themes/Ambiance/gtk-3.0/gtk-main.css section with name /*default color scheme */. Change #define-color tooltip_bg_color and #define-color tooltip_fg_color for your favorite color.

Related

wkhtmltopdf amazon linux won't encode emoji

I'm trying to generate a PDF via wkhtmltopdf in an Amazon Linux os, everything works fine, but when i try to use emoji on the HTML, the fonts break and the emoji is displayed as a black box.
Before deploying, i tried locally and it works, locally i have Ubuntu, so my guess is that i'm missing something (fonts?) in the production (the amazon linux instance) server. I tried to install Google Noto font but nothing happened. I'll attach 2 screens of the same HTML page, generated by the same command via wkhtmltopdf:
Local (Ubuntu):
Production (Amazon Linux):
As you can see, even the font below the broken emoji is not rendered as aspected, i'll add the command i use in both servers:
/my/path/to/wkhtmltopdf-amd64/bin/wkhtmltopdf-amd64 --lowquality 'file:///my/path/to/page-test-pdf.html' '/home/user/test.pdf'
Thanks for your time.
You can find a solution to a similar issue here basically twemoji.min.js replace the emoji with the corresponding image. Regarding the weird font spacing issue, you can use a monospaced font like roboto mono or something you like.
If you are running PHP 7.x, I have been having problems with the wkhtmltopdf extension within a dockerized image. We were trying to use font awesome and the text just did not render correctly. There were some compilation issues that caused this.
The problem was resolved when using the following binary https://github.com/madnight/docker-alpine-wkhtmltopdf
Hope this helps you forward.
EDIT: You will also have to have all fonts used installed as system fonts iirc otherwise wkhtmltopdf will refuse to work as it cannot find the font

How can I set up a GTK+ Project in Code::Blocks if gtk doesn't have the right subfolders?

I'm following this tutorial on how to set up a GTK+ project on Code::Blocks 16.01. The link in Step 1 to download GTK+ doesn't work, so I instead did a "Open in Desktop" from the Gtk Github repository. When doing Step 3 and giving the path for the location GTK, I get this error:
The path you entered seems valid, but the wizard can't locate the
include directory. The wizard cannot continue.
When I look back at the repository, I see there is no "include" or "lib" subfolder that is needed to make the project. What can I do to setup the project if neither of those folders exist? I realize the tutorial was written in 2013, so maybe it's outdated. There is a 2015 YouTube tutorial about setting this up, but it seems more complicated with setting up environment variables and changing Code::Blocks "Global Compiler Settings", so I was wondering if this 2013 tutorial still works.
That tutorial has a lot of outdated info in it. It recommends GTK+2, GTK+ is now at version 3, moving on to 4, and you'll probably want to follow GTK's methods for installing and setting up instead of orienting yourself around Code::Blocks.
My recommendation would be to follow the GTK+ download instructions and the instructions on how to set it up and maybe these instructions on how to start, then begin making it work with Code::Blocks (for which you probably need to look at this question).
Also, with how much work it takes to set up Code::Blocks for GTK+3 anyway, you may consider using a different IDE.

Sidebar Enhancement plugin installed but not working

system configuration: Sublime text3 build 3065 + Ubuntu 14.04
I want to add preview in Browser and found that Siderbar Enhancement (SBE) is best plugin to do that. Below are the steps i have done
Folder added and project and work space created in ST3
Install [SBE], following the instructions. First removed previous instance of SBE and then install via via Package Control
Restart the ST3.
But still no menu in folder context menu?
Is that any issue with plugin/system or am I missing something? Please help me how to do it?
Exactly as posted above. The context menu is added to the folders section. So most probably you are trying to see it when you click on open files.
Here is what you do:
Close side-bar
File > Open Folder > (Open any folder)
View > Show Side Bar
This worked for me.
Sorry for the trouble, I got the answer:
SideBarEnhancements was added in ignored packages (Don't know Why and How)
So just remove SideBarEnhancements from Preferences.sublime-settings
"ignored_packages":
[
"JSLint",
"CSS3",
"SublimeLinter",
"Vintage",
"SublimeLinter-php",
"SideBarEnhancements", << remove this
"JavaScript"
],
Now everything is fine

Colored output in netbeans console with ansicodes

I am trying to get a colored output in my Netbeans output window.
Ansi-Output in Linux and Windows console works perfectly fine. However not in the IDE.
Is there a way to make this work in Netbeans' output window?
According to this
https://netbeans.org/bugzilla/show_bug.cgi?id=214546
it should work, but it doesn't in my current Netbeans 8.0.1 installation (neither Linux nor Windows).
Any hints on how to do that?
I am using Netbeans 8.0.1 myself, on Windows 7. I just tried ANSI escape code, and it works. Example:
String greenBold = "\033[32;1m";
String reset = "\033[0m";
System.out.println("before" + greenBold + " green " + reset + "after");
There seems to be a problem when using Maven 3.5.x.
See:
https://netbeans.org/bugzilla/show_bug.cgi?id=270593
https://github.com/fusesource/jansi/issues/87
I tried NB 8.2 with the old Maven 3.3.9 first and it worked fine out of the box. The whole output remained as it had been but my application's own logs were colored as expected.
With Maven 3.5.2 and 3.5.4 the colors didn't work at all. So I had to set MAVEN_OPTS environment variable to "-Djansi.passthrough=true" (as suggested in the first link) and restart NetBeans. The problem is that now the whole output is colored differently and error stack traces don't contain links to code any more. So I'm switching back.
BTW. When using log4j2's %highlight{}, I also had to set disableAnsi="false" to get the desired effect:
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout pattern="%d{HH:mm:ss.SSS} %highlight{%-5level} [%t] %location --- %msg%n%throwable" disableAnsi="false" />
</Console>
I'm using NetBeans 12.3 and I had same problem. Problem is with bundled Maven (version 3.6.3).
When I changed to Maven which I installed on my system it works. Note that version of Maven installed on my system is the same as the bundled one - 3.6.3.
I have changed location of Maven in settings:
#YoungFrog solution was the best for me.
I spent all day to get NetBeans 14 working with hyperlinks and ANSI colors simultaneosly.
chmod -r /path/to/netbeans-14/netbeans/java/maven/lib/jansi*
did the job.
Actually, for me it was bad to change the default maven installation folder. In order to have all the output correctly working (hyperlinks in stack trace, ANSI colors in output, no NETBEANS-EXEC lines) I suggest you to use the one bundled with the specific NetBeans version you have installed.

Pylint in Sublime Text 2

So, I've been using Sublime for a while as a simple text editor, but I'm venturing into the land of plugins for work and I've run into an issue getting pylint to work. Specifically I have it installed and have the Sublime package manager working, but I'm not sure how to include paths in my sublime settings.
I haven't found very useful documentation on this point, but if you are willing to point me towards it that would be a perfectly acceptable answer. My basic issue is that currently every time I save a file, the following error message shows up:
"Please define the full path to 'lint.py' in the settings"
I understand this error message which is great, I just have no idea where the sublime settings are or what the standard format for defining a path is. Any help would be appreciated.
There are quite complete directions at the SublimeLinter GitHub page that should describe how to set everything up. Briefly, go to Preferences->Package Settings->SublimeLinter->Settings - Default to see where the different settings are defined. Then, open Preferences->Package Settings->SublimeLinter->Settings - User to change anything, as the main settings will be overwritten when the package is updated. Remember that settings files are in JSON format, so you'll need opening and closing curly brackets to enclose settings, and a comma between them:
{
"sublimelinter_delay": 30,
"sublimelinter_mark_style": "none"
}
I haven't gotten the error you have, are you sure you're using the regular SublimeLinter and not the new beta version? I just installed it fresh on my work machine (I've been using it for a while at home) and after restarting ST2 it's working like a charm with Python.
I had the same problem. I found it to be coming from the package "Pylinter". I removed Pylinter and added SublimeLinter, it covers more than python and is well used. I'm enjoying it quite a bit.
From your command line just run:
sudo easy_install pylint
sudo easy_install pep8
After that restart your sublime.
I encounter the same situation today. In my case, that is because I have not installed the 'pylint' in my system yet. It works fine after I installed the 'pylint' through pip.
Just for other people reference.