Return-Path: Delivered-To: apmail-db-derby-commits-archive@www.apache.org Received: (qmail 11442 invoked from network); 8 Mar 2007 00:23:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Mar 2007 00:23:46 -0000 Received: (qmail 87364 invoked by uid 500); 8 Mar 2007 00:23:47 -0000 Delivered-To: apmail-db-derby-commits-archive@db.apache.org Received: (qmail 87333 invoked by uid 500); 8 Mar 2007 00:23:47 -0000 Mailing-List: contact derby-commits-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Derby Development" List-Id: Delivered-To: mailing list derby-commits@db.apache.org Received: (qmail 87256 invoked by uid 99); 8 Mar 2007 00:23:47 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Mar 2007 16:23:47 -0800 X-ASF-Spam-Status: No, hits=-99.5 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Mar 2007 16:23:38 -0800 Received: by eris.apache.org (Postfix, from userid 65534) id B47D31A983A; Wed, 7 Mar 2007 16:23:17 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r515864 - /db/derby/code/trunk/plugins/eclipse/org.apache.derby.ui/src/org/apache/derby/ui/util/DerbyUtils.java Date: Thu, 08 Mar 2007 00:23:17 -0000 To: derby-commits@db.apache.org From: fuzzylogic@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070308002317.B47D31A983A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: fuzzylogic Date: Wed Mar 7 16:23:17 2007 New Revision: 515864 URL: http://svn.apache.org/viewvc?view=rev&rev=515864 Log: DERBY-2376: Make Derby Eclipse plugin .classpath entries reference the ECLIPSE_HOME variable instead of using absolute paths. Committed for Aaron Tarter Modified: db/derby/code/trunk/plugins/eclipse/org.apache.derby.ui/src/org/apache/derby/ui/util/DerbyUtils.java Modified: db/derby/code/trunk/plugins/eclipse/org.apache.derby.ui/src/org/apache/derby/ui/util/DerbyUtils.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/plugins/eclipse/org.apache.derby.ui/src/org/apache/derby/ui/util/DerbyUtils.java?view=diff&rev=515864&r1=515863&r2=515864 ============================================================================== --- db/derby/code/trunk/plugins/eclipse/org.apache.derby.ui/src/org/apache/derby/ui/util/DerbyUtils.java (original) +++ db/derby/code/trunk/plugins/eclipse/org.apache.derby.ui/src/org/apache/derby/ui/util/DerbyUtils.java Wed Mar 7 16:23:17 2007 @@ -21,6 +21,7 @@ package org.apache.derby.ui.util; +import java.io.File; import java.net.URL; import java.util.ArrayList; import java.util.List; @@ -31,10 +32,11 @@ import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IProject; import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.FileLocator; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Path; -import org.eclipse.core.runtime.Platform; +import org.eclipse.core.runtime.Platform; import org.eclipse.debug.core.DebugPlugin; import org.eclipse.debug.core.ILaunch; import org.eclipse.debug.core.ILaunchConfiguration; @@ -55,6 +57,7 @@ public class DerbyUtils { + private final static String PLUGIN_ROOT = "ECLIPSE_HOME/plugins/"; private static ManifestElement[] getElements(String bundleName) throws BundleException { String requires = (String)Platform.getBundle(bundleName).getHeaders().get(Constants.BUNDLE_CLASSPATH); @@ -70,30 +73,28 @@ elements_ui=getElements(CommonNames.UI_PATH); Bundle bundle=Platform.getBundle(CommonNames.CORE_PATH); - URL pluginURL = bundle.getEntry("/"); - URL jarURL=null; - URL localURL=null; + URL pluginURL = FileLocator.resolve(FileLocator.find(bundle, new Path("/"), null)); + String pluginName = new File(pluginURL.getPath()).getName(); newRawCP=new IClasspathEntry[rawCP.length + (elements_core.length) + (elements_ui.length-1)]; System.arraycopy(rawCP, 0, newRawCP, 0, rawCP.length); //Add the CORE jars int oldLength=rawCP.length; - for(int i=0;i