Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "Riena/Examples"
< Riena
(New page: {{#eclipseproject:rt.riena}} {| | __TOC__ |} == Try the Riena Snippets == The Riena Snippets page contains a growing collection of self-contained code examples that s...) |
(→Try the Riena Snippets) |
||
Line 6: | Line 6: | ||
== Try the Riena Snippets == | == Try the Riena Snippets == | ||
− | The [[Riena_Snippets|Riena Snippets]] page contains a growing collection of self-contained code examples that show you how to use '''ridgets''' ("Riena widgets") and what you can do with them. | + | The [[Riena_Snippets|Riena Snippets]] page contains a growing collection of self-contained code examples that show you how to use '''ridgets''' ("Riena widgets") and what you can do with them. For a discussion what Ridgets are, look here http://wiki.eclipse.org/Riena/Custom_Ridgets |
+ | |||
+ | |||
+ | == Try the communication ping pong example == | ||
+ | # File -> Import -> Plug-in Development -> Plug-ins and Fragments -> Next. | ||
+ | # Select "Projects with source folders" unter Import As (since it's more fun with source code) -> Next. | ||
+ | # In the Plug-ins Listbox, select the 4 plugins <tt>*.communication.sample.pingpong.*</tt> and click Add and then Finish. | ||
+ | # In the Run Dialog you can select which of the two components to run (under 'OSGi Framework'). | ||
+ | #* '''Don't forget''' to press the 'Add required Bundles' button for both of them before you start them! | ||
+ | ## First, start the Riena Sample PingPong Server. | ||
+ | ##* The server starts at port 8080, make sure it's not taken. | ||
+ | ## Then start the Riena Sample PingPong Client. | ||
+ | # On success your client will print a message on the console: <tt>PingPong::Client:: [Pong] says = Thx. I got the ping!</tt> | ||
+ | # Switch to the server console; it should show a message like this: <tt>PingPong::Server:: [Ping] says = I ping you and you pong me</tt> | ||
+ | |||
+ | == Try the unit tests == | ||
+ | # Import the project <tt>org.eclipse.riena.tests</tt> from the target platform (same as above). | ||
+ | # There are classes like <tt>AllTests</tt> on various levels that you can run as Junit Plugin Tests. | ||
+ | # You can also run individual tests as JUnit Plugin Tests. | ||
+ | |||
+ | ; Currently there are more than 2000 tests | ||
+ | : They should all work. Some of them fail if you click or move the mouse while the tests are running (e.g. focus or UI tests). | ||
+ | ; Launch Error on starting tests | ||
+ | : This sometimes happens when you launch a test as JUnit Plugin Test for the first time. => You will need to modify the launch configuration for this class: | ||
+ | :# In the "Main" tab, change the field "Run an application" to "[No Application] - Headless Mode". | ||
+ | :# In the "Plug-ins" tab: | ||
+ | :## Launch with: choose "plug-ins selected below only". | ||
+ | :## "Deselect All" | ||
+ | :## Check/select the bundle containing the test you want to run. | ||
+ | :## "Add Required Plug-ins" | ||
+ | :# Apply. Run. | ||
+ | ; Classes ending with <tt>*ITest</tt> require a server. | ||
+ | : That's the Riena App Sample Server (explained in the next step). | ||
+ | |||
+ | == Install the Riena Sample App Server == | ||
+ | |||
+ | Simple server with customer search web service: | ||
+ | # Stop any previously started client or server. | ||
+ | # Import the projects <tt>org.eclipse.riena.sample.app.server</tt> and <tt>org.eclipse.riena.sample.app.common</tt> from the target platform. | ||
+ | # Start Riena App Server from the Run Dialog: | ||
+ | #* Don't forget to press the button "Add required bundles". | ||
+ | #* This server starts on port 8080, make sure that port is not taken. | ||
+ | # That should bring up a relativly simple app server with just the customer search web service. | ||
+ | |||
+ | Server with many more services: | ||
+ | # Stop the server again. | ||
+ | # Bring up the Run Dialog again, select Riena App Server and select the bundles <tt>org.eclipse.riena.security.services</tt> and <tt>org.eclipse.riena.security.simpleservices</tt> (both found in the target platform). | ||
+ | # Press "Add required bundles". | ||
+ | # Run it. | ||
+ | # Now you can see in the console a lot more (security-related) web services. | ||
+ | # Now you can also run the <tt>*ITests</tt> from the <tt>tests</tt> bundle, e.g. <tt>SessionServiceITest</tt>. | ||
+ | |||
+ | == Run the Riena Example Client == | ||
+ | # File -> Import -> Plug-in Development -> Plug-ins and Fragments -> Next. | ||
+ | # Select "Projects with source folders" unter 'Import As' (since it's more fun with source code) -> Next. | ||
+ | # In the Plug-ins Listbox, select the plugin <tt>org.eclipse.riena.example.client</tt>, click 'Add' and then 'Finish'. | ||
+ | # In the Run Dialog -> Eclipse Application, there are two entries "SWT ExampleApplication" and "SWT ExampleApplication (with alternative Lnf)". | ||
+ | # You can launch them both: | ||
+ | #* Don't forget to click on Add Required Plug-ins in the Plug-ins Tab. | ||
+ | #* Both launchers start the same application based on the same code, but using two distinct Riena Themes (different colors, fonts etc.). | ||
+ | # Play with it :-) | ||
+ | |||
+ | There is also a project <tt>org.eclipse.riena.sample.app.client.mail</tt> that you can import and start the same way. (The launcher is "Mail Sample (Riena UI)".) | ||
+ | |||
+ | == Run the Riena Demo == | ||
+ | # File -> Import -> Plug-in Development -> Plug-ins and Fragments -> Next. | ||
+ | # Select "Projects with source folders" unter 'Import As' (again: it's more fun with source code) -> Next. | ||
+ | # In the Plug-ins Listbox, select the 3 plugins <tt>org.eclipse.riena.demo.*</tt>, click 'Add' and then 'Finish'. | ||
+ | # Run the Riena Demo Server launcher (don't forget Add Required Plug-ins). | ||
+ | * Run the Riena Demo Client launcher (don't forget Add Required Plug-ins). | ||
+ | |||
+ | == Next Step == | ||
+ | |||
+ | Get started with the [[Riena/BaseConcepts|key concepts and features of Riena]]. |
Revision as of 09:31, 20 June 2011
{{#eclipseproject:rt.riena}}
Try the Riena Snippets
The Riena Snippets page contains a growing collection of self-contained code examples that show you how to use ridgets ("Riena widgets") and what you can do with them. For a discussion what Ridgets are, look here http://wiki.eclipse.org/Riena/Custom_Ridgets
Try the communication ping pong example
- File -> Import -> Plug-in Development -> Plug-ins and Fragments -> Next.
- Select "Projects with source folders" unter Import As (since it's more fun with source code) -> Next.
- In the Plug-ins Listbox, select the 4 plugins *.communication.sample.pingpong.* and click Add and then Finish.
- In the Run Dialog you can select which of the two components to run (under 'OSGi Framework').
- Don't forget to press the 'Add required Bundles' button for both of them before you start them!
- First, start the Riena Sample PingPong Server.
- The server starts at port 8080, make sure it's not taken.
- Then start the Riena Sample PingPong Client.
- On success your client will print a message on the console: PingPong::Client:: [Pong] says = Thx. I got the ping!
- Switch to the server console; it should show a message like this: PingPong::Server:: [Ping] says = I ping you and you pong me
Try the unit tests
- Import the project org.eclipse.riena.tests from the target platform (same as above).
- There are classes like AllTests on various levels that you can run as Junit Plugin Tests.
- You can also run individual tests as JUnit Plugin Tests.
- Currently there are more than 2000 tests
- They should all work. Some of them fail if you click or move the mouse while the tests are running (e.g. focus or UI tests).
- Launch Error on starting tests
- This sometimes happens when you launch a test as JUnit Plugin Test for the first time. => You will need to modify the launch configuration for this class:
- In the "Main" tab, change the field "Run an application" to "[No Application] - Headless Mode".
- In the "Plug-ins" tab:
- Launch with: choose "plug-ins selected below only".
- "Deselect All"
- Check/select the bundle containing the test you want to run.
- "Add Required Plug-ins"
- Apply. Run.
- Classes ending with *ITest require a server.
- That's the Riena App Sample Server (explained in the next step).
Install the Riena Sample App Server
Simple server with customer search web service:
- Stop any previously started client or server.
- Import the projects org.eclipse.riena.sample.app.server and org.eclipse.riena.sample.app.common from the target platform.
- Start Riena App Server from the Run Dialog:
- Don't forget to press the button "Add required bundles".
- This server starts on port 8080, make sure that port is not taken.
- That should bring up a relativly simple app server with just the customer search web service.
Server with many more services:
- Stop the server again.
- Bring up the Run Dialog again, select Riena App Server and select the bundles org.eclipse.riena.security.services and org.eclipse.riena.security.simpleservices (both found in the target platform).
- Press "Add required bundles".
- Run it.
- Now you can see in the console a lot more (security-related) web services.
- Now you can also run the *ITests from the tests bundle, e.g. SessionServiceITest.
Run the Riena Example Client
- File -> Import -> Plug-in Development -> Plug-ins and Fragments -> Next.
- Select "Projects with source folders" unter 'Import As' (since it's more fun with source code) -> Next.
- In the Plug-ins Listbox, select the plugin org.eclipse.riena.example.client, click 'Add' and then 'Finish'.
- In the Run Dialog -> Eclipse Application, there are two entries "SWT ExampleApplication" and "SWT ExampleApplication (with alternative Lnf)".
- You can launch them both:
- Don't forget to click on Add Required Plug-ins in the Plug-ins Tab.
- Both launchers start the same application based on the same code, but using two distinct Riena Themes (different colors, fonts etc.).
- Play with it :-)
There is also a project org.eclipse.riena.sample.app.client.mail that you can import and start the same way. (The launcher is "Mail Sample (Riena UI)".)
Run the Riena Demo
- File -> Import -> Plug-in Development -> Plug-ins and Fragments -> Next.
- Select "Projects with source folders" unter 'Import As' (again: it's more fun with source code) -> Next.
- In the Plug-ins Listbox, select the 3 plugins org.eclipse.riena.demo.*, click 'Add' and then 'Finish'.
- Run the Riena Demo Server launcher (don't forget Add Required Plug-ins).
- Run the Riena Demo Client launcher (don't forget Add Required Plug-ins).
Next Step
Get started with the key concepts and features of Riena.