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 66662 - Refactoring reformats the code
Summary: Refactoring reformats the code
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Pavel Flaska
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-12 23:23 UTC by Martin Matula
Modified: 2007-09-26 09:14 UTC (History)
1 user (show)

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 Martin Matula 2005-10-12 23:23:12 UTC
From Todd Fast:

Invoking Refactor -> Extract Inner to Outer... to move an inner class to
normal class reformats the methods.  This is extremely irritating since
it does quite a poor job of it.  Since now I have to go back and
reformat everything, I'm better off just doing this refactoring manually.

Is there any particular reason this reformatting is necessary?
Comment 1 Pavel Flaska 2005-12-05 13:52:52 UTC
I have made several fixes in this area recently. Still I know about some places
where to fix.

Reformatting is caused by fixing imports - when method is moved to another
class, we have to add imports. In some cases, they can even clash with existing
imports. This is the reason why we cannot copy and reident the part of document
as a text.
Comment 2 Pavel Flaska 2005-12-07 14:56:26 UTC
Invocation case fixed. The most visible part was fixed already. I expect there
are still some minor issues, which should be reported as individual issues with
concrete problem.

Checking in src/org/netbeans/modules/javacore/jmiimpl/javamodel/IndentUtil.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/jmiimpl/javamodel/IndentUtil.java,v
 <--  IndentUtil.java
new revision: 1.13; previous revision: 1.12
done
Checking in src/org/netbeans/modules/javacore/jmiimpl/javamodel/IntLiteralImpl.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/jmiimpl/javamodel/IntLiteralImpl.java,v
 <--  IntLiteralImpl.java
new revision: 1.5; previous revision: 1.4
done
Checking in
src/org/netbeans/modules/javacore/jmiimpl/javamodel/MethodInvocationImpl.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/jmiimpl/javamodel/MethodInvocationImpl.java,v
 <--  MethodInvocationImpl.java
new revision: 1.8; previous revision: 1.7
done
RCS file:
/cvs/java/javacore/test/unit/data/goldenfiles/org/netbeans/jmi/javamodel/codegen/indent/MoveElementsTest/testMoveCall_MoveElementsTest.pass,v
done
Checking in
test/unit/data/goldenfiles/org/netbeans/jmi/javamodel/codegen/indent/MoveElementsTest/testMoveCall_MoveElementsTest.pass;
/cvs/java/javacore/test/unit/data/goldenfiles/org/netbeans/jmi/javamodel/codegen/indent/MoveElementsTest/testMoveCall_MoveElementsTest.pass,v
 <--  testMoveCall_MoveElementsTest.pass
initial revision: 1.1
done
Checking in
test/unit/data/projects/default/src/org/netbeans/test/codegen/indent/GarbageClass.java;
/cvs/java/javacore/test/unit/data/projects/default/src/org/netbeans/test/codegen/indent/GarbageClass.java,v
 <--  GarbageClass.java
new revision: 1.2; previous revision: 1.1
done
Checking in
test/unit/src/org/netbeans/jmi/javamodel/codegen/indent/MoveElementsTest.java;
/cvs/java/javacore/test/unit/src/org/netbeans/jmi/javamodel/codegen/indent/MoveElementsTest.java,v
 <--  MoveElementsTest.java
new revision: 1.2; previous revision: 1.1
done
Comment 3 Quality Engineering 2007-09-20 10:08:05 UTC
Reorganization of java component