Author: hibou Date: Mon Jan 5 02:09:26 2009 New Revision: 731512 URL: http://svn.apache.org/viewvc?rev=731512&view=rev Log: IVYDE-141: - IVY_HOME is now added to the classpath variables of Eclipse
Added: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyDEClasspathVariableInitializer.java (with props) Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/CHANGES.txt ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/plugin.xml Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/CHANGES.txt URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/CHANGES.txt?rev=731512&r1=731511&r2=731512&view=diff ============================================================================== --- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/CHANGES.txt (original) +++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/CHANGES.txt Mon Jan 5 02:09:26 2009 @@ -4,6 +4,7 @@ version 2.0.0 final ========================== - NEW: Add the IvyDE documentation to the Eclipse help (IVYDE-150) +- NEW: Export IVY_HOME as a classpath variable (IVYDE-141) - FIX: When migrating from ivyde alpha to ivyde beta eclipse is throwing NPE at startup (IVYDE-136) (thanks to Daniel Becheanu) - FIX: The retrieve configuration doesn't support '*' as accepted types (IVYDE-137) (thanks to Daniel Becheanu) Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/plugin.xml URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/plugin.xml?rev=731512&r1=731511&r2=731512&view=diff ============================================================================== --- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/plugin.xml (original) +++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/plugin.xml Mon Jan 5 02:09:26 2009 @@ -216,6 +216,13 @@ primary="true"> </toc> </extension> + <extension + point="org.eclipse.jdt.core.classpathVariableInitializer"> + <classpathVariableInitializer + class="org.apache.ivyde.eclipse.IvyDEClasspathVariableInitializer" + variable="IVY_HOME"> + </classpathVariableInitializer> + </extension> Added: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyDEClasspathVariableInitializer.java URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyDEClasspathVariableInitializer.java?rev=731512&view=auto ============================================================================== --- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyDEClasspathVariableInitializer.java (added) +++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyDEClasspathVariableInitializer.java Mon Jan 5 02:09:26 2009 @@ -0,0 +1,38 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package org.apache.ivyde.eclipse; + +import org.eclipse.core.runtime.Path; +import org.eclipse.jdt.core.ClasspathVariableInitializer; +import org.eclipse.jdt.core.JavaCore; +import org.eclipse.jdt.core.JavaModelException; + +public class IvyDEClasspathVariableInitializer extends ClasspathVariableInitializer { + + public static final String IVY_HOME_VARIABLE = "IVY_HOME"; + + public void initialize(String variable) { + try { + JavaCore.setClasspathVariable(IVY_HOME_VARIABLE, new Path(System + .getProperty("user.home")).append(".ivy2"), null); + } catch (JavaModelException e) { + IvyPlugin.log(e); + } + } + +} Propchange: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyDEClasspathVariableInitializer.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyDEClasspathVariableInitializer.java ------------------------------------------------------------------------------ svn:keywords = Date Revision Author HeadURL Id Propchange: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyDEClasspathVariableInitializer.java ------------------------------------------------------------------------------ svn:mime-type = text/plain