JDT Summit 2006
Date: July, 10th - 12th
Location: Saint-Nazaire, France
Last revised 17:50 CET December 14, 2006 by Martin
Participants
Topics
Various Summit Notes
Participants
- Daniel Megert
- Darin Wright (partially via phone)
- David Audel
- Eric Jodet (might not be here)
- Frederic Fusier
- Jerome Lanneluc
- Markus Keller
- Martin Aeschlimann
- Maxime Daniel
- Olivier Thomann
- Philippe Mulet
Discussion Topics
This document lists the discussion topics for the JDT Summit in no particular order.
Italic green means notes about the discussion and decisions during the summit.
Java SE 6 (Wednesday morning / started Tuesday afternoon)
- What will be the new Java 6 features and what support do we have to add for 3.3.
- Debug features to expose:
- Heap walking
According to Darin, McQ says we should do what makes sense.
⇒ Debug should expose the set of things that
all Java programmers will want. For example, we could start with a feature to "show references" to an object
in the variables view, or an action to "get all instances" of a type. This would be in place of a full blown "heap walking"
perspective.
- force early return, monitor access/release
- Script integration in Java 6 (JSR 223): Should we start looking into tooling support for JavaScript?
⇒ currently not part of the JDT scope. No action for 3.3.
Java SE 7 (Wednesday morning)
What will be the new Java 7 features and what support do we have to
add for 3.3.
⇒ This will contain many big changes/additions (e.g. XML inside Java code) which is out of scope for 3.3.
Code Assist (Tuesday morning)
JavaBean Support (Monday morning)
There are several feature requests asking for better support for JavaBean Property handlig, e.g. enhanced
code assist, templates, Outline grouping and a JavaBean wizard.
We should discuss and decide whether we want to do something in that area for 3.3.
⇒ based on the experience JDT Text & UI will get from the competitive analyses, JDT Text & UI will investigate minimal support limited to 3 days. No action for JDT Core at this point.
Compiler
- general problem: how to specify the ignore list to work with false positives (Java Annotations, Javadoc tag, comment tags)
General agreement that this is
useful. First idea to flag it inside the code with @SuppressWarnings
block comments was rejected because it would pollute the code, be hard
for JDT Core and be a JDT solution only.
⇒
JDT UI will investigate into support for a shared "annotation" support for models.
- more advanced warnings:
- NotNull, Nullable
- overriding methods that do not call super
- API rules: Do not instantiate, implement
- tune the existing checks to avoid false positives: Not null, thrown exception, unused parameter
AST (Monday morning)
- Need a more flexible way to create multiple ASTs
- General problem: We don't know all CU when starting the AST queue
- Performance
problem: How many ASTs can we build before we run OOM. Would be nice if
core has a mechanism to manage the referenced bindings
⇒ JDT Core will look at this. Idea is to provide a binding environment object that can be reused when creating an AST.
JDT Core will hide the recreation of the compiler bindings in case of memory problems or when a AST is requested for a
already known binding. bug 150657 (Targeted for 3.3 M4)
- AST sharing problem still not solved. The solution we implemented in 3.2
was that Java element listeners observe the delta to get the AST.
- Problem: The caller of 'reconcile' defines if an
AST is generated and what kind (AST level, bindings, recovery) is is.
50% of callers don't care for an AST, and so the delta also doesn't
contain one.
- Suggestion: The working copy owner (Java
editor in the primary case) should decide if and what kind of ASTs are
provided in the Java element delta after a reconcile.
⇒
JDT Core will change the code so that the primary working copy owner
can specify the default AST level (or none) and reconcile(...) without
parameters will provide the AST with the default level and also send
out the delta with that AST. Open questions: what happens when a client specifies the AST level?
(bug 124662) (Targeted for 3.3 M4)
- Compilation participation still not solved
- Need AST on build if a code audits or APT wants to do anything reasonable
- For performance reasons we need a way of sharing these ASTs
- For
performance reasons we need to force a certain AST kind (level,
bindings, recovery). Clients can use it or leave it. Creating multiple
AST kinds is not possible
⇒
JDT Core will might look into this if requested though performance consequences may prove impossible.
- find and create bindings in existing binding environments
- type binding with higher dimension (bug 148224) (Targeted for 3.3 M4)
- find type binding by name or key
⇒ JDT UI should just enter a bug (bug 156871)
- create or compose type binding in binding environment of AST (bug 40096)
⇒ Can be tackled together with bug 150657 (see AST first item)
- offer bindings also when some information is missing
- variable bindings when variable type is unresolved (bug 149567)
⇒ JDT Core will try to provide problem bindings instead of 'null'. Same problems would be reported with equal problem nodes.
Buildpath (Monday afternoon, Darin)
- exclusion/inclusion filters also for libraries (bug 119419
- OSGI class loader allows hiding of types
⇒ JDT Core might look into this (low prio)
- API rules: What types/methods are API
- Make refactorings API aware: warn when API is modified
Could be annotated in
source (Javadoc or Annotations) or on the build path. Could generate an
API description out of it (e.g. component.xml). Could have action to
set the access restrictions out of an API. Must consider that MANIFEST.MF and component.xml don't surface the same information.
⇒ No decision so far.
- Improve classpath variables
- Can be marked as deprecated (bug 138599) (Targeted for 3.3 M3)
⇒ Could be that a container initializer is able to resolve some variable, but if doing so it is deprecated then... ?
- Can be marked as non modifiable
⇒ JDT UI should enter a bug with precise requirement : (bug 156226) (Targeted for 3.3 M3)
- Allow classpath variable to map to platform and/or environment variables
⇒ Could be handled directly in debug JRE initializer ?
⇒ JDT Core will provide this.
- Improve classpath containers
- Let containers define what is configurable/not configurable: Path, which attributes (bug 168077)
- Allow containers to contain containers, variables and class folders
⇒ JDT Core will provide new API
- Solve the JRE - compliance gap
- Specify compliance in classpath?
- Move JRE container to jdt.core?
⇒ Won't happen.
See item 'Leverage Execution Environment over JRE'
API
- common supertype for ICompilationUnit and IClassFile
⇒ We will ask Jim, if he gives a go then JDT UI will provide the patch for JDT Core
- Applying edits to a ICompilationUnit
⇒ difficult, needs more discussions
- Java model access to annotations
⇒ jdt.core will look at this
- Provide help with TypeNameRequestor result
⇒ Sounds resonable, jdt.core will look at this
Search (Wednesday afternoon)
- Optimizing type indicator decorator: Find all types for a given resource
⇒ Martin will use new API that JDT Core will provide, see bug 150393.
- Static methods / fields index to offer organize imports with static imports
Should not be a separate index but in the current one but in a separate category
⇒ no changes to the indexer: according to Philippe organize import can be done with the current infrastructure.
⇒ JDT Text and JDT UI will have to add a new 'add static imports' option which does the static import if appropriate.
WAIT: when we discussed this with the other JDT Text and UI members another idea came up by Dirk: we could simply provide a whitelist where the
user could enter the static types and/or members he'd like to use.
After discussion with Philippe he says it's a good idea but the whitelist should be kept in JDT UI or Text land. JDT Core is
willing to provide more (content assist) context information if needed. Martin created bug 152123 argueing that
jdt.core is best suited to provide this.
- If search builds AST on search: API to get AST after search? (motivation: semantic search)
⇒ no actions for now - see below for details.
Semantic Search / Search Templates (Wednesday afternoon)
Power search would require to support more evolved search patterns. Can
we sketch usecases and ways to provide some degree of support which
could be evolved further to add more coverage ? Also what would a UI
for it look like (script-based ?)
- An advanced search to allow users to formulate complex searches on the AST like
- All invocations of NLS.format(...) that pass a string literal as first argument
- All invocations of NLS.format(...) that pass a constant that is not in a given properties file
- All invocations of NLS.format(...) that are possibly 'null'
- All catch blocks for CoreExpression that have an empty body
- All implementors of setVisible that do not call super
- We
believe that a snippet based approach will not give is this power:
We're looking at programmatic approches at the moment: JQuery, JScript,
functional languages
- Related areas: Custom code audits, generic refactorings
⇒ JDT UI should finish and present the prototype so that we can provide feedback and decide how to continue.
Code Audit Integration (Wednesday afternoon)
- The goal is to standardize how and when code audits (our
own and contributed) are invoked and presented in the UI as well as to
provide core infrastructure. Some code audits can be computed 'as you
type', others require deep analysis that can't be done while building
but has to be kicked on by the user or other events. We have to discuss
where and how code audit result are presented (e.g. in the problems
view or in a new code audit view) and if we want to provide
infrastructure for the code audit preference pages.
Core infrastructure would allow code audits to share resources as the
AST.
- the basic code audit infrastructure needs to be at the LTK layer with JDT specific support built-on top of it.
⇒ needs to be clarified first
Improve the look and feel of JDT UI (Tuesday afternoon)
We should discuss where it makes sense to adopt new features provided by the Platform and where to further beautify the JDT UI.
- Use the new SWT capabilities in our views: different colors / styles in trees and tables
- Lightweight dialogs for refactoring (bug 92322)
The following are wishes from JDT Core members to JDT Text and JDT UI:
Philippe:
- allow to highlight code pieces that belong together with with vertical lines (bug 84878)
- change history view, so after a refactoring it is possible to revisit the last changes (bug?)
Jerome:
- non-modal refactoring dialogs
- allow to change the refactoring output
Olivier:
- smart paste into "SELECTED" should remove the text in the string (bug 150249)
Maxime:
- allow to turn a code selection into string(s) so it can be used as a test case string and the other way around (bug 150807)
Launch config templates (Tuesday afternoon)
Users want to define certain default values (e.g. compiler arguments) for a launch config type
(bug 41353).
Discussed full-fledged inheritance for individual launch config properties,
but this was found to be too much for the UI (tristate everywhere, client-contributed tabs would be broken)
as well as for the model (e.g. what if base template is not shared but child template is, etc.).
⇒ Debug will implement a simple copy-based solution where new launch configs can be based
on an existing launch config. New launch configs will not be connected to template after initial copying of attributes.
Note: According to the current 3.3 draft plan this will not be a committed item.
Leverage Execution Environment over JRE (Monday afternoon, with Darin)
- Don't select a JRE in the build path wizards but a execution environment
- Combine compliance with EE
- Group JRE's by EE
⇒ Darin will talk with Wassim and Jeff.
Bindings for non-visible members (Tuesday afternoon, with Darin)
Compiling snippets that have a private field reference from a
superclass, do not have resolved bindings. For example, the snippet
"fName.length()" when compiled in the context of VectorTest, which
references fName from TestCase, does not have a resolved method binding
for "length()". I don't think that fName has a resolved type binding
either. Philippe thought this information was availale, but might not
be in the AST/DOM.
⇒ Darin to enter a bug for Olivier (should already be there)
Evaluations without Java project, or with modified build path (Tuesday afternoon, with Darin)
It
is possible to debug an application with a runtime classpath that does
not match a project's build path, or to debug an application that has
no associated projects in the workspace. Would it be possible to
perform evaluations by having the debugger perform name lookups, to
support evaluations that reflect the run(debug)-time?
Debug can get the AST from the reconcile.
Scrapbook evaluation enhancements (Tuesday afternoon, with Darin)
Support for import statements (could be done by debugger), breakpoints, source display (stepping, etc),
⇒ Darin said, Debug can use separate panes for imports, check the presence of Debug attributes so that they map on the right line
Scrapbook editing enhancements (Tuesday afternoon, with Darin)
Separate code from
evaluation results for coloring/styling, support to auto insert closing
bracket/quote, quick fix (assign to local etc), red squiggles, CTRL-T
on selected type (hover type hierarchy), toggle (un)block comments,
shift left/right, format, organize imports, rename selected variable in
file. - these things should work anywhere an evaluation can be
performed - scrapbook, display view, variable details pane, expression
detail pane, conditions, detail formatters, logical structures...
⇒ Dani and Darin will check whether we can get rid of the scrapbook editor entirely (eval hook in the Java editor?)
Debugger usability issues (Tuesday afternoon, with Darin)
Open discussion/suggestions for usability improvements in the Java debugger
- Changes in Variables view often not shown i.e. not highlighted - here's a simple scenario:
- import JUnit 3.8.1
- open type
junit.samples.VectorTest in the editor and set a breakpoint in the method setUp()
- now start to debug
VectorTest
- once the breakpoint is hit press F6 and observe: the change is highlighted in the Variables view
- press F6 and observe: the next change is highlighted in the Variables view
- press F6 and observe: nothing highlighted in the Variables view
- in the Variables view expand
fFull and observe: nothing highlighted
As a user I would expect that the node is auto-expanding and the changes highlighted.
⇒
Debug will add a slider to the Variables view where users can define
how deep the auto-expansion will be. Max. would mean "expand all".
Populating the JavaModel
Recent additions, like Java type
indicator in label decoration, are changing the assumptions on
populating the Java model. Given the cache got tuned for certain usage,
we should make sure it is aligned with current story, and planned
evolutions. Clearly eager is considered bad. We should discuss
alternative queries, and or complementary API addition (a la type
hierarchy getCachedFlags() -->
ICompilationUnit#getCachedFlags(IType/null to denote first type).
The type indicator has now been changed to use the search index (for 3.3 M1). Also in discussion is new API (bug 159393)
Formatting DOM AST (Monday)
Current formatter implementation is based on compiler internal AST. We
should discuss the benefits for providing a DOM AST solution instead.
What is the performance overhead, what are the consequences/benefits
for DOM AST users ?
⇒ JDT Core will not convert the
formatter to DOM AST since it does not give immediate benefits unless
formatter bugs get fix that benefit from it, is neither needed by JDT
Text nor JDT UI and has performance impacts. JDT Core will try to fix
the bugs in the formatter with another approach. This decision might change in the future should new requests arise.
Planned refactorings (Wednesday morning)
To anticipate API requests, it would be
good to explain the planned additions to refactorings. What typical new
operations are going to be provided, what expensive ones are becoming
critically used...
According to Martin there is no
new JDT Core support needed at the moment, except for the support to reuse bindings (see AST first item).
More flexible project layout (Monday afternoon)
When adopting Eclipse, some
pre-existing project layouts are hard to model in Eclipse. It feels
this process could be eased by allowing more configurability of the
Java project, such as allowing custom buildpath or settings on a per
source folder basis; multiple source attachments per library; inclusion
of external resources in workspace (as opposed to linking resources
which is not seen by external tools); relax classpath container
limitations, which currently do not allow nested containers, source
folders etc...
Philippe discussed this within the PMC and they would only accept this under a different name: "more flexible classpath layout".
Discussed about 2 hours without any conclusion so far. Dani's idea is
to leave everything as is but add a super java project that could
contain IJavaProjects.
⇒ no clear path yet
Improve compiler fault-tolerance (Wednesday morning)
Missing types can greatly
deteriorate compiler output by producing too many secondary errors,
surface suboptimal DOM bindings, or even abort entire compilation
process when missing types are referenced from required classfiles. We
should investigate ways to improve this situation, remembering that the
APT Mirror API requires that bindings are still presented even in the
presence of missing types.
Batch Compiler (Wednesday morning)
Consider batch compiler improvements triggerred
by its raised visibility; I think we should make a conscious effort to
ease the dual use of the IDE
and the batch compiler, keeping in mind the fact that we also need to
be 'javac compatible' for the batch compiler; there are also
improvements
undergoing in the way we call it; and I'd like also to consider porting
to the batch environment part of the work done for us by the resource
layers
in Eclipse (or else replace it by something powerful - aka consider
canonizing filenames, etc., cleanup design points around files accessed
through
multiple paths, consider a portable file naming scheme, etc.)
I think APT folks will find an interest in this in that they will
likely be involved into batch building uses at one point in time. And
UI should be helpful in rounding up batch/IDE equivalences.
Provide a more useful class file viewer (Discussed between Dani and Olivier only)
- It would be nice to have an extension point that could set
the viewer used to see .class file. We could imagine this extension
point to be used by a disassembler like JAD that provides source code
instead of class file structure.
- The class file disassembler
has some "advanced" modes that cannot be triggered by the actual class
file viewer. Right now I don't find the contents showed as useful since
it doesn't provide more information than the outliner. We could have a
class file viewer that could benefit from the SYSTEM and DETAILED mode
of the disassembler with code folding for some attributes (Code
Attribute, RuntimeAnnotations....). This could be quite interesting.
- We
could imagine a new view like the outliner that would show the .class
file contents for a compilation unit retrieving the corresponding
.class file. This would be very handy when debugging a problem in the
compiler.
See also bug 59495.
Clients can provide their own view on a Java class file via
"org.eclipse.ui.editors" extension point. There are currently no plans
to offer plugable views for the Class File editor.
⇒ JDT Text will ask legal (Adrian Cho) whether it is OK to show disassembled
contents and if yes, show the detailed result from the disassembler (bug 3537)
Bug Wishes (Tuesday morning)
This topic lists bugs that do not need to be discussed in detail but for which the team would like to have and would like to get
an answer whether this can be done and if not, why. Of course if a bug is accepted it might lead to further discussions.
- From Text to JDT Core
- improve "Unnecessary declaration of thrown checked exceptions" (bug 73244)
see "Compiler" topic
above: instead of providing support for special cases we should find a
way to suppress warnings. In addition pingged the bug whether it could
be solved for 3.3.
- improve handling of constructor proposals (bug 83392)
Talked with David: still no better support from the model that would allow to do this in a performant way.
⇒ No action for this PR but reopened bug 6930 to investigate simple constructor support
- code assist should propose types even if there's no initial character(s) (bug 102875)
⇒ JDT Core will fix this
- [formatting] each format shifts code inside <pre> one space to the right (bug 99738)
⇒ Olivier plans to fix this for 3.3 together with other bugs in the formatter
- Java model gives different results (bug 129584)
⇒ JDT Core will investigate
- From Text to JDT Debug
- [variables] Variables view should offer Auto-Expand (bug 131931)
⇒ Debug will add an option to the Variables view that allows to specify the expand level (see also above)
post-mortem discussion
This will be done individually by JDT Core and ZRH and then consolidated.
Various Summit Notes
- initial talks about 3.3 plan, team structure
- downloads
- first we scheduled most of the items
- diverging into discussing Java Beans feature
- started discussion with AST
- Darin is part of the discussion on Monday afternoon 17h30 - 19h00
- discussed possibility to switch to 5.0: most likely not possible (will probably not happen)
- Olivier will continue to bring croissants for the whole team ;-)