Browse Source

cleanup

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@1956 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Markus Palme 19 years ago
parent
commit
1dc51241d5
  1. 59
      src/AddIns/BackendBindings/WixBinding/Project/Src/Gui/SetupViewMenuBuilder.cs
  2. 1
      src/AddIns/BackendBindings/WixBinding/Project/WixBinding.csproj
  3. 4
      src/AddIns/DisplayBindings/FormsDesigner/Project/FormsDesigner.csproj
  4. 46
      src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Gui/ShowTabOrder/ITabOrder.cs
  5. 104
      src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Gui/ShowTabOrder/TabIndexControl.cs
  6. 145
      src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Gui/SideTabDesigner.cs
  7. 24
      src/AddIns/Misc/Debugger/TreeListView/Project/Src/TreeListView/TreeListView.cs
  8. 15
      src/Libraries/NRefactory/Project/Src/Parser/VBNet/VBNetParser.cs
  9. 1
      src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj
  10. 31
      src/Main/Base/Project/Src/Gui/Components/SideBar/SharpDevelopSideBar.cs
  11. 35
      src/Main/Base/Project/Src/Gui/Dialogs/NewProjectDialog.cs
  12. 9
      src/Main/Base/Project/Src/Gui/IWorkbenchWindow.cs
  13. 34
      src/Main/Base/Project/Src/Internal/ConditionEvaluators/ProjectOpenEvaluator.cs
  14. 10
      src/Main/Base/Project/Src/Project/ChooseStorageLocationButton.cs
  15. 8
      src/Main/Base/Project/Src/TextEditor/Commands/NavigationCommands.cs
  16. 42
      src/Main/Base/Project/Src/TextEditor/Gui/Editor/InsightWindow/IndexerInsightDataProvider.cs
  17. 7
      src/Main/Base/Project/Src/TextEditor/Gui/Editor/SharpDevelopTextEditorProperties.cs
  18. 2
      src/Main/Core/Project/Src/AddInTree/AddIn/IDoozer.cs
  19. 11
      src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/Interfaces/IAttribute.cs
  20. 81
      src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/NRefactoryResolver/TypeVisitor.cs
  21. 28
      src/Main/ICSharpCode.SharpDevelop.Sda/Src/ExceptionBox.cs

59
src/AddIns/BackendBindings/WixBinding/Project/Src/Gui/SetupViewMenuBuilder.cs

@ -1,59 +0,0 @@ @@ -1,59 +0,0 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Matthew Ward" email="mrward@users.sourceforge.net"/>
// <version>$Revision$</version>
// </file>
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop.Gui;
using System;
using System.Collections.Generic;
using System.Windows.Forms;
namespace ICSharpCode.WixBinding
{
/*
/// <summary>
/// Builds the View | Setup menu items.
/// </summary>
public class SetupViewMenuBuilder : ISubmenuBuilder
{
public SetupViewMenuBuilder()
{
}
public ToolStripItem[] BuildSubmenu(Codon codon, object owner)
{
List<ToolStripMenuItem> items = new List<ToolStripMenuItem>();
AddInTreeNode node = AddInTree.GetTreeNode("/AddIns/WixBinding/View");
foreach (Codon childCodon in node.Codons) {
items.Add(CreateMenuItem(childCodon, owner));
}
return items.ToArray();
}
/// <summary>
/// Creates the toolstrip menu item and assumes that there are never any
/// child menu items.
/// </summary>
public ToolStripMenuItem CreateMenuItem(Codon codon, object owner)
{
ToolStripMenuItem item = (ToolStripMenuItem)codon.BuildItem(owner, null);
// Set shortcut.
string shortcut = codon.Properties["shortcut"];
if (shortcut != null) {
item.ShortcutKeys = MenuCommand.ParseShortcut(shortcut);
}
// Set icon
string icon = codon.Properties["icon"];
if (!String.IsNullOrEmpty(icon)) {
item.Image = IconService.GetBitmap(icon);
}
return item;
}
}
*/
}

1
src/AddIns/BackendBindings/WixBinding/Project/WixBinding.csproj

@ -116,7 +116,6 @@ @@ -116,7 +116,6 @@
<Compile Include="Src\Gui\WixComponentTreeNode.cs" />
<Compile Include="Src\Gui\WixFileTreeNode.cs" />
<Compile Include="Src\Gui\AddChildElementsMenuBuilder.cs" />
<Compile Include="Src\Gui\SetupViewMenuBuilder.cs" />
<Compile Include="Src\Gui\WixPackageFilesTreeView.cs" />
<Compile Include="Src\Commands\AddElementCommand.cs" />
<Compile Include="Src\Commands\RemoveElementCommand.cs" />

4
src/AddIns/DisplayBindings/FormsDesigner/Project/FormsDesigner.csproj

@ -71,10 +71,6 @@ @@ -71,10 +71,6 @@
<Compile Include="Src\Gui\RenameCategoryDialog.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Src\Gui\ShowTabOrder\ITabOrder.cs" />
<Compile Include="Src\Gui\ShowTabOrder\TabIndexControl.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Src\Gui\SideTabDesigner.cs" />
<Compile Include="Src\Gui\SideTabItemDesigner.cs" />
<Compile Include="Src\Services\DefaultServiceContainer.cs" />

46
src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Gui/ShowTabOrder/ITabOrder.cs

@ -1,46 +0,0 @@ @@ -1,46 +0,0 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="none" email=""/>
// <version>$Revision$</version>
// </file>
/*
using System;
using System.Drawing;
namespace ICSharpCode.FormsDesigner
{
/// <summary>
/// Interface defining the tab order mode.ning the tab order mode.
/// </summary>
public interface ITabOrder
{
/// <summary>
/// Checks if tab order mode is active
/// </summary>
bool IsTabOrderMode { get; }
/// <summary>
/// Sets the next tab index if over a control.
/// </summary>
void SetNextTabIndex(Point p);
/// <summary>
/// Sets the previous tab index if over a control.
/// </summary>
void SetPrevTabIndex(Point p);
/// <summary>
/// Show tab order.
/// </summary>
void ShowTabOrder();
/// <summary>
/// Show tab order.
/// </summary>
void HideTabOrder();
}
}
*/

104
src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Gui/ShowTabOrder/TabIndexControl.cs

@ -1,104 +0,0 @@ @@ -1,104 +0,0 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="none" email=""/>
// <version>$Revision$</version>
// </file>
/*
using System;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Collections;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Windows.Forms;
using System.Windows.Forms.Design;
using ICSharpCode.FormsDesigner.Services;
namespace ICSharpCode.FormsDesigner
{
/// <summary>
/// This class represents a visual feedback for the current tab index of a
/// form control.
/// </summary>
public class TabIndexControl : Control
{
static Color BACKCOLOR2 = Color.DarkViolet; // background color when changed
static Color BACKCOLOR = Color.DarkBlue; // normal background color
static Color TEXTCOLOR = Color.White; // text color
static Font TEXTFONT = new Font("Tahoma",8); // font for the tab index number text
static Size DEFSIZE = new Size(20, 20); // default (also minimum) size of the control
protected Control associatedControl; // Associated form control
protected bool hasChanged = false; // indicates if tab index has changed.
/// <summary>
/// Gets or sets that the tab index contro has changed the index
/// </summary>
public bool HasChanged {
get {
return hasChanged;
}
set {
hasChanged = value;
}
}
public Control AssociatedControl {
get {
return associatedControl;
}
}
/// <summary>
/// Creates a tab index control.
/// </summary>
public TabIndexControl(Control c)
{
associatedControl = c;
this.Size = DEFSIZE;
this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint, true);
c.LocationChanged += new EventHandler(SetLocation);
c.TabIndexChanged += new EventHandler(RepaintOnTabIndexChange);
SetLocation(this, EventArgs.Empty);
}
void RepaintOnTabIndexChange(object sender, EventArgs e)
{
HasChanged = true;
Refresh();
}
void SetLocation(object sender, EventArgs e)
{
this.Left = associatedControl.Left;
this.Top = associatedControl.Top;
}
/// <summary>
/// Drawing code to draw the tab index number above the associated control.
/// </summary>
protected override void OnPaint(PaintEventArgs pe)
{
Graphics g = pe.Graphics;
string tabIndexAsString = associatedControl.TabIndex.ToString();
Size sz = Size.Round(g.MeasureString( tabIndexAsString,TEXTFONT));
this.Width = (sz.Width < DEFSIZE.Width )? DEFSIZE.Width : sz.Width;
this.Height = DEFSIZE.Height;
Rectangle r = new Rectangle(0,0,this.Width,this.Height);
Color bkColor = ( hasChanged )? BACKCOLOR2 : BACKCOLOR;
g.FillRectangle(new SolidBrush(bkColor),r);
StringFormat sf = new StringFormat();
sf.Alignment = StringAlignment.Center;
sf.LineAlignment = StringAlignment.Center;
g.DrawString(tabIndexAsString, TEXTFONT, new SolidBrush(TEXTCOLOR), r, sf);
}
}
}
*/

145
src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Gui/SideTabDesigner.cs

@ -57,151 +57,6 @@ namespace ICSharpCode.FormsDesigner.Gui @@ -57,151 +57,6 @@ namespace ICSharpCode.FormsDesigner.Gui
}
}
/*
protected void LoadAssembly(string assemblyName)
{
Assembly assembly = FindAssembly(assemblyName);
if (assembly == null) {
assembly = Assembly.Load(assemblyName);
}
if (assembly != null) {
BuildToolboxFromAssembly(assembly);
}
}
protected void BuildToolboxFromAssembly(Assembly assembly)
{
ArrayList toolboxItems = GetToolboxItemsFromAssembly(assembly);
foreach (ToolboxItem toolboxItem in toolboxItems) {
//adding the toolboxitem into the tab with his bitmap and caption
//loaded from the assembly
this.Items.Add(new SideTabItemDesigner(toolboxItem));
}
}
protected Assembly FindAssembly(string assemblyName)
{
foreach (Assembly assembly in AppDomain.CurrentDomain.GetAssemblies()) {
if (assembly.GetName().Name == assemblyName) {
return assembly;
}
}
return null;
}
protected ArrayList GetToolboxItemsFromAssembly(Assembly assembly)
{
ArrayList toolBoxItems = new ArrayList();
Hashtable images = new Hashtable();
ImageList il = new ImageList();
// try to load res icon
string[] imgNames = assembly.GetManifestResourceNames();
foreach (string im in imgNames) {
if (!im.EndsWith(".resources")) //load resources only to avoid exception on debugging
{
try {
Stream stream = assembly.GetManifestResourceStream(im);
if (stream != null) {
Bitmap b = new Bitmap(Image.FromStream(stream, true, false));
b.MakeTransparent();
images[im] = il.Images.Count;
il.Images.Add(b);
stream.Close();
}
} catch (Exception e) {
LoggingService.Warn("Form Designer: GetToolboxItemsFromAssembly", e);
}
}
}
Type[] ts = assembly.GetExportedTypes();
foreach (Type t in ts) {
if (t.IsPublic && !t.IsAbstract) {
if (t.IsDefined(typeof(ToolboxItemFilterAttribute), true) || t.IsDefined(typeof(ToolboxItemAttribute), true) || t.IsDefined(typeof(DesignTimeVisibleAttribute), true) || typeof(System.ComponentModel.IComponent).IsAssignableFrom(t)) {
object[] filterAttrs = t.GetCustomAttributes(typeof(DesignTimeVisibleAttribute), true);
foreach (DesignTimeVisibleAttribute visibleAttr in filterAttrs) {
if (!visibleAttr.Visible) {
goto skip;
}
}
string imageName = String.Concat(t.FullName, ".bmp");
if (images[imageName] == null) {
object[] attributes = t.GetCustomAttributes(false);
if (t.IsDefined(typeof(ToolboxBitmapAttribute), false)) {
foreach (object attr in attributes) {
if (attr is ToolboxBitmapAttribute) {
ToolboxBitmapAttribute toolboxBitmapAttribute = (ToolboxBitmapAttribute)attr;
Bitmap b = new Bitmap(toolboxBitmapAttribute.GetImage(t));
b.MakeTransparent();
il.Images.Add(b);
images[imageName] =b;
break;
}
}
}
}
ToolboxItem item = new ToolboxItem(t);
item.ComponentsCreating += ToolboxComponentsCreatingEventHandler;
item.ComponentsCreated += ToolboxComponentsCreatedEventHandler;
if (images[imageName] != null) {
try {
if(images[imageName] is Bitmap)
item.Bitmap = (Bitmap)images[imageName];
} catch (Exception ex) {
MessageService.ShowError(ex, "Exception converting bitmap : " + images[imageName] + " : ");
}
}
toolBoxItems.Add(item);
skip:;
}
}
}
return toolBoxItems;
}
void ToolboxComponentsCreatingEventHandler (
Object sender,
ToolboxComponentsCreatingEventArgs e)
{
AppDomain.CurrentDomain.AssemblyResolve += MyResolveEventHandler;
}
void ToolboxComponentsCreatedEventHandler (
Object sender,
ToolboxComponentsCreatedEventArgs e)
{
AppDomain.CurrentDomain.AssemblyResolve -= MyResolveEventHandler;
}
Assembly MyResolveEventHandler(object sender, ResolveEventArgs args)
{
LoggingService.Debug("Side Tab Designer: MyResolve: " + args.Name);
//skip already loaded
Assembly lastAssembly = null;
foreach (Assembly asm in AppDomain.CurrentDomain.GetAssemblies()) {
//LoggingService.Info("Assembly..." + asm.FullName);
if (asm.FullName == args.Name) {
lastAssembly = asm;
}
}
if (lastAssembly != null) {
LoggingService.Info("ICSharpAssemblyResolver found..." + args.Name);
if (!TypeResolutionService.DesignerAssemblies.Contains(lastAssembly))
TypeResolutionService.DesignerAssemblies.Add(lastAssembly);
return lastAssembly;
}
return null;
}
*/
void SelectedTabItemChanged(object sender, EventArgs e)
{
AxSideTabItem item = (sender as AxSideTab).ChoosedItem;

24
src/AddIns/Misc/Debugger/TreeListView/Project/Src/TreeListView/TreeListView.cs

@ -544,30 +544,6 @@ namespace System.Windows.Forms @@ -544,30 +544,6 @@ namespace System.Windows.Forms
/// <param name="m"></param>
protected override void WndProc(ref System.Windows.Forms.Message m)
{
#region View messages
/*if(false)
{
string val;
val = Enum.GetName(typeof(APIsEnums.ListViewMessages), (APIsEnums.ListViewMessages) m.Msg);
if(val != "" && val != null)
Debug.WriteLine(val);
else
{
val = Enum.GetName(typeof(APIsEnums.WindowMessages), (APIsEnums.WindowMessages) m.Msg);
if(val != "" && val != null)
Debug.WriteLine(val);
}
if(val != "" && val != null)
Debug.WriteLine(m.Msg.ToString());
if(val == "LBUTTONDOWN")
{
int a= 0;
a++;
}
}*/
#endregion
TreeListViewItem item = null; Rectangle rec;
switch((APIsEnums.WindowMessages) m.Msg)
{

15
src/Libraries/NRefactory/Project/Src/Parser/VBNet/VBNetParser.cs

@ -88,10 +88,9 @@ namespace ICSharpCode.NRefactory.Parser.VB @@ -88,10 +88,9 @@ namespace ICSharpCode.NRefactory.Parser.VB
}
/*
True, if ident is followed by "=" or by ":" and "="
True, if ident is followed by "=" or by ":" and "="
*/
bool IsNamedAssign() {
// if(Peek(1).kind == Tokens.Assign) return true; // removed: not in the lang spec
if(Peek(1).kind == Tokens.Colon && Peek(2).kind == Tokens.Assign) return true;
return false;
}
@ -101,7 +100,7 @@ namespace ICSharpCode.NRefactory.Parser.VB @@ -101,7 +100,7 @@ namespace ICSharpCode.NRefactory.Parser.VB
}
/*
True, if "<" is followed by the ident "assembly" or "module"
True, if "<" is followed by the ident "assembly" or "module"
*/
bool IsGlobalAttrTarget () {
Token pt = Peek(1);
@ -109,7 +108,7 @@ namespace ICSharpCode.NRefactory.Parser.VB @@ -109,7 +108,7 @@ namespace ICSharpCode.NRefactory.Parser.VB
}
/*
True if the next token is a "(" and is followed by "," or ")"
True if the next token is a "(" and is followed by "," or ")"
*/
bool IsDims()
{
@ -124,8 +123,8 @@ namespace ICSharpCode.NRefactory.Parser.VB @@ -124,8 +123,8 @@ namespace ICSharpCode.NRefactory.Parser.VB
}
/*
True, if the comma is not a trailing one,
like the last one in: a, b, c,
True, if the comma is not a trailing one,
like the last one in: a, b, c,
*/
bool NotFinalComma() {
int peek = Peek(1).kind;
@ -134,8 +133,8 @@ namespace ICSharpCode.NRefactory.Parser.VB @@ -134,8 +133,8 @@ namespace ICSharpCode.NRefactory.Parser.VB
}
/*
True, if the next token is "Else" and this one
if followed by "If"
True, if the next token is "Else" and this one
if followed by "If"
*/
bool IsElseIf()
{

1
src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj

@ -69,7 +69,6 @@ @@ -69,7 +69,6 @@
<Compile Include="Src\Services\File\RecentOpen.cs" />
<Compile Include="Src\Services\Language\LanguageService.cs" />
<Compile Include="Src\Internal\ConditionEvaluators\WindowActiveEvaluator.cs" />
<Compile Include="Src\Internal\ConditionEvaluators\ProjectOpenEvaluator.cs" />
<Compile Include="Src\Internal\Doozers\DefaultDialogPanelDescriptor.cs" />
<Compile Include="Src\Internal\Doozers\DialogPanelDoozer.cs" />
<Compile Include="Src\Internal\Doozers\IDialogPanel.cs" />

31
src/Main/Base/Project/Src/Gui/Components/SideBar/SharpDevelopSideBar.cs

@ -92,37 +92,6 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -92,37 +92,6 @@ namespace ICSharpCode.SharpDevelop.Gui
MouseUp += new MouseEventHandler(SetContextMenu);
sideTabContent.MouseUp += new MouseEventHandler(SetItemContextMenu);
/*
deleteMenuHeaderItem = new IconMenuItem(mainwindow, ResourceService.GetString("SideBarComponent.ContextMenu.DeleteTab"), new EventHandler(DeleteTabHeader));
moveUpMenuHeaderItem = new IconMenuItem(mainwindow, ResourceService.GetString("SideBarComponent.ContextMenu.MoveTabUp"), new EventHandler(MoveTabUp));
moveDownMenuHeaderItem = new IconMenuItem(mainwindow, ResourceService.GetString("SideBarComponent.ContextMenu.MoveTabDown"), new EventHandler(MoveTabDown));
moveItemTabUpMenuHeaderItem = new IconMenuItem(mainwindow, ResourceService.GetString("SideBarComponent.ContextMenu.MoveTabUp"), new EventHandler(MoveActiveTabUp));
moveItemTabDownMenuHeaderItem = new IconMenuItem(mainwindow, ResourceService.GetString("SideBarComponent.ContextMenu.MoveTabDown"), new EventHandler(MoveActiveTabDown));
ContextMenu = new ContextMenu(new MenuItem[] {
deleteMenuHeaderItem,
new IconMenuItem(mainwindow, ResourceService.GetString("SideBarComponent.ContextMenu.RenameTab"), new EventHandler(RenameTabHeader)),
new IconMenuItem(mainwindow, "-"),
new IconMenuItem(mainwindow, ResourceService.GetString("SideBarComponent.ContextMenu.AddTab"), new EventHandler(AddTabHeader)),
new IconMenuItem(mainwindow, "-"),
moveUpMenuHeaderItem,
moveDownMenuHeaderItem
});
sideTabContent.MouseMove += new MouseEventHandler(MoveItem);
sideTabContent.ContextMenu = new ContextMenu(new MenuItem[] {
new IconMenuItem(mainwindow, ResourceService.GetString("SideBarComponent.ContextMenu.RenameTabItem"), new EventHandler(RenameTabItem)),
new IconMenuItem(mainwindow, ResourceService.GetString("SideBarComponent.ContextMenu.DeleteTabItem"), new EventHandler(DeleteTabItem)),
new IconMenuItem(mainwindow, "-"),
moveItemTabUpMenuHeaderItem,
moveItemTabDownMenuHeaderItem
});
*/
foreach (TextTemplate template in TextTemplate.TextTemplates) {
AxSideTab tab = new AxSideTab(this, template.Name);
tab.CanSaved = false;

35
src/Main/Base/Project/Src/Gui/Dialogs/NewProjectDialog.cs

@ -313,47 +313,12 @@ namespace ICSharpCode.SharpDevelop.Project.Dialogs @@ -313,47 +313,12 @@ namespace ICSharpCode.SharpDevelop.Project.Dialogs
}
NewProjectLocation = cinfo.CreatedProjects.Count > 0 ? cinfo.CreatedProjects[0] : "";
DialogResult = DialogResult.OK;
/*
if (item.Template.LanguageName != null && item.Template.LanguageName.Length > 0) {
}
if (item.Template.WizardPath != null) {
Properties customizer = new Properties();
customizer.Set("Template", item.Template);
customizer.Set("Creator", this);
WizardDialog wizard = new WizardDialog("Project Wizard", customizer, item.Template.WizardPath);
if (wizard.ShowDialog(ICSharpCode.SharpDevelop.Gui.WorkbenchSingleton.MainForm) == DialogResult.OK) {
DialogResult = DialogResult.OK;
}
}
NewCombineLocation = FileUtility.GetDirectoryNameWithSeparator(ProjectLocation) + ((TextBox)ControlDictionary["nameTextBox"]).Text + ".cmbx";
if (File.Exists(NewCombineLocation)) {
DialogResult result = MessageBox.Show("Combine file " + NewCombineLocation + " already exists, do you want to overwrite\nthe existing file ?", "File already exists", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2);
switch(result) {
case DialogResult.Yes:
cmb.SaveCombine(NewCombineLocation);
break;
case DialogResult.No:
break;
}
} else {
cmb.SaveCombine(NewCombineLocation);
}
} else {
MessageBox.Show(ResourceService.GetString("Dialog.NewProject.EmptyProjectFieldWarning"), "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
*/
}
}
void BrowseDirectories(object sender, EventArgs e)
{
// Changes Shankar
FolderDialog fd = new FolderDialog();
if (fd.DisplayDialog("${res:Dialog.NewProject.SelectDirectoryForProject}") == DialogResult.OK) {
((TextBox)ControlDictionary["locationTextBox"]).Text = fd.Path;

9
src/Main/Base/Project/Src/Gui/IWorkbenchWindow.cs

@ -38,15 +38,6 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -38,15 +38,6 @@ namespace ICSharpCode.SharpDevelop.Gui
get;
}
/// <summary>
/// returns null if no sub view contents are attached.
/// </summary>
/*
ArrayList SubViewContents {
get;
}
*/
/// <summary>
/// The current view content which is shown inside this window.
/// This method is thread-safe.

34
src/Main/Base/Project/Src/Internal/ConditionEvaluators/ProjectOpenEvaluator.cs

@ -1,34 +0,0 @@ @@ -1,34 +0,0 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Mike Krüger" email="mike@icsharpcode.net"/>
// <version>$Revision$</version>
// </file>
using System;
using System.Collections;
using System.Xml;
using ICSharpCode.SharpDevelop.Gui;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop.Project;
namespace ICSharpCode.Core
{
/*
public class ProjectOpenConditionEvaluator : IConditionEvaluator
{
public bool IsValid(object caller, Condition condition)
{
IProject project = ProjectService.CurrentProject;
string openproject = condition.Properties["activeproject"];
if (openproject == "*") {
return project != null;
}
return project != null && project.Language == openproject;
}
}
*/
}

10
src/Main/Base/Project/Src/Project/ChooseStorageLocationButton.cs

@ -128,16 +128,6 @@ namespace ICSharpCode.SharpDevelop.Project @@ -128,16 +128,6 @@ namespace ICSharpCode.SharpDevelop.Project
return bmp;
}
/*
static void DrawC(Graphics g, int x, int y)
{
g.DrawLine(Pens.Red, x + 1, y, x + 4, y);
g.DrawLine(Pens.Red, x, y + 1, x, y + 5);
g.DrawLine(Pens.Red, x, y + 1, x, y + 5);
g.DrawLine(Pens.Red, x + 1, y + 6, x + 4, y + 6);
}
*/
/// <summary>draws the letter 'U'</summary>
static void DrawU(Graphics g, int x, int y)
{

8
src/Main/Base/Project/Src/TextEditor/Commands/NavigationCommands.cs

@ -21,12 +21,4 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Commands @@ -21,12 +21,4 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Commands
}
}
}
/*
IWorkbenchWindow window = WorkbenchSingleton.Workbench.ActiveWorkbenchWindow;
if (window == null || !(window.ViewContent is ITextEditorControlProvider)) {
return;
}
TextEditorControl textEditorControl = ((ITextEditorControlProvider)window.ViewContent).TextEditorControl;
*/
}

42
src/Main/Base/Project/Src/TextEditor/Gui/Editor/InsightWindow/IndexerInsightDataProvider.cs

@ -49,47 +49,5 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor @@ -49,47 +49,5 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor
}
}
}
/*
public bool CaretOffsetChanged()
{
bool closeDataProvider = textArea.Caret.Offset <= initialOffset;
if (!closeDataProvider) {
bool insideChar = false;
bool insideString = false;
for (int offset = initialOffset; offset < Math.Min(textArea.Caret.Offset, document.TextLength); ++offset) {
char ch = document.GetCharAt(offset);
switch (ch) {
case '\'':
insideChar = !insideChar;
break;
case '"':
insideString = !insideString;
break;
case ']':
case '}':
case '{':
case ';':
if (!(insideChar || insideString)) {
return true;
}
break;
}
}
}
return closeDataProvider;
}
public bool CharTyped()
{
int offset = textArea.Caret.Offset - 1;
if (offset >= 0) {
return document.GetCharAt(offset) == ']';
}
return false;
}
*/
}
}

7
src/Main/Base/Project/Src/TextEditor/Gui/Editor/SharpDevelopTextEditorProperties.cs

@ -310,12 +310,5 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor @@ -310,12 +310,5 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor
useCustomLine = value;
}
}
/*
<Property key="DoubleBuffer" value="True" />
<Property key="ShowErrors" value="True" />
<Property key="" value="True" />
<Property key="AutoInsertTemplates" value="True" />
<Property key="IndentationSize" value="4" /> * */
}
}

2
src/Main/Core/Project/Src/AddInTree/AddIn/IDoozer.cs

@ -22,6 +22,6 @@ namespace ICSharpCode.Core @@ -22,6 +22,6 @@ namespace ICSharpCode.Core
/// </summary>
bool HandleConditions { get; }
object BuildItem(object caller, /* AddInTreeNode node, */ Codon codon, ArrayList subItems);
object BuildItem(object caller, Codon codon, ArrayList subItems);
}
}

11
src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/Interfaces/IAttribute.cs

@ -19,17 +19,6 @@ namespace ICSharpCode.SharpDevelop.Dom @@ -19,17 +19,6 @@ namespace ICSharpCode.SharpDevelop.Dom
string Name {
get;
}
/*
* These properties are not stored in DomPersistence and cannot not be used!
List<AttributeArgument> PositionalArguments {
get;
}
SortedList<string, AttributeArgument> NamedArguments {
get;
}
*/
}
public enum AttributeTarget

81
src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/NRefactoryResolver/TypeVisitor.cs

@ -113,87 +113,6 @@ namespace ICSharpCode.SharpDevelop.Dom.NRefactoryResolver @@ -113,87 +113,6 @@ namespace ICSharpCode.SharpDevelop.Dom.NRefactoryResolver
return MemberLookupHelper.FindOverload(methods, typeParameters, types);
}
/*
/// <summary>
/// Finds the index of the overload in <paramref name="methods"/> that is the best
/// match for a call with the specified return types.
/// </summary>
/// <param name="methods">ArrayList containing IMethodOrIndexers</param>
/// <param name="types">Array containing the types of the parameters.</param>
/// <param name="forceParameterCount">True when the parameter count should exactly be
/// types.Length; False when more parameters are possible</param>
/// <param name="singleBestOverload">Returns true when the overload returned is
/// the only overload that had the highest score or false when there were
/// multiple overloads with an equal score.</param>
public static int FindOverload(List<IMethodOrProperty> methods, IReturnType[] types, bool forceParameterCount, out bool singleBestOverload)
{
singleBestOverload = true;
if (methods.Count == 0)
return -1;
if (methods.Count == 1)
return 0;
IMethodOrProperty bestMethod = methods[0];
int bestIndex = 0;
int bestScore = ScoreOverload(bestMethod, types, forceParameterCount);
for (int i = 1; i < methods.Count; ++i) {
IMethodOrProperty method = methods[i];
int score = ScoreOverload(method, types, forceParameterCount);
if (score > bestScore) {
bestScore = score;
bestMethod = method;
bestIndex = i;
singleBestOverload = true;
} else if (score == bestScore) {
singleBestOverload = false;
}
}
return bestIndex;
}
/// <summary>
/// Calculates a score how good the specified <paramref name="method"/> matches
/// the <paramref name="types"/>.
/// </summary>
/// <param name="methods">ArrayList containing IMethodOrIndexers</param>
/// <param name="types">Array containing the types of the parameters.</param>
/// <param name="forceParameterCount">True when the parameter count should exactly be
/// types.Length; False when more parameters are possible</param>
/// <returns>
/// Integer score. When the parameter count matches, score is between 0 (no types matches)
/// and types.Length (all types matched).
/// When there were too many parameters but forceParameterCount was false, score is
/// between -1 for no matches and types.Length - 1 for all matches.
/// When the parameter count didn't match, score is -(Difference between parameter counts)
/// </returns>
public static int ScoreOverload(IMethodOrProperty method, IReturnType[] types, bool forceParameterCount)
{
if (method == null) return -1;
if (forceParameterCount
? (method.Parameters.Count == types.Length)
: (method.Parameters.Count >= types.Length))
{
int points = 0;
for (int i = 0; i < types.Length; ++i) {
IReturnType type = method.Parameters[i].ReturnType;
if (type != null && types[i] != null) {
if (type.Equals(types[i]))
points += 1;
}
}
if (method.Parameters.Count == types.Length)
return points;
else
return points - 1;
} else {
return -Math.Abs(method.Parameters.Count - types.Length);
}
}
*/
/// <summary>
/// Gets the method called by the InvocationExpression. In Visual Basic, the result
/// can also be an Indexer.

28
src/Main/ICSharpCode.SharpDevelop.Sda/Src/ExceptionBox.cs

@ -184,34 +184,6 @@ namespace ICSharpCode.SharpDevelop.Sda @@ -184,34 +184,6 @@ namespace ICSharpCode.SharpDevelop.Sda
CopyInfoToClipboard();
StartUrl("http://www.icsharpcode.net/OpenSource/SD/BugReporting.aspx?version=" + RevisionClass.FullVersion);
/*
string text = "This version of SharpDevelop is an internal build, " +
"not a released version.\n" +
"Please report problems in the internal builds to the " +
"SVN-SharpDevelop-Users mailing list.";
int result = MessageService.ShowCustomDialog("SharpDevelop", text,
"Join the list", "Write mail", "Cancel");
if (result == 0) {
StartUrl("http://www.glengamoi.com/mailman/listinfo/icsharpcode.svn-sharpdevelop-users");
} else if (result == 1) {
// clipboard text is too long to be inserted into the mail-url
string exceptionTitle = "";
Exception ex = exceptionThrown;
if (ex != null) {
try {
while (ex.InnerException != null) ex = ex.InnerException;
exceptionTitle = " (" + ex.GetType().Name + ")";
} catch {}
}
string url = "mailto:icsharpcode.svn-sharpdevelop-users@glengamoi.com?subject=Bug Report"
+ Uri.EscapeDataString(exceptionTitle)
+ "&body="
+ Uri.EscapeDataString("Write an English description on how to reproduce the error and paste the exception text.");
StartUrl(url);
}
*/
}
[SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")]

Loading…
Cancel
Save