Bug 19104 - Basket for problems with .java files outside build path
Summary: Basket for problems with .java files outside build path
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P2 major (vote)
Target Milestone: 2.0 F3   Edit
Assignee: Dirk Baeumer CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 19061 19062 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-06-04 11:40 EDT by Dani Megert CLA
Modified: 2002-06-13 08:55 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dani Megert CLA 2002-06-04 11:40:46 EDT
1) .java file is not inside a source folder
- "Rename" refactoring is enabled but does not work: no preview and does not
rename if finished is pressed.

2) .java file that is inside a non-Java project
- Lots of problems when views hold on to a working copy which can not be mapped
to a compilation unit after the editor has been closed
- shows red squiggly lines when using "Show Source of selected element only"
- same problems as 1)

MORE WILL FOLLOW TOMORROW
Comment 1 Erich Gamma CLA 2002-06-04 13:00:23 EDT
need to be investigated for F3
Comment 2 Erich Gamma CLA 2002-06-04 15:40:47 EDT
*** Bug 19062 has been marked as a duplicate of this bug. ***
Comment 3 Erich Gamma CLA 2002-06-04 15:41:10 EDT
*** Bug 19061 has been marked as a duplicate of this bug. ***
Comment 4 Dani Megert CLA 2002-06-05 11:13:38 EDT
Sceario where a .java file is opened in the editor and then renamed to .txt:
- several actions fail with NPE:
  - Organize Import
  - Add Constructor from super classe
  - Override methods
  - Open Type Hierarchy
  - Inline Temp Refactoring
  - Rename
  ...
Comment 5 Kai-Uwe Maetzel CLA 2002-06-05 12:43:09 EDT
Increase priority.
Comment 6 Erich Gamma CLA 2002-06-11 09:00:21 EDT
investigate whether we can guard the actions. we should show the user a warning 
that the file is not on a class path.
Comment 7 Dirk Baeumer CLA 2002-06-11 10:55:30 EDT
In both cases the whole parent chain is populated correctly. What causes the 
problem is the fact that the CUs or elements below exist but that some of the 
parents don't exist. None of our code currently deals with this situation.

We should guard our actions against the situation that the Compilation unit is 
not on the build path of a Java project
Comment 8 Dirk Baeumer CLA 2002-06-11 11:39:17 EDT
The deal is that we guard those actions that cause problems in this situation.
Comment 9 Dirk Baeumer CLA 2002-06-11 14:59:53 EDT
Action that fail in the case of Java elements not being on the class path got 
guarded in the run method.

Fixed in build > 20020611

Fix reviewed by Daniel Megert.
Comment 10 Dirk Baeumer CLA 2002-06-13 08:55:05 EDT
Verified. TB