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 288727
Collapse All | Expand All

(-)src/org/eclipse/rap/internal/ui/templates/TemplateUtil.java (+10 lines)
Lines 22-27 Link Here
22
public final class TemplateUtil {
22
public final class TemplateUtil {
23
23
24
  public static final String PLUGIN_ID = "org.eclipse.rap.ui.templates"; //$NON-NLS-1$
24
  public static final String PLUGIN_ID = "org.eclipse.rap.ui.templates"; //$NON-NLS-1$
25
  public static final String BUSINESS_THEME_ID 
26
    = "org.eclipse.rap.design.example.business.theme"; //$NON-NLS-1$
27
  public static final String FANCY_THEME_ID 
28
    = "org.eclipse.rap.design.example.fancy.theme"; //$NON-NLS-1$
29
  public static final String BUSINESS_FACTORY_ID 
30
    = "org.eclipse.rap.design.example.business.factory"; //$NON-NLS-1$
31
  public static final String BUSINESS_LAYOUT_ID 
32
    = "org.eclipse.rap.design.example.business.layout"; //$NON-NLS-1$
33
  public static final String STACK_ID 
34
    = "org.eclipse.rap.design.example.stack.view"; //$NON-NLS-1$
25
35
26
  private TemplateUtil() {
36
  private TemplateUtil() {
27
    // prevent instantiation
37
    // prevent instantiation
(-)src/org/eclipse/rap/internal/ui/templates/XmlNames.java (+10 lines)
Lines 13-27 Link Here
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$
15
  public static final String ATT_PARAMETER = "parameter"; //$NON-NLS-1$
16
  public static final String ATT_SERVLET = "servletName"; //$NON-NLS-1$
17
  public static final String ATT_DEFAULT_ENTRYPOINT = "defaultEntrypointId"; //$NON-NLS-1$
18
  public static final String ATT_THEME_ID = "themeId"; //$NON-NLS-1$
19
  public static final String ATT_TITLE = "title"; //$NON-NLS-1$
20
  public static final String ATT_DEFAULT_LAYOUT = "defaultLayoutId"; //$NON-NLS-1$
16
  
21
  
17
  public static final String ELEM_CATEGORY = "category"; //$NON-NLS-1$
22
  public static final String ELEM_CATEGORY = "category"; //$NON-NLS-1$
18
  public static final String ELEM_COMMAND = "command"; //$NON-NLS-1$
23
  public static final String ELEM_COMMAND = "command"; //$NON-NLS-1$
19
  public static final String ELEM_ENTRYPOINT = "entrypoint"; //$NON-NLS-1$
24
  public static final String ELEM_ENTRYPOINT = "entrypoint"; //$NON-NLS-1$
20
  public static final String ELEM_PERSPECTIVE = "perspective"; //$NON-NLS-1$
25
  public static final String ELEM_PERSPECTIVE = "perspective"; //$NON-NLS-1$
21
  public static final String ELEM_VIEW = "view"; //$NON-NLS-1$
26
  public static final String ELEM_VIEW = "view"; //$NON-NLS-1$
27
  public static final String ELEM_BRANDING = "branding"; //$NON-NLS-1$
28
  public static final String ELEM_PRESENTATIONFACTORY = "presentationFactory"; //$NON-NLS-1$
29
  public static final String ELEM_DEFAULTSTACKPRESENTATION 
30
    = "defaultStackPresentation"; //$NON-NLS-1$
22
  
31
  
23
  public static final String XID_COMMANDS = "org.eclipse.ui.commands"; //$NON-NLS-1$
32
  public static final String XID_COMMANDS = "org.eclipse.ui.commands"; //$NON-NLS-1$
24
  public static final String XID_ENTRYPOINT = "org.eclipse.rap.ui.entrypoint"; //$NON-NLS-1$
33
  public static final String XID_ENTRYPOINT = "org.eclipse.rap.ui.entrypoint"; //$NON-NLS-1$
25
  public static final String XID_PERSPECTIVES = "org.eclipse.ui.perspectives"; //$NON-NLS-1$
34
  public static final String XID_PERSPECTIVES = "org.eclipse.ui.perspectives"; //$NON-NLS-1$
26
  public static final String XID_VIEWS = "org.eclipse.ui.views"; //$NON-NLS-1$
35
  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$
27
}
37
}
(-)src/org/eclipse/rap/internal/ui/templates/rap/ViewRAPWizard.java (+5 lines)
Lines 26-29 Link Here
26
  protected String getEntryPointName() {
26
  protected String getEntryPointName() {
27
    return "view"; //$NON-NLS-1$
27
    return "view"; //$NON-NLS-1$
28
  }
28
  }
29
30
  protected String getServletName() {
31
    return "view";
32
  }
33
  
29
}
34
}
(-)src/org/eclipse/rap/internal/ui/templates/rap/HelloRAPWizard.java (+5 lines)
Lines 26-29 Link Here
26
  protected String getEntryPointName() {
26
  protected String getEntryPointName() {
27
	  return "hello"; //$NON-NLS-1$
27
	  return "hello"; //$NON-NLS-1$
28
  }
28
  }
29
30
  protected String getServletName() {
31
    return "hello";
32
  }
33
  
29
}
34
}
(-)src/org/eclipse/rap/internal/ui/templates/rap/AbstractRAPWizard.java (+4 lines)
Lines 35-40 Link Here
35
  private static final String CHARSET = "ISO-8859-1"; //$NON-NLS-1$
35
  private static final String CHARSET = "ISO-8859-1"; //$NON-NLS-1$
36
36
37
  private static final String TAG_ENTRY_POINT = "${entryPoint}"; //$NON-NLS-1$
37
  private static final String TAG_ENTRY_POINT = "${entryPoint}"; //$NON-NLS-1$
38
  private static final String TAG_SERVLET_NAME = "${servletName}"; //$NON-NLS-1$
38
  private static final String TAG_PLUGIN_ID = "${pluginId}"; //$NON-NLS-1$
39
  private static final String TAG_PLUGIN_ID = "${pluginId}"; //$NON-NLS-1$
39
  private static final String TAG_PROJECT_NAME = "${projectName}"; //$NON-NLS-1$
40
  private static final String TAG_PROJECT_NAME = "${projectName}"; //$NON-NLS-1$
40
41
Lines 52-57 Link Here
52
  }
53
  }
53
54
54
  protected abstract String getEntryPointName();
55
  protected abstract String getEntryPointName();
56
  
57
  protected abstract String getServletName();
55
58
56
  ////////////////////////////
59
  ////////////////////////////
57
  // Copy launch config helper
60
  // Copy launch config helper
Lines 100-105 Link Here
100
    String pluginId = model.getPluginBase().getId();
103
    String pluginId = model.getPluginBase().getId();
101
    replacePlaceholder( buffer, TAG_PLUGIN_ID, pluginId );
104
    replacePlaceholder( buffer, TAG_PLUGIN_ID, pluginId );
102
    replacePlaceholder( buffer, TAG_ENTRY_POINT, getEntryPointName() );
105
    replacePlaceholder( buffer, TAG_ENTRY_POINT, getEntryPointName() );
106
    replacePlaceholder( buffer, TAG_SERVLET_NAME, getServletName() );
103
    return new ByteArrayInputStream( buffer.toString().getBytes() );
107
    return new ByteArrayInputStream( buffer.toString().getBytes() );
104
  }
108
  }
105
109
(-)src/org/eclipse/rap/internal/ui/templates/rap/launch.template (-2 / +2 lines)
Lines 19-29 Link Here
19
<stringAttribute key="org.eclipse.rap.launch.libraryVariant" value="STANDARD"/>
19
<stringAttribute key="org.eclipse.rap.launch.libraryVariant" value="STANDARD"/>
20
<stringAttribute key="org.eclipse.rap.launch.logLevel" value="OFF"/>
20
<stringAttribute key="org.eclipse.rap.launch.logLevel" value="OFF"/>
21
<intAttribute key="org.eclipse.rap.launch.port" value="10080"/>
21
<intAttribute key="org.eclipse.rap.launch.port" value="10080"/>
22
<stringAttribute key="org.eclipse.rap.launch.servletName" value="rap"/>
22
<stringAttribute key="org.eclipse.rap.launch.servletName" value="${servletName}"/>
23
<booleanAttribute key="org.eclipse.rap.launch.terminatePrevious" value="true"/>
23
<booleanAttribute key="org.eclipse.rap.launch.terminatePrevious" value="true"/>
24
<booleanAttribute key="org.eclipse.rap.launch.useManualPort" value="false"/>
24
<booleanAttribute key="org.eclipse.rap.launch.useManualPort" value="false"/>
25
<stringAttribute key="pde.version" value="3.3"/>
25
<stringAttribute key="pde.version" value="3.3"/>
26
<stringAttribute key="target_bundles" value="com.ibm.icu.base@default:default,org.eclipse.core.databinding@default:default,org.eclipse.core.databinding.beans@default:default,javax.servlet@default:default,org.apache.commons.logging@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.runtime@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.common@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclipse.equinox.http.registry@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.osgi@default:default,org.eclipse.osgi.services@default:default,org.eclipse.rap.demo@default:default,org.eclipse.rap.demo.databinding@default:default,org.eclipse.rap.jface@default:default,org.eclipse.rap.jface.databinding@default:default,org.eclipse.rap.rwt@default:default,org.eclipse.rap.rwt.q07@default:default,org.eclipse.rap.source@default:default,org.eclipse.rap.ui@default:default,org.eclipse.rap.ui.forms@default:default,org.eclipse.rap.ui.views@default:default,org.eclipse.rap.ui.workbench@default:default,org.mortbay.jetty.server@default:default,org.mortbay.jetty.util@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.help@default:default"/>
26
<stringAttribute key="target_bundles" value="com.ibm.icu.base@default:default,org.eclipse.core.databinding@default:default,org.eclipse.core.databinding.beans@default:default,javax.servlet@default:default,org.apache.commons.logging@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.runtime@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.common@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclipse.equinox.http.registry@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.osgi@default:default,org.eclipse.osgi.services@default:default,org.eclipse.rap.demo@default:default,org.eclipse.rap.demo.databinding@default:default,org.eclipse.rap.jface@default:default,org.eclipse.rap.jface.databinding@default:default,org.eclipse.rap.rwt@default:default,org.eclipse.rap.rwt.q07@default:default,org.eclipse.rap.source@default:default,org.eclipse.rap.design.example@default:default,org.eclipse.rap.ui@default:default,org.eclipse.rap.ui.forms@default:default,org.eclipse.rap.ui.views@default:default,org.eclipse.rap.ui.workbench@default:default,org.mortbay.jetty.server@default:default,org.mortbay.jetty.util@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.help@default:default"/>
27
<booleanAttribute key="tracing" value="false"/>
27
<booleanAttribute key="tracing" value="false"/>
28
<booleanAttribute key="useDefaultConfigArea" value="true"/>
28
<booleanAttribute key="useDefaultConfigArea" value="true"/>
29
<stringAttribute key="workspace_bundles" value="${pluginId}@default:default"/>
29
<stringAttribute key="workspace_bundles" value="${pluginId}@default:default"/>
(-)src/org/eclipse/rap/internal/ui/templates/rap/ViewRAPTemplate.java (-2 / +26 lines)
Lines 13-18 Link Here
13
import org.eclipse.jface.wizard.WizardPage;
13
import org.eclipse.jface.wizard.WizardPage;
14
import org.eclipse.pde.core.plugin.IPluginElement;
14
import org.eclipse.pde.core.plugin.IPluginElement;
15
import org.eclipse.pde.core.plugin.IPluginExtension;
15
import org.eclipse.pde.core.plugin.IPluginExtension;
16
import org.eclipse.rap.internal.ui.templates.TemplateUtil;
16
import org.eclipse.rap.internal.ui.templates.XmlNames;
17
import org.eclipse.rap.internal.ui.templates.XmlNames;
17
18
18
class ViewRAPTemplate extends AbstractRAPTemplate {
19
class ViewRAPTemplate extends AbstractRAPTemplate {
Lines 40-45 Link Here
40
    createEntryPointsExtension();
41
    createEntryPointsExtension();
41
    createPerspectivesExtension();
42
    createPerspectivesExtension();
42
    createViewsExtension();
43
    createViewsExtension();
44
    createBrandingExtension();
43
  }
45
  }
44
46
45
  // helping methods
47
  // helping methods
Lines 50-63 Link Here
50
    IPluginElement element = createElement( extension );
52
    IPluginElement element = createElement( extension );
51
    element.setName( XmlNames.ELEM_ENTRYPOINT );
53
    element.setName( XmlNames.ELEM_ENTRYPOINT );
52
    element.setAttribute( XmlNames.ATT_CLASS, 
54
    element.setAttribute( XmlNames.ATT_CLASS, 
53
                          getPackageName() + "." + getApplicationName() ); //$NON-NLS-1$
55
                          getEntrypointId() ); //$NON-NLS-1$
54
    element.setAttribute( XmlNames.ATT_ID,
56
    element.setAttribute( XmlNames.ATT_ID,
55
                          getPackageName() + "." + getApplicationName() ); //$NON-NLS-1$
57
                          getEntrypointId() ); //$NON-NLS-1$
56
    element.setAttribute( XmlNames.ATT_PARAMETER, "view" ); //$NON-NLS-1$
58
    element.setAttribute( XmlNames.ATT_PARAMETER, "view" ); //$NON-NLS-1$
57
    extension.add( element );
59
    extension.add( element );
58
    addExtensionToPlugin( extension );
60
    addExtensionToPlugin( extension );
59
  }
61
  }
60
62
63
  private String getEntrypointId() {
64
    return getPackageName() + "." + getApplicationName();
65
  }
66
61
  private void createPerspectivesExtension() throws CoreException {
67
  private void createPerspectivesExtension() throws CoreException {
62
    IPluginExtension extension = createExtension( XmlNames.XID_PERSPECTIVES,
68
    IPluginExtension extension = createExtension( XmlNames.XID_PERSPECTIVES,
63
                                                  true );
69
                                                  true );
Lines 83-88 Link Here
83
    extension.add( element );
89
    extension.add( element );
84
    addExtensionToPlugin( extension );
90
    addExtensionToPlugin( extension );
85
  }
91
  }
92
  
93
  private void createBrandingExtension() throws CoreException {
94
    IPluginExtension extension = createExtension( XmlNames.XID_BRANDING, true );
95
    IPluginElement brandingElement = createElement( extension );
96
    // create branding
97
    brandingElement.setName( XmlNames.ELEM_BRANDING );    
98
    String brandingId = getPackageName() + ".branding"; //$NON-NLS-1$
99
    brandingElement.setAttribute( XmlNames.ATT_ID, brandingId );
100
    brandingElement.setAttribute( XmlNames.ATT_SERVLET, "view" );
101
    brandingElement.setAttribute( XmlNames.ATT_DEFAULT_ENTRYPOINT, 
102
                                  getEntrypointId() );
103
    brandingElement.setAttribute( XmlNames.ATT_THEME_ID, 
104
                                  TemplateUtil.FANCY_THEME_ID );
105
    brandingElement.setAttribute( XmlNames.ATT_TITLE, "RAP Single View" );
106
    // write extension
107
    extension.add( brandingElement );
108
    addExtensionToPlugin( extension );
109
  }
86
110
87
  private void createTemplateOptions() {
111
  private void createTemplateOptions() {
88
    addOption( KEY_WINDOW_TITLE,
112
    addOption( KEY_WINDOW_TITLE,
(-)src/org/eclipse/rap/internal/ui/templates/rap/HelloRAPTemplate.java (-2 / +26 lines)
Lines 13-18 Link Here
13
import org.eclipse.jface.wizard.WizardPage;
13
import org.eclipse.jface.wizard.WizardPage;
14
import org.eclipse.pde.core.plugin.IPluginElement;
14
import org.eclipse.pde.core.plugin.IPluginElement;
15
import org.eclipse.pde.core.plugin.IPluginExtension;
15
import org.eclipse.pde.core.plugin.IPluginExtension;
16
import org.eclipse.rap.internal.ui.templates.TemplateUtil;
16
import org.eclipse.rap.internal.ui.templates.XmlNames;
17
import org.eclipse.rap.internal.ui.templates.XmlNames;
17
18
18
class HelloRAPTemplate extends AbstractRAPTemplate {
19
class HelloRAPTemplate extends AbstractRAPTemplate {
Lines 39-44 Link Here
39
  {
40
  {
40
    createEntryPointsExtension();
41
    createEntryPointsExtension();
41
    createPerspectivesExtension();
42
    createPerspectivesExtension();
43
    createBrandingExtension();
42
  }
44
  }
43
45
44
  // helping methods
46
  // helping methods
Lines 49-62 Link Here
49
    IPluginElement element = createElement( extension );
51
    IPluginElement element = createElement( extension );
50
    element.setName( XmlNames.ELEM_ENTRYPOINT );
52
    element.setName( XmlNames.ELEM_ENTRYPOINT );
51
    element.setAttribute( XmlNames.ATT_CLASS, 
53
    element.setAttribute( XmlNames.ATT_CLASS, 
52
                          getPackageName() + "." + getApplicationName() ); //$NON-NLS-1$
54
                          getEntrypointId() ); //$NON-NLS-1$
53
    element.setAttribute( XmlNames.ATT_ID,
55
    element.setAttribute( XmlNames.ATT_ID,
54
                          getPackageName() + "." + getApplicationName() ); //$NON-NLS-1$
56
                          getEntrypointId() ); //$NON-NLS-1$
55
    element.setAttribute( XmlNames.ATT_PARAMETER, "hello" ); //$NON-NLS-1$
57
    element.setAttribute( XmlNames.ATT_PARAMETER, "hello" ); //$NON-NLS-1$
56
    extension.add( element );
58
    extension.add( element );
57
    addExtensionToPlugin( extension );
59
    addExtensionToPlugin( extension );
58
  }
60
  }
59
61
62
  private String getEntrypointId() {
63
    return getPackageName() + "." + getApplicationName();
64
  }
65
60
  private void createPerspectivesExtension() throws CoreException {
66
  private void createPerspectivesExtension() throws CoreException {
61
    IPluginExtension extension 
67
    IPluginExtension extension 
62
      = createExtension( XmlNames.XID_PERSPECTIVES, true );
68
      = createExtension( XmlNames.XID_PERSPECTIVES, true );
Lines 72-77 Link Here
72
    extension.add( element );
78
    extension.add( element );
73
    addExtensionToPlugin( extension );
79
    addExtensionToPlugin( extension );
74
  }
80
  }
81
  
82
  private void createBrandingExtension() throws CoreException {
83
    IPluginExtension extension = createExtension( XmlNames.XID_BRANDING, true );
84
    IPluginElement brandingElement = createElement( extension );
85
    // create branding
86
    brandingElement.setName( XmlNames.ELEM_BRANDING );    
87
    String brandingId = getPackageName() + ".branding"; //$NON-NLS-1$
88
    brandingElement.setAttribute( XmlNames.ATT_ID, brandingId );
89
    brandingElement.setAttribute( XmlNames.ATT_SERVLET, "hello" );
90
    brandingElement.setAttribute( XmlNames.ATT_DEFAULT_ENTRYPOINT, 
91
                                  getEntrypointId() );
92
    brandingElement.setAttribute( XmlNames.ATT_THEME_ID, 
93
                                  TemplateUtil.BUSINESS_THEME_ID );
94
    brandingElement.setAttribute( XmlNames.ATT_TITLE, "RAP Hello World" );
95
    // write extension
96
    extension.add( brandingElement );
97
    addExtensionToPlugin( extension );
98
  }
75
99
76
  private void createTemplateOptions() {
100
  private void createTemplateOptions() {
77
    addOption( KEY_WINDOW_TITLE,
101
    addOption( KEY_WINDOW_TITLE,
(-)src/org/eclipse/rap/internal/ui/templates/rap/MailRAPTemplate.java (-2 / +41 lines)
Lines 13-18 Link Here
13
import org.eclipse.jface.wizard.WizardPage;
13
import org.eclipse.jface.wizard.WizardPage;
14
import org.eclipse.pde.core.plugin.IPluginElement;
14
import org.eclipse.pde.core.plugin.IPluginElement;
15
import org.eclipse.pde.core.plugin.IPluginExtension;
15
import org.eclipse.pde.core.plugin.IPluginExtension;
16
import org.eclipse.rap.internal.ui.templates.TemplateUtil;
16
import org.eclipse.rap.internal.ui.templates.XmlNames;
17
import org.eclipse.rap.internal.ui.templates.XmlNames;
17
18
18
class MailRAPTemplate extends AbstractRAPTemplate {
19
class MailRAPTemplate extends AbstractRAPTemplate {
Lines 47-52 Link Here
47
    createPerspectivesExtension();
48
    createPerspectivesExtension();
48
    createViewsExtension();
49
    createViewsExtension();
49
    createCommandsExtension();
50
    createCommandsExtension();
51
    createBrandingExtension();
50
  }
52
  }
51
53
52
  // helping methods
54
  // helping methods
Lines 95-108 Link Here
95
    IPluginElement element = createElement( extension );
97
    IPluginElement element = createElement( extension );
96
    element.setName( XmlNames.ELEM_ENTRYPOINT );
98
    element.setName( XmlNames.ELEM_ENTRYPOINT );
97
    element.setAttribute( XmlNames.ATT_CLASS,
99
    element.setAttribute( XmlNames.ATT_CLASS,
98
                          getPackageName() + "." + getApplicationName() ); //$NON-NLS-1$
100
                          getEntrypointId() ); //$NON-NLS-1$
99
    element.setAttribute( XmlNames.ATT_ID,
101
    element.setAttribute( XmlNames.ATT_ID,
100
                          getPackageName() + "." + getApplicationName() ); //$NON-NLS-1$
102
                          getEntrypointId() ); //$NON-NLS-1$
101
    element.setAttribute( XmlNames.ATT_PARAMETER, "mail" ); //$NON-NLS-1$
103
    element.setAttribute( XmlNames.ATT_PARAMETER, "mail" ); //$NON-NLS-1$
102
    extension.add( element );
104
    extension.add( element );
103
    addExtensionToPlugin( extension );
105
    addExtensionToPlugin( extension );
104
  }
106
  }
105
107
108
  private String getEntrypointId() {
109
    return getPackageName() + "." + getApplicationName();
110
  }
111
106
  private void createPerspectivesExtension() throws CoreException {
112
  private void createPerspectivesExtension() throws CoreException {
107
    IPluginExtension extension = createExtension( XmlNames.XID_PERSPECTIVES,
113
    IPluginExtension extension = createExtension( XmlNames.XID_PERSPECTIVES,
108
                                                  true );
114
                                                  true );
Lines 143-148 Link Here
143
149
144
    addExtensionToPlugin( extension );
150
    addExtensionToPlugin( extension );
145
  }
151
  }
152
  
153
  private void createBrandingExtension() throws CoreException {
154
    IPluginExtension extension = createExtension( XmlNames.XID_BRANDING, true );
155
    IPluginElement brandingElement = createElement( extension );
156
    // create branding
157
    brandingElement.setName( XmlNames.ELEM_BRANDING );    
158
    String brandingId = getPackageName() + ".branding"; //$NON-NLS-1$
159
    brandingElement.setAttribute( XmlNames.ATT_ID, brandingId );
160
    brandingElement.setAttribute( XmlNames.ATT_SERVLET, "mail" );
161
    brandingElement.setAttribute( XmlNames.ATT_DEFAULT_ENTRYPOINT, 
162
                                  getEntrypointId() );
163
    brandingElement.setAttribute( XmlNames.ATT_THEME_ID, 
164
                                  TemplateUtil.BUSINESS_THEME_ID );
165
    brandingElement.setAttribute( XmlNames.ATT_TITLE, "RAP Maildemo" );
166
    // create presentationFactory
167
    IPluginElement presentationElement = createElement( extension );
168
    presentationElement.setName( XmlNames.ELEM_PRESENTATIONFACTORY );   
169
    presentationElement.setAttribute( XmlNames.ATT_ID, 
170
                                      TemplateUtil.BUSINESS_FACTORY_ID );
171
    presentationElement.setAttribute( XmlNames.ATT_DEFAULT_LAYOUT, 
172
                                      TemplateUtil.BUSINESS_LAYOUT_ID );
173
    presentationElement.setAttribute( XmlNames.ATT_NAME, 
174
                                      "Business PresentationFactory" );
175
    brandingElement.add( presentationElement );
176
    // create defaultStackPresentation
177
    IPluginElement stackElement = createElement( extension );
178
    stackElement.setName( XmlNames.ELEM_DEFAULTSTACKPRESENTATION );
179
    stackElement.setAttribute( XmlNames.ATT_ID, TemplateUtil.STACK_ID );
180
    presentationElement.add( stackElement );
181
    // write extension
182
    extension.add( brandingElement );
183
    addExtensionToPlugin( extension );
184
  }
146
185
147
  private void createTemplateOptions() {
186
  private void createTemplateOptions() {
148
    addOption( KEY_WINDOW_TITLE,
187
    addOption( KEY_WINDOW_TITLE,
(-)src/org/eclipse/rap/internal/ui/templates/rap/MailRAPWizard.java (+4 lines)
Lines 26-29 Link Here
26
  protected String getEntryPointName() {
26
  protected String getEntryPointName() {
27
    return "mail"; //$NON-NLS-1$
27
    return "mail"; //$NON-NLS-1$
28
  }
28
  }
29
30
  protected String getServletName() {
31
    return "mail";
32
  }
29
}
33
}
(-)plugin.properties (+3 lines)
Lines 20-25 Link Here
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.rap.ui.entrypoint</li>\
22
<li>org.eclipse.ui.perspectives</li>\
22
<li>org.eclipse.ui.perspectives</li>\
23
<li>org.eclipse.rap.ui.branding</li>\
23
<p>This code will need the <b>RAP target</b> to compile.</p>
24
<p>This code will need the <b>RAP target</b> to compile.</p>
24
25
25
viewRAP.name = RAP Application with a View
26
viewRAP.name = RAP Application with a View
Lines 29-34 Link Here
29
<li>org.eclipse.rap.ui.entrypoint</li>\
30
<li>org.eclipse.rap.ui.entrypoint</li>\
30
<li>org.eclipse.ui.perspectives</li>\
31
<li>org.eclipse.ui.perspectives</li>\
31
<li>org.eclipse.ui.views</li>\
32
<li>org.eclipse.ui.views</li>\
33
<li>org.eclipse.rap.ui.branding</li>\
32
<p>This code will need the <b>RAP target</b> to compile.</p>
34
<p>This code will need the <b>RAP target</b> to compile.</p>
33
35
34
mailRAP.name = RAP Mail Template
36
mailRAP.name = RAP Mail Template
Lines 43-46 Link Here
43
<li>org.eclipse.ui.perspectives</li>\
45
<li>org.eclipse.ui.perspectives</li>\
44
<li>org.eclipse.ui.views</li>\
46
<li>org.eclipse.ui.views</li>\
45
<li>org.eclipse.ui.commands</li>\
47
<li>org.eclipse.ui.commands</li>\
48
<li>org.eclipse.rap.ui.branding</li>\
46
<p>This code will need the <b>RAP target</b> to compile.</p>
49
<p>This code will need the <b>RAP target</b> to compile.</p>

Return to bug 288727