equal
deleted
inserted
replaced
7 package isabelle.jedit_base |
7 package isabelle.jedit_base |
8 |
8 |
9 |
9 |
10 import isabelle._ |
10 import isabelle._ |
11 |
11 |
|
12 import java.util.{List => JList} |
12 import java.awt.event.{ActionListener, ActionEvent} |
13 import java.awt.event.{ActionListener, ActionEvent} |
13 import javax.swing.{JPopupMenu, JMenuItem} |
14 import javax.swing.{JPopupMenu, JMenuItem} |
14 |
15 |
15 import org.gjt.sp.jedit.View |
16 import org.gjt.sp.jedit.View |
16 import org.gjt.sp.jedit.gui.{DockableWindowManagerProvider, DockableWindowFactory, |
17 import org.gjt.sp.jedit.gui.{DockableWindowManagerProvider, DockableWindowFactory, |
40 case dockable: Dockable => dockable.detach_operation |
41 case dockable: Dockable => dockable.detach_operation |
41 case _ => None |
42 case _ => None |
42 } |
43 } |
43 |
44 |
44 case panel: PanelWindowContainer => |
45 case panel: PanelWindowContainer => |
45 val entries = Untyped.get[java.util.List[AnyRef]](panel, "dockables").toArray |
46 val entries = Untyped.get[JList[AnyRef]](panel, "dockables").toArray |
46 val wins = |
47 val wins = |
47 (for { |
48 (for { |
48 entry <- entries.iterator |
49 entry <- entries.iterator |
49 if Untyped.get[String](Untyped.get(entry, "factory"), "name") == dockable_name |
50 if Untyped.get[String](Untyped.get(entry, "factory"), "name") == dockable_name |
50 win = Untyped.get[Any](entry, "win") |
51 win = Untyped.get[Any](entry, "win") |