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 7505 - Repackage doesn't work correctly
Summary: Repackage doesn't work correctly
Status: CLOSED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: PC Linux
: P3 normal (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2000-08-28 15:00 UTC by ehucka
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 ehucka 2000-08-28 15:00:44 UTC
[848] Linux ,JDK 1.3 Kestrel b16

When I Cut and Paste some java file from package to package there are two lines
with "package" keyword in the source. New, correct "package line" is at the
first line of file, old is on its old place.
Comment 1 Svata Dedic 2000-08-28 15:11:59 UTC
[Jaga, Boston] That bug is fixed by waiting on the repackaging job being
complete before giving the control over the IDE back to the user. The bug was
most probably caused by the background package updates if the sources was
copied/cut/pasted multiple times.
Comment 2 Svata Dedic 2000-09-01 07:17:59 UTC
The behaviour will not be fixed for Post-FCS releases as synchronizing the
operation into the user thread would likely introduce deadlocks.
Comment 3 David Kaspar 2002-07-09 14:14:02 UTC
Reopening

It happens when I am using CORBA module and I am generating java
source files from ServerMain and ClientMain Templates.
Comment 4 Svata Dedic 2002-07-09 14:58:33 UTC
David, what exactly happens ? Does the `package' statement appear
several times in the file ?
Comment 5 Tomas Hurka 2002-07-09 20:54:09 UTC
Cannot reproduce. Please provide more information how to reproduce.
Comment 6 Jan Becicka 2002-07-10 08:46:29 UTC
Neither do I.
I've installed corba module and I can instantiate above mentioned
templates without any problems.
Comment 7 David Kaspar 2002-09-20 15:22:41 UTC
Reopening - I could reproduce it on slower machines.
Steps to reproduce:
1) Install CORBA module
2) Start NB
3) Create IDL in some package using "CORBA|Simple" template
4) Select IDL file
5) Click on "Tools|CORBA Wizard..." action from main menu
6) NOTE - "CORBA Wizard" is shown, in the tree there should be
selected IDL file.
7) Press Next
8) Check all checkboxes and press Next
9) Select "IOR to file" in the second combobox and press Next
10) Press Next
11) Type some text into textfield and press Next
12) Press Finish
13) NOTE - Now files are generating. Focus on these files:
SimpleServer, SimpleClient, SimpleCallBackClient
14) ERROR - Sometimes it happens that one of above mentioned files are
not parseable (mainly SimpleClient). Open file and you will see two
"package" lines.
First one with code that is the same as in template code:
package Templates.CORBA;
Second one with correct code:
package MyPackage;

Also it does not change class name from "ClientMain" (name used in
template) to "SimpleClient" (correct name).
Comment 8 Tomas Hurka 2002-09-24 16:12:19 UTC
Fixed in trunk. It was caused by the fact that DataFolder discovers newly created file before template is fully created. 
Comment 9 Jan Becicka 2002-10-02 10:44:36 UTC
Dave, can you verify it? Thanks
Comment 10 David Kaspar 2002-10-07 14:43:16 UTC
Verified in main trunk - problem does not occurred for a long time
Comment 11 Quality Engineering 2003-07-01 13:15:23 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.