"options.editor.indentOnEnter"));
"options.editing.indentOnEnter"));
	public BufferOptions(View view)	{		super(view,jEdit.getProperty("buffer-options.title"),true);		this.view = view;		this.buffer = view.getBuffer();		JPanel content = new JPanel(new BorderLayout());		content.setBorder(new EmptyBorder(12,12,12,12));		setContentPane(content);		ActionHandler actionListener = new ActionHandler();		JPanel panel = new JPanel();		GridBagLayout layout = new GridBagLayout();		panel.setLayout(layout);		Insets nullInsets = new Insets(0,0,0,0);		Insets labelInsets = new Insets(0,0,0,12);		GridBagConstraints cons = new GridBagConstraints();		cons.gridx = cons.gridy = 0;		cons.gridwidth = cons.gridheight = 1;		cons.fill = GridBagConstraints.BOTH;		cons.weightx = 0.0f;		cons.insets = labelInsets;		// Edit mode		cons.gridx = 0;		cons.weightx = 0.0f;		cons.insets = labelInsets;		JLabel label = new JLabel(jEdit.getProperty(			"buffer-options.mode"),SwingConstants.RIGHT);		layout.setConstraints(label,cons);		panel.add(label);		cons.gridx = 1;		cons.weightx = 1.0f;		cons.insets = nullInsets;		modes = jEdit.getModes();		String bufferMode = buffer.getMode().getName();		int index = 0;		String[] modeNames = new String[modes.length];		for(int i = 0; i < modes.length; i++)		{			Mode mode = modes[i];			modeNames[i] = mode.getName();			if(bufferMode.equals(mode.getName()))				index = i;		}		mode = new JComboBox(modeNames);		mode.setSelectedIndex(index);		mode.addActionListener(actionListener);		layout.setConstraints(mode,cons);		panel.add(mode);		// Tab size		cons.gridx = 0;		cons.gridy = 1;		cons.weightx = 0.0f;		cons.insets = labelInsets;		label = new JLabel(jEdit.getProperty(			"options.editor.tabSize"),SwingConstants.RIGHT);		layout.setConstraints(label,cons);		panel.add(label);		cons.gridx = 1;		cons.weightx = 1.0f;		cons.insets = nullInsets;		String[] tabSizes = { "2", "4", "8" };		tabSize = new JComboBox(tabSizes);		tabSize.setEditable(true);		tabSize.setSelectedItem(buffer.getProperty("tabSize"));		tabSize.addActionListener(actionListener);		layout.setConstraints(tabSize,cons);		panel.add(tabSize);		// Indent size		cons.gridx = 0;		cons.gridy = 2;		cons.weightx = 0.0f;		cons.insets = labelInsets;		label = new JLabel(jEdit.getProperty(			"options.editor.indentSize"),SwingConstants.RIGHT);		layout.setConstraints(label,cons);		panel.add(label);		cons.gridx = 1;		cons.weightx = 1.0f;		cons.insets = nullInsets;		indentSize = new JComboBox(tabSizes);		indentSize.setEditable(true);		indentSize.setSelectedItem(buffer.getProperty("indentSize"));		indentSize.addActionListener(actionListener);		layout.setConstraints(indentSize,cons);		panel.add(indentSize);		// Max line length		cons.gridx = 0;		cons.gridy = 3;		cons.weightx = 0.0f;		cons.insets = labelInsets;		label = new JLabel(jEdit.getProperty(			"options.editor.maxLineLen"),SwingConstants.RIGHT);		layout.setConstraints(label,cons);		panel.add(label);		String[] lineLengths = { "72", "76", "80" };		cons.gridx = 1;		cons.weightx = 1.0f;		cons.insets = nullInsets;		maxLineLen = new JComboBox(lineLengths);		maxLineLen.setEditable(true);		maxLineLen.setSelectedItem(buffer.getProperty("maxLineLen"));		maxLineLen.addActionListener(actionListener);		layout.setConstraints(maxLineLen,cons);		panel.add(maxLineLen);		// Line separator		cons.gridx = 0;		cons.gridy = 4;		cons.weightx = 0.0f;		cons.insets = labelInsets;		label = new JLabel(jEdit.getProperty("buffer-options.lineSeparator"),			SwingConstants.RIGHT);		layout.setConstraints(label,cons);		panel.add(label);		cons.gridx = 1;		cons.weightx = 1.0f;		cons.insets = nullInsets;		String[] lineSeps = { jEdit.getProperty("lineSep.unix"),			jEdit.getProperty("lineSep.windows"),			jEdit.getProperty("lineSep.mac") };		lineSeparator = new JComboBox(lineSeps);		String lineSep = (String)buffer.getProperty(Buffer.LINESEP);		if(lineSep == null)			lineSep = System.getProperty("line.separator");		if("\n".equals(lineSep))			lineSeparator.setSelectedIndex(0);		else if("\r\n".equals(lineSep))			lineSeparator.setSelectedIndex(1);		else if("\r".equals(lineSep))			lineSeparator.setSelectedIndex(2);		lineSeparator.addActionListener(actionListener);		layout.setConstraints(lineSeparator,cons);		panel.add(lineSeparator);		// Syntax highlighting		cons.gridx = 0;		cons.gridy = 5;		cons.weightx = 0.0f;		cons.gridwidth = cons.REMAINDER;		cons.fill = GridBagConstraints.NONE;		cons.anchor = GridBagConstraints.WEST;		syntax = new JCheckBox(jEdit.getProperty(			"options.editor.syntax"));		syntax.setSelected(buffer.getBooleanProperty("syntax"));		syntax.addActionListener(actionListener);		layout.setConstraints(syntax,cons);		panel.add(syntax);		// Indent on tab		cons.gridy = 6;		indentOnTab = new JCheckBox(jEdit.getProperty(			"options.editor.indentOnTab"));		indentOnTab.setSelected(buffer.getBooleanProperty("indentOnTab"));		indentOnTab.addActionListener(actionListener);		layout.setConstraints(indentOnTab,cons);		panel.add(indentOnTab);		// Indent on enter		cons.gridy = 7;		indentOnEnter = new JCheckBox(jEdit.getProperty(			"options.editor.indentOnEnter"));		indentOnEnter.setSelected(buffer.getBooleanProperty("indentOnEnter"));		indentOnEnter.addActionListener(actionListener);		layout.setConstraints(indentOnEnter,cons);		panel.add(indentOnEnter);		// Soft tabs		cons.gridy = 8;		noTabs = new JCheckBox(jEdit.getProperty(			"options.editor.noTabs"));		noTabs.setSelected(buffer.getBooleanProperty("noTabs"));		noTabs.addActionListener(actionListener);		layout.setConstraints(noTabs,cons);		panel.add(noTabs);		// Props label		cons.gridy = 9;		cons.insets = new Insets(6,0,6,0);		label = new JLabel(jEdit.getProperty("buffer-options.props"));		layout.setConstraints(label,cons);		panel.add(label);		content.add(BorderLayout.NORTH,panel);		props = new JTextArea(4,4);		props.setLineWrap(true);		props.setWrapStyleWord(false);		content.add(BorderLayout.CENTER,new JScrollPane(props));		updatePropsField();		panel = new JPanel();		panel.setLayout(new BoxLayout(panel,BoxLayout.X_AXIS));		panel.setBorder(new EmptyBorder(12,0,0,0));		panel.add(Box.createGlue());		ok = new JButton(jEdit.getProperty("common.ok"));		ok.addActionListener(actionListener);		getRootPane().setDefaultButton(ok);		panel.add(ok);		panel.add(Box.createHorizontalStrut(6));		cancel = new JButton(jEdit.getProperty("common.cancel"));		cancel.addActionListener(actionListener);		panel.add(cancel);		panel.add(Box.createGlue());		content.add(BorderLayout.SOUTH,panel);		pack();		setLocationRelativeTo(view);		show();	}