Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 479591

Summary: Terminal-Plugin does not work due to old version of cdt.core installed instead of current cdt.native
Product: [Tools] Oomph Reporter: nimo mayr <enegy>
Component: SetupAssignee: Project Inbox <oomph-inbox>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: aleherb+eclipse, eclipse, Ed.Merks, mober.at+eclipse
Version: 1.3.0   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X   
Whiteboard:
Attachments:
Description Flags
Screenshot showing the workaround none

Description nimo mayr CLA 2015-10-12 16:33:17 EDT
Terminal-Plugin does not work for me. I have installed Eclipse Mars SR1 and when opening local terminal window, the following error occurs:

https://dev.eclipse.org/recommenders/community/confess/#/incidents/58vEKpIaf77hEXQFSlUtJ30HmmisCdPvyCLZpi4l5XCCMJ3qzmwzt2xgROGEz3Uv
Comment 1 Anton Leherbauer CLA 2015-10-13 02:52:33 EDT
For some reason, the installed CDT version is too old. The AERI report mentions  org.eclipse.cdt.core 5.3.2.201202111925.
Try updating CDT to the Mars.1 version.
Comment 2 Martin Oberhuber CLA 2015-10-13 03:43:30 EDT
Created attachment 257231 [details]
Screenshot showing the workaround

I have downloaded eclipse-jee-mars-1-macosx-cocoa-x86_64.tar.gz , and the expected plugins are there:
Eclipse.app/Contents/Eclipse/plugins>ls *cdt*
org.eclipse.cdt.core.macosx_5.3.0.201509131935.jar
org.eclipse.cdt.core.native_5.8.0.201509131935.jar

Nino please explain how you have installed your Eclipse - did you update? Did you use the eclipse-installer ?

It's possible that we see a defect in the eclipse-installer or EPP packaging here. On the terminal side, we need to use "import-package" without version on the CDT stuff we need, because we also want to support older Eclipse where the PTY was not yet in natives but cdt core. In order to get a recent version, we use a p2.inf optional greedy dependency on org.eclipse.cdt.tooling.natives. It looks like in your case, the "import-package" pulls in an old version because the feature is missing.
http://git.eclipse.org/c/tm/org.eclipse.tm.terminal.git/tree/features/org.eclipse.tm.terminal.connector.local.feature/p2.inf

As a workaround, you can Help > Install New Software... , then
- use dropdown to choose http://download.eclipse.org/releases/mars
- Turn off the "Group Items by Category"
- Filter "native", then install the "C/C++ Development Tooling Native" feature.
See also attached screenshot.

Please let us know how it goes. Thanks !
Comment 3 nimo mayr CLA 2015-10-13 04:17:36 EDT
Hello,

yes, I used the eclipse-installer.

Your solution works fine. Now, terminal plugin works!

Thanks!
Comment 4 Martin Oberhuber CLA 2015-10-13 05:03:10 EDT
Thanks for the feedback.

Was this the first time you used the eclipse-installer or did you "update" ?
Did you install into a fresh empty folder, or did you have previous Eclipses ?
Which options did you choose in the eclipse-installer ?

The better you describe what you did, the more likely we'll find out what happened here. Thanks !
Comment 5 nimo mayr CLA 2015-10-13 06:10:57 EDT
It was the first time you I used the eclipse-installer -  I used it with "advanced mode".  I selected "jee-bundle". I guess, using the "advanded mode" was the problem. I installed it into a fresh folder.  However, on another computer, terminlal plugin works when using eclipse installer without advanced mode. Maybe, this was the problem.

By the way, would be nice to provide a setting in terminal view to stop the blinking cursor. Look at the terminal app of mac os. The cursor does not blink. The blinking cursor is a little obstrusive when using the code editor and terminal editor side by side. Thanks.
Comment 6 Martin Oberhuber CLA 2015-10-13 14:52:16 EDT
Moving to Oomph / Eclipse-installer for further investigation why the CDT repository is way too old in this scenario ...
Comment 7 Ed Merks CLA 2015-10-14 02:21:12 EDT
Note the AERI report mentions it's the org.eclipse.epp.package.jee.product involved.  Installing the CDT product seems fine with all the latest versions as expected.  I'm not sure what the JEE product has to do with CDT.  I don't know how to open a local terminal window so I don't know how to test that.   Furthermore, there is no IU with version 5.3.2.201202111925 in the mars repo, let along a CDT one...

I can't do any further investigation without more specific details for reproducing a problem.  I'll return this as works for me shortly unless there are additional details forthcoming.
Comment 8 Martin Oberhuber CLA 2015-10-15 10:06:11 EDT
Hi Ed,

1. The Eclipse JEE Package does include the tm.terminal.local feature which
   1a) Has an import-package org.eclipse.cdt.pty
   1b) Has a p2.inf for pulling in org.eclipse.cdt.native.feature.group

2. When downloading the full JEE Package archive for Mac, those dependencies
   are there as expected. But the original bug submitter claims that after
   installing jee-package on Mac with eclipse-installer, a much too old
   cdt.core was found instead of the newer cdt.native from Mars.

I don't have a Mac to try reproducing this, and I don't know what in the eclipse-installer could cause this behavior. Maybe if the bundlepool included a too-old org.eclipse.cdt.core (which would satisfy the import-package), the p2.inf which forces the newer cdt.native from mars is not considered ?
Comment 9 Ed Merks CLA 2015-10-17 04:03:50 EDT
The bundle pool only acts as an artifact repository, not a metadata repository and resolution (what to install) is based on the metadata.  From where to fetch it uses the artifact  repositories.   Also, the OSGi wiring in the IDE should only consider what's in the profile, i.e., what's been installed, so should only resolve to things that happen to be in the bundle pool.

I also tried installing the Mars.1 on Windows and the cdt bundles are all versions built 201509131935 with the native fragments present.

My Mac virtual box is broken so I can't test that.   The original reporter can look in the Help -> Installation Details -> Plugins tab to confirm what bundles are actually present or not.

In the end, Oomph can only tell p2 what things are required and what repositories they're available from.  It has no influence on how p2 does that job.  So it's clear on Windows that the correct requirements and repositories are present, and that it resolves as expected.  So I'm doubtful it would resolve differently on the Mac...
Comment 10 nimo mayr CLA 2015-10-17 11:59:58 EDT
As I installed the whole bunch again with eclipse installer (simple mode), i cannot look what plugin-version was installed before. However, all I know is this: 
https://dev.eclipse.org/recommenders/community/confess/#/incidents/58vEKpIaf77hEXQFSlUtJ30HmmisCdPvyCLZpi4l5XCCMJ3qzmwzt2xgROGEz3Uv


However, terminal plugin works well now after new install on the same machine.
Comment 11 Ed Merks CLA 2015-10-18 02:26:39 EDT
To fix a problem, I'd need to be able to reproduce the problem...

But given you say it works even for you now, that just leaves a mystery...