Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » How to import a project with a launch configuration ?
How to import a project with a launch configuration ? [message #658874] Thu, 10 March 2011 08:48 Go to next message
kkt8 Mising name is currently offline kkt8 Mising nameFriend
Messages: 27
Registered: November 2010
Junior Member
Hello,

I've to import a zip file which contains:
which contains :
- 1 folder : . metadata, which contains :
o Dhrystone_stxp70v3 Release.launch under .metadata\.plugins\org.eclipse.debug.core\.launches which is the launch configuration
- 1 folder : Dhrystone_stxp70v3, which contains the project :
o .cproject, .project.stxp70xf, .README.txt files
o 1 folder inc which contains some h files
o 1 folder link which contains some ld and ld.reloc files
o 1 folder src which contains some c files

So, to do the import, I copy the project folder under the root of the workspace and the launchconfiguration under the workpaces under .metadata\\.plugins\org.eclipse.debug.core\.launches.

the project is added correctly, the build options and all the project stuff are here under the project but the launch configuration isn't visible under the Run configurations views.

Do you have an idea ?
Thank !
Re: How to import a project with a launch configuration ? [message #658955 is a reply to message #658874] Thu, 10 March 2011 14:51 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.us.NOSPAM.ibm.com

I'm not sure that can be done. There are probably some metadata control
files that need to know about the launch.

The better way is for the launch to be "shared" into your project (in
your original workspace). That way there is no .metadata to worry about
and the launch will move with the project.

To do this, go to your original workspace, select the launch, go to the
"Common" tab, and select "shared" and then select the project. Then just
reexport the project.


--
Thanks,
Rich Kulp
Re: How to import a project with a launch configuration ? [message #659708 is a reply to message #658955] Tue, 15 March 2011 10:10 Go to previous messageGo to next message
kkt8 Mising name is currently offline kkt8 Mising nameFriend
Messages: 27
Registered: November 2010
Junior Member
Just for information, Ive found the seolution :
It's possible, you have to create a symbolic link to the launch file :
    ILaunchManager launchManager =
        DebugPlugin.getDefault().getLaunchManager();
    IWorkspace workspace = ResourcesPlugin.getWorkspace();
    IProject tmpProject = workspace.getRoot().getProject("External File");
    try {
        // Création d'un projet temporaire pour stocker le fichier de launch.
        if (!tmpProject.exists()) {
            tmpProject.create(null);
        }
        if (!tmpProject.isOpen()) {
            tmpProject.open(null);
        }
        IPath location = new Path("D:/myConfigurations/Snippet2.launch");
        IFile file = tmpProject.getFile(location.lastSegment());
        file.createLink(location, IResource.NONE, null);
        // Récupération de la configuration:
        ILaunchConfiguration launchConfiguration =
            launchManager.getLaunchConfiguration(file);
        if (launchConfiguration != null) {
            // On informe Eclipse qu'une configuration est ajoutée:
            launchManager.getMovedFrom(launchConfiguration);
        }
        tmpProject.refreshLocal(0, null);
    } catch (CoreException e) {
        e.printStackTrace();
    }
Re: How to import a project with a launch configuration ? [message #659783 is a reply to message #659708] Tue, 15 March 2011 15:02 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NOSPAM.ibm.com

Hi,

I think that is a lot of over kill. It would be better to just have the
launch configuration in the project itself. Then you don't need to move
any metadata or try to connect it up in the new workspace. It would be
all automatic.
--
Thanks,
Rich Kulp
Previous Topic:How to build eclipse
Next Topic:Adding an action to Synchronize View context menu
Goto Forum:
  


Current Time: Sat Apr 20 00:25:12 GMT 2024

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

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

Back to the top