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.
Created attachment 113601 [details] screenshot showing the css hint No CSS Class Rule Found when loading .html file - has a css file in the path. See screenshot http://i39.tinypic.com/16hup90.jpg Product Version = NetBeans IDE Dev (Build 201111270600) Operating System = Windows 7 version 6.1 running on amd64 Java; VM; Vendor = 1.6.0_23 Runtime = Java HotSpot(TM) 64-Bit Server VM 19.0-b09
its likely due to the absolute paths to the stylesheets. Are the files in a project?
No, no luck. I tried: http://127.0.0.1:8000/static/css/style.css static/css/style.css css/style.css Tried putting the css file in the same directory as the html and having just style.css Each time I modified and saved the program. Yes the project is a django project with a structure like this static/css/style.css templates/index.html Thanks for looking into this, let me know if there is anything else I can help to fix this, I'd really love to have this feature working.
One thing I just noticed. If I had the file like href="style.css" and the style.css in the same folder as the index.html, I was able to hotlink (Ctrl + click) and it would open the file, otherwise with the other url configs it did nto hotlink at all. Either way the hints are still showing up and the selectors are nto hotlinked.
Another thing I might add. I get this error every time i start up java.lang.UnsupportedOperationException: This IndexReader cannot make any changes to the index (it was opened with readOnly = true) at org.apache.lucene.index.ReadOnlySegmentReader.noWrite(ReadOnlySegmentReader.java:23) at org.apache.lucene.index.ReadOnlyDirectoryReader.acquireWriteLock(ReadOnlyDirectoryReader.java:41) at org.apache.lucene.index.IndexReader.deleteDocument(IndexReader.java:871) at org.apache.lucene.index.IndexReader.deleteDocuments(IndexReader.java:907) at org.netbeans.modules.gsfret.source.usages.LuceneIndex.batchStore(LuceneIndex.java:515) at org.netbeans.modules.gsfret.source.usages.SourceAnalyser.batchStore(SourceAnalyser.java:171) at org.netbeans.modules.gsfret.source.usages.CachingIndexer$LanguageIndex.flush(CachingIndexer.java:159) at org.netbeans.modules.gsfret.source.usages.CachingIndexer.flush(CachingIndexer.java:112) at org.netbeans.modules.gsfret.source.usages.RepositoryUpdater$CompileWorker.updateFolder(RepositoryUpdater.java:1414) [catch] at org.netbeans.modules.gsfret.source.usages.RepositoryUpdater$CompileWorker.scanRoots(RepositoryUpdater.java:1132) at org.netbeans.modules.gsfret.source.usages.RepositoryUpdater$CompileWorker.access$1900(RepositoryUpdater.java:654) at org.netbeans.modules.gsfret.source.usages.RepositoryUpdater$CompileWorker$1.run(RepositoryUpdater.java:841) at org.netbeans.modules.gsfret.source.usages.RepositoryUpdater$CompileWorker$1.run(RepositoryUpdater.java:679) at org.netbeans.modules.gsfret.source.usages.ClassIndexManager.writeLock(ClassIndexManager.java:110) at org.netbeans.modules.gsfret.source.usages.RepositoryUpdater$CompileWorker.run(RepositoryUpdater.java:679) at org.netbeans.modules.gsfret.source.usages.RepositoryUpdater$CompileWorker.run(RepositoryUpdater.java:654) at org.netbeans.napi.gsfret.source.Source$CompilationJob.run(Source.java:1358) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) Not sure if that is relates to th is.
Would you mind to pack and attach your project or create a sample one I can use to reproduce the issue? Basically relative links should always work, absolute in the case the files are in a web-like project (provides a web root).
Created attachment 113731 [details] This is the project, its a typical Django project layout. I've attached a sample project that will replicate the issue. Thanks!
Embedded styles cause the same warning (No CSS id rule found): <!DOCTYPE html> <html> <head> <title>CSS hint test</title> <style type="text/css"> #content {color: red} </style> </head> <body> <div id="content">Header</div> </body> </html> Product Version: NetBeans IDE Dev (Build 201112070600) Java: 1.6.0_29; Java HotSpot(TM) Client VM 20.4-b02 System: Windows 7 version 6.1 running on x86; Cp1251; en (nb)
There may be plenty different cases when a developer uses this or that kind of templating, layouting and so on, up to own template engines (as at my case). I imagine, it is too strong demand for htm(l) and css files to be in some relation in project tree to avoid cluttering of an editor with lot of warnings. Let's have some relaxing way also (as the simplest one - and opportunity to turn this warning off).
The hints are a brilliant feature for finding unused/undeclared variables etc, but when you've got PHP, HTML and CSS all in one file the hints for missing CSS ID rules make the hints much less useful!
fixed in web-main#862ad9c8119d There's a new "CSS" subcategory in html hints. "No css class/id rule found" hints are there. No css id rule hint is disabled by default since in many cases the ids are used not just for styling, the missing css class rule is enabled by default with warning level.
I've discovered two more bugs related to this area and fixed them in web-main#8c4891b8ff32
Integrated into 'main-golden', will be available in build *201204250400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/862ad9c8119d User: Marek Fukala <mfukala@netbeans.org> Log: #205631 - No CSS Class/Id Rule Found