Quantcast
Channel: JetBrains Developer Community : All Content - IntelliJ IDEA Users
Viewing all 5481 articles
Browse latest View live

How can I disable auto-capitalization in SQL completion?

$
0
0

If I start typing "not nu" and accept the auto-completion it inserts "NOT NULL"

 

This is on IDEA 14.0.2 (with a MySQL database if it matters)

 

I remember that in IDEA 13 (with a SQL Server database) the auto-completion was smart enough to use the same case that I started with. "not nu" would be expanded to "not null" and "NOT NU" would be expanded to "NOT NULL".

 

Is there some configuration for this? Was the behavior changed in IDEA 14?


Can I increase time out value?

$
0
0

When I want to update IDEA I often run into the problem of a time out. See excerpt of log file below. After retrying a few times the update can be downloaded. Also, I get time outs when trying to update certain plugins. I think the reason is some kind of slow connection because of company proxy, but I'm not sure. That's a big problem for us as all people in our company also have these issues.

 

Is there a way to increase the value of the timeout? I didn't find something in configuration or idea.properties.

2014-12-15 10:05:56,045 [ 124260]   INFO - ateSettings.impl.UpdateChecker - Read timed out

java.net.SocketTimeoutException: Read timed out

     at java.net.SocketInputStream.socketRead0(Native Method)

     at java.net.SocketInputStream.read(SocketInputStream.java:152)

     at java.net.SocketInputStream.read(SocketInputStream.java:122)

     at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)

     at java.io.BufferedInputStream.read1(BufferedInputStream.java:275)

     at java.io.BufferedInputStream.read(BufferedInputStream.java:334)

     at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:687)

     at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:633)

     at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1323)

     at com.intellij.util.io.UrlConnectionUtil$InputStreamGetter.run(UrlConnectionUtil.java:111)

     at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:405)

     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)

     at java.util.concurrent.FutureTask.run(FutureTask.java:262)

     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

     at java.lang.Thread.run(Thread.java:745)

     at org.jetbrains.ide.PooledThreadExecutor$1$1.run(PooledThreadExecutor.java:56)

 

Thanks for any hint.

 

Stefan

git diff no longer works in Update Project Info tab

$
0
0

OS X 10.8.3

IntelliJ 12.0.4

When I pull the latest from github, the Update Project Info tab shows the files that have been updated, but when I CMD+D to diff any one of them, the diff window shows the same file on both sides and it says "no differences" on the bottom, which is incorrect. Here's a concrete example:

 

application.properties is a file that contains our app's version number in a propety called app.version. I have this file open in the editor and it shows 0.8.139. That is the correct value, but when I diff this file from the Update Project Info tab, it shows 0.8.138 on BOTH sides.

 

I have several other projects which appear to be working correctly and I can't seem to figure out what happened with this one.

Override the Compiler Source Level for a specific file

$
0
0

Is it possible to override the Compiler Source Level (i.e. Java 6 vs Java 8) for a specific file.  Our project is mainly comprised of Java 8 files, but we have a handful of files that have to be able to run under Java 6.  Is it possible to annotate a file as using a specific compiler source level?

  (*Chris*)

cannot download the community edition

$
0
0

Hello,

 

I have been trying to download the intellij IDEA community edition from https://www.jetbrains.com/idea/download/ and i am not able to get it. As soon as i start the download it says it will take about 2000 days to download it. I have been trying to download this from the past 2 days. Is anyone else facing this issue and can i get the community edition from somewhere else. Please suggest.

 

Thanks

Generation of Persistence Mapping Defaults

$
0
0

Hi,

 

I am using IDEA Ultimate 14.0.2 and using Hibernate on a Dropwizard project with maven.

 

I have generated the ORMs and after compiling, the following error occurs:

INFO  [2014-12-16 08:41:03,042] org.hibernate.dialect.Dialect: HHH000400: Using

dialect: org.hibernate.dialect.MySQLDialect

ERROR [2014-12-16 08:41:03,154] xx.yy.zz.test.modules.module: org.h

ibernate.MappingException: Repeated column in mapping for entity: xx.yy.zz.test.models.TestTable column: content_type_id (should be mapped wit

h insert="false" update="false")

Where the database schema generation have created the following:

package xx.yy.zz.test.models;

 

import javax.persistence.Basic;

import javax.persistence.Entity;

import javax.persistence.Id;

import java.sql.Timestamp;

 

@Entity

@javax.persistence.Table(name = "tbl_test", schema = "", catalog = "testdb")

public class TestTable {

    private int id;

 

    @Id

    @javax.persistence.Column(name = "id", nullable = false, insertable = true, updatable = true)

    public int getId() {

        return id;

    }

 

    public void setId(int id) {

        this.id = id;

    }

 

    private String name;

 

    @Basic

    @javax.persistence.Column(name = "name", nullable = false, insertable = true, updatable = true, length = 120)

    public String getName() {

        return name;

    }

 

    public void setName(String name) {

        this.name = name;

    }

 

    private Timestamp created;

 

    @Basic

    @javax.persistence.Column(name = "created", nullable = false, insertable = true, updatable = true)

    public Timestamp getCreated() {

        return created;

    }

 

    public void setCreated(Timestamp created) {

        this.created = created;

    }

 

    private Timestamp updated;

 

    @Basic

    @javax.persistence.Column(name = "updated", nullable = false, insertable = true, updatable = true)

    public Timestamp getUpdated() {

        return updated;

    }

 

    public void setUpdated(Timestamp updated) {

        this.updated = updated;

    }

 

    private Integer createdById;

 

    @Basic

    @javax.persistence.Column(name = "created_by_id", nullable = true, insertable = true, updatable = true)

    public Integer getCreatedById() {

        return createdById;

    }

 

    public void setCreatedById(Integer createdById) {

        this.createdById = createdById;

    }

 

    private int contentTypeId;

 

    @Basic

    @Column(name = "content_type_id", nullable = false, insertable = true, updatable = true)

    public int getContentTypeId() {

        return contentTypeId;

    }

 

    public void setContentTypeId(int contentTypeId) {

        this.contentTypeId = contentTypeId;

    }

 

    private ContentType ContentTypeByContentTypeId;

 

    @ManyToOne

    @JoinColumn(name = "content_type_id", referencedColumnName = "id", nullable = false)

    public ContentType getContentTypeByContentTypeId() {

        return ContentTypeByContentTypeId;

    }

 

    public void setContentTypeByContentTypeId(ContentType ContentTypeByContentTypeId) {

        this.ContentTypeByContentTypeId = ContentTypeByContentTypeId;

    }

 

 

    ...

where the RED part is the default generated value.

 

the problem is, I have hundreds of similar table with similar problem, how do I change the default to insertable = false, updatable = false during the OR generation? or better yet, is there any reason at all that column is being generated despite having the ContentType? How do I efficiently resolve this matter?

 

your kind response is very much appreciated.

Intellij 14.0.2 reports "Empty test suite" but tests are running

$
0
0

I have a very simple jUnit test class named LibraryTest with a single test called testSomeLibraryMethod. This test simply does an assertTrue on a method that returns true.

 

If I right click and select Run 'LibraryTest' the test runs fine, but I see a message in blue in the console that says "Empty test suite". I know the test is empty because if I change the test to assertTrue that the method returns false, the test fails as expected, but I still see the "Empty test suite" message. Clearly the suite isn't empty as the test failed. I'm guessing I'm not following some naming convention, only I can't figure out which one.

 

If it'll help I can post the whole project as this is a simple test project to help debug the issue.

Always prefer local module source over Maven dependencies

$
0
0

I asked this question several months ago, and I still haven't found a reasonable way to tell IDEA to use source dependencies in preference to Maven dependencies without a great deal of busy-work manually changing poms between snapshot and release versions.

 

Suppose modules B and C depend on module A. Since B and C are released on a regular basis to a continuous integration/delivery environment, they never depend on a snapshot of A because any release of B and C could potentially make its way to production if it passes all the rests. In fact, module A is never published as a snapshot anywhere (nor are B and C). In other words, there are no scenarios in which either local snapshots or snapshots residing in a binary repository are used to resolve dependencies. Only versioned dependencies are used at the Maven level. Thus, when editing A, B and C together in a single IDEA project, it is necessary to tell IDEA to resolve the dependencies at the local source code (module) level rather than via Maven. Furthermore, it must do this *without* requiring B and C's poms to be updated to point to a snaphot version of A.

 

I have not found a way to accomplish this. If I add a module dependency on A in B and C and move it to the top of the dependency list (above the imported Maven dependencies), it is moved to the bottom of the list as soon as I close the dependencies dialog, causing the versioned Maven dependency to be preferred over the local source code for A. Moreover, even if this kind of explicit override worked, it wouldn't be ideal because it requires hard-coding B and C's dependency on A in IDEA's proprietry module system, even though the dependency relationship is already expressed in the Maven pom files. The goal is for IDEA to recognize that, although these are Maven modules, when working with them locally it should always prefer the local source code to the Maven dependencies (without requiring the poms for B and C to point to a snapshot version of A).

 

This is something that is easily accomplished in Eclipse by telling it to prefer local source over Maven dependencies. But in IDEA there does not appear to be a way to do this, short of going into all the poms and changing the versions and dependencies to be snapshots.

 

Here is another example of someone apparently trying to use IDEA in conjunction with a similar CI/CD process:

 

http://stackoverflow.com/questions/23523573/intellij-maven-dependency-prefer-local-code


How to set indent size of .html.erb file?

$
0
0

I'm using IntelliJ IDEA 13.0.2 with Ruby plugin.

I want to set indent size of .html.erb file.

I tried to open Settings dialog and select "Code Style - General", "Code Style - Ruby", "Code Style - HTML" and set "Indent" and "Continuation indent" to "2", but It seems not to work well; 4 spaces are inserted after inputing "<p>" and enter key.

How to set it?

IntelliJ no longer finds .java source files inside .jar files--decompiler bug?

$
0
0

I am using the latest prd worthy IntelliJ release,14.0.1, community edition.

 

In project A, I have 3 modules, each of which I build a jar file for which contains BOTH the module's .class files, as well as the .java files that were used in compilation.  (For work internal to my firm, I like to stick everything into one .jar file, so that way there is never any ambiguity about what source produced the class files.)

 

Project B uses all 3 of those jars.  When in project B and I use ctrl-B on some usage of a class from project A, I want the actual source to be displayed.

 

This used to work, but recently I noticed that instead of getting the true source, what I get displayed is a decompilation of the .class file in the ,jar file.

 

Now, IntelliJ 14 added decompilation.  This is a Godsend when dealing with 3rd party .jar files which have no source.

 

But in my case, is that decompiler being used now by IntelliJ in all situations, even in cases when there is source available?

 

Or, is there some other config that I need to do when adding project A's .jar files that will cause the .java files inside them to be seen by IntellIJ when in project B?

 

Note: when in project B, I can go to the Project view's External Libraries, and inside each of project A's .jar files, when I examine the content of each one, I see double names.  These are surely the .class and .java files.  When I double click on either one, the actual .java file, not the decompiled one, is displayed.

Disable rich-text copying?

$
0
0

Is it possible to simply disable rich text copying in IDEA 14? I sometimes copy from IDEA and paste into Evernote, and as if IDEA 14, the pasted text often ends up huge and green. It takes extra steps to get rid of that unwelcome formatting, or you can use paste plain, which can lead to other problems.

 

I know you can create a color scheme just for this, but I'd rather not go through all that, and keep it updated, if there's a simpler way, which there really should be.

 

Thanks for any thoughts.

How can I add code completion support for a custom set of XML tags?

$
0
0

I'm using a framework with a custom set of XML tags, some of which have optional parameters. How can I configure code completion to assist with these XML tags? Is there a plugin that will allow me to do this?

 

As an example, suppose i have the following tag:

 

 

Tag Name: myCustomTag

property1

property2

optional-property3

optional-property4

 

I'd like to be able to define code assist helpers for each set of tags that follow this kind of format. Any suggestions are welcome!

css3's calc

$
0
0

Hi,

 

I'm getting "Mismatched property value (<length>|<percentage>...)" for style="width: calc( 1/2 *100%);" in a html file,  Is there any way to teach Intellij to recognize the calc? The error message it gives seems to contain excerpt from some grammar file so I hope if I find it and edit I could fix it.

 

Best regards, Eugene.

Running IntelliJ 14 using Java 6 on Mac OS X Yosemite

$
0
0

Has anyone tried it? Does it work? I don't want to upgrade if it means I have to switch to Oracle's JDK because the font rendering is awful.

Export package structure / file list

$
0
0

Hello!

 

Is it possible to export the package structure/tree and/or the file list to a text file or so in Android Studio (or IntelliJ)? Maybe there is a plugin?

 

Thanks in advance!


Cached revisions have to be cleared before loading more revisions

$
0
0

Hi,

I just installed 14.02 today and we're working with SVN 1.7 and I ran into the following behavior:

1. I refreshed SVN history and accept the default of 500 revisions to cache

2. I then realized 500 is not enough for me, went to the settings and changed it to 1000

3. Then I assumed refreshing the history again, will load the extra 500 revisions I wanted but that wasn't the case

 

I had to purge the history and reload for the change to take effect, is that by design?

 

Thanks,

Guy

Cannot create gradle project on IntelliJ 13.1.6

$
0
0

When try to create a new gradle project

I kept getting the following error:

 

Error:Unable to start the daemon process.

This problem might be caused by incorrect configuration of the daemon.

For example, an unrecognized jvm option is used.

Please refer to the user guide chapter on the daemon at http://gradle.org/docs/2.2/userguide/gradle_daemon.html

Please read below process output to find out more:

-----------------------

Error occurred during initialization of VM

Could not reserve enough space for object heap

Could not create the Java virtual machine.

I am using gradle version 2.2, is there a setting somewhere that could fix this problem?

How to find GIT repository

$
0
0

Revisiting Inetllij after a decent absence, but now on a new pc.  How do i find git reporitory URL from my old machine's intellij.?

Relativly new to Java, Intellij etc.

How to have Collapsable/Expandable in intellij form.

$
0
0

Hi,

 

I am currently working on the plugin that is having the GUI form where i need the have the Collapsable/Expandable panel.It would be great if someone suggest me the good link i can refer.

 

I need to get the output in GUI form as attached.

command line: unknown configuration variable 'swf-version'

$
0
0

Setting up IDE for FLEx Project. Created simple project and used FLEx SDK 4.5. Compiling produces below error. When i use SDK 4.6 then no issues. I have tried both mxmlc and compiler shell.

 

command line: unknown configuration variable 'swf-version'

Viewing all 5481 articles
Browse latest View live