Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 305988 | Differences between
and this patch

Collapse All | Expand All

(-)plugin.properties (-3 / +3 lines)
Lines 18-24 Link Here
18
helloRAP.description = \
18
helloRAP.description = \
19
<p>This wizard creates a minimal RAP application that consists of an application window with a title.</p>\
19
<p>This wizard creates a minimal RAP application that consists of an application window with a title.</p>\
20
<p><b>Extensions Used</b></p>\
20
<p><b>Extensions Used</b></p>\
21
<li>org.eclipse.rap.ui.entrypoint</li>\
21
<li>org.eclipse.core.runtime.applications</li>\
22
<li>org.eclipse.ui.perspectives</li>\
22
<li>org.eclipse.ui.perspectives</li>\
23
<p>This code will need the <b>RAP target</b> to compile.</p>
23
<p>This code will need the <b>RAP target</b> to compile.</p>
24
24
Lines 26-32 Link Here
26
viewRAP.description = \
26
viewRAP.description = \
27
<p>This wizard creates a RAP application that consists of an application window with a single view.</p>\
27
<p>This wizard creates a RAP application that consists of an application window with a single view.</p>\
28
<p><b>Extensions Used</b></p>\
28
<p><b>Extensions Used</b></p>\
29
<li>org.eclipse.rap.ui.entrypoint</li>\
29
<li>org.eclipse.core.runtime.applications</li>\
30
<li>org.eclipse.ui.perspectives</li>\
30
<li>org.eclipse.ui.perspectives</li>\
31
<li>org.eclipse.ui.views</li>\
31
<li>org.eclipse.ui.views</li>\
32
<li>org.eclipse.rap.ui.branding</li>\
32
<li>org.eclipse.rap.ui.branding</li>\
Lines 40-46 Link Here
40
<li>create perspectives with placeholders for new views</li>\
40
<li>create perspectives with placeholders for new views</li>\
41
<li>open modal dialogs</li>\
41
<li>open modal dialogs</li>\
42
<p><b>Extensions Used</b></p>\
42
<p><b>Extensions Used</b></p>\
43
<li>org.eclipse.rap.ui.entrypoint</li>\
43
<li>org.eclipse.core.runtime.applications</li>\
44
<li>org.eclipse.ui.perspectives</li>\
44
<li>org.eclipse.ui.perspectives</li>\
45
<li>org.eclipse.ui.views</li>\
45
<li>org.eclipse.ui.views</li>\
46
<li>org.eclipse.ui.commands</li>\
46
<li>org.eclipse.ui.commands</li>\
(-)src/org/eclipse/rap/internal/ui/templates/XmlNames.java (-3 / +7 lines)
Lines 12-27 Link Here
12
  public static final String ATT_ICON = "icon"; //$NON-NLS-1$
12
  public static final String ATT_ICON = "icon"; //$NON-NLS-1$
13
  public static final String ATT_ID = "id"; //$NON-NLS-1$
13
  public static final String ATT_ID = "id"; //$NON-NLS-1$
14
  public static final String ATT_NAME = "name"; //$NON-NLS-1$
14
  public static final String ATT_NAME = "name"; //$NON-NLS-1$
15
  public static final String ATT_PARAMETER = "parameter"; //$NON-NLS-1$
16
  public static final String ATT_SERVLET = "servletName"; //$NON-NLS-1$
15
  public static final String ATT_SERVLET = "servletName"; //$NON-NLS-1$
17
  public static final String ATT_DEFAULT_ENTRYPOINT = "defaultEntrypointId"; //$NON-NLS-1$
16
  public static final String ATT_DEFAULT_ENTRYPOINT = "defaultEntrypointId"; //$NON-NLS-1$
18
  public static final String ATT_THEME_ID = "themeId"; //$NON-NLS-1$
17
  public static final String ATT_THEME_ID = "themeId"; //$NON-NLS-1$
19
  public static final String ATT_TITLE = "title"; //$NON-NLS-1$
18
  public static final String ATT_TITLE = "title"; //$NON-NLS-1$
20
  public static final String ATT_DEFAULT_LAYOUT = "defaultLayoutId"; //$NON-NLS-1$
19
  public static final String ATT_DEFAULT_LAYOUT = "defaultLayoutId"; //$NON-NLS-1$
20
  public static final String ATT_CARDINALITY = "cardinality"; //$NON-NLS-1$
21
  public static final String ATT_THREAD = "thread"; //$NON-NLS-1$
22
  public static final String ATT_VISIBLE = "visible"; //$NON-NLS-1$
21
  
23
  
24
  public static final String ELEM_APPLICATION = "application"; //$NON-NLS-1$ 
25
  public static final String ELEM_RUN = "run"; //$NON-NLS-1$
22
  public static final String ELEM_CATEGORY = "category"; //$NON-NLS-1$
26
  public static final String ELEM_CATEGORY = "category"; //$NON-NLS-1$
23
  public static final String ELEM_COMMAND = "command"; //$NON-NLS-1$
27
  public static final String ELEM_COMMAND = "command"; //$NON-NLS-1$
24
  public static final String ELEM_ENTRYPOINT = "entrypoint"; //$NON-NLS-1$
25
  public static final String ELEM_PERSPECTIVE = "perspective"; //$NON-NLS-1$
28
  public static final String ELEM_PERSPECTIVE = "perspective"; //$NON-NLS-1$
26
  public static final String ELEM_VIEW = "view"; //$NON-NLS-1$
29
  public static final String ELEM_VIEW = "view"; //$NON-NLS-1$
27
  public static final String ELEM_BRANDING = "branding"; //$NON-NLS-1$
30
  public static final String ELEM_BRANDING = "branding"; //$NON-NLS-1$
Lines 30-36 Link Here
30
    = "defaultStackPresentation"; //$NON-NLS-1$
33
    = "defaultStackPresentation"; //$NON-NLS-1$
31
  
34
  
32
  public static final String XID_COMMANDS = "org.eclipse.ui.commands"; //$NON-NLS-1$
35
  public static final String XID_COMMANDS = "org.eclipse.ui.commands"; //$NON-NLS-1$
33
  public static final String XID_ENTRYPOINT = "org.eclipse.rap.ui.entrypoint"; //$NON-NLS-1$
36
  public static final String XID_APPLICATION 
37
    = "org.eclipse.core.runtime.applications"; //$NON-NLS-1$
34
  public static final String XID_PERSPECTIVES = "org.eclipse.ui.perspectives"; //$NON-NLS-1$
38
  public static final String XID_PERSPECTIVES = "org.eclipse.ui.perspectives"; //$NON-NLS-1$
35
  public static final String XID_VIEWS = "org.eclipse.ui.views"; //$NON-NLS-1$
39
  public static final String XID_VIEWS = "org.eclipse.ui.views"; //$NON-NLS-1$
36
  public static final String XID_BRANDING = "org.eclipse.rap.ui.branding"; //$NON-NLS-1$
40
  public static final String XID_BRANDING = "org.eclipse.rap.ui.branding"; //$NON-NLS-1$
(-)src/org/eclipse/rap/internal/ui/templates/rap/AbstractRAPTemplate.java (-2 / +8 lines)
Lines 32-37 Link Here
32
  protected static final String KEY_WINDOW_TITLE = "windowTitle"; //$NON-NLS-1$
32
  protected static final String KEY_WINDOW_TITLE = "windowTitle"; //$NON-NLS-1$
33
  protected static final String TEMPLATES_DIRECTORY = "templates"; //$NON-NLS-1$
33
  protected static final String TEMPLATES_DIRECTORY = "templates"; //$NON-NLS-1$
34
34
35
  public abstract String getApplicationId();
36
35
  protected final URL getInstallURL() {
37
  protected final URL getInstallURL() {
36
    return TemplateUtil.getInstallURL();
38
    return TemplateUtil.getInstallURL();
37
  }
39
  }
Lines 86-95 Link Here
86
    return factory.createElement( extension );
88
    return factory.createElement( extension );
87
  }
89
  }
88
90
89
  protected final String getApplicationName() {
91
  protected final String getApplicationClass() {
90
    return getStringOption( KEY_APPLICATION_CLASS );
92
    return getPackageName() + "." + getStringOption( KEY_APPLICATION_CLASS );
91
  }
93
  }
92
94
95
  public final String getFullApplicationId() {
96
    return getPluginId() + "." + getApplicationId();
97
  }
98
  
93
  protected final String getPackageName() {
99
  protected final String getPackageName() {
94
    return getStringOption( KEY_PACKAGE_NAME );
100
    return getStringOption( KEY_PACKAGE_NAME );
95
  }
101
  }
(-)src/org/eclipse/rap/internal/ui/templates/rap/HelloRAPTemplate.java (-15 / +21 lines)
Lines 33-67 Link Here
33
  public String getSectionId() {
33
  public String getSectionId() {
34
    return "helloRAP"; //$NON-NLS-1$
34
    return "helloRAP"; //$NON-NLS-1$
35
  }
35
  }
36
  
37
  public String getApplicationId() {
38
    return "helloapp";
39
  }
36
40
37
  protected void updateModel( final IProgressMonitor monitor )
41
  protected void updateModel( final IProgressMonitor monitor )
38
    throws CoreException
42
    throws CoreException
39
  {
43
  {
40
    createEntryPointsExtension();
44
    createApplicationExtension();
41
    createPerspectivesExtension();
45
    createPerspectivesExtension();
42
  }
46
  }
43
47
44
  ///////////////////
48
  ///////////////////
45
  // helping methods
49
  // helping methods
46
  
50
  
47
  private void createEntryPointsExtension() throws CoreException {
51
  private void createApplicationExtension() throws CoreException {
48
    IPluginExtension extension = createExtension( XmlNames.XID_ENTRYPOINT,
52
    IPluginExtension extension = createExtension( XmlNames.XID_APPLICATION,
49
                                                  true );
53
                                                  true );
50
    IPluginElement element = createElement( extension );
54
    extension.setId( getApplicationId() );
51
    element.setName( XmlNames.ELEM_ENTRYPOINT );
55
    IPluginElement applicationElement = createElement( extension );
52
    element.setAttribute( XmlNames.ATT_CLASS, 
56
    applicationElement.setName( XmlNames.ELEM_APPLICATION );
53
                          getEntrypointId() ); //$NON-NLS-1$
57
    applicationElement.setAttribute( XmlNames.ATT_VISIBLE, 
54
    element.setAttribute( XmlNames.ATT_ID,
58
                                     "true" ); //$NON-NLS-1$
55
                          getEntrypointId() ); //$NON-NLS-1$
59
    applicationElement.setAttribute( XmlNames.ATT_CARDINALITY,
56
    element.setAttribute( XmlNames.ATT_PARAMETER, "hello" ); //$NON-NLS-1$
60
                                     "singleton-global" ); //$NON-NLS-1$
57
    extension.add( element );
61
    applicationElement.setAttribute( XmlNames.ATT_THREAD, 
62
                                     "main" ); //$NON-NLS-1$
63
    extension.add( applicationElement );
64
    IPluginElement runElement = createElement( extension );
65
    runElement.setName( XmlNames.ELEM_RUN ); //$NON-NLS-1$
66
    runElement.setAttribute( XmlNames.ATT_CLASS, getApplicationClass() ); //$NON-NLS-1$
67
    applicationElement.add( runElement );
58
    addExtensionToPlugin( extension );
68
    addExtensionToPlugin( extension );
59
  }
69
  }
60
70
61
  private String getEntrypointId() {
62
    return getPackageName() + "." + getApplicationName();
63
  }
64
65
  private void createPerspectivesExtension() throws CoreException {
71
  private void createPerspectivesExtension() throws CoreException {
66
    IPluginExtension extension 
72
    IPluginExtension extension 
67
      = createExtension( XmlNames.XID_PERSPECTIVES, true );
73
      = createExtension( XmlNames.XID_PERSPECTIVES, true );
(-)src/org/eclipse/rap/internal/ui/templates/rap/HelloRAPWizard.java (-2 / +5 lines)
Lines 12-30 Link Here
12
12
13
public class HelloRAPWizard extends AbstractRAPWizard {
13
public class HelloRAPWizard extends AbstractRAPWizard {
14
14
15
  private AbstractRAPTemplate template;
16
15
  public void init( final IFieldData data ) {
17
  public void init( final IFieldData data ) {
16
    super.init( data );
18
    super.init( data );
17
    setWindowTitle( Messages.helloRAPWizard_windowTitle );
19
    setWindowTitle( Messages.helloRAPWizard_windowTitle );
18
  }
20
  }
19
21
20
  public ITemplateSection[] createTemplateSections() {
22
  public ITemplateSection[] createTemplateSections() {
23
    template = new HelloRAPTemplate();
21
    return new ITemplateSection[] {
24
    return new ITemplateSection[] {
22
      new HelloRAPTemplate()
25
      template
23
    };
26
    };
24
  }
27
  }
25
28
26
  protected String getEntryPointName() {
29
  protected String getEntryPointName() {
27
	  return "hello"; //$NON-NLS-1$
30
	  return template.getFullApplicationId();
28
  }
31
  }
29
32
30
  protected String getServletName() {
33
  protected String getServletName() {
(-)src/org/eclipse/rap/internal/ui/templates/rap/MailRAPTemplate.java (-17 / +24 lines)
Lines 41-50 Link Here
41
    };
41
    };
42
  }
42
  }
43
43
44
  public String getApplicationId() {
45
    return "mailapp";
46
  }
47
44
  protected void updateModel( final IProgressMonitor monitor )
48
  protected void updateModel( final IProgressMonitor monitor )
45
    throws CoreException
49
    throws CoreException
46
  {
50
  {
47
    createEntryPointsExtension();
51
    createApplicationExtension();
48
    createPerspectivesExtension();
52
    createPerspectivesExtension();
49
    createViewsExtension();
53
    createViewsExtension();
50
    createCommandsExtension();
54
    createCommandsExtension();
Lines 53-58 Link Here
53
57
54
  // helping methods
58
  // helping methods
55
  // ////////////////
59
  // ////////////////
60
  
56
  private void createCommandsExtension() throws CoreException {
61
  private void createCommandsExtension() throws CoreException {
57
    IPluginExtension extension = createExtension( XmlNames.XID_COMMANDS, true );
62
    IPluginExtension extension = createExtension( XmlNames.XID_COMMANDS, true );
58
    IPluginElement element = createElement( extension );
63
    IPluginElement element = createElement( extension );
Lines 91-114 Link Here
91
    extension.add( element );
96
    extension.add( element );
92
  }
97
  }
93
98
94
  private void createEntryPointsExtension() throws CoreException {
99
  private void createApplicationExtension() throws CoreException {
95
    IPluginExtension extension = createExtension( XmlNames.XID_ENTRYPOINT,
100
    IPluginExtension extension = createExtension( XmlNames.XID_APPLICATION,
96
                                                  true );
101
                                                  true );
97
    IPluginElement element = createElement( extension );
102
    extension.setId( getApplicationId() );
98
    element.setName( XmlNames.ELEM_ENTRYPOINT );
103
    IPluginElement applicationElement = createElement( extension );
99
    element.setAttribute( XmlNames.ATT_CLASS,
104
    applicationElement.setName( XmlNames.ELEM_APPLICATION );
100
                          getEntrypointId() ); //$NON-NLS-1$
105
    applicationElement.setAttribute( XmlNames.ATT_VISIBLE, 
101
    element.setAttribute( XmlNames.ATT_ID,
106
                                     "true" ); //$NON-NLS-1$
102
                          getEntrypointId() ); //$NON-NLS-1$
107
    applicationElement.setAttribute( XmlNames.ATT_CARDINALITY,
103
    element.setAttribute( XmlNames.ATT_PARAMETER, "mail" ); //$NON-NLS-1$
108
                                     "singleton-global" ); //$NON-NLS-1$
104
    extension.add( element );
109
    applicationElement.setAttribute( XmlNames.ATT_THREAD, 
110
                                     "main" ); //$NON-NLS-1$
111
    extension.add( applicationElement );
112
    IPluginElement runElement = createElement( extension );
113
    runElement.setName( XmlNames.ELEM_RUN ); //$NON-NLS-1$
114
    runElement.setAttribute( XmlNames.ATT_CLASS, getApplicationClass() ); //$NON-NLS-1$
115
    applicationElement.add( runElement );
105
    addExtensionToPlugin( extension );
116
    addExtensionToPlugin( extension );
106
  }
117
  }
107
118
  
108
  private String getEntrypointId() {
109
    return getPackageName() + "." + getApplicationName();
110
  }
111
112
  private void createPerspectivesExtension() throws CoreException {
119
  private void createPerspectivesExtension() throws CoreException {
113
    IPluginExtension extension = createExtension( XmlNames.XID_PERSPECTIVES,
120
    IPluginExtension extension = createExtension( XmlNames.XID_PERSPECTIVES,
114
                                                  true );
121
                                                  true );
Lines 159-165 Link Here
159
    brandingElement.setAttribute( XmlNames.ATT_ID, brandingId );
166
    brandingElement.setAttribute( XmlNames.ATT_ID, brandingId );
160
    brandingElement.setAttribute( XmlNames.ATT_SERVLET, "mail" );
167
    brandingElement.setAttribute( XmlNames.ATT_SERVLET, "mail" );
161
    brandingElement.setAttribute( XmlNames.ATT_DEFAULT_ENTRYPOINT, 
168
    brandingElement.setAttribute( XmlNames.ATT_DEFAULT_ENTRYPOINT, 
162
                                  getEntrypointId() );
169
                                  getFullApplicationId() );
163
    brandingElement.setAttribute( XmlNames.ATT_THEME_ID, 
170
    brandingElement.setAttribute( XmlNames.ATT_THEME_ID, 
164
                                  TemplateUtil.BUSINESS_THEME_ID );
171
                                  TemplateUtil.BUSINESS_THEME_ID );
165
    brandingElement.setAttribute( XmlNames.ATT_TITLE, "RAP Maildemo" );
172
    brandingElement.setAttribute( XmlNames.ATT_TITLE, "RAP Maildemo" );
(-)src/org/eclipse/rap/internal/ui/templates/rap/MailRAPWizard.java (-2 / +5 lines)
Lines 12-30 Link Here
12
12
13
public class MailRAPWizard extends AbstractRAPWizard {
13
public class MailRAPWizard extends AbstractRAPWizard {
14
14
15
  private AbstractRAPTemplate template;
16
  
15
  public void init( final IFieldData data ) {
17
  public void init( final IFieldData data ) {
16
    super.init( data );
18
    super.init( data );
17
    setWindowTitle( Messages.mailRAPWizard_windowTitle );
19
    setWindowTitle( Messages.mailRAPWizard_windowTitle );
18
  }
20
  }
19
21
20
  public ITemplateSection[] createTemplateSections() {
22
  public ITemplateSection[] createTemplateSections() {
23
    template = new MailRAPTemplate();
21
    return new ITemplateSection[] {
24
    return new ITemplateSection[] {
22
      new MailRAPTemplate()
25
      template
23
    };
26
    };
24
  }
27
  }
25
28
26
  protected String getEntryPointName() {
29
  protected String getEntryPointName() {
27
    return "mail"; //$NON-NLS-1$
30
    return template.getFullApplicationId();
28
  }
31
  }
29
32
30
  protected String getServletName() {
33
  protected String getServletName() {
(-)src/org/eclipse/rap/internal/ui/templates/rap/ViewRAPTemplate.java (-16 / +23 lines)
Lines 34-44 Link Here
34
  public String getSectionId() {
34
  public String getSectionId() {
35
    return "viewRAP"; //$NON-NLS-1$
35
    return "viewRAP"; //$NON-NLS-1$
36
  }
36
  }
37
  
38
  public String getApplicationId() {
39
    return "viewapp";
40
  }
37
41
38
  protected void updateModel( final IProgressMonitor monitor )
42
  protected void updateModel( final IProgressMonitor monitor )
39
    throws CoreException
43
    throws CoreException
40
  {
44
  {
41
    createEntryPointsExtension();
45
    createApplicationExtension();
42
    createPerspectivesExtension();
46
    createPerspectivesExtension();
43
    createViewsExtension();
47
    createViewsExtension();
44
    createBrandingExtension();
48
    createBrandingExtension();
Lines 46-69 Link Here
46
50
47
  // helping methods
51
  // helping methods
48
  // ////////////////
52
  // ////////////////
49
  private void createEntryPointsExtension() throws CoreException {
53
  
50
    IPluginExtension extension = createExtension( XmlNames.XID_ENTRYPOINT,
54
  private void createApplicationExtension() throws CoreException {
55
    IPluginExtension extension = createExtension( XmlNames.XID_APPLICATION,
51
                                                  true );
56
                                                  true );
52
    IPluginElement element = createElement( extension );
57
    extension.setId( getApplicationId() );
53
    element.setName( XmlNames.ELEM_ENTRYPOINT );
58
    IPluginElement applicationElement = createElement( extension );
54
    element.setAttribute( XmlNames.ATT_CLASS, 
59
    applicationElement.setName( XmlNames.ELEM_APPLICATION );
55
                          getEntrypointId() ); //$NON-NLS-1$
60
    applicationElement.setAttribute( XmlNames.ATT_VISIBLE, 
56
    element.setAttribute( XmlNames.ATT_ID,
61
                                     "true" ); //$NON-NLS-1$
57
                          getEntrypointId() ); //$NON-NLS-1$
62
    applicationElement.setAttribute( XmlNames.ATT_CARDINALITY,
58
    element.setAttribute( XmlNames.ATT_PARAMETER, "view" ); //$NON-NLS-1$
63
                                     "singleton-global" ); //$NON-NLS-1$
59
    extension.add( element );
64
    applicationElement.setAttribute( XmlNames.ATT_THREAD, 
65
                                     "main" ); //$NON-NLS-1$
66
    extension.add( applicationElement );
67
    IPluginElement runElement = createElement( extension );
68
    runElement.setName( XmlNames.ELEM_RUN ); //$NON-NLS-1$
69
    runElement.setAttribute( XmlNames.ATT_CLASS, getApplicationClass() ); //$NON-NLS-1$
70
    applicationElement.add( runElement );
60
    addExtensionToPlugin( extension );
71
    addExtensionToPlugin( extension );
61
  }
72
  }
62
73
63
  private String getEntrypointId() {
64
    return getPackageName() + "." + getApplicationName();
65
  }
66
67
  private void createPerspectivesExtension() throws CoreException {
74
  private void createPerspectivesExtension() throws CoreException {
68
    IPluginExtension extension = createExtension( XmlNames.XID_PERSPECTIVES,
75
    IPluginExtension extension = createExtension( XmlNames.XID_PERSPECTIVES,
69
                                                  true );
76
                                                  true );
Lines 99-105 Link Here
99
    brandingElement.setAttribute( XmlNames.ATT_ID, brandingId );
106
    brandingElement.setAttribute( XmlNames.ATT_ID, brandingId );
100
    brandingElement.setAttribute( XmlNames.ATT_SERVLET, "view" );
107
    brandingElement.setAttribute( XmlNames.ATT_SERVLET, "view" );
101
    brandingElement.setAttribute( XmlNames.ATT_DEFAULT_ENTRYPOINT, 
108
    brandingElement.setAttribute( XmlNames.ATT_DEFAULT_ENTRYPOINT, 
102
                                  getEntrypointId() );
109
                                  getFullApplicationId() );
103
    brandingElement.setAttribute( XmlNames.ATT_THEME_ID, 
110
    brandingElement.setAttribute( XmlNames.ATT_THEME_ID, 
104
                                  TemplateUtil.FANCY_THEME_ID );
111
                                  TemplateUtil.FANCY_THEME_ID );
105
    brandingElement.setAttribute( XmlNames.ATT_TITLE, "RAP Single View" );
112
    brandingElement.setAttribute( XmlNames.ATT_TITLE, "RAP Single View" );
(-)src/org/eclipse/rap/internal/ui/templates/rap/ViewRAPWizard.java (-2 / +5 lines)
Lines 12-30 Link Here
12
12
13
public class ViewRAPWizard extends AbstractRAPWizard {
13
public class ViewRAPWizard extends AbstractRAPWizard {
14
14
15
  private AbstractRAPTemplate template;
16
15
  public void init( final IFieldData data ) {
17
  public void init( final IFieldData data ) {
16
    super.init( data );
18
    super.init( data );
17
    setWindowTitle( Messages.viewRAPWizard_windowTitle );
19
    setWindowTitle( Messages.viewRAPWizard_windowTitle );
18
  }
20
  }
19
21
20
  public ITemplateSection[] createTemplateSections() {
22
  public ITemplateSection[] createTemplateSections() {
23
    template = new ViewRAPTemplate();
21
    return new ITemplateSection[] {
24
    return new ITemplateSection[] {
22
      new ViewRAPTemplate()
25
      template
23
    };
26
    };
24
  }
27
  }
25
28
26
  protected String getEntryPointName() {
29
  protected String getEntryPointName() {
27
    return "view"; //$NON-NLS-1$
30
    return template.getFullApplicationId();
28
  }
31
  }
29
32
30
  protected String getServletName() {
33
  protected String getServletName() {
(-)templates/helloRAP/java/$applicationClass$.java (-7 / +12 lines)
Lines 1-6 Link Here
1
package $packageName$;
1
package $packageName$;
2
2
3
import org.eclipse.rwt.lifecycle.IEntryPoint;
3
import org.eclipse.equinox.app.IApplication;
4
import org.eclipse.equinox.app.IApplicationContext;
4
import org.eclipse.swt.widgets.Display;
5
import org.eclipse.swt.widgets.Display;
5
import org.eclipse.ui.PlatformUI;
6
import org.eclipse.ui.PlatformUI;
6
import org.eclipse.ui.application.WorkbenchAdvisor;
7
import org.eclipse.ui.application.WorkbenchAdvisor;
Lines 9-19 Link Here
9
 * This class controls all aspects of the application's execution
10
 * This class controls all aspects of the application's execution
10
 * and is contributed through the plugin.xml.
11
 * and is contributed through the plugin.xml.
11
 */
12
 */
12
public class $applicationClass$ implements IEntryPoint {
13
public class $applicationClass$ implements IApplication {
13
14
14
	public int createUI() {
15
  public Object start( final IApplicationContext context ) throws Exception {
15
		Display display = PlatformUI.createDisplay();
16
    Display display = PlatformUI.createDisplay();
16
		WorkbenchAdvisor advisor = new ApplicationWorkbenchAdvisor();
17
    WorkbenchAdvisor advisor = new ApplicationWorkbenchAdvisor();
17
		return PlatformUI.createAndRunWorkbench( display, advisor );
18
    return PlatformUI.createAndRunWorkbench( display, advisor );
18
	}
19
  }
20
21
  public void stop() {
22
    // Do nothing
23
  }
19
}
24
}
(-)templates/helloRAP/java/ApplicationWorkbenchWindowAdvisor.java (+3 lines)
Lines 1-6 Link Here
1
package $packageName$;
1
package $packageName$;
2
2
3
import org.eclipse.swt.SWT;
3
import org.eclipse.swt.graphics.Point;
4
import org.eclipse.swt.graphics.Point;
5
import org.eclipse.swt.widgets.Shell;
4
import org.eclipse.ui.application.ActionBarAdvisor;
6
import org.eclipse.ui.application.ActionBarAdvisor;
5
import org.eclipse.ui.application.IActionBarConfigurer;
7
import org.eclipse.ui.application.IActionBarConfigurer;
6
import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
8
import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
Lines 25-29 Link Here
25
        configurer.setShowCoolBar(false);
27
        configurer.setShowCoolBar(false);
26
        configurer.setShowStatusLine(false);
28
        configurer.setShowStatusLine(false);
27
        configurer.setTitle("$windowTitle$");
29
        configurer.setTitle("$windowTitle$");
30
        configurer.setShellStyle( SWT.TITLE | SWT.RESIZE );
28
    }
31
    }
29
}
32
}
(-)templates/mailRAP/java/$applicationClass$.java (-3 / +8 lines)
Lines 1-6 Link Here
1
package $packageName$;
1
package $packageName$;
2
2
3
import org.eclipse.rwt.lifecycle.IEntryPoint;
3
import org.eclipse.equinox.app.IApplication;
4
import org.eclipse.equinox.app.IApplicationContext;
4
import org.eclipse.swt.widgets.Display;
5
import org.eclipse.swt.widgets.Display;
5
import org.eclipse.ui.PlatformUI;
6
import org.eclipse.ui.PlatformUI;
6
import org.eclipse.ui.application.WorkbenchAdvisor;
7
import org.eclipse.ui.application.WorkbenchAdvisor;
Lines 9-19 Link Here
9
 * This class controls all aspects of the application's execution
10
 * This class controls all aspects of the application's execution
10
 * and is contributed through the plugin.xml.
11
 * and is contributed through the plugin.xml.
11
 */
12
 */
12
public class $applicationClass$ implements IEntryPoint {
13
public class $applicationClass$ implements IApplication {
13
14
14
  public int createUI() {
15
  public Object start( final IApplicationContext context ) throws Exception {
15
    Display display = PlatformUI.createDisplay();
16
    Display display = PlatformUI.createDisplay();
16
    WorkbenchAdvisor advisor = new ApplicationWorkbenchAdvisor();
17
    WorkbenchAdvisor advisor = new ApplicationWorkbenchAdvisor();
17
    return PlatformUI.createAndRunWorkbench( display, advisor );
18
    return PlatformUI.createAndRunWorkbench( display, advisor );
18
  }
19
  }
20
21
  public void stop() {
22
    // Do nothing
23
  }
19
}
24
}
(-)templates/viewRAP/java/$applicationClass$.java (-4 / +9 lines)
Lines 1-6 Link Here
1
package $packageName$;
1
package $packageName$;
2
2
3
import org.eclipse.rwt.lifecycle.IEntryPoint;
3
import org.eclipse.equinox.app.IApplication;
4
import org.eclipse.equinox.app.IApplicationContext;
4
import org.eclipse.swt.widgets.Display;
5
import org.eclipse.swt.widgets.Display;
5
import org.eclipse.ui.PlatformUI;
6
import org.eclipse.ui.PlatformUI;
6
import org.eclipse.ui.application.WorkbenchAdvisor;
7
import org.eclipse.ui.application.WorkbenchAdvisor;
Lines 9-19 Link Here
9
 * This class controls all aspects of the application's execution
10
 * This class controls all aspects of the application's execution
10
 * and is contributed through the plugin.xml.
11
 * and is contributed through the plugin.xml.
11
 */
12
 */
12
public class $applicationClass$ implements IEntryPoint {
13
public class $applicationClass$ implements IApplication {
13
14
14
  public int createUI() {
15
  public Object start( final IApplicationContext context ) throws Exception {
15
    Display display = PlatformUI.createDisplay();
16
    Display display = PlatformUI.createDisplay();
16
    WorkbenchAdvisor advisor = new ApplicationWorkbenchAdvisor();
17
    WorkbenchAdvisor advisor = new ApplicationWorkbenchAdvisor();
17
    return PlatformUI.createAndRunWorkbench( display, advisor );
18
    return PlatformUI.createAndRunWorkbench( display, advisor );
18
  }
19
  }
19
}
20
21
  public void stop() {
22
    // Do nothing
23
  }
24
}
(-)templates/viewRAP/java/ApplicationWorkbenchWindowAdvisor.java (+3 lines)
Lines 1-6 Link Here
1
package $packageName$;
1
package $packageName$;
2
2
3
import org.eclipse.swt.SWT;
3
import org.eclipse.swt.graphics.Point;
4
import org.eclipse.swt.graphics.Point;
5
import org.eclipse.swt.widgets.Shell;
4
import org.eclipse.ui.application.ActionBarAdvisor;
6
import org.eclipse.ui.application.ActionBarAdvisor;
5
import org.eclipse.ui.application.IActionBarConfigurer;
7
import org.eclipse.ui.application.IActionBarConfigurer;
6
import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
8
import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
Lines 25-29 Link Here
25
        configurer.setShowCoolBar(false);
27
        configurer.setShowCoolBar(false);
26
        configurer.setShowStatusLine(false);
28
        configurer.setShowStatusLine(false);
27
        configurer.setTitle("$windowTitle$");
29
        configurer.setTitle("$windowTitle$");
30
        configurer.setShellStyle( SWT.TITLE | SWT.RESIZE );
28
    }
31
    }
29
}
32
}

Return to bug 305988