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 153516 Details for
Bug 296487
Investigate using the PDE state for our workspace baseline
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
update
inc_2.patch (text/plain), 5.99 KB, created by
Michael Rennie
on 2009-12-01 14:36:55 EST
(
hide
)
Description:
update
Filename:
MIME Type:
Creator:
Michael Rennie
Created:
2009-12-01 14:36:55 EST
Size:
5.99 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.pde.api.tools >Index: src/org/eclipse/pde/api/tools/internal/model/ApiBaseline.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/ApiBaseline.java,v >retrieving revision 1.19 >diff -u -r1.19 ApiBaseline.java >--- src/org/eclipse/pde/api/tools/internal/model/ApiBaseline.java 30 Nov 2009 15:54:51 -0000 1.19 >+++ src/org/eclipse/pde/api/tools/internal/model/ApiBaseline.java 1 Dec 2009 19:38:28 -0000 >@@ -710,6 +710,14 @@ > //already disposed or nothing to dispose > return; > } >+ doDispose(); >+ fState = null; >+ } >+ >+ /** >+ * performs the actual dispose of mappings and cached elements >+ */ >+ protected void doDispose() { > if (ApiPlugin.isRunningInFramework()) { > JavaRuntime.removeVMInstallChangedListener(this); > } >@@ -734,9 +742,8 @@ > fSystemLibraryComponent.dispose(); > fSystemLibraryComponent = null; > } >- fState = null; > } >- >+ > /** > * @see org.eclipse.pde.api.tools.internal.provisional.model.IApiBaseline#close() > */ >Index: src/org/eclipse/pde/api/tools/internal/model/BundleComponent.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/BundleComponent.java,v >retrieving revision 1.1 >diff -u -r1.1 BundleComponent.java >--- src/org/eclipse/pde/api/tools/internal/model/BundleComponent.java 30 Nov 2009 15:54:51 -0000 1.1 >+++ src/org/eclipse/pde/api/tools/internal/model/BundleComponent.java 1 Dec 2009 19:38:28 -0000 >@@ -317,8 +317,9 @@ > * Tries to look up the bundle described by the given manifest in the given state > * @param manifest > * @return the bundle for the given manifest, <code>null</code> otherwise >+ * @throws BundleException > */ >- protected BundleDescription lookupBundle(State state, Dictionary manifest) { >+ protected BundleDescription lookupBundle(State state, Dictionary manifest) throws BundleException { > Version version = null; > try { > //just in case the version is not a number >@@ -328,7 +329,11 @@ > catch (NumberFormatException nfe) { > version = null; > } >- return state.getBundle((String)manifest.get(Constants.BUNDLE_SYMBOLICNAME), version); >+ ManifestElement[] name = ManifestElement.parseHeader(Constants.BUNDLE_SYMBOLICNAME, (String)manifest.get(Constants.BUNDLE_SYMBOLICNAME)); >+ if(name.length < 1) { >+ return null; >+ } >+ return state.getBundle(name[0].getValue(), version); > } > > /** >Index: src/org/eclipse/pde/api/tools/internal/model/WorkspaceBaseline.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/WorkspaceBaseline.java,v >retrieving revision 1.1 >diff -u -r1.1 WorkspaceBaseline.java >--- src/org/eclipse/pde/api/tools/internal/model/WorkspaceBaseline.java 30 Nov 2009 15:54:52 -0000 1.1 >+++ src/org/eclipse/pde/api/tools/internal/model/WorkspaceBaseline.java 1 Dec 2009 19:38:28 -0000 >@@ -35,6 +35,13 @@ > } > > /* (non-Javadoc) >+ * @see org.eclipse.pde.api.tools.internal.model.ApiBaseline#dispose() >+ */ >+ public void dispose() { >+ doDispose(); >+ } >+ >+ /* (non-Javadoc) > * @see org.eclipse.pde.api.tools.internal.model.ApiBaseline#getState() > */ > public State getState() { >#P org.eclipse.pde.api.tools.tests >Index: src/org/eclipse/pde/api/tools/util/tests/ApiBaselineManagerTests.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/apitools/org.eclipse.pde.api.tools.tests/src/org/eclipse/pde/api/tools/util/tests/ApiBaselineManagerTests.java,v >retrieving revision 1.12 >diff -u -r1.12 ApiBaselineManagerTests.java >--- src/org/eclipse/pde/api/tools/util/tests/ApiBaselineManagerTests.java 26 Nov 2009 18:08:26 -0000 1.12 >+++ src/org/eclipse/pde/api/tools/util/tests/ApiBaselineManagerTests.java 1 Dec 2009 19:38:29 -0000 >@@ -697,11 +697,10 @@ > */ > public void testWPUpdateLibraryAddedToClasspath() throws InvocationTargetException, IOException, CoreException { > IFolder folder = null; >- IApiComponent component = null; > try { > IJavaProject project = getTestingProject(); > assertNotNull("The testing project must exist", project); >- component = getWorkspaceBaseline().getApiComponent(project.getElementName()); >+ IApiComponent component = getWorkspaceBaseline().getApiComponent(project.getElementName()); > assertNotNull("the workspace component must exist", component); > int before = component.getApiTypeContainers().length; > >@@ -717,9 +716,6 @@ > fail(e.getMessage()); > } > finally { >- if(component != null) { >- component.dispose(); >- } > if(folder != null) { > FileUtils.delete(folder); > } >@@ -731,14 +727,13 @@ > */ > public void testWPUpdateLibraryRemovedFromClasspath() { > IPath libPath = null; >- IApiComponent component = null; > try { > IJavaProject project = getTestingProject(); > assertNotNull("The testing project must exist", project); > > //add to classpath > IFolder folder = assertTestLibrary(project, new Path("libx"), "component.a_1.0.0.jar"); >- component = getWorkspaceBaseline().getApiComponent(project.getElementName()); >+ IApiComponent component = getWorkspaceBaseline().getApiComponent(project.getElementName()); > assertNotNull("the workspace component must exist", component); > int before = component.getApiTypeContainers().length; > libPath = folder.getFullPath().append("component.a_1.0.0.jar"); >@@ -769,9 +764,6 @@ > fail(e.getMessage()); > } > finally { >- if(component != null) { >- component.dispose(); >- } > if(libPath != null) { > FileUtils.delete(libPath.toOSString()); > } >@@ -1030,5 +1022,6 @@ > @Override > protected void tearDown() throws Exception { > deleteProject(TESTING_PLUGIN_PROJECT_NAME); >+ getWorkspaceBaseline().dispose(); > } > }
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 296487
:
153357
|
153511
| 153516