Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 354652 - Editor code templates should only include valid templates
Summary: Editor code templates should only include valid templates
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Tony Chen CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-12 13:26 EDT by Will Smythe CLA
Modified: 2017-02-23 14:17 EST (History)
5 users (show)

See Also:


Attachments
EDT M2+CDL build Code template preference page (62.29 KB, image/png)
2011-08-12 13:27 EDT, Will Smythe CLA
no flags Details
merge egl-rui into egl-core context (9.53 KB, patch)
2011-09-05 21:48 EDT, Tony Chen CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Will Smythe CLA 2011-08-12 13:26:44 EDT
Looking at the M2 build, there are a lot of code templates under Preferences > EGL > Editor > Templates that are not applicable in the EDT IDE. At a minimum, we should remove the templates that are completely invalid for EDT IDE ("transfer to program").

It seems code templates should be contributed by the UI plug-in of a generator or compiler (?) since some are tied to a specific compiler/generator. Others are "basic", and possibly should be included by Core.

(There needs to be some discussion on this, if there hasn't been discussion already)
Comment 1 Will Smythe CLA 2011-08-12 13:27:39 EDT
Created attachment 201417 [details]
EDT M2+CDL build Code template preference page
Comment 2 Will Smythe CLA 2011-08-12 13:28:40 EDT
Another example: "Rich UI widget" is not applicable in the case of an IDE that does not have the JavaScript generator installed into it.
Comment 3 Tony Chen CLA 2011-08-14 22:30:10 EDT
there was a bug 354459 to review the existing code templates, correct or removing staff that does not apply to EDT language. I have assigned this to the language component cause this is more a language thing. 

The other problem you mentioned is to make the code template extensible,I think it is good idea to link code template to compilers. 

I would suggest to make this enhancement an 1.0 item.
Comment 4 Will Smythe CLA 2011-08-14 22:37:29 EDT
Sorry - I didn't see bug 354459 when I opened this one. Feel free to mark this as a duplicate.

Regardless of who owns the work, someone needs to at least remove VAG/RBD-specific feature templates before 0.7 ships.
Comment 5 Tony Chen CLA 2011-08-14 23:24:35 EDT
I'd like to keep this open to address the extensibility problem. 

bug 354459 does need to be in 0.7, besides the templates that does not apply to EDT, many template are not correct now because of the language changes. For example 

   Record myrec type BasicRecord 
now needs to be 
   Record myrec
Comment 6 Tony Chen CLA 2011-09-05 05:49:23 EDT
Now we have most of the templates in "egl-core" context, and two in "egl-rui" context. In RBD, context maps to Project Natural which does not apply to EDT. 

As a short term fix (to avoid confusion of what "egl-rui" is), I would like to put all templates into "egl-core" for 0.7.

From the concept of EDT, templates really need to be organized by Compilers. And only the templates for the enabled compiler should be activated. (Should it be compiler or generator? ). I would consider this as a 1.0 feature unless somebody think it is very important.
Comment 7 Tony Chen CLA 2011-09-05 21:48:36 EDT
Created attachment 202775 [details]
merge egl-rui into egl-core context
Comment 8 Matt Heitz CLA 2011-09-06 10:13:04 EDT
Tony, I agree that organizing the templates by compiler or generator should be done in 1.0 not 0.7.
Comment 9 Tony Chen CLA 2011-09-15 02:13:50 EDT
Triage this to future.