SaveAsInSQLEditorReview
Review page for Save As feature for the SQL Editor
This page is used to manage the review of SaveAsInSQLEditor.
The value of this approach is that it allows me to track all the issues separately and to drive them to resolution. For me email reviews although nice and informal are almost impossible to track to conclusion. Inline comments to the main document muddy up the document and are also difficult to track to conclusion.
The review process works like this:
- Add a comment header of the format "Comment <initials>-<number> (<status>)" (see below for examples)
- A discussion then can take place under that comment header
- Each comment will have a status at the top, with the status set to Approved, Accepted PDU (pending doc update) or Unresolved
- If necessary, we do more rounds of discussion until the item is marked as Approved
Contents |
Commenter Initials Key
DVC - David Van Couvering
JWB - John Baker
Feedback
Feedback Summary
| Feedback | John's Response | Comments | John's Decision |
|---|---|---|---|
| The use case for doing "Save As..." to another file that already exists should be covered. With Java it doesn't ask you to confirm, it just overwrites, but I think we should confirm if possible ("This file already exists, do you want to overwrite it?"). | Not supported for other files either(Java). RFE can be filed(openide) | Declined, RFE can be filed against openide | |
| Default Dir: same model as say OpenOffice, where when you open a new file, it creates it in a temporary location, e.g. /tmp, and then when you say "Save" it asks you to specify a given location and file name. | The "temporary" file could be created as not saved but we want to save the file (as it works now) otherwise NB will open a Save As prompt for each unsaved temporary file | Declined | |
| the default directory should be the project directory. | Save As to a default directory is only supported if the file is modified. There is a SaveCookie but no SaveAsCookie in openide. Can't change the default folder unless the file is edited. The only advantage in not providing a default directory is if the user deletes the userdir. If user really wanted to save the file, it would be saved in a repository directory. Project directory is for projects, not files. | Declined - can't fully support if file isn't modified | |
| once the user chooses a location for saving SQL files, we should remember that and use that location next time, at least for the duration of the current NB session. | Not supported by openide. | An RFE could be filed against openide | |
| if the user opens one SQL file, and then chooses Save As..., then the default location should be the same directory as the current file | this is how Save As works now | This is the current behavior | |
| Tab name for "temporary" file contains the full path, at least on Mac | Not true, I verified on Mac and there is code to ensure the name is used, excluding the path | Current behavior is correct | |
| Create another icon for a "temporary" file | Could use a plain text icon for a "temporary" file | Not worth creating a new icon | |
| When a "temporary" file is modified, the Save icon should be enabled and when choosing Save, the Save As dialog should open | If a user is modifying a temporary file then it should remain a temporary file and retain the 6.x behavior. A temporary file should act like a temporary file not a real SQL file. If a user wants to keep the "temporary" file then it should be saved using Save As. Then when the real file is modified again the Save icon will be enabled. Note:. the Save or Save As dialog behavior cannot be overridden - the dialog is posted via actionPerformed encapsulated in SaveAsAction | Declined | |
| A temporary file tab name should differentiate from a real SQL file tab name | The real SQL file tab name includes the .sql extension | Differentiation is sufficient | |
| Save As able to save in the project directory | Not possible to know which project the sql file belongs to | Declined | |
| Remember the connection that belongs with the SQL file | Not a Save As feature | Someone could file an RFE against sqleditor |
DVC-01 - Automatic save
Regarding your question about whether Save As should be invoked automatically for unnamed editors, I don't think so. We should keep existing behavior until the user explicitly chooses Save As, then from then on we should auto-save to the file they specified, rather than into SQL Editor-n in the userdir.
JWB
If you're referring to #4 Need clarification, the issue to clarify isn't about opening the dialog opening automatically. The issue to clarify is (for an unnamed file) if the user clicks the Save icon or chooses File-> then should the Save As dialog open instead of Save ?
DVC
Save As makes sense to me.
DVC-02 - Remembering a connection
When a user saves a SQL file, they probably would like to use the same connection again next time they open it. I am thinking it would be good to associate each SQL file with a connection, and then choose that connection by default (if it's available) when that SQL file is opened again. We do that already with unnamed SQL files, but we should extend that to named SQL files.
JWB
Currently, the connection is not assocated with each file. Are you suggesting to serialize a property file in the userdir that has a filename as a property and a connection as a value ?
DVC
Before we figure out how to implement, I just want to describe the behavior. As a user, I would like to see the same connection selected next time I open the SQL file. But this is not crucial, it can be done as an enhancement later on.
DVC-03 - Save As Again (Resolved)
Use case; the user has saved the file as a named SQL file, but wants to rename it.
JWB
OK, will add this
DVC-04 - Default location (Resolved)
When the user wants to save, the default directory should be the root of the project directory. When a user picks a location to save a SQL file, we should remember that, and use that same location next time they invoke Save As.
JWB
NetBeansProjects folder - ok this can be remembered
DVC-05 - Displaying SQL files in a project
The user wants to keep SQL files in their project, and wants to be able to see those files in their project tree. I don't know if or how that works today (probably just put them under the 'src' directory, e.g. src/sql), but let's make sure this is possible.
If the user chooses a different directory than src, should we make that directory part of the project tree? Should we have a standard location for sql files in the project tree? What's the right approach here?
JWB
An SQL file can be saved in a project directory, but you're thinking about some property in the projects.properties file so the project 'knows' about the SQL file? Is there any benefit for a project to know about an SQL file ?
Also, are you suggesting to provide a list of open project directories to save the SQL file in ?
DVC
As a user, it's annoying that the only way I can see SQL files is in the "Files" tab and not in the "Projects" tab. That's what I'd like to see fixed.
Regarding offering a list of open project directories, that's a possibility, I didn't think of that. I was thinking of offering the current default project. How is this done currently with other new files that aren't initially part of a project, do you know?
I'm flexible to how this is done, as a user what I want is to be able to easily create, save, and open SQL files in my project, whereas right now that's kind of difficult.

