path = MiscUtilities.getFileParent(path);
path = MiscUtilities.getParentOfPath(path);
	public VFSFileChooserDialog(View view, String path,		int mode, boolean multipleSelection)	{		super(view,jEdit.getProperty("vfs.browser.title"),true);		JPanel content = new JPanel(new BorderLayout());		content.setBorder(new EmptyBorder(12,12,12,12));		setContentPane(content);		String name;		if(path == null || path.endsWith(File.separator) || path.endsWith("/"))			name = null;		else		{			name = MiscUtilities.getFileName(path);			path = MiscUtilities.getFileParent(path);		}		browser = new VFSBrowser(view,path,mode,multipleSelection);		browser.addBrowserListener(new BrowserHandler());		content.add(BorderLayout.CENTER,browser);		JPanel panel = new JPanel();		panel.setLayout(new BoxLayout(panel,BoxLayout.X_AXIS));		panel.setBorder(new EmptyBorder(12,0,0,0));		if(mode == VFSBrowser.SAVE_DIALOG)		{			panel.add(new JLabel(jEdit.getProperty("vfs.browser.dialog.filename")));			panel.add(Box.createHorizontalStrut(12));			filenameField = new JTextField(20);			filenameField.setText(name);			Dimension dim = filenameField.getPreferredSize();			dim.width = Integer.MAX_VALUE;			filenameField.setMaximumSize(dim);			Box box = new Box(BoxLayout.Y_AXIS);			box.add(Box.createGlue());			box.add(filenameField);			box.add(Box.createGlue());			panel.add(box);			GUIUtilities.requestFocus(this,filenameField);			panel.add(Box.createHorizontalStrut(12));		}		else			panel.add(Box.createGlue());		ok = new JButton(jEdit.getProperty("vfs.browser.dialog."			+ (mode == VFSBrowser.OPEN_DIALOG ? "open" : "save")));		ok.addActionListener(new ActionHandler());		getRootPane().setDefaultButton(ok);		panel.add(ok);		panel.add(Box.createHorizontalStrut(6));		cancel = new JButton(jEdit.getProperty("common.cancel"));		cancel.addActionListener(new ActionHandler());		panel.add(cancel);		if(mode != VFSBrowser.SAVE_DIALOG)			panel.add(Box.createGlue());		content.add(BorderLayout.SOUTH,panel);		setDefaultCloseOperation(DISPOSE_ON_CLOSE);		pack();		GUIUtilities.loadGeometry(this,"vfs.browser.dialog."			+ (mode == VFSBrowser.OPEN_DIALOG ? "open" : "save"));		show();	}