Bug 407417 - [string variables] Mechanism to avoid evaluation of context-dependent IDynamicVariables
Summary: [string variables] Mechanism to avoid evaluation of context-dependent IDynami...
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 4.3   Edit
Hardware: All All
: P3 enhancement with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Platform-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 467255 (view as bug list)
Depends on:
Blocks: 175676 407237
  Show dependency tree
 
Reported: 2013-05-07 10:34 EDT by Markus Keller CLA
Modified: 2015-05-22 09:55 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 Markus Keller CLA 2013-05-07 10:34:03 EDT
There's a class of context-dependent IDynamicVariables that should only be evaluated if absolutely necessary (e.g. when a launch configuration is actually launched).

It often doesn't make sense to evaluate ${string_prompt}, ${container_loc}, ${selected_text}, etc. just for rendering a launch configuration or to validate it, because either the user shouldn't be prompted, or because the selection shouldn't matter until the launch config is launched. See bug 407237, bug 175676.

The basic problem is that IStringVariableManager#performStringSubstitution(String) unconditionally resolves all variables, including all IDynamicVariables. There should be a variant of that method that makes sure no dynamic variables are evaluated. Or at least none with side-effects or a dependency on the current selection (but there's currently no mechanism distinguish these from other IDynamicVariables).
Comment 1 Michael Rennie CLA 2015-05-22 09:55:29 EDT
*** Bug 467255 has been marked as a duplicate of this bug. ***