Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » Testing .setup locally
Testing .setup locally [message #1742242] Thu, 01 September 2016 05:42 Go to next message
Felix Dorner is currently offline Felix DornerFriend
Messages: 392
Registered: December 2015
Senior Member
Hi,

in my Eclipse Installer Installation, I have dragged/dropped the setup model from https://git.polarsys.org/c/capella/capella.git/plain/releng/plugins/org.polarsys.capella.core.releng/oomph/Capella.setup so that I have the Capella project in the "User Projects" section.

Now I want to make a change to the .setup locally and test it before pushing back to git. Is there any better way to remove the remote reference, add the local reference, test and then push, remove the local reference and adding the remote reference back again? On the authoring wiki there is some stuff about redirection, but I have no clue really, so.. how do you guys test your local setups before pushing them to git?

Thanks for help,
Felix
Re: Testing .setup locally [message #1742314 is a reply to message #1742242] Thu, 01 September 2016 16:41 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33264
Registered: July 2009
Senior Member
Felix,

Generally I encourage people to add a task like this to their setup:

<?xml version="1.0" encoding="UTF-8"?>
<setup:EclipseIniTask
    xmi:version="2.0"
    xmlns:xmi="http://www.omg.org/XMI"
    xmlns:setup="http://www.eclipse.org/oomph/setup/1.0"
    option="-Doomph.redirection.egit="
    value="https://git.eclipse.org/c/egit/egit.git/plain/tools/oomph/EGit.setup->${git.clone.egit.location|uri}/tools/oomph/EGit.setup"
    vm="true"/>


You'll find a bunch of setups in the project catalogs that have this, usually because I contributed it. If they haven't done that, I manually add such a -D to the eclipse.ini and then restart it. If I get it right, opening the setup associated with the stream in the workspace.setup will redirect to the local version in the git clone. You can tell by linking it to the explorer.

At that point you can edit the version in the clone and test it locally. E.g., test that the Eclipse Ini task produces the correct -D you added manually.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Testing .setup locally [message #1742465 is a reply to message #1742314] Fri, 02 September 2016 03:02 Go to previous messageGo to next message
Felix Dorner is currently offline Felix DornerFriend
Messages: 392
Registered: December 2015
Senior Member
Now that's a nice "trick" Smile

Ed Merks wrote on Thu, 01 September 2016 16:41

At that point you can edit the version in the clone and test it locally. E.g., test that the Eclipse Ini task produces the correct -D you added manually.


Aehm.. if I already added the -D manually, the Ini task wouldn't actually need to change anything?! Anyways, I think I get the idea. Thanks.

[Updated on: Fri, 02 September 2016 03:02]

Report message to a moderator

Re: Testing .setup locally [message #1742630 is a reply to message #1742465] Tue, 06 September 2016 08:34 Go to previous messageGo to next message
Felix Dorner is currently offline Felix DornerFriend
Messages: 392
Registered: December 2015
Senior Member
Hmmm, so it doesn't work :/

In your case, where it's working, will "Navigate->Open Setup->Eclipse Projects..." actually open the redirected location, i.e. the file checked out in git? In my case it won't pick it up (Explorer doesn't link it up). Neither does Perform Setup Tasks. A restart didn't help either. Maybe I have a type somewhere? Here is what I have at the bottom of eclipse.ini:

-Doomph.update.url=http://download.eclipse.org/oomph/updates/milestone/latest
-Doomph.redirection.index.redirection=index:/->http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/
-Doomph.redirection.capella=https://git.polarsys.org/c/capella/capella.git/plain/releng/plugins/org.polarsys.capella.core.releng/oomph/Capella.setup->${git.clone.capella.location|uri}/releng/plugins/org.polarsys.capella.core.releng/oomph/Capella.setup

If there's no typo, maybe the redirect doesn't work for user projects?
Re: Testing .setup locally [message #1742642 is a reply to message #1742630] Tue, 06 September 2016 10:04 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33264
Registered: July 2009
Senior Member
Felix,

In the actual eclipse.ini the variable must be already expanded. So to manually bootstrap the process I generally right click on the *.setup in the workspace, bring up the properties view, copy the full file system path, and paste that on the right side of the ->. On Windows, I need to prefix it with file:/ and change each \ to a /. On the other OSes, just prefixing it with file: is enough.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Testing .setup locally [message #1742649 is a reply to message #1742642] Tue, 06 September 2016 10:59 Go to previous messageGo to next message
Felix Dorner is currently offline Felix DornerFriend
Messages: 392
Registered: December 2015
Senior Member
Ok, now it works. This is good stuff!
Thank you.
Re: Testing .setup locally [message #1759004 is a reply to message #1742649] Wed, 05 April 2017 07:49 Go to previous messageGo to next message
Felix Dorner is currently offline Felix DornerFriend
Messages: 392
Registered: December 2015
Senior Member
Hmm, so now that I have added a second branch to the setup, there's a problem. The 'good' setup file is in master. If I pick the 'other' stream, the redirection will point to the 'bad/old' setup in the maintenance stream. I don' t see any other way but to always have .setup up to date in all supported branches, or to not use the redirection to the git clone but to an absolute local path.
Re: Testing .setup locally [message #1759015 is a reply to message #1759004] Wed, 05 April 2017 09:22 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33264
Registered: July 2009
Senior Member
Do the redirection only in the streams that have a good setup, i.e., move the redirection task to the master stream and not in the others (or only to ones where you are maintaining an up-to-date setups).

Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Access parent project stream name
Next Topic:Installation error
Goto Forum:
  


Current Time: Sat Dec 14 16:04:22 GMT 2024

Powered by FUDForum. Page generated in 0.04108 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top