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 252643 - Ant based project types ProjectProblemsProvider inconsistencies
Summary: Ant based project types ProjectProblemsProvider inconsistencies
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Web Project (show other bugs)
Version: 8.1
Hardware: All All
: P1 normal (vote)
Assignee: Tomas Zezula
URL:
Keywords:
Depends on:
Blocks: 253387
  Show dependency tree
 
Reported: 2015-05-28 11:30 UTC by Theofanis Oikonomou
Modified: 2015-07-27 11:43 UTC (History)
4 users (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 Theofanis Oikonomou 2015-05-28 11:30:36 UTC
I am filing this one just to keep track of this issue, as it needs to be fixed for the following release.

After additional fix in bug 245637 (https://netbeans.org/bugzilla/show_bug.cgi?id=245637#c9) there is the following situation:

1) j2ee-clientproject and j2ee-ejbjarproject types show the project problem dialog and problems get resolved correctly but the warning project badge is not removed after fixing the problems.

2) web-project type does not show the project problems dialog at all, although I can verify that JUnitProjectOpenedHook adds the problems to the project.

On the other hand java-j2seproject type behaves as one expects. Project problems dialog is shown, problems get resolved correctly and error badge is removed after fixing.
Comment 1 Theofanis Oikonomou 2015-05-28 11:32:50 UTC
Tomas please have a look at this. Thank you
Comment 2 Theofanis Oikonomou 2015-07-07 09:32:14 UTC
IMHO this should be fixed before beta is out, otherwise all old projects will have issues. Tomas, please evaluate and re-assign back if the problem is with my implementation. Thank you.
Comment 3 Tomas Zezula 2015-07-09 12:13:19 UTC
The problem is in the WebLogicalViewProvider which is some web team support which should not rather exist. But unfortunately it does. I will do minimal changes into it to make it work.
Comment 4 Tomas Zezula 2015-07-09 12:33:13 UTC
Unfortunately it's impossible to do some simple fix in the AbstractLogicalViewProvider. It's poorly designed SPI which has no non garbage entry point as visible on presence of the:

protected boolean isInitialized() {
// #187910 - ignore events which are received too early, that is before
// project lookup was constructed
return project.getLookup() != null;
}

When the constructor is invoked the project Lkp does not exist yet and there is no entry point when the project is initialised (createLogicalView is logically such a point but it's abstract). It needs complete rewrite, ideally use LogicalViewProviders SPI.
Comment 5 Tomas Zezula 2015-07-09 15:28:40 UTC
Fixed jet-main 99dbeebcf534.

Fixed in j2ee.earproject, j2ee.ejbjarproject, j2ee.clientproject and web.project but tested just in web.project. Owner should probably do some additional testing.
The above projects are now using ProjectProblems as others do. I did not all clean up of AbstractLogicalViewProvider, some other things should be removed from it.

1st) BorkenAction should be replaced by:

@ActionReferences({
    @ActionReference(
        id=@ActionID(id="org.netbeans.modules.project.ui.problems.BrokenProjectActionFactory",category="Project"),
        position = 2600,
        path = "Projects/org-netbeans-modules-java-j2seproject/Actions")
})

in individual projects.


2nd) The J2EE specific checks in AbstractLogicalViewProvider (brokenServer, brokenDataSource, brokenServerLibrary) should be replaced by standard ProjectProblemsProviders.

3rd) The AbstractLogicalViewProvider should be removed at all and replaced by LogicalViewProviders.

I will create an issue for it.
Comment 6 Tomas Zezula 2015-07-09 15:36:20 UTC
The issue is: 253387
Comment 7 Quality Engineering 2015-07-10 01:17:26 UTC
Integrated into 'main-silver', will be available in build *201507100001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/99dbeebcf534
User: Tomas Zezula <tzezula@netbeans.org>
Log: #252643:Ant based project types ProjectProblemsProvider inconsistencies
Comment 8 Vladimir Riha 2015-07-27 11:43:08 UTC
Already in 1st Beta build (integrated before branching)