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

IDEA14: How to create linked documentation for JUnit test cases

$
0
0

Hi,

 

When I write my JUnit test cases I like them to look like:

 

public class MyClassTest {
/**
* Unit test {@link MyClassTest#myMethod}
*/
@Test
public void testMyMethod() {

}

}

 

 

The important bit is the generated JavaDoc which contains a link to the method under test which I can use the link to quickly bring up the JavaDocs of the method under test.

 

Is there anyway to automate the generation of the link? I can see that the "JUnit4 Test Method" has a variable called ${NAME} (which rather anoyingly starts with an UPPER case letter), but I don't see anything in that template that gives me the class name for my hyperlink.

 

Cheers


Editeur graphique

$
0
0

Bonjour,

 

je veux créer un application web en j2ee. Une partie de cette application est un module pour l'édition graphique ( par exemple ce éditeur permet la représentation d'un diagramme de classe).

Je travaille sous windows 7 et j'ai télécharger intellij idea ultimate en version d'éssai.

Je veux savoir s'il est possible de créer un éditeur graphique en utilisant intellij?

je sais que ce faisable avec eclipse en impléentant le GMF et l'EMF.

 

Merci pour votre aide

Git integration question

$
0
0

OK Now I am xconfused about Git integration .

 

The instructions for using Git qith 14.1 are here:

 

https://www.jetbrains.com/idea/help/committing-changes-to-a-local-git-repository.html

 

They don't correspond with any GUI I see in 14.1.

 

From those instructios:

  1. Open the Changes tool window by pressing Alt+9 or                 choosing View | Tool Windows | Changes.
  2. Select the files or folders you want to commit.
  3. Open the Commit Changes dialog box by doing one of the following:                
    • On the Changes tool window toolbar, click the Commit Changes button                                    Icon.
    • On the main menu, choose VCS | Commit Changes.
    • On the main menu, choose VCS | Git | Commit File.
    • Press Ctrl+K.
  4. In the Changed Files area, view the files changed since the last commit.                 Select the check boxes next to the files you want to commit now.
  5. In the Summary area, view statistics on changes made since the last commit.

 

 

I am guessing the Changes tool window has had its name changed to "Version Control" since that's what's mapped to ALT-9 and anyway there is no Changes submenu and also the link in step 1 which takes you to the Changes page is dead.

 

There is no Changed Files "area" which I suppose is a panel in some dialog. What I do see is a tab named Local Changes in a window named Version Control. Unfortunately it shows me every file under Git, names all colored navy blue. This might indicate that thwey've been changed, but in fact, they haven't been changed. I can confirm this by selecting a file and pressing CTRL-D Show Diff. the Diff reports no changes. The Diff tool is the one native to Git and INtellij, not a thrid party tool BTW

 

So my operational issue and the reason I am posting this is because I have no way to see, from amongst the files under Git, which have changed and which haven't and worse, it commits all files every time.

 

Either I am doing something wrong, misunderstanding something basic or this aspect of Intellij Git integration is problematic .

 

Surely other devs use Git integration and have no issues with it so maybe someone can give me a pointer?

 

Many thanks.

Productivity estimation

$
0
0

Hi,

 

We are actually interested in changing our IDE to IntelliJ IDEA and I have some questions :
Do you have an estimation on the number of hours needed to master the IDE for a developer ?
In comparison to free IDE(Eclipse, Netbeans , ...) , how much do you estimate percentage of productivity gain?

aetfqwtfg

Java Card Development

$
0
0

Hey there,

 

I wonder if anyone had success developing Java Card Platform Speicifcation compliant Java Applications in IntelliJ. I would like to develop an application for Java Card in IntelliJ and test it with JUnit. I don't really care for deployment/simulation.

 

All I would like to do is write a compliant application in terms of Java language features (meaning I shouldn't be able to use language features that don't exist in Java Card, such as chars, double or floats).

 

Does anyone have experience with how to achieve this in IntelliJ?

Problem running node with maven inside IntelliJ

$
0
0

Hi all,

 

I have a problem with my project. I have a pom.xml that runs some node.js task (grunt, bower). I have Ubuntu instaled in my laptop, and I instaled node.js via nvm. When I  maven clean install from the console everything runs ok, but when I do the same inside IntelliJ, I get the following error: "/usr/bin/env: node : File or directory does not exist". I also installed node.js plugin in IntelliJ, but sitll getting same error.

 

Any help?

 

Thank you in andvance for your comments.

Regards,

 

Dani,

Annotation processor generated code

$
0
0

Hi

 

I have bounced into a few problems related to annotation processors.

 

1) Shouldn't annotation processor discovery be enabled by default? It would make things easier since developers would not have to care if there are annotation processors in libraries. This would be inline with how javac works also.

 

2) Maven compile source files to target/generated-sources/annotations by default, shouldn't intellij do the same?

 

3) I cannot change the source generation path from Preferences > Compiler > Annotation Processors > Default > Production sources directory. Is this a bug?

 

Ideally developers shouldnt need to do anything when using libraries that have annotation processors - builds should _just_work_ without manual configuration, right? It would be a huge win if intellij follows Maven in terms of configuration and default behaviour.

 

Cheers,

-Kristoffer


Editor slow, high cpu usage

$
0
0

I am using 13.1.2, build 135.690, on LInux Mint Release 14 (nadia) 64-bit

 

Machine specs: Processor: Intel® Core™ i7-2600 CPU @ 3.40GHz × 8, Memory: 15.7 GiB, ide system files are on ssd partition.

 

After continuous usage of ide, say 24 hours, left on overnight, the editor becomes very slow, one of its thread seems to be almost at 100% cpu utilization.

 

There is not much in the log, quite sparse, see below:

 

 

 

 

2014-05-21 00:41:34,502 [572779006]   INFO - ellij.concurrency.JobScheduler - 50 ms execution limit failed for: com.intellij.openapi.progress.impl.ProgressManagerImpl$1@771d5b4; elapsed time was 1322ms
2014-05-21 03:04:44,979 [581369483]   INFO - ellij.concurrency.JobScheduler - 50 ms execution limit failed for: com.intellij.util.Alarm$Request@2ca2eb32; elapsed time was 1405ms
2014-05-21 05:22:24,018 [589628522]   INFO - ellij.concurrency.JobScheduler - 50 ms execution limit failed for: com.intellij.util.Alarm$Request@2acd6d2f; elapsed time was 1333ms
2014-05-21 05:27:54,824 [589959328]   INFO - ellij.concurrency.JobScheduler - 50 ms execution limit failed for: com.intellij.openapi.progress.impl.ProgressManagerImpl$1@771d5b4; elapsed time was 1325ms
2014-05-21 06:36:43,428 [594087932]   INFO - ellij.concurrency.JobScheduler - 50 ms execution limit failed for: com.intellij.util.Alarm$Request@631d4d2b; elapsed time was 1328ms
2014-05-21 06:54:37,371 [595161875]   INFO - ellij.concurrency.JobScheduler - 50 ms execution limit failed for: com.intellij.util.Alarm$Request@12d324f2; elapsed time was 1406ms
2014-05-21 07:13:29,534 [596294038]   INFO - openapi.editor.impl.EditorImpl - Cache hits:69632, total requests:117294,file:///xxxxxxxxxxxxxxxxxx.java
2014-05-21 07:40:05,699 [597890203]   INFO - ellij.concurrency.JobScheduler - 50 ms execution limit failed for: com.intellij.util.Alarm$Request@529c69e8; elapsed time was 1403ms
2014-05-21 07:52:29,876 [598634380]   INFO - ellij.concurrency.JobScheduler - 50 ms execution limit failed for: com.intellij.openapi.progress.impl.ProgressManagerImpl$1@771d5b4; elapsed time was 1332ms
2014-05-21 08:18:38,404 [600202908]   INFO - ellij.concurrency.JobScheduler - 50 ms execution limit failed for: com.intellij.util.Alarm$Request@30e26e8a; elapsed time was 1326ms
2014-05-21 08:28:16,438 [600780942]   INFO - ellij.concurrency.JobScheduler - 50 ms execution limit failed for: com.intellij.openapi.progress.impl.ProgressManagerImpl$1@771d5b4; elapsed time was 1336ms
2014-05-21 08:54:04,574 [602329078]   INFO - ellij.concurrency.JobScheduler - 50 ms execution limit failed for: com.intellij.util.Alarm$Request@7783fb8e; elapsed time was 1326ms
2014-05-21 09:25:41,346 [604225850]   INFO - openapi.editor.impl.EditorImpl - Cache hits:12288, total requests:13080,file:///xxxxxxxxxxxxxxxxxxxxxxxxx.java
2014-05-21 09:28:11,958 [604376462]   INFO - openapi.editor.impl.EditorImpl - Cache hits:4096, total requests:6760,file:///xxxxxxxxxxxxxxxxxxxxxxxxxxxx.java

Problem with indent

$
0
0

I cannot figure out why this indentation is occurring in my code:

 

 

it('should return an array of users from the group', function() {
  var result = jsom.getGroupUsers(2);
  result
  .then(function(data) {
    expect(data.length).toBe(2);
    expect(data[0].displayName).toBe('Brian');
      // why is this indented?
  });
  // this does not indent
});

 

It is not a continuation line as the line before is ended.  This code is inside of a function. 
It only seems to happen inside the then or catch blocks.

 

I am using IntelliJ 14.1.4 Ultimate.

Tool windows are disappearing / editor pane maximizes on maven project changes

$
0
0

I have a multi-module maven project opened in IntelliJ and everytime I change one of the pom.xml files (so everytime a maven related change is triggered) all my tool windows disappear. I then use SHIFT+F12 to restore the layout but it is a real pain in the neck. Even if I update my verison controlled code base and a pom.xml was changed or a new pom.xml file (or the removal of a pom.xml file) is part of that update, the maven update starts and *pow* all my tool windows are gone.

 

Does anyone know about such an issue or a reason that might be a cause?

 

Additional information:

- IntelliJ IDEA 14 Ultimate

- Related Plugins: Maven Integration, Maven Integration Extension

 

Regards

web deployment ClassNotFoundException (no security manager: RMI class loader disabled)

$
0
0

Hi,

 

I am trrying to deploy a war from inteelije to local tomcat, and getting ClassNotfoundException, The class is present in a jar in WEB-INF/lib.

When I deploy the same war in tomcat (by copying to webapp) it works fine.

 

This firt time I using RMI classes.

Could some one please help me if any specific stting required regarding RMI ? or what I am doing wrong.

 

2015-09-02 15:56:22 [RMI TCP Connection(3)-127.0.0.1] ERROR org.springframework.web.context.ContextLoader  - Context initialization failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.remoting.rmi.RmiServiceExporter#1' defined in class path resource [arcos-services-context.xml]: Invocation of init method failed; nested exception is java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:

java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:

java.lang.ClassNotFoundException: org.springframework.remoting.rmi.RmiInvocationHandler (no security manager: RMI class loader disabled)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)

at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)

at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)

at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)

at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)

at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)

at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5016)

at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5528)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)

at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)

at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)

at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1779)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:601)

at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)

at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)

at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:791)

at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:618)

at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:565)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:601)

at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)

at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)

at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:791)

at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1447)

at javax.management.remote.rmi.RMIConnectionImpl.access$200(RMIConnectionImpl.java:89)

at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1292)

at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1380)

at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:812)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:601)

at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322)

at sun.rmi.transport.Transport$1.run(Transport.java:177)

at sun.rmi.transport.Transport$1.run(Transport.java:174)

at java.security.AccessController.doPrivileged(Native Method)

at sun.rmi.transport.Transport.serviceCall(Transport.java:173)

at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:553)

at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:808)

at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:667)

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)

Caused by: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:

java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:

java.lang.ClassNotFoundException: org.springframework.remoting.rmi.RmiInvocationHandler (no security manager: RMI class loader disabled)

at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:419)

at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:267)

at sun.rmi.transport.Transport$1.run(Transport.java:177)

at sun.rmi.transport.Transport$1.run(Transport.java:174)

at java.security.AccessController.doPrivileged(Native Method)

at sun.rmi.transport.Transport.serviceCall(Transport.java:173)

at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:553)

at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:808)

at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:667)

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)

at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:273)

at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:251)

at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:377)

at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)

at org.springframework.remoting.rmi.RmiServiceExporter.prepare(RmiServiceExporter.java:291)

at org.springframework.remoting.rmi.RmiServiceExporter.afterPropertiesSet(RmiServiceExporter.java:229)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)

... 55 more

Caused by: java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:

java.lang.ClassNotFoundException: org.springframework.remoting.rmi.RmiInvocationHandler (no security manager: RMI class loader disabled)

at sun.rmi.registry.RegistryImpl_Skel.dispatch(Unknown Source)

at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:409)

at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:267)

... 10 more

Caused by: java.lang.ClassNotFoundException: org.springframework.remoting.rmi.RmiInvocationHandler (no security manager: RMI class loader disabled)

at sun.rmi.server.LoaderHandler.loadProxyClass(LoaderHandler.java:554)

at java.rmi.server.RMIClassLoader$2.loadProxyClass(RMIClassLoader.java:646)

at java.rmi.server.RMIClassLoader.loadProxyClass(RMIClassLoader.java:311)

at sun.rmi.server.MarshalInputStream.resolveProxyClass(MarshalInputStream.java:257)

at java.io.ObjectInputStream.readProxyDesc(ObjectInputStream.java:1549)

at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1511)

at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1750)

at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347)

at java.io.ObjectInputStream.readObject(ObjectInputStream.java:369)

... 13 more

[Scala] How do I satisfy IDEA's expectation that my scala class's companion object's declaration be tested?

$
0
0

    case class Point(x: Double = 0,

                     y: Double = 0,

                     z: Double = 0) extends Point3D(x, y, z) {

 

 

      def +(that: Point): Point = new Point(x + that.x, y + that.y, z + that.z)

      def -(that: Point): Point = new Point(x - that.x, y - that.y, z - that.z)

      def *(that: Point): Point = new Point(x * that.x, y * that.y, z * that.z)

      def /(that: Point): Point = new Point(x / that.x, y / that.y, z / that.z)

    }

 

    object Point {

      def apply(p3d: Point3D) = new Point(p3d.getX, p3d.getY, p3d.getZ)

    }

 

IntelliJ is giving this code 92% coverage because the line `object Point {` is being counted in coverage, but I cannot figure out why or how to satisfy it's expectation. I have tried comparing it to something, tried adding another method and calling that... No such luck, and I am out of ideas.

 

Here is the test code. Any help would be much appreciated!

 

    import org.scalatest._

 

    class test_Point extends FlatSpec with Matchers {

 

      val u = Point(100, 200, 300)

      val v = Point(623, -85, 300)

 

      it should "supply zero-valued defaults" in {

        val p = Point()

        p.x should be (0)

        p.y should be (0)

        p.z should be (0)

      }

 

      it should "be constructable from base class" in {

        val p = Point(new Point3D(0, 0, 0))

      }

 

      it should "implement + operator" in {

        val w = Point(u.x+v.x, u.y+v.y, u.z+v.z)

        u + v should be (w)

      }

 

      it should "implement - operator" in {

        val w = Point(u.x-v.x, u.y-v.y, u.z-v.z)

        u - v should be (w)

      }

 

      it should "implement * operator" in {

        val w = Point(u.x*v.x, u.y*v.y, u.z*v.z)

        u * v should be (w)

      }

 

      it should "implement / operator" in {

        val w = Point(u.x/v.x, u.y/v.y, u.z/v.z)

        u / v should be (w)

      }

    }

Problem with dependencies when importing modules from another IntelliJ project

$
0
0

I have an IntelliJ project A composed of several Maven modules.

I have another IntelliJ project B also composed of several Maven modules.

I need to import few modules from project B into project A, since project A scans at runtime certain classes found in project B and does cool stuff with them.

 

What I have done so far was importing  the whole project B into project A (From the main menu, selecting File -> importing project from existing sources).

I also modified the settings of the module in project A where I am testing: I added as dependencies all the modules in project B that were previously imported.

I also verified that the "Export" checkbox is selected near the modules added as dependencies.

 

However, when I execute my unit tests, they can see at runtime all the classes from the imported projects, but cannot resolve classes that are declared as maven dependencies at those projects.

So my question is how can import these modules so I can resolve at runtime both classes declared in those modules and classes in jars from dependencies in such modules?

 

Thanks.

RemoteMavenServer using 20-30% cpu constantly

$
0
0

Hi.... I  have noticed something while using Idea 14.1.4 CE.  There is a java process running the class RemoteMavenServer that is using between 20-30% cpu (on my MacBook Pro) all the time.  I have one project opened in Intellij that is using maven... but it is not the active window.  The project builds fine.

 

Is there any way to see what the RemoteMavenServer is doing?   I check the Idea14 Logs but found nothing.  I have removed my local maven repository in order to reduce the size in case it was indexing.  Basically it is now a clean maven repository.

 

 

Any help will be appreciated!

tjhaz


Generate toString with parent member variables?

$
0
0

Maybe I am missing something obvious, but I can't seem to make toString generation include parent member variables.

 

For instance for with the following to classes Foo and Bar, the Intellij IDE generates Bar.toString() which includes b but not a.  How do I fix this?

 

public class Foo {
    private String a;

    public String getA() {
        return a;
    }

    public void setA(String a) {
        this.a = a;
    }
}

public class Barextends Foo {
    private String b;

    public String getB() {
        return b;
    }

    public void setB(String b) {
        this.b = b;
    }

    @Override
    public String toString() {
        return "Bar{" +
                "b='" + b + '\'' +
                '}';
    }
}

Import a project using command line

$
0
0

I have manually created gradle project for some reasons and I want to import it to android studio. Is there a way to do this using command line? I am posting here to get some idea as android studio is powered by intellij.

How to copy lines from an effective POM?

Implements Methods should ask wich access modifier

$
0
0

When I add an Methode (Implement Methods),

 

the IntelliJ creates an new Method with the identifier "private" - I need it in "protected".

 

Is it possible to change this behavior?

 

I'm talking about php (newes EAP and newes PHP-Plugin

 

Thank you

 

cu

How to set environment variables for test config?

$
0
0

In IDEA 14.1.4 running on CentOS 7, I have set an environment variable in a test run config:

 

IDEA_Test_RunConfig.png

 

But it seems the variable isn't being passed into the environment the test is running under. This is easily demonstrated with the following test:

 

package demo

import spock.lang.Specification

class ReadEnvVarSpec extends Specification {

    void "when I read environment variables those set in IDEA run configuration should be available"() {
        given:
            // test run configuration in IDEA has env var 'FOO' set to 'BAR' (without quotes)

            // Dump them all out for manual verification of issue
            System.getenv().sort().each {k,v -> println "$k = $v"}
        when:
            String result = System.getenv('FOO')
        then:
            result == 'BAR'
    }
}

 

This test fails and the environment variables I printed out do not include FOO.  If I run the same test from the command line after doing an export FOO=BAR, the test passes. So clearly, whatever environment IDEA is putting the FOO variable into isn't the environment seen by the test.

 

I'm sure there's something I didn't configure properly, but I'm not sure what it is.

 

Any help is appreciated.

 

--

jack

Viewing all 5661 articles
Browse latest View live


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