Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 82210 Details for
Bug 185477
[API] Allow client to add arbitrary headers to a manifest.mf generated by Template Wizard
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Patch to ConvertJavaToPluginOperation to support new manifest mechanism
patch-185447-example-ConvertJavaToPluginOperation.txt (text/plain), 3.18 KB, created by
Les Jones
on 2007-11-06 09:29:04 EST
(
hide
)
Description:
Patch to ConvertJavaToPluginOperation to support new manifest mechanism
Filename:
MIME Type:
Creator:
Les Jones
Created:
2007-11-06 09:29:04 EST
Size:
3.18 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.pde.ui >Index: src/org/eclipse/pde/internal/ui/wizards/tools/ConvertProjectToPluginOperation.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/tools/ConvertProjectToPluginOperation.java,v >retrieving revision 1.1 >diff -u -r1.1 ConvertProjectToPluginOperation.java >--- src/org/eclipse/pde/internal/ui/wizards/tools/ConvertProjectToPluginOperation.java 25 Oct 2007 22:57:38 -0000 1.1 >+++ src/org/eclipse/pde/internal/ui/wizards/tools/ConvertProjectToPluginOperation.java 6 Nov 2007 14:15:48 -0000 >@@ -28,12 +28,12 @@ > import org.eclipse.pde.core.build.IBuildEntry; > import org.eclipse.pde.core.plugin.IPluginBase; > import org.eclipse.pde.core.plugin.IPluginLibrary; >+import org.eclipse.pde.core.plugin.IPluginManifestInfo; > import org.eclipse.pde.core.plugin.IPluginModelFactory; > import org.eclipse.pde.internal.core.ICoreConstants; > import org.eclipse.pde.internal.core.TargetPlatformHelper; > import org.eclipse.pde.internal.core.build.WorkspaceBuildModel; > import org.eclipse.pde.internal.core.bundle.WorkspaceBundlePluginModel; >-import org.eclipse.pde.internal.core.ibundle.IBundle; > import org.eclipse.pde.internal.core.ibundle.IBundlePluginModelBase; > import org.eclipse.pde.internal.core.natures.PDE; > import org.eclipse.pde.internal.core.util.CoreUtility; >@@ -236,14 +236,15 @@ > > private void createManifestFile(IFile file, IProgressMonitor monitor) > throws CoreException { >- WorkspaceBundlePluginModel model = new WorkspaceBundlePluginModel(file, >- null); >+ WorkspaceBundlePluginModel model; >+ model = new WorkspaceBundlePluginModel(file, null); > model.load(); >- IBundle pluginBundle = model.getBundleModel().getBundle(); > >- String pluginId = pluginBundle.getHeader(Constants.BUNDLE_SYMBOLICNAME); >- String pluginName = pluginBundle.getHeader(Constants.BUNDLE_NAME); >- String pluginVersion = pluginBundle.getHeader(Constants.BUNDLE_VERSION); >+ IPluginManifestInfo manifestInfo = model.getPluginManifestInfo(); >+ >+ String pluginId = manifestInfo.getHeader(Constants.BUNDLE_SYMBOLICNAME); >+ String pluginName = manifestInfo.getHeader(Constants.BUNDLE_NAME); >+ String pluginVersion = manifestInfo.getHeader(Constants.BUNDLE_VERSION); > > boolean missingInfo = (pluginId == null || pluginName == null || pluginVersion == null); > >@@ -263,9 +264,9 @@ > pluginName = createInitialName(pluginId); > } > >- pluginBundle.setHeader(Constants.BUNDLE_SYMBOLICNAME, pluginId); >- pluginBundle.setHeader(Constants.BUNDLE_VERSION, pluginVersion); >- pluginBundle.setHeader(Constants.BUNDLE_NAME, pluginName); >+ manifestInfo.setHeader(Constants.BUNDLE_SYMBOLICNAME, pluginId); >+ manifestInfo.setHeader(Constants.BUNDLE_VERSION, pluginVersion); >+ manifestInfo.setHeader(Constants.BUNDLE_NAME, pluginName); > > if (missingInfo) { > IPluginModelFactory factory = model.getPluginFactory(); >@@ -283,7 +284,7 @@ > base.add(library); > } > if (TargetPlatformHelper.getTargetVersion() >= 3.1) >- pluginBundle.setHeader(Constants.BUNDLE_MANIFESTVERSION, "2"); //$NON-NLS-1$ >+ manifestInfo.setHeader(Constants.BUNDLE_MANIFESTVERSION, "2"); //$NON-NLS-1$ > } > > model.save();
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 185477
:
82209
|
82210
|
82311