[Jiemamy-notify] commit [2010] アップデートチェックをひとまず無効に。 /

Zurück zum Archiv-Index

svnno****@sourc***** svnno****@sourc*****
2008年 10月 8日 (水) 00:04:17 JST


Revision: 2010
          http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=jiemamy&view=rev&rev=2010
Author:   daisuke_m
Date:     2008-10-08 00:04:17 +0900 (Wed, 08 Oct 2008)

Log Message:
-----------
アップデートチェックをひとまず無効に。 /
JmContributorを組み込み。 /
ContectMenuProviderを組み込み。

Modified Paths:
--------------
    vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/action/ExportAction.java
    vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/action/ImportAction.java
    vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/action/SaveDiagramImageAction.java
    vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/DiagramEditor2.java
    vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/DiagramEditorContextMenuProvider.java
    vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/JmContributor.java
    vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/MultiDiagramEditor.java


-------------- next part --------------
Modified: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/action/ExportAction.java
===================================================================
--- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/action/ExportAction.java	2008-10-07 12:39:33 UTC (rev 2009)
+++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/action/ExportAction.java	2008-10-07 15:04:17 UTC (rev 2010)
@@ -31,7 +31,7 @@
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.ui.IFileEditorInput;
 
-import org.jiemamy.eclipse.editor.DiagramEditor;
+import org.jiemamy.eclipse.editor.DiagramEditor2;
 import org.jiemamy.eclipse.utils.ExceptionHandler;
 import org.jiemamy.spec.exception.ExportException;
 import org.jiemamy.spec.extension.composer.ExportContext;
@@ -49,7 +49,7 @@
 	
 	private Exporter exporter;
 	
-	private DiagramEditor editor;
+	private DiagramEditor2 editor;
 	
 
 	/**
@@ -58,7 +58,7 @@
 	 * @param viewer
 	 * @param editor
 	 */
-	public ExportAction(Exporter exporter, GraphicalViewer viewer, DiagramEditor editor) {
+	public ExportAction(Exporter exporter, GraphicalViewer viewer, DiagramEditor2 editor) {
 		super(exporter.getName(), viewer);
 		
 //		paramCreator = porterDto.getParamCreator();

Modified: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/action/ImportAction.java
===================================================================
--- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/action/ImportAction.java	2008-10-07 12:39:33 UTC (rev 2009)
+++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/action/ImportAction.java	2008-10-07 15:04:17 UTC (rev 2010)
@@ -31,7 +31,7 @@
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.ui.IFileEditorInput;
 
-import org.jiemamy.eclipse.editor.DiagramEditor;
+import org.jiemamy.eclipse.editor.DiagramEditor2;
 import org.jiemamy.eclipse.utils.ExceptionHandler;
 import org.jiemamy.spec.exception.ImportException;
 import org.jiemamy.spec.extension.composer.ImportContext;
@@ -49,7 +49,7 @@
 	
 	private Importer importer;
 	
-	private DiagramEditor editor;
+	private DiagramEditor2 editor;
 	
 
 	/**
@@ -58,7 +58,7 @@
 	 * @param viewer
 	 * @param editor
 	 */
-	public ImportAction(Importer importer, GraphicalViewer viewer, DiagramEditor editor) {
+	public ImportAction(Importer importer, GraphicalViewer viewer, DiagramEditor2 editor) {
 		super(importer.getName(), viewer);
 		
 //		paramCreator = porterDto.getParamCreator();

Modified: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/action/SaveDiagramImageAction.java
===================================================================
--- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/action/SaveDiagramImageAction.java	2008-10-07 12:39:33 UTC (rev 2009)
+++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/action/SaveDiagramImageAction.java	2008-10-07 15:04:17 UTC (rev 2010)
@@ -55,7 +55,7 @@
 import org.eclipse.swt.widgets.Text;
 import org.eclipse.ui.IFileEditorInput;
 
-import org.jiemamy.eclipse.editor.DiagramEditor;
+import org.jiemamy.eclipse.editor.DiagramEditor2;
 import org.jiemamy.eclipse.ui.FolderSelectWizardPage;
 import org.jiemamy.eclipse.utils.EditorUtil;
 import org.jiemamy.eclipse.utils.ExceptionHandler;
@@ -67,7 +67,7 @@
  */
 public class SaveDiagramImageAction extends AbstractJiemamyAction {
 	
-	private DiagramEditor editor;
+	private DiagramEditor2 editor;
 	
 	private IPath path;
 	
@@ -83,7 +83,7 @@
 	 * @param viewer
 	 * @param editor
 	 */
-	public SaveDiagramImageAction(GraphicalViewer viewer, DiagramEditor editor) {
+	public SaveDiagramImageAction(GraphicalViewer viewer, DiagramEditor2 editor) {
 		super("menu.saveImage", viewer); // RESOURCE
 		this.editor = editor;
 	}
@@ -187,7 +187,7 @@
 		 */
 		@Override
 		public void addPages() {
-			page = new GraphicWizardPage(project);
+			page = (new GraphicWizardPage(project));
 			addPage(page);
 		}
 		
@@ -244,17 +244,17 @@
 			Label label = new Label(composite, SWT.NULL);
 			label.setText("wizard.export.graphic.filename");
 			
-			txtFilename = new Text(composite, SWT.BORDER);
+			txtFilename = (new Text(composite, SWT.BORDER));
 			txtFilename.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
 			txtFilename.setText(getDefaultFilename());
 			
-			label = new Label(composite, SWT.NULL); // ダミー
+			label = (new Label(composite, SWT.NULL)); // ダミー
 			label.setText("");
 			
-			label = new Label(composite, SWT.NULL);
+			label = (new Label(composite, SWT.NULL));
 			label.setText("wizard.export.graphic.format");
 			
-			cmbFormat = new Combo(composite, SWT.READ_ONLY);
+			cmbFormat = (new Combo(composite, SWT.READ_ONLY));
 			for (ImageFileFormat format : formatList) {
 				cmbFormat.add(format.getFormatDescription());
 			}

Modified: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/DiagramEditor2.java
===================================================================
--- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/DiagramEditor2.java	2008-10-07 12:39:33 UTC (rev 2009)
+++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/DiagramEditor2.java	2008-10-07 15:04:17 UTC (rev 2010)
@@ -31,6 +31,7 @@
 import org.eclipse.draw2d.PositionConstants;
 import org.eclipse.draw2d.Viewport;
 import org.eclipse.draw2d.parts.ScrollableThumbnail;
+import org.eclipse.gef.ContextMenuProvider;
 import org.eclipse.gef.DefaultEditDomain;
 import org.eclipse.gef.EditPartViewer;
 import org.eclipse.gef.GraphicalViewer;
@@ -65,6 +66,7 @@
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.ui.IActionBars;
+import org.eclipse.ui.IEditorActionBarContributor;
 import org.eclipse.ui.IEditorInput;
 import org.eclipse.ui.IEditorPart;
 import org.eclipse.ui.IFileEditorInput;
@@ -219,16 +221,21 @@
 		super.selectionChanged(part, selection);
 	}
 	
-//	/**
-//	 * {@inheritDoc}
-//	 */
-//	@Override
-//	public void setFocus() {
-//		super.setFocus();
-//		IEditorActionBarContributor contributor = getEditorSite().getActionBarContributor();
-//		((JmContributor) contributor).selectCombo(rootModel);
-//		// Thanks to Naokiさん
-//	}
+	/**
+	 * {@inheritDoc}
+	 */
+	@Override
+	public void setFocus() {
+		// Thanks to Naokiさん
+		super.setFocus();
+		IEditorActionBarContributor contributor = getEditorSite().getActionBarContributor();
+		if (contributor != null) {
+			((JmContributor) contributor).selectCombo(rootModel);
+		} else {
+			System.out.println("contributor is null.");
+			// THINK bacchusではnullになる事はなかったんだけどな。
+		}
+	}
 	
 	/**
 	 * TODO for daisuke
@@ -260,10 +267,9 @@
 		viewer.setKeyHandler(keyHandler);
 		
 		// configure the context menu provider
-		// TODO context menu の設定
-//		ContextMenuProvider cmProvider = new DiagramEditorContextMenuProvider(viewer, this, getActionRegistry());
-//		viewer.setContextMenu(cmProvider);
-//		getSite().setSelectionProvider(viewer);
+		ContextMenuProvider cmProvider = new DiagramEditorContextMenuProvider(viewer, this, getActionRegistry());
+		viewer.setContextMenu(cmProvider);
+		getSite().setSelectionProvider(viewer);
 	}
 	
 	/**

Modified: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/DiagramEditorContextMenuProvider.java
===================================================================
--- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/DiagramEditorContextMenuProvider.java	2008-10-07 12:39:33 UTC (rev 2009)
+++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/DiagramEditorContextMenuProvider.java	2008-10-07 15:04:17 UTC (rev 2010)
@@ -48,7 +48,7 @@
  */
 public class DiagramEditorContextMenuProvider extends ContextMenuProvider {
 	
-	private DiagramEditor editorPart;
+	private DiagramEditor2 editorPart;
 	
 	/** The editor's action registry. */
 	private ActionRegistry actionRegistry;
@@ -62,7 +62,7 @@
 	 * @param editor the editor
 	 * @param registry the editor's action registry
 	 */
-	public DiagramEditorContextMenuProvider(EditPartViewer viewer, DiagramEditor editor, ActionRegistry registry) {
+	public DiagramEditorContextMenuProvider(EditPartViewer viewer, DiagramEditor2 editor, ActionRegistry registry) {
 		
 		super(viewer);
 		if (registry == null) {

Modified: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/JmContributor.java
===================================================================
--- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/JmContributor.java	2008-10-07 12:39:33 UTC (rev 2009)
+++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/JmContributor.java	2008-10-07 15:04:17 UTC (rev 2010)
@@ -175,7 +175,7 @@
 					}
 				}
 				
-				checkUpdate(composite);
+//				checkUpdate(composite);
 				
 				return composite;
 			}

Modified: vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/MultiDiagramEditor.java
===================================================================
--- vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/MultiDiagramEditor.java	2008-10-07 12:39:33 UTC (rev 2009)
+++ vesta/trunk/org.jiemamy.eclipse/src/main/java/org/jiemamy/eclipse/editor/MultiDiagramEditor.java	2008-10-07 15:04:17 UTC (rev 2010)
@@ -184,7 +184,6 @@
 	 */
 	@Override
 	public boolean isSaveAsAllowed() {
-		// TODO Auto-generated method stub
 		return true;
 	}
 	


Jiemamy-notify メーリングリストの案内
Zurück zum Archiv-Index