|
Lines 16-21
Link Here
|
| 16 |
* 20070824 200515 sandakith@wso2.com - Lahiru Sandakith, NON-NLS move to seperate file |
16 |
* 20070824 200515 sandakith@wso2.com - Lahiru Sandakith, NON-NLS move to seperate file |
| 17 |
* 20080625 210817 samindaw@wso2.com - Saminda Wijeratne, Setting the proxyBean and proxyEndPoint values - Refactoring |
17 |
* 20080625 210817 samindaw@wso2.com - Saminda Wijeratne, Setting the proxyBean and proxyEndPoint values - Refactoring |
| 18 |
* 20080924 247929 samindaw@wso2.com - Saminda Wijeratne, source folder not correctly set |
18 |
* 20080924 247929 samindaw@wso2.com - Saminda Wijeratne, source folder not correctly set |
|
|
19 |
* 20090307 196954 samindaw@wso2.com - Saminda Wijeratne, Support XMLBeans data binding |
| 19 |
*******************************************************************************/ |
20 |
*******************************************************************************/ |
| 20 |
package org.eclipse.jst.ws.axis2.core.utils; |
21 |
package org.eclipse.jst.ws.axis2.core.utils; |
| 21 |
|
22 |
|
|
Lines 28-38
Link Here
|
| 28 |
import java.net.URL; |
29 |
import java.net.URL; |
| 29 |
import java.util.ArrayList; |
30 |
import java.util.ArrayList; |
| 30 |
import java.util.HashMap; |
31 |
import java.util.HashMap; |
|
|
32 |
import java.util.LinkedList; |
| 33 |
import java.util.List; |
| 31 |
|
34 |
|
| 32 |
import javax.xml.parsers.DocumentBuilder; |
35 |
import javax.xml.parsers.DocumentBuilder; |
| 33 |
import javax.xml.parsers.DocumentBuilderFactory; |
36 |
import javax.xml.parsers.DocumentBuilderFactory; |
| 34 |
import javax.xml.parsers.ParserConfigurationException; |
37 |
import javax.xml.parsers.ParserConfigurationException; |
| 35 |
|
38 |
|
|
|
39 |
import org.eclipse.core.resources.IFolder; |
| 36 |
import org.eclipse.core.resources.IProject; |
40 |
import org.eclipse.core.resources.IProject; |
| 37 |
import org.eclipse.core.resources.ResourcesPlugin; |
41 |
import org.eclipse.core.resources.ResourcesPlugin; |
| 38 |
import org.eclipse.core.runtime.CoreException; |
42 |
import org.eclipse.core.runtime.CoreException; |
|
Lines 54-59
Link Here
|
| 54 |
private static boolean alreadyComputedTempAxis2Directory = false; |
58 |
private static boolean alreadyComputedTempAxis2Directory = false; |
| 55 |
private static String tempAxis2Dir = null; |
59 |
private static String tempAxis2Dir = null; |
| 56 |
|
60 |
|
|
|
61 |
public static void addResourcesFolderAsClassPath(IProject project){ |
| 62 |
try { |
| 63 |
IJavaProject javaProject = (IJavaProject)project.getNature(JavaCore.NATURE_ID); |
| 64 |
IClasspathEntry[] rawClasspath = javaProject.getRawClasspath(); |
| 65 |
List list = new LinkedList(java.util.Arrays.asList(rawClasspath)); |
| 66 |
String resourceName = "resources"; |
| 67 |
IFolder resourcesFolder = project.getFolder(resourceName); |
| 68 |
boolean isAlreadyAdded=false; |
| 69 |
for(IClasspathEntry cpe:rawClasspath){ |
| 70 |
isAlreadyAdded=cpe.getPath().toOSString().equals(resourcesFolder.getFullPath().toOSString()); |
| 71 |
if (isAlreadyAdded) break; |
| 72 |
} |
| 73 |
if (!isAlreadyAdded){ |
| 74 |
IClasspathEntry jarEntry = JavaCore.newLibraryEntry(resourcesFolder.getFullPath(),null,null); |
| 75 |
list.add(jarEntry); |
| 76 |
} |
| 77 |
IClasspathEntry[] newClasspath = (IClasspathEntry[])list.toArray(new IClasspathEntry[0]); |
| 78 |
javaProject.setRawClasspath(newClasspath,null); |
| 79 |
} catch (CoreException e) { |
| 80 |
e.printStackTrace(); |
| 81 |
} |
| 82 |
|
| 83 |
} |
| 84 |
|
| 57 |
public static String tempAxis2Directory() { |
85 |
public static String tempAxis2Directory() { |
| 58 |
if (!alreadyComputedTempAxis2Directory){ |
86 |
if (!alreadyComputedTempAxis2Directory){ |
| 59 |
String[] nodes = {Axis2Constants.DIR_DOT_METADATA, |
87 |
String[] nodes = {Axis2Constants.DIR_DOT_METADATA, |