Netbeans, show memory usage on startup - java

To manually show the memory usage widget on Netbeans Platform, I have to right click on the toolbar and then select Memory.
Is there a way to get the memory usage widget to be shown on start up as default? Such that it will be displayed on startup without user input.

It appears that this setting is saved in the User's directory, where their Netbeans preferences are saved. This wouldn't be a "deployable" solution but the following shows you where the setting is stored http://wiki.netbeans.org/FaqWhatIsUserdir
I verified this with Windows 7 and Netbeans 7.0.1. The file you're looking for is .netbeans/7.0/config/Toolbars/Standard.xml. Inside this you should see a line like <Toolbar name="Memory" visible="false" draggable="true" align="left"/>, make sure "visible" is set to "true", save the file, then start Netbeans.

After some reading I found that there is a property that can be set in the Core UI module.
In the package explorer:
- Important Files | XML Layer | | Toolbars | Standard
Set:<Toolbar name="Memory" visible="true">

Related

Selenium ChromeDriver use custom profile folder - permission error

so I'm trying to create a custom webdriver (as in (down)load the normal driver but use custom profile settings) to get it to open any tab with a popped-out DevTools window (set to "Console").
I figured I could do that by setting up such a preference file by just interacting with my own installed Chrome version and copying my preferences to another folder, then let the Selenium WebDriver load its preferences from that folder.
But when I tried starting the WebDriver using this:
options.addArguments("--profile-directory=\"Default\"");
options.addArguments("--user-data-dir=./temp-selenium");
... it always shows an error (in german, roughly translated to):
Google Chrome can't read or write in the following directory: ./temp-selenium
Removing the second line completely just starts a Chome window with a user profile selection prompt. Setting up a file path to something like AppData doesn't work because then I get the following error:
Could not remove old devtools port file. Perhaps the given user-data-dir at "myFilePath\User Data" is still attached to a running Chrome ...
By the way, why I'm doing this: I just want to SEE the console logs while testing stuff. Can't imagine it's actually THIS difficult to get to it. My tests are way too fast to manually open the console in time and I need to find a bug that happens every 100 tries. Opening the console 100 times is just way too tedious.
Anyone have an idea?

InstallationDirectoryChooser / Installation size calculator

I am trying to show 5 GB in my InstallationDirectoryChooser component and I can not fine the exactly number in bytes I have to use.
For example 4766254545L give me show 5,318 MB and I need to show exactly 5GB
It is not practical to use this script for this purpose, because the size of a bundled JRE will be added to to the returned value.
I would suggest deselecting the "Show required disk space" property of the "Installation directory chooser" form component and add your own "Label" form component whose text is set to
${installer:myLabelText}
The installer variable myLabelText can be updated programmatically in the "Validation script" property of the "Installation directory chooser" form component by calling
context.setVariable("myLabelText", newText);
This requires install4j 8.0+.

Android using Intellij Version 14 - Update XML References only in current XML resource file

I am using Intellij Idea Version 14 for Android development. I have recently upgraded to version 14. While editing resource XML, when I change ID of any component (e.g TextView or Button) it asks a question "Update usages as well?" "This will update all XML references and Java R field references." Clicking yes changes all files where same ID is used. Version 13 was doing only in that file. Now the name is changed in entire project wherever it is used. I do not want to change code in other files. Here is a example.
File 1: First.Java and First.XML has textview with ID textViewPersonName
File 2: Second.java and Second.XML has textView with ID textViewPersonName
Now I want to change Second.XML, textViewPersonName to textViewPersonFullName. On changing this file Intellij 14 changes all files (i.e.First.Java and First.XML ) and updates textViewPersonName in the first files to textViewPersonFullName.
How do I change only in currently used file (i.e. Second.XML) only. Is there any setting?
if you refactor a id with the shortcut [SHIFT]+[F6] you can click on preview and a second window opens:
Here you can right click on the selected line and exclude that refactoring:
Hope this helps

NetBeans doesn't recognize ${project.organization} in license template

Can anybody reproduce the following?
In my NetBeans 7.2 project I've set the "project.license" property (in project.properties) to "apache20" so that NetBeans generates the appropriate license text in every new .java file. The license text (which is located in "license-apache20.txt") contains the following FreeMarker reference:
${project.organization!user}
When "project.organization" is not set it displays my user name as expected. Also, when I set a custom user name in the User.properties file it displays this user name instead. So far so good.
However, I want to set the "project.organization" property. But when I do this in the project.properties file NetBeans simply doesn't recognize it, displaying my user name instead.
When I remove "!user" from the FreeMarker reference it generates the text "Expression project.organization is undefined on line 4, column 59 in Templates/Licenses/license-apache20.txt." When I set the property in User.properties instead (silly place, but I did it for sake of analysis) I get the same behavior. Does anyone know what might be wrong or how to get NetBeans to find the "project.organization" property? Does anyone have the same behavior on his or her NetBeans?
In license-apache20.txt (or any other license template), change ${project.organization!user} to ${organization!user}
In NetBean menu, Tools ❯ Template, when you click the Setting button, a User.properties file is opened. Add organization=FooBar Inc there.
(This is not very ideal, but at least it allows to customize the organization.)

Where are all the standard Android icon resources?

I have just started writing my first ever Java/Android application, so forgive the total n00b question.
How do you access the the standard operating system icons such as search icon/menu icon etc? They are not in the res/drawable folder where I would expect to find them. Are they available as part of the SDK or must you download them seperately?
EDIT
Maybe you can help me further - I am getting the following error (repeated on):
[2011-09-08 19:59:47 - TweetTab] C:\Users\Dan\workspace\TweetTab\res\menu\options_menu.xml:4: error: Error: No resource found that matches the given name (at 'icon' with value '#drawable/ic_menu_search').
However, the icon is not empty, the xml looks like this:
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="#+id/search"
android:icon="#drawable/ic_menu_search"
android:title="#string/search"/>
</menu>
Am I missing something?
SOLVED
I changed android:icon="#drawable/ic_menu_search" to android:icon="#android:drawable/ic_menu_search" and it could then find the icon.
You can acces them via android.R.drawable.* or in xml by #android:drawable/something.
I installed the Android SDK for Eclipse on Windows.
Now I can find all ressources under "C:\Program Files\Android\android-sdk-windows\platforms\android-9\data\res..."
try this instead:
android:src="#android:drawable/ic_menu_camera"
it is now possible to use vector assets to generate standard (or customised) icons for android.
Add 'com.android.tools.build:gradle:1.4.0-beta3' to your build.gradle file. (The stable version will be out in the coming weeks).
Add a vector asset by right-clicking res/drawable/ > New > Vector Asset. Android Studio provides a built-in viewer for you to pick your drawable.
Reference your icon like you usually do. Eg: android:icon="#drawable/ic_help_24dp"
A lot of them can be found in android.R.drawable but not all are publicly accessible
You can find the android.R.drawable images in your local SDK folder. (Tested using Android Studio 3.0)
First have a look at the docs for the names of the drawables here: https://developer.android.com/reference/android/R.drawable.html
Second either search your drive for one of those image names.png or type in the name of any of them into your Android Studio activity and right click (goto declaration) on it to view the image. Then you can also right click that image to copy the path. Then open that folder and look at all the PNG's there.
Example on windows 10: android.R.drawable.star_big_on is located in user/AppData/Local/Android/Sdk/platforms/android-25/data/res/drawable-hdpi/star_big_on.png
(Note also on windows AppData is a hidden folder so you may need to set your windows explorer to show hidden if you are clicking to open each folder)
Also if you need to see material design icons / descriptions this is a good place to look: https://material.io/icons
Someone may see this page useful for getting those icons... http://developer.android.com/design/style/iconography.html
For those of you in the Visual Studio/Xamarin Android camp, you can view and add the standard Material icons pretty easily using the following plugin:
https://marketplace.visualstudio.com/items?itemName=nikainteristi.Materialiconsgenerator
I've used it a few times in my projects.

Categories

Resources