| Summary: | [ActionSets] [classpath] Toolbar shudders when opening the Classpath Variables preference page | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Brock Janiczak <brockj> |
| Component: | Debug | Assignee: | Michael Rennie <Michael_Rennie> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | minor | ||
| Priority: | P3 | CC: | daniel_megert, dirk_baeumer, Michael_Rennie |
| Version: | 3.1 | ||
| Target Milestone: | 4.4 M2 | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
|
Description
Brock Janiczak
This is due to auto-building being turned off and back on (several times) by JavaClasspathVariablesInitializer.initialize. The stack is as follows. Thread [main] (Suspended (breakpoint at line 1540 in WorkbenchActionBuilder)) WorkbenchActionBuilder.updateBuildActions() line: 1540 WorkbenchActionBuilder$2.propertyChange(Preferences$PropertyChangeEvent) line: 292 Preferences$1.run() line: 497 InternalPlatform.run(ISafeRunnable) line: 1031 Platform.run(ISafeRunnable) line: 757 PreferenceForwarder(Preferences).firePropertyChangeEvent(String, Object, Object) line: 500 PreferenceForwarder.setValue(String, boolean) line: 217 WorkspacePreferences.setAutoBuilding(boolean) line: 147 WorkspacePreferences.copyFromTo(WorkspaceDescription, WorkspaceDescription) line: 70 WorkspacePreferences.copyFrom(WorkspaceDescription) line: 116 Workspace.setDescription(IWorkspaceDescription) line: 1786 JavaClasspathVariablesInitializer.setAutobuild(IWorkspace, boolean) line: 103 JavaClasspathVariablesInitializer.initialize(String) line: 78 JavaCore.getClasspathVariable(String) line: 1426 VariableBlock.refresh(String) line: 432 VariableBlock.<init>(boolean, String) line: 109 ClasspathVariablesPreferencePage.<init>() line: 44 NativeConstructorAccessorImpl.newInstance0(Constructor, Object[]) line: not available [native method] NativeConstructorAccessorImpl.newInstance(Object[]) line: 39 DelegatingConstructorAccessorImpl.newInstance(Object[]) line: 27 Constructor.newInstance(Object[]) line: 274 Class.newInstance0() line: 308 Class.newInstance() line: 261 ConfigurationElement.createExecutableExtension(Bundle, String, Object, ConfigurationElement, String) line: 172 ConfigurationElement.createExecutableExtension(String, String, Object, ConfigurationElement, String) line: 152 ConfigurationElement.createExecutableExtension(String) line: 139 ConfigurationElementHandle.createExecutableExtension(String) line: 48 WorkbenchPlugin.createExtension(IConfigurationElement, String) line: 225 WorkbenchPreferenceNode.createPage() line: 46 WorkbenchPreferenceDialog(PreferenceDialog).createPage(IPreferenceNode) line: 1203 WorkbenchPreferenceDialog(FilteredPreferenceDialog).createPage(IPreferenceNode) line: 237 WorkbenchPreferenceDialog(PreferenceDialog).showPage(IPreferenceNode) line: 1102 WorkbenchPreferenceDialog(FilteredPreferenceDialog).showPage(IPreferenceNode) line: 352 PreferenceDialog$8.selectionChanged(SelectionChangedEvent) line: 626 StructuredViewer$3.run() line: 763 InternalPlatform.run(ISafeRunnable) line: 1031 Platform.run(ISafeRunnable) line: 757 JFaceUtil$1.run(ISafeRunnable) line: 44 SafeRunnable.run(ISafeRunnable) line: 148 TreeViewer(StructuredViewer).firePostSelectionChanged(SelectionChangedEvent) line: 761 TreeViewer(StructuredViewer).handlePostSelect(SelectionEvent) line: 1033 StructuredViewer$5.widgetSelected(SelectionEvent) line: 1053 OpenStrategy.firePostSelectionEvent(SelectionEvent) line: 231 OpenStrategy.access$4(OpenStrategy, SelectionEvent) line: 226 OpenStrategy$3.run() line: 392 RunnableLock.run() line: 35 UISynchronizer(Synchronizer).runAsyncMessages(boolean) line: 118 Display.runAsyncMessages(boolean) line: 2878 Display.readAndDispatch() line: 2537 WorkbenchPreferenceDialog(Window).runEventLoop(Shell) line: 803 WorkbenchPreferenceDialog(Window).open() line: 781 OpenPreferencesAction.run() line: 66 OpenPreferencesAction(Action).runWithEvent(Event) line: 996 ActionContributionItem.handleWidgetSelection(Event, boolean) line: 538 ActionContributionItem.access$2(ActionContributionItem, Event, boolean) line: 488 ActionContributionItem$5.handleEvent(Event) line: 400 EventTable.sendEvent(Event) line: 82 MenuItem(Widget).sendEvent(Event) line: 842 Display.runDeferredEvents() line: 2901 Display.readAndDispatch() line: 2534 Workbench.runEventLoop(Window$IExceptionHandler, Display) line: 1601 Workbench.runUI() line: 1565 Workbench.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 315 PlatformUI.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 143 IDEApplication.run(Object) line: 103 PlatformActivator$1.run(Object) line: 230 EclipseStarter.run(Object) line: 345 EclipseStarter.run(String[], Runnable) line: 158 NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method] NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39 DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25 Method.invoke(Object, Object[]) line: 324 Main.invokeFramework(String[], URL[]) line: 328 Main.basicRun(String[]) line: 272 Main.run(String[]) line: 974 Main.main(String[]) line: 950 I've made a change to WorkbenchActionBuilder which eliminates the flicker. It now updates the toolbar to hide/show the autobuild button in an asyncExec. It would previously only do this if the change was triggered by a background thread. The initial case where the action bars are being populated is still done synchronously. Moving to JDT to comment on whether turning autobuild temporarily off if necessary here. s/if/is Actually, this is launching... Darin, can you please comment on why this is necessary The code to turn autobuild off/on has been there since day one. Looking at the code, I'm not sure why it is needed. deferred reopen to set assigned I''m not sure either why we bother to turn off autobuild repeatedly since the JavaModelOperation uses the AVOID_UPDATE flag to batch resource changes. I removed the code here: https://git.eclipse.org/r/15216 (In reply to comment #8) > I''m not sure either why we bother to turn off autobuild repeatedly since > the JavaModelOperation uses the AVOID_UPDATE flag to batch resource changes. > > I removed the code here: https://git.eclipse.org/r/15216 As I commented on the Gerrit review, I have been running this in my host Eclipse on Mac for the past few days and have no noticed any problems. The fix has been merged: http://git.eclipse.org/c/jdt/eclipse.jdt.debug.git/commit/?id=670ee2ed44a51cfd5676c18968a45e9e86ad9bab |