Quantcast
Channel: JetBrains Developer Community : Thread List - IntelliJ IDEA Users
Viewing all 5661 articles
Browse latest View live

Tempate or HotKeys? Can Inserting Commit be made easy with IntelliJ

$
0
0

I have a question about IntelliJ and I dont know if the following can be done with Temapaltes or Hotkeys or something.  As I am coding I like to put in comments in the following format:

 

/*
    / Date: 02.25.12
    / Author: xxx xxx
    / Email: jxxx
    / Commit:
    /    Added the new fields based on request XXX.
    /
    */

 

Can I somehow setup a easy way with IntelliJ to press a key or something to insert this into my code


spring mvc tests do not run from IDEA

$
0
0

Hello,

 

recently I have just checked new spring module called: spring-test (from Spring 3.2 - yes I know IDEA 12 has support for 3.1).

I created simple tests but I could not run theme from IDEA (ctrl + shift + F10).

 

The same tests I can run from:

  • Eclipse STS and
  • Netbeans 7.3,
  • via mvn clean install or
  • mvn test -Dtest=ControllerNameTest from terminal (cmd)

 

but when I run them from IDEA I get:

java.lang.IllegalStateException: Failed to load ApplicationContext 
Caused by: java.io.FileNotFoundException: src\main\webapp\WEB-INF\servlet-context.xml

 

I set context xml file path to:

 

@ContextConfiguration("file:src/main/webapp/WEB-INF/servlet-context.xml")

 

Issue occures on:

- Windows 7

- IDEA 12

- Spring 3.2

 

Greetings

Sławek

IntelliJ IDEA shortcuts/workflow for populate fields from one object to another

$
0
0

There area lot of classes in my codebase that have an object passed into its constructor to populate its fields from that object's fields like the following:


public class PersonDataHolder {    private String name;    private int age;    public PersonDataHolder(Person person) {        this.name = person.getName();        this.age = person.getAge();    }
}

 

Instead of creating this by hand each time, is there an IDEA shortcut/workflow that makes writing these classes more efficiently?

IntelliJ false syntax errors on AspectJ methods in Spring Roo project

$
0
0

I have generated an application using Spring Roo.  It is using MongoDB repositories.  References to the methods in the Roo-generated repositories decendents are being highlighted in IntelliJ as errors even though it compiles fine.  Any suggestions on how to make IntelliJ realize these are not errors?  Attached is the entire project.

Capture.PNG

Confused by Folder Colors and Associated Actions

$
0
0

I created a Maven project, and the src folder is orange and I can't create a package beneath it -- even if I remove the folders underneath.

 

Another developer who created a similar project has a package beneath src with no problems (his src folder is blue). Huh?

 

I'm really confused what's going on. I've spent two full days trying to debug a "simple" Spring-ws deployment.

 

If you look at the folder below, the Web Service Endpoing class is underneath "resources".

 

I'm therefore having trouble configuring Spring what directory should be for its scan.


So, my question is what's the deal with the folders in IDEA. This is probably a simple thing to understand, but no matter what I do, I can't create a package beneath "src" (again, even if I remove the directiores underneath it).

 

How can I create a package beneath "src"???

 

Very confused.

 

Thanks in advance.

 

- m

Problems creating Play 2 projects and modules in Intellij 12

$
0
0

Seeing this page on confluence http://confluence.jetbrains.net/display/IntelliJIDEA/Play+Framework+2.0,I thought that there is out-of-the-box support for creating Play 2 projects in IDEA 12.

 

However, I've been unable to do so. Here is what happened:

 

If I am creating a new module with an existing project opened, I don't see the input field for the Play 2 home directory.

Input:

Module name: play

Result:

"Invalid Play 2.0 dir, cannot find /framework/skeletons/scala-skel"

 

 

If I am creating a new project with a Play 2 module, I can specify Play 2 home directory, but whilst the project is being created, there is an error when creating the Play module like:

 

Input:

Project name: practice

Module name: play

Play 2 path: /home/user/applications/play-2.0.4

Otherwise settings default.

 

Result:

 

"Error adding module to the project: /home/user/ideaProjects/practice/play/.idea_modules/play.iml (No such file or directory)

I was expecting the play.iml to be looked for in the directory /home/user/ideaProjects/practice/play since this is where it is actually located.

Project then loads without anything in it.

 

 

Both seem to be typical scenarios to me and yet they don't work.

 

I have found a workaround when creating a new project though:

If you use the same name for both the project and the module, the project is created as expected!

How to launch the 'Idea 12' with 'Java 7' on OS X.

$
0
0

Hi,

the Idea 12 IDE starts with java 1.6.0_37 by default on my OS X (mountain lion) machine.

I would like to start the IDE with my default Oracle Java 7.

How is it possible?

 

I have already exported JAVA_HOME

"export JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk1.7.0_10.jdk/Contents/Home"

 

Thanks in advance ;-)

Using IntelliJI database console where is commands saved?

$
0
0

I am using the IntelliJI database console and wouold like to know where is commands are saved?

 

I see if I close IntelliJ and reopen it I still have all my commands. I would like to back them up so can someone please tell me where are the commands saveds


Adding JBoss 6 as application server

$
0
0

We are starting a new project on JBoss 6, and I have a problem adding it as an application server.

IDEA constantly warns me the the selected directory is not a valid JBoss home, though I have just unzipped it. I also tried downloading JBoss AS 7, and the result was the same.

Has anyone an idea what is wrong?

Specify test runner window size for FlexUnit tests

$
0
0

Hi,

 

Since we sometimes use FlexUnit to display views larger than the Window size, we are looking for a way to make the window bigger by default (without having to resize it manually each time).

 

Is there a field hidden somewhere or a way to change the default test runner used by IntelliJ to change the application width/height?

 

Thanks.

IntelliJ generating bad get/set method names? setShippingDestinationByShippingDestinationId

$
0
0

IntelliJ is by default generating what I consider to be very poor getter/setter method names.  I'm trying to figure out if this is because of something I'm doing, or if it's just IntelliJ.  For the foriegn keyed database column "shipping_destination_id" FK to table "Shipping_Destination" it generates this:

 

    private ShippingDestination shippingDestinationByShippingDestinationId;

 

    @ManyToOne

    @javax.persistence.JoinColumn(name = "shipping_destination", referencedColumnName = "id", nullable = false)

    public ShippingDestination getShippingDestinationByShippingDestinationId() {

        return shippingDestinationByShippingDestinationId;

    }

 

    public void setShippingDestinationByShippingDestinationId(ShippingDestination shippingDestinationByShippingDestinationId) {

        this.shippingDestinationByShippingDestinationId = shippingDestinationByShippingDestinationId;

    }

 

Is there a setting I'm triggering here, or is this just how IntelliJ does it?

How are you supposed to do this simple SVN task in Intellij (read docs)? merging branch to trunk

$
0
0

I've been reading the SVN help files and going over the options within IDEA (12.0.3) and I'm wondering how to easily do a merge of a branch into trunk?

 

Basically I want to do this, that I can do easily from the command line:

 

svn merge -r10703:10816 http://myusername@oursvnserver/svn/repos/Applications/myApp/branches/VERSION-1.1

 

I tried VCS options while on trunk "merge from" but I ended up with a warning that I was going to corrupt my branch so that I could no longer commit to it. That's no good.

 

Then I played about with various options on "integrate directories" but it's extremely confusing. Shouldn't you label what source 1  and source 2 is? Maybe call one source and one destination? or "from" and "to" ?

Also when I tried using that (and had "try merge, make no changes" selected) it ended up taking a lot of files in trunk and attempting to replace them with older versions in the branch? I only want the latest branch changes to be merged into trunk.... I don't want trunk files overwritten with branch chagnes.

 

Something just doesn't seem right. I ended up doing the merge from the comamnd line and then using IDEA to commit the files in trunk, but there should be a way to do this merge within the IDE?

 

I'm about to switch to some other SVN gui tool since I'm always having issues with anything other than basic commits in IDEA.

 

(As another issue, righ tnow I'm trying to right click on my project and compare the trunk version with a branch version and I end up with this error which doesn't even make sense to me):

https://www.evernote.com/shard/s14/sh/548d05f1-8674-4fde-bf9e-0b7b69fee815/2b2d449e8eb9aad5caa1831c8c8b836e

 

Why the heck is it looking for the dir trunk under branches/VERSION-1.1/trunk ?

 

When I do configure branches it seems to look ok

https://www.evernote.com/shard/s14/sh/546baeff-2b88-458a-bb0a-e5f85e5beca6/10b651cce95cb857f7dc8005595f8bdd

Read ANE dependencies from Maven configuration

$
0
0

Hi,

 

I have a Maven/FlexMojos build that works perfectly well with IntelliJ 12.0.4.

 

However, in the process of adding AIR support to this project, I have an issue with dependencies that are Adobe Native Extensions (special SWC libraries that contains specific target platform implementations).

 

I deployed the ANE file and then added the dependency in my POM.

 

<dependency>

            <groupId>com.freshplanet</groupId>

            <artifactId>air-facebook-ane</artifactId>

            <version>20130225</version>

            <type>ane</type>

</dependency>

 

IntelliJ does not seem to be able to detect that this file is indeed a native extension or even a Flex library (it is simply ignored), which causes later problems when I need to package the application.

 

The workaround I found is to manually re-add the dependency as an ANE to my module configuration (in that manner, IntelliJ seems to manage the ANE correctly), which is not very convenient since it's not in my maven configuration. Then, I added the SWC file as a dependency so that it compiles with Maven (I don't know how to use ANE with FlexMojos yet).

 

I am not sure what is the correct way to manage ANEs used in my build. Is this doable without the manual addition trick ? Any suggestions are welcomed.

 

Best regards

auto-import choosing broken (for me)

$
0
0

When I have a Class name in red, I used to be able to mouse-over it (or something -- I never could figure out the logic definitively) and see a guess or several offered for adding an import to the right class automatically.  ALT+enter (or CMD+enter... I have no idea) used to select this suggestion.  Now, however, the same key stroke simply dismisses the suggestion and no import suggestions are ever offered again for the class.

 

What is/was this function I used to invoke by ALT+enter or CMD+enter, and how can I restore its working order?

 

tone

The new View Breakpoints dialog in version 12

$
0
0

One word for the revision of the View Breakpoints dialog in IJ 12:  Wha?

 

My gosh, I've been using it for a couple of weeks now and I still have usability problems with it.  The short list:

 

- Adding/removing breakpoints is not quite intuitive "Oh it's these tiny buttons way over here in the upper left corner" that aren't context senstive wrt to my place in the confusing tree list on the left.

- Closing the dialog involves laser beam accuracy with the mouse to click the tiny X in the upper right corner, or remember to press the Esc key?, but wait, it's not a popup yet there are no OK/Close buttons.  The Enter key seems more apt.

- The tree list on the left is confusing. Items shift/move and disappear without rhyme or reason. Modifying the list is again non intuitive.

 

Maybe I'm just conditioned to the old dialog, but the benefits of the new one over the old one escape me.

 

Just trying to provide some, hopefully, useful feedback.

 

Scott


Community edition and Kotlin

$
0
0

Does the community edition of Intellij support the Kotlin plugin?

 

I use ultimate at work but want to be able to develop kotlin code at home and hope I can use the community edition.

 

thanks

How to get GWT compiler output where I want it?

$
0
0

For reasons that I have to ask you to accept as a given, I need to have my GWT application be built such that all the output is available at "/Foo/bar/1.0", rather than the normal "/".

 

Specifically, I need the result of compiling my GWT app inside of IntelliJ to look like this:

~/.IntelliJIdea12/system/gwt/Project.534b2263/Test.ef6cd448/run/www/

  - Foo

    - bar

      - 1.0

         - Testing.html

         - Testing.css

             - (other files in here too, like favicon.ico, etc...)

         - WEB-INF

           -(contents left out here)

         - testing

           - testing.devmode.js

               - testing.nocache.js

 

The best I can seem to do is to get the Testing.html, Testing.css, etc... in the right place. I get this by setting the "Output Relative Path" for my GWT module to "/Foo/bar/1.0/" *and* the "Path Relative to DeploymentRoot" for my Web Resource Directory to the same "/Foo/bar/1.0/".
However, the "testing" directory, containing the testing.devmode.js and testing.nocache.js seem to wind up in the ~/.IntelliJIdea12/system/gwt/Project/534b2263/Test.ef6cd448/run/www/testing directory. Obviously, this means that when the Testing.html tries to include the testing/testing.nocache.js it cannot be found, and my GWT app doesn't work.
I've attached a sample project I created similar to my real project. Hopefully I'm just missing something easy, but I've been digging around for hours...
Thanks for any help!
jay

Starting iml project file without launching IDE

$
0
0

How can I open iml project file without launching IDE?

Error screen in attachment.

 

PS. IDEA 12.0.4

Formatting spaces within braces { } of an Annotaiton

$
0
0

For annotation: @Test({Foo.Bar})

 

Is there a setting that creates spaces within the braces so it will look like this:

 

@Test({ Foo.Bar })

intellij code formatting like PHPStorm???

$
0
0

Hi Everyone,

I've been using PHPStorm for over a year now, but I'm trying out IntelliJ because I need the Actionscript support. When I create a web module project in IntelliJ, everything works great except that my code does not autoformat and has no code coloring (everything is just black text). Am I missing something? PHPStorm handles both of these things automatically. Do I need to enable a setting somewhere in IntelliJ?

 

If this has already been discussed, feel free to give me the discussion link. I couldn't find it.

Thanks,

Andy

Viewing all 5661 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>