-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
18 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,22 @@ | ||
#Scratch Files for Netbeans | ||
###With this plugin you can create scratch files which will be created in memory. You don't need a project for this. After typing Ctrl + Alt + Shift + N you can select File -> Save as... to save the file to any location wherever you want. | ||
# Scratch Files for Netbeans | ||
### With this plugin you can create scratch files which will be saved on disk. You don't need a project for this. After typing `Ctrl + Alt + Shift + N` you can choose a language and the file will be saved to your user dir: `/userDir/.netbeans/scratches` | ||
|
||
The idea came me while using Sublime Text 2, where you can type Ctrl + N to creates an empty file. IntelliJ has such behaviour too: <a href="http://blog.jetbrains.com/idea/2014/09/intellij-idea-14-eap-138-2210-brings-scratch-files-and-better-mercurial-integration/">IntelliJ IDEA 14 eap 138.2210 brings scratch files...</a>. | ||
It is not full functional but you can create new in memory files with Ctrl + Alt + Shift + N and Save as... wherever you want. | ||
The idea came up while using Sublime Text 2, where you can type `Ctrl + N` to creates an empty file. | ||
This is really simple, it will open a new tab with a Untitled file. Nothins special. | ||
|
||
I found this little example, which I implemented: <a href="http://blogs.kiyut.com/tonny/2007/09/01/netbeans-platform-and-memory-file-system/">Netbeans platform and memory file system</a> | ||
IntelliJ has a similar but more powerful functionalty too: <a href="http://blog.jetbrains.com/idea/2014/09/intellij-idea-14-eap-138-2210-brings-scratch-files-and-better-mercurial-integration/">IntelliJ IDEA 14 eap 138.2210 brings scratch files...</a>. | ||
|
||
~~Next part is to implement the response from <a href="http://www.kiyut.com/">Tonny Kohar</a> to save this file the first time with a location popup, after~~ | ||
Unfortunately it is not possible to have 2 different functionalities for the | ||
normal save logic. So that means, that you have to add a shortcut to Save As | ||
for me Ctrl + Alt + S; Ctrl + Alt + S and then you can save the file whereever | ||
you want and change the name and extension. | ||
So my plugin is more like the IntelliJ functionaliy, because you will choose the target language after hitting `Ctrl + Shift + Alt + N` and it will open and automatically | ||
save the file to your user `/userDir/.netbeans/scratches`. You can see all the saved scratches as nodes at `Services -> Scratches` | ||
|
||
![Alt text](/screenshots/NbScratchFile.png?raw=true) | ||
## Screenshots | ||
### `File -> New Scratch File` or `Ctrl + Alt + Shift + N` | ||
![Alt text](/screenshots/NbScratchFile.jpg?raw=true) | ||
|
||
|
||
### Choose target language | ||
![Alt text](/screenshots/ChooseLanguage.gif?raw=true) | ||
|
||
|
||
### Service node integration | ||
![Alt text](/screenshots/ServiceNodeIntegration.gif?raw=true) |