Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import org.w3c.css.sac.CSSParseException;
import org.w3c.dom.stylesheets.StyleSheet;
import org.w3c.dom.stylesheets.StyleSheetList;

Expand Down Expand Up @@ -153,9 +152,8 @@ private void applyCSS() {

long nanoDiff = System.nanoTime() - start;
sb.append(MessageFormat.format("\n{0}", MessageFormat.format(Messages.CSSScratchPadPart_Time_ms, nanoDiff / 1000000))); //$NON-NLS-1$
} catch (CSSParseException e) {
sb.append(MessageFormat.format("\n{0}", MessageFormat.format(Messages.CSSScratchPadPart_Error_line_col, e.getLineNumber(), e.getColumnNumber(), e.getLocalizedMessage()))); //$NON-NLS-1$
} catch (IOException e) {
} catch (IOException | RuntimeException e) {
// e4's parser throws an unchecked CssParseException whose message already carries line and column.
sb.append(MessageFormat.format("\n{0}", MessageFormat.format(Messages.CSSScratchPadPart_Error, e.getLocalizedMessage()))); //$NON-NLS-1$
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1180,7 +1180,8 @@ private void appendWidgetSubtree(Widget widget, StringBuilder sb, int depth) {
*/
private Map<String, String> getCSSRuleSources(CSSEngine engine, CSSStylableElement element) {
Map<String, String> sources = new HashMap<>();
if (!(engine instanceof DocumentCSS docCSS)) {
DocumentCSS docCSS = engine.getDocumentCSS();
if (docCSS == null) {
return sources;
}
StyleSheetList sheets = docCSS.getStyleSheets();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ private Messages() {
public static String CSSScratchPadPart_Close;
public static String CSSScratchPadPart_Engine;
public static String CSSScratchPadPart_Error;
public static String CSSScratchPadPart_Error_line_col;
public static String CSSScratchPadPart_No_theme_engine_available;
public static String CSSScratchPadPart_Time_ms;
public static String CssSpyPart_actual_values;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ CSSScratchPadPart_Apply=Apply
CSSScratchPadPart_Close=Close
CSSScratchPadPart_Engine=Engine[{0}]
CSSScratchPadPart_Error=Error: {0}
CSSScratchPadPart_Error_line_col=Error: line {0} col {1}: {2}
CSSScratchPadPart_No_theme_engine_available=No theme engine available!
CSSScratchPadPart_Time_ms=Time: {0}ms
CssSpyPart_actual_values=actual values
Expand Down
Loading