Map javaToStr = null; if (fJavaFiles != null) { if (fJavaFiles.containsKey(javaFile)) javaToStr = (Map) fJavaFiles.get(javaFile); } else { fJavaFiles = new HashMap();
Map javaToStr = null; if (fJavaFiles == null) fJavaFiles = new HashMap(); else if (fJavaFiles.containsKey(javaFile)) javaToStr = (Map) fJavaFiles.get(javaFile);   String javaFileName = javaFile.getName(); String strFileName = javaFileName.substring(0, javaFileName.lastIndexOf('.' + StreamItLauncherPlugin.JAVA_FILE_EXTENSION)) + '.' + StreamItLauncherPlugin.STR_FILE_EXTENSION; if (javaToStr == null) { javaToStr = mapJavaToStr(javaFile, strFileName); fJavaFiles.put(javaFile, javaToStr); }   o = javaToStr.get(new Integer(top.getLineNumber())); if (o == null) {  IBreakpoint[] b = thread.getBreakpoints(); for (int i = 0; i < b.length; i++) { if (allBreakpoints[INIT_BREAKPOINTS].contains(b[i])) handleInitExit(unit, top); else if (allBreakpoints[WORK_BREAKPOINTS].contains(b[i])) handleWorkExit(unit, top); else if (allBreakpoints[OTHER_BREAKPOINTS].contains(b[i])) handleOtherExit(unit, top);
	protected void handleSuspend(DebugEvent event) {		// only handle if IThread		Object o = event.getSource();		if (!(o instanceof IThread)) return;		try { 			// only handle if StreamIt Launch			IThread thread = (IThread) o;			ILaunch launch = thread.getLaunch();			if (!launch.getLaunchConfiguration().getName().equals(StreamItLauncherPlugin.ID_STR_APPLICATION)) return;			// get cause of launch			IStackFrame top = thread.getTopStackFrame();			if (top == null) return;			o = launch.getSourceLocator().getSourceElement(top);						// only handle if from .java			if (!(o instanceof ICompilationUnit)) return;			IFile javaFile = (IFile) ((ICompilationUnit) o).getResource();						// get mapping if already mapped			Map javaToStr = null;			if (fJavaFiles != null) {				if (fJavaFiles.containsKey(javaFile)) javaToStr = (Map) fJavaFiles.get(javaFile);			} else {				fJavaFiles = new HashMap();			}						// map if not already mapped			String javaFileName = javaFile.getName();			String strFileName = javaFileName.substring(0, javaFileName.lastIndexOf(".java")) + '.' + StreamItLauncherPlugin.STR_FILE_EXTENSION;			if (javaToStr == null) {				System.out.println("mapping");				javaToStr = mapJavaToStr(javaFile, strFileName);				fJavaFiles.put(javaFile, javaToStr);													}																													// highlight in .str			DebugUIPlugin.getStandardDisplay().asyncExec(getHighlighter(javaFile.getProject().getFile(strFileName), 														((Integer) javaToStr.get(new Integer(top.getLineNumber()))).intValue() - 1));		} catch (Exception e) {		}	}