@Test public void testCopy() { MonacoEditorOptions options = new MonacoEditorOptions(); options.setValue("value1"); options.setWidthPx(100); options.setHeightPx(50); options.setReadOnly(true); options.setAutomaticLayout(true); options.setContextmenu(true); options.setFolding(true); options.setFontSize(12); options.setHideCursorInOverviewRuler(true); options.setLanguage("lang1"); options.setLineDecorationsWidth(5); options.setLineNumbers("off"); options.setLineNumbersMinChars(3); options.setMiniMapEnabled(true); options.setOverviewRulerBorder(true); options.setRenderLineHighlight("off"); options.setRenderWhitespace(true); options.setScrollbarUseShadows(true); options.setScrollBeyondLastLine(true); options.setSnippetSuggestions(true); options.setUseTabStops(true); options.setTheme("theme1"); MonacoEditorOptions options1 = options.copy(); assertEquals("value1", options1.getValue()); assertEquals(100, options.getWidthPx()); assertEquals(50, options.getHeightPx()); assertTrue(options1.isReadOnly()); assertTrue(options1.isAutomaticLayout()); assertTrue(options1.isContextmenu()); assertTrue(options1.isFolding()); assertEquals(12, options.getFontSize()); assertTrue(options1.isHideCursorInOverviewRuler()); assertEquals("lang1", options1.getLanguage()); assertEquals(5, options1.getLineDecorationsWidth()); assertEquals("off", options1.getLineNumbers()); assertEquals(3, options1.getLineNumbersMinChars()); assertTrue(options1.isMiniMapEnabled()); assertTrue(options1.isOverviewRulerBorder()); assertEquals("off", options1.getRenderLineHighlight()); assertTrue(options1.isRenderWhitespace()); assertTrue(options1.isScrollbarUseShadows()); assertTrue(options1.isScrollBeyondLastLine()); assertTrue(options1.isSnippetSuggestions()); assertTrue(options1.isUseTabStops()); assertEquals("theme1", options1.getTheme()); }
public MonacoEditorOptions copy() { MonacoEditorOptions properties = new MonacoEditorOptions(); properties.setLanguage(this.getLanguage()); properties.setValue(this.getValue()); properties.setWidthPx(this.getWidthPx()); properties.setHeightPx(this.getHeightPx()); properties.setRenderLineHighlight(this.getRenderLineHighlight()); properties.setLineNumbers(this.getLineNumbers()); properties.setFontSize(this.getFontSize()); properties.setLineNumbersMinChars(this.getLineNumbersMinChars()); properties.setLineDecorationsWidth(this.getLineDecorationsWidth()); properties.setReadOnly(this.isReadOnly()); properties.setOverviewRulerBorder(this.isOverviewRulerBorder()); properties.setScrollBeyondLastLine(this.isScrollBeyondLastLine()); properties.setSnippetSuggestions(this.isSnippetSuggestions()); properties.setUseTabStops(this.isUseTabStops()); properties.setContextmenu(this.isContextmenu()); properties.setFolding(this.isFolding()); properties.setMiniMapEnabled(this.isMiniMapEnabled()); properties.setScrollbarUseShadows(this.isScrollbarUseShadows()); properties.setAutomaticLayout(this.isAutomaticLayout()); properties.setRenderWhitespace(this.isRenderWhitespace()); properties.setHideCursorInOverviewRuler(this.isHideCursorInOverviewRuler()); properties.setTheme(this.getTheme()); return properties; }
MonacoEditorOptions { public MonacoEditorOptions copy() { MonacoEditorOptions properties = new MonacoEditorOptions(); properties.setLanguage(this.getLanguage()); properties.setValue(this.getValue()); properties.setWidthPx(this.getWidthPx()); properties.setHeightPx(this.getHeightPx()); properties.setRenderLineHighlight(this.getRenderLineHighlight()); properties.setLineNumbers(this.getLineNumbers()); properties.setFontSize(this.getFontSize()); properties.setLineNumbersMinChars(this.getLineNumbersMinChars()); properties.setLineDecorationsWidth(this.getLineDecorationsWidth()); properties.setReadOnly(this.isReadOnly()); properties.setOverviewRulerBorder(this.isOverviewRulerBorder()); properties.setScrollBeyondLastLine(this.isScrollBeyondLastLine()); properties.setSnippetSuggestions(this.isSnippetSuggestions()); properties.setUseTabStops(this.isUseTabStops()); properties.setContextmenu(this.isContextmenu()); properties.setFolding(this.isFolding()); properties.setMiniMapEnabled(this.isMiniMapEnabled()); properties.setScrollbarUseShadows(this.isScrollbarUseShadows()); properties.setAutomaticLayout(this.isAutomaticLayout()); properties.setRenderWhitespace(this.isRenderWhitespace()); properties.setHideCursorInOverviewRuler(this.isHideCursorInOverviewRuler()); properties.setTheme(this.getTheme()); return properties; } }
MonacoEditorOptions { public MonacoEditorOptions copy() { MonacoEditorOptions properties = new MonacoEditorOptions(); properties.setLanguage(this.getLanguage()); properties.setValue(this.getValue()); properties.setWidthPx(this.getWidthPx()); properties.setHeightPx(this.getHeightPx()); properties.setRenderLineHighlight(this.getRenderLineHighlight()); properties.setLineNumbers(this.getLineNumbers()); properties.setFontSize(this.getFontSize()); properties.setLineNumbersMinChars(this.getLineNumbersMinChars()); properties.setLineDecorationsWidth(this.getLineDecorationsWidth()); properties.setReadOnly(this.isReadOnly()); properties.setOverviewRulerBorder(this.isOverviewRulerBorder()); properties.setScrollBeyondLastLine(this.isScrollBeyondLastLine()); properties.setSnippetSuggestions(this.isSnippetSuggestions()); properties.setUseTabStops(this.isUseTabStops()); properties.setContextmenu(this.isContextmenu()); properties.setFolding(this.isFolding()); properties.setMiniMapEnabled(this.isMiniMapEnabled()); properties.setScrollbarUseShadows(this.isScrollbarUseShadows()); properties.setAutomaticLayout(this.isAutomaticLayout()); properties.setRenderWhitespace(this.isRenderWhitespace()); properties.setHideCursorInOverviewRuler(this.isHideCursorInOverviewRuler()); properties.setTheme(this.getTheme()); return properties; }  }
MonacoEditorOptions { public MonacoEditorOptions copy() { MonacoEditorOptions properties = new MonacoEditorOptions(); properties.setLanguage(this.getLanguage()); properties.setValue(this.getValue()); properties.setWidthPx(this.getWidthPx()); properties.setHeightPx(this.getHeightPx()); properties.setRenderLineHighlight(this.getRenderLineHighlight()); properties.setLineNumbers(this.getLineNumbers()); properties.setFontSize(this.getFontSize()); properties.setLineNumbersMinChars(this.getLineNumbersMinChars()); properties.setLineDecorationsWidth(this.getLineDecorationsWidth()); properties.setReadOnly(this.isReadOnly()); properties.setOverviewRulerBorder(this.isOverviewRulerBorder()); properties.setScrollBeyondLastLine(this.isScrollBeyondLastLine()); properties.setSnippetSuggestions(this.isSnippetSuggestions()); properties.setUseTabStops(this.isUseTabStops()); properties.setContextmenu(this.isContextmenu()); properties.setFolding(this.isFolding()); properties.setMiniMapEnabled(this.isMiniMapEnabled()); properties.setScrollbarUseShadows(this.isScrollbarUseShadows()); properties.setAutomaticLayout(this.isAutomaticLayout()); properties.setRenderWhitespace(this.isRenderWhitespace()); properties.setHideCursorInOverviewRuler(this.isHideCursorInOverviewRuler()); properties.setTheme(this.getTheme()); return properties; }  static MonacoEditorOptions buildDefaultOptions(String lang); static JSONObject createDimensions(int widthPx, int heightPx); boolean isReadOnly(); MonacoEditorOptions copy(); int getWidthPx(); MonacoEditorOptions setWidthPx(int widthPx); int getHeightPx(); MonacoEditorOptions setHeightPx(int heightPx); MonacoEditorOptions setReadOnly(boolean readOnly); String getLanguage(); MonacoEditorOptions setLanguage(String language); String getTheme(); MonacoEditorOptions setTheme(String theme); String getValue(); MonacoEditorOptions setValue(String value); String getRenderLineHighlight(); MonacoEditorOptions setRenderLineHighlight(String renderLineHighlight); String getLineNumbers(); MonacoEditorOptions setLineNumbers(String lineNumbers); int getFontSize(); MonacoEditorOptions setFontSize(int fontSize); int getLineNumbersMinChars(); MonacoEditorOptions setLineNumbersMinChars(int lineNumbersMinChars); int getLineDecorationsWidth(); MonacoEditorOptions setLineDecorationsWidth(int lineDecorationsWidth); boolean isOverviewRulerBorder(); MonacoEditorOptions setOverviewRulerBorder(boolean overviewRulerBorder); boolean isScrollBeyondLastLine(); MonacoEditorOptions setScrollBeyondLastLine(boolean scrollBeyondLastLine); boolean isSnippetSuggestions(); MonacoEditorOptions setSnippetSuggestions(boolean snippetSuggestions); boolean isUseTabStops(); MonacoEditorOptions setUseTabStops(boolean useTabStops); boolean isContextmenu(); MonacoEditorOptions setContextmenu(boolean contextmenu); boolean isFolding(); MonacoEditorOptions setFolding(boolean folding); boolean isMiniMapEnabled(); MonacoEditorOptions setMiniMapEnabled(boolean miniMapEnabled); boolean isScrollbarUseShadows(); MonacoEditorOptions setScrollbarUseShadows(boolean scrollbarUseShadows); boolean isAutomaticLayout(); MonacoEditorOptions setAutomaticLayout(boolean automaticLayout); boolean isRenderWhitespace(); MonacoEditorOptions setRenderWhitespace(boolean renderWhitespace); boolean isHideCursorInOverviewRuler(); MonacoEditorOptions setHideCursorInOverviewRuler(boolean hideCursorInOverviewRuler); }
MonacoEditorOptions { public MonacoEditorOptions copy() { MonacoEditorOptions properties = new MonacoEditorOptions(); properties.setLanguage(this.getLanguage()); properties.setValue(this.getValue()); properties.setWidthPx(this.getWidthPx()); properties.setHeightPx(this.getHeightPx()); properties.setRenderLineHighlight(this.getRenderLineHighlight()); properties.setLineNumbers(this.getLineNumbers()); properties.setFontSize(this.getFontSize()); properties.setLineNumbersMinChars(this.getLineNumbersMinChars()); properties.setLineDecorationsWidth(this.getLineDecorationsWidth()); properties.setReadOnly(this.isReadOnly()); properties.setOverviewRulerBorder(this.isOverviewRulerBorder()); properties.setScrollBeyondLastLine(this.isScrollBeyondLastLine()); properties.setSnippetSuggestions(this.isSnippetSuggestions()); properties.setUseTabStops(this.isUseTabStops()); properties.setContextmenu(this.isContextmenu()); properties.setFolding(this.isFolding()); properties.setMiniMapEnabled(this.isMiniMapEnabled()); properties.setScrollbarUseShadows(this.isScrollbarUseShadows()); properties.setAutomaticLayout(this.isAutomaticLayout()); properties.setRenderWhitespace(this.isRenderWhitespace()); properties.setHideCursorInOverviewRuler(this.isHideCursorInOverviewRuler()); properties.setTheme(this.getTheme()); return properties; }  static MonacoEditorOptions buildDefaultOptions(String lang); static JSONObject createDimensions(int widthPx, int heightPx); boolean isReadOnly(); MonacoEditorOptions copy(); int getWidthPx(); MonacoEditorOptions setWidthPx(int widthPx); int getHeightPx(); MonacoEditorOptions setHeightPx(int heightPx); MonacoEditorOptions setReadOnly(boolean readOnly); String getLanguage(); MonacoEditorOptions setLanguage(String language); String getTheme(); MonacoEditorOptions setTheme(String theme); String getValue(); MonacoEditorOptions setValue(String value); String getRenderLineHighlight(); MonacoEditorOptions setRenderLineHighlight(String renderLineHighlight); String getLineNumbers(); MonacoEditorOptions setLineNumbers(String lineNumbers); int getFontSize(); MonacoEditorOptions setFontSize(int fontSize); int getLineNumbersMinChars(); MonacoEditorOptions setLineNumbersMinChars(int lineNumbersMinChars); int getLineDecorationsWidth(); MonacoEditorOptions setLineDecorationsWidth(int lineDecorationsWidth); boolean isOverviewRulerBorder(); MonacoEditorOptions setOverviewRulerBorder(boolean overviewRulerBorder); boolean isScrollBeyondLastLine(); MonacoEditorOptions setScrollBeyondLastLine(boolean scrollBeyondLastLine); boolean isSnippetSuggestions(); MonacoEditorOptions setSnippetSuggestions(boolean snippetSuggestions); boolean isUseTabStops(); MonacoEditorOptions setUseTabStops(boolean useTabStops); boolean isContextmenu(); MonacoEditorOptions setContextmenu(boolean contextmenu); boolean isFolding(); MonacoEditorOptions setFolding(boolean folding); boolean isMiniMapEnabled(); MonacoEditorOptions setMiniMapEnabled(boolean miniMapEnabled); boolean isScrollbarUseShadows(); MonacoEditorOptions setScrollbarUseShadows(boolean scrollbarUseShadows); boolean isAutomaticLayout(); MonacoEditorOptions setAutomaticLayout(boolean automaticLayout); boolean isRenderWhitespace(); MonacoEditorOptions setRenderWhitespace(boolean renderWhitespace); boolean isHideCursorInOverviewRuler(); MonacoEditorOptions setHideCursorInOverviewRuler(boolean hideCursorInOverviewRuler);  }