Skip to main content



      Home
Home » Newcomers » Newcomers » Path Name in Title Bar
Path Name in Title Bar [message #98968] Thu, 01 September 2005 15:07 Go to next message
Eclipse UserFriend
Originally posted by: lance_rushing.hotmail.com

How can you get the full path of the current file in the editor to appear
in the title bar?

This question has been asked before:
http://dev.eclipse.org/newslists/news.eclipse.tools.cdt/msg0 6646.html

A responder said 'fixed', but didn't elaborate on how it was fixed.

-Lance
Re: Path Name in Title Bar [message #98985 is a reply to message #98968] Thu, 01 September 2005 16:58 Go to previous message
Eclipse UserFriend
Originally posted by: rkozlowski.solucient.com

//I only know how to do it by typing in the file path first

import java.io.*;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;

public class GetPath {

/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
String strFileName;
File newDirectory=new File("C:\\Practice.txt");
strFileName =newDirectory.getPath();
Display display = new Display ();
Shell shell = new Shell(display);
shell.setText(strFileName);
shell.open ();
while (!shell.isDisposed ()) {
if (!display.readAndDispatch ()) display.sleep ();
}
display.dispose ();
}}
Previous Topic:JVM terminated. Exit code=1
Next Topic:Can't start eclipse 3.1
Goto Forum:
  


Current Time: Fri Jul 18 22:56:07 EDT 2025

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

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

Back to the top