0% found this document useful (0 votes)
36 views

Netbeans SQL Code Completion Connection: Start A. Open Dialog Box From PHP Editor Toolbar

1. The document describes opening a SQL code completion connection dialog box in NetBeans in three ways: from the PHP editor toolbar, from the context menu, or from the code completion window. 2. The dialog box allows the user to choose a database connection to enable SQL code completion. It presents a drop-down list of existing connections plus an option to create a new connection. 3. After selecting an existing or new connection, the dialog box closes and SQL code completion is enabled using that database connection.

Uploaded by

Ibrahim Yilmaz
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views

Netbeans SQL Code Completion Connection: Start A. Open Dialog Box From PHP Editor Toolbar

1. The document describes opening a SQL code completion connection dialog box in NetBeans in three ways: from the PHP editor toolbar, from the context menu, or from the code completion window. 2. The dialog box allows the user to choose a database connection to enable SQL code completion. It presents a drop-down list of existing connections plus an option to create a new connection. 3. After selecting an existing or new connection, the dialog box closes and SQL code completion is enabled using that database connection.

Uploaded by

Ibrahim Yilmaz
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

NetBeans SQL Code Completion Connection

Start a. Open dialog box from php Editor toolbar

Select a database connection to


enable SQL code completion

Start a. php editor toolbar


• A new icon button should be
added to the php editor toolbar.
• Standard Database Cylinder Icon
is better than database
connection icon because the
cylinder is more recognizable,
but an icon that actually says
SQL would be best.
• Tooltip should appear on
mouseover which explains the
icon's use when clicked.
• Clicking the icon button opens the
SQL code completion
connection dialog box.
Start
N 1 2
(a/b/c)

Y
4
3
5

6
NetBeans SQL Code Completion Connection
Start b. Open dialog box from Context menu

Start b. Context Menu


• Right click or <ctrl>+click (on one-
button-mouse mac systems)
within the php editor opens the
context menu.
• The new menu item, "SQL Code
Completion..." should be added.
• Tooltip should appear on
mouseover which explains the
item's use when clicked.
• A keyboard shortcut for the menu
item would be nice, but remains
TBD at this time.
Select a database connection to
enable SQL code completion

Start
N 1 2
(a/b/c)

Y
4
3
5

6
NetBeans SQL Code Completion Connection
Start c. Open dialog box from Code Completion window

Start c. Code completion window


• Within the php editor, if a developer
evokes SQL code completion
having not yet chosen a database
connection for that project, a new
option in the code completion
Select a database connection to window will be "SQL Code
enable SQL code completion Completion Connection..."
• The connection icon is appropriate
here because unlike the icon in
Start a, it serves as a visual
indicator to supplement a label.
• Tooltip should appear on
mouseover which explains the
item's use when clicked.
• A double click on that item will open
the SQL code completion
connection dialog box.

Start
N 1 2
(a/b/c)

Y
4
3
5

6
NetBeans SQL Code Completion Connection
1. Choose a database connection when no connection is set for the current project or file.

1. Choose a first connection


Choose the database connection that this project
should use for SQL code completion: • Suspected to be the most common
use case, the project-wide first
Connection:
connection is designed to have the
MySQL_EComm
simplest interaction
• The first time one uses SQL code
Help Cancel Ok completion in a php project, the
connection he/she chooses will be
used for all php files in that project.
In most cases, that will be the only
time a connection is chosen.
• An instructional statement provides a
brief explanation.

Start
N 1 2
(a/b/c)

Y
4
3
5

6
NetBeans SQL Code Completion Connection
2. Choose a database connection

2. Choose a database connection


Choose the database connection that this project
should use for SQL code completion: • The combo box provides a list of all
MySQL_EComm database connections plus a "New
Connection: MySQL_Admin Database Connection..." option
which can be double-clicked to
New Database Connection...
open the New Connection dialog.
Help Cancel Ok • indicates a live connection
• indicates a connection that is not
currently live. If one of these is
chosen, NetBeans should
automatically try to connect. This
dialog box should remain open
while the attempt is made. Should
it fail, the user may try again,
chose a different connection,
create a new one or abandon the
process altogether by clicking
cancel.

Start
N 1 2
(a/b/c)

Y
4
3
5

6
NetBeans SQL Code Completion Connection
3. Change the database connection when a connection has already been set for the project

3. Change database connection


Choose the database connection to use for SQL
code completion: • Once a project-wide first
connection has been chosen,
Connection: MySQL_EComm future attempts to change the
SQL code completion
Make this the active connection for: connection will prompt the user
with a slightly different UI
All php files in this project
• Radio buttons allow the user to
Current php file only determine whether this changed
connection is to be used for all
Help Cancel Ok files in this project (default) or if
this file is a special case which
will always require a different
connection from the rest of the
project.

Start
N 1 2
(a/b/c)

Y
4
3
5

6
NetBeans SQL Code Completion Connection
4. Change the connection for the current file only

4. Change for current file only


Choose the database connection to use for SQL
code completion: MySQL_EComm • To change the connection for a
given file, the user need only
Connection: MySQL_Admin
select the desired connection
New Database Connection... from the combo box, select the
Make this the active connection for: Current php file only radio
button and click Ok.
All php files in this project
• When the SQL code completion
Current php file only connection dialog is opened
from a file that is already using
Help Cancel Ok a connection that is different
from from its project, Current
php file only shall be the default
radio button selected.

Start
N 1 2
(a/b/c)

Y
4
3
5

6
NetBeans SQL Code Completion Connection
5. Change the database connection for all files in the project

5. Change for all files in a project


Choose the database connection to use for SQL
code completion: MySQL_EComm • When a user has chosen a single
SQL code completion
Connection: MySQL_Admin
connection to use for all the php
New Database Connection... files in a given project, All php
Make this the active connection for: files in this project shall be the
default radio button selected.
All php files in this project
• The user need only select the
Current php file only desired connection from the
combo box and click Ok.
Help Cancel Ok

Start
N 1 2
(a/b/c)

Y
4
3
5

6
NetBeans SQL Code Completion Connection
6. Modal alert warns project-wide impact of the change

6. Change for all files in a project


Choose the database connection to use for SQL
code completion: • A more advanced case involves a
project wherein a project-wide
Connection: MySQL_Admin connection is accompanied by
several file-specific connections.
Make this the active connection for:
This will change the SQL code • If the user in this case should
completion database connection for every attempt to choose a new
All php files
file in
in this
this project
project
connection for All php files in
Current php file only this project, they should be
Help Cancel Ok
alerted to the significant impact
Help Cancel Ok of such a project-wide change.
• Once the user clicks Ok, an alert
box should popup as an
advisory which requires their
confirmation to proceed.
• Users can click cancel if they
would like to reconsider their
choices before committing.

Start
N 1 2
(a/b/c)

Y
4
3
5

6
NetBeans SQL Code Completion Connection High Level UI Workflow
Click DB Icon
in php editor Project-wide or file-
Toolbar specific connection

Click select
Is a
connection in Open select No radio Select connection
connection N buttons
php editor conn dialog for project
set?
context menu

Click select
Y Change connection
connection in
code Show radio for current file
completion buttons. "All
window files in
project" is
default Change connection
for project

Select connection
option only appears Any file-
in the code specific
completion window connections
N
when no connection set?
has been set for this
file or project Y

Alert!
Change all?

Change Save
Key N all?
Y connection
settings
Start/Stop User action
Visual feedback Decision
Click Close
Defined process Direction of flow Cancel Dialog

Alternate flow Note

You might also like