Bug 73659 - Introduce parameter: update all references of processed variable
Summary: Introduce parameter: update all references of processed variable
Status: RESOLVED DUPLICATE of bug 44803
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-10 09:12 EDT by Martin Aeschlimann CLA
Modified: 2004-09-10 09:15 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Aeschlimann CLA 2004-09-10 09:12:00 EDT
20040910

In the following code I want to pass 'PREF_PB_ASSERT_AS_IDENTIFIER' as parameter.
I select it and do a 'introduce parameter'. Unfortunatly this only modifies the
first reference to PREF_PB_ASSERT_AS_IDENTIFIER, the other 2 stay the same and I
have to update them myself with the new parameter name.

private void updateRememberedComplianceOption(boolean enabled) {
  Combo combo= getComboBox(PREF_PB_ASSERT_AS_IDENTIFIER);
  combo.setEnabled(enabled);
		
  if (!enabled) {
    String val= (String) fWorkingValues.get(PREF_PB_ASSERT_AS_IDENTIFIER);
    if (!ERROR.equals(val)) {
      fWorkingValues.put(PREF_PB_ASSERT_AS_IDENTIFIER, ERROR);
      updateCombo(combo);
      ...
    }
  }
}

-> expected:
private void updateRememberedComplianceOption(boolean enabled, String key) {
  Combo combo= getComboBox(key);
  combo.setEnabled(enabled);
		
  if (!enabled) {
    String val= (String) fWorkingValues.get(key);
    if (!ERROR.equals(val)) {
      fWorkingValues.put(key, ERROR);
      updateCombo(combo);
      ...
    }
  }
}
Comment 1 Markus Keller CLA 2004-09-10 09:15:02 EDT

*** This bug has been marked as a duplicate of 44803 ***