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 69476 - Identical EditorContextBridge classes
Summary: Identical EditorContextBridge classes
Status: CLOSED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Java (show other bugs)
Version: 5.x
Hardware: All All
: P4 blocker (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-28 16:52 UTC by _ rkubacki
Modified: 2010-04-29 09:27 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 _ rkubacki 2005-11-28 16:52:50 UTC
While profiling editor I noticed another pairof almost identical classes. Run
'diff -c
debuggerjpda/src/org/netbeans/modules/debugger/jpda/EditorContextBridge.java
debuggerjpda/ui/src/org/netbeans/modules/debugger/jpda/ui/EditorContextBridge.java'
to see that this is really copy & paste. The more cases like this means bigger
memory footprint and higher risk of fixes that are not propagated to right place.
Comment 1 Martin Entlicher 2005-12-01 17:02:35 UTC
There are more identical pairs of classes in debugger modules. This is because
debugger modules are independent and can not use each-other classes.
This might not be possible to fix unless we make a public API from them (which
is unlikely).
Comment 2 Martin Entlicher 2006-08-29 18:25:59 UTC
Well, EditorContextBridge mostly delegates to EditorContext. If we add some
static helper methods to EditorContext, we might get rid of both
EditorContextBridge classes. This would also simplify "Find Usages".
Comment 3 Martin Entlicher 2007-08-03 11:02:55 UTC
There was performed some reduction of the common code already:

/shared/data/ccvs/repository/debuggerjpda/src/org/netbeans/modules/debugger/jpda/EditorContextBridge.java
revision 1.13

/shared/data/ccvs/repository/debuggerjpda/ui/src/org/netbeans/modules/debugger/jpda/ui/EditorContextBridge.java
revision 1.17

There are still some small common identical parts - like CompoundContextProvider, but I do not think they can be shared
anyhow. They are in distinct modules.
Comment 4 Quality Engineering 2010-04-29 09:27:37 UTC
Verified ... and Closing all issues resolved into NetBeans 6.7 and earlier.