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.
|
||||
(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:
|
||||
- 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.
|
||||
|
|
|
@ -36,4 +36,7 @@ object CurrentProject: TCEProject
|
|||
'CoeditPlug.d'
|
||||
)
|
||||
ConfigurationIndex = 1
|
||||
LibraryAliases.Strings = (
|
||||
'iz'
|
||||
)
|
||||
end
|
||||
|
|
|
@ -18,6 +18,7 @@ it just instanciates fine.
|
|||
|
||||
import std.stdio, std.string, std.conv;
|
||||
import CoeditPlugApi;
|
||||
import iz.types;
|
||||
|
||||
version(Posix)
|
||||
{
|
||||
|
@ -28,17 +29,15 @@ else
|
|||
import core.sys.windows.dll;
|
||||
}
|
||||
|
||||
import iz.types;
|
||||
pragma( lib, "iz");
|
||||
|
||||
coeditPlug plugin;
|
||||
|
||||
class coeditPlug :izObject
|
||||
class coeditPlug: izObject
|
||||
{
|
||||
protected
|
||||
{
|
||||
plugDispatchToHostProc fDispatcher;
|
||||
Plugin_t asPlugin_t(){return cast(Plugin_t)this;}
|
||||
Plugin_t asPlugin_t(){return cast(Plugin_t)&this;}
|
||||
}
|
||||
public
|
||||
{
|
||||
|
|
|
@ -112,6 +112,7 @@
|
|||
<RunParams>
|
||||
<local>
|
||||
<FormatVersion Value="1"/>
|
||||
<CommandLineParams Value="-noplugs"/>
|
||||
</local>
|
||||
</RunParams>
|
||||
<RequiredPackages Count="6">
|
||||
|
|
|
@ -7,11 +7,7 @@ uses
|
|||
cthreads,
|
||||
{$ENDIF}{$ENDIF}
|
||||
Interfaces, Forms, lazcontrols, runtimetypeinfocontrols, anchordockpkg,
|
||||
AnchorDocking, AnchorDockStorage, AnchorDockOptionsDlg,
|
||||
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;
|
||||
AnchorDocking, AnchorDockStorage, AnchorDockOptionsDlg, ce_main;
|
||||
|
||||
{$R *.res}
|
||||
|
||||
|
|
|
@ -12,7 +12,6 @@ uses
|
|||
ActnList, dialogs, forms, process;
|
||||
|
||||
const
|
||||
|
||||
DdiagFilter = 'D source|*.d|D interface|*.di|All files|*.*';
|
||||
|
||||
var
|
||||
|
@ -580,7 +579,7 @@ begin
|
|||
{$ENDIF}
|
||||
{$IFDEF LINUX}
|
||||
// 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}
|
||||
end;
|
||||
|
||||
|
|
|
@ -106,7 +106,7 @@ begin
|
|||
if someAliases.IndexOf(itmt.libAlias) = -1 then continue;
|
||||
//
|
||||
if aList.IndexOf(itmt.libFile) <> -1 then continue;
|
||||
aList.Add('-I'+ itmt.libFile);
|
||||
aList.Add('-I' + itmt.libFile);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
|
|
@ -10,8 +10,6 @@ uses
|
|||
|
||||
type
|
||||
|
||||
{ TCELibManEditorWidget }
|
||||
|
||||
TCELibManEditorWidget = class(TCEWidget)
|
||||
btnSelFile: TBitBtn;
|
||||
btnAddLib: TBitBtn;
|
||||
|
@ -42,7 +40,7 @@ uses
|
|||
procedure TCELibManEditorWidget.ListEdited(Sender: TObject; Item: TListItem;
|
||||
var AValue: string);
|
||||
begin
|
||||
GridToData;
|
||||
gridToData;
|
||||
end;
|
||||
|
||||
procedure TCELibManEditorWidget.btnAddLibClick(Sender: TObject);
|
||||
|
@ -65,7 +63,7 @@ begin
|
|||
al := List.Selected.Caption;
|
||||
if inputQuery('library alias', '', al) then
|
||||
List.Selected.Caption := al;
|
||||
GridToData;
|
||||
gridToData;
|
||||
end;
|
||||
|
||||
procedure TCELibManEditorWidget.btnRemLibClick(Sender: TObject);
|
||||
|
@ -91,11 +89,17 @@ begin
|
|||
try
|
||||
filename := ini;
|
||||
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
|
||||
Free;
|
||||
end;
|
||||
GridToData;
|
||||
gridToData;
|
||||
end;
|
||||
|
||||
procedure TCELibManEditorWidget.btnSelRootClick(Sender: TObject);
|
||||
|
@ -113,7 +117,7 @@ begin
|
|||
end;
|
||||
if selectDirectory('sources root', dir, outdir, true, 0) then
|
||||
List.Selected.SubItems[1] := outdir;
|
||||
GridToData;
|
||||
gridToData;
|
||||
end;
|
||||
|
||||
procedure TCELibManEditorWidget.DoShow;
|
||||
|
@ -145,7 +149,7 @@ end;
|
|||
|
||||
procedure TCELibManEditorWidget.gridToData;
|
||||
var
|
||||
itmt: TLibraryItem;
|
||||
itm: TLibraryItem;
|
||||
row: TListItem;
|
||||
begin
|
||||
with CEMainForm do
|
||||
|
@ -154,10 +158,10 @@ begin
|
|||
LibraryManager.libraries.Clear;
|
||||
for row in List.Items do
|
||||
begin
|
||||
itmt := TLibraryItem(LibraryManager.libraries.Add);
|
||||
itmt.libAlias := row.Caption;
|
||||
itmt.libFile := row.SubItems.Strings[0];
|
||||
itmt.libSourcePath := row.SubItems.Strings[1];
|
||||
itm := TLibraryItem(LibraryManager.libraries.Add);
|
||||
itm.libAlias := row.Caption;
|
||||
itm.libFile := row.SubItems.Strings[0];
|
||||
itm.libSourcePath := row.SubItems.Strings[1];
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
|
|
@ -41,9 +41,6 @@ type
|
|||
procedure treeScanSubFolders(aRoot: TTreeNode);
|
||||
procedure treeClick(sender: TObject);
|
||||
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 treeDeletion(Sender: TObject; Item: TTreeNode);
|
||||
procedure treeSelectionChanged(sender: TObject);
|
||||
|
@ -74,14 +71,11 @@ begin
|
|||
lstFiles.OnDeletion := @lstDeletion;
|
||||
lstFav.OnDeletion := @lstDeletion;
|
||||
lstFav.OnSelectItem := @lstFavSelect;
|
||||
|
||||
//
|
||||
Tree.OnClick := @treeClick;
|
||||
Tree.OnChange := @treeChanged;
|
||||
Tree.OnDeletion := @treeDeletion;
|
||||
Tree.OnSelectionChanged := @treeSelectionChanged;
|
||||
Tree.OnExpanded := @treeExpanded;
|
||||
Tree.OnCollapsed := @treeCollapsed;
|
||||
Tree.OnCollapsing := @treeCollapsing;
|
||||
Tree.OnExpanding := @treeExpanding;
|
||||
//
|
||||
treeSetRoots;
|
||||
|
@ -323,10 +317,6 @@ begin
|
|||
end;
|
||||
end;
|
||||
|
||||
procedure TCEMiniExplorerWidget.treeCollapsing(Sender: TObject; Node: TTreeNode; var allow: boolean);
|
||||
begin
|
||||
end;
|
||||
|
||||
procedure TCEMiniExplorerWidget.treeExpanding(Sender: TObject; Node: TTreeNode; var allow: boolean);
|
||||
begin
|
||||
if Node <> nil then
|
||||
|
@ -334,14 +324,6 @@ begin
|
|||
allow := true;
|
||||
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);
|
||||
begin
|
||||
if Node = nil then exit;
|
||||
|
|
|
@ -50,8 +50,8 @@ const
|
|||
EV_CHANGED = $00000001;
|
||||
/// something's just been selected.
|
||||
EV_FOCUSED = $00000002;
|
||||
/// something's just been closed.
|
||||
EV_CLOSED = $00000003;
|
||||
/// something will be closed.
|
||||
EV_CLOSE = $00000003;
|
||||
/// something's just been created.
|
||||
EV_NEW = $00000004;
|
||||
/// 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.
|
||||
* 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