Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » How do I accessing the Project Name for the current editing file
How do I accessing the Project Name for the current editing file [message #100739] Sun, 27 July 2003 01:30 Go to next message
Eclipse UserFriend
Originally posted by: wingzx3.hotmail.com

I would like to access the current project name for the file I'm currently
editing. I can't seem to find a way to access it programmically.

If anyone one can help it'll be a life saver, thnx.
Re: How do I accessing the Project Name for the current editing file [message #100901 is a reply to message #100739] Sun, 27 July 2003 12:01 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse.mkrishna.com

IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();

IProject project = root.getProject( namePage.getProjectName());

IProjectDescription description = ResourcesPlugin.getWorkspace()
.newProjectDescription( project.getName());


-- Kri$hn@
------------------------------------------------------------ --------------
Per-Inbox: newsgroup@mkrishna.com Bus-Inbox: mk3146@sbc.com
------------------------------------------------------------ --------------
Note: If it's green, it's biology. If it stinks, it's chemistry. If it has
numbers it's math. If it doesn't work, it's technology.


"Henry" <wingzx3@hotmail.com> wrote in message
news:bfvo1u$d2f$1@eclipse.org...
> I would like to access the current project name for the file I'm currently
> editing. I can't seem to find a way to access it programmically.
>
> If anyone one can help it'll be a life saver, thnx.
>
Re: How do I accessing the Project Name for the current editing file [message #102362 is a reply to message #100739] Tue, 29 July 2003 11:01 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.NOSPAM.us.ibm.com

Assuming you are editing a file,

from the IEditorInput given to your editor:

IFile f = ((IFileEditorInput) editorInput).getFile();

IProject p = f.getProject();

p.getName();

Rich
Previous Topic:Using Popmenus (New --> MyFile)
Next Topic:Problems encountered loading the plugin registry
Goto Forum:
  


Current Time: Fri Jul 18 11:48:00 EDT 2025

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

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

Back to the top