SIDEBAR
»
S
I
D
E
B
A
R
«
Source editor worth $70
Nov 14th, 2013 by Eugene Ostroukhov

I’ve been a devoted Eclipse user for more then a decade (with most of that time spent developing applications based on Eclipse) but I’ve noticed that I am becoming less and less inclined to spend my time trying to convince Eclipse to actually edit my files. I ended up using  Eclipse only for Java – Xcode is great C++/C (libclang-powered editor with C++11 support) with VIM was standard for all other files. For the last couple months I’ve been slowly migrating to Sublime – now I reached the point when I even consider using it for Java files.

This is just a “disgruntled veteran Eclipse user” view on why it is worth it to pay for your coding editor these days.

It can open files! And folders…

Cmd+S, Cmd+N and Cmd+O are the first shortcuts everybody learns. Eclipse is unique in that it breaks this convention. “Open File” is an afterthought (doesn’t even have a key shortcut), with many plugins unable to work with those files – even if your editor manages not to show an error dialog (or dump an exception in log) – some features still are not available.

Sublime not just behaves as expected – it goes one step further. I can “open” any folder – showing that folder in the Sublime “Project Explorer”-like pane. What is truly surprising is that Sublime manages to deliver many Eclipse  killer features – including “Open Resource…” and “Goto Symbol in Project” (think JDT/CDT “Find Type” and “Find Function”). No metadata files is created in those folders, no indexer is ran. Right now my “workspace” has a mix of Bootstrap-based HTML application with a Python server-side – and without any plugins I can immediately focus on a CSS rule or on a Python function. I’ve also shown to my colleagues that I can open mid-sized C projects and be able to open random function within seconds. No setup, no long-running background jobs.

It opens shell scripts, .ini files without spinning up Xcode or any other heavy “external editor”.

Editor is the same

Cmd+Shift+R will go to symbol in any file in any language (that I tried) – in Eclipse, CDT and JDT installed in the same workbench have confusing separate realms with Cmd+Shift+T been bound to different dialogs depending on active editor. Cmd+Shift+R and Cmd+Shift+A are yet other parallel realms, adding to the confusion.

Sublime can expand selection to enclosing scope in Dita XML, Python or in JavaScript. Sublime actually even unifies Eclipse-like “Goto line” and “Quick outline” popups into “Goto Everything” – I’ve been wondering for years why Eclipse uses separate pop-ups for that.

One prominent Sublime feature is multiple cursors. Curiously, this feature is really familiar to JDT and CDT users – you can see multiple cursors when you rename variables. In Sublime multiple cursors can be used to select search results (quite similar to Eclipse rename refactoring) or to apply edits to several separate locations at once.

No mouse

I spend most my time in Eclipse having source editor maximized (I also used to hide toolbar – until I started using Eclipse Kepler where Cmd+3 makes toolbar visible no matter what).

In Sublime I can split the window (not the editor ;) ) using just the keyboard. I can move editors between stacks or focus on stacks without reaching the mouse. Switching between editor predictably opens a tab to left/right – instead of randomly popping from the recent editors stack.

Niceties

There is no preferences UI as such in Sublime – keybindings and settings are stored in JSON files that are editable in the text editor.

Plenty of plugins, easy discovery. “Cmd+Shift+P”, “Install<Return>”, type filter string. Plugin is found and installed even before “Marketplace client” would open.

Files can be opened from the command-line. Reliably. Even on Mac.

Missing parts?

Sublime does not integrate SCM support. Well, there are some plugins – but I haven’t figured them out yet, mostly because I am command-line Git and Perforce user (as not all my files are in the workspace) – the only thing I miss is Perforce checkout from the editor.

No debugger UI. Surprisingly, no biggie – JavaScript users are using browser anyways, C* users get to keep their GDB/LLDB primed.

No way to run shell command from within the editor. As in VIM.

Next generation

IntelliJ and Eclipse were revolutionary tools – they eschewed RAD features and visual designers that were a cornerstone of the IDE experience and focused on the core programming experience instead – providing ultimate source editor, making refactoring mainstream. Sublime seems to do the same trick – only this time it is Eclipse that is slow and outdated. Sublime does not force me to manage workspaces (in couple weeks I will have to start working in a different branch (in Perforce it is a different folder) – ain’t it fun, with my 20+ projects?), flip perspectives (the first thing I show to QA or new team members – “If you don’t understand what’s going on on the screen, do “Window > Reset perspective”) or wait till my cancel button click is honored. Again, as 10 years ago, I’m enjoying my editor instead of wrestling with it…

Indeed, times, they are a-changing…

CSS Validator sources were published
Nov 2nd, 2010 by Eugene Ostroukhov

CSS Validator sources were published as a new project at EclipseLabs.

This project adds a W3C CSS Validator as a WTP build-time validator (i.e. the validation markers will be shown only after the CSS file is saved in the editor). It should be compatible with any WTP-based IDE though I only tested it with vanilla “Eclipse for JS developers”.

Qt is not only styling…
Sep 22nd, 2010 by Eugene Ostroukhov

…but is also a set of cross-platform widgets.

This is my shot at embedding WebKit into Eclipse SWT:

QWebView embedded in SWT/Win32

QWebView embedded in SWT/Win32

QWebView embedded in SWT/Cocoa32

QWebView embedded in SWT/Cocoa32

This effort is quite different from SWT/Qt as it does not intend to provide whole SWT on top of Qt – my goal is to compliment “native” SWTs with Qt widgets. I believe Qt is a great complement for SWT as:

  1. It has uniform cross-platform API – meaning developers can provide consistent functionality on all major desktop platforms.
  2. It has native look-and-feel – Qt relies on native APIs. My tests had shown that embedding Qt into SWT is more stable then embedding Swing into SWT.
  3. Qt provide a lot of well-tested ready to embed components – QWebView integration is my primary focus right now. It was fairly straightforward to embed full-fledged WebKit browser into Eclipse workbench. I researched other WebKit “bindings” like the Cocoa’s WebKit and it looks like Qt provides most comprehensive APIs of them all.

This project will become an open-source project on one of the OSS hosting sites. I see following issues with the project:

  1. It will be LGPL project. Qt is LGPL and my code statically compiles to some other LGPLed Qt code. There isn’t really a lot of options. LGPL means that no Eclipse Foundation project will ever be able to leverage it. Note: WebCore and JavaScriptCore (they are primary WebKit components) are both released under LGPL meaning that any WebKit binary will always have LGPL code.
  2. Huge size and distribution problems. I have little C++ and Qt experience so I was unable to statically link JNI DLL to Qt libraries. Qt dynamic libraries introduce both distribution and size concerns.

Current state and future directions:

  1. The code will be published after I expose more QWebView APIs to SWT clients and will improve the build configuration.
  2. I plan to focus on QWebKit functionality like QWebInspector and QWebPage
  3. Research other Qt components that are attractive to SWT crowd (native combo with images)?

Help wanted:

  1. Build configuration to produce binaries as small as possible.
  2. SWT/GTK port – I am completely unfamiliar with GTK development so I haven’t even started looking in this direction. It shouldn’t be hard – both Win32-specific and Cocoa-specific parts are a few dozen lines long.
»  Substance:WordPress   »  Style:Ahren Ahimsa