# HG changeset patch
# User pin
# Date 1198256667 -32400
# Node ID 78f6f6ce9d3c48ddae9e324dc949f8839a588890
# Parent cda18e429dfaf4410b8398a186cac349179cd766
*** empty log message ***
diff -r cda18e429dfa -r 78f6f6ce9d3c .classpath
--- a/.classpath Fri Dec 21 19:33:02 2007 +0900
+++ b/.classpath Sat Dec 22 02:04:27 2007 +0900
@@ -3,5 +3,6 @@
+
diff -r cda18e429dfa -r 78f6f6ce9d3c plugin.xml
--- a/plugin.xml Fri Dec 21 19:33:02 2007 +0900
+++ b/plugin.xml Sat Dec 22 02:04:27 2007 +0900
@@ -28,5 +28,31 @@
+
+
+
+
+
+
+
diff -r cda18e429dfa -r 78f6f6ce9d3c src/remoteeditor/action/RemoteEditorAction.java
--- a/src/remoteeditor/action/RemoteEditorAction.java Fri Dec 21 19:33:02 2007 +0900
+++ b/src/remoteeditor/action/RemoteEditorAction.java Sat Dec 22 02:04:27 2007 +0900
@@ -1,10 +1,24 @@
package remoteeditor.action;
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.InputStream;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IViewPart;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchWindow;
@@ -13,6 +27,7 @@
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.internal.Workbench;
import org.eclipse.ui.internal.WorkbenchPage;
+import org.eclipse.ui.views.IViewDescriptor;
import remoteeditor.ui.REPSelectWindow;
import remoteeditor.ui.RepInputDialog;
@@ -38,20 +53,51 @@
IWorkbenchPage workbenchPage = workbenchWindow.getActivePage();
IEditorPart editorPart = workbenchPage.getActiveEditor();
- System.out.println(editorPart.getEditorInput().toString());
+ //System.out.println(editorPart.getEditorInput().toString());
IEditorInput editorinput = editorPart.getEditorInput();
workbenchPage.closeEditor(editorPart, true);
+ /*** ŠëŒ¯ ***/
+ IWorkspace workspace = ResourcesPlugin.getWorkspace();
+ IWorkspaceRoot root = workspace.getRoot();
+ IProject project = root.getProject("Pin");
+ //IProject[] project = root.getProjects();
+ IContainer container = project;
+ System.out.println(project.getFullPath().toOSString());
+ IFile file = container.getFile(new Path("hoge.txt"));
+ String string = "hugo";
+ InputStream is = new ByteArrayInputStream(string.getBytes());
+ try {
+ file.create(is, false, null);
+ } catch (CoreException e1) {
+ e1.printStackTrace();
+ }
+// if(!project.exists()) {
+// try {
+// System.out.println("afro");
+// project.create(null);
+// } catch (CoreException e) {
+// e.printStackTrace();
+// }
+// }
+
+ //org.eclipse.ui.part.FileEditorInput();
+
+ //File file = new File("/Users/j02054/Desktop/SessionManager/sessionmanager.sh");
+
//System.out.println(editorinput.getName());
//ComboSample1 combo = new ComboSample1(display);
//combo.addText();
//combo.open();
+ //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();