Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 440147 - [target][launching] Renaming launch configuration breaks target platform in runtime workbench
Summary: [target][launching] Renaming launch configuration breaks target platform in r...
Status: RESOLVED WORKSFORME
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.5   Edit
Hardware: PC Mac OS X
: P4 normal (vote)
Target Milestone: ---   Edit
Assignee: PDE-UI-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
: 485330 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-07-22 12:46 EDT by Michael Rennie CLA
Modified: 2019-09-02 14:55 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Rennie CLA 2014-07-22 12:46:11 EDT
Steps:

1, create Eclipse Application launch config - named 'Eclipse 4.5'
2. debug it - check its target platform pref page to make sure it is ok
3. shut down target
4. rename the config made in step 1 to 'Eclipse 4.6'
5. debug the target and notice the exception logged in the console:

!ENTRY org.eclipse.pde.core 4 0 2014-07-22 11:36:17.111
!MESSAGE The current target platform contains errors, open Window > Preferences > Plug-in Development > Target Platform for details.
!STACK 1
org.eclipse.core.runtime.CoreException: Problems occurred getting the plug-ins in this container
	at org.eclipse.pde.internal.core.PluginModelManager.getExternalBundles(PluginModelManager.java:605)
	at org.eclipse.pde.internal.core.PluginModelManager.initializeTable(PluginModelManager.java:525)
	at org.eclipse.pde.internal.core.PluginModelManager.targetReloaded(PluginModelManager.java:473)
	at org.eclipse.pde.internal.core.RequiredPluginsInitializer$1.run(RequiredPluginsInitializer.java:34)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Contains: Configuration directory does not exist: /Users/mrennie/Documents/workspace/.metadata/.plugins/org.eclipse.pde.core/Eclipse 4.5/

6. check the targets' target platform and see that it contains an error
Comment 1 Curtis Windatt CLA 2014-07-22 13:17:29 EDT
When we launch a target workbench we create a configuration directory based on the name (see Configuration Tab in the launch dialog).  When PDE creates a default target definition/platform we use this custom configuration directory rather than the default (see TargetWeaver.java).  In Mike's case, he is changing the launch name, which changes the configuration directory, but the target definition is not updated (pressing restore defaults would create a new correct configuration).

A possible fix would be to add some code when the configuration location of a ProfileBundleContainer cannot be found.  If we are in dev mode, we could compare the broken config location to the location we would select in a new default target. If they differ, either fix the target for the user silently, or at least add that information to the log.
Comment 2 Vikas Chandra CLA 2016-02-09 04:46:29 EST
*** Bug 485330 has been marked as a duplicate of this bug. ***
Comment 3 Eclipse Genie CLA 2018-11-12 19:19:24 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 4 Lars Vogel CLA 2019-09-02 14:55:59 EDT
This bug has been marked as stalebug a while ago without any further interaction.

If this report is still relevant for the current release, please reopen and remove the stalebug whiteboard flag.