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

eclipse compiler and lombok not working

$
0
0

I am getting compilation errors when trying to use the new eclipse compiler and the lombok library that does compile time code generation. I have no problems with the standard compiler. Has anyone experienced this? Is there a something I need to configure or a work-around?

 

cheers,

Florian


Find Usage Options in IDEA 12.0.2

$
0
0

Where do I find the "Find Usage Options" to get method implemntations listed in the Find-Window like under IDEA 11.1.2. ?

The "Go To Implementations" works only manageable if the list is small.

How to output UTF-8 In Console for Tomcat Webapps?

$
0
0

I need to output Japanese to the IntelliJ console for my webapp logging. When I run a junit test, the correct UTF-8 chars show up. While running inside of Tomcat in IntelliJ, the characters are messed up. How do I fix this?

 

I am running IDEA 10.0.3 with the settings File Encoding -> IDE Encoding set to UTF-8. I even put -Dfile.encoding=UTF-8 inside of the catalina.bat file and verified the encoding is UTF-8 with:

 

        System.out.println(System.getProperty("file.encoding") + ": é à ê");

 

but I get:

UTF-8: é à ê

 

instead.

 

What else can I set to make sure a Tomcat webapp displays UTF-8 in the IDEA console? Why does it work in a unit test but not a webapp?

 

Thanks.

Share .idea folder between users?

$
0
0

Hi Folks,

 

We've just hired a couple of new developers, and as I prefer Intellij (Used it for years as a java IDE, then discovered the PHP plugin, and now use it as a PHP IDE!), I'm getting the new staff to use it instead of Netbeans.  But two days in, we found a bit of an issue... - being that for quite a few projects, we all point at one codebase on the dev server - so we're all sharing the one .idea folder.  Which means that randomly (I think whenever someone opens or closes a file), everyone else's Idea goes 'your settings have been modified', and then it restarts idea and gives you the other developer's open tabs!  With one copy of Idea, and multiple copies of netbeans, it worked quite nicely, with source code refreshing in front of you if someone else updated it.. But now with multiple Idea's it's getting messy..

 

Is there a way around this?  We quickly tried moving the .idea folder somewhere else, but then it doesn't find the source code..

 

Cheers,


DG

No console output when debugging chrome - Intellij idea 12.02

$
0
0

Hi

I have a javascript project.

I am using intellij idea 12.02

I saw a few posts on this but dont quite understand what the status is right now.

Question 1.

when debugging in firefox , all the output comes to the the intellij console. (console.log , ReferenceError ..etc)

when debugging with chrome , the output goes to the chrome browser console (development tools) only and the intellij console is empty.

how do I get the output to also be redirected to the idea console with chrome

 

Question 2 : each time I debug with chrome I get a "Jetbrain chrome extension is debugging this tab.." and I have to click it to continue

is there anyway , to avoid having to do this each time ?

 

thanks.

Simple JSF application is running fine , but Tomcat Log reports an error

$
0
0

I am reading this nice guide (http://wiki.jetbrains.net/intellij/Developing_JSF_applications) an I have created the first simple hello world JSF application.

The application runs fine (the browser address bar says http://localhost:8080/index.faces) but i get a warning in the Tomcat Log like this :

 

Jan 31, 2013 11:12:39 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [jsp] in context with path [] threw exception [An exception occurred processing JSP page /index.jsp at line 14

11:   <head><title>Simple jsp page</title></head>
12:   <body>
13:
14:   <f:view>
15:       <h:outputLabel value="Hello, world"/>
16:   </f:view>
17:


Stacktrace:] with root cause
java.lang.RuntimeException: Cannot find FacesContext
    at javax.faces.webapp.UIComponentClassicTagBase.getFacesContext(UIComponentClassicTagBase.java:1855)
    at javax.faces.webapp.UIComponentClassicTagBase.setJspId(UIComponentClassicTagBase.java:1672)
    at org.apache.jsp.index_jsp._jspx_meth_f_005fview_005f0(index_jsp.java:111)
    at org.apache.jsp.index_jsp._jspService(index_jsp.java:83)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:722)

 

Any ideas?

Thank you.

How to undo a commit in a local branch - git

$
0
0

I did some commits in a local branch through intellij in multiple git repositories. How can I undo those commits? I need the code changes after the undo (marked them as local changes).

IDEA not updating libs at all (Flash)

$
0
0

So, ive been sitting here now for 4 hours and wondering why the heck my application uses wrong methods.

 

Finally i discovered that the ANE and SWC that are included in my app (under dependencies tab) are not re-loaded.

I mean, ive created new SWC as well new ANE, at least 50 by now, but i still get error in logcat that the method im trying to call is not there.

 

So as fast test, added Log.d into every method, after every line of code in Java (not a big lib so it was no pain ) and when rebuilding the AS3 lib

then using my ANEBuilder to compile ANE file, and finally running the application in debug.. i see no log.d's there.

 

This means, My application project, has cached something. big time and hard!

Now, i've also run both variants under File -> Invalidate cache, but still absolutely no progress, still stuck with a old SWC / ANE

 

When removing both ANE and SWC from app, intelli complains, (awesome, this must work) and when adding them back under dependencies,

ahh back to square one, same old ANE is compiled into the app.

 

 

So, how do i ALWAYS get the latest SWC and ANE into my apps ?

 

Eclipse and Flash Builder are good at that, just save and everything is done behind the scenes. Also the SWC is updated from eclipse / fb  when saving the .as file.

Is there something similar in Intelli ? Like Clean project in Eclipse ?


git revert supported?

$
0
0

Hi,  I'm not able to figure out how to do the command 'git revert <hash>' from within Idea.   I've looked at all the help and I don't even see anyone else having this issue, so I assume it is possible but I'm just not seeing it.   Can someone either point me to the correct help documentation or describe the steps I need to do for a "git revert".   Thanks!

Generate WADL From Java Code Menu Option Disabled

$
0
0

I am running 12.0.3 on Mac OS (10.8.2) using Maven 3.x and CXF 2.7.2 JDK 1.6.  I have enabled Facet WebServices to select  CXF as its WS Engine.  What am I missing?  I thought CXF was able to generate a WADL?

AIR installer misconfigured

$
0
0

I have my AIR project set up to use a code-signing cert when packaging which seems to go fine but when I try to run the installer I get "installer misconfigured".

 

Don't see anything obvious in the module settings.

 

Any help or advice appreciated!

 

Jeff

ambiguous method call bug

$
0
0

I upgraded from 12.0.1 to 12.0.2 and started seeing ambiguous method call errors where I didn't see them before.

 

And as you can see in the screenshot, the error message doesn't make much sense.

 

I've seen ambiguous method call bugs mentioned in intellij11 at stackoverflow.

 

Any ideas on what to do? I can still build at the command line but it's annoying having errors in my ide.

TextMate Bundle support vs. paired braces

$
0
0

Hi,

 

In order to have syntax highlighting for LaTex-files, I used IDEA's new TextMate Bundle support, and installed/aktivated TextMate's LaTex Bundle, which actually gives me syntax highlighting for LaTex-files, as expected. So far so good. But what doesn't work, is support for paired braces/parens/brackets, which I would get, if I would register *.tex-files under IDEA's File Types settings - but then I would loose the syntax highlighting support via the TextMate's LaTex Bundle. So my question is: would it be possible in future versions, to activate/configure paired braces/parens/brackets in addition to a TextMate Bundle  for specific file extensions?

 

Best wishes,

Tom.

spring config jndi-lookup id="foo" marked red as not allowed

$
0
0

I have a spring 2.x config file that contains a <jee:jndi-lookup id="xxxxxDS"..../>

This is working fine but IntelliJ marks it as wrong:

Screen Shot 2013-01-31 at 19.24.58.PNG

If you check the documentation, this attribute is meant to be specified,

the xsd (http://www.springframework.org/schema/jee/spring-jee-2.0.xsd)

says that jndi-lookup extends jndiLocatingType which in turns extends beans:identifiedType that contains:

<xsd:attribute name="id" type="xsd:ID">

 

So why is IntelliJ saying that I can't have an id there ? I can't even turn it off. As you can see in the screenshot...

 

I'm using IDEA 12.0.2 on a Mac if that has anything to do with it.

Auto-creation of mock variables when writing tests (or something similar)

$
0
0

I wonder what do people do in cases like:

I'm writing a test for a service class that depends on a lot of other classes, so I need to build it by passing various mocks to the constructor:

 

SomeClassUnderTest classUnderTest = new SomeClassUnderTest(dependency1, dependency2, dependency3, ...);

 

the question is, what is the best way to create everything quickly?

 

E.g.: I start by typing:

 

new SomeClassUnderTest(

 

at this point, I'd like to have a quick way to create mocks for all of the parameters, and use them, that is, for each param introduce a mock field in the test such as

 

@Mock DependencyType1 dependency1; // we use mockito for our mocks, but EasyMock is similar

 

and use that in the new clause:

 

new SomeClassUnderTest(dependency1,

 

then go on (or even do all of them in one go).

 

Do you guys have a quick solution for this workflow?


Is the maven dependency graph canvas size a bug?

$
0
0

I love the dependency graph display. But on projects with long lists of dependencies (where I need it the most), the size of the canvas that the graph is drawn on is many times bigger than the graph. This makes it hard to keep on the screen when scrolling with the mouse, especially horizontally.

 

1_1_Screen Shot 2013-02-01 at 13.54.26 PM.png

My screenshot shows a typical example, zoomed into 1:1.

 

The displayed portion of the graph is an example of how wide the graph is. You can see that the horizontal scrollbar (emphasized with a magenta arrow) at the bottom shows that we can scroll for dozens of screens to either side. Those screens are all blank, of course, top to bottom. The vertical scrollbar is also not quite proportional. If I scroll it to the top, the graph starts after about 5 or 6 screen lengths of scrolling down. If I scroll to the bottom, the graph is dozens up screens of scrolling upwards.

 

How big is the full graph? It's pretty tall:

Fit_All_Screen Shot 2013-02-01 at 13.57.42 PM.png

At this scale, the entire canvas is shown and no scrollbars show.

 

If I zoom in a little,  you can see that the scrollable area is much larger than the graph, as the scrollbar thumbs (magenta highlights added) show.

Zoom_out_Screen Shot 2013-02-01 at 13.52.40 PM copy.png

It would be much easier to keep the graph on screen, when zoomed into 1:1, if the horizontal and vertical scrolling were limited to the area of canvas which has the graph on it.

Is there some way I can use this that will let me easily scroll around, for instance between dependencies showing conflicts (which are often many screens apart) without getting lost in the huge amount of blank space around the graph? Can this blank space be eliminated?

 

I am using Intellij IDEA IU-123.150, on MacOSX 10.8.2 JVM 1.6.0_37 (Apple), using the Darcula look and feel. But this behavior has existed, at least on all my development machines, since the introduction of the graph feature in version 10.

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

Is AppCode not available to IntelliJ Ultimate?

$
0
0

It is not on the comparison chart, and that would make it the odd one out. If so, then is it in the plans to make it available as a plugin for the Ultimate ed?

I'm contemplating upgrading to IntelliJ from phpStorm, but if I have to buy appcode separately then it may not be worth it, and I would rather just get the ide's that I need separately. So I wanted to confirm this here first. Thanks

Tomcat server to not response

$
0
0

Hello.

 

I trying to make this simple lesson: http://wiki.jetbrains.net/intellij/Creating_a_simple_Web_application_and_deploying_it_to_Tomcat

 

I have install Tomcat 7 by Homebrew (for Mac OS X Mountain Lion).

I have Intelij Idea 12

 

Following this lesson I created empty project, added dir to Tomcat7 installation (Idea got it).

 

In documentation I see: in the Project tool window, right-click index.jsp and choose Run index.jsp on the context menu. IntelliJ IDEA creates a temporary run configuration index.jsp on the fly and launches the application.

 

I tryed to right-click on index.jsp and do not see "Run index.jsp" element.

 

...

 

When I tryed to run project by menu "Run => ..." all menu elements are disabled. Only "Edit configurations" enabled. I open it, create new configuration and select all like in this screenshot:

 

https://api.monosnap.com/image/download?id=Rvrz9t9TjrnohlqJMghnzfjQw

 

And when I run project I see in output panel this

> /usr/local/Cellar/tomcat/7.0.35/libexec/bin/catalina.sh run

 

There are no messages about error.

 

When I open http://localhost:8080, browser says that "Server not found".

 

When I stop it and run by console:

> catalina run

 

default Tomcat server runs OK.

 

Can you help?

Android Debugger not Connecting

$
0
0

When I try to debug an android app I get an error. It happens after everything compiles and the app actually opens on the phone and says waiting for debugger.  Anyone know how to fix this? I do have CyanogenMod running on my phone if that makes a difference.  Below is the error.

 

Error Running Android App:

Unable to open debugger port: java.net.connectexception: "Connection refused: connect"

Viewing all 5481 articles
Browse latest View live