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 87244

Summary: friend declaration for xdm and schema/completion
Product: xml Reporter: Samaresh Panda <samaresh>
Component: Text-EditAssignee: Marek Fukala <mfukala>
Status: RESOLVED FIXED    
Severity: blocker    
Priority: P2    
Version: 5.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:
Bug Depends on:    
Bug Blocks: 87369    

Description Samaresh Panda 2006-10-16 22:32:26 UTC
Currently xml/xdm and xml/schema/completion have implementation dependencies on
xml/text-edit module.

We would like xml/text-edit to have friend declaration for both xml/xdm and
xml/schema/completion.
Comment 1 Samaresh Panda 2006-11-30 00:17:58 UTC
Moving this to 5.5.1.
Comment 2 Samaresh Panda 2006-11-30 00:57:35 UTC
Marking it as P2, since this blocks 87369.
Comment 3 Marek Fukala 2006-11-30 08:56:29 UTC
What in particullar do you need to access in the module. Is it just current
public packages content? If so, just add yourself to the list of friends. If you
need something more, let me know what and we can discuss to possibly make
something more public.

Now we have:

<friend-packages>
   <friend>org.netbeans.modules.mobility.end2end</friend>
   <friend>org.netbeans.modules.web.core.syntax</friend>
   <friend>org.netbeans.modules.xml.lexer</friend>
   <friend>org.netbeans.modules.xml.retriever</friend>
   <package>org.netbeans.modules.xml.text.api</package>
   <package>org.netbeans.modules.xml.text.syntax</package>
</friend-packages>
Comment 4 Samaresh Panda 2006-12-21 22:39:07 UTC
Marek, I did this exercise. I mean declared xdm and schema/completion as friends
in xml/text-edit. Base netbeans (which includes xdm) builds. However
xml/schema/completion doesn't. I believe, that is because it is in a different
cluster. It is part of Enterprise Pack modules.

NB Ent Pack, heavily rely on the classes in org.netbeans.modules.xml.text.syntax
package. Ideally we would like this package to be declared as public. And we
dont have to have impl dependency, nor friend.
Comment 5 Marek Fukala 2006-12-29 11:37:49 UTC
Samaresh, I belive that having a friend dependencty between clusters works. We
use the same for example from html/editor/lib (IDE cluster) to web/jspsyntax
(J2EE cluster) - web/jspsyntax is a friend of html/editor/lib.

I do not recomend to create the org.netbeans.modules.xml.text.syntax package
public at least because of the classes from this package should be removed soon
and replaced by their lexer-based counterparts. 
Comment 6 Samaresh Panda 2007-01-02 23:16:57 UTC
I'm sorry, I think I found the problem. We're working on 5.5.1 codebase and I
see this:

 <friend-packages>
   <friend>org.netbeans.modules.web.core.syntax</friend>
   <friend>org.netbeans.modules.e2e.end2end</friend>
   <package>org.netbeans.modules.xml.text.api</package>
 </friend-packages>

I do not see org.netbeans.modules.xml.text.syntax listed here and I think this
is the problem. If you could make that change, I would be able to add xdm and
schema/completion as friend modules.
Comment 7 Marek Fukala 2007-01-03 09:08:02 UTC
Feel free to add it to the project metadata in 5.5.1

<package>org.netbeans.modules.xml.text.syntax</package>
Comment 8 Marek Fukala 2007-01-10 09:19:57 UTC
Samaresh, did you added the module to the friends list? Is this solution enoght?
If so, please close the issue, otherwise let me know.
Comment 9 Samaresh Panda 2007-01-10 20:18:12 UTC
Just to let you know that we needed org.netbeans.modules.xml.text.syntax.dom as
well.

Here is how the declaration look like:
<friend-packages>
  <package>org.netbeans.modules.xml.text.api</package>
  <package>org.netbeans.modules.xml.text.syntax</package>
  <package>org.netbeans.modules.xml.text.syntax.dom</package>
  <friend>org.netbeans.modules.e2e.end2end</friend>
  <friend>org.netbeans.modules.web.core.syntax</friend>
  <friend>org.netbeans.modules.xml.schema.completion</friend>
  <friend>org.netbeans.modules.xml.xdm</friend>
</friend-packages>

Integrated the following:

Checking in friend-packages.txt;
/cvs/ide/golden/friend-packages.txt,v  <--  friend-packages.txt
new revision: 1.15.4.1.2.134.6.8; previous revision: 1.15.4.1.2.134.6.7

Checking in impl-deps.txt;
/cvs/ide/golden/impl-deps.txt,v  <--  impl-deps.txt
new revision: 1.30.2.4.2.8.14.1; previous revision: 1.30.2.4.2.8

Checking in project.xml;
/cvs/xml/xdm/nbproject/project.xml,v  <--  project.xml
new revision: 1.1.2.17.14.3; previous revision: 1.1.2.17.14.2

Checking in project.xml;
/cvs/xml/text-edit/nbproject/project.xml,v  <--  project.xml
new revision: 1.5.2.1.2.3.28.1; previous revision: 1.5.2.1.2.3

Checking in project.xml;
/cvs/xml/schema/completion/nbproject/project.xml,v  <--  project.xml
new revision: 1.1.2.6.26.1; previous revision: 1.1.2.6
Comment 10 tonybeckham 2007-04-11 00:12:13 UTC
Samaresh:
This issue submitted by you is marked as resolved. Since it relates to some
source code specifics, QA is unable to verify it. Could you please verify this
issue and mark it as verified?