Bug 1408795 - Prevent Eclipse CDT's blocking "Welcome" screen from showing on startup. r=botond
The blocking Welcome screen is quite confusing for a new user. It is not clear
where to find the Mozilla stuff they expect to see when opening Eclipse, or
that the user needs to close the entire content area to get to it. Besides that
the screen isn't very useful for Mozilla people who will find more relevant
help from searching the online documentation, and who won't be creating new
projects in the generated workspace, etc.
MozReview-Commit-ID: BaUFpQBFCOm
--- a/python/mozbuild/mozbuild/backend/cpp_eclipse.py
+++ b/python/mozbuild/mozbuild/backend/cpp_eclipse.py
@@ -108,16 +108,20 @@ class CppEclipseBackend(CommonBackend):
workspace_language_path = os.path.join(workspace_language_dir, 'language.settings.xml')
with open(workspace_language_path, 'wb') as fh:
workspace_lang_settings = WORKSPACE_LANGUAGE_SETTINGS_TEMPLATE
workspace_lang_settings = workspace_lang_settings.replace("@COMPILER_FLAGS@", self._cxx + " " + self._cppflags);
fh.write(workspace_lang_settings)
self._write_launch_files(launch_dir)
+ ui_prefs_path = os.path.join(workspace_settings_dir, 'org.eclipse.ui.prefs')
+ with open(ui_prefs_path, 'wb') as fh:
+ fh.write(STATIC_UI_PREFS);
+
cdt_ui_prefs_path = os.path.join(workspace_settings_dir, 'org.eclipse.cdt.ui.prefs')
cdt_ui_prefs = STATIC_CDT_UI_PREFS
# Here we generate the code formatter that will show up in the UI with
# the name "Mozilla". The formatter is stored as a single line of XML
# in the org.eclipse.cdt.ui.formatterprofiles pref.
cdt_ui_prefs += """org.eclipse.cdt.ui.formatterprofiles=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?>\\n<profiles version\="1">\\n<profile kind\="CodeFormatterProfile" name\="Mozilla" version\="1">\\n"""
XML_PREF_TEMPLATE = """<setting id\="@PREF_NAME@" value\="@PREF_VAL@"/>\\n"""
for line in FORMATTER_SETTINGS.splitlines():
@@ -528,16 +532,20 @@ showEnclosedSpaces=false
showLeadingSpaces=false
showLineFeed=false
showWhitespaceCharacters=true
spacesForTabs=true
tabWidth=2
undoHistorySize=200
"""
+STATIC_UI_PREFS="""eclipse.preferences.version=1
+showIntro=false
+"""
+
STATIC_CDT_CORE_PREFS="""eclipse.preferences.version=1
"""
FORMATTER_SETTINGS = """org.eclipse.cdt.core.formatter.alignment_for_arguments_in_method_invocation=16
org.eclipse.cdt.core.formatter.alignment_for_assignment=16
org.eclipse.cdt.core.formatter.alignment_for_base_clause_in_type_declaration=80
org.eclipse.cdt.core.formatter.alignment_for_binary_expression=16
org.eclipse.cdt.core.formatter.alignment_for_compact_if=16