Example #1
0
  static bool canFileBeReincluded (File const& f)
  {
    String content (f.loadFileAsString());

    for (;;)
    {
      content = content.trimStart();

      if (content.startsWith ("//"))
        content = content.fromFirstOccurrenceOf ("\n", false, false);
      else if (content.startsWith ("/*"))
        content = content.fromFirstOccurrenceOf ("*/", false, false);
      else
        break;
    }

    StringArray lines;
    lines.addLines (content);
    lines.trim();
    lines.removeEmptyStrings();

    const String l1 (lines[0].removeCharacters (" \t").trim());
    const String l2 (lines[1].removeCharacters (" \t").trim());

    bool result;
    if (l1.replace ("#ifndef", "#define") == l2)
      result = false;
    else
      result = true;

    return result;
  }
Example #2
0
void EdoGaduLog::actionListenerCallback (const String& message)
{
	const String command	= message.upToFirstOccurrenceOf (T(":"), false, true);
	const String data		= message.fromFirstOccurrenceOf (T(":"), false, true);

	EdoGaduMessage *m	= new EdoGaduMessage();
	
	if (command == T("MSG0"))
	{
		/* incoming message from GG to us */
		uin_t uin				= data.upToFirstOccurrenceOf (T(":"), false, true).getIntValue();
		const String message	= data.fromFirstOccurrenceOf (T(":"), false, true);

		m->body				= message;
		m->uin				= uin;
		m->type				= EDO_GG_MESSAGE_INCOMING;
	}
	else if (command == T("MSG1"))
	{
		/* outgoing message we are sending to GG */
		uin_t uin				= data.upToFirstOccurrenceOf (T(":"), false, true).getIntValue();
		const String message	= data.fromFirstOccurrenceOf (T(":"), false, true);

		m->body				= message;
		m->uin				= uin;
		m->type				= EDO_GG_MESSAGE_OUTGOING;
	}

	if (!writeMessage (m))
	{
		Logger::writeToLog (T("EdoGaduLog::writeMessage failed"));
	}

	deleteAndZero (m);
}
Example #3
0
int LoadSave::compareVersionStrings(String a, String b) {
  a.trim();
  b.trim();

  if (a.isEmpty() && b.isEmpty())
    return 0;

  String major_version_a = a.upToFirstOccurrenceOf(".", false, true);
  String major_version_b = b.upToFirstOccurrenceOf(".", false, true);

  if (!major_version_a.containsOnly("0123456789"))
    major_version_a = "0";
  if (!major_version_b.containsOnly("0123456789"))
    major_version_b = "0";

  int major_value_a = major_version_a.getIntValue();
  int major_value_b = major_version_b.getIntValue();

  if (major_value_a > major_value_b)
    return 1;
  else if (major_value_a < major_value_b)
    return -1;
  return compareVersionStrings(a.fromFirstOccurrenceOf(".", false, true),
                               b.fromFirstOccurrenceOf(".", false, true));
}
//[MiscUserCode] You can add your own definitions of your custom methods or any other code here...
void CtrlrLuaMethodEditArea::mouseDoubleClick (const MouseEvent &e)
{
	// LUA compile error: ERROR: [string "function myNewMethod()..."]:4: '=' expected near 'end'
	// Search result: SEARCH: [method]:3 position:43-46

	const String line = output->getLineAtPosition (output->getTextIndexAt (e.x, e.y)).trim();

	//_DBG(line);

	if (line.startsWithIgnoreCase("ERROR"))
	{
		const int errorInLine = line.fromFirstOccurrenceOf ("]:", false, true).getIntValue();

		if (errorInLine > 0 && owner.getCurrentEditor())
		{
			owner.getCurrentEditor()->setErrorLine(errorInLine);
		}
	}
	else if (line.startsWithIgnoreCase("Method: "))
	{
		const String methodName	= line.fromFirstOccurrenceOf ("Method: ", false, false).upToFirstOccurrenceOf("line: ", false, true).trim();
		const int errorInLine	= line.fromFirstOccurrenceOf ("line: ", false, true).getIntValue();
		const int positionStart	= line.fromFirstOccurrenceOf ("start: ", false,true).getIntValue();
		const int positionEnd	= line.fromFirstOccurrenceOf ("end: ", false,true).getIntValue();

		owner.searchResultClicked (methodName, errorInLine, positionStart, positionEnd);
	}
}
Example #5
0
void ModulatorSamplerSound::selectSoundsBasedOnRegex(const String &regexWildcard, ModulatorSampler *sampler, SelectedItemSet<ModulatorSamplerSound::Ptr> &set)
{
	bool subtractMode = false;

	bool addMode = false;

	String wildcard = regexWildcard;

	if (wildcard.startsWith("sub:"))
	{
		subtractMode = true;
		wildcard = wildcard.fromFirstOccurrenceOf("sub:", false, true);
	}
	else if (wildcard.startsWith("add:"))
	{
		addMode = true;
		wildcard = wildcard.fromFirstOccurrenceOf("add:", false, true);
	}
	else
	{
		set.deselectAll();
	}


    try
    {
		std::regex reg(wildcard.toStdString());

		ModulatorSampler::SoundIterator iter(sampler, false);

		while (auto sound = iter.getNextSound())
		{
			const String name = sound->getPropertyAsString(Property::FileName);

			if (std::regex_search(name.toStdString(), reg))
			{
				if (subtractMode)
				{
					set.deselect(sound.get());
				}
				else
				{
					set.addToSelection(sound.get());
				}
			}
		}
	}
	catch (std::regex_error e)
	{
		debugError(sampler, e.what());
	}
}
Example #6
0
    void paintListBoxItem (int rowNumber, Graphics& g, int width, int height, bool rowIsSelected) override
    {
        if (rowIsSelected)
            g.fillAll (Colours::deepskyblue);

        if (JuceDemoTypeBase* type = JuceDemoTypeBase::getDemoTypeList() [rowNumber])
        {
            String name (type->name.trimCharactersAtStart ("0123456789").trimStart());

            AttributedString a;
            a.setJustification (Justification::centredLeft);

            String category;

            if (name.containsChar (':'))
            {
                category = name.upToFirstOccurrenceOf (":", true, false);
                name = name.fromFirstOccurrenceOf (":", false, false).trim();

                if (height > 20)
                    category << "\n";
                else
                    category << " ";
            }

            if (category.isNotEmpty())
                a.append (category, Font (10.0f), Colour::greyLevel (0.5f));

            a.append (name, Font (13.0f), Colours::white.withAlpha (0.9f));

            a.draw (g, Rectangle<int> (width + 10, height).reduced (6, 0).toFloat());
        }
    }
Example #7
0
//==============================================================================
void DescriptorTreeView::actionListenerCallback(const String &msg)
{
	if (msg.startsWith("diag"))
	{
	    notesText->setText(msg.fromFirstOccurrenceOf(msg, false, true));
	}
}
Example #8
0
void JucerDocument::setParentClasses (const String& classes)
{
    if (classes != parentClasses)
    {
        StringArray parentClassLines (getCleanedStringArray (StringArray::fromTokens (classes, ",", StringRef())));

        for (int i = parentClassLines.size(); --i >= 0;)
        {
            String s (parentClassLines[i]);
            String type;

            if (s.startsWith ("public ")
                || s.startsWith ("protected ")
                || s.startsWith ("private "))
            {
                type = s.upToFirstOccurrenceOf (" ", true, false);
                s = s.fromFirstOccurrenceOf (" ", false, false);

                if (s.trim().isEmpty())
                    type = s = String::empty;
            }

            s = type + CodeHelpers::makeValidIdentifier (s.trim(), false, false, true);

            parentClassLines.set (i, s);
        }

        parentClasses = parentClassLines.joinIntoString (", ");
        changed();
    }
}
Example #9
0
const Point<int> pointFromString(const String &pointState)
{
	Point<int> p;
	p.setX(pointState.upToFirstOccurrenceOf (",", false,false).trim().getIntValue());
	p.setY(pointState.fromFirstOccurrenceOf (",", false,false).trim().getIntValue());
	return (p);
}
Example #10
0
static void findAllFilesIncludedIn (const File& hppTemplate, StringArray& alreadyIncludedFiles)
{
    StringArray lines;
    lines.addLines (hppTemplate.loadFileAsString());

    for (int i = 0; i < lines.size(); ++i)
    {
        String line (lines[i]);

        if (line.removeCharacters (" \t").startsWithIgnoreCase ("#include\""))
        {
            const String filename (line.fromFirstOccurrenceOf ("\"", false, false)
                                       .upToLastOccurrenceOf ("\"", false, false));
            const File targetFile (hppTemplate.getSiblingFile (filename));

            if (! alreadyIncludedFiles.contains (targetFile.getFullPathName()))
            {
                alreadyIncludedFiles.add (targetFile.getFullPathName());

                if (targetFile.getFileName().containsIgnoreCase ("juce_") && targetFile.exists())
                    findAllFilesIncludedIn (targetFile, alreadyIncludedFiles);
            }
        }
    }
}
Example #11
0
void XmlDocument::skipHeader()
{
    const int headerStart = input.indexOf (CharPointer_UTF8 ("<?xml"));

    if (headerStart >= 0)
    {
        const int headerEnd = (input + headerStart).indexOf (CharPointer_UTF8 ("?>"));
        if (headerEnd < 0)
            return;

       #if JUCE_DEBUG
        const String header (input + headerStart, (size_t) (headerEnd - headerStart));
        const String encoding (header.fromFirstOccurrenceOf ("encoding", false, true)
                                     .fromFirstOccurrenceOf ("=", false, false)
                                     .fromFirstOccurrenceOf ("\"", false, false)
                                     .upToFirstOccurrenceOf ("\"", false, false).trim());

        /* If you load an XML document with a non-UTF encoding type, it may have been
           loaded wrongly.. Since all the files are read via the normal juce file streams,
           they're treated as UTF-8, so by the time it gets to the parser, the encoding will
           have been lost. Best plan is to stick to utf-8 or if you have specific files to
           read, use your own code to convert them to a unicode String, and pass that to the
           XML parser.
        */
        jassert (encoding.isEmpty() || encoding.startsWithIgnoreCase ("utf-"));
       #endif

        input += headerEnd + 2;
    }

    skipNextWhiteSpace();

    const int docTypeIndex = input.indexOf (CharPointer_UTF8 ("<!DOCTYPE"));
    if (docTypeIndex < 0)
        return;

    input += docTypeIndex + 9;
    const String::CharPointerType docType (input);

    int n = 1;

    while (n > 0)
    {
        const juce_wchar c = readNextChar();

        if (outOfData)
            return;

        if (c == '<')
            ++n;
        else if (c == '>')
            --n;
    }

    dtdText = String (docType, (size_t) (input.getAddress() - (docType.getAddress() + 1))).trim();
}
Example #12
0
 /** this will validate playlist message for server
     @param[in]  message                 message string
     @param[in]  playListInString        playListInString string
     @return     bool                    true if playList message is valid */
 bool isPlayListMessage(const String & message, String & playListInString)
 {
     if(message.contains(playListMessageID))
     {
         playListInString = message.fromFirstOccurrenceOf(messageSeparator, false, false);
         return true;
     }
     else
         return false;
 }
Example #13
0
 /** this will validate denyLock message for server
     @param[in]  message                 message string
     @param[out] clientName              Name of client to show over tooltip of locked button
     @return     bool                    true if denyLock message */
 bool isServerIsLockedMessage(const String & message, String & clientName)
 {
     if(message.contains(serverIsLockedID))
     {
         clientName = message.fromFirstOccurrenceOf(messageSeparator, false, false);
         return true;
     }
     else
         return false;
 }
Example #14
0
 /** this will validate playAfterPause message
     @param[in]  message         message string
     @param[in]  index           Song's index that will be played
     @return     bool            true if playAfterPause message */
 bool isPlayAfterPauseMessage(const String & message, String & index)
 {
     if(message.contains(playAfterPauseMessageID))
     {
         index = message.fromFirstOccurrenceOf(messageSeparator, false, false);
         return true;
     }
     else
         return false;
 }
Example #15
0
 /** this will validate playAfterStop message
     @param[in]  message         message string
     @param[in]  indexList       No of rows that are delete from mediaArray
     @return     bool            true if playAfterStop message */
 bool isDeleteInPlayList(const String & message, Array<int> & indexList)
 {
     String tempMessage = message;
     if(tempMessage.contains(deleteInPlayListID))
     {
         // SOme logic needed here to convert String to Array
         tempMessage = tempMessage.fromFirstOccurrenceOf(messageSeparator, false, false);
         String index;
         while(tempMessage != "")
         {
             index = tempMessage.upToFirstOccurrenceOf(messageSeparator, false, false);
             tempMessage = tempMessage.fromFirstOccurrenceOf(messageSeparator, false, false);
             indexList.add(index.getIntValue());
         }
         return true;
     }
     else
         return false;
 }
Example #16
0
 /** this will validate playAfterStop message
     @param[in]  message         message string
     @param[in]  playList        PlayList as xmlElement
     @return     bool            true if playAfterStop message */
 bool isAddInPlayList(const String & message, String & playList)
 {
     if(message.contains(addInPlayListID))
     {
         playList = message.fromFirstOccurrenceOf(messageSeparator, false, false);
         return true;
     }
     else
         return false;
 }
Example #17
0
 /** this will validate client's no access message
     @param[in]  message         message string
     @param[in]  errorMessage    errorMessage string
     @return     bool            true if client has no access message*/
 bool isNoAccessMessage(const String & message, String & errorMessage)
 {
     if(message.contains(noAccessMessageID))
     {
         errorMessage = message.fromFirstOccurrenceOf(messageSeparator, false, false);
         return true;
     }
     else
         return false;
 }
Example #18
0
 /** this will validate connection time client name
     @param[in]  message     message string
     @param[in]  name        name string
     @return     bool        true if connection time client name is valid */
 bool isConnectTimeName(const String & message, String & name)
 {
     if(message.contains(connectTimeNameID))
     {
         name = message.fromFirstOccurrenceOf(messageSeparator, false, false);
         return true;
     }
     else
         return false;
 }
Example #19
0
//==============================================================================
KeyPress KeyPress::createFromDescription (const String& desc)
{
    int modifiers = 0;

    for (int i = 0; i < numElementsInArray (KeyPressHelpers::modifierNames); ++i)
        if (desc.containsWholeWordIgnoreCase (KeyPressHelpers::modifierNames[i].name))
            modifiers |= KeyPressHelpers::modifierNames[i].flag;

    int key = 0;

    for (int i = 0; i < numElementsInArray (KeyPressHelpers::translations); ++i)
    {
        if (desc.containsWholeWordIgnoreCase (String (KeyPressHelpers::translations[i].name)))
        {
            key = KeyPressHelpers::translations[i].code;
            break;
        }
    }

    if (key == 0)
        key = KeyPressHelpers::getNumpadKeyCode (desc);

    if (key == 0)
    {
        // see if it's a function key..
        if (! desc.containsChar ('#')) // avoid mistaking hex-codes like "#f1"
        {
            for (int i = 1; i <= 35; ++i)
            {
                if (desc.containsWholeWordIgnoreCase ("f" + String (i)))
                {
                    if (i <= 16)        key = F1Key + i - 1;
                    else if (i <= 24)   key = F17Key + i - 17;
                    else if (i <= 35)   key = F25Key + i - 25;
                }
            }
        }

        if (key == 0)
        {
            // give up and use the hex code..
            auto hexCode = desc.fromFirstOccurrenceOf ("#", false, false)
                               .retainCharacters ("0123456789abcdefABCDEF")
                               .getHexValue32();

            if (hexCode > 0)
                key = hexCode;
            else
                key = (int) CharacterFunctions::toUpperCase (desc.getLastCharacter());
        }
    }

    return KeyPress (key, ModifierKeys (modifiers), 0);
}
Example #20
0
 /** this will validate playlist message for server
     @param[in]  message                 message string
     @param[out] dragPlayListInString	dragPlayListInString string
 	@param[out] dropPlayListInString	dropPlayListInString string
     @return     bool                    true if playList message is valid */
 bool isdragDropPlayListMessage(const String & message, String & dragPlayListInString, String & dropPlayListInString)
 {
     if(message.contains(dragDropInPlayListID))
     {
         dragPlayListInString = message.fromFirstOccurrenceOf (messageSeparator, false, false);
         dragPlayListInString = dragPlayListInString.upToFirstOccurrenceOf (messageSeparator, false, false);
         dropPlayListInString = message.fromLastOccurrenceOf (messageSeparator, false, false);
         return true;
     }
     else
         return false;
 }
Example #21
0
 /** this will validate playAfterStop message
     @param[in]  message         message string
     @param[in]  playList        PlayList as xmlElement
     @return     bool            true if playAfterStop message */
 bool isDropInPlayList(const String & message, String & playList, String & insertionIndex)
 {
     String tempString;
     if(message.contains(dropInPlayListID))
     {
         tempString = message.fromFirstOccurrenceOf(messageSeparator, false, false);
         playList = tempString.upToFirstOccurrenceOf (messageSeparator, false, false);
         insertionIndex = tempString.fromLastOccurrenceOf (messageSeparator, false, false);
         return true;
     }
     else
         return false;
 }
Example #22
0
RSAKey::RSAKey (const String& s)
{
    if (s.containsChar (','))
    {
        part1.parseString (s.upToFirstOccurrenceOf (",", false, false), 16);
        part2.parseString (s.fromFirstOccurrenceOf (",", false, false), 16);
    }
    else
    {
        // the string needs to be two hex numbers, comma-separated..
        jassertfalse;
    }
}
Example #23
0
void WdmChMapComponent::itemDropped (const SourceDetails& dragSourceDetails)
{
	// an example valid drag sourceDescription is:
	//  WDM 2 (Front Right)
	//	 where the number indicates the item's 1-based index
	int map_src_index = dragSourceDetails.description.toString().substring(4,6).getIntValue() - 1;  // convert to zero-based

	if ((map_src_index < 0) || (map_src_index > 15))
	{
		m_dragging = false;
		return;
	}

	// a drop here means we're unmapping a channel
	if (m_bus)
	{
		Component *sourceComp = dragSourceDetails.sourceComponent;
		String sourceName = sourceComp->getName();
		if (sourceName.contains("clist"))
		{
			String rowName = sourceName.fromFirstOccurrenceOf("clist ", false, false);

			try
			{
				m_bus->speaker_map(m_out, (uint32)map_src_index, (uint32)-1);
				m_bus->ready_wait();

				int row_num = rowName.getIntValue();
				if (m_out)
				{
					m_out_map_names.set(row_num, " -");
				}
				else
				{
					m_out_map_names.set(row_num, " -");
				}

				String eventStr = String::empty;
				eventStr << "unmapped wdm " << (m_out ? "out" : "in") << " ch " << map_src_index << ", dev ch " << row_num << " (zero-based)";
				EventLogger::getInstance()->logMessage(eventStr);

				update_speaker_map(0,0);	// update the channel list asynchronously
			}
			catch (...)
			{
				EventLogger::getInstance()->logMessage("ch unmap exception");
			}
		}
	}	
	m_dragging = false;
}
//[MiscUserCode] You can add your own definitions of your custom methods or any other code here...
void CtrlrLuaMethodDebuggerPrompt::insertRawDebuggerOutput(const String &output)
{
    insertToOutput (output);

    if (output.contains("Paused at file"))
    {
        /* Debugger tells us we paused at some location in the code
            get the method name, and highlight the relevant code in
            the editor
        */
        const String file = output.fromFirstOccurrenceOf("Paused at file ", false, true).upToFirstOccurrenceOf(" ", false, true);
        const int line = output.fromFirstOccurrenceOf(" line ", false, true).getIntValue();

        owner.highlightCode (file, line);
    }

    if (output.contains ("::start trace"))
    {
        collectedData = String::empty;
        collectionState = Trace;
        return;
    }

    if (output.contains ("::start dumpvar"))
    {
        collectedData = String::empty;
        collectionState = Values;
        return;
    }

    if (output.contains("::end"))
    {
        finishDataCollection();
    }

    if (collectionState != Ended)
        collectedData << output;
}
String MDLHelper::removeUnbalancedParentheses(const String& s)
{
    String result;

    auto countStr = [&](const String& stringToCount)
    {
        int count = 0;
        int startIndex = 0;
        while (startIndex != -1)
        {
            startIndex = s.indexOf(startIndex, stringToCount);
            if (startIndex >= 0)
            {
                ++count;
                ++startIndex;
            }
        }
        return count;
    };

    std::pair<int, int> numPars(countStr("("), countStr(")"));

    if (numPars.first != numPars.second)
    {
        if (numPars.first > numPars.second)
        {
            int diff = numPars.first - numPars.second;
            for (int i = 0; i < diff; ++i)
            {
                result = s.fromFirstOccurrenceOf("(", false, false);
            }
        }
        else
        {
            int diff = numPars.second - numPars.first;
            for (int i = 0; i < diff; ++i)
            {
                result = s.upToLastOccurrenceOf(")", false, false);
            }
        }
    }
    else
    {
        result = s;
    }

    return result;
}
Example #26
0
void CodeEditor::changeListenerCallback (ChangeBroadcaster* source)
{
  if (source == &graphEditor)
  {
//    if (selectedFaustAudioPluginInstance != nullptr)
//    {
//      selectedFaustAudioPluginInstance->setSourceCode(codeDocument.getAllContent(), false);
//    }
    
    if(graphEditor.getLassoSelection().getNumSelected() == 1)
    {
      FilterComponent* selectedItem = dynamic_cast<FilterComponent*>(graphEditor.getLassoSelection().getSelectedItem(0));
      
      if (selectedItem)
      {
        selectedNodeID = selectedItem->nodeId;
        FaustAudioPluginInstance* faustProc = dynamic_cast<FaustAudioPluginInstance*>(audioEngine.getDoc().getNodeForId(selectedNodeID)->getProcessor());
        
        if (faustProc)
        {
          selectedFaustAudioPluginInstance = faustProc;
          
          if (!selectedFaustAudioPluginInstance->getHighlight())
          {
            selectedFaustAudioPluginInstance->getFactory()->startSVGThread();
          }
          else
          {
            String error = selectedFaustAudioPluginInstance->getCompilerMessage();
            
            String lineNo = error.fromFirstOccurrenceOf(": ", false, true).upToFirstOccurrenceOf(" :", false, true);
            
            graphEditor.getComponentForFilter(selectedNodeID)->bubbleMessage(error);
            
            //editor->setHighlightedRegion(<#const Range<int> &newRange#>);
          }
          
          editor->loadContent(selectedFaustAudioPluginInstance->getSourceCode());
          editor->setInterceptsMouseClicks(true, true);

          return;
        }
      }
    }
  }
  
  clear();
}
Example #27
0
Font Font::fromString (const String& fontDescription)
{
    const int separator = fontDescription.indexOfChar (';');
    String name;

    if (separator > 0)
        name = fontDescription.substring (0, separator).trim();

    if (name.isEmpty())
        name = getDefaultSansSerifFontName();

    String sizeAndStyle (fontDescription.substring (separator + 1));

    float height = sizeAndStyle.getFloatValue();
    if (height <= 0)
        height = 10.0f;

    const String style (sizeAndStyle.fromFirstOccurrenceOf (" ", false, false));

    return Font (name, style, height);
}
bool ChildProcessSlave::initialiseFromCommandLine (const String& commandLine,
                                                   const String& commandLineUniqueID)
{
    String prefix (getCommandLinePrefix (commandLineUniqueID));

    if (commandLine.trim().startsWith (prefix))
    {
        String pipeName (commandLine.fromFirstOccurrenceOf (prefix, false, false)
                                    .upToFirstOccurrenceOf (" ", false, false).trim());

        if (pipeName.isNotEmpty())
        {
            connection = new Connection (*this, pipeName);

            if (! connection->isConnected())
                connection = nullptr;
        }
    }

    return connection != nullptr;
}
bool ChildProcessSlave::initialiseFromCommandLine (const String& commandLine,
                                                   const String& commandLineUniqueID,
                                                   int timeoutMs)
{
    auto prefix = getCommandLinePrefix (commandLineUniqueID);

    if (commandLine.trim().startsWith (prefix))
    {
        auto pipeName = commandLine.fromFirstOccurrenceOf (prefix, false, false)
                                   .upToFirstOccurrenceOf (" ", false, false).trim();

        if (pipeName.isNotEmpty())
        {
            connection.reset (new Connection (*this, pipeName, timeoutMs <= 0 ? defaultTimeoutMs : timeoutMs));

            if (! connection->isConnected())
                connection.reset();
        }
    }

    return connection != nullptr;
}
Example #30
0
void LibraryModule::getConfigFlags (Project& project, OwnedArray<Project::ConfigFlag>& flags) const
{
    const File header (getModuleHeaderFile (moduleInfo.getFolder()));
    jassert (header.exists());

    StringArray lines;
    header.readLines (lines);

    for (int i = 0; i < lines.size(); ++i)
    {
        String line (lines[i].trim());

        if (line.startsWith ("/**") && line.containsIgnoreCase ("Config:"))
        {
            ScopedPointer <Project::ConfigFlag> config (new Project::ConfigFlag());
            config->sourceModuleID = getID();
            config->symbol = line.fromFirstOccurrenceOf (":", false, false).trim();

            if (config->symbol.length() > 2)
            {
                ++i;

                while (! (lines[i].contains ("*/") || lines[i].contains ("@see")))
                {
                    if (lines[i].trim().isNotEmpty())
                        config->description = config->description.trim() + " " + lines[i].trim();

                    ++i;
                }

                config->description = config->description.upToFirstOccurrenceOf ("*/", false, false);
                config->value.referTo (project.getConfigFlag (config->symbol));
                flags.add (config.release());
            }
        }
    }
}