aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarsten Heimrich <karsten.heimrich@qt.io>2016-11-04 11:49:44 +0100
committerKarsten Heimrich <karsten.heimrich@qt.io>2016-11-09 11:02:14 +0000
commit9ebda72a1eea6919838ffe65fcd474c95164e0d6 (patch)
treea0e684cdafe4e85e16e7a9a2d5f2926f096f3d24
parent62ec195844b82a0b1bdb6121797320d7a9d96797 (diff)
Refactor: Move types into matching files
Change-Id: I8849439d4dfc1e1d60ffa889088acf5702a4876e Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
-rw-r--r--src/qtappwrapper/DefaultEditorsServer.cs6
-rw-r--r--src/qtappwrapper/MessageType.cs36
-rw-r--r--src/qtappwrapper/QtAppWrapper.csproj1
-rw-r--r--src/qtarchivegen/QtArchiveGen.csproj2
-rw-r--r--src/qtprojectlib/BuildConfig.cs37
-rw-r--r--src/qtprojectlib/Extensions.cs62
-rw-r--r--src/qtprojectlib/FakeFilter.cs69
-rw-r--r--src/qtprojectlib/FilesToList.cs41
-rw-r--r--src/qtprojectlib/HelperClasses.cs174
-rw-r--r--src/qtprojectlib/InfoDialog.cs89
-rw-r--r--src/qtprojectlib/MainWinWrapper.cs53
-rw-r--r--src/qtprojectlib/ProFileContent.cs80
-rw-r--r--src/qtprojectlib/ProFileOption.cs143
-rw-r--r--src/qtprojectlib/ProSolution.cs61
-rw-r--r--src/qtprojectlib/ProjectExporter.cs191
-rw-r--r--src/qtprojectlib/ProjectMacros.cs37
-rw-r--r--src/qtprojectlib/QMake.cs (renamed from src/qtprojectlib/QMakeProcess.cs)136
-rw-r--r--src/qtprojectlib/QMakeQuery.cs108
-rw-r--r--src/qtprojectlib/QrcItem.cs58
-rw-r--r--src/qtprojectlib/QrcParser.cs62
-rw-r--r--src/qtprojectlib/QrcPrefix.cs66
-rw-r--r--src/qtprojectlib/QtModule.cs87
-rw-r--r--src/qtprojectlib/QtModuleInfo.cs115
-rw-r--r--src/qtprojectlib/QtModules.cs139
-rw-r--r--src/qtprojectlib/QtProjectLib.csproj30
-rw-r--r--src/qtprojectlib/QtVSException.cs41
-rw-r--r--src/qtprojectlib/SR.cs (renamed from src/qtprojectlib/ResClass.cs)52
-rw-r--r--src/qtprojectlib/SRCategoryAttribute.cs48
-rw-r--r--src/qtprojectlib/SRDescriptionAttribute.cs69
-rw-r--r--src/qtprojectlib/Statics.cs2
-rw-r--r--src/qtprojectlib/TemplateType.cs46
-rw-r--r--src/qttemplates/dialogbuttonbottom/DialogButtonBottom.csproj2
-rw-r--r--src/qttemplates/dialogbuttonright/DialogButtonRight.csproj2
-rw-r--r--src/qttemplates/mainwindow/MainWindow.csproj2
-rw-r--r--src/qttemplates/resource/Resource.csproj2
-rw-r--r--src/qttemplates/widget/Widget.csproj2
-rw-r--r--src/qtvstools/AddTranslationDialog.cs42
-rw-r--r--src/qtvstools/ChangeFor.cs32
-rw-r--r--src/qtvstools/Classifier.cs (renamed from src/qtvstools/QmlClassifier.cs)0
-rw-r--r--src/qtvstools/ClassifierClassificationDefinition.cs (renamed from src/qtvstools/QmlClassifierClassificationDefinition.cs)0
-rw-r--r--src/qtvstools/ClassifierDefinitions.cs (renamed from src/qtvstools/QmlClassifierFormat.cs)0
-rw-r--r--src/qtvstools/ClassifierProvider.cs (renamed from src/qtvstools/QmlClassifierProvider.cs)2
-rw-r--r--src/qtvstools/ClassifierTypes.cs (renamed from src/qtvstools/QmlClassifierTypes.cs)0
-rw-r--r--src/qtvstools/CommentToken.cs38
-rw-r--r--src/qtvstools/ContentTypeDefinition.cs (renamed from src/qtvstools/QmlContentTypeDefinition.cs)6
-rw-r--r--src/qtvstools/DefaultEditor.cs39
-rw-r--r--src/qtvstools/DefaultEditorsBase.cs (renamed from src/qtvstools/QtDefaultEditorsHelper.cs)24
-rw-r--r--src/qtvstools/DefaultEditorsHandler.cs9
-rw-r--r--src/qtvstools/FormChangeQtVersion.Designer.cs2
-rw-r--r--src/qtvstools/FormChangeQtVersion.cs2
-rw-r--r--src/qtvstools/FormProjectQtSettings.Designer.cs2
-rw-r--r--src/qtvstools/FormVSQtSettings.Designer.cs2
-rw-r--r--src/qtvstools/JsKeywordToken.cs38
-rw-r--r--src/qtvstools/KeywordToken.cs38
-rw-r--r--src/qtvstools/MultilineCommentToken.cs69
-rw-r--r--src/qtvstools/OtherToken.cs38
-rw-r--r--src/qtvstools/ProjectQtSettings.cs (renamed from src/qtvstools/QtSettings.cs)0
-rw-r--r--src/qtvstools/PropertyToken.cs69
-rw-r--r--src/qtvstools/QmlToken.cs165
-rw-r--r--src/qtvstools/Qt4DefaultEditors.cs39
-rw-r--r--src/qtvstools/Qt5DefaultEditors.cs39
-rw-r--r--src/qtvstools/QtHelpLinkChooser.xaml.cs5
-rw-r--r--src/qtvstools/QtHelpMenu.cs33
-rw-r--r--src/qtvstools/QtVsTools.csproj41
-rw-r--r--src/qtvstools/QtVsToolsDefaultEditors.cs39
-rw-r--r--src/qtvstools/SR.cs (renamed from src/qtvstools/ResClass.cs)52
-rw-r--r--src/qtvstools/SRCategoryAttribute.cs48
-rw-r--r--src/qtvstools/SRDescriptionAttribute.cs69
-rw-r--r--src/qtvstools/StringToken.cs38
-rw-r--r--src/qtvstools/Token.cs42
-rw-r--r--src/qtvstools/TokenType.cs (renamed from src/qtvstools/QmlTokenTypes.cs)0
-rw-r--r--src/qtvstools/TranslationItem.cs73
-rw-r--r--src/qtvstools/TypeToken.cs38
-rw-r--r--src/qtvstools/VsToolsDialogWindow.cs35
-rw-r--r--src/qtwizard/AddClassPage.xaml.cs47
-rw-r--r--src/qtwizard/Class.cs63
-rw-r--r--src/qtwizard/ClassKind.cs36
-rw-r--r--src/qtwizard/IntroPage.xaml.cs1
-rw-r--r--src/qtwizard/NativeMethods.cs41
-rw-r--r--src/qtwizard/QtProjectWizard.csproj7
-rw-r--r--src/qtwizard/SortComboBoxItem.cs41
-rw-r--r--src/qtwizard/UnsafeNativeMethods.cs41
-rw-r--r--src/qtwizard/WizardWindow.xaml.cs16
83 files changed, 2493 insertions, 1159 deletions
diff --git a/src/qtappwrapper/DefaultEditorsServer.cs b/src/qtappwrapper/DefaultEditorsServer.cs
index 0d242bc2..43d6d460 100644
--- a/src/qtappwrapper/DefaultEditorsServer.cs
+++ b/src/qtappwrapper/DefaultEditorsServer.cs
@@ -38,12 +38,6 @@ using System.Threading;
namespace QtAppWrapper
{
- enum MessageType
- {
- Data,
- Hello
- }
-
class DefaultEditorsServer
{
public static void StartListen()
diff --git a/src/qtappwrapper/MessageType.cs b/src/qtappwrapper/MessageType.cs
new file mode 100644
index 00000000..087b5689
--- /dev/null
+++ b/src/qtappwrapper/MessageType.cs
@@ -0,0 +1,36 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt VS Tools.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+namespace QtAppWrapper
+{
+ enum MessageType
+ {
+ Data,
+ Hello
+ }
+}
diff --git a/src/qtappwrapper/QtAppWrapper.csproj b/src/qtappwrapper/QtAppWrapper.csproj
index 2fb64494..ec9a5e87 100644
--- a/src/qtappwrapper/QtAppWrapper.csproj
+++ b/src/qtappwrapper/QtAppWrapper.csproj
@@ -42,6 +42,7 @@
<ItemGroup>
<Compile Include="DefaultEditorsHandler.cs" />
<Compile Include="DefaultEditorsServer.cs" />
+ <Compile Include="MessageType.cs" />
<Compile Include="NativeMethods.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
diff --git a/src/qtarchivegen/QtArchiveGen.csproj b/src/qtarchivegen/QtArchiveGen.csproj
index 02f3052e..ab4c5d34 100644
--- a/src/qtarchivegen/QtArchiveGen.csproj
+++ b/src/qtarchivegen/QtArchiveGen.csproj
@@ -54,4 +54,4 @@
<Target Name="AfterBuild">
</Target>
-->
-</Project> \ No newline at end of file
+</Project>
diff --git a/src/qtprojectlib/BuildConfig.cs b/src/qtprojectlib/BuildConfig.cs
new file mode 100644
index 00000000..449ac6b2
--- /dev/null
+++ b/src/qtprojectlib/BuildConfig.cs
@@ -0,0 +1,37 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt VS Tools.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+namespace QtProjectLib
+{
+ public struct BuildConfig
+ {
+ public const uint Both = 0x03;
+ public const uint Release = 0x01;
+ public const uint Debug = 0x02;
+ }
+}
diff --git a/src/qtprojectlib/Extensions.cs b/src/qtprojectlib/Extensions.cs
new file mode 100644
index 00000000..bdc9a240
--- /dev/null
+++ b/src/qtprojectlib/Extensions.cs
@@ -0,0 +1,62 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt VS Tools.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+using System;
+
+namespace QtProjectLib
+{
+ public static class Extensions
+ {
+ public static string Quoute(this string input)
+ {
+ if (!input.StartsWith("\"", StringComparison.Ordinal))
+ input = "\"" + input;
+ if (!input.EndsWith("\"", StringComparison.Ordinal))
+ input += "\"";
+ return input;
+ }
+
+ public static string Replace(this string original, string oldValue, string newValue,
+ StringComparison comparison)
+ {
+ newValue = newValue ?? string.Empty;
+ if (string.IsNullOrEmpty(original) || string.IsNullOrEmpty(oldValue)
+ || string.Equals(oldValue, newValue, comparison)) {
+ return original;
+ }
+
+ int pos = 0, index = 0;
+ var result = new System.Text.StringBuilder();
+ while ((index = original.IndexOf(oldValue, pos, comparison)) >= 0) {
+ result.Append(original, pos, index - pos).Append(newValue);
+ pos = index + oldValue.Length;
+ }
+ return result.Append(original, pos, original.Length - pos).ToString();
+ }
+ }
+}
diff --git a/src/qtprojectlib/FakeFilter.cs b/src/qtprojectlib/FakeFilter.cs
new file mode 100644
index 00000000..fa2fea50
--- /dev/null
+++ b/src/qtprojectlib/FakeFilter.cs
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt VS Tools.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+namespace QtProjectLib
+{
+ public class FakeFilter
+ {
+ private string uniqueIdentifier = string.Empty;
+ private string name = string.Empty;
+ private string filter = string.Empty;
+ private bool parseFiles = true;
+ private bool sccFiles = true;
+
+ public string UniqueIdentifier
+ {
+ get { return uniqueIdentifier; }
+ set { uniqueIdentifier = value; }
+ }
+
+ public string Name
+ {
+ get { return name; }
+ set { name = value; }
+ }
+
+ public string Filter
+ {
+ get { return filter; }
+ set { filter = value; }
+ }
+
+ public bool ParseFiles
+ {
+ get { return parseFiles; }
+ set { parseFiles = value; }
+ }
+
+ public bool SCCFiles
+ {
+ get { return sccFiles; }
+ set { sccFiles = value; }
+ }
+ }
+}
diff --git a/src/qtprojectlib/FilesToList.cs b/src/qtprojectlib/FilesToList.cs
new file mode 100644
index 00000000..7fa24409
--- /dev/null
+++ b/src/qtprojectlib/FilesToList.cs
@@ -0,0 +1,41 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt VS Tools.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+namespace QtProjectLib
+{
+ public enum FilesToList
+ {
+ FL_Resources = 1,
+ FL_CppFiles = 2,
+ FL_HFiles = 3,
+ FL_UiFiles = 4,
+ FL_Generated = 5,
+ FL_Translation = 6,
+ FL_WinResource = 7
+ }
+}
diff --git a/src/qtprojectlib/HelperClasses.cs b/src/qtprojectlib/HelperClasses.cs
deleted file mode 100644
index e754113f..00000000
--- a/src/qtprojectlib/HelperClasses.cs
+++ /dev/null
@@ -1,174 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt VS Tools.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-using System;
-using System.Windows.Forms;
-
-namespace QtProjectLib
-{
- public static class Extensions
- {
- public static string Quoute(this string input)
- {
- if (!input.StartsWith("\"", StringComparison.Ordinal))
- input = "\"" + input;
- if (!input.EndsWith("\"", StringComparison.Ordinal))
- input += "\"";
- return input;
- }
-
- public static string Replace(this string original, string oldValue, string newValue,
- StringComparison comparison)
- {
- newValue = newValue ?? string.Empty;
- if (string.IsNullOrEmpty(original) || string.IsNullOrEmpty(oldValue)
- || string.Equals(oldValue, newValue, comparison)) {
- return original;
- }
-
- int pos = 0, index = 0;
- var result = new System.Text.StringBuilder();
- while ((index = original.IndexOf(oldValue, pos, comparison)) >= 0) {
- result.Append(original, pos, index - pos).Append(newValue);
- pos = index + oldValue.Length;
- }
- return result.Append(original, pos, original.Length - pos).ToString();
- }
- }
-
- public static class ProjectMacros
- {
- public const string Name = "%(Filename)";
- public const string FileName = "%(Identity)";
- public const string Path = "%(FullPath)";
- }
-
- public class FakeFilter
- {
- private string uniqueIdentifier = string.Empty;
- private string name = string.Empty;
- private string filter = string.Empty;
- private bool parseFiles = true;
- private bool sccFiles = true;
-
- public string UniqueIdentifier
- {
- get { return uniqueIdentifier; }
- set { uniqueIdentifier = value; }
- }
-
- public string Name
- {
- get { return name; }
- set { name = value; }
- }
-
- public string Filter
- {
- get { return filter; }
- set { filter = value; }
- }
-
- public bool ParseFiles
- {
- get { return parseFiles; }
- set { parseFiles = value; }
- }
-
- public bool SCCFiles
- {
- get { return sccFiles; }
- set { sccFiles = value; }
- }
- }
-
- public struct BuildConfig
- {
- public const uint Both = 0x03;
- public const uint Release = 0x01;
- public const uint Debug = 0x02;
- }
-
- public enum FilesToList
- {
- FL_Resources = 1,
- FL_CppFiles = 2,
- FL_HFiles = 3,
- FL_UiFiles = 4,
- FL_Generated = 5,
- FL_Translation = 6,
- FL_WinResource = 7
- }
-
- public struct TemplateType
- {
- // project type
- public const uint ProjectType = 0x003; // 0011
- public const uint Application = 0x000; // 0000
- public const uint DynamicLibrary = 0x001; // 0001
- public const uint StaticLibrary = 0x002; // 0010
- // subsystem
- public const uint GUISystem = 0x004; // 0100
- public const uint ConsoleSystem = 0x008; // 1000
- // qt3
- public const uint Qt3Project = 0x010; //10000
- // plugin
- public const uint PluginProject = 0x100;
- }
-
- [Serializable]
- public class QtVSException : ApplicationException
- {
- public QtVSException(string message)
- : base(message)
- {
- }
- }
-
- public class MainWinWrapper : IWin32Window
- {
- private readonly EnvDTE.DTE dteObject;
-
- public MainWinWrapper(EnvDTE.DTE dte)
- {
- dteObject = dte;
- }
-
- #region IWin32Window Members
- public IntPtr Handle
- {
- get
- {
- if (dteObject != null)
- return new IntPtr(dteObject.MainWindow.HWnd);
- return new IntPtr(0);
- }
- }
- #endregion
- }
-}
diff --git a/src/qtprojectlib/InfoDialog.cs b/src/qtprojectlib/InfoDialog.cs
new file mode 100644
index 00000000..a7a3a72f
--- /dev/null
+++ b/src/qtprojectlib/InfoDialog.cs
@@ -0,0 +1,89 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt VS Tools.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+using System.Windows.Forms;
+
+namespace QtProjectLib
+{
+ class InfoDialog : Form
+ {
+ private Label label1;
+ private ProgressBar progressBar1;
+
+ protected override void Dispose(bool disposing)
+ {
+ base.Dispose(disposing);
+ }
+
+ public InfoDialog(string name)
+ {
+ label1 = new Label();
+ progressBar1 = new ProgressBar();
+ SuspendLayout();
+ //
+ // label1
+ //
+ label1.Location = new System.Drawing.Point(12, 9);
+ label1.Name = "label1";
+ label1.Size = new System.Drawing.Size(370, 13);
+ label1.TabIndex = 0;
+ label1.Text = SR.GetString("QMakeProcess_OpenSolutionFromFile") + name;
+ //
+ // progressBar1
+ //
+ progressBar1.Location = new System.Drawing.Point(13, 28);
+ progressBar1.Name = "progressBar1";
+ progressBar1.Size = new System.Drawing.Size(369, 23);
+ progressBar1.Style = ProgressBarStyle.Marquee;
+ progressBar1.TabIndex = 1;
+ //
+ // Form1
+ //
+ ClientSize = new System.Drawing.Size(394, 67);
+ MinimumSize = new System.Drawing.Size(402, 94);
+ ControlBox = false;
+ Controls.Add(progressBar1);
+ Controls.Add(label1);
+ FormBorderStyle = FormBorderStyle.FixedToolWindow;
+ MaximizeBox = false;
+ MinimizeBox = false;
+ Name = "Form1";
+ ShowInTaskbar = false;
+ Text = SR.GetString("Resources_QtVsTools");
+ StartPosition = FormStartPosition.CenterParent;
+
+ ResumeLayout(false);
+ PerformLayout();
+ }
+
+ public void CloseEventHandler()
+ {
+ Close();
+ }
+ }
+}
diff --git a/src/qtprojectlib/MainWinWrapper.cs b/src/qtprojectlib/MainWinWrapper.cs
new file mode 100644
index 00000000..066b44ad
--- /dev/null
+++ b/src/qtprojectlib/MainWinWrapper.cs
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt VS Tools.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+using System;
+using System.Windows.Forms;
+
+namespace QtProjectLib
+{
+ public class MainWinWrapper : IWin32Window
+ {
+ private readonly EnvDTE.DTE dteObject;
+
+ public MainWinWrapper(EnvDTE.DTE dte)
+ {
+ dteObject = dte;
+ }
+
+ public IntPtr Handle
+ {
+ get
+ {
+ if (dteObject != null)
+ return new IntPtr(dteObject.MainWindow.HWnd);
+ return new IntPtr(0);
+ }
+ }
+ }
+}
diff --git a/src/qtprojectlib/ProFileContent.cs b/src/qtprojectlib/ProFileContent.cs
new file mode 100644
index 00000000..7dbc430d
--- /dev/null
+++ b/src/qtprojectlib/ProFileContent.cs
@@ -0,0 +1,80 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt VS Tools.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+using System.Collections.Generic;
+using Microsoft.VisualStudio.VCProjectEngine;
+
+namespace QtProjectLib
+{
+ internal class ProFileContent
+ {
+ public ProFileContent(VCProject proj)
+ {
+ export = true;
+ vcproj = proj;
+ options = new List<ProFileOption>();
+ }
+
+ public override string ToString()
+ {
+ return vcproj.Name;
+ }
+
+ public VCProject Project
+ {
+ get
+ {
+ return vcproj;
+ }
+ }
+
+ public bool Export
+ {
+ get
+ {
+ return export;
+ }
+ set
+ {
+ export = value;
+ }
+ }
+
+ public List<ProFileOption> Options
+ {
+ get
+ {
+ return options;
+ }
+ }
+
+ private VCProject vcproj;
+ private bool export;
+ private List<ProFileOption> options;
+ }
+}
diff --git a/src/qtprojectlib/ProFileOption.cs b/src/qtprojectlib/ProFileOption.cs
new file mode 100644
index 00000000..0bfed998
--- /dev/null
+++ b/src/qtprojectlib/ProFileOption.cs
@@ -0,0 +1,143 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt VS Tools.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+using System.Collections.Generic;
+
+namespace QtProjectLib
+{
+ internal class ProFileOption
+ {
+ public ProFileOption(string optname)
+ {
+ name = optname;
+ astype = AssignType.AT_PlusEquals;
+ comment = null;
+ shortComment = "Default";
+ incComment = false;
+ newOpt = " \\\r\n ";
+ list = new List<string>();
+ }
+
+ public override string ToString()
+ {
+ return shortComment;
+ }
+
+ public string Comment
+ {
+ get
+ {
+ return comment;
+ }
+ set
+ {
+ comment = value;
+ }
+ }
+
+ public string ShortComment
+ {
+ get
+ {
+ return shortComment;
+ }
+ set
+ {
+ shortComment = value;
+ }
+ }
+
+ public AssignType AssignSymbol
+ {
+ get
+ {
+ return astype;
+ }
+ set
+ {
+ astype = value;
+ }
+ }
+
+ public string NewOption
+ {
+ get
+ {
+ return newOpt;
+ }
+ set
+ {
+ newOpt = value;
+ }
+ }
+
+ public string Name
+ {
+ get
+ {
+ return name;
+ }
+ }
+
+ public List<string> List
+ {
+ get
+ {
+ return list;
+ }
+ }
+
+ public bool IncludeComment
+ {
+ get
+ {
+ return incComment;
+ }
+ set
+ {
+ incComment = value;
+ }
+ }
+
+ public enum AssignType
+ {
+ AT_Equals = 1,
+ AT_PlusEquals = 2, // default
+ AT_MinusEquals = 3,
+ AT_Function = 4
+ }
+
+ private AssignType astype;
+ private string shortComment;
+ private bool incComment;
+ private string comment;
+ private string newOpt;
+ private string name;
+ private List<string> list;
+ }
+}
diff --git a/src/qtprojectlib/ProSolution.cs b/src/qtprojectlib/ProSolution.cs
new file mode 100644
index 00000000..922d99cd
--- /dev/null
+++ b/src/qtprojectlib/ProSolution.cs
@@ -0,0 +1,61 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt VS Tools.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+using System.Collections.Generic;
+using EnvDTE;
+
+namespace QtProjectLib
+{
+ internal class ProSolution
+ {
+ public ProSolution(Solution sln)
+ {
+ prosln = sln;
+ proFiles = new List<ProFileContent>();
+ }
+
+ public List<ProFileContent> ProFiles
+ {
+ get
+ {
+ return proFiles;
+ }
+ }
+
+ public Solution ProjectSolution
+ {
+ get
+ {
+ return prosln;
+ }
+ }
+
+ private List<ProFileContent> proFiles;
+ private Solution prosln;
+ }
+}
diff --git a/src/qtprojectlib/ProjectExporter.cs b/src/qtprojectlib/ProjectExporter.cs
index 90043696..98c1e196 100644
--- a/src/qtprojectlib/ProjectExporter.cs
+++ b/src/qtprojectlib/ProjectExporter.cs
@@ -38,198 +38,9 @@ using System.Windows.Forms;
namespace QtProjectLib
{
- #region Storage Classes
- internal class ProSolution
- {
- public ProSolution(Solution sln)
- {
- prosln = sln;
- proFiles = new List<ProFileContent>();
- }
-
- public List<ProFileContent> ProFiles
- {
- get
- {
- return proFiles;
- }
- }
-
- public Solution ProjectSolution
- {
- get
- {
- return prosln;
- }
- }
-
- private List<ProFileContent> proFiles;
- private Solution prosln;
- }
-
- internal class ProFileOption
- {
- public ProFileOption(string optname)
- {
- name = optname;
- astype = AssignType.AT_PlusEquals;
- comment = null;
- shortComment = "Default";
- incComment = false;
- newOpt = " \\\r\n ";
- list = new List<string>();
- }
-
- public override string ToString()
- {
- return shortComment;
- }
-
- public string Comment
- {
- get
- {
- return comment;
- }
- set
- {
- comment = value;
- }
- }
-
- public string ShortComment
- {
- get
- {
- return shortComment;
- }
- set
- {
- shortComment = value;
- }
- }
-
- public AssignType AssignSymbol
- {
- get
- {
- return astype;
- }
- set
- {
- astype = value;
- }
- }
-
- public string NewOption
- {
- get
- {
- return newOpt;
- }
- set
- {
- newOpt = value;
- }
- }
-
- public string Name
- {
- get
- {
- return name;
- }
- }
-
- public List<string> List
- {
- get
- {
- return list;
- }
- }
-
- public bool IncludeComment
- {
- get
- {
- return incComment;
- }
- set
- {
- incComment = value;
- }
- }
-
- public enum AssignType
- {
- AT_Equals = 1,
- AT_PlusEquals = 2, // default
- AT_MinusEquals = 3,
- AT_Function = 4
- }
-
- private AssignType astype;
- private string shortComment;
- private bool incComment;
- private string comment;
- private string newOpt;
- private string name;
- private List<string> list;
- }
-
- internal class ProFileContent
- {
- public ProFileContent(VCProject proj)
- {
- export = true;
- vcproj = proj;
- options = new List<ProFileOption>();
- }
-
- public override string ToString()
- {
- return vcproj.Name;
- }
-
- public VCProject Project
- {
- get
- {
- return vcproj;
- }
- }
-
- public bool Export
- {
- get
- {
- return export;
- }
- set
- {
- export = value;
- }
- }
-
- public List<ProFileOption> Options
- {
- get
- {
- return options;
- }
- }
-
- private VCProject vcproj;
- private bool export;
- private List<ProFileOption> options;
- }
- #endregion
-
/// <summary>
- /// Summary description for Export.
+ /// Summary description for ProjectExporter.
/// </summary>
-
public class ProjectExporter
{
private DTE dteObject;
diff --git a/src/qtprojectlib/ProjectMacros.cs b/src/qtprojectlib/ProjectMacros.cs
new file mode 100644
index 00000000..f1e7cc3c
--- /dev/null
+++ b/src/qtprojectlib/ProjectMacros.cs
@@ -0,0 +1,37 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt VS Tools.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+namespace QtProjectLib
+{
+ public static class ProjectMacros
+ {
+ public const string Name = "%(Filename)";
+ public const string FileName = "%(Identity)";
+ public const string Path = "%(FullPath)";
+ }
+}
diff --git a/src/qtprojectlib/QMakeProcess.cs b/src/qtprojectlib/QMake.cs
index 5ef7481f..f9342cc4 100644
--- a/src/qtprojectlib/QMakeProcess.cs
+++ b/src/qtprojectlib/QMake.cs
@@ -32,69 +32,9 @@ using System.Diagnostics;
using System.IO;
using System.Text;
using System.Threading;
-using System.Windows.Forms;
namespace QtProjectLib
{
- #region QMake Process
-
- class InfoDialog : Form
- {
- private Label label1;
- private ProgressBar progressBar1;
-
- protected override void Dispose(bool disposing)
- {
- base.Dispose(disposing);
- }
-
- public InfoDialog(string name)
- {
- label1 = new Label();
- progressBar1 = new ProgressBar();
- SuspendLayout();
- //
- // label1
- //
- label1.Location = new System.Drawing.Point(12, 9);
- label1.Name = "label1";
- label1.Size = new System.Drawing.Size(370, 13);
- label1.TabIndex = 0;
- label1.Text = SR.GetString("QMakeProcess_OpenSolutionFromFile") + name;
- //
- // progressBar1
- //
- progressBar1.Location = new System.Drawing.Point(13, 28);
- progressBar1.Name = "progressBar1";
- progressBar1.Size = new System.Drawing.Size(369, 23);
- progressBar1.Style = ProgressBarStyle.Marquee;
- progressBar1.TabIndex = 1;
- //
- // Form1
- //
- ClientSize = new System.Drawing.Size(394, 67);
- MinimumSize = new System.Drawing.Size(402, 94);
- ControlBox = false;
- Controls.Add(progressBar1);
- Controls.Add(label1);
- FormBorderStyle = FormBorderStyle.FixedToolWindow;
- MaximizeBox = false;
- MinimizeBox = false;
- Name = "Form1";
- ShowInTaskbar = false;
- Text = SR.GetString("Resources_QtVsTools");
- StartPosition = FormStartPosition.CenterParent;
-
- ResumeLayout(false);
- PerformLayout();
- }
-
- public void CloseEventHandler()
- {
- Close();
- }
- }
-
class QMake
{
public delegate void ProcessEventHandler();
@@ -279,80 +219,4 @@ namespace QtProjectLib
}
}
}
-
- class QMakeQuery : QMake
- {
- public delegate void EventHandler(string result);
- public event EventHandler ReadyEvent;
- private string queryResult;
-
- public QMakeQuery(VersionInformation vi)
- : base(null, string.Empty, false, vi)
- {
- qtVersionInformation = vi;
- }
-
- public string query(string property)
- {
- ReadyEvent += resultObtained;
- var qmakeThread = new Thread(RunQMakeQuery);
- qmakeThread.Start(property);
- qmakeThread.Join();
- return queryResult;
- }
-
- private void resultObtained(string result)
- {
- queryResult = result;
- }
-
- private void RunQMakeQuery(object property)
- {
- if (property == null)
- return;
-
- var propertyString = property.ToString();
- var result = string.Empty;
-
- qmakeProcess = CreateQmakeProcess("-query " + propertyString.Trim(), qtVersionInformation.qtDir + "\\bin\\qmake", qtVersionInformation.qtDir);
- try {
- if (qmakeProcess.Start()) {
- errOutput = new StringBuilder();
- errOutputLines = 0;
- stdOutput = new StringBuilder();
- stdOutputLines = 0;
- var errorThread = new Thread(ReadStandardError);
- var outputThread = new Thread(ReadStandardOutput);
- errorThread.Start();
- outputThread.Start();
-
- qmakeProcess.WaitForExit();
-
- errorThread.Join();
- outputThread.Join();
-
- errorValue = qmakeProcess.ExitCode;
-
- if (stdOutputLines > 0) {
- result = stdOutput.ToString();
- var dashIndex = result.IndexOf('-');
- if (dashIndex == -1) {
- errorValue = -1;
- result = string.Empty;
- } else {
- result = result.Substring(dashIndex + 1).Trim();
- }
- }
- }
- qmakeProcess.Close();
- } catch (Exception) {
- qmakeProcess = null;
- errorValue = -1;
- } finally {
- InvokeExternalTarget(ReadyEvent, result);
- }
- }
- }
-
- #endregion
}
diff --git a/src/qtprojectlib/QMakeQuery.cs b/src/qtprojectlib/QMakeQuery.cs
new file mode 100644
index 00000000..5dbe59f2
--- /dev/null
+++ b/src/qtprojectlib/QMakeQuery.cs
@@ -0,0 +1,108 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt VS Tools.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+using System;
+using System.Text;
+using System.Threading;
+
+namespace QtProjectLib
+{
+ class QMakeQuery : QMake
+ {
+ public delegate void EventHandler(string result);
+ public event EventHandler ReadyEvent;
+ private string queryResult;
+
+ public QMakeQuery(VersionInformation vi)
+ : base(null, string.Empty, false, vi)
+ {
+ qtVersionInformation = vi;
+ }
+
+ public string query(string property)
+ {
+ ReadyEvent += resultObtained;
+ var qmakeThread = new Thread(RunQMakeQuery);
+ qmakeThread.Start(property);
+ qmakeThread.Join();
+ return queryResult;
+ }
+
+ private void resultObtained(string result)
+ {
+ queryResult = result;
+ }
+
+ private void RunQMakeQuery(object property)
+ {
+ if (property == null)
+ return;
+
+ var propertyString = property.ToString();
+ var result = string.Empty;
+
+ qmakeProcess = CreateQmakeProcess("-query " + propertyString.Trim(), qtVersionInformation.qtDir + "\\bin\\qmake", qtVersionInformation.qtDir);
+ try {
+ if (qmakeProcess.Start()) {
+ errOutput = new StringBuilder();
+ errOutputLines = 0;
+ stdOutput = new StringBuilder();
+ stdOutputLines = 0;
+ var errorThread = new Thread(ReadStandardError);
+ var outputThread = new Thread(ReadStandardOutput);
+ errorThread.Start();
+ outputThread.Start();
+
+ qmakeProcess.WaitForExit();
+
+ errorThread.Join();
+ outputThread.Join();
+
+ errorValue = qmakeProcess.ExitCode;
+
+ if (stdOutputLines > 0) {
+ result = stdOutput.ToString();
+ var dashIndex = result.IndexOf('-');
+ if (dashIndex == -1) {
+ errorValue = -1;
+ result = string.Empty;
+ } else {
+ result = result.Substring(dashIndex + 1).Trim();
+ }
+ }
+ }
+ qmakeProcess.Close();
+ } catch (Exception) {
+ qmakeProcess = null;
+ errorValue = -1;
+ } finally {
+ InvokeExternalTarget(ReadyEvent, result);
+ }
+ }
+ }
+}
diff --git a/src/qtprojectlib/QrcItem.cs b/src/qtprojectlib/QrcItem.cs
new file mode 100644
index 00000000..e4482664
--- /dev/null
+++ b/src/qtprojectlib/QrcItem.cs
@@ -0,0 +1,58 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt VS Tools.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+namespace QtProjectLib
+{
+ public class QrcItem
+ {
+ private string path;
+ private string alias;
+
+ public QrcItem()
+ {
+ }
+
+ public QrcItem(string p, string a)
+ {
+ path = p;
+ alias = a;
+ }
+
+ public string Path
+ {
+ get { return path; }
+ set { path = value; }
+ }
+
+ public string Alias
+ {
+ get { return alias; }
+ set { alias = value; }
+ }
+ }
+}
diff --git a/src/qtprojectlib/QrcParser.cs b/src/qtprojectlib/QrcParser.cs
index 647103f6..75e75eb5 100644
--- a/src/qtprojectlib/QrcParser.cs
+++ b/src/qtprojectlib/QrcParser.cs
@@ -31,68 +31,6 @@ using System.Xml;
namespace QtProjectLib
{
- public class QrcItem
- {
- private string path;
- private string alias;
-
- public QrcItem()
- {
- }
-
- public QrcItem(string p, string a)
- {
- path = p;
- alias = a;
- }
-
- public string Path
- {
- get { return path; }
- set { path = value; }
- }
-
- public string Alias
- {
- get { return alias; }
- set { alias = value; }
- }
- }
-
- public class QrcPrefix
- {
- private string prefix;
- private string lang;
- private readonly List<QrcItem> items;
-
- public List<QrcItem> Items
- {
- get { return items; }
- }
-
- public QrcPrefix()
- {
- items = new List<QrcItem>();
- }
-
- public string Prefix
- {
- get { return prefix; }
- set { prefix = value; }
- }
-
- public string Language
- {
- get { return lang; }
- set { lang = value; }
- }
-
- public void AddQrcItem(QrcItem i)
- {
- items.Add(i);
- }
- }
-
public class QrcParser
{
private readonly string qrcFileName;
diff --git a/src/qtprojectlib/QrcPrefix.cs b/src/qtprojectlib/QrcPrefix.cs
new file mode 100644
index 00000000..ef46087c
--- /dev/null
+++ b/src/qtprojectlib/QrcPrefix.cs
@@ -0,0 +1,66 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt VS Tools.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+using System.Collections.Generic;
+
+namespace QtProjectLib
+{
+ public class QrcPrefix
+ {
+ private string prefix;
+ private string lang;
+ private readonly List<QrcItem> items;
+
+ public List<QrcItem> Items
+ {
+ get { return items; }
+ }
+
+ public QrcPrefix()
+ {
+ items = new List<QrcItem>();
+ }
+
+ public string Prefix
+ {
+ get { return prefix; }
+ set { prefix = value; }
+ }
+
+ public string Language
+ {
+ get { return lang; }
+ set { lang = value; }
+ }
+
+ public void AddQrcItem(QrcItem i)
+ {
+ items.Add(i);
+ }
+ }
+}
diff --git a/src/qtprojectlib/QtModule.cs b/src/qtprojectlib/QtModule.cs
new file mode 100644
index 00000000..d2997ea1
--- /dev/null
+++ b/src/qtprojectlib/QtModule.cs
@@ -0,0 +1,87 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt VS Tools.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+namespace QtProjectLib
+{
+ public enum QtModule
+ {
+ Invalid = -1,
+ Core = 1,
+ Xml = 2,
+ Sql = 3,
+ OpenGL = 4,
+ Network = 5,
+ Compat = 6,
+ Gui = 7,
+ ActiveQtS = 8,
+ ActiveQtC = 9,
+ Main = 10,
+ Qt3Library = 11, // ### unused
+ Qt3Main = 12, // ### unused
+ Svg = 13,
+ Designer = 14,
+ Test = 15,
+ Script = 16,
+ Help = 17,
+ WebKit = 18,
+ XmlPatterns = 19,
+ Enginio = 20,
+ Multimedia = 21,
+ Declarative = 22,
+ ScriptTools = 23,
+ UiTools = 24,
+
+ Widgets = 25,
+ ThreeD = 26,
+ Location = 27,
+ Nfc = 28,
+ Qml = 29,
+ Bluetooth = 30,
+ Positioning = 31,
+ SerialPort = 32,
+ PrintSupport = 33,
+ WebChannel = 34,
+ WebSockets = 35,
+ Sensors = 36,
+ WindowsExtras = 37,
+ QuickWidgets = 38,
+ // JSBackend = 39,
+ Quick = 40,
+ ThreeDQuick = 41,
+ // Feedback = 42,
+ // QA = 43,
+ // QLALR = 44,
+ // RepoTools = 45,
+ // Translations = 46,
+ // CLucene = 48,
+ // DesignerComponents = 49,
+ WebkitWidgets = 50,
+ Concurrent = 51,
+ MultimediaWidgets = 52
+ }
+}
diff --git a/src/qtprojectlib/QtModuleInfo.cs b/src/qtprojectlib/QtModuleInfo.cs
new file mode 100644
index 00000000..cfbad715
--- /dev/null
+++ b/src/qtprojectlib/QtModuleInfo.cs
@@ -0,0 +1,115 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt VS Tools.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+using System;
+using System.Collections.Generic;
+using System.IO;
+
+namespace QtProjectLib
+{
+ public class QtModuleInfo
+ {
+ private QtModule moduleId = QtModule.Invalid;
+ public List<string> Defines = new List<string>();
+ public string LibraryPrefix = string.Empty;
+ public bool HasDLL = true;
+ public List<string> AdditionalLibraries = new List<string>();
+ public List<string> AdditionalLibrariesDebug = new List<string>();
+ public string IncludePath;
+ public string proVarQT;
+ public string proVarCONFIG;
+
+ public QtModuleInfo(QtModule id)
+ {
+ moduleId = id;
+ }
+
+ public QtModule ModuleId
+ {
+ get { return moduleId; }
+ }
+
+ public string GetIncludePath()
+ {
+ return IncludePath;
+ }
+
+ public List<string> GetLibs(bool isDebugCfg, VersionInformation vi)
+ {
+ return GetLibs(isDebugCfg, vi.IsStaticBuild());
+ }
+
+ public List<string> GetLibs(bool isDebugCfg, bool isStaticBuild)
+ {
+ // TODO: isStaticBuild is never used.
+ var libs = new List<string>();
+ var libName = LibraryPrefix;
+ if (libName.StartsWith("Qt", StringComparison.Ordinal))
+ libName = "Qt5" + libName.Substring(2);
+ if (isDebugCfg)
+ libName += "d";
+ libName += ".lib";
+ libs.Add(libName);
+ libs.AddRange(GetAdditionalLibs(isDebugCfg));
+ return libs;
+ }
+
+ public string GetDllFileName(bool isDebugCfg)
+ {
+ var fileName = LibraryPrefix;
+ if (fileName.StartsWith("Qt", StringComparison.Ordinal))
+ fileName = "Qt5" + fileName.Substring(2);
+ if (isDebugCfg)
+ fileName += "d";
+ fileName += ".dll";
+ return fileName;
+ }
+
+ private List<string> GetAdditionalLibs(bool isDebugCfg)
+ {
+ if (isDebugCfg && AdditionalLibrariesDebug.Count > 0)
+ return AdditionalLibrariesDebug;
+ return AdditionalLibraries;
+ }
+
+ public static bool IsModuleInstalled(string moduleName)
+ {
+ var qtVersion = QtVersionManager.The().GetDefaultVersion();
+ if (qtVersion == null) {
+ throw new QtVSException("Unable to find a Qt build!" + Environment.NewLine
+ + "To solve this problem specify a Qt build.");
+ }
+
+ var installPath = QtVersionManager.The().GetInstallPath(qtVersion);
+ if (moduleName.StartsWith("Qt", StringComparison.Ordinal))
+ moduleName = "Qt5" + moduleName.Substring(2);
+
+ return new FileInfo(Path.Combine(installPath, "lib", moduleName + ".lib")).Exists;
+ }
+ }
+}
diff --git a/src/qtprojectlib/QtModules.cs b/src/qtprojectlib/QtModules.cs
index d6d0a475..a5bfce28 100644
--- a/src/qtprojectlib/QtModules.cs
+++ b/src/qtprojectlib/QtModules.cs
@@ -28,148 +28,9 @@
using System;
using System.Collections.Generic;
-using System.IO;
namespace QtProjectLib
{
- public enum QtModule
- {
- Invalid = -1,
- Core = 1,
- Xml = 2,
- Sql = 3,
- OpenGL = 4,
- Network = 5,
- Compat = 6,
- Gui = 7,
- ActiveQtS = 8,
- ActiveQtC = 9,
- Main = 10,
- Qt3Library = 11, // ### unused
- Qt3Main = 12, // ### unused
- Svg = 13,
- Designer = 14,
- Test = 15,
- Script = 16,
- Help = 17,
- WebKit = 18,
- XmlPatterns = 19,
- Enginio = 20,
- Multimedia = 21,
- Declarative = 22,
- ScriptTools = 23,
- UiTools = 24,
-
- Widgets = 25,
- ThreeD = 26,
- Location = 27,
- Nfc = 28,
- Qml = 29,
- Bluetooth = 30,
- Positioning = 31,
- SerialPort = 32,
- PrintSupport = 33,
- WebChannel = 34,
- WebSockets = 35,
- Sensors = 36,
- WindowsExtras = 37,
- QuickWidgets = 38,
- // JSBackend = 39,
- Quick = 40,
- ThreeDQuick = 41,
- // Feedback = 42,
- // QA = 43,
- // QLALR = 44,
- // RepoTools = 45,
- // Translations = 46,
- // CLucene = 48,
- // DesignerComponents = 49,
- WebkitWidgets = 50,
- Concurrent = 51,
- MultimediaWidgets = 52
- }
-
- public class QtModuleInfo
- {
- private QtModule moduleId = QtModule.Invalid;
- public List<string> Defines = new List<string>();
- public string LibraryPrefix = string.Empty;
- public bool HasDLL = true;
- public List<string> AdditionalLibraries = new List<string>();
- public List<string> AdditionalLibrariesDebug = new List<string>();
- public string IncludePath;
- public string proVarQT;
- public string proVarCONFIG;
-
- public QtModuleInfo(QtModule id)
- {
- moduleId = id;
- }
-
- public QtModule ModuleId
- {
- get { return moduleId; }
- }
-
- public string GetIncludePath()
- {
- return IncludePath;
- }
-
- public List<string> GetLibs(bool isDebugCfg, VersionInformation vi)
- {
- return GetLibs(isDebugCfg, vi.IsStaticBuild());
- }
-
- public List<string> GetLibs(bool isDebugCfg, bool isStaticBuild)
- {
- // TODO: isStaticBuild is never used.
- var libs = new List<string>();
- var libName = LibraryPrefix;
- if (libName.StartsWith("Qt", StringComparison.Ordinal))
- libName = "Qt5" + libName.Substring(2);
- if (isDebugCfg)
- libName += "d";
- libName += ".lib";
- libs.Add(libName);
- libs.AddRange(GetAdditionalLibs(isDebugCfg));
- return libs;
- }
-
- public string GetDllFileName(bool isDebugCfg)
- {
- var fileName = LibraryPrefix;
- if (fileName.StartsWith("Qt", StringComparison.Ordinal))
- fileName = "Qt5" + fileName.Substring(2);
- if (isDebugCfg)
- fileName += "d";
- fileName += ".dll";
- return fileName;
- }
-
- private List<string> GetAdditionalLibs(bool isDebugCfg)
- {
- if (isDebugCfg && AdditionalLibrariesDebug.Count > 0)
- return AdditionalLibrariesDebug;
- return AdditionalLibraries;
- }
-
- public static bool IsModuleInstalled(string moduleName)
- {
- var qtVersion = QtVersionManager.The().GetDefaultVersion();
- if (qtVersion == null) {
- throw new QtVSException("Unable to find a Qt build!" + Environment.NewLine
- + "To solve this problem specify a Qt build.");
- }
-
- var installPath = QtVersionManager.The().GetInstallPath(qtVersion);
- if (moduleName.StartsWith("Qt", StringComparison.Ordinal))
- moduleName = "Qt5" + moduleName.Substring(2);
-
- return new FileInfo(Path.Combine(installPath, "lib", moduleName + ".lib")).Exists;
- }
- }
-
public class QtModules
{
private static QtModules instance = new QtModules();
diff --git a/src/qtprojectlib/QtProjectLib.csproj b/src/qtprojectlib/QtProjectLib.csproj
index 49856dce..b0014422 100644
--- a/src/qtprojectlib/QtProjectLib.csproj
+++ b/src/qtprojectlib/QtProjectLib.csproj
@@ -36,37 +36,55 @@
<ApplicationIcon>QtProjectLib.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
+ <Compile Include="BuildConfig.cs" />
<Compile Include="CompilerToolWrapper.cs" />
<Compile Include="CxxStreamReader.cs" />
<Compile Include="ExportProjectDialog.cs">
<SubType>Form</SubType>
</Compile>
+ <Compile Include="Extensions.cs" />
+ <Compile Include="FakeFilter.cs" />
+ <Compile Include="FilesToList.cs" />
<Compile Include="Filters.cs" />
- <Compile Include="HelperClasses.cs" />
<Compile Include="HelperFunctions.cs" />
<Compile Include="ImageButton.cs">
<SubType>Component</SubType>
</Compile>
+ <Compile Include="InfoDialog.cs">
+ <SubType>Form</SubType>
+ </Compile>
<Compile Include="LinkerToolWrapper.cs" />
+ <Compile Include="MainWinWrapper.cs" />
<Compile Include="Messages.cs" />
<Compile Include="MocCmdChecker.cs" />
+ <Compile Include="ProFileContent.cs" />
+ <Compile Include="ProFileOption.cs" />
<Compile Include="ProjectExporter.cs" />
<Compile Include="ProjectImporter.cs" />
+ <Compile Include="ProjectMacros.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="ProSolution.cs" />
+ <Compile Include="QMake.cs" />
<Compile Include="QMakeConf.cs" />
- <Compile Include="QMakeProcess.cs">
- <SubType>Form</SubType>
- </Compile>
+ <Compile Include="QMakeQuery.cs" />
+ <Compile Include="QrcItem.cs" />
<Compile Include="QrcParser.cs" />
+ <Compile Include="QrcPrefix.cs" />
<Compile Include="QtConfig.cs" />
+ <Compile Include="QtModule.cs" />
+ <Compile Include="QtModuleInfo.cs" />
<Compile Include="QtModules.cs" />
<Compile Include="QtProject.cs" />
<Compile Include="QtVersionManager.cs" />
+ <Compile Include="QtVSException.cs" />
<Compile Include="QtVSIPSettings.cs" />
<Compile Include="RccOptions.cs" />
- <Compile Include="ResClass.cs" />
<Compile Include="Resources.cs" />
+ <Compile Include="SR.cs" />
+ <Compile Include="SRCategoryAttribute.cs" />
+ <Compile Include="SRDescriptionAttribute.cs" />
<Compile Include="Statics.cs" />
+ <Compile Include="TemplateType.cs" />
<Compile Include="VersionInformation.cs" />
</ItemGroup>
<ItemGroup>
@@ -93,4 +111,4 @@
<Target Name="AfterBuild">
</Target>
-->
-</Project> \ No newline at end of file
+</Project>
diff --git a/src/qtprojectlib/QtVSException.cs b/src/qtprojectlib/QtVSException.cs
new file mode 100644
index 00000000..22e37570
--- /dev/null
+++ b/src/qtprojectlib/QtVSException.cs
@@ -0,0 +1,41 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt VS Tools.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+using System;
+
+namespace QtProjectLib
+{
+ [Serializable]
+ public class QtVSException : ApplicationException
+ {
+ public QtVSException(string message)
+ : base(message)
+ {
+ }
+ }
+}
diff --git a/src/qtprojectlib/ResClass.cs b/src/qtprojectlib/SR.cs
index 4382606b..2b4d456c 100644
--- a/src/qtprojectlib/ResClass.cs
+++ b/src/qtprojectlib/SR.cs
@@ -27,64 +27,12 @@
****************************************************************************/
using System;
-using System.ComponentModel;
using System.Globalization;
using System.Resources;
using System.Threading;
namespace QtProjectLib
{
- [AttributeUsage(AttributeTargets.All)]
- internal sealed class SRDescriptionAttribute : DescriptionAttribute
- {
-
- private bool replaced;
-
- /// <summary>
- /// Constructs a new sys description.
- /// </summary>
- /// <param name='description'>
- /// description text.
- /// </param>
- public SRDescriptionAttribute(string description)
- : base(description)
- {
- }
-
- /// <summary>
- /// Retrieves the description text.
- /// </summary>
- /// <returns>
- /// description
- /// </returns>
- public override string Description
- {
- get
- {
- if (!replaced) {
- replaced = true;
- DescriptionValue = SR.GetString(base.Description);
- }
- return base.Description;
- }
- }
- }
-
- [AttributeUsage(AttributeTargets.All)]
- internal sealed class SRCategoryAttribute : CategoryAttribute
- {
-
- public SRCategoryAttribute(string category)
- : base(category)
- {
- }
-
- protected override string GetLocalizedString(string value)
- {
- return SR.GetString(value);
- }
- }
-
internal sealed class SR
{
static SR loader;
diff --git a/src/qtprojectlib/SRCategoryAttribute.cs b/src/qtprojectlib/SRCategoryAttribute.cs
new file mode 100644
index 00000000..19015c2a
--- /dev/null
+++ b/src/qtprojectlib/SRCategoryAttribute.cs
@@ -0,0 +1,48 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt VS Tools.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+using System;
+using System.ComponentModel;
+
+namespace QtProjectLib
+{
+ [AttributeUsage(AttributeTargets.All)]
+ internal sealed class SRCategoryAttribute : CategoryAttribute
+ {
+
+ public SRCategoryAttribute(string category)
+ : base(category)
+ {
+ }
+
+ protected override string GetLocalizedString(string value)
+ {
+ return SR.GetString(value);
+ }
+ }
+}
diff --git a/src/qtprojectlib/SRDescriptionAttribute.cs b/src/qtprojectlib/SRDescriptionAttribute.cs
new file mode 100644
index 00000000..2f7e8112
--- /dev/null
+++ b/src/qtprojectlib/SRDescriptionAttribute.cs
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt VS Tools.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+using System;
+using System.ComponentModel;
+
+namespace QtProjectLib
+{
+ [AttributeUsage(AttributeTargets.All)]
+ internal sealed class SRDescriptionAttribute : DescriptionAttribute
+ {
+
+ private bool replaced;
+
+ /// <summary>
+ /// Constructs a new sys description.
+ /// </summary>
+ /// <param name='description'>
+ /// description text.
+ /// </param>
+ public SRDescriptionAttribute(string description)
+ : base(description)
+ {
+ }
+
+ /// <summary>
+ /// Retrieves the description text.
+ /// </summary>
+ /// <returns>
+ /// description
+ /// </returns>
+ public override string Description
+ {
+ get
+ {
+ if (!replaced) {
+ replaced = true;
+ DescriptionValue = SR.GetString(base.Description);
+ }
+ return base.Description;
+ }
+ }
+ }
+}
diff --git a/src/qtprojectlib/Statics.cs b/src/qtprojectlib/Statics.cs
index 6a6a7720..05fd83eb 100644
--- a/src/qtprojectlib/Statics.cs
+++ b/src/qtprojectlib/Statics.cs
@@ -1,4 +1,4 @@
-/****************************************************************************
+/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
diff --git a/src/qtprojectlib/TemplateType.cs b/src/qtprojectlib/TemplateType.cs
new file mode 100644
index 00000000..34370feb
--- /dev/null
+++ b/src/qtprojectlib/TemplateType.cs
@@ -0,0 +1,46 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt VS Tools.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+namespace QtProjectLib
+{
+ public struct TemplateType
+ {
+ // project type
+ public const uint ProjectType = 0x003; // 0011
+ public const uint Application = 0x000; // 0000
+ public const uint DynamicLibrary = 0x001; // 0001
+ public const uint StaticLibrary = 0x002; // 0010
+ // subsystem
+ public const uint GUISystem = 0x004; // 0100
+ public const uint ConsoleSystem = 0x008; // 1000
+ // qt3
+ public const uint Qt3Project = 0x010; //10000
+ // plugin
+ public const uint PluginProject = 0x100;
+ }
+}
diff --git a/src/qttemplates/dialogbuttonbottom/DialogButtonBottom.csproj b/src/qttemplates/dialogbuttonbottom/DialogButtonBottom.csproj
index 582b5521..5fd84c86 100644
--- a/src/qttemplates/dialogbuttonbottom/DialogButtonBottom.csproj
+++ b/src/qttemplates/dialogbuttonbottom/DialogButtonBottom.csproj
@@ -69,4 +69,4 @@
<Target Name="AfterBuild">
</Target>
-->
-</Project> \ No newline at end of file
+</Project>
diff --git a/src/qttemplates/dialogbuttonright/DialogButtonRight.csproj b/src/qttemplates/dialogbuttonright/DialogButtonRight.csproj
index adb226e6..9a49d5b3 100644
--- a/src/qttemplates/dialogbuttonright/DialogButtonRight.csproj
+++ b/src/qttemplates/dialogbuttonright/DialogButtonRight.csproj
@@ -68,4 +68,4 @@
<Target Name="AfterBuild">
</Target>
-->
-</Project> \ No newline at end of file
+</Project>
diff --git a/src/qttemplates/mainwindow/MainWindow.csproj b/src/qttemplates/mainwindow/MainWindow.csproj
index faf91aa5..8d205bed 100644
--- a/src/qttemplates/mainwindow/MainWindow.csproj
+++ b/src/qttemplates/mainwindow/MainWindow.csproj
@@ -69,4 +69,4 @@
<Target Name="AfterBuild">
</Target>
-->
-</Project> \ No newline at end of file
+</Project>
diff --git a/src/qttemplates/resource/Resource.csproj b/src/qttemplates/resource/Resource.csproj
index e1148ca5..2f92f31c 100644
--- a/src/qttemplates/resource/Resource.csproj
+++ b/src/qttemplates/resource/Resource.csproj
@@ -73,4 +73,4 @@
<Target Name="AfterBuild">
</Target>
-->
-</Project> \ No newline at end of file
+</Project>
diff --git a/src/qttemplates/widget/Widget.csproj b/src/qttemplates/widget/Widget.csproj
index 11c03801..a96740ea 100644
--- a/src/qttemplates/widget/Widget.csproj
+++ b/src/qttemplates/widget/Widget.csproj
@@ -68,4 +68,4 @@
<Target Name="AfterBuild">
</Target>
-->
-</Project> \ No newline at end of file
+</Project>
diff --git a/src/qtvstools/AddTranslationDialog.cs b/src/qtvstools/AddTranslationDialog.cs
index 5bfd40e1..8cb9a135 100644
--- a/src/qtvstools/AddTranslationDialog.cs
+++ b/src/qtvstools/AddTranslationDialog.cs
@@ -26,8 +26,6 @@
**
****************************************************************************/
-using System.Collections.Generic;
-using System.Globalization;
using System.Windows.Forms;
namespace QtVsTools
@@ -214,44 +212,4 @@ namespace QtVsTools
fileTextBox.Text = project.Name.ToLower() + "_" + country + ".ts";
}
}
-
- public class TranslationItem : CultureInfo
- {
- public TranslationItem(int culture)
- : base(culture)
- {
- }
-
- public override string ToString()
- {
- if (NativeName != DisplayName)
- return DisplayName;
-
- var culture = GetCultureInfo(Vsix.Instance.Dte.LocaleID);
- if (culture.TwoLetterISOLanguageName == TwoLetterISOLanguageName)
- return DisplayName;
-
- return EnglishName;
- }
-
- public static TranslationItem SystemLanguage()
- {
- return new TranslationItem(CurrentCulture.LCID);
- }
-
- public static TranslationItem[] GetTranslationItems()
- {
- var cultures = GetCultures(CultureTypes.SpecificCultures
- & ~CultureTypes.UserCustomCulture & ~CultureTypes.ReplacementCultures);
- var transItems = new List<TranslationItem>();
- for (var i = 0; i < cultures.Length; i++) {
- // Locales without a LCID are given LCID 0x1000 (http://msdn.microsoft.com/en-us/library/dn363603.aspx)
- // Trying to create a TranslationItem for these will cause an exception to be thrown.
- var lcid = cultures[i].LCID;
- if (lcid != 0x1000)
- transItems.Add(new TranslationItem(lcid));
- }
- return transItems.ToArray();
- }
- }
}
diff --git a/src/qtvstools/ChangeFor.cs b/src/qtvstools/ChangeFor.cs
new file mode 100644
index 00000000..06577932
--- /dev/null
+++ b/src/qtvstools/ChangeFor.cs
@@ -0,0 +1,32 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt VS Tools.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+namespace QtVsTools
+{
+ public enum ChangeFor { Solution, Project }
+}
diff --git a/src/qtvstools/QmlClassifier.cs b/src/qtvstools/Classifier.cs
index b83dd674..b83dd674 100644
--- a/src/qtvstools/QmlClassifier.cs
+++ b/src/qtvstools/Classifier.cs
diff --git a/src/qtvstools/QmlClassifierClassificationDefinition.cs b/src/qtvstools/ClassifierClassificationDefinition.cs
index 4e9d9f39..4e9d9f39 100644
--- a/src/qtvstools/QmlClassifierClassificationDefinition.cs
+++ b/src/qtvstools/ClassifierClassificationDefinition.cs
diff --git a/src/qtvstools/QmlClassifierFormat.cs b/src/qtvstools/ClassifierDefinitions.cs
index 6cbe60e1..6cbe60e1 100644
--- a/src/qtvstools/QmlClassifierFormat.cs
+++ b/src/qtvstools/ClassifierDefinitions.cs
diff --git a/src/qtvstools/QmlClassifierProvider.cs b/src/qtvstools/ClassifierProvider.cs
index f58bee92..47707adb 100644
--- a/src/qtvstools/QmlClassifierProvider.cs
+++ b/src/qtvstools/ClassifierProvider.cs
@@ -38,7 +38,7 @@ namespace QtVsTools
/// This class causes a classifier to be added to the set of classifiers.
/// </summary>
[Export(typeof(IClassifierProvider))]
- [ContentType(QmlContentTypeDefinition.ContentType)]
+ [ContentType(ContentTypeDefinition.ContentType)]
internal class ClassifierProvider : IClassifierProvider
{
[Import(typeof(SVsServiceProvider))]
diff --git a/src/qtvstools/QmlClassifierTypes.cs b/src/qtvstools/ClassifierTypes.cs
index a484c2f0..a484c2f0 100644
--- a/src/qtvstools/QmlClassifierTypes.cs
+++ b/src/qtvstools/ClassifierTypes.cs
diff --git a/src/qtvstools/CommentToken.cs b/src/qtvstools/CommentToken.cs
new file mode 100644
index 00000000..6b36ba1e
--- /dev/null
+++ b/src/qtvstools/CommentToken.cs
@@ -0,0 +1,38 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt VS Tools.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+namespace QtVsTools
+{
+ public class CommentToken : Token
+ {
+ public CommentToken()
+ : base(TokenType.Comment)
+ {
+ }
+ }
+}
diff --git a/src/qtvstools/QmlContentTypeDefinition.cs b/src/qtvstools/ContentTypeDefinition.cs
index a3030588..6062d264 100644
--- a/src/qtvstools/QmlContentTypeDefinition.cs
+++ b/src/qtvstools/ContentTypeDefinition.cs
@@ -31,7 +31,7 @@ using System.ComponentModel.Composition;
namespace QtVsTools
{
- public sealed class QmlContentTypeDefinition
+ public sealed class ContentTypeDefinition
{
public const string ContentType = "Qml";
@@ -39,7 +39,7 @@ namespace QtVsTools
/// Exports the Qml content type
/// </summary>
[Export(typeof(ContentTypeDefinition))]
- [Name(QmlContentTypeDefinition.ContentType)]
+ [Name(ContentTypeDefinition.ContentType)]
[BaseDefinition("code")]
public ContentTypeDefinition QmlContentType { get; set; }
@@ -47,7 +47,7 @@ namespace QtVsTools
/// Exports the Qml file extension
/// </summary>
[Export(typeof(FileExtensionToContentTypeDefinition))]
- [ContentType(QmlContentTypeDefinition.ContentType)]
+ [ContentType(ContentTypeDefinition.ContentType)]
[FileExtension(".qml")]
public FileExtensionToContentTypeDefinition QmlFileExtension { get; set; }
}
diff --git a/src/qtvstools/DefaultEditor.cs b/src/qtvstools/DefaultEditor.cs
new file mode 100644
index 00000000..145bd1f9
--- /dev/null
+++ b/src/qtvstools/DefaultEditor.cs
@@ -0,0 +1,39 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt VS Tools.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+namespace QtVsTools
+{
+ static class DefaultEditor
+ {
+ public enum Kind
+ {
+ Ts,
+ Ui
+ }
+ }
+}
diff --git a/src/qtvstools/QtDefaultEditorsHelper.cs b/src/qtvstools/DefaultEditorsBase.cs
index 51855d6a..dff36636 100644
--- a/src/qtvstools/QtDefaultEditorsHelper.cs
+++ b/src/qtvstools/DefaultEditorsBase.cs
@@ -145,32 +145,8 @@ namespace QtVsTools
}
// Default editor handling for Qt4 add-in
- public class Qt4DefaultEditors : DefaultEditorsBase
- {
- public Qt4DefaultEditors()
- : base(uid: @"{6A7385B4-1D62-46e0-A4E3-AED4475371F0}",
- wrapper: @"qtappwrapper.exe", editor: @"qrceditor.exe")
- {
- }
- }
// Default editor handling for Qt5 add-in
- public class Qt5DefaultEditors : DefaultEditorsBase
- {
- public Qt5DefaultEditors()
- : base(uid: @"{C80C78C8-F64B-43df-9A53-96F7C44A1EB6}",
- wrapper: @"qt5appwrapper.exe", editor: @"q5rceditor.exe")
- {
- }
- }
// Default editor handling for Qt VS Tools
- public class QtVsToolsDefaultEditors : DefaultEditorsBase
- {
- public QtVsToolsDefaultEditors() // Set VSIX specific values
- : base(uid: @"{15021976-2F08-4C44-BFF4-73CCDCB50473}",
- wrapper: @"QtAppWrapper.exe", editor: @"QrcEditor.exe")
- {
- }
- }
}
diff --git a/src/qtvstools/DefaultEditorsHandler.cs b/src/qtvstools/DefaultEditorsHandler.cs
index f2f4bff6..9ebfdbf1 100644
--- a/src/qtvstools/DefaultEditorsHandler.cs
+++ b/src/qtvstools/DefaultEditorsHandler.cs
@@ -39,15 +39,6 @@ using System.Windows.Forms;
namespace QtVsTools
{
- static class DefaultEditor
- {
- public enum Kind
- {
- Ts,
- Ui
- }
- }
-
class DefaultEditorsHandler
{
public static DefaultEditorsHandler Instance
diff --git a/src/qtvstools/FormChangeQtVersion.Designer.cs b/src/qtvstools/FormChangeQtVersion.Designer.cs
index 94768876..2f26f9ef 100644
--- a/src/qtvstools/FormChangeQtVersion.Designer.cs
+++ b/src/qtvstools/FormChangeQtVersion.Designer.cs
@@ -94,4 +94,4 @@ namespace QtVsTools
private System.Windows.Forms.ListBox lbQtVersions;
private System.Windows.Forms.Label lQtVersions;
}
-} \ No newline at end of file
+}
diff --git a/src/qtvstools/FormChangeQtVersion.cs b/src/qtvstools/FormChangeQtVersion.cs
index 1ee03334..bc8b4a44 100644
--- a/src/qtvstools/FormChangeQtVersion.cs
+++ b/src/qtvstools/FormChangeQtVersion.cs
@@ -32,8 +32,6 @@ using System.Windows.Forms;
namespace QtVsTools
{
- public enum ChangeFor { Solution, Project }
-
public partial class FormChangeQtVersion : Form
{
diff --git a/src/qtvstools/FormProjectQtSettings.Designer.cs b/src/qtvstools/FormProjectQtSettings.Designer.cs
index 8dc0bb7c..a9e2cd42 100644
--- a/src/qtvstools/FormProjectQtSettings.Designer.cs
+++ b/src/qtvstools/FormProjectQtSettings.Designer.cs
@@ -522,4 +522,4 @@ namespace QtVsTools
private CheckBox windowsExtrasLib;
private CheckBox quickWidgetsLib;
}
-} \ No newline at end of file
+}
diff --git a/src/qtvstools/FormVSQtSettings.Designer.cs b/src/qtvstools/FormVSQtSettings.Designer.cs
index d089a628..2a3ef58d 100644
--- a/src/qtvstools/FormVSQtSettings.Designer.cs
+++ b/src/qtvstools/FormVSQtSettings.Designer.cs
@@ -190,4 +190,4 @@ namespace QtVsTools
private System.Windows.Forms.TabPage tabPage2;
private System.Windows.Forms.PropertyGrid optionsPropertyGrid;
}
-} \ No newline at end of file
+}
diff --git a/src/qtvstools/JsKeywordToken.cs b/src/qtvstools/JsKeywordToken.cs
new file mode 100644
index 00000000..b82def03
--- /dev/null
+++ b/src/qtvstools/JsKeywordToken.cs
@@ -0,0 +1,38 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt VS Tools.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+namespace QtVsTools
+{
+ public class JsKeywordToken : Token
+ {
+ public JsKeywordToken()
+ : base(TokenType.JsKeyword)
+ {
+ }
+ }
+}
diff --git a/src/qtvstools/KeywordToken.cs b/src/qtvstools/KeywordToken.cs
new file mode 100644
index 00000000..1483ab3b
--- /dev/null
+++ b/src/qtvstools/KeywordToken.cs
@@ -0,0 +1,38 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt VS Tools.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+namespace QtVsTools
+{
+ public class KeywordToken : Token
+ {
+ public KeywordToken()
+ : base(TokenType.Keyword)
+ {
+ }
+ }
+}
diff --git a/src/qtvstools/MultilineCommentToken.cs b/src/qtvstools/MultilineCommentToken.cs
new file mode 100644
index 00000000..839405e2
--- /dev/null
+++ b/src/qtvstools/MultilineCommentToken.cs
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt VS Tools.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+using Microsoft.VisualStudio.Text;
+using Microsoft.VisualStudio.Text.Classification;
+
+namespace QtVsTools
+{
+ public class MultilineCommentToken : Token
+ {
+ //Classification used th token
+ protected IClassificationType classificationType;
+ //Tracked span of token
+ protected ITrackingSpan trackingSpan;
+ //Version of text when Tracking was created
+ protected ITextVersion textVersion;
+
+ public MultilineCommentToken()
+ : base(TokenType.MultilineComment)
+ {
+ }
+
+ public MultilineCommentToken(IClassificationType type, ITrackingSpan span, ITextVersion version)
+ : base(TokenType.MultilineComment)
+ {
+ classificationType = type;
+ trackingSpan = span;
+ textVersion = version;
+ }
+
+ public IClassificationType Classification()
+ {
+ return classificationType;
+ }
+ public ITrackingSpan Tracking()
+ {
+ return trackingSpan;
+ }
+ public ITextVersion Version()
+ {
+ return textVersion;
+ }
+ }
+}
diff --git a/src/qtvstools/OtherToken.cs b/src/qtvstools/OtherToken.cs
new file mode 100644
index 00000000..f04d1122
--- /dev/null
+++ b/src/qtvstools/OtherToken.cs
@@ -0,0 +1,38 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt VS Tools.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+namespace QtVsTools
+{
+ public class OtherToken : Token
+ {
+ public OtherToken()
+ : base(TokenType.Other)
+ {
+ }
+ }
+}
diff --git a/src/qtvstools/QtSettings.cs b/src/qtvstools/ProjectQtSettings.cs
index fa19ec31..fa19ec31 100644
--- a/src/qtvstools/QtSettings.cs
+++ b/src/qtvstools/ProjectQtSettings.cs
diff --git a/src/qtvstools/PropertyToken.cs b/src/qtvstools/PropertyToken.cs
new file mode 100644
index 00000000..c104acc6
--- /dev/null
+++ b/src/qtvstools/PropertyToken.cs
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt VS Tools.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+using Microsoft.VisualStudio.Text;
+using Microsoft.VisualStudio.Text.Classification;
+
+namespace QtVsTools
+{
+ public class PropertyToken : Token
+ {
+ //Classification used th token
+ protected IClassificationType classificationType;
+ //Tracked span of token
+ protected ITrackingSpan trackingSpan;
+ //Version of text when Tracking was created
+ protected ITextVersion textVersion;
+
+ public PropertyToken()
+ : base(TokenType.Property)
+ {
+ }
+
+ public PropertyToken(IClassificationType type, ITrackingSpan span, ITextVersion version)
+ : base(TokenType.Property)
+ {
+ classificationType = type;
+ trackingSpan = span;
+ textVersion = version;
+ }
+
+ public IClassificationType Classification()
+ {
+ return classificationType;
+ }
+ public ITrackingSpan Tracking()
+ {
+ return trackingSpan;
+ }
+ public ITextVersion Version()
+ {
+ return textVersion;
+ }
+ }
+}
diff --git a/src/qtvstools/QmlToken.cs b/src/qtvstools/QmlToken.cs
deleted file mode 100644
index dbbb5ad5..00000000
--- a/src/qtvstools/QmlToken.cs
+++ /dev/null
@@ -1,165 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt VS Tools.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-using Microsoft.VisualStudio.Text;
-using Microsoft.VisualStudio.Text.Classification;
-
-namespace QtVsTools
-{
- public abstract class Token
- {
- protected Token(TokenType type)
- {
- Type = type;
- }
-
- public int Length { get; set; }
- public bool ContinueParsing { get; set; }
- public TokenType Type { get; private set; }
- }
-
- public class OtherToken : Token
- {
- public OtherToken()
- : base(TokenType.Other)
- {
- }
- }
-
- public class CommentToken : Token
- {
- public CommentToken()
- : base(TokenType.Comment)
- {
- }
- }
-
- public class MultilineCommentToken : Token
- {
- //Classification used th token
- protected IClassificationType classificationType;
- //Tracked span of token
- protected ITrackingSpan trackingSpan;
- //Version of text when Tracking was created
- protected ITextVersion textVersion;
-
- public MultilineCommentToken()
- : base(TokenType.MultilineComment)
- {
- }
-
- public MultilineCommentToken(IClassificationType type, ITrackingSpan span, ITextVersion version)
- : base(TokenType.MultilineComment)
- {
- classificationType = type;
- trackingSpan = span;
- textVersion = version;
- }
-
- public IClassificationType Classification()
- {
- return classificationType;
- }
- public ITrackingSpan Tracking()
- {
- return trackingSpan;
- }
- public ITextVersion Version()
- {
- return textVersion;
- }
- }
-
- public class TypeToken : Token
- {
- public TypeToken()
- : base(TokenType.Type)
- {
- }
- }
-
- public class PropertyToken : Token
- {
- //Classification used th token
- protected IClassificationType classificationType;
- //Tracked span of token
- protected ITrackingSpan trackingSpan;
- //Version of text when Tracking was created
- protected ITextVersion textVersion;
-
- public PropertyToken()
- : base(TokenType.Property)
- {
- }
-
- public PropertyToken(IClassificationType type, ITrackingSpan span, ITextVersion version)
- : base(TokenType.Property)
- {
- classificationType = type;
- trackingSpan = span;
- textVersion = version;
- }
-
- public IClassificationType Classification()
- {
- return classificationType;
- }
- public ITrackingSpan Tracking()
- {
- return trackingSpan;
- }
- public ITextVersion Version()
- {
- return textVersion;
- }
- }
-
- public class KeywordToken : Token
- {
- public KeywordToken()
- : base(TokenType.Keyword)
- {
- }
- }
-
- public class JsKeywordToken : Token
- {
- public JsKeywordToken()
- : base(TokenType.JsKeyword)
- {
- }
- }
-
- public class StringToken : Token
- {
- public StringToken()
- : base(TokenType.String)
- {
- }
- }
-}
diff --git a/src/qtvstools/Qt4DefaultEditors.cs b/src/qtvstools/Qt4DefaultEditors.cs
new file mode 100644
index 00000000..7592a499
--- /dev/null
+++ b/src/qtvstools/Qt4DefaultEditors.cs
@@ -0,0 +1,39 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt VS Tools.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+namespace QtVsTools
+{
+ public class Qt4DefaultEditors : DefaultEditorsBase
+ {
+ public Qt4DefaultEditors()
+ : base(uid: @"{6A7385B4-1D62-46e0-A4E3-AED4475371F0}",
+ wrapper: @"qtappwrapper.exe", editor: @"qrceditor.exe")
+ {
+ }
+ }
+}
diff --git a/src/qtvstools/Qt5DefaultEditors.cs b/src/qtvstools/Qt5DefaultEditors.cs
new file mode 100644
index 00000000..285fc7af
--- /dev/null
+++ b/src/qtvstools/Qt5DefaultEditors.cs
@@ -0,0 +1,39 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt VS Tools.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+namespace QtVsTools
+{
+ public class Qt5DefaultEditors : DefaultEditorsBase
+ {
+ public Qt5DefaultEditors()
+ : base(uid: @"{C80C78C8-F64B-43df-9A53-96F7C44A1EB6}",
+ wrapper: @"qt5appwrapper.exe", editor: @"q5rceditor.exe")
+ {
+ }
+ }
+}
diff --git a/src/qtvstools/QtHelpLinkChooser.xaml.cs b/src/qtvstools/QtHelpLinkChooser.xaml.cs
index bddfd6b7..f8cfb68d 100644
--- a/src/qtvstools/QtHelpLinkChooser.xaml.cs
+++ b/src/qtvstools/QtHelpLinkChooser.xaml.cs
@@ -35,11 +35,6 @@ using System.Windows.Input;
namespace QtVsTools
{
- public class VsToolsDialogWindow : Microsoft.VisualStudio.PlatformUI.DialogWindow
- {
- // Workaround to avoid referencing Microsoft.VisualStudio.Shell.14.0 in XAML.
- }
-
partial class QtHelpLinkChooser : VsToolsDialogWindow
{
public QtHelpLinkChooser()
diff --git a/src/qtvstools/QtHelpMenu.cs b/src/qtvstools/QtHelpMenu.cs
index 335cc6aa..162e4a96 100644
--- a/src/qtvstools/QtHelpMenu.cs
+++ b/src/qtvstools/QtHelpMenu.cs
@@ -101,10 +101,35 @@ namespace QtVsTools
static bool IsSuperfluousCharacter(string text)
{
switch (text) {
- case " ": case ";": case ".": case "<": case ">": case "{": case "}":
- case "(": case ")": case ":": case ",": case "/": case "\\": case "^":
- case "%": case "+": case "-": case "*": case "\t": case "&": case "\"":
- case "!": case "[": case "]": case "|": case "'": case "~": case "#": case "=":
+ case " ":
+ case ";":
+ case ".":
+ case "<":
+ case ">":
+ case "{":
+ case "}":
+ case "(":
+ case ")":
+ case ":":
+ case ",":
+ case "/":
+ case "\\":
+ case "^":
+ case "%":
+ case "+":
+ case "-":
+ case "*":
+ case "\t":
+ case "&":
+ case "\"":
+ case "!":
+ case "[":
+ case "]":
+ case "|":
+ case "'":
+ case "~":
+ case "#":
+ case "=":
return true; // nothing we are interested in
}
return false;
diff --git a/src/qtvstools/QtVsTools.csproj b/src/qtvstools/QtVsTools.csproj
index e3c7eb5f..0e77b93b 100644
--- a/src/qtvstools/QtVsTools.csproj
+++ b/src/qtvstools/QtVsTools.csproj
@@ -51,6 +51,16 @@
<Compile Include="AddTranslationDialog.cs">
<SubType>Form</SubType>
</Compile>
+ <Compile Include="ChangeFor.cs" />
+ <Compile Include="Classifier.cs" />
+ <Compile Include="ClassifierClassificationDefinition.cs" />
+ <Compile Include="ClassifierDefinitions.cs" />
+ <Compile Include="ClassifierProvider.cs" />
+ <Compile Include="ClassifierTypes.cs" />
+ <Compile Include="CommentToken.cs" />
+ <Compile Include="ContentTypeDefinition.cs" />
+ <Compile Include="DefaultEditor.cs" />
+ <Compile Include="DefaultEditorsBase.cs" />
<Compile Include="DefaultEditorsClient.cs" />
<Compile Include="DefaultEditorsHandler.cs" />
<Compile Include="DteEventsHandler.cs" />
@@ -73,17 +83,16 @@
<Compile Include="FormVSQtSettings.Designer.cs">
<DependentUpon>FormVSQtSettings.cs</DependentUpon>
</Compile>
+ <Compile Include="JsKeywordToken.cs" />
+ <Compile Include="KeywordToken.cs" />
+ <Compile Include="MultilineCommentToken.cs" />
+ <Compile Include="OtherToken.cs" />
+ <Compile Include="ProjectQtSettings.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="PropertyToken.cs" />
<Compile Include="QMakeWrapper.cs" />
- <Compile Include="QmlClassifier.cs" />
- <Compile Include="QmlClassifierClassificationDefinition.cs" />
- <Compile Include="QmlClassifierFormat.cs" />
- <Compile Include="QmlClassifierProvider.cs" />
- <Compile Include="QmlClassifierTypes.cs" />
- <Compile Include="QmlContentTypeDefinition.cs" />
- <Compile Include="QmlToken.cs" />
- <Compile Include="QmlTokenTypes.cs" />
- <Compile Include="QtDefaultEditorsHelper.cs" />
+ <Compile Include="Qt4DefaultEditors.cs" />
+ <Compile Include="Qt5DefaultEditors.cs" />
<Compile Include="QtHelpLinkChooser.xaml.cs">
<DependentUpon>QtHelpLinkChooser.xaml</DependentUpon>
</Compile>
@@ -91,15 +100,23 @@
<Compile Include="QtItemContextMenu.cs" />
<Compile Include="QtMainMenu.cs" />
<Compile Include="QtProjectContextMenu.cs" />
- <Compile Include="QtSettings.cs" />
<Compile Include="QtSolutionContextMenu.cs" />
<Compile Include="QtVersionDialog.cs">
<SubType>Form</SubType>
</Compile>
- <Compile Include="ResClass.cs" />
+ <Compile Include="QtVsToolsDefaultEditors.cs" />
+ <Compile Include="SR.cs" />
+ <Compile Include="SRCategoryAttribute.cs" />
+ <Compile Include="SRDescriptionAttribute.cs" />
+ <Compile Include="StringToken.cs" />
+ <Compile Include="Token.cs" />
+ <Compile Include="TokenType.cs" />
<Compile Include="Translation.cs" />
+ <Compile Include="TranslationItem.cs" />
+ <Compile Include="TypeToken.cs" />
<Compile Include="Vsix.cs" />
<Compile Include="VSQtSettings.cs" />
+ <Compile Include="VsToolsDialogWindow.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="..\..\Changelog">
@@ -318,4 +335,4 @@
</PropertyGroup>
<Error Condition="!Exists('..\packages\System.Data.SQLite.Core.1.0.102.0\build\net45\System.Data.SQLite.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\System.Data.SQLite.Core.1.0.102.0\build\net45\System.Data.SQLite.Core.targets'))" />
</Target>
-</Project> \ No newline at end of file
+</Project>
diff --git a/src/qtvstools/QtVsToolsDefaultEditors.cs b/src/qtvstools/QtVsToolsDefaultEditors.cs
new file mode 100644
index 00000000..c6c9b970
--- /dev/null
+++ b/src/qtvstools/QtVsToolsDefaultEditors.cs
@@ -0,0 +1,39 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt VS Tools.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+namespace QtVsTools
+{
+ public class QtVsToolsDefaultEditors : DefaultEditorsBase
+ {
+ public QtVsToolsDefaultEditors() // Set VSIX specific values
+ : base(uid: @"{15021976-2F08-4C44-BFF4-73CCDCB50473}",
+ wrapper: @"QtAppWrapper.exe", editor: @"QrcEditor.exe")
+ {
+ }
+ }
+}
diff --git a/src/qtvstools/ResClass.cs b/src/qtvstools/SR.cs
index 03528830..62113731 100644
--- a/src/qtvstools/ResClass.cs
+++ b/src/qtvstools/SR.cs
@@ -27,63 +27,11 @@
****************************************************************************/
using System;
-using System.ComponentModel;
using System.Globalization;
using System.Resources;
namespace QtVsTools
{
- [AttributeUsage(AttributeTargets.All)]
- internal sealed class SRDescriptionAttribute : DescriptionAttribute
- {
-
- private bool replaced;
-
- /// <summary>
- /// Constructs a new sys description.
- /// </summary>
- /// <param name='description'>
- /// description text.
- /// </param>
- public SRDescriptionAttribute(string description)
- : base(description)
- {
- }
-
- /// <summary>
- /// Retrieves the description text.
- /// </summary>
- /// <returns>
- /// description
- /// </returns>
- public override string Description
- {
- get
- {
- if (!replaced) {
- replaced = true;
- DescriptionValue = SR.GetString(base.Description);
- }
- return base.Description;
- }
- }
- }
-
- [AttributeUsage(AttributeTargets.All)]
- internal sealed class SRCategoryAttribute : CategoryAttribute
- {
-
- public SRCategoryAttribute(string category)
- : base(category)
- {
- }
-
- protected override string GetLocalizedString(string value)
- {
- return SR.GetString(value);
- }
- }
-
internal sealed class SR
{
static SR loader;
diff --git a/src/qtvstools/SRCategoryAttribute.cs b/src/qtvstools/SRCategoryAttribute.cs
new file mode 100644
index 00000000..ed7535e4
--- /dev/null
+++ b/src/qtvstools/SRCategoryAttribute.cs
@@ -0,0 +1,48 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt VS Tools.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+using System;
+using System.ComponentModel;
+
+namespace QtVsTools
+{
+ [AttributeUsage(AttributeTargets.All)]
+ internal sealed class SRCategoryAttribute : CategoryAttribute
+ {
+
+ public SRCategoryAttribute(string category)
+ : base(category)
+ {
+ }
+
+ protected override string GetLocalizedString(string value)
+ {
+ return SR.GetString(value);
+ }
+ }
+}
diff --git a/src/qtvstools/SRDescriptionAttribute.cs b/src/qtvstools/SRDescriptionAttribute.cs
new file mode 100644
index 00000000..bf869b35
--- /dev/null
+++ b/src/qtvstools/SRDescriptionAttribute.cs
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt VS Tools.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+using System;
+using System.ComponentModel;
+
+namespace QtVsTools
+{
+ [AttributeUsage(AttributeTargets.All)]
+ internal sealed class SRDescriptionAttribute : DescriptionAttribute
+ {
+
+ private bool replaced;
+
+ /// <summary>
+ /// Constructs a new sys description.
+ /// </summary>
+ /// <param name='description'>
+ /// description text.
+ /// </param>
+ public SRDescriptionAttribute(string description)
+ : base(description)
+ {
+ }
+
+ /// <summary>
+ /// Retrieves the description text.
+ /// </summary>
+ /// <returns>
+ /// description
+ /// </returns>
+ public override string Description
+ {
+ get
+ {
+ if (!replaced) {
+ replaced = true;
+ DescriptionValue = SR.GetString(base.Description);
+ }
+ return base.Description;
+ }
+ }
+ }
+}
diff --git a/src/qtvstools/StringToken.cs b/src/qtvstools/StringToken.cs
new file mode 100644
index 00000000..9c0691c9
--- /dev/null
+++ b/src/qtvstools/StringToken.cs
@@ -0,0 +1,38 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt VS Tools.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+namespace QtVsTools
+{
+ public class StringToken : Token
+ {
+ public StringToken()
+ : base(TokenType.String)
+ {
+ }
+ }
+}
diff --git a/src/qtvstools/Token.cs b/src/qtvstools/Token.cs
new file mode 100644
index 00000000..a663415c
--- /dev/null
+++ b/src/qtvstools/Token.cs
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt VS Tools.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+namespace QtVsTools
+{
+ public abstract class Token
+ {
+ protected Token(TokenType type)
+ {
+ Type = type;
+ }
+
+ public int Length { get; set; }
+ public bool ContinueParsing { get; set; }
+ public TokenType Type { get; private set; }
+ }
+}
diff --git a/src/qtvstools/QmlTokenTypes.cs b/src/qtvstools/TokenType.cs
index 2bb6f088..2bb6f088 100644
--- a/src/qtvstools/QmlTokenTypes.cs
+++ b/src/qtvstools/TokenType.cs
diff --git a/src/qtvstools/TranslationItem.cs b/src/qtvstools/TranslationItem.cs
new file mode 100644
index 00000000..1acf8304
--- /dev/null
+++ b/src/qtvstools/TranslationItem.cs
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt VS Tools.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+using System.Collections.Generic;
+using System.Globalization;
+
+namespace QtVsTools
+{
+ public class TranslationItem : CultureInfo
+ {
+ public TranslationItem(int culture)
+ : base(culture)
+ {
+ }
+
+ public override string ToString()
+ {
+ if (NativeName != DisplayName)
+ return DisplayName;
+
+ var culture = GetCultureInfo(Vsix.Instance.Dte.LocaleID);
+ if (culture.TwoLetterISOLanguageName == TwoLetterISOLanguageName)
+ return DisplayName;
+
+ return EnglishName;
+ }
+
+ public static TranslationItem SystemLanguage()
+ {
+ return new TranslationItem(CurrentCulture.LCID);
+ }
+
+ public static TranslationItem[] GetTranslationItems()
+ {
+ var cultures = GetCultures(CultureTypes.SpecificCultures
+ & ~CultureTypes.UserCustomCulture & ~CultureTypes.ReplacementCultures);
+ var transItems = new List<TranslationItem>();
+ for (var i = 0; i < cultures.Length; i++) {
+ // Locales without a LCID are given LCID 0x1000 (http://msdn.microsoft.com/en-us/library/dn363603.aspx)
+ // Trying to create a TranslationItem for these will cause an exception to be thrown.
+ var lcid = cultures[i].LCID;
+ if (lcid != 0x1000)
+ transItems.Add(new TranslationItem(lcid));
+ }
+ return transItems.ToArray();
+ }
+ }
+}
diff --git a/src/qtvstools/TypeToken.cs b/src/qtvstools/TypeToken.cs
new file mode 100644
index 00000000..f28d6a53
--- /dev/null
+++ b/src/qtvstools/TypeToken.cs
@@ -0,0 +1,38 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt VS Tools.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+namespace QtVsTools
+{
+ public class TypeToken : Token
+ {
+ public TypeToken()
+ : base(TokenType.Type)
+ {
+ }
+ }
+}
diff --git a/src/qtvstools/VsToolsDialogWindow.cs b/src/qtvstools/VsToolsDialogWindow.cs
new file mode 100644
index 00000000..2c1c6c56
--- /dev/null
+++ b/src/qtvstools/VsToolsDialogWindow.cs
@@ -0,0 +1,35 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt VS Tools.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+namespace QtVsTools
+{
+ public class VsToolsDialogWindow : Microsoft.VisualStudio.PlatformUI.DialogWindow
+ {
+ // Workaround to avoid referencing Microsoft.VisualStudio.Shell.14.0 in XAML.
+ }
+}
diff --git a/src/qtwizard/AddClassPage.xaml.cs b/src/qtwizard/AddClassPage.xaml.cs
index 47351db1..2a7505f7 100644
--- a/src/qtwizard/AddClassPage.xaml.cs
+++ b/src/qtwizard/AddClassPage.xaml.cs
@@ -41,53 +41,6 @@ using System.Windows.Navigation;
namespace QtProjectWizard
{
- public enum ClassKind
- {
- Gui,
- Core
- }
-
- public class Class
- {
- public string ClassName
- {
- get; set;
- }
-
- public string DefaultName
- {
- get; set;
- }
-
- public string Type
- {
- get; set;
- }
-
- public string Description
- {
- get; set;
- }
-
- public string ImageSource
- {
- get; set;
- }
-
- public ClassKind Kind
- {
- get; set;
- }
- }
-
- public class SortComboBoxItem : ComboBoxItem
- {
- public ListSortDirection? SortDirection
- {
- get; set;
- }
- }
-
public partial class AddClassPage : WizardPage
{
public AddClassPage()
diff --git a/src/qtwizard/Class.cs b/src/qtwizard/Class.cs
new file mode 100644
index 00000000..ac1ab421
--- /dev/null
+++ b/src/qtwizard/Class.cs
@@ -0,0 +1,63 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt VS Tools.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+namespace QtProjectWizard
+{
+ public class Class
+ {
+ public string ClassName
+ {
+ get; set;
+ }
+
+ public string DefaultName
+ {
+ get; set;
+ }
+
+ public string Type
+ {
+ get; set;
+ }
+
+ public string Description
+ {
+ get; set;
+ }
+
+ public string ImageSource
+ {
+ get; set;
+ }
+
+ public ClassKind Kind
+ {
+ get; set;
+ }
+ }
+}
diff --git a/src/qtwizard/ClassKind.cs b/src/qtwizard/ClassKind.cs
new file mode 100644
index 00000000..7e279b5f
--- /dev/null
+++ b/src/qtwizard/ClassKind.cs
@@ -0,0 +1,36 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt VS Tools.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+namespace QtProjectWizard
+{
+ public enum ClassKind
+ {
+ Gui,
+ Core
+ }
+}
diff --git a/src/qtwizard/IntroPage.xaml.cs b/src/qtwizard/IntroPage.xaml.cs
index e60b63c4..6b1c740d 100644
--- a/src/qtwizard/IntroPage.xaml.cs
+++ b/src/qtwizard/IntroPage.xaml.cs
@@ -26,7 +26,6 @@
**
****************************************************************************/
-
namespace QtProjectWizard
{
public partial class IntroPage : WizardPage
diff --git a/src/qtwizard/NativeMethods.cs b/src/qtwizard/NativeMethods.cs
new file mode 100644
index 00000000..f488a888
--- /dev/null
+++ b/src/qtwizard/NativeMethods.cs
@@ -0,0 +1,41 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt VS Tools.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+using System;
+using System.Runtime.InteropServices;
+using System.Runtime.Versioning;
+
+namespace QtProjectWizard
+{
+ internal static class NativeMethods
+ {
+ [ResourceExposure(ResourceScope.None)]
+ [DllImport("user32.dll", CharSet = CharSet.Auto)]
+ internal static extern int GetWindowLong(IntPtr hwnd, int index);
+ }
+}
diff --git a/src/qtwizard/QtProjectWizard.csproj b/src/qtwizard/QtProjectWizard.csproj
index 532df145..27227af8 100644
--- a/src/qtwizard/QtProjectWizard.csproj
+++ b/src/qtwizard/QtProjectWizard.csproj
@@ -55,6 +55,8 @@
<DependentUpon>AddClassPage.xaml</DependentUpon>
</Compile>
<Compile Include="AddClassWizard.cs" />
+ <Compile Include="Class.cs" />
+ <Compile Include="ClassKind.cs" />
<Compile Include="ClassNameValidationRule.cs" />
<Compile Include="ConsoleWizard.cs" />
<Compile Include="CoreClassPage.xaml.cs">
@@ -86,12 +88,15 @@
<Compile Include="ModulePage.xaml.cs">
<DependentUpon>ModulePage.xaml</DependentUpon>
</Compile>
+ <Compile Include="NativeMethods.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ServerPage.xaml.cs">
<DependentUpon>ServerPage.xaml</DependentUpon>
</Compile>
<Compile Include="ServerWizard.cs" />
+ <Compile Include="SortComboBoxItem.cs" />
<Compile Include="UiClassInclusion.cs" />
+ <Compile Include="UnsafeNativeMethods.cs" />
<Compile Include="VCLanguageManagerValidationRule.cs" />
<Compile Include="WizardData.cs" />
<Compile Include="WizardPage.cs" />
@@ -163,4 +168,4 @@
<Target Name="AfterBuild">
</Target>
-->
-</Project> \ No newline at end of file
+</Project>
diff --git a/src/qtwizard/SortComboBoxItem.cs b/src/qtwizard/SortComboBoxItem.cs
new file mode 100644
index 00000000..c18ba1c5
--- /dev/null
+++ b/src/qtwizard/SortComboBoxItem.cs
@@ -0,0 +1,41 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt VS Tools.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+using System.ComponentModel;
+using System.Windows.Controls;
+
+namespace QtProjectWizard
+{
+ public class SortComboBoxItem : ComboBoxItem
+ {
+ public ListSortDirection? SortDirection
+ {
+ get; set;
+ }
+ }
+}
diff --git a/src/qtwizard/UnsafeNativeMethods.cs b/src/qtwizard/UnsafeNativeMethods.cs
new file mode 100644
index 00000000..cf9e7871
--- /dev/null
+++ b/src/qtwizard/UnsafeNativeMethods.cs
@@ -0,0 +1,41 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt VS Tools.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+using System;
+using System.Runtime.InteropServices;
+using System.Runtime.Versioning;
+
+namespace QtProjectWizard
+{
+ internal static class UnsafeNativeMethods
+ {
+ [ResourceExposure(ResourceScope.None)]
+ [DllImport("user32.dll", CharSet = CharSet.Auto)]
+ internal static extern int SetWindowLong(IntPtr hwnd, int index, int value);
+ }
+}
diff --git a/src/qtwizard/WizardWindow.xaml.cs b/src/qtwizard/WizardWindow.xaml.cs
index e626ca44..a5ac9f55 100644
--- a/src/qtwizard/WizardWindow.xaml.cs
+++ b/src/qtwizard/WizardWindow.xaml.cs
@@ -28,26 +28,10 @@
using System;
using System.Collections.Generic;
-using System.Runtime.InteropServices;
-using System.Runtime.Versioning;
using System.Windows.Navigation;
namespace QtProjectWizard
{
- internal static class NativeMethods
- {
- [ResourceExposure(ResourceScope.None)]
- [DllImport("user32.dll", CharSet = CharSet.Auto)]
- internal static extern int GetWindowLong(IntPtr hwnd, int index);
- }
-
- internal static class UnsafeNativeMethods
- {
- [ResourceExposure(ResourceScope.None)]
- [DllImport("user32.dll", CharSet = CharSet.Auto)]
- internal static extern int SetWindowLong(IntPtr hwnd, int index, int value);
- }
-
public partial class WizardWindow : NavigationWindow
{