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 42391 - Code folding does not work in projectless Java sources
Summary: Code folding does not work in projectless Java sources
Status: CLOSED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Code folding (show other bugs)
Version: 4.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@editor
URL:
Keywords:
Depends on:
Blocks: 41448
  Show dependency tree
 
Reported: 2004-04-23 12:53 UTC by pfelenda
Modified: 2007-11-05 13:39 UTC (History)
2 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 pfelenda 2004-04-23 12:53:48 UTC
Steps to reproduce:
- open any existed file throught
menu "File|Open File..."
-> all java stuff don't work
Comment 1 pfelenda 2004-04-23 13:00:16 UTC
build 200404191800
Comment 2 psuk 2004-05-19 15:56:09 UTC
I think it's caused by the fact, that the file is not part of any
project (classpath) - not sure if there was a plan to address it in
promoD.
Reassignig to project for evaluation.
Comment 3 Jesse Glick 2004-05-19 18:13:35 UTC
Please, I need some more information than this! Which file for
example? Inside a project directory or not? If so, in an official
source root or elsewhere? In the JDK sources or not? What specifically
does not work? Trunk or refactoring builds? The project system has
little involvement in this beyond whether a real value or null is
returned from ClassPath.getClassPath; everything else is handled by
the editor module (trunk) or some stuff I don't understand in detail
(refactoring builds).

Obviously code completion cannot work perfectly (TBD whether there
will be fallback CC for the default Java platform etc.). Code folding
ought to work IMHO, but refactoring team seems to be unable to
implement it for D last I heard.
Comment 4 pfelenda 2004-05-20 12:40:48 UTC
[trunk build 200405182245], jdk1.4.2_03

I mean a file which is not part of project.
It happends in both builds (trunk, refactoring)

Opening & working with files should not depend on the projects.
It works correctly in release 36. I know, that projects are rewritten,
but it should work.

When working with:
 - text file -> I can use it ( it mean edit & save it )
 - java file -> I can use it ( it mean that CC, CF, Compile, Run and
other java stuff work )
 - xml ...

It not depend if the file is in project or not. If the file is not
part of a project there must be created classpath. The file should by
added in project or created new project. (It is only one small dialog
with two buttons "Add to project" and "Create new project for this
file".) 
 
Comment 5 Jesse Glick 2004-05-20 18:19:07 UTC
Sorry, there is no current plan to autocreate projects for random Java
sources. You have to go through the new project wizard. This is as
designed.

There is an open RFE to provide minimal, i.e. JDK-only, code
completion for projectless sources; may or may not get to this for D.
No plans to support compilation etc.

I agree that code folding ought to work on any Java source since it is
not dependent on any kind of contextual information. So changing bug
summary to be that.
Comment 6 Miloslav Metelka 2004-05-26 15:01:05 UTC
We do not currently have any parser that would reliably detect the
fold boundaries in the same way as java hierarchy (or java/mdr) does
nor there is any plan to create such. We could think about reusing
javac for this purpose but there is no plan for this yet. Thus setting
TM to future.
Comment 7 Martin Roskanin 2004-07-29 11:05:34 UTC
After rewritting folding to JMI it seems to work.
Please, verify. Possibly reopen. Thanks.
Comment 8 pfelenda 2004-08-09 14:25:44 UTC
Verified, the CF works in dev build 200408081800.