——此文章摘自《自己动手写开发工具
基于Eclipse的工具开发》定价
¥
特价
¥
详细>>http://track
linktech
cn/?m_id=dangdang&a_id=A
&l=
&l_type
=
width=
height=
border=
nosave>
newPaths[oldPathslength] = luceneLibEntry;
try
{
javaProjectsetRawClasspath(newPaths null);
} catch (JavaModelException e)
{
handleException(e);
}
}
}
private static boolean classPathExists(IClasspathEntry[] entrys
IClasspathEntry entry)
{
for(int i=n=entryslength;i<n;i++)
{
if(entrys[i]getPath()equals(entrygetPath()))
{
return true;
}
}
return false;
}
private static void handleException(Exception e)
{
ActivatorgetDefault()getLog()log(
new Status(IStatusERROR ActivatorPLUGIN_ID
egetMessage() e));
}
private static void copyURLToFile(URL url IProject project
String destFileName)
{
InputStream inStream = null;
try
{
inStream = urlopenStream();
IFile file = projectgetFile(destFileName);
if (!fileexists())
{
filecreate(inStream true null);
}
} catch (IOException e)
{
handleException(e);
} catch (CoreException e)
{
handleException(e);
} finally
{
try
{
if (inStream != null)
inStreamclose();
} catch (IOException e)
{
handleException(e);
}
}
}
public void selectionChanged(IAction action ISelection selection)
{
structSelection = (IStructuredSelection)selection;
}
}
right>[http://developcsaicn/Java_Eclipse/htm>] [http://developcsaicn/Java_Eclipse/htm>] [] [http://developcsaicn/Java_Eclipse/htm>]