Bug 12528 - Refactor rename indentifier detection
Summary: Refactor rename indentifier detection
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Adam Kiezun CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 12590
Blocks:
  Show dependency tree
 
Reported: 2002-04-01 04:57 EST by Konstantin Scheglov CLA
Modified: 2002-04-04 06:39 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Konstantin Scheglov CLA 2002-04-01 04:57:57 EST
20020228
W2k
When I try to rename variable "collection" (second line), I 
see "TAggregateCollection" in refactor wizard. No matter, if I select 
word "collection" or simple place cursor on it.

	TReceiverDef GetAggregateOrJSPReceiver(String name, String 
telegramName) throws Exception {
		TAggregateCollection collection = 
m_Config.getAggregateCollection();
		for (int i = 0; i < collection.GetAggregateCount(); i++) {
			TAggregateDef aggregate = collection.GetAggregate( i );
			if ( aggregate.GetName().equals( name ) ) {
				String receiverName = 
m_Config.getMainTelegramGroup().GetTelegramOrFail( telegramName ).getReceiver();
				return aggregate.getReceiverCollection
().GetReceiverOrFail( receiverName );
			}
		}
		throw new Exception( "Error: " + name );
	}
Comment 1 Adam Kiezun CLA 2002-04-02 04:24:07 EST
sorry, i wasn't successful in reproducing it (i tried 20020228 and 20020328)
(i even created all classe-stubs required to compile this test case)

do you see this bug in smaller (things that use only standard jdk classes) test 
cases as well?
do you see it on the latest stable build 20020321? 
closing for now - please reopen if needed
Comment 2 Konstantin Scheglov CLA 2002-04-02 05:38:20 EST
20020328
Try to rename variable "batch". I use main menu, "Refactor", "Rename...". But 
in dialog edit I see "TArchiverBatch2" instead of "batch".
This code uses only jdk classes (I hope ;-)).

package ru.nlmk.util.archiver;

import java.util.HashMap;
import java.util.Map;

public class BugTest {
	Map m_QueryToBatchMap = new HashMap();
	private void test() {
		Object vvv = "1234";
		Long qqq = (Long)vvv;
	}
	private TArchiverBatch2 getBatch(String query) {
		TArchiverBatch2 batch = (TArchiverBatch2) m_QueryToBatchMap.get
(query);
		if (batch == null) {
			batch = new TArchiverBatch2(query);
			m_QueryToBatchMap.put(query, batch);
		}
		return batch;
	} // run
	public static void main(String[] args) {
	}
}

class TArchiverBatch2 {
	public TArchiverBatch2(String query) {
	}
}
Comment 3 Adam Kiezun CLA 2002-04-02 05:41:29 EST
ok we new know what it is - please see 12590
thanks
Comment 4 Adam Kiezun CLA 2002-04-04 06:39:53 EST
fixed