mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[i18n] html quick doc
GitOrigin-RevId: 39c74d93b1e2b787bfd5f3d93951fde3560804cb
This commit is contained in:
committed by
intellij-monorepo-bot
parent
8eac59d6a2
commit
c40aea3728
@@ -6,6 +6,7 @@ import com.intellij.openapi.extensions.ExtensionPointName;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.vfs.VfsUtil;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.net.URL;
|
||||
@@ -26,7 +27,7 @@ public interface JsonSchemaProviderFactory {
|
||||
* See {@link Class#getResource(String)} for more details
|
||||
* @return VirtualFile instance, or null if not found
|
||||
*/
|
||||
static VirtualFile getResourceFile(@NotNull Class baseClass, @NotNull String resourcePath) {
|
||||
static VirtualFile getResourceFile(@NotNull Class baseClass, @NonNls @NotNull String resourcePath) {
|
||||
URL url = baseClass.getResource(resourcePath);
|
||||
if (url == null) {
|
||||
LOG.error("Cannot find resource " + resourcePath);
|
||||
|
||||
@@ -14,6 +14,7 @@ import com.intellij.openapi.editor.markup.TextAttributes;
|
||||
import com.intellij.openapi.progress.ProcessCanceledException;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.Comparing;
|
||||
import com.intellij.openapi.util.NlsSafe;
|
||||
import com.intellij.psi.PsiDocumentManager;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.intellij.psi.PsiFile;
|
||||
@@ -401,18 +402,19 @@ public final class HTMLTextPainter {
|
||||
* @return the HTML fragment in {@code pre}-tag container
|
||||
*/
|
||||
@NotNull
|
||||
@NlsSafe
|
||||
public static String convertCodeFragmentToHTMLFragmentWithInlineStyles(@NotNull PsiElement context, @NotNull String codeFragment) {
|
||||
try {
|
||||
StringWriter writer = new StringWriter();
|
||||
new HTMLTextPainter(context, codeFragment).paint(null, writer, false);
|
||||
return writer.toString();
|
||||
return writer.toString(); //NON-NLS
|
||||
}
|
||||
catch (ProcessCanceledException cancel) {
|
||||
throw cancel;
|
||||
}
|
||||
catch (Throwable e) {
|
||||
LOG.error(e);
|
||||
return String.format("<pre>%s</pre>\n", codeFragment);
|
||||
return String.format("<pre>%s</pre>\n", codeFragment); //NON-NLS
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -253,7 +253,7 @@ public class GeneralCommandLine implements UserDataHolder {
|
||||
return this;
|
||||
}
|
||||
|
||||
public void addParameter(@NotNull @NonNls String parameter) {
|
||||
public void addParameter(@NonNls @NotNull String parameter) {
|
||||
myProgramParams.add(parameter);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user