Changeset View
Changeset View
Standalone View
Standalone View
addons/symbolviewer/plugin_katesymbolviewer.cpp
Show First 20 Lines • Show All 296 Lines • ▼ Show 20 Line(s) | 293 | else if (hlModeName == QLatin1String("Ruby")) | |||
---|---|---|---|---|---|
297 | else if (hlModeName == QLatin1String("xslt")) | 297 | else if (hlModeName == QLatin1String("xslt")) | ||
298 | parseXsltSymbols(); | 298 | parseXsltSymbols(); | ||
299 | else if (hlModeName == QLatin1String("Bash")) | 299 | else if (hlModeName == QLatin1String("Bash")) | ||
300 | parseBashSymbols(); | 300 | parseBashSymbols(); | ||
301 | else if (hlModeName == QLatin1String("ActionScript 2.0") || | 301 | else if (hlModeName == QLatin1String("ActionScript 2.0") || | ||
302 | hlModeName == QLatin1String("JavaScript") || | 302 | hlModeName == QLatin1String("JavaScript") || | ||
303 | hlModeName == QLatin1String("QML")) | 303 | hlModeName == QLatin1String("QML")) | ||
304 | parseEcmaSymbols(); | 304 | parseEcmaSymbols(); | ||
305 | else | 305 | else { | ||
306 | new QTreeWidgetItem(m_symbols, QStringList(i18n("Sorry. Language not supported yet") ) ); | 306 | QTreeWidgetItem *node = new QTreeWidgetItem(m_symbols); | ||
307 | node->setText(0, i18n("Sorry, not supported yet!")); | ||||
308 | // Setting invalid line number avoid jump to top of document when clicked | ||||
309 | node->setText(1, QLatin1String("-1")); | ||||
310 | node = new QTreeWidgetItem(m_symbols); | ||||
311 | node->setText(0, i18n("File type: %1", hlModeName)); | ||||
312 | node->setText(1, QLatin1String("-1")); | ||||
313 | } | ||||
307 | 314 | | |||
308 | m_oldCursorLine = -1; | 315 | m_oldCursorLine = -1; | ||
309 | updateCurrTreeItem(); | 316 | updateCurrTreeItem(); | ||
310 | if (m_sort->isChecked()) { | 317 | if (m_sort->isChecked()) { | ||
311 | m_symbols->setSortingEnabled(true); | 318 | m_symbols->setSortingEnabled(true); | ||
312 | m_symbols->sortItems(0, sortOrder); | 319 | m_symbols->sortItems(0, sortOrder); | ||
313 | } | 320 | } | ||
314 | } | 321 | } | ||
Show All 21 Lines | |||||
336 | { | 343 | { | ||
337 | //qDebug()<<"~KatePluginSymbolViewer"; | 344 | //qDebug()<<"~KatePluginSymbolViewer"; | ||
338 | } | 345 | } | ||
339 | 346 | | |||
340 | QObject *KatePluginSymbolViewer::createView (KTextEditor::MainWindow *mainWindow) | 347 | QObject *KatePluginSymbolViewer::createView (KTextEditor::MainWindow *mainWindow) | ||
341 | { | 348 | { | ||
342 | m_view = new KatePluginSymbolViewerView (this, mainWindow); | 349 | m_view = new KatePluginSymbolViewerView (this, mainWindow); | ||
343 | return m_view; | 350 | return m_view; | ||
344 | } | 351 | } | ||
sars: Yep, the double quotes around the name are not needed in this version. | |||||
345 | 352 | | |||
346 | KTextEditor::ConfigPage* KatePluginSymbolViewer::configPage(int, QWidget *parent) | 353 | KTextEditor::ConfigPage* KatePluginSymbolViewer::configPage(int, QWidget *parent) | ||
347 | { | 354 | { | ||
sars: The type is not used anywhere else at the moment.... | |||||
348 | KatePluginSymbolViewerConfigPage* p = new KatePluginSymbolViewerConfigPage(this, parent); | 355 | KatePluginSymbolViewerConfigPage* p = new KatePluginSymbolViewerConfigPage(this, parent); | ||
I just tried this one and got: Sorry, "Normal" not supported yet :) The "Normal" string will not come once we get the plain-text parser in, but I think we need a bit more explanation somehow. Maybe: File type "Normal" not supoertd yet sars: I just tried this one and got: Sorry, "Normal" not supported yet :)
The "Normal" string will… | |||||
349 | 356 | | |||
350 | KConfigGroup config(KSharedConfig::openConfig(), QStringLiteral("PluginSymbolViewer")); | 357 | KConfigGroup config(KSharedConfig::openConfig(), QStringLiteral("PluginSymbolViewer")); | ||
351 | p->viewReturns->setChecked(config.readEntry(QLatin1String("ViewTypes"), false)); | 358 | p->viewReturns->setChecked(config.readEntry(QLatin1String("ViewTypes"), false)); | ||
352 | p->expandTree->setChecked(config.readEntry(QLatin1String("ExpandTree"), false)); | 359 | p->expandTree->setChecked(config.readEntry(QLatin1String("ExpandTree"), false)); | ||
353 | p->treeView->setChecked(config.readEntry(QLatin1String("TreeView"), false)); | 360 | p->treeView->setChecked(config.readEntry(QLatin1String("TreeView"), false)); | ||
354 | p->sortSymbols->setChecked(config.readEntry(QLatin1String("SortSymbols"), false)); | 361 | p->sortSymbols->setChecked(config.readEntry(QLatin1String("SortSymbols"), false)); | ||
355 | connect(p, &KatePluginSymbolViewerConfigPage::configPageApplyRequest, this, &KatePluginSymbolViewer::applyConfig); | 362 | connect(p, &KatePluginSymbolViewerConfigPage::configPageApplyRequest, this, &KatePluginSymbolViewer::applyConfig); | ||
356 | return (KTextEditor::ConfigPage*)p; | 363 | return (KTextEditor::ConfigPage*)p; | ||
▲ Show 20 Lines • Show All 73 Lines • Show Last 20 Lines |
Yep, the double quotes around the name are not needed in this version.