TODO: ledav reimplement these to adhere to Finder interfaces
488800
public NumericAttribute plus(com.gs.fw.finder.attribute.NumericAttribute attribute)
    {
        return MappedAttributeUtil.plus(this, (NumericAttribute) attribute);
    }
956486
function addAvailableComponents(req, res, next) {
  res.locals.components = files.getComponents();
  next();
}
853110
function addInvisibles(grammar) {
		if (!grammar || grammar['tab']) {
			return;
		}

		// assign invisibles here to "mark" the grammar in case of self references
		for (var name in invisibles) {
			if (invisibles.hasOwnProperty(name)) {
				grammar[name] = invisibles[name];
			}
		}

		for (var name in grammar) {
			if (grammar.hasOwnProperty(name) && !invisibles[name]) {
				if (name === 'rest') {
					addInvisibles(grammar['rest']);
				} else {
					handleToken(grammar, name);
				}
			}
		}
	}
997249
function populateInterfacesList(intfs) {
    e_interfaceList.innerHTML = ""

    fixedIntfs = []
    intfs.forEach(function(intf){
        fixedIntfs.push(intf.name)
        Interfaces[intf.name] = intf

        if (!intf.methods)    intf.methods    = []
        if (!intf.attributes) intf.attributes = []
    })

    intfs = fixedIntfs

    intfs.sort()
    intfs.forEach(function(intf){
        var a  = document.createElement("a")
        a.href          = "#"
        a.innerHTML     = intf
        a.interfaceName = intf
        a.addEventListener("click", el_interfaceClicked, false)

        var li = document.createElement("li")
        li.appendChild(a)
        e_interfaceList.appendChild(li)
    })
}
323270
private void initComponents() {
        // Avoid warning on Mac OS X when changing the alpha
        getRootPane().putClientProperty("apple.awt.draggableWindowBackground", Boolean.FALSE);

        toolTip = new JToolTip();
        toolTip.addMouseListener(new TransparencyAdapter());

        owner.addComponentListener(locationAdapter);
        owner.addAncestorListener(locationAdapter);

        getRootPane().setWindowDecorationStyle(JRootPane.NONE); // Just in case...
        setFocusable(false); // Just in case...
        setFocusableWindowState(false);
        setContentPane(toolTip);
        pack(); // Seems to help for the very first setVisible(true) when window transparency is on
    }
235025
private static Map<String, ModelDescription> assigneModelsToViews(Map<ModelDescription, 
            XLinkConnectorView[]> modelsToViews) {
        HashMap<String, ModelDescription> viewsToModels = new HashMap<String, ModelDescription>();
        for (ModelDescription modelInfo : modelsToViews.keySet()) {
            List<XLinkConnectorView> currentViewList = Arrays.asList(modelsToViews.get(modelInfo));
            for (XLinkConnectorView view : currentViewList) {
                if (!viewsToModels.containsKey(view.getViewId())) {
                    viewsToModels.put(view.getViewId(), modelInfo);
                }
            }
        }
        return viewsToModels;
    }
665269
function getComponentMapping( name, files ) {
		grunt.verbose.writeln( 'BowerMap::getComponentMapping - ' + name );


		//first get list of all files
		var fileList = [];
		if ( shim[ name ] !== undefined ) {
			grunt.verbose.writeln( '    using shim value' );
			//use shim value
			fileList = fileList.concat( shim[ name ] );
		}
		else {
			grunt.verbose.writeln( '    using result value - ' + files );
			//make sure files is an array
			if (typeof files === 'string'){
				files = [files];
			}
			//we just need the path relative to the module directory
			files.forEach( function( file ){
				file = path.fix( file );
				fileList.push( file.replace( path.fix( path.join( bowerPath, name ) ) , "" ) );
			});
		}

		//expand list
		var expandedList = [];
		fileList.forEach( function( file ){
			grunt.verbose.writeln( '      globbing - ' + path.join( name, file ) );
			glob.sync( path.join( name, file ), { cwd: bowerPath, dot: true } ).forEach( function( filename ) {
				var src = path.fix( path.join( bowerPath, filename ) );
				grunt.verbose.writeln( 'src      ' + src );
				expandedList.push( src );
			});
		});

		//filter filetypes
		expandedList = expandedList.filter( function( file ){
			var ext = path.extname( file ).substr(1);
			if ( extensions ){
				return extensions.indexOf( ext ) >= 0;
			}
			else{
				return true;
			}
		});


		//get common path for building destination
		var commonPath = maintainCommonPaths ? "" : getCommonPathBase( expandedList );
		grunt.verbose.writeln( '   common path: ' + commonPath );


		//build default mapping
		var componentMap = {};
		grunt.verbose.writeln( '   mapping files:' );
		expandedList.forEach( function( file ){

			if ( expandedMap[ file ] !== undefined ) {
				//use user configured mapping if set
				componentMap[ file ] = expandedMap[ file ];
				grunt.log.writeln( '  * '+file+' -> '+ expandedMap[ file ] );
			}
			else {
				var newFilename = commonPath === "" ? file : file.replace( commonPath, "" );
				//console.log('      newfileName:',newFilename);
				var dest = path.join( destPath, newFilename );
				//console.log('      dest:',dest);

				if ( useNamespace === true || ( useNamespace === undefined && expandedList.length > 1 ) ){
					dest = dest.replace( destPath, path.join( destPath, name ) );
				}
				componentMap[ file ] = dest;
				grunt.log.writeln( '    '+file+' -> '+ dest );

			}

		});

		return componentMap;

	}
1075184
function prettifyDiffObj(diff) {
    const obj = {
        kind: undefined,
        path: undefined,
        expect: undefined,
        actual: undefined,
        index: undefined,
        item: undefined,
    };
    if (diff.kind) {
        switch (diff.kind) {
            case 'N':
                obj.kind = 'New';
                break;
            case 'D':
                obj.kind = 'Missing';
                break;
            case 'E':
                obj.kind = 'Changed';
                break;
            case 'A':
                obj.kind = 'Array Canged';
                break;
        }
    }
    if (diff.path) {
        let path = diff.path[0];
        for (let i = 1; i < diff.path.length; i++) {
            path += `/${diff.path[i]}`;
        }
        obj.path = path;
    }
    if (typeof diff.lhs !== 'undefined') {
        obj.expect = diff.lhs;
    }
    if (typeof diff.rhs !== 'undefined') {
        obj.actual = diff.rhs;
    }
    if (diff.index) {
        obj.index = diff.index;
    }
    if (diff.item) {
        obj.item = prettifyDiffObj(diff.item);
    }
    return obj;
}
998592
def __setupDockWidgets(self):
        
        #self.dockWidget(self.currentInspectorPane, "Current Inspector", Qt.LeftDockWidgetArea)

        self.inspectorSelectionPane = InspectorSelectionPane(self.execInspectorDialogAction,
                                                             self.inspectorActionGroup)
        self.sigInspectorChanged.connect(self.inspectorSelectionPane.updateFromInspectorRegItem)
        self.dockWidget(self.inspectorSelectionPane, "Current Inspector",
                        area=Qt.LeftDockWidgetArea)

        self.dockWidget(self.repoWidget, "Data Repository", Qt.LeftDockWidgetArea)
        self.dockWidget(self.collector, "Data Collector", Qt.TopDockWidgetArea)
        # TODO: if the title == "Settings" it won't be added to the view menu.
        self.dockWidget(self.configWidget, "Application Settings", Qt.RightDockWidgetArea)

        self.viewMenu.addSeparator()

        propertiesPane = PropertiesPane(self.repoWidget.repoTreeView)
        self.dockDetailPane(propertiesPane, area=Qt.LeftDockWidgetArea)

        attributesPane = AttributesPane(self.repoWidget.repoTreeView)
        self.dockDetailPane(attributesPane, area=Qt.LeftDockWidgetArea)

        dimensionsPane = DimensionsPane(self.repoWidget.repoTreeView)
        self.dockDetailPane(dimensionsPane, area=Qt.LeftDockWidgetArea)

        # Add am extra separator on mac because OS-X adds an 'Enter Full Screen' item
        if sys.platform.startswith('darwin'):
            self.viewMenu.addSeparator()
541751
function applyViewWrappers({reactElement, initialProps, viewWrappers=[]}) {
    viewWrappers
    .forEach(viewWrapper => {
        reactElement = viewWrapper(reactElement, initialProps);
    });
    return reactElement;
}
1265160
function walker (patterns = [], ignorePatterns = []) {
  const baseDir = getBaseDir()

  return globby(patterns, {
    cwd: baseDir,
    gitignore: true,
    ignore: ignorePatterns,
    dot: true,
    onlyFiles: true,
    absolute: false
  })
}
1054424
function(files, mode) {
				var place    = list ? cwd.find('tbody') : cwd,
					l        = files.length, 
					atmb     = {},
					findNode = function(file) {
						var pointer = cwd.find('[id]:first'), file2;

						while (pointer.length) {
							file2 = fm.file(fm.cwdId2Hash(pointer.attr('id')));
							if (!pointer.hasClass('elfinder-cwd-parent') && file2 && fm.compare(file, file2) < 0) {
								return pointer;
							}
							pointer = pointer.next('[id]');
						}
					},
					findIndex = function(file) {
						var l = buffer.length, i;
						
						for (i =0; i < l; i++) {
							if (fm.compare(file, buffer[i]) < 0) {
								return i;
							}
						}
						return l || -1;
					},
					// created document fragment for jQuery >= 1.12, 2.2, 3.0
					// see Studio-42/elFinder#1544 @ github
					docFlag = $.htmlPrefilter? true : false,
					tempDom = docFlag? $(document.createDocumentFragment()) : $('<div/>'),
					file, hash, node, nodes, ndx;

				if (l > showFiles) {
					// re-render for performance tune
					content();
					selectedFiles = fm.arrayFlip($.map(files, function(f) { return f.hash; }), true);
					trigger();
				} else {
					// add the item immediately
					l && wz.removeClass('elfinder-cwd-wrapper-empty');
					
					while (l--) {
						file = files[l];
						hash = file.hash;
						
						if ($('#'+fm.cwdHash2Id(hash)).length) {
							continue;
						}
						
						if ((node = findNode(file)) && ! node.length) {
							node = null;
						}
						if (! node && (ndx = findIndex(file)) >= 0) {
							buffer.splice(ndx, 0, file);
						} else {
							tempDom.empty().append(itemhtml(file));
							(file.mime === 'directory') && !mobile && makeDroppable(tempDom);
							nodes = docFlag? tempDom : tempDom.children();
							if (node) {
								node.before(nodes);
							} else {
								place.append(nodes);
							}
						}
						
						if ($('#'+fm.cwdHash2Id(hash)).length) {
							if (file.tmb) {
								atmb[hash] = file.tmb;
							}
						}
					}
	
					if (list) {
						setColwidth();
						fixTableHeader({fitWidth: ! colWidth});
					}
					bottomMarkerShow(place);
					if (Object.keys(atmb).length) {
						Object.assign(bufferExt.attachTmbs, atmb);
					}
				}
			}
57459
function setupBundler(cwd, entryPoints, flags, noWatchify, ready) {
  noWatchify ?
    onlocalwatchify() :
    resolve('watchify', {basedir: cwd}, onlocalwatchify)

  function onlocalwatchify(err, localDir) {
    if(err || !localDir) {
      return resolve('browserify', {basedir: cwd}, onlocalbrowserify)
    }

    setupWatchify(path.dirname(localDir), entryPoints, flags, ready)
  }

  function onlocalbrowserify(err, localDir) {
    if(err || !localDir) {
      return findGlobals(onglobals)
    }

    setupBrowserify(path.dirname(localDir), entryPoints, flags, ready)
  }

  function onglobals(err, dirs) {
    if(err) {
      return ready(err)
    }

    dirs = dirs.sort()

    for(var i = 0, len = dirs.length; i < len; ++i) {
      if(!noWatchify && path.basename(dirs[i]) === 'watchify') {
        return setupWatchify(dirs[i], entryPoints, flags, ready)
      }

      if(path.basename(dirs[i]) === 'browserify') {
        return setupBrowserify(dirs[i], entryPoints, flags, ready)
      }
    }

    return ready(new Error('Could not find a suitable bundler!'))
  }
}
906528
function(e, ui) {
			var dst     = $(this),
				targets = $.grep(ui.helper.data('files')||[], function(h) { return h? true : false; }),
				result  = [],
				dups    = [],
				faults  = [],
				isCopy  = ui.helper.hasClass('elfinder-drag-helper-plus'),
				c       = 'class',
				cnt, hash, i, h;
			
			if (typeof e.button === 'undefined' || ui.helper.data('namespace') !== namespace || ! self.insideWorkzone(e.pageX, e.pageY)) {
				return false;
			}
			if (dst.hasClass(self.res(c, 'cwdfile'))) {
				hash = self.cwdId2Hash(dst.attr('id'));
			} else if (dst.hasClass(self.res(c, 'navdir'))) {
				hash = self.navId2Hash(dst.attr('id'));
			} else {
				hash = cwd;
			}

			cnt = targets.length;
			
			while (cnt--) {
				h = targets[cnt];
				// ignore drop into itself or in own location
				if (h != hash && files[h].phash != hash) {
					result.push(h);
				} else {
					((isCopy && h !== hash && files[hash].write)? dups : faults).push(h);
				}
			}
			
			if (faults.length) {
				return false;
			}
			
			ui.helper.data('droped', true);
			
			if (dups.length) {
				ui.helper.hide();
				self.exec('duplicate', dups, {_userAction: true});
			}
			
			if (result.length) {
				ui.helper.hide();
				self.clipboard(result, !isCopy);
				self.exec('paste', hash, {_userAction: true}, hash).always(function(){
					self.clipboard([]);
					self.trigger('unlockfiles', {files : targets});
				});
				self.trigger('drop', {files : targets});
			}
		}
471178
async function collecticonsBundle (params) {
  const {
    dirPath,
    destFile
  } = params;

  await validateDirPath(dirPath);

  const resultFiles = await collecticonsCompile({
    dirPath,
    styleFormats: ['css'],
    styleDest: './styles',
    fontDest: './',
    fontTypes: ['woff', 'woff2'],
    previewDest: './',
    noFileOutput: true
  });

  if (resultFiles === null) return;

  // Create zip.
  let zip = new JSZip();

  // Add generated files.
  resultFiles.forEach(file => {
    zip.file(file.path, file.contents);
  });

  // Add the icons.
  const dir = await fs.readdir(dirPath);
  const svgs = await Promise.all(dir.map(async file => {
    return file.endsWith('.svg')
      ? (
        {
          path: `icons/${file}`,
          contents: await fs.readFile(path.resolve(dirPath, file))
        }
      )
      : null;
  }));

  svgs.forEach(file => {
    zip.file(file.path, file.contents);
  });

  await fs.ensureDir(path.dirname(destFile));
  await fs.writeFile(destFile, zip.generate({ base64: false, compression: 'DEFLATE' }), 'binary');
}
202982
protected void highlightFeature(IHighlightedPositionAcceptor acceptor, EObject object, EStructuralFeature feature,
			String... styleIds) {
		List<INode> children = NodeModelUtils.findNodesForFeature(object, feature);
		if (children.size() > 0)
			highlightNode(acceptor, children.get(0), styleIds);
	}
238806
function resolveMiddlewareWrapper(resolve = defaultResolveFn, directives = {}) {
  const serverDirectives = parseSchemaDirectives(directives);

  return (source, args, context, info) => {
    const directives = serverDirectives.concat(
      (info.fieldASTs || info.fieldNodes)[0].directives,
    );
    const directive = directives.filter(
      d => DEFAULT_DIRECTIVES.indexOf(d.name.value) === -1,
    )[0];

    if (!directive) {
      return resolve(source, args, context, info);
    }

    let defer = resolveWithDirective(
      () => Promise.resolve(resolve(source, args, context, info)),
      source,
      directive,
      context,
      info,
    );
    defer.catch(e =>
      resolveWithDirective(
        /* istanbul ignore next */
        () => Promise.reject(e),
        source,
        directive,
        context,
        info,
      ),
    );

    if (directives.length <= 1) {
      return defer;
    }

    for (let directiveNext of directives.slice(1)) {
      defer = defer.then(result =>
        resolveWithDirective(
          () => Promise.resolve(result),
          source,
          directiveNext,
          context,
          info,
        ),
      );
      defer.catch(e =>
        resolveWithDirective(
          () => Promise.reject(e),
          source,
          directiveNext,
          context,
          info,
        ),
      );
    }

    return defer;
  };
}