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

Blank Line Configuration about Java Code Style

$
0
0

Hello,

I need to keep formatting of property declarations as what I left. I've tried Idea 13 and uninstalled it and now installed Intellij Idea12 Build IU173.12. After that downgrade, Code Style settings become a bit different.

I'm putting a blank line between those 2 statments:

 

privatestaticfinal String A= "a"privatestaticfinal String B = "b";

 

Formatting code trims the line between them. I don't want formatter to change the declarations. If I change Code Style->Java->Blank Lines->Around Field to 1, then Idea puts a line between each field as it implies.

What I want to Idea is, not formatting declarations. If I put a line between them, keep it, or if didn't put a line between them, keep it too.

 

As far as I remember, I don't have an issue like this before.

Thanks.


Very poor refactoring performance

$
0
0

I have been using IntelliJ 13 for the last month (as does my whole team). I am using a Mac 2.3GHz i7, and 16GB, 64bit.

java -version
java version "1.7.0_40"
Java(TM) SE Runtime Environment (build 1.7.0_40-b43)
Java HotSpot(TM) 64-Bit Server VM (build 24.0-b56, mixed mode)

 

When ever i do a refactor->move, or rename it can take as long as 1 min (single class) or > 1hr for a group of clases. CPU hits 110%

 

Intially IntelliJ was only using up to 510MB, which was suspisciously close to 512 so i increasedt he max memory to 2GB, right now it sits around 1GB, so I know that change worked.

That had no effect on the speed, so then per a SO post I deleted the ~/Library/Caches/IntelliJIdea13 folder and let intelliJ rebuild the cache/index, and it worked for that session. Also if a re-clone my git project into a new folder and open with intellij, it works faster.

 

Other than this problem I love intelliJ. Not sure if it is relevant but I also paid for the license recently.

 

Thanks

Multiple Cursors / Mass Selection and Edit

$
0
0

Hi,

 

Having a great time with IntelliJ, loving the smart features and the Darcula theme. This editor is missing one great tool that I am not so sure why you guys have not added it yet. I googled, checked the Jetbrains plugins directory but still no luck.

 

I am coming from the SublimeText3 editor and they have a nifty feature called Multiple cursors. Basically instead of doing a search and replace... you put your cursor over a variable, the same variable is highlighted in the active document and you start time. But the magic is... it changes all the instances in the selection automatically. Just go to http://www.sublimetext.com/ to see a demonstration of what I mean.

 

Any official support for this feature or a plugin or anything?

 

It's not patented or anything... so no need to freak out about all that.

 

FYI, i'm not a lawyer .

Android Project with plain Java libraries

$
0
0

Hi everyone.

 

I am developing an Android application, where I want part of project to have as a library (module) in Idea.

 

so one module is Android UI module with Gradle support, and I want to use another module from within the same project, which contains no android code, just lot of java classes. currently I cannot compile this, as I am getting following error:

Gradle: module 'Engine' won't be compiled. Unfortunately you can't have non-Gradle Java module and Android-Gradle module in one project.

 

if I add the module "library" as a module depencency to the "UI" android module, it cannot find the package from the library module.

 

last step is to have a executable java class where I can use classes from library module and use them in the executable java class.

 

how should I set up such project?

 

thank you very much in advance

 

Marek

IDEA 13 Does not generate SetModel for JComboBox

$
0
0

IDEA 13 Does not generate SetModel for JComboBox.

During JComboBox creation in UI, I've added tooltips text - "Tooltp text" and model:

1

2

3

4

 

generated result below

 

wmcombobox = new JComboBox();
wmcombobox.setToolTipText("Tooltp text");

 

there is now setmodel call in generated source code.

If I switch from source code to Java class - everything work OK.

 

     Can you help?

     Sincerely yours...

Automate insert Embed code?

$
0
0

Is possible autogenerate embed code, analogous to FlashDevelop with corerct source path and mimteType?

Slow syntax and inspection updates in editor

$
0
0

In IntelliJ IDEA v13.0.1 the inspection and refreshing of the color syntax seems to be a lot slower then in v12.

 

When I type a line containing an error and fix it, after it turned red, the error color is not always disappearing. To trigger an update of the color syntax I have to hit return or type some other characters at the end of that line.

I'm having the same problem with the color syntax. Sometimes the whole page stays gray, after doing something like typing a character or hit retun, no matter where, the page refreshes and gets colored. Also when I comment a line, the line stays colored, opposite happends also.

 

It's very hard to reproduce, it happends from time to time. I added for each problem a screenshot to illustrate.

 

Are these known issues?

Resource not copied to to build during Make IJ13

$
0
0

Background (on my setup):

Intellij compiles into "build/classes", and copies the resources into this folder, this folder is used as classPath when running.

our Gradle also compiles into "build/classes", but copies resources into "build/resources/main/", and uses both fileTrees in the classPath.

 

When I run a clean + classes in gradle, my build folder is deleted, then created without resources in (as gradle puts them elswhere). When I later run a Main from within Intellij, it appears to run a Make, but it doesn't copy the resources into my build folder (perhaps because all the class files are already there).

 

Is it a bad idea to have gradle and intellij compile to the same output directory? We were hoping it would save some time, because we alternate between running from Gradle and IntelliJ.

I don't know if this is a bug, or if sharing compile output folder between gradle and intellij is not a supported usecase.

 

any advice is welcome.

/Klaus


Is it possible to include resources alongside sources in IDEA 13?

$
0
0

Unless I'm overlooking something simple, the new java-resources content type in IDEA 13 seems to make it impossible to include resources alongside sources.  Using Gradle, I do this in some cases:

 

apply plugin: 'java'
sourceSets.main.resources.srcDir("src/main/java")

 

With IDEA 12, both src/main/java and src/main/resources would get marked as source folders.  With IDEA 13, src/main/java ends up marked as a resources folder only.

 

To give a specific case of why I'd like to have some resources alongside sources, Scene Builder for JavaFX doesn't find controller (code-behind) files when they're in a separate resources folder.

 

Is there a way I can hava src/main/java include both sources and resources?

Resume a maven build

$
0
0

Hello everyone

 

When a maven build breaks there is the possibility to startover where the build stopped. The following output is written at the end of a broken build:

 

[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :mct-vermittler-reise-impl

 

Has IDEA the possibility to recognize it and provide the possibility to startover? For example providing a button "startover" or something? The current run configuration knows the <goals>.

 

Cheers

Stefan

Local variable alignment

$
0
0

There's a setting for alignment of class's fields, so that they can be aligned in the following way:

 

        int    mask    = elements.length-1;

        double newSize = 10.5;

        string s       = "xxxx";

 

but there doesn't seem to be an option for same alignment of local variables in a function, is there? If not, it seems like a shortcoming that needs to be added.

Rebuild does not find some JDK classes but build does

$
0
0

Hi,

 

I have a weird problem. In one of my projects a compile error suddenly appeared when issuing a "Rebuild":

 

java: /Users/krueger/repos/de.lesspain.mediatool/de.lesspain.mediatool/src/de/lesspain/mediatool/browser/BrowseViewPartImpl.java:905: cannot find symbol

symbol  : class JButton

location: class de.lesspain.mediatool.browser.BrowseViewPartImpl

 

The referenced class is javax.swing.JButton and is included and in the editor I can navigate the link without problems.

 

When I then hit "Make Project" the error (and all the ones that are caused by it) goes a way. This is reproducible. I even tried clearing my cache and restarting but nothing helped.

 

Upgrading to version 13 (Community Edition) did not change anything either. I am working on Mac OSX with Apple's JDK6.

 

Any idea anyone?

 

Regards,

 

Robert

Idea 13.0.1 Maven Dependencies not loaded

$
0
0

I just tried upgrade from IntelliJ 12.0.6 to 13.0.1, but for some reason the Maven dependencies are not loaded. Our pom is multi-module. It loads fine with 12.0.6 and works fine from the command line with Maven 3.0.4.

 

The Dependencies are not visible from from the Maven pane and are not available for compilation.

 

IdeaNoDeps.jpg

Automatically scroll to first difference when comparing files?

$
0
0

Hi! Is there any way to configure Intellij to automatically scroll to the first difference when comparing two files?

 

For example, when comparing local changes before a commit, often there are big files with one change halfway down. It would be a big time saver to be able to configure the IDE to automatically scroll to the first diff after opening the comparison window.

Very poor refactoring performance

$
0
0

I have been using IntelliJ 13 for the last month (as does my whole team). I am using a Mac 2.3GHz i7, and 16GB, 64bit.

java -version
java version "1.7.0_40"
Java(TM) SE Runtime Environment (build 1.7.0_40-b43)
Java HotSpot(TM) 64-Bit Server VM (build 24.0-b56, mixed mode)

 

When ever i do a refactor->move, or rename it can take as long as 1 min (single class) or > 1hr for a group of clases. CPU hits 110%

 

Intially IntelliJ was only using up to 510MB, which was suspisciously close to 512 so i increasedt he max memory to 2GB, right now it sits around 1GB, so I know that change worked.

That had no effect on the speed, so then per a SO post I deleted the ~/Library/Caches/IntelliJIdea13 folder and let intelliJ rebuild the cache/index, and it worked for that session. Also if a re-clone my git project into a new folder and open with intellij, it works faster.

 

Other than this problem I love intelliJ. Not sure if it is relevant but I also paid for the license recently.

 

Thanks


Invalid item in the dependencies list?

Debugging Jython that's executed within a Java application

$
0
0

This may be a dumb question, and it may be more of a programming language issue than an IDEA issue, but here goes:

 

I have a Java servlet that executes some Jython code, and I want to be able to set breakpoints both in the calling Java code and in my Python code. IDEA is happy to stop at my Java language breakpoints, but it does not stop at the breakpoints in my Jython code.

 

My question is: Is there any hope of making this work? Or must I resign myself to the idea that I'll just need to write and debug my Python code in isolation, plugging it into my servlet when all my unit tests pass.

 

My understanding is that when I instantiate a Jython interpreter, load my file and execute it, that the Python code gets JIT'ed into JVM bytecode. I'm guessing that the debugger would need some extra information to be able to associate this bytecode with my dynamically-loaded Python source code.

 

My thanks in advance to anyone who has information or an opinion.

Unable to debug a Gradle/Groovy project.

$
0
0

I'm using Gradle to build a Groovy project and I'm unable to configure either Gradle or InteilliJ IDEA appropriately to allow me to debug the project. I've created a barebones project exhibiting the behavior when running a simple test case.

 

My project builds and tests execute successfully, but if I set a breakpoint in either of the 2 lines of executable code and use the settings below for remote debug, it doesn't work. IDEA connects successfully but never stops execution.

 

Please help.

 

The example code is at https://github.com/clstokes/gradle-groovy-debug-test.

 

My gradle environment is:

------------------------------------------------------------
Gradle 1.2
------------------------------------------------------------

Gradle build time: Wednesday, September 12, 2012 10:46:02 AM UTC
Groovy: 1.8.6
Ant: Apache Ant(TM) version 1.8.4 compiled on May 22 2012
Ivy: 2.2.0
JVM: 1.7.0-u10-b09 (Oracle Corporation 23.6-b03)
OS: Mac OS X 10.8.2 x86_64

 

My build.gradle looks like this:

 

apply plugin: 'idea'
apply plugin: 'groovy'

repositories {
  mavenLocal()  mavenCentral()
}

dependencies {
  groovy(      "org.codehaus.groovy:groovy:2.0.5"  )  testCompile(      "org.testng:testng:6.8"  )
}

test {
  useTestNG()
}

 

I set GRADLE_OPTS as the following:

 

export GRADLE_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"

 

And my debug configuration in IDEA looks like this:

2012-10-30_1923.png

Check out from version control (git) with submodules

$
0
0

Hi, I've just ported a large project to IDEA 13.0.1 on Linux and it's working wonderfully, thank you!

 

I am writing instructions for team members on how to clone our git repository. I'm using the initial dialog and the option Check out from Version Control > Git

 

Everything works fine except that we have a git submodule which points to a github project and the clone did not recursively check this out. How do I do a recursive check out from git version control with submodules?

 

Thanks

View saved passwords?

$
0
0

Hello,

 

I forgot the password for my Android keystore, but it's saved in IDEA and protected with a master password. I know the master password, so IDEA autocompletes the keystore password and I can build the app, but I don't know how to actually see the password. For the time being I'm fine, but if anything happens to my IDEA installation, I'm losing the password.

 

So my question is: how can I see the saved password in clear text? Is there a plugin that does this, maybe?

 

If it's not possible, what files do I need to back up to make sure I can restore the IDEA passwords? I'm using the latest version, 13.0.1.

 

If there's anyone that knows the IDEA APIs and can decrypt the encrypted password, I'm willing to give you my master password and whatever files are necessary.

 

Thank you!

Viewing all 5481 articles
Browse latest View live