Skip to content

Commit

Permalink
Merge pull request #162 from KovAlexey/edt_cli
Browse files Browse the repository at this point in the history
Edt cli (beta)
  • Loading branch information
tretyakevich authored Dec 19, 2024
2 parents bef7e5e + dbc1a08 commit 9ed67f1
Show file tree
Hide file tree
Showing 13 changed files with 782 additions and 21 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
<?xml version="1.0" encoding="UTF-8"?>
<form:Form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:form="http://g5.1c.ru/v8/dt/form">
<items xsi:type="form:FormField">
<name>Наименование</name>
<id>1</id>
<visible>true</visible>
<enabled>true</enabled>
<userVisible>
<common>true</common>
</userVisible>
<dataPath xsi:type="form:DataPath">
<segments>Объект.Description</segments>
</dataPath>
<extendedTooltip>
<name>НаименованиеРасширеннаяПодсказка</name>
<id>3</id>
<visible>true</visible>
<enabled>true</enabled>
<userVisible>
<common>true</common>
</userVisible>
<type>Label</type>
<autoMaxWidth>true</autoMaxWidth>
<autoMaxHeight>true</autoMaxHeight>
<extInfo xsi:type="form:LabelDecorationExtInfo">
<horizontalAlign>Left</horizontalAlign>
</extInfo>
</extendedTooltip>
<contextMenu>
<name>НаименованиеКонтекстноеМеню</name>
<id>2</id>
<visible>true</visible>
<enabled>true</enabled>
<userVisible>
<common>true</common>
</userVisible>
<autoFill>true</autoFill>
</contextMenu>
<type>InputField</type>
<editMode>EnterOnInput</editMode>
<showInHeader>true</showInHeader>
<headerHorizontalAlign>Left</headerHorizontalAlign>
<showInFooter>true</showInFooter>
<extInfo xsi:type="form:InputFieldExtInfo">
<autoMaxWidth>true</autoMaxWidth>
<autoMaxHeight>true</autoMaxHeight>
<wrap>true</wrap>
<chooseType>true</chooseType>
<typeDomainEnabled>true</typeDomainEnabled>
<textEdit>true</textEdit>
</extInfo>
</items>
<items xsi:type="form:FormField">
<name>ПутьКCLI</name>
<id>7</id>
<title>
<key>ru</key>
<value>Путь к CLI (На сервере)</value>
</title>
<visible>true</visible>
<enabled>true</enabled>
<userVisible>
<common>true</common>
</userVisible>
<dataPath xsi:type="form:DataPath">
<segments>Объект.ПутьКCLI</segments>
</dataPath>
<extendedTooltip>
<name>ПутьКCLIРасширеннаяПодсказка</name>
<id>9</id>
<visible>true</visible>
<enabled>true</enabled>
<userVisible>
<common>true</common>
</userVisible>
<type>Label</type>
<autoMaxWidth>true</autoMaxWidth>
<autoMaxHeight>true</autoMaxHeight>
<extInfo xsi:type="form:LabelDecorationExtInfo">
<horizontalAlign>Left</horizontalAlign>
</extInfo>
</extendedTooltip>
<contextMenu>
<name>ПутьКCLIКонтекстноеМеню</name>
<id>8</id>
<visible>true</visible>
<enabled>true</enabled>
<userVisible>
<common>true</common>
</userVisible>
<autoFill>true</autoFill>
</contextMenu>
<type>InputField</type>
<editMode>Enter</editMode>
<showInHeader>true</showInHeader>
<headerHorizontalAlign>Left</headerHorizontalAlign>
<showInFooter>true</showInFooter>
<extInfo xsi:type="form:InputFieldExtInfo">
<handlers>
<event>StartChoice</event>
<name>ПутьКCLIНачалоВыбора</name>
</handlers>
<autoMaxWidth>true</autoMaxWidth>
<autoMaxHeight>true</autoMaxHeight>
<wrap>true</wrap>
<choiceButton>true</choiceButton>
<choiceButtonRepresentation>ShowInInputField</choiceButtonRepresentation>
<chooseType>true</chooseType>
<typeDomainEnabled>true</typeDomainEnabled>
<textEdit>true</textEdit>
</extInfo>
</items>
<autoCommandBar>
<name>ФормаКоманднаяПанель</name>
<id>-1</id>
<visible>true</visible>
<enabled>true</enabled>
<userVisible>
<common>true</common>
</userVisible>
<horizontalAlign>Left</horizontalAlign>
<autoFill>true</autoFill>
</autoCommandBar>
<handlers>
<event>ChoiceProcessing</event>
<name>ОбработкаВыбора</name>
</handlers>
<windowOpeningMode>LockOwnerWindow</windowOpeningMode>
<autoTitle>true</autoTitle>
<autoUrl>true</autoUrl>
<group>Vertical</group>
<autoFillCheck>true</autoFillCheck>
<allowFormCustomize>true</allowFormCustomize>
<enabled>true</enabled>
<showTitle>true</showTitle>
<showCloseButton>true</showCloseButton>
<attributes>
<name>Объект</name>
<id>1</id>
<valueType>
<types>CatalogObject.ВерсииEDT</types>
</valueType>
<view>
<common>true</common>
</view>
<edit>
<common>true</common>
</edit>
<main>true</main>
<savedData>true</savedData>
</attributes>
<commandInterface>
<navigationPanel/>
<commandBar/>
</commandInterface>
<extInfo xsi:type="form:CatalogFormExtInfo"/>
</form:Form>
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@



#Область ОбработчикиСобытийЭлементовШапкиФормы

&НаКлиенте
Процедура ПутьКCLIНачалоВыбора(Элемент, ДанныеВыбора, СтандартнаяОбработка)
НачатьВыборРасположения1СEDTCLI();
КонецПроцедуры

#КонецОбласти

#Область СлужебныеПроцедурыИФункции

&НаКлиенте
Процедура НачатьВыборРасположения1СEDTCLI()
ЭтоWindowsСервер = ОбщегоНазначенияВызовСервера.ЭтоWindowsСервер();

Если ЭтоWindowsСервер Тогда
ИмяИсполняемогоФайла = "1cedtcli.exe";
Иначе
ИмяИсполняемогоФайла = "1cedtcli";
КонецЕсли;

ДиалогВыбораФайлов = Новый ДиалогВыбораФайла(РежимДиалогаВыбораФайла.Открытие);
ДиалогВыбораФайлов.Фильтр = СтрШаблон("Исполняемый файл (%1)|%1", ИмяИсполняемогоФайла);
ДиалогВыбораФайлов.МножественныйВыбор = Ложь;
ДиалогВыбораФайлов.Заголовок = "Путь к CLI (Аналогичный путь должен быть на сервере!)";
ДиалогВыбораФайлов.Показать(Новый ОписаниеОповещения("ОбработкаВыбораФайлаНаСервере", ЭтотОбъект));

КонецПроцедуры

&НаКлиенте
Процедура ОбработкаВыбораФайлаНаСервере(МассивФайлов, ДополнительныеПараметры) Экспорт
Если МассивФайлов <> Неопределено Тогда
ФайлСуществует = ФайлСуществуетНаСервере(МассивФайлов[0]);
Если Не ФайлСуществует Тогда
ПоказатьПредупреждение(, "Такого файла не существует на сервере!");
Возврат;
КонецЕсли;
Объект.ПутьКCLI = МассивФайлов[0];
КонецЕсли;

КонецПроцедуры

&НаСервереБезКонтекста
Функция ФайлСуществуетНаСервере(ПутьКФайлу)
Файл = Новый Файл(ПутьКФайлу);

Возврат Файл.Существует();
КонецФункции




#КонецОбласти
55 changes: 55 additions & 0 deletions GitConverter/src/Catalogs/ВерсииEDT/ВерсииEDT.mdo
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<?xml version="1.0" encoding="UTF-8"?>
<mdclass:Catalog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:core="http://g5.1c.ru/v8/dt/mcore" xmlns:mdclass="http://g5.1c.ru/v8/dt/metadata/mdclass" uuid="e7ae28d9-60d7-4498-b7f4-5d977663282a">
<producedTypes>
<objectType typeId="fa9c6b07-4d01-4a9b-9af4-b3f706ee1894" valueTypeId="d821893b-a555-4b8f-87af-75b46df2bde0"/>
<refType typeId="c4849d39-9a63-40ab-bac8-47c3bc36b97f" valueTypeId="a647b3d8-289c-423d-b9d2-29919d9dc79b"/>
<selectionType typeId="83aa1b3c-4454-44cd-8ea5-a04e7f58829b" valueTypeId="7619c7ab-4d13-4635-8530-2d11a5228678"/>
<listType typeId="7b4f0f54-74da-41f7-9303-2b1bd05752ae" valueTypeId="4d3362cb-7e52-4be6-abe7-128604989260"/>
<managerType typeId="e2fce3be-932e-4181-ab74-ee510d62d09e" valueTypeId="a4719119-bf56-4516-94a3-8a5c6dde8464"/>
</producedTypes>
<name>ВерсииEDT</name>
<synonym>
<key>ru</key>
<value>Версии EDT</value>
</synonym>
<useStandardCommands>true</useStandardCommands>
<inputByString>Catalog.ВерсииEDT.StandardAttribute.Description</inputByString>
<fullTextSearchOnInputByString>DontUse</fullTextSearchOnInputByString>
<createOnInput>Use</createOnInput>
<dataLockControlMode>Managed</dataLockControlMode>
<fullTextSearch>Use</fullTextSearch>
<levelCount>2</levelCount>
<foldersOnTop>true</foldersOnTop>
<descriptionLength>25</descriptionLength>
<codeType>String</codeType>
<codeAllowedLength>Variable</codeAllowedLength>
<defaultPresentation>AsDescription</defaultPresentation>
<editType>InDialog</editType>
<choiceMode>BothWays</choiceMode>
<defaultObjectForm>Catalog.ВерсииEDT.Form.ФормаЭлемента</defaultObjectForm>
<attributes uuid="c3f393a2-716f-44ac-bf44-03c61a824b79">
<name>ПутьКCLI</name>
<synonym>
<key>ru</key>
<value>Путь КCLI</value>
</synonym>
<type>
<types>String</types>
<stringQualifiers/>
</type>
<minValue xsi:type="core:UndefinedValue"/>
<maxValue xsi:type="core:UndefinedValue"/>
<fillValue xsi:type="core:UndefinedValue"/>
<fullTextSearch>Use</fullTextSearch>
<dataHistory>Use</dataHistory>
</attributes>
<forms uuid="479d688b-669a-4a1d-b078-490d33f6f004">
<name>ФормаЭлемента</name>
<synonym>
<key>ru</key>
<value>Форма элемента</value>
</synonym>
<usePurposes>PersonalComputer</usePurposes>
<usePurposes>MobileDevice</usePurposes>
</forms>
</mdclass:Catalog>
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,53 @@
<color>Style.SpecialTextColor</color>
</textColor>
</items>
<items xsi:type="form:FormField">
<name>ИспользуетсяCLI</name>
<id>217</id>
<visible>true</visible>
<enabled>true</enabled>
<userVisible>
<common>true</common>
</userVisible>
<dataPath xsi:type="form:DataPath">
<segments>Объект.ИспользуетсяCLI</segments>
</dataPath>
<handlers>
<event>OnChange</event>
<name>ИспользуетсяCLIПриИзменении</name>
</handlers>
<extendedTooltip>
<name>ИспользуетсяCLIРасширеннаяПодсказка</name>
<id>219</id>
<visible>true</visible>
<enabled>true</enabled>
<userVisible>
<common>true</common>
</userVisible>
<type>Label</type>
<autoMaxWidth>true</autoMaxWidth>
<autoMaxHeight>true</autoMaxHeight>
<extInfo xsi:type="form:LabelDecorationExtInfo">
<horizontalAlign>Left</horizontalAlign>
</extInfo>
</extendedTooltip>
<contextMenu>
<name>ИспользуетсяCLIКонтекстноеМеню</name>
<id>218</id>
<visible>true</visible>
<enabled>true</enabled>
<userVisible>
<common>true</common>
</userVisible>
<autoFill>true</autoFill>
</contextMenu>
<type>CheckBoxField</type>
<editMode>Enter</editMode>
<showInHeader>true</showInHeader>
<headerHorizontalAlign>Left</headerHorizontalAlign>
<showInFooter>true</showInFooter>
<extInfo xsi:type="form:CheckBoxFieldExtInfo"/>
</items>
<items xsi:type="form:FormField">
<name>ВерсияEDT</name>
<id>184</id>
Expand Down Expand Up @@ -522,6 +569,60 @@
</inputHint>
</extInfo>
</items>
<items xsi:type="form:FormField">
<name>ВерсияEDTCLI</name>
<id>220</id>
<visible>true</visible>
<enabled>true</enabled>
<userVisible>
<common>true</common>
</userVisible>
<dataPath xsi:type="form:DataPath">
<segments>Объект.ВерсияEDTCLI</segments>
</dataPath>
<extendedTooltip>
<name>ВерсияEDTCLIРасширеннаяПодсказка</name>
<id>222</id>
<visible>true</visible>
<enabled>true</enabled>
<userVisible>
<common>true</common>
</userVisible>
<type>Label</type>
<autoMaxWidth>true</autoMaxWidth>
<autoMaxHeight>true</autoMaxHeight>
<extInfo xsi:type="form:LabelDecorationExtInfo">
<horizontalAlign>Left</horizontalAlign>
</extInfo>
</extendedTooltip>
<contextMenu>
<name>ВерсияEDTCLIКонтекстноеМеню</name>
<id>221</id>
<visible>true</visible>
<enabled>true</enabled>
<userVisible>
<common>true</common>
</userVisible>
<autoFill>true</autoFill>
</contextMenu>
<type>InputField</type>
<editMode>Enter</editMode>
<showInHeader>true</showInHeader>
<headerHorizontalAlign>Left</headerHorizontalAlign>
<showInFooter>true</showInFooter>
<extInfo xsi:type="form:InputFieldExtInfo">
<autoMaxWidth>true</autoMaxWidth>
<autoMaxHeight>true</autoMaxHeight>
<wrap>true</wrap>
<chooseType>true</chooseType>
<typeDomainEnabled>true</typeDomainEnabled>
<textEdit>true</textEdit>
<inputHint>
<key>ru</key>
<value>Текущая</value>
</inputHint>
</extInfo>
</items>
<items xsi:type="form:Button">
<name>ПроверитьДоступнуюВерсиюEDT</name>
<id>168</id>
Expand Down
Loading

0 comments on commit 9ed67f1

Please sign in to comment.