How to remove 'worklight settings' from menu options - ibm-mobilefirst

I implemented WL.OptionsMenu with 4 options. But, default menu option "Worklight settings" is not getting removed from those options. How to remove that menu option from visibility?

In your Worklight project, open application-descriptor.xml and change the following in the Android environment element.
From:
worklightSettings include="true"/>
To
worklightSettings include="false"/>

Related

Where can I set if debug-symbols are included in a IntelliJ IDEA build?

Where can I set if debug-symbols are included in the build of a Java-application when building with IntelliJ IDEA 2016.2.5?
The documentation says here - https://www.jetbrains.com/help/idea/2016.2/configuring-debugger-options.html - that there is a preferences dialog-box under project-structure. But with my IDEA, there isn't such dialog box.
The project structure dialog-box looks like this on my computer:
Thanks in advance,
Bonita
The "Settings/Preferences dialog box" is the generally IDE settings dialog, not the specific project settings dialog.
You can find this dialog in the main menu bar under File > Settings (and then Build, Execution and Deployment > Java Compiler), or by pressing Ctrl+Alt+S.

Modify the icon of an eclipse template plugin

Followed the steps here and created an eclipse plugin based on the Hello World, Command template - exported it, dropped in the plugins folder of my eclipse install and I saw the menu and toolbar entries alright.
Then I had the idea to modify the icon it showed in the toolbar item. Modified the plugin.xml as in (git diff):
<menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar?after=additions">
<toolbar id="gr.uoa.di.regas.eclipse.poc.toolbars.sampleToolbar">
<command
commandId="gr.uoa.di.regas.eclipse.poc.commands.sampleCommand"
- icon="icons/sample.gif"
+ icon="icons/my_icon.gif"
tooltip="Say hello world"
id="gr.uoa.di.regas.eclipse.poc.toolbars.sampleCommand">
</command>
</toolbar>
</menuContribution>
</extension>
and of course added my_icon.gif into the icons directory. Initially eclipse just kept loading the old icon till I deleted it and reexported just to see the little square that means 'icon not found'
So how do I change the icon ? Also where are the specifications for the icon - can't find any ?
EDIT: renamed the icon to icon.gif thinking the underscores might be the issue - nothing changed - of note that eclipse went ahead and renamed the icon in the plugin.xml (I renamed through the package explorer) - so the setup seems correct - eclipse knows about icon.gif.
EDIT2: the repo for the plugin: https://github.com/Utumno/eclipse_poc

Intellij IDEA: Can I have custom variable's in my run configurations

Usecase:
I've found no gruntjs plugin for Intellij IDEA. And I think I don't need one. If only I'd have the option to have each run/debug run ask for the parameter. For example, Rubymine has a rails generator shortcut which asks which generator to call before actually doing it. It'd like to have something like this in my grunt run configuration. Is this possible?
Thanks!
I found that although it's not possible in the Run/Debug Dialog, it is possible with External Tools: Settings -> External Tools -> Add an External Tool and then as parameter $Prompt$.
There is nothing like Eclipse's ${string_prompt} in IDEA (as far as I know). My version is 12.1.6.
Anyway, you can scroll to the very bottom of Run/Debug configuration screen and in "Before launch" section check a checkbox saying "Show this page".
From now on you'll be automatically shown configuration screen after you click Run/Debug button.

How to enable autoscroll to/from source permanently for all new project imports?

I like the "Autoscroll to/from source" features. Every time I import a new project, I will always enable them. However, it gets annoying when you have to do that every time for a new import. I googled, but couldn't find out how. How can I enable them permanently?
There is now a free IntelliJ plugin to remember Autoscroll to/from Source settings:
Jetbrains repository: Autoscroll Save Plugin
Instructions to use:
Download Autoscroll Save plugin and restart IntelliJ
Open an IntelliJ project and set desired autoscroll to and from settings
Use Ctrl-Alt-Shift END
All IntelliJ projects opened or created in future will now inherit your desired Autoscroll to/from Source settings.
If you have any feedback on the plugin, please click on the author (vikingsteve) on the plugin page and use "Send email" function.
Edit: I was just at a java conference and spoke to some of the Jetbrains devs from St Petersbourg. After thanking them for developing IntelliJ, I asked them about this, and I understand that since they are really busy with other things they don't have time right now to make this default functionality in IntelliJ.
So, in the meantime, please try out the Autoscroll Save plugin - from everyone I spoke to at the conference, it works for them without problem.
This is currently not possible.
The auto-scroll settings are Project specific and are stored in the .idea/workspace.xml file :
Accessing Default Project Settings and Structure documents how to change the default settings used by new projects. Unfortunately, the autoscroll settings are not amongst the ones that can be set there.
A bit more digging shows that the default project is represented by .IntelliJIdea12\config\options\project.default.xml and it does not have settings for autoScroll specified. (Out of curiosity, I tried copying in the following in that file :
<component name="ProjectView">
<navigator currentView="ProjectPane" proportions="" version="1" splitterProportion="0.5">
<flattenPackages />
<showMembers />
<showModules />
<showLibraryContents />
<hideEmptyPackages />
<abbreviatePackageNames />
<autoscrollToSource ProjectPane="true" />
<autoscrollFromSource ProjectPane="true" />
<sortByType />
</navigator>
</component>
But that was not picked up by new projects.
)

Register App for Symbolication in XCode Profiler

I'm trying to run XCode's time profiler on my app that is running on my device, but the symbol names show up like 0x2fe26643 instead of [MyClass myMethod]. I realize I need to re-symbolicate the app, but I don't know how.
A few answers like this and this say to press "Re-Symbolicate", find your binary in the list, then press "Locate" to find the dSYM manually. My app is not in the list called dSYM Locations:
How I can get my results symbolicated?
UPDATE: I posted a YouTube clip of what it looks like when I try to re-symbolicate: http://www.youtube.com/watch?v=CcLGRNkmako
I was having this same problem when trying to profile my app on device (worked fine in simulator). When trying to re-symbolicate, my app binary was not showing up at all under the "dSYM Locations" dialog list, so I wasn't able to select it and then use the Locate button to associate the appropriate dSYM as other answers have suggested.
I was able to get symbolication back in the device profiling by going to Edit Scheme in Xcode and changing the Profile build to Debug instead of Release.
Here is what I did to enable profiling, without switching to debug mode. This is for Xcode 4.5.1
Create a new "Profile" build configuration, based on the existing
"Release" configuration: Select the project in the project navigator
to open the project editor. Select the project in the project editor
and click the Info button. Expand the Configurations section in the
Info pane and click the Add (+) button at the bottom of the section.
Select the existing "Release" configuration from the pop-up menu as
a starting point for the new configuration. Select the name of the
copy and type "Profile". See more in the Xcode User Guide.
Set the Code Signing Identity of the "Profile" configuration to
"iPhone Developer" (or the same as your "Debug" configuration):
Click the Build Settings button to display the build settings for
the project. To change the build settings in the new configuration
for all the targets in the project, edit them at the project level.
To change the build settings for an individual target, select that
target. If you edit them at the project level, make sure that you
double-check the target level afterwards: target settings override
project settings. The Code Signing Identity is in the "Code Signing"
section.
Make sure that the "Generate Debug Symbols" setting is YES for
the "Profile" configuration. It was already YES in my case.
Set your new "Profile" configuration to be used by the "Profile"
scheme: Select "Product->Edit Scheme" from the menu, select the
"Profile appname.app" tab at the left, and then select the "Profile"
under "Build Configuration".
In your appname.entitlements file set the "get-task-allow"
property to YES.
Press the ALT key, and select "Product->Clean Build Folder" from
the menu.
Now select "Product->Profile" from the menu, and you should be
good to go.
All kinds of strange things can happen if you don't do all of this. I have had no symbols show up at all, or only library symbols show up. I have had symbols only showing up if you first do a debug build, and then profile afterwards (which means the symbols are probably incorrectly taken from the debug build). I have had the profiler complaining about UUID mismatch, and I have had the infamous "Entitlements do not match" error (see more on that here).
They mean to press the "Locate" button and then find your app in ~/Library/Developer/Xcode/DerivedData. I've found, however, that the following seems to work:
Preferences > Search Paths
Add ~/Library/Developer/Xcode/DerivedData (I actually have this as /Users/rnapier/..., so I'm not certain if ~ works)
This still doesn't always auto-symbolicate for me. But it lets me use File>Re-Symbolicate Document, and then just hit the "Symbolicate" button and it's been working for me. The fact that this doesn't work "out of the box" is insane....
I recommend duping radr://10158512 (which is itself a duplicate of 10015727, but that one isn't in openradar).
This also depends on where XCode is putting your build. You can select "MyCoolApp.app" in the XCode project organizer, right or control-click for "Show in Finder". Not all project settings will put it in DerivedData (several different project settings can conspire to put it in different locations). Now that you've found where XCode is depositing your builds, you can try adding it to Instruments from there using the steps previously outlined. When the File dialog comes up from clicking "Locate...", you can just drop the .app from the Finder on the File dialog and it will go to that directory.
If you change the code signing identity for your "Release" build configuration from "Automatic Profile Selector: iPhone Distribution" to "Automatic Profile Selector: iPhone Development" (emphasis mine) then your app's binary will be listed in Instrument's Re-Symbolicate sheet and you can point it at your Derived Data folder.
No success with above mentioned. What worked for me with Xcode 5:
Get location of your product as described in quellish's answer. Ex.
/Users/ME/Library/Developer/Xcode/DerivedData/Build/Products/Debug-iphoneos
/Users/ME/Library/Developer/Xcode/DerivedData/Build/Products/Release-iphoneos
Open Instruments Preferences and add the location(s) in "dSYMs And Paths".