region ToolBase Overrides
484500
public function setup() {
		parent::setup();

		if(!is_admin()) {
			return;
		}

		$this->client = StorageManager::storageInstance();
		if ($this->client && $this->client->enabled() && $this->client->supportsDirectUploads()) {
			$this->setupAdmin();
			$this->setupAdminAjax();
		}
	}
609565
public void setToolDefault(int tool, boolean enabled) {
        switch (tool) {
            case IBurpExtenderCallbacks.TOOL_PROXY:
                if (mCallbacks.loadExtensionSetting(SETTING_PROXY) == null) {
                    jCheckBoxProxy.setSelected(enabled);
                }
                break;
            case IBurpExtenderCallbacks.TOOL_REPEATER:
                if (mCallbacks.loadExtensionSetting(SETTING_REPEATER) == null) {
                    jCheckBoxRepeater.setSelected(enabled);
                }
                break;
            case IBurpExtenderCallbacks.TOOL_SCANNER:
                if (mCallbacks.loadExtensionSetting(SETTING_SCANNER) == null) {
                    jCheckBoxScanner.setSelected(enabled);
                }
                break;
            case IBurpExtenderCallbacks.TOOL_INTRUDER:
                if (mCallbacks.loadExtensionSetting(SETTING_INTRUDER) == null) {
                    jCheckBoxIntruder.setSelected(enabled);
                }
                break;
            case IBurpExtenderCallbacks.TOOL_SEQUENCER:
                if (mCallbacks.loadExtensionSetting(SETTING_SEQUENCER) == null) {
                    jCheckBoxProxy.setSelected(enabled);
                }
                break;
            case IBurpExtenderCallbacks.TOOL_SPIDER:
                if (mCallbacks.loadExtensionSetting(SETTING_SPIDER) == null) {
                    jCheckBoxSpider.setSelected(enabled);
                }
                break;
            case IBurpExtenderCallbacks.TOOL_EXTENDER:
                if (mCallbacks.loadExtensionSetting(SETTING_EXTENDER) == null) {
                    jCheckBoxExtender.setSelected(enabled);
                }
                break;
            default:
                break;
        }
    }
336678
function applyProviderOverridesToNgModule(def) {
    var _a = calcHasOverrides(def), hasOverrides = _a.hasOverrides, hasDeprecatedOverrides = _a.hasDeprecatedOverrides;
    if (!hasOverrides) {
        return def;
    }
    // clone the whole view definition,
    // as it maintains references between the nodes that are hard to update.
    def = def.factory(function () { return NOOP; });
    applyProviderOverrides(def);
    return def;
    function calcHasOverrides(def) {
        var hasOverrides = false;
        var hasDeprecatedOverrides = false;
        if (providerOverrides.size === 0) {
            return { hasOverrides: hasOverrides, hasDeprecatedOverrides: hasDeprecatedOverrides };
        }
        def.providers.forEach(function (node) {
            var override = providerOverrides.get(node.token);
            if ((node.flags & 3840 /* CatProviderNoDirective */) && override) {
                hasOverrides = true;
                hasDeprecatedOverrides = hasDeprecatedOverrides || override.deprecatedBehavior;
            }
        });
        def.modules.forEach(function (module) {
            providerOverridesWithScope.forEach(function (override, token) {
                if (token.ngInjectableDef.providedIn === module) {
                    hasOverrides = true;
                    hasDeprecatedOverrides = hasDeprecatedOverrides || override.deprecatedBehavior;
                }
            });
        });
        return { hasOverrides: hasOverrides, hasDeprecatedOverrides: hasDeprecatedOverrides };
    }
    function applyProviderOverrides(def) {
        for (var i = 0; i < def.providers.length; i++) {
            var provider = def.providers[i];
            if (hasDeprecatedOverrides) {
                // We had a bug where me made
                // all providers lazy. Keep this logic behind a flag
                // for migrating existing users.
                provider.flags |= 4096 /* LazyProvider */;
            }
            var override = providerOverrides.get(provider.token);
            if (override) {
                provider.flags = (provider.flags & ~3840 /* CatProviderNoDirective */) | override.flags;
                provider.deps = splitDepsDsl(override.deps);
                provider.value = override.value;
            }
        }
        if (providerOverridesWithScope.size > 0) {
            var moduleSet_1 = new Set(def.modules);
            providerOverridesWithScope.forEach(function (override, token) {
                if (moduleSet_1.has(token.ngInjectableDef.providedIn)) {
                    var provider = {
                        token: token,
                        flags: override.flags | (hasDeprecatedOverrides ? 4096 /* LazyProvider */ : 0 /* None */),
                        deps: splitDepsDsl(override.deps),
                        value: override.value,
                        index: def.providers.length,
                    };
                    def.providers.push(provider);
                    def.providersByKey[tokenKey(token)] = provider;
                }
            });
        }
    }
}
551709
public static void setRegionExitPeriod(long regionExitPeriod){
        sExitRegionPeriod = regionExitPeriod;
        BeaconManager instance = sInstance;
        if (instance != null) {
            instance.applySettings();
        }
    }
39703
public void reconfigure() {
        addons = Sets.newLinkedHashSet();
        excludes = Sets.newLinkedHashSet();
        config = new ExcludeResourceConfig(excludes);
        srcProperties = Maps.newLinkedHashMap();
        configure();
    }
467931
protected void overrideXtextInternalLoggers() {
		final Logger logger = getLogger();
		final org.apache.log4j.spi.LoggerFactory factory = new InternalXtextLoggerFactory(logger);
		final org.apache.log4j.Logger internalLogger = org.apache.log4j.Logger.getLogger(
				MessageFormat.format(Messages.SarlBatchCompiler_40, logger.getName()), factory);
		setStaticField(BatchLinkableResourceStorageWritable.class, "LOG", internalLogger); //$NON-NLS-1$
		setStaticField(BatchLinkableResource.class, "log", internalLogger); //$NON-NLS-1$
		setStaticField(ProcessorInstanceForJvmTypeProvider.class, "logger", internalLogger); //$NON-NLS-1$
	}
520355
private static void applyOverrides() {
        // Get the appropriate InputStream to read overrides from, if any.
        InputStream stream = getContentTypesPropertiesStream();
        if (stream == null) {
            return;
        }

        try {
            try {
                // Read the properties file...
                Properties overrides = new Properties();
                overrides.load(stream);
                // And translate its mapping to ours...
                for (Map.Entry<Object, Object> entry : overrides.entrySet()) {
                    String extension = (String) entry.getKey();
                    String mimeType = (String) entry.getValue();
                    add(mimeType, extension);
                }
            } finally {
                stream.close();
            }
        } catch (IOException ignored) {
        }
    }
83964
def apply_tools(self, env):
        
        for t in self.tools:
            tool = SCons.Tool.Tool(t)
            if tool.exists(env):
                env.Tool(tool)
                return
504638
def tool_builder(component, key, tool_map, *args):
    """"""
    # pylint: disable=protected-access
    tool_name = component.get(key)
    if tool_name:
        tool_fn = tool_map.get(tool_name)
        if tool_fn:
            return tool_fn[0](*args)
        raise Exception("Unknown {} '{}' for {}".format(key, tool_name, component.name))
    raise MissingToolKey(key, component)
1365519
function clearToolState(element, toolType) {
  const toolStateManager = getElementToolStateManager(element);
  const toolData = toolStateManager.get(element, toolType);

  // If any toolData actually exists, clear it
  if (toolData !== undefined) {
    toolData.data = [];
  }
}
1301854
def do_region(self, x, y, w, h):
        """"""
        if (x is not None):
            raise IIIFError(code=501, parameter="region",
                            text="Null manipulator supports only region=/full/.")
769927
def _assert_executable_regions_match(workflow_enabled_regions, workflow_spec):
    
    executables = [i.get("executable") for i in workflow_spec.get("stages")]

    for exect in executables:

        if exect.startswith("applet-") and len(workflow_enabled_regions) > 1:
            raise WorkflowBuilderException("Building a global workflow with applets in more than one region is not yet supported.")

        elif exect.startswith("app-"):
            app_regional_options = dxpy.api.app_describe(exect, input_params={"fields": {"regionalOptions": True}})
            app_regions = set(app_regional_options['regionalOptions'].keys())
            if not workflow_enabled_regions.issubset(app_regions):
                additional_workflow_regions = workflow_enabled_regions - app_regions
                mesg = "The app {} is enabled in regions {} while the global workflow in {}.".format(
                    exect, ", ".join(app_regions), ", ".join(workflow_enabled_regions))
                mesg += " The workflow will not be able to run in {}.".format(", ".join(additional_workflow_regions))
                mesg += " If you are a developer of the app, you can enable the app in {} to run the workflow in that region(s).".format(
                    ", ".join(additional_workflow_regions))
                logger.warn(mesg)

        elif exect.startswith("workflow-"):
             # We recurse to check the regions of the executables of the inner workflow
            inner_workflow_spec = dxpy.api.workflow_describe(exect)
            _assert_executable_regions_match(workflow_enabled_regions, inner_workflow_spec)

        elif exect.startswith("globalworkflow-"):
            raise WorkflowBuilderException("Building a global workflow with nested global workflows is not yet supported")
766681
private void updateSkinMappingUsingTypeLocaleSkin(ResourceBrowser rsBrowser, JawrConfig config,
			Map<String, Map<String, VariantSet>> skinMapping, Set<String> skinRootDirectories) {

		String defaultSkinName = null;
		String defaultLocaleName = null;

		// Check if there are no directory which is contained in another root
		// directory
		for (Iterator<String> itRootDir = skinRootDirectories.iterator(); itRootDir.hasNext();) {
			String defaultLocaleDir = PathNormalizer.asDirPath(itRootDir.next());
			String defaultLocaleDirName = PathNormalizer.getPathName(defaultLocaleDir);
			String localeRootDir = PathNormalizer.getParentPath(defaultLocaleDir);

			String skinName = null;
			String localeName = null;

			if (!LocaleUtils.LOCALE_SUFFIXES.contains(defaultLocaleDirName)) { // The
																				// rootDir
																				// point
																				// to
																				// a
																				// skin
																				// directory
				skinName = defaultLocaleDirName;
				localeName = PathNormalizer.getPathName(localeRootDir);
				localeRootDir = PathNormalizer.getParentPath(localeRootDir);

			} else {
				localeName = defaultLocaleDirName;
			}

			if (defaultSkinName == null) {
				defaultSkinName = skinName;
			} else if (!defaultSkinName.equals(skinName)) {
				throw new BundlingProcessException(
						"The default skin for the skin root directories are not the same. Please check your configuration.");
			}

			if (defaultLocaleName == null) {
				defaultLocaleName = localeName;
			} else if (!defaultLocaleName.equals(localeName)) {
				throw new BundlingProcessException(
						"The default locale for the skin root directories are not the same. Please check your configuration.");
			}

			checkRootDirectoryNotOverlap(defaultLocaleDir, skinRootDirectories);

			Map<String, VariantSet> variantsMap = getVariants(rsBrowser, localeRootDir, skinName, localeName, false);

			skinMapping.put(localeRootDir, variantsMap);
		}

		CssSkinVariantResolver skinResolver = (CssSkinVariantResolver) config.getGeneratorRegistry()
				.getVariantResolver(JawrConstant.SKIN_VARIANT_TYPE);
		if (skinResolver == null) {
			skinResolver = new CssSkinVariantResolver(defaultSkinName, config.getSkinCookieName());
			config.getGeneratorRegistry().registerVariantResolver(skinResolver);
		} else {
			skinResolver.setDefaultSkin(defaultSkinName);
			skinResolver.setSkinCookieName(config.getSkinCookieName());
		}

	}
866778
function(regions){
    var that = this;

    var defaults = {
      regionType: Marionette.getOption(this, "regionType"),
      parentEl: function(){ return that.$el; }
    };

    return this.regionManager.addRegions(regions, defaults);
  }
213351
public void disableAllOverrides(int pathID, String clientUUID) {
        PreparedStatement statement = null;
        try (Connection sqlConnection = sqlService.getConnection()) {
            statement = sqlConnection.prepareStatement(
                "DELETE FROM " + Constants.DB_TABLE_ENABLED_OVERRIDE +
                    " WHERE " + Constants.ENABLED_OVERRIDES_PATH_ID + " = ? " +
                    " AND " + Constants.GENERIC_CLIENT_UUID + " = ? "
            );
            statement.setInt(1, pathID);
            statement.setString(2, clientUUID);
            statement.execute();
            statement.close();
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            try {
                if (statement != null) {
                    statement.close();
                }
            } catch (Exception e) {
            }
        }
    }
962209
@Override
    protected void configureFindbugsEngine() {
        addOption("-name", name);
        addOption("-timestamp", timestamp);
        addOption("-source", source);
        addOption("-findSource", findSource);
        addOption("-suppress", suppress);
        addBoolOption("-withMessages", withMessages);
        if (resetSource != null && "true".equals(resetSource)) {
            addArg("-resetSource");
        }
        addArg(inputFile);
        if (outputFile != null) {
            addArg(outputFile);
        }
    }
1079294
def _load_region(self, acct_id, region_name, path):
        """"""
        lim_path = os.path.join(path, 'limit_overrides.json')
        thresh_path = os.path.join(path, 'threshold_overrides.json')
        res = {'limit_overrides': {}, 'threshold_overrides': {}}
        if os.path.exists(lim_path):
            with open(lim_path, 'r') as fh:
                res['limit_overrides'] = json.loads(fh.read())
        if os.path.exists(thresh_path):
            with open(thresh_path, 'r') as fh:
                res['threshold_overrides'] = json.loads(fh.read())
        self._config[acct_id]['regions'][region_name] = res