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 112889 - Permit to run JavaSource.runUserActionTask() under document lock if the thread already has the javac lock
Summary: Permit to run JavaSource.runUserActionTask() under document lock if the threa...
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Tomas Zezula
URL:
Keywords:
Depends on:
Blocks: 111995
  Show dependency tree
 
Reported: 2007-08-15 14:29 UTC by Marek Fukala
Modified: 2007-09-26 09:14 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 Marek Fukala 2007-08-15 14:29:33 UTC
To make java formatting inside JSP working it seems to be necessary to have ${subject}. 

Currently all formatters bound to JSP documents are first locked by Reformat.lock(), then the document is locked for
reading and then formatting is run by Reformat.reformat().

The java implementation of the editor/indent SPI works with an artificial java class generated from the JSP. It needs to
ge CompilationController from this java source, which is now possible just in the lock() method. The problem is that
other formatters called after the lock() may modify the JSP document so the generated java source becomes invalid. 

Since the java reformatter uses JavaSourceAccessor.INSTANCE.lockJavaCompiler() in the lock() method, the check for
document being locked in the JavaSource.runUserActionTask() is unnecessary and by removing this it would be possible to
move getting the CompilationController from the lock() method to the reformat() method.

This issues is needed to fix issue #111995.
Comment 1 Tomas Zezula 2007-08-17 10:53:06 UTC
Checking in org/netbeans/api/java/source/JavaSource.java;
/cvs/java/source/src/org/netbeans/api/java/source/JavaSource.java,v  <--  JavaSource.java
new revision: 1.82; previous revision: 1.81
done
Comment 2 Quality Engineering 2007-09-20 10:58:40 UTC
Reorganization of java component