Quantcast
Channel: SharpDevelop Community
Viewing all articles
Browse latest Browse all 1764

Exception from Class diagram generator

$
0
0

 When I try to create Class diagram with a project, I got an exception message below

SharpDevelop Version : 4.2.2.8818-3d0b926b
.NET Version         : 4.0.30319.296
OS Version           : Microsoft Windows NT 6.1.7601 Service Pack 1
Current culture      : Korean (Korea) (ko-KR)
Current UI language  : kr
Running under WOW6432, processor architecture: x86-64
Working Set Memory   : 223428kb
GC Heap Memory       : 46301kb

Exception thrown:
System.ArgumentException: 동일한 키를 사용하는 항목이 이미 추가되었습니다. <== This means "An item with the same key has already been added"
   위치: System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
   위치: System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   위치: ClassDiagram.ClassCanvas.AddCanvasItem(CanvasItem item)
   위치: ClassDiagram.ClassCanvas.LoadFromXml(IXPathNavigable doc, IProjectContent pc)
   위치: ClassDiagramAddin.ClassDiagramViewContent.Load(OpenedFile file, Stream stream)
   위치: ICSharpCode.SharpDevelop.OpenedFile.ReloadFromDiskInternal()
   위치: ICSharpCode.Core.FileUtility.ObservedLoad(FileOperationDelegate loadFile, String fileName, String message, FileErrorPolicy policy)
   위치: ICSharpCode.Core.FileUtility.ObservedLoad(FileOperationDelegate loadFile, String fileName, FileErrorPolicy policy)
   위치: ICSharpCode.SharpDevelop.OpenedFile.ReloadFromDisk()
   위치: ICSharpCode.SharpDevelop.FileChangeWatcher.MainForm_Activated(Object sender, EventArgs e)
   위치: ICSharpCode.SharpDevelop.FileChangeWatcher.<OnFileChangedEvent>b__0()
   위치: ICSharpCode.SharpDevelop.Gui.WorkbenchSingleton.<>c__DisplayClass9.<>c__DisplayClassb.<CallLater>b__8(Object param0, EventArgs param1)
   위치: System.Windows.Forms.Timer.OnTick(EventArgs e)
   위치: System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
   위치: System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

 

I tested with several project, and I guess I reproduced the exception

Test project have only two classes which have same name.

but one is normal class and another is generic class

Class1 and Class1<T>

 

I saw the *.cd file but there is no difference with these classes in the file

see the file content below

 

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<ClassDiagram Zoom="1" MajorVersion="1" MinorVersion="1" MembersFormat="FullSignature">
  <Class Name="CDTEST.Class1" Collapsed="False">
    <Position X="0.5" Y="0.5" Width="1.272243" />
    <Compartments>
      <Compartment Name="Methods" Collapsed="False" />
    </Compartments>
  </Class>
  <Class Name="CDTEST.Class1" Collapsed="False">
    <Position X="0.5" Y="2" Width="1.47382" />
    <Compartments>
      <Compartment Name="Methods" Collapsed="False" />
    </Compartments>
  </Class>
</ClassDiagram>

 

I guess there is a mistake with handling generic class.

Please check and fix.

Thank you


Viewing all articles
Browse latest Browse all 1764

Trending Articles