Bug 8484 - Internal error searching for write access to a variable
Summary: Internal error searching for write access to a variable
Status: RESOLVED DUPLICATE of bug 8536
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows NT
: P1 normal (vote)
Target Milestone: 2.0 M3   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-01-25 12:03 EST by Knut Radloff CLA
Modified: 2002-01-28 12:12 EST (History)
0 users

See Also:


Attachments
org.eclipse.jdt.internal.compiler.problem.AbortCompilationUnit searching for write access to variable (4.12 KB, text/plain)
2002-01-25 12:04 EST, Knut Radloff CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Knut Radloff CLA 2002-01-25 12:03:42 EST
build 20020124

I get an internal error when I search for write access to the variable 'toggle' 
in the class below.
I'm going to upload the workspace to walleye /va2000/INCOMING/forKnut in case 
you can't reproduce. The class is in project Playgound_Knut, 
kr.PR.FlashTest.java.

import org.eclipse.swt.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.widgets.*;

public class FlashTest {
	boolean toggle = false;
	
public void create() {
	final Shell shell = new Shell();
	Display display = shell.getDisplay();
	final Canvas canvas = new Canvas(shell, SWT.NO_BACKGROUND);
	final Color background = new Color(display, 222, 222, 222);
	final Color color1 = new Color(display, 0, 0, 0);
	final Color color2 = new Color(display, 222, 0, 0);
	
	canvas.setSize(200, 200);
	canvas.addListener(SWT.Paint, new Listener() {
		public void handleEvent(Event e) {
			if (toggle) {
//				e.gc.setBackground(color1);
				e.gc.setForeground(color1);
			}
			else {
//				e.gc.setBackground(color2);
				e.gc.setForeground(color2);
			}
			e.gc.setBackground(background);
			e.gc.fillRectangle(e.getBounds());
			for (int i = 0; i < canvas.getSize().y; i += 14) {
				e.gc.drawText("FlashTest Line FlashTest " + i, 
0, i);
			}
		}
	});
	canvas.addListener(SWT.KeyDown, new Listener() {
		public void handleEvent(Event e) {
			toggle = !toggle;
			canvas.redraw();
		}
	});
	shell.open();
	while (!shell.isDisposed ()) {
		if (!display.readAndDispatch ()) display.sleep ();
	}
}
public static void main(String[] args) {
	FlashTest test = new FlashTest();
	test.create();
}
}
Comment 1 Knut Radloff CLA 2002-01-25 12:04:58 EST
Created attachment 267 [details]
org.eclipse.jdt.internal.compiler.problem.AbortCompilationUnit searching for write access to variable
Comment 2 Knut Radloff CLA 2002-01-25 12:07:34 EST
The internal error only seems to happen if I search for write access in the 
hierarchy. It also occurs in other files but works when I search in the entire 
workspace (haven't tried a working set).
Comment 3 Jerome Lanneluc CLA 2002-01-28 12:12:21 EST

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