Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 355201 - Hide JavaScript Development Generator
Summary: Hide JavaScript Development Generator
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Justin Spadea CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-19 05:47 EDT by Tony Chen CLA
Modified: 2017-02-23 14:16 EST (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tony Chen CLA 2011-08-19 05:47:01 EDT
In IDE, user would always want both the JavaScript Development Generator & JavaScript Generator if they are working with Web Client projects. We need to hide the JavaScript Development Generator in generator preference. 

One solution might be simply combined these two generator into one. But do we support to write generator output to two difference places? And if we think about cmd mode (sdk mode), it might be a valid requirement to only run the JavaScript Generator.
Comment 1 Justin Spadea CLA 2011-09-01 18:13:04 EDT
It seems that the requirements for this are:

1. If JavaScript generation is enabled, then the VE and debugger should "just work"
2. The user should not be able to disable the dev-mode generator since it will "cause chaos" during development

Proposal:

Add a new property to the generator schema: dependsUponGeneratorID

When this property is set, a generator will still be displayed in the generator configuration table, but grayed out (disabled to the user). When the depended-upon generator is enabled, then this generator is automatically enabled. Same for disabling. These changes are reflected in the UI instantly. This generator can still contribute a tab provider for any configuration options. The development-mode JS generator would not have a "generation directory" property, but it can have other configuration properties like enabling reports. We will make this particular generator always put its code into a specific "known" directory of the containing project.

If a user *really* needs to disable dev-mode JS gen and they know what they're doing, it will be possible to manually edit the .prefs file inside the .settings directory (caveat: making compiler/generator changes in the property page might re-enable the generator).

I size this work at 1-2 hours, with the majority spent on the UI. If others are strapped for time I would be willing to take on this work.
Comment 2 Justin Spadea CLA 2011-09-02 09:25:01 EDT
Note: If we disable configuration of the generation directory for the dev-mode JS generator as described in comment 1, always placing it into a known location, then we can simplify the logic in DevJavascriptGenFolderFilter.java.
Comment 3 Theresa Ramsey CLA 2011-09-02 11:08:53 EDT
I agree hiding or removing would be good. 

So would the JavaScript Dev Generator options show in another tab (like today), or put at the bottom of the JS Gen tab?  I think the latter makes sense, since the 2 will be intertwined.  

I understand turning on the JS Dev Gen by default when you turn on the JS Gen. Would someone ever want to turn off the JS Gen for Dev when JS Gen is on (Say, thousands of files)?  If so, we'd need some verbage around that option, like "If you disable the JavaScript Development Generator, the visual editor and debugger will not work."
Note - I dropped the "mode" from the title...it's already long enough. :-)
Comment 4 Tony Chen CLA 2011-09-05 21:27:24 EDT
Justin, It would be great if you could do this. Since you have a good description of the requirement and the sizing seemed to be small, you doing it would save additional communication efforts. Thanks!

(In reply to comment #1)
Comment 5 Brian Svihovec CLA 2011-09-09 12:43:25 EDT
I agree with the requirements stated in comment 1;  the VE and Debugger should just work, and we should try to keep users from hurting themselves.  [NOTE: While users shouldn't be able to disable the JavaScript Development mode generator, they can still hurt themselves by trying to debug a Rich UI application in a project that hasn't been configured with any JavaScript generators.]

I think we should hide the JavaScript Development mode generator instead of showing the generator as selected and disabled.  In EDT, users are required to debug generated code, so they must have at least one generator configured to debug a part.  The fact that we have two generators for JavaScript is an implementation detail that the users should not need to know about.  I don't believe there is a situation where a user would need to rename the generation directory for the development code that we generate, and any compiler options  configured for the Target JS generator (e.g. reporting) could also be applied to the Development JS generator.

If it is easier in the short term to show the JavaScript Development mode generator, and make it disabled to the user, I think that is ok.  I believe the other behaviors that Justin described would still be the same (e.g. enabling and disabling the development generator based on the target generator selection), regardless of the decision to show or hide the development generator.

Finally, I have mentioned in the past that some users may want to disable the JS Development mode generator, but this was within the context of those users dealing with bugs in the IDE.  I am fine with these users having to manipulate a settings file to disable the generator in these situations.
Comment 6 Justin Spadea CLA 2011-09-09 13:50:37 EDT
In today's scrum we agreed on the following:

The UI will hide the dev-mode generator, and the UI will check/uncheck it under the covers when the base JS generator is checked/unchecked. The user cannot configure the output directory - there will be no configuration tab. Any other settings specified on the regular JS generator will be used by the dev-mode JS generator.

With this implementation, if you programmatically set the JS generator, you will not be setting the dev-mode generator. You must explicitly set the dev-mode generator in your code if you want it enabled. We only only be turning it on automatically when you configure the generators via our preference/property pages.

In addition to the users being able to modify the .settings files to disable the generator, we can also add a VM argument to disable the generator as a whole, if people feel that's appropriate.
Comment 7 Justin Spadea CLA 2011-09-09 17:25:20 EDT
The dev generator is now hidden and is enabled/disabled under the covers to match the base JS generator.
Comment 8 Tony Chen CLA 2011-10-20 07:36:04 EDT
verified