Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 154735 - [refactoring scripts] Refactoring History Property page showing in weird places
Summary: [refactoring scripts] Refactoring History Property page showing in weird places
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2.2   Edit
Assignee: Martin Aeschlimann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 157794 161308 165179 169445 183074 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-08-22 14:41 EDT by Mike Boyersmith CLA
Modified: 2007-04-24 06:44 EDT (History)
8 users (show)

See Also:


Attachments
shows refactoring history off of a resource off the navigator (107.50 KB, application/binary)
2006-08-22 14:42 EDT, Mike Boyersmith CLA
no flags Details
proposed patch for 3.2.2 (1.77 KB, patch)
2007-01-15 11:30 EST, Martin Aeschlimann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Boyersmith CLA 2006-08-22 14:41:02 EDT
Using eclipse 3.2 

The "Refactorings History" dialog will show up on properties on resource inspection once, then next time you view properties it will no longer show up. In addition its showing up when it shouldn't (as far as I can tell). I've seen this happen on several views and it looks like the property page just isn't registered correctly or something. 

See attached document
Comment 1 Mike Boyersmith CLA 2006-08-22 14:42:15 EDT
Created attachment 48400 [details]
shows refactoring history off of a resource off the navigator
Comment 2 Martin Aeschlimann CLA 2006-08-29 05:34:24 EDT
I think this got fixed for 3.2.1 and 3.3. Can you give this a try? Fix was for bug 151134.
Comment 3 Markus Keller CLA 2006-09-04 09:51:00 EDT
Steps in M20060830-0800:
- new workspace
- check out org.eclipse.core.expressions from CVS
- select folder org.eclipse.core.expressions/schema and choose File > Properties
=> Refactoring History page is present

- cancel, open properties on src
=> Refactoring History page is not present

- cancel, open properties on schema again
=> Refactoring History page is not present any more

I guess this has something to do with lazy plugin loading.
Comment 4 Tobias Widmer CLA 2006-09-19 11:25:05 EDT
*** Bug 157794 has been marked as a duplicate of this bug. ***
Comment 5 Kushal Munir CLA 2006-10-17 16:40:56 EDT
*** Bug 161308 has been marked as a duplicate of this bug. ***
Comment 6 Martin Oberhuber CLA 2006-11-03 17:37:57 EST
I'm seeing the Refactoring History Property Page in Eclipse 3.2.1, in the Update Manager:

Help > Software Updates > Find and Install > Search for New Features >
  (Select Site, e.g. http://download.eclipse.org/dsdp/tm/updates) >
  (Choose a feature, e.g. RSE Runtime / org.eclipse.rse.ftp) > 
  Press Properties button

When I press cancel to go out of the Update Manager, then try the same steps again, I cannot see the page any more.

On a different occasion, I've got an exception from the Refactoring History Property page, from a completely unrelated property page where refactoring history was not even shown (and not expected):
  - eclipse.buildId=M20060921-0945
  - java.version=Sun 1.5.0_06
  - linux-x86-gtk

org.eclipse.core.runtime.AssertionFailedException: null argument:
at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:84)
at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:72)
at org.eclipse.ltk.internal.core.refactoring.history.RefactoringHistoryService.hasSharedRefactoringHistory(RefactoringHistoryService.java:594)
at org.eclipse.ltk.internal.ui.refactoring.history.RefactoringPropertyPage.performOk(RefactoringPropertyPage.java:404)
at org.eclipse.jface.preference.PreferenceDialog$11.run(PreferenceDialog.java:889)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.runtime.Platform.run(Platform.java:843)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:44)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:149)
at org.eclipse.jface.preference.PreferenceDialog.okPressed(PreferenceDialog.java:869)
at org.eclipse.ui.internal.dialogs.FilteredPreferenceDialog.okPressed(FilteredPreferenceDialog.java:377)
at org.eclipse.jface.preference.PreferenceDialog.buttonPressed(PreferenceDialog.java:230)
at org.eclipse.jface.dialogs.Dialog$3.widgetSelected(Dialog.java:660)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:90)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1085)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3166)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2842)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
at org.eclipse.jface.window.Window.open(Window.java:796)
at org.eclipse.ui.dialogs.PropertyDialogAction.run(PropertyDialogAction.java:156)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:499)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:539)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:488)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:400)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1085)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3166)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2842)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336)
at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at org.eclipse.core.launcher.Main.main(Main.java:952)



Comment 7 Martin Oberhuber CLA 2006-11-14 15:17:25 EST
I'm finding this really annoying, it's reproducable in the Update Manager as well as our project (bug 164202, bug 149122) and due to the "Assertion Failed" exception it can even keep me from getting my work done so it's not just a minor cosmetical thing.

But it's still in state NEW... any plans for working on this?
Comment 8 Martin Aeschlimann CLA 2006-11-15 06:13:21 EST
fixed > 20061114 in 3.3 and 3.2.2.

The page now only shows up on projects. It's still possible that it shows up on a project on the first invocation but not anymore on the second. This happens when the property tester that tests if a project has a refactoring history is not yet loaded. We can't and don't want to force a plugin load. 
Comment 9 Martin Oberhuber CLA 2006-11-15 07:23:12 EST
Thanks for fixing this!

Just one question regarding the forced plugin load: 

When I understand it right, it can still happen that the property page is displayed when it should not be displayed. So, because of not instaniating the plugin with the tester class, the UI is instanciated. But doesn't instanciation of the UI force a load of the non-UI classes that it depends on? In other words, can it happen that because of not loading the tester, the UI gets loaded which results in loading the tester in turn?

If this assumption is true, then loading the tester in advance might make sense after all.
Comment 10 Martin Aeschlimann CLA 2006-11-15 08:24:36 EST
The UI classes (and the tester code) are only loaded when you really have a look at the page. That means you have to select the 'Refactoing History' node on the property page.
Comment 11 Martin Oberhuber CLA 2006-11-15 08:36:11 EST
I see. Thanks.
Comment 12 Martin Oberhuber CLA 2006-11-15 08:37:42 EST
Surprising, though, that I had run into the traceback of comment 6 although I had certainly not looked at the Refactoring History Page.
Comment 13 Martin Aeschlimann CLA 2006-11-15 08:47:44 EST
The problem from comment 6 can't happen anymore as the page now only show up on projects. I supsect you got the stacktrace on non-project element but must have looked at the page.
It would be a bug in platform if the page would be loaded without being shown. I just verified this I think everything is fine there.
Comment 14 Martin Aeschlimann CLA 2006-11-22 05:44:18 EST
*** Bug 165179 has been marked as a duplicate of this bug. ***
Comment 15 Martin Aeschlimann CLA 2007-01-04 09:06:40 EST
*** Bug 169445 has been marked as a duplicate of this bug. ***
Comment 16 Dani Megert CLA 2007-01-15 05:26:41 EST
Starting verification...
Comment 17 Dani Megert CLA 2007-01-15 05:58:46 EST
Using M20070112-1200 I verified the scenarios reported in this bug and its duplicates. It works in all cases but closed projects:

0. start
1. select a closed simple project
2. open its properties
   ==> Refactoring page is present
3. click 'OK'
==> error dialog plus .log entries
Comment 18 Martin Aeschlimann CLA 2007-01-15 11:30:48 EST
Created attachment 56911 [details]
proposed patch for 3.2.2

Patch shows empty page when project is not accessible. Better would be a label, but I better don't introduce new NLS strings at this time.
Comment 19 Martin Aeschlimann CLA 2007-01-15 11:36:22 EST
Note that the empty page is only shown when the property action is invoked on a closed project before ltk.ui is loaded.
As soon as ltk.ui is loaded, this will not happen anympre, but the page won't be available in the tree at all.

released in 3.2.2 > 20070115
Comment 20 Markus Keller CLA 2007-01-29 11:43:22 EST
Verified in M20070125-1400.
Comment 21 Martin Aeschlimann CLA 2007-04-24 06:44:20 EDT
*** Bug 183074 has been marked as a duplicate of this bug. ***