You might have noticed that a lot of code in SWT/GTK has that odd /*int*/ comment after a long declaration.
long /*int*/ list
I turns out the comment is needed for backwards 32 bit support.
So in general you should put it in parameter declarations and in variable declarations:
Control  _getChildren (long /*int*/ parentHandle)
long /*int*/ list = OS.gtk_container_get_children (parentHandle);
This is especially important in OS.java which is used to generate C code.
If you are a GTK/SWT developer and want to be involved in SWT Triage,
Then you should read:
It is also useful to subscribe to the swt-platform email in bugzilla.
This way you’ll get emails for new SWT bugs and comment update on un-assigned bugs.
To do this, go to bugzilla, -> Preferences -> Email preferences
-> “Add users to my watch list” , add: firstname.lastname@example.org
The only trouble is that you’ll get emails for all platforms (Windows/Mac/Linux) and you’ll have to create some filters for sorting things out. But in general I found that it’s good to be ‘aware’ of the issues that happen on windows/mac, as those sometimes occur on Linux also, or a bug labeled as ‘windows’ often impacts linux swt also.
As Eclipse developers, when troubleshooting Eclipse, it is sometimes important to figure out how parts of a U.I are constructed.
It’s that time of the year. We are all super busy, so this is a super short upgrade guide.
Assuming that you use Fedora as a workstation (as oppose to server) the below is for you:
When troubleshooting Eclipse bugs, I sometimes ask if you are running eclipse on gtk2 or gtk3.
Usually I can tell visually if Eclipse is running on Gtk2 or Gtk3, but this changes depending on your system theme.
In the about section
As Alexander Kurtakov pointed out and described in Lar’s article ,
Help -> About -> Installation Details -> Configuration Tab.
Look for something like:
It’s usually somewhere near line 84 ish. But you can copy the text and search for it in your text editor.
Note, if this line is missing altogether, you’re (very most likely) running Eclipse on Gtk2.
See what version is on your system
You can find out which version of gtk is installed on your system by running pkg-config (you might need to install it first). This gives you an indication of which version of gtk eclipse might be using.
pkg-config --modversion gtk+-3.0
Force Eclipse to use either gtk2 / gtk3
You can force Eclipse to use a certain version of gtk:
Under gtk3, the entry in the about section should be present like: org.eclipse.swt.internal.gtk.version=3.14.12
This is actually by far the most visited blog entry on my blog (20k+ views)
I reference this page quite often, I made a short/memorable url for it: http://bit.ly/gtk2orgtk3
When doing SWT Development, if you submit code with the wrong style, you might get some code-comments from other contributors advising you to fix your style.
Luckily there is an Eclipse-SWT-formatted profile that one can use or one can fix them with some Regex.
Note: I will update this article as I find out more about SWT style.
This article explains how to install a package to add a right-click menu to open the terminal from Nautilus.