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.
Summary: | Placing java.j2seproject (+ deps) in CP no longer suffices to load a j2seproject | ||
---|---|---|---|
Product: | projects | Reporter: | Jesse Glick <jglick> |
Component: | Ant Project | Assignee: | Jaroslav Tulach <jtulach> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | Keywords: | ERGONOMICS, REGRESSION |
Priority: | P3 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Bug Depends on: | |||
Bug Blocks: | 153655 |
Description
Jesse Glick
2011-01-25 17:59:21 UTC
Changing the default is impossible. That would break some tests (I already tried). Instead I created a property http://bits.netbeans.org/dev/javadoc/org-openide-util-lookup/apichanges.html#org.openide.util.Lookup.paths Set it in your test to "Services". If the previous advice works I don't see a need for any further changes. (In reply to comment #1) > Changing the default is impossible. That would break some tests (I already > tried). You tried registering AntBasedProjectType's in a specific folder already? What broke exactly? AFAIK only project.ant and ide.ergonomics should be affected. *** This bug has been marked as a duplicate of bug 166782 *** > The most general fix would of course be for Lookup.getDefault to include
> Services without doing anything special
Re. "changing the default" - I tried to change the above and that has led to a lot of test failures.
Understood that the more general fix is problematic, but what is wrong with the simpler fix? As far as I can tell this would not have any broad-ranging effects, and Ant-based project types would work "out of the box" in standalone mode without having to know about and employ special tricks like Lookup.paths - a major stumbling block for people just trying to get something to work. I could certainly do the project.ant portion of such a fix, but I am unsure what assumptions ide.ergonomics is making about the current system. The basic problem as far as I can tell is that Lookup.getDefault() does not include Lookups.forPath("Services") by default. Certainly, I'd like to change that, but the amount of tests that would need to be fixed (by System.setProperty("org.openide.util.Lookup.paths", "")) would be probably really high and I don't feel I have time for that now. But changing the processor to put factories in specified folders and then checking Lookups.forPath("AntBasedProjectType/" + type) preferentially at runtime would have no effect on other code. Doing the change would be trivial except for ergonomics which seems to be making assumptions about the current layout. Integrated into 'main-golden', will be available in build *201102050000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/17b96241f15c User: Jesse Glick <jglick@netbeans.org> Log: Diagnostics for random SourceLevelQueryImplTest.testGetSourceLevelWithBrokenPlatform failure in NB-Core-Build #5932 and earlier. Hypothesizing that #194703 is related to instability, but may be something else in loaders/lookups. |