Eclipse Riena Tutorial - All In One

Tihomir R. Todorov

Version 1
Copyright © 2010 Tihomir R. Todorov
11.01.2010
Revision HistoryDateName
20101115_1624 - Chapter 3 refactoring ... 11.15.2010Tihomir R. Todorov
20101115_1607 - Chapter 4 refactoring ... 11.15.2010Tihomir R. Todorov
20101114_2239 - Important Message 11.14.2010Tihomir R. Todorov
20101111_0404 - Chapter "4 Building Riena Applications with Maven" added. 11.11.2010Tihomir R. Todorov
20101110_1637 - Riena Forum added. 11.10.2010Tihomir R. Todorov
20101110_1500 - Feedback Form (give your opinion or your question) added. 11.10.2010Tihomir R. Todorov
20101101_1800 - Title "3 Create your first Riena application from scratch" added.11.01.2010Tihomir R. Todorov
20101101_1449 - Article created. 11.01.2010Tihomir R. Todorov

Contents

1 Eclipse Riena
2 Installation Instruction
2.1 Windows 2000/XP/Vista/7
2.2 Linux-based Operating Systems (Debian, Ubuntu, ...)
3 Create your first Riena Plug-In from scratch
3.1 Create a Riena Plug-In
3.2 Setting up your Riena Plug-In
3.3 Start your Riena Plug-In
4 Building Riena Plug-In with Maven
5 Important Message
x Coming soon ...
Your Feedback / Your Question
Riena Forum
Riena Chat

1 Eclipse Riena

This tutorial describes how to develop Eclipse Riena applications. It is based on Eclipse 3.6.1 (Eclipse Helios).

2 Installation Instruction

2.1 Windows 2000/XP/Vista/7

2.2 Linux-based Operating Systems (Debian, Ubuntu, ...)

3 Create your first Riena Plug-In from scratch

The following gives a quick guide on how to create a simple Riena Plug-In from scrath.

3.1 Create a Riena Plug-In

In Eclipse select File->New->Project.... From the list select "Plug-In Project". Press "Next >".

Give your plugin the name "de.family_todorov.riena" and press "Next >".

Make the following settings. Press "Next >".

Do not use a template. Press "Finish".

You have created now a project with the following structure.

3.2 Setting up your Riena Plug-In

Open the file "MANIFEST.MF" by double-clicking on it and select the "Dependencies" tab. Remove the both required plug-ins "org.eclipse.ui" and "org.eclipse.core.runtime". Press the "Add..." button. Search for the plug-in "org.eclipse.riena.client". Select it and press "OK".

This exports all other dependencies which are required for building Riena applications.

Open the file "MANIFEST.MF" by double-clicking on it and select the "Extensions" tab. Press the "Add..." button.

Search for the extension "org.eclipse.core.runtime.applications". Select it and press "Finish".

Create a new run-application by right-clicking on your extension point and by selecting New->run.

Enter the class to "de.family_todorov.riena.applications.SWTAppFromScratch". Press the hyperlink "class*:" to create this class and select "org.eclipse.riena.navigation.ui.swt.application.SwtApplication" as Superclass. Press "Finish".



Implement the following coding.

    package de.family_todorov.riena.applications;
     
    import org.eclipse.riena.navigation.IApplicationNode;
    import org.eclipse.riena.navigation.ui.swt.application.SwtApplication;
     
    public class SWTAppFromScratch extends SwtApplication {
     
      @Override
      protected IApplicationNode createModel() {
        IApplicationNode applicationNode = super.createModel();
        applicationNode.setLabel("SWT Application from Scratch");
        return applicationNode;
      }
     
    }
      

3.3 Start your Riena Plug-In

There are two way to start your Riena application.

The result should look like the following:

Congratulations, you have created your first Eclipse Riena Plug-In.

4 Building Riena Plug-In with Maven

Today i am going to show how we can build a simple Riena Plug-In with Maven.

Maven is a great tool to managed your dependencies automatically. It's very helpful when we developed a real complex application. But Maven can more and more... For more information on how you can use Maven, see the Maven HOME page.

Start your "Eclipse for RCP and RAP Developers" and create a new general project using File->New->Project...->General->Project. Press "Next >".

Give your project the name "de.family_todorov.maven_projects" and press "Finish".

Open the Navigator using Window->Show View->Other...->General->Navigator.Press "OK".

In Navigator you should see the following tree structure:

Click on "de.family_todorov.maven_projects" project and create a new folder with the name "de.family_todorov.riena" using File->New->Folder. Press "Finish". From de.family_todorov.riena Into de.family_todorov.maven_projects/de.family_todorov.riena copy the following folders and files:

        -de.family_todorov.riena
              |-META-INF
              |    |-MANIFEST.MF
              |- src
              |    |-de
              |        |-family_todorov
              |            |-...
              |
              |-build.properties
              |-plugin.xml
      

After this you should delete the project de.family_todorov.riena from the hard disk.

Edit the file build.properties like the following:

    source.. = src/main/java/
    output.. = target/classes/
    bin.includes = META-INF/,\
                   .,\
                   plugin.xml
      

Create two directories main/java/ and test/java/ in src and move de/ into main/java/.

Create a file pom.xml into de.family_todorov.maven_projects and another file pom.xml into de.family_todorov.maven_projects/de.family_todorov.riena

Run "mvn install eclipse:eclipse" and see the magic tycho make all for us . This is possible thanks of the crazy tycho-maven-plugins provided by Tycho.

Very, very lot thanks to the developers of the Tycho project ...

NOTE:
And to know on how u can setting up maven in eclipse u can search in World Wide Web or wait for your next tutorial i'll have time to write some more tutorials soon.

5 Important Message

I had big problems when I wanted to create a Riena Product/Application with Eclipse Helios. There are plugins that can not be found by the p2 repository . So I think Eclipse Helios is not perfect to develop Riena Apps. I have also no time to bring Riena and Helios to work together so i have to return to Eclipse Galileo. I will continue to write the tutorial at this link here.

x Coming soon ...

I have simple demo that shows how to change the riena logo to create your own application with your own logo. I will try to make this available later.

Your Feedback / Your Question

Feedback Form - send your opinion, ask a question, ...

Riena Forum

Riena Forum - create your topic, take the answer to your question, ...

Riena Chat


Registrieren Zur Anmeldung Zur Anmeldung als Gast