svnno****@sourc*****
svnno****@sourc*****
2009年 5月 29日 (金) 20:38:17 JST
Revision: 3421 http://svn.sourceforge.jp/view?root=jiemamy&view=rev&rev=3421 Author: daisuke_m Date: 2009-05-29 20:38:17 +0900 (Fri, 29 May 2009) Log Message: ----------- マルチタブエディタが使用できるように修正。 Modified Paths: -------------- hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/DiagramEditor.java hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/MultiDiagramEditor.java -------------- next part -------------- Modified: hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/DiagramEditor.java =================================================================== --- hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/DiagramEditor.java 2009-05-28 13:27:56 UTC (rev 3420) +++ hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/DiagramEditor.java 2009-05-29 11:38:17 UTC (rev 3421) @@ -198,6 +198,8 @@ * @param tabIndex マルチタブエディタ上でのタブインデックス */ public DiagramEditor(RootModel rootModel, int tabIndex) { + setEditDomain(new DefaultEditDomain(this)); + ResourcesPlugin.getWorkspace().addResourceChangeListener(this); this.tabIndex = tabIndex; logger.debug(LogMarker.LIFECYCLE, "constructed - multi"); } @@ -409,7 +411,9 @@ super.setFocus(); JmContributor contributor = (JmContributor) getEditorSite().getActionBarContributor(); - contributor.selectCombo(rootModel); + if (contributor != null) { + contributor.selectCombo(rootModel); + } // Thanks to Naokiさん logger.debug(LogMarker.LIFECYCLE, "setFocus"); } Modified: hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/MultiDiagramEditor.java =================================================================== --- hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/MultiDiagramEditor.java 2009-05-28 13:27:56 UTC (rev 3420) +++ hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/MultiDiagramEditor.java 2009-05-29 11:38:17 UTC (rev 3421) @@ -35,6 +35,7 @@ import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.IEditorActionBarContributor; import org.eclipse.ui.IEditorInput; +import org.eclipse.ui.IEditorPart; import org.eclipse.ui.IEditorSite; import org.eclipse.ui.IFileEditorInput; import org.eclipse.ui.PartInitException; @@ -158,6 +159,22 @@ } /** + * {@inheritDoc} + */ + @Override + public IEditorPart getActiveEditor() { + return super.getActiveEditor(); + } + + /** + * {@inheritDoc} + */ + @Override + public int getActivePage() { + return super.getActivePage(); + } + + /** * {@link RootModel}を取得する。 * * @return エディタのルートモデル