IntelliJ: How to create Android widget project? - android-widget

In Eclipse, I just uncheck "Create activity" and I get widget-ready project.
In IntelliJ, I tried unchecking "Create Hello World project", but then I cannot compile the app (there isn't Run As Android App option).
At the moment I create a regular Android project and then delete the stuff I do not need. Any faster/automated way?
Thanks

Once you have created your project, click the down arrow next to the run button on the toolbar and select "Edit Configurations".
In the top left of this window press the plus button and select "Android Application". Finally, name your configuration at the top of the window and change the radio button selection from "Launch Default Activity" to "Do Not Launch Activity".

As no one answered, I suppose that the only way to create a Widget or Live wallpaper project is to create a regular Android project and then delete the code you don't need from Manifest and Class files.
Looking forward for better solution in IntelliJ.

Related

Why is "Run configurations" invisible in my perspective?

Namely, I am working on a "New project wizard" plugin. When new project is created I open my perspective to display the project there. It is displayed as expected, but I can not run it since I can not see "Run configurations" menu item under my "Run" menu. I've been looking for a way to get this menu item back with no success. Now, I got curious why is it invisible. Someone knows it already?
Use Window > Customize Perspective.
Look at the Command Groups Availability and select Launch.
You may also want Launch on Tool Bar Visibility.

Adding OCUnit to excisting project in XCode

I am trying to add OCUnit to a excisting XCode project however I am not able to run it. The "Test" row in the "Product" menu is gray after following this guide. Anyone having another tutorial or know how to that? Or other solutions.
You have to edit the scheme for the application target to enable the Test item in the Product menu. To open the scheme editor, click on the Scheme menu in the project window toolbar and choose Edit Scheme. Select the Test step on the left side of the scheme editor. The list of tests should be empty. Click the + button to open a target sheet. Select the unit testing target from the list and click the Add button.

GWT compile button in Eclipse

A simple question :
I am using Eclipse 3.7 Indigo and have updated the GWT (2.4) Eclipse plugin.
Now I can't find the GWT compile button in the main toolbar.
Previously there was this symbol in the main toolbar ,
but after the update, this button has disappeared and the compile action has been moved as a submenu entry into the "Google Services and Development Tools", represented in the main toolbar by this symbol .
Is there a way to add the GWT compile button to the main toolbar or to specify a shortcut?
It's really exhausting to click on the "Google Services and Development Tools" to reach the compile submenu entry :-)
Highlight your project
right-click on it
go down in the dropdown menu to "Google"
The submenu of "Google" will have the "GWT Compile" button
In Eclipse Juno, GWT Compile option is located on the toolbar underneath the Google logo as seen here:
There is no key binding in Eclipse Juno for GWT Compile. That seems to be something the plugin could provide, but does not.
You can add a button for any command to the toolbar by go to Window -> Customize Perspective and exploring the dialog there. You may need to enable things using the Command and Menu visibility and then in the first tab you can add the buttons to the toolbar.
I don't know of a way to add the toolbar item back, but you can run the compiler via keyboard shortcut:
Debug Compile GWT Application, Alt+Shift+D, C
Run Compile GWT Application, Alt+Shift+X, C
You can also customize the keyboard shortcut if you wish, by going to Window->Preferences->Keys.
If you want to compile a GWT application, you should install the Google plugin. Here are the links.

What is "Task scanning" in NetBeans and how to turn it off?

Sometimes when opening projects, NetBeans will display a "Task scanning" progress bar on the status bar. What exactly is it scanning for? Is it possible to turn it off as I noticed that sometimes it takes a while and maybe it's just my installation but sometimes I have to force it to stop when closing NetBeans.
It is a "Task List" plugin working. It does this:
Provides the Task List window, which lists places of interest in your project, such as lines that contain "TODO", "XXX", "PENDING", Java compilation errors, and so on. You can click an entry in the list to navigate to the corresponding place in your code.
You can remove it by going to "Tools > Plugins" menu, "Installed" tab, selecting "Task List" from the installed plugin list and clicking "Uninstall" button. (These instructions are for NetBeans 6.5, but should be somewhat alike for all the other versions).
But I would advise against removing it - I find it pretty useful. There are times when I forget about several TODO's, and Tasks window is a great way to look 'em up.
If you can't see that window, you can access it through "Window > Task" menu, or by pressing Ctrl+6 (again, these instructions are for NetBeans 6.5)
Using Neatbeans 7.2.1
You can go to Tools->Options->Miscellaneous then under the Files tab uncheck Enable auto-scanning of sources. Whenever you want to have Netbeans scan you project you can go to Source->Scan for External Changes.
Tools->options->C++, or whichever language you are working with, under the Other tab uncheck Reparse on File Change. Whenever you want to reparse right click your project Code Assistance->Reparse Project.
It is scanning for the // TODO blarblar and // FIXME .... alikes.
You can disable it by removing the plugin.
In Netbeans 7.0.1 you can't disable the Task List definitively.
Instead you can limit/avoid scan :
Right click in Tasks window
Filter -> Edit
Unselect all
You can also cancel the running "Task scanning" process :
Right click on the progress bar
Click Cancel process

IntelliJ IDEA equivalent of Eclipse "Link with Editor"

In Eclipse you can check the "Link with Editor" option and whatever source file you are viewing in the current tab will be highlighted and have its package expanded in the Package Explorer view.
Is there something equivalent to this in IntelliJ IDEA 8.1?
At IntelliJ IDEA 12 (13, 14 and 15 from comments), it is located at the gear icon into the "Project" Tool Window, called as our mate said, Autoscroll from source
check the image
I hope this can helps someone else :)
Update (2020, eleven years later): see "Source code navigation / Locate a file in the Project tool window"
In the Project tool window, right-click the Project toolbar and, from the context menu, select Always Select Opened File.
After that IntelliJ IDEA will track the file that is currently opened in the active editor tab and locate it in the Project tool window automatically.
Original answer (2009)
That would be : Autoscroll from Source.
Navigate from a file in the Editor that gets the focus, to the corresponding node in the Project Tool Window.
Fried Hoeben comments that
you get there from the config of the project tool window.
It is not present in the general IDE settings (at least in version 12)
In version 2016.3, it's a little icon on the Project Tool Window called Scroll from Source. It's the first icon on the right see screen shot
Right click on the Project Title bar (Project view). Then select the Option "Autoscroll from Resource".
In Intellij 2019.3 community editor, it is to right-click on the Project view and check the item "Always select opened file.
Solution to IntelliJ IDEA 2022.2.4 (Community Edition)
Click on Show Options Menu and select Always Select Opened File