Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 280683

Summary: IJavaProjectLite API
Product: [Eclipse Project] JDT Reporter: Jason Sholl <jsholl>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: VERIFIED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: ccc, daniel_megert, jarthana, manoj.palat, Olivier_Thomann
Version: 3.4.2   
Target Milestone: 4.10 M1   
Hardware: PC   
OS: Windows XP   
Whiteboard: stalebug
Attachments:
Description Flags
patch none

Description Jason Sholl CLA 2009-06-17 17:33:39 EDT
Created attachment 139486 [details]
patch

Because many of the methods on IJavaProject are dependent on the underlying Java Model being successfully initialized by JDT before being "safe" to call, I propose those methods are clearly distinguished by a separate API.  My understanding of "unsafe" methods are those methods which can deliver inconsistent results when working in a multi-threaded environment.  I believe this class of methods includes all those which either directly throw a JavaModelException or call something which does.  "safe" methods are those which do not exhibit this "unsafe" behavior.

We (WTP developers and product developers extending WTP) have run into countless scenarios where during product startup (either with the UI or headless) our code delivers inconsistent results because of accidental calls to "unsafe" JDT methods.

Attached is a first attempt at defining a Lite version of the JDT API in WTP which can always be safely called (this came from bug 241343).  Please take a look at this patch to see if something like this could be included in 3.5.
Comment 1 Olivier Thomann CLA 2010-01-05 09:21:55 EST
We could improve documentation, but I don't see a reason to create a new API.
Comment 2 Dani Megert CLA 2010-01-05 09:34:03 EST
>We could improve documentation, but I don't see a reason to create a new API.
Agree.
Comment 3 Eclipse Genie CLA 2018-09-13 16:18:52 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 4 Jay Arthanareeswaran CLA 2018-09-14 03:57:51 EDT
No plan to fix this.
Comment 5 Manoj N Palat CLA 2018-10-10 23:23:58 EDT
Verified for Eclipse 4.10 M1 with Build id: I20181010-1800
[Nothing to Verify - won't fix]