├── .gitignore ├── .travis.yml ├── LICENSE.md ├── NBStudioCore ├── build.xml ├── hs_err_pid2223.log ├── manifest.mf ├── nbproject │ ├── build-impl.xml │ ├── genfiles.properties │ ├── project.properties │ ├── project.xml │ └── suite.properties ├── release │ └── modules │ │ └── ext │ │ ├── antlr-4.5-complete.jar │ │ └── cachedb.jar └── src │ ├── org │ └── nbstudio │ │ ├── Bundle.properties │ │ ├── Bundle_ru_RU.properties │ │ ├── Localize.java │ │ ├── cachefilechooser │ │ ├── CacheFileChooser.java │ │ ├── CacheFileChooserUI.java │ │ └── CacheFileNameExtensionFilter.java │ │ ├── cachefilesystem │ │ ├── CacheFileAttributes.java │ │ ├── CacheFileObject.java │ │ ├── CacheFileStore.java │ │ ├── CacheFileSystem.java │ │ ├── CacheFileSystemView.java │ │ ├── CacheFileView.java │ │ ├── CachePath.java │ │ ├── CacheRootFile.java │ │ ├── CacheURLConnection.java │ │ ├── CacheURLHandler.java │ │ ├── CacheURLMapper.java │ │ ├── CacheURLStreamHandler.java │ │ └── SourceEncodingQuery.java │ │ ├── core │ │ ├── CacheFile.java │ │ ├── CachePackage.java │ │ ├── Connection.java │ │ ├── Installer.java │ │ ├── NBStudioOptionsPanelController.java │ │ ├── NBStudioPanel.form │ │ ├── NBStudioPanel.java │ │ ├── OpenFileAction.java │ │ ├── OpenProject.java │ │ ├── bas │ │ │ ├── bas.gif │ │ │ ├── basDataObject.java │ │ │ ├── basTemplate.bas │ │ │ └── package-info.java │ │ ├── cls │ │ │ ├── Bundle.properties │ │ │ ├── CLSParserListerer4Save.java │ │ │ ├── CLSUtils.java │ │ │ ├── ClassFile.java │ │ │ ├── class.png │ │ │ ├── clsCodeCompletion.java │ │ │ ├── clsDataObject.java │ │ │ ├── clsFoldManager.java │ │ │ ├── clsFoldManagerFactory.java │ │ │ ├── clsIndentTask.java │ │ │ ├── clsIndentTaskFactory.java │ │ │ ├── clsReformatTask.java │ │ │ ├── clsReformatTaskFactory.java │ │ │ ├── clsTemplate.cls │ │ │ ├── clsVisualElement.form │ │ │ ├── clsVisualElement.java │ │ │ ├── newFileWizard.java │ │ │ ├── newfileVisualPanelName.form │ │ │ ├── newfileVisualPanelName.java │ │ │ ├── newfileVisualPanelType.form │ │ │ ├── newfileVisualPanelType.java │ │ │ ├── newfileVisualPanelTypeCSP.form │ │ │ ├── newfileVisualPanelTypeCSP.java │ │ │ ├── newfileVisualPanelTypePersistent.form │ │ │ ├── newfileVisualPanelTypePersistent.java │ │ │ ├── newfileVisualPanelTypeSummary.form │ │ │ ├── newfileVisualPanelTypeSummary.java │ │ │ ├── newfileWizardPanelName.java │ │ │ ├── newfileWizardPanelType.java │ │ │ ├── newfileWizardPanelTypeCSP.java │ │ │ ├── newfileWizardPanelTypePersistent.java │ │ │ └── newfileWizardPanelTypeSummary.java │ │ ├── clsExample.cls │ │ ├── clsSyntaxColors.xml │ │ ├── conn.gif │ │ ├── explorerWsmode.xml │ │ ├── folder1.gif │ │ ├── folder2.gif │ │ ├── folderClosed.gif │ │ ├── folderOpened.gif │ │ ├── layer.xml │ │ ├── mac │ │ │ ├── Bundle.properties │ │ │ ├── CodeStyle.java │ │ │ ├── FmtOptions.java │ │ │ ├── RoutineFile.java │ │ │ ├── editor-preferences.xml │ │ │ ├── editorKit.java │ │ │ ├── mac.gif │ │ │ ├── macCodeCompletion.java │ │ │ ├── macDataLoader.java │ │ │ ├── macDataObject.java │ │ │ ├── macEventListener.java │ │ │ ├── macExample.mac │ │ │ ├── macFoldManager.java │ │ │ ├── macFoldManagerFactory.java │ │ │ ├── macFormatter.java │ │ │ ├── macIndentTask.java │ │ │ ├── macIndentTaskFactory.java │ │ │ ├── macReformatTask.java │ │ │ ├── macReformatTaskFactory.java │ │ │ ├── macTemplate.mac │ │ │ ├── newfileVisualPanel1.form │ │ │ ├── newfileVisualPanel1.java │ │ │ ├── newfileWizard.java │ │ │ ├── newfileWizardPanel1.java │ │ │ └── node.java │ │ ├── macExample.mac │ │ ├── macSyntaxColors.xml │ │ ├── navigatorWsmode.xml │ │ ├── newfileWizardPanel.java │ │ ├── outputWsmode.xml │ │ ├── outputWstcref.xml │ │ ├── pkg │ │ │ ├── packageClosed.png │ │ │ └── pkgDataObject.java │ │ ├── prj │ │ │ ├── Bundle.properties │ │ │ ├── CacheProjectDescription.html │ │ │ ├── CacheProjectProject.zip │ │ │ ├── cacheDescription.html │ │ │ └── cacheProject.zip │ │ ├── projectTabLogicalWstcref.xml │ │ ├── propertiesWsmode.xml │ │ ├── resources │ │ │ ├── openProject.png │ │ │ └── openProject24.png │ │ ├── search-resultsWstcref.xml │ │ ├── serversWstcref.xml │ │ ├── xdata │ │ │ └── xdataDataObject.java │ │ ├── xdataExample.xdata │ │ └── xdataSyntaxColors.xml │ │ ├── project │ │ ├── Bundle.properties │ │ ├── CacheProject.html │ │ ├── CacheProject.java │ │ ├── CacheProject.zip │ │ ├── CacheProjectFactory.java │ │ ├── CacheProjectLogicalView.java │ │ ├── CacheProjectVisualPanel1.form │ │ ├── CacheProjectVisualPanel1.java │ │ ├── CacheProjectVisualPanel2.form │ │ ├── CacheProjectVisualPanel2.java │ │ ├── CacheProjectWizardIterator.java │ │ ├── CacheProjectWizardPanel1.java │ │ ├── CacheProjectWizardPanel2.java │ │ ├── ClassesNodeFactory.java │ │ ├── Customizer │ │ │ ├── CacheProjectCustomizerProvider.java │ │ │ └── GeneralProperties.java │ │ ├── FilteredNode.java │ │ ├── RoutinesNodeFactory.java │ │ ├── SourceNodeFactory.java │ │ └── project.gif │ │ ├── syntax │ │ ├── EditorParserResult.java │ │ ├── ErrorListener.java │ │ ├── LangProvider.java │ │ ├── SyntaxError.java │ │ ├── SyntaxErrorsHighlightingTask.java │ │ ├── cls │ │ │ ├── CLSLanguageHierarchy.java │ │ │ ├── clsEditorLexer.java │ │ │ ├── clsEditorParser.java │ │ │ ├── clsEmbeddingProvider.java │ │ │ ├── clsExample.cls │ │ │ ├── clsLexer.g4 │ │ │ ├── clsMyParserListener.java │ │ │ └── clsParser.g4 │ │ ├── mac │ │ │ ├── macEditorLexer.java │ │ │ ├── macEditorParser.java │ │ │ ├── macExample.mac │ │ │ ├── macLanguageHierarchy.java │ │ │ ├── macLexer.g4 │ │ │ └── macParser.g4 │ │ ├── testgrammarcls.sh │ │ ├── testgrammarmac.sh │ │ ├── testgrammarxdata.sh │ │ ├── utils │ │ │ ├── ANTLRCharStream.java │ │ │ ├── ANTLRTokenId.java │ │ │ └── ANTLRTokenReader.java │ │ └── xdata │ │ │ ├── xdataEditorLexer.java │ │ │ ├── xdataExample.xdata │ │ │ ├── xdataLanguageHierarchy.java │ │ │ ├── xdataLexer.g4 │ │ │ └── xdataParser.g4 │ │ ├── utils │ │ └── Logger.java │ │ └── version.properties │ └── resources │ ├── basFilesIcon.gif │ ├── clsFilesIcon.gif │ ├── cspFilesIcon.gif │ ├── files.bmp │ ├── files.bmp_02.gif │ ├── files.bmp_03.gif │ ├── files.bmp_04.gif │ ├── files.bmp_05.gif │ ├── files.bmp_06.gif │ ├── files.bmp_07.gif │ ├── files.bmp_08.gif │ ├── files.bmp_10.gif │ ├── files.bmp_11.gif │ ├── files.bmp_13.gif │ ├── files.bmp_14.gif │ ├── files.bmp_15.gif │ ├── files.bmp_16.gif │ ├── files.bmp_17.gif │ ├── intFilesIcon.gif │ ├── macFilesIcon.gif │ ├── mvbFilesIcon.gif │ └── prjFilesIcon.gif ├── README.md ├── branding ├── core │ └── core.jar │ │ └── org │ │ └── netbeans │ │ └── core │ │ └── startup │ │ ├── Bundle.properties │ │ ├── frame.gif │ │ ├── frame32.gif │ │ └── frame48.gif └── modules │ └── org-netbeans-core-windows.jar │ └── org │ └── netbeans │ └── core │ └── windows │ └── view │ └── ui │ └── Bundle.properties ├── build.xml ├── cachedb ├── build.xml ├── manifest.mf ├── nbproject │ ├── build-impl.xml │ ├── genfiles.properties │ ├── project.properties │ ├── project.xml │ └── suite.properties ├── release │ └── modules │ │ └── ext │ │ ├── cachedb.jar │ │ ├── cachegateway.jar │ │ └── cachejdbc.jar └── src │ ├── ISC │ └── Bundle.properties │ └── com │ └── intersys │ └── classes │ └── RoutineMgr.java ├── img ├── 1911488.png ├── Icon Entry_1.ico ├── Icon Entry_12.ico ├── Icon Entry_13.ico ├── Icon Entry_21.ico ├── Icon Entry_9.ico ├── Studio.svg ├── class.png ├── conn.gif ├── folder1.gif ├── nbstudio.png ├── nbstudio.xcf ├── netbeans-logo.png ├── packageClosed.png └── packageOpened.png ├── lib ├── cachedb.jar ├── cachegateway.jar └── cachejdbc.jar ├── nbproject ├── build-impl.xml ├── genfiles.properties ├── nbstudio.conf ├── platform.properties ├── platform.xml ├── project.properties └── project.xml └── tools ├── ant-contrib-1.0b3.jar └── cpptasks-1.0b5.jar /.gitignore: -------------------------------------------------------------------------------- 1 | /dist/ 2 | /cachedb/build/ 3 | /build/ 4 | /NBStudioCore/build/ 5 | /NBStudioCore/src/org/nbstudio/syntax/cls/clsLexer.java 6 | /NBStudioCore/src/org/nbstudio/syntax/cls/clsLexer.tokens 7 | /NBStudioCore/src/org/nbstudio/syntax/cls/clsParser.java 8 | /NBStudioCore/src/org/nbstudio/syntax/cls/clsParser.tokens 9 | /NBStudioCore/src/org/nbstudio/syntax/cls/clsParserBaseListener.java 10 | /NBStudioCore/src/org/nbstudio/syntax/cls/clsParserListener.java 11 | /NBStudioCore/src/org/nbstudio/syntax/mac/macLexer.java 12 | /NBStudioCore/src/org/nbstudio/syntax/mac/macLexer.tokens 13 | /NBStudioCore/src/org/nbstudio/syntax/mac/macParser.java 14 | /NBStudioCore/src/org/nbstudio/syntax/mac/macParser.tokens 15 | /NBStudioCore/src/org/nbstudio/syntax/mac/macParserBaseListener.java 16 | /NBStudioCore/src/org/nbstudio/syntax/mac/macParserListener.java 17 | /NBStudioCore/src/org/nbstudio/syntax/xdata/xdataLexer.java 18 | /NBStudioCore/src/org/nbstudio/syntax/xdata/xdataLexer.tokens 19 | /NBStudioCore/src/org/nbstudio/syntax/xdata/xdataParser.java 20 | /NBStudioCore/src/org/nbstudio/syntax/xdata/xdataParser.tokens 21 | /NBStudioCore/src/org/nbstudio/syntax/xdata/xdataParserBaseListener.java 22 | /NBStudioCore/src/org/nbstudio/syntax/xdata/xdataParserListener.java 23 | NBStudioCore/nbproject/private 24 | cachedb/nbproject/private 25 | nbproject/private 26 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: java 2 | jdk: 3 | - oraclejdk7 4 | - oraclejdk8 5 | install: 6 | ant build 7 | branches: 8 | only: 9 | - master 10 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Dmitry Maslennikov 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /NBStudioCore/build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Builds, tests, and runs the project org.nbstudio.core. 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | Build version ${buildVersion} 32 | 33 | generating java for grammar files 34 | 35 | 36 | 37 | 38 | 39 | 40 | antlr.tool: ${antlr.tool.src} 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | compile grammar file: ${theFile} 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /NBStudioCore/manifest.mf: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | OpenIDE-Module: org.nbstudio.core/1 3 | OpenIDE-Module-Install: org/nbstudio/core/Installer.class 4 | OpenIDE-Module-Layer: org/nbstudio/core/layer.xml 5 | OpenIDE-Module-Localizing-Bundle: org/nbstudio/Bundle.properties 6 | OpenIDE-Module-Requires: org.openide.windows.WindowManager 7 | OpenIDE-Module-Specification-Version: 1.0 8 | 9 | -------------------------------------------------------------------------------- /NBStudioCore/nbproject/build-impl.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | You must set 'suite.dir' to point to your containing module suite 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /NBStudioCore/nbproject/genfiles.properties: -------------------------------------------------------------------------------- 1 | build.xml.data.CRC32=e6e8e22c 2 | build.xml.script.CRC32=d2eacb83 3 | build.xml.stylesheet.CRC32=a56c6a5b@2.56.1 4 | # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. 5 | # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. 6 | nbproject/build-impl.xml.data.CRC32=8181246c 7 | nbproject/build-impl.xml.script.CRC32=ea016e6c 8 | nbproject/build-impl.xml.stylesheet.CRC32=238281d1@2.67.1 9 | -------------------------------------------------------------------------------- /NBStudioCore/nbproject/project.properties: -------------------------------------------------------------------------------- 1 | file.reference.antlr-4.5-complete.jar=release/modules/ext/antlr-4.5-complete.jar 2 | file.reference.cachedb.jar=release/modules/ext/cachedb.jar 3 | javac.source=1.7 4 | javac.compilerargs=-Xlint -Xlint:-serial 5 | source.reference.antlr-4.5-complete.jar=/Users/DAiMor/git/antlr4-4.5/runtime/Java/src 6 | -------------------------------------------------------------------------------- /NBStudioCore/nbproject/suite.properties: -------------------------------------------------------------------------------- 1 | suite.dir=${basedir}/.. 2 | -------------------------------------------------------------------------------- /NBStudioCore/release/modules/ext/antlr-4.5-complete.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daimor/NBStudio/ccaf7474c5e338313d15dac60adafb0670a61692/NBStudioCore/release/modules/ext/antlr-4.5-complete.jar -------------------------------------------------------------------------------- /NBStudioCore/release/modules/ext/cachedb.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daimor/NBStudio/ccaf7474c5e338313d15dac60adafb0670a61692/NBStudioCore/release/modules/ext/cachedb.jar -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/Bundle.properties: -------------------------------------------------------------------------------- 1 | OpenIDE-Module-Name=NBStudioCore 2 | text/isc-mac=Cach\u00e9 MAC 3 | text/isc-cls=Cach\u00e9 Classes 4 | text/isc-xdata=XData 5 | # tokens 6 | command=Command 7 | identifier=Identifier 8 | keyword=Keyword 9 | character=Character 10 | description=Description 11 | comment=Comment 12 | number=Number 13 | name=Name 14 | # Add Connection dialog 15 | AddConnectionTitle=Add connection 16 | AddConnectionName=Server name 17 | AddConnectionAddress=Address 18 | AddConnectionSuperPort=Super port 19 | AddConnectionWebPort=Web port 20 | AddConnectionErrorAddress=Please enter a valid address and port 21 | AddConnectionErrorConnect=Error connect to server 22 | OpenFileDialogTitle=Open file 23 | CTL_OpenProject=Open project 24 | CTL_OpenFileAction=Open file 25 | 26 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/Bundle_ru_RU.properties: -------------------------------------------------------------------------------- 1 | OpenIDE-Module-Name=NBStudioCore 2 | text/isc-mac=Cach\u00e9 MAC 3 | text/isc-cls=Cach\u00e9 \u041a\u043b\u0430\u0441\u0441\u044b 4 | text/isc-xdata=XData 5 | command=\u041a\u043e\u043c\u043c\u0430\u043d\u0434\u0430 6 | identifier=\u0418\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 7 | number=\u0427\u0438\u0441\u043b\u043e 8 | keyword=\u041a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u0441\u043b\u043e\u0432\u043e 9 | character=\u0421\u0442\u0440\u043e\u043a\u0430 10 | description=\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 11 | comment=\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 12 | name=\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 13 | OpenFileDialogTitle=\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u0444\u0430\u0439\u043b 14 | CTL_OpenProject=\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 15 | CTL_OpenFileAction=\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u0444\u0430\u0439\u043b 16 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/Localize.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor. 4 | */ 5 | package org.nbstudio; 6 | 7 | /** 8 | * 9 | * @author daimor 10 | */ 11 | public class Localize { 12 | 13 | public static String getMessage(String resName) { 14 | return org.openide.util.NbBundle.getMessage(Localize.class, resName); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/cachefilesystem/CacheFileAttributes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor. 4 | */ 5 | package org.nbstudio.cachefilesystem; 6 | 7 | import java.nio.file.attribute.DosFileAttributes; 8 | import java.nio.file.attribute.FileTime; 9 | 10 | /** 11 | * 12 | * @author daimor 13 | */ 14 | public class CacheFileAttributes implements DosFileAttributes { 15 | 16 | @Override 17 | public boolean isReadOnly() { 18 | return false; 19 | } 20 | 21 | @Override 22 | public boolean isHidden() { 23 | return false; 24 | } 25 | 26 | @Override 27 | public boolean isArchive() { 28 | return false; 29 | } 30 | 31 | @Override 32 | public boolean isSystem() { 33 | return false; 34 | } 35 | 36 | @Override 37 | public FileTime lastModifiedTime() { 38 | return FileTime.fromMillis(0); 39 | } 40 | 41 | @Override 42 | public FileTime lastAccessTime() { 43 | return FileTime.fromMillis(0); 44 | } 45 | 46 | @Override 47 | public FileTime creationTime() { 48 | return FileTime.fromMillis(0); 49 | } 50 | 51 | @Override 52 | public boolean isRegularFile() { 53 | return true; 54 | } 55 | 56 | @Override 57 | public boolean isDirectory() { 58 | return false; 59 | } 60 | 61 | @Override 62 | public boolean isSymbolicLink() { 63 | return false; 64 | } 65 | 66 | @Override 67 | public boolean isOther() { 68 | return false; 69 | } 70 | 71 | @Override 72 | public long size() { 73 | return 0; 74 | } 75 | 76 | @Override 77 | public Object fileKey() { 78 | return null; 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/cachefilesystem/CacheFileStore.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor. 4 | */ 5 | package org.nbstudio.cachefilesystem; 6 | 7 | import java.io.IOException; 8 | import java.nio.file.FileStore; 9 | import java.nio.file.attribute.FileAttributeView; 10 | import java.nio.file.attribute.FileStoreAttributeView; 11 | 12 | /** 13 | * 14 | * @author daimor 15 | */ 16 | public class CacheFileStore extends FileStore { 17 | 18 | @Override 19 | public String name() { 20 | throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. 21 | } 22 | 23 | @Override 24 | public String type() { 25 | throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. 26 | } 27 | 28 | @Override 29 | public boolean isReadOnly() { 30 | throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. 31 | } 32 | 33 | @Override 34 | public long getTotalSpace() throws IOException { 35 | throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. 36 | } 37 | 38 | @Override 39 | public long getUsableSpace() throws IOException { 40 | throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. 41 | } 42 | 43 | @Override 44 | public long getUnallocatedSpace() throws IOException { 45 | throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. 46 | } 47 | 48 | @Override 49 | public boolean supportsFileAttributeView(Class type) { 50 | throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. 51 | } 52 | 53 | @Override 54 | public boolean supportsFileAttributeView(String name) { 55 | throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. 56 | } 57 | 58 | @Override 59 | public V getFileStoreAttributeView(Class type) { 60 | throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. 61 | } 62 | 63 | @Override 64 | public Object getAttribute(String attribute) throws IOException { 65 | throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. 66 | } 67 | 68 | } 69 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/cachefilesystem/CacheURLConnection.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor. 4 | */ 5 | package org.nbstudio.cachefilesystem; 6 | 7 | import java.io.IOException; 8 | import java.net.URL; 9 | import sun.net.www.URLConnection; 10 | 11 | /** 12 | * 13 | * @author daimor 14 | */ 15 | public class CacheURLConnection extends URLConnection { 16 | 17 | public CacheURLConnection(URL url) { 18 | super(url); 19 | } 20 | 21 | @Override 22 | public void connect() throws IOException { 23 | 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/cachefilesystem/CacheURLHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor. 4 | */ 5 | package org.nbstudio.cachefilesystem; 6 | 7 | import java.io.IOException; 8 | import java.net.URL; 9 | import java.net.URLConnection; 10 | import java.net.URLStreamHandler; 11 | 12 | /** 13 | * 14 | * @author daimor 15 | */ 16 | public class CacheURLHandler extends URLStreamHandler{ 17 | 18 | @Override 19 | protected URLConnection openConnection(URL url) throws IOException { 20 | return new CacheURLConnection(url); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/cachefilesystem/CacheURLMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor. 4 | */ 5 | package org.nbstudio.cachefilesystem; 6 | 7 | import java.net.MalformedURLException; 8 | import java.net.URI; 9 | import java.net.URISyntaxException; 10 | import java.net.URL; 11 | import org.nbstudio.core.Connection; 12 | import org.openide.filesystems.FileObject; 13 | import org.openide.filesystems.FileStateInvalidException; 14 | import org.openide.filesystems.FileSystem; 15 | import org.openide.filesystems.URLMapper; 16 | import org.openide.util.Exceptions; 17 | import org.openide.util.lookup.ServiceProvider; 18 | 19 | /** 20 | * 21 | * @author daimor 22 | */ 23 | @ServiceProvider(service = URLMapper.class) 24 | public class CacheURLMapper extends URLMapper { 25 | 26 | public static final String PROTOCOL = "isc"; //NOI18N 27 | 28 | @Override 29 | public URL getURL(FileObject fo, int type) { 30 | if (fo instanceof CacheFileObject) { 31 | try { 32 | CacheFileObject cfo = (CacheFileObject) fo; 33 | CacheFileSystem fs = (CacheFileSystem) cfo.getFileSystem(); 34 | String connName = fs.getConnection().getTitle(); 35 | return new URL(PROTOCOL, connName, cfo.getFullPath()); 36 | } catch (MalformedURLException | FileStateInvalidException ex) { 37 | } 38 | } 39 | return null; 40 | } 41 | 42 | @Override 43 | public FileObject[] getFileObjects(URL url) { 44 | return (PROTOCOL.equals(url.getProtocol())) ? decodeURL(url) : null; 45 | } 46 | 47 | /** 48 | * Resolves URL into the array of the FileObjects. 49 | * 50 | * @param url to be resolved 51 | * @return FileObject[], returns null if unknown url protocol. 52 | */ 53 | static FileObject[] decodeURL(URL url) { 54 | assert url != null; 55 | try { 56 | URI uri = new URI(url.toExternalForm()); 57 | String protocol = uri.getScheme(); 58 | if (PROTOCOL.equals(protocol)) { 59 | String connectionName = uri.getHost(); 60 | String path = uri.getPath(); 61 | try { 62 | Connection conn = Connection.getConnection(connectionName); 63 | if (conn != null) { 64 | CacheRootFile file = new CacheRootFile(connectionName + path); 65 | FileSystem fs = conn.getFileSystem(); 66 | if (fs.getRoot() != null) { 67 | FileObject fo = fs.getRoot().getFileObject(path); 68 | return new FileObject[]{fo}; 69 | } 70 | } 71 | } catch (Exception ex) { 72 | ex.printStackTrace(); 73 | } 74 | } 75 | } catch (URISyntaxException use) { 76 | Exceptions.printStackTrace(use); 77 | } 78 | return null; 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/cachefilesystem/CacheURLStreamHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor. 4 | */ 5 | package org.nbstudio.cachefilesystem; 6 | 7 | import java.io.IOException; 8 | import java.net.URL; 9 | import java.net.URLConnection; 10 | import java.net.URLStreamHandler; 11 | import org.openide.util.URLStreamHandlerRegistration; 12 | 13 | /** 14 | * 15 | * @author daimor 16 | */ 17 | @URLStreamHandlerRegistration(protocol = {CacheURLMapper.PROTOCOL}) 18 | public class CacheURLStreamHandler extends URLStreamHandler { 19 | 20 | @Override 21 | protected URLConnection openConnection(URL url) throws IOException { 22 | System.out.println("MyHandler: " + this); 23 | return new CacheURLConnection(url); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/cachefilesystem/SourceEncodingQuery.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor. 4 | */ 5 | package org.nbstudio.cachefilesystem; 6 | 7 | import java.nio.charset.Charset; 8 | import org.netbeans.spi.queries.FileEncodingQueryImplementation; 9 | import org.openide.filesystems.FileObject; 10 | import org.openide.util.lookup.ServiceProvider; 11 | import org.openide.util.lookup.ServiceProviders; 12 | 13 | /** 14 | * 15 | * @author daimor 16 | */ 17 | @ServiceProviders({ 18 | @ServiceProvider(service = FileEncodingQueryImplementation.class)}) 19 | public class SourceEncodingQuery extends FileEncodingQueryImplementation { 20 | 21 | private static final Charset UTF8 = Charset.forName("UTF-8"); 22 | private static final Charset CP1251 = Charset.forName("windows-1251"); 23 | 24 | @Override 25 | public Charset getEncoding(FileObject file) { 26 | Charset charset = UTF8; 27 | return charset; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/CacheFile.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor. 4 | */ 5 | package org.nbstudio.core; 6 | 7 | import com.intersys.objects.Database; 8 | import java.io.InputStream; 9 | import java.util.Date; 10 | 11 | /** 12 | * 13 | * @author daimor 14 | */ 15 | public class CacheFile { 16 | 17 | String name; 18 | public Database db; 19 | 20 | public CacheFile(Database db, String name) { 21 | this.name = name; 22 | this.db = db; 23 | } 24 | 25 | public String getName() { 26 | return this.name; 27 | } 28 | 29 | public String getTitle() { 30 | return this.name; 31 | } 32 | 33 | public Date getDate() { 34 | return null; 35 | } 36 | 37 | public int getSize() { 38 | return -1; 39 | } 40 | 41 | public InputStream open() { 42 | return null; 43 | } 44 | 45 | public void save(byte[] data) { 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/CachePackage.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor. 4 | */ 5 | package org.nbstudio.core; 6 | 7 | import com.intersys.classes.Dictionary.PackageDefinition; 8 | import com.intersys.objects.CacheException; 9 | import com.intersys.objects.Database; 10 | import java.io.InputStream; 11 | import java.util.Date; 12 | 13 | /** 14 | * 15 | * @author daimor 16 | */ 17 | public class CachePackage extends CacheFile { 18 | 19 | PackageDefinition pkg = null; 20 | 21 | public CachePackage(Database db, String name) throws CacheException { 22 | super(db, name); 23 | pkg = new PackageDefinition(db, this.name); 24 | } 25 | 26 | @Override 27 | public Date getDate() { 28 | return null; 29 | } 30 | 31 | @Override 32 | public int getSize() { 33 | return -1; 34 | } 35 | 36 | @Override 37 | public InputStream open() { 38 | return null; 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/Installer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor. 4 | */ 5 | package org.nbstudio.core; 6 | 7 | import java.io.IOException; 8 | import java.util.Map; 9 | import java.util.ResourceBundle; 10 | import org.openide.modules.ModuleInstall; 11 | 12 | public class Installer extends ModuleInstall { 13 | 14 | @Override 15 | public void restored() { 16 | ResourceBundle rb = ResourceBundle.getBundle("org/nbstudio/version"); 17 | System.setProperty("netbeans.buildnumber", rb.getString("FULLVERSION")); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/NBStudioOptionsPanelController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor. 4 | */ 5 | 6 | package org.nbstudio.core; 7 | 8 | import java.beans.PropertyChangeListener; 9 | import java.beans.PropertyChangeSupport; 10 | import javax.swing.JComponent; 11 | import org.netbeans.spi.options.OptionsPanelController; 12 | import org.openide.util.HelpCtx; 13 | import org.openide.util.Lookup; 14 | 15 | @OptionsPanelController.SubRegistration( 16 | location="Advanced", 17 | displayName="#AdvancedOption_DisplayName_NBStudio", 18 | keywords="#AdvancedOption_Keywords_NBStudio", 19 | keywordsCategory="Advanced/NBStudio" 20 | ) 21 | @org.openide.util.NbBundle.Messages({"AdvancedOption_DisplayName_NBStudio=NBStudio", "AdvancedOption_Keywords_NBStudio=nbstudio"}) 22 | public final class NBStudioOptionsPanelController extends OptionsPanelController { 23 | 24 | private NBStudioPanel panel; 25 | private final PropertyChangeSupport pcs = new PropertyChangeSupport(this); 26 | private boolean changed; 27 | 28 | @Override 29 | public void update() { 30 | getPanel().load(); 31 | changed = false; 32 | } 33 | 34 | @Override 35 | public void applyChanges() { 36 | getPanel().store(); 37 | changed = false; 38 | } 39 | 40 | @Override 41 | public void cancel() { 42 | // need not do anything special, if no changes have been persisted yet 43 | } 44 | 45 | @Override 46 | public boolean isValid() { 47 | return getPanel().valid(); 48 | } 49 | 50 | @Override 51 | public boolean isChanged() { 52 | return changed; 53 | } 54 | 55 | @Override 56 | public HelpCtx getHelpCtx() { 57 | return null; // new HelpCtx("...ID") if you have a help set 58 | } 59 | 60 | @Override 61 | public JComponent getComponent(Lookup masterLookup) { 62 | return getPanel(); 63 | } 64 | 65 | @Override 66 | public void addPropertyChangeListener(PropertyChangeListener l) { 67 | pcs.addPropertyChangeListener(l); 68 | } 69 | 70 | @Override 71 | public void removePropertyChangeListener(PropertyChangeListener l) { 72 | pcs.removePropertyChangeListener(l); 73 | } 74 | 75 | private NBStudioPanel getPanel() { 76 | if (panel == null) { 77 | panel = new NBStudioPanel(this); 78 | } 79 | return panel; 80 | } 81 | 82 | void changed() { 83 | if (!changed) { 84 | changed = true; 85 | pcs.firePropertyChange(OptionsPanelController.PROP_CHANGED, false, true); 86 | } 87 | pcs.firePropertyChange(OptionsPanelController.PROP_VALID, null, null); 88 | } 89 | 90 | } 91 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/NBStudioPanel.form: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/NBStudioPanel.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor. 4 | */ 5 | 6 | package org.nbstudio.core; 7 | 8 | final class NBStudioPanel extends javax.swing.JPanel { 9 | 10 | private final NBStudioOptionsPanelController controller; 11 | 12 | NBStudioPanel(NBStudioOptionsPanelController controller) { 13 | this.controller = controller; 14 | initComponents(); 15 | // TODO listen to changes in form fields and call controller.changed() 16 | } 17 | 18 | /** This method is called from within the constructor to 19 | * initialize the form. 20 | * WARNING: Do NOT modify this code. The content of this method is 21 | * always regenerated by the Form Editor. 22 | */ 23 | // //GEN-BEGIN:initComponents 24 | private void initComponents() { 25 | 26 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); 27 | this.setLayout(layout); 28 | layout.setHorizontalGroup( 29 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 30 | .addGap(0, 202, Short.MAX_VALUE) 31 | ); 32 | layout.setVerticalGroup( 33 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 34 | .addGap(0, 68, Short.MAX_VALUE) 35 | ); 36 | }// //GEN-END:initComponents 37 | 38 | void load() { 39 | // TODO read settings and initialize GUI 40 | // Example: 41 | // someCheckBox.setSelected(Preferences.userNodeForPackage(NBStudioPanel.class).getBoolean("someFlag", false)); 42 | // or for org.openide.util with API spec. version >= 7.4: 43 | // someCheckBox.setSelected(NbPreferences.forModule(NBStudioPanel.class).getBoolean("someFlag", false)); 44 | // or: 45 | // someTextField.setText(SomeSystemOption.getDefault().getSomeStringProperty()); 46 | } 47 | 48 | void store() { 49 | // TODO store modified settings 50 | // Example: 51 | // Preferences.userNodeForPackage(NBStudioPanel.class).putBoolean("someFlag", someCheckBox.isSelected()); 52 | // or for org.openide.util with API spec. version >= 7.4: 53 | // NbPreferences.forModule(NBStudioPanel.class).putBoolean("someFlag", someCheckBox.isSelected()); 54 | // or: 55 | // SomeSystemOption.getDefault().setSomeStringProperty(someTextField.getText()); 56 | } 57 | 58 | boolean valid() { 59 | // TODO check whether form is consistent and complete 60 | return true; 61 | } 62 | 63 | // Variables declaration - do not modify//GEN-BEGIN:variables 64 | // End of variables declaration//GEN-END:variables 65 | 66 | } 67 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/OpenFileAction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor. 4 | */ 5 | package org.nbstudio.core; 6 | 7 | import java.awt.HeadlessException; 8 | import java.awt.event.ActionEvent; 9 | import java.awt.event.ActionListener; 10 | import java.io.File; 11 | import java.net.MalformedURLException; 12 | import javax.swing.JFileChooser; 13 | import org.nbstudio.cachefilechooser.CacheFileChooser; 14 | import org.nbstudio.cachefilechooser.CacheFileNameExtensionFilter; 15 | import org.openide.awt.ActionID; 16 | import org.openide.awt.ActionRegistration; 17 | import org.openide.cookies.OpenCookie; 18 | import org.openide.filesystems.FileObject; 19 | import org.openide.filesystems.URLMapper; 20 | import org.openide.loaders.DataObject; 21 | import org.openide.loaders.DataObjectNotFoundException; 22 | 23 | /** 24 | * 25 | * @author daimor 26 | */ 27 | @ActionID(category = "System", id = "org.netbeans.modules.openfile.OpenFileAction") 28 | @ActionRegistration(displayName = "org.nbstudio.Bundle#CTL_OpenFileAction") 29 | //@ActionReference(path = "Menu/File", position = 800) 30 | public class OpenFileAction implements ActionListener { 31 | 32 | @Override 33 | public void actionPerformed(ActionEvent e) { 34 | try { 35 | CacheFileChooser fileChooser = new CacheFileChooser() { 36 | @Override 37 | public void updateUI() { 38 | addChoosableFileFilter(new CacheFileNameExtensionFilter("Macro Routine", new String[]{"mac"})); 39 | addChoosableFileFilter(new CacheFileNameExtensionFilter("Intermediate Routine", new String[]{"int", "mvi"})); 40 | addChoosableFileFilter(new CacheFileNameExtensionFilter("Include File", new String[]{"inc"})); 41 | addChoosableFileFilter(new CacheFileNameExtensionFilter("Basic File", new String[]{"bas"})); 42 | addChoosableFileFilter(new CacheFileNameExtensionFilter("Class definition", new String[]{"cls"})); 43 | addChoosableFileFilter(new CacheFileNameExtensionFilter("Cache Server Pages", new String[]{"csp"})); 44 | addChoosableFileFilter(new CacheFileNameExtensionFilter("Other Files", new String[]{"xml", "js", "css", "xsl", "xsd"})); 45 | super.updateUI(); 46 | } 47 | }; 48 | 49 | int answer = fileChooser.showOpenDialog(null); 50 | if (answer == JFileChooser.APPROVE_OPTION) { 51 | File[] files = fileChooser.getSelectedFiles(); 52 | for (File file : files) { 53 | FileObject fileObject = URLMapper.findFileObject(file.toURI().toURL()); 54 | DataObject.find(fileObject). 55 | getLookup().lookup(OpenCookie.class).open(); 56 | } 57 | } 58 | } catch (HeadlessException | MalformedURLException | DataObjectNotFoundException ex) { 59 | ex.printStackTrace(); 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/OpenProject.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor. 4 | */ 5 | package org.nbstudio.core; 6 | 7 | import org.nbstudio.project.CacheProject; 8 | import java.awt.HeadlessException; 9 | import java.awt.event.ActionEvent; 10 | import java.awt.event.ActionListener; 11 | import java.io.File; 12 | import java.io.IOException; 13 | import java.net.URL; 14 | import javax.swing.JFileChooser; 15 | import org.nbstudio.cachefilechooser.CacheFileChooser; 16 | import org.nbstudio.cachefilechooser.CacheFileNameExtensionFilter; 17 | import org.nbstudio.cachefilesystem.CacheFileSystem; 18 | import org.netbeans.api.project.ProjectManager; 19 | import org.openide.filesystems.FileObject; 20 | import org.openide.filesystems.URLMapper; 21 | 22 | /** 23 | * 24 | * @author daimor 25 | */ 26 | //@ActionID(category = "Project", id = "org.netbeans.modules.project.ui.OpenProject") 27 | //@ActionRegistration( 28 | // displayName = "org.nbstudio.Bundle#CTL_OpenProject", 29 | // iconBase = "org/nbstudio/core/resources/openProject.png") 30 | public class OpenProject implements ActionListener { 31 | 32 | @Override 33 | public void actionPerformed(ActionEvent e) { 34 | try { 35 | CacheFileChooser fileChooser = new CacheFileChooser(); 36 | fileChooser.setMultiSelectionEnabled(false); 37 | fileChooser.getFileSystemView().setShowProjectFiles(true); 38 | fileChooser.setAcceptAllFileFilterUsed(false); 39 | fileChooser.addChoosableFileFilter(new CacheFileNameExtensionFilter("Project files", new String[]{"prj"})); 40 | fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); 41 | 42 | int answer = fileChooser.showOpenDialog(null); 43 | if (answer == JFileChooser.APPROVE_OPTION) { 44 | File[] files; 45 | if (fileChooser.isMultiSelectionEnabled()) { 46 | files = fileChooser.getSelectedFiles(); 47 | } else { 48 | files = new File[]{fileChooser.getSelectedFile()}; 49 | } 50 | for (File file : files) { 51 | URL fileURL = file.toURI().toURL(); 52 | FileObject fileObject = URLMapper.findFileObject(fileURL); 53 | CacheProject prj = (CacheProject) ProjectManager.getDefault().findProject(fileObject); 54 | CacheFileSystem fs = (CacheFileSystem) fileObject.getFileSystem(); 55 | // if (fs.getConnection().addProject(prj)) { 56 | //// OpenProjects.getDefault().open(new Project[]{prj}, false); 57 | // } 58 | } 59 | } 60 | } catch (HeadlessException | IOException | IllegalArgumentException ex) { 61 | ex.printStackTrace(); 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/bas/bas.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daimor/NBStudio/ccaf7474c5e338313d15dac60adafb0670a61692/NBStudioCore/src/org/nbstudio/core/bas/bas.gif -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/bas/basDataObject.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor. 4 | */ 5 | package org.nbstudio.core.bas; 6 | 7 | import java.io.IOException; 8 | import org.openide.awt.ActionID; 9 | import org.openide.awt.ActionReference; 10 | import org.openide.awt.ActionReferences; 11 | import org.openide.filesystems.FileObject; 12 | import org.openide.filesystems.MIMEResolver; 13 | import org.openide.loaders.DataObject; 14 | import org.openide.loaders.DataObjectExistsException; 15 | import org.openide.loaders.MultiDataObject; 16 | import org.openide.loaders.MultiFileLoader; 17 | import org.openide.util.NbBundle.Messages; 18 | 19 | @Messages({ 20 | "LBL_bas_LOADER=Files of bas" 21 | }) 22 | @MIMEResolver.ExtensionRegistration( 23 | displayName = "#LBL_bas_LOADER", 24 | mimeType = "text/isc-bas", 25 | extension = {"bas"}) 26 | @DataObject.Registration( 27 | mimeType = "text/isc-bas", 28 | iconBase = "org/nbstudio/core/bas/bas.gif", 29 | displayName = "#LBL_bas_LOADER", 30 | position = 300) 31 | @ActionReferences({ 32 | @ActionReference( 33 | path = "Loaders/text/isc-bas/Actions", 34 | id = 35 | @ActionID(category = "System", id = "org.openide.actions.OpenAction"), 36 | position = 100, 37 | separatorAfter = 200), 38 | @ActionReference( 39 | path = "Loaders/text/isc-bas/Actions", 40 | id = 41 | @ActionID(category = "Edit", id = "org.openide.actions.CutAction"), 42 | position = 300), 43 | @ActionReference( 44 | path = "Loaders/text/isc-bas/Actions", 45 | id = 46 | @ActionID(category = "Edit", id = "org.openide.actions.CopyAction"), 47 | position = 400, 48 | separatorAfter = 500), 49 | @ActionReference( 50 | path = "Loaders/text/isc-bas/Actions", 51 | id = 52 | @ActionID(category = "Edit", id = "org.openide.actions.DeleteAction"), 53 | position = 600), 54 | @ActionReference( 55 | path = "Loaders/text/isc-bas/Actions", 56 | id = 57 | @ActionID(category = "System", id = "org.openide.actions.RenameAction"), 58 | position = 700, 59 | separatorAfter = 800), 60 | @ActionReference( 61 | path = "Loaders/text/isc-bas/Actions", 62 | id = 63 | @ActionID(category = "System", id = "org.openide.actions.SaveAsTemplateAction"), 64 | position = 900, 65 | separatorAfter = 1000), 66 | @ActionReference( 67 | path = "Loaders/text/isc-bas/Actions", 68 | id = 69 | @ActionID(category = "System", id = "org.openide.actions.FileSystemAction"), 70 | position = 1100, 71 | separatorAfter = 1200), 72 | @ActionReference( 73 | path = "Loaders/text/isc-bas/Actions", 74 | id = 75 | @ActionID(category = "System", id = "org.openide.actions.ToolsAction"), 76 | position = 1300), 77 | @ActionReference( 78 | path = "Loaders/text/isc-bas/Actions", 79 | id = 80 | @ActionID(category = "System", id = "org.openide.actions.PropertiesAction"), 81 | position = 1400) 82 | }) 83 | public class basDataObject extends MultiDataObject { 84 | 85 | public basDataObject(FileObject pf, MultiFileLoader loader) throws DataObjectExistsException, IOException { 86 | super(pf, loader); 87 | registerEditor("text/isc-bas", false); 88 | } 89 | 90 | @Override 91 | protected int associateLookup() { 92 | return 1; 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/bas/basTemplate.bas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daimor/NBStudio/ccaf7474c5e338313d15dac60adafb0670a61692/NBStudioCore/src/org/nbstudio/core/bas/basTemplate.bas -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/bas/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor. 4 | */ 5 | @TemplateRegistration(folder = "Cache", content = "basTemplate.bas", displayName = "BAS Routine") 6 | package org.nbstudio.core.bas; 7 | 8 | import org.netbeans.api.templates.TemplateRegistration; 9 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/cls/Bundle.properties: -------------------------------------------------------------------------------- 1 | 2 | newfileVisualPanelName.labelDescription.text=Description 3 | newfileVisualPanelName.jLabel1.text=Class Name: 4 | newfileVisualPanelName.textClassName.text=ClassName1 5 | newfileVisualPanelName.jLabel2.text=Package name: 6 | newfileVisualPanelType.jRadioButton1.text=Persistent (can be stored within the database) 7 | newfileVisualPanelType.jRadioButton2.text=Serial (can be embedded within persistent obejcts) 8 | newfileVisualPanelType.jRadioButton3.text=Registered (not stored within the database) 9 | newfileVisualPanelType.jRadioButton4.text=Abstract 10 | newfileVisualPanelType.jRadioButton5.text=Datatype 11 | newfileVisualPanelType.jRadioButton6.text=CSP (used to process HTTP events) 12 | newfileVisualPanelType.jRadioButton7.text=Extends 13 | newfileVisualPanelType.jLabel1.text=Name of super class: 14 | newfileVisualPanelType.textSuperClass.text= 15 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/cls/class.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daimor/NBStudio/ccaf7474c5e338313d15dac60adafb0670a61692/NBStudioCore/src/org/nbstudio/core/cls/class.png -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/cls/clsFoldManager.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor. 4 | */ 5 | package org.nbstudio.core.cls; 6 | 7 | import javax.swing.event.DocumentEvent; 8 | import org.netbeans.api.editor.fold.Fold; 9 | import org.netbeans.api.editor.fold.FoldType; 10 | import org.netbeans.spi.editor.fold.FoldHierarchyTransaction; 11 | import org.netbeans.spi.editor.fold.FoldManager; 12 | import org.netbeans.spi.editor.fold.FoldOperation; 13 | 14 | public class clsFoldManager implements FoldManager { 15 | 16 | private FoldOperation operation; 17 | public static final FoldType COMMENT_FOLD_TYPE = new FoldType("/*...*/"); 18 | 19 | @Override 20 | public void init(FoldOperation operation) { 21 | this.operation = operation; 22 | } 23 | 24 | @Override 25 | public void initFolds(FoldHierarchyTransaction transaction) { 26 | // FoldHierarchy hierarchy = operation.getHierarchy(); 27 | // Document document = hierarchy.getComponent().getDocument(); 28 | // TokenHierarchy hi = TokenHierarchy.get(document); 29 | // TokenSequence ts = (TokenSequence) hi.tokenSequence(); 30 | // FoldType type = null; 31 | // int start = 0; 32 | // int offset = 0; 33 | // while (ts.moveNext()) { 34 | // offset = ts.offset(); 35 | // Token token = ts.token(); 36 | // clsTokenId id = token.id(); 37 | // if (id.name().equals("FORMAL_COMMENT") && type == null) { 38 | // type = COMMENT_FOLD_TYPE; 39 | // start = offset; 40 | // try { 41 | // operation.addToHierarchy( 42 | // type, 43 | // type.toString(), 44 | // false, 45 | // start, 46 | // offset + token.length(), 47 | // 0, 48 | // 0, 49 | // hierarchy, 50 | // transaction); 51 | // } catch (BadLocationException ex) { 52 | // Exceptions.printStackTrace(ex); 53 | // } 54 | // } 55 | // } 56 | } 57 | 58 | @Override 59 | public void insertUpdate(DocumentEvent evt, FoldHierarchyTransaction transaction) { 60 | } 61 | 62 | @Override 63 | public void removeUpdate(DocumentEvent evt, FoldHierarchyTransaction transaction) { 64 | } 65 | 66 | @Override 67 | public void changedUpdate(DocumentEvent evt, FoldHierarchyTransaction transaction) { 68 | } 69 | 70 | @Override 71 | public void removeEmptyNotify(Fold epmtyFold) { 72 | } 73 | 74 | @Override 75 | public void removeDamagedNotify(Fold damagedFold) { 76 | } 77 | 78 | @Override 79 | public void expandNotify(Fold expandedFold) { 80 | } 81 | 82 | @Override 83 | public void release() { 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/cls/clsFoldManagerFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor. 4 | */ 5 | package org.nbstudio.core.cls; 6 | 7 | import org.netbeans.api.editor.mimelookup.MimeRegistration; 8 | import org.netbeans.spi.editor.fold.FoldManager; 9 | import org.netbeans.spi.editor.fold.FoldManagerFactory; 10 | 11 | @MimeRegistration(mimeType = "text/isc-cls", service = FoldManagerFactory.class) 12 | public class clsFoldManagerFactory implements FoldManagerFactory{ 13 | 14 | @Override 15 | public FoldManager createFoldManager() { 16 | return new clsFoldManager(); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/cls/clsIndentTask.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor. 4 | */ 5 | package org.nbstudio.core.cls; 6 | 7 | import javax.swing.text.BadLocationException; 8 | import org.netbeans.modules.editor.indent.spi.Context; 9 | import org.netbeans.modules.editor.indent.spi.ExtraLock; 10 | import org.netbeans.modules.editor.indent.spi.IndentTask; 11 | import org.openide.awt.StatusDisplayer; 12 | 13 | /** 14 | * 15 | * @author daimor 16 | */ 17 | public class clsIndentTask implements IndentTask { 18 | 19 | private final Context context; 20 | 21 | public clsIndentTask(Context context) { 22 | this.context = context; 23 | } 24 | 25 | @Override 26 | public void reindent() throws BadLocationException { 27 | StatusDisplayer.getDefault().setStatusText("We will indent this now..."); 28 | } 29 | 30 | @Override 31 | public ExtraLock indentLock() { 32 | return null; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/cls/clsIndentTaskFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor. 4 | */ 5 | package org.nbstudio.core.cls; 6 | 7 | import org.netbeans.api.editor.mimelookup.MimeRegistration; 8 | import org.netbeans.modules.editor.indent.spi.Context; 9 | import org.netbeans.modules.editor.indent.spi.IndentTask; 10 | 11 | @MimeRegistration(mimeType = "text/isc-cls", service = IndentTask.Factory.class) 12 | public class clsIndentTaskFactory implements IndentTask.Factory { 13 | 14 | @Override 15 | public IndentTask createTask(Context cntxt) { 16 | return new clsIndentTask(cntxt); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/cls/clsReformatTask.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor. 4 | */ 5 | package org.nbstudio.core.cls; 6 | 7 | import javax.swing.text.BadLocationException; 8 | import org.netbeans.modules.editor.indent.spi.Context; 9 | import org.netbeans.modules.editor.indent.spi.ExtraLock; 10 | import org.netbeans.modules.editor.indent.spi.ReformatTask; 11 | import org.openide.awt.StatusDisplayer; 12 | 13 | /** 14 | * 15 | * @author daimor 16 | */ 17 | public class clsReformatTask implements ReformatTask { 18 | private final Context context; 19 | 20 | public clsReformatTask(Context context) { 21 | this.context = context; 22 | } 23 | 24 | 25 | @Override 26 | public void reformat() throws BadLocationException { 27 | StatusDisplayer.getDefault().setStatusText("We will format this now..."); 28 | } 29 | 30 | @Override 31 | public ExtraLock reformatLock() { 32 | return null; 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/cls/clsReformatTaskFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor. 4 | */ 5 | package org.nbstudio.core.cls; 6 | 7 | import org.netbeans.api.editor.mimelookup.MimeRegistration; 8 | import org.netbeans.modules.editor.indent.spi.Context; 9 | import org.netbeans.modules.editor.indent.spi.ReformatTask; 10 | 11 | @MimeRegistration(mimeType = "text/isc-cls", service = ReformatTask.Factory.class) 12 | public class clsReformatTaskFactory implements ReformatTask.Factory { 13 | 14 | @Override 15 | public ReformatTask createTask(Context cntxt) { 16 | return new clsReformatTask(cntxt); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/cls/clsTemplate.cls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daimor/NBStudio/ccaf7474c5e338313d15dac60adafb0670a61692/NBStudioCore/src/org/nbstudio/core/cls/clsTemplate.cls -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/cls/clsVisualElement.form: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/cls/newfileVisualPanelTypeCSP.form: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 |
33 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/cls/newfileVisualPanelTypeCSP.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor. 4 | */ 5 | package org.nbstudio.core.cls; 6 | 7 | import javax.swing.JPanel; 8 | 9 | public final class newfileVisualPanelTypeCSP extends JPanel { 10 | 11 | private final newfileWizardPanelTypeCSP panel; 12 | 13 | /** 14 | * Creates new form newfileVisualPanelType 15 | */ 16 | public newfileVisualPanelTypeCSP(final newfileWizardPanelTypeCSP panel) { 17 | initComponents(); 18 | this.panel = panel; 19 | 20 | } 21 | 22 | @Override 23 | public String getName() { 24 | return "CSP type"; 25 | } 26 | 27 | /** 28 | * This method is called from within the constructor to initialize the form. 29 | * WARNING: Do NOT modify this code. The content of this method is always 30 | * regenerated by the Form Editor. 31 | */ 32 | // //GEN-BEGIN:initComponents 33 | private void initComponents() { 34 | 35 | buttonGroup1 = new javax.swing.ButtonGroup(); 36 | 37 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); 38 | this.setLayout(layout); 39 | layout.setHorizontalGroup( 40 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 41 | .addGap(0, 553, Short.MAX_VALUE) 42 | ); 43 | layout.setVerticalGroup( 44 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 45 | .addGap(0, 354, Short.MAX_VALUE) 46 | ); 47 | }// //GEN-END:initComponents 48 | // Variables declaration - do not modify//GEN-BEGIN:variables 49 | private javax.swing.ButtonGroup buttonGroup1; 50 | // End of variables declaration//GEN-END:variables 51 | } 52 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/cls/newfileVisualPanelTypePersistent.form: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 |
33 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/cls/newfileVisualPanelTypePersistent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor. 4 | */ 5 | package org.nbstudio.core.cls; 6 | 7 | import javax.swing.JPanel; 8 | 9 | public final class newfileVisualPanelTypePersistent extends JPanel { 10 | 11 | private final newfileWizardPanelTypePersistent panel; 12 | 13 | /** 14 | * Creates new form newfileVisualPanelType 15 | */ 16 | public newfileVisualPanelTypePersistent(final newfileWizardPanelTypePersistent panel) { 17 | initComponents(); 18 | this.panel = panel; 19 | 20 | } 21 | 22 | @Override 23 | public String getName() { 24 | return "Persistent type"; 25 | } 26 | 27 | /** 28 | * This method is called from within the constructor to initialize the form. 29 | * WARNING: Do NOT modify this code. The content of this method is always 30 | * regenerated by the Form Editor. 31 | */ 32 | // //GEN-BEGIN:initComponents 33 | private void initComponents() { 34 | 35 | buttonGroup1 = new javax.swing.ButtonGroup(); 36 | 37 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); 38 | this.setLayout(layout); 39 | layout.setHorizontalGroup( 40 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 41 | .addGap(0, 553, Short.MAX_VALUE) 42 | ); 43 | layout.setVerticalGroup( 44 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 45 | .addGap(0, 354, Short.MAX_VALUE) 46 | ); 47 | }// //GEN-END:initComponents 48 | // Variables declaration - do not modify//GEN-BEGIN:variables 49 | private javax.swing.ButtonGroup buttonGroup1; 50 | // End of variables declaration//GEN-END:variables 51 | } 52 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/cls/newfileVisualPanelTypeSummary.form: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 |
33 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/cls/newfileVisualPanelTypeSummary.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor. 4 | */ 5 | package org.nbstudio.core.cls; 6 | 7 | import javax.swing.JPanel; 8 | 9 | public final class newfileVisualPanelTypeSummary extends JPanel { 10 | 11 | private final newfileWizardPanelTypeSummary panel; 12 | 13 | /** 14 | * Creates new form newfileVisualPanelType 15 | */ 16 | public newfileVisualPanelTypeSummary(final newfileWizardPanelTypeSummary panel) { 17 | initComponents(); 18 | this.panel = panel; 19 | 20 | } 21 | 22 | @Override 23 | public String getName() { 24 | return "Summary"; 25 | } 26 | 27 | /** 28 | * This method is called from within the constructor to initialize the form. 29 | * WARNING: Do NOT modify this code. The content of this method is always 30 | * regenerated by the Form Editor. 31 | */ 32 | // //GEN-BEGIN:initComponents 33 | private void initComponents() { 34 | 35 | buttonGroup1 = new javax.swing.ButtonGroup(); 36 | 37 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); 38 | this.setLayout(layout); 39 | layout.setHorizontalGroup( 40 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 41 | .addGap(0, 553, Short.MAX_VALUE) 42 | ); 43 | layout.setVerticalGroup( 44 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 45 | .addGap(0, 354, Short.MAX_VALUE) 46 | ); 47 | }// //GEN-END:initComponents 48 | // Variables declaration - do not modify//GEN-BEGIN:variables 49 | private javax.swing.ButtonGroup buttonGroup1; 50 | // End of variables declaration//GEN-END:variables 51 | } 52 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/cls/newfileWizardPanelName.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor. 4 | */ 5 | package org.nbstudio.core.cls; 6 | 7 | import javax.swing.event.ChangeListener; 8 | import org.openide.WizardDescriptor; 9 | import org.openide.WizardValidationException; 10 | import org.openide.util.ChangeSupport; 11 | import org.openide.util.HelpCtx; 12 | 13 | public class newfileWizardPanelName implements WizardDescriptor.ValidatingPanel { 14 | 15 | /** 16 | * The visual component that displays this panel. If you need to access the 17 | * component from this class, just use getComponent(). 18 | */ 19 | private newfileVisualPanelName component; 20 | private final ChangeSupport changeSupport = new ChangeSupport(this); 21 | private WizardDescriptor wizard; 22 | 23 | // Get the visual component for the panel. In this template, the component 24 | // is kept separate. This can be more efficient: if the wizard is created 25 | // but never displayed, or not all panels are displayed, it is better to 26 | // create only those which really need to be visible. 27 | @Override 28 | public newfileVisualPanelName getComponent() { 29 | if (component == null) { 30 | component = new newfileVisualPanelName(this); 31 | } 32 | return component; 33 | } 34 | 35 | @Override 36 | public HelpCtx getHelp() { 37 | // Show no Help button for this panel: 38 | return HelpCtx.DEFAULT_HELP; 39 | // If you have context help: 40 | // return new HelpCtx("help.key.here"); 41 | } 42 | 43 | @Override 44 | public boolean isValid() { 45 | try { 46 | wizard.putProperty(WizardDescriptor.PROP_ERROR_MESSAGE, null); 47 | validate(); 48 | return true; 49 | } catch (WizardValidationException ex) { 50 | wizard.putProperty(WizardDescriptor.PROP_ERROR_MESSAGE, ex.getLocalizedMessage()); 51 | return false; 52 | } 53 | } 54 | 55 | @Override 56 | public void addChangeListener(ChangeListener l) { 57 | changeSupport.addChangeListener(l); 58 | } 59 | 60 | @Override 61 | public void removeChangeListener(ChangeListener l) { 62 | changeSupport.removeChangeListener(l); 63 | } 64 | 65 | protected final void fireChangeEvent() { 66 | changeSupport.fireChange(); 67 | } 68 | 69 | @Override 70 | public void readSettings(WizardDescriptor wiz) { 71 | this.wizard = wiz; 72 | component.read(wiz); 73 | } 74 | 75 | @Override 76 | public void storeSettings(WizardDescriptor wiz) { 77 | // use wiz.putProperty to remember current panel state 78 | boolean cancelled = wiz.getValue() != WizardDescriptor.FINISH_OPTION; 79 | if (!cancelled) { 80 | wiz.putProperty("className", component.getClassPackage() + "." + component.getClassName()); 81 | wiz.putProperty("classDesc", component.getClassDesc()); 82 | } 83 | } 84 | 85 | @Override 86 | public void validate() throws WizardValidationException { 87 | String clsName = component.getClassPackage() + "." + component.getName(); 88 | if (component.getClassPackage().isEmpty()) { 89 | throw new WizardValidationException(null, "Invalid Package Name", null); 90 | } 91 | if (component.getClassName().isEmpty()) { 92 | throw new WizardValidationException(null, "Invalid Class Name", null); 93 | } 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/cls/newfileWizardPanelTypeCSP.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor. 4 | */ 5 | package org.nbstudio.core.cls; 6 | 7 | import javax.swing.event.ChangeListener; 8 | import org.openide.WizardDescriptor; 9 | import org.openide.WizardValidationException; 10 | import org.openide.util.ChangeSupport; 11 | import org.openide.util.HelpCtx; 12 | 13 | public class newfileWizardPanelTypeCSP implements WizardDescriptor.ValidatingPanel { 14 | 15 | /** 16 | * The visual component that displays this panel. If you need to access the 17 | * component from this class, just use getComponent(). 18 | */ 19 | private newfileVisualPanelTypeCSP component; 20 | private final ChangeSupport changeSupport = new ChangeSupport(this); 21 | private WizardDescriptor wizard; 22 | 23 | // Get the visual component for the panel. In this template, the component 24 | // is kept separate. This can be more efficient: if the wizard is created 25 | // but never displayed, or not all panels are displayed, it is better to 26 | // create only those which really need to be visible. 27 | @Override 28 | public newfileVisualPanelTypeCSP getComponent() { 29 | if (component == null) { 30 | component = new newfileVisualPanelTypeCSP(this); 31 | isValid(); 32 | } 33 | return component; 34 | } 35 | 36 | @Override 37 | public HelpCtx getHelp() { 38 | // Show no Help button for this panel: 39 | return HelpCtx.DEFAULT_HELP; 40 | // If you have context help: 41 | // return new HelpCtx("help.key.here"); 42 | } 43 | 44 | @Override 45 | public boolean isValid() { 46 | try { 47 | wizard.putProperty(WizardDescriptor.PROP_ERROR_MESSAGE, null); 48 | validate(); 49 | return true; 50 | } catch (NullPointerException ex) { 51 | return true; 52 | } catch (WizardValidationException ex) { 53 | wizard.putProperty(WizardDescriptor.PROP_ERROR_MESSAGE, ex.getLocalizedMessage()); 54 | return false; 55 | } 56 | } 57 | 58 | @Override 59 | public void addChangeListener(ChangeListener l) { 60 | changeSupport.addChangeListener(l); 61 | } 62 | 63 | @Override 64 | public void removeChangeListener(ChangeListener l) { 65 | changeSupport.removeChangeListener(l); 66 | } 67 | 68 | protected final void fireChangeEvent() { 69 | changeSupport.fireChange(); 70 | } 71 | 72 | @Override 73 | public void readSettings(WizardDescriptor wiz) { 74 | this.wizard = wiz; 75 | } 76 | 77 | @Override 78 | public void storeSettings(WizardDescriptor wiz) { 79 | // use wiz.putProperty to remember current panel state 80 | } 81 | 82 | @Override 83 | public void validate() throws WizardValidationException { 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/cls/newfileWizardPanelTypePersistent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor. 4 | */ 5 | package org.nbstudio.core.cls; 6 | 7 | import javax.swing.event.ChangeListener; 8 | import org.openide.WizardDescriptor; 9 | import org.openide.WizardValidationException; 10 | import org.openide.util.ChangeSupport; 11 | import org.openide.util.HelpCtx; 12 | 13 | public class newfileWizardPanelTypePersistent implements WizardDescriptor.ValidatingPanel { 14 | 15 | /** 16 | * The visual component that displays this panel. If you need to access the 17 | * component from this class, just use getComponent(). 18 | */ 19 | private newfileVisualPanelTypePersistent component; 20 | private final ChangeSupport changeSupport = new ChangeSupport(this); 21 | private WizardDescriptor wizard; 22 | 23 | // Get the visual component for the panel. In this template, the component 24 | // is kept separate. This can be more efficient: if the wizard is created 25 | // but never displayed, or not all panels are displayed, it is better to 26 | // create only those which really need to be visible. 27 | @Override 28 | public newfileVisualPanelTypePersistent getComponent() { 29 | if (component == null) { 30 | component = new newfileVisualPanelTypePersistent(this); 31 | isValid(); 32 | } 33 | return component; 34 | } 35 | 36 | @Override 37 | public HelpCtx getHelp() { 38 | // Show no Help button for this panel: 39 | return HelpCtx.DEFAULT_HELP; 40 | // If you have context help: 41 | // return new HelpCtx("help.key.here"); 42 | } 43 | 44 | @Override 45 | public boolean isValid() { 46 | try { 47 | wizard.putProperty(WizardDescriptor.PROP_ERROR_MESSAGE, null); 48 | validate(); 49 | return true; 50 | } catch (NullPointerException ex) { 51 | return true; 52 | } catch (WizardValidationException ex) { 53 | wizard.putProperty(WizardDescriptor.PROP_ERROR_MESSAGE, ex.getLocalizedMessage()); 54 | return false; 55 | } 56 | } 57 | 58 | @Override 59 | public void addChangeListener(ChangeListener l) { 60 | changeSupport.addChangeListener(l); 61 | } 62 | 63 | @Override 64 | public void removeChangeListener(ChangeListener l) { 65 | changeSupport.removeChangeListener(l); 66 | } 67 | 68 | protected final void fireChangeEvent() { 69 | changeSupport.fireChange(); 70 | } 71 | 72 | @Override 73 | public void readSettings(WizardDescriptor wiz) { 74 | this.wizard = wiz; 75 | } 76 | 77 | @Override 78 | public void storeSettings(WizardDescriptor wiz) { 79 | // use wiz.putProperty to remember current panel state 80 | } 81 | 82 | @Override 83 | public void validate() throws WizardValidationException { 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/cls/newfileWizardPanelTypeSummary.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor. 4 | */ 5 | package org.nbstudio.core.cls; 6 | 7 | import javax.swing.event.ChangeListener; 8 | import org.openide.WizardDescriptor; 9 | import org.openide.WizardValidationException; 10 | import org.openide.util.ChangeSupport; 11 | import org.openide.util.HelpCtx; 12 | 13 | public class newfileWizardPanelTypeSummary implements WizardDescriptor.ValidatingPanel { 14 | 15 | /** 16 | * The visual component that displays this panel. If you need to access the 17 | * component from this class, just use getComponent(). 18 | */ 19 | private newfileVisualPanelTypeSummary component; 20 | private final ChangeSupport changeSupport = new ChangeSupport(this); 21 | private WizardDescriptor wizard; 22 | 23 | // Get the visual component for the panel. In this template, the component 24 | // is kept separate. This can be more efficient: if the wizard is created 25 | // but never displayed, or not all panels are displayed, it is better to 26 | // create only those which really need to be visible. 27 | @Override 28 | public newfileVisualPanelTypeSummary getComponent() { 29 | if (component == null) { 30 | component = new newfileVisualPanelTypeSummary(this); 31 | isValid(); 32 | } 33 | return component; 34 | } 35 | 36 | @Override 37 | public HelpCtx getHelp() { 38 | // Show no Help button for this panel: 39 | return HelpCtx.DEFAULT_HELP; 40 | // If you have context help: 41 | // return new HelpCtx("help.key.here"); 42 | } 43 | 44 | @Override 45 | public boolean isValid() { 46 | try { 47 | wizard.putProperty(WizardDescriptor.PROP_ERROR_MESSAGE, null); 48 | validate(); 49 | return true; 50 | } catch (NullPointerException ex) { 51 | return true; 52 | } catch (WizardValidationException ex) { 53 | wizard.putProperty(WizardDescriptor.PROP_ERROR_MESSAGE, ex.getLocalizedMessage()); 54 | return false; 55 | } 56 | } 57 | 58 | @Override 59 | public void addChangeListener(ChangeListener l) { 60 | changeSupport.addChangeListener(l); 61 | } 62 | 63 | @Override 64 | public void removeChangeListener(ChangeListener l) { 65 | changeSupport.removeChangeListener(l); 66 | } 67 | 68 | protected final void fireChangeEvent() { 69 | changeSupport.fireChange(); 70 | } 71 | 72 | @Override 73 | public void readSettings(WizardDescriptor wiz) { 74 | this.wizard = wiz; 75 | } 76 | 77 | @Override 78 | public void storeSettings(WizardDescriptor wiz) { 79 | // use wiz.putProperty to remember current panel state 80 | } 81 | 82 | @Override 83 | public void validate() throws WizardValidationException { 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/clsExample.cls: -------------------------------------------------------------------------------- 1 | Include %oocInclude 2 | 3 | Class Sample.Person Extends %Persistant 4 | { 5 | 6 | // 1-line comment 7 | 8 | /// some property 9 | Property Name As %String; 10 | 11 | Method Test() As %Status 12 | { 13 | quit $$$OK 14 | } 15 | 16 | } -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/clsSyntaxColors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/conn.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daimor/NBStudio/ccaf7474c5e338313d15dac60adafb0670a61692/NBStudioCore/src/org/nbstudio/core/conn.gif -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/explorerWsmode.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/folder1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daimor/NBStudio/ccaf7474c5e338313d15dac60adafb0670a61692/NBStudioCore/src/org/nbstudio/core/folder1.gif -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/folder2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daimor/NBStudio/ccaf7474c5e338313d15dac60adafb0670a61692/NBStudioCore/src/org/nbstudio/core/folder2.gif -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/folderClosed.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daimor/NBStudio/ccaf7474c5e338313d15dac60adafb0670a61692/NBStudioCore/src/org/nbstudio/core/folderClosed.gif -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/folderOpened.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daimor/NBStudio/ccaf7474c5e338313d15dac60adafb0670a61692/NBStudioCore/src/org/nbstudio/core/folderOpened.gif -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/mac/Bundle.properties: -------------------------------------------------------------------------------- 1 | # To change this template, choose Tools | Templates 2 | # and open the template in the editor. 3 | newfileVisualPanel1.tRoutineName.text= 4 | newfileVisualPanel1.jLabel1.text=Routine name: 5 | newfileVisualPanel1.jLabel2.text=Description: 6 | newfileVisualPanel1.lRoutineNameError.text=lRoutineNameError 7 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/mac/CodeStyle.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor. 4 | */ 5 | package org.nbstudio.core.mac; 6 | 7 | import java.util.prefs.Preferences; 8 | import javax.swing.text.Document; 9 | import org.netbeans.modules.editor.indent.spi.CodeStylePreferences; 10 | import static org.nbstudio.core.mac.FmtOptions.*; 11 | /** 12 | * 13 | * @author daimor 14 | */ 15 | public class CodeStyle { 16 | 17 | private final Preferences preferences; 18 | 19 | public static CodeStyle getCodeStyle(Document document) { 20 | CodeStyle cs = new CodeStyle(CodeStylePreferences.get(document).getPreferences()); 21 | return cs; 22 | } 23 | 24 | private CodeStyle(Preferences preferences) { 25 | this.preferences = preferences; 26 | } 27 | 28 | public int getIndentSize() { 29 | return preferences.getInt(indentSize, getDefaultAsInt(indentSize)); 30 | } 31 | 32 | public int getTabSize() { 33 | return preferences.getInt(tabSize, getDefaultAsInt(tabSize)); 34 | } 35 | 36 | public boolean getExpandTabToSpaces() { 37 | return preferences.getBoolean(expandTabToSpaces, getDefaultAsBoolean(expandTabToSpaces)); 38 | } 39 | 40 | public int getRightMargin() { 41 | return preferences.getInt(rightMargin, getDefaultAsInt(rightMargin)); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/mac/FmtOptions.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor. 4 | */ 5 | package org.nbstudio.core.mac; 6 | 7 | import java.util.HashMap; 8 | import java.util.Map; 9 | import org.netbeans.api.editor.settings.SimpleValueNames; 10 | 11 | /** 12 | * 13 | * @author daimor 14 | */ 15 | public class FmtOptions { 16 | public static final String expandTabToSpaces = SimpleValueNames.EXPAND_TABS; 17 | public static final String tabSize = SimpleValueNames.TAB_SIZE; 18 | public static final String indentSize = SimpleValueNames.INDENT_SHIFT_WIDTH; 19 | //public static final String spacesPerTab = SimpleValueNames.SPACES_PER_TAB; 20 | public static final String rightMargin = SimpleValueNames.TEXT_LIMIT_WIDTH; 21 | 22 | private FmtOptions() { 23 | } 24 | 25 | public static int getDefaultAsInt(String key) { 26 | return Integer.parseInt(defaults.get(key)); 27 | } 28 | 29 | public static boolean getDefaultAsBoolean(String key) { 30 | return Boolean.parseBoolean(defaults.get(key)); 31 | } 32 | 33 | public static String getDefaultAsString(String key) { 34 | return defaults.get(key); 35 | } 36 | // Private section --------------------------------------------------------- 37 | private static final String TRUE = "true"; // NOI18N 38 | private static final String FALSE = "false"; // NOI18N 39 | private static Map defaults; 40 | 41 | static { 42 | createDefaults(); 43 | } 44 | 45 | private static void createDefaults() { 46 | String defaultValues[][] = { 47 | {expandTabToSpaces, FALSE}, //NOI18N 48 | {tabSize, "4"}, //NOI18N 49 | {indentSize, "4"}, //NOI18N 50 | {rightMargin, "80"}, //NOI18N 51 | }; 52 | 53 | defaults = new HashMap<>(); 54 | 55 | for (java.lang.String[] strings : defaultValues) { 56 | defaults.put(strings[0], strings[1]); 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/mac/editor-preferences.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/mac/editorKit.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor. 4 | */ 5 | package org.nbstudio.core.mac; 6 | 7 | import org.nbstudio.utils.Logger; 8 | import org.netbeans.modules.editor.NbEditorKit; 9 | 10 | /** 11 | * 12 | * @author daimor 13 | */ 14 | public class editorKit extends NbEditorKit { 15 | 16 | public editorKit() { 17 | super(); 18 | Logger.Log("editorKit"); 19 | // editorKitSettingsInitializer.init(); 20 | } 21 | 22 | @Override 23 | public String getContentType() { 24 | return super.getContentType(); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/mac/mac.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daimor/NBStudio/ccaf7474c5e338313d15dac60adafb0670a61692/NBStudioCore/src/org/nbstudio/core/mac/mac.gif -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/mac/macDataLoader.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor. 4 | */ 5 | package org.nbstudio.core.mac; 6 | 7 | import java.io.IOException; 8 | import org.openide.filesystems.FileObject; 9 | import org.openide.loaders.DataObjectExistsException; 10 | import org.openide.loaders.ExtensionList; 11 | import org.openide.loaders.MultiDataObject; 12 | import org.openide.loaders.UniFileLoader; 13 | 14 | /** 15 | * 16 | * @author daimor 17 | */ 18 | public class macDataLoader extends UniFileLoader { 19 | 20 | public static final String EXT = "mac"; 21 | public static final String MIME = "text/isc-mac"; 22 | 23 | public macDataLoader() { 24 | super("org.nbstudio.core.mac.macDataObject"); 25 | } 26 | 27 | 28 | 29 | @Override 30 | protected void initialize() { 31 | super.initialize(); 32 | 33 | ExtensionList ext = getExtensions(); 34 | ext.addExtension(EXT); 35 | ext.addMimeType(MIME); 36 | setExtensions(ext); 37 | } 38 | 39 | @Override 40 | protected MultiDataObject createMultiObject(FileObject primaryFile) throws DataObjectExistsException, IOException { 41 | return new macDataObject(primaryFile, this); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/mac/macEventListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor. 4 | */ 5 | package org.nbstudio.core.mac; 6 | 7 | import java.util.EventListener; 8 | 9 | /** 10 | * 11 | * @author daimor 12 | */ 13 | public interface macEventListener extends EventListener { 14 | 15 | } 16 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/mac/macExample.mac: -------------------------------------------------------------------------------- 1 | n new,kill 2 | s s=123 3 | for i=1:1:10 { 4 | quit 5 | set obj=##class(Sample.Person).%New() 6 | s job=$job 7 | } -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/mac/macFoldManager.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor. 4 | */ 5 | package org.nbstudio.core.mac; 6 | 7 | import javax.swing.event.DocumentEvent; 8 | import org.netbeans.api.editor.fold.Fold; 9 | import org.netbeans.api.editor.fold.FoldType; 10 | import org.netbeans.spi.editor.fold.FoldHierarchyTransaction; 11 | import org.netbeans.spi.editor.fold.FoldManager; 12 | import org.netbeans.spi.editor.fold.FoldOperation; 13 | 14 | public class macFoldManager implements FoldManager { 15 | 16 | private FoldOperation operation; 17 | public static final FoldType COMMENT_FOLD_TYPE = new FoldType("/*...*/"); 18 | 19 | @Override 20 | public void init(FoldOperation operation) { 21 | this.operation = operation; 22 | } 23 | 24 | @Override 25 | public void initFolds(FoldHierarchyTransaction transaction) { 26 | // FoldHierarchy hierarchy = operation.getHierarchy(); 27 | // Document document = hierarchy.getComponent().getDocument(); 28 | // TokenHierarchy hi = TokenHierarchy.get(document); 29 | // TokenSequence ts = (TokenSequence) hi.tokenSequence(); 30 | // FoldType type = null; 31 | // int start = 0; 32 | // int offset = 0; 33 | // while (ts.moveNext()) { 34 | // offset = ts.offset(); 35 | // Token token = ts.token(); 36 | // clsTokenId id = token.id(); 37 | // if (id.name().equals("FORMAL_COMMENT") && type == null) { 38 | // type = COMMENT_FOLD_TYPE; 39 | // start = offset; 40 | // try { 41 | // operation.addToHierarchy( 42 | // type, 43 | // type.toString(), 44 | // false, 45 | // start, 46 | // offset + token.length(), 47 | // 0, 48 | // 0, 49 | // hierarchy, 50 | // transaction); 51 | // } catch (BadLocationException ex) { 52 | // Exceptions.printStackTrace(ex); 53 | // } 54 | // } 55 | // } 56 | } 57 | 58 | @Override 59 | public void insertUpdate(DocumentEvent evt, FoldHierarchyTransaction transaction) { 60 | } 61 | 62 | @Override 63 | public void removeUpdate(DocumentEvent evt, FoldHierarchyTransaction transaction) { 64 | } 65 | 66 | @Override 67 | public void changedUpdate(DocumentEvent evt, FoldHierarchyTransaction transaction) { 68 | } 69 | 70 | @Override 71 | public void removeEmptyNotify(Fold epmtyFold) { 72 | } 73 | 74 | @Override 75 | public void removeDamagedNotify(Fold damagedFold) { 76 | } 77 | 78 | @Override 79 | public void expandNotify(Fold expandedFold) { 80 | } 81 | 82 | @Override 83 | public void release() { 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/mac/macFoldManagerFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor. 4 | */ 5 | package org.nbstudio.core.mac; 6 | 7 | import org.netbeans.api.editor.mimelookup.MimeRegistration; 8 | import org.netbeans.spi.editor.fold.FoldManager; 9 | import org.netbeans.spi.editor.fold.FoldManagerFactory; 10 | 11 | @MimeRegistration(mimeType = "text/isc-mac", service = FoldManagerFactory.class) 12 | public class macFoldManagerFactory implements FoldManagerFactory{ 13 | 14 | @Override 15 | public FoldManager createFoldManager() { 16 | return new macFoldManager(); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/mac/macFormatter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor. 4 | */ 5 | package org.nbstudio.core.mac; 6 | 7 | import org.netbeans.api.editor.EditorRegistry; 8 | import org.netbeans.editor.BaseDocument; 9 | import org.netbeans.modules.csl.spi.ParserResult; 10 | import org.netbeans.modules.editor.indent.spi.Context; 11 | import org.netbeans.spi.lexer.MutableTextInput; 12 | 13 | /** 14 | * 15 | * @author daimor 16 | */ 17 | public class macFormatter { 18 | 19 | public macFormatter() { 20 | } 21 | 22 | public void reformat(Context context, ParserResult info) { 23 | final Context formatContext = context; 24 | final BaseDocument doc = (BaseDocument) context.document(); 25 | 26 | doc.runAtomic(new Runnable() { 27 | @Override 28 | public void run() { 29 | 30 | final int caretOffset = EditorRegistry.lastFocusedComponent() != null 31 | ? EditorRegistry.lastFocusedComponent().getCaretPosition() 32 | : 0; 33 | 34 | MutableTextInput mti = (MutableTextInput) doc.getProperty(MutableTextInput.class); 35 | try { 36 | mti.tokenHierarchyControl().setActive(false); 37 | 38 | } finally { 39 | mti.tokenHierarchyControl().setActive(true); 40 | } 41 | } 42 | }); 43 | 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/mac/macIndentTaskFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor. 4 | */ 5 | package org.nbstudio.core.mac; 6 | 7 | import org.netbeans.api.editor.mimelookup.MimeRegistration; 8 | import org.netbeans.modules.editor.indent.spi.Context; 9 | import org.netbeans.modules.editor.indent.spi.IndentTask; 10 | 11 | @MimeRegistration(mimeType = "text/isc-mac", service = IndentTask.Factory.class) 12 | public class macIndentTaskFactory implements IndentTask.Factory { 13 | 14 | @Override 15 | public IndentTask createTask(Context cntxt) { 16 | return new macIndentTask(cntxt); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/mac/macReformatTask.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor. 4 | */ 5 | package org.nbstudio.core.mac; 6 | 7 | import javax.swing.text.BadLocationException; 8 | import org.netbeans.modules.editor.indent.spi.Context; 9 | import org.netbeans.modules.editor.indent.spi.ExtraLock; 10 | import org.netbeans.modules.editor.indent.spi.ReformatTask; 11 | 12 | /** 13 | * 14 | * @author daimor 15 | */ 16 | public class macReformatTask implements ReformatTask { 17 | 18 | private final Context context; 19 | 20 | public macReformatTask(Context context) { 21 | this.context = context; 22 | } 23 | 24 | @Override 25 | public void reformat() throws BadLocationException { 26 | } 27 | 28 | @Override 29 | public ExtraLock reformatLock() { 30 | return null; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/mac/macReformatTaskFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor. 4 | */ 5 | package org.nbstudio.core.mac; 6 | 7 | import org.netbeans.api.editor.mimelookup.MimeRegistration; 8 | import org.netbeans.modules.editor.indent.spi.Context; 9 | import org.netbeans.modules.editor.indent.spi.ReformatTask; 10 | 11 | @MimeRegistration(mimeType = "text/isc-mac", service = ReformatTask.Factory.class) 12 | public class macReformatTaskFactory implements ReformatTask.Factory { 13 | 14 | @Override 15 | public ReformatTask createTask(Context cntxt) { 16 | return new macReformatTask(cntxt); 17 | } 18 | 19 | 20 | 21 | } 22 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/mac/macTemplate.mac: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daimor/NBStudio/ccaf7474c5e338313d15dac60adafb0670a61692/NBStudioCore/src/org/nbstudio/core/mac/macTemplate.mac -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/mac/newfileWizardPanel1.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor. 4 | */ 5 | package org.nbstudio.core.mac; 6 | 7 | import java.util.HashSet; 8 | import java.util.Iterator; 9 | import java.util.Set; 10 | import javax.swing.event.ChangeEvent; 11 | import javax.swing.event.ChangeListener; 12 | import org.openide.WizardDescriptor; 13 | import org.openide.util.HelpCtx; 14 | 15 | public class newfileWizardPanel1 implements WizardDescriptor.Panel { 16 | 17 | /** 18 | * The visual component that displays this panel. If you need to access the 19 | * component from this class, just use getComponent(). 20 | */ 21 | private newfileVisualPanel1 component; 22 | 23 | // Get the visual component for the panel. In this template, the component 24 | // is kept separate. This can be more efficient: if the wizard is created 25 | // but never displayed, or not all panels are displayed, it is better to 26 | // create only those which really need to be visible. 27 | @Override 28 | public newfileVisualPanel1 getComponent() { 29 | if (component == null) { 30 | component = new newfileVisualPanel1(this); 31 | } 32 | return component; 33 | } 34 | 35 | @Override 36 | public HelpCtx getHelp() { 37 | // Show no Help button for this panel: 38 | return HelpCtx.DEFAULT_HELP; 39 | // If you have context help: 40 | // return new HelpCtx("help.key.here"); 41 | } 42 | 43 | @Override 44 | public boolean isValid() { 45 | return component.validateDialog(); 46 | } 47 | private final Set listeners = new HashSet<>(1); 48 | 49 | @Override 50 | public void addChangeListener(ChangeListener l) { 51 | synchronized (listeners) { 52 | listeners.add(l); 53 | } 54 | } 55 | 56 | @Override 57 | public void removeChangeListener(ChangeListener l) { 58 | synchronized (listeners) { 59 | listeners.remove(l); 60 | } 61 | } 62 | 63 | protected final void fireChangeEvent() { 64 | Iterator it; 65 | synchronized (listeners) { 66 | it = new HashSet<>(listeners).iterator(); 67 | } 68 | ChangeEvent ev = new ChangeEvent(this); 69 | while (it.hasNext()) { 70 | it.next().stateChanged(ev); 71 | } 72 | } 73 | 74 | @Override 75 | public void readSettings(WizardDescriptor wiz) { 76 | component.read(wiz); 77 | } 78 | 79 | @Override 80 | public void storeSettings(WizardDescriptor wiz) { 81 | // use wiz.putProperty to remember current panel state 82 | boolean cancelled = wiz.getValue() != WizardDescriptor.FINISH_OPTION; 83 | if (!cancelled) { 84 | wiz.putProperty("routineName", component.getRoutineName()); 85 | wiz.putProperty("routineDesc", component.getRoutineDesc()); 86 | } 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/mac/node.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor. 4 | */ 5 | package org.nbstudio.core.mac; 6 | 7 | import java.awt.Image; 8 | import org.openide.nodes.AbstractNode; 9 | import org.openide.nodes.Children; 10 | import org.openide.util.ImageUtilities; 11 | import org.openide.util.Lookup; 12 | 13 | /** 14 | * 15 | * @author daimor 16 | */ 17 | public class node extends AbstractNode { 18 | 19 | public node(Children children, Lookup lookup) { 20 | super(children, lookup); 21 | } 22 | 23 | public node(String name) { 24 | super(Children.LEAF); 25 | setDisplayName(name); 26 | } 27 | 28 | public node(Children children) { 29 | super(children); 30 | } 31 | 32 | @Override 33 | public Image getIcon(int type) { 34 | return ImageUtilities.loadImage("org/nbstudio/core/mac/mac.gif"); 35 | } 36 | 37 | @Override 38 | public Image getOpenedIcon(int type) { 39 | return getIcon(type); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/macExample.mac: -------------------------------------------------------------------------------- 1 | n new,kill 2 | s s=123 3 | for i=1:1:10 { 4 | quit 5 | set obj=##class(Sample.Person).%New() 6 | s job=$job 7 | } -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/macSyntaxColors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/navigatorWsmode.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/newfileWizardPanel.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor. 4 | */ 5 | package org.nbstudio.core; 6 | 7 | import org.openide.WizardDescriptor; 8 | 9 | public interface newfileWizardPanel extends WizardDescriptor.ValidatingPanel { 10 | } 11 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/outputWsmode.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/outputWstcref.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/pkg/packageClosed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daimor/NBStudio/ccaf7474c5e338313d15dac60adafb0670a61692/NBStudioCore/src/org/nbstudio/core/pkg/packageClosed.png -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/pkg/pkgDataObject.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor. 4 | */ 5 | package org.nbstudio.core.pkg; 6 | 7 | import java.io.IOException; 8 | import org.openide.awt.ActionID; 9 | import org.openide.awt.ActionReference; 10 | import org.openide.awt.ActionReferences; 11 | import org.openide.filesystems.FileObject; 12 | import org.openide.filesystems.MIMEResolver; 13 | import org.openide.loaders.DataObject; 14 | import org.openide.loaders.DataObjectExistsException; 15 | import org.openide.loaders.MultiDataObject; 16 | import org.openide.loaders.MultiFileLoader; 17 | import org.openide.util.NbBundle.Messages; 18 | 19 | @Messages({ 20 | "LBL_pkg_LOADER=Files of pkg" 21 | }) 22 | @MIMEResolver.ExtensionRegistration( 23 | displayName = "#LBL_pkg_LOADER", 24 | mimeType = "text/isc-pkg", 25 | extension = {"pkg"}) 26 | @DataObject.Registration( 27 | mimeType = "text/isc-pkg", 28 | iconBase = "org/nbstudio/core/pkg/packageClosed.png", 29 | displayName = "#LBL_pkg_LOADER", 30 | position = 300) 31 | @ActionReferences({ 32 | @ActionReference( 33 | path = "Loaders/text/isc-pkg/Actions", 34 | id = 35 | @ActionID(category = "System", id = "org.openide.actions.OpenAction"), 36 | position = 100, 37 | separatorAfter = 200), 38 | @ActionReference( 39 | path = "Loaders/text/isc-pkg/Actions", 40 | id = 41 | @ActionID(category = "Edit", id = "org.openide.actions.CutAction"), 42 | position = 300), 43 | @ActionReference( 44 | path = "Loaders/text/isc-pkg/Actions", 45 | id = 46 | @ActionID(category = "Edit", id = "org.openide.actions.CopyAction"), 47 | position = 400, 48 | separatorAfter = 500), 49 | @ActionReference( 50 | path = "Loaders/text/isc-pkg/Actions", 51 | id = 52 | @ActionID(category = "Edit", id = "org.openide.actions.DeleteAction"), 53 | position = 600), 54 | @ActionReference( 55 | path = "Loaders/text/isc-pkg/Actions", 56 | id = 57 | @ActionID(category = "System", id = "org.openide.actions.RenameAction"), 58 | position = 700, 59 | separatorAfter = 800), 60 | @ActionReference( 61 | path = "Loaders/text/isc-pkg/Actions", 62 | id = 63 | @ActionID(category = "System", id = "org.openide.actions.SaveAsTemplateAction"), 64 | position = 900, 65 | separatorAfter = 1000), 66 | @ActionReference( 67 | path = "Loaders/text/isc-pkg/Actions", 68 | id = 69 | @ActionID(category = "System", id = "org.openide.actions.FileSystemAction"), 70 | position = 1100, 71 | separatorAfter = 1200), 72 | @ActionReference( 73 | path = "Loaders/text/isc-pkg/Actions", 74 | id = 75 | @ActionID(category = "System", id = "org.openide.actions.ToolsAction"), 76 | position = 1300), 77 | @ActionReference( 78 | path = "Loaders/text/isc-pkg/Actions", 79 | id = 80 | @ActionID(category = "System", id = "org.openide.actions.PropertiesAction"), 81 | position = 1400) 82 | }) 83 | public class pkgDataObject extends MultiDataObject { 84 | 85 | public pkgDataObject(FileObject pf, MultiFileLoader loader) throws DataObjectExistsException, IOException { 86 | super(pf, loader); 87 | registerEditor("text/isc-pkg", false); 88 | } 89 | 90 | @Override 91 | protected int associateLookup() { 92 | return 1; 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/prj/Bundle.properties: -------------------------------------------------------------------------------- 1 | LBL_CreateProjectStep=Name and Location 2 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/prj/CacheProjectDescription.html: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 10 | Sample Cache Project project 11 | 12 | 13 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/prj/CacheProjectProject.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daimor/NBStudio/ccaf7474c5e338313d15dac60adafb0670a61692/NBStudioCore/src/org/nbstudio/core/prj/CacheProjectProject.zip -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/prj/cacheDescription.html: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 10 | Sample Cache Project project 11 | 12 | 13 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/prj/cacheProject.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daimor/NBStudio/ccaf7474c5e338313d15dac60adafb0670a61692/NBStudioCore/src/org/nbstudio/core/prj/cacheProject.zip -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/projectTabLogicalWstcref.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/propertiesWsmode.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/resources/openProject.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daimor/NBStudio/ccaf7474c5e338313d15dac60adafb0670a61692/NBStudioCore/src/org/nbstudio/core/resources/openProject.png -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/resources/openProject24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daimor/NBStudio/ccaf7474c5e338313d15dac60adafb0670a61692/NBStudioCore/src/org/nbstudio/core/resources/openProject24.png -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/search-resultsWstcref.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/serversWstcref.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/xdata/xdataDataObject.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor. 4 | */ 5 | package org.nbstudio.core.xdata; 6 | 7 | import java.io.IOException; 8 | import org.openide.awt.ActionID; 9 | import org.openide.awt.ActionReference; 10 | import org.openide.awt.ActionReferences; 11 | import org.openide.filesystems.FileObject; 12 | import org.openide.filesystems.MIMEResolver; 13 | import org.openide.loaders.DataObject; 14 | import org.openide.loaders.DataObjectExistsException; 15 | import org.openide.loaders.MultiDataObject; 16 | import org.openide.loaders.MultiFileLoader; 17 | import org.openide.util.NbBundle.Messages; 18 | 19 | @Messages({ 20 | "LBL_xdata_LOADER=Files of xdata" 21 | }) 22 | @MIMEResolver.ExtensionRegistration( 23 | displayName = "#LBL_xdata_LOADER", 24 | mimeType = "text/isc-xdata", 25 | extension = {"xdata"}) 26 | @DataObject.Registration( 27 | mimeType = "text/isc-xdata", 28 | iconBase = "org/nbstudio/core/cls/class.png", 29 | displayName = "#LBL_xdata_LOADER", 30 | position = 300) 31 | @ActionReferences({ 32 | @ActionReference( 33 | path = "Loaders/text/isc-xdata/Actions", 34 | id = 35 | @ActionID(category = "System", id = "org.openide.actions.OpenAction"), 36 | position = 100, 37 | separatorAfter = 200), 38 | @ActionReference( 39 | path = "Loaders/text/isc-xdata/Actions", 40 | id = 41 | @ActionID(category = "Edit", id = "org.openide.actions.CutAction"), 42 | position = 300), 43 | @ActionReference( 44 | path = "Loaders/text/isc-xdata/Actions", 45 | id = 46 | @ActionID(category = "Edit", id = "org.openide.actions.CopyAction"), 47 | position = 400, 48 | separatorAfter = 500), 49 | @ActionReference( 50 | path = "Loaders/text/isc-xdata/Actions", 51 | id = 52 | @ActionID(category = "Edit", id = "org.openide.actions.DeleteAction"), 53 | position = 600), 54 | @ActionReference( 55 | path = "Loaders/text/isc-xdata/Actions", 56 | id = 57 | @ActionID(category = "System", id = "org.openide.actions.RenameAction"), 58 | position = 700, 59 | separatorAfter = 800), 60 | @ActionReference( 61 | path = "Loaders/text/isc-xdata/Actions", 62 | id = 63 | @ActionID(category = "System", id = "org.openide.actions.SaveAsTemplateAction"), 64 | position = 900, 65 | separatorAfter = 1000), 66 | @ActionReference( 67 | path = "Loaders/text/isc-xdata/Actions", 68 | id = 69 | @ActionID(category = "System", id = "org.openide.actions.FileSystemAction"), 70 | position = 1100, 71 | separatorAfter = 1200), 72 | @ActionReference( 73 | path = "Loaders/text/isc-xdata/Actions", 74 | id = 75 | @ActionID(category = "System", id = "org.openide.actions.ToolsAction"), 76 | position = 1300), 77 | @ActionReference( 78 | path = "Loaders/text/isc-xdata/Actions", 79 | id = 80 | @ActionID(category = "System", id = "org.openide.actions.PropertiesAction"), 81 | position = 1400) 82 | }) 83 | public class xdataDataObject extends MultiDataObject { 84 | 85 | public xdataDataObject(FileObject pf, MultiFileLoader loader) throws DataObjectExistsException, IOException { 86 | super(pf, loader); 87 | registerEditor("text/isc-xdata", false); 88 | } 89 | 90 | @Override 91 | protected int associateLookup() { 92 | return 1; 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /NBStudioCore/src/org/nbstudio/core/xdataExample.xdata: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
29 | 30 | 34 |
38 | 39 | 40 |
41 | 42 | 43 | 44 |
45 |
46 |