|
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" ); |