1
0
mirror of https://github.com/1C-Company/v8-code-style.git synced 2025-04-22 07:48:01 +02:00

Merge branch 'edt-2024-1' of github.com:1C-Company/v8-code-style into G5V8DT-22401

This commit is contained in:
Alexander Tretyakevich 2024-04-10 20:38:43 +07:00
commit 571ce1d40b
22 changed files with 70 additions and 63 deletions

View File

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

View File

@ -47,7 +47,7 @@ Import-Package: com._1c.g5.ides.ui.texteditor.xtext.embedded;version="[6.0.0,7.0
com._1c.g5.wiring;version="[2.2.0,3.0.0)", com._1c.g5.wiring;version="[2.2.0,3.0.0)",
com._1c.g5.wiring.binder;version="[1.1.0,2.0.0)", com._1c.g5.wiring.binder;version="[1.1.0,2.0.0)",
com.e1c.g5.v8.dt.bsl.check.qfix;version="[3.0.0,4.0.0)", com.e1c.g5.v8.dt.bsl.check.qfix;version="[3.0.0,4.0.0)",
com.e1c.g5.v8.dt.check.qfix;version="[2.0.0,3.0.0)", com.e1c.g5.v8.dt.check.qfix;version="[3.0.0,4.0.0)",
com.e1c.g5.v8.dt.check.qfix.components;version="[1.0.0,2.0.0)", com.e1c.g5.v8.dt.check.qfix.components;version="[1.0.0,2.0.0)",
com.e1c.g5.v8.dt.check.settings;version="[3.0.0,4.0.0)", com.e1c.g5.v8.dt.check.settings;version="[3.0.0,4.0.0)",
com.e1c.v8codestyle.bsl;version="[0.7.0,0.8.0)", com.e1c.v8codestyle.bsl;version="[0.7.0,0.8.0)",

View File

@ -371,7 +371,7 @@
<extension <extension
point="com._1c.g5.v8.dt.bsl.ui.bslModuleTextInsertInfoService"> point="com._1c.g5.v8.dt.bsl.ui.bslModuleTextInsertInfoService">
<bslModuleTextInsertInfoService <bslModuleTextInsertInfoService
class="com.e1c.v8codestyle.internal.bsl.ui.services.BslModuleRegionsInfoService"> class="com.e1c.v8codestyle.internal.bsl.ui.ExecutableExtensionFactory:com.e1c.v8codestyle.internal.bsl.ui.services.BslModuleRegionsInfoService">
</bslModuleTextInsertInfoService> </bslModuleTextInsertInfoService>
</extension> </extension>

View File

@ -81,9 +81,6 @@ public class OpenBslDocCommentViewFix
@Override @Override
protected TextEdit fixIssue(XtextResource state, IXtextBslModuleFixModel model) throws BadLocationException protected TextEdit fixIssue(XtextResource state, IXtextBslModuleFixModel model) throws BadLocationException
{ {
IXtextInteractiveBslModuleFixModel interactiveModel = (IXtextInteractiveBslModuleFixModel)model;
Integer offset = model.getIssue().getOffset() + 1;
Display display = PlatformUI.getWorkbench().getDisplay(); Display display = PlatformUI.getWorkbench().getDisplay();
if (display.isDisposed()) if (display.isDisposed())
{ {
@ -101,13 +98,18 @@ public class OpenBslDocCommentViewFix
} }
}); });
IXtextInteractiveBslModuleFixModel interactiveModel = (IXtextInteractiveBslModuleFixModel)model;
Integer offset = model.getIssue().getOffset() + 1;
ITextViewer viewer = BslQuickFixUtil.getTextViewer(interactiveModel.getModificationContext()); ITextViewer viewer = BslQuickFixUtil.getTextViewer(interactiveModel.getModificationContext());
if (viewer != null && !display.isDisposed()) if (viewer != null && !display.isDisposed())
{ {
display.asyncExec(() -> { display.asyncExec(() -> {
if (viewer.getDocument() != null)
{
viewer.revealRange(offset, 1); viewer.revealRange(offset, 1);
viewer.getTextWidget().setFocus(); viewer.getTextWidget().setFocus();
viewer.setSelectedRange(offset, 1); viewer.setSelectedRange(offset, 1);
}
}); });
} }
return null; return null;

View File

@ -41,7 +41,9 @@ import com._1c.g5.v8.dt.core.platform.IV8ProjectManager;
import com._1c.g5.v8.dt.form.model.FormPackage; import com._1c.g5.v8.dt.form.model.FormPackage;
import com._1c.g5.v8.dt.mcore.NamedElement; import com._1c.g5.v8.dt.mcore.NamedElement;
import com._1c.g5.v8.dt.metadata.mdclass.ScriptVariant; import com._1c.g5.v8.dt.metadata.mdclass.ScriptVariant;
import com.e1c.v8codestyle.bsl.IModuleStructureProvider;
import com.e1c.v8codestyle.bsl.ModuleStructureSection; import com.e1c.v8codestyle.bsl.ModuleStructureSection;
import com.google.inject.Inject;
/** /**
* Module regions related implementation of {@link IBslModuleTextInsertInfoService} * Module regions related implementation of {@link IBslModuleTextInsertInfoService}
@ -51,6 +53,9 @@ import com.e1c.v8codestyle.bsl.ModuleStructureSection;
public class BslModuleRegionsInfoService public class BslModuleRegionsInfoService
implements IBslModuleTextInsertInfoService implements IBslModuleTextInsertInfoService
{ {
@Inject
private IModuleStructureProvider moduleStructureProvider;
@Override @Override
public IBslModuleTextInsertInfo getEventHandlerTextInsertInfo(IXtextDocument document, Module module, public IBslModuleTextInsertInfo getEventHandlerTextInsertInfo(IXtextDocument document, Module module,
int defaultPosition, IBslModuleEventData data) int defaultPosition, IBslModuleEventData data)
@ -77,7 +82,8 @@ public class BslModuleRegionsInfoService
getRegionOffsets(document, regionPreprocessors, declaredRegionName, scriptVariant); getRegionOffsets(document, regionPreprocessors, declaredRegionName, scriptVariant);
int offset = getRegionOffset(regionOffsets, declaredRegionName, suffix, defaultPosition, scriptVariant); int offset = getRegionOffset(regionOffsets, declaredRegionName, suffix, defaultPosition, scriptVariant);
String regionName = null; String regionName = null;
if (!isRegionExists(regionOffsets, declaredRegionName, suffix)) if (!isRegionExists(regionOffsets, declaredRegionName, suffix) && project.getProject() != null
&& moduleStructureProvider.canCreateStructure(project.getProject()))
{ {
regionName = suffix.isEmpty() ? declaredRegionName : (declaredRegionName + suffix); regionName = suffix.isEmpty() ? declaredRegionName : (declaredRegionName + suffix);
} }
@ -285,13 +291,17 @@ public class BslModuleRegionsInfoService
{ {
if (itemType.equals(EventItemType.TABLE)) if (itemType.equals(EventItemType.TABLE))
{ {
EObject container; EObject container = eventOwner;
while ((container = eventOwner.eContainer()) != null) while (container != null)
{ {
if (container.eClass() == FormPackage.Literals.TABLE) if (container.eClass() == FormPackage.Literals.TABLE)
{ {
return ((NamedElement)container).getName(); return ((NamedElement)container).getName();
} }
else
{
container = container.eContainer();
}
} }
} }
return StringUtils.EMPTY; return StringUtils.EMPTY;

View File

@ -51,7 +51,7 @@ Import-Package: com._1c.g5.v8.bm.core;version="[8.0.0,9.0.0)",
com.e1c.g5.v8.dt.bsl.check.qfix;version="[3.0.0,4.0.0)", com.e1c.g5.v8.dt.bsl.check.qfix;version="[3.0.0,4.0.0)",
com.e1c.g5.v8.dt.check;version="[2.0.0,3.0.0)", com.e1c.g5.v8.dt.check;version="[2.0.0,3.0.0)",
com.e1c.g5.v8.dt.check.components;version="[2.0.0,3.0.0)", com.e1c.g5.v8.dt.check.components;version="[2.0.0,3.0.0)",
com.e1c.g5.v8.dt.check.qfix;version="[2.0.0,3.0.0)", com.e1c.g5.v8.dt.check.qfix;version="[3.0.0,4.0.0)",
com.e1c.g5.v8.dt.check.qfix.components;version="[1.0.0,2.0.0)", com.e1c.g5.v8.dt.check.qfix.components;version="[1.0.0,2.0.0)",
com.e1c.g5.v8.dt.check.settings;version="[3.0.0,4.0.0)", com.e1c.g5.v8.dt.check.settings;version="[3.0.0,4.0.0)",
com.e1c.v8codestyle;version="[0.7.0,0.8.0)", com.e1c.v8codestyle;version="[0.7.0,0.8.0)",

View File

@ -52,8 +52,6 @@ import com.e1c.g5.v8.dt.check.components.BasicCheck;
import com.e1c.g5.v8.dt.check.settings.IssueSeverity; import com.e1c.g5.v8.dt.check.settings.IssueSeverity;
import com.e1c.g5.v8.dt.check.settings.IssueType; import com.e1c.g5.v8.dt.check.settings.IssueType;
import com.e1c.v8codestyle.bsl.IAsyncInvocationProvider; import com.e1c.v8codestyle.bsl.IAsyncInvocationProvider;
import com.e1c.v8codestyle.check.CommonSenseCheckExtension;
import com.e1c.v8codestyle.internal.bsl.BslPlugin;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.google.inject.Inject; import com.google.inject.Inject;
@ -101,7 +99,7 @@ public final class CodeAfterAsyncCallCheck
.complexity(CheckComplexity.NORMAL) .complexity(CheckComplexity.NORMAL)
.severity(IssueSeverity.MAJOR) .severity(IssueSeverity.MAJOR)
.issueType(IssueType.WARNING) .issueType(IssueType.WARNING)
.extension(new CommonSenseCheckExtension(getCheckId(), BslPlugin.PLUGIN_ID)) .disable()
.module() .module()
.checkedObjectType(INVOCATION) .checkedObjectType(INVOCATION)
.parameter(PARAMETER_NAME, Boolean.class, DEFAULT_CHECK, Messages.CodeAfterAsyncCallCheck_Parameter); .parameter(PARAMETER_NAME, Boolean.class, DEFAULT_CHECK, Messages.CodeAfterAsyncCallCheck_Parameter);

View File

@ -86,7 +86,7 @@ public class ExportProcedureMissingCommentCheck
private static boolean verifyTopRegion(Optional<RegionPreprocessor> regionTop) private static boolean verifyTopRegion(Optional<RegionPreprocessor> regionTop)
{ {
if (regionTop.isEmpty()) if (regionTop.isEmpty() || regionTop.get().getName() == null)
{ {
return false; return false;
} }

View File

@ -275,6 +275,10 @@ public class ModuleStructureTopRegionCheck
for (RegionPreprocessor region : allRegions) for (RegionPreprocessor region : allRegions)
{ {
String regionName = region.getName(); String regionName = region.getName();
if (StringUtils.isBlank(regionName))
{
continue;
}
countRegions.putIfAbsent(regionName, new ArrayList<>()); countRegions.putIfAbsent(regionName, new ArrayList<>());
countRegions.get(regionName).add(region); countRegions.get(regionName).add(region);
if (getFirstParentRegion(region).isEmpty()) if (getFirstParentRegion(region).isEmpty())
@ -288,7 +292,7 @@ public class ModuleStructureTopRegionCheck
{ {
for (String name : regionNames) for (String name : regionNames)
{ {
if (regionName.equalsIgnoreCase(name)) if (regionName == null || regionName.equalsIgnoreCase(name))
{ {
return true; return true;
} }

View File

@ -206,10 +206,13 @@ public class TypedValueAddingToUntypedCollectionCheck
actualTypes.addAll(collectionTypes); actualTypes.addAll(collectionTypes);
} }
else else
{
if (((Type)type).getCollectionElementTypes() != null)
{ {
actualTypes.addAll(((Type)type).getCollectionElementTypes().allTypes()); actualTypes.addAll(((Type)type).getCollectionElementTypes().allTypes());
} }
} }
}
return actualTypes; return actualTypes;
} }

View File

@ -40,7 +40,7 @@ Import-Package: com._1c.g5.v8.bm.core;version="[8.0.0,9.0.0)",
com.e1c.g5.v8.dt.check.components;version="[2.0.0,3.0.0)", com.e1c.g5.v8.dt.check.components;version="[2.0.0,3.0.0)",
com.e1c.g5.v8.dt.check.context;version="[2.0.0,3.0.0)", com.e1c.g5.v8.dt.check.context;version="[2.0.0,3.0.0)",
com.e1c.g5.v8.dt.check.ext;version="[1.0.0,2.0.0)", com.e1c.g5.v8.dt.check.ext;version="[1.0.0,2.0.0)",
com.e1c.g5.v8.dt.check.qfix;version="[2.0.0,3.0.0)", com.e1c.g5.v8.dt.check.qfix;version="[3.0.0,4.0.0)",
com.e1c.g5.v8.dt.check.qfix.components;version="[1.0.0,2.0.0)", com.e1c.g5.v8.dt.check.qfix.components;version="[1.0.0,2.0.0)",
com.e1c.g5.v8.dt.check.settings;version="[3.0.0,4.0.0)", com.e1c.g5.v8.dt.check.settings;version="[3.0.0,4.0.0)",
com.e1c.v8codestyle.check;version="[0.7.0,0.8.0)", com.e1c.v8codestyle.check;version="[0.7.0,0.8.0)",

View File

@ -40,6 +40,7 @@ import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.EcoreUtil2; import org.eclipse.xtext.EcoreUtil2;
import org.eclipse.xtext.naming.QualifiedName;
import org.eclipse.xtext.resource.IEObjectDescription; import org.eclipse.xtext.resource.IEObjectDescription;
import com._1c.g5.v8.bm.core.BmUriUtil; import com._1c.g5.v8.bm.core.BmUriUtil;
@ -319,17 +320,27 @@ public abstract class RoleRightSetCheck
private String getMdObjectName(MdObject mdObject, IV8Project project) private String getMdObjectName(MdObject mdObject, IV8Project project)
{ {
if (mdObject == null) if (mdObject == null || project == null)
{ {
return "Unknown"; //$NON-NLS-1$ return "Unknown"; //$NON-NLS-1$
} }
if (project != null && project.getScriptVariant() == ScriptVariant.RUSSIAN) if (project.getScriptVariant() == ScriptVariant.RUSSIAN)
{ {
return MdUtil.getFullyQualifiedNameRu(mdObject).toString(); QualifiedName fqn = MdUtil.getFullyQualifiedNameRu(mdObject);
if (fqn != null)
{
return fqn.toString();
}
} }
return MdUtil.getFullyQualifiedName(mdObject).toString(); QualifiedName fqn = MdUtil.getFullyQualifiedName(mdObject);
if (fqn != null)
{
return fqn.toString();
}
return "Unknown"; //$NON-NLS-1$
} }
private Collection<MdObject> getDefaultObjectsWithRight(RoleDescription description, IProgressMonitor monitor) private Collection<MdObject> getDefaultObjectsWithRight(RoleDescription description, IProgressMonitor monitor)

View File

@ -13,7 +13,7 @@
<!-- EDT --> <!-- EDT -->
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="slicer" includeSource="true" type="InstallableUnit"> <location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="slicer" includeSource="true" type="InstallableUnit">
<repository id="dt_repository" location="https://edt.1c.ru/downloads/releases/ruby/2023.3/"/> <repository id="dt_repository" location="https://edt.1c.ru/downloads/releases/ruby/2024.1/"/>
<unit id="com._1c.g5.aef.feature.feature.group" version="0.0.0"/> <unit id="com._1c.g5.aef.feature.feature.group" version="0.0.0"/>
<unit id="com._1c.g5.commons.feature.group" version="0.0.0"/> <unit id="com._1c.g5.commons.feature.group" version="0.0.0"/>
<unit id="com._1c.g5.edt.license.feature.group" version="0.0.0"/> <unit id="com._1c.g5.edt.license.feature.group" version="0.0.0"/>

View File

@ -13,8 +13,6 @@ Import-Package: com._1c.g5.v8.dt.core.naming;version="[7.0.0,8.0.0)",
com._1c.g5.v8.dt.form.model;version="[11.0.0,12.0.0)", com._1c.g5.v8.dt.form.model;version="[11.0.0,12.0.0)",
com._1c.g5.v8.dt.md.naming;version="[5.1.0,6.0.0)", com._1c.g5.v8.dt.md.naming;version="[5.1.0,6.0.0)",
com._1c.g5.v8.dt.testing;version="[3.1.0,4.0.0)", com._1c.g5.v8.dt.testing;version="[3.1.0,4.0.0)",
com._1c.g5.v8.dt.ui.util;version="[7.0.0,8.0.0)", com._1c.g5.v8.dt.validation.marker;version="[9.0.0,10.0.0)",
com._1c.g5.v8.dt.ui.validation;version="[5.0.0,6.0.0)",
com._1c.g5.v8.dt.validation.marker;version="[8.0.0,9.0.0)",
com.e1c.g5.v8.dt.testing.check;version="[1.0.0,2.0.0)", com.e1c.g5.v8.dt.testing.check;version="[1.0.0,2.0.0)",
org.junit;version="[4.13.0,5.0.0)" org.junit;version="[4.13.0,5.0.0)"

View File

@ -18,6 +18,7 @@ import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import org.eclipse.core.runtime.Path; import org.eclipse.core.runtime.Path;
import org.junit.Ignore;
import org.junit.Test; import org.junit.Test;
import com._1c.g5.v8.dt.validation.marker.IExtraInfoKeys; import com._1c.g5.v8.dt.validation.marker.IExtraInfoKeys;
@ -68,6 +69,7 @@ public class RedundantExportMethodCheckTest
} }
@Test @Test
@Ignore
public void testCallNoPublic() throws Exception public void testCallNoPublic() throws Exception
{ {
List<Marker> markers = getMarkers(MODULE_CALL_NO_PUBLIC_FILE_NAME); List<Marker> markers = getMarkers(MODULE_CALL_NO_PUBLIC_FILE_NAME);

View File

@ -72,10 +72,10 @@ public class SelfReferenceCheckTest
List<Marker> markers = getMarkers(COMMON_MODULE_FILE_NAME); List<Marker> markers = getMarkers(COMMON_MODULE_FILE_NAME);
assertEquals(4, markers.size()); assertEquals(4, markers.size());
assertEquals("6", markers.get(0).getExtraInfo().get(IExtraInfoKeys.TEXT_EXTRA_INFO_LINE_KEY)); assertEquals("6", markers.get(2).getExtraInfo().get(IExtraInfoKeys.TEXT_EXTRA_INFO_LINE_KEY));
assertEquals("6", markers.get(1).getExtraInfo().get(IExtraInfoKeys.TEXT_EXTRA_INFO_LINE_KEY)); assertEquals("6", markers.get(3).getExtraInfo().get(IExtraInfoKeys.TEXT_EXTRA_INFO_LINE_KEY));
assertEquals("10", markers.get(2).getExtraInfo().get(IExtraInfoKeys.TEXT_EXTRA_INFO_LINE_KEY)); assertEquals("10", markers.get(0).getExtraInfo().get(IExtraInfoKeys.TEXT_EXTRA_INFO_LINE_KEY));
assertEquals("10", markers.get(3).getExtraInfo().get(IExtraInfoKeys.TEXT_EXTRA_INFO_LINE_KEY)); assertEquals("10", markers.get(1).getExtraInfo().get(IExtraInfoKeys.TEXT_EXTRA_INFO_LINE_KEY));
} }
/** /**
@ -150,6 +150,9 @@ public class SelfReferenceCheckTest
assertNotNull(chekcId); assertNotNull(chekcId);
return markers.stream() return markers.stream()
.filter(marker -> chekcId.equals(getCheckIdFromMarker(marker, getProject()))) .filter(marker -> chekcId.equals(getCheckIdFromMarker(marker, getProject())))
.sorted((marker1, marker2) -> marker1.getExtraInfo()
.get(IExtraInfoKeys.TEXT_EXTRA_INFO_LINE_KEY)
.compareTo(marker2.getExtraInfo().get(IExtraInfoKeys.TEXT_EXTRA_INFO_LINE_KEY)))
.collect(Collectors.toList()); .collect(Collectors.toList());
} }

View File

@ -16,14 +16,8 @@ import org.junit.Ignore;
import org.junit.Test; import org.junit.Test;
import com._1c.g5.v8.bm.core.IBmObject; import com._1c.g5.v8.bm.core.IBmObject;
import com._1c.g5.v8.dt.core.naming.ISymbolicLinkLocalizer;
import com._1c.g5.v8.dt.core.platform.IDtProject; import com._1c.g5.v8.dt.core.platform.IDtProject;
import com._1c.g5.v8.dt.core.platform.IV8ProjectManager;
import com._1c.g5.v8.dt.md.naming.MdSymbolicLinkLocalizer;
import com._1c.g5.v8.dt.metadata.mdclass.CommonModule; import com._1c.g5.v8.dt.metadata.mdclass.CommonModule;
import com._1c.g5.v8.dt.ui.util.OpenHelper;
import com._1c.g5.v8.dt.ui.validation.BmMarkerWrapper;
import com._1c.g5.v8.dt.validation.marker.IMarkerWrapper;
import com._1c.g5.v8.dt.validation.marker.Marker; import com._1c.g5.v8.dt.validation.marker.Marker;
import com._1c.g5.wiring.ServiceAccess; import com._1c.g5.wiring.ServiceAccess;
import com.e1c.g5.v8.dt.check.qfix.FixProcessHandle; import com.e1c.g5.v8.dt.check.qfix.FixProcessHandle;
@ -47,9 +41,6 @@ public class ConsecutiveEmptyLinesFixTest
private static final String DESCRIPTION = "Clear extra empty lines"; private static final String DESCRIPTION = "Clear extra empty lines";
private static final String COMMON_MODULE_FILE_NAME = "/src/CommonModules/CommonModule/Module.bsl"; private static final String COMMON_MODULE_FILE_NAME = "/src/CommonModules/CommonModule/Module.bsl";
private IFixManager fixManager = ServiceAccess.get(IFixManager.class); private IFixManager fixManager = ServiceAccess.get(IFixManager.class);
private IV8ProjectManager projectManager = ServiceAccess.get(IV8ProjectManager.class);
private ISymbolicLinkLocalizer symbolicLinkLocalizer = new MdSymbolicLinkLocalizer();
private final OpenHelper openHelper = new OpenHelper();
//after fixing the problem in EDT - delete it //after fixing the problem in EDT - delete it
@Ignore @Ignore
@ -96,10 +87,7 @@ public class ConsecutiveEmptyLinesFixTest
*/ */
private void applyFix(Marker marker, IDtProject dtProject) private void applyFix(Marker marker, IDtProject dtProject)
{ {
IMarkerWrapper markerWrapper = new BmMarkerWrapper(marker, dtProject.getWorkspaceProject(), bmModelManager, FixProcessHandle handle = fixManager.prepareFix(marker, dtProject);
projectManager, symbolicLinkLocalizer, openHelper);
FixProcessHandle handle = fixManager.prepareFix(markerWrapper, dtProject);
FixVariantDescriptor variantDescr = null; FixVariantDescriptor variantDescr = null;

View File

@ -16,9 +16,7 @@ Import-Package: com._1c.g5.v8.bm.integration;version="[11.0.0,12.0.0)",
com._1c.g5.v8.dt.mcore;version="[7.0.0,8.0.0)", com._1c.g5.v8.dt.mcore;version="[7.0.0,8.0.0)",
com._1c.g5.v8.dt.metadata.mdclass;version="[9.0.0,10.0.0)", com._1c.g5.v8.dt.metadata.mdclass;version="[9.0.0,10.0.0)",
com._1c.g5.v8.dt.testing;version="[3.1.0,4.0.0)", com._1c.g5.v8.dt.testing;version="[3.1.0,4.0.0)",
com._1c.g5.v8.dt.ui.util;version="[7.0.0,8.0.0)", com._1c.g5.v8.dt.validation.marker;version="[9.0.0,10.0.0)",
com._1c.g5.v8.dt.ui.validation;version="[5.0.0,6.0.0)",
com._1c.g5.v8.dt.validation.marker;version="[8.0.0,9.0.0)",
com.e1c.g5.v8.dt.testing.check;version="[1.0.0,2.0.0)", com.e1c.g5.v8.dt.testing.check;version="[1.0.0,2.0.0)",
org.junit;version="[4.13.0,5.0.0)" org.junit;version="[4.13.0,5.0.0)"
Require-Bundle: org.eclipse.core.resources;bundle-version="[3.13.0,4.0.0)" Require-Bundle: org.eclipse.core.resources;bundle-version="[3.13.0,4.0.0)"

View File

@ -16,13 +16,7 @@ import java.util.Collection;
import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.core.runtime.NullProgressMonitor;
import com._1c.g5.v8.dt.core.naming.ISymbolicLinkLocalizer;
import com._1c.g5.v8.dt.core.platform.IDtProject; import com._1c.g5.v8.dt.core.platform.IDtProject;
import com._1c.g5.v8.dt.core.platform.IV8ProjectManager;
import com._1c.g5.v8.dt.form.naming.FormSymbolicLinkLocalizer;
import com._1c.g5.v8.dt.ui.util.OpenHelper;
import com._1c.g5.v8.dt.ui.validation.BmMarkerWrapper;
import com._1c.g5.v8.dt.validation.marker.IMarkerWrapper;
import com._1c.g5.v8.dt.validation.marker.Marker; import com._1c.g5.v8.dt.validation.marker.Marker;
import com._1c.g5.wiring.ServiceAccess; import com._1c.g5.wiring.ServiceAccess;
import com.e1c.g5.v8.dt.check.qfix.FixProcessHandle; import com.e1c.g5.v8.dt.check.qfix.FixProcessHandle;
@ -41,9 +35,6 @@ public abstract class FormFixTestBase
private final String fixDescriptionPattern; private final String fixDescriptionPattern;
private IFixManager fixManager = ServiceAccess.get(IFixManager.class); private IFixManager fixManager = ServiceAccess.get(IFixManager.class);
private IV8ProjectManager projectManager = ServiceAccess.get(IV8ProjectManager.class);
private ISymbolicLinkLocalizer symbolicLinkLocalizer = new FormSymbolicLinkLocalizer();
private final OpenHelper openHelper = new OpenHelper();
/** /**
* Instantiates a new form fix test base. * Instantiates a new form fix test base.
@ -64,10 +55,7 @@ public abstract class FormFixTestBase
*/ */
protected void applyFix(Marker marker, IDtProject dtProject) protected void applyFix(Marker marker, IDtProject dtProject)
{ {
IMarkerWrapper markerWrapper = new BmMarkerWrapper(marker, dtProject.getWorkspaceProject(), bmModelManager, FixProcessHandle handle = fixManager.prepareFix(marker, dtProject);
projectManager, symbolicLinkLocalizer, openHelper);
FixProcessHandle handle = fixManager.prepareFix(markerWrapper, dtProject);
FixVariantDescriptor variantDescr = null; FixVariantDescriptor variantDescr = null;

View File

@ -11,7 +11,7 @@ Bundle-Localization: fragment
Import-Package: com._1c.g5.v8.bm.integration;version="[11.0.0,12.0.0)", Import-Package: com._1c.g5.v8.bm.integration;version="[11.0.0,12.0.0)",
com._1c.g5.v8.dt.core.platform;version="[11.0.0,12.0.0)", com._1c.g5.v8.dt.core.platform;version="[11.0.0,12.0.0)",
com._1c.g5.v8.dt.testing;version="[3.1.0,4.0.0)", com._1c.g5.v8.dt.testing;version="[3.1.0,4.0.0)",
com._1c.g5.v8.dt.validation.marker;version="[8.0.0,9.0.0)", com._1c.g5.v8.dt.validation.marker;version="[9.0.0,10.0.0)",
com.e1c.g5.v8.dt.testing.check;version="[1.0.0,2.0.0)", com.e1c.g5.v8.dt.testing.check;version="[1.0.0,2.0.0)",
org.junit;version="[4.13.0,5.0.0)" org.junit;version="[4.13.0,5.0.0)"
Require-Bundle: org.eclipse.core.resources;bundle-version="[3.13.0,4.0.0)" Require-Bundle: org.eclipse.core.resources;bundle-version="[3.13.0,4.0.0)"

View File

@ -14,7 +14,7 @@ Import-Package: com._1c.g5.v8.bm.integration;version="[11.0.0,12.0.0)",
com._1c.g5.v8.dt.form.model;version="[11.0.0,12.0.0)", com._1c.g5.v8.dt.form.model;version="[11.0.0,12.0.0)",
com._1c.g5.v8.dt.mcore;version="[7.0.0,8.0.0)", com._1c.g5.v8.dt.mcore;version="[7.0.0,8.0.0)",
com._1c.g5.v8.dt.testing;version="[3.0.0,4.0.0)", com._1c.g5.v8.dt.testing;version="[3.0.0,4.0.0)",
com._1c.g5.v8.dt.validation.marker;version="[8.0.0,9.0.0)", com._1c.g5.v8.dt.validation.marker;version="[9.0.0,10.0.0)",
com.e1c.g5.v8.dt.testing.check;version="[1.0.0,2.0.0)", com.e1c.g5.v8.dt.testing.check;version="[1.0.0,2.0.0)",
org.junit;version="[4.13.0,5.0.0)" org.junit;version="[4.13.0,5.0.0)"
Require-Bundle: org.eclipse.core.resources;bundle-version="[3.13.900,4.0.0)", Require-Bundle: org.eclipse.core.resources;bundle-version="[3.13.900,4.0.0)",

View File

@ -14,6 +14,6 @@ Import-Package: com._1c.g5.v8.dt.core.platform;version="[11.0.0,12.0.0)",
com._1c.g5.v8.dt.platform.version;version="[2.13.0,3.0.0)", com._1c.g5.v8.dt.platform.version;version="[2.13.0,3.0.0)",
com._1c.g5.v8.dt.refactoring.core;version="[4.0.0,5.0.0)", com._1c.g5.v8.dt.refactoring.core;version="[4.0.0,5.0.0)",
com._1c.g5.v8.dt.testing;version="[3.1.0,4.0.0)", com._1c.g5.v8.dt.testing;version="[3.1.0,4.0.0)",
com._1c.g5.v8.dt.validation.marker;version="[8.0.0,9.0.0)", com._1c.g5.v8.dt.validation.marker;version="[9.0.0,10.0.0)",
com.e1c.g5.v8.dt.testing.check;version="[1.0.0,2.0.0)", com.e1c.g5.v8.dt.testing.check;version="[1.0.0,2.0.0)",
org.junit;version="[4.13.0,5.0.0)" org.junit;version="[4.13.0,5.0.0)"