newPaths[oldPaths
try
{
javaProject
} catch (JavaModelException e)
{
handleException(e);
}
}
}
private static boolean classPathExists(IClasspathEntry[] entrys
IClasspathEntry entry)
{
for(int i=
{
if(entrys[i]
{
return true;
}
}
return false;
}
private static void handleException(Exception e)
{
Activator
new Status(IStatus
e
}
private static void copyURLToFile(URL url
String destFileName)
{
InputStream inStream = null;
try
{
inStream = url
IFile file = project
if (!file
{
file
}
} catch (IOException e)
{
handleException(e);
} catch (CoreException e)
{
handleException(e);
} finally
{
try
{
if (inStream != null)
inStream
} catch (IOException e)
{
handleException(e);
}
}
}
public void selectionChanged(IAction action
{
structSelection = (IStructuredSelection)selection;
}
}
right
From:http://tw.wingwit.com/Article/program/Java/ky/201311/28989.html