diff --git a/bundles/com.e1c.v8codestyle.autosort.ui/META-INF/MANIFEST.MF b/bundles/com.e1c.v8codestyle.autosort.ui/META-INF/MANIFEST.MF index fb2af3d9..0d9ffb19 100644 --- a/bundles/com.e1c.v8codestyle.autosort.ui/META-INF/MANIFEST.MF +++ b/bundles/com.e1c.v8codestyle.autosort.ui/META-INF/MANIFEST.MF @@ -20,7 +20,7 @@ Import-Package: com._1c.g5.v8.dt.common;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.lifecycle;version="[3.0.0,4.0.0)", com._1c.g5.v8.dt.md.sort;version="[1.0.0,2.0.0)", - com._1c.g5.v8.dt.metadata.mdclass;version="[10.0.0,11.0.0)", + com._1c.g5.v8.dt.metadata.mdclass;version="[11.0.0,12.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.e1c.v8codestyle.autosort;version="[0.7.0,0.8.0)", diff --git a/bundles/com.e1c.v8codestyle.autosort/META-INF/MANIFEST.MF b/bundles/com.e1c.v8codestyle.autosort/META-INF/MANIFEST.MF index 6fb8ee9b..7a9a2f6d 100644 --- a/bundles/com.e1c.v8codestyle.autosort/META-INF/MANIFEST.MF +++ b/bundles/com.e1c.v8codestyle.autosort/META-INF/MANIFEST.MF @@ -23,11 +23,11 @@ Import-Package: com._1c.g5.v8.activitytracking.core;version="[1.0.0,2.0.0)", com._1c.g5.v8.bm.integration.event;version="[2.0.0,3.0.0)", com._1c.g5.v8.dt.core.lifecycle;version="[9.0.0,10.0.0)", com._1c.g5.v8.dt.core.model;version="[6.0.0,7.0.0)", - com._1c.g5.v8.dt.core.operations;version="[4.0.0,5.0.0)", + com._1c.g5.v8.dt.core.operations;version="[5.0.0,6.0.0)", com._1c.g5.v8.dt.core.platform;version="[11.0.0,12.0.0)", com._1c.g5.v8.dt.lifecycle;version="[3.0.0,4.0.0)", com._1c.g5.v8.dt.md.sort;version="[1.0.0,2.0.0)", - com._1c.g5.v8.dt.metadata.mdclass;version="[10.0.0,11.0.0)", + com._1c.g5.v8.dt.metadata.mdclass;version="[11.0.0,12.0.0)", com.e1c.g5.v8.dt.cli.api;version="[3.0.0,4.0.0)", com.e1c.g5.v8.dt.cli.api.components;version="[3.0.0,4.0.0)", com.e1c.v8codestyle;version="[0.7.0,0.8.0)", diff --git a/bundles/com.e1c.v8codestyle.bsl.ui/META-INF/MANIFEST.MF b/bundles/com.e1c.v8codestyle.bsl.ui/META-INF/MANIFEST.MF index f9a14fa4..1cc6f6cc 100644 --- a/bundles/com.e1c.v8codestyle.bsl.ui/META-INF/MANIFEST.MF +++ b/bundles/com.e1c.v8codestyle.bsl.ui/META-INF/MANIFEST.MF @@ -42,14 +42,14 @@ Import-Package: com._1c.g5.ides.ui.texteditor.xtext.embedded;version="[6.0.0,7.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)", - com._1c.g5.v8.dt.metadata.mdclass;version="[10.0.0,11.0.0)", + com._1c.g5.v8.dt.metadata.mdclass;version="[11.0.0,12.0.0)", com._1c.g5.v8.dt.theming.ui.util;version="[2.0.0,3.0.0)", - com._1c.g5.v8.dt.ui.util;version="[8.0.0,9.0.0)", - com._1c.g5.v8.dt.ui.wizards;version="[8.0.0,9.0.0)", + com._1c.g5.v8.dt.ui.util;version="[9.0.0,10.0.0)", + com._1c.g5.v8.dt.ui.wizards;version="[9.0.0,10.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.e1c.g5.v8.dt.bsl.check.qfix;version="[3.0.0,4.0.0)", - com.e1c.g5.v8.dt.check.qfix;version="[3.0.0,4.0.0)", + com.e1c.g5.v8.dt.check.qfix;version="[4.0.0,5.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="[4.0.0,5.0.0)", com.e1c.v8codestyle.bsl;version="[0.7.0,0.8.0)", diff --git a/bundles/com.e1c.v8codestyle.bsl.ui/icons/obj16/atsign.png b/bundles/com.e1c.v8codestyle.bsl.ui/icons/obj16/atsign.png new file mode 100644 index 00000000..7154f551 Binary files /dev/null and b/bundles/com.e1c.v8codestyle.bsl.ui/icons/obj16/atsign.png differ diff --git a/bundles/com.e1c.v8codestyle.bsl.ui/icons/obj16/atsign@2x.png b/bundles/com.e1c.v8codestyle.bsl.ui/icons/obj16/atsign@2x.png new file mode 100644 index 00000000..96334637 Binary files /dev/null and b/bundles/com.e1c.v8codestyle.bsl.ui/icons/obj16/atsign@2x.png differ diff --git a/bundles/com.e1c.v8codestyle.bsl.ui/icons/obj16/atsign_dark.png b/bundles/com.e1c.v8codestyle.bsl.ui/icons/obj16/atsign_dark.png new file mode 100644 index 00000000..efb6ca43 Binary files /dev/null and b/bundles/com.e1c.v8codestyle.bsl.ui/icons/obj16/atsign_dark.png differ diff --git a/bundles/com.e1c.v8codestyle.bsl.ui/icons/obj16/atsign_dark@2x.png b/bundles/com.e1c.v8codestyle.bsl.ui/icons/obj16/atsign_dark@2x.png new file mode 100644 index 00000000..21e0350b Binary files /dev/null and b/bundles/com.e1c.v8codestyle.bsl.ui/icons/obj16/atsign_dark@2x.png differ diff --git a/bundles/com.e1c.v8codestyle.bsl.ui/src/com/e1c/v8codestyle/internal/bsl/ui/SharedImages.java b/bundles/com.e1c.v8codestyle.bsl.ui/src/com/e1c/v8codestyle/internal/bsl/ui/SharedImages.java index 2c749a57..8840aad2 100644 --- a/bundles/com.e1c.v8codestyle.bsl.ui/src/com/e1c/v8codestyle/internal/bsl/ui/SharedImages.java +++ b/bundles/com.e1c.v8codestyle.bsl.ui/src/com/e1c/v8codestyle/internal/bsl/ui/SharedImages.java @@ -33,6 +33,7 @@ public final class SharedImages public static final String IMG_OBJ16_TYPE_SECTION = UiPlugin.PLUGIN_ID + T_OBJ16 + "type_section.png"; //$NON-NLS-1$ public static final String IMG_OBJ16_PARAMETERS_SECTION = UiPlugin.PLUGIN_ID + T_OBJ16 + "parameters_section.png"; //$NON-NLS-1$ public static final String IMG_OBJ16_DESCRIPTION = UiPlugin.PLUGIN_ID + T_OBJ16 + "description.png"; //$NON-NLS-1$ + public static final String IMG_OBJ16_TAG = UiPlugin.PLUGIN_ID + T_OBJ16 + "atsign.png"; //$NON-NLS-1$ private static final String ICONS_PATH = "/icons"; //$NON-NLS-1$ @@ -51,6 +52,7 @@ public final class SharedImages reg.put(IMG_OBJ16_PARAMETERS_SECTION, createImageDescriptorFromKey(DtThemeUtil.getIconPath(IMG_OBJ16_PARAMETERS_SECTION))); reg.put(IMG_OBJ16_DESCRIPTION, createImageDescriptorFromKey(DtThemeUtil.getIconPath(IMG_OBJ16_DESCRIPTION))); + reg.put(IMG_OBJ16_TAG, createImageDescriptorFromKey(DtThemeUtil.getIconPath(IMG_OBJ16_TAG))); } private static ImageDescriptor createImageDescriptorFromKey(String key) diff --git a/bundles/com.e1c.v8codestyle.bsl.ui/src/com/e1c/v8codestyle/internal/bsl/ui/views/BslDocCommentSelectionListener.java b/bundles/com.e1c.v8codestyle.bsl.ui/src/com/e1c/v8codestyle/internal/bsl/ui/views/BslDocCommentSelectionListener.java index fe5525b9..5174d5d5 100644 --- a/bundles/com.e1c.v8codestyle.bsl.ui/src/com/e1c/v8codestyle/internal/bsl/ui/views/BslDocCommentSelectionListener.java +++ b/bundles/com.e1c.v8codestyle.bsl.ui/src/com/e1c/v8codestyle/internal/bsl/ui/views/BslDocCommentSelectionListener.java @@ -42,6 +42,7 @@ import com._1c.g5.v8.dt.bsl.documentation.comment.BslDocumentationComment.Return import com._1c.g5.v8.dt.bsl.documentation.comment.BslDocumentationComment.Section; import com._1c.g5.v8.dt.bsl.documentation.comment.BslMultiLineCommentDocumentationProvider; import com._1c.g5.v8.dt.bsl.documentation.comment.LinkPart; +import com._1c.g5.v8.dt.bsl.documentation.comment.TagPart; import com._1c.g5.v8.dt.bsl.documentation.comment.TextPart; import com._1c.g5.v8.dt.bsl.documentation.comment.TypeSection; import com._1c.g5.v8.dt.bsl.documentation.comment.TypeSection.FieldDefinition; @@ -293,6 +294,14 @@ public class BslDocCommentSelectionListener return section; } } + else if (object instanceof TagPart section) + { + if (section.getLineNumber() == line && section.getOffset() < offset + && section.getOffset() + section.getContent().length() > offset) + { + return section; + } + } else if (object instanceof FieldDefinition) { FieldDefinition section = (FieldDefinition)object; diff --git a/bundles/com.e1c.v8codestyle.bsl.ui/src/com/e1c/v8codestyle/internal/bsl/ui/views/BslDocCommentView.java b/bundles/com.e1c.v8codestyle.bsl.ui/src/com/e1c/v8codestyle/internal/bsl/ui/views/BslDocCommentView.java index dbedc2ef..c10e683a 100644 --- a/bundles/com.e1c.v8codestyle.bsl.ui/src/com/e1c/v8codestyle/internal/bsl/ui/views/BslDocCommentView.java +++ b/bundles/com.e1c.v8codestyle.bsl.ui/src/com/e1c/v8codestyle/internal/bsl/ui/views/BslDocCommentView.java @@ -43,6 +43,7 @@ import com._1c.g5.v8.dt.bsl.documentation.comment.BslDocumentationComment.Return import com._1c.g5.v8.dt.bsl.documentation.comment.BslDocumentationComment.Section; import com._1c.g5.v8.dt.bsl.documentation.comment.BslMultiLineCommentDocumentationProvider; import com._1c.g5.v8.dt.bsl.documentation.comment.LinkPart; +import com._1c.g5.v8.dt.bsl.documentation.comment.TagPart; import com._1c.g5.v8.dt.bsl.documentation.comment.TextPart; import com._1c.g5.v8.dt.bsl.documentation.comment.TypeSection; import com._1c.g5.v8.dt.bsl.documentation.comment.TypeSection.FieldDefinition; @@ -181,6 +182,10 @@ public class BslDocCommentView { return MessageFormat.format(Messages.BslDocCommentView_Link, ((LinkPart)obj).getLinkText()); } + else if (obj instanceof TagPart tagPart) + { + return MessageFormat.format(Messages.BslDocCommentView_Tag, tagPart.getContent()); + } else if (obj instanceof ParametersSection) { return Messages.BslDocCommentView_Parameters; @@ -225,6 +230,10 @@ public class BslDocCommentView { return UiPlugin.getDefault().getImage(SharedImages.IMG_OBJ16_TEXT); } + else if (obj instanceof TagPart) + { + return UiPlugin.getDefault().getImage(SharedImages.IMG_OBJ16_TAG); + } else if (obj instanceof FieldDefinition) { return UiPlugin.getDefault().getImage(SharedImages.IMG_OBJ16_FIELD); diff --git a/bundles/com.e1c.v8codestyle.bsl.ui/src/com/e1c/v8codestyle/internal/bsl/ui/views/Messages.java b/bundles/com.e1c.v8codestyle.bsl.ui/src/com/e1c/v8codestyle/internal/bsl/ui/views/Messages.java index 23603966..b1d884bc 100644 --- a/bundles/com.e1c.v8codestyle.bsl.ui/src/com/e1c/v8codestyle/internal/bsl/ui/views/Messages.java +++ b/bundles/com.e1c.v8codestyle.bsl.ui/src/com/e1c/v8codestyle/internal/bsl/ui/views/Messages.java @@ -32,6 +32,7 @@ final class Messages public static String BslDocCommentView_Text; public static String BslDocCommentView_Type; public static String BslDocCommentView_Types; + public static String BslDocCommentView_Tag; static { // initialize resource bundle diff --git a/bundles/com.e1c.v8codestyle.bsl.ui/src/com/e1c/v8codestyle/internal/bsl/ui/views/messages.properties b/bundles/com.e1c.v8codestyle.bsl.ui/src/com/e1c/v8codestyle/internal/bsl/ui/views/messages.properties index 6d74947d..3f5188de 100644 --- a/bundles/com.e1c.v8codestyle.bsl.ui/src/com/e1c/v8codestyle/internal/bsl/ui/views/messages.properties +++ b/bundles/com.e1c.v8codestyle.bsl.ui/src/com/e1c/v8codestyle/internal/bsl/ui/views/messages.properties @@ -31,3 +31,5 @@ BslDocCommentView_Text = Text: {0} BslDocCommentView_Type = Type: {0} BslDocCommentView_Types = Types: + +BslDocCommentView_Tag = Tag: {0} diff --git a/bundles/com.e1c.v8codestyle.bsl.ui/src/com/e1c/v8codestyle/internal/bsl/ui/views/messages_ru.properties b/bundles/com.e1c.v8codestyle.bsl.ui/src/com/e1c/v8codestyle/internal/bsl/ui/views/messages_ru.properties index cf121ed5..c229627b 100644 --- a/bundles/com.e1c.v8codestyle.bsl.ui/src/com/e1c/v8codestyle/internal/bsl/ui/views/messages_ru.properties +++ b/bundles/com.e1c.v8codestyle.bsl.ui/src/com/e1c/v8codestyle/internal/bsl/ui/views/messages_ru.properties @@ -32,3 +32,5 @@ BslDocCommentView_Text = Текст: {0} BslDocCommentView_Type = Тип: {0} BslDocCommentView_Types = Типы: + +BslDocCommentView_Tag = Тег: {0} diff --git a/bundles/com.e1c.v8codestyle.bsl/META-INF/MANIFEST.MF b/bundles/com.e1c.v8codestyle.bsl/META-INF/MANIFEST.MF index 8910cc30..ee3388a5 100644 --- a/bundles/com.e1c.v8codestyle.bsl/META-INF/MANIFEST.MF +++ b/bundles/com.e1c.v8codestyle.bsl/META-INF/MANIFEST.MF @@ -40,7 +40,7 @@ Import-Package: com._1c.g5.v8.bm.core;version="[9.0.0,10.0.0)", com._1c.g5.v8.dt.lcore.util;version="[2.0.0,3.0.0)", com._1c.g5.v8.dt.mcore;version="[7.0.0,8.0.0)", com._1c.g5.v8.dt.mcore.util;version="[3.6.0,4.0.0)", - com._1c.g5.v8.dt.metadata.mdclass;version="[10.0.0,11.0.0)", + com._1c.g5.v8.dt.metadata.mdclass;version="[11.0.0,12.0.0)", com._1c.g5.v8.dt.platform;version="[7.0.0,8.0.0)", com._1c.g5.v8.dt.platform.version;version="[2.13.0,3.0.0)", com._1c.g5.wiring;version="[2.0.0,3.0.0)", @@ -51,7 +51,7 @@ Import-Package: com._1c.g5.v8.bm.core;version="[9.0.0,10.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.components;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;version="[4.0.0,5.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="[4.0.0,5.0.0)", com.e1c.v8codestyle;version="[0.7.0,0.8.0)", diff --git a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/check/MissingTemporaryFileDeletionCheck.java b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/check/MissingTemporaryFileDeletionCheck.java index 65ecb9a0..db8cbcc1 100644 --- a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/check/MissingTemporaryFileDeletionCheck.java +++ b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/check/MissingTemporaryFileDeletionCheck.java @@ -97,9 +97,8 @@ public class MissingTemporaryFileDeletionCheck return; } Expression tempFile = statement.getLeft(); - String tempFileName = getFullFeatureAccessName(tempFile); - - if (!monitor.isCanceled() && tempFileName != null && checkFileCloses(sfa, parameters, tempFileName)) + String tempFileName = getFullFeatureAccessName(tempFile, monitor); + if (tempFileName == null || checkFileCloses(sfa, parameters, tempFileName, monitor)) { return; } @@ -108,7 +107,8 @@ public class MissingTemporaryFileDeletionCheck } } - private boolean checkFileCloses(StaticFeatureAccess sfa, ICheckParameters parameters, String tempFileName) + private boolean checkFileCloses(StaticFeatureAccess sfa, ICheckParameters parameters, String tempFileName, + IProgressMonitor monitor) { List deleteFileMethods = getDeleteFileMethods(parameters); @@ -118,12 +118,16 @@ public class MissingTemporaryFileDeletionCheck boolean isTempFileOpened = false; for (FeatureAccess blockFa : EcoreUtil2.eAllOfType(block, FeatureAccess.class)) { - String featureName = getFullFeatureAccessName(blockFa); + if (monitor.isCanceled()) + { + return false; + } + String featureName = getFullFeatureAccessName(blockFa, monitor); if (featureName != null && (isTempFileMethod(featureName) || isTempFileOpened)) { isTempFileOpened = true; - if (deleteFileMethods.contains(featureName) && checkParameterInList(blockFa, tempFileName)) + if (deleteFileMethods.contains(featureName) && checkParameterInList(blockFa, tempFileName, monitor)) { return true; } @@ -146,28 +150,40 @@ public class MissingTemporaryFileDeletionCheck return METHOD_NAME.equalsIgnoreCase(methodName) || METHOD_NAME_RU.equalsIgnoreCase(methodName); } - private boolean checkParameterInList(FeatureAccess featureAccess, String parameterName) + private boolean checkParameterInList(FeatureAccess featureAccess, String parameterName, IProgressMonitor monitor) { Invocation deleteInvocation = BslUtil.getInvocation(featureAccess); + if (deleteInvocation == null) + { + return false; + } List deleteParameters = deleteInvocation.getParams(); for (Expression parameter : deleteParameters) { + if (monitor.isCanceled()) + { + return false; + } if (parameter instanceof FeatureAccess) { - String faParameterName = getFullFeatureAccessName(parameter); + String faParameterName = getFullFeatureAccessName(parameter, monitor); return faParameterName != null && faParameterName.equals(parameterName); } } return false; } - private String getFullFeatureAccessName(Expression tempFile) + private String getFullFeatureAccessName(Expression tempFile, IProgressMonitor monitor) { StringBuilder builder = new StringBuilder(); Expression expression = tempFile; while (expression instanceof DynamicFeatureAccess) { + if (monitor.isCanceled()) + { + return null; + } DynamicFeatureAccess dynamicFeatureAccess = (DynamicFeatureAccess)expression; builder.insert(0, dynamicFeatureAccess.getName()); builder.insert(0, DOT); @@ -182,5 +198,4 @@ public class MissingTemporaryFileDeletionCheck return null; } - } diff --git a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/MultilineDescriptionEndsOnDotCheck.java b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/MultilineDescriptionEndsOnDotCheck.java index 7473a46f..ed8b223a 100644 --- a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/MultilineDescriptionEndsOnDotCheck.java +++ b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/MultilineDescriptionEndsOnDotCheck.java @@ -100,7 +100,7 @@ public class MultilineDescriptionEndsOnDotCheck .orElse(null); //@formatter:on - if (lastPart == null || startLine == lastPart.getLineNumber()) + if (lastPart == null || startLine == lastPart.getLineNumber() || isParentExampleSection(root, lastPart)) { return; } @@ -120,4 +120,10 @@ public class MultilineDescriptionEndsOnDotCheck lastPart.getLineNumber(), lastPart.getOffset(), lastPart.getText().length()); } + + private boolean isParentExampleSection(BslDocumentationComment root, TextPart lastPart) + { + return root.getExampleSection() != null + && root.getExampleSection().getDescription().getParts().contains(lastPart); + } } diff --git a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/strict/check/TypedValueAddingToUntypedCollectionCheck.java b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/strict/check/TypedValueAddingToUntypedCollectionCheck.java index 88e31767..5bb0809e 100644 --- a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/strict/check/TypedValueAddingToUntypedCollectionCheck.java +++ b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/strict/check/TypedValueAddingToUntypedCollectionCheck.java @@ -136,7 +136,7 @@ public class TypedValueAddingToUntypedCollectionCheck return; } - Collection actualTypes = getActualCollectionTypes(fa, expectedCollectionTypes); + Collection actualTypes = getActualCollectionTypes(fa, expectedCollectionTypes, monitor); if (!actualTypes.isEmpty() && isActualCollectionItemTypeEmpty(actualTypes)) { @@ -155,7 +155,7 @@ public class TypedValueAddingToUntypedCollectionCheck Invocation inv = BslUtil.getInvocation(fa); - if (!(inv.getMethodAccess() instanceof DynamicFeatureAccess)) + if (inv == null || !(inv.getMethodAccess() instanceof DynamicFeatureAccess)) { return expectedTypes; } @@ -188,14 +188,26 @@ public class TypedValueAddingToUntypedCollectionCheck return expectedTypes; } - private Collection getActualCollectionTypes(FeatureAccess fa, Collection expectedTypes) + private Collection getActualCollectionTypes(FeatureAccess fa, Collection expectedTypes, IProgressMonitor monitor) { Collection actualTypes = new ArrayList<>(); - Invocation inv = BslUtil.getInvocation(fa); + if (monitor.isCanceled()) + { + return actualTypes; + } + Invocation invocation = BslUtil.getInvocation(fa); + if (invocation == null) + { + return actualTypes; + } for (TypeItem type : expectedTypes) { - type = (TypeItem)EcoreUtil.resolve(type, inv); + if (monitor.isCanceled()) + { + break; + } + type = (TypeItem)EcoreUtil.resolve(type, invocation); if (type.getName().equals(IEObjectTypeNames.VALUE_LIST)) { diff --git a/bundles/com.e1c.v8codestyle.form/META-INF/MANIFEST.MF b/bundles/com.e1c.v8codestyle.form/META-INF/MANIFEST.MF index 1ffaa5fe..97399c95 100644 --- a/bundles/com.e1c.v8codestyle.form/META-INF/MANIFEST.MF +++ b/bundles/com.e1c.v8codestyle.form/META-INF/MANIFEST.MF @@ -29,10 +29,10 @@ Import-Package: com._1c.g5.v8.bm.core;version="[9.0.0,10.0.0)", com._1c.g5.v8.dt.mcore;version="[7.0.0,8.0.0)", com._1c.g5.v8.dt.metadata;version="[5.0.0,6.0.0)", com._1c.g5.v8.dt.metadata.dbview;version="[5.0.0,6.0.0)", - com._1c.g5.v8.dt.metadata.mdclass;version="[10.0.0,11.0.0)", + com._1c.g5.v8.dt.metadata.mdclass;version="[11.0.0,12.0.0)", com._1c.g5.v8.dt.platform.version;version="[2.14.0,3.0.0)", com._1c.g5.v8.dt.ql.model;version="[5.0.0,6.0.0)", - com._1c.g5.v8.dt.ql.resource;version="[5.0.0,6.0.0)", + com._1c.g5.v8.dt.ql.resource;version="[6.0.0,7.0.0)", com._1c.g5.v8.dt.ql.typesystem;version="[6.0.0,7.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)", @@ -40,7 +40,7 @@ Import-Package: com._1c.g5.v8.bm.core;version="[9.0.0,10.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.ext;version="[1.0.0,2.0.0)", - com.e1c.g5.v8.dt.check.qfix;version="[3.0.0,4.0.0)", + com.e1c.g5.v8.dt.check.qfix;version="[4.0.0,5.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="[4.0.0,5.0.0)", com.e1c.v8codestyle.check;version="[0.7.0,0.8.0)", diff --git a/bundles/com.e1c.v8codestyle.md.ui/META-INF/MANIFEST.MF b/bundles/com.e1c.v8codestyle.md.ui/META-INF/MANIFEST.MF index 5e16d4dd..dd146a37 100644 --- a/bundles/com.e1c.v8codestyle.md.ui/META-INF/MANIFEST.MF +++ b/bundles/com.e1c.v8codestyle.md.ui/META-INF/MANIFEST.MF @@ -22,9 +22,9 @@ Bundle-Localization: plugin Import-Package: com._1c.g5.v8.dt.common;version="[6.4.0,7.0.0)", com._1c.g5.v8.dt.core.platform;version="[11.0.0,12.0.0)", com._1c.g5.v8.dt.md.ui.shared;version="[2.3.200,3.0.0)", - com._1c.g5.v8.dt.metadata.mdclass;version="[10.0.0,11.0.0)", + com._1c.g5.v8.dt.metadata.mdclass;version="[11.0.0,12.0.0)", com._1c.g5.v8.dt.metadata.mdclass.util;version="[5.0.0,6.0.0)", - com._1c.g5.v8.dt.ui.wizards;version="[8.0.0,9.0.0)", + com._1c.g5.v8.dt.ui.wizards;version="[9.0.0,10.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.e1c.v8codestyle.md;version="[0.7.0,0.8.0)", diff --git a/bundles/com.e1c.v8codestyle.md/META-INF/MANIFEST.MF b/bundles/com.e1c.v8codestyle.md/META-INF/MANIFEST.MF index 2d4adfcf..5ea117fe 100644 --- a/bundles/com.e1c.v8codestyle.md/META-INF/MANIFEST.MF +++ b/bundles/com.e1c.v8codestyle.md/META-INF/MANIFEST.MF @@ -19,7 +19,7 @@ Import-Package: com._1c.g5.v8.bm.core;version="[9.0.0,10.0.0)", com._1c.g5.v8.dt.core.platform;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.util;version="[3.13.0,4.0.0)", - com._1c.g5.v8.dt.metadata.mdclass;version="[10.0.0,11.0.0)", + com._1c.g5.v8.dt.metadata.mdclass;version="[11.0.0,12.0.0)", com._1c.g5.v8.dt.metadata.mdclass.util;version="[5.0.0,6.0.0)", com._1c.g5.v8.dt.platform;version="[7.0.0,8.0.0)", com._1c.g5.v8.dt.schedule.model;version="[2.0.0,3.0.0)", diff --git a/bundles/com.e1c.v8codestyle.ql/META-INF/MANIFEST.MF b/bundles/com.e1c.v8codestyle.ql/META-INF/MANIFEST.MF index 9f8387fe..4a96fe2b 100644 --- a/bundles/com.e1c.v8codestyle.ql/META-INF/MANIFEST.MF +++ b/bundles/com.e1c.v8codestyle.ql/META-INF/MANIFEST.MF @@ -19,7 +19,7 @@ Import-Package: com._1c.g5.v8.bm.core;version="[9.0.0,10.0.0)", com._1c.g5.v8.dt.core.platform;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.metadata.dbview;version="4.0.0", - com._1c.g5.v8.dt.metadata.mdclass;version="[10.0.0,11.0.0)", + com._1c.g5.v8.dt.metadata.mdclass;version="[11.0.0,12.0.0)", com._1c.g5.v8.dt.ql.model;version="[5.0.0,6.0.0)", com._1c.g5.v8.dt.ql.typesystem;version="5.0.0", com._1c.g5.wiring;version="[2.2.0,3.0.0)", diff --git a/bundles/com.e1c.v8codestyle.right/META-INF/MANIFEST.MF b/bundles/com.e1c.v8codestyle.right/META-INF/MANIFEST.MF index a5e5ac0a..b5c57337 100644 --- a/bundles/com.e1c.v8codestyle.right/META-INF/MANIFEST.MF +++ b/bundles/com.e1c.v8codestyle.right/META-INF/MANIFEST.MF @@ -17,13 +17,13 @@ Bundle-Localization: plugin Import-Package: com._1c.g5.v8.bm.core;version="[9.0.0,10.0.0)", com._1c.g5.v8.bm.core.event;version="[3.0.0,4.0.0)", com._1c.g5.v8.bm.integration;version="[11.0.0,12.0.0)", - com._1c.g5.v8.dt.bm.index.emf;version="[8.0.0,9.0.0)", + com._1c.g5.v8.dt.bm.index.emf;version="[9.0.0,10.0.0)", com._1c.g5.v8.dt.bm.index.rights;version="[5.0.0,6.0.0)", com._1c.g5.v8.dt.common;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.mcore;version="[7.0.0,8.0.0)", - com._1c.g5.v8.dt.md;version="[20.0.0,21.0.0)", - com._1c.g5.v8.dt.metadata.mdclass;version="[10.0.0,11.0.0)", + com._1c.g5.v8.dt.md;version="[21.0.0,22.0.0)", + com._1c.g5.v8.dt.metadata.mdclass;version="[11.0.0,12.0.0)", com._1c.g5.v8.dt.platform.version;version="[2.0.0,3.0.0)", com._1c.g5.v8.dt.rights;version="[7.0.0,8.0.0)", com._1c.g5.v8.dt.rights.model;version="[4.0.0,5.0.0)", diff --git a/bundles/com.e1c.v8codestyle.ui/META-INF/MANIFEST.MF b/bundles/com.e1c.v8codestyle.ui/META-INF/MANIFEST.MF index 55ada2c8..2ee679ba 100644 --- a/bundles/com.e1c.v8codestyle.ui/META-INF/MANIFEST.MF +++ b/bundles/com.e1c.v8codestyle.ui/META-INF/MANIFEST.MF @@ -20,7 +20,7 @@ Automatic-Module-Name: com.e1c.v8codestyle.ui Bundle-ActivationPolicy: lazy Import-Package: com._1c.g5.v8.dt.common;version="[6.4.0,7.0.0)", com._1c.g5.v8.dt.core.platform;version="[11.0.0,12.0.0)", - com._1c.g5.v8.dt.ui.wizards;version="[8.1.0,9.0.0)", + com._1c.g5.v8.dt.ui.wizards;version="[9.0.0,10.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.e1c.v8codestyle;version="[0.7.0,0.8.0)" diff --git a/targets/default/default.target b/targets/default/default.target index ce8a14a6..5d689c27 100644 --- a/targets/default/default.target +++ b/targets/default/default.target @@ -13,15 +13,16 @@ - + - + + diff --git a/tests/com.e1c.v8codestyle.bsl.itests/resources/doc-comment-description-ends-on-dot.bsl b/tests/com.e1c.v8codestyle.bsl.itests/resources/doc-comment-description-ends-on-dot.bsl index a66434c9..e7fe6c01 100644 --- a/tests/com.e1c.v8codestyle.bsl.itests/resources/doc-comment-description-ends-on-dot.bsl +++ b/tests/com.e1c.v8codestyle.bsl.itests/resources/doc-comment-description-ends-on-dot.bsl @@ -10,3 +10,13 @@ EndProcedure Procedure Complaint() Export // empty EndProcedure + +// First line +// second line. +// Example: +// if true then +// NonComplaint(); +// EndIf; +Procedure Complaint() Export + // empty +EndProcedure diff --git a/tests/com.e1c.v8codestyle.bsl.ui.itests/META-INF/MANIFEST.MF b/tests/com.e1c.v8codestyle.bsl.ui.itests/META-INF/MANIFEST.MF index 11a3a9be..4ec4d0a0 100644 --- a/tests/com.e1c.v8codestyle.bsl.ui.itests/META-INF/MANIFEST.MF +++ b/tests/com.e1c.v8codestyle.bsl.ui.itests/META-INF/MANIFEST.MF @@ -10,7 +10,7 @@ Bundle-RequiredExecutionEnvironment: JavaSE-17 Bundle-Localization: fragment Import-Package: com._1c.g5.v8.dt.bsl.ui.editor;version="[10.0.0,11.0.0)", com._1c.g5.v8.dt.testing;version="[3.1.0,4.0.0)", - com._1c.g5.v8.dt.ui.util;version="[8.0.0,9.0.0)", + com._1c.g5.v8.dt.ui.util;version="[9.0.0,10.0.0)", org.junit;version="[4.13.0,5.0.0)" Require-Bundle: org.eclipse.ui.forms;bundle-version="[3.11.0,4.0.0)", org.eclipse.core.expressions;bundle-version="[3.8.0,4.0.0)" diff --git a/tests/com.e1c.v8codestyle.bsl.ui.itests/resources/doc-comment-view.bsl b/tests/com.e1c.v8codestyle.bsl.ui.itests/resources/doc-comment-view.bsl index e26787bf..f593fe61 100644 --- a/tests/com.e1c.v8codestyle.bsl.ui.itests/resources/doc-comment-view.bsl +++ b/tests/com.e1c.v8codestyle.bsl.ui.itests/resources/doc-comment-view.bsl @@ -4,13 +4,15 @@ // Parameters: // Parameters - Structure: // * Key1 - has not type for key +// @tag1 param description Procedure Test(Parameters) Export - // empty + // empty EndProcedure +// @tag2 param description // Returns: // Array of See Test Function Test2() Export - // empty - Return Undefined; + // empty + Return Undefined; EndFunction diff --git a/tests/com.e1c.v8codestyle.bsl.ui.itests/src/com/e1c/v8codestyle/bsl/ui/itests/BslDocCommentViewTest.java b/tests/com.e1c.v8codestyle.bsl.ui.itests/src/com/e1c/v8codestyle/bsl/ui/itests/BslDocCommentViewTest.java index 5fac9ed4..258cd9b1 100644 --- a/tests/com.e1c.v8codestyle.bsl.ui.itests/src/com/e1c/v8codestyle/bsl/ui/itests/BslDocCommentViewTest.java +++ b/tests/com.e1c.v8codestyle.bsl.ui.itests/src/com/e1c/v8codestyle/bsl/ui/itests/BslDocCommentViewTest.java @@ -48,6 +48,7 @@ import com._1c.g5.v8.dt.bsl.documentation.comment.BslDocumentationComment; import com._1c.g5.v8.dt.bsl.documentation.comment.BslDocumentationComment.ParametersSection; import com._1c.g5.v8.dt.bsl.documentation.comment.BslDocumentationComment.ReturnSection; import com._1c.g5.v8.dt.bsl.documentation.comment.LinkPart; +import com._1c.g5.v8.dt.bsl.documentation.comment.TagPart; import com._1c.g5.v8.dt.bsl.documentation.comment.TextPart; import com._1c.g5.v8.dt.bsl.documentation.comment.TypeSection.FieldDefinition; import com._1c.g5.v8.dt.bsl.documentation.comment.TypeSection.TypeDefinition; @@ -179,35 +180,50 @@ public class BslDocCommentViewTest assertEquals(3, typePart.getLineNumber()); assertEquals("Structure", typePart.getTypeName()); - selectText(bslEditor, 169, 0, view); + selectText(bslEditor, 226, 0, view); first = getViewerSelection((BslDocCommentView)view); assertTrue(first instanceof ReturnSection); ReturnSection returnPart = (ReturnSection)first; - assertEquals(0, returnPart.getLineNumber()); + assertEquals(1, returnPart.getLineNumber()); - selectText(bslEditor, 187, 1, view); + selectText(bslEditor, 245, 1, view); first = getViewerSelection((BslDocCommentView)view); assertTrue(first instanceof LinkPart); LinkPart linkPart = (LinkPart)first; - assertEquals(1, linkPart.getLineNumber()); + assertEquals(2, linkPart.getLineNumber()); assertEquals("Test", linkPart.getLinkText()); assertEquals("See Test", linkPart.getInitialContent()); - selectText(bslEditor, 192, 1, view); + selectText(bslEditor, 250, 1, view); first = getViewerSelection((BslDocCommentView)view); assertTrue(first instanceof LinkPart); linkPart = (LinkPart)first; - assertEquals(1, linkPart.getLineNumber()); + assertEquals(2, linkPart.getLineNumber()); assertEquals("Test", linkPart.getLinkText()); assertEquals("See Test", linkPart.getInitialContent()); - selectText(bslEditor, 243, 1, view); + selectText(bslEditor, 283, 1, view); TreeViewer viewer = getViewer((BslDocCommentView)view); ITreeSelection selection = viewer.getStructuredSelection(); assertTrue(selection.isEmpty()); Object input = viewer.getInput(); assertTrue(input instanceof BslDocumentationComment); + selectText(bslEditor, 107, 1, view); + first = getViewerSelection((BslDocCommentView)view); + assertTrue(first instanceof TagPart); + TagPart tagPart = (TagPart)first; + assertEquals(5, tagPart.getLineNumber()); + assertEquals("tag1", tagPart.getTagName()); + assertEquals(1, tagPart.getParameters().size()); + + selectText(bslEditor, 195, 1, view); + first = getViewerSelection((BslDocCommentView)view); + assertTrue(first instanceof TagPart); + tagPart = (TagPart)first; + assertEquals(0, tagPart.getLineNumber()); + assertEquals("tag2", tagPart.getTagName()); + assertEquals(1, tagPart.getParameters().size()); } private Object getViewerSelection(BslDocCommentView view) throws Exception diff --git a/tests/com.e1c.v8codestyle.form.itests/META-INF/MANIFEST.MF b/tests/com.e1c.v8codestyle.form.itests/META-INF/MANIFEST.MF index 65f22cd9..780a202e 100644 --- a/tests/com.e1c.v8codestyle.form.itests/META-INF/MANIFEST.MF +++ b/tests/com.e1c.v8codestyle.form.itests/META-INF/MANIFEST.MF @@ -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="[12.0.0,13.0.0)", com._1c.g5.v8.dt.form.naming;version="[5.0.0,6.0.0)", com._1c.g5.v8.dt.mcore;version="[7.0.0,8.0.0)", - com._1c.g5.v8.dt.metadata.mdclass;version="[10.0.0,11.0.0)", + com._1c.g5.v8.dt.metadata.mdclass;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.validation.marker;version="[9.0.0,10.0.0)", com.e1c.g5.v8.dt.testing.check;version="[1.0.0,2.0.0)", diff --git a/tests/com.e1c.v8codestyle.ql.itests/META-INF/MANIFEST.MF b/tests/com.e1c.v8codestyle.ql.itests/META-INF/MANIFEST.MF index 0af2145e..db1c6e19 100644 --- a/tests/com.e1c.v8codestyle.ql.itests/META-INF/MANIFEST.MF +++ b/tests/com.e1c.v8codestyle.ql.itests/META-INF/MANIFEST.MF @@ -10,7 +10,7 @@ Bundle-RequiredExecutionEnvironment: JavaSE-17 Bundle-Localization: fragment 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.dcs.util;version="[15.0.0,16.0.0)", + com._1c.g5.v8.dt.dcs.util;version="[16.0.0,17.0.0)", com._1c.g5.v8.dt.form.model;version="[12.0.0,13.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)",