简体   繁体   中英

Eclipse Remote Application Platform (RAP) - Deploy Custom Theme

Currently trying to get my Eclipse RAP application to work with a custom styling. The documentation is giving me one headache after another and it's really hard getting into it.

Following their docs and trying to extend the default theme, I have set up my plugin.xml as follows:

<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
   <extension
     point="org.eclipse.rap.ui.entrypoint">
      <entrypoint
            applicationId="org.______.rap.branding.application"
            id="org.______.rap.branding.entrypoint"
            brandingId="______"
            path="/rap">
      </entrypoint>
   </extension>
   <extension
         id="org.______.rap.branding.application"
         point="org.eclipse.core.runtime.applications">
      <application
            cardinality="singleton-global"
            thread="main"
            visible="true">
         <run
               class="org.______.rap.branding.Application">
         </run>
      </application>
   </extension>
   <extension
         point="org.eclipse.ui.perspectives">
      <perspective
            class="org.______.rap.branding.Perspective"
            id="org.______.rap.branding.perspective"
            name="name">
      </perspective>
   </extension>
   <extension
         point="org.eclipse.rap.ui.branding">
      <branding
            id="______"
            themeId="org.eclipse.rap.rwt.theme"
            title="______ Theme">
      </branding>
   </extension>
   <extension
    point="org.eclipse.rap.ui.themes">
      <themeContribution
         file="theme/______.css"
         themeId="org.eclipse.rap.rwt.theme" />
    </extension>
</plugin>

I've blanked out some parts, just asume they're all the same keyword, lowercase letters only.

My .css-File is as simple as it could be to see, if the hook works:

* {
    background: red !Important;
}

But it just loads the default theme, no changes whatsoever and I can't detect the injection anywhere on the page.

Appears the hook itself is correct, but RAP couldn't handle the background -property. Changing it to background-color instead did the trick.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM