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

More flexible tool window layouts

$
0
0

Hi,

 

Is it possible to add a feature request to increase the flexibility of tool window layouts?

 

1) Make tool windows closable - you can see the demand for this on StackOverflow.

 

2) Customisable tool window shortcut keys.

 

Thanks,
Lawrence


Where is the gradle test report?

$
0
0

When I run gradle outside the IDE, the generated test report is in

build/reports/tests/index.html. Inside IDEA, when I run "gradle build" I don't even see the build folder. Is there an easy to get access to the test report?

 

Thanks!

How to make Java singleton from .form?

$
0
0

I need to create a swing GUI using IDEA tool "UI Designer" and make it a Singleton.

I already have a ServerFace.form that is binded to class ServerFace.java I also have a class Index.java that makes the first initialization of ServerFace.

 

See the code of both classes below (there is no code in ServerFace.form):

 

ServerFace.java(class binded to ServerFace.form):

 

import javax.swing.*;publicclassServerFace{    privateJPanel panel1;    privateJButton startServerButton;    privateJButton stopServerButton;    privateJButton clearLogButton;    privateJTextArea textArea1;//Make it Singleton--------------------------------------    privatestaticvolatileServerFace instance;    publicstaticServerFace getInstance(){        if(instance==null){            synchronized(ServerFace.class){                if(instance==null){                    try{                        instance=newServerFace();                    }catch(Exception e){                        System.out.println("failed to create UI: "+e+"  |  "+e.getMessage());                    }                }            }        }        return  instance;    }    privateServerFace()throwsException{    }    privatevoid createUIComponents(){        // TODO: place custom component creation code here    }}

Index.java (class that gets instance of ServerFace.java):

 

import javax.swing.*;publicclassIndex{    privatestaticServerFace _gui;    publicstaticvoid main(String[] args){        _gui =ServerFace.getInstance();    }}

When I try to compile it throws an Exception "failed to create UI: java.lang.NullPointerException | null"

What's wrong and how to get it right?

Issue with _JETGROOVY_EVAL_() in the debugger with grails.

$
0
0

When tyring to evaluate anything in the debugger in a grails app, the result of the evaluation is the following exception.

 

result = {org.codehaus.groovy.runtime.InvokerInvocationException@15328}Method threw 'org.codehaus.groovy.runtime.InvokerInvocationException' exception.
module = null
node = null
detailMessage = null
cause = {groovy.lang.MissingMethodException@15661}"groovy.lang.MissingMethodException: No signature of method: com.something.AppService._JETGROOVY_EVAL_() is applicable for argument types: () values: []"
stackTrace = {java.lang.StackTraceElement[164]@15330}

 

Googling only gives me a hit in org.jetbrains.plugins.groovy.debugger.GroovyCodeFragmentFactory!

 

I dont really have a specific question as I am not really excited to debug grails stuff one more time.

If you have something to say about that, you can say it here.

 

This is with grails 2.1.3 and intellij 13.0.1

I am pretty sure I saw this error also in intellij 12.

 

 

 

 

 

 

 

 

IDEA IU 13 running out of memory

$
0
0

I started having my Intellij 13.01 running out of memory. I am prompted with a dialog and I have increased the memory setting to 3072 MB, but it still runs out after 20-60 minutes, and am forced to restart each time. The second and third fields in the dialog (I forget the label) I also increased to 384 MB, and 128 MB.

 

I do not know of any significant project changes I have done on my end that would have triggered this.

 

I tried IU-133.609 EA (with included 1.7 JRE), but it appears to do the same.

 

I updated my java three or four weeks ago to java version "1.7.0_45", but this memory problem only gradually started happening over the last few days.

 

Is there any logs, settings I can look at that would give me an indication of how I can solve this?

IntelliJ 13 Create Struts 2 App

$
0
0

Hi I am new to IntelliJ IDE. I downloaded the IntelliJ 13 Ultimate for a month trail.

I create a Strust 2 app through "Create project", selecting "Java", then checking "Struts2" box. Then the IDE downloads the Struts2 jar for me.

After that, I just try to run it on local Tomcat 7.0 server right away. It gives the following errors.

 

Jan 17, 2014 9:26:07 PM org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception starting filter struts2
java.lang.ClassNotFoundException: org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1702)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1547)
at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:532)
at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:514)
at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:142)

 

What did I miss here?

 

Thanks!

Upgrade to Intellij 13 or install Eclipse?

$
0
0

Hi there.

 

Tried to upgrade intellij, it promised toresent me e-mail describing available renewal options for the license key I specified. Half of an hour passed, no email. So now I'm wondering if I manage to install eclipse (maven, svn, git and import my projects) before I'll get email. What do you think?

 

Best regards, Eugene.

Custom Swing Theme Designer... offer free themes for Java Apps?

$
0
0

Hi,

 

I am having an awesome time to IntelliJ. I love Python because of its simiple syntax and was not too fond of Java because of some of the redundant things it makes you do. But thanks to IntelliJ... things have been better. Java doesn't feel so bad anymore .

 

Anyways, I was wondering why not pack custom Swing based themes along with IntelliJ. Most of the Java developers prefer swing because of its stable reputation but when it comes to customization, that's an argument for another topic.

 

How about Jetbrains offer custom swing libraries along with IntelliJ as a gift to the Java developers. And I am curious what framework or what you used to design the UI for IntelliJ Darcula theme itself?

 

Java promotes http://www.javootoo.com/index.html for your swing theming needs but the skins are just not that cool :/

 

I want  to make my apps look professional like IntelliJ darcula !


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

Creating Groovy Classes in Grails

$
0
0

I'm trying to do some Grails development using IDEA 13 EAP (133.609) on Windows 7.  I bumped into something that may be an IDEA issue, or simply my not understanding how to use it properly.

 

For those not familiar with Grails (a truly wonderful web application platform!), a Grails project has a very specific directory structure. Different Grails artifacts go into different directories, but general purpose code not one of the Grails artrifacts goes under either the /src/groovy or /src/java folder, depending on whether it's Groovy or Java source.

 

I wanted to create a general purpose Groovy class in the package com.example.  My natural inclination was to right click on the src/groovy folder in IDEA and choose New | Groovy Class. The only problem with that approach is, there is no such menu.  There is an option for a New | Groovy Script, but a Groovy Script isn't really the same thing as a Groovy class.

 

I then right clicked on the src/java menu, and what do you know!  There's a New | Groovy Class menu item available from a context menu on src/java.  Thinking maybe the menu is just misconfigured and a Groovy class would actually get created under the src/groovy folder, I chose that New | Groovy Class option and entered com.example.Sample. Indeed, a Groovy class was created in the correct package, but the package and Groovy class was created in the src/java folder.

 

I'm thinking the New | Groovy Class menu is just being associated with the wrong folder (src/java instead of src/groovy).  (Of course, the same misconfigured menu options are available from the main menu; i.e., with src/groovy selected there's no File | New | Groovy Class option, but with src/java selected there is.)

 

Since I'm not sure if Grails would have an issue with a Groovy class in the src/java folder, I manually moved the package and Groovy class to the src/groovy folder.  I can continue to do this to work around IDEA, but am left wondering,

 

Is this a bug or a feature, or am I just doing something wrong? :-)

 

Thanks for any help.

 

Jack

PS. While experimenting, I also noticed the New | Groovy  Class created a class properly, but the source generated for Interface,  Enum, and Annotation types all included the public visibility modifier which is assumed in Groovy.

Adding Testflight sdk

$
0
0

I was wondering how to add the Testflight sdk to an android project in Intellij 13.

 

They have some instructions here for using Eclipse which involbes dragging and dropping the .jar file into the lib directory.

http://help.testflightapp.com/customer/portal/articles/1279844-how-to-create-an-apk-adt-bundle-http://

 

I tried dragging and dropping with Intellij and using using the import statemnt.  But still get some errors.

I used this import statement:

​​import com.testflightapp.lib.TestFlight;

I have also tried this one.

​​import com.myappproject.libs.TestFlight;

Alt + Tab Problem in IntelliJ IDEA 13

$
0
0

Hi,

 

I am having a problem in IntellJ IDEA 13 when I am using the alt+tab key combination. Sometimes, it doesn't work and the focus still stays on IDEA and not the other window I am tabbing into. I think I do not encounter this in version 12. Hope for some response from any of you guys.

 

Thanks

Running Groovy scripts

$
0
0

Hi. Problems with included Sax libraries when running from Intellij.

 

Groovy script that I run on the command line:

 

> groovy updateMembersLocal.groovy

 

Groovy 2.2.1. Intellij 13.0.1

 

I have setup the script in a module in a project that also contains a grails project. Run config has everything removed (make especially):

 

Screen Shot 2014-01-20 at 12.41.27 PM.png

 

 

Module settings are cut back. Purpose - try to get rid of conflicted Sax library.

 

Screen Shot 2014-01-20 at 12.41.27 PM.png

 

I get this Sax error:

 

/System/Library/Frameworks/JavaVM.framework/Home/bin/java -Dtools.jar=/System/Library/Frameworks/JavaVM.framework/Home/lib/tools.jar -Dgroovy.home=/Users/johnrobens/opt/groovy-2.2.1 -Dgroovy.starter.conf=/Users/johnrobens/opt/groovy-2.2.1/conf/groovy-starter.conf -Didea.launcher.port=7538 "-Didea.launcher.bin.path=/Applications/IntelliJ IDEA 13.app/bin" -Dfile.encoding=UTF-8 -classpath "/Users/johnrobens/opt/groovy-2.2.1/lib/groovy-2.2.1.jar:.:/Users/johnrobens/NetBeansProjects/civiLink/out/production/CiviWart:/Users/johnrobens/NetBeansProjects/civiLink/CiviWart:/Applications/IntelliJ IDEA 13.app/lib/idea_rt.jar" com.intellij.rt.execution.application.AppMain org.codehaus.groovy.tools.GroovyStarter --conf /Users/johnrobens/opt/groovy-2.2.1/conf/groovy-starter.conf --main groovy.ui.GroovyMain /Users/johnrobens/NetBeansProjects/civiLink/CiviWart/updateMembersLocal.groovy

Caught: java.lang.LinkageError: loader constraint violation: when resolving overridden method "org.apache.xerces.jaxp.SAXParserImpl.getParser()Lorg/xml/sax/Parser;" the class loader (instance of org/codehaus/groovy/tools/RootLoader) of the current class, org/apache/xerces/jaxp/SAXParserImpl, and its superclass loader (instance of <bootloader>), have different Class objects for the type org/xml/sax/Parser used in the signature

java.lang.LinkageError: loader constraint violation: when resolving overridden method "org.apache.xerces.jaxp.SAXParserImpl.getParser()Lorg/xml/sax/Parser;" the class loader (instance of org/codehaus/groovy/tools/RootLoader) of the current class, org/apache/xerces/jaxp/SAXParserImpl, and its superclass loader (instance of <bootloader>), have different Class objects for the type org/xml/sax/Parser used in the signature

at org.apache.xerces.jaxp.SAXParserFactoryImpl.newSAXParser(Unknown Source)

at org.apache.ivy.util.XMLHelper.newSAXParser(XMLHelper.java:62)

at org.apache.ivy.util.XMLHelper.parse(XMLHelper.java:133)

at org.apache.ivy.util.XMLHelper.parse(XMLHelper.java:109)

at org.apache.ivy.util.XMLHelper.parse(XMLHelper.java:99)

 

The script does have @Grab in it - and intellij is not recognising HTTPBuilder.

 

@Grapes([

@Grab(group = 'org.codehaus.groovy.modules.http-builder', module = 'http-builder', version = '0.6'),

@Grab('mysql:mysql-connector-java:5.1.27'),

@GrabConfig(systemClassLoader = true)

])

 

import au.com.interlated.civiLink.civiWart.UpdateCiviCRM

import au.com.interlated.civiLink.civiWart.UpdateCiviLink

 

import groovy.sql.Sql

import java.sql.*

 

//import au.com.interlated.civiLink.sync.ChangeRecordBatch

import groovyx.net.http.HTTPBuilder

import groovy.json.JsonBuilder

import static groovyx.net.http.ContentType.URLENC

import groovyx.net.http.HttpResponseException

import groovy.json.JsonSlurper

 

new RunCiviSync(args)

 

class RunCiviSync {

 

 

 

How do I run this script?

 

Thanks for your help.

 

John

GWT DevMode creates .class file in my source root

$
0
0

Hi Forum

 

When I run GWT (DevMode run configurartion) a lot of class files are generated next to my .java files.

Does anyone know if there is a way to tell DevMode to put the compile output in /build instead ?

 

Regards,

Klaus

Resource not copied to build folder 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


Where is the gradle test report?

$
0
0

When I run gradle outside the IDE, the generated test report is in

build/reports/tests/index.html. Inside IDEA, when I run "gradle build" I don't even see the build folder. Is there an easy to get access to the test report?

 

Thanks!

Default values for ant configuration

$
0
0

We always have to set properties and additional classpaths to our ant files. As this is time consuming and error prone we want to automate it some how.

 

Is there a possibility to define default values for the configuration of ant files? Or how can we achieve this alternatively?

 

Thanks in advance and kind regards

Stefan

Hibernate or EclipseLink

$
0
0

I'm rather new in the Java world (coming from .NET/C#) and so also with Intellij IDEA. My question: what would be in general and more particular with Intellij IDEA the prefered ORM: Hibernate or EclipseLink, or doesn't it matter if both are equally supported? I need to persist in a first phase to MySQL and in a second phase also to MongoDB (both in a REST services setup with Tomcat 7).

 

Thanks.

IDEA IU 13 running out of memory

$
0
0

I started having my Intellij 13.01 running out of memory. I am prompted with a dialog and I have increased the memory setting to 3072 MB, but it still runs out after 20-60 minutes, and am forced to restart each time. The second and third fields in the dialog (I forget the label) I also increased to 384 MB, and 128 MB.

 

I do not know of any significant project changes I have done on my end that would have triggered this.

 

I tried IU-133.609 EA (with included 1.7 JRE), but it appears to do the same.

 

I updated my java three or four weeks ago to java version "1.7.0_45", but this memory problem only gradually started happening over the last few days.

 

Is there any logs, settings I can look at that would give me an indication of how I can solve this?

Invalid item in the dependencies list?

Viewing all 5481 articles
Browse latest View live