@@ -141,8 +141,9 @@ protected void updateModel(IProgressMonitor monitor) throws CoreException {
141
141
+ "." + getStringOption (KEY_BUILDER_CLASS_NAME )); //$NON-NLS-1$
142
142
builder .add (run );
143
143
144
- if (!extension1 .isInTheModel ())
144
+ if (!extension1 .isInTheModel ()) {
145
145
plugin .add (extension1 );
146
+ }
146
147
147
148
// Nature
148
149
IPluginExtension extension2 = createExtension ("org.eclipse.core.resources.natures" , true ); //$NON-NLS-1$
@@ -165,8 +166,9 @@ protected void updateModel(IProgressMonitor monitor) throws CoreException {
165
166
+ "." + getStringOption (KEY_BUILDER_ID )); //$NON-NLS-1$
166
167
extension2 .add (builder2 );
167
168
168
- if (!extension2 .isInTheModel ())
169
+ if (!extension2 .isInTheModel ()) {
169
170
plugin .add (extension2 );
171
+ }
170
172
171
173
// Popup Action
172
174
if (actionOption .isSelected ()) {
@@ -190,8 +192,9 @@ protected void updateModel(IProgressMonitor monitor) throws CoreException {
190
192
command .setAttribute ("name" , PDETemplateMessages .BuilderTemplate_commandName + getStringOption (KEY_NATURE_NAME )); //$NON-NLS-1$
191
193
extension3 .add (command );
192
194
193
- if (!extension3 .isInTheModel ())
195
+ if (!extension3 .isInTheModel ()) {
194
196
plugin .add (extension3 );
197
+ }
195
198
196
199
IPluginExtension extension4 = createExtension ("org.eclipse.ui.menus" , true ); //$NON-NLS-1$
197
200
IPluginElement menuContribution = factory .createElement (extension4 );
@@ -282,8 +285,9 @@ protected void updateModel(IProgressMonitor monitor) throws CoreException {
282
285
+ "." + getStringOption (KEY_NATURE_ID )); //$NON-NLS-1$
283
286
not .add (test2 );
284
287
285
- if (!extension4 .isInTheModel ())
288
+ if (!extension4 .isInTheModel ()) {
286
289
plugin .add (extension4 );
290
+ }
287
291
}
288
292
289
293
// Marker
@@ -302,27 +306,31 @@ protected void updateModel(IProgressMonitor monitor) throws CoreException {
302
306
persistent .setAttribute ("value" , "true" ); //$NON-NLS-1$ //$NON-NLS-2$
303
307
extension8 .add (persistent );
304
308
305
- if (!extension8 .isInTheModel ())
309
+ if (!extension8 .isInTheModel ()) {
306
310
plugin .add (extension8 );
311
+ }
307
312
}
308
313
309
314
@ Override
310
315
public IPluginReference [] getDependencies (String schemaVersion ) {
311
316
ArrayList <PluginReference > result = new ArrayList <>();
312
317
result .add (new PluginReference ("org.eclipse.core.resources" )); //$NON-NLS-1$
313
- if (schemaVersion != null )
318
+ if (schemaVersion != null ) {
314
319
result .add (new PluginReference ("org.eclipse.core.runtime" )); //$NON-NLS-1$
315
- if (actionOption .isSelected ())
320
+ }
321
+ if (actionOption .isSelected ()) {
316
322
result .add (new PluginReference ("org.eclipse.ui" )); //$NON-NLS-1$
323
+ }
317
324
318
325
return result .toArray (new IPluginReference [result .size ()]);
319
326
}
320
327
321
328
@ Override
322
329
protected String getFormattedPackageName (String id ) {
323
330
String packageName = super .getFormattedPackageName (id );
324
- if (packageName .length () != 0 )
331
+ if (packageName .length () != 0 ) {
325
332
return packageName + ".builder" ; //$NON-NLS-1$
333
+ }
326
334
return "builder" ; //$NON-NLS-1$
327
335
}
328
336
0 commit comments