Vision for Import Management (was Re: Que stion about usage of import stmts
<P><FONT SIZE=2>> Thoughts?</FONT>
<FONT SIZE=2>> </FONT>
<FONT SIZE=2>> Evan</FONT>
</P>
<P><FONT SIZE=2>Sounds exactly what I am looking for. Thanks for taking the time to do this.</FONT>
</P>
<P><FONT SIZE=2>Regards,</FONT>
<FONT SIZE=2>David</FONT>
</P>
<CODE><FONT SIZE=3>
********************************************************************
This email may contain information which is privileged or confidential. If you are not the intended recipient of this email, please notify the sender immediately and delete it without reading, copying, storing, forwarding or disclosing its contents to any other person
Thank you
Check us out at http://www.syntegra.com
********************************************************************
</FONT></CODE>
# 1
+1(00!)
==========================================
Sumit Kishore
ESX Cougar
(408) 875 0158
sumit.kishore@kla-tencor.com
http://sumit-kishore.tripod.com
--Original Message--
From: Thorsten Schäfer [mailto:Newsletter@ThorstenSchaefer.de]
Sent: Thursday, July 25, 2002 1:27 PM
To: nbusers@netbeans.org
Subject: RE: Vision for Import Management (was Re: [nbusers]
Question about usage of import stmts
Hi there,
> [...]
> Here's my vision for how the IDE should manage imports:
> [...]
That sounds great! Does a beta version of that module already exist?
Bye,
Thorsten
# 2
Hi,> That sounds great! Does a beta version of that module already exist?>> +1(00!)Sorry, I don't understand... What do you mean?Thanks,Thorsten
# 3
another vote for it, and a thumping vote for it. i'm all for such a module!
sumit.
==========================================
Sumit Kishore
ESX Cougar
(408) 875 0158
sumit.kishore@kla-tencor.com
http://sumit-kishore.tripod.com
================================================
Hi,
> That sounds great! Does a beta version of that module already exist?
>> +1(00!)
Sorry, I don't understand... What do you mean?
Thanks,
Thorsten
# 4
While we're on the subject of the Import Management Tool... I find this to
be one of the most helpful tools in NetBeans... especially when I'm
implementing an existing interface and allowing NetBeans to synchronize it.
The synchronize tool generally includes the FQN for each and every class. I
hate this and so I run the Import Management tool to clean things up.
However, I have a few suggestions to improve the import management tool.
1.) Allow the user to configure a global default for imports: FQN, Create
Import, etc. I generally never use the FQN. Instead I use individual
import statements. It would be nice to have a "quick import" which didn't
make me go through the wizard. I could just right-click a class and choose
"quick import" which would run the wizard, but use the preconfigured
defaults. In other words, I wouldn't need to click any buttons, etc.
2.) Allow the user to define an order pattern to organize imports. In other
words, you could say I want all the java.* packages first, then the javax.*
packages then the org.* packages, then the com.* packages and I want a space
between each of these sections. Furthermore, it would be extra nice to be
able to organize by sub-package and alphabetize therein like so...
import java.util.ArrayList;
import java.util.Properties;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.naming.event.EventContext;
import javax.swing.Icon;
import javax.swing.event.AncestorEvent;
import org.apache.tools.ant.FileScanner;
import org.apache.tools.ant.XmlLogger;
import org.apache.tools.ant.util.FileNameMapper;
import com.sun.naming.internal.FactoryEnumeration;
import com.sun.naming.internal.VersionHelper;
3.) The ability to switch back and forth between package imports and full
imports. I can see highlighting a group of individual import statements and
choosing "package import." Likewise, doing the same with a package import
and breaking it out to individual class imports based upon what classes are
used in the class file. This would be very cool.
I realize you can do some of these things right now by re-running the Import
Management tool and going through the wizard and choosing this or that, but
I think it would be a lot more intuitive to provide these right-click menus
and pre-configured defaults.
# 5
Nathan Phelps wrote:
> 1.) Allow the user to configure a global default for imports: FQN, Create
> Import, etc. I generally never use the FQN. Instead I use individual
IMHO the defaults are there. See properties in Tools - Options - Editing
- Java Sources - Import management.
> import statements. It would be nice to have a "quick import" which didn't
> make me go through the wizard. I could just right-click a class and choose
> "quick import" which would run the wizard, but use the preconfigured
There's a "quick import" feature. Just step on a class identifier in the
source text and press Alt-Shift-I.
> 2.) Allow the user to define an order pattern to organize imports. In other
> words, you could say I want all the java.* packages first, then the javax.*
> packages then the org.* packages, then the com.* packages and I want a space
> between each of these sections. Furthermore, it would be extra nice to be
> able to organize by sub-package and alphabetize therein like so...
Please try to describe the grouping/ordering rules and file a RFE for
that. The code generator could use such rules, too when imports are
added programmatically for the user.
> 3.) The ability to switch back and forth between package imports and full
> imports. I can see highlighting a group of individual import statements and
> choosing "package import." Likewise, doing the same with a package import
> and breaking it out to individual class imports based upon what classes are
> used in the class file. This would be very cool.
Very nice idea. Again please file a RFE for that.
-Svata
--
Svatopluk Dedic<mailto:svatopluk.dedic@sun.com>
NetBeans, Java/Repository <http://java.netbeans.org>
# 6
Svata Dedic said:
>IMHO the defaults are there. See properties in Tools - Options - Editing
>- Java Sources - Import management.
I've seen this particular settings, but I'm looking for the ability to say
"Always create an import. Never do the FQN"
> There's a "quick import" feature. Just step on a class identifier in the
> source text and press Alt-Shift-I.
While I do like this feature, it is a "one at time feature." I basically
just want to skip the whole Import Management wizard and have it use its
defaults for the whole file.
# 7
Nathan Phelps wrote:
>
> Svata Dedic said:
>
> I've seen this particular settings, but I'm looking for the ability to say
> "Always create an import. Never do the FQN"
>
Then set the property "Maximum number of Fully Qualified names" to zero.
All extra-package referencies should be turned into import statements.
> While I do like this feature, it is a "one at time feature." I basically
> just want to skip the whole Import Management wizard and have it use its
> defaults for the whole file.
OK, as always, a RFE in IssueZilla makes us not forget about this
suggestion.
-Svata
--
Svatopluk Dedic<mailto:svatopluk.dedic@sun.com>
NetBeans, Java/Repository <http://java.netbeans.org>
# 8
Yes, the quick import feature exists, but to know his existence, we have to
learn all the keyboard shortcut to find them.
What is missing in NetBeans is a TRUE contextual menu, giving me a list of
features appliable on the selection or word where the cursor is positionned.
For example,
If I right-click on a class, NetBeans must propose to add the import of that
class (only if import is not yet existing in the source).
If I right-click more than one line, it must propose to (un)indent them, or
to (un)comment them, for example.
..
The toolbar is already a help for us to discover features that was unknown
before, but it's not sufficient.
The contextual menu must be enhanced and propose feature concerning the
selection done, or the word pointed by the cursor.
Therefore it was necessary to have a good on-the-fly parser. And it seems
that with Nb3.4 it's now possible, and that it will be drammaticly enhanced
with Nb4.0.
"Svata Dedic" <svatopluk.dedic@sun.com> a écrit dans le message de news:
netbeans.nbusers/3D4168C7.2020308@sun.com...
> Nathan Phelps wrote:
> > 1.) Allow the user to configure a global default for imports: FQN,
Create
> > Import, etc. I generally never use the FQN. Instead I use individual
>
> IMHO the defaults are there. See properties in Tools - Options - Editing
> - Java Sources - Import management.
>
> > import statements. It would be nice to have a "quick import" which
didn't
> > make me go through the wizard. I could just right-click a class and
choose
> > "quick import" which would run the wizard, but use the preconfigured
>
> There's a "quick import" feature. Just step on a class identifier in the
> source text and press Alt-Shift-I.
>
> > 2.) Allow the user to define an order pattern to organize imports. In
other
> > words, you could say I want all the java.* packages first, then the
javax.*
> > packages then the org.* packages, then the com.* packages and I want a
space
> > between each of these sections. Furthermore, it would be extra nice to
be
> > able to organize by sub-package and alphabetize therein like so...
>
> Please try to describe the grouping/ordering rules and file a RFE for
> that. The code generator could use such rules, too when imports are
> added programmatically for the user.
>
> > 3.) The ability to switch back and forth between package imports and
full
> > imports. I can see highlighting a group of individual import statements
and
> > choosing "package import." Likewise, doing the same with a package
import
> > and breaking it out to individual class imports based upon what classes
are
> > used in the class file. This would be very cool.
>
> Very nice idea. Again please file a RFE for that.
>
> -Svata
>
> --
> Svatopluk Dedic<mailto:svatopluk.dedic@sun.com>
> NetBeans, Java/Repository <http://java.netbeans.org>
>
