Merge remote-tracking branch 'origin/master'

This commit is contained in:
Kirill Likhodedov
2011-11-15 17:26:38 +03:00
5 changed files with 8 additions and 6 deletions
Binary file not shown.
Binary file not shown.
@@ -90,7 +90,7 @@ public class CreateNSDeclarationIntentionFix implements HintAction, LocalQuickFi
public CreateNSDeclarationIntentionFix(final PsiElement element,
final String namespacePrefix,
final XmlToken token,
@Nullable final XmlToken token,
XmlFile containingFile) {
myNamespacePrefix = namespacePrefix;
myElement = element;
@@ -151,10 +151,12 @@ public class CreateNSDeclarationIntentionFix implements HintAction, LocalQuickFi
return;
} else {
prefix = ExtendedTagInsertHandler.suggestPrefix(xmlFile, namespace);
if (StringUtil.isNotEmpty(prefix)) {
ExtendedTagInsertHandler.qualifyWithPrefix(prefix, myElement);
PsiDocumentManager.getInstance(project).doPostponedOperationsAndUnblockDocument(editor.getDocument());
if (StringUtil.isEmpty(prefix)) {
HintManager.getInstance().showInformationHint(editor, "Namespace not found");
return;
}
ExtendedTagInsertHandler.qualifyWithPrefix(prefix, myElement);
PsiDocumentManager.getInstance(project).doPostponedOperationsAndUnblockDocument(editor.getDocument());
}
}
final int offset = editor.getCaretModel().getOffset();
@@ -56,7 +56,7 @@ public class XmlElementFactoryImpl extends XmlElementFactory {
}
@NotNull
public XmlAttribute createXmlAttribute(@NotNull String name, String value) throws IncorrectOperationException {
public XmlAttribute createXmlAttribute(@NotNull String name, @NotNull String value) throws IncorrectOperationException {
final char quoteChar;
if (!value.contains("\"")) {
quoteChar = '"';
@@ -86,5 +86,5 @@ public abstract class XmlElementFactory {
* @throws IncorrectOperationException if either <code>name</code> or <code>value</code> are not valid.
*/
@NotNull
public abstract XmlAttribute createXmlAttribute(@NotNull @NonNls String name, String value) throws IncorrectOperationException;
public abstract XmlAttribute createXmlAttribute(@NotNull @NonNls String name, @NotNull String value) throws IncorrectOperationException;
}