This is an automated email from the ASF dual-hosted git repository. lkishalmi pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-netbeans.git
The following commit(s) were added to refs/heads/master by this push: new a50d777 Ensuring important DTDs are used locally when running java.completion… (#1206) a50d777 is described below commit a50d777343e1ee0f9248344d4b17f779d1e78adf Author: Jan Lahoda <lah...@gmail.com> AuthorDate: Sat Apr 20 20:34:14 2019 +0200 Ensuring important DTDs are used locally when running java.completion… (#1206) * Ensuring important DTDs are used locally when running java.completion tests. * Removing debug output. --- .../modules/java/completion/CompletionTestBase.java | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/java/java.completion/test/unit/src/org/netbeans/modules/java/completion/CompletionTestBase.java b/java/java.completion/test/unit/src/org/netbeans/modules/java/completion/CompletionTestBase.java index 9ba6021..744b831 100644 --- a/java/java.completion/test/unit/src/org/netbeans/modules/java/completion/CompletionTestBase.java +++ b/java/java.completion/test/unit/src/org/netbeans/modules/java/completion/CompletionTestBase.java @@ -45,6 +45,10 @@ import org.openide.cookies.EditorCookie; import org.openide.filesystems.FileObject; import org.openide.filesystems.FileUtil; import org.openide.loaders.DataObject; +import org.openide.util.lookup.ServiceProvider; +import org.openide.xml.EntityCatalog; +import org.xml.sax.InputSource; +import org.xml.sax.SAXException; /** * @@ -710,4 +714,20 @@ public class CompletionTestBase extends CompletionTestBaseBase { return text1.length() - text2.length(); } } + + @ServiceProvider(service=EntityCatalog.class) + public static final class TestEntityCatalogImpl extends EntityCatalog { + + @Override + public InputSource resolveEntity(String publicID, String systemID) throws SAXException, IOException { + switch (publicID) { + case "-//NetBeans//DTD Editor KeyBindings settings 1.1//EN": + return new InputSource(TestEntityCatalogImpl.class.getResourceAsStream("/org/netbeans/modules/editor/settings/storage/keybindings/EditorKeyBindings-1_1.dtd")); + case "-//NetBeans//DTD Editor Preferences 1.0//EN": + return new InputSource(TestEntityCatalogImpl.class.getResourceAsStream("/org/netbeans/modules/editor/settings/storage/preferences/EditorPreferences-1_0.dtd")); + } + return null; + } + + } } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists