Eclipse cdt解決github匯入的項目無法開啟聲明的bug (cannot open declaration)

來源:互聯網
上載者:User

標籤:http   io   os   ar   java   sp   問題   c   on   

在eclipse cdt中import github的遠程項目,操作是

import ->Git/projects from git ->Clone URI

匯入的項目可以switch branch, 但就是不能開啟函數的聲明,實際上eclipse的一切快速鍵都不能用了

我看了下匯入項目的preference,發現連c++ build選項都沒有,覺得問題可能在於匯入的項目沒有語言(c++, c, java等等)資訊,以至於被eclipse當成沒有語言屬性的general項目,快速鍵這種依賴於程式設計語言的東西自然也就沒辦法用了

 

解決的是:

依然匯入遠端github project到本地,在mac os下就是放在~/git/remoteproject下,linux應該一樣的。然後import C/C++ -> Existing code as makefile project -> Browser ->選中remoteproject,也就是說我們手動建立C++項目,不再依靠egit自動產生

新建立的項目需要自己取項目名字(直接從github匯入的話名字不需要自己取得),除此之外一切特徵都和我們期望的一致,可以switch to other branch, function declaration, call hierarchy都可以用了

 值得注意的是,有些項目導進來後可以直接用,有些就需要按照上述的流程走一遭,不知道為何

 

中文沒找到相關資料,英文的話找到了這個

eclipse m2e: can‘t open declarations after importing maven projects

問題的描述和我幾乎一樣,但是沒人回答:(

下面這個up主的問題和我也差不多,VonC同學回答給了我解決問題的啟發(他的最後一句話)

You could also use the "Import existing project" option, if your GitHub repo had versioned the .projectand .classpath file, but that may not be the case here.

Importing a GitHub project into Eclipse

Eclipse cdt解決github匯入的項目無法開啟聲明的bug (cannot open declaration)

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.