Bug 97424 - SQLJ Blocks in Java Classes
Summary: SQLJ Blocks in Java Classes
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-31 07:11 EDT by Georg Lenz CLA
Modified: 2006-06-16 16:06 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Georg Lenz CLA 2005-05-31 07:11:08 EDT
SQLJ Blocks in Java Classes 

1.Extensibility of the internal Java parser to SQLJ blocks so that Java
operations like "Organize Imports", Code Completion, Refactoring, QuickFix can
be carried out correctly. 

2.Possibility to carry out Java operations (like the above mentioned ones) on
file extensions other than .java, in particular .sqlj 

3.Extensibility of CompilationUnitEditor by sqlj blocks


Remarks:
To point one and three: There is no way to protect certain blocks of a Java
class that contains SQLJ statements from the Java parser. It simply reports an
error an stops. As a consequence of this the same is true for the
CompilationUnitEditor. To enable code completion and context menus for the SQLJ
blocks “dirty hacks” on internal classes are necessary.
To point two: The CompilationUnitEditor has at some places hard wired calls
against the “.java” file extension that enforces “ditry” workarounds like a temp
“.java” file.

Current problems: 

The internal java parser reports an error and stops. The above mentioned
operations cannot be carried out correctly. Results are incorrect outlines,
missing Java operations 

Again, we have to use internal classes, e.g. CompilationUnitEditor
Comment 1 Dirk Baeumer CLA 2005-05-31 08:38:39 EDT
I keep the bug in JDT/UI land however this affects Core and Text as well.
Comment 2 Martin Aeschlimann CLA 2006-06-16 16:06:17 EDT
Not musch news on this in 3.2. For 3.2 we added support for non-'.java' files to be treated as .java files. But we currently have no story that allows the code to contain non-java constructs.

An approach to solve that could be a plugable scanner that translates the non-java constructs to a (special) Java comments. Obviously there are many more hooks needed to reuse our tooling to work on that new file.

Moving to jdt.core.