Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 295164 - Target Defn. preference page doesn't remember target on workbench relaunch
Summary: Target Defn. preference page doesn't remember target on workbench relaunch
Status: RESOLVED WORKSFORME
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: PDE-UI-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-14 13:07 EST by Chetan Kumar CLA
Modified: 2019-09-02 14:56 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chetan Kumar CLA 2009-11-14 13:07:35 EST
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/3.0.195.32 Safari/532.0
Build Identifier: 3.5.0

  After a workbench restart, i am not able to see my target definition(s) in the
preference page. I can see only 2 options "Target platform" and "Running
platform"
  More over, when i open click on apply/OK after changing some other preference
which is in no way related to my target platform preference page ... the target
is reset (to something wrong) and i have compilation errors in the whole
workspace. I'll have to reset the target platform by opening the correct target
definition file.

Reproducible: Always

Steps to Reproduce:
1.Set a target definition to an already up eclipse workspace. (I selected a target definition file which doesn't point to anything remote.
2. Wait for all the plug-ins to build, go to Preferences -> Target Platform: you should see atleast 3 definitions in the list: Target Platform, Running Platform, and <your-own-platform> (close preference page)
3. Disable Automatic Project Build
4. Restart workbench.
5. goto Preference -> Target Platform. You'll only see 2 entries: Target Platform, and Running Platform (none active)
6. Navigate to any other preference page. Change some preferences (like show heap status for example)
7. click on "Apply" or "OK"

What happens ?
 - Target platform is reset, and the whole workspace re-builds resulting in compilation errors (mostly due to unresolved dependencies) in almost all projects.
Comment 1 Curtis Windatt CLA 2009-11-19 12:16:01 EST
What version of Eclipse is this happening in?
Can you try to reproduce in a fresh workspace?
Did you create the new target using the preference page?

The fact that you have two options "target platform" and "running platform" means that your preference settings differ from the default (which is your running Eclipse installation).  This is common to see when moving a workspace from 3.4.x to 3.5.

The "running platform" is your current install and should have a special icon.  The "target platform" is your last known target settings.  If you go to the page and nothing is selected, that means we somehow lost track of the definition file.  If you recheck the "target platform" it will restore things as well as it can.  Hitting ok/apply on the page (or any other pref page) will apply the current settings, which is nothing checked.  We might be able to improve the behaviour there, but we want to move away from storing the preferences in their current format anyways (bug 283731).

So the question is what happened to your definition file.  Besides the questions I asked above, you can try to find the backing .target file in your .metadata folder in your workspace folder.  If it getting written, there must be something going wrong when it tries to find and open the file.
Comment 2 Chetan Kumar CLA 2009-12-04 07:58:32 EST
(In reply to comment #1)
> What version of Eclipse is this happening in?
Version: 3.5.0.v20090123-7Z7_F8NFE-z0VXhWiu-8Qb95
Build id: I20090611-1540
> Can you try to reproduce in a fresh workspace?
I wasn't able to reproduce in a fresh workspace. my current workspace isn't a moving workspace though.
> Did you create the new target using the preference page?
nope.
> 
> The fact that you have two options "target platform" and "running platform"
> means that your preference settings differ from the default (which is your
> running Eclipse installation).  This is common to see when moving a workspace
> from 3.4.x to 3.5.
> 
> The "running platform" is your current install and should have a special icon. 
> The "target platform" is your last known target settings.  If you go to the
> page and nothing is selected, that means we somehow lost track of the
> definition file.  If you recheck the "target platform" it will restore things
> as well as it can.  Hitting ok/apply on the page (or any other pref page) will
> apply the current settings, which is nothing checked.  We might be able to
> improve the behaviour there, but we want to move away from storing the
> preferences in their current format anyways (bug 283731).
> 
> So the question is what happened to your definition file.  Besides the
> questions I asked above, you can try to find the backing .target file in your
> .metadata folder in your workspace folder.  If it getting written, there must
> be something going wrong when it tries to find and open the file.
i found 2 target files in the .metadata folder. Both are alike. I guess they must have been created when i tried to set/reset target.
Comment 3 Eclipse Genie CLA 2019-01-13 08:37:12 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:56:21 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.