Browse Source

Fixed some P/Invoke declarations where FxCop complained they weren't portable to 64bit and some other complaints from FxCop.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@501 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 21 years ago
parent
commit
68f7c01970
  1. 4
      src/AddIns/BackendBindings/CSharpBinding/Project/Src/Parser/Parser.cs
  2. 4
      src/AddIns/BackendBindings/VBNetBinding/Project/Src/Parser/Parser.cs
  3. 4
      src/AddIns/DisplayBindings/FormDesigner/Project/Src/FormDesigner/DesignerLoader/DesignerLoaderProvider.cs
  4. 4
      src/AddIns/DisplayBindings/FormDesigner/Project/Src/FormDesigner/DesignerLoader/NRefactoryDesignerLoader.cs
  5. 4
      src/AddIns/DisplayBindings/FormDesigner/Project/Src/FormDesigner/FormDesignerSecondaryDisplayBinding.cs
  6. 11
      src/Libraries/ICSharpCode.TextEditor/Project/Src/Gui/CompletionWindow/AbstractCompletionWindow.cs
  7. 2
      src/Libraries/ICSharpCode.TextEditor/Project/Src/Gui/CompletionWindow/DeclarationViewWindow.cs
  8. 10
      src/Libraries/ICSharpCode.TextEditor/Project/Src/Gui/Ime.cs
  9. 2
      src/Libraries/NRefactory/Project/Src/Parser/AST/General/Expressions/Expression.cs
  10. 3
      src/Libraries/NRefactory/Project/Src/Parser/AST/General/INullable.cs
  11. 28
      src/Libraries/NRefactory/Project/Src/Parser/ParserFactory.cs
  12. 2
      src/Main/Base/Project/Src/Commands/VBConverter/CSharpConvertBuffer.cs
  13. 2
      src/Main/Base/Project/Src/Commands/VBConverter/ConvertBuffer.cs
  14. 22
      src/Main/Base/Project/Src/Dom/NRefactoryResolver/NRefactoryResolver.cs
  15. 2
      src/Main/Base/Project/Src/Gui/BrowserDisplayBinding/HtmlViewPane.cs
  16. 2
      src/Main/Base/Project/Src/Gui/Components/LocalizedPropertyGrid/LocalizedPropertyAttribute.cs
  17. 6
      src/Main/Base/Project/Src/Gui/Dialogs/NewFileDialog.cs
  18. 2
      src/Main/Base/Project/Src/Gui/Pads/FileScout.cs
  19. 2
      src/Main/Base/Project/Src/Project/AbstractProject.cs
  20. 4
      src/Main/Base/Project/Src/Project/Converter/PrjxToSolutionProject.cs
  21. 5
      src/Main/Base/Project/Src/Services/File/FileService.cs
  22. 6
      src/Main/Core/Project/Src/AddInTree/AddIn/ComplexCondition.cs
  23. 6
      src/Main/Core/Project/Src/AddInTree/AddIn/Condition.cs
  24. 0
      src/debugbuild.bat

4
src/AddIns/BackendBindings/CSharpBinding/Project/Src/Parser/Parser.cs

@ -87,7 +87,7 @@ namespace CSharpBinding.Parser
public ICompilationUnit Parse(IProjectContent projectContent, string fileName, string fileContent) public ICompilationUnit Parse(IProjectContent projectContent, string fileName, string fileContent)
{ {
using (ICSharpCode.NRefactory.Parser.IParser p = ICSharpCode.NRefactory.Parser.ParserFactory.CreateParser(ICSharpCode.NRefactory.Parser.SupportedLanguages.CSharp, new StringReader(fileContent))) { using (ICSharpCode.NRefactory.Parser.IParser p = ICSharpCode.NRefactory.Parser.ParserFactory.CreateParser(ICSharpCode.NRefactory.Parser.SupportedLanguage.CSharp, new StringReader(fileContent))) {
return Parse(p, fileName, projectContent); return Parse(p, fileName, projectContent);
} }
} }
@ -120,7 +120,7 @@ namespace CSharpBinding.Parser
public IResolver CreateResolver() public IResolver CreateResolver()
{ {
return new ICSharpCode.SharpDevelop.Dom.NRefactoryResolver.NRefactoryResolver(ICSharpCode.NRefactory.Parser.SupportedLanguages.CSharp); return new ICSharpCode.SharpDevelop.Dom.NRefactoryResolver.NRefactoryResolver(ICSharpCode.NRefactory.Parser.SupportedLanguage.CSharp);
} }
///////// IParser Interface END ///////// IParser Interface END
} }

4
src/AddIns/BackendBindings/VBNetBinding/Project/Src/Parser/Parser.cs

@ -98,7 +98,7 @@ namespace VBNetBinding.Parser
public ICompilationUnit Parse(IProjectContent projectContent, string fileName, string fileContent) public ICompilationUnit Parse(IProjectContent projectContent, string fileName, string fileContent)
{ {
using (ICSharpCode.NRefactory.Parser.IParser p = ICSharpCode.NRefactory.Parser.ParserFactory.CreateParser(ICSharpCode.NRefactory.Parser.SupportedLanguages.VBNet, new StringReader(fileContent))) { using (ICSharpCode.NRefactory.Parser.IParser p = ICSharpCode.NRefactory.Parser.ParserFactory.CreateParser(ICSharpCode.NRefactory.Parser.SupportedLanguage.VBNet, new StringReader(fileContent))) {
return Parse(p, fileName, projectContent); return Parse(p, fileName, projectContent);
} }
} }
@ -143,7 +143,7 @@ namespace VBNetBinding.Parser
public IResolver CreateResolver() public IResolver CreateResolver()
{ {
return new ICSharpCode.SharpDevelop.Dom.NRefactoryResolver.NRefactoryResolver(ICSharpCode.NRefactory.Parser.SupportedLanguages.VBNet); return new ICSharpCode.SharpDevelop.Dom.NRefactoryResolver.NRefactoryResolver(ICSharpCode.NRefactory.Parser.SupportedLanguage.VBNet);
} }
///////// IParser Interface END ///////// IParser Interface END
} }

4
src/AddIns/DisplayBindings/FormDesigner/Project/Src/FormDesigner/DesignerLoader/DesignerLoaderProvider.cs

@ -19,10 +19,10 @@ namespace ICSharpCode.FormDesigner
public class NRefactoryDesignerLoaderProvider : IDesignerLoaderProvider public class NRefactoryDesignerLoaderProvider : IDesignerLoaderProvider
{ {
SupportedLanguages language; SupportedLanguage language;
TextEditorControl textEditorControl; TextEditorControl textEditorControl;
public NRefactoryDesignerLoaderProvider(SupportedLanguages language, TextEditorControl textEditorControl) public NRefactoryDesignerLoaderProvider(SupportedLanguage language, TextEditorControl textEditorControl)
{ {
this.language = language; this.language = language;
this.textEditorControl = textEditorControl; this.textEditorControl = textEditorControl;

4
src/AddIns/DisplayBindings/FormDesigner/Project/Src/FormDesigner/DesignerLoader/NRefactoryDesignerLoader.cs

@ -44,7 +44,7 @@ namespace ICSharpCode.FormDesigner
bool loading = true; bool loading = true;
IDesignerLoaderHost designerLoaderHost = null; IDesignerLoaderHost designerLoaderHost = null;
ITypeResolutionService typeResolutionService = null; ITypeResolutionService typeResolutionService = null;
SupportedLanguages language; SupportedLanguage language;
CodeDomProvider provider = new Microsoft.CSharp.CSharpCodeProvider(); CodeDomProvider provider = new Microsoft.CSharp.CSharpCodeProvider();
TextEditorControl textEditorControl; TextEditorControl textEditorControl;
@ -84,7 +84,7 @@ namespace ICSharpCode.FormDesigner
return base.IsReloadNeeded() || TextContent != lastTextContent; return base.IsReloadNeeded() || TextContent != lastTextContent;
} }
public NRefactoryDesignerLoader(SupportedLanguages language, TextEditorControl textEditorControl) public NRefactoryDesignerLoader(SupportedLanguage language, TextEditorControl textEditorControl)
{ {
this.language = language; this.language = language;
this.textEditorControl = textEditorControl; this.textEditorControl = textEditorControl;

4
src/AddIns/DisplayBindings/FormDesigner/Project/Src/FormDesigner/FormDesignerSecondaryDisplayBinding.cs

@ -135,11 +135,11 @@ namespace ICSharpCode.FormDesigner
switch (fileExtension) { switch (fileExtension) {
case ".cs": case ".cs":
loader = new NRefactoryDesignerLoaderProvider(SupportedLanguages.CSharp, ((ITextEditorControlProvider)viewContent).TextEditorControl); loader = new NRefactoryDesignerLoaderProvider(SupportedLanguage.CSharp, ((ITextEditorControlProvider)viewContent).TextEditorControl);
generator = new CSharpDesignerGenerator(); generator = new CSharpDesignerGenerator();
break; break;
case ".vb": case ".vb":
loader = new NRefactoryDesignerLoaderProvider(SupportedLanguages.VBNet, ((ITextEditorControlProvider)viewContent).TextEditorControl); loader = new NRefactoryDesignerLoaderProvider(SupportedLanguage.VBNet, ((ITextEditorControlProvider)viewContent).TextEditorControl);
generator = new VBNetDesignerGenerator(); generator = new VBNetDesignerGenerator();
break; break;
case ".xfrm": case ".xfrm":

11
src/Libraries/ICSharpCode.TextEditor/Project/Src/Gui/CompletionWindow/AbstractCompletionWindow.cs

@ -79,16 +79,21 @@ namespace ICSharpCode.TextEditor.Gui.CompletionWindow
Bounds = bounds; Bounds = bounds;
} }
public readonly static int SW_SHOWNA = 8; const int SW_SHOWNA = 8;
[DllImport("user32")] [DllImport("user32")]
public static extern int ShowWindow(IntPtr hWnd, int nCmdShow); static extern int ShowWindow(IntPtr hWnd, int nCmdShow);
public static void ShowWindowWithoutFocus(Control control)
{
ShowWindow(control.Handle, SW_SHOWNA);
}
protected void ShowCompletionWindow() protected void ShowCompletionWindow()
{ {
Owner = parentForm; Owner = parentForm;
Enabled = true; Enabled = true;
AbstractCompletionWindow.ShowWindow(base.Handle, AbstractCompletionWindow.SW_SHOWNA); ShowWindowWithoutFocus(this);
control.Focus(); control.Focus();

2
src/Libraries/ICSharpCode.TextEditor/Project/Src/Gui/CompletionWindow/DeclarationViewWindow.cs

@ -61,7 +61,7 @@ namespace ICSharpCode.TextEditor.Gui.CompletionWindow
public void ShowDeclarationViewWindow() public void ShowDeclarationViewWindow()
{ {
AbstractCompletionWindow.ShowWindow(base.Handle, AbstractCompletionWindow.SW_SHOWNA); AbstractCompletionWindow.ShowWindowWithoutFocus(this);
} }
public void CloseDeclarationViewWindow() public void CloseDeclarationViewWindow()

10
src/Libraries/ICSharpCode.TextEditor/Project/Src/Gui/Ime.cs

@ -41,9 +41,9 @@ namespace ICSharpCode.TextEditor
private static extern IntPtr ImmGetDefaultIMEWnd(IntPtr hWnd); private static extern IntPtr ImmGetDefaultIMEWnd(IntPtr hWnd);
[ DllImport("user32.dll") ] [ DllImport("user32.dll") ]
private static extern int SendMessage(IntPtr hWnd, int msg, int wParam, COMPOSITIONFORM lParam); private static extern IntPtr SendMessage(IntPtr hWnd, int msg, IntPtr wParam, COMPOSITIONFORM lParam);
[ DllImport("user32.dll") ] [ DllImport("user32.dll") ]
private static extern int SendMessage(IntPtr hWnd, int msg, int wParam, LOGFONT lParam); private static extern IntPtr SendMessage(IntPtr hWnd, int msg, IntPtr wParam, LOGFONT lParam);
[ StructLayout(LayoutKind.Sequential) ] [ StructLayout(LayoutKind.Sequential) ]
private class COMPOSITIONFORM private class COMPOSITIONFORM
@ -71,6 +71,7 @@ namespace ICSharpCode.TextEditor
private const int WM_IME_CONTROL = 0x0283; private const int WM_IME_CONTROL = 0x0283;
private const int IMC_SETCOMPOSITIONFONT = 0x000a;
private const int IMC_SETCOMPOSITIONWINDOW = 0x000c; private const int IMC_SETCOMPOSITIONWINDOW = 0x000c;
private IntPtr hIMEWnd; private IntPtr hIMEWnd;
private const int CFS_POINT = 0x0002; private const int CFS_POINT = 0x0002;
@ -93,7 +94,6 @@ namespace ICSharpCode.TextEditor
public byte lfPitchAndFamily = 0; public byte lfPitchAndFamily = 0;
[ MarshalAs(UnmanagedType.ByValTStr, SizeConst=32) ] public string lfFaceName = null; [ MarshalAs(UnmanagedType.ByValTStr, SizeConst=32) ] public string lfFaceName = null;
} }
private const int IMC_SETCOMPOSITIONFONT = 0x000a;
const byte FF_MODERN = 48; const byte FF_MODERN = 48;
const byte FIXED_PITCH = 1; const byte FIXED_PITCH = 1;
@ -107,7 +107,7 @@ namespace ICSharpCode.TextEditor
SendMessage( SendMessage(
hIMEWnd, hIMEWnd,
WM_IME_CONTROL, WM_IME_CONTROL,
IMC_SETCOMPOSITIONFONT, new IntPtr(IMC_SETCOMPOSITIONFONT),
lf lf
); );
} }
@ -128,7 +128,7 @@ namespace ICSharpCode.TextEditor
SendMessage( SendMessage(
hIMEWnd, hIMEWnd,
WM_IME_CONTROL, WM_IME_CONTROL,
IMC_SETCOMPOSITIONWINDOW, new IntPtr(IMC_SETCOMPOSITIONWINDOW),
lParam lParam
); );
} }

2
src/Libraries/NRefactory/Project/Src/Parser/AST/General/Expressions/Expression.cs

@ -72,7 +72,7 @@ namespace ICSharpCode.NRefactory.Parser.AST
public override object AcceptVisitor(IASTVisitor visitor, object data) public override object AcceptVisitor(IASTVisitor visitor, object data)
{ {
return this; return null;
} }
public override string ToString() public override string ToString()

3
src/Libraries/NRefactory/Project/Src/Parser/AST/General/INullable.cs

@ -5,9 +5,12 @@
// <version>$Revision$</version> // <version>$Revision$</version>
// </file> // </file>
namespace ICSharpCode.NRefactory.Parser.AST
{
public interface INullable public interface INullable
{ {
bool IsNull { bool IsNull {
get; get;
} }
} }
}

28
src/Libraries/NRefactory/Project/Src/Parser/ParserFactory.cs

@ -12,7 +12,7 @@ using ICSharpCode.NRefactory.Parser.AST;
namespace ICSharpCode.NRefactory.Parser namespace ICSharpCode.NRefactory.Parser
{ {
public enum SupportedLanguages { public enum SupportedLanguage {
CSharp, CSharp,
VBNet VBNet
} }
@ -22,24 +22,24 @@ namespace ICSharpCode.NRefactory.Parser
/// </summary> /// </summary>
public class ParserFactory public class ParserFactory
{ {
public static ILexer CreateLexer(SupportedLanguages language, TextReader textReader) public static ILexer CreateLexer(SupportedLanguage language, TextReader textReader)
{ {
switch (language) { switch (language) {
case SupportedLanguages.CSharp: case SupportedLanguage.CSharp:
return new ICSharpCode.NRefactory.Parser.CSharp.Lexer(textReader); return new ICSharpCode.NRefactory.Parser.CSharp.Lexer(textReader);
case SupportedLanguages.VBNet: case SupportedLanguage.VBNet:
return new ICSharpCode.NRefactory.Parser.VB.Lexer(textReader); return new ICSharpCode.NRefactory.Parser.VB.Lexer(textReader);
} }
throw new System.NotSupportedException(language + " not supported."); throw new System.NotSupportedException(language + " not supported.");
} }
public static IParser CreateParser(SupportedLanguages language, TextReader textReader) public static IParser CreateParser(SupportedLanguage language, TextReader textReader)
{ {
ILexer lexer = CreateLexer(language, textReader); ILexer lexer = CreateLexer(language, textReader);
switch (language) { switch (language) {
case SupportedLanguages.CSharp: case SupportedLanguage.CSharp:
return new ICSharpCode.NRefactory.Parser.CSharp.Parser(lexer); return new ICSharpCode.NRefactory.Parser.CSharp.Parser(lexer);
case SupportedLanguages.VBNet: case SupportedLanguage.VBNet:
return new ICSharpCode.NRefactory.Parser.VB.Parser(lexer); return new ICSharpCode.NRefactory.Parser.VB.Parser(lexer);
} }
throw new System.NotSupportedException(language + " not supported."); throw new System.NotSupportedException(language + " not supported.");
@ -49,17 +49,15 @@ namespace ICSharpCode.NRefactory.Parser
{ {
return CreateParser(fileName, Encoding.UTF8); return CreateParser(fileName, Encoding.UTF8);
} }
public static IParser CreateParser(string fileName, Encoding encoding) public static IParser CreateParser(string fileName, Encoding encoding)
{ {
switch (Path.GetExtension(fileName).ToUpper()) { string ext = Path.GetExtension(fileName);
case ".CS": if (ext.Equals(".cs", StringComparison.InvariantCultureIgnoreCase))
return CreateParser(SupportedLanguages.CSharp, new StreamReader(fileName, encoding)); return CreateParser(SupportedLanguage.CSharp, new StreamReader(fileName, encoding));
case ".VB": if (ext.Equals(".vb", StringComparison.InvariantCultureIgnoreCase))
return CreateParser(SupportedLanguages.VBNet, new StreamReader(fileName, encoding)); return CreateParser(SupportedLanguage.VBNet, new StreamReader(fileName, encoding));
}
return null; return null;
} }
} }
} }

2
src/Main/Base/Project/Src/Commands/VBConverter/CSharpConvertBuffer.cs

@ -32,7 +32,7 @@ namespace ICSharpCode.SharpDevelop.Commands
IWorkbenchWindow window = WorkbenchSingleton.Workbench.ActiveWorkbenchWindow; IWorkbenchWindow window = WorkbenchSingleton.Workbench.ActiveWorkbenchWindow;
if (window != null && window.ViewContent is IEditable) { if (window != null && window.ViewContent is IEditable) {
ICSharpCode.NRefactory.Parser.IParser p = ICSharpCode.NRefactory.Parser.ParserFactory.CreateParser(SupportedLanguages.VBNet, new StringReader(((IEditable)window.ViewContent).Text)); ICSharpCode.NRefactory.Parser.IParser p = ICSharpCode.NRefactory.Parser.ParserFactory.CreateParser(SupportedLanguage.VBNet, new StringReader(((IEditable)window.ViewContent).Text));
p.Parse(); p.Parse();
if (p.Errors.count > 0) { if (p.Errors.count > 0) {

2
src/Main/Base/Project/Src/Commands/VBConverter/ConvertBuffer.cs

@ -33,7 +33,7 @@ namespace ICSharpCode.SharpDevelop.Commands
if (window != null && window.ViewContent is IEditable) { if (window != null && window.ViewContent is IEditable) {
ICSharpCode.NRefactory.Parser.IParser p = ICSharpCode.NRefactory.Parser.ParserFactory.CreateParser(SupportedLanguages.CSharp, new StringReader(((IEditable)window.ViewContent).Text)); ICSharpCode.NRefactory.Parser.IParser p = ICSharpCode.NRefactory.Parser.ParserFactory.CreateParser(SupportedLanguage.CSharp, new StringReader(((IEditable)window.ViewContent).Text));
p.Parse(); p.Parse();
if (p.Errors.count > 0) { if (p.Errors.count > 0) {

22
src/Main/Base/Project/Src/Dom/NRefactoryResolver/NRefactoryResolver.cs

@ -25,12 +25,12 @@ namespace ICSharpCode.SharpDevelop.Dom.NRefactoryResolver
ICSharpCode.NRefactory.Parser.LookupTableVisitor lookupTableVisitor; ICSharpCode.NRefactory.Parser.LookupTableVisitor lookupTableVisitor;
IProjectContent projectContent = null; IProjectContent projectContent = null;
SupportedLanguages language; SupportedLanguage language;
int caretLine; int caretLine;
int caretColumn; int caretColumn;
public SupportedLanguages Language { public SupportedLanguage Language {
get { get {
return language; return language;
} }
@ -83,15 +83,15 @@ namespace ICSharpCode.SharpDevelop.Dom.NRefactoryResolver
} }
} }
public NRefactoryResolver(SupportedLanguages language) public NRefactoryResolver(SupportedLanguage language)
{ {
this.language = language; this.language = language;
this.projectContent = ParserService.CurrentProjectContent; this.projectContent = ParserService.CurrentProjectContent;
switch (language) { switch (language) {
case SupportedLanguages.CSharp: case SupportedLanguage.CSharp:
languageProperties = LanguageProperties.CSharp; languageProperties = LanguageProperties.CSharp;
break; break;
case SupportedLanguages.VBNet: case SupportedLanguage.VBNet:
languageProperties = LanguageProperties.VBNet; languageProperties = LanguageProperties.VBNet;
break; break;
default: default:
@ -147,7 +147,7 @@ namespace ICSharpCode.SharpDevelop.Dom.NRefactoryResolver
} }
Expression expr = null; Expression expr = null;
if (language == SupportedLanguages.VBNet) { if (language == SupportedLanguage.VBNet) {
if (expression == "") { if (expression == "") {
if ((expr = WithResolve()) == null) { if ((expr = WithResolve()) == null) {
return null; return null;
@ -426,7 +426,7 @@ namespace ICSharpCode.SharpDevelop.Dom.NRefactoryResolver
} }
int length = offset - startOffset; int length = offset - startOffset;
string classDecl, endClassDecl; string classDecl, endClassDecl;
if (language == SupportedLanguages.VBNet) { if (language == SupportedLanguage.VBNet) {
classDecl = "Class A"; classDecl = "Class A";
endClassDecl = "End Class\n"; endClassDecl = "End Class\n";
} else { } else {
@ -583,7 +583,7 @@ namespace ICSharpCode.SharpDevelop.Dom.NRefactoryResolver
Expression WithResolve() Expression WithResolve()
{ {
if (language != SupportedLanguages.VBNet) { if (language != SupportedLanguage.VBNet) {
return null; return null;
} }
Expression expr = null; Expression expr = null;
@ -600,14 +600,14 @@ namespace ICSharpCode.SharpDevelop.Dom.NRefactoryResolver
Expression SpecialConstructs(string expression) Expression SpecialConstructs(string expression)
{ {
if (language == SupportedLanguages.VBNet) { if (language == SupportedLanguage.VBNet) {
// MyBase and MyClass are no expressions, only MyBase.Identifier and MyClass.Identifier // MyBase and MyClass are no expressions, only MyBase.Identifier and MyClass.Identifier
if ("mybase".Equals(expression, StringComparison.InvariantCultureIgnoreCase)) { if ("mybase".Equals(expression, StringComparison.InvariantCultureIgnoreCase)) {
return new BaseReferenceExpression(); return new BaseReferenceExpression();
} else if ("myclass".Equals(expression, StringComparison.InvariantCultureIgnoreCase)) { } else if ("myclass".Equals(expression, StringComparison.InvariantCultureIgnoreCase)) {
return new ClassReferenceExpression(); return new ClassReferenceExpression();
} // Global is handled in Resolve() because we don't need an expression for that } // Global is handled in Resolve() because we don't need an expression for that
} else if (language == SupportedLanguages.CSharp) { } else if (language == SupportedLanguage.CSharp) {
// generic type names are no expressions, only property access on them is an expression // generic type names are no expressions, only property access on them is an expression
if (expression.EndsWith(">")) { if (expression.EndsWith(">")) {
FieldReferenceExpression expr = ParseExpression(expression + ".Prop") as FieldReferenceExpression; FieldReferenceExpression expr = ParseExpression(expression + ".Prop") as FieldReferenceExpression;
@ -856,7 +856,7 @@ namespace ICSharpCode.SharpDevelop.Dom.NRefactoryResolver
public ArrayList CtrlSpace(int caretLine, int caretColumn, string fileName, string fileContent) public ArrayList CtrlSpace(int caretLine, int caretColumn, string fileName, string fileContent)
{ {
ArrayList result = new ArrayList(); ArrayList result = new ArrayList();
if (language == SupportedLanguages.VBNet) { if (language == SupportedLanguage.VBNet) {
foreach (KeyValuePair<string, string> pair in TypeReference.GetPrimitiveTypesVB()) { foreach (KeyValuePair<string, string> pair in TypeReference.GetPrimitiveTypesVB()) {
string primitive = Char.ToUpper(pair.Key[0]) + pair.Key.Substring(1); string primitive = Char.ToUpper(pair.Key[0]) + pair.Key.Substring(1);
if ("System." + primitive != pair.Value) { if ("System." + primitive != pair.Value) {

2
src/Main/Base/Project/Src/Gui/BrowserDisplayBinding/HtmlViewPane.cs

@ -67,8 +67,8 @@ namespace ICSharpCode.SharpDevelop.BrowserDisplayBinding
public override void Dispose() public override void Dispose()
{ {
htmlViewPane.Dispose();
base.Dispose(); base.Dispose();
htmlViewPane.Dispose();
} }
public override void Load(string url) public override void Load(string url)

2
src/Main/Base/Project/Src/Gui/Components/LocalizedPropertyGrid/LocalizedPropertyAttribute.cs

@ -13,7 +13,7 @@ using System.Reflection;
namespace ICSharpCode.SharpDevelop.Gui namespace ICSharpCode.SharpDevelop.Gui
{ {
[AttributeUsage(AttributeTargets.Property, AllowMultiple=false, Inherited=true)] [AttributeUsage(AttributeTargets.Property, AllowMultiple=false, Inherited=true)]
public class LocalizedPropertyAttribute : Attribute public sealed class LocalizedPropertyAttribute : Attribute
{ {
string name = String.Empty; string name = String.Empty;
string description = String.Empty; string description = String.Empty;

6
src/Main/Base/Project/Src/Gui/Dialogs/NewFileDialog.cs

@ -340,13 +340,13 @@ namespace ICSharpCode.SharpDevelop.Gui
public void SaveFile(string filename, string content, string languageName, bool showFile) public void SaveFile(string filename, string content, string languageName, bool showFile)
{ {
string parsedFileName = StringParser.Parse(filename); string parsedFileName = StringParser.Parse(filename);
createdFiles.Add(parsedFileName);
IWorkbenchWindow window = FileService.NewFile(Path.GetFileName(parsedFileName), StringParser.Parse(languageName), StringParser.Parse(content)); IWorkbenchWindow window = FileService.NewFile(Path.GetFileName(parsedFileName), StringParser.Parse(languageName), StringParser.Parse(content));
if (window != null) {
createdFiles.Add(parsedFileName);
if (Path.IsPathRooted(parsedFileName)) { if (Path.IsPathRooted(parsedFileName)) {
window.ViewContent.Save(parsedFileName); window.ViewContent.Save(parsedFileName);
} }
}
DialogResult = DialogResult.OK;
} }
string GenerateValidClassName(string className) string GenerateValidClassName(string className)

2
src/Main/Base/Project/Src/Gui/Pads/FileScout.cs

@ -27,7 +27,7 @@ namespace ICSharpCode.SharpDevelop.Gui
class FileIcon class FileIcon
{ {
[DllImport("shell32.dll")] [DllImport("shell32.dll")]
static extern int SHGetFileInfo(string pszPath, static extern IntPtr SHGetFileInfo(string pszPath,
uint dwFileAttributes, uint dwFileAttributes,
out SHFILEINFO psfi, out SHFILEINFO psfi,
uint cbfileInfo, uint cbfileInfo,

2
src/Main/Base/Project/Src/Project/AbstractProject.cs

@ -470,6 +470,8 @@ namespace ICSharpCode.SharpDevelop.Project
/// <summary> /// <summary>
/// Creates a new project content for this project. /// Creates a new project content for this project.
/// This method should only be called by ParserService.LoadSolutionProjectsInternal()! /// This method should only be called by ParserService.LoadSolutionProjectsInternal()!
/// When overriding this method, you should call the base implementation first
/// to get an uninitialized ParseProjectContent.
/// </summary> /// </summary>
public virtual ParseProjectContent CreateProjectContent() public virtual ParseProjectContent CreateProjectContent()
{ {

4
src/Main/Base/Project/Src/Project/Converter/PrjxToSolutionProject.cs

@ -131,9 +131,9 @@ namespace ICSharpCode.SharpDevelop.Project.Converter
return CanocializeFileName(fileName) + Path.DirectorySeparatorChar; return CanocializeFileName(fileName) + Path.DirectorySeparatorChar;
} }
public string Negate(string boolString) public string Negate(string booleanString)
{ {
return (!bool.Parse(boolString)).ToString(); return (!bool.Parse(booleanString)).ToString();
} }
public string GetFileName(string fileName) public string GetFileName(string fileName)

5
src/Main/Base/Project/Src/Services/File/FileService.cs

@ -71,10 +71,12 @@ namespace ICSharpCode.Core
public void Invoke(string fileName) public void Invoke(string fileName)
{ {
IViewContent newContent = binding.CreateContentForFile(fileName); IViewContent newContent = binding.CreateContentForFile(fileName);
if (newContent != null) {
DisplayBindingService.AttachSubWindows(newContent); DisplayBindingService.AttachSubWindows(newContent);
WorkbenchSingleton.Workbench.ShowView(newContent); WorkbenchSingleton.Workbench.ShowView(newContent);
} }
} }
}
public static bool IsOpen(string fileName) public static bool IsOpen(string fileName)
{ {
@ -130,7 +132,8 @@ namespace ICSharpCode.Core
if (binding != null) { if (binding != null) {
IViewContent newContent = binding.CreateContentForLanguage(language, content); IViewContent newContent = binding.CreateContentForLanguage(language, content);
if (newContent == null) { if (newContent == null) {
throw new ApplicationException(String.Format("Created view content was null{3}DefaultName:{0}{3}Language:{1}{3}Content:{2}", defaultName, language, content, Environment.NewLine)); LoggingService.Warn(String.Format("Created view content was null{3}DefaultName:{0}{3}Language:{1}{3}Content:{2}", defaultName, language, content, Environment.NewLine));
return null;
} }
newContent.UntitledName = defaultName; newContent.UntitledName = defaultName;
newContent.IsDirty = false; newContent.IsDirty = false;

6
src/Main/Core/Project/Src/AddInTree/AddIn/ComplexCondition.cs

@ -46,7 +46,7 @@ namespace ICSharpCode.Core
return !condition.IsValid(owner); return !condition.IsValid(owner);
} }
public static ICondition Read(XmlTextReader reader) public static ICondition Read(XmlReader reader)
{ {
return new NegatedCondition(Condition.ReadConditionList(reader, "Not")[0]); return new NegatedCondition(Condition.ReadConditionList(reader, "Not")[0]);
} }
@ -98,7 +98,7 @@ namespace ICSharpCode.Core
return true; return true;
} }
public static ICondition Read(XmlTextReader reader) public static ICondition Read(XmlReader reader)
{ {
return new AndCondition(Condition.ReadConditionList(reader, "And")); return new AndCondition(Condition.ReadConditionList(reader, "And"));
} }
@ -151,7 +151,7 @@ namespace ICSharpCode.Core
return false; return false;
} }
public static ICondition Read(XmlTextReader reader) public static ICondition Read(XmlReader reader)
{ {
return new OrCondition(Condition.ReadConditionList(reader, "Or")); return new OrCondition(Condition.ReadConditionList(reader, "Or"));
} }

6
src/Main/Core/Project/Src/AddInTree/AddIn/Condition.cs

@ -65,14 +65,14 @@ namespace ICSharpCode.Core
} }
public static ICondition Read(XmlTextReader reader) public static ICondition Read(XmlReader reader)
{ {
Properties properties = Properties.ReadFromAttributes(reader); Properties properties = Properties.ReadFromAttributes(reader);
string conditionName = properties["name"]; string conditionName = properties["name"];
return new Condition(conditionName, properties); return new Condition(conditionName, properties);
} }
public static ICondition ReadComplexCondition(XmlTextReader reader) public static ICondition ReadComplexCondition(XmlReader reader)
{ {
Properties properties = Properties.ReadFromAttributes(reader); Properties properties = Properties.ReadFromAttributes(reader);
reader.Read(); reader.Read();
@ -105,7 +105,7 @@ namespace ICSharpCode.Core
return condition; return condition;
} }
public static ICondition[] ReadConditionList(XmlTextReader reader, string endElement) public static ICondition[] ReadConditionList(XmlReader reader, string endElement)
{ {
List<ICondition> conditions = new List<ICondition>(); List<ICondition> conditions = new List<ICondition>();
while (reader.Read()) { while (reader.Read()) {

0
src/build.bat → src/debugbuild.bat

Loading…
Cancel
Save