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

Warnings on scrollbar?

$
0
0

I've got most of the code inspections turned on as I feel I am still learning when it comes to programming best practices, I thought I had finally rid a small java project of warnings, but then I saw more in the scrollbar that didn't appear inline.

 

Is there a reason these are seperated out, instead of being displayed in the editor?

 

And in the code glance highlights you can see them being displayed.

 

I'm confused, is the normal method of viewing these warnings via the scroll bar? Are they any different to the warnings that are displayed inline?

 

http://i.imgur.com/kGzwtuz.pnghttp://i.imgur.com/Dj2JaHw.png


PHP testing is being cut off mid stream

$
0
0

Hi

 

I have just installed IntelliJ with PHP plugin and opened one of my projects.

 

So - I see the debug > Run and tons of other options, but all I did was click the little Chrome Icon on the popup that was in the editor.

 

Chrome launched with an error page (I forget the exact message) and had Jetbrains listed at the bottom. In the main IntelliJ window, it said "interpretor not configured". I then went through a few pages and selected the php-cgi.exe process on a download of PHP.

 

I then refreshed the page and it rendered PHP fine, but, I noticed only about half the page was there - it is cutting off mid stream... For example, the last line of view source is:

 

<option value='5412'>foobar</opt

 

 

I can't see any page size limit or similar and am rather confused.

 

Can someone help please?

 

Thanks

Database view error

$
0
0

i recently upgraded from intellij 14.0.3 to intellij 14.1.3 and the database view does not work anymore.

 

when i try to execute a query, i get this stack:

[2015-05-27 10:12:39] java.lang.ClassNotFoundException: sun.io.UnknownCharacterException
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at com.ibm.db2.jcc.b.a.<init>(a.java:238)
at com.ibm.db2.jcc.b.b.a(b.java:1624)
at com.ibm.db2.jcc.c.p.a(p.java:350)
at com.ibm.db2.jcc.c.p.<init>(p.java:404)
at com.ibm.db2.jcc.b.b.<init>(b.java:256)
at com.ibm.db2.jcc.DB2Driver.connect(DB2Driver.java:163)
at com.intellij.database.remote.jdbc.impl.RemoteDriverImpl.connect(RemoteDriverImpl.java:27)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:323)
at sun.rmi.transport.Transport$1.run(Transport.java:200)
at sun.rmi.transport.Transport$1.run(Transport.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$254(TCPTransport.java:683)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler$$Lambda$2/17886951.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

the database is a db2 localhost database with the following url: jdbc:db2://localhost:50000/<db.name>

under the advanded tab: retrieveMessagesFromServerOnGetMessage=true

 

this configuration worked fine in 14.0.3, but after the upgrade it is ruined...

how to inspect the value of an exception catch block variable in the debugger ?

$
0
0

Good day -


I have a process I am trying to debug that does, in some method :

        ...

          try

          {

               do_action() ;

          } catch ( Throwable t )

          {

*             throw new SomeOtherException( t ) ;

          }

        ...

I have got the debugger to break at the line indicated by the asterisk,

but it does not let me see the value of exception 't' - Idea 14.1.3 pops

up an error dialog with the message :

   "Cannot find local variable 't' ."

when I try to evaluate the expression 't' or 'System.err.println(t)' .

 

This is not a process I control the source code of (it is an ancient gradle-1.12 release

that I am trying to debug to find out why it fails to execute a certain task ).

 

Can anyone suggest how I could discover what 't' is - ie. the exception originally thrown

by do_action() ?  Is there any way of inspecting this value with IntellIJ Idea?

The 'SomeOtherException' object does not indicate what 't' is.

 

Thanks & Regards,

Jason

OS X 10.11 problems

$
0
0

Hi,

 

Could not wait to look at new OS X, but got some problems with it (as usual). Main things are:

— if you are installing 10.11 from scratch, current Apple Java 6 installation cannot be installed. And even after installing 1.8 from Oracle, Idea and AppCode would not start

— if you are upgrading from 10.10, you can update idea.properties (don't know why this does not work after a clean install) for Idea to accept JDK 1.8 and everything starts.

— if I start "custom JDK" build on my MBP Retina, I get everything blurry as it is not using retina resolution.

— if I start a debugging session, I get "java.lang.ClassNotFoundException : com.sun.tools.jdi.SocketTransportService" error and it cannot start at all.

 

Is there a correct place (bug URL) where I can put all these things for you guys to check them?

 

Thanks!

Code format not working in Mac OS X 14?

$
0
0

I've just recently started using IntelliJ from Eclipse, and I am having a very hard time getting code formatting to work as I expect.

 

It doesn't even seem to be respecting the formatting I set up for YAML files, which was to simply indent by 2 spaces. I've attached a screen shot showing a clearly out-of spec YAML file and the fact IntelliJ seems to think it's formatted correctly.

 

I've had similar problems with Java files and the layout of imports. I edited the config to add a blank line between each group and it never formats that way.

 

What's going on? Is this just broken?

Develop Openbravo with IntelliJ IDEA 14.1.3

$
0
0
I am Openbravo developer and I 'm moving from Eclipse to IntelliJ. I have trouble setting artifacts and run configurations. Any suggestions? Thanks.

Gustavo Orozco

Problems With Edit Code

$
0
0

Hi Friends

 

I'm using InteliJ Communty Edition but I have a problem ...

 

I try to edit the code block below

     private void OnOK () {

         dispose ();

     }

 

For example in that block of code I want to enter dispose before and I will not let you keep dispose on the same line, then dispose like ... it's like netbeans that prevents X edition of code blocks ...

 

They know how I can fix this?

 

Sorry for my English


couldn't find OSGi bundle dependency

$
0
0

I have declared a OSGi bundle as a dependency in pom.xml, like

 

<dependency>

     <groupId>foo.bar</groupId>

     <artifactId>foo-bar</artifactId>

     <version>0.1.0</version>

     <type>bundle</type>

</dependency>

 

but in the 'Module Settiings' dialog, IDEA reports a problem, like

 

Library Maven: foo.bar:foo-bar:bundle:0.1.0 has broken classes path:

     [MVN_REPO_PATH]\foo\bar\foo-bar\0.1.0\foo-bar-0.1.0.bundle [Fix]

 

Why IDEA cannot recognise the OSGi bundle format?

 

The plugin 'maven-bundle-plugin' has been configured in pom.xml:

 

<build>

     <plugins>

          <plugin>

               <groupId>org.apache.felix</groupId>

               <artifactId>maven-bundle-plugin</artifactId>

               <extensions>true</extensions>

               <configuration>

                    <instructions>

                         <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>

                         <Bundle-Description>${project.description}</Bundle-Description>

                    </instructions>

               </configuration>

          </plugin>

     </plugins>

</build>

 

 

If '<type>bundle</type>' removed, then everything is OK, but what if the 3rd-party OSGi dependency bundle has '<type>bundle</type>' in its pom.xml ?

 

P.S. the above-mentioned problem has not been appeared in Eclipse IDE which can understand '<type>bundle</type>'.

 

The problem has troubled me for a long time, and any one knows how to fix it?  Thanks very much.

Unresolved Maven dependencies (type: bundle)

$
0
0

I have some maven dependencies that are of type bundle.

 

<dependencies>
        <dependency>
            <groupId>net.test.framework.thrift</groupId>
            <artifactId>thrift-bundle</artifactId>
            <type>bundle</type>
        </dependency>

</dependencies>

 

But IDEA is marking them as unresolved - Unresolved dependency: net.test.framework.thrift:thrift-bundle:bundle:1.0.5-SNAPSHOT

 

I look into my local Maven repository and it exists. I think that the Maven integration isn't working quite right. Is there a solution or is this a bug?

 

Eclipse used to have this problem (http://jira.codehaus.org/browse/MNGECLIPSE-1180) and I'm using the maven bundle plugin:

 

<plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <manifestLocation>META-INF</manifestLocation>
                    <instructions>
                        <Bundle-Activator>net.test.framework.etc.Activator</Bundle-Activator>
                        <Private-Package>net.test.framework.etc</Private-Package>
                        <Import-Package>!org.jboss.netty.util.internal, *</Import-Package>
                        <Embed-Dependency>args4j;scope=compile|runtime</Embed-Dependency>
                    </instructions>
                </configuration>
            </plugin>

 

Thanks!

Intellj Idea code coverage issue

$
0
0

Hi,

I am trying to run test with code coverage intellij Idea. I am getting java.lang.NoClassDefFoundError: error after I enable the intellij idea code coverage.

 

Without code coverage test runs fine. This issue only happens after enabling the code coverage for intelliJ idea.

 

 

can you please help me this error?

 

Thanks,

Abhishek Upadhyay

Unable to use Groovy 2.4.3

$
0
0

Is there a maximum Groovy version that you can use in plugin development?

 

When including Groovy 2.4.3 in my build.gradle, Intellij gives me this error:

 

"groovy-all is loaded in version 2.4.3 and you are trying to load version 2.3.9"

 

I'm using Intellij 14.

war file created as -plain-output

On startup: indexing error reported in Event Log (v14.1)

$
0
0

Recently upgraded to version 14.1 (OS X) and updated to the latest JDK from Oracle (1.8.0_40).  Now everytime I startup IntelliJ this shows up in my event log:

 

12:33:41 PM AbstractMethodError

            Error while indexing /Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home/lib/tools.jar!/com/sun/tools/hat/resources/oqlhelp.html

            To reindex this file IDEA has to be restarted

12:33:57 PM AbstractMethodError

            Error while indexing /Users/jhall/.m2/repository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3-sources.jar!/org/hamcrest/core/package.html

            To reindex this file IDEA has to be restarted

 

I verified and repaired disk permissions, but that didn't help.  What else should I check?

 

This is a maven-based project.  Here's the POM:

 

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.brainwreckage</groupId>
    <artifactId>java8</artifactId>
    <version>1.0-SNAPSHOT</version>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.3</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-library</artifactId>
            <version>1.3</version>
        </dependency>
    </dependencies>
</project>

Thanks!

Bad idea? (sorry about the pun)

$
0
0

I'm putting together some simple code examples for a data structures course I'll be teaching in the fall. I wrote a trivial recursive factorial function

 

    static int factorial (int n)

       ...obvious code goes here

 

 

and then inserted as a new first line

 

      assert (n > 0);


the purpose being to introduce students to preconditions and so forth.

 

The little lightbulb popped up and suggested that I replace the 'assert' with an 'if' statement (see picture). Why?

 

 


Interrupt or kill thread currently being suspended at breakpoint.

$
0
0

Hello,

 

I would like to know if there is a way to kill or exit the currently debugged thread, thereby stopping it from continuing.

 

This way I can examine complex code behavior,  without for example a current database transaction actually mutating a database. (If possible with respect to the transaction boundaries ofcourse)

 

 

Best wishes,

 

 

Faizal

Access project in Remote directory

$
0
0

Hi,

 

I have a very basic requirement, I was doing it in my PHP Designer long back.

 

My project files are available in remote Linux server. I have VNC, SSH and SFTP access to that; however, I am wondering is there any way to work on the project files, which are present in the remote machine, from my local windows machine. I can always install Intellij in my remote server and work by connecting through VNC but this is very slow. Can I simply work on those files from windows and changes should reflect in the remote machine asynchronously?

 

Sorry if this sounds very naive to you, I am suffering from long time to do this.

 

Thanks

From 3.x to 14.x?

$
0
0

I've been using IDEA since 2002 or something and it's been pretty much perfect Java development tool for me, but now I'd like to start using a new version.
But there's a BIG BUT, the project structure that I've been using and which have worked for me like a charm doesn't seem to work with any of the new versions.

 

We have all my source code in one directory tree and all compiled code in another directory tree, it's VERY EASY and hassle free to just poin to the single root
and all the code / classes are in use in every project.
We have projects pointing to various branches in that source code tree like com.mycompany.stuff.project7 and com.mycompany.projects.project56. All project files are
saved in a separate location.

 

How can I do this in IDEA 14.x? It seems to break the whole java package system. If the project's source path is included in the search path, it just won't work
at all. It was never a problem before.

 

Also, I just can't easily edit source code and compile (SHIFT+F9 used to compile source files opened outside project path) from another project anymore, I always
have to open that project, make changes and compile. But this is so tedious and clumsy. Now I have one project in 14.x and all the others in 3.x, only because in
that project I need some Java features that 3.x doesn't support.
For me it doesn't make any sense to have each project's source code under their own separate directory trees when I need that code in many other projects too. I use
projects to break the code into logical units, I have utility projects for various utility classes etc. and then I have project files for each application project.
I haven't been able to make this system work in 14.x and hence it's pretty much useless for me and that's why we haven't bought any new licenses either, we just can't
work with it. The code editor is the absolutely best that I've ever seen for any language or environment, but the project/package management sucks.

 

I've tried many IDEA versions they all seem to be the same, the project system is "broken". If I could make the old project system work I'd happily use the new version.

I need help with render library...

$
0
0

Hi everyone, and thank you for willing to help. Searched everywhere for this and can't find a solution for intellij so I decided to ask for help here.

So here's the error message whenever I open the Design xml: "This version of the rendering library is more recent than your version of IntelliJ IDEA. Please update IntelliJ IDEA (Details)". I have the latest IntelliJ and the error appeared after I installed some new versions of Android SDK Build-Tools with SDK Manager. I tried removing all the new versions of that but the problem remains. I found a solution for Android Studio where you force the ide to use a specific SDK Build-Tools version, but can't find how to do that on IntelliJ. Any help would be appreciated and please keep in mind that I'm a noob, have patience with me Also, sorry for my English...

 

Here are the Details, next to the error:

org.jetbrains.android.uipreview.RenderingException: This version of the rendering library is more recent than your version of IntelliJ IDEA. Please update IntelliJ IDEA

at org.jetbrains.android.uipreview.LayoutLibraryLoader.load(LayoutLibraryLoader.java:90)

at org.jetbrains.android.sdk.AndroidTargetData.getLayoutLibrary(AndroidTargetData.java:159)

at com.android.tools.idea.rendering.RenderService.create(RenderService.java:198)

at com.intellij.android.designer.designSurface.AndroidDesignerEditorPanel$6.run(AndroidDesignerEditorPanel.java:475)

at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:320)

at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:310)

at com.intellij.util.ui.update.MergingUpdateQueue$2.run(MergingUpdateQueue.java:254)

at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:269)

at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:227)

at com.intellij.util.ui.update.MergingUpdateQueue.run(MergingUpdateQueue.java:217)

at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:238)

at com.intellij.util.Alarm$Request$1.run(Alarm.java:351)

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

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

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

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

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

docker plugin - no connection

$
0
0

Hi,

 

I can connect to a dockerhost viaTCP and see and manage all the images and containers, but when I disconnect and try to connect after some time (next morning), I get an error message (see attached file).

I disconnect before leaving IntelliJ.

 

I have to stop all containers, restart dockerhost ("sudo restart docker"), restart the containers and then I can connect again.

 

Using docker plugin 1.1.0 and IntelliJ 141.1010.

 

Any suggestions?

Viewing all 5661 articles
Browse latest View live


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