|
Lines 44-50
Link Here
|
| 44 |
protected void updateModel( final IProgressMonitor monitor ) |
44 |
protected void updateModel( final IProgressMonitor monitor ) |
| 45 |
throws CoreException |
45 |
throws CoreException |
| 46 |
{ |
46 |
{ |
| 47 |
createEntryPointsExtension(); |
47 |
createApplicationExtension(); |
| 48 |
createPerspectivesExtension(); |
48 |
createPerspectivesExtension(); |
| 49 |
createViewsExtension(); |
49 |
createViewsExtension(); |
| 50 |
createCommandsExtension(); |
50 |
createCommandsExtension(); |
|
Lines 91-111
Link Here
|
| 91 |
extension.add( element ); |
91 |
extension.add( element ); |
| 92 |
} |
92 |
} |
| 93 |
|
93 |
|
| 94 |
private void createEntryPointsExtension() throws CoreException { |
94 |
private void createApplicationExtension() throws CoreException { |
| 95 |
IPluginExtension extension = createExtension( XmlNames.XID_ENTRYPOINT, |
95 |
IPluginExtension extension = createExtension( XmlNames.XID_APPLICATION, |
| 96 |
true ); |
96 |
true ); |
| 97 |
IPluginElement element = createElement( extension ); |
97 |
extension.setId( "mail" ); |
| 98 |
element.setName( XmlNames.ELEM_ENTRYPOINT ); |
98 |
IPluginElement applicationElement = createElement( extension ); |
| 99 |
element.setAttribute( XmlNames.ATT_CLASS, |
99 |
applicationElement.setName( XmlNames.ELEM_APPLICATION ); |
| 100 |
getEntrypointId() ); //$NON-NLS-1$ |
100 |
applicationElement.setAttribute( XmlNames.ATT_VISIBLE, |
| 101 |
element.setAttribute( XmlNames.ATT_ID, |
101 |
getVisibility() ); //$NON-NLS-1$ |
| 102 |
getEntrypointId() ); //$NON-NLS-1$ |
102 |
applicationElement.setAttribute( XmlNames.ATT_CARDINALITY, |
| 103 |
element.setAttribute( XmlNames.ATT_PARAMETER, "mail" ); //$NON-NLS-1$ |
103 |
getCardinality() ); //$NON-NLS-1$ |
| 104 |
extension.add( element ); |
104 |
applicationElement.setAttribute( XmlNames.ATT_THREAD, |
|
|
105 |
getThread() ); //$NON-NLS-1$ |
| 106 |
extension.add( applicationElement ); |
| 107 |
IPluginElement runElement = createElement( extension ); |
| 108 |
runElement.setName( XmlNames.ELEM_RUN ); //$NON-NLS-1$ |
| 109 |
runElement.setAttribute( XmlNames.ATT_CLASS, getFullApplicationId() ); //$NON-NLS-1$ |
| 110 |
applicationElement.add( runElement ); |
| 105 |
addExtensionToPlugin( extension ); |
111 |
addExtensionToPlugin( extension ); |
| 106 |
} |
112 |
} |
| 107 |
|
113 |
|
| 108 |
private String getEntrypointId() { |
114 |
private String getThread() { |
|
|
115 |
return "main"; //$NON-NLS-1$ |
| 116 |
} |
| 117 |
|
| 118 |
private String getCardinality() { |
| 119 |
return "singleton-global"; //$NON-NLS-1$ |
| 120 |
} |
| 121 |
|
| 122 |
private String getVisibility() { |
| 123 |
return "true"; //$NON-NLS-1$ |
| 124 |
} |
| 125 |
|
| 126 |
private String getFullApplicationId() { |
| 109 |
return getPackageName() + "." + getApplicationName(); |
127 |
return getPackageName() + "." + getApplicationName(); |
| 110 |
} |
128 |
} |
| 111 |
|
129 |
|
|
Lines 159-165
Link Here
|
| 159 |
brandingElement.setAttribute( XmlNames.ATT_ID, brandingId ); |
177 |
brandingElement.setAttribute( XmlNames.ATT_ID, brandingId ); |
| 160 |
brandingElement.setAttribute( XmlNames.ATT_SERVLET, "mail" ); |
178 |
brandingElement.setAttribute( XmlNames.ATT_SERVLET, "mail" ); |
| 161 |
brandingElement.setAttribute( XmlNames.ATT_DEFAULT_ENTRYPOINT, |
179 |
brandingElement.setAttribute( XmlNames.ATT_DEFAULT_ENTRYPOINT, |
| 162 |
getEntrypointId() ); |
180 |
getFullApplicationId() ); |
| 163 |
brandingElement.setAttribute( XmlNames.ATT_THEME_ID, |
181 |
brandingElement.setAttribute( XmlNames.ATT_THEME_ID, |
| 164 |
TemplateUtil.BUSINESS_THEME_ID ); |
182 |
TemplateUtil.BUSINESS_THEME_ID ); |
| 165 |
brandingElement.setAttribute( XmlNames.ATT_TITLE, "RAP Maildemo" ); |
183 |
brandingElement.setAttribute( XmlNames.ATT_TITLE, "RAP Maildemo" ); |