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 45699 - When you move the class to the default package, the package line is not deleted
Summary: When you move the class to the default package, the package line is not deleted
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 4.x
Hardware: PC Other
: P3 blocker (vote)
Assignee: Pavel Flaska
URL:
Keywords:
Depends on:
Blocks: 44713
  Show dependency tree
 
Reported: 2004-06-29 21:46 UTC by vbrabant
Modified: 2007-04-03 18:02 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 vbrabant 2004-06-29 21:46:40 UTC
I have a class 'Main' in the package 'mypackage'. 
I use the refactoring to move the class to the
default package. 
NB Delete the sentence package mypackage; but it
doesnt delete the CR/LF.
It means that if you are moving the class to
another package, and then removing the class to
the default package, and you retry that openation
10 times, you will have finally a java source file
with 10 empty lines at the begin of your code.

Moving your class to the default package would
delete the complete line of package, CR/LF included.
Comment 1 Pavel Flaska 2004-07-28 08:51:16 UTC
Did you really tried it ten times? :-) Doesn't matter, currently our
code tries remove the new line before package statement. If your
package statement is at the first line, we do not remove any line end.
We should try to remove \n character at the end of package statement,
but it is more difficult to find it.
Comment 2 Pavel Flaska 2004-07-28 12:57:56 UTC
Checking in
src/org/netbeans/modules/javacore/jmiimpl/javamodel/ResourceImpl.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/jmiimpl/javamodel/ResourceImpl.java,v
 <--  ResourceImpl.java
new revision: 1.21; previous revision: 1.20
done
Processing log script arguments...