Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Add save R session button
in the R console toolbar
- Loading branch information
Valentin Georgiev
committed
Mar 16, 2012
1 parent
e26fade
commit bc61741
Showing
2 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
plugins/net.bioclipse.r.ui/src/net/bioclipse/r/ui/views/saveRSession.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package net.bioclipse.r.ui.views; | ||
|
||
import org.eclipse.jface.action.IAction; | ||
import org.eclipse.jface.viewers.ISelection; | ||
import org.eclipse.ui.IViewActionDelegate; | ||
import org.eclipse.ui.IViewPart; | ||
import org.eclipse.ui.PlatformUI; | ||
|
||
public class saveRSession implements IViewActionDelegate{ | ||
|
||
@Override | ||
public void run(IAction action) { | ||
RConsoleView rView = (RConsoleView) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView("net.bioclipse.r.ui.views.RConsoleView"); | ||
rView.executeCommand("save.image(\".RData\")"); | ||
} | ||
|
||
@Override | ||
public void selectionChanged(IAction action, ISelection selection) { | ||
// TODO Auto-generated method stub | ||
|
||
} | ||
|
||
@Override | ||
public void init(IViewPart view) { | ||
// TODO Auto-generated method stub | ||
|
||
} | ||
|
||
} |