List of usage examples for org.eclipse.jface.preference ListEditor loadDefault
public void loadDefault()
From source file:com.codenvy.eclipse.ui.preferences.CodenvyPreferencesPage.java
License:Open Source License
@Override protected void createFieldEditors() { final Composite parent = getFieldEditorParent(); final ListEditor locations = new ListEditor(REMOTE_REPOSITORIES_LOCATION_KEY_NAME, "Remote repositories locations:", parent) { @Override//from w w w . j a v a 2 s . c o m protected String getNewInputObject() { // Give the user an input dialog to enter its new location final InputDialog dialog = new InputDialog(getShell(), "Add a remote Codenvy repository location", "Enter the URL of the repository", null, new CodenvyRepositoryValidator()); if (dialog.open() != Window.OK) { return null; } final String newRepositoryLocation = dialog.getValue(); if (StringHelper.isNullOrEmpty(newRepositoryLocation)) { return null; } return newRepositoryLocation; } @Override protected String[] parseString(String stringList) { return CodenvyPreferencesInitializer.parseString(stringList); } @Override protected String createList(String[] items) { return CodenvyPreferencesInitializer.createList(items); } }; locations.loadDefault(); addField(locations); }