Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

Commit

Permalink
dev-v0.0.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
illa4257 committed Jun 27, 2020
1 parent 02294d5 commit 83129ef
Show file tree
Hide file tree
Showing 31 changed files with 164 additions and 78 deletions.
4 changes: 2 additions & 2 deletions dn-project/.dn/backup.conf
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#Sat Jun 27 02:50:40 EEST 2020
#Sat Jun 27 15:35:36 EEST 2020
autoOpenTrigger=
autoCloseTrigger=1
autoIntervalTriggerTime=240000
masterDefault=dev
autoAmountMaxInSession=8
autoIntervalTrigger=1
autoAmountMax=12
autoIntervalTrigger=1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#Sat Jun 27 02:50:40 EEST 2020
#Sat Jun 27 15:35:36 EEST 2020
version=1.0
name=HTTP Client
env=all
2 changes: 1 addition & 1 deletion dn-project/.dn/bundles/develnext.bundle.zip.ZipBundle.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#Sat Jun 27 02:50:40 EEST 2020
#Sat Jun 27 15:35:36 EEST 2020
version=1.0
name=ZIP
env=all
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#Sat Jun 27 02:50:40 EEST 2020
#Sat Jun 27 15:35:36 EEST 2020
env=dev
2 changes: 1 addition & 1 deletion dn-project/.dn/bundles/ide.bundle.std.UIDesktopBundle.conf
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#Sat Jun 27 02:50:40 EEST 2020
#Sat Jun 27 15:35:36 EEST 2020
env=all
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Sat Jun 27 02:50:40 EEST 2020
#Sat Jun 27 15:35:36 EEST 2020
snapType=HIDDEN
blockedNodes=
snapSizeY=8
zoom=100
snapSizeY=8
snapSizeX=8
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Sat Jun 27 02:50:40 EEST 2020
#Sat Jun 27 15:35:36 EEST 2020
snapType=HIDDEN
blockedNodes=
snapSizeY=8
zoom=100
snapSizeY=8
snapSizeX=8
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Wed Jun 10 19:53:52 EEST 2020
#Sat Jun 27 15:35:36 EEST 2020
snapType=HIDDEN
blockedNodes=
snapSizeY=8
zoom=100
snapSizeY=8
snapSizeX=8
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#Thu Jun 25 16:36:31 EEST 2020
#Sat Jun 27 15:35:36 EEST 2020
blockedNodes=
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#Mon Jun 08 23:54:11 EEST 2020
#Sat Jun 27 15:35:36 EEST 2020
blockedNodes=
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#Sat Jun 27 02:50:40 EEST 2020
#Sat Jun 27 15:35:36 EEST 2020
blockedNodes=
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#Thu Jun 25 16:36:31 EEST 2020
#Sat Jun 27 15:35:36 EEST 2020
blockedNodes=
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#Sat Jun 27 02:50:40 EEST 2020
#Sat Jun 27 15:35:36 EEST 2020
useImports=
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#Sat Jun 27 02:50:40 EEST 2020
#Sat Jun 27 15:35:36 EEST 2020
compileByteCode=
importType=package
2 changes: 1 addition & 1 deletion dn-project/.dn/library.conf
Original file line number Diff line number Diff line change
@@ -1 +1 @@
#Sat Jun 27 02:50:40 EEST 2020
#Sat Jun 27 15:35:36 EEST 2020
2 changes: 1 addition & 1 deletion dn-project/.dn/project.ws
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#Sat Jun 27 02:50:40 EEST 2020
#Sat Jun 27 15:35:36 EEST 2020
projectArchive.uid=IsqmQSoAnPaz
3 changes: 2 additions & 1 deletion dn-project/Bundle Editor for DevelNext.dnproject
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project author="illa4257" authorOS="Windows 10" createdAt="1591649614784" ideName="DevelNext" ideVersion="16.7.0" ideVersionHash="2017103112" name="Bundle Editor for DevelNext" packageName="editor" template="ide\project\templates\DefaultGuiProjectTemplate" updatedAt="1593215440116">
<project author="illa4257" authorOS="Windows 10" createdAt="1591649614784" ideName="DevelNext" ideVersion="16.7.0" ideVersionHash="2017103112" name="Bundle Editor for DevelNext" packageName="editor" template="ide\project\templates\DefaultGuiProjectTemplate" updatedAt="1593261336534">
<tree>
<expanded>
<path src=""/>
<path src="/src"/>
<path src="/src/editor"/>
<path src="/src/editor/forms"/>
<path src="/src/editor/modules"/>
<path src="/src/scripts"/>
<path src="/vendor"/>
</expanded>
</tree>
Expand Down
2 changes: 1 addition & 1 deletion dn-project/src/editor/forms/editor.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#Sat Jun 27 02:45:54 EEST 2020
#Sat Jun 27 14:52:18 EEST 2020
form.style=DECORATED
modules=editorModule
form.title=editor
4 changes: 2 additions & 2 deletions dn-project/src/editor/forms/editor.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
<content>
<AnchorPane focusTraversable="false" id="" maxHeight="-1" maxWidth="-1" minHeight="-1" minWidth="-1" prefHeight="264" prefWidth="496" styleClass="">
<children>
<Data cursor="DEFAULT" enabled="1" id="data-textArea" visible="1"/>
<Data cursor="DEFAULT" enabled="" id="data-textArea" visible="1"/>
<ListViewEx editable="false" fixedCellSize="17" focusTraversable="true" id="code" layoutX="0" layoutY="0" prefHeight="264" prefWidth="496" styleClass="list-view ">
<items xmlns:fx="http://javafx.com/fxml">
<FXCollections fx:factory="observableArrayList"/>
</items>
</ListViewEx>
<Data cursor="DEFAULT" enabled="1" id="data-code" visible="1"/>
<Data cursor="DEFAULT" enabled="1" id="data-code" multipleSelection="1" visible=""/>
<TextArea editable="true" focusTraversable="true" id="textArea" layoutX="0" layoutY="-3" opacity="0.5" prefColumnCount="40" prefHeight="267" prefWidth="496" promptText="" styleClass="text-input text-area " text="" wrapText="false">
<font>
<Font name="System Regular" size="12"/>
Expand Down
30 changes: 28 additions & 2 deletions dn-project/src/editor/forms/editor.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,17 @@ function doConstruct(UXEvent $e = null)
{
$this->textArea->observer("text")->addListener(function ($old, $new){
$this->updateWH($new);
$this->tab->text = $this->text." (*)";
$this->tab->text = $this->text."*";
$this->info->text = "Waiting...";
$this->saveFile = true;
$this->updateCode = true;
});
$this->textArea->observer("selection")->addListener(function ($old, $new){
$this->updateSelection();
});
$this->script->callAsync();
}


function updateWH($new){
$arr = str::lines($new);
Expand All @@ -39,7 +43,18 @@ function updateWH($new){
$this->textArea->height = $height+3;
$this->code->height = $height;
}


function updateSelection(){
$arr = [$this->getLineFromPos($this->textArea->text, $this->textArea->selection["start"])];
$i = $arr[0];
$end = $this->getLineFromPos($this->textArea->text, $this->textArea->selection["end"]);
while($end!=$arr[0]){
$i++;
$arr[] = $i;
$end--;
}
$this->code->selectedIndexes = $arr;
}

public $file;
public $saveFile = false;
Expand All @@ -62,4 +77,15 @@ public function getText(){
return $this->textArea->text;
}

function getLineFromPos($text, $pos){
$text = str::lines($text);
$ct = arr::count($text);
$y = 0;
while($y!=$ct and $pos>=0){
$pos -= str::length($text[$y])+1;
$y++;
}
return $y-1;
}

}
2 changes: 1 addition & 1 deletion dn-project/src/editor/forms/ide.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#Sat Jun 27 02:23:12 EEST 2020
#Sat Jun 27 15:27:22 EEST 2020
form.style=DECORATED
modules=ideModule
form.title=Bundle Editor
Expand Down
4 changes: 2 additions & 2 deletions dn-project/src/editor/forms/ide.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<Data cursor="DEFAULT" draggable="ALL" enabled="1" id="data-tabs" visible="1"/>
<Data cursor="DEFAULT" enabled="1" id="data-label" visible="1"/>
<TabPaneEx AnchorPane.bottomAnchor="0" AnchorPane.topAnchor="56" focusTraversable="true" id="tabs" layoutX="216" layoutY="56" prefHeight="424" prefWidth="640" styleClass="tab-pane " tabClosingPolicy="ALL_TABS"/>
<Separator AnchorPane.bottomAnchor="0" AnchorPane.topAnchor="56" focusTraversable="false" id="separator" layoutX="208" layoutY="56" orientation="VERTICAL" prefHeight="424" prefWidth="8" styleClass="separator "/>
<Data cursor="MOVE" enabled="1" id="data-separator" visible="1"/>
<Separator AnchorPane.bottomAnchor="0" AnchorPane.topAnchor="56" focusTraversable="false" id="separator" layoutX="208" layoutY="56" orientation="VERTICAL" prefHeight="424" prefWidth="8" style="-fx-cursor:h-resize;" styleClass="separator "/>
<Data cursor="DEFAULT" enabled="1" id="data-separator" visible="1"/>
</children>
</AnchorPane>
60 changes: 31 additions & 29 deletions dn-project/src/editor/forms/ide.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,7 @@ function doTreeClickLeft(UXMouseEvent $e = null)
*/
function doTabsChange(UXEvent $e = null)
{
$tabs = $this->tabs->tabs->toArray();
$l = "[";
foreach ($tabs as $tab){
if($l!="[") $l .= ",";
$l .= $tab->data("data");
}
$l .= "]";
$this->ini->set("tabs", $l);
$this->updateTabs();
}

/**
Expand Down Expand Up @@ -178,6 +171,7 @@ function doConstruct(UXEvent $e = null)
$item = new UXMenuItem('Check updates');
$item->on("action", function (){
app()->showForm('about');
app()->restoreForm('about');
app()->form('about')->requestFocus();
});
$about->items->add($item);
Expand Down Expand Up @@ -206,25 +200,6 @@ function doClick(UXMouseEvent $e = null)
$this->activeForm->requestFocus();
}

/**
* @event tabs.close
*/
function doTabsClose(UXEvent $e = null)
{
$l = [];
$l2 = [];
if($this->tabs->tabs->count()!=0){
$arr = $this->tabs->tabs->toArray();
foreach ($arr as $tab){
if($tab->data("tab")){
$l2[] = $tab;
$l[] = $tab->data("file");
}
}
}
$this->openedFiles = $l;
$this->tabsList = $l2;
}

/**
* @event tabs.closeRequest
Expand All @@ -235,6 +210,7 @@ function doTabsCloseRequest(UXEvent $e = null)
$e->target->content->content->free();
}
$e->target->content->free();
$this->updateTabs();
}


Expand Down Expand Up @@ -316,7 +292,7 @@ public function block($en = false){
}

public function editFile($fp){
$file = fs::abs(fs::abs($GLOBALS['projectdir']).$fp);
$file = fs::abs(fs::abs($GLOBALS['projectdir'].$this->getContextForm()->projectName).$fp);
if(fs::exists($file)){
$bool = true;
$i = 0;
Expand Down Expand Up @@ -345,12 +321,38 @@ public function editFile($fp){
$this->tabsList[] = $tab;
$this->openedFiles[] = $file;
$this->tabs->tabs->add($tab);
$editor->openFile($file, $tab);
$this->tabs->selectTab($tab);
$this->updateTabs();
$editor->openFile($file, $tab);
}else{
$this->tabs->selectTab($this->tabsList[$i-1]);
}
}
}

function updateTabs(){
$tabs = $this->tabs->tabs->toArray();
$l = "[";
foreach ($tabs as $tab){
if($l!="[") $l .= ",";
$l .= $tab->data("data");
}
$l .= "]";
$this->ini->set("tabs", $l);

$l = [];
$l2 = [];
if($this->tabs->tabs->count()!=0){
$arr = $this->tabs->tabs->toArray();
foreach ($arr as $tab){
if($tab->data("tab")){
$l2[] = $tab;
$l[] = $tab->data("file");
}
}
}
$this->openedFiles = $l;
$this->tabsList = $l2;
}

}
4 changes: 2 additions & 2 deletions dn-project/src/editor/forms/newproject.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#Wed Jun 10 19:27:35 EEST 2020
form.style=DECORATED
#Sat Jun 27 12:36:19 EEST 2020
form.resizable=
form.style=DECORATED
form.title=Bundle Editor
form.icon=.data/img/icon.png
7 changes: 3 additions & 4 deletions dn-project/src/editor/modules/AppModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@ class AppModule extends AbstractModule
* @event action
*/
function doAction(ScriptEvent $e = null)
{
var_dump($GLOBALS);
$GLOBALS['version'] = "dev-v0.0.1.1";
{
$GLOBALS['version'] = "dev-v0.0.1.2";
$GLOBALS['progdir'] = fs::parent($GLOBALS['argv'][0]) . '/';
$GLOBALS['progdir'] = "";
$GLOBALS['projectdir'] = fs::abs('./') . '/project/';
$GLOBALS['projectdir'] = fs::abs('./') . '/projects/';
$GLOBALS['nickname'] = 'illa4257';
$GLOBALS['repo'] = 'Bundle-Editor-for-Develnext';
$GLOBALS['updater'] = new updater;
Expand Down
2 changes: 2 additions & 0 deletions dn-project/src/editor/modules/aboutModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ function doTimerAction(ScriptEvent $e = null)
$data .= "Available update: ".$GLOBALS['updater']->lastVersion;
$labelEx = new UXLabelEx($GLOBALS['updater']->description);
$this->container->content = $labelEx;
}else{
$data .= "This is last version!";
}
}
$this->info->text = $data;
Expand Down
4 changes: 2 additions & 2 deletions dn-project/src/editor/modules/editorModule.module
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"components": {
"script": {
"type": "script\\MacroScript",
"x": 64,
"y": 80,
"x": 0.0,
"y": 0.0,
"props": {}
}
}
Expand Down
Loading

0 comments on commit 83129ef

Please sign in to comment.