changeset 101:de9e0d2e2139

Add UntitledTextFileWizard
author yabiku
date Sat, 22 Dec 2007 17:43:37 +0900
parents 00e0deb365f9
children e83dd125e0c6
files src/remoteeditor/action/RemoteEditorAction.java
diffstat 1 files changed, 12 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/remoteeditor/action/RemoteEditorAction.java	Sat Dec 22 15:24:28 2007 +0900
+++ b/src/remoteeditor/action/RemoteEditorAction.java	Sat Dec 22 17:43:37 2007 +0900
@@ -25,6 +25,7 @@
 import org.eclipse.ui.IWorkbenchWindowActionDelegate;
 import org.eclipse.ui.PartInitException;
 import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.internal.editors.text.UntitledTextFileWizard;
 //import org.eclipse.ui.internal.Workbench;
 //import org.eclipse.ui.internal.WorkbenchPage;
 //import org.eclipse.ui.views.IViewDescriptor;
@@ -47,6 +48,14 @@
 	}
 
 	public void run(IAction action) {
+		
+		IWorkbench workbench = PlatformUI.getWorkbench();
+		
+		UntitledTextFileWizard obj = new UntitledTextFileWizard();
+		obj.init(workbench, null);
+		obj.performFinish();
+		
+		/*
 		IWorkbench workbench = PlatformUI.getWorkbench();
 		//Display display = workbench.getDisplay();
 		IWorkbenchWindow workbenchWindow = workbench.getActiveWorkbenchWindow();
@@ -59,6 +68,7 @@
 		workbenchPage.closeEditor(editorPart, true);
 		
 		System.out.println("ActionID: " + action.getId());
+		*/
 		
 		/*** 危険 ***/
 //		IWorkspace workspace = ResourcesPlugin.getWorkspace();
@@ -96,14 +106,14 @@
 		
 		//IWorkbenchPage page = workbenchWindow.getActivePage();
 		//editorPart = IDE.openEditor(workbenchPage,null);
-		
+		/*
 		try {
 			editorPart = workbenchPage.openEditor(editorinput, "remoteeditor.editors.RemoteEditor");
 			//editorPart = workbenchPage.openEditor(null, "remoteeditor.editors.RemoteEditor");
 			System.out.println("test");
 		} catch (PartInitException e) {
 			e.printStackTrace();
-		}
+		}*/
 		
 
 	}