Eclipse CDT

Hi Snappers.

I’ve got the eclipse snap installed on Ubuntu 18.04, but I am finding it rather awkward that I must re-install the CDT each time I launch the app.

I suspect that the running snap container is discarded each time the app closes, thus losing any extensions I install, so what would be the recommended way to support eclipse extensions from within snap?

Or do I just need to install eclipse manually outside of the snap?

snap info eclipse
name: eclipse
summary: Extensible Tool Platform and Java IDE
publisher: snapcrafters
license: unknown
description: |
Eclipse provides IDEs and platforms for nearly every language and architecture. We are famous for our
Java IDE, C/C++, JavaScript and PHP IDEs built on extensible platforms for creating desktop, Web and
cloud IDEs. These platforms deliver the most extensive collection of add-on tools available for
software developers.
commands:

  • eclipse
    snap-id: QzFGHW76hR3cZjpcuHt4sAjj5KZbd05T
    tracking: edge
    refreshed: 2018-05-10T21:27:03+01:00
    installed: 4.7.3a (25) 189MB classic
    channels:
    stable: 4.7.3a (12) 189MB classic
    candidate: 4.7.3a (12) 189MB classic
    beta: 4.7.3a (12) 189MB classic
    edge: 4.7.3a (25) 189MB classic

That’s not expected, no. What exactly are you doing to install the CDT? Can you provide me some reproducible steps?

Hi @popey,

I’m afraid I’ve failed to recreate this. It’s now behaving, but I have had to re-install the extensions twice, which makes me suspicious that it may still happen again.

Anyway, I’ve now tried installing the extensions, and closing the app, and re-launching
Then I rebooted, and relaunched

Looking in the snap info above, I see that the snap was ‘refreshed’ on Thursday just gone - I wonder if that was the cause of my having to re-install the plugins this morning ? <I didn’t use eclipse on Friday>

Unfortunately I don’t know how to force a refresh to test this…

Maybe the snap updated between your first and second launch? See also https://github.com/snapcrafters/eclipse/issues/3

Hi @thymythos,

Yes, this does indeed seem like a plausible explanation. Though it hasn’t happened since?
Perhaps I got unlucky and installed it just before an update occurred.

The issue you reference certainly would explain what I saw. I hope that gets fixed - as it would be rather frustrating to re-install all plugins after every (seemless and unpreventable?) upgrade.

Otherwise working well for me - so I think we can consider this thread closed.

Regards

Kieran

Relocate these file into SNAP_USER_COMMON instead of SNAP_USER_DATA should resolve this issue, however, I’m not sure how to achieve this.

We have done that in other snaps by setting an environment: section setting HOME to $SNAP_USER_COMMON.

2 Likes

We can try this, but I guess eclipse somehow detects when it is run from a different folder.

I found some documentation about directory locations in Eclipse: https://help.eclipse.org/neon/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fmisc%2Fruntime-options.html&anchor=locations

We can try to set osgi.configuration.area to be in SNAP_USER_COMMON by patching the eclipse.ini file.

1 Like

I did some tests and it seems that Eclipse is not able to upgrade properly even if it uses the same configuration folder as the previous version.

Can you give this PR a try: https://github.com/snapcrafters/eclipse/pull/9

Updated link to the runtime options: https://help.eclipse.org/topic/org.eclipse.platform.doc.isv/reference/misc/runtime-options.html