Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 154216 - [pull up] Preview fails to show "Add member declaration"
Summary: [pull up] Preview fails to show "Add member declaration"
Status: RESOLVED DUPLICATE of bug 188597
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.2.2   Edit
Hardware: PC Linux
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-17 09:17 EDT by Jörg Thönnes CLA
Modified: 2007-10-04 11:58 EDT (History)
1 user (show)

See Also:


Attachments
.log file from the .metadata directory (400.39 KB, text/plain)
2006-08-17 09:19 EDT, Jörg Thönnes CLA
no flags Details
Screen shot as the error occured. (92.00 KB, image/gif)
2006-08-17 09:22 EDT, Jörg Thönnes CLA
no flags Details
Extract from .metadata/.log with the stack trace (107.79 KB, text/plain)
2006-08-17 09:31 EDT, Jörg Thönnes CLA
no flags Details
ConcreteClass to refactor using Pull-Up (505 bytes, text/plain)
2007-06-06 05:18 EDT, Jörg Thönnes CLA
no flags Details
Interface implemented by ConcreteClass (174 bytes, text/plain)
2007-06-06 05:19 EDT, Jörg Thönnes CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jörg Thönnes CLA 2006-08-17 09:17:47 EDT
I pulled up a method and in the preview I could not see the "Add member declaration" entry.

I will attach stack trace from .log and a screen shot.
Comment 1 Jörg Thönnes CLA 2006-08-17 09:19:13 EDT
Created attachment 48087 [details]
.log file from the .metadata directory

The last stack trace entry applies to this bug.
Comment 2 Jörg Thönnes CLA 2006-08-17 09:22:09 EDT
Created attachment 48088 [details]
Screen shot as the error occured.

As I selected "Add member declaration", this error popped up.
Comment 3 Jörg Thönnes CLA 2006-08-17 09:27:16 EDT
Comment on attachment 48087 [details]
.log file from the .metadata directory

Please delete attachment, it contains too much data.
Comment 4 Jörg Thönnes CLA 2006-08-17 09:31:25 EDT
Created attachment 48090 [details]
Extract from .metadata/.log with the stack trace

This is an extract of the .log file with all lines around the time the error occured.
Comment 5 Jörg Thönnes CLA 2007-06-06 05:13:28 EDT
Again, pull-up failed. See session data and error log below.

This error has been triggered using a simple test case which I will attach.

-- Session data --
eclipse.buildId=M20070212-1330
java.version=1.5.0_07
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US
Command-line arguments:  -os linux -ws gtk -arch x86


-- Error Log --
Date: Wed Jun 06 11:02:27 CEST 2007
Message: Problems occurred when invoking code from plug-in: "org.eclipse.jface".
Severity: Error
Plugin ID: org.eclipse.jface
Stack Trace:
org.eclipse.core.runtime.AssertionFailedException: assertion failed:
at org.eclipse.core.runtime.Assert.isTrue(Assert.java:109)
at org.eclipse.core.runtime.Assert.isTrue(Assert.java:95)
at org.eclipse.ltk.core.refactoring.TextChange.getCurrentContent(TextChange.java:307)
at org.eclipse.ltk.internal.ui.refactoring.TextEditChangePreviewViewer.setInput(TextEditChangePreviewViewer.java:189)
at org.eclipse.ltk.internal.ui.refactoring.TextEditGroupNode.feedInput(TextEditGroupNode.java:76)
at org.eclipse.ltk.internal.ui.refactoring.PreviewWizardPage.showPreview(PreviewWizardPage.java:553)
at org.eclipse.ltk.internal.ui.refactoring.PreviewWizardPage.access$3(PreviewWizardPage.java:532)
at org.eclipse.ltk.internal.ui.refactoring.PreviewWizardPage$5.selectionChanged(PreviewWizardPage.java:523)
at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:162)
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.viewers.Viewer.fireSelectionChanged(Viewer.java:160)
at org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:1976)
at org.eclipse.jface.viewers.StructuredViewer.handleSelect(StructuredViewer.java:1128)
at org.eclipse.jface.viewers.CheckboxTreeViewer.handleSelect(CheckboxTreeViewer.java:271)
at org.eclipse.jface.viewers.StructuredViewer$4.widgetSelected(StructuredViewer.java:1154)
at org.eclipse.jface.util.OpenStrategy.fireSelectionEvent(OpenStrategy.java:213)
at org.eclipse.jface.util.OpenStrategy.access$3(OpenStrategy.java:207)
at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:374)
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:3180)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2856)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
at org.eclipse.jface.window.Window.open(Window.java:796)
at org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation$1.run(RefactoringWizardOpenOperation.java:132)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
at org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation.run(RefactoringWizardOpenOperation.java:145)
at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate(RefactoringStarter.java:40)
at org.eclipse.jdt.internal.corext.refactoring.RefactoringExecutionStarter.startPullUpRefactoring(RefactoringExecutionStarter.java:355)
at org.eclipse.jdt.ui.actions.PullUpAction.run(PullUpAction.java:123)
at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:267)
at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:243)
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:3180)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2856)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1930)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1894)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:422)
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 6 Jörg Thönnes CLA 2007-06-06 05:18:06 EDT
Created attachment 70294 [details]
ConcreteClass to refactor using Pull-Up

This class already implements an interface Interface with getter and setter
for parameter1.

Now parameter2 with getter and setter has been added to this class.

Using Refactor/Pull-Up I will move the new methods to the Interface.

1. Warning about visibility change of parameter2. This is not needed for an interface!

2. Preview mode: Selection the preview for the new methods in the interface results in the error popup.

Refactoring seems to work, though.
Comment 7 Jörg Thönnes CLA 2007-06-06 05:19:35 EDT
Created attachment 70295 [details]
Interface implemented by ConcreteClass

This Interface is the target of pulling-up the getter/setter methods.
Comment 8 Jörg Thönnes CLA 2007-06-06 05:20:30 EDT
Tobias, how is the status of this bug? There are not comments so far except mine.
Comment 9 Martin Aeschlimann CLA 2007-10-04 11:58:30 EDT
fixed for 3.4

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