How to add two help contents in eclipse RCP application? - eclipse

In my application I want to add two help contents. Currently I have only one contents in my help book. To add a new one I have declared another help plugin and Tried to add that in to product dependencies. But my second help did not appear in the help book. Am i missing something here?
2 contents snapshot:
I want to do something like this
Any help on this will be appreciated.
Toc.xml
<?xml version="1.0" encoding="UTF-8"?>
<?NLS TYPE="org.eclipse.help.toc"?>
<toc label="XXX">
<topic label="Main Topic" href="html/maintopic.html">
<topic label="Sub Topic" href="html/subtopic.html"/>
</topic>
<topic label="Main Topic 2"/>
</toc>

Looking at the Eclipse help plug-ins they just use:
<extension point="org.eclipse.help.toc">
<toc file="toc.xml" primary="true" />
</extension>
in each plugin.xml. The toc.xml is like yours.

Related

Receiving an error within Google Play Library in Eclipse

I am new to eclipse and receiving this error
error: no resource found that matches the given name (at 'drawable' with value '#drawable/ common_google_signin_btn_icon_dark_disabled').
Here is my common_google_signin_btn_icon_dark.xml file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:state_enabled="false"
android:drawable="#drawable/common_google_signin_btn_icon_dark_disabled" />
<item
android:state_pressed="true"
android:drawable="#drawable/common_google_signin_btn_icon_dark_pressed" />
<item
android:state_focused="true"
android:drawable="#drawable/common_google_signin_btn_icon_dark_focused" />
<item
android:drawable="#drawable/common_google_signin_btn_icon_dark_normal" />
</selector>
Any help would be appreciated thanks
This seems like a case of missing files. You are using a drawable image/resource that doesn't exist. Go to your drawable folder and make sure you have those png (PNGs are normally used for buttons)images namely: common_google_signin_btn_icon_dark_disabled.png, common_google_signin_btn_icon_dark_pressed.png, etc.
This SO post, although not exactly same, may offer insight.
Thanks for the reply, files were probably missing in the library because i was able to upload a newer version of google play services library and worked perfect.

Adding popup description to custom JSF tags in Eclipse

I have a list of custom JSF tags, declared in an xml file in the following format:
I'd like to provide the developers documentation for these tags that shows up in eclipse like the one for the builtin JSF tags.
How can I achieve this?
Start by using a WAAAAY more current taglib... a 2.2 one would be good...
<facelet-taglib
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facelettaglibrary_2_2.xsd"
version="2.2"
>
Then you'll notice (via code completion) that inside the <tag> elements you can add a <documentation>
See e.g. https://github.com/omnifaces/omnifaces/blob/2.6.4/src/main/resources/META-INF/omnifaces-ui.taglib.xml

excluding some js file from minification in com.day.cq.widget.impl.HtmlLibraryManagerImpl

I have a osgi config settings for config\com.day.cq.widget.impl.HtmlLibraryManagerImpl.xml
as follows:
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="sling:OsgiConfig"
htmllibmanager.minify="{Boolean}true"
htmllibmanager.debug="{Boolean}false"
htmllibmanager.gzip="{Boolean}false"
htmllibmanager.timing="{Boolean}false"
/>
however, I want some files not be minifyed. How can I do that ?
Since AEM 6.1 the com.day.cq.widget.HtmlLibraryManager interface and its implementation (com.day.cq.widget.impl.HtmlLibraryManagerImpl) have been deprecated.
Instead, you should take a look at new HtmlLibraryManager interface.
The com.adobe.granite.ui.clientlibs.impl.HtmlLibraryManagerImpl implementation has interesting OSGi property "htmllibmanager.excluded.path.list" that might just be what you need.
I had read the solution to this problem in adobe forums, given by
Sham HC
According to him, OOB not possible & you might need to implement own HTMLLibraryManager. File daycare requesting feature pack.
If you have taken look at the below link you can take advantage of selector and at dispatcher OR linkrewriter remove .min for your request.
New in AEM
Use a manual include to be able to choose if minified or not. Nothing to change in your clientLibs. Using "htmllibmanager.excluded.path.list" doesn't work for me and I can read in documentation that cq:ClientLibraryFolder can not be exclude because it's hardly specified that's a clientLib.
To make something like this (css):
<sly data-sly-use.clientLib="/libs/granite/sightly/templates/clientlib.html" data-sly-call="${clientLib.css # categories='yourClientLib}" data-sly-unwrap/>
Use:
<link rel="stylesheet" type="text/css" href="/etc/designs/yourClientLib.css"/>
And to make this (js):
<sly data-sly-use.clientLib="/libs/granite/sightly/templates/clientlib.html" data-sly-call="${clientLib.js # categories='yourClientLib'}" data-sly-unwrap/>
Use:
<script src="/etc/designs/yourClientLib.js"></script>
So if you don't want minification your files will end with ".js" and if you want minification your files will end with ".min.js". Realy easy.

In Magento 2 How to Override core customer model?

I have to override customer ResourceModel's customer.php file in my custom module.
I have tried but its not working.so what is correct way to override Model?
Please help me.
I follow below steps to override Model,
I have my own module called Namespace_Module with a di.xml file,
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd">
<preference for="Magento\Customer\Model\ResourceModel\Customer" type="Namespace\Modulename\Model\ResourceModel\Customer" />
</config>
Then I have created php file,
Namespace\Modulename\Model\ResourceModel\Customer.php
and try to override core file.but its not working for me.
So plz anyone help me to solve my problem.
thanks.

Why is Magento not picking up my theme template file for transactional email order?

I made some template changes to Magento's New Order transactional email template in the backend. The textual changes at the top of the email (in the "thanks for your order..." section) worked fine. But when I change the templates for the order details, they are not appearing in my email.
I have created two files within my template which I thought would override the email:
app/design/frontend/default/mythemehere/template/email/order/items.phtml
app/design/frontend/default/mythemehere/template/email/order/items/order/default.phtml
These are referenced in my sales.xml file in app/design/frontend/default/mythemehere/layout
<sales_email_order_items>
<block type="sales/order_email_items" name="items" template="email/order/items.phtml">
<action method="addItemRender"><type>default</type><block>sales/order_email_items_order_default</block><template>email/order/items/order/default.phtml</template></action>
<action method="addItemRender"><type>grouped</type><block>sales/order_email_items_order_grouped</block><template>email/order/items/order/default.phtml</template></action>
<block type="sales/order_totals" name="order_totals" template="sales/order/totals.phtml">
<action method="setLabelProperties"><value>colspan="2" align="right" style="padding:3px 9px"</value></action>
<action method="setValueProperties"><value>align="right" style="padding:3px 9px"</value></action>
<block type="tax/sales_order_tax" name="tax" template="tax/order/tax.phtml">
<action method="setIsPlaneMode"><value>1</value></action>
</block>
</block>
</block>
<block type="core/text_list" name="additional.product.info" />
</sales_email_order_items>
However, when I place my order, I get the base template in the email.
If I commit the Cardinal Sin in Magento of overriding base template files (app/design/frontend/base/default/template/email/order ...), lo and behold, I see my changes! Seems Magento is very keen to use its base template.
I have overridden other templates in the sales section (eg: sales/order/view.phtml, sales/order/print.phtml), and various posts on Magento's forums indicate I'm doing the right thing in concept. But alas! It's just not working for me.
To use your custom theme file for order email "app/design/frontend/default/mythemehere/template/email/order/items.phtml"
In the admin go to System->configuration->design
Select your website from the top left
Now in the themes template uncheck the checkbok and add the theme name.
I had the same problem. I discovered that the emails will use the /app/design/frontend/default/default templates before the 'base' templates. So if you copy the base templates into the default/default folder your files will not be overwritten on update.
However it is still not ideal as this is still outside your theme folder, however it is better than using 'base' files. I still haven't found a true solution.
This kind of situation happens because if we mention wrong values under System>Configuration>General -> Design section
We can have following two scenarios.
1) Default package with custom design
2) Custom package
If we do not fill correct values under Current Package Name field then issue mentioned in the question will occur.
It happened with me when I was using a custom package but had given value as
default under Current Package Name field.
We should configure the theme properly so that Magento can follow theme fallback properly.
Overwriting templates in base/default and default/default is strongly discouraged, because updating Magento will overwrite those directories.
What worked for me (with emails) is to put the modified files under app/design/frontend/your_design_package/default/templates/.