-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
-support for PHP added -adding two new functions init() and cleanup() in the plugins
- Loading branch information
1 parent
83b34bc
commit a41fb2c
Showing
9 changed files
with
413 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
//this file is part of notepad++ | ||
//Copyright (C)2003 Don HO <[email protected]> | ||
//Copyright (C)2011 Kapil Ratnani <[email protected]> | ||
// | ||
//This program is free software; you can redistribute it and/or | ||
//modify it under the terms of the GNU General Public License | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
//this file is part of notepad++ | ||
//Copyright (C)2003 Don HO <[email protected]> | ||
//Copyright (C)2011 Kapil Ratnani <[email protected]> | ||
// | ||
//This program is free software; you can redistribute it and/or | ||
//modify it under the terms of the GNU General Public License | ||
|
@@ -157,6 +156,7 @@ void loadDocitPlugins() | |
wcscpy(dllFilePath,nppDir); | ||
wcscat(dllFilePath,TEXT("\\plugins\\nppdocitplugins\\")); | ||
wcscat(dllFilePath,ffd.cFileName); | ||
|
||
hinstLib=LoadLibrary(dllFilePath); | ||
if(hinstLib!=NULL) | ||
{ | ||
|
@@ -190,6 +190,7 @@ nppDocItPlugin* getCurrentPlugin() | |
//----------------------------------------------// | ||
void insert_doc_string() | ||
{ | ||
//load when required | ||
if(docitPluginsLoaded==FALSE) | ||
loadDocitPlugins(); | ||
|
||
|
@@ -217,7 +218,7 @@ void insert_doc_string() | |
::SendMessage(curScintilla,SCI_SETTARGETEND,curPos+200,0); | ||
::SendMessage(curScintilla,SCI_SETSEARCHFLAGS,SCFIND_REGEXP,0); | ||
int pos=::SendMessage(curScintilla,SCI_SEARCHINTARGET,4,(LPARAM)(plugin->get_terminating_character)()); | ||
//This gives me the occurance of the terminating character, need to fetch the string up to | ||
//This gives me the occurence of the terminating character, need to fetch the string up to | ||
//this location | ||
Sci_TextRange tr; | ||
tr.chrg.cpMin=curPos; | ||
|
@@ -242,7 +243,7 @@ void insert_doc_string() | |
} | ||
|
||
|
||
//TODO: think of a proper abstraction to define termination condition for a function of each language | ||
//TODO: think of a proper method to define termination condition for a function of each language | ||
//TODO: Reorganise the whole code | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,19 @@ | ||
//Copyright (C)2011 Kapil Ratnani <[email protected]> | ||
// | ||
//This program is free software; you can redistribute it and/or | ||
//modify it under the terms of the GNU General Public License | ||
//as published by the Free Software Foundation; either | ||
//version 2 of the License, or (at your option) any later version. | ||
// | ||
//This program is distributed in the hope that it will be useful, | ||
//but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
//GNU General Public License for more details. | ||
// | ||
//You should have received a copy of the GNU General Public License | ||
//along with this program; if not, write to the Free Software | ||
//Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
|
||
#define PCRE_STATIC | ||
#include"include\pcre.h" | ||
#define OVECCOUNT 60 | ||
|
@@ -25,6 +41,18 @@ std::string get_spaces(int sp_count) | |
|
||
extern "C" | ||
{ | ||
__declspec(dllexport) void init() | ||
{ | ||
//TODO: write some code here :P | ||
//compile regex or do any other initialization | ||
} | ||
|
||
__declspec(dllexport) void cleanup() | ||
{ | ||
//TODO: write some code here :P | ||
//free memory | ||
} | ||
|
||
__declspec(dllexport) void gen_doc_string(char *func_string,int indentation,char** out) | ||
{ | ||
pcre *re; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,19 @@ | ||
//Copyright (C)2011 Kapil Ratnani <[email protected]> | ||
// | ||
//This program is free software; you can redistribute it and/or | ||
//modify it under the terms of the GNU General Public License | ||
//as published by the Free Software Foundation; either | ||
//version 2 of the License, or (at your option) any later version. | ||
// | ||
//This program is distributed in the hope that it will be useful, | ||
//but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
//GNU General Public License for more details. | ||
// | ||
//You should have received a copy of the GNU General Public License | ||
//along with this program; if not, write to the Free Software | ||
//Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
|
||
#define PCRE_STATIC | ||
#include"include\pcre.h" | ||
#define OVECCOUNT 60 | ||
|
@@ -56,6 +72,18 @@ void removeCRLF(std::string *str) | |
|
||
extern "C" | ||
{ | ||
__declspec(dllexport) void init() | ||
{ | ||
//TODO: write some code here :P | ||
//compile regex or do any other initialization | ||
} | ||
|
||
__declspec(dllexport) void cleanup() | ||
{ | ||
//TODO: write some code here :P | ||
//free memory | ||
} | ||
|
||
__declspec(dllexport) void gen_doc_string(char *func_string,int indentation,char** out) | ||
{ | ||
pcre *re; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,19 @@ | ||
//Copyright (C)2011 Kapil Ratnani <[email protected]> | ||
// | ||
//This program is free software; you can redistribute it and/or | ||
//modify it under the terms of the GNU General Public License | ||
//as published by the Free Software Foundation; either | ||
//version 2 of the License, or (at your option) any later version. | ||
// | ||
//This program is distributed in the hope that it will be useful, | ||
//but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
//GNU General Public License for more details. | ||
// | ||
//You should have received a copy of the GNU General Public License | ||
//along with this program; if not, write to the Free Software | ||
//Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
|
||
#define PCRE_STATIC | ||
#include"include\pcre.h" | ||
#define OVECCOUNT 60 | ||
|
@@ -45,6 +61,18 @@ void trim(std::string *str) | |
|
||
extern "C" | ||
{ | ||
__declspec(dllexport) void init() | ||
{ | ||
//TODO: write some code here :P | ||
//compile regex or do any other initialization | ||
} | ||
|
||
__declspec(dllexport) void cleanup() | ||
{ | ||
//TODO: write some code here :P | ||
//free memory | ||
} | ||
|
||
__declspec(dllexport) void gen_doc_string(char *func_string,int indentation,char** out) | ||
{ | ||
pcre *re; | ||
|
Oops, something went wrong.