⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 iddefs.h

📁 用bcg库编写的java IDE 源码
💻 H
📖 第 1 页 / 共 2 页
字号:
//#include "CCrystalTextBuffer.h"

/*
#define GETWORKSPACE      CVisualJavaApp::GetApp()->GetMainFrame()->GetViewDlg()
#define GETACTIVEFRAME    CVisualJavaApp::GetApp()->GetMainFrame()->GetActiveFrame()
#define GETMAINFRAME      CVisualJavaApp::GetApp()->GetMainFrame()
*/
#define error(szpErro)        MessageBox(0,szpErro,"JavaJam",MB_OK|MB_ICONERROR);

#define ID_NEWFILE_OPTIONS      0x12349137
#define ID_NEWPROJECT_OPTIONS   0x71289364
#define ID_MULTVIEW             0x74658213
#define ID_CLASSVIEW            0x00122243
#define ID_RESVIEW              0x11342216
#define ID_FILEVIEW             0x34556971
#define IDC_BUTTON_EXPAND       0x00003642
#define IDC_BUTTON_COLAPS       0x11111142
#define IDC_BUTTON_CLOSE        0x77777777

#define ID_COMBO_BROWSER        0x10202330

#define COOKIE_COMMENT			0x0001
#define COOKIE_PREPROCESSOR		0x0002
#define COOKIE_EXT_COMMENT		0x0004
#define COOKIE_STRING			0x0008
#define COOKIE_CHAR				0x0010

#define ID_TABSHEET     0x2317945
#define ID_BUILDOUTPUT  0x7461340
#define ID_FINDINFILE   0x4761327
#define ID_FINDINFILE1  0x8543719
#define ID_DEBUG        0x99

#define expand        0x1
#define colapse       0x2
#define select        0x1
#define unselect      0x2

#define INSERT_CONTEXT          0x11
#define DELETE_CONTEXT          0x12

//project type
#define  PRO_AWT                0x24
#define  PRO_SWING              0x25
#define  PRO_CONSOLE            0x26
//frame app type
#define  FRM_EDITOR             0x27
#define  FRM_TOOLBAR            0x28
#define  FRM_MENUBAR            0x29
#define  FRM_NONE               0x33

//app type
#define  APP_DIALOG             0x30
#define  APP_FRAME              0x31
#define  APP_APPLET             0x32
//file types
#define F_JAVA                  0x13
#define F_ASP                   0x14
#define F_CPP                   0x15
#define F_H                     0x16
#define F_HTML                  0x17
#define F_BIN                   0x18
#define F_TXT                   0x19
#define F_BMP                   0x20

//workspace item types
#define W_WORKSPACE             0x34
#define W_PROJECT               0x35
#define W_FILE                  0x36
#define W_FILE_FOLDER           0x37

//output window tab looks
#define STANDARD_3D    0x20
#define CUSTOM_3D      0x21
#define PLAIN_VC       0x22
#define BORDERS_3D     0x18
#define FLAT_BORDERS   0x17


//views



extern UINT WM_WORKSPACE_OPENED; //=::RegisterWindowMessage("WorkSpacedOpen");   
extern UINT WM_WORKSPACE_CLOSED;//=::RegisterWindowMessage("WorkSpacedClose"); 
//ASSERT(WM_WORKSPACE_LOADED);
//ASSERT(WM_WORKSPACE_UNLOADED);


    //options
    static LPCTSTR m_szpalias         =  _T("-alias");
	static LPCTSTR m_szpkeyalg        =  _T("-keyalg");
	static LPCTSTR m_szpkeyszie       =  _T("-keysize");
	static LPCTSTR m_szpsigalg        =  _T("-sigalg");
	static LPCTSTR m_szpdname         =  _T("-dname");
    static LPCTSTR m_szpkeypass       =  _T("-keypass");
	static LPCTSTR m_szpvalidity      =  _T("-validity");
	static LPCTSTR m_szpstoretype     =  _T("-storetype");
	static LPCTSTR m_szpkeystore      =  _T("-keystore");
	static LPCTSTR m_szpstorepass     =  _T("-storepass");
	static LPCTSTR m_szpprovider      =  _T("-provider");
	static LPCTSTR m_szpv             =  _T("-v");
	static LPCTSTR m_szpj             =  _T("-J");
	static LPCTSTR m_szpnoprompt      =  _T("-noprompt");
	static LPCTSTR m_szptrustcacerts  =  _T("-trustcacerts");
	static LPCSTR  m_szpfile          =  _T("-file");
	static LPCTSTR m_szpdest          =  _T("-dest");
	static LPCTSTR m_szpnew           =  _T("-new");
	static LPCTSTR m_szprfc           =  _T("-rfc");
	static LPCTSTR m_szpsigfile       =  _T("-sigfile");
	static LPCTSTR m_szpsignedjar     =  _T("-signedjar");
	static LPCTSTR m_szpverify        =  _T("-verify");
	static LPCTSTR m_szpcerts         =  _T("-certs");
	static LPCTSTR m_szpverbose       =  _T("-verbose");
	static LPCTSTR m_szpinternalsf    =  _T("-internalsf");
	static LPCTSTR m_szpsectionsonly  =  _T("-sectionsonly");
    static LPCTSTR m_szpo             =  _T("-o");
	static LPCTSTR m_szpd             =  _T("-d");
    static LPCTSTR m_szpversion       =  _T("-version");
	static LPCTSTR m_szpjni           =  _T("-jni");
	static LPCTSTR m_szpclasspath     =  _T("-classpath");
	static LPCTSTR m_szpbootclasspath =  _T("-bootclasspath");
	static LPCTSTR m_szpold           =  _T("-old");
	static LPCTSTR m_szpforce         =  _T("-force");
    static LPCTSTR m_szpstubs         =  _T("-stubs");
    static LPCTSTR m_szpl             =  _T("-l");
    static LPCTSTR m_szpb             =  _T("-b");
	static LPCTSTR m_szppublic        =  _T("-public");
	static LPCTSTR m_szpprotected     =  _T("-protected");
    static LPCTSTR m_szppackage       =  _T("-package");
	static LPCTSTR m_szpprivate       =  _T("-private");
	static LPCTSTR m_szps             =  _T("-s");
    static LPCTSTR m_szpc             =  _T("-c");
	static LPCTSTR m_szpextdirs       =  _T("-extdirs");
   
  
	//commands
	static LPCTSTR m_szpgenkey        =  _T("-genkey");
	static LPCTSTR m_szpimport        =  _T("-import");
	static LPCTSTR m_szpselfcert      =  _T("-selfcert");
	static LPCTSTR m_szpidentitydb    =  _T("-identitydb");
	static LPCTSTR m_szpcertreq       =  _T("-certreq");
	static LPCTSTR m_szpexport        =  _T("-export");
	static LPCTSTR m_szplist          =  _T("-list");
	static LPCTSTR m_szpprintcert     =  _T("-printcert");
	static LPCTSTR m_szpkeyclone      =  _T("-keyclone");
	static LPCTSTR m_szpstorepasswd   =  _T("-storepasswd");
	static LPCTSTR m_szpkeypasswd     =  _T("-keypasswd");
	static LPCTSTR m_szpdelete        =  _T("-delete");
	static LPCTSTR m_szphelp          =  _T("-help");


    static LPCTSTR m_szpText          =  _T("Text");
    static LPCTSTR m_szpTextSel       =	 _T("Text Selection");
    static LPCTSTR m_szpCurErrTag     =	 _T("Current Error/Tag");
    static LPCTSTR m_szpBkMrk         =	 _T("Bookmark");
    static LPCTSTR m_szpBrkPt         =	 _T("Break Point");
    static LPCTSTR m_szpCurSt         =	 _T("Current Statement");
    static LPCTSTR m_szpSelMar        =	 _T("Selection Margin");
    static LPCTSTR m_szpKeyWd         =	 _T("Keyword");
    static LPCTSTR m_szpCom	          =  _T("Comment");
    static LPCTSTR m_szpNum           =	 _T("Number");
    static LPCTSTR m_szpStr           =	 _T("String");
    static LPCTSTR m_szpOp            =	 _T("Operator");
    static LPCTSTR m_szpHtmlEleName   =	 _T("HTML Element Name");
    static LPCTSTR m_szpHtmlAttrName  =	 _T("HTML Attribute Name");
    static LPCTSTR m_szpHtmlAttrVal   =  _T("HTML Attribute Value");
    static LPCTSTR m_szpHtmlCom       =	 _T("HTML Comment");
    static LPCTSTR m_szpHtmlEnt       =	 _T("HTML Entity");
    static LPCTSTR m_szpHtmlTagDel    =	 _T("HTML Tag Delimiter");
    static LPCTSTR m_szpHtmlStr       =	 _T("HTML String");
    static LPCTSTR m_szpHtmlTagTxt    =	 _T("HTML Tag Text");
    static LPCTSTR m_szpHtmlOp        =	 _T("HTML Operator");
    static LPCTSTR m_szpHtmlSsS       =	 _T("HTML Server-Side Script");
    static LPCTSTR m_szpWzCode        =	 _T("Wizard Code");
    static LPCTSTR m_szpUserDefKeywd  =	 _T("User Defined Keywords");
    static LPCTSTR m_szpValHglt       =	 _T("Value Highlight");
    static LPCTSTR m_szpMemHglht      =	 _T("Memory Highlight");
    static LPCTSTR m_szpCallHglht     =	 _T("Calls Highlight");
    static LPCTSTR m_szpSupCd         =	 _T("Superceded Code");
    static LPCTSTR m_szpVarHglht      =	 _T("Variables Highlight");
    static LPCTSTR m_szpWatchHglht    =	 _T("Watch Highlight");
    static LPCTSTR m_szpAssemCode     =	 _T("Assembly Code");

    static LPCTSTR m_lszpAllWindow    =   _T("All Windows");
    static LPCTSTR m_lszpSrcWindow    =   _T("Source Windows");
    static LPCTSTR m_lszpDebugWnd     =   _T("Debugger Windows");
    static LPCTSTR m_lszpSrcBrowser   =   _T("Source Browser");
    static LPCTSTR m_lszpWorkspcWnd   =   _T("Workspace Window");
    static LPCTSTR m_lszpRegWindow    =   _T("Registers Window");
    static LPCTSTR m_lszpMemWindow    =   _T("Memory Window");
    static LPCTSTR m_lszpCallWindow   =   _T("Calls Window");
    static LPCTSTR m_lszpVarWindow    =   _T("Variables Window");
    static LPCTSTR m_lszpWatchWindow  =   _T("Watch Window");
    static LPCTSTR m_lszpDisAssemWnd  =   _T("Disassembly Window");

  //the key here is uniqueness not sequential correctness
 typedef enum
 {
   CT_FOR_LOOP = 0x1,
   CT_WHILE_LOOP = 0x2,
   CT_SWITCH = 0x3,
   CT_TRY_CATCH = 0x4,
   CT_CLASS = 0x5,
   CT_INTERFACE = 0x6,
   CT_FRAME_APP_EDITOR_SWING = 0x7,
   CT_FRAME_APP_TOOLBAR_SWING = 0x8,
   CT_FRAME_APP_MENUBAR_SWING = 0x9,
   CT_FRAME_APP_NONE_SWING = 0x10,
   CT_FRAME_APP_EDITOR_AWT = 0x11,
   CT_FRAME_APP_TOOLBAR_AWT = 0x12,
   CT_FRAME_APP_MENUBAR_AWT = 0x13,
   CT_FRAME_APP_NONE_AWT = 0x14,
   CT_DIALOG_APP_AWT = 0x15,
   CT_DIALOG_APP_SWING = 0x16,
   CT_CONSOLE_APP = 0x17,
   CT_APPLET_APP = 0x18
 }__CodeTemplate;


static LPTSTR s_apszFileTypeList[] =
{
  _T("java"),
  _T("cpp"),
  _T("h"),
  _T("asp"),
  _T("bin"),
  _T("txt"),
  NULL

};


static BOOL GetName(CString& szpPath,CString& szpName)
{
  szpPath.TrimLeft();szpPath.TrimRight();
  
  int nLength = szpPath.GetLength();
  int I       = szpPath.Find('.');
  if(I != -1)
  {
    
    CString ext = szpPath.Right(szpPath.GetLength()-I);
	--I;
    for(I; I>=0; I--)//retrive name
	{
      if(szpPath[I] == '\\'||I==0)
	  {
         if(szpPath[I] != '\\')
		   szpName.Insert(0,szpPath[I]);
         szpName += ext;
         //szpPath += szpPath.Left(I);
		 return TRUE;
	  }
	  else
	  szpName.Insert(0,szpPath[I]);
	}
  }
  return FALSE;
}

static void GenPath(int nDepth,CString& szpPath)
{
  /*for(int i=0; i<nDepth; i++)
  {
    if(int npos = szpPath.Find("\\") != -1&&!szpPath.IsEmpty())
	{
                 
   
	}
	else
	break;
  }*/
}

static BOOL GetExt(CString szpName,CString& szpExt)
{
  int i = szpName.Find('.');
  if(i != -1)
  {
     szpExt = szpName.Right(szpName.GetLength()-i);
	 szpExt.TrimLeft('.');
     return TRUE;
  }
  return FALSE;
}

static int FILE_TYPE(LPCTSTR szpF)
{
  int npos = CString(szpF).Find('.');
  ++npos;
  szpF = CString(szpF).Right(CString(szpF).GetLength()-npos);

  if(CString(szpF).Compare("java") == 0)
	  return F_JAVA;
  else
  if(CString(szpF).Compare("asp") == 0)
	  return F_ASP;
  else
  if(CString(szpF).Compare("cpp") == 0)
	  return F_CPP;
  else
  if(CString(szpF).Compare("h") == 0)
	  return F_H;
  else
  if(CString(szpF).Compare("html") == 0)
	  return F_HTML;
  else
  if(CString(szpF).Compare("bin") == 0)
	  return F_BIN;
  else
  if(CString(szpF).Compare("txt") == 0)
	  return F_TXT;
  return 0;
}

static int FILE_TYPE_EX(LPCTSTR szpF)
{
  if(CString(szpF).Compare("Java Source Files") == 0)
	  return F_JAVA;
  else
  if(CString(szpF).Compare("ASP Files") == 0)
	  return F_ASP;
  else
  if(CString(szpF).Compare("Cpp Source Files") == 0)
	  return F_CPP;
  else
  if(CString(szpF).Compare("C header Files") == 0)
	  return F_H;
  else
  if(CString(szpF).Compare("Html Files") == 0)
	  return F_HTML;
  else
  if(CString(szpF).Compare("Binary Files") == 0)
	  return F_BIN;
  else
  if(CString(szpF).Compare("Text Files") == 0)
	  return F_TXT;
  else
  if(CString(szpF).Compare("Bitmap Files") == 0)
	  return F_BMP;
  return 0;
}


static LPCTSTR FILE_TYPE_NUM_TO_STR(UINT nType)
{
  if(nType == F_JAVA)
   return _T("Java Source Files");

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -