熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> Java編程 >> Java開源技術 >> 正文

基於Eclipse的工具開發: 設定構建路徑實戰[3]

2022-06-13   來源: Java開源技術 
    ——此文章摘自《自己動手寫開發工具基於Eclipse的工具開發》定價 特價 詳細>>http://tracklinktechcn/?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>]  


From:http://tw.wingwit.com/Article/program/Java/ky/201311/28989.html
    推薦文章
    Copyright © 2005-2022 電腦知識網 Computer Knowledge   All rights reserved.