Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » How to get full path of opened file in editor
How to get full path of opened file in editor [message #572709] Wed, 09 July 2008 12:47
Jeroen Lankheet is currently offline Jeroen LankheetFriend
Messages: 31
Registered: July 2009
Member
I'm running an RCP app with two plugins. I want to start the second
plugin with a parameter, which is the file name (full path) of the
currently opened file in the editor of the first plugin.
So I have an action defined and get the filename from the active editor.
Problem is that I need the full path. I only get the short file name.

public final class SimulatorAction implements
IWorkbenchWindowActionDelegate {
private IWorkbenchWindow m_window;

public void run(IAction action) {
SimulatorGui gui = new SimulatorGui();
String fName =
m_window.getActivePage().getActiveEditor().getEditorInput(). getName();
// Start the GUI
}

public void init(IWorkbenchWindow window) {
m_window = window;
}
}

Help is appreciated.
JL
Previous Topic:How do I write to the console from a plug-in?
Next Topic:How to get full path of opened file in editor
Goto Forum:
  


Current Time: Sat Sep 21 07:50:29 GMT 2024

Powered by FUDForum. Page generated in 0.03666 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top