mirror of https://gitlab.com/basile.b/dexed.git
r26
This commit is contained in:
parent
f48fc903c5
commit
94ddae34ad
|
@ -1,6 +1,10 @@
|
||||||
Revision log.
|
Revision log.
|
||||||
(single changes can be tracked with the GH commit messages)
|
(single changes can be tracked with the GH commit messages)
|
||||||
|
|
||||||
|
r26:
|
||||||
|
- ce_libmaneditor: added support for folder of library (e.g derelict).
|
||||||
|
- ce_main: run project, fix, projects couldn't be executed when not saved.
|
||||||
|
|
||||||
r25:
|
r25:
|
||||||
- ce_plugin: added a plug-in API. D example. final goal is to use it to wrap D Completion Daemon and other D libs.
|
- ce_plugin: added a plug-in API. D example. final goal is to use it to wrap D Completion Daemon and other D libs.
|
||||||
- ce_libman: library manager: additional sources and -I are automatically added to the options.
|
- ce_libman: library manager: additional sources and -I are automatically added to the options.
|
||||||
|
|
|
@ -36,4 +36,7 @@ object CurrentProject: TCEProject
|
||||||
'CoeditPlug.d'
|
'CoeditPlug.d'
|
||||||
)
|
)
|
||||||
ConfigurationIndex = 1
|
ConfigurationIndex = 1
|
||||||
|
LibraryAliases.Strings = (
|
||||||
|
'iz'
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
|
@ -18,6 +18,7 @@ it just instanciates fine.
|
||||||
|
|
||||||
import std.stdio, std.string, std.conv;
|
import std.stdio, std.string, std.conv;
|
||||||
import CoeditPlugApi;
|
import CoeditPlugApi;
|
||||||
|
import iz.types;
|
||||||
|
|
||||||
version(Posix)
|
version(Posix)
|
||||||
{
|
{
|
||||||
|
@ -28,17 +29,15 @@ else
|
||||||
import core.sys.windows.dll;
|
import core.sys.windows.dll;
|
||||||
}
|
}
|
||||||
|
|
||||||
import iz.types;
|
|
||||||
pragma( lib, "iz");
|
|
||||||
|
|
||||||
coeditPlug plugin;
|
coeditPlug plugin;
|
||||||
|
|
||||||
class coeditPlug :izObject
|
class coeditPlug: izObject
|
||||||
{
|
{
|
||||||
protected
|
protected
|
||||||
{
|
{
|
||||||
plugDispatchToHostProc fDispatcher;
|
plugDispatchToHostProc fDispatcher;
|
||||||
Plugin_t asPlugin_t(){return cast(Plugin_t)this;}
|
Plugin_t asPlugin_t(){return cast(Plugin_t)&this;}
|
||||||
}
|
}
|
||||||
public
|
public
|
||||||
{
|
{
|
||||||
|
|
|
@ -112,6 +112,7 @@
|
||||||
<RunParams>
|
<RunParams>
|
||||||
<local>
|
<local>
|
||||||
<FormatVersion Value="1"/>
|
<FormatVersion Value="1"/>
|
||||||
|
<CommandLineParams Value="-noplugs"/>
|
||||||
</local>
|
</local>
|
||||||
</RunParams>
|
</RunParams>
|
||||||
<RequiredPackages Count="6">
|
<RequiredPackages Count="6">
|
||||||
|
|
|
@ -7,11 +7,7 @@ uses
|
||||||
cthreads,
|
cthreads,
|
||||||
{$ENDIF}{$ENDIF}
|
{$ENDIF}{$ENDIF}
|
||||||
Interfaces, Forms, lazcontrols, runtimetypeinfocontrols, anchordockpkg,
|
Interfaces, Forms, lazcontrols, runtimetypeinfocontrols, anchordockpkg,
|
||||||
AnchorDocking, AnchorDockStorage, AnchorDockOptionsDlg,
|
AnchorDocking, AnchorDockStorage, AnchorDockOptionsDlg, ce_main;
|
||||||
ce_widget, ce_dmdwrap, ce_common, ce_synmemo, ce_main, ce_messages, ce_editor,
|
|
||||||
ce_projinspect, ce_projconf, jsonparser, ce_project, ce_widgettypes,
|
|
||||||
ce_staticexplorer, ce_search, ce_dlang, ce_dlangutils, ce_miniexplorer,
|
|
||||||
ce_plugin, ce_libman, ce_libmaneditor;
|
|
||||||
|
|
||||||
{$R *.res}
|
{$R *.res}
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,6 @@ uses
|
||||||
ActnList, dialogs, forms, process;
|
ActnList, dialogs, forms, process;
|
||||||
|
|
||||||
const
|
const
|
||||||
|
|
||||||
DdiagFilter = 'D source|*.d|D interface|*.di|All files|*.*';
|
DdiagFilter = 'D source|*.d|D interface|*.di|All files|*.*';
|
||||||
|
|
||||||
var
|
var
|
||||||
|
@ -580,7 +579,7 @@ begin
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
{$IFDEF LINUX}
|
{$IFDEF LINUX}
|
||||||
// aList.LoadFromFile('/etc/fstab'); // to be parsed
|
// aList.LoadFromFile('/etc/fstab'); // to be parsed
|
||||||
aList.Add('/home/');
|
aList.Add('/home/'); //TODO-cbugfix: AV when scanning non-users folder (e.g replace '/home/'' with '/')
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
|
@ -106,7 +106,7 @@ begin
|
||||||
if someAliases.IndexOf(itmt.libAlias) = -1 then continue;
|
if someAliases.IndexOf(itmt.libAlias) = -1 then continue;
|
||||||
//
|
//
|
||||||
if aList.IndexOf(itmt.libFile) <> -1 then continue;
|
if aList.IndexOf(itmt.libFile) <> -1 then continue;
|
||||||
aList.Add('-I'+ itmt.libFile);
|
aList.Add('-I' + itmt.libFile);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
|
@ -10,8 +10,6 @@ uses
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
{ TCELibManEditorWidget }
|
|
||||||
|
|
||||||
TCELibManEditorWidget = class(TCEWidget)
|
TCELibManEditorWidget = class(TCEWidget)
|
||||||
btnSelFile: TBitBtn;
|
btnSelFile: TBitBtn;
|
||||||
btnAddLib: TBitBtn;
|
btnAddLib: TBitBtn;
|
||||||
|
@ -42,7 +40,7 @@ uses
|
||||||
procedure TCELibManEditorWidget.ListEdited(Sender: TObject; Item: TListItem;
|
procedure TCELibManEditorWidget.ListEdited(Sender: TObject; Item: TListItem;
|
||||||
var AValue: string);
|
var AValue: string);
|
||||||
begin
|
begin
|
||||||
GridToData;
|
gridToData;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCELibManEditorWidget.btnAddLibClick(Sender: TObject);
|
procedure TCELibManEditorWidget.btnAddLibClick(Sender: TObject);
|
||||||
|
@ -65,7 +63,7 @@ begin
|
||||||
al := List.Selected.Caption;
|
al := List.Selected.Caption;
|
||||||
if inputQuery('library alias', '', al) then
|
if inputQuery('library alias', '', al) then
|
||||||
List.Selected.Caption := al;
|
List.Selected.Caption := al;
|
||||||
GridToData;
|
gridToData;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCELibManEditorWidget.btnRemLibClick(Sender: TObject);
|
procedure TCELibManEditorWidget.btnRemLibClick(Sender: TObject);
|
||||||
|
@ -91,11 +89,17 @@ begin
|
||||||
try
|
try
|
||||||
filename := ini;
|
filename := ini;
|
||||||
if execute then
|
if execute then
|
||||||
List.Selected.SubItems[0] := filename;
|
begin
|
||||||
|
//TODO-cwiki: 'a folder containing many .lib can be added with an invalid fname'
|
||||||
|
if not fileExists(filename) then
|
||||||
|
List.Selected.SubItems[0] := extractFilePath(filename)
|
||||||
|
else
|
||||||
|
List.Selected.SubItems[0] := filename;
|
||||||
|
end;
|
||||||
finally
|
finally
|
||||||
Free;
|
Free;
|
||||||
end;
|
end;
|
||||||
GridToData;
|
gridToData;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCELibManEditorWidget.btnSelRootClick(Sender: TObject);
|
procedure TCELibManEditorWidget.btnSelRootClick(Sender: TObject);
|
||||||
|
@ -113,7 +117,7 @@ begin
|
||||||
end;
|
end;
|
||||||
if selectDirectory('sources root', dir, outdir, true, 0) then
|
if selectDirectory('sources root', dir, outdir, true, 0) then
|
||||||
List.Selected.SubItems[1] := outdir;
|
List.Selected.SubItems[1] := outdir;
|
||||||
GridToData;
|
gridToData;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCELibManEditorWidget.DoShow;
|
procedure TCELibManEditorWidget.DoShow;
|
||||||
|
@ -145,7 +149,7 @@ end;
|
||||||
|
|
||||||
procedure TCELibManEditorWidget.gridToData;
|
procedure TCELibManEditorWidget.gridToData;
|
||||||
var
|
var
|
||||||
itmt: TLibraryItem;
|
itm: TLibraryItem;
|
||||||
row: TListItem;
|
row: TListItem;
|
||||||
begin
|
begin
|
||||||
with CEMainForm do
|
with CEMainForm do
|
||||||
|
@ -154,10 +158,10 @@ begin
|
||||||
LibraryManager.libraries.Clear;
|
LibraryManager.libraries.Clear;
|
||||||
for row in List.Items do
|
for row in List.Items do
|
||||||
begin
|
begin
|
||||||
itmt := TLibraryItem(LibraryManager.libraries.Add);
|
itm := TLibraryItem(LibraryManager.libraries.Add);
|
||||||
itmt.libAlias := row.Caption;
|
itm.libAlias := row.Caption;
|
||||||
itmt.libFile := row.SubItems.Strings[0];
|
itm.libFile := row.SubItems.Strings[0];
|
||||||
itmt.libSourcePath := row.SubItems.Strings[1];
|
itm.libSourcePath := row.SubItems.Strings[1];
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
|
@ -41,9 +41,6 @@ type
|
||||||
procedure treeScanSubFolders(aRoot: TTreeNode);
|
procedure treeScanSubFolders(aRoot: TTreeNode);
|
||||||
procedure treeClick(sender: TObject);
|
procedure treeClick(sender: TObject);
|
||||||
procedure treeChanged(Sender: TObject; Node: TTreeNode);
|
procedure treeChanged(Sender: TObject; Node: TTreeNode);
|
||||||
procedure treeCollapsed(Sender: TObject; Node: TTreeNode);
|
|
||||||
procedure treeExpanded(Sender: TObject; Node: TTreeNode);
|
|
||||||
procedure treeCollapsing(Sender: TObject; Node: TTreeNode; var allow: boolean);
|
|
||||||
procedure treeExpanding(Sender: TObject; Node: TTreeNode; var allow: boolean);
|
procedure treeExpanding(Sender: TObject; Node: TTreeNode; var allow: boolean);
|
||||||
procedure treeDeletion(Sender: TObject; Item: TTreeNode);
|
procedure treeDeletion(Sender: TObject; Item: TTreeNode);
|
||||||
procedure treeSelectionChanged(sender: TObject);
|
procedure treeSelectionChanged(sender: TObject);
|
||||||
|
@ -74,14 +71,11 @@ begin
|
||||||
lstFiles.OnDeletion := @lstDeletion;
|
lstFiles.OnDeletion := @lstDeletion;
|
||||||
lstFav.OnDeletion := @lstDeletion;
|
lstFav.OnDeletion := @lstDeletion;
|
||||||
lstFav.OnSelectItem := @lstFavSelect;
|
lstFav.OnSelectItem := @lstFavSelect;
|
||||||
|
//
|
||||||
Tree.OnClick := @treeClick;
|
Tree.OnClick := @treeClick;
|
||||||
Tree.OnChange := @treeChanged;
|
Tree.OnChange := @treeChanged;
|
||||||
Tree.OnDeletion := @treeDeletion;
|
Tree.OnDeletion := @treeDeletion;
|
||||||
Tree.OnSelectionChanged := @treeSelectionChanged;
|
Tree.OnSelectionChanged := @treeSelectionChanged;
|
||||||
Tree.OnExpanded := @treeExpanded;
|
|
||||||
Tree.OnCollapsed := @treeCollapsed;
|
|
||||||
Tree.OnCollapsing := @treeCollapsing;
|
|
||||||
Tree.OnExpanding := @treeExpanding;
|
Tree.OnExpanding := @treeExpanding;
|
||||||
//
|
//
|
||||||
treeSetRoots;
|
treeSetRoots;
|
||||||
|
@ -323,10 +317,6 @@ begin
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCEMiniExplorerWidget.treeCollapsing(Sender: TObject; Node: TTreeNode; var allow: boolean);
|
|
||||||
begin
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TCEMiniExplorerWidget.treeExpanding(Sender: TObject; Node: TTreeNode; var allow: boolean);
|
procedure TCEMiniExplorerWidget.treeExpanding(Sender: TObject; Node: TTreeNode; var allow: boolean);
|
||||||
begin
|
begin
|
||||||
if Node <> nil then
|
if Node <> nil then
|
||||||
|
@ -334,14 +324,6 @@ begin
|
||||||
allow := true;
|
allow := true;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCEMiniExplorerWidget.treeCollapsed(Sender: TObject; Node: TTreeNode);
|
|
||||||
begin
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TCEMiniExplorerWidget.treeExpanded(Sender: TObject; Node: TTreeNode);
|
|
||||||
begin
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TCEMiniExplorerWidget.treeChanged(Sender: TObject; Node: TTreeNode);
|
procedure TCEMiniExplorerWidget.treeChanged(Sender: TObject; Node: TTreeNode);
|
||||||
begin
|
begin
|
||||||
if Node = nil then exit;
|
if Node = nil then exit;
|
||||||
|
|
|
@ -50,8 +50,8 @@ const
|
||||||
EV_CHANGED = $00000001;
|
EV_CHANGED = $00000001;
|
||||||
/// something's just been selected.
|
/// something's just been selected.
|
||||||
EV_FOCUSED = $00000002;
|
EV_FOCUSED = $00000002;
|
||||||
/// something's just been closed.
|
/// something will be closed.
|
||||||
EV_CLOSED = $00000003;
|
EV_CLOSE = $00000003;
|
||||||
/// something's just been created.
|
/// something's just been created.
|
||||||
EV_NEW = $00000004;
|
EV_NEW = $00000004;
|
||||||
/// something gonna be compiled.
|
/// something gonna be compiled.
|
||||||
|
@ -130,7 +130,7 @@ type
|
||||||
* Coedit events and data are passed here. data1 and data2 can be casted according to opCode.
|
* Coedit events and data are passed here. data1 and data2 can be casted according to opCode.
|
||||||
* In the plugin implementation, it must be named 'dispatchToPlug'.
|
* In the plugin implementation, it must be named 'dispatchToPlug'.
|
||||||
*)
|
*)
|
||||||
THostDispatchToPlug = procedure(aTarget: TCEPlugin; data0: Integer; opCode: LongWord; data1, data2: Pointer); cdecl;
|
THostDispatchToPlug = procedure(aTarget: TCEPlugin; opCode: LongWord; data0: Integer; data1, data2: Pointer); cdecl;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue