This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 87361 - 5.5 RC1: Bug in copy/paste Java classes
Summary: 5.5 RC1: Bug in copy/paste Java classes
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-17 17:52 UTC by wqtnetbeans
Modified: 2007-09-26 09:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description wqtnetbeans 2006-10-17 17:52:14 UTC
There is a nice feature in 5.0, when you copy and paste a Java file from one
package/directory to another, either in the "file" pane or "favourate", the IDE
automatically changes the package name of the Java file, and the code will
compile in the newly pasted location. 

The bug in 5.5 RC1 is that, the package name change seems still work, but the
class name in the code of the new file is changed literately to "java", rather
than the original name of the Java class. This causes the compile in the new
location to fail, of course.
Comment 1 Jiri Prox 2006-10-18 08:44:18 UTC
It's working for me. The only problem is that imports are not fixed automaticaly
after pasting (filed as another issue). Can you provide exact steps to
reproduce, please?
Comment 2 wqtnetbeans 2006-10-18 15:25:25 UTC
It's working for me. The only problem is that imports are not fixed automaticaly
after pasting (filed as another issue). 

==> We surely have an inconsistency issue here: The automatic package fix works
for me. But the class name is messed up and changed literaly to "java".

Can you provide exact steps to reproduce, please?

==> There is really no steps other than the uasual: I am doing this in the
"Favorits" pannel. Copying a class from one directory
"rootOfFavariteMount/../generated/com/mypack1/.../MyClass.java", to another
"rootOfFavariteMount/../src/com/mypack2/.../MyClass.java". The package name is
auto fixed correctly; but "MyClass" in the new code is changed to "java",
causing the compile to fail.
Comment 3 Max Sauer 2007-08-20 09:41:56 UTC
This works properly inside nb 6.0.
---
Product Version: NetBeans IDE Dev (Build 070820) 
Java: 1.6.0_02; Java HotSpot(TM) Client VM 1.6.0_02-b05 
System: Linux version 2.6.12-1.1390_FC4smp running on i386; UTF-8; en_US (nb) 
Userdir: /home/ms159439/.netbeans/dev