/*
Simple, trim and make it lowercase
(non-Javadoc)
@see ubic.pubmedgate.resolve.mentionEditors.MentionEditor#editMention(java.lang.String)
546125
public Set<String> editMention( String mention ) {
        Set<String> result = new HashSet<String>();
        result.add( mention.trim().toLowerCase() );
        return result;
    }
529103
public String edit() {
    Entity<?> entity = getEntity();
    put(getShortName(), entity);
    editSetting(entity);
    return forward();
  }
866147
public Set<String> editMention(String mention) {
        Set<String> result = new HashSet<String>();

        // tokenize
        StringTokenizer tokens = new StringTokenizer(mention, delims, false);
        List<String> tokenList = new LinkedList<String>();
        if (tokens.countTokens() < 3)
            return result;
        while (tokens.hasMoreTokens()) {
            tokenList.add(tokens.nextToken());
        }
        String first = tokenList.get(0);
        String second = tokenList.get(1);
        String third = tokenList.get(2);
        if (second.equals("and") || second.equals("or") || second.equals("to")) {
            if (directions.contains(first) && directions.contains(third)) {
                // log.info( first + " " + second + " " + third + " Full:" + s
                // );
                int spot = mention.indexOf(third) + third.length();
                result.add(first + mention.substring(spot));
                result.add(third + mention.substring(spot));
            }
        }
        return result;
    }
514988
private void setEditorUri(String uri) {

        if (CmsStringUtil.isEmptyOrWhitespaceOnly(uri)) {
            setValidConfiguration(false);
            LOG.error(Messages.get().getBundle().key(Messages.LOG_EDITOR_CONFIG_NO_URI_0));
        }
        m_editorUri = uri;
    }
489428
@Override
    public void addComment(XmlElement xmlElement) {
        xmlElement.addElement(new TextElement("<!--"));
        StringBuilder sb = new StringBuilder();
        sb.append("  WARNING - ");
        sb.append(MergeConstants.NEW_ELEMENT_TAG);
        xmlElement.addElement(new TextElement(sb.toString()));
        xmlElement.addElement(new TextElement("-->"));
    }
183089
public void remove(@NonNull String key) {
    Preconditions.checkNotNull(key, KEY_IS_NULL);
    if (!contains(key)) {
      return;
    }

    editor.remove(key).apply();
  }
234123
public void setEditingState(String state) {
		if ("idle".equalsIgnoreCase(state)) {
			delegate.setEditingState(GeometryEditState.IDLE);
		} else if ("dragging".equalsIgnoreCase(state)) {
			delegate.setEditingState(GeometryEditState.DRAGGING);
		} else if ("inserting".equalsIgnoreCase(state)) {
			delegate.setEditingState(GeometryEditState.INSERTING);
		}
	}
758278
public static String trim(String xml) {
        String content = removeDeclaration(xml);
        return trimElements(content);
    }
1025198
private void buttonEditLineActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonEditLineActionPerformed
    this.tableExtensions.editCellAt(this.tableExtensions.getSelectedRow(), 0);
  }
1090250
@Override
	public void setDescription(String description, java.util.Locale locale) {
		_cpSpecificationOption.setDescription(description, locale);
	}
551827
function getNestedEditableIn( editablesContainer, remainingEditables ) {
		if ( remainingEditables == null )
			remainingEditables = findNestedEditables( editablesContainer );

		var editable;

		while ( ( editable = remainingEditables.shift() ) ) {
			if ( isIterableEditable( editable ) )
				return { element: editable, remaining: remainingEditables };
		}

		return null;
	}
281001
@Trivial
    public static String trim(String original) {
        if (original == null) {
            return null;
        }
        String result = original.trim();
        if (result.isEmpty()) {
            return null;
        }
        return result;
    }
455938
public void addPreEditorConditionDefinition(I_CmsPreEditorActionDefinition preEditorCondition) {

        m_preEditorConditionDefinitions.add(preEditorCondition);
        if (CmsLog.INIT.isInfoEnabled()) {
            CmsLog.INIT.info(
                Messages.get().getBundle().key(
                    Messages.INIT_EDITOR_PRE_ACTION_2,
                    preEditorCondition.getClass().getName(),
                    preEditorCondition.getResourceTypeName()));
        }
    }
855876
function(editor) {
			if (!this.insertLineBreakOnlyAction(editor)) {
				var curPadding = editorUtils.getCurrentLinePadding(editor);
				var content = String(editor.getContent());
				var caretPos = editor.getCaretPos();
				var len = content.length;
				var nl = '\n';
					
				// check out next line padding
				var lineRange = editor.getCurrentLineRange();
				var nextPadding = '';
					
				for (var i = lineRange.end, ch; i < len; i++) {
					ch = content.charAt(i);
					if (ch == ' ' || ch == '\t')
						nextPadding += ch;
					else
						break;
				}
				
				if (nextPadding.length > curPadding.length) {
					editor.replaceContent(nl + nextPadding, caretPos, caretPos, true);
				} else {
					editor.replaceContent(nl, caretPos);
				}
			}
			
			return true;
		}
389415
public void setEditable(final int row, final int col, final boolean enable) {
		final int actualIndex = getTableColumn(col).getIndex();
		getRecord(row).setColumnEnabled(actualIndex, enable);
	}
122229
public void editable(boolean isEditable) throws JspException {

        if (isEditable) {
            CmsJspTagEditable.editableTagAction(getJspContext(), null, CmsDirectEditMode.AUTO, null);
        }
    }
1090876
function isSupportedElement( element, mode ) {
		if ( mode == CKEDITOR.ELEMENT_MODE_INLINE )
			return element.is( CKEDITOR.dtd.$editable ) || element.is( 'textarea' );
		else if ( mode == CKEDITOR.ELEMENT_MODE_REPLACE )
			return !element.is( CKEDITOR.dtd.$nonBodyContent );
		return 1;
	}