Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #19587

Re: Java return intellityping?

From Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at>
Newsgroups comp.lang.java.programmer
Subject Re: Java return intellityping?
Date 2012-11-01 19:07 +0000
Organization A noiseless patient Spider
Message-ID <slrnk95i31.u9l.avl@gamma.logic.tuwien.ac.at> (permalink)
References <4c12f491-2b3f-421b-b420-60d4220237d1@googlegroups.com>

Show all headers | View raw


bob smith <bob@coolfone.comze.com> wrote:
> You know how there are all kinds of typing shortcuts nowadays?
> Let's say there's code like this:
> m_socket.getOutputStream();
> Is there some general way to get your editor (i.e. Eclipse) to create a variable of the correct type and assign it like so:
> OutputStream outputStream = m_socket.getOutputStream();
> I feel like this could save a lot of work.

When I need this, I type some bogus type and the intended varname like this:
   Foo outputStream = m_socket.getOutputStream();

Then, eclipse marks it as an error, and among the "Quick-fixes" there's one that
changes my bogus Foo to the actual return-type of the expression.

hth.

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Java return intellityping? bob smith <bob@coolfone.comze.com> - 2012-11-01 10:39 -0700
  Re: Java return intellityping? Lew <lewbloch@gmail.com> - 2012-11-01 11:14 -0700
  Re: Java return intellityping? Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2012-11-01 19:07 +0000
  Re: Java return intellityping? Robert Klemme <shortcutter@googlemail.com> - 2012-11-01 23:33 +0100
  Re: Java return intellityping? Jim Janney <jjanney@shell.xmission.com> - 2012-11-02 08:49 -0600
  Re: Java return intellityping? Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-11-02 09:17 -0700
  Re: Java return intellityping? Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2012-11-02 23:00 +0100
    Re: Java return intellityping? Lew <lewbloch@gmail.com> - 2012-11-03 11:58 -0700
      Re: Java return intellityping? Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2012-11-04 17:39 +0100
        Re: Java return intellityping? Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-11-04 09:47 -0800
          Re: Java return intellityping? Robert Klemme <shortcutter@googlemail.com> - 2012-11-05 08:07 +0100
          Re: Java return intellityping? Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2012-11-05 23:52 +0100

csiph-web