Bug 243272 - [search] Refactor->Move does answer with an exception (sinse Eclipse 3.3)
Summary: [search] Refactor->Move does answer with an exception (sinse Eclipse 3.3)
Status: VERIFIED DUPLICATE of bug 207657
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.5 M2   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-06 04:25 EDT by Thomas Steininger CLA
Modified: 2008-10-29 05:01 EDT (History)
3 users (show)

See Also:


Attachments
screenshots that shows the steps and method AND the error-dialog (110.87 KB, application/zip)
2008-08-06 04:25 EDT, Thomas Steininger CLA
no flags Details
Console-Output and .log-content (13.63 KB, application/zip)
2008-08-22 05:22 EDT, Thomas Steininger CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Steininger CLA 2008-08-06 04:25:36 EDT
Created attachment 109277 [details]
screenshots that shows the steps and method AND the error-dialog

Build ID: I20080617-2000

Steps To Reproduce:
1.On a specail method invoke move
2.choose the destination-class
3.Preview-Button
4.failure


More information:
!ENTRY org.eclipse.ltk.ui.refactoring 4 10000 2008-08-06 10:13:34.570
!MESSAGE Internal Error
!STACK 0
java.lang.reflect.InvocationTargetException
	at org.eclipse.ltk.internal.ui.refactoring.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:91)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Caused by: Java Model Exception: Java Model Status [getFileFromUserSelection(String, String, boolean, int, boolean, Model, SimpleFileFilter[]) {key=Lat/racon_linz/elba/util/Tools;.getFileFromUserSelection(Ljava/lang/String;Ljava/lang/String;ZIZLat/grz/athene/Model;[Lat/grz/athene/guix/SimpleFileFilter;)Ljava/io/File;} [in Tools [in [Working copy] Tools.java [in at.racon_linz.elba.util [in <project root> [in Elba5_Program]]]]] does not exist]
	at org.eclipse.jdt.internal.core.JavaElement.newNotPresentException(JavaElement.java:491)
	at org.eclipse.jdt.internal.core.JavaElement.openWhenClosed(JavaElement.java:525)
	at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:251)
	at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:237)
	at org.eclipse.jdt.internal.core.Member.getFlags(Member.java:164)
	at org.eclipse.jdt.internal.corext.refactoring.structure.MemberVisibilityAdjustor.adjustOutgoingVisibilityChain(MemberVisibilityAdjustor.java:680)
	at org.eclipse.jdt.internal.corext.refactoring.structure.MemberVisibilityAdjustor.adjustOutgoingVisibility(MemberVisibilityAdjustor.java:673)
	at org.eclipse.jdt.internal.corext.refactoring.structure.MemberVisibilityAdjustor.adjustOutgoingVisibility(MemberVisibilityAdjustor.java:715)
	at org.eclipse.jdt.internal.corext.refactoring.structure.MemberVisibilityAdjustor.adjustVisibility(MemberVisibilityAdjustor.java:768)
	at org.eclipse.jdt.internal.corext.refactoring.structure.MoveStaticMembersProcessor.createChange(MoveStaticMembersProcessor.java:723)
	at org.eclipse.jdt.internal.corext.refactoring.structure.MoveStaticMembersProcessor.checkFinalConditions(MoveStaticMembersProcessor.java:384)
	at org.eclipse.ltk.core.refactoring.participants.ProcessorBasedRefactoring.checkFinalConditions(ProcessorBasedRefactoring.java:225)
	at org.eclipse.ltk.core.refactoring.CheckConditionsOperation.run(CheckConditionsOperation.java:85)
	at org.eclipse.ltk.core.refactoring.CreateChangeOperation.run(CreateChangeOperation.java:121)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1800)
	at org.eclipse.ltk.internal.ui.refactoring.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:87)
	... 1 more
Root exception:
Java Model Exception: Java Model Status [getFileFromUserSelection(String, String, boolean, int, boolean, Model, SimpleFileFilter[]) {key=Lat/racon_linz/elba/util/Tools;.getFileFromUserSelection(Ljava/lang/String;Ljava/lang/String;ZIZLat/grz/athene/Model;[Lat/grz/athene/guix/SimpleFileFilter;)Ljava/io/File;} [in Tools [in [Working copy] Tools.java [in at.racon_linz.elba.util [in <project root> [in Elba5_Program]]]]] does not exist]
	at org.eclipse.jdt.internal.core.JavaElement.newNotPresentException(JavaElement.java:491)
	at org.eclipse.jdt.internal.core.JavaElement.openWhenClosed(JavaElement.java:525)
	at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:251)
	at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:237)
	at org.eclipse.jdt.internal.core.Member.getFlags(Member.java:164)
	at org.eclipse.jdt.internal.corext.refactoring.structure.MemberVisibilityAdjustor.adjustOutgoingVisibilityChain(MemberVisibilityAdjustor.java:680)
	at org.eclipse.jdt.internal.corext.refactoring.structure.MemberVisibilityAdjustor.adjustOutgoingVisibility(MemberVisibilityAdjustor.java:673)
	at org.eclipse.jdt.internal.corext.refactoring.structure.MemberVisibilityAdjustor.adjustOutgoingVisibility(MemberVisibilityAdjustor.java:715)
	at org.eclipse.jdt.internal.corext.refactoring.structure.MemberVisibilityAdjustor.adjustVisibility(MemberVisibilityAdjustor.java:768)
	at org.eclipse.jdt.internal.corext.refactoring.structure.MoveStaticMembersProcessor.createChange(MoveStaticMembersProcessor.java:723)
	at org.eclipse.jdt.internal.corext.refactoring.structure.MoveStaticMembersProcessor.checkFinalConditions(MoveStaticMembersProcessor.java:384)
	at org.eclipse.ltk.core.refactoring.participants.ProcessorBasedRefactoring.checkFinalConditions(ProcessorBasedRefactoring.java:225)
	at org.eclipse.ltk.core.refactoring.CheckConditionsOperation.run(CheckConditionsOperation.java:85)
	at org.eclipse.ltk.core.refactoring.CreateChangeOperation.run(CreateChangeOperation.java:121)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1800)
	at org.eclipse.ltk.internal.ui.refactoring.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:87)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Comment 1 Jerome Lanneluc CLA 2008-08-19 12:11:00 EDT
I cannot reproduce with the steps provided. More accurate steps would be needed. An example project that shows the problem would be great.

From the stack trace, I see that MemberVisibilityAdjustor.adjustOutgoingVisibilityChain is asking the flags of a member that doesn't exist.

Moving to JDT/UI for further investigation.
Comment 2 Dani Megert CLA 2008-08-20 04:17:52 EDT
>1.On a specail method invoke move
Cannot reproduce either (sorry, but I have no idea what a "special" method is ;-)

Moving back to JDT Core as this looks like a duplicate for bug 207657 which seems to have steps.
Comment 3 Frederic Fusier CLA 2008-08-20 09:47:15 EDT
As the stack trace is similar, it looks like a duplicate of bug 207657.
I'll investigate...

*** This bug has been marked as a duplicate of bug 207657 ***
Comment 4 Thomas Steininger CLA 2008-08-20 10:02:26 EDT
I am not sure that this is the same situation - the trace differs and there is no static inner class involved.
In my case it occures on an certain static method in an class which contains only static methods (an helper-class called tools).

Many other refactor-movings are working.

But i cant make an simple sample, because i don't know the reason and situation for that problem..
Comment 5 Frederic Fusier CLA 2008-08-21 10:55:22 EDT
Can you activate the trace for search in order to confirm/infirm my assumption?

To do this:
1) in the '.options' file, change the following lines:
org.eclipse.jdt.core/debug=true
org.eclipse.jdt.core/debug/search=true

2) Restart your eclipse session using the -consoleLog argument.

3) Reproduce the failing move operation

4) Copy the output of the console in the clipboard, paste it in a file and attach this file to this bug.

TIA
Comment 6 Thomas Steininger CLA 2008-08-22 03:11:13 EDT
i would do like mentioned, 
but i don't have that '.options' file that you seem to mean.
should i create an file? 
on which place?
Comment 7 Dani Megert CLA 2008-08-22 03:24:15 EDT
Either copy the one which is inside jdt.core plug-in jar or create a new file called '.options' in the eclipse root directory (the one named 'eclipse' when you unzipped eclipse). Then add the options Frédéric mentioned and start eclipse with '-debug'. Since there might be lots of debug info written to the console, it's best to redirect it to a file.
Comment 8 Thomas Steininger CLA 2008-08-22 05:22:01 EDT
Created attachment 110659 [details]
Console-Output and .log-content
Comment 9 Frederic Fusier CLA 2008-09-04 12:39:35 EDT
I just released a fix for bug 207657, could you verify with next integration build or next milestone whether it fixes your issue or not?
Thanks
Comment 10 Thomas Steininger CLA 2008-09-30 04:03:14 EDT
With Eclipse 3.5 M2 the refactoring worked fine. Thanks.
Comment 11 Frederic Fusier CLA 2008-09-30 05:53:17 EDT

*** This bug has been marked as a duplicate of bug 207657 ***
Comment 12 Jerome Lanneluc CLA 2008-10-29 04:59:55 EDT
Verified for 3.5M3 by reporter