Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 143567 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/mylar/internal/bugzilla/ui/editor/NewBugEditor.java (-3 / +8 lines)
Lines 247-256 Link Here
247
			if (!hit) {
247
			if (!hit) {
248
				return null;
248
				return null;
249
			}
249
			}
250
			stackBuffer.append(prevLine + "\n" + line + "\n");
250
			stackBuffer.append(prevLine + "\n");
251
			while (line.indexOf(".java:") > 0 && line.indexOf("at ") == 0 && tok.hasMoreTokens()) {
251
			while (line.indexOf(".java:") > 0 && line.indexOf("at ") == 0) {
252
				line = tok.nextToken();
253
				stackBuffer.append(line + "\n");
252
				stackBuffer.append(line + "\n");
253
				if (tok.hasMoreTokens()) {
254
					line = tok.nextToken();
255
				}
256
				else {
257
					line = "";
258
				}
254
			}
259
			}
255
		}
260
		}
256
		if (stackBuffer.length() > 0) {
261
		if (stackBuffer.length() > 0) {
(-)src/org/eclipse/mylar/bugzilla/tests/DuplicateDetetionTest.java (-3 / +23 lines)
Lines 51-58 Link Here
51
		IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
51
		IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
52
		NewBugEditorInput input = new NewBugEditorInput(repository, model);
52
		NewBugEditorInput input = new NewBugEditorInput(repository, model);
53
		TaskUiUtil.openEditor(input, BugzillaUiPlugin.NEW_BUG_EDITOR_ID, page);
53
		TaskUiUtil.openEditor(input, BugzillaUiPlugin.NEW_BUG_EDITOR_ID, page);
54
		
54
55
		MylarTaskEditor taskEditor = (MylarTaskEditor) page.getActiveEditor();		
55
		MylarTaskEditor taskEditor = (MylarTaskEditor) page.getActiveEditor();
56
		NewBugEditor editor = (NewBugEditor) taskEditor.getActivePageInstance();
56
		NewBugEditor editor = (NewBugEditor) taskEditor.getActivePageInstance();
57
		assertTrue(editor.searchForDuplicates());
57
		assertTrue(editor.searchForDuplicates());
58
58
Lines 70-80 Link Here
70
		NewBugEditorInput input = new NewBugEditorInput(repository, model);
70
		NewBugEditorInput input = new NewBugEditorInput(repository, model);
71
		TaskUiUtil.openEditor(input, BugzillaUiPlugin.NEW_BUG_EDITOR_ID, page);
71
		TaskUiUtil.openEditor(input, BugzillaUiPlugin.NEW_BUG_EDITOR_ID, page);
72
72
73
		MylarTaskEditor taskEditor = (MylarTaskEditor) page.getActiveEditor();		
73
		MylarTaskEditor taskEditor = (MylarTaskEditor) page.getActiveEditor();
74
		NewBugEditor editor = (NewBugEditor) taskEditor.getActivePageInstance();
74
		NewBugEditor editor = (NewBugEditor) taskEditor.getActivePageInstance();
75
		assertNull(editor.getStackTraceFromDescription());
75
		assertNull(editor.getStackTraceFromDescription());
76
76
77
		editor.markDirty(false);
77
		editor.markDirty(false);
78
		editor.close();
78
		editor.close();
79
	}
79
	}
80
81
	public void testStackTraceWithAppendedText() throws Exception {
82
83
		String stackTrace = "java.lang.NullPointerException\nat jeff.testing.stack.trace.functionality(jeff.java:481)\nExtra text that isnt' part of the stack trace";
84
85
		NewBugzillaReport model = new NewBugzillaReport(repository.getUrl(), TasksUiPlugin.getDefault()
86
				.getOfflineReportsFile().getNextOfflineBugId());
87
		model.setNewComment(stackTrace);
88
		model.setHasLocalChanges(true);
89
		IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
90
		NewBugEditorInput input = new NewBugEditorInput(repository, model);
91
		TaskUiUtil.openEditor(input, BugzillaUiPlugin.NEW_BUG_EDITOR_ID, page);
92
93
		MylarTaskEditor taskEditor = (MylarTaskEditor) page.getActiveEditor();
94
		NewBugEditor editor = (NewBugEditor) taskEditor.getActivePageInstance();
95
		assertTrue(editor.searchForDuplicates());
96
97
		editor.markDirty(false);
98
		editor.close();
99
	}
80
}
100
}

Return to bug 143567