Composite pathsSection = createSection(_toolkit, _parent, "Java Destination Paths", "These paths specify where generated Java files will be written and are project-relative.", 1, 3);
Composite pathsSection = createSection(_toolkit, _parent, "Destination Paths", "These paths specify where generated files will be written and are project-relative.", 1, 3);
  protected void createPathsSection(FormToolkit _toolkit, Composite _parent) {    FileEditorInput editorInput = (FileEditorInput) getEditorInput();    IFile eogenFile = editorInput.getFile();    final IProject project = eogenFile.getProject();    Composite pathsSection = createSection(_toolkit, _parent, "Java Destination Paths", "These paths specify where generated Java files will be written and are project-relative.", 1, 3);    GridLayout pathsSectionLayout = (GridLayout) pathsSection.getLayout();    pathsSectionLayout.horizontalSpacing = 10;    myDestinationEntry = new FormEntry(pathsSection, _toolkit, "Destination", "Browse...", false);    myDestinationEntry.setValue(myModel.getDestination());    myDestinationEntry.setFormEntryListener(new EOFormEntryAdapter() {      public void textValueChanged(FormEntry _entry) {        myModel.setDestination(_entry.getValue());        getEditor().editorDirtyStateChanged();      }      public void textDirty(FormEntry _entry) {        myModel.setDestination(_entry.getText().getText());        getEditor().editorDirtyStateChanged();      }      public void browseButtonSelected(FormEntry _entry) {        ContainerSelectionDialog containerDialog = new ContainerSelectionDialog(getEditorSite().getShell(), project, false, "Select the folder to write autogenerated Java files into.");        containerDialog.open();        Object[] selectedContainers = containerDialog.getResult();        if (selectedContainers != null && selectedContainers.length > 0) {          IPath selectedPath = (IPath) selectedContainers[0];          IFolder selectedFolder = project.getParent().getFolder(selectedPath);          IPath projectRelativePath = selectedFolder.getProjectRelativePath();          _entry.setValue(projectRelativePath.toPortableString());        }        _entry.getText().forceFocus();      }    });    mySubclassDestinationEntry = new FormEntry(pathsSection, _toolkit, "Subclass Destination", "Browse...", false);    mySubclassDestinationEntry.setValue(myModel.getSubclassDestination());    mySubclassDestinationEntry.setFormEntryListener(new EOFormEntryAdapter() {      public void textValueChanged(FormEntry _entry) {        myModel.setSubclassDestination(_entry.getValue());        getEditor().editorDirtyStateChanged();      }      public void textDirty(FormEntry _entry) {        myModel.setSubclassDestination(_entry.getText().getText());        getEditor().editorDirtyStateChanged();      }      public void browseButtonSelected(FormEntry _entry) {        ContainerSelectionDialog containerDialog = new ContainerSelectionDialog(getEditorSite().getShell(), project, false, "Select the folder to generate customizable Java files into.");        containerDialog.open();        Object[] selectedContainers = containerDialog.getResult();        if (selectedContainers != null && selectedContainers.length > 0) {          IPath selectedPath = (IPath) selectedContainers[0];          IFolder selectedFolder = project.getParent().getFolder(selectedPath);          IPath projectRelativePath = selectedFolder.getProjectRelativePath();          _entry.setValue(projectRelativePath.toPortableString());        }        _entry.getText().forceFocus();      }    });    Composite templatesSection = createSection(_toolkit, _parent, "Templates", "These paths specify the templates that will be used to generate Java files.  If left blank, the defaults from the EOGenerator preference page will be used.", 1, 3);    GridLayout templatesSectionLayout = (GridLayout) templatesSection.getLayout();    templatesSectionLayout.horizontalSpacing = 10;    myTemplatesFolderEntry = new FormEntry(templatesSection, _toolkit, "Templates Folder", "Browse...", false);    myTemplatesFolderEntry.setValue(myModel.getTemplateDir(null));    myTemplatesFolderEntry.setFormEntryListener(new EOFormEntryAdapter() {      public void textValueChanged(FormEntry _entry) {        myModel.setTemplateDir(_entry.getValue());        getEditor().editorDirtyStateChanged();      }      public void textDirty(FormEntry _entry) {        myModel.setTemplateDir(_entry.getText().getText());        getEditor().editorDirtyStateChanged();      }      public void browseButtonSelected(FormEntry _entry) {        DirectoryDialog directoryDialog = new DirectoryDialog(getEditorSite().getShell());        directoryDialog.setMessage("Select the folder that contains your EOGenerator templates.");        directoryDialog.setFilterPath(_entry.getValue());        String selectedDirectory = directoryDialog.open();        if (selectedDirectory != null) {          _entry.setValue(selectedDirectory);        }        _entry.getText().forceFocus();      }    });    myTemplateEntry = new FormEntry(templatesSection, _toolkit, "Template", "Browse...", false);    myTemplateEntry.setValue(myModel.getJavaTemplate(null));    myTemplateEntry.setFormEntryListener(new EOFormEntryAdapter() {      public void textValueChanged(FormEntry _entry) {        myModel.setJavaTemplate(_entry.getValue());        getEditor().editorDirtyStateChanged();      }      public void textDirty(FormEntry _entry) {        myModel.setJavaTemplate(_entry.getText().getText());        getEditor().editorDirtyStateChanged();      }      public void browseButtonSelected(FormEntry _entry) {        EOGeneratorFormPage.this.selectTemplate("Select the superclass template.", _entry);        _entry.getText().forceFocus();      }    });    mySubclassTemplateEntry = new FormEntry(templatesSection, _toolkit, "Subclass Template", "Browse...", false);    mySubclassTemplateEntry.setValue(myModel.getSubclassJavaTemplate(null));    mySubclassTemplateEntry.setFormEntryListener(new EOFormEntryAdapter() {      public void textValueChanged(FormEntry _entry) {        myModel.setSubclassJavaTemplate(_entry.getValue());        getEditor().editorDirtyStateChanged();      }      public void textDirty(FormEntry _entry) {        myModel.setSubclassJavaTemplate(_entry.getText().getText());        getEditor().editorDirtyStateChanged();      }      public void browseButtonSelected(FormEntry _entry) {        EOGeneratorFormPage.this.selectTemplate("Select the subclass template.", _entry);        _entry.getText().forceFocus();      }    });  }