View | Details | Raw Unified | Return to bug 191769 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/pde/internal/ui/pderesources.properties (+1 lines)
Lines 1334-1339 Link Here
1334
PluginWorkingSet_deselectAll_label=Dese&lect All
1334
PluginWorkingSet_deselectAll_label=Dese&lect All
1335
PluginDevelopmentPage_presentation=Plug-in Manifest Editor Presentation
1335
PluginDevelopmentPage_presentation=Plug-in Manifest Editor Presentation
1336
PluginGeneralInfoSection_lazyStart=Activate this plug-in when one of its classes is loaded
1336
PluginGeneralInfoSection_lazyStart=Activate this plug-in when one of its classes is loaded
1337
PluginGeneralInfoSection_singleton=Make this plug-in a singleton
1337
PluginWorkingSet_deselectAll_toolTip=Unselect all of these plug-ins for this working set.
1338
PluginWorkingSet_deselectAll_toolTip=Unselect all of these plug-ins for this working set.
1338
PluginListPage_initializeFromPlugins=&Initialize from the plug-ins list:
1339
PluginListPage_initializeFromPlugins=&Initialize from the plug-ins list:
1339
PluginWorkingSet_noPluginsChecked=At least one plug-in must be checked
1340
PluginWorkingSet_noPluginsChecked=At least one plug-in must be checked
(-)src/org/eclipse/pde/internal/ui/PDEUIMessages.java (+2 lines)
Lines 2290-2295 Link Here
2290
2290
2291
	public static String PluginGeneralInfoSection_lazyStart;
2291
	public static String PluginGeneralInfoSection_lazyStart;
2292
2292
2293
	public static String PluginGeneralInfoSection_singleton;
2294
2293
	public static String ClassSearchParticipant_taskMessage;
2295
	public static String ClassSearchParticipant_taskMessage;
2294
2296
2295
	public static String CreateJREBundleHeaderResolution_desc;
2297
	public static String CreateJREBundleHeaderResolution_desc;
(-)src/org/eclipse/pde/internal/ui/editor/plugin/PluginGeneralInfoSection.java (+33 lines)
Lines 24-29 Link Here
24
import org.eclipse.pde.internal.core.ibundle.IBundleModel;
24
import org.eclipse.pde.internal.core.ibundle.IBundleModel;
25
import org.eclipse.pde.internal.core.ibundle.IManifestHeader;
25
import org.eclipse.pde.internal.core.ibundle.IManifestHeader;
26
import org.eclipse.pde.internal.core.text.bundle.Bundle;
26
import org.eclipse.pde.internal.core.text.bundle.Bundle;
27
import org.eclipse.pde.internal.core.text.bundle.BundleSymbolicNameHeader;
27
import org.eclipse.pde.internal.core.text.bundle.LazyStartHeader;
28
import org.eclipse.pde.internal.core.text.bundle.LazyStartHeader;
28
import org.eclipse.pde.internal.ui.PDEPlugin;
29
import org.eclipse.pde.internal.ui.PDEPlugin;
29
import org.eclipse.pde.internal.ui.PDEUIMessages;
30
import org.eclipse.pde.internal.ui.PDEUIMessages;
Lines 47-52 Link Here
47
48
48
	private FormEntry fClassEntry;
49
	private FormEntry fClassEntry;
49
	private Button fLazyStart;
50
	private Button fLazyStart;
51
	private Button fSingleton;
50
	private TypeFieldAssistDisposer fTypeFieldAssistDisposer;
52
	private TypeFieldAssistDisposer fTypeFieldAssistDisposer;
51
53
52
	public PluginGeneralInfoSection(PDEFormPage page, Composite parent) {
54
	public PluginGeneralInfoSection(PDEFormPage page, Composite parent) {
Lines 63-68 Link Here
63
		if (isBundle() && (formEditor instanceof ManifestEditor)
65
		if (isBundle() && (formEditor instanceof ManifestEditor)
64
				&& ((ManifestEditor) formEditor).isEquinox()) {
66
				&& ((ManifestEditor) formEditor).isEquinox()) {
65
			createLazyStart(parent, toolkit, actionBars);
67
			createLazyStart(parent, toolkit, actionBars);
68
			createSingleton(parent, toolkit, actionBars);
66
		}
69
		}
67
	}
70
	}
68
71
Lines 102-107 Link Here
102
		});
105
		});
103
	}
106
	}
104
	
107
	
108
	private void createSingleton(Composite parent, FormToolkit toolkit, IActionBars actionBars) {
109
		fSingleton = toolkit.createButton(parent, PDEUIMessages.PluginGeneralInfoSection_singleton, SWT.CHECK);
110
		TableWrapData td = new TableWrapData();
111
		td.colspan = 3;
112
		fSingleton.setLayoutData(td);
113
		fSingleton.setEnabled(isEditable());
114
		fSingleton.addSelectionListener(new SelectionAdapter() {
115
			public void widgetSelected(SelectionEvent e) {
116
				IManifestHeader header = getSingletonHeader();
117
				if (header instanceof BundleSymbolicNameHeader)
118
					((BundleSymbolicNameHeader)header).setSingleton(fSingleton.getSelection());
119
			}
120
		});
121
	}
122
	
105
	private void createClassEntry(Composite client, FormToolkit toolkit, IActionBars actionBars) {
123
	private void createClassEntry(Composite client, FormToolkit toolkit, IActionBars actionBars) {
106
		boolean isEditable = isEditable();
124
		boolean isEditable = isEditable();
107
		fClassEntry = new FormEntry(
125
		fClassEntry = new FormEntry(
Lines 180-185 Link Here
180
			fLazyStart.setSelection(header instanceof LazyStartHeader 
198
			fLazyStart.setSelection(header instanceof LazyStartHeader 
181
					&& ((LazyStartHeader)header).isLazyStart());
199
					&& ((LazyStartHeader)header).isLazyStart());
182
		}
200
		}
201
		if (fSingleton != null) {
202
			IManifestHeader header = getSingletonHeader();
203
			fSingleton.setSelection(header instanceof BundleSymbolicNameHeader 
204
					&& ((BundleSymbolicNameHeader)header).isSingleton());
205
		}
183
		super.refresh();
206
		super.refresh();
184
	}
207
	}
185
	
208
	
Lines 201-206 Link Here
201
		return ICoreConstants.ECLIPSE_AUTOSTART;
224
		return ICoreConstants.ECLIPSE_AUTOSTART;
202
	}
225
	}
203
226
227
	private IManifestHeader getSingletonHeader() {
228
		IBundle bundle = getBundle();
229
		if (bundle instanceof Bundle) {
230
			IManifestHeader header = bundle.getManifestHeader(org.osgi.framework.Constants.BUNDLE_SYMBOLICNAME);
231
			return header;
232
		}
233
		return null;
234
	}
235
236
	
204
	/* (non-Javadoc)
237
	/* (non-Javadoc)
205
	 * @see org.eclipse.pde.internal.ui.editor.plugin.GeneralInfoSection#dispose()
238
	 * @see org.eclipse.pde.internal.ui.editor.plugin.GeneralInfoSection#dispose()
206
	 */
239
	 */

Return to bug 191769