Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Переход на EDT 2023.3 #1386

Merged
merged 43 commits into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
1ef5140
G5V8DT-24027. Сортировка объектов и прав в ролях
wolfandw Sep 9, 2023
be725e0
G5V8DT-24027. Versions up
wolfandw Sep 10, 2023
94986b1
Merge remote-tracking branch 'origin/master' into G5V8DT-24027
wolfandw Sep 20, 2023
64d3440
G5V8DT-24027. Dependence fix
wolfandw Sep 25, 2023
1fe8e9d
G5V8DT-24189 При добавлении обработчика события или команды автоматич…
Oct 13, 2023
2606bff
Fix target platform to 2023.3
MaksimDzyuba Oct 16, 2023
7b8123d
Merge pull request #1364 from 1C-Company/G5V8DT-24027
MaksimDzyuba Oct 16, 2023
a952272
G5V8DT-24189 При добавлении обработчика события или команды автоматич…
Oct 17, 2023
afb003f
G5V8DT-24189 При добавлении обработчика события или команды автоматич…
Oct 18, 2023
838747c
Merge branch 'edt-2023-3' into G5V8DT-24189
Oct 20, 2023
f7e6c01
G5V8DT-24189 При добавлении обработчика события или команды автоматич…
Oct 24, 2023
5405631
G5V8DT-24189 При добавлении обработчика события или команды автоматич…
Oct 24, 2023
2bc5a76
Поднятие версий dt.validation.marker
dsavenko Oct 25, 2023
6b49456
G5V8DT-24189_variant
MaksimDzyuba Oct 25, 2023
8e2519a
При добавлении обработчика события или команды автоматически размещат…
Oct 30, 2023
01f7c72
G5V8DT-24189 При добавлении обработчика события или команды автоматич…
Nov 1, 2023
57b5d2f
feature/1373: Versions up com._1c.g5.v8.dt.bsl.validation
vadimeg Nov 7, 2023
fab7ae0
feature/1373: Игнорирование падающего теста
vadimeg Nov 10, 2023
ace705f
feature/1373: Игнорирование падающих тестов
vadimeg Nov 10, 2023
733835b
Merge pull request #1374 from 1C-Company/feature/1373
vadimeg Nov 11, 2023
d2d3adb
Merge remote-tracking branch 'origin/edt-2023-3' into G5V8DT-24189
MaksimDzyuba Nov 13, 2023
86b2d38
G5V8DT-24189 При добавлении обработчика события или команды автоматич…
Nov 14, 2023
b441ad5
Merge pull request #1369 from 1C-Company/G5V8DT-24189
MaksimDzyuba Nov 14, 2023
4476f26
Merge branch 'edt-2023-3' into feature/1371-подняте-версий-dt.validat…
dsavenko Nov 22, 2023
b76fb97
1378: Исправление NPE в проверках
vadimeg Nov 15, 2023
edbf787
1378: Игнорирование теста
vadimeg Nov 28, 2023
2cdfa79
1378: Исправление замечаний
vadimeg Nov 29, 2023
5bc8319
Merge pull request #1379 from 1C-Company/feture/1378
tretyakevich Nov 29, 2023
16082cb
Merge pull request #1372 from dsavenko/feature/1371-подняте-версий-dt…
tretyakevich Dec 6, 2023
c9d070c
Обновление tycho до версии 2.7.0
AlmazNasibullin Dec 19, 2023
1d84d40
Исправление проблемы с equinox.ds
AlmazNasibullin Dec 20, 2023
c9b64dd
Merge branch 'master' into edt-2023-3
marmyshev Dec 21, 2023
de3f57d
Merge branch 'master' into edt-2023-3
marmyshev Dec 23, 2023
f2fedde
Обновлена история изменений
marmyshev Dec 23, 2023
ab51c43
Merge branch 'master' into edt-2023-3
marmyshev Dec 23, 2023
10e6900
G5V8DT-24674 Взводится признак наличия изменений при переходе к
MaksimDzyuba Jan 19, 2024
061a4a8
G5V8DT-24674 Взводится признак наличия изменений при переходе к
MaksimDzyuba Jan 19, 2024
a7f80d8
Merge pull request #1397 from 1C-Company/G5V8DT-24674
AlmazNasibullin Jan 22, 2024
ccec2bb
G5V8DT-24086 Ложные срабатывания проверки The asynchronous method is
MaksimDzyuba Feb 6, 2024
0fefbd2
G5V8DT-24086 Ложные срабатывания проверки The asynchronous method is
MaksimDzyuba Feb 7, 2024
a6bfff7
Merge pull request #1408 from 1C-Company/G5V8DT-24086
AlmazNasibullin Feb 15, 2024
98b4b5f
Merge branch 'master' into edt-2023-3
marmyshev Mar 4, 2024
e8408c6
Merge remote-tracking branch 'origin/master' into edt-2023-3
AlmazNasibullin Mar 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@ target/
*/reports
#Mac-specific directory that no other operating system needs.
.DS_Store
.m2/
.m2/

org.sonarlint.eclipse.core.prefs
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

## 0.7.0

Выпуск бета-версии для 1C:EDT 2023.3

### Новые проверки

Expand All @@ -20,6 +21,7 @@

- Проверка на уникальность имени поля в doc-comment-field-name #1392
- Проверка модификации ключей структуры вне функции-конструктора #1054
- По умолчанию проверка "Код не должен следовать за асинхронным вызовом" (code-after-async-call) выключена. См. обсуждение в https://github.com/1C-Company/v8-code-style/pull/1408


#### Запросы
Expand Down
4 changes: 4 additions & 0 deletions bundles/com.e1c.v8codestyle.bsl.ui/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,21 @@ Import-Package: com._1c.g5.ides.ui.texteditor.xtext.embedded;version="[6.0.0,7.0
com._1c.g5.v8.dt.bsl.documentation.comment;version="[4.0.0,5.0.0)",
com._1c.g5.v8.dt.bsl.formatting;version="[3.0.0,4.0.0)",
com._1c.g5.v8.dt.bsl.model;version="[5.0.0,6.0.0)",
com._1c.g5.v8.dt.bsl.model.util;version="[4.7.0,5.0.0)",
com._1c.g5.v8.dt.bsl.resource.owner;version="[2.0.0,3.0.0)",
com._1c.g5.v8.dt.bsl.services;version="[7.0.0,8.0.0)",
com._1c.g5.v8.dt.bsl.ui;version="[9.0.0,10.0.0)",
com._1c.g5.v8.dt.bsl.ui.contentassist;version="[8.0.0,9.0.0)",
com._1c.g5.v8.dt.bsl.ui.editor;version="[9.0.0,10.0.0)",
com._1c.g5.v8.dt.bsl.ui.event;version="[5.0.0,6.0.0)",
com._1c.g5.v8.dt.bsl.ui.menu;version="[6.0.0,7.0.0)",
com._1c.g5.v8.dt.bsl.ui.quickfix;version="[4.1.0,5.0.0)",
com._1c.g5.v8.dt.bsl.util;version="[8.0.0,9.0.0)",
com._1c.g5.v8.dt.common;version="[6.0.0,7.0.0)",
com._1c.g5.v8.dt.core.filesystem;version="[6.0.0,7.0.0)",
com._1c.g5.v8.dt.core.model;version="[6.0.0,7.0.0)",
com._1c.g5.v8.dt.core.platform;version="[11.0.0,12.0.0)",
com._1c.g5.v8.dt.form.model;version="[11.1.0,12.0.0)",
com._1c.g5.v8.dt.lcore.nodemodel.util;version="[1.0.0,2.0.0)",
com._1c.g5.v8.dt.lcore.ui.texteditor;version="[1.1.0,2.0.0)",
com._1c.g5.v8.dt.mcore;version="[7.0.0,8.0.0)",
Expand Down
6 changes: 6 additions & 0 deletions bundles/com.e1c.v8codestyle.bsl.ui/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -390,5 +390,11 @@
class="com.e1c.v8codestyle.internal.bsl.ui.ExecutableExtensionFactory:com.e1c.v8codestyle.bsl.ui.qfix.ServerExecutionSafeModeFix">
</fix>
</extension>
<extension
point="com._1c.g5.v8.dt.bsl.ui.bslModuleTextInsertInfoService">
<bslModuleTextInsertInfoService
class="com.e1c.v8codestyle.internal.bsl.ui.ExecutableExtensionFactory:com.e1c.v8codestyle.internal.bsl.ui.services.BslModuleRegionsInfoService">
</bslModuleTextInsertInfoService>
</extension>

</plugin>
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,6 @@ protected void configureFix(FixConfigurer configurer)
@Override
protected TextEdit fixIssue(XtextResource state, IXtextBslModuleFixModel model) throws BadLocationException
{
IXtextInteractiveBslModuleFixModel interactiveModel = (IXtextInteractiveBslModuleFixModel)model;

Integer offset = model.getIssue().getOffset() + 1;
Display display = PlatformUI.getWorkbench().getDisplay();
if (display.isDisposed())
{
Expand All @@ -101,13 +98,18 @@ protected TextEdit fixIssue(XtextResource state, IXtextBslModuleFixModel model)
}
});

IXtextInteractiveBslModuleFixModel interactiveModel = (IXtextInteractiveBslModuleFixModel)model;
Integer offset = model.getIssue().getOffset() + 1;
ITextViewer viewer = BslQuickFixUtil.getTextViewer(interactiveModel.getModificationContext());
if (viewer != null && !display.isDisposed())
{
display.asyncExec(() -> {
viewer.revealRange(offset, 1);
viewer.getTextWidget().setFocus();
viewer.setSelectedRange(offset, 1);
if (viewer.getDocument() != null)
{
viewer.revealRange(offset, 1);
viewer.getTextWidget().setFocus();
viewer.setSelectedRange(offset, 1);
}
});
}
return null;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
/*******************************************************************************
* Copyright (C) 2023, 1C-Soft LLC and others.
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* 1C-Soft LLC - initial API and implementation
*******************************************************************************/
package com.e1c.v8codestyle.internal.bsl.ui.services;

import java.util.HashMap;
import java.util.Map;

import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.IDocument;
import org.eclipse.xtext.nodemodel.INode;

import com.e1c.v8codestyle.internal.bsl.ui.UiPlugin;

/**
* Provides offset and suffixes information of module region
*
* @author Kuznetsov Nikita
*/
public final class BslModuleOffsets
{
private int startOffset;
private int endOffset;
private int insertOffset;

private Map<String, BslModuleOffsets> suffixes;

/**
* Create and calculate module region offsets
*
* @param document actual {@link IDocument} to get offsets from, can't be {@code null}
* @param node {@link INode} to get offsets from, can't be {@code null}
* @param nodeAfter {@link INode} to get offsets from, can't be {@code null}
* @return module region information with calculated region offsets or {@code null}
*/
public static BslModuleOffsets create(IDocument document, INode node, INode nodeAfter)
{
try
{
int startLine = node.getTotalStartLine() - 1;
int startOffset = document.getLineOffset((startLine <= 1) ? 0 : startLine);
int endOffset = nodeAfter.getTotalOffset();
int insertOffset = document.getLineOffset(document.getLineOfOffset(nodeAfter.getTotalOffset()));
return new BslModuleOffsets(startOffset, endOffset, insertOffset);
}
catch (BadLocationException ex)
{
UiPlugin.log(UiPlugin.createErrorStatus("Can't create module region information", ex)); //$NON-NLS-1$
}
return null;
}

/**
* Returns start offset of module region
*
* @return offset before region declaration
*/
public int getStartOffset()
{
return startOffset;
}

/**
* Returns end offset of module region
*
* @return offset after region declaration
*/
public int getEndOffset()
{
return endOffset;
}

/**
* Returns before end offset inside module region
*
* @return offset before end of region declaration
*/
public int getBeforeEndOffset()
{
return insertOffset;
}

/**
* Add suffix of the name of this module region
*
* @param suffix to add to suffixes map of this module region
* @param document to update offsets, can't be {@code null}
* @param node to update offsets, can't be {@code null}
* @param nodeAfter to update offsets, can't be {@code null}
*/
public void addSuffix(String suffix, IDocument document, INode node, INode nodeAfter)
{
if (suffixes == null)
{
suffixes = new HashMap<>();
}
BslModuleOffsets suffixRegionInformation = create(document, node, nodeAfter);
if (suffixRegionInformation != null)
{
suffixes.put(suffix, suffixRegionInformation);
int suffixStartOffset = suffixRegionInformation.getStartOffset();
int suffixEndOffset = suffixRegionInformation.getEndOffset();
int suffixInsertOffset = suffixRegionInformation.getBeforeEndOffset();
if (insertOffset < suffixInsertOffset)
{
insertOffset = suffixInsertOffset;
endOffset = suffixEndOffset;
}
if (startOffset > suffixStartOffset)
{
startOffset = suffixStartOffset;
}
}
}

/**
* Is module region has suffixes
*
* @return {@code true} if module region has suffixes, {@code false} otherwise
*/
public boolean hasSuffixes()
{
return suffixes != null;
}

/**
* Returns module region information by suffix if exists
*
* @param suffix {@link String} suffix of declared name module region
* @return {@link BslModuleOffsets} if suffix exists, {@code null} otherwise
*/
public BslModuleOffsets getInformationBySuffix(String suffix)
{
if (hasSuffixes())
{
return suffixes.get(suffix);
}
return null;
}

private BslModuleOffsets(int startOffset, int endOffset, int insertOffset)
{
this.startOffset = startOffset;
this.endOffset = endOffset;
this.insertOffset = insertOffset;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
/*******************************************************************************
* Copyright (C) 2023, 1C-Soft LLC and others.
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* 1C-Soft LLC - initial API and implementation
*******************************************************************************/
package com.e1c.v8codestyle.internal.bsl.ui.services;

import com._1c.g5.v8.dt.bsl.common.IBslModuleTextInsertInfo;
import com._1c.g5.v8.dt.bsl.model.Module;

/**
* Built-in language module region information with {@link String} region wrap data
*
* @author Kuznetsov Nikita
*/
public class BslModuleRegionsInfo
implements IBslModuleTextInsertInfo
{
private final int insertPosition;
private final Module module;
private final String regionName;

/**
* {@link BslModuleRegionsInfo} constructor
*
* @param insertPosition <code>int</code> insertion offset, cannot be negative
* @param module current {@link Module}, cannot be <code>null</code>
* @param regionName {@link String} region name, can be <code>null</code>
*/
public BslModuleRegionsInfo(int insertPosition, Module module, String regionName)
{
this.insertPosition = insertPosition;
this.module = module;
this.regionName = regionName;
}

@Override
public int getInsertPosition()
{
return insertPosition;
}

@Override
public Module getModule()
{
return module;
}

/**
* Returns region name
*
* @return {@link String} region name, can be <code>null</code>
*/
public String getRegionName()
{
return regionName;
}
}
Loading
Loading