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 "Scout/Tutorial/3.7/Minicrm/New Eclipse Scout Project"
m |
|||
(18 intermediate revisions by 7 users not shown) | |||
Line 1: | Line 1: | ||
− | {{ScoutPage|cat=Tutorial}} | + | {{ScoutPage|cat=Tutorial 3.7}} |
− | {{note|Scout Tutorial|This page belongs to the {{ | + | {{note|Scout Tutorial|This page belongs to the [[{{BASEPAGENAME}}_Step-by-Step|Minicrm Step-by-Step Tutorial]]. It explains how to setup a new Eclipse Scout project. You need to {{ScoutLink|HowTo|Install Scout SDK|Download and Install Scout SDK}} in order to continue.}} |
We need to create '''a new Scout Project''' and '''switch to the Scout Perspective'''. When we're done we can run the server, verify that it is running using a web browser, and we can run the client using either the Swing or the SWT user interface. | We need to create '''a new Scout Project''' and '''switch to the Scout Perspective'''. When we're done we can run the server, verify that it is running using a web browser, and we can run the client using either the Swing or the SWT user interface. | ||
Line 6: | Line 6: | ||
The client will not yet contain anything, but this will demonstrate that our infrastructure is working. | The client will not yet contain anything, but this will demonstrate that our infrastructure is working. | ||
− | Once you're done, continue on to {{ | + | Once you're done, continue on to [[{{BASEPAGENAME}}/Get_example_database|setup a SQL service]]. |
{{tip|New Workspace|Make sure you start with a new workspace. An Eclipse Scout project usually consists of multiple plugin projects and it may be convenient to have separate workspaces for each Scout project. This is not strictly necessary, however, as the Scout SDK easily manages multiple Scout projects within the same workspace.}} | {{tip|New Workspace|Make sure you start with a new workspace. An Eclipse Scout project usually consists of multiple plugin projects and it may be convenient to have separate workspaces for each Scout project. This is not strictly necessary, however, as the Scout SDK easily manages multiple Scout projects within the same workspace.}} | ||
Line 16: | Line 16: | ||
Right-click on the folder ''Scout Projects'' and choose '''New Scout Project''' in order to create a new Eclipse Scout project. | Right-click on the folder ''Scout Projects'' and choose '''New Scout Project''' in order to create a new Eclipse Scout project. | ||
− | [[Image: | + | [[Image:NewScoutProject_step1.png|The context menu to create a new Scout Project]] |
− | Use ''eclipse.org.minicrm'' as the '''project name'''. | + | Use ''eclipse.org.minicrm'' as the '''project name''' in the first step, click next. |
− | [[Image: | + | [[Image:NewScoutProject_step2.png||The wizard to create a new Scout Project (Step 1)]] |
+ | |||
+ | In the second step, choose the '''outline tree with table form''' application template. Confirm with Finish. | ||
+ | |||
+ | [[Image:NewScoutProject_step2.1.PNG||The wizard to create a new Scout Project (Step 2)]] | ||
{{note|Project Name, Project Alias|The project name will be used for all the '''plugins''' created. They'll get names like <tt>eclipse.org.minicrm.client</tt> and <tt>eclipse.org.minicrm.server</tt>. The project alias will be used for the '''servlet''' running on the server. Once you started the server you'll be able to contact it at <tt><nowiki>http://localhost:8080/minicrm</nowiki></tt>. Thus, the alias will be '''visible to the outside world'''.}} | {{note|Project Name, Project Alias|The project name will be used for all the '''plugins''' created. They'll get names like <tt>eclipse.org.minicrm.client</tt> and <tt>eclipse.org.minicrm.server</tt>. The project alias will be used for the '''servlet''' running on the server. Once you started the server you'll be able to contact it at <tt><nowiki>http://localhost:8080/minicrm</nowiki></tt>. Thus, the alias will be '''visible to the outside world'''.}} | ||
Line 26: | Line 30: | ||
If you expand the project tree it will have nodes for ''client'', ''shared'' and ''server'' as well as nodes for the two user interfaces, ''ui.swing'' and ''ui.swt''. | If you expand the project tree it will have nodes for ''client'', ''shared'' and ''server'' as well as nodes for the two user interfaces, ''ui.swing'' and ''ui.swt''. | ||
− | [[Image: | + | [[Image:NewScoutProject_step3.png]] |
− | {{warning|Issues with Mac OS | + | {{warning|Issues with Mac OS X and Swing Client|If you try to start the Swing Client in Mac OS X, this might fail. To fix this go to the run configuration of the Swing Client. In the tab ''Arguments'' change the following: |
+ | *remove <tt>-ws ${target.ws}</tt> from the ''program arguments''. | ||
+ | *add <tt>--launcher.secondThread</tt> to the ''program arguments'' (if not already present). | ||
+ | *remove <tt>-Dorg.eclipse.swt.internal.carbon.smallFonts</tt> from the ''VM arguments''. | ||
+ | *remove <tt>-XstartOnFirstThread</tt> from the ''VM arguments''. | ||
+ | For Mac OS X it is recommended to use the 32 bit Eclipse packages when working with the Swing Client. | ||
+ | Please note: When the application is started from the .product file again (using the Launch links), this might undo the changes done to the launch configuration in the steps above! }} | ||
== Start the Server == | == Start the Server == | ||
Line 34: | Line 44: | ||
Click on the server node. This will show two products, a ''production'' product and a ''development'' product. '''Click the green arrow''' of the development product to start it. | Click on the server node. This will show two products, a ''production'' product and a ''development'' product. '''Click the green arrow''' of the development product to start it. | ||
− | [[Image: | + | [[Image:NewScoutProject_step4.png]] |
{{note|Two Products|The two products allow you to specify two different config files. This allows you to set different system properties determining which databases to connect to, which log levels to use, etc.}} | {{note|Two Products|The two products allow you to specify two different config files. This allows you to set different system properties determining which databases to connect to, which log levels to use, etc.}} | ||
Line 40: | Line 50: | ||
== Test the Server == | == Test the Server == | ||
To test if the server is running properly, go to http://localhost:8080/minicrm/process. To log in, use '''admin''' as username and '''manager''' as password. | To test if the server is running properly, go to http://localhost:8080/minicrm/process. To log in, use '''admin''' as username and '''manager''' as password. | ||
+ | |||
+ | {{warning|The page might show the stacktrace of a NullPointerException|Nevertheless, client-server communication of the application seems not to be affected. Please refer to the Bug <nowiki>https://bugs.eclipse.org/bugs/show_bug.cgi?id=350606</nowiki> for the workaround and any further information.}} | ||
You should see a page providing information about the server. The login information is defined in the '''config.ini''' file of the server product. Have a look: click on the <u>open config.ini</u> link. Note the BasicSecurityFilter settings. | You should see a page providing information about the server. The login information is defined in the '''config.ini''' file of the server product. Have a look: click on the <u>open config.ini</u> link. Note the BasicSecurityFilter settings. | ||
− | [[Image: | + | |
+ | [[Image:NewScoutProject_step5.png]] | ||
== Start the Client == | == Start the Client == | ||
Line 52: | Line 65: | ||
You should see an empty client application: | You should see an empty client application: | ||
− | [[Image: | + | [[Image:NewScoutProject_step6.png|NewScoutProject_step6.png]] |
{{note|A Different Language|If you want to run the client in a different language than your system's default, you might have to fiddle with the ''configuration''. From the ''Run'' menu, choose ''Debug Configurations...'' and switch to the ''Arguments'' tab. There, replace <tt>-nl ${target.nl}</tt> with <tt>-nl en_US</tt> (if you're working with a German locale and need to make screen shots for the wiki, for example). Click the ''Apply'' button and the ''Debug'' button. Eclipse will remember this setting as long as you keep reusing the Run and Debug menus (using the two green buttons in the tool bar to run products). If you use the ''Scout Object Properties'' tab, this language setting will revert to the default.}} | {{note|A Different Language|If you want to run the client in a different language than your system's default, you might have to fiddle with the ''configuration''. From the ''Run'' menu, choose ''Debug Configurations...'' and switch to the ''Arguments'' tab. There, replace <tt>-nl ${target.nl}</tt> with <tt>-nl en_US</tt> (if you're working with a German locale and need to make screen shots for the wiki, for example). Click the ''Apply'' button and the ''Debug'' button. Eclipse will remember this setting as long as you keep reusing the Run and Debug menus (using the two green buttons in the tool bar to run products). If you use the ''Scout Object Properties'' tab, this language setting will revert to the default.}} |
Revision as of 05:22, 13 April 2012
The Scout documentation has been moved to https://eclipsescout.github.io/.
We need to create a new Scout Project and switch to the Scout Perspective. When we're done we can run the server, verify that it is running using a web browser, and we can run the client using either the Swing or the SWT user interface.
The client will not yet contain anything, but this will demonstrate that our infrastructure is working.
Once you're done, continue on to setup a SQL service.
Contents
Create a new Eclipse Scout project
If you haven't done so yet, change to the Scout Perspective.
Right-click on the folder Scout Projects and choose New Scout Project in order to create a new Eclipse Scout project.
Use eclipse.org.minicrm as the project name in the first step, click next.
In the second step, choose the outline tree with table form application template. Confirm with Finish.
If you expand the project tree it will have nodes for client, shared and server as well as nodes for the two user interfaces, ui.swing and ui.swt.
Start the Server
Click on the server node. This will show two products, a production product and a development product. Click the green arrow of the development product to start it.
Test the Server
To test if the server is running properly, go to http://localhost:8080/minicrm/process. To log in, use admin as username and manager as password.
You should see a page providing information about the server. The login information is defined in the config.ini file of the server product. Have a look: click on the open config.ini link. Note the BasicSecurityFilter settings.
Start the Client
Click on either the ui.swing or the ui.swt node and start the development client product by clicking on the green arrow.
When asked for a login, enter the same login information as before: username admin password manager. Or use any other username/password combination from the config.ini file.
You should see an empty client application: