guari/eclipse-ui-theme

IllegalStateException when running Ant commands - Kepler

Closed this issue · 7 comments

Whenever I run any command through Ant in Eclipse Kepler I get nothing but a console full of the repeating stack trace below. If I unselect the Moonrise theme the errors stop almost immediately.

I am going to see if I can narrow this down any, but being that this is 100% new to me I thought I'd post it here in case someone could identify it more quickly.

Thanks!

java.lang.IllegalStateException
at org.apache.batik.css.parser.CSSLexicalUnit.getFloatValue(Unknown Source)
at org.eclipse.e4.ui.css.core.impl.dom.Measure.getFloatValue(Measure.java:38)
at org.eclipse.e4.ui.css.swt.helpers.CSSSWTFontHelper.getFontData(CSSSWTFontHelper.java:153)
at org.eclipse.e4.ui.css.swt.properties.converters.CSSValueSWTFontDataConverterImpl.convert(CSSValueSWTFontDataConverterImpl.java:72)
at org.eclipse.e4.ui.css.swt.properties.converters.CSSValueSWTFontConverterImpl.convert(CSSValueSWTFontConverterImpl.java:33)
at org.eclipse.e4.ui.css.core.impl.engine.AbstractCSSEngine.convert(AbstractCSSEngine.java:1125)
at org.eclipse.e4.ui.css.swt.properties.css2.CSSPropertyFontSWTHandler$FontSelectionListener.applyStyles(CSSPropertyFontSWTHandler.java:298)
at org.eclipse.e4.ui.css.swt.properties.css2.CSSPropertyFontSWTHandler$FontSelectionListener.styleSelected(CSSPropertyFontSWTHandler.java:340)
at org.eclipse.e4.ui.css.swt.properties.css2.CSSPropertyFontSWTHandler$FontSelectionListener.handleEvent(CSSPropertyFontSWTHandler.java:369)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1081)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1066)
at org.eclipse.swt.widgets.Composite.WM_PAINT(Composite.java:1491)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4668)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4990)
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2549)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3757)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:138)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:610)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
at org.eclipse.equinox.launcher.Main.main(Main.java:1426)

On which platform/OS are you working?

Windows 7 64 bit

Hi @licwid, for me on Win7x64\Kepler seems ok, I have no stacktrace errors printed in Console while running Ant commands.
Can you give some steps to reproduce the problem?
If eg. you simply create a new project, then create a new xml file in it with this code:

<?xml version="1.0" encoding="UTF-8"?>
<project name="Hello World" default="Hello" basedir=".">
  <property name="HelloText" value="Hello"/>
  <property name="WorldText" value="World"/>
  <target name="Hello">
    <echo>${HelloText}</echo>
  </target>

  <target name="World">
    <echo>${WorldText}</echo>
  </target>
</project>

and run it with Run As... > Ant Builds... do you have that issue?
Just to exclude it (only if you edited it), check the font-family and font-size properties in moonrise-ui.css.

(here there is a similar issue: https://bugs.eclipse.org/bugs/show_bug.cgi?id=289251)

I will give this a try on Monday.
On Oct 6, 2013 7:49 AM, "guari" notifications@github.com wrote:

Hi @licwid https://github.com/licwid, for me on Win7x64\Kepler seems
ok, I have no stacktrace errors printed in Console while running Ant
commands.
Can you give some steps to reproduce the problem?
If eg. you simply create a new project, then create a new xml file in it
with this code:

${HelloText} ${WorldText}

and run it with Run As... > Ant Builds... do you have that issue?
Just to exclude it (only if you edited it), check the font-family and
font-size properties in moonrise-ui.css.

(here there is a similar issue:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=289251)


Reply to this email directly or view it on GitHubhttps://github.com//issues/5#issuecomment-25766795
.

It looks like I'll need to do more digging on my end as the simple xml file did not have any issues.

I had recompiled the project with some changes, but I do notice the issues with the unchanged theme too. I am unfortunately not too familiar with the problematic project's full setup yet, so I won't be able to provide much in the way of more useful information currently. Given that I will close this issue and if I get some solid data on replicating the issue I'll let you know.

I misunderstood, I thought that this issue happens while building all your projects with moonrise theme enabled, not that this issue was happening when trying to rebuild this project...
I re-downloaded the package and tried to rebuild, I'm able to replicate the issue, it's related to some lines of code into moonrise-ui.css: whenever an attribute is set to inherit it generates a java.lang.IllegalStateException.
Despite this, set background-color: inherit for the .MToolbar widgets is needed and works.

Anyway if you want to edit the CSS theme you don't need to recompile the project (it's interpreted at runtime), just change what you want in the stylesheet and replace/restart.

Wow. I am impressed that you were able to figure this out with almost no
info from me (and what was provided was vague.) I really appreciate your
help.

I was only rebuilding the project so that I could learn how the project
gets setup. It also allows slightly easier testing of changes/tweaks for
me. I hope to use your setup as a basis for a different flavored dark
theme if I can get it all figured out. Now to get css spy working in
Kepler.

Thanks again!
On Oct 7, 2013 6:01 PM, "guari" notifications@github.com wrote:

I misunderstood, I thought that this issue happens while building all your
projects with moonrise theme enabled, not that this issue was happening
when trying to rebuild this project...
I re-downloaded the package and tried to rebuild, I'm able to replicate
the issue, it's related to some lines of code into moonrise-ui.css:
whenever an attribute is set to inherit it generates a
java.lang.IllegalStateException.
Despite this, set background-color: inherit for the .MToolbar widgets is
needed and works.

Anyway if you want to edit the CSS theme you don't need to recompile the
project (it' s interpreted at runtime), just change what you want in the
stylesheet and replace/restart.


Reply to this email directly or view it on GitHubhttps://github.com//issues/5#issuecomment-25849211
.