Browse Source

Newversion wizard in progress

v0.9.0
Ulrich Van Den Hekke 12 years ago
parent
commit
75ea0ff922
  1. 2
      components/pluginselector.cpp
  2. 2
      components/xinxlineedit.cpp
  3. 54
      framework/contentview2/contentview2cache.cpp
  4. 20
      framework/contentview2/contentview2completionmodel.cpp
  5. 34
      framework/contentview2/contentview2file.cpp
  6. 3
      framework/contentview2/contentview2file.h
  7. 36
      framework/contentview2/contentview2node.cpp
  8. 31
      framework/contentview2/contentview2parserfactory.cpp
  9. 9
      framework/contentview2/contentview2parserfactory.h
  10. 5
      framework/contentview2/contentview2project.cpp
  11. 3
      framework/contentview2/contentview2project.h
  12. 16
      framework/contentview2/contentview2treemodel.cpp
  13. 2
      framework/core/appsettings.cpp
  14. 1
      framework/core/appsettings.h
  15. 2
      framework/core/config.xml
  16. 10
      framework/core/exceptions.cpp
  17. 3
      framework/core/exceptions.h
  18. 16
      framework/core/lib-config.h
  19. 160
      framework/core/xinxcore.h
  20. 14
      framework/editors/textfileeditor.cpp
  21. 20
      framework/editors/xinxcodeedit.cpp
  22. 8
      framework/editors/xinxlanguagefactory.cpp
  23. 2
      framework/plugins/plugininterfaces.h
  24. 12
      framework/project/xinxproject.cpp
  25. 4
      framework/scripts/scriptmanager.cpp
  26. 10
      framework/snipets/basesnipetitemmodel.cpp
  27. 6
      framework/utils/treeproxyitemmodel.cpp
  28. 6
      framework/utils/xsltparser.cpp
  29. 2
      plugins/core/docks/datastream/xmlpresentationdockthread.cpp
  30. 2
      plugins/core/editors/models/xq/xquery_keyword.cpp
  31. 22
      plugins/core/editors/models/xsl/xmlcompletionparser.h
  32. 2
      plugins/core/editors/models/xsl/xslcontentviewparser.cpp
  33. 6
      plugins/core/editors/widgeteditor/xml/xmltexteditor.cpp
  34. 2
      plugins/core/editors/widgeteditor/xsl/xsltexteditor.cpp
  35. 12
      plugins/core/plugindefinition/coreplugin.cpp
  36. 16
      plugins/core/plugindefinition/coreplugin.h
  37. 6
      plugins/core/plugindefinition/filetypeplugin.cpp
  38. 26
      plugins/core/plugindefinition/filetypeplugin.h
  39. 2
      plugins/generix/configuration/configurationfile.cpp
  40. 5
      plugins/generix/configuration/configurationmanager.cpp
  41. 2
      plugins/generix/configuration/gceconfiguration.cpp
  42. 2
      plugins/generix/configuration/gceconfigurationdef.cpp
  43. 2
      plugins/generix/configuration/gceproperties.cpp
  44. 83
      plugins/generix/docks/dictionary/dictionarywidget.cpp
  45. 104
      plugins/generix/parser/generixxsltparser.cpp
  46. 4
      plugins/generix/plugindefinition/generix.cpp
  47. 18
      plugins/generix/plugindefinition/generix.h
  48. 2
      plugins/generix/projectproperty/std/generixderivationpage.cpp
  49. 2
      plugins/generix/projectproperty/std/generixderivationpage.h
  50. 2
      plugins/generix/projectproperty/wizard/newgenerixderivation1page.cpp
  51. 5
      project_mode.pri
  52. 36
      unittest/testcontentview2/testcontentview2.cpp
  53. 4
      unittest/testxinxcodeedit/testxinxcodeedit.cpp
  54. 8
      xinx/filecontentdockwidget.cpp
  55. 6
      xinx/logdialogimpl.cpp
  56. 9
      xinx/main.cpp
  57. 8
      xinx/mainformimpl.cpp
  58. 43
      xinx/newversionwizardimpl.cpp
  59. 41
      xinx/newversionwizardimpl.h
  60. 12
      xinx/replacedialogimpl.cpp
  61. 2
      xinx/tabeditor.cpp
  62. 12
      xinx/ui/newversion.ui
  63. 13
      xinx/xinx.pro
  64. 6
      xinx/xinxprojectwizard/projectwizard.cpp

2
components/pluginselector.cpp

@ -292,7 +292,7 @@ void PluginDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option
QString display = index.model()->data(index, PluginModel::PLG_NAME).toString();
QString description = index.model()->data(index, PluginModel::PLG_DESCRIPTION).toString();
# define LeftPosition( text, metrics ) myOption.direction == Qt::LeftToRight ? \
# define LeftPosition( text, metrics ) myOption.direction == Qt::LeftToRight ? \
pixmapLeftPosition + iconPixmap.width() + m_separatorPixels * 2 : \
pixmapLeftPosition - iconPixmap.width() - m_separatorPixels * 2 - metrics.width( text )

2
components/xinxlineedit.cpp

@ -16,7 +16,7 @@
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License

54
framework/contentview2/contentview2cache.cpp

@ -66,7 +66,7 @@ void Cache::initializeCache()
try
{
Project project( Manager::self()->database(), XINXProjectManager::self()->project() );
Project project(Manager::self()->database(), XINXProjectManager::self()->project());
QSqlQuery cacheQuery("SELECT path, type, selection FROM cv_file WHERE project_id=:project and cached = :cached", Manager::self()->database());
cacheQuery.bindValue(":project", project.projectId());
@ -89,11 +89,11 @@ void Cache::initializeCache()
fileCache.parser = 0;
m_parsers.append(fileCache);
if(QFileInfo(path).exists())
if (QFileInfo(path).exists())
m_watcher->addPath(path);
}
}
catch(...)
catch (...)
{
// In case of error, make nothing
}
@ -158,7 +158,7 @@ void Cache::deleteFromCache(XinxProject * project, const QString & path, bool is
void Cache::registerPath(const QString & path)
{
if(! m_registeredFile.contains(path))
if (! m_registeredFile.contains(path))
m_registeredFile.append(path);
}
@ -180,19 +180,19 @@ Project Cache::getProject(QSqlDatabase db, XinxProject * p)
Project project;
try
{
project = Project( db, p );
project = Project(db, p);
}
catch(ProjectException e)
catch (ProjectException e)
{
if( p )
if (p)
{
project.setProjectName( p->projectName() );
project.setProjectPath( p->fileName() );
project.setProjectName(p->projectName());
project.setProjectPath(p->fileName());
}
else
{
project.setProjectName( "/" );
project.setProjectPath( "/" );
project.setProjectName("/");
project.setProjectPath("/");
}
project.create(db);
}
@ -205,9 +205,9 @@ File Cache::getFile(QSqlDatabase db, struct_cache p)
try
{
/* Lecture du fichier */
file = File( db, p.project, p.path, p.cached );
file = File(db, p.project, p.path, p.cached);
}
catch(FileException e)
catch (FileException e)
{
/* Lecture/Création du projet */
Project project = getProject(db, p.project);
@ -265,7 +265,7 @@ void Cache::regenerateImport(QSqlDatabase db)
result = selectImportQuery.exec();
Q_ASSERT_X(result, "Cache::regenerateImport", qPrintable(selectImportQuery.lastError().text()));
while(selectImportQuery.next())
while (selectImportQuery.next())
{
imports.insert(selectImportQuery.value(0).toInt(), selectImportQuery.value(1).toInt());
}
@ -276,7 +276,7 @@ void Cache::regenerateImport(QSqlDatabase db)
{
foreach(int node, imports.keys(key))
{
if(!imports.contains(node, value))
if (!imports.contains(node, value))
{
imports.insert(node, value);
QSqlQuery insertImportQuery("INSERT INTO cv_import(parent_id, child_id, automatic_import) VALUES(:parent_id, :child_id, :automatic)", db);
@ -293,7 +293,7 @@ void Cache::regenerateImport(QSqlDatabase db)
result = db.commit();
Q_ASSERT_X(result, "Cache::regenerateImport", qPrintable(db.lastError().text()));
}
catch(FileException e)
catch (FileException e)
{
result = db.rollback();
Q_ASSERT_X(result, "Cache::regenerateImport", qPrintable(db.lastError().text()));
@ -349,9 +349,9 @@ void Cache::run()
}
}
if( ! parser )
if (! parser)
parser = ParserFactory::getParserByType(file.type());
if( ! parser )
if (! parser)
{
result = db.commit();
Q_ASSERT_X(result, "Cache::run", qPrintable(db.lastError().text()));
@ -371,7 +371,7 @@ void Cache::run()
{
ErrorManager::self()->clearMessages(file.path());
parser->load();
if(parser->codec())
if (parser->codec())
file.setEncoding(parser->codec()->name());
file.destroyImports(db);
@ -393,7 +393,7 @@ void Cache::run()
file.setIsLoaded(true);
if (lastModified.isValid())
{
file.setDatmod (lastModified);
file.setDatmod(lastModified);
}
file.update(db);
@ -402,7 +402,7 @@ void Cache::run()
emit cacheLoaded(file);
}
catch(ParserException e)
catch (ParserException e)
{
ErrorManager::self()->addMessage(file.path(), e.getLine(), ErrorManager::MessageError, e);
result = db.rollback();
@ -414,7 +414,7 @@ void Cache::run()
result = db.rollback();
Q_ASSERT_X(result, "Cache::run", qPrintable(db.lastError().text()));
if( file.isValid() )
if (file.isValid())
{
struct_cache fileCache;
fileCache.project = XINXProjectManager::self()->project();
@ -459,7 +459,7 @@ void Cache::run()
}
/* Delete file not registered */
if(deleteNotRegistered)
if (deleteNotRegistered)
{
deleteNotRegistered = false;
try
@ -472,12 +472,12 @@ void Cache::run()
bool result = query.exec();
Q_ASSERT_X(result, "Cache::run", qPrintable(query.lastError().text()));
while(query.next())
while (query.next())
{
const QString path = query.value(0).toString();
const int id = query.value(1).toInt();
if(! m_registeredFile.contains(path))
if (! m_registeredFile.contains(path))
{
bool result = db.transaction();
Q_ASSERT_X(result, "Cache::run", qPrintable(db.lastError().text()));
@ -490,7 +490,7 @@ void Cache::run()
result = db.commit();
Q_ASSERT_X(result, "Cache::run", qPrintable(db.lastError().text()));
}
catch(FileException e)
catch (FileException e)
{
result = db.rollback();
Q_ASSERT_X(result, "Cache::run", qPrintable(db.lastError().text()));
@ -498,7 +498,7 @@ void Cache::run()
}
}
}
catch(ProjectException e)
catch (ProjectException e)
{
}

20
framework/contentview2/contentview2completionmodel.cpp

@ -118,26 +118,26 @@ void CompletionModel::setPrefix(const QString & prefix)
QString CompletionModel::whereClause() const
{
return "WHERE (cv_file.project_id=0 OR cv_file.project_id=:project_id) "
"AND cv_file.id=cv_node.file_id "
"AND (cv_file.selection='*' OR cv_node.file_id=:id1 OR "
"EXISTS ( SELECT 1 FROM cv_import import "
"WHERE import.child_id = cv_node.file_id "
"AND import.parent_id = :id2)) ";
return "WHERE (cv_file.project_id=0 OR cv_file.project_id=:project_id) "
"AND cv_file.id=cv_node.file_id "
"AND (cv_file.selection='*' OR cv_node.file_id=:id1 OR "
"EXISTS ( SELECT 1 FROM cv_import import "
"WHERE import.child_id = cv_node.file_id "
"AND import.parent_id = :id2)) ";
}
void CompletionModel::select()
{
if(m_file.isValid(m_db))
if (m_file.isValid(m_db))
{
m_file.reload(m_db);
QSqlQuery query(m_db);
// Order by clause
QString queryStr =
"SELECT cv_node.display_name, cv_node.name, cv_node.icon, cv_node.id, cv_node.type, cv_node.completion_value "
"FROM cv_node, cv_file " + whereClause() + " AND cv_node.display_name like ifnull(:prefix,'')||'%' "
"ORDER BY lower(cv_node.display_name) LIMIT 100";
"SELECT cv_node.display_name, cv_node.name, cv_node.icon, cv_node.id, cv_node.type, cv_node.completion_value "
"FROM cv_node, cv_file " + whereClause() + " AND cv_node.display_name like ifnull(:prefix,'')||'%' "
"ORDER BY lower(cv_node.display_name) LIMIT 100";
// Set the query used all snipet
query.prepare(queryStr);

34
framework/contentview2/contentview2file.cpp

@ -28,7 +28,8 @@
#include <QSqlError>
#include <QVariant>
namespace ContentView2 {
namespace ContentView2
{
/* FileException */
@ -74,13 +75,13 @@ PrivateFileContainer::~PrivateFileContainer()
void PrivateFileContainer::load(QSqlDatabase db)
{
if(! m_file.isValid())
if (! m_file.isValid())
{
try
{
m_file = File(db, m_project, m_path, m_cached);
}
catch(FileException e)
catch (FileException e)
{
}
@ -107,8 +108,8 @@ PrivateFile::PrivateFile() : m_id(-1), m_projectId(-1), m_rootId(-1), m_cached(f
}
PrivateFile::PrivateFile(const PrivateFile &other) : QSharedData(other), m_id(other.m_id), m_projectId(other.m_projectId), m_rootId(other.m_rootId),
m_path(other.m_path), m_type(other.m_type), m_selection(other.m_selection), m_encoding(other.m_encoding), m_datmod(other.m_datmod),
m_cached(other.m_cached), m_loaded(other.m_loaded)
m_path(other.m_path), m_type(other.m_type), m_selection(other.m_selection), m_encoding(other.m_encoding), m_datmod(other.m_datmod),
m_cached(other.m_cached), m_loaded(other.m_loaded)
{
}
@ -148,7 +149,7 @@ File FileContainer::file(QSqlDatabase db) const
void FileContainer::reload(QSqlDatabase db)
{
if(isValid(db))
if (isValid(db))
{
d->m_file.reload(db);
}
@ -197,7 +198,7 @@ File::~File()
void File::load(QSqlDatabase db, uint id)
{
QSqlQuery selectQuery("SELECT project_id, path, cached, type, datmod, loaded, root_id, selection, encoding "
"FROM cv_file WHERE id=:id", db);
"FROM cv_file WHERE id=:id", db);
selectQuery.bindValue(":id", QVariant::fromValue(id));
bool result = selectQuery.exec();
Q_ASSERT_X(result, "File::load", qPrintable(selectQuery.lastError().text()));
@ -232,7 +233,7 @@ void File::load(QSqlDatabase db, XinxProject * project, const QString & path, bo
d->m_projectId = projectQuery.value(0).toInt();
QSqlQuery selectQuery("SELECT id, type, datmod, loaded, root_id, selection, encoding "
"FROM cv_file WHERE project_id=:project_id and path=:path and cached=:cached", db);
"FROM cv_file WHERE project_id=:project_id and path=:path and cached=:cached", db);
selectQuery.bindValue(":project_id", QVariant::fromValue(d->m_projectId));
selectQuery.bindValue(":path", QVariant::fromValue(path));
selectQuery.bindValue(":cached", QVariant::fromValue(isCached));
@ -256,7 +257,7 @@ void File::load(QSqlDatabase db, XinxProject * project, const QString & path, bo
void File::reload(QSqlDatabase db)
{
if(d->m_id >= 0)
if (d->m_id >= 0)
load(db, d->m_id);
}
@ -275,7 +276,7 @@ uint File::create(QSqlDatabase db)
QSqlQuery insertQuery(db);
insertQuery.prepare("INSERT INTO cv_file(project_id, path, cached, type, datmod, loaded, root_id, selection, encoding) "
"VALUES(:project_id, :path, :cached, :type, :datmod, :loaded, :root_id, :selection, :encoding)");
"VALUES(:project_id, :path, :cached, :type, :datmod, :loaded, :root_id, :selection, :encoding)");
insertQuery.bindValue(":project_id", QVariant::fromValue(d->m_projectId));
insertQuery.bindValue(":path", QVariant::fromValue(d->m_path));
@ -300,11 +301,11 @@ void File::update(QSqlDatabase db)
Q_ASSERT_X(d->m_id >= 0, "File::update", "The file must be initialized");
QSqlQuery updateQuery("UPDATE cv_file "
"SET datmod=:datmod , "
" loaded=:loaded , "
" root_id=:root_id , "
" encoding=:encoding "
"WHERE id=:id", db);
"SET datmod=:datmod , "
" loaded=:loaded , "
" root_id=:root_id , "
" encoding=:encoding "
"WHERE id=:id", db);
updateQuery.bindValue(":datmod", QVariant::fromValue(d->m_datmod));
updateQuery.bindValue(":loaded", QVariant::fromValue(d->m_loaded));
updateQuery.bindValue(":root_id", QVariant::fromValue(d->m_rootId));
@ -333,7 +334,8 @@ void File::destroy(QSqlDatabase db)
d->m_id = -1;
}
void File::destroyNodes(QSqlDatabase db) {
void File::destroyNodes(QSqlDatabase db)
{
if ((d->m_id == -1) || (d->m_rootId == -1)) return ;
Node node(db, d->m_rootId);

3
framework/contentview2/contentview2file.h

@ -34,7 +34,8 @@
class XinxProject;
namespace ContentView2 {
namespace ContentView2
{
/*!
* \class FileException

36
framework/contentview2/contentview2node.cpp

@ -80,8 +80,8 @@ void PrivateNode::load()
if ((m_id == -1) || (m_isLoaded)) return;
QSqlQuery selectQuery("SELECT name, type, icon, display_name, tips, completion_value, line, file_id, hash, "
"property1, property2, property3, property4, property5, property6, "
"property7, property8, property9, property10 "
"property1, property2, property3, property4, property5, property6, "
"property7, property8, property9, property10 "
"FROM cv_node WHERE id=:id", m_db);
selectQuery.bindValue(":id", QVariant::fromValue(m_id));
bool result = selectQuery.exec();
@ -155,7 +155,7 @@ void Node::load(QSqlDatabase db, uint id)
void Node::reload(QSqlDatabase db)
{
if(d->m_id >= 0)
if (d->m_id >= 0)
load(db, d->m_id);
}
@ -176,12 +176,12 @@ uint Node::create(QSqlDatabase db, int forcedId)
if (forcedId == -1)
{
insertQuery.prepare("INSERT INTO cv_node(name, type, icon, display_name, tips, completion_value, line, file_id, hash, property1, property2, property3, property4, property5, property6, property7, property8, property9, property10) "
"VALUES(:name, :type, :icon, :display_name, :tips, :completion_value, :line, :file_id, :hash, :property1, :property2, :property3, :property4, :property5, :property6, :property7, :property8, :property9, :property10)");
"VALUES(:name, :type, :icon, :display_name, :tips, :completion_value, :line, :file_id, :hash, :property1, :property2, :property3, :property4, :property5, :property6, :property7, :property8, :property9, :property10)");
}
else
{
insertQuery.prepare("INSERT INTO cv_node(id, name, type, icon, display_name, tips, completion_value, line, file_id, hash, property1, property2, property3, property4, property5, property6, property7, property8, property9, property10) "
"VALUES(:forced_id, :name, :type, :icon, :display_name, :tips, :completion_value, :line, :file_id, :hash, :property1, :property2, :property3, :property4, :property5, :property6, :property7, :property8, :property9, :property10)");
"VALUES(:forced_id, :name, :type, :icon, :display_name, :tips, :completion_value, :line, :file_id, :hash, :property1, :property2, :property3, :property4, :property5, :property6, :property7, :property8, :property9, :property10)");
insertQuery.bindValue(":forced_id", forcedId);
}
@ -256,20 +256,20 @@ void Node::update(QSqlDatabase db)
" icon=:icon , "
" display_name=:display_name , "
" tips=:tips , "
" completion_value=:completion_value , "
" completion_value=:completion_value , "
" line=:line , "
" hash=:hash , "
" property1=:property1, "
" property2=:property2, "
" property3=:property3, "
" property4=:property4, "
" property5=:property5, "
" property6=:property6, "
" property7=:property7, "
" property8=:property8, "
" property9=:property9, "
" property10=:property10 "
"WHERE id=:id", db);
" property1=:property1, "
" property2=:property2, "
" property3=:property3, "
" property4=:property4, "
" property5=:property5, "
" property6=:property6, "
" property7=:property7, "
" property8=:property8, "
" property9=:property9, "
" property10=:property10 "
"WHERE id=:id", db);
updateQuery.bindValue(":name", d->m_datas.value(Node::NODE_NAME));
updateQuery.bindValue(":type", d->m_datas.value(Node::NODE_TYPE));
updateQuery.bindValue(":icon", d->m_datas.value(Node::NODE_ICON));
@ -438,7 +438,7 @@ void Node::setFile(const File & file)
File Node::file(QSqlDatabase db)
{
d->load();
if(d->m_fileId >= 0)
if (d->m_fileId >= 0)
{
return File(db, d->m_fileId);
}

31
framework/contentview2/contentview2parserfactory.cpp

@ -21,21 +21,22 @@
#include "contentview2/contentview2parserfactory.h"
#include "plugins/xinxpluginsloader.h"
namespace ContentView2 {
namespace ContentView2
{
ParserFactory::ParserFactory()
{
}
QString ParserFactory::getParserTypeByFilename( const QString & filename )
QString ParserFactory::getParserTypeByFilename(const QString & filename)
{
if (! QFileInfo(filename).exists()) return QString();
IFileTypePlugin * fileType = XinxPluginsLoader::self()->matchedFileType(filename);
if( fileType )
if (fileType)
{
QString parserType = fileType->parserType();
if( ! parserType.isEmpty() )
if (! parserType.isEmpty())
{
return parserType;
}
@ -43,29 +44,29 @@ QString ParserFactory::getParserTypeByFilename( const QString & filename )
return QString();
}
Parser * ParserFactory::getParserByFilename( const QString & filename )
Parser * ParserFactory::getParserByFilename(const QString & filename)
{
QString parserType = getParserTypeByFilename( filename );
if( ! parserType.isEmpty() )
QString parserType = getParserTypeByFilename(filename);
if (! parserType.isEmpty())
{
return getParserByType( parserType );
return getParserByType(parserType);
}
return 0;
}
Parser * ParserFactory::getParserByType( const QString & type )
Parser * ParserFactory::getParserByType(const QString & type)
{
Parser * parser = 0;
foreach( XinxPluginElement * e, XinxPluginsLoader::self()->plugins() )
foreach(XinxPluginElement * e, XinxPluginsLoader::self()->plugins())
{
if( e->isActivated() )
if (e->isActivated())
{
IContentViewParserPlugin * plugin = qobject_cast<IContentViewParserPlugin*>( e->plugin() );
if( plugin )
IContentViewParserPlugin * plugin = qobject_cast<IContentViewParserPlugin*>(e->plugin());
if (plugin)
{
parser = plugin->createParser( type );
if( parser )
parser = plugin->createParser(type);
if (parser)
{
break;
}

9
framework/contentview2/contentview2parserfactory.h

@ -25,16 +25,17 @@
#include <core/lib-config.h>
#include <contentview2/contentview2parser.h>
namespace ContentView2 {
namespace ContentView2
{
class LIBEXPORT ParserFactory
{
public:
ParserFactory();
static QString getParserTypeByFilename( const QString & filename );
static Parser * getParserByFilename( const QString & filename );
static Parser * getParserByType( const QString & type );
static QString getParserTypeByFilename(const QString & filename);
static Parser * getParserByFilename(const QString & filename);
static Parser * getParserByType(const QString & type);
};

5
framework/contentview2/contentview2project.cpp

@ -27,7 +27,8 @@
#include <QSqlError>
#include <QVariant>
namespace ContentView2 {
namespace ContentView2
{
/* ProjectException */
@ -128,7 +129,7 @@ void Project::load(QSqlDatabase db, XinxProject * project)
void Project::reload(QSqlDatabase db)
{
if(d->m_id >= 0)
if (d->m_id >= 0)
load(db, d->m_id);
}

3
framework/contentview2/contentview2project.h

@ -32,7 +32,8 @@
class XinxProject;
namespace ContentView2 {
namespace ContentView2
{
/*!
* \class FileException

16
framework/contentview2/contentview2treemodel.cpp

@ -171,20 +171,20 @@ QSqlQueryModel * TreeModel::sourceModel() const
void TreeModel::select()
{
if(m_container.isValid(m_db))
if (m_container.isValid(m_db))
{
m_container.reload(m_db);
QSqlQuery query(m_db);
// Set the query used all snipet
query.prepare(
"SELECT cv_node.name, cv_node.type, cv_node.icon, cv_node.display_name, "
"cv_node.tips, cv_node.line, "
"case when cv_node.id=:root_id1 then 0 else cv_node.id end as id, "
"case when cv_link.parent_id=:root_id2 then 0 when cv_node.id=:root_id3 then -1 else cv_link.parent_id end as parent_id "
"FROM cv_node left join cv_link on cv_link.child_id=cv_node.id "
"WHERE cv_node.file_id=:file_id "
"ORDER BY lower(cv_node.display_name)"
"SELECT cv_node.name, cv_node.type, cv_node.icon, cv_node.display_name, "
"cv_node.tips, cv_node.line, "
"case when cv_node.id=:root_id1 then 0 else cv_node.id end as id, "
"case when cv_link.parent_id=:root_id2 then 0 when cv_node.id=:root_id3 then -1 else cv_link.parent_id end as parent_id "
"FROM cv_node left join cv_link on cv_link.child_id=cv_node.id "
"WHERE cv_node.file_id=:file_id "
"ORDER BY lower(cv_node.display_name)"
);
query.bindValue(":root_id1", m_container.file(m_db).rootId());

2
framework/core/appsettings.cpp

@ -366,6 +366,7 @@ AppSettings::AppSettings::struct_globals AppSettings::getSettingsGlobals(AppSett
value.snipets = getSettingsSnipets(settings, "Snipets", defaultValue.snipets);
value.tools = getSettingsHash_QString(settings, "Tools", defaultValue.tools);
value.formats = getSettingsHash_struct_qformat(settings, "Formats", defaultValue.formats);
value.version = settings->value("Version", defaultValue.version).toString();
settings->endGroup();
return value;
@ -390,6 +391,7 @@ void AppSettings::setSettingsGlobals(AppSettingsSettings * settings, const QStri
setSettingsSnipets(settings, "Snipets", value.snipets);
setSettingsHash_QString(settings, "Tools", value.tools);
setSettingsHash_struct_qformat(settings, "Formats", value.formats);
settings->setValue("Version", value.version, defaultValue.version);
settings->endGroup();
}

1
framework/core/appsettings.h

@ -101,6 +101,7 @@ public:
struct_snipets snipets;
QHash<QString,QString> tools;
QHash<QString,struct_qformat> formats;
QString version;
};

2
framework/core/config.xml

@ -61,4 +61,6 @@
<value name="Tools" type="hash:string" default="QString()"/>
<value name="Formats" type="hash:QFormat"/>
<value name="Version" type="string"/>
</config>

10
framework/core/exceptions.cpp

@ -36,10 +36,10 @@
#include <iostream>
#include <csignal>
#ifndef Q_WS_WIN
# include <execinfo.h>
# include <stdio.h>
# include <stdlib.h>
# include <cxxabi.h>
# include <execinfo.h>
# include <stdio.h>
# include <stdlib.h>
# include <cxxabi.h>
#endif
/* Static member */
@ -226,7 +226,7 @@ ErrorManager::ErrorManager()
ErrorManager::~ErrorManager()
{
if(this == s_self)
if (this == s_self)
{
s_self = 0;
}

3
framework/core/exceptions.h

@ -115,7 +115,8 @@ class LIBEXPORT ErrorManager : public QObject
{
Q_OBJECT
public:
enum MessageType {
enum MessageType
{
MessageInformation = 0x01,
MessageWarning = 0x02,
MessageError = 0x04

16
framework/core/lib-config.h

@ -24,21 +24,21 @@
#include <qglobal.h>
/*!
\macro LIBEXPORT
\brief Macro needed for cross-platform shared libraries creation
\macro LIBEXPORT
\brief Macro needed for cross-platform shared libraries creation
*/
#ifdef LIBEXPORT
#error LIBEXPORT already defined...
#endif
#ifdef Q_WS_WIN
# ifdef _LIB_BUILD_
# define LIBEXPORT Q_DECL_EXPORT
# else
# define LIBEXPORT Q_DECL_IMPORT
# endif
# ifdef _LIB_BUILD_
# define LIBEXPORT Q_DECL_EXPORT
# else
# define LIBEXPORT Q_DECL_IMPORT
# endif
#else
# define LIBEXPORT
# define LIBEXPORT
#endif
#endif // !_LIB_CONFIG_H_

160
framework/core/xinxcore.h

@ -47,14 +47,14 @@
* \code
*
* class FooPlugin : public QObject, public IXinxPlugin {
* Q_OBJECT
* Q_INTERFACES(IXinxPlugin)
* Q_OBJECT
* Q_INTERFACES(IXinxPlugin)
* public:
* FooPlugin();
* virtual ~FooPlugin();
* FooPlugin();
* virtual ~FooPlugin();
*
* virtual bool initializePlugin( const QString & lang );
* virtual QVariant getPluginAttribute( const enum IXinxPlugin::PluginAttribute & attr );
* virtual bool initializePlugin( const QString & lang );
* virtual QVariant getPluginAttribute( const enum IXinxPlugin::PluginAttribute & attr );
* };
* \endcode
*
@ -62,32 +62,32 @@
*
* \code
* FooPlugin::FooPlugin() {
* // Make some initialization
* // Make some initialization
* }
*
* FooPlugin::~FooPlugin() {
* // Make some cleanup
* // Make some cleanup
* }
*
* bool FooPlugin::initializePlugin( const QString & lang ) {
* // Make some initialization about the localization
* return true;
* // Make some initialization about the localization
* return true;
* }
* QVariant FooPlugin::getPluginAttribute( const enum IXinxPlugin::PluginAttribute & attr ) {
* switch( attr ) {
* case PLG_NAME:
* return tr("A foo plugins");
* case PLG_DESCRIPTION:
* return tr("Just a foo plugins that do nothing.");
* case PLG_AUTHOR:
* return "Ulrich Van Den Hekke";
* case PLG_VERSION:
* return "0.1";
* case PLG_LICENCE:
* return "GPL v2.0 or later";
* }
* return QVariant();
* switch( attr ) {
* case PLG_NAME:
* return tr("A foo plugins");
* case PLG_DESCRIPTION:
* return tr("Just a foo plugins that do nothing.");
* case PLG_AUTHOR:
* return "Ulrich Van Den Hekke";
* case PLG_VERSION:
* return "0.1";
* case PLG_LICENCE:
* return "GPL v2.0 or later";
* }
* return QVariant();
* }
* Q_EXPORT_PLUGIN2(fooplugin, FooPlugin)
* \endcode
@ -104,13 +104,13 @@
*
* \code
* QList&lt; QPair&lt;QString,QString&gt; &gt; CVSPlugin::pluginTools() {
* QList&lt; QPair&lt;QString,QString&gt; &gt; tools;
* QList&lt; QPair&lt;QString,QString&gt; &gt; tools;
* #ifdef Q_WS_WIN
* tools.append( qMakePair( QString("mytool"), QString("%1/Tool/mytool.exe").arg( "C:/Program Files" ) ) );
* tools.append( qMakePair( QString("mytool"), QString("%1/Tool/mytool.exe").arg( "C:/Program Files" ) ) );
* #else
* tools.append( qMakePair( QString("cvs"), QString("/usr/bin/mytool") ) );
* tools.append( qMakePair( QString("cvs"), QString("/usr/bin/mytool") ) );
* #endif // Q_WS_WIN
* return tools;
* return tools;
* }
* \endcode
*
@ -126,19 +126,19 @@
*
* \code
* class FooPlugin : public QObject, public IRCSPlugin {
* Q_OBJECT
* Q_INTERFACES(IXinxPlugin)
* Q_INTERFACES(IRCSPlugin)
* Q_OBJECT
* Q_INTERFACES(IXinxPlugin)
* Q_INTERFACES(IRCSPlugin)
* public:
* FooPlugin();
* virtual ~FooPlugin();
* FooPlugin();
* virtual ~FooPlugin();
*
* virtual bool initializePlugin( const QString & lang );
* virtual QVariant getPluginAttribute( const enum IXinxPlugin::PluginAttribute & attr );
* virtual bool initializePlugin( const QString & lang );
* virtual QVariant getPluginAttribute( const enum IXinxPlugin::PluginAttribute & attr );
*
* virtual QStringList rcs();
* virtual QString descriptionOfRCS( const QString & rcs );
* virtual RCS * createRCS( const QString & rcs, const QString & basePath );
* virtual QStringList rcs();
* virtual QString descriptionOfRCS( const QString & rcs );
* virtual RCS * createRCS( const QString & rcs, const QString & basePath );
* };
* \endcode
*
@ -146,20 +146,20 @@
*
* \code
* QStringList FooPlugin::rcs() {
* return QStringList() << "foo";
* return QStringList() << "foo";
* }
*
* QString FooPlugin::descriptionOfRCS( const QString & rcs ) {
* if( rcs.toLower() == "foo" )
* return tr( "Foo - Foo Version System" );
* return QString();
* if( rcs.toLower() == "foo" )
* return tr( "Foo - Foo Version System" );
* return QString();
* }
* RCS * FooPlugin::createRCS( const QString & rcs, const QString & basePath ) {
* if( rcs.toLower() == "foo" ) {
* return new RCS_Foo( basePath );
* }
* return NULL;
* if( rcs.toLower() == "foo" ) {
* return new RCS_Foo( basePath );
* }
* return NULL;
* }
* \endcode
*
@ -167,20 +167,20 @@
*
* \code
* class RCS_Foo : public RCS {
* Q_OBJECT
* Q_OBJECT
* public:
* RCS_Foo( const QString & base );
* virtual ~RCS_Foo();
*
* virtual struct_rcs_infos infos( const QString & path );
* virtual RCS::FilesOperation operations( const QStringList & path );
* virtual void update( const QStringList & path );
* virtual void commit( const FilesOperation & path, const QString & message );
* virtual void add( const QStringList & path );
* virtual void remove( const QStringList & path );
* virtual void updateToRevision( const QString & path, const QString & revision, QString * content = 0 );
* RCS_Foo( const QString & base );
* virtual ~RCS_Foo();
*
* virtual struct_rcs_infos infos( const QString & path );
* virtual RCS::FilesOperation operations( const QStringList & path );
* virtual void update( const QStringList & path );
* virtual void commit( const FilesOperation & path, const QString & message );
* virtual void add( const QStringList & path );
* virtual void remove( const QStringList & path );
* virtual void updateToRevision( const QString & path, const QString & revision, QString * content = 0 );
* public slots:
* virtual void abort();
* virtual void abort();
* private slots:
* private:
* };
@ -199,13 +199,13 @@
*
* \code
* class FooPlugin : public QObject, public IRCSPlugin, public IRCSPluginProjectConfiguration {
* Q_OBJECT
* Q_INTERFACES(IXinxPlugin)
* Q_INTERFACES(IRCSPlugin)
* Q_INTERFACES(IRCSPluginProjectConfiguration)
* Q_OBJECT
* Q_INTERFACES(IXinxPlugin)
* Q_INTERFACES(IRCSPlugin)
* Q_INTERFACES(IRCSPluginProjectConfiguration)
* public:
* FooPlugin();
* virtual ~FooPlugin();
* FooPlugin();
* virtual ~FooPlugin();
* \endcode
*
* Methods \e IXinxPluginConfiguration::createSettingsDialog() and \e IXinxPluginProjectConfiguration::createProjectSettingsPage()
@ -226,25 +226,25 @@
*
* \code
* bool loadProjectSettingsPage( QWidget * widget ) {
* FooProjectImpl * page = qobject_cast<FooProjectImpl*>( widget );
* Q_ASSERT( page );
* FooProjectImpl * page = qobject_cast<FooProjectImpl*>( widget );
* Q_ASSERT( page );
*
* XinxProject::ProjectOptions options = XINXProjectManager::self()->project()->options();
* page->m_monoption->setChecked( options.testFlag( XinxProject::hasSpecifiques ) );
* return true;
* XinxProject::ProjectOptions options = XINXProjectManager::self()->project()->options();
* page->m_monoption->setChecked( options.testFlag( XinxProject::hasSpecifiques ) );
* return true;
* }
*
* bool saveProjectSettingsPage( QWidget * widget ) {
* FooProjectImpl * page = qobject_cast<FooProjectImpl*>( widget );
* Q_ASSERT( page );
*
* XinxProject::ProjectOptions options = XINXProjectManager::self()->project()->options();
* if( page->m_monoption->isChecked() )
* options |= XinxProject::hasSpecifiques;
* else
* options &= ~XinxProject::hasSpecifiques;
* XINXProjectManager::self()->project()->setOptions( options );
* return true;
* FooProjectImpl * page = qobject_cast<FooProjectImpl*>( widget );
* Q_ASSERT( page );
*
* XinxProject::ProjectOptions options = XINXProjectManager::self()->project()->options();
* if( page->m_monoption->isChecked() )
* options |= XinxProject::hasSpecifiques;
* else
* options &= ~XinxProject::hasSpecifiques;
* XINXProjectManager::self()->project()->setOptions( options );
* return true;
* }
* \endcode
*
@ -305,6 +305,10 @@ private:
static XINXStaticDeleter * s_self;
};
#define STRINGIFY(x) #x
#define TOSTRING(x) STRINGIFY(x)
#define VERSION_STRING "v" TOSTRING(VERSION_MAJOR) "." TOSTRING(VERSION_MINOR) "." TOSTRING(VERSION_RELEASE)
/*!
* Numbre of maximum recent file that can be opened
*/

14
framework/editors/textfileeditor.cpp

@ -57,12 +57,12 @@
/* TextFileEditor */
#ifdef Q_WS_X11
# define DEFAULT_EOL TextFileEditor::UnixEndOfLine
# define DEFAULT_EOL TextFileEditor::UnixEndOfLine
#else
#ifdef Q_WS_MAC
# define DEFAULT_EOL TextFileEditor::MacEndOfLine
# define DEFAULT_EOL TextFileEditor::MacEndOfLine
#else
# define DEFAULT_EOL TextFileEditor::WindowsEndOfLine
# define DEFAULT_EOL TextFileEditor::WindowsEndOfLine
#endif
#endif
@ -344,7 +344,7 @@ void TextFileEditor::replace(const QString & from, const QString & to, SearchOpt
return;
}
QRegExp expression(from);
QRegExp expression(from);
expression.indexIn(m_cursorStart.selectedText());
QStringList list = expression.capturedTexts();
QString result(to);
@ -402,7 +402,7 @@ void TextFileEditor::errorChanged()
const QString ctxt = lastFileName().isEmpty() ? m_uuid : lastFileName();
foreach(ErrorManager::Error err, ErrorManager::self()->errors().value(ctxt))
{
if(! lines.contains(err.line))
if (! lines.contains(err.line))
lines << err.line - 1;
}
textEdit()->setErrors(lines);
@ -456,7 +456,7 @@ bool TextFileEditor::autoIndent()
ContentView2::Node TextFileEditor::rootNode() const
{
if(m_file.isValid(ContentView2::Manager::self()->database()))
if (m_file.isValid(ContentView2::Manager::self()->database()))
{
int rootId = m_file.file(ContentView2::Manager::self()->database()).rootId();
return ContentView2::Node(ContentView2::Manager::self()->database(), rootId);
@ -544,7 +544,7 @@ void TextFileEditor::searchWord(const QString & word)
if (n.isValid())
{
ContentView2::File file = n.file(ContentView2::Manager::self()->database());
if(file.isCached())
if (file.isCached())
emit open(file.path(), n.line());
else
emit open(QString(), n.line());

20
framework/editors/xinxcodeedit.cpp

@ -52,9 +52,9 @@
/*!
* Definition of the characters that can't be in a word.
*/
#define EOW "~!@$#%^&*()+{}|\"<>?,/;'[]\\="
#define EOWREGEXP "[^A-Za-z0-9_:\\-]"
#define EOWREGEXPDOT "[^A-Za-z0-9_:\\-\\.]"
#define EOW "~!@$#%^&*()+{}|\"<>?,/;'[]\\="
#define EOWREGEXP "[^A-Za-z0-9_:\\-]"
#define EOWREGEXPDOT "[^A-Za-z0-9_:\\-\\.]"
/* XinxCodeEdit */
@ -541,16 +541,16 @@ void XinxCodeEdit::gotoLine(int line)
{
/* Five line before */
QDocumentCursor cursorB(m_editor->editor()->document(), line - 5);
if(!cursorB.isNull())
if (!cursorB.isNull())
m_editor->editor()->setCursor(cursorB);
/* Five line after */
QDocumentCursor cursorA(m_editor->editor()->document(), line + 5);
if(!cursorA.isNull())
if (!cursorA.isNull())
m_editor->editor()->setCursor(cursorA);
QDocumentCursor cursor(m_editor->editor()->document(), line - 1);
if(!cursor.isNull())
if (!cursor.isNull())
m_editor->editor()->setCursor(cursor);
}
@ -583,8 +583,8 @@ void XinxCodeEdit::moveLineUp()
QDocumentCursor cursor(textCursor());
int selectionLength = 0;
QDocumentCursor selectionStart = cursor.selectionStart(),
selectionEnd = cursor.selectionEnd();
QDocumentCursor selectionStart = cursor.selectionStart(),
selectionEnd = cursor.selectionEnd();
selectionStart.setAutoUpdated(false);
selectionEnd.setAutoUpdated(false);
@ -626,8 +626,8 @@ void XinxCodeEdit::moveLineDown()
QDocumentCursor cursor(textCursor());
int selectionLength = 0;
QDocumentCursor selectionStart = cursor.selectionStart(),
selectionEnd = cursor.selectionEnd();
QDocumentCursor selectionStart = cursor.selectionStart(),
selectionEnd = cursor.selectionEnd();
if (selectionEnd.isValid()) selectionLength = cursor.selectedText().length();
if (selectionEnd.columnNumber() == 0) selectionEnd.movePosition(1, QDocumentCursor::Left);

8
framework/editors/xinxlanguagefactory.cpp

@ -29,11 +29,11 @@
XinxLanguageFactory::XinxLanguageFactory(XinxFormatScheme *fmt, XINXConfig *p) : QLanguageFactory(fmt, p)
{
/* QLanguageFactory::LangData data;
QNFADefinition::load( ":/qcodeedit/lan/xml.qnfa", &data, XINXConfig::self()->formatFactory()->scheme( "XML" ) );
XINXConfig::self()->languageFactory()->addLanguage(data);
/* QLanguageFactory::LangData data;
QNFADefinition::load( ":/qcodeedit/lan/xml.qnfa", &data, XINXConfig::self()->formatFactory()->scheme( "XML" ) );
XINXConfig::self()->languageFactory()->addLanguage(data);
*/
// addDefinitionPath( ":/qcodeedit/lan" );
// addDefinitionPath( ":/qcodeedit/lan" );
}
XinxLanguageFactory::~XinxLanguageFactory()

2
framework/plugins/plugininterfaces.h

@ -110,7 +110,7 @@ public:
* Create a content view parser, this content view parser will any file (of the correct type of course)
* If the parser is null, no content view will be load.
*/
virtual ContentView2::Parser * createParser( const QString & type ) = 0;
virtual ContentView2::Parser * createParser(const QString & type) = 0;
};
/*!

12
framework/project/xinxproject.cpp

@ -303,9 +303,9 @@ PrivateXinxProject::~PrivateXinxProject()
PrivateXinxProject& PrivateXinxProject::operator=(const PrivateXinxProject& p)
{
m_projectName = p.m_projectName;
m_projectPath = p.m_projectPath;
m_projectRCS = p.m_projectRCS;
m_projectName = p.m_projectName;
m_projectPath = p.m_projectPath;
m_projectRCS = p.m_projectRCS;
return *this;
}
@ -436,7 +436,7 @@ void XinxProject::loadFromFile(const QString & filename)
throw XinxProjectException(tr("The project can't be opened. Please use the XINX Project Wizard."), true);
if( QFileInfo(filename).isRelative() )
if (QFileInfo(filename).isRelative())
{
d->m_fileName = QDir(QDir::current().absoluteFilePath(filename)).canonicalPath();
}
@ -448,8 +448,8 @@ void XinxProject::loadFromFile(const QString & filename)
// Load values
d->m_projectName = PrivateXinxProject::getValue(document, "name");
d->m_projectPath = QFileInfo(d->m_fileName).absoluteDir().absoluteFilePath(PrivateXinxProject::getValue(document, "project"));
d->m_projectRCS = PrivateXinxProject::getValue(document, "rcs");
d->m_activatedPlugin = PrivateXinxProject::loadList(document, "activatedPlugin", "name");
d->m_projectRCS = PrivateXinxProject::getValue(document, "rcs");
d->m_activatedPlugin = PrivateXinxProject::loadList(document, "activatedPlugin", "name");
QDomElement propertiesElement = root.firstChildElement("properties");

4
framework/scripts/scriptmanager.cpp

@ -40,9 +40,9 @@
/* Constante */
#if QT_VERSION <= 0x040500
# define UndefinedValue QScriptValue()
# define UndefinedValue QScriptValue()
#else
# define UndefinedValue QScriptValue::UndefinedValue
# define UndefinedValue QScriptValue::UndefinedValue
#endif

10
framework/snipets/basesnipetitemmodel.cpp

@ -220,11 +220,11 @@ QModelIndex BaseSnipetItemModel::index(int row, int column, const QModelIndex &
*
* This method return more information that the default implementation in QAbstractItemModel.
* \param role If the role have BaseSnipetItemModel::SnipetIdRole, data() returns the id of the snipet
or id of the category.
If the role have BaseSnipetItemModel::SnipetTypeRole, data() returns \e CATEGORY or
\e SNIPET to tell if the index is a Category or a Snipet.(String form)
If the role have BaseSnipetItemModel::SnipetParentIdRole, data() returns the parent
identifier of the index.
or id of the category.
If the role have BaseSnipetItemModel::SnipetTypeRole, data() returns \e CATEGORY or
\e SNIPET to tell if the index is a Category or a Snipet.(String form)
If the role have BaseSnipetItemModel::SnipetParentIdRole, data() returns the parent
identifier of the index.
* \param index The index where data must search information.
* \return Information stored in a QVariant.
*/

6
framework/utils/treeproxyitemmodel.cpp

@ -69,7 +69,7 @@
TreeProxyItemModel::TreeProxyItemModel(QObject * parent) : QAbstractProxyModel(parent), m_sourceColumnCount(0), m_resetModel(false)
{
#ifndef _XINX_RELEASE_MODE_
// connect( ExceptionManager::self(), SIGNAL(errorTriggered()), this, SLOT(printMapping()) );
// connect( ExceptionManager::self(), SIGNAL(errorTriggered()), this, SLOT(printMapping()) );
#endif
}
@ -365,8 +365,8 @@ QModelIndex TreeProxyItemModel::mapFromSource(const QModelIndex & sourceIndex) c
Mapping * parentMapping = getMapping(parentId);
Q_ASSERT(parentMapping);
int proxyRow = parentMapping->childs.indexOf(id),
proxyColumn = sourceIndex.column();
int proxyRow = parentMapping->childs.indexOf(id),
proxyColumn = sourceIndex.column();
return createIndex(proxyRow, proxyColumn, parentMapping);
}

6
framework/utils/xsltparser.cpp

@ -174,10 +174,10 @@ const QList<XsltParser::ErrorMessage> & XsltParser::errors() const
}
/*bool XsltParser::loadStylesheet( const QByteArray & data ) {
xmlDocPtr xslDoc = xmlParseMemory( data, data.size() );
d->m_stylesheet = xsltParseStylesheetDoc( xslDoc );
xmlDocPtr xslDoc = xmlParseMemory( data, data.size() );
d->m_stylesheet = xsltParseStylesheetDoc( xslDoc );
return d->m_stylesheet;
return d->m_stylesheet;
}*/
bool XsltParser::loadStylesheet(const QString & filename)

2
plugins/core/docks/datastream/xmlpresentationdockthread.cpp

@ -223,7 +223,7 @@ void XmlPresentationDockThread::setComboToolTip(const QString & filename)
m_xmlPresentationWidget->m_presentationComboBox->setToolTip(
tr("File name : %1\n"
"Size : %2 %3b\n"
"File date : %4") .arg(file.canonicalFilePath())
"File date : %4") .arg(file.canonicalFilePath())
.arg(filesize, 0, 'f', 2).arg(unite)
.arg(file.lastModified().toString())
);

2
plugins/core/editors/models/xq/xquery_keyword.cpp

@ -47,7 +47,7 @@ XQueryKeyword::XQueryKeyword() : QObject()
m_keywords.insert("xs:string", "buildin");
m_keywords.insert("xs:boolean", "buildin");
m_keywords.insert("xs:decimal", "buildin");
m_keywords.insert("xs:float", "buildin");
m_keywords.insert("xs:float", "buildin");
m_keywords.insert("xs:double", "buildin");
m_keywords.insert("xs:duration", "buildin");
m_keywords.insert("xs:dateTime", "buildin");