* changed description text of Visual Studio plugin * changed plugin install targets to include VS 2017 * add license file with MIT license * updated vsix for deployment * implement wrapper for all used classes of VCProjectEngine.dll since you cannot just use the oldest version of this assembly (see https://stackoverflow.com/questions/44288050/typecast-fails-when-visual-studio-extension-uses-reference-to-older-assembly). * improved serialization and deserialization of compile commands and compilation databases. * updated used JSON package * rename CommandObject to CompileCommand * changed implementation to keep non-existent file paths in cdb * made methods of SolutionParser non-static * replace spaces with tabs * added IntegrationTests project * configured tests to simulate a new instance of VisualStudio * added cinder as test project for integration tests * remove all absolute paths from expected output of integration tests fortune cookie message = A stranger will bring great meaning to your life.
62 lines
1.7 KiB
C#
62 lines
1.7 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Drawing;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Forms;
|
|
|
|
namespace CoatiSoftware.SourcetrailPlugin.Wizard
|
|
{
|
|
public partial class WindowCDBReady : Form
|
|
{
|
|
private string _message0 = "The CDB ";
|
|
private string _message1 = " was created at directory ";
|
|
private string _message2 = "Do you want to auto-import it in Sourcetrail now?";
|
|
|
|
private WindowCreateCDB.CreationResult _creationResult = new WindowCreateCDB.CreationResult();
|
|
|
|
public WindowCDBReady()
|
|
{
|
|
InitializeComponent();
|
|
|
|
label_message.AutoSize = false;
|
|
label_message.MaximumSize = new Size((int)((float)MaximumSize.Width * 0.8f), 0);
|
|
}
|
|
|
|
public void setData(WindowCreateCDB.CreationResult creationResult)
|
|
{
|
|
_creationResult = creationResult;
|
|
|
|
label_message.Text = _message0 + "'" + creationResult._cdbName + "'" + _message1 + "\"" + creationResult._cdbDirectory + "\".";
|
|
label_message.Text += "\n" + _message2;
|
|
}
|
|
|
|
private void button_ok_Click(object sender, EventArgs e)
|
|
{
|
|
Close();
|
|
}
|
|
|
|
private void button_open_Click(object sender, EventArgs e)
|
|
{
|
|
Utility.SystemUtility.OpenWindowsExplorerAtDirectory(_creationResult._cdbDirectory);
|
|
}
|
|
|
|
private void button_import_Click(object sender, EventArgs e)
|
|
{
|
|
string message = Utility.NetworkProtocolUtility.CreateCreateProjectMessage(_creationResult._cdbDirectory + "\\" + _creationResult._cdbName + ".json", _creationResult._headerDirectories);
|
|
|
|
Utility.AsynchronousClient.Send(message);
|
|
|
|
Close();
|
|
}
|
|
|
|
private void WindowCDBReady_Resize(object sender, EventArgs e)
|
|
{
|
|
label_message.MaximumSize = new Size((int)((float)MaximumSize.Width * 0.8f), 0);
|
|
}
|
|
}
|
|
}
|