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 81206 Details for
Bug 206765
PDE shoud ignore non-osgi Manifests in workspace projects
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
revised fix
bug206765-2.txt (text/plain), 3.63 KB, created by
Brian Bauman
on 2007-10-25 17:39:51 EDT
(
hide
)
Description:
revised fix
Filename:
MIME Type:
Creator:
Brian Bauman
Created:
2007-10-25 17:39:51 EDT
Size:
3.63 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.pde.core >Index: src/org/eclipse/pde/internal/core/PDEAuxiliaryState.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/PDEAuxiliaryState.java,v >retrieving revision 1.5 >diff -u -r1.5 PDEAuxiliaryState.java >--- src/org/eclipse/pde/internal/core/PDEAuxiliaryState.java 8 Jun 2007 16:06:51 -0000 1.5 >+++ src/org/eclipse/pde/internal/core/PDEAuxiliaryState.java 25 Oct 2007 21:30:08 -0000 >@@ -227,6 +227,8 @@ > for (int i = 0; i < models.length; i++) { > IPluginBase plugin = models[i].getPluginBase(); > BundleDescription desc = models[i].getBundleDescription(); >+ if (desc == null) >+ continue; > Element element = doc.createElement(ELEMENT_BUNDLE); > element.setAttribute(ATTR_BUNDLE_ID, Long.toString(desc.getBundleId())); > element.setAttribute(ATTR_PROJECT, models[i].getUnderlyingResource().getProject().getName()); >Index: src/org/eclipse/pde/internal/core/PDEState.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/PDEState.java,v >retrieving revision 1.99 >diff -u -r1.99 PDEState.java >--- src/org/eclipse/pde/internal/core/PDEState.java 15 Oct 2007 22:34:54 -0000 1.99 >+++ src/org/eclipse/pde/internal/core/PDEState.java 25 Oct 2007 21:30:08 -0000 >@@ -340,7 +340,9 @@ > File dir = new File(DIR, Long.toString(timestamp) + ".workspace"); //$NON-NLS-1$ > State state = stateObjectFactory.createState(false); > for (int i = 0; i < models.length; i++) { >- state.addBundle(models[i].getBundleDescription()); >+ BundleDescription desc = models[i].getBundleDescription(); >+ if (desc != null) >+ state.addBundle(desc); > } > saveState(state, dir); > PDEAuxiliaryState.writePluginInfo(models, dir); >@@ -363,16 +365,21 @@ > } > > private boolean shouldSaveState(IPluginModelBase[] models) { >+ int nonOSGiModels = 0; > for (int i = 0; i < models.length; i++) { > String id = models[i].getPluginBase().getId(); >- if (id == null >- || id.trim().length() == 0 >+ if (id == null) { >+ // not an OSGi bundle >+ ++nonOSGiModels; >+ continue; >+ } >+ if (id.trim().length() == 0 > || !models[i].isLoaded() > || !models[i].isInSync() > || models[i].getBundleDescription() == null) > return false; > } >- return models.length > 0; >+ return models.length - nonOSGiModels > 0; > } > > private void clearStaleStates(String extension, long latest) { >Index: src/org/eclipse/pde/internal/core/WorkspacePluginModelManager.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/WorkspacePluginModelManager.java,v >retrieving revision 1.8 >diff -u -r1.8 WorkspacePluginModelManager.java >--- src/org/eclipse/pde/internal/core/WorkspacePluginModelManager.java 29 Aug 2007 19:03:59 -0000 1.8 >+++ src/org/eclipse/pde/internal/core/WorkspacePluginModelManager.java 25 Oct 2007 21:30:08 -0000 >@@ -434,6 +434,13 @@ > IProject project = models[i].getUnderlyingResource().getProject(); > fModels.put(project, models[i]); > } >+ IProject[] projects = PDECore.getWorkspace().getRoot().getProjects(); >+ for (int i = 0; i < projects.length; i++) { >+ // if any projects contained Manifest files and were not included in the PDEState, >+ // we should create models for them now >+ if (!fModels.containsKey(projects[i]) && isInterestingProject(projects[i])) >+ createModel(projects[i], false); >+ } > addListeners(); > } >
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 206765
:
80691
|
81091
| 81206 |
81209