summaryrefslogtreecommitdiffstats
path: root/languages/bash/bashsupport_part.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit114a878c64ce6f8223cfd22d76a20eb16d177e5e (patch)
treeacaf47eb0fa12142d3896416a69e74cbf5a72242 /languages/bash/bashsupport_part.h
downloadtdevelop-114a878c64ce6f8223cfd22d76a20eb16d177e5e.tar.gz
tdevelop-114a878c64ce6f8223cfd22d76a20eb16d177e5e.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'languages/bash/bashsupport_part.h')
-rw-r--r--languages/bash/bashsupport_part.h81
1 files changed, 81 insertions, 0 deletions
diff --git a/languages/bash/bashsupport_part.h b/languages/bash/bashsupport_part.h
new file mode 100644
index 00000000..20c11c4e
--- /dev/null
+++ b/languages/bash/bashsupport_part.h
@@ -0,0 +1,81 @@
+/*
+ * Copyright (C) 2003 Ian Reinhart Geiser <geiseri@kde.org>
+ */
+
+
+#ifndef __KDEVPART_BASHSUPPORT_H__
+#define __KDEVPART_BASHSUPPORT_H__
+
+
+#include <qguardedptr.h>
+
+#include <kprocess.h>
+#include <kdialogbase.h>
+
+#include <codemodel.h>
+#include <kdevplugin.h>
+#include <kdevlanguagesupport.h>
+
+#include <ktexteditor/editinterface.h>
+#include <ktexteditor/viewcursorinterface.h>
+#include <ktexteditor/codecompletioninterface.h>
+
+//class BashSupportWidget;
+
+class BashCodeCompletion : QObject
+{
+ Q_OBJECT
+ public:
+ BashCodeCompletion();
+ ~BashCodeCompletion();
+ void setActiveEditorPart(KParts::Part*);
+ void setVars(QStringList);
+ QValueList<KTextEditor::CompletionEntry> getVars(const QString& textHint);
+
+ public slots:
+ void cursorPositionChanged();
+ void completionBoxHidden();
+ void completionBoxAbort();
+
+ private:
+ QStringList m_vars;
+ bool m_argWidgetShow;
+ bool m_completionBoxShow;
+ KTextEditor::EditInterface *m_editInterface;
+ KTextEditor::CodeCompletionInterface *m_codeInterface;
+ KTextEditor::ViewCursorInterface *m_cursorInterface;
+};
+
+class BashSupportPart : public KDevLanguageSupport
+{
+ Q_OBJECT
+ public:
+ BashSupportPart(QObject *parent, const char *name, const QStringList &);
+ virtual ~BashSupportPart();
+
+ protected:
+ virtual Features features();
+ virtual KMimeType::List mimeTypes();
+
+ private slots:
+ void slotRun();
+ void projectConfigWidget(KDialogBase *dlg);
+ void projectOpened();
+ void projectClosed();
+ void savedFile(const KURL &fileName);
+ void addedFilesToProject(const QStringList &fileList);
+ void removedFilesFromProject(const QStringList &fileList);
+ void parse();
+ void slotActivePartChanged(KParts::Part *part);
+
+ private:
+ void startApplication(const QString &program);
+ QString interpreter();
+ void parse(const QString &fileName);
+ void addAttribute(const QString &name, FileDom file, uint line);
+ BashCodeCompletion *m_cc;
+ QStringList m_vars;
+
+};
+
+#endif