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.
Intercluster implementation dependencies have to be prohibited, so please remove those on xml modules.
Cannot be solved in 4.1 because xml module has no public API. I will ask for 4.1 waiver as soon as 4.0_WAIVER_REQUEST keyword is created. In promo-F we have to figure out how to solve this. I would prefer to publish the de facto xml API as it is now because we do not plan to do any major work on it.
DevRev agreed this can be downgraded to P2.
Waiver for NetBeans 4.1 aproved.
Petr offered to take a look at this. Thanks!
Starting to work on friend API for xml/core. The following packages are used outside xml/core, and they are the candidates for public packages: org.netbeans.modules.xml.api.cookies org.netbeans.modules.xml.api.model org.netbeans.modules.xml.api.scenario org.netbeans.modules.xml.spi.dom org.netbeans.modules.xml.spi.model org.netbeans.modules.xml.dtd.grammar However, some cleanup is desirable before these are declared public. I suggest the following changes: 1/ Remove org.netbeans.modules.xml.api.cookies and org.netbeans.modules.xml.api.scenario, as these are used by dead code that is not used in the IDE. This dead code (scenario support) would also be removed. 2/ Make class org.netbeans.modules.xml.dtd.grammar.DTDGrammar package private - currently it is public 3/ Move class org.netbeans.modules.xml.spi.model.EmptyQuery to the xml/text-edit module, which is the only place where it is used. 4/ Undeprecate the remaining public classes This will get rid of the following packages: org.netbeans.modules.xml.api.cookies org.netbeans.modules.xml.api.scenario org.netbeans.modules.xml.spi.model
Fine with me, if you update various client modules accordingly to use the friend API rather than an impl deps - see all xml.core usages in impl-deps.txt. BTW any plans to make xml/tax have a friend API? Would be nice for apisupport.
Items 2/, 3/ and 4/ are done. Checking in core/src/org/netbeans/modules/xml/api/model/GrammarEnvironment.java; /cvs/xml/core/src/org/netbeans/modules/xml/api/model/GrammarEnvironment.java,v <-- GrammarEnvironment.java new revision: 1.2; previous revision: 1.1 done Checking in core/src/org/netbeans/modules/xml/api/model/GrammarQuery.java; /cvs/xml/core/src/org/netbeans/modules/xml/api/model/GrammarQuery.java,v <-- GrammarQuery.java new revision: 1.7; previous revision: 1.6 done Checking in core/src/org/netbeans/modules/xml/api/model/GrammarQueryManager.java; /cvs/xml/core/src/org/netbeans/modules/xml/api/model/GrammarQueryManager.java,v <-- GrammarQueryManager.java new revision: 1.5; previous revision: 1.4 done Checking in core/src/org/netbeans/modules/xml/api/model/GrammarResult.java; /cvs/xml/core/src/org/netbeans/modules/xml/api/model/GrammarResult.java,v <-- GrammarResult.java new revision: 1.4; previous revision: 1.3 done Checking in core/src/org/netbeans/modules/xml/api/model/HintContext.java; /cvs/xml/core/src/org/netbeans/modules/xml/api/model/HintContext.java,v <-- HintContext.java new revision: 1.3; previous revision: 1.2 done Checking in core/src/org/netbeans/modules/xml/dtd/grammar/DTDGrammar.java; /cvs/xml/core/src/org/netbeans/modules/xml/dtd/grammar/DTDGrammar.java,v <-- DTDGrammar.java new revision: 1.20; previous revision: 1.19 done Removing core/src/org/netbeans/modules/xml/spi/model/EmptyQuery.java; /cvs/xml/core/src/org/netbeans/modules/xml/spi/model/EmptyQuery.java,v <-- EmptyQuery.java new revision: delete; previous revision: 1.5 done Removing core/src/org/netbeans/modules/xml/spi/model/package.html; /cvs/xml/core/src/org/netbeans/modules/xml/spi/model/package.html,v <-- package.html new revision: delete; previous revision: 1.6 done Removing tax/lib/src/org/netbeans/tax/grammar/DTDGrammar.java; /cvs/xml/tax/lib/src/org/netbeans/tax/grammar/DTDGrammar.java,v <-- DTDGrammar.java new revision: delete; previous revision: 1.3 done Removing tax/lib/src/org/netbeans/tax/grammar/DTDValidator.java; /cvs/xml/tax/lib/src/org/netbeans/tax/grammar/DTDValidator.java,v <-- DTDValidator.java new revision: delete; previous revision: 1.3 done Checking in text-edit/src/org/netbeans/modules/xml/text/completion/EmptyQuery.java; /cvs/xml/text-edit/src/org/netbeans/modules/xml/text/completion/EmptyQuery.java,v <-- EmptyQuery.java new revision: 1.5; previous revision: 1.4 done Checking in text-edit/src/org/netbeans/modules/xml/text/completion/GrammarManager.java; /cvs/xml/text-edit/src/org/netbeans/modules/xml/text/completion/GrammarManager.java,v <-- GrammarManager.java new revision: 1.9; previous revision: 1.8 done One other thing I am thinking about is: 5/ Create a new class DTDUtil in package org.netbeans.modules.xml.api.model with the following method: public static GrammarQuery parseDTD(boolean dtdOnly, InputSource inputSource) This would allow replacing the usages of package org.netbeans.modules.xml.dtd.grammar from other modules by this class. So package org.netbeans.modules.xml.dtd.grammar would not need to be exposed as friend package. To Jesse's questions: > update various client modules accordingly to use the friend API rather than an > impl deps Yes, I plan to do this. > BTW any plans to make xml/tax have a friend API? Would be nice for apisupport. Agree it would be nice, but I am not sure if I can get to this in this release.
Item 5/ is done. One more thing: 6/ Add new class org.netbeans.modules.xml.api.EncodingUtil, which would be an interface to class o.m.m.x.core.lib.EncodingHelper, exposing the two public static methods. These are used by other modules. Also removing the API_REVIEW_FAST keyword, will file a separate task for the review itself.
Filed an API review request for xml/core - issue 63543.
Now regarding the dependency on xml/tools: Other modules use the action classes from this module (Check XML, Validate XML) that are used in the popup menu of other files based on XML (deployment descriptors, tag library descriptor, Struts or JSF configuration file and others). I suggest eliminating the implementation dependency by introducing a utility class with static methods that return these classes. This hides the implementation of the action - only exposes them as generic SystemActions. I will attach the suggested new utility class.
Created attachment 24813 [details] The new API utility class that returns action classes needed by other modules.
I would suggest the signature look like e.g. public static Action checkAction(); Compare e.g.: http://www.netbeans.org/download/dev/javadoc/org-netbeans-modules-projectuiapi/org/netbeans/spi/project/ui/support/CommonProjectActions.html#customizeProjectAction()
I bit better is imho to use ContextAwareAction in the signature as in http://www.netbeans.org/download/dev/javadoc/org-netbeans-modules-refactoring/org/netbeans/modules/refactoring/api/ui/RefactoringActionsFactory.html otherwise people do not find out that they can pass it the context...
All implementation dependencies on xml/tools were removed. Checking in nbproject/project.xml; /cvs/websvc/core/nbproject/project.xml,v <-- project.xml new revision: 1.32; previous revision: 1.31 done Checking in cluster-deps.txt; /cvs/ide/golden/cluster-deps.txt,v <-- cluster-deps.txt new revision: 1.41; previous revision: 1.40 done Checking in cluster-impl-deps.txt; /cvs/ide/golden/cluster-impl-deps.txt,v <-- cluster-impl-deps.txt new revision: 1.7; previous revision: 1.6 done Checking in deps.txt; /cvs/ide/golden/deps.txt,v <-- deps.txt new revision: 1.253; previous revision: 1.252 done Checking in impl-deps.txt; /cvs/ide/golden/impl-deps.txt,v <-- impl-deps.txt new revision: 1.42; previous revision: 1.41 done The only remaining cross-cluster dependency is on xml/text, will investigate this.
The dependency on xml/text is for the TokenContext. See that java/editor is exposing its JavaTokenContext in API. The same in html, html/lib is exposing HTMLTokenContext in API. So we should expose the XMLDefaultTokenContext in xml/text-edit API. I would move it into a separate package, e.g. org.netbeans.modules.xml.text.api to limit the API just to this class. Since the only usage is in web/jspsyntax and this is impl dep I see not problem changing it now. Jardo, Jesse, do we need another API review for this?
Agreed with exposing XMLDefaultTokenContext as friend API, filed as a separate task 68861.
All the subissues have been fixed, so marking this one as fixed as well.
v.