Skip to content

Commit

Permalink
Version bump to 10.0.4
Browse files Browse the repository at this point in the history
WebTools: added jsctags
  • Loading branch information
Eran Ifrah committed Mar 1, 2017
1 parent b13243a commit dce172c
Show file tree
Hide file tree
Showing 12 changed files with 114 additions and 11 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ if ( MAKE_DEB )

set(CPACK_GENERATOR "DEB")
set(CPACK_PACKAGE_NAME "CodeLite")
set(CPACK_PACKAGE_VERSION "10.0.3")
set(CPACK_PACKAGE_VERSION "10.0.4")
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Eran Ifrah <eran.ifrah@gmail.com>")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "C/C++/PHP and Node.js IDE (Integrated Development Environment)")
set(CPACK_DEBIAN_PACKAGE_SECTION "devel")
Expand Down
4 changes: 2 additions & 2 deletions InnoSetup/codelite64_mingw.iss
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
AppName=CodeLite
AppVerName=CodeLite
AppPublisher=Eran Ifrah
AppVersion=10.0.3
AppVersion=10.0.4
AppPublisherURL=http://codelite.org
AppSupportURL=http://codelite.org
AppUpdatesURL=http://codelite.org
DefaultDirName={pf64}\CodeLite
DefaultGroupName=CodeLite
LicenseFile=license.txt
OutputDir=output
OutputBaseFilename=codelite-amd64-10.0.3
OutputBaseFilename=codelite-amd64-10.0.4
ChangesEnvironment=yes
FlatComponentsList=yes
SetupIconFile=box_software.ico
Expand Down
4 changes: 2 additions & 2 deletions InnoSetup/codelite_mingw.iss
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
AppName=CodeLite
AppVerName=CodeLite
AppPublisher=Eran Ifrah
AppVersion=10.0.3
AppVersion=10.0.4
AppPublisherURL=http://codelite.org
AppSupportURL=http://codelite.org
AppUpdatesURL=http://codelite.org
DefaultDirName={pf}\CodeLite
DefaultGroupName=CodeLite
LicenseFile=license.txt
OutputDir=output
OutputBaseFilename=codelite-x86-10.0.3
OutputBaseFilename=codelite-x86-10.0.4
ChangesEnvironment=yes
FlatComponentsList=yes
SetupIconFile=box_software.ico
Expand Down
4 changes: 2 additions & 2 deletions LiteEditor.workspace
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@
<Project Name="Tail" ConfigName="Win_x64_Debug"/>
<Project Name="EditorConfigPlugin" ConfigName="Win_x64_Debug"/>
</WorkspaceConfiguration>
<WorkspaceConfiguration Name="CMake_Debug" Selected="no">
<WorkspaceConfiguration Name="CMake_Debug" Selected="yes">
<Environment/>
<Project Name="ZoomNavigator" ConfigName="Win_x86_Release"/>
<Project Name="wxsqlite3" ConfigName="Win_x86_Release"/>
Expand Down Expand Up @@ -322,7 +322,7 @@
<Project Name="Tail" ConfigName="Win_x64_Debug"/>
<Project Name="EditorConfigPlugin" ConfigName="Win_x64_Debug"/>
</WorkspaceConfiguration>
<WorkspaceConfiguration Name="Win_x64_Release" Selected="yes">
<WorkspaceConfiguration Name="Win_x64_Release" Selected="no">
<Environment>WXWIN=D:\src\wxWidgets
WXCFG=gcc_dll\mswu</Environment>
<Project Name="abbreviation" ConfigName="Win_x64_Release"/>
Expand Down
2 changes: 1 addition & 1 deletion LiteEditor/autoversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@
#ifndef CODELITE_AUTOVERSION_H
#define CODELITE_AUTOVERSION_H

#define CODELITE_VERSION_STRING "10.0.3"
#define CODELITE_VERSION_STRING "10.0.4"

#endif
1 change: 1 addition & 0 deletions WebTools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,4 @@ if(APPLE)
else()
CL_INSTALL_FILE_SHARED(${CL_SRC_ROOT}/WebTools/javascript.zip)
endif()
CL_INSTALL_FILE_SHARED(${CL_SRC_ROOT}/WebTools/jsctags.zip)
2 changes: 2 additions & 0 deletions WebTools/JSCodeCompletion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ JSCodeCompletion::JSCodeCompletion(const wxString& workingDirectory)

m_ternServer.Start(m_workingDirectory);
}

m_jsctags.Reset(new clJSCTags());
}

JSCodeCompletion::~JSCodeCompletion()
Expand Down
6 changes: 4 additions & 2 deletions WebTools/JSCodeCompletion.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,22 @@
#include "clTernServer.h"
#include "wxCodeCompletionBoxEntry.h"
#include "cl_calltip.h"
#include "clJSCTags.h"

class JSCodeCompletion : public wxEvtHandler
{
clTernServer m_ternServer;
int m_ccPos;
wxString m_workingDirectory;
clJSCTags::Ptr_t m_jsctags;

public:
typedef SmartPtr<JSCodeCompletion> Ptr_t;
void OnCodeCompleteReady(const wxCodeCompletionBoxEntry::Vec_t& entries, const wxString& filename);
void OnFunctionTipReady(clCallTipPtr calltip, const wxString& filename);
void OnDefinitionFound(const clTernDefinition& loc);
void OnGotoDefinition(wxCommandEvent& event);

/**
* @brief start code completion based on the word completion plugin
*/
Expand Down Expand Up @@ -78,7 +80,7 @@ class JSCodeCompletion : public wxEvtHandler
* @param editor
*/
void ResetTern();

/**
* @brief reparse the file
*/
Expand Down
4 changes: 3 additions & 1 deletion WebTools/WebTools.project
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<CodeLite_Project Name="WebTools">
<CodeLite_Project Name="WebTools" Version="10.0.0">
<Plugins>
<Plugin Name="qmake">
<![CDATA[00020001N0015Win_x64_Release0000000000000001N0015Win_x86_Release000000000000]]>
Expand Down Expand Up @@ -65,6 +65,8 @@
<File Name="clTernServer.cpp"/>
<File Name="clTernWorkerThread.h"/>
<File Name="clTernWorkerThread.cpp"/>
<File Name="clJSCTags.h"/>
<File Name="clJSCTags.cpp"/>
</VirtualDirectory>
<VirtualDirectory Name="UI">
<File Name="WebToolsSettings.h"/>
Expand Down
71 changes: 71 additions & 0 deletions WebTools/clJSCTags.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
#include "clJSCTags.h"
#include "event_notifier.h"
#include "codelite_events.h"
#include <wx/filename.h>
#include "clZipReader.h"
#include "jobqueue.h"
#include "job.h"
#include "cl_standard_paths.h"

class clJSCTagsZipJob : public Job
{
protected:
clJSCTags* m_jsctags;
wxString m_zipfile;
wxString m_targetFolder;

public:
clJSCTagsZipJob(clJSCTags* jsctags, const wxString& zipfile, const wxString& targetFolder)
: Job(jsctags)
, m_jsctags(jsctags)
, m_zipfile(zipfile)
, m_targetFolder(targetFolder)
{
}

virtual ~clJSCTagsZipJob() {}

void Process(wxThread* thread)
{
wxUnusedVar(thread);
// Extract the zip file
wxFileName::Mkdir(m_targetFolder, wxS_DIR_DEFAULT, wxPATH_MKDIR_FULL);
clZipReader zipReader(m_zipfile);
zipReader.Extract("*", m_targetFolder);
m_jsctags->CallAfter(&clJSCTags::ZipExtractCompleted);
}
};

clJSCTags::clJSCTags()
: m_zipExtracted(false)
{
EventNotifier::Get()->Bind(wxEVT_ACTIVE_EDITOR_CHANGED, &clJSCTags::OnEditorChanged, this);
EventNotifier::Get()->Bind(wxEVT_FILE_SAVED, &clJSCTags::OnEditorSaved, this);
EventNotifier::Get()->Bind(wxEVT_INIT_DONE, &clJSCTags::OnInitDone, this);
}

clJSCTags::~clJSCTags()
{
EventNotifier::Get()->Unbind(wxEVT_ACTIVE_EDITOR_CHANGED, &clJSCTags::OnEditorChanged, this);
EventNotifier::Get()->Unbind(wxEVT_FILE_SAVED, &clJSCTags::OnEditorSaved, this);
EventNotifier::Get()->Unbind(wxEVT_INIT_DONE, &clJSCTags::OnInitDone, this);
}

void clJSCTags::OnEditorSaved(clCommandEvent& event) { event.Skip(); }

void clJSCTags::OnEditorChanged(wxCommandEvent& event) { event.Skip(); }

void clJSCTags::ZipExtractCompleted() { m_zipExtracted = true; }

void clJSCTags::OnInitDone(wxCommandEvent& event)
{
// Extract the zip file
wxFileName jsctagsZip(clStandardPaths::Get().GetDataDir(), "jsctags.zip");
if(jsctagsZip.Exists()) {
wxFileName targetDir(clStandardPaths::Get().GetUserDataDir(), "");
targetDir.AppendDir("webtools");
targetDir.AppendDir("jsctags");
JobQueueSingleton::Instance()->PushJob(
new clJSCTagsZipJob(this, jsctagsZip.GetFullPath(), targetDir.GetPath()));
}
}
25 changes: 25 additions & 0 deletions WebTools/clJSCTags.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#ifndef CLJSCTAGS_H
#define CLJSCTAGS_H

#include <wx/event.h>
#include "cl_command_event.h"
#include "smart_ptr.h"

class clJSCTags : public wxEvtHandler
{
bool m_zipExtracted;

public:
typedef SmartPtr<clJSCTags> Ptr_t;

public:
clJSCTags();
virtual ~clJSCTags();

void ZipExtractCompleted();
void OnEditorSaved(clCommandEvent& event);
void OnEditorChanged(wxCommandEvent& event);
void OnInitDone(wxCommandEvent& event);
};

#endif // CLJSCTAGS_H
Binary file added WebTools/jsctags.zip
Binary file not shown.

0 comments on commit dce172c

Please sign in to comment.