Browse Source

Refactored following discussion at #d discussions in Karlsruhe. Model api factored to be independent of #d, DataTools.UI is reusable UI components independent of #d, DataTools.AddIn is the #d plugin. ServerTools plugin remains unchanged.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@2459 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Dickon Field 19 years ago
parent
commit
8dafef3aa4
  1. 4
      src/AddIns/Misc/SharpServerTools/DataTools.Model/Configuration/AssemblyInfo.cs
  2. 47
      src/AddIns/Misc/SharpServerTools/DataTools.Model/DataTools.Model.csproj
  3. 0
      src/AddIns/Misc/SharpServerTools/DataTools.Model/Src/ColumnNames.cs
  4. 12
      src/AddIns/Misc/SharpServerTools/DataTools.Model/Src/DbModelInfo.cs
  5. 63
      src/AddIns/Misc/SharpServerTools/DataTools.Model/Src/DbModelInfoService.cs
  6. 40
      src/AddIns/Misc/SharpServerTools/DataTools.Model/Src/DbProvidersException.cs
  7. 35
      src/AddIns/Misc/SharpServerTools/DataTools.Model/Src/DbProvidersService.cs
  8. 2
      src/AddIns/Misc/SharpServerTools/DataTools.Model/Src/MetadataNames.cs
  9. 4
      src/AddIns/Misc/SharpServerTools/DataTools.UI/Configuration/AssemblyInfo.cs
  10. 30
      src/AddIns/Misc/SharpServerTools/DataTools.UI/DataTools.UI.csproj
  11. 205
      src/AddIns/Misc/SharpServerTools/DataTools.UI/Resources/Strings.resx
  12. 0
      src/AddIns/Misc/SharpServerTools/DataTools.UI/Src/ConnectionStringDefinitionDialog.Designer.cs
  13. 61
      src/AddIns/Misc/SharpServerTools/DataTools.UI/Src/ConnectionStringDefinitionDialog.cs
  14. 0
      src/AddIns/Misc/SharpServerTools/DataTools.UI/Src/ConnectionStringDefinitionDialog.resx
  15. 68
      src/AddIns/Misc/SharpServerTools/OracleDbToolsProvider/OracleDbToolsProvider.csproj
  16. 6
      src/AddIns/Misc/SharpServerTools/OracleDbToolsProvider/OracleDbToolsProvider.sln
  17. 67
      src/AddIns/Misc/SharpServerTools/OracleDbToolsProvider/OracleSharpDbToolsProvider.csproj
  18. 7
      src/AddIns/Misc/SharpServerTools/SQLServerDbToolsProvider/SQLServerDbToolsProvider.sln
  19. 4
      src/AddIns/Misc/SharpServerTools/ServerBrowserTool/ServerBrowserTool.csproj
  20. 9
      src/AddIns/Misc/SharpServerTools/ServerBrowserTool/SharpServerTools.addin
  21. 47
      src/AddIns/Misc/SharpServerTools/SharpDbTools/DataTools.AddIn.csproj
  22. 2
      src/AddIns/Misc/SharpServerTools/SharpDbTools/Src/Forms/DatabaseExplorerTreeNode.cs
  23. 6
      src/AddIns/Misc/SharpServerTools/SharpDbTools/Src/Provider/OracleFormsArtefactFactory.cs
  24. 6
      src/AddIns/Misc/SharpServerTools/SharpDbTools/Src/Provider/SQLServerFormsArtefactFactory.cs
  25. 6
      src/AddIns/Misc/SharpServerTools/SharpDbTools/Src/Provider/SQLiteArtefactFactory.cs
  26. 23
      src/SharpDevelop.sln

4
src/AddIns/Misc/SharpServerTools/SQLiteDbToolsProvider/Configuration/AssemblyInfo.cs → src/AddIns/Misc/SharpServerTools/DataTools.Model/Configuration/AssemblyInfo.cs

@ -8,11 +8,11 @@ using System.Runtime.InteropServices;
// change them to the information which is associated with the assembly // change them to the information which is associated with the assembly
// you compile. // you compile.
[assembly: AssemblyTitle("SQLiteDbToolsProvider")] [assembly: AssemblyTitle("DataTools.Model")]
[assembly: AssemblyDescription("")] [assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")] [assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SQLiteDbToolsProvider")] [assembly: AssemblyProduct("DataTools.Model")]
[assembly: AssemblyCopyright("")] [assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")] [assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]

47
src/AddIns/Misc/SharpServerTools/SQLServerDbToolsProvider/SQLServerDbToolsProvider.csproj → src/AddIns/Misc/SharpServerTools/DataTools.Model/DataTools.Model.csproj

@ -1,11 +1,11 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<OutputType>Library</OutputType> <ProjectGuid>{51783FC4-D8D2-4BFB-A1F1-AC8857CF3ED0}</ProjectGuid>
<RootNamespace>SQLServerDbToolsProvider</RootNamespace>
<AssemblyName>SQLServerDbToolsProvider</AssemblyName>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{8C692BAF-108E-4346-B41E-6EE7D20E2E9D}</ProjectGuid> <OutputType>Library</OutputType>
<RootNamespace>ICSharpCode.DataTools.Model</RootNamespace>
<AssemblyName>ICSharpCode.DataTools.Model</AssemblyName>
<AllowUnsafeBlocks>False</AllowUnsafeBlocks> <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
<NoStdLib>False</NoStdLib> <NoStdLib>False</NoStdLib>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
@ -13,19 +13,18 @@
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' "> <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<OutputPath>..\..\..\..\..\AddIns\AddIns\Misc\SharpServerTools\</OutputPath> <OutputPath>..\..\..\..\..\AddIns\AddIns\Misc\SharpServerTools\</OutputPath>
<Optimize>False</Optimize>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
<DebugType>Full</DebugType> <DebugType>Full</DebugType>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow> <CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<Optimize>False</Optimize>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' "> <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<OutputPath>..\..\..\..\..\AddIns\AddIns\Misc\SharpServerTools\</OutputPath> <OutputPath>bin\Release\</OutputPath>
<Optimize>True</Optimize>
<DefineConstants>TRACE</DefineConstants>
<DebugSymbols>False</DebugSymbols> <DebugSymbols>False</DebugSymbols>
<DebugType>None</DebugType> <DebugType>None</DebugType>
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow> <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
<DefineConstants>TRACE</DefineConstants>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'AnyCPU' "> <PropertyGroup Condition=" '$(Platform)' == 'AnyCPU' ">
<RegisterForComInterop>False</RegisterForComInterop> <RegisterForComInterop>False</RegisterForComInterop>
@ -34,28 +33,28 @@
<PlatformTarget>AnyCPU</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
<FileAlignment>4096</FileAlignment> <FileAlignment>4096</FileAlignment>
</PropertyGroup> </PropertyGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
<ItemGroup> <ItemGroup>
<Reference Include="log4net">
<HintPath>..\..\..\..\Libraries\log4net\bin\net\2.0\release\log4net.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Xml" />
<Reference Include="System.Data" /> <Reference Include="System.Data" />
<Reference Include="System.Windows.Forms" /> <Reference Include="System.Xml" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Config\AssemblyInfo.cs" /> <Compile Include="Configuration\AssemblyInfo.cs" />
<Compile Include="Src\Forms\SQLServerFormsArtefactFactory.cs" /> <Compile Include="Src\ColumnNames.cs" />
<Compile Include="Src\DbModelInfo.cs" />
<Compile Include="Src\DbModelInfoService.cs" />
<Compile Include="Src\DbProvidersException.cs" />
<Compile Include="Src\DbProvidersService.cs" />
<Compile Include="Src\MetadataNames.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Folder Include="Configuration" />
<Folder Include="Resources" />
<Folder Include="Src" /> <Folder Include="Src" />
<Folder Include="Config" />
<Folder Include="Src\Forms" />
<ProjectReference Include="..\..\..\..\Main\Core\Project\ICSharpCode.Core.csproj">
<Project>{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}</Project>
<Name>ICSharpCode.Core</Name>
</ProjectReference>
<ProjectReference Include="..\SharpDbTools\SharpDbTools.csproj">
<Project>{93B2D6DF-7588-40C0-8A35-CA0DD7328FC3}</Project>
<Name>SharpDbTools</Name>
</ProjectReference>
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
</Project> </Project>

0
src/AddIns/Misc/SharpServerTools/SharpDbTools/Src/Data/ColumnNames.cs → src/AddIns/Misc/SharpServerTools/DataTools.Model/Src/ColumnNames.cs

12
src/AddIns/Misc/SharpServerTools/SharpDbTools/Src/Data/DbModelInfo.cs → src/AddIns/Misc/SharpServerTools/DataTools.Model/Src/DbModelInfo.cs

@ -45,7 +45,7 @@ namespace SharpDbTools.Data
public string Name { public string Name {
get { get {
DataTable table = this.Tables[TableNames.ConnectionInfo]; DataTable table = this.Tables[MetadataNames.ConnectionInfo];
string name = table.Rows[0][ColumnNames.Name] as string; string name = table.Rows[0][ColumnNames.Name] as string;
return name; return name;
} }
@ -53,7 +53,7 @@ namespace SharpDbTools.Data
public string InvariantName { public string InvariantName {
get { get {
DataTable table = this.Tables[TableNames.ConnectionInfo]; DataTable table = this.Tables[MetadataNames.ConnectionInfo];
string invariantName = null; string invariantName = null;
try { try {
invariantName = table.Rows[0][ColumnNames.InvariantName] as string; invariantName = table.Rows[0][ColumnNames.InvariantName] as string;
@ -65,7 +65,7 @@ namespace SharpDbTools.Data
return invariantName; return invariantName;
} }
set { set {
DataTable table = this.Tables[TableNames.ConnectionInfo]; DataTable table = this.Tables[MetadataNames.ConnectionInfo];
string invariantName = table.Rows[0][ColumnNames.InvariantName] as string; string invariantName = table.Rows[0][ColumnNames.InvariantName] as string;
string name = this.Name; string name = this.Name;
string connectionString = this.ConnectionString; string connectionString = this.ConnectionString;
@ -87,7 +87,7 @@ namespace SharpDbTools.Data
public string ConnectionString { public string ConnectionString {
get { get {
DataTable table = this.Tables[TableNames.ConnectionInfo]; DataTable table = this.Tables[MetadataNames.ConnectionInfo];
string connectionString = null; string connectionString = null;
try { try {
connectionString = table.Rows[0][ColumnNames.ConnectionString] as string; connectionString = table.Rows[0][ColumnNames.ConnectionString] as string;
@ -101,7 +101,7 @@ namespace SharpDbTools.Data
return connectionString; return connectionString;
} }
set { set {
DataTable table = this.Tables[TableNames.ConnectionInfo]; DataTable table = this.Tables[MetadataNames.ConnectionInfo];
string connectionString = this.ConnectionString; string connectionString = this.ConnectionString;
if (connectionString == null) { if (connectionString == null) {
table.Rows[0][ColumnNames.ConnectionString] = value; table.Rows[0][ColumnNames.ConnectionString] = value;
@ -137,7 +137,7 @@ namespace SharpDbTools.Data
// create a table in the DbModelInfo to hold this initial info. // create a table in the DbModelInfo to hold this initial info.
// this creates a consistent representation of the data and makes // this creates a consistent representation of the data and makes
// it easier to serialise it // it easier to serialise it
DataTable table = this.Tables.Add(TableNames.ConnectionInfo); DataTable table = this.Tables.Add(MetadataNames.ConnectionInfo);
table.Columns.Add(ColumnNames.Name, typeof(string)); table.Columns.Add(ColumnNames.Name, typeof(string));
table.Columns.Add(ColumnNames.InvariantName, typeof(string)); table.Columns.Add(ColumnNames.InvariantName, typeof(string));
table.Columns.Add(ColumnNames.ConnectionString, typeof(string)); table.Columns.Add(ColumnNames.ConnectionString, typeof(string));

63
src/AddIns/Misc/SharpServerTools/SharpDbTools/Src/Data/DbModelInfoService.cs → src/AddIns/Misc/SharpServerTools/DataTools.Model/Src/DbModelInfoService.cs

@ -11,7 +11,7 @@ using System.Data;
using System.Data.Common; using System.Data.Common;
using System.IO; using System.IO;
using ICSharpCode.Core; using log4net;
namespace SharpDbTools.Data namespace SharpDbTools.Data
{ {
@ -25,18 +25,25 @@ namespace SharpDbTools.Data
/// </summary> /// </summary>
public static class DbModelInfoService public static class DbModelInfoService
{ {
static string saveLocation = null;
static object lockObject = new Object();
const string dbFilesDir = "DbTools"; const string dbFilesDir = "DbTools";
static SortedList<string, DbModelInfo> cache = null; static SortedList<string, DbModelInfo> cache = null;
static ILog log = LogManager.GetLogger(typeof(DbModelInfoService));
static string savePath;
public static string SavePath {
set {
savePath = value;
}
get {
return savePath;
}
}
public static IList<string> Names { public static IList<string> Names {
get { get {
lock(lockObject) { if (cache == null) {
if (cache == null) { cache = new SortedList<string, DbModelInfo>();
cache = new SortedList<string, DbModelInfo>(); LoadNamesFromFiles();
LoadNamesFromFiles();
}
} }
return cache.Keys; return cache.Keys;
} }
@ -74,11 +81,11 @@ namespace SharpDbTools.Data
public static DataTable GetTableInfo(string modelName, string tableName) public static DataTable GetTableInfo(string modelName, string tableName)
{ {
LoggingService.Debug("-->GetTableInfo"); log.Debug("-->GetTableInfo");
DbModelInfo modelInfo = GetDbModelInfo(modelName); DbModelInfo modelInfo = GetDbModelInfo(modelName);
DataTable columnTable = modelInfo.Tables[TableNames.Columns]; DataTable columnTable = modelInfo.Tables[MetadataNames.Columns];
DataRow[] columnsMetadata = columnTable.Select(ColumnNames.TableName + "='" + tableName + "'"); DataRow[] columnsMetadata = columnTable.Select(ColumnNames.TableName + "='" + tableName + "'");
LoggingService.Debug("found: " + columnsMetadata.Length + " columns belonging to table: " + tableName); log.Debug("found: " + columnsMetadata.Length + " columns belonging to table: " + tableName);
DataTable tableInfo = new DataTable(); DataTable tableInfo = new DataTable();
DataColumnCollection cols = columnTable.Columns; DataColumnCollection cols = columnTable.Columns;
foreach (DataColumn c in cols) { foreach (DataColumn c in cols) {
@ -132,7 +139,7 @@ namespace SharpDbTools.Data
connection.Open(); connection.Open();
DataTable schemaInfo = connection.GetSchema(); DataTable schemaInfo = connection.GetSchema();
if (schemaInfo != null) { if (schemaInfo != null) {
LoggingService.Debug("retrieved schema info with " + schemaInfo.Rows.Count + " rows"); log.Debug("retrieved schema info with " + schemaInfo.Rows.Count + " rows");
} }
// clear the DbModelInfo prior to refreshing from the connection // clear the DbModelInfo prior to refreshing from the connection
@ -144,16 +151,16 @@ namespace SharpDbTools.Data
foreach (DataRow collectionRow in schemaInfo.Rows) { foreach (DataRow collectionRow in schemaInfo.Rows) {
String collectionName = (string)collectionRow[0]; String collectionName = (string)collectionRow[0];
LoggingService.Debug("loading metadata for collection: " + collectionName); log.Debug("loading metadata for collection: " + collectionName);
DataTable nextMetaData = connection.GetSchema(collectionName); DataTable nextMetaData = connection.GetSchema(collectionName);
modelInfo.Merge(nextMetaData); modelInfo.Merge(nextMetaData);
} }
LoggingService.Debug("completed load of metadata, committing changes"); log.Debug("completed load of metadata, committing changes");
modelInfo.AcceptChanges(); modelInfo.AcceptChanges();
return modelInfo; return modelInfo;
} }
catch(Exception e) { catch(Exception e) {
LoggingService.Fatal("Exception caught while trying to retrieve database metadata: " + e); log.Fatal("Exception caught while trying to retrieve database metadata: " + e);
throw e; throw e;
} }
finally { finally {
@ -184,7 +191,7 @@ namespace SharpDbTools.Data
string filePath = path + @"\" + name + ".metadata"; string filePath = path + @"\" + name + ".metadata";
LoggingService.Debug("writing metadata to: " + filePath); log.Debug("writing metadata to: " + filePath);
if (File.Exists(filePath)) { if (File.Exists(filePath)) {
if (overwriteExistingFile) { if (overwriteExistingFile) {
File.Delete(filePath); File.Delete(filePath);
@ -215,12 +222,12 @@ namespace SharpDbTools.Data
{ {
// load DbModelInfo's from file system // load DbModelInfo's from file system
string saveLocation = GetSaveLocation(); string saveLocation = GetSaveLocation();
LoggingService.Debug("looking for metadata files at: " + saveLocation); log.Debug("looking for metadata files at: " + saveLocation);
string[] files = Directory.GetFileSystemEntries(saveLocation); string[] files = Directory.GetFileSystemEntries(saveLocation);
cache.Clear(); cache.Clear();
for (int i = 0; i < files.Length; i++) { for (int i = 0; i < files.Length; i++) {
LoggingService.Debug("found to load metadata from: " + files[i]); log.Debug("found to load metadata from: " + files[i]);
int start = files[i].LastIndexOf('\\'); int start = files[i].LastIndexOf('\\');
int end = files[i].LastIndexOf('.'); int end = files[i].LastIndexOf('.');
start++; start++;
@ -244,7 +251,7 @@ namespace SharpDbTools.Data
private static DbModelInfo LoadFromFileAtPath(string filePath) private static DbModelInfo LoadFromFileAtPath(string filePath)
{ {
LoggingService.Debug("loading DbModelInfo from filePath: " + filePath); log.Debug("loading DbModelInfo from filePath: " + filePath);
DbModelInfo nextModel = new DbModelInfo(); DbModelInfo nextModel = new DbModelInfo();
nextModel.ReadXml(filePath); nextModel.ReadXml(filePath);
return nextModel; return nextModel;
@ -252,7 +259,7 @@ namespace SharpDbTools.Data
public static void LoadFromFile(string logicalConnectionName) public static void LoadFromFile(string logicalConnectionName)
{ {
LoggingService.Debug("loading DbModelInfo for name: " + logicalConnectionName); log.Debug("loading DbModelInfo for name: " + logicalConnectionName);
string saveLocation = GetSaveLocation(); string saveLocation = GetSaveLocation();
string path = saveLocation + "\\" + logicalConnectionName + ".metadata"; string path = saveLocation + "\\" + logicalConnectionName + ".metadata";
DbModelInfo info = LoadFromFileAtPath(path); DbModelInfo info = LoadFromFileAtPath(path);
@ -264,17 +271,15 @@ namespace SharpDbTools.Data
{ {
// append the path of the directory for saving Db files // append the path of the directory for saving Db files
if (saveLocation == null) { if (SavePath == null) {
lock(lockObject) { string configDir = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
string configDir = PropertyService.ConfigDirectory; SavePath = configDir + @"\" + dbFilesDir;
saveLocation = configDir + @"\" + dbFilesDir; SavePath = SavePath.Replace("/", @"\");
saveLocation = saveLocation.Replace("/", @"\");
}
} }
if (!Directory.Exists(saveLocation)) { if (!Directory.Exists(SavePath)) {
Directory.CreateDirectory(@saveLocation); Directory.CreateDirectory(@SavePath);
} }
return saveLocation; return SavePath;
} }
} }

40
src/AddIns/Misc/SharpServerTools/DataTools.Model/Src/DbProvidersException.cs

@ -0,0 +1,40 @@
/*
* Created by SharpDevelop.
* User: dickon
* Date: 31/03/2007
* Time: 15:57
*
* To change this template use Tools | Options | Coding | Edit Standard Headers.
*/
using System;
using System.Runtime.Serialization;
using System.Collections.Generic;
namespace SharpDbTools.Data
{
/// <summary>
/// Thrown when the DbProvidersService cannot find the class for
/// a DbProviderFactory that is found in a *.config file.
/// </summary>
[Serializable()]
public class DbProvidersException : Exception
{
public DbProvidersException() : base()
{
}
public DbProvidersException(string message) : base(message)
{
}
public DbProvidersException(string message, Exception innerException) : base(message, innerException)
{
}
protected DbProvidersException(SerializationInfo info, StreamingContext context) : base(info, context)
{
}
}
}

35
src/AddIns/Misc/SharpServerTools/SharpDbTools/Src/Data/DbProvidersService.cs → src/AddIns/Misc/SharpServerTools/DataTools.Model/Src/DbProvidersService.cs

@ -9,9 +9,8 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Data; using System.Data;
using System.Data.Common; using System.Data.Common;
using System.Windows.Forms;
using ICSharpCode.Core; using log4net;
namespace SharpDbTools.Data namespace SharpDbTools.Data
{ {
@ -29,6 +28,8 @@ namespace SharpDbTools.Data
// This is only valid witin one session - do not persist // This is only valid witin one session - do not persist
private Dictionary<string, string> invariantByNameLookup = new Dictionary<string, string>(); private Dictionary<string, string> invariantByNameLookup = new Dictionary<string, string>();
private List<string> names = new List<string>(); private List<string> names = new List<string>();
static ILog log = LogManager.GetLogger(typeof(DbProvidersService));
List<string> errMsgs = new List<string>();
private DbProvidersService() private DbProvidersService()
{ {
@ -40,41 +41,43 @@ namespace SharpDbTools.Data
DataTable providerFactoriesTable = DbProviderFactories.GetFactoryClasses(); DataTable providerFactoriesTable = DbProviderFactories.GetFactoryClasses();
DataRow[] rows = providerFactoriesTable.Select(); DataRow[] rows = providerFactoriesTable.Select();
List<string> errorMsgs = new List<string>();
foreach(DataRow row in rows) foreach(DataRow row in rows)
{ {
// TODO: factor out string literals for column names // TODO: factor out string literals for column names
string name = (string)row["Name"]; string name = (string)row["Name"];
string invariantName = (string)row["InvariantName"]; string invariantName = (string)row["InvariantName"];
try { try {
LoggingService.Debug("adding lookup for: " + name + " to: + " + invariantName); log.Debug("adding lookup for: " + name + " to: + " + invariantName);
invariantByNameLookup.Add(name, invariantName); invariantByNameLookup.Add(name, invariantName);
//factoryData.Add(name, row); //factoryData.Add(name, row);
LoggingService.Debug("retrieving DbProviderFactory for Name: " log.Debug("retrieving DbProviderFactory for Name: "
+ name + " InvariantName: " + invariantName); + name + " InvariantName: " + invariantName);
DbProviderFactory factory = DbProviderFactories.GetFactory(row); DbProviderFactory factory = DbProviderFactories.GetFactory(row);
names.Add(name); names.Add(name);
factories.Add(name, factory); factories.Add(name, factory);
factoriesByInvariantName.Add(invariantName, factory); factoriesByInvariantName.Add(invariantName, factory);
} catch (ArgumentException) { } catch (ArgumentException) {
MessageBox.Show("Found duplicate config for data provider: " + name + ", invariant name: " + errorMsgs.Add("Found duplicate config for data provider: " + name + ", invariant name: " +
invariantName + ", will use config found first", "Exception loading DbProviderFactory", invariantName + ", will use config found first");
MessageBoxButtons.OK,
MessageBoxIcon.Error);
} catch (Exception) { } catch (Exception) {
MessageBox.Show("Unable to load DbProviderFactory for: " + name + ", this will be unavailable." + errorMsgs.Add("Unable to load DbProviderFactory for: " + name + ", this will be unavailable." +
"\nCheck *.config files for invalid ado.net config elements, or config" + " Check *.config files for invalid ado.net config elements, or config");
"for assemblies that are not available.",
"Exception loading DbProviderFactory", MessageBoxButtons.OK,
MessageBoxIcon.Error);
} }
} }
initialized = true; initialized = true;
} }
public List<string> Names public List<string> ErrorMessages {
{ get {
return this.errMsgs;
}
}
public List<string> Names {
get get
{ {
return names; return names;

2
src/AddIns/Misc/SharpServerTools/SharpDbTools/Src/Data/TableNames.cs → src/AddIns/Misc/SharpServerTools/DataTools.Model/Src/MetadataNames.cs

@ -12,7 +12,7 @@ namespace SharpDbTools.Data
/// <summary> /// <summary>
/// Description of Tables. /// Description of Tables.
/// </summary> /// </summary>
public sealed class TableNames public sealed class MetadataNames
{ {
public const string MetaDataCollections = "MetaDataCollections"; public const string MetaDataCollections = "MetaDataCollections";
public const string ConnectionInfo = "ConnectionInfo"; public const string ConnectionInfo = "ConnectionInfo";

4
src/AddIns/Misc/SharpServerTools/SQLServerDbToolsProvider/Config/AssemblyInfo.cs → src/AddIns/Misc/SharpServerTools/DataTools.UI/Configuration/AssemblyInfo.cs

@ -8,11 +8,11 @@ using System.Runtime.InteropServices;
// change them to the information which is associated with the assembly // change them to the information which is associated with the assembly
// you compile. // you compile.
[assembly: AssemblyTitle("SQLServerDbToolsProvider")] [assembly: AssemblyTitle("DataTools.UI")]
[assembly: AssemblyDescription("")] [assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")] [assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SQLServerDbToolsProvider")] [assembly: AssemblyProduct("DataTools.UI")]
[assembly: AssemblyCopyright("")] [assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")] [assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]

30
src/AddIns/Misc/SharpServerTools/SQLiteDbToolsProvider/SQLiteDbToolsProvider.csproj → src/AddIns/Misc/SharpServerTools/DataTools.UI/DataTools.UI.csproj

@ -1,11 +1,11 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<ProjectGuid>{5C1F6FB6-AB08-430D-8956-E2BE137470CD}</ProjectGuid> <ProjectGuid>{87C0E3D9-0DFD-4F6D-8E38-408AAF73F4EE}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<OutputType>Library</OutputType> <OutputType>Library</OutputType>
<RootNamespace>SQLiteDbToolsProvider</RootNamespace> <RootNamespace>ICSharpCode.DataTools.UI</RootNamespace>
<AssemblyName>SQLiteDbToolsProvider</AssemblyName> <AssemblyName>ICSharpCode.DataTools.UI</AssemblyName>
<AllowUnsafeBlocks>False</AllowUnsafeBlocks> <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
<NoStdLib>False</NoStdLib> <NoStdLib>False</NoStdLib>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
@ -43,24 +43,20 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Configuration\AssemblyInfo.cs" /> <Compile Include="Configuration\AssemblyInfo.cs" />
<Compile Include="Src\Forms\SQLiteArtefactFactory.cs" /> <Compile Include="Src\ConnectionStringDefinitionDialog.cs" />
<Compile Include="Src\ConnectionStringDefinitionDialog.Designer.cs" />
<EmbeddedResource Include="Resources\Strings.resx" />
<EmbeddedResource Include="Src\ConnectionStringDefinitionDialog.resx">
<DependentUpon>ConnectionStringDefinitionDialog.cs</DependentUpon>
</EmbeddedResource>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Folder Include="Configuration" /> <Folder Include="Configuration" />
<Folder Include="Src" />
<Folder Include="Resources" /> <Folder Include="Resources" />
<Folder Include="Src\Forms" /> <Folder Include="Src" />
<ProjectReference Include="..\..\..\..\Main\Base\Project\ICSharpCode.SharpDevelop.csproj"> <ProjectReference Include="..\DataTools.Model\DataTools.Model.csproj">
<Project>{2748AD25-9C63-4E12-877B-4DCE96FBED54}</Project> <Project>{51783FC4-D8D2-4BFB-A1F1-AC8857CF3ED0}</Project>
<Name>ICSharpCode.SharpDevelop</Name> <Name>DataTools.Model</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\..\Main\Core\Project\ICSharpCode.Core.csproj">
<Project>{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}</Project>
<Name>ICSharpCode.Core</Name>
</ProjectReference>
<ProjectReference Include="..\SharpDbTools\SharpDbTools.csproj">
<Project>{93B2D6DF-7588-40C0-8A35-CA0DD7328FC3}</Project>
<Name>SharpDbTools</Name>
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
</Project> </Project>

205
src/AddIns/Misc/SharpServerTools/DataTools.UI/Resources/Strings.resx

@ -0,0 +1,205 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="SharpDbTools.Data.PrimaryObjects.Tables" xml:space="preserve">
<value>Tables</value>
</data>
<data name="SharpDbTools.Data.PrimaryObjects.Procedures" xml:space="preserve">
<value>Procedures</value>
</data>
<data name="SharpDbTools.Data.PrimaryObjects.Functions" xml:space="preserve">
<value>Functions
</value>
</data>
<data name="SharpDbTools.Data.PrimaryObjects.Views" xml:space="preserve">
<value>Views</value>
</data>
<data name="SharpDbTools.Data.PrimaryObjects.Users" xml:space="preserve">
<value>Users</value>
</data>
<data name="SharpDbTools.Forms.DbObjectNodeName" xml:space="preserve">
<value>Db Objects</value>
</data>
<data name="SharpDbTools.Forms.DbExplorerNodeName" xml:space="preserve">
<value>Database Explorer</value>
</data>
<data name="SharpDbTools.Forms.AddConnectionMenu" xml:space="preserve">
<value>Add Connection</value>
</data>
<data name="SharpDbTools.Forms.DeleteConnectionMenu" xml:space="preserve">
<value>Delete Connection</value>
</data>
<data name="SharpDbTools.Forms.SaveAllMenu" xml:space="preserve">
<value>Save All</value>
</data>
<data name="SharpDbTools.Forms.ConnectionPropertiesNodeName" xml:space="preserve">
<value>Connection Properties</value>
</data>
<data name="SharpDbTools.Forms.NoMetadataNodeName" xml:space="preserve">
<value>No Metadata</value>
</data>
<data name="SharpDbTools.Forms.SetConnectionStringMenu" xml:space="preserve">
<value>Set Connection String</value>
</data>
<data name="SharpDbTools.Forms.LoadMetadataFromConnectionMenu" xml:space="preserve">
<value>Load Metadata From Connection</value>
</data>
<data name="SharpDbTools.Forms.LoadMetadataFromFileMenu" xml:space="preserve">
<value>Load Metadata From File</value>
</data>
<data name="SharpDbTools.Forms.OpenSQLToolMenu" xml:space="preserve">
<value>Open SQL Tool</value>
</data>
<data name="SharpDbTools.Forms.ConnectionStringNodeName" xml:space="preserve">
<value>Connection String:</value>
</data>
<data name="SharpDbTools.Forms.InvariantNameNodeName" xml:space="preserve">
<value>Invariant Name:</value>
</data>
<data name="SharpDbTools.Forms.ConnectionSucceededMsg" xml:space="preserve">
<value>Connection Succeeded</value>
</data>
<data name="SharpDbTools.Forms.ConnectionFailedMsg" xml:space="preserve">
<value>Connection Failed</value>
</data>
<data name="SharpDbTools.Forms.TestButton" xml:space="preserve">
<value>Test</value>
</data>
<data name="SharpDbTools.Forms.SubmitButton" xml:space="preserve">
<value>Submit</value>
</data>
<data name="SharpDbTools.Forms.CancelButton" xml:space="preserve">
<value>Cancel</value>
</data>
<data name="SharpDbTools.Forms.DataSourceTypeLabel" xml:space="preserve">
<value>Data Source Type:</value>
</data>
<data name="SharpDbTools.Forms.ConnectionStringLabel" xml:space="preserve">
<value>Connection String:</value>
</data>
<data name="SharpDbTools.Forms.ConnectionStringTab" xml:space="preserve">
<value>Connection String</value>
</data>
<data name="SharpDbTools.Forms.TestResultTab" xml:space="preserve">
<value>Test Result Message</value>
</data>
<data name="SharpDbTools.Forms.ConnectionStringDefinitionDialog" xml:space="preserve">
<value>Set Up Connection String</value>
</data>
</root>

0
src/AddIns/Misc/SharpServerTools/SharpDbTools/Src/Forms/ConnectionStringDefinitionDialog.Designer.cs → src/AddIns/Misc/SharpServerTools/DataTools.UI/Src/ConnectionStringDefinitionDialog.Designer.cs generated

61
src/AddIns/Misc/SharpServerTools/SharpDbTools/Src/Forms/ConnectionStringDefinitionDialog.cs → src/AddIns/Misc/SharpServerTools/DataTools.UI/Src/ConnectionStringDefinitionDialog.cs

@ -10,7 +10,9 @@ using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Data.Common; using System.Data.Common;
using System.Windows.Forms; using System.Windows.Forms;
using ICSharpCode.Core; using System.Resources;
using System.Reflection;
using System.Text;
using SharpDbTools.Data; using SharpDbTools.Data;
@ -32,6 +34,8 @@ namespace SharpDbTools.Forms
ToolStripProgressBar connectionTestProgressBar = new ToolStripProgressBar(); ToolStripProgressBar connectionTestProgressBar = new ToolStripProgressBar();
ConnectionTestBackgroundWorker testConnectionBackgroundWorker; ConnectionTestBackgroundWorker testConnectionBackgroundWorker;
string resultMessage; string resultMessage;
string succeededMessage;
string failedMessage;
string invariantName; string invariantName;
ConnectionTestState connectionTestState = ConnectionTestState.UnTested; ConnectionTestState connectionTestState = ConnectionTestState.UnTested;
@ -42,19 +46,23 @@ namespace SharpDbTools.Forms
// //
InitializeComponent(); InitializeComponent();
// overwrite Text properties using ResourceService // overwrite Text properties using resMgr
this.testButton.Text = ResourceService.GetString("SharpDbTools.Forms.TestButton"); ResourceManager resMgr = new ResourceManager("ICSharpCode.DataTools.UI" + ".Resources.Strings",
this.submitButton.Text = ResourceService.GetString("SharpDbTools.Forms.SubmitButton"); Assembly.GetAssembly(typeof(ConnectionStringDefinitionDialog)));
this.cancelButton.Text = ResourceService.GetString("SharpDbTools.Forms.CancelButton"); this.testButton.Text = resMgr.GetString("SharpDbTools.Forms.TestButton");
this.dataSourceTypeLabel.Text = ResourceService.GetString("SharpDbTools.Forms.DataSourceTypeLabel"); this.submitButton.Text = resMgr.GetString("SharpDbTools.Forms.SubmitButton");
this.connectionStringLabel.Text = ResourceService.GetString("SharpDbTools.Forms.ConnectionStringLabel"); this.cancelButton.Text = resMgr.GetString("SharpDbTools.Forms.CancelButton");
this.connectionStringTab.Text = ResourceService.GetString("SharpDbTools.Forms.ConnectionStringTab"); this.dataSourceTypeLabel.Text = resMgr.GetString("SharpDbTools.Forms.DataSourceTypeLabel");
this.testResultTab.Text = ResourceService.GetString("SharpDbTools.Forms.TestResultTab"); this.connectionStringLabel.Text = resMgr.GetString("SharpDbTools.Forms.ConnectionStringLabel");
this.Text = ResourceService.GetString("SharpDbTools.Forms.ConnectionStringDefinitionDialog"); this.connectionStringTab.Text = resMgr.GetString("SharpDbTools.Forms.ConnectionStringTab");
this.testResultTab.Text = resMgr.GetString("SharpDbTools.Forms.TestResultTab");
this.Text = resMgr.GetString("SharpDbTools.Forms.ConnectionStringDefinitionDialog");
this.succeededMessage = resMgr.GetString("SharpDbTools.Forms.ConnectionSucceededMsg");
this.failedMessage = resMgr.GetString("SharpDbTools.Forms.ConnectionFailedMsg");
this.connStringPropertyGrid.PropertyValueChanged += this.connStringPropertyGrid.PropertyValueChanged +=
new PropertyValueChangedEventHandler(this.ConnStringAttributesViewPropertyValueChanged); new PropertyValueChangedEventHandler(this.ConnStringAttributesViewPropertyValueChanged);
// add a ProgressBar to the statusString // add a ProgressBar to the statusString
this.statusStrip.Items.Add(connectionTestProgressBar); this.statusStrip.Items.Add(connectionTestProgressBar);
@ -94,7 +102,7 @@ namespace SharpDbTools.Forms
{ {
get get
{ {
return (DbConnectionStringBuilder)this.connStringPropertyGrid.SelectedObject; return (DbConnectionStringBuilder)this.connStringPropertyGrid.SelectedObject;
} }
} }
@ -113,8 +121,15 @@ namespace SharpDbTools.Forms
// //
base.OnLoad(e); base.OnLoad(e);
DbProvidersService service = DbProvidersService.GetDbProvidersService(); DbProvidersService service = DbProvidersService.GetDbProvidersService();
if (service.ErrorMessages.Count > 0) {
StringBuilder b = new StringBuilder();
foreach(string s in service.ErrorMessages) {
b.Append(s).Append("\n");
}
MessageBox.Show(b.ToString(), "Non-fatal Exception caught", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
}
List<string> names = service.Names; List<string> names = service.Names;
this.providerTypeComboBox.DataSource = names; this.providerTypeComboBox.DataSource = names;
this.connStringResult.Text = this.ConnectionString; this.connStringResult.Text = this.ConnectionString;
@ -151,7 +166,7 @@ namespace SharpDbTools.Forms
progressTimer.Enabled = true; progressTimer.Enabled = true;
testConnectionBackgroundWorker.DoWork += // TODO: This may result in duplicate bindings testConnectionBackgroundWorker.DoWork += // TODO: This may result in duplicate bindings
new DoWorkEventHandler(this.TestConnectionBackgroundWorkerDoWork); new DoWorkEventHandler(this.TestConnectionBackgroundWorkerDoWork);
testConnectionBackgroundWorker.RunWorkerCompleted += testConnectionBackgroundWorker.RunWorkerCompleted +=
new RunWorkerCompletedEventHandler(TestConnectionRunWorkerComplete); new RunWorkerCompletedEventHandler(TestConnectionRunWorkerComplete);
testConnectionBackgroundWorker.RunWorkerAsync(); testConnectionBackgroundWorker.RunWorkerAsync();
} }
@ -186,9 +201,9 @@ namespace SharpDbTools.Forms
try try
{ {
// get the current name // get the current name
ConnectionTestBackgroundWorker bw = sender as ConnectionTestBackgroundWorker; ConnectionTestBackgroundWorker bw = sender as ConnectionTestBackgroundWorker;
string currentDbTypeName = bw.DatabaseType; string currentDbTypeName = bw.DatabaseType;
// get the DbProviderFactory for this name // get the DbProviderFactory for this name
@ -200,14 +215,14 @@ namespace SharpDbTools.Forms
connection = factory.CreateConnection(); connection = factory.CreateConnection();
connection.ConnectionString = this.ConnectionString; connection.ConnectionString = this.ConnectionString;
connection.Open(); connection.Open();
e.Result = ResourceService.GetString("SharpDbTools.Forms.ConnectionSucceededMsg"); //"Connection Succeeded"; e.Result = this.succeededMessage; //"Connection Succeeded";
connectionTestState = ConnectionTestState.TestSucceeded; connectionTestState = ConnectionTestState.TestSucceeded;
} }
catch(Exception ex) catch(Exception ex)
{ {
e.Result = e.Result =
ResourceService.GetString("SharpDbTools.Forms.ConnectionFailedMsg") + ex.Message; /*"Connection Failed: "*/ this.failedMessage + ex.Message; /*"Connection Failed: "*/
connectionTestState = ConnectionTestState.TestFailed; connectionTestState = ConnectionTestState.TestFailed;
} }
finally finally
@ -216,7 +231,7 @@ namespace SharpDbTools.Forms
{ {
connection.Close(); connection.Close();
} }
} }
} }
void TestConnectionRunWorkerComplete(object sender, RunWorkerCompletedEventArgs args) void TestConnectionRunWorkerComplete(object sender, RunWorkerCompletedEventArgs args)
@ -240,7 +255,7 @@ namespace SharpDbTools.Forms
this.InvariantName = service.GetInvariantName(name); this.InvariantName = service.GetInvariantName(name);
this.DialogResult = DialogResult.OK; this.DialogResult = DialogResult.OK;
this.Close(); this.Close();
} }
} }
@ -257,7 +272,7 @@ namespace SharpDbTools.Forms
public ConnectionTestBackgroundWorker(string dbTypeName): base() public ConnectionTestBackgroundWorker(string dbTypeName): base()
{ {
this.dbTypeName = dbTypeName; this.dbTypeName = dbTypeName;
} }
public string DatabaseType public string DatabaseType

0
src/AddIns/Misc/SharpServerTools/SharpDbTools/Src/Forms/ConnectionStringDefinitionDialog.resx → src/AddIns/Misc/SharpServerTools/DataTools.UI/Src/ConnectionStringDefinitionDialog.resx

68
src/AddIns/Misc/SharpServerTools/OracleDbToolsProvider/OracleDbToolsProvider.csproj

@ -1,68 +0,0 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<OutputType>Library</OutputType>
<RootNamespace>OracleDbToolsProvider</RootNamespace>
<AssemblyName>OracleDbToolsProvider</AssemblyName>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{DFA70EAA-3285-4BC0-BCA7-EBEC4D67FC9B}</ProjectGuid>
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
<NoStdLib>False</NoStdLib>
<RegisterForComInterop>False</RegisterForComInterop>
<GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>
<BaseAddress>4194304</BaseAddress>
<PlatformTarget>AnyCPU</PlatformTarget>
<FileAlignment>4096</FileAlignment>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<OutputPath>..\..\..\..\..\AddIns\AddIns\Misc\SharpServerTools\</OutputPath>
<Optimize>False</Optimize>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugSymbols>true</DebugSymbols>
<DebugType>Full</DebugType>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<OutputPath>..\..\..\..\..\AddIns\AddIns\Misc\SharpServerTools\</OutputPath>
<Optimize>True</Optimize>
<DefineConstants>TRACE</DefineConstants>
<DebugSymbols>False</DebugSymbols>
<DebugType>None</DebugType>
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Xml" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Src\Forms\OracleFormsArtefactFactory.cs" />
</ItemGroup>
<ItemGroup>
<Folder Include="Resources" />
<Folder Include="Src" />
<Folder Include="Src\Forms" />
<ProjectReference Include="..\..\..\..\Main\Core\Project\ICSharpCode.Core.csproj">
<Project>{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}</Project>
<Name>ICSharpCode.Core</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\..\Main\Base\Project\ICSharpCode.SharpDevelop.csproj">
<Project>{2748AD25-9C63-4E12-877B-4DCE96FBED54}</Project>
<Name>ICSharpCode.SharpDevelop</Name>
</ProjectReference>
<ProjectReference Include="..\ServerBrowserTool\ServerBrowserTool.csproj">
<Project>{D721EAA4-8A40-4EF0-A011-5862159BE621}</Project>
<Name>ServerBrowserTool</Name>
</ProjectReference>
<ProjectReference Include="..\SharpDbTools\SharpDbTools.csproj">
<Project>{93B2D6DF-7588-40C0-8A35-CA0DD7328FC3}</Project>
<Name>SharpDbTools</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
</Project>

6
src/AddIns/Misc/SharpServerTools/OracleDbToolsProvider/OracleDbToolsProvider.sln

@ -1,6 +0,0 @@
Microsoft Visual Studio Solution File, Format Version 9.00
# SharpDevelop 2.1.0.1900
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OracleDbToolsProvider", "OracleDbToolsProvider.csproj", "{DFA70EAA-3285-4BC0-BCA7-EBEC4D67FC9B}"
EndProject
Global
EndGlobal

67
src/AddIns/Misc/SharpServerTools/OracleDbToolsProvider/OracleSharpDbToolsProvider.csproj

@ -1,67 +0,0 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<OutputType>Library</OutputType>
<RootNamespace>OracleDbToolsProvider</RootNamespace>
<AssemblyName>OracleSharpDbToolsProvider</AssemblyName>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{2B4FE109-816C-4397-BFBE-077E1763A7A4}</ProjectGuid>
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
<NoStdLib>False</NoStdLib>
<RegisterForComInterop>False</RegisterForComInterop>
<GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>
<BaseAddress>4194304</BaseAddress>
<PlatformTarget>AnyCPU</PlatformTarget>
<FileAlignment>4096</FileAlignment>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<BaseIntermediateOutputPath>obj\</BaseIntermediateOutputPath>
<IntermediateOutputPath>obj\Debug\</IntermediateOutputPath>
<OutputPath>..\..\..\..\..\..\AddIns\AddIns\Misc\SharpServerTools\</OutputPath>
<Optimize>False</Optimize>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugSymbols>true</DebugSymbols>
<DebugType>Full</DebugType>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<BaseIntermediateOutputPath>obj\</BaseIntermediateOutputPath>
<IntermediateOutputPath>obj\Release\</IntermediateOutputPath>
<OutputPath>bin\Release\</OutputPath>
<Optimize>True</Optimize>
<DefineConstants>TRACE</DefineConstants>
<DebugSymbols>False</DebugSymbols>
<DebugType>None</DebugType>
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Xml" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
</ItemGroup>
<ItemGroup>
<Compile Include="Src\Forms\OracleFormsArtefactFactory.cs" />
<Compile Include="Src\Forms\TableTreeNode.cs" />
</ItemGroup>
<ItemGroup>
<Folder Include="Src" />
<Folder Include="Src\Forms" />
<ProjectReference Include="..\..\..\..\..\Main\Core\Project\ICSharpCode.Core.csproj">
<Project>{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}</Project>
<Name>ICSharpCode.Core</Name>
</ProjectReference>
<ProjectReference Include="..\..\SharpServerTools.csproj">
<Project>{E8922383-B6F5-4107-AB82-49662D98B2FE}</Project>
<Name>SharpServerTools</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\..\..\Main\Base\Project\ICSharpCode.SharpDevelop.csproj">
<Project>{2748AD25-9C63-4E12-877B-4DCE96FBED54}</Project>
<Name>ICSharpCode.SharpDevelop</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
</Project>

7
src/AddIns/Misc/SharpServerTools/SQLServerDbToolsProvider/SQLServerDbToolsProvider.sln

@ -1,7 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 9.00
# SharpDevelop 2.1.0.2001
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SQLServerDbToolsProvider", "SQLServerDbToolsProvider.csproj", "{8C692BAF-108E-4346-B41E-6EE7D20E2E9D}"
EndProject
Global
EndGlobal

4
src/AddIns/Misc/SharpServerTools/ServerBrowserTool/ServerBrowserTool.csproj

@ -1,8 +1,8 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<OutputType>Library</OutputType> <OutputType>Library</OutputType>
<RootNamespace>ServerBrowserTool</RootNamespace> <RootNamespace>ICSharpCode.ServerBrowserTool</RootNamespace>
<AssemblyName>ServerBrowserTool</AssemblyName> <AssemblyName>ICSharpCode.ServerBrowserTool</AssemblyName>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{D721EAA4-8A40-4EF0-A011-5862159BE621}</ProjectGuid> <ProjectGuid>{D721EAA4-8A40-4EF0-A011-5862159BE621}</ProjectGuid>

9
src/AddIns/Misc/SharpServerTools/ServerBrowserTool/SharpServerTools.addin

@ -8,11 +8,10 @@
</Manifest> </Manifest>
<Runtime> <Runtime>
<Import assembly = "SharpDbTools.dll"/> <Import assembly = "ICSharpCode.ServerBrowserTool.dll"/>
<Import assembly = "ServerBrowserTool.dll"/> <Import assembly="ICSharpCode.DataTools.AddIn.dll"/>
<Import assembly="OracleDbToolsProvider.dll"/> <Import assembly="ICSharpCode.DataTools.UI.dll"/>
<Import assembly="SqlServerDbToolsProvider.dll"/> <Import assembly="ICSharpCode.DataTools.Model.dll"/>
<Import assembly="SQLiteDbToolsProvider.dll"/>
</Runtime> </Runtime>
<Path name = "/SharpDevelop/Workbench/Pads"> <Path name = "/SharpDevelop/Workbench/Pads">

47
src/AddIns/Misc/SharpServerTools/SharpDbTools/SharpDbTools.csproj → src/AddIns/Misc/SharpServerTools/SharpDbTools/DataTools.AddIn.csproj

@ -1,17 +1,21 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<OutputType>Library</OutputType> <OutputType>Library</OutputType>
<RootNamespace>SharpDbTools</RootNamespace> <RootNamespace>ICSharpCode.DataTools.AddIn</RootNamespace>
<AssemblyName>SharpDbTools</AssemblyName> <AssemblyName>ICSharpCode.DataTools.AddIn</AssemblyName>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{93B2D6DF-7588-40C0-8A35-CA0DD7328FC3}</ProjectGuid> <ProjectGuid>{93B2D6DF-7588-40C0-8A35-CA0DD7328FC3}</ProjectGuid>
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
<NoStdLib>False</NoStdLib>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' "> <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<OutputPath>bin\Debug\</OutputPath> <OutputPath>..\..\..\..\..\AddIns\AddIns\Misc\SharpServerTools\</OutputPath>
<Optimize>False</Optimize> <Optimize>False</Optimize>
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugSymbols>True</DebugSymbols> <DebugSymbols>true</DebugSymbols>
<DebugType>Full</DebugType> <DebugType>Full</DebugType>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow> <CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
</PropertyGroup> </PropertyGroup>
@ -23,6 +27,13 @@
<DebugType>None</DebugType> <DebugType>None</DebugType>
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow> <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'AnyCPU' ">
<RegisterForComInterop>False</RegisterForComInterop>
<GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>
<BaseAddress>4194304</BaseAddress>
<PlatformTarget>AnyCPU</PlatformTarget>
<FileAlignment>4096</FileAlignment>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
@ -41,25 +52,18 @@
<Compile Include="Src\Forms\SQLToolResourceSyntaxModeProvider.cs" /> <Compile Include="Src\Forms\SQLToolResourceSyntaxModeProvider.cs" />
<Compile Include="Src\Forms\SQLToolViewContent.cs" /> <Compile Include="Src\Forms\SQLToolViewContent.cs" />
<Compile Include="Src\Forms\TableDescribeViewContent.cs" /> <Compile Include="Src\Forms\TableDescribeViewContent.cs" />
<Compile Include="Src\Forms\ConnectionStringDefinitionDialog.cs" />
<Compile Include="Src\Forms\ConnectionStringDefinitionDialog.Designer.cs" />
<Compile Include="Src\Forms\DatabaseExplorerTreeNode.cs" /> <Compile Include="Src\Forms\DatabaseExplorerTreeNode.cs" />
<Compile Include="Src\Forms\DbModelInfoTreeNode.cs" /> <Compile Include="Src\Forms\DbModelInfoTreeNode.cs" />
<Compile Include="Src\Forms\FormsArtefactFactories.cs" /> <Compile Include="Src\Forms\FormsArtefactFactories.cs" />
<Compile Include="Src\Forms\FormsArtefactFactory.cs" /> <Compile Include="Src\Forms\FormsArtefactFactory.cs" />
<EmbeddedResource Include="Resources\Strings.resx" /> <EmbeddedResource Include="Resources\Strings.resx" />
<EmbeddedResource Include="Src\Forms\ConnectionStringDefinitionDialog.resx">
<DependentUpon>ConnectionStringDefinitionDialog.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Src\Forms\SQLTool.resx"> <EmbeddedResource Include="Src\Forms\SQLTool.resx">
<DependentUpon>SQLTool.cs</DependentUpon> <DependentUpon>SQLTool.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<Compile Include="Src\Data\TableNames.cs" />
<Compile Include="Src\Data\ColumnNames.cs" />
<Compile Include="Src\Data\DbModelInfo.cs" />
<Compile Include="Src\Data\DbModelInfoService.cs" />
<Compile Include="Src\Data\DbProvidersService.cs" />
<Compile Include="Src\Forms\TableTreeNode.cs" /> <Compile Include="Src\Forms\TableTreeNode.cs" />
<Compile Include="Src\Provider\OracleFormsArtefactFactory.cs" />
<Compile Include="Src\Provider\SQLiteArtefactFactory.cs" />
<Compile Include="Src\Provider\SQLServerFormsArtefactFactory.cs" />
<EmbeddedResource Include="Resources\SQL.xshd" /> <EmbeddedResource Include="Resources\SQL.xshd" />
<EmbeddedResource Include="Resources\SyntaxModes.xml" /> <EmbeddedResource Include="Resources\SyntaxModes.xml" />
</ItemGroup> </ItemGroup>
@ -70,17 +74,26 @@
<Folder Include="Src\Data" /> <Folder Include="Src\Data" />
<Folder Include="Src\Forms" /> <Folder Include="Src\Forms" />
<Folder Include="Src\Forms.TextEditor" /> <Folder Include="Src\Forms.TextEditor" />
<Folder Include="Src\Provider" />
<ProjectReference Include="..\..\..\..\Libraries\ICSharpCode.TextEditor\Project\ICSharpCode.TextEditor.csproj"> <ProjectReference Include="..\..\..\..\Libraries\ICSharpCode.TextEditor\Project\ICSharpCode.TextEditor.csproj">
<Project>{2D18BE89-D210-49EB-A9DD-2246FBB3DF6D}</Project> <Project>{2D18BE89-D210-49EB-A9DD-2246FBB3DF6D}</Project>
<Name>ICSharpCode.TextEditor</Name> <Name>ICSharpCode.TextEditor</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\..\..\..\Main\Base\Project\ICSharpCode.SharpDevelop.csproj">
<Project>{2748AD25-9C63-4E12-877B-4DCE96FBED54}</Project>
<Name>ICSharpCode.SharpDevelop</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\..\Main\Core\Project\ICSharpCode.Core.csproj"> <ProjectReference Include="..\..\..\..\Main\Core\Project\ICSharpCode.Core.csproj">
<Project>{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}</Project> <Project>{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}</Project>
<Name>ICSharpCode.Core</Name> <Name>ICSharpCode.Core</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\..\..\..\Main\Base\Project\ICSharpCode.SharpDevelop.csproj"> <ProjectReference Include="..\DataTools.Model\DataTools.Model.csproj">
<Project>{2748AD25-9C63-4E12-877B-4DCE96FBED54}</Project> <Project>{51783FC4-D8D2-4BFB-A1F1-AC8857CF3ED0}</Project>
<Name>ICSharpCode.SharpDevelop</Name> <Name>DataTools.Model</Name>
</ProjectReference>
<ProjectReference Include="..\DataTools.UI\DataTools.UI.csproj">
<Project>{87C0E3D9-0DFD-4F6D-8E38-408AAF73F4EE}</Project>
<Name>DataTools.UI</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\ServerBrowserTool\ServerBrowserTool.csproj"> <ProjectReference Include="..\ServerBrowserTool\ServerBrowserTool.csproj">
<Project>{D721EAA4-8A40-4EF0-A011-5862159BE621}</Project> <Project>{D721EAA4-8A40-4EF0-A011-5862159BE621}</Project>

2
src/AddIns/Misc/SharpServerTools/SharpDbTools/Src/Forms/DatabaseExplorerTreeNode.cs

@ -26,7 +26,7 @@ namespace SharpDbTools.Forms
{ {
static DatabaseExplorerTreeNode() static DatabaseExplorerTreeNode()
{ {
ResourceService.RegisterStrings("SharpDbTools.Resources.Strings", typeof(DatabaseExplorerTreeNode).Assembly); ResourceService.RegisterStrings("ICSharpCode.DataTools.AddIn.Resources.Strings", typeof(DatabaseExplorerTreeNode).Assembly);
} }
public DatabaseExplorerTreeNode(): base() public DatabaseExplorerTreeNode(): base()

6
src/AddIns/Misc/SharpServerTools/OracleDbToolsProvider/Src/Forms/OracleFormsArtefactFactory.cs → src/AddIns/Misc/SharpServerTools/SharpDbTools/Src/Provider/OracleFormsArtefactFactory.cs

@ -41,15 +41,15 @@ namespace SharpDbTools.Oracle.Forms
// retrieve the table listing the metadata collections // retrieve the table listing the metadata collections
DataTable metadataCollectionsTable = info.Tables[TableNames.MetaDataCollections]; DataTable metadataCollectionsTable = info.Tables[MetadataNames.MetaDataCollections];
// if it exists then populate the tree // if it exists then populate the tree
if (metadataCollectionsTable != null) { if (metadataCollectionsTable != null) {
LoggingService.Debug(this.GetType().ToString() + ": found metadata collections table, " + LoggingService.Debug(this.GetType().ToString() + ": found metadata collections table, " +
" building node..."); " building node...");
for (int i = 0; i < TableNames.PrimaryObjects.Length; i++) { for (int i = 0; i < MetadataNames.PrimaryObjects.Length; i++) {
string metadataCollectionName = TableNames.PrimaryObjects[i]; string metadataCollectionName = MetadataNames.PrimaryObjects[i];
LoggingService.Debug("looking for metadata: " + metadataCollectionName); LoggingService.Debug("looking for metadata: " + metadataCollectionName);
DataTable metaCollectionTable = info.Tables[metadataCollectionName]; DataTable metaCollectionTable = info.Tables[metadataCollectionName];
if (metaCollectionTable == null) continue; if (metaCollectionTable == null) continue;

6
src/AddIns/Misc/SharpServerTools/SQLServerDbToolsProvider/Src/Forms/SQLServerFormsArtefactFactory.cs → src/AddIns/Misc/SharpServerTools/SharpDbTools/Src/Provider/SQLServerFormsArtefactFactory.cs

@ -45,15 +45,15 @@ namespace SharpDbTools.SQLServer.Forms
// retrieve the table listing the metadata collections // retrieve the table listing the metadata collections
DataTable metadataCollectionsTable = info.Tables[TableNames.MetaDataCollections]; DataTable metadataCollectionsTable = info.Tables[MetadataNames.MetaDataCollections];
// if it exists then populate the tree // if it exists then populate the tree
if (metadataCollectionsTable != null) { if (metadataCollectionsTable != null) {
LoggingService.Debug(this.GetType().ToString() + ": found metadata collections table, " + LoggingService.Debug(this.GetType().ToString() + ": found metadata collections table, " +
" building node..."); " building node...");
for (int i = 0; i < TableNames.PrimaryObjects.Length; i++) { for (int i = 0; i < MetadataNames.PrimaryObjects.Length; i++) {
string metadataCollectionName = TableNames.PrimaryObjects[i]; string metadataCollectionName = MetadataNames.PrimaryObjects[i];
LoggingService.Debug("looking for metadata: " + metadataCollectionName); LoggingService.Debug("looking for metadata: " + metadataCollectionName);
DataTable metaCollectionTable = info.Tables[metadataCollectionName]; DataTable metaCollectionTable = info.Tables[metadataCollectionName];
if (metaCollectionTable == null) continue; if (metaCollectionTable == null) continue;

6
src/AddIns/Misc/SharpServerTools/SQLiteDbToolsProvider/Src/Forms/SQLiteArtefactFactory.cs → src/AddIns/Misc/SharpServerTools/SharpDbTools/Src/Provider/SQLiteArtefactFactory.cs

@ -41,15 +41,15 @@ namespace SharpDbTools.SQLite.Forms
// retrieve the table listing the metadata collections // retrieve the table listing the metadata collections
DataTable metadataCollectionsTable = info.Tables[TableNames.MetaDataCollections]; DataTable metadataCollectionsTable = info.Tables[MetadataNames.MetaDataCollections];
// if it exists then populate the tree // if it exists then populate the tree
if (metadataCollectionsTable != null) { if (metadataCollectionsTable != null) {
LoggingService.Debug(this.GetType().ToString() + ": found metadata collections table, " + LoggingService.Debug(this.GetType().ToString() + ": found metadata collections table, " +
" building node..."); " building node...");
for (int i = 0; i < TableNames.PrimaryObjects.Length; i++) { for (int i = 0; i < MetadataNames.PrimaryObjects.Length; i++) {
string metadataCollectionName = TableNames.PrimaryObjects[i]; string metadataCollectionName = MetadataNames.PrimaryObjects[i];
LoggingService.Debug("looking for metadata: " + metadataCollectionName); LoggingService.Debug("looking for metadata: " + metadataCollectionName);
DataTable metaCollectionTable = info.Tables[metadataCollectionName]; DataTable metaCollectionTable = info.Tables[metadataCollectionName];
if (metaCollectionTable == null) continue; if (metaCollectionTable == null) continue;

23
src/SharpDevelop.sln

@ -1,7 +1,7 @@
 
Microsoft Visual Studio Solution File, Format Version 9.00 Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005 # Visual Studio 2005
# SharpDevelop 3.0.0.2429 # SharpDevelop 3.0.0.2456
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AddIns", "AddIns", "{14A277EE-7DF1-4529-B639-7D1EF334C1C5}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AddIns", "AddIns", "{14A277EE-7DF1-4529-B639-7D1EF334C1C5}"
ProjectSection(SolutionItems) = postProject ProjectSection(SolutionItems) = postProject
EndProjectSection EndProjectSection
@ -68,13 +68,11 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SharpServerTools", "SharpSe
ProjectSection(SolutionItems) = postProject ProjectSection(SolutionItems) = postProject
EndProjectSection EndProjectSection
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SQLiteDbToolsProvider", "AddIns\Misc\SharpServerTools\SQLiteDbToolsProvider\SQLiteDbToolsProvider.csproj", "{5C1F6FB6-AB08-430D-8956-E2BE137470CD}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DataTools.UI", "AddIns\Misc\SharpServerTools\DataTools.UI\DataTools.UI.csproj", "{87C0E3D9-0DFD-4F6D-8E38-408AAF73F4EE}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SQLServerDbToolsProvider", "AddIns\Misc\SharpServerTools\SQLServerDbToolsProvider\SQLServerDbToolsProvider.csproj", "{8C692BAF-108E-4346-B41E-6EE7D20E2E9D}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DataTools.Model", "AddIns\Misc\SharpServerTools\DataTools.Model\DataTools.Model.csproj", "{51783FC4-D8D2-4BFB-A1F1-AC8857CF3ED0}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OracleDbToolsProvider", "AddIns\Misc\SharpServerTools\OracleDbToolsProvider\OracleDbToolsProvider.csproj", "{DFA70EAA-3285-4BC0-BCA7-EBEC4D67FC9B}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DataTools.AddIn", "AddIns\Misc\SharpServerTools\SharpDbTools\DataTools.AddIn.csproj", "{93B2D6DF-7588-40C0-8A35-CA0DD7328FC3}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpDbTools", "AddIns\Misc\SharpServerTools\SharpDbTools\SharpDbTools.csproj", "{93B2D6DF-7588-40C0-8A35-CA0DD7328FC3}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ServerBrowserTool", "AddIns\Misc\SharpServerTools\ServerBrowserTool\ServerBrowserTool.csproj", "{D721EAA4-8A40-4EF0-A011-5862159BE621}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ServerBrowserTool", "AddIns\Misc\SharpServerTools\ServerBrowserTool\ServerBrowserTool.csproj", "{D721EAA4-8A40-4EF0-A011-5862159BE621}"
EndProject EndProject
@ -456,6 +454,14 @@ Global
{5C1F6FB6-AB08-430D-8956-E2BE137470CD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5C1F6FB6-AB08-430D-8956-E2BE137470CD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5C1F6FB6-AB08-430D-8956-E2BE137470CD}.Release|Any CPU.Build.0 = Release|Any CPU {5C1F6FB6-AB08-430D-8956-E2BE137470CD}.Release|Any CPU.Build.0 = Release|Any CPU
{5C1F6FB6-AB08-430D-8956-E2BE137470CD}.Release|Any CPU.ActiveCfg = Release|Any CPU {5C1F6FB6-AB08-430D-8956-E2BE137470CD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{51783FC4-D8D2-4BFB-A1F1-AC8857CF3ED0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{51783FC4-D8D2-4BFB-A1F1-AC8857CF3ED0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{51783FC4-D8D2-4BFB-A1F1-AC8857CF3ED0}.Release|Any CPU.Build.0 = Release|Any CPU
{51783FC4-D8D2-4BFB-A1F1-AC8857CF3ED0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{87C0E3D9-0DFD-4F6D-8E38-408AAF73F4EE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{87C0E3D9-0DFD-4F6D-8E38-408AAF73F4EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{87C0E3D9-0DFD-4F6D-8E38-408AAF73F4EE}.Release|Any CPU.Build.0 = Release|Any CPU
{87C0E3D9-0DFD-4F6D-8E38-408AAF73F4EE}.Release|Any CPU.ActiveCfg = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(NestedProjects) = preSolution GlobalSection(NestedProjects) = preSolution
{CE5B42B7-6E8C-4385-9E97-F4023FC16BF2} = {14A277EE-7DF1-4529-B639-7D1EF334C1C5} {CE5B42B7-6E8C-4385-9E97-F4023FC16BF2} = {14A277EE-7DF1-4529-B639-7D1EF334C1C5}
@ -502,9 +508,8 @@ Global
{6CEEC0D9-FA00-4EE3-9A1C-39B7ACC882FD} = {CE5B42B7-6E8C-4385-9E97-F4023FC16BF2} {6CEEC0D9-FA00-4EE3-9A1C-39B7ACC882FD} = {CE5B42B7-6E8C-4385-9E97-F4023FC16BF2}
{D721EAA4-8A40-4EF0-A011-5862159BE621} = {6CEEC0D9-FA00-4EE3-9A1C-39B7ACC882FD} {D721EAA4-8A40-4EF0-A011-5862159BE621} = {6CEEC0D9-FA00-4EE3-9A1C-39B7ACC882FD}
{93B2D6DF-7588-40C0-8A35-CA0DD7328FC3} = {6CEEC0D9-FA00-4EE3-9A1C-39B7ACC882FD} {93B2D6DF-7588-40C0-8A35-CA0DD7328FC3} = {6CEEC0D9-FA00-4EE3-9A1C-39B7ACC882FD}
{DFA70EAA-3285-4BC0-BCA7-EBEC4D67FC9B} = {6CEEC0D9-FA00-4EE3-9A1C-39B7ACC882FD} {51783FC4-D8D2-4BFB-A1F1-AC8857CF3ED0} = {6CEEC0D9-FA00-4EE3-9A1C-39B7ACC882FD}
{8C692BAF-108E-4346-B41E-6EE7D20E2E9D} = {6CEEC0D9-FA00-4EE3-9A1C-39B7ACC882FD} {87C0E3D9-0DFD-4F6D-8E38-408AAF73F4EE} = {6CEEC0D9-FA00-4EE3-9A1C-39B7ACC882FD}
{5C1F6FB6-AB08-430D-8956-E2BE137470CD} = {6CEEC0D9-FA00-4EE3-9A1C-39B7ACC882FD}
{000E4F64-5D0D-4EB1-B0BF-1A62ADBC6EAD} = {BDDDCD01-D2FE-4EAD-9425-4B6B91922C7C} {000E4F64-5D0D-4EB1-B0BF-1A62ADBC6EAD} = {BDDDCD01-D2FE-4EAD-9425-4B6B91922C7C}
{869951D5-A0D6-4DC6-9F1D-E6B9A12AC446} = {BDDDCD01-D2FE-4EAD-9425-4B6B91922C7C} {869951D5-A0D6-4DC6-9F1D-E6B9A12AC446} = {BDDDCD01-D2FE-4EAD-9425-4B6B91922C7C}
{E6F4983F-DE41-4AEC-88E7-1FA9AFB4E6FF} = {BDDDCD01-D2FE-4EAD-9425-4B6B91922C7C} {E6F4983F-DE41-4AEC-88E7-1FA9AFB4E6FF} = {BDDDCD01-D2FE-4EAD-9425-4B6B91922C7C}

Loading…
Cancel
Save