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 166634 - Templates/JSP_Servlet/javascript.shadow and Templates/JSP_Servlet/json.shadow are not valid DataShadows.
Summary: Templates/JSP_Servlet/javascript.shadow and Templates/JSP_Servlet/json.shadow...
Status: RESOLVED INCOMPLETE
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Marek Fukala
URL:
Keywords: TEST
Depends on:
Blocks:
 
Reported: 2009-06-05 20:04 UTC by Martin Entlicher
Modified: 2009-07-23 07:42 UTC (History)
3 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 Martin Entlicher 2009-06-05 20:04:38 UTC
See
http://deadlock.netbeans.org/hudson/job/trunk/5964/testReport/org.netbeans.core.validation/ValidateLayerConsistencyTest/testValidShadows/

web.core/src/org/netbeans/modules/web/core/resources/layer.xml defines:
 <file name="javascript.shadow">
                <attr name="originalFile" stringvalue="Templates/Other/javascript.js"/>
 ...
 <file name="json.shadow">
                <attr name="originalFile" stringvalue="Templates/Other/json.json"/>
 ...

The referenced templates are defined in javascript.editing/src/org/netbeans/modules/javascript/editing/layer.xml

Do you have dependency on javascript.editing? Are you sure that the templates should be referenced here?
Comment 1 Petr Jiricka 2009-06-07 22:00:20 UTC
Seems to be fixed in other team repos, but propagation of changes does not seem to be running now.
Comment 2 Martin Entlicher 2009-06-17 16:04:42 UTC
Still occurs. See:
http://deadlock.netbeans.org/hudson/job/trunk/6042/testReport/org.netbeans.core.validation/ValidateLayerConsistencyTest/testValidShadows/

And prevents from propagation of fixes into daily build!
Comment 3 Petr Jiricka 2009-07-08 14:40:46 UTC
Does it still happen? I did not see it for a while, assigning JavaScript module.
Comment 4 Marek Fukala 2009-07-20 13:41:27 UTC
I am not sure what should be the correct fix. Making a module dependency just because of we want to show the javascript
templates in web category if the javascript module is installed seems to be strange to me. The vice versa approach has
the same problem. I would suppose the shadows are not created if the source is missing which is the desired behaviour
here. Adding Jarda and Jirka Skrivanek do cc, can you please express your opinions? thanks.
Comment 5 Marek Fukala 2009-07-20 13:44:44 UTC
Actually putting the shadows into the Templates/JSP_Servlet folder in javascript editing module shouldn't harm anyone AFAIK.
Comment 6 Marek Fukala 2009-07-20 13:49:36 UTC
fixed 

http://hg.netbeans.org/web-main/rev/b335dfb78c94
Comment 7 Marek Fukala 2009-07-21 09:41:26 UTC
reverting the fix in web-main#04ac0e61c17b since there is a problem with the solution where the javascript module
declares the Templates/JSP_Servlet folder. 

If web.core module is not installed, there should be no 'Web' templates category, but there is one if javascript.editing
is enabled. Moreover the category declaration in javascript.editing needs to be localized, but the bundle in in web.core.

IMO the previous solution when web.core module refered to the javascript.editing module's templates was correct. However
not sure if this is allowed (to have potentially unresolved shadows) (like not when the test was failing).

Can someone from core give me a hint how to solve this properly? Thanks.

Comment 8 Marek Fukala 2009-07-21 09:44:24 UTC
Actually if we can live with the 'Web' category only with javascript templates when web.core disabled, I can use the
former fix and copy the bundle entry...
Comment 9 Petr Jiricka 2009-07-21 15:27:24 UTC
Looking at the module dependencies, web.core can never be enabled when javascript.editing is disabled, because web.kit
(which contains web.core) depends on ide.kit (which contains javascript.editing). So this sounds like a glitch either in
the test, or in the module enabling logic.
Comment 10 Jaroslav Tulach 2009-07-22 07:18:03 UTC
I'd like to see the failure first. The links in this issue are no longer valid, so I cannot inspect the messages.log 
or test output. As such I am not classified to judge where the problem is.

Although not recommended unless reasons for the (random?) failure understood, but: In case you really want to have 
finite number of broken shadows, there is always the possibility to enumerate them in the test and skip their check.
Comment 11 Petr Jiricka 2009-07-22 08:53:10 UTC
Ok, marking as incomplete until this happens again, then we will add the exact information about the failure.
Comment 12 Quality Engineering 2009-07-23 07:42:46 UTC
Integrated into 'main-golden', will be available in build *200907230201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/b335dfb78c94
User: Marek Fukala <mfukala@netbeans.org>
Log: #166634 - Templates/JSP_Servlet/javascript.shadow and Templates/JSP_Servlet/json.shadow are not valid DataShadows.