Skip to main content

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.

Jump to: navigation, search

Difference between revisions of "Scout"

(added the infobox)
Line 1: Line 1:
 +
{{Infobox
 +
| name = Eclipse Scout
 +
| website = http://www.eclipse.org/proposals/scout/
 +
| download =
 +
| list = eclipse.scout-dev
 +
| newsgroup = eclipse.scout
 +
| product = EclipseScout
 +
}}
 +
 
{| class="FCK__ShowTableBorders" align="right"
 
{| class="FCK__ShowTableBorders" align="right"
 
|-
 
|-
Line 6: Line 15:
 
The [http://www.eclipse.org/proposals/scout/ Eclipse Scout] project is a proposed open source project under the Eclipse Technology Project.  
 
The [http://www.eclipse.org/proposals/scout/ Eclipse Scout] project is a proposed open source project under the Eclipse Technology Project.  
  
Please note that these pages are work in progress and still far from complete.
+
Please note that these pages are work in progress and still far from complete.  
  
 
== What is it  ==
 
== What is it  ==
Line 14: Line 23:
 
Eclipse Scout consists of a runtime and an SDK part. The runtime part consists of approx. five Plug-Ins, the SDK consists of approx. three Plug-Ins.  
 
Eclipse Scout consists of a runtime and an SDK part. The runtime part consists of approx. five Plug-Ins, the SDK consists of approx. three Plug-Ins.  
  
The runtime is purely based on equinox, and eclipse. The SDK part is an extension to JDT and PDE with a complete perspective for easy click-and-build of a complete application.
+
The runtime is purely based on equinox, and eclipse. The SDK part is an extension to JDT and PDE with a complete perspective for easy click-and-build of a complete application.  
  
 
== Key Concepts  ==
 
== Key Concepts  ==
Line 37: Line 46:
 
== Screens  ==
 
== Screens  ==
  
 
+
   
  
 
== My first application  ==
 
== My first application  ==
Line 50: Line 59:
 
== A Scout form  ==
 
== A Scout form  ==
  
To get an idea consider a form with only a title and two string fields.  
+
To get an idea consider a form with only a title and two string fields. This form is displayed as a complete SWT form with SWT fields when using the SWT GUI Plug-In. It can also be displayed using the Swing GUI Plug-In, or (in development) using the apache wicket GUI Plug-In to serve the form from the server as a web page.  
This form is displayed as a complete SWT form with SWT fields when using the SWT GUI Plug-In.
+
It can also be displayed using the Swing GUI Plug-In, or (in development) using the apache wicket GUI Plug-In to serve the form from the server as a web page.
+
  
 
  public class PersonForm extends AbstractForm{
 
  public class PersonForm extends AbstractForm{
  
 
   public PersonForm(){
 
   public PersonForm(){
  }
+
  }
  
 
   /**
 
   /**
    * This method and all other getConfigured* and exec* methods can be written manually  
+
  * This method and all other getConfigured* and exec* methods can be written manually  
    * or via the property editor in the scout sdk view
+
  * or via the property editor in the scout sdk view
    */
+
  */
  @Override
+
  @Override
  protected String getConfiguredTitle(){
+
  protected String getConfiguredTitle(){
    return Texts.get("MailReader");
+
    return Texts.get("MailReader");
  }
+
  }
 
+
 
  
 
   public MainBox getMainBox(){
 
   public MainBox getMainBox(){
    return (MainBox)getRootGroupBox();
+
    return (MainBox)getRootGroupBox();
  }
+
  }
 
+
 
  public FirstNameField getFirstNameField(){
+
  public FirstNameField getFirstNameField(){
    return getFieldByClass(FirstNameField.class);
+
    return getFieldByClass(FirstNameField.class);
  }
+
  }
  
 
   public LastNameField getLastNameField(){
 
   public LastNameField getLastNameField(){
    return getFieldByClass(LastNameField.class);
+
    return getFieldByClass(LastNameField.class);
  }
+
  }
 
+
 
  public OkButton getOkButton(){
+
  public OkButton getOkButton(){
    return getFieldByClass(OkButton.class);
+
    return getFieldByClass(OkButton.class);
  }
+
  }
  
 
   public CancelButton getCancelButton(){
 
   public CancelButton getCancelButton(){
    return getFieldByClass(CancelButton.class);
+
    return getFieldByClass(CancelButton.class);
  }
+
  }
  
 
   /**
 
   /**
    * Start the form with the create handler
+
  * Start the form with the create handler
    */
+
  */
  public void startCreate() throws ProcessingException{
+
  public void startCreate() throws ProcessingException{
    startInternal(new CreateHandler());
+
    startInternal(new CreateHandler());
  }
+
  }
  
 
   /**
 
   /**
    * Start the form with the modify handler
+
  * Start the form with the modify handler
    */
+
  */
  public void startModify() throws ProcessingException{
+
  public void startModify() throws ProcessingException{
    startInternal(new ModifyHandler());
+
    startInternal(new ModifyHandler());
  }
+
  }
 +
 
 +
<br>
  
 
 
 
   @Order(10)
 
   @Order(10)
  public class MainBox extends AbstractGroupBox{
+
  public class MainBox extends AbstractGroupBox{
  
 
     @Order(10)
 
     @Order(10)
    public class FirstNameField extends AbstractStringField{
+
    public class FirstNameField extends AbstractStringField{
      @Override
+
      @Override
      protected String getConfiguredLabel(){
+
      protected String getConfiguredLabel(){
        return Texts.get("FirstName");
+
        return Texts.get("FirstName");
      }
+
      }
    }
+
    }
   
+
   
  
 
     @Order(20)
 
     @Order(20)
    public class LastNameField extends AbstractStringField{
+
    public class LastNameField extends AbstractStringField{
      @Override
+
      @Override
      protected String getConfiguredLabel(){
+
      protected String getConfiguredLabel(){
        return Texts.get("LastName");
+
        return Texts.get("LastName");
      }
+
      }
    }
+
    }
   
+
   
  
 
     @Order(30)
 
     @Order(30)
    public class OkButton extends AbstractOkButton{
+
    public class OkButton extends AbstractOkButton{
    }
+
    }
   
+
   
    @Order(40)
+
    @Order(40)
    public class CancelButton extends AbstractCancelButton{
+
    public class CancelButton extends AbstractCancelButton{
    }
+
    }
   
+
   
  }
+
  }
  
 +
<br>
  
 
   /**
 
   /**
    * This is the form handler when started with .startCreate();
+
  * This is the form handler when started with .startCreate();
    */
+
  */
  public class CreateHandler extends AbstractFormHandler{
+
  public class CreateHandler extends AbstractFormHandler{
    protected void execLoad() throws ProcessingException{
+
    protected void execLoad() throws ProcessingException{
      //...
+
      //...
    }
+
    }
  
 
     protected void execStore() throws ProcessingException{
 
     protected void execStore() throws ProcessingException{
      //...
+
      //...
    }
+
    }
  }
+
  }
  
 
   /**
 
   /**
    * This is the form handler when started with .startModify();
+
  * This is the form handler when started with .startModify();
    */
+
  */
  public class ModifyHandler extends AbstractFormHandler{
+
  public class ModifyHandler extends AbstractFormHandler{
    protected void execLoad() throws ProcessingException{
+
    protected void execLoad() throws ProcessingException{
      //...
+
      //...
    }
+
    }
  
 
     protected void execStore() throws ProcessingException{
 
     protected void execStore() throws ProcessingException{
      //...
+
      //...
    }
+
    }
  }
+
  }
 
+
 
 
  }
 
  }
  
<br>
+
<br>  
  
 
== How Tos  ==
 
== How Tos  ==

Revision as of 07:26, 15 March 2010

Eclipse Scout
Website
[ Download]
Community
Mailing ListForumsIRCmattermost
Issues
OpenHelp WantedBug Day
Contribute
Browse Source

The Eclipse Scout project is a proposed open source project under the Eclipse Technology Project.

Please note that these pages are work in progress and still far from complete.

What is it

The eclipse Scout Plug-Ins are used to build applications based on eclipse and equinox. These may be standalone apps, client/server apps, headless apps on server-side equinox etc.

Eclipse Scout consists of a runtime and an SDK part. The runtime part consists of approx. five Plug-Ins, the SDK consists of approx. three Plug-Ins.

The runtime is purely based on equinox, and eclipse. The SDK part is an extension to JDT and PDE with a complete perspective for easy click-and-build of a complete application.

Key Concepts

An applications built with eclipse Scout typically has a UI with perspectives, views, forms and pages. It may also have a back-end part that is running in an application server with server-side equinox. Perspectives, views, forms and pages are not limited to SWT, Scout supports complete GUI pluggability and also supports Swing of the box.

With eclipse Scout you have

  1. Separation of UI (user interface layer) and GUI (graphical user interface). SWT and Swing GUI factory
  2. Complete workspace overview, multiple Plug-Ins participating to the same application are visualized with their high-level dependencies
  3. Much convenience and support in writing only the code you want to write when for example writing a new form with many sections and fields
  4. Automatic nls support as-you-type
  5. Soap-based remote service tunnel for hi-speed service remoting to a eclipse server-side application
  6. Extension point for declaring OSGi services and remote service proxies
  7. Extension point for UI component to gui widget mapping
  8. Complete abstration layer for desktop (workbench), outlines (perspectives), forms (views, dialogs) and fields
  9. Configurable code
  10. Template concept for creating abstract class libraries
  11. Strong typed code, minimized "string binding" and therefore best support by PDE and JDT
  12. No meta data and no one-way code genration; everything is in the Java code you write. If you prefer to write code manually, or via click-and-build, doesn't matter

Screens

 

My first application

Easiest way to begin is creating a new eclipse Scout project group and choosing the mail sample application. A project group is a set of Plug-Ins that make up your application. Project name: com.example.mail Project parts: client, server, SWT UI This will create the Plug-Ins (listed by layer)

  1. com.example.mail.ui.swt.core
  2. com.example.mail.client.core
  3. com.example.mail.shared.core
  4. com.example.mail.server.core

A Scout form

To get an idea consider a form with only a title and two string fields. This form is displayed as a complete SWT form with SWT fields when using the SWT GUI Plug-In. It can also be displayed using the Swing GUI Plug-In, or (in development) using the apache wicket GUI Plug-In to serve the form from the server as a web page.

public class PersonForm extends AbstractForm{
  public PersonForm(){
 }
  /**
  * This method and all other getConfigured* and exec* methods can be written manually 
  * or via the property editor in the scout sdk view
  */
 @Override
 protected String getConfiguredTitle(){
   return Texts.get("MailReader");
 }
 
  public MainBox getMainBox(){
   return (MainBox)getRootGroupBox();
 }
 
 public FirstNameField getFirstNameField(){
   return getFieldByClass(FirstNameField.class);
 }
  public LastNameField getLastNameField(){
   return getFieldByClass(LastNameField.class);
 }
 
 public OkButton getOkButton(){
   return getFieldByClass(OkButton.class);
 }
  public CancelButton getCancelButton(){
   return getFieldByClass(CancelButton.class);
 }
  /**
  * Start the form with the create handler
  */
 public void startCreate() throws ProcessingException{
   startInternal(new CreateHandler());
 }
  /**
  * Start the form with the modify handler
  */
 public void startModify() throws ProcessingException{
   startInternal(new ModifyHandler());
 }


  @Order(10)
 public class MainBox extends AbstractGroupBox{
    @Order(10)
   public class FirstNameField extends AbstractStringField{
     @Override
     protected String getConfiguredLabel(){
       return Texts.get("FirstName");
     }
   }
   
    @Order(20)
   public class LastNameField extends AbstractStringField{
     @Override
     protected String getConfiguredLabel(){
       return Texts.get("LastName");
     }
   }
   
    @Order(30)
   public class OkButton extends AbstractOkButton{
   }
   
   @Order(40)
   public class CancelButton extends AbstractCancelButton{
   }
   
 }


  /**
  * This is the form handler when started with .startCreate();
  */
 public class CreateHandler extends AbstractFormHandler{
   protected void execLoad() throws ProcessingException{
     //...
   }
    protected void execStore() throws ProcessingException{
     //...
   }
 }
  /**
  * This is the form handler when started with .startModify();
  */
 public class ModifyHandler extends AbstractFormHandler{
   protected void execLoad() throws ProcessingException{
     //...
   }
    protected void execStore() throws ProcessingException{
     //...
   }
 }
 
}


How Tos

Where do I load data into a TablePage?

  • override method execLoadTableData where you call an outline service operation that returns a Object[][] field
  • Parameter SearchFilter of execLoadTableData contains all additional WHERE clauses (that start with „AND…“) defined in the getConfiguredSearchTerm methods

Back to the top