From kde-commits Fri Sep 05 13:25:37 2003 From: Amilcar do Carmo Lucas Date: Fri, 05 Sep 2003 13:25:37 +0000 To: kde-commits Subject: kdevelop/parts/javasupport X-MARC-Message: https://marc.info/?l=kde-commits&m=106276838007862 CVS commit by aclu: Java parser spends a lot of cpu cycles trying to parse non-java source files. I noticed that if I try to edit a non java file, while a java project is open, gideon starts to eat cpu cycles. This is a ugly hack to solve it. Patch by: ( gp AT iws.it) CCMAIL: roberto@kdevelop.org CCMAIL: 61317-done@bugs.kde.org M +6 -1 problemreporter.cpp 1.13 --- kdevelop/parts/javasupport/problemreporter.cpp #1.12:1.13 @@ -181,9 +181,14 @@ void ProblemReporter::reparse() return; + // @todo: use the project database to decide which files to parse instead of this! + // ugly hack: do not parse non .java ending files + if ( !m_fileName.endsWith(".java") ) + return; + m_timer->stop(); kdDebug(9013) << "ProblemReporter::reparse()" << endl; m_javaSupport->backgroundParser()->addFile( m_fileName ); - kdDebug(9013) << "---> file added" << endl; + kdDebug(9013) << "---> file added " << m_fileName << endl; }