Bug 1064620: Replace # with //# for IDE integration. r=nalexander
authorChris Kitching <chriskitching@linux.com>
Sat, 11 Oct 2014 15:22:55 +0100
changeset 233134 b557f2cb4a04b9b28d91b372ce0433e83f72076f
parent 233133 12a7e4dd89496c92ded36eb6cb1fd73ae733c039
child 233135 f216320d85384686c3fd8b8b2867d2d3349bb837
push id4187
push userbhearsum@mozilla.com
push dateFri, 28 Nov 2014 15:29:12 +0000
treeherdermozilla-beta@f23cc6a30c11 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnalexander
bugs1064620
milestone35.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1064620: Replace # with //# for IDE integration. r=nalexander
mobile/android/base/AppConstants.java.in
mobile/android/base/Makefile.in
mobile/android/base/SysInfo.java.in
mobile/android/base/background/common/GlobalConstants.java.in
mobile/android/base/background/healthreport/HealthReportConstants.java.in
mobile/android/base/fxa/FxAccountConstants.java.in
mobile/android/base/mozglue/GeckoLoader.java.in
mobile/android/base/sync/SyncConstants.java.in
mobile/android/base/widget/ThemedEditText.java.in
mobile/android/base/widget/ThemedImageButton.java.in
mobile/android/base/widget/ThemedImageView.java.in
mobile/android/base/widget/ThemedLinearLayout.java.in
mobile/android/base/widget/ThemedRelativeLayout.java.in
mobile/android/base/widget/ThemedTextSwitcher.java.in
mobile/android/base/widget/ThemedTextView.java.in
mobile/android/base/widget/ThemedView.java.in
--- a/mobile/android/base/AppConstants.java.in
+++ b/mobile/android/base/AppConstants.java.in
@@ -1,9 +1,9 @@
-#filter substitution
+//#filter substitution
 /* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*-
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 package org.mozilla.gecko;
 
 import org.mozilla.gecko.mozglue.RobocopTarget;
@@ -26,21 +26,21 @@ public class AppConstants {
 
     /**
      * Encapsulates access to compile-time version definitions, allowing
      * for dead code removal for particular APKs.
      */
     public static final class Versions {
         public static final int MIN_SDK_VERSION = @MOZ_ANDROID_MIN_SDK_VERSION@;
         public static final int MAX_SDK_VERSION =
-#ifdef MOZ_ANDROID_MAX_SDK_VERSION
+//#ifdef MOZ_ANDROID_MAX_SDK_VERSION
         @MOZ_ANDROID_MAX_SDK_VERSION@;
-#else
+//#else
         999;
-#endif
+//#endif
 
         /*
          * The SDK_INT >= N check can only pass if our MAX_SDK_VERSION is
          * _greater than or equal_ to that number, because otherwise we
          * won't be installed on the device.
          *
          * If MIN_SDK_VERSION is greater than or equal to the number, there
          * is no need to do the runtime check.
@@ -88,21 +88,21 @@ public class AppConstants {
     public static final String MOZ_APP_VENDOR = "@MOZ_APP_VENDOR@";
     public static final String MOZ_APP_VERSION = "@MOZ_APP_VERSION@";
 
     // MOZILLA_VERSION is already quoted when it gets substituted in. If we
     // add additional quotes we end up with ""x.y"", which is a syntax error.
     public static final String MOZILLA_VERSION = @MOZILLA_VERSION@;
 
     public static final String MOZ_STUMBLER_API_KEY =
-#ifdef MOZ_ANDROID_MLS_STUMBLER
+//#ifdef MOZ_ANDROID_MLS_STUMBLER
     "@MOZ_STUMBLER_API_KEY@";
-#else
+//#else
     null;
-#endif
+//#endif
     public static final boolean MOZ_STUMBLER_BUILD_TIME_ENABLED = (MOZ_STUMBLER_API_KEY != null);
 
     public static final String MOZ_CHILD_PROCESS_NAME = "@MOZ_CHILD_PROCESS_NAME@";
     public static final String MOZ_UPDATE_CHANNEL = "@MOZ_UPDATE_CHANNEL@";
     public static final String OMNIJAR_NAME = "@OMNIJAR_NAME@";
     public static final String OS_TARGET = "@OS_TARGET@";
     public static final String TARGET_XPCOM_ABI = @TARGET_XPCOM_ABI@;
 
@@ -117,147 +117,147 @@ public class AppConstants {
     public static final String USER_AGENT_FENNEC_TABLET = "Mozilla/5.0 (Android; Tablet; rv:" +
         AppConstants.MOZ_APP_VERSION + ") Gecko/" +
         AppConstants.MOZ_APP_VERSION + " Firefox/" +
         AppConstants.MOZ_APP_VERSION;
 
     public static final int MOZ_MIN_CPU_VERSION = @MOZ_MIN_CPU_VERSION@;
 
     public static final boolean MOZ_ANDROID_ANR_REPORTER =
-#ifdef MOZ_ANDROID_ANR_REPORTER
+//#ifdef MOZ_ANDROID_ANR_REPORTER
     true;
-#else
+//#else
     false;
-#endif
+//#endif
 
     public static final String MOZ_PKG_SPECIAL =
-#ifdef MOZ_PKG_SPECIAL
+//#ifdef MOZ_PKG_SPECIAL
     "@MOZ_PKG_SPECIAL@";
-#else
+//#else
     null;
-#endif
+//#endif
 
     /**
      * Whether this APK was built with constrained resources --
      * no xhdpi+ images, for example.
      */
     public static final boolean MOZ_ANDROID_RESOURCE_CONSTRAINED =
-#ifdef MOZ_ANDROID_RESOURCE_CONSTRAINED
+//#ifdef MOZ_ANDROID_RESOURCE_CONSTRAINED
     true;
-#else
+//#else
     false;
-#endif
+//#endif
 
     public static final boolean MOZ_SERVICES_HEALTHREPORT =
-#ifdef MOZ_SERVICES_HEALTHREPORT
+//#ifdef MOZ_SERVICES_HEALTHREPORT
     true;
-#else
+//#else
     false;
-#endif
+//#endif
 
     public static final boolean MOZ_TELEMETRY_ON_BY_DEFAULT =
-#ifdef MOZ_TELEMETRY_ON_BY_DEFAULT
+//#ifdef MOZ_TELEMETRY_ON_BY_DEFAULT
     true;
-#else
+//#else
     false;
-#endif
+//#endif
 
     public static final String TELEMETRY_PREF_NAME =
           "toolkit.telemetry.enabled";
 
     public static final boolean MOZ_TELEMETRY_REPORTING =
-#ifdef MOZ_TELEMETRY_REPORTING
+//#ifdef MOZ_TELEMETRY_REPORTING
     true;
-#else
+//#else
     false;
-#endif
+//#endif
 
     public static final boolean MOZ_CRASHREPORTER =
-#if MOZ_CRASHREPORTER
+//#if MOZ_CRASHREPORTER
     true;
-#else
+//#else
     false;
-#endif
+//#endif
 
     public static final boolean MOZ_DATA_REPORTING =
-#ifdef MOZ_DATA_REPORTING
+//#ifdef MOZ_DATA_REPORTING
       true;
-#else
+//#else
     false;
-#endif
+//#endif
 
     public static final boolean MOZ_LOCALE_SWITCHER =
-#ifdef MOZ_LOCALE_SWITCHER
+//#ifdef MOZ_LOCALE_SWITCHER
     true;
-#else
+//#else
     false;
-#endif
+//#endif
 
     public static final boolean MOZ_UPDATER =
-#ifdef MOZ_UPDATER
+//#ifdef MOZ_UPDATER
     true;
-#else
+//#else
     false;
-#endif
+//#endif
 
     public static final boolean MOZ_WEBSMS_BACKEND =
-#ifdef MOZ_WEBSMS_BACKEND
+//#ifdef MOZ_WEBSMS_BACKEND
     true;
-#else
+//#else
     false;
-#endif
+//#endif
 
     // Android Beam is only supported on API14+, so we don't even bother building
     // it if this APK doesn't include API14 support.
     public static final boolean MOZ_ANDROID_BEAM =
-#ifdef MOZ_ANDROID_BEAM
+//#ifdef MOZ_ANDROID_BEAM
     Versions.feature14Plus;
-#else
+//#else
     false;
-#endif
+//#endif
 
     public static final boolean MOZ_ANDROID_APZ =
-#ifdef MOZ_ANDROID_APZ
+//#ifdef MOZ_ANDROID_APZ
     true;
-#else
+//#else
     false;
-#endif
+//#endif
 
     // See this wiki page for more details about channel specific build defines:
     // https://wiki.mozilla.org/Platform/Channel-specific_build_defines
     public static final boolean RELEASE_BUILD =
-#ifdef RELEASE_BUILD
+//#ifdef RELEASE_BUILD
     true;
-#else
+//#else
     false;
-#endif
+//#endif
 
     public static final boolean DEBUG_BUILD =
-#ifdef MOZ_DEBUG
+//#ifdef MOZ_DEBUG
     true;
-#else
+//#else
     false;
-#endif
+//#endif
 
     public static final boolean MOZ_MEDIA_PLAYER =
-#ifdef MOZ_NATIVE_DEVICES
+//#ifdef MOZ_NATIVE_DEVICES
     true;
-#else
+//#else
     false;
-#endif
+//#endif
 
     // Official corresponds, roughly, to whether this build is performed on
     // Mozilla's continuous integration infrastructure. You should disable
     // developer-only functionality when this flag is set.
     public static final boolean MOZILLA_OFFICIAL =
-#ifdef MOZILLA_OFFICIAL
+//#ifdef MOZILLA_OFFICIAL
     true;
-#else
+//#else
     false;
-#endif
+//#endif
 
     public static final boolean ANDROID_DOWNLOADS_INTEGRATION =
-#ifdef MOZ_ANDROID_DOWNLOADS_INTEGRATION
+//#ifdef MOZ_ANDROID_DOWNLOADS_INTEGRATION
     AppConstants.Versions.feature12Plus;
-#else
+//#else
     false;
-#endif
+//#endif
 }
--- a/mobile/android/base/Makefile.in
+++ b/mobile/android/base/Makefile.in
@@ -196,29 +196,31 @@ PP_TARGETS += manifest
 # Certain source files need to be preprocessed.  This special rule
 # generates these files into generated/org/mozilla/gecko for
 # consumption by the build system and IDEs.
 
 preprocessed := $(addsuffix .in,$(subst generated/org/mozilla/gecko/,,$(filter generated/org/mozilla/gecko/%,$(PP_JAVAFILES))))
 
 preprocessed_PATH := generated/org/mozilla/gecko
 preprocessed_KEEP_PATH := 1
+preprocessed_FLAGS := --marker='//\\\#'
 
 PP_TARGETS += preprocessed
 
 # Certain source files have Java package name @ANDROID_PACKAGE_NAME@.
 # We hate these files but they are necessary for backwards
 # compatibility.  These special rules generate these files into
 # generated/org/mozilla/{firefox,firefox_beta,fennec,fennec_$USER} for
 # consumption by the build system and IDEs.
 
 preprocessed_package := $(addsuffix .in,$(subst $(android_package_dir)/,,$(filter $(android_package_dir)/%,$(PP_JAVAFILES))))
 
 preprocessed_package_PATH := $(android_package_dir)
 preprocessed_package_KEEP_PATH := 1
+preprocessed_package_FLAGS := --marker='//\\\#'
 
 PP_TARGETS += preprocessed_package
 
 include $(topsrcdir)/config/rules.mk
 
 not_android_res_files := \
   *.mkdir.done* \
   *.DS_Store* \
--- a/mobile/android/base/SysInfo.java.in
+++ b/mobile/android/base/SysInfo.java.in
@@ -1,9 +1,9 @@
-#filter substitution
+//#filter substitution
 /* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*-
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 package org.mozilla.gecko;
 
 import org.mozilla.gecko.util.HardwareUtils;
--- a/mobile/android/base/background/common/GlobalConstants.java.in
+++ b/mobile/android/base/background/common/GlobalConstants.java.in
@@ -1,9 +1,9 @@
-#filter substitution
+//#filter substitution
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 package org.mozilla.gecko.background.common;
 
 /**
  * Preprocessed class for storing preprocessed values common to all
@@ -11,21 +11,21 @@ package org.mozilla.gecko.background.com
  */
 public class GlobalConstants {
   public static final String ANDROID_CPU_ARCH = "@ANDROID_CPU_ARCH@";
 
   // One of 'beta', 'aurora', 'nightly', 'default'.
   // If this is an official build, 'default' means 'release'.
   // Otherwise, it means 'dev'.
   public static final String MOZ_UPDATE_CHANNEL = "@MOZ_UPDATE_CHANNEL@";
-#ifdef MOZ_OFFICIAL_BRANDING
+//#ifdef MOZ_OFFICIAL_BRANDING
   public static final boolean MOZ_OFFICIAL_BRANDING = true;
-#else
+//#else
   public static final boolean MOZ_OFFICIAL_BRANDING = false;
-#endif
+//#endif
 
   public static final long BUILD_TIMESTAMP_SECONDS = @MOZ_BUILD_TIMESTAMP@L;
   public static final long BUILD_TIMESTAMP_MSEC = 1000L * @MOZ_BUILD_TIMESTAMP@L;
 
   public static final String MOZ_APP_DISPLAYNAME = "@MOZ_APP_DISPLAYNAME@";
   public static final String MOZ_APP_VERSION = "@MOZ_APP_VERSION@";
   public static final String BROWSER_INTENT_PACKAGE = "@ANDROID_PACKAGE_NAME@";
   public static final String BROWSER_INTENT_CLASS = "org.mozilla.gecko.BrowserApp";
--- a/mobile/android/base/background/healthreport/HealthReportConstants.java.in
+++ b/mobile/android/base/background/healthreport/HealthReportConstants.java.in
@@ -1,9 +1,9 @@
-#filter substitution
+//#filter substitution
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 package org.mozilla.gecko.background.healthreport;
 
 import org.mozilla.gecko.background.common.GlobalConstants;
 
--- a/mobile/android/base/fxa/FxAccountConstants.java.in
+++ b/mobile/android/base/fxa/FxAccountConstants.java.in
@@ -1,9 +1,9 @@
-#filter substitution
+//#filter substitution
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 package org.mozilla.gecko.fxa;
 
 import org.mozilla.gecko.background.common.GlobalConstants;
 import org.mozilla.gecko.background.common.log.Logger;
--- a/mobile/android/base/mozglue/GeckoLoader.java.in
+++ b/mobile/android/base/mozglue/GeckoLoader.java.in
@@ -1,9 +1,9 @@
-#filter substitution
+//#filter substitution
 /* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*-
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 package org.mozilla.gecko.mozglue;
 
 import java.io.File;
@@ -221,26 +221,26 @@ public final class GeckoLoader {
         String forced_ondemand = System.getenv("MOZ_LINKER_ONDEMAND");
         if (forced_ondemand == null) {
             if ("HTC".equals(android.os.Build.MANUFACTURER) &&
                 "HTC Vision".equals(android.os.Build.MODEL)) {
                 putenv("MOZ_LINKER_ONDEMAND=0");
             }
         }
 
-#ifdef MOZ_LINKER_EXTRACT
+//#ifdef MOZ_LINKER_EXTRACT
         putenv("MOZ_LINKER_EXTRACT=1");
         // Ensure that the cache dir is world-writable
         File cacheDir = new File(linkerCache);
         if (cacheDir.isDirectory()) {
             cacheDir.setWritable(true, false);
             cacheDir.setExecutable(true, false);
             cacheDir.setReadable(true, false);
         }
-#endif
+//#endif
     }
 
     @RobocopTarget
     public static void loadSQLiteLibs(final Context context, final String apkName) {
         synchronized (sLibLoadingLock) {
             if (sSQLiteLibsLoaded) {
                 return;
             }
--- a/mobile/android/base/sync/SyncConstants.java.in
+++ b/mobile/android/base/sync/SyncConstants.java.in
@@ -1,9 +1,9 @@
-#filter substitution
+//#filter substitution
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 package org.mozilla.gecko.sync;
 
 import org.mozilla.gecko.background.common.GlobalConstants;
 
--- a/mobile/android/base/widget/ThemedEditText.java.in
+++ b/mobile/android/base/widget/ThemedEditText.java.in
@@ -1,4 +1,4 @@
-#filter substitution
-#define VIEW_NAME_SUFFIX EditText
-#define BASE_TYPE android.widget.EditText
-#include ThemedView.java.frag
+//#filter substitution
+//#define VIEW_NAME_SUFFIX EditText
+//#define BASE_TYPE android.widget.EditText
+//#include ThemedView.java.frag
--- a/mobile/android/base/widget/ThemedImageButton.java.in
+++ b/mobile/android/base/widget/ThemedImageButton.java.in
@@ -1,4 +1,4 @@
-#filter substitution
-#define VIEW_NAME_SUFFIX ImageButton
-#define BASE_TYPE android.widget.ImageButton
-#include ThemedView.java.frag
+//#filter substitution
+//#define VIEW_NAME_SUFFIX ImageButton
+//#define BASE_TYPE android.widget.ImageButton
+//#include ThemedView.java.frag
--- a/mobile/android/base/widget/ThemedImageView.java.in
+++ b/mobile/android/base/widget/ThemedImageView.java.in
@@ -1,4 +1,4 @@
-#filter substitution
-#define VIEW_NAME_SUFFIX ImageView
-#define BASE_TYPE android.widget.ImageView
-#include ThemedView.java.frag
+//#filter substitution
+//#define VIEW_NAME_SUFFIX ImageView
+//#define BASE_TYPE android.widget.ImageView
+//#include ThemedView.java.frag
--- a/mobile/android/base/widget/ThemedLinearLayout.java.in
+++ b/mobile/android/base/widget/ThemedLinearLayout.java.in
@@ -1,4 +1,4 @@
-#filter substitution
-#define VIEW_NAME_SUFFIX LinearLayout
-#define BASE_TYPE android.widget.LinearLayout
-#include ThemedView.java.frag
+//#filter substitution
+//#define VIEW_NAME_SUFFIX LinearLayout
+//#define BASE_TYPE android.widget.LinearLayout
+//#include ThemedView.java.frag
--- a/mobile/android/base/widget/ThemedRelativeLayout.java.in
+++ b/mobile/android/base/widget/ThemedRelativeLayout.java.in
@@ -1,4 +1,4 @@
-#filter substitution
-#define VIEW_NAME_SUFFIX RelativeLayout
-#define BASE_TYPE android.widget.RelativeLayout
-#include ThemedView.java.frag
+//#filter substitution
+//#define VIEW_NAME_SUFFIX RelativeLayout
+//#define BASE_TYPE android.widget.RelativeLayout
+//#include ThemedView.java.frag
--- a/mobile/android/base/widget/ThemedTextSwitcher.java.in
+++ b/mobile/android/base/widget/ThemedTextSwitcher.java.in
@@ -1,4 +1,4 @@
-#filter substitution
-#define VIEW_NAME_SUFFIX TextSwitcher
-#define BASE_TYPE android.widget.TextSwitcher
-#include ThemedView.java.frag
+//#filter substitution
+//#define VIEW_NAME_SUFFIX TextSwitcher
+//#define BASE_TYPE android.widget.TextSwitcher
+//#include ThemedView.java.frag
--- a/mobile/android/base/widget/ThemedTextView.java.in
+++ b/mobile/android/base/widget/ThemedTextView.java.in
@@ -1,4 +1,4 @@
-#filter substitution
-#define VIEW_NAME_SUFFIX TextView
-#define BASE_TYPE android.widget.TextView
-#include ThemedView.java.frag
+//#filter substitution
+//#define VIEW_NAME_SUFFIX TextView
+//#define BASE_TYPE android.widget.TextView
+//#include ThemedView.java.frag
--- a/mobile/android/base/widget/ThemedView.java.in
+++ b/mobile/android/base/widget/ThemedView.java.in
@@ -1,4 +1,4 @@
-#filter substitution
-#define VIEW_NAME_SUFFIX View
-#define BASE_TYPE android.view.View
-#include ThemedView.java.frag
+//#filter substitution
+//#define VIEW_NAME_SUFFIX View
+//#define BASE_TYPE android.view.View
+//#include ThemedView.java.frag