~ubuntu-branches/debian/sid/kdevelop/sid

« back to all changes in this revision

Viewing changes to buildtools/ant/antprojectpart.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jeremy Lainé
  • Date: 2010-05-05 07:21:55 UTC
  • mfrom: (1.2.3 upstream) (5.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100505072155-h78lx19pu04sbhtn
Tags: 4:4.0.0-2
* Upload to unstable (Closes: #579947, #481832).
* Acknowledge obsolete NMU fixes (Closes: #562410, #546961).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#include "antprojectpart.h"
2
 
 
3
 
#include <qapplication.h>
4
 
#include <qfile.h>
5
 
#include <qfileinfo.h>
6
 
#include <qpopupmenu.h>
7
 
#include <qvbox.h>
8
 
#include <qtable.h>
9
 
#include <qtextstream.h>
10
 
#include <qvaluestack.h>
11
 
#include <qdir.h>
12
 
 
13
 
 
14
 
#include <kdevgenericfactory.h>
15
 
#include <kdebug.h>
16
 
#include <kaction.h>
17
 
#include <kpopupmenu.h>
18
 
#include <kdialogbase.h>
19
 
#include <klineedit.h>
20
 
#include <kcombobox.h>
21
 
#include <keditlistbox.h>
22
 
#include <kurlrequester.h>
23
 
 
24
 
#include <kdevplugininfo.h>
25
 
 
26
 
#include <kdevcore.h>
27
 
#include <kdevmakefrontend.h>
28
 
#include <urlutil.h>
29
 
 
30
 
 
31
 
#include "antoptionswidget.h"
32
 
#include "classpathwidget.h"
33
 
 
34
 
 
35
 
 
36
 
 
37
 
typedef KDevGenericFactory<AntProjectPart> AntProjectFactory;
38
 
static const KDevPluginInfo data("kdevantproject");
39
 
K_EXPORT_COMPONENT_FACTORY(libkdevantproject, AntProjectFactory( data ))
40
 
 
41
 
 
42
 
AntOptions::AntOptions()
43
 
  : m_buildXML("build.xml"), m_verbosity(AntOptions::Quiet)
44
 
{
45
 
}
46
 
 
47
 
 
48
 
AntProjectPart::AntProjectPart(QObject *parent, const char *name, const QStringList &)
49
 
  : KDevBuildTool(&data, parent, name ? name : "AntProjectPart")
50
 
{
51
 
  setInstance(AntProjectFactory::instance());
52
 
 
53
 
  setXMLFile("kdevantproject.rc");
54
 
 
55
 
  m_buildProjectAction = new KAction(i18n("&Build Project"), "make_kdevelop", Key_F8,
56
 
                                     this, SLOT(slotBuild()),
57
 
                                     actionCollection(), "build_build" );
58
 
  m_buildProjectAction->setToolTip(i18n("Build project"));
59
 
  m_buildProjectAction->setWhatsThis(i18n("<b>Build project</b><p>Executes <b>ant dist</b> command to build the project."));
60
 
 
61
 
  KActionMenu *menu = new KActionMenu(i18n("Build &Target"),
62
 
                                      actionCollection(), "build_target" );
63
 
  menu->setToolTip(i18n("Build target"));
64
 
  menu->setWhatsThis(i18n("<b>Build target</b><p>Executes <b>ant target_name</b> command to build the specified target."));
65
 
 
66
 
  m_targetMenu = menu->popupMenu();
67
 
 
68
 
  connect(m_targetMenu, SIGNAL(activated(int)), this, SLOT(slotTargetMenuActivated(int)));
69
 
  connect(core(), SIGNAL(projectConfigWidget(KDialogBase*)), this, SLOT(projectConfigWidget(KDialogBase*)));
70
 
  connect(core(), SIGNAL(contextMenu(QPopupMenu *, const Context *)), this, SLOT(contextMenu(QPopupMenu *, const Context *)));
71
 
 
72
 
  m_antOptionsWidget = 0;
73
 
}
74
 
 
75
 
 
76
 
AntProjectPart::~AntProjectPart()
77
 
{
78
 
}
79
 
 
80
 
 
81
 
void AntProjectPart::openProject(const QString &dirName, const QString &projectName)
82
 
{
83
 
  m_projectDirectory = dirName;
84
 
  m_projectName = projectName;
85
 
 
86
 
  QDomDocument &dom = *projectDom();
87
 
  // Set the default directory radio to "executable"
88
 
  /// \FIXME there is no kdevantproject so this will not work !
89
 
  if (DomUtil::readEntry(dom, "/kdevantproject/run/directoryradio") == "" ) {
90
 
    DomUtil::writeEntry(dom, "/kdevantproject/run/directoryradio", "executable");
91
 
  }
92
 
 
93
 
  /// @todo read alternative build file from properties
94
 
  m_antOptions.m_buildXML = "build.xml";
95
 
 
96
 
  parseBuildXML();
97
 
 
98
 
  fillMenu();
99
 
 
100
 
  QFile f(dirName + "/" + projectName.lower() + ".kdevelop" + ".filelist");
101
 
  if (f.open(IO_ReadOnly))
102
 
  {
103
 
    QTextStream stream(&f);
104
 
    while (!stream.atEnd())
105
 
    {
106
 
      QString s = stream.readLine();
107
 
      if (!s.startsWith("#"))
108
 
        m_sourceFiles << s;
109
 
    }
110
 
  }
111
 
  else
112
 
    populateProject();
113
 
 
114
 
  KDevProject::openProject( dirName, projectName );
115
 
}
116
 
 
117
 
 
118
 
void AntProjectPart::populateProject()
119
 
{
120
 
  QApplication::setOverrideCursor(Qt::waitCursor);
121
 
 
122
 
  QValueStack<QString> s;
123
 
  int prefixlen = m_projectDirectory.length()+1;
124
 
  s.push(m_projectDirectory);
125
 
 
126
 
  QDir dir;
127
 
  do
128
 
  {
129
 
    dir.setPath(s.pop());
130
 
    kdDebug() << "Examining: " << dir.path() << endl;
131
 
    const QFileInfoList *dirEntries = dir.entryInfoList();
132
 
    QPtrListIterator<QFileInfo> it(*dirEntries);
133
 
    for (; it.current(); ++it)
134
 
    {
135
 
      QString fileName = it.current()->fileName();
136
 
      if (fileName == "." || fileName == "..")
137
 
        continue;
138
 
      QString path = it.current()->absFilePath();
139
 
      if (it.current()->isDir())
140
 
      {
141
 
        kdDebug() << "Pushing: " << path << endl;
142
 
        s.push(path);
143
 
      }
144
 
      else
145
 
      {
146
 
        kdDebug() << "Adding: " << path << endl;
147
 
        m_sourceFiles.append(path.mid(prefixlen));
148
 
      }
149
 
    }
150
 
  }
151
 
  while (!s.isEmpty());
152
 
 
153
 
  QApplication::restoreOverrideCursor();
154
 
}
155
 
 
156
 
 
157
 
void AntProjectPart::closeProject()
158
 
{
159
 
  m_projectDirectory = "";
160
 
  m_projectName = "";
161
 
  m_buildProjectAction->setEnabled(false);
162
 
 
163
 
  m_targetMenu->clear();
164
 
 
165
 
  m_antOptions = AntOptions();
166
 
 
167
 
  QFile f(m_projectDirectory + "/" + m_projectName.lower() + ".kdevelop" + ".filelist");
168
 
  if (!f.open(IO_WriteOnly))
169
 
    return;
170
 
 
171
 
  QTextStream stream(&f);
172
 
  stream << "# KDevelop Ant Project File List" << endl;
173
 
 
174
 
  QStringList::ConstIterator it;
175
 
  for (it = m_sourceFiles.begin(); it != m_sourceFiles.end(); ++it)
176
 
    stream << (*it) << endl;
177
 
  f.close();
178
 
}
179
 
 
180
 
 
181
 
QString AntProjectPart::projectDirectory() const
182
 
{
183
 
  return m_projectDirectory;
184
 
}
185
 
 
186
 
 
187
 
QString AntProjectPart::buildDirectory() const
188
 
{
189
 
  return m_projectDirectory;
190
 
}
191
 
 
192
 
QString AntProjectPart::projectName() const
193
 
{
194
 
  return m_projectName;
195
 
}
196
 
 
197
 
 
198
 
/** Retuns a PairList with the run environment variables */
199
 
DomUtil::PairList AntProjectPart::runEnvironmentVars() const
200
 
{
201
 
    /// \FIXME there is no kdevantproject so this will not work !
202
 
    return DomUtil::readPairListEntry(*projectDom(), "/kdevantproject/run/envvars", "envvar", "name", "value");
203
 
}
204
 
 
205
 
 
206
 
/** Retuns the currently selected run directory
207
 
  * The returned string can be:
208
 
  *   if run/directoryradio == executable
209
 
  *        The directory where the executable is
210
 
  *   if run/directoryradio == build
211
 
  *        The directory where the executable is relative to build directory
212
 
  *   if run/directoryradio == custom
213
 
  *        The custom directory absolute path
214
 
  */
215
 
QString AntProjectPart::runDirectory() const
216
 
{
217
 
    return buildDirectory();
218
 
    /// \FIXME put the code below into use!
219
 
 
220
 
    QDomDocument &dom = *projectDom();
221
 
 
222
 
    /// \FIXME there is no kdevantproject so this will not work !
223
 
    QString directoryRadioString = DomUtil::readEntry(dom, "/kdevantproject/run/directoryradio");
224
 
    QString DomMainProgram = DomUtil::readEntry(dom, "/kdevantproject/run/mainprogram");
225
 
 
226
 
    if ( directoryRadioString == "build" )
227
 
        return buildDirectory();
228
 
 
229
 
    if ( directoryRadioString == "custom" )
230
 
        return DomUtil::readEntry(dom, "/kdevantproject/run/customdirectory");
231
 
 
232
 
    int pos = DomMainProgram.findRev('/');
233
 
    if (pos != -1)
234
 
        return buildDirectory() + "/" + DomMainProgram.left(pos);
235
 
 
236
 
    return buildDirectory() + "/" + DomMainProgram;
237
 
 
238
 
}
239
 
 
240
 
 
241
 
/** Retuns the currently selected main program
242
 
  * The returned string can be:
243
 
  *   if run/directoryradio == executable
244
 
  *        The executable name
245
 
  *   if run/directoryradio == build
246
 
  *        The path to executable relative to build directory
247
 
  *   if run/directoryradio == custom or relative == false
248
 
  *        The absolute path to executable
249
 
  */
250
 
QString AntProjectPart::mainProgram() const
251
 
{
252
 
    QDomDocument * dom = projectDom();
253
 
 
254
 
    if ( !dom ) return QString();
255
 
 
256
 
    QString DomMainProgram = DomUtil::readEntry( *dom, "/kdevantproject/run/mainprogram");
257
 
 
258
 
    if ( DomMainProgram.isEmpty() ) return QString();
259
 
 
260
 
    if ( DomMainProgram.startsWith("/") )   // assume absolute path
261
 
    {
262
 
        return DomMainProgram;    
263
 
    }
264
 
    else // assume project relative path
265
 
    {
266
 
        return projectDirectory() + "/" + DomMainProgram;
267
 
    }
268
 
 
269
 
    return QString();
270
 
}
271
 
 
272
 
 
273
 
QString AntProjectPart::debugArguments() const
274
 
{
275
 
    return QString("");
276
 
}
277
 
 
278
 
/** Retuns a QString with the run command line arguments */
279
 
QString AntProjectPart::runArguments() const
280
 
{
281
 
    /// \FIXME there is no kdevantproject so this will not work !
282
 
    return DomUtil::readEntry(*projectDom(), "/kdevantproject/run/programargs");
283
 
}
284
 
 
285
 
 
286
 
QString AntProjectPart::activeDirectory() const
287
 
{
288
 
  /// \FIXME
289
 
 
290
 
//  return m_projectDirectory;
291
 
 
292
 
        // returning m_projectDirectory is wrong, the path returned should be _relative_ to the project dir
293
 
        // returning an empty string until antproject supports the idea of an active directory
294
 
        return QString("");
295
 
}
296
 
 
297
 
 
298
 
QStringList AntProjectPart::allFiles() const
299
 
{
300
 
/* QStringList res;
301
 
 
302
 
  QStringList::ConstIterator it;
303
 
  for (it = m_sourceFiles.begin(); it != m_sourceFiles.end(); ++it)
304
 
  {
305
 
    QString fileName = *it;
306
 
    if (!fileName.startsWith("/"))
307
 
    {
308
 
      fileName.prepend("/");
309
 
      fileName.prepend(m_projectDirectory);
310
 
    }
311
 
    res += fileName;
312
 
  }
313
 
 
314
 
  return res;*/
315
 
 
316
 
        // return all files relative to the project directory!
317
 
        return m_sourceFiles;
318
 
}
319
 
 
320
 
 
321
 
void AntProjectPart::addFile(const QString &fileName)
322
 
{
323
 
        QStringList fileList;
324
 
        fileList.append ( fileName );
325
 
 
326
 
        this->addFiles ( fileList );
327
 
}
328
 
 
329
 
void AntProjectPart::addFiles ( const QStringList& fileList )
330
 
{
331
 
        QStringList::ConstIterator it;
332
 
 
333
 
        for ( it = fileList.begin(); it != fileList.end(); ++it )
334
 
        {
335
 
                m_sourceFiles.append (*it );
336
 
        }
337
 
 
338
 
        kdDebug() << "Emitting addedFilesToProject" << endl;
339
 
        emit addedFilesToProject(fileList);
340
 
}
341
 
 
342
 
void AntProjectPart::removeFile(const QString &fileName)
343
 
{
344
 
        QStringList fileList;
345
 
        fileList.append ( fileName );
346
 
 
347
 
        this->removeFiles ( fileList );
348
 
}
349
 
 
350
 
void AntProjectPart::removeFiles ( const QStringList& fileList )
351
 
{
352
 
        kdDebug() << "Emitting removedFilesFromProject" << endl;
353
 
        emit removedFilesFromProject(fileList);
354
 
 
355
 
        QStringList::ConstIterator it;
356
 
 
357
 
        for ( it = fileList.begin(); it != fileList.end(); ++it )
358
 
        {
359
 
                m_sourceFiles.remove ( *it );
360
 
        }
361
 
}
362
 
 
363
 
void AntProjectPart::parseBuildXML()
364
 
{
365
 
  m_antOptions.m_targets.clear();
366
 
  m_antOptions.m_properties.clear();
367
 
  m_antOptions.m_defineProperties.clear();
368
 
 
369
 
  // open build file
370
 
  QFile bf(m_projectDirectory + "/" + m_antOptions.m_buildXML);
371
 
  if (!bf.open(IO_ReadOnly))
372
 
    return;
373
 
 
374
 
  // parse build file
375
 
  QDomDocument dom;
376
 
  if (!dom.setContent(&bf))
377
 
  {
378
 
    bf.close();
379
 
    return;
380
 
  }
381
 
  bf.close();
382
 
 
383
 
  m_projectName = dom.documentElement().attribute("name", m_projectName);
384
 
  m_antOptions.m_defaultTarget = dom.documentElement().attribute("default", "");
385
 
 
386
 
  QDomNode node = dom.documentElement().firstChild();
387
 
  while (!node.isNull())
388
 
  {
389
 
    if (node.toElement().tagName() == "target")
390
 
    {
391
 
      if (m_antOptions.m_defaultTarget.isEmpty())
392
 
        m_antOptions.m_defaultTarget = node.toElement().attribute("name");
393
 
      m_antOptions.m_targets.append(node.toElement().attribute("name"));
394
 
    }
395
 
    else if (node.toElement().tagName() == "property")
396
 
    {
397
 
      m_antOptions.m_properties.insert(node.toElement().attribute("name"), node.toElement().attribute("value"));
398
 
      m_antOptions.m_defineProperties.insert(node.toElement().attribute("name"), false);
399
 
    }
400
 
 
401
 
    /// @todo Handle property files
402
 
    /// @todo evaluate properties' values
403
 
 
404
 
    node = node.nextSibling();
405
 
  }
406
 
}
407
 
 
408
 
 
409
 
void AntProjectPart::fillMenu()
410
 
{
411
 
  m_buildProjectAction->setEnabled(!m_antOptions.m_defaultTarget.isEmpty());
412
 
 
413
 
  m_targetMenu->clear();
414
 
  int id = 0;
415
 
  QStringList::ConstIterator it;
416
 
  for (it = m_antOptions.m_targets.begin(); it != m_antOptions.m_targets.end(); ++it)
417
 
    m_targetMenu->insertItem(*it, id++);
418
 
}
419
 
 
420
 
 
421
 
void AntProjectPart::slotBuild()
422
 
{
423
 
  ant(m_antOptions.m_defaultTarget);
424
 
}
425
 
 
426
 
 
427
 
void AntProjectPart::slotTargetMenuActivated(int id)
428
 
{
429
 
  ant(m_antOptions.m_targets[id]);
430
 
}
431
 
 
432
 
 
433
 
void AntProjectPart::ant(const QString &target)
434
 
{
435
 
  QString cmd = "%0 cd %1 && ant %2 -buildfile %3 %4 %5";
436
 
 
437
 
  QString verb = "";
438
 
  switch (m_antOptions.m_verbosity)
439
 
  {
440
 
  case AntOptions::Quiet:
441
 
    verb = "-quiet";
442
 
    break;
443
 
  case AntOptions::Verbose:
444
 
    verb = "-verbose";
445
 
    break;
446
 
  default:
447
 
    verb = "-debug";
448
 
    break;
449
 
  }
450
 
 
451
 
  QString options = "";
452
 
  QMap<QString,QString>::Iterator it;
453
 
  for (it = m_antOptions.m_properties.begin(); it != m_antOptions.m_properties.end(); ++it)
454
 
    if (m_antOptions.m_defineProperties[it.key()])
455
 
      options += "-D" + it.key() + "=\"" + it.data() + "\" ";
456
 
 
457
 
  QString cp;
458
 
  if (!m_classPath.count() == 0)
459
 
    cp = "CLASSPATH="+m_classPath.join(":");
460
 
 
461
 
  makeFrontend()->queueCommand(m_projectDirectory, cmd.arg(cp).arg(m_projectDirectory).arg(target).arg(m_antOptions.m_buildXML).arg(verb).arg(options));
462
 
}
463
 
 
464
 
 
465
 
void AntProjectPart::projectConfigWidget(KDialogBase *dlg)
466
 
{
467
 
  QVBox *vbox = dlg->addVBoxPage(i18n("Ant Options"));
468
 
  m_antOptionsWidget = new AntOptionsWidget(vbox);
469
 
 
470
 
  m_antOptionsWidget->BuildXML->setURL(m_antOptions.m_buildXML);
471
 
 
472
 
  switch (m_antOptions.m_verbosity)
473
 
  {
474
 
  case AntOptions::Quiet:
475
 
    m_antOptionsWidget->Verbosity->setCurrentItem(0);
476
 
    break;
477
 
  case AntOptions::Verbose:
478
 
    m_antOptionsWidget->Verbosity->setCurrentItem(1);
479
 
    break;
480
 
  default:
481
 
    m_antOptionsWidget->Verbosity->setCurrentItem(2);
482
 
    break;
483
 
  }
484
 
 
485
 
  m_antOptionsWidget->Properties->setNumRows(m_antOptions.m_properties.count());
486
 
  m_antOptionsWidget->Properties->setNumCols(2);
487
 
 
488
 
  QMap<QString,QString>::Iterator it;
489
 
  int i=0;
490
 
  for (it = m_antOptions.m_properties.begin(); it != m_antOptions.m_properties.end(); ++it)
491
 
  {
492
 
    QCheckTableItem *citem = new QCheckTableItem(m_antOptionsWidget->Properties, it.key());
493
 
    citem->setChecked(m_antOptions.m_defineProperties[it.key()]);
494
 
    m_antOptionsWidget->Properties->setItem(i,0, citem);
495
 
    QTableItem *item = new QTableItem(m_antOptionsWidget->Properties, QTableItem::WhenCurrent, it.data());
496
 
    m_antOptionsWidget->Properties->setItem(i,1, item);
497
 
    ++i;
498
 
  }
499
 
 
500
 
  connect(dlg, SIGNAL(okClicked()), this, SLOT(optionsAccepted()));
501
 
 
502
 
  vbox = dlg->addVBoxPage(i18n("Classpath"));
503
 
  m_classPathWidget = new ClassPathWidget(vbox);
504
 
 
505
 
  m_classPathWidget->ClassPath->insertStringList(m_classPath);
506
 
}
507
 
 
508
 
 
509
 
void AntProjectPart::optionsAccepted()
510
 
{
511
 
  if (!m_antOptionsWidget || !m_classPathWidget)
512
 
    return;
513
 
 
514
 
  m_antOptions.m_buildXML = m_antOptionsWidget->BuildXML->url();
515
 
 
516
 
  switch (m_antOptionsWidget->Verbosity->currentItem())
517
 
  {
518
 
  case 1:
519
 
    m_antOptions.m_verbosity = AntOptions::Verbose;
520
 
    break;
521
 
  case 2:
522
 
    m_antOptions.m_verbosity = AntOptions::Debug;
523
 
    break;
524
 
  default:
525
 
    m_antOptions.m_verbosity = AntOptions::Quiet;
526
 
    break;
527
 
  }
528
 
 
529
 
  for (int i=0; i<m_antOptionsWidget->Properties->numRows(); ++i)
530
 
  {
531
 
    QString key = m_antOptionsWidget->Properties->text(i,0);
532
 
    m_antOptions.m_properties.replace(key, m_antOptionsWidget->Properties->text(i,1));
533
 
    kdDebug() << "PROP: " << key << "  = " << m_antOptionsWidget->Properties->text(i,1);
534
 
 
535
 
    QCheckTableItem *item =(QCheckTableItem*) m_antOptionsWidget->Properties->item(i,0);
536
 
    m_antOptions.m_defineProperties.replace(key, item->isChecked());
537
 
  }
538
 
 
539
 
  m_classPath = m_classPathWidget->ClassPath->items();
540
 
 
541
 
  m_antOptionsWidget = 0;
542
 
  m_classPathWidget = 0;
543
 
}
544
 
 
545
 
 
546
 
void AntProjectPart::contextMenu(QPopupMenu *popup, const Context *context)
547
 
{
548
 
  if (!context->hasType( Context::FileContext ))
549
 
    return;
550
 
 
551
 
  const FileContext *fcontext = static_cast<const FileContext*>(context);
552
 
  KURL url = fcontext->urls().first();
553
 
  if (URLUtil::isDirectory(url))
554
 
    return;
555
 
 
556
 
  m_contextFileName = url.fileName();
557
 
  bool inProject = project()->allFiles().contains(m_contextFileName.mid ( project()->projectDirectory().length() + 1 ) );
558
 
  QString popupstr = QFileInfo(m_contextFileName).fileName();
559
 
  if (m_contextFileName.startsWith(projectDirectory()+ "/"))
560
 
    m_contextFileName.remove(0, projectDirectory().length()+1);
561
 
 
562
 
  popup->insertSeparator();
563
 
  if (inProject)
564
 
  {
565
 
    int id = popup->insertItem( i18n("Remove %1 From Project").arg(popupstr),
566
 
                       this, SLOT(slotRemoveFromProject()) );
567
 
    popup->setWhatsThis(id, i18n("<b>Remove from project</b><p>Removes current file from the project."));
568
 
  }
569
 
  else
570
 
  {
571
 
    int id = popup->insertItem( i18n("Add %1 to Project").arg(popupstr),
572
 
                       this, SLOT(slotAddToProject()) );
573
 
    popup->setWhatsThis(id, i18n("<b>Add to project</b><p>Adds current file from the project."));
574
 
  }
575
 
}
576
 
 
577
 
 
578
 
void AntProjectPart::slotAddToProject()
579
 
{
580
 
        QStringList fileList;
581
 
        fileList.append ( m_contextFileName );
582
 
        addFiles ( fileList );
583
 
}
584
 
 
585
 
 
586
 
void AntProjectPart::slotRemoveFromProject()
587
 
{
588
 
        QStringList fileList;
589
 
        fileList.append ( m_contextFileName );
590
 
        removeFiles ( fileList );
591
 
}
592
 
 
593
 
 
594
 
#include "antprojectpart.moc"
595
 
 
596
 
 
597
 
/*!
598
 
    \fn AntProjectPart::distFiles() const
599
 
 */
600
 
QStringList AntProjectPart::distFiles() const
601
 
{
602
 
        QStringList sourceList = allFiles();
603
 
        // Scan current source directory for any .pro files.
604
 
        QString projectDir = projectDirectory();
605
 
        QDir dir(projectDir);
606
 
        QStringList files = dir.entryList( "build.xml");
607
 
        return sourceList + files;
608
 
}