Example usage for org.eclipse.jface.preference StringFieldEditor getLabelText

List of usage examples for org.eclipse.jface.preference StringFieldEditor getLabelText

Introduction

In this page you can find the example usage for org.eclipse.jface.preference StringFieldEditor getLabelText.

Prototype

public String getLabelText() 

Source Link

Document

Returns this field editor's label text.

Usage

From source file:com.siemens.ct.mp3m.ui.editors.id3.Id3TagPage.java

License:Open Source License

private void writeFieldsToTag() {
    for (StringFieldEditor stringEditor : fieldEditors) {
        if (stringEditor.getLabelText().equals(Messages.getString("Id3TagPage.Title_Label") + ":")) { //$NON-NLS-1$ //$NON-NLS-2$
            id3TagInfo.setTitle(stringEditor.getStringValue());
        } else if (stringEditor.getLabelText().equals(Messages.getString("Id3TagPage.Album_Label") + ":")) { //$NON-NLS-1$ //$NON-NLS-2$
            id3TagInfo.setAlbum(stringEditor.getStringValue());
        } else if (stringEditor.getLabelText().equals(Messages.getString("Id3TagPage.Artist_Label") + ":")) { //$NON-NLS-1$ //$NON-NLS-2$
            id3TagInfo.setArtist(stringEditor.getStringValue());
        } else if (stringEditor.getLabelText().equals(Messages.getString("Id3TagPage.Track_Label") + ":")) { //$NON-NLS-1$ //$NON-NLS-2$
            id3TagInfo.setTrack(stringEditor.getStringValue());
        } else if (stringEditor.getLabelText().equals(Messages.getString("Id3TagPage.Year_Label") + ":")) { //$NON-NLS-1$ //$NON-NLS-2$
            id3TagInfo.setYear(stringEditor.getStringValue());
        } else if (stringEditor.getLabelText().equals(Messages.getString("Id3TagPage.Comment_Label") + ":")) { //$NON-NLS-1$ //$NON-NLS-2$
            id3TagInfo.setComment(stringEditor.getStringValue());
        } else if (stringEditor.getLabelText().equals(Messages.getString("Id3TagPage.Genre_Label") + ":")) { //$NON-NLS-1$ //$NON-NLS-2$
            id3TagInfo.setGenre(stringEditor.getStringValue());
        }/*from   w ww .  ja  v a  2  s .c  om*/
    }
}

From source file:org.ebix.umm.uml2text.preferences.UmmStereotypeProjectPropertiesPage.java

License:Open Source License

@Override
public boolean performOk() {
    try {/*from w  ww  .  ja v  a  2 s . c  o  m*/
        IAdaptable _element = this.getElement();
        final IProject project = ((IProject) _element);
        InputOutput.<String>println(("in performOk of " + project));
        final ProjectScope projectScope = new ProjectScope(project);
        final IEclipsePreferences projectNode = projectScope.getNode("org.ebix.umm.uml2text");
        boolean _notEquals = (!Objects.equal(projectNode, null));
        if (_notEquals) {
            Collection<StringFieldEditor> _values = this.editors.values();
            for (final StringFieldEditor st_editor : _values) {
                String _labelText = st_editor.getLabelText();
                String _stringValue = st_editor.getStringValue();
                projectNode.put(_labelText, _stringValue);
            }
            projectNode.flush();
        }
        return true;
    } catch (Throwable _e) {
        throw Exceptions.sneakyThrow(_e);
    }
}