mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
Binary file not shown.
Binary file not shown.
+6
-4
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user