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 68433 Details for
Bug 188746
PlatformConfiguration doesn't properly support other config locations
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
org.eclipse.update.configurator.patch
org.eclipse.update.configurator.patch (text/plain), 5.05 KB, created by
Chris Aniszczyk
on 2007-05-23 15:40:50 EDT
(
hide
)
Description:
org.eclipse.update.configurator.patch
Filename:
MIME Type:
Creator:
Chris Aniszczyk
Created:
2007-05-23 15:40:50 EDT
Size:
5.05 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.update.configurator >Index: src/org/eclipse/update/internal/configurator/Configuration.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/Configuration.java,v >retrieving revision 1.16 >diff -u -r1.16 Configuration.java >--- src/org/eclipse/update/internal/configurator/Configuration.java 19 Apr 2007 13:52:31 -0000 1.16 >+++ src/org/eclipse/update/internal/configurator/Configuration.java 23 May 2007 19:34:30 -0000 >@@ -11,15 +11,17 @@ > *******************************************************************************/ > package org.eclipse.update.internal.configurator; > >+import java.io.File; > import java.io.IOException; >-import java.net.*; >+import java.net.URL; > import java.util.ArrayList; > import java.util.Date; > import java.util.HashMap; > >-import org.eclipse.core.runtime.*; >-import org.eclipse.update.configurator.*; >-import org.w3c.dom.*; >+import org.eclipse.core.runtime.CoreException; >+import org.eclipse.update.configurator.IPlatformConfiguration; >+import org.w3c.dom.Document; >+import org.w3c.dom.Element; > > public class Configuration implements IConfigurationConstants { > >@@ -82,8 +84,9 @@ > URL pURL; > try { > pURL = new URL(url); >- URL rURL = PlatformConfiguration.resolvePlatformURL(pURL); >- String resolvedURL = rURL.toExternalForm(); >+ File file = new File(this.url.getFile()); >+ File root = file.getParentFile().getParentFile().getParentFile(); >+ String resolvedURL = root.toURL().toExternalForm(); > platformURLs.put(resolvedURL, pURL); > } catch (IOException e) { > // can't resolve so can't have look up. >Index: src/org/eclipse/update/internal/configurator/ConfigurationParser.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/ConfigurationParser.java,v >retrieving revision 1.28 >diff -u -r1.28 ConfigurationParser.java >--- src/org/eclipse/update/internal/configurator/ConfigurationParser.java 15 Sep 2006 06:10:50 -0000 1.28 >+++ src/org/eclipse/update/internal/configurator/ConfigurationParser.java 23 May 2007 19:34:30 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2004 IBM Corporation and others. >+ * Copyright (c) 2000, 2007 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -193,7 +193,7 @@ > } > > SitePolicy sp = new SitePolicy(policyType, policyList); >- SiteEntry site = new SiteEntry(url, sp); >+ SiteEntry site = new SiteEntry(url, sp, property); > > String flag = attributes.getValue(CFG_UPDATEABLE); > if (flag != null) { >Index: src/org/eclipse/update/internal/configurator/PlatformConfiguration.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/PlatformConfiguration.java,v >retrieving revision 1.89 >diff -u -r1.89 PlatformConfiguration.java >--- src/org/eclipse/update/internal/configurator/PlatformConfiguration.java 16 Apr 2007 20:12:07 -0000 1.89 >+++ src/org/eclipse/update/internal/configurator/PlatformConfiguration.java 23 May 2007 19:34:30 -0000 >@@ -163,7 +163,7 @@ > * @see IPlatformConfiguration#createSiteEntry(URL, ISitePolicy) > */ > public ISiteEntry createSiteEntry(URL url, ISitePolicy policy) { >- return new SiteEntry(url, policy); >+ return new SiteEntry(url, policy, null); > } > > /* >Index: src/org/eclipse/update/internal/configurator/SiteEntry.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/SiteEntry.java,v >retrieving revision 1.45 >diff -u -r1.45 SiteEntry.java >--- src/org/eclipse/update/internal/configurator/SiteEntry.java 22 Mar 2007 15:39:40 -0000 1.45 >+++ src/org/eclipse/update/internal/configurator/SiteEntry.java 23 May 2007 19:34:30 -0000 >@@ -51,10 +51,10 @@ > private static boolean isMacOS = Utils.getOS().equals(Constants.OS_MACOSX); > > public SiteEntry(URL url) { >- this(url,null); >+ this(url,null,null); > } > >- public SiteEntry(URL url, ISitePolicy policy) { >+ public SiteEntry(URL url, ISitePolicy policy, String location) { > if (url == null) > try { > url = new URL("platform:/base/"); //$NON-NLS-1$ try using platform-relative URL >@@ -79,7 +79,9 @@ > this.resolvedURL = this.url; > if (url.getProtocol().equals("platform")) { //$NON-NLS-1$ > try { >- resolvedURL = PlatformConfiguration.resolvePlatformURL(url); // 19536 >+ if(location != null && location.length() > 0) { >+ resolvedURL = new URL(location); >+ } > } catch (IOException e) { > // will use the baseline URL ... > }
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 188746
:
68433
|
69834