Blog

Eclipse 4 Lifecycle Hooks: Login Dialog with CSS Styling

11

Currently I am adding a section about the e4 application platform life cycle management to my e4 tutorial. One good way for hooking in the application’s life cycle are the life cycle hooks. You just have to add a new property with name “lifeCycleURI” and a value like “bundleclass://<bundle id>/<class>” to your product extension and use some life cycle annotations in the specified class.

You find a good introduction and examples for life cycle hooks from Lars Vogel and Marc Teufel. While the basic mechanism is straight forward, there are a few challenges left. One of them is how to provide a login dialog with css styling. Why is this a challenge? Because all the existing life cycle annotations (like @PostContextCreate) that are invoked before the application is started, are processed before the presentation engine is initialized. But the solution is pretty simple: Initialize a presentation engine with your own data.

First you have to provide the css file and the org.eclipse.e4.ui.css.swt.theme extension in your own login project, e.g.

<plugin>
   <extension
         point="org.eclipse.e4.ui.css.swt.theme">
      <theme
            basestylesheeturi="css/login.css"
            id="org.eclipse.e4.tutorial.contacts.themes.login"
            label="Login Theme">
      </theme>
   </extension>
</plugin>

Then, in your own Java code, you have to initialize the engine and style the shell you use for the login dialog. For doing that, get the IEclipseContext using dependency injection, and manually set the cssTheme and cssURI keys before invoking the static method PartRenderingEngine.initializeStyling(), e.g.

public class Login {
   @PostContextCreate
   public void login(IEclipseContext context) {
      final Shell shell = new Shell(SWT.INHERIT_NONE);

      final LoginDialog dialog = new LoginDialog(shell);
      dialog.create();

      String cssTheme = "org.eclipse.e4.tutorial.contacts.themes.login";
      context.set(E4Application.THEME_ID, cssTheme);
      String cssURI = "css/login.css";
      context.set(E4Workbench.CSS_URI_ARG, cssURI);

      PartRenderingEngine.initializeStyling(shell.getDisplay(), context);

      if (dialog.open() != Window.OK) {
         System.exit(0);
      }
   }
}

With this little trick, you can provide a private styling with your own css file just for the login dialog. Here are 2 screen shots of the login dialog example for my e4 tutorial with different css styling:

CU at Democamp Munich 2012!

Kai

You find me on Twitter and Google+.
Next Eclipse 4 Application Platform trainings

Eclipse Demo Camp @ Siemens Sold Out!

0

It’s more than a month left but all of the available 200 tickets for the Siemens AG / EclipseSource Eclipse Demo Camp on June 21 in Munich are already taken. To get the most possible amount of people a chance to attend,

  • I will send an email to all registered attendees and kindly ask them to re-check, if they really plan to come. If someone cannot attend the demo camp anymore, she/he could let me know and give more people the chance to attend.
  • I will try to get more seats (It mostly depends on the room).

So, if you would like to come and don’t have a ticket yet, there is still a chance that you would be able to register in the near future. Please stay tuned and check http://democampmunich2012.eventbrite.com/ often.

And, if you read this, have already registered but cannot attend the demo camp for any reason, please let me know asap.

CU there…

Kai

Juno Eclipse Demo Camp 2012 @ Siemens in Munich (Update 1)

0

Just one week after the first announcement, more than 100 of the available 200 tickets for the Siemens/EclipseSource Eclipse Demo Camp on June 21 in Munich are already taken. So, don’t wait too long to register. The agenda, packed with great sessions and demos, is final now. You find more information and the registration at

http://democampmunich2012.eventbrite.com/

CU there…

Kai

Juno Eclipse Demo Camp 2012 @ Siemens in Munich

1

 

I am happy to announce the Juno Eclipse Demo Camp 2012 @ Siemens in Munich, Germany. Again, excellent speakers with interesting demos/talks will make this demo camp an Eclipse fest! Last year we had 170 attendees, this is the mark to top this year. The latest event details and agenda you always find at the Wiki page and the registration page.

Location
Location: Siemens AG, Forum 1, Otto-Hahn-Ring 6, 81739 Munich, Germany
PDF with directions: Siemens Munich MCH_P campus
Google Maps: Siemens Munich MCH_P campus

Date and Time
Thursday, June 21, 2012 from 5:00 PM – 11:00 PM (GMT+0100)

Agenda (Under construction, may change, please stay tuned…)

  • 05:00pm – 05:30pm Meet and Greet
  • 05:30pm – 05:40pm Welcome/Intro
    Ralph Müller (Eclipse Foundation) + Kai Tödter (Siemens Corporate Technology)
  • 05:40pm – 06:00pm JavaFX/Swing Renderers for the Eclipse 4 Application Platform,
    Kai Tödter (Siemens Corporate Technology)
  • 06:00pm – 06:20pm e(fx)clipse: JavaFX for Eclipse
    Tom Schindl (BestSolution.at)
  • 06:20pm – 06:50pm Xtext and Xtend: What’s Hot and New
    Sebastian Zarnekow (itemis)
  • 06:50pm – 07:10pm BREAK (with beer, soft drinks, coffee & snacks)
  • 07:10pm – 07:30pm Applause 2 (Working title, might change)
    Peter Friese (Zühlke)
  • 07:30pm – 07:50pm Git + Mylyn (Working title, might change)
    Benjamin Muskalla (Tasktop)
  • 07:50pm – 08:10pm EMFstore – Released
    Maximilian Kögel (EclipseSource)
  • 08:10pm – 08:30pm FastFix – Monitoring Control for Remote Software Maintenance
    Tobias Röhm (TU München)
  • 08:30pm – 08:50pm BREAK (with beer, soft drinks, coffee & snacks)
  • 08:50pm – 09:10pm No Black Magic: Push info to the Browser with redVoodo
    Ekkehard “Ekke” Gentz (Freelancer)
  • 09:10pm – 09:30pm Writing Native Mobile Apps with RAP
    Ralf Sternberg (EclipseSource)
  • 09:30pm – 09:50pm Jubula (Working Title, might change)
    Speaker from Bredex
  • 09:50pm – 10:10pm EMF Client Platform – Revolutions
    Jonas Helming (EclipseSource) — Probably with Kinect Fun!
  • 10.10pm – 12:00pm Networking (with beer, soft drinks and warm buffet)

Registration
At democampmunich2012.eventbrite.com you find the current list of attendees and you can register. Registration is free: beer, soft drinks and (warm) buffet is sponsored by Siemens AG and EclipseSource! Let’s make this demo camp great!

See you all in Munich…

Kai

You find me on Twitter and Google+.

OSGi Vaadin Demo now on GitHub

0

After EclipseCon I made some changes in my dynamic OSGI Vaadin demo, and I decided to put it on GitHub. You find it here: https://github.com/toedter/osgi-vaadin-demo

I added a progress indicator with polling (Thx Jani Laakso). Now starting and stopping bundles on the server will automatically be reflected in the client. I will talk about the demo at the JAX conference next week.

CU at JAX 2012!

Kai

You find me on Twitter and Google+.
Next Eclipse RCP 3.x/4.x trainings in Munich

EclipseCon: Here I come (Update)

0

EclipseCon is one of my favorite conferences. Tomorrow morning I’ll take a flight from Munich to Dulles, US. I’ll plan to be at the EclipseCon location around 5:00 pm.
I am going to give 2 presentations:

  • Monday: Eclipse 4 Application Platform Tutorial. Here you will learn all the important fundamentals of the Eclipse 4 Application Platform. After the tutorial you will be able to start with Eclipse 4 based rich client development. Update: Got already 121 registrations 🙂
  • Wednesday: Dynamic RIAs with OSGi and Vaadin. Here you will learn how to create dynamic and modular UIs for Web Applications that use server-side OSGi and Vaadin.

I am also planning to have a BOF together with Tom Schindl (and hopefully other e4 committers) to discuss the future of the Eclipse Application Platform regarding rendering engines for JavaFX (and Swing?).

If anyone wants to visit Washington DC on Sunday, please let me know.

I am looking forward to meeting you at EclipseCon!

 

Kai

You find me on Twitter and Google+.
Next Eclipse RCP 3.x/4.x trainings in Munich

Eclipse 4 got some UI Love

12

I am a UI guy, meaning UI is very important to me. Both in terms of usability as well as in terms of design. I have to admit that I am not the biggest fan of the new Eclipse 4 design, but I want to point out that I do see improvements from 4.2 M5 to 4.2 M6. Firstly, the splash screen. I did not like the original Eclipse 4 splash screen at all (no offense). The current splash screen looks much better imho. My personal color reception has some small issues with the (azure blue) background in conjunction with the (more purple) Eclipse logo but overall I like the new splash screen.

Here is the old 4.2 M5 splash screen:

and here is the new 4.2 M6 splash screen:

You might think: Who cares about the splash screen? Actually many people do care because that’s the first thing you see when you launch a new software product. I you like it and find it great, then it is more likely that you also like the actual software.

Another improvement is the enabling and disabling of some icons. The picture below shows 4.2 M5. The disabled save and save-all icons are rendered monochrome.

In 4.2 M6 it looks much better:

You might also notice that now the Package Explorer tab got a gradient background. These are little things but In my point of view they sum up. And all these little things make the overall experience more delightful and give the product a more professional touch.

My last question  is: Do you think I am a nitpicker or do you agree with me?

CU at EclipseCon!

Kai

You find me on Twitter and Google+.
Next Eclipse RCP 3.x/4.x trainings in Munich

Eclipse 4 Talk for Java User Group Munich

2

Today (March 12th 2012) I am going to give a talk for the Java User Group Munich.

Title: “Das Eclipse 4.x Rendering Konzept: Trennung von Application Model und UI Toolkit
Language: German
When: Monday, March 12th, 7:00pm
Where: mgm technology partners – Frankfurter Ring 105a – D-80807 München – 3. OG
More info: http://jugm.de/index.htm

CU there!

Kai

You find me on Twitter and Google+.
Next Eclipse RCP 3.x/4.x trainings in Munich

JavaFX 2.1 Beta: Improved Font Rendering

14

In the current JavaFX 2.1 Beta preview (Build 12), the font rendering on LCD screens improved a lot due to sub-pixel font anti-aliasing. Here are 2 screen shots from my Eclipse 4 JavaFX rendering demo:

JavaFX 2.0.2 (without sub-pixel font anti-aliasing):

JavaFX 2.1 Beta Build 12 (with sub-pixel font anti-aliasing):

I really like this improvement!

Kai

You find me on Twitter and Google+.
Next Eclipse RCP 3.x/4.x trainings in Munich

Eclipse 4.x talk for JUG Ostfalen

0

If you are interested in the Eclipse 4.x Application Platform and happen to live close to Braunschweig (Germany), join my talk for the JUG-Ostfalen:

Was ist neu bei der Eclipse Rich Client Platform 4.x?

When: Friday, January 20th, 7:00 pm
Where: CKC Braunschweig, Am Alten Bahnhof 13, 38122 Braunschweig
Language: German

After my session there is another talk: “Agile Review” (Eclipse Plugin) by
Malte Brunnlieb, Philipp Diebold, Thilo Rauch und Peter Reuter.

The event is free: Registration and info is here: http://eclipse4.eventbrite.com/

Would be great to see you there!

Kai

You find me on Twitter and Google+.
Next Eclipse RCP 3.x/4.x trainings in Munich

Page 3 of 12«12345»10...Last »