Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
32,300
boolean (@NotNull GroovyDebuggerSettings settings) { return settings.DEBUG_DISABLE_SPECIFIC_GROOVY_METHODS.booleanValue() != ignoreGroovyMethods.isSelected(); }
isModified
32,301
void (@NotNull GroovyDebuggerSettings settings) { settings.DEBUG_DISABLE_SPECIFIC_GROOVY_METHODS = ignoreGroovyMethods.isSelected(); }
apply
32,302
JComponent () { return rootPanel; }
getComponent
32,303
String () { return "GroovyRefRenderer"; }
getUniqueId
32,304
void (Value value, ChildrenBuilder builder, EvaluationContext evaluationContext) { ValueDescriptor fieldDescriptor = getWrappedDescriptor(value, evaluationContext.getProject()); getDelegateRenderer(evaluationContext.getDebugProcess(), fieldDescriptor) .thenAccept(renderer -> { builder.getParentDescriptor().putUserData(GROOVY_REF_DELEGATE_RENDERER, renderer); renderer.buildChildren(fieldDescriptor.getValue(), builder, evaluationContext); }); }
buildChildren
32,305
CompletableFuture<Boolean> (Value value, EvaluationContext evaluationContext, NodeDescriptor parentDescriptor) { ValueDescriptor fieldDescriptor = getWrappedDescriptor(value, evaluationContext.getProject()); return getDelegateRenderer(evaluationContext.getDebugProcess(), fieldDescriptor) .thenCompose(renderer -> renderer.isExpandableAsync(fieldDescriptor.getValue(), evaluationContext, fieldDescriptor)); }
isExpandableAsync
32,306
String (ValueDescriptor descriptor, EvaluationContext evaluationContext, DescriptorLabelListener listener) { ValueDescriptor fieldDescriptor = getWrappedDescriptor(descriptor.getValue(), evaluationContext.getProject(), descriptor); CompletableFuture<NodeRenderer> renderer = getDelegateRenderer(evaluationContext.getDebugProcess(), fieldDescriptor); return calcLabel(renderer, fieldDescriptor, evaluationContext, listener); }
calcLabel
32,307
CompletableFuture<NodeRenderer> (DebugProcess debugProcess, ValueDescriptor fieldDescriptor) { return ((DebugProcessImpl)debugProcess).getAutoRendererAsync(fieldDescriptor.getType()); }
getDelegateRenderer
32,308
ValueDescriptor (Value ref, final Project project) { return getWrappedDescriptor(ref, project, null); }
getWrappedDescriptor
32,309
ValueDescriptor (Value ref, final Project project, @Nullable ValueDescriptor originalDescriptor) { final Field field = ((ObjectReference)ref).referenceType().fieldByName("value"); final Value wrapped = ((ObjectReference)ref).getValue(field); return new ValueDescriptorImpl(project, wrapped) { @Override public Value calcValue(EvaluationContextImpl evaluationContext) { return wrapped; } @Override public void setValueLabel(@NotNull String label) { if (originalDescriptor != null) { originalDescriptor.setValueLabel(label); } } @Override public String calcValueName() { return field.name(); } @Override public PsiExpression getDescriptorEvaluation(DebuggerContext context) { return JavaPsiFacade.getElementFactory(context.getProject()).createExpressionFromText("this." + field.name(), null); } }; }
getWrappedDescriptor
32,310
Value (EvaluationContextImpl evaluationContext) { return wrapped; }
calcValue
32,311
void (@NotNull String label) { if (originalDescriptor != null) { originalDescriptor.setValueLabel(label); } }
setValueLabel
32,312
String () { return field.name(); }
calcValueName
32,313
PsiExpression (DebuggerContext context) { return JavaPsiFacade.getElementFactory(context.getProject()).createExpressionFromText("this." + field.name(), null); }
getDescriptorEvaluation
32,314
String (ValueDescriptor descriptor, DebugProcess process, DescriptorLabelListener labelListener) { ValueDescriptor fieldDescriptor = getWrappedDescriptor(descriptor.getValue(), process.getProject()); return getDelegateRenderer(process, fieldDescriptor) .thenApply(renderer -> ((NodeRendererImpl)renderer).calcIdLabel(fieldDescriptor, process, labelListener)) .getNow(""); }
calcIdLabel
32,315
PositionManager (@NotNull DebugProcess process) { return new GroovyPositionManager(process); }
createPositionManager
32,316
List<ClassFilter> () { GroovyDebuggerSettings settings = GroovyDebuggerSettings.getInstance(); Boolean flag = settings.DEBUG_DISABLE_SPECIFIC_GROOVY_METHODS; if (flag == null || flag.booleanValue()) { return FILTERS; } return Collections.emptyList(); }
getFilters
32,317
void (@NotNull Processor<? super String> processor, @NotNull GlobalSearchScope scope, @Nullable IdFilter filter) { StubIndex index = StubIndex.getInstance(); if (!index.processAllKeys(GrFieldNameIndex.KEY, processor, scope, filter)) return; if (!index.processAllKeys(GrMethodNameIndex.KEY, processor, scope, filter)) return; if (!index.processAllKeys(GrAnnotationMethodNameIndex.KEY, processor, scope, filter)) return; }
processNames
32,318
void (@NotNull String name, @NotNull Processor<? super NavigationItem> processor, @NotNull FindSymbolParameters parameters) { StubIndex index = StubIndex.getInstance(); Project project = parameters.getProject(); GlobalSearchScope scope = parameters.getSearchScope(); IdFilter filter = parameters.getIdFilter(); if (!index.processElements(GrFieldNameIndex.KEY, name, project, scope, filter, GrField.class, processor)) return; if (!index.processElements(GrMethodNameIndex.KEY, name, project, scope, filter, GrMethod.class, processor)) return; if (!index.processElements(GrAnnotationMethodNameIndex.KEY, name, project, scope, filter, GrAnnotationMethod.class, processor)) return; }
processElementsWithName
32,319
String () { return GroovyBundle.message("grab.intention.name"); }
getText
32,320
String () { return GroovyBundle.message("grab.family.name"); }
getFamilyName
32,321
boolean (@NotNull Project project, Editor editor, PsiFile file) { if (!isCorrectModule(file)) return false; int offset = editor.getCaretModel().getOffset(); final GrAnnotation anno = PsiTreeUtil.findElementOfClassAtOffset(file, offset, GrAnnotation.class, false); if (anno != null && isGrabAnnotation(anno)) { return true; } PsiElement at = file.findElementAt(offset); if (at != null && isUnresolvedRefName(at) && findGrab(file) != null) { return true; } return false; }
isAvailable
32,322
PsiAnnotation (final PsiFile file) { if (!(file instanceof GroovyFile)) return null; return CachedValuesManager.getCachedValue(file, () -> { PsiClass grab = JavaPsiFacade.getInstance(file.getProject()).findClass(GrabAnnos.GRAB_ANNO, file.getResolveScope()); final Ref<PsiAnnotation> result = Ref.create(); if (grab != null) { ReferencesSearch.search(grab, new LocalSearchScope(file)).forEach(reference -> { if (reference instanceof GrCodeReferenceElement) { PsiElement parent = ((GrCodeReferenceElement)reference).getParent(); if (parent instanceof PsiAnnotation) { result.set((PsiAnnotation)parent); return false; } } return true; }); } return CachedValueProvider.Result.create(result.get(), file); }); }
findGrab
32,323
boolean (@NotNull PsiElement at) { PsiElement parent = at.getParent(); return parent instanceof GrReferenceElement && ((GrReferenceElement<?>)parent).getReferenceNameElement() == at && ((GrReferenceElement<?>)parent).resolve() == null; }
isUnresolvedRefName
32,324
boolean (@NotNull GrAnnotation anno) { final String qname = anno.getQualifiedName(); return qname != null && (qname.startsWith(GrabAnnos.GRAB_ANNO) || GrabAnnos.GRAPES_ANNO.equals(qname)); }
isGrabAnnotation
32,325
boolean (PsiFile file) { final Module module = ModuleUtilCore.findModuleForPsiElement(file); if (module == null) { return false; } final Sdk sdk = ModuleRootManager.getInstance(module).getSdk(); if (sdk == null) { return false; } return file.getOriginalFile().getVirtualFile() != null && sdk.getSdkType() instanceof JavaSdkType; }
isCorrectModule
32,326
void (@NotNull ProgressIndicator indicator) { int totalJarCount = 0; HtmlBuilder messages = new HtmlBuilder(); for (Map.Entry<@NlsSafe String, GeneralCommandLine> entry : lines.entrySet()) { String grabText = entry.getKey(); indicator.setText2(grabText); try { final GrapeProcessHandler handler = new GrapeProcessHandler(entry.getValue(), module); handler.startNotify(); handler.waitFor(); int jarCount = handler.jarCount; totalJarCount += jarCount; messages.append(HtmlChunk.p().children( HtmlChunk.raw(GroovyBundle.message("grab.jar.count", grabText, jarCount)), handler.messages )); } catch (ExecutionException e) { LOG.error(e); } } final String title = GroovyBundle.message("grab.result.title", totalJarCount); NOTIFICATION_GROUP.createNotification(title, messages.toString(), NotificationType.INFORMATION).notify(project); }
run
32,327
void (@NotNull PsiElement element) { if (element instanceof GrAnnotation anno) { String qname = anno.getQualifiedName(); if (GrabAnnos.GRAB_ANNO.equals(qname)) grabs.add(anno); else if (GrabAnnos.GRAB_EXCLUDE_ANNO.equals(qname)) excludes.add(anno); else if (GrabAnnos.GRAB_RESOLVER_ANNO.equals(qname)) resolvers.add(anno); } super.visitElement(element); }
visitElement
32,328
boolean () { return false; }
startInWriteAction
32,329
void (@NotNull String text, @NotNull Key outputType) { text = StringUtil.convertLineSeparators(text); if (LOG.isDebugEnabled()) { LOG.debug(outputType + text); } if (outputType == ProcessOutputTypes.STDOUT) { myStdOut.append(text); } else if (outputType == ProcessOutputTypes.STDERR) { myStdErr.append(text); } }
notifyTextAvailable
32,330
void (List<VirtualFile> jars) { final ModifiableRootModel model = ModuleRootManager.getInstance(myModule).getModifiableModel(); final LibraryTable.ModifiableModel tableModel = model.getModuleLibraryTable().getModifiableModel(); for (VirtualFile jar : jars) { final VirtualFile jarRoot = JarFileSystem.getInstance().getJarRootForLocalFile(jar); if (jarRoot != null) { OrderRootType rootType = OrderRootType.CLASSES; String libName = "Grab:" + jar.getName(); for (String classifier : ContainerUtil.ar("sources", "source", "src")) { if (libName.endsWith("-" + classifier + ".jar")) { rootType = OrderRootType.SOURCES; libName = StringUtil.trimEnd(libName, "-" + classifier + ".jar") + ".jar"; } } Library library = tableModel.getLibraryByName(libName); if (library == null) { library = tableModel.createLibrary(libName); } final Library.ModifiableModel libModel = library.getModifiableModel(); for (String url : libModel.getUrls(rootType)) { libModel.removeRoot(url, rootType); } libModel.addRoot(jarRoot, rootType); libModel.commit(); } } tableModel.commit(); model.commit(); }
addGrapeDependencies
32,331
void (int exitCode) { try { final List<VirtualFile> jars = new ArrayList<>(); for (String line : myStdOut.toString().split("\n")) { if (line.startsWith(GrapeRunner.URL_PREFIX)) { try { final URL url = new URL(line.substring(GrapeRunner.URL_PREFIX.length())); final File libFile = new File(url.toURI()); if (libFile.exists() && libFile.getName().endsWith(".jar")) { ContainerUtil.addIfNotNull(jars, LocalFileSystem.getInstance().refreshAndFindFileByIoFile(libFile)); } } catch (MalformedURLException | URISyntaxException e) { LOG.error(e); } } } WriteAction.runAndWait(() -> { jarCount = jars.size(); if (jarCount == 0) { messages = new HtmlBuilder() .append(processOutputChunk(myStdOut.toString())) .append(processOutputChunk(myStdErr.toString())) .toFragment(); } if (!jars.isEmpty()) { addGrapeDependencies(jars); } }); } finally { super.notifyProcessTerminated(exitCode); } }
notifyProcessTerminated
32,332
HtmlChunk (@NlsSafe @NotNull String string) { if (string.isEmpty()) { return HtmlChunk.empty(); } @NlsSafe String[] lines = string.split("\n"); return new HtmlBuilder().appendWithSeparators( HtmlChunk.br(), ContainerUtil.map(lines, line -> HtmlChunk.text(line)) ).wrapWith("p"); }
processOutputChunk
32,333
void (Project project, String exceptionText) { final UnscrambleDialog dialog = new UnscrambleDialog(project); dialog.setText(exceptionText); dialog.show(); }
analyzeStackTrace
32,334
String () { return GroovyBundle.message("investigate.gdsl.error.intention.name"); }
getText
32,335
String () { return GroovyBundle.message("investigate.gdsl.error.family.name"); }
getFamilyName
32,336
boolean (@NotNull Project project, Editor editor, PsiFile file) { return true; }
isAvailable
32,337
boolean () { return false; }
startInWriteAction
32,338
void (Throwable e, final Project project, @NotNull VirtualFile vfile) { if (!GroovyDslFileIndex.isActivated(vfile)) { return; } final String exceptionText = ExceptionUtil.getThrowableText(e); LOG.info(exceptionText); GroovyDslFileIndex.disableFile(vfile, DslActivationStatus.Status.ERROR, exceptionText); if (!ApplicationManager.getApplication().isInternal() && !ProjectRootManager.getInstance(project).getFileIndex().isInContent(vfile)) { return; } String errorMessage = e.getMessage(); String content = new HtmlBuilder().append( HtmlChunk.p().addText(errorMessage == null ? e.toString() : errorMessage) ).append( HtmlChunk.p().child( HtmlChunk.link("", GroovyBundle.message("gdsl.investigate.link.label")) ) ).toString(); NOTIFICATION_GROUP.createNotification(GroovyBundle.message("gdsl.error.notification.title"), content, NotificationType.ERROR) .setListener(new NotificationListener() { @Override public void hyperlinkUpdate(@NotNull Notification notification, @NotNull HyperlinkEvent event) { InvestigateFix.analyzeStackTrace(project, exceptionText); notification.expire(); } }) .notify(project); }
invokeDslErrorPopup
32,339
void (@NotNull Notification notification, @NotNull HyperlinkEvent event) { InvestigateFix.analyzeStackTrace(project, exceptionText); notification.expire(); }
hyperlinkUpdate
32,340
GroovyCodeStyleSettings () { return CodeStyleSettingsManager.getInstance(myProject).getCurrentSettings().getCustomSettings(GroovyCodeStyleSettings.class); }
getSettings
32,341
boolean () { return getSettings().USE_FQ_CLASS_NAMES; }
useFqClassNames
32,342
boolean () { return getSettings().USE_FQ_CLASS_NAMES_IN_JAVADOC; }
useFqClassNamesInJavadoc
32,343
int () { return getSettings().STATIC_FIELDS_ORDER_WEIGHT; }
staticFieldsOrderWeight
32,344
int () { return getSettings().FIELDS_ORDER_WEIGHT; }
fieldsOrderWeight
32,345
int () { return getSettings().STATIC_METHODS_ORDER_WEIGHT; }
staticMethodsOrderWeight
32,346
int () { return getSettings().METHODS_ORDER_WEIGHT; }
methodsOrderWeight
32,347
int () { return getSettings().STATIC_INNER_CLASSES_ORDER_WEIGHT; }
staticInnerClassesOrderWeight
32,348
int () { return getSettings().INNER_CLASSES_ORDER_WEIGHT; }
innerClassesOrderWeight
32,349
int () { return getSettings().CONSTRUCTORS_ORDER_WEIGHT; }
constructorsOrderWeight
32,350
boolean () { return getSettings().INSERT_INNER_CLASS_IMPORTS; }
insertInnerClassImports
32,351
Configurable (@NotNull CodeStyleSettings settings, @NotNull CodeStyleSettings originalSettings) { return new CodeStyleAbstractConfigurable(settings, originalSettings, GroovyBundle.message("language.groovy")) { @Override protected @NotNull CodeStyleAbstractPanel createPanel(@NotNull CodeStyleSettings settings) { return new GroovyCodeStyleMainPanel(getCurrentSettings(), settings) {}; } @Override public String getHelpTopic() { return "reference.settingsdialog.codestyle.groovy"; } }; }
createSettingsPage
32,352
CodeStyleAbstractPanel (@NotNull CodeStyleSettings settings) { return new GroovyCodeStyleMainPanel(getCurrentSettings(), settings) {}; }
createPanel
32,353
String () { return "reference.settingsdialog.codestyle.groovy"; }
getHelpTopic
32,354
String () { return GroovyBundle.message("language.groovy"); }
getConfigurableDisplayName
32,355
CustomCodeStyleSettings (@NotNull CodeStyleSettings settings) { return new GroovyCodeStyleSettings(settings); }
createCustomSettings
32,356
Configurable (final @NotNull CodeStyleSettings settings, final @NotNull CodeStyleSettings originalSettings) { return new GroovyCodeStyleGenerationConfigurable(settings); }
createSettingsPage
32,357
String () { return ApplicationBundle.message("title.code.generation"); }
getConfigurableDisplayName
32,358
DisplayPriority () { return DisplayPriority.CODE_SETTINGS; }
getPriority
32,359
boolean () { return false; }
hasSettingsPage
32,360
Language () { return GroovyLanguage.INSTANCE; }
getLanguage
32,361
void (CodeStyleSettings settings) { super.initTabs(settings); addTab(new GrCodeStyleGroovydocPanel(settings)); addTab(new GrCodeStyleImportsPanelWrapper(settings)); for (CodeStyleSettingsProvider provider : CodeStyleSettingsProvider.EXTENSION_POINT_NAME.getExtensionList()) { if (provider.getLanguage() == GroovyLanguage.INSTANCE && !provider.hasSettingsPage()) { createTab(provider); } } }
initTabs
32,362
PsiElement (@NotNull PsiElement psiFile) { final ASTNode node = psiFile.getNode().findChildByType(GroovyTokenTypes.mSH_COMMENT); return node == null ? null : node.getPsi(); }
getShellComment
32,363
PsiElement (@NotNull GroovyFile psiFile, @NotNull GrImportStatement statement) { final GroovyCodeStyleSettings settings = GroovyCodeStyleSettings.getInstance(psiFile); final PackageEntryTable layoutTable = settings.IMPORT_LAYOUT_TABLE; final PackageEntry[] entries = layoutTable.getEntries(); GrImportStatement[] importStatements = psiFile.getImportStatements(); if (importStatements.length == 0) { final GrPackageDefinition definition = psiFile.getPackageDefinition(); if (definition != null) { return definition; } return getShellComment(psiFile); } final Comparator<GrImportStatement> comparator = GroovyImportOptimizer.getComparator(settings); final int idx = getPackageEntryIdx(entries, statement); PsiElement anchor = null; for (GrImportStatement importStatement : importStatements) { final int i = getPackageEntryIdx(entries, importStatement); if (i < idx) { anchor = importStatement; } else if (i > idx) { break; } else if (comparator.compare(statement, importStatement) > 0) { anchor = importStatement; } else { break; } } if (anchor == null) anchor = psiFile.getPackageDefinition(); if (anchor == null) anchor = getShellComment(psiFile); if (anchor == null) anchor = importStatements[0].getPrevSibling(); return anchor; }
getAnchorToInsertImportAfter
32,364
int (PackageEntry @NotNull [] entries, @NotNull GrImportStatement statement) { final GrCodeReferenceElement reference = statement.getImportReference(); if (reference == null) return -1; final String packageName = StringUtil.getPackageName(reference.getCanonicalText()); final boolean isStatic = statement.isStatic(); int best = -1; int allOtherStatic = -1; int allOther = -1; PackageEntry bestEntry = null; for (int i = 0, length = entries.length; i < length; i++) { PackageEntry entry = entries[i]; if (entry.isBetterMatchForPackageThan(bestEntry, packageName, isStatic)) { best = i; bestEntry = entry; } else if (entry == PackageEntry.ALL_OTHER_STATIC_IMPORTS_ENTRY) { allOtherStatic = i; } else if (entry == PackageEntry.ALL_OTHER_IMPORTS_ENTRY) { allOther = i; } } if (best >= 0) return best; if (isStatic && allOtherStatic != -1) return allOtherStatic; return allOther; }
getPackageEntryIdx
32,365
void (@NotNull PsiElement psiFile, @NotNull GrImportStatement result) { final CodeStyleSettings rootSettings = CodeStyle.getSettings(psiFile.getContainingFile()); final GroovyCodeStyleSettings settings = rootSettings.getCustomSettings(GroovyCodeStyleSettings.class); final PackageEntryTable layoutTable = settings.IMPORT_LAYOUT_TABLE; final PackageEntry[] entries = layoutTable.getEntries(); PsiElement prev = result.getPrevSibling(); while (PsiImplUtil.isWhiteSpaceOrNls(prev)) { prev = prev.getPrevSibling(); } if (PsiImplUtil.hasElementType(prev, GroovyTokenTypes.mSEMI)) prev = prev.getPrevSibling(); if (PsiImplUtil.isWhiteSpaceOrNls(prev)) prev = prev.getPrevSibling(); ASTNode node = psiFile.getNode(); if (prev instanceof GrImportStatement) { final int idx_before = getPackageEntryIdx(entries, (GrImportStatement)prev); final int idx = getPackageEntryIdx(entries, result); final int spaceCount = getMaxSpaceCount(entries, idx_before, idx); //skip space and semicolon after import if (PsiImplUtil.isWhiteSpaceOrNls(prev.getNextSibling()) && PsiImplUtil .hasElementType(prev.getNextSibling().getNextSibling(), GroovyTokenTypes.mSEMI)) prev = prev.getNextSibling().getNextSibling(); while (PsiImplUtil.isWhiteSpaceOrNls(prev.getNextSibling())) { node.removeChild(prev.getNextSibling().getNode()); } node.addLeaf(GroovyTokenTypes.mNLS, StringUtil.repeat("\n", spaceCount + 1), result.getNode()); } else if (prev instanceof GrPackageDefinition) { node.addLeaf(GroovyTokenTypes.mNLS, StringUtil.repeat("\n", rootSettings.getCommonSettings(GroovyLanguage.INSTANCE).BLANK_LINES_AFTER_PACKAGE), result.getNode()); } }
addLineFeedBefore
32,366
void (@NotNull PsiElement psiFile, GrImportStatement result) { final GroovyCodeStyleSettings settings = GroovyCodeStyleSettings.getInstance(psiFile.getContainingFile()); final PackageEntryTable layoutTable = settings.IMPORT_LAYOUT_TABLE; final PackageEntry[] entries = layoutTable.getEntries(); PsiElement next = result.getNextSibling(); if (PsiImplUtil.isWhiteSpaceOrNls(next)) next = next.getNextSibling(); if (PsiImplUtil.hasElementType(next, GroovyTokenTypes.mSEMI)) next = next.getNextSibling(); while (PsiImplUtil.isWhiteSpaceOrNls(next)) { next = next.getNextSibling(); } if (next instanceof GrImportStatement) { final int idx_after = getPackageEntryIdx(entries, (GrImportStatement)next); final int idx = getPackageEntryIdx(entries, result); final int spaceCount = getMaxSpaceCount(entries, idx, idx_after); ASTNode node = psiFile.getNode(); while (PsiImplUtil.isWhiteSpaceOrNls(next.getPrevSibling())) { node.removeChild(next.getPrevSibling().getNode()); } node.addLeaf(GroovyTokenTypes.mNLS, StringUtil.repeat("\n", spaceCount + 1), next.getNode()); } }
addLineFeedAfter
32,367
int (PackageEntry[] entries, int b1, int b2) { int start = Math.min(b1, b2); int end = Math.max(b1, b2); if (start == -1) return 0; int max = 0; int cur = 0; for (int i = start; i < end; i++) { if (entries[i] == PackageEntry.BLANK_LINE_ENTRY) { cur++; } else { max = Math.max(max, cur); cur = 0; } } max = Math.max(max, cur); return max; }
getMaxSpaceCount
32,368
CodeStyleConfigurable (@NotNull CodeStyleSettings baseSettings, @NotNull CodeStyleSettings modelSettings) { return new CodeStyleAbstractConfigurable(baseSettings, modelSettings, GroovyBundle.message("language.groovy")) { @Override protected @NotNull CodeStyleAbstractPanel createPanel(@NotNull CodeStyleSettings settings) { return new GroovyCodeStyleMainPanel(getCurrentSettings(), settings) {}; } @Override public String getHelpTopic() { return "reference.settingsdialog.codestyle.groovy"; } }; }
createConfigurable
32,369
CodeStyleAbstractPanel (@NotNull CodeStyleSettings settings) { return new GroovyCodeStyleMainPanel(getCurrentSettings(), settings) {}; }
createPanel
32,370
String () { return "reference.settingsdialog.codestyle.groovy"; }
getHelpTopic
32,371
CustomCodeStyleSettings (@NotNull CodeStyleSettings settings) { return new GroovyCodeStyleSettings(settings); }
createCustomSettings
32,372
Language () { return GroovyLanguage.INSTANCE; }
getLanguage
32,373
void (@NotNull CodeStyleSettingsCustomizable consumer, @NotNull SettingsType settingsType) { if (settingsType == WRAPPING_AND_BRACES_SETTINGS) { consumer.showStandardOptions( "RIGHT_MARGIN", "WRAP_ON_TYPING", "KEEP_LINE_BREAKS", "KEEP_FIRST_COLUMN_COMMENT", "KEEP_CONTROL_STATEMENT_IN_ONE_LINE", "KEEP_MULTIPLE_EXPRESSIONS_IN_ONE_LINE", "KEEP_SIMPLE_BLOCKS_IN_ONE_LINE", "KEEP_SIMPLE_METHODS_IN_ONE_LINE", "KEEP_SIMPLE_CLASSES_IN_ONE_LINE", "KEEP_SIMPLE_LAMBDAS_IN_ONE_LINE", "WRAP_LONG_LINES", "CLASS_BRACE_STYLE", "METHOD_BRACE_STYLE", "LAMBDA_BRACE_STYLE", "BRACE_STYLE", "EXTENDS_LIST_WRAP", "ALIGN_MULTILINE_EXTENDS_LIST", "EXTENDS_KEYWORD_WRAP", "THROWS_LIST_WRAP", "ALIGN_MULTILINE_THROWS_LIST", "ALIGN_THROWS_KEYWORD", "THROWS_KEYWORD_WRAP", "METHOD_PARAMETERS_WRAP", "ALIGN_MULTILINE_PARAMETERS", "METHOD_PARAMETERS_LPAREN_ON_NEXT_LINE", "METHOD_PARAMETERS_RPAREN_ON_NEXT_LINE", "CALL_PARAMETERS_WRAP", "ALIGN_MULTILINE_PARAMETERS_IN_CALLS", "PREFER_PARAMETERS_WRAP", "CALL_PARAMETERS_LPAREN_ON_NEXT_LINE", "CALL_PARAMETERS_RPAREN_ON_NEXT_LINE", "ALIGN_MULTILINE_METHOD_BRACKETS", "METHOD_CALL_CHAIN_WRAP", "ALIGN_MULTILINE_CHAINED_METHODS", "ALIGN_GROUP_FIELD_DECLARATIONS", "IF_BRACE_FORCE", "ELSE_ON_NEW_LINE", "SPECIAL_ELSE_IF_TREATMENT", "FOR_STATEMENT_WRAP", "ALIGN_MULTILINE_FOR", "FOR_STATEMENT_LPAREN_ON_NEXT_LINE", "FOR_STATEMENT_RPAREN_ON_NEXT_LINE", "FOR_BRACE_FORCE", "WHILE_BRACE_FORCE", "DOWHILE_BRACE_FORCE", "WHILE_ON_NEW_LINE", "INDENT_CASE_FROM_SWITCH", "RESOURCE_LIST_WRAP", "ALIGN_MULTILINE_RESOURCES", "RESOURCE_LIST_LPAREN_ON_NEXT_LINE", "RESOURCE_LIST_RPAREN_ON_NEXT_LINE", "CATCH_ON_NEW_LINE", "FINALLY_ON_NEW_LINE", "BINARY_OPERATION_WRAP", "ALIGN_MULTILINE_BINARY_OPERATION", //"BINARY_OPERATION_SIGN_ON_NEXT_LINE", //"ALIGN_MULTILINE_PARENTHESIZED_EXPRESSION", "PARENTHESES_EXPRESSION_LPAREN_WRAP", "PARENTHESES_EXPRESSION_RPAREN_WRAP", "ASSIGNMENT_WRAP", "ALIGN_MULTILINE_ASSIGNMENT", //"PLACE_ASSIGNMENT_SIGN_ON_NEXT_LINE", "TERNARY_OPERATION_WRAP", "ALIGN_MULTILINE_TERNARY_OPERATION", //"TERNARY_OPERATION_SIGNS_ON_NEXT_LINE", "ARRAY_INITIALIZER_WRAP", "ALIGN_MULTILINE_ARRAY_INITIALIZER_EXPRESSION", "ARRAY_INITIALIZER_LBRACE_ON_NEXT_LINE", "ARRAY_INITIALIZER_RBRACE_ON_NEXT_LINE", "MODIFIER_LIST_WRAP", "ASSERT_STATEMENT_WRAP", //"ASSERT_STATEMENT_COLON_ON_NEXT_LINE", "CLASS_ANNOTATION_WRAP", "METHOD_ANNOTATION_WRAP", "FIELD_ANNOTATION_WRAP", "PARAMETER_ANNOTATION_WRAP", "VARIABLE_ANNOTATION_WRAP", "ENUM_CONSTANTS_WRAP" ); consumer.showCustomOption(GroovyCodeStyleSettings.class, "USE_FLYING_GEESE_BRACES", GroovyBundle.message("code.style.option.use.flying.geese.braces"), getInstance().WRAPPING_BRACES); consumer.showCustomOption(GroovyCodeStyleSettings.class, "WRAP_CHAIN_CALLS_AFTER_DOT", GroovyBundle.message("code.style.option.wrap.after.dot"), getInstance().WRAPPING_CALL_CHAIN); consumer .showCustomOption(GroovyCodeStyleSettings.class, "ALIGN_MULTILINE_LIST_OR_MAP", GroovyBundle.message("code.style.option.align.when.multiple"), GroovyBundle.message("code.style.group.list.map.literals")); consumer.showCustomOption(GroovyCodeStyleSettings.class, "ALIGN_NAMED_ARGS_IN_MAP", GroovyBundle.message("code.style.option.align.multiline.named.arguments"), GroovyBundle.message("code.style.group.list.map.literals")); consumer.showCustomOption(GroovyCodeStyleSettings.class, "IMPORT_ANNOTATION_WRAP", GroovyBundle.message("code.style.option.import.annotations"), null, CodeStyleSettingsCustomizable.OptionAnchor.AFTER, "VARIABLE_ANNOTATION_WRAP", getInstance().WRAP_OPTIONS, CodeStyleSettingsCustomizable.WRAP_VALUES); consumer.renameStandardOption("KEEP_SIMPLE_LAMBDAS_IN_ONE_LINE", GroovyBundle.message("code.style.option.simple.lambdas.closures.in.one.line")); consumer.showCustomOption(GroovyCodeStyleSettings.class, "GINQ_GENERAL_CLAUSE_WRAP_POLICY", GroovyBundle.message("ginq.code.style.group.ginq.clauses"), null, getInstance().WRAP_OPTIONS_FOR_SINGLETON, CodeStyleSettingsCustomizable.WRAP_VALUES_FOR_SINGLETON); consumer.showCustomOption(GroovyCodeStyleSettings.class, "GINQ_ON_WRAP_POLICY", GroovyBundle.message("ginq.code.style.option.wrap.on.clauses"), GroovyBundle.message("ginq.code.style.group.ginq.clauses"), getInstance().WRAP_OPTIONS_FOR_SINGLETON, CodeStyleSettingsCustomizable.WRAP_VALUES_FOR_SINGLETON); consumer.showCustomOption(GroovyCodeStyleSettings.class, "GINQ_INDENT_ON_CLAUSE", GroovyBundle.message("ginq.code.style.option.indent.on.clauses"), GroovyBundle.message("ginq.code.style.group.ginq.clauses")); consumer.showCustomOption(GroovyCodeStyleSettings.class, "GINQ_HAVING_WRAP_POLICY", GroovyBundle.message("ginq.code.style.option.wrap.having.clauses"), GroovyBundle.message("ginq.code.style.group.ginq.clauses"), getInstance().WRAP_OPTIONS_FOR_SINGLETON, CodeStyleSettingsCustomizable.WRAP_VALUES_FOR_SINGLETON); consumer.showCustomOption(GroovyCodeStyleSettings.class, "GINQ_INDENT_HAVING_CLAUSE", GroovyBundle.message("ginq.code.style.option.indent.having.clauses"), GroovyBundle.message("ginq.code.style.group.ginq.clauses")); consumer.showCustomOption(GroovyCodeStyleSettings.class, "GINQ_SPACE_AFTER_KEYWORD", GroovyBundle.message("ginq.code.style.option.space.after.keyword"), GroovyBundle.message("ginq.code.style.group.ginq.clauses")); return; } if (settingsType == SPACING_SETTINGS) { consumer.showStandardOptions("INSERT_FIRST_SPACE_IN_LINE", "SPACE_AROUND_ASSIGNMENT_OPERATORS", "SPACE_AROUND_LOGICAL_OPERATORS", "SPACE_AROUND_EQUALITY_OPERATORS", "SPACE_AROUND_RELATIONAL_OPERATORS", "SPACE_AROUND_BITWISE_OPERATORS", "SPACE_AROUND_ADDITIVE_OPERATORS", "SPACE_AROUND_MULTIPLICATIVE_OPERATORS", "SPACE_AROUND_SHIFT_OPERATORS", "SPACE_AROUND_LAMBDA_ARROW", //"SPACE_AROUND_UNARY_OPERATOR", "SPACE_AFTER_COMMA", "SPACE_AFTER_COMMA_IN_TYPE_ARGUMENTS", "SPACE_BEFORE_COMMA", "SPACE_AFTER_SEMICOLON", "SPACE_BEFORE_SEMICOLON", "SPACE_WITHIN_PARENTHESES", "SPACE_WITHIN_EMPTY_METHOD_CALL_PARENTHESES", "SPACE_WITHIN_METHOD_CALL_PARENTHESES", "SPACE_WITHIN_METHOD_PARENTHESES", "SPACE_WITHIN_IF_PARENTHESES", "SPACE_WITHIN_WHILE_PARENTHESES", "SPACE_WITHIN_FOR_PARENTHESES", "SPACE_WITHIN_TRY_PARENTHESES", "SPACE_WITHIN_CATCH_PARENTHESES", "SPACE_WITHIN_SWITCH_PARENTHESES", "SPACE_WITHIN_SYNCHRONIZED_PARENTHESES", "SPACE_WITHIN_CAST_PARENTHESES", "SPACE_WITHIN_BRACKETS", "SPACE_WITHIN_BRACES", "SPACE_WITHIN_ARRAY_INITIALIZER_BRACES", "SPACE_WITHIN_EMPTY_ARRAY_INITIALIZER_BRACES", "SPACE_AFTER_TYPE_CAST", "SPACE_BEFORE_METHOD_CALL_PARENTHESES", "SPACE_BEFORE_METHOD_PARENTHESES", "SPACE_BEFORE_IF_PARENTHESES", "SPACE_BEFORE_WHILE_PARENTHESES", "SPACE_BEFORE_FOR_PARENTHESES", "SPACE_BEFORE_TRY_PARENTHESES", "SPACE_BEFORE_CATCH_PARENTHESES", "SPACE_BEFORE_SWITCH_PARENTHESES", "SPACE_BEFORE_SYNCHRONIZED_PARENTHESES", "SPACE_BEFORE_CLASS_LBRACE", "SPACE_BEFORE_METHOD_LBRACE", "SPACE_BEFORE_IF_LBRACE", "SPACE_BEFORE_ELSE_LBRACE", "SPACE_BEFORE_WHILE_LBRACE", "SPACE_BEFORE_FOR_LBRACE", "SPACE_BEFORE_DO_LBRACE", "SPACE_BEFORE_SWITCH_LBRACE", "SPACE_BEFORE_TRY_LBRACE", "SPACE_BEFORE_CATCH_LBRACE", "SPACE_BEFORE_FINALLY_LBRACE", "SPACE_BEFORE_SYNCHRONIZED_LBRACE", "SPACE_BEFORE_ARRAY_INITIALIZER_LBRACE", // "SPACE_BEFORE_ANNOTATION_ARRAY_INITIALIZER_LBRACE", "SPACE_BEFORE_ELSE_KEYWORD", "SPACE_BEFORE_WHILE_KEYWORD", "SPACE_BEFORE_CATCH_KEYWORD", "SPACE_BEFORE_FINALLY_KEYWORD", "SPACE_BEFORE_QUEST", "SPACE_AFTER_QUEST", "SPACE_BEFORE_COLON", "SPACE_AFTER_COLON", "SPACE_BEFORE_ANOTATION_PARAMETER_LIST", "SPACE_WITHIN_ANNOTATION_PARENTHESES" ); consumer.renameStandardOption("SPACE_AROUND_RELATIONAL_OPERATORS", GroovyBundle.message("code.style.option.relational.operators")); consumer.renameStandardOption("SPACE_AROUND_UNARY_OPERATOR", GroovyBundle.message("code.style.option.unary.operators")); consumer.showCustomOption(GroovyCodeStyleSettings.class, "SPACE_IN_NAMED_ARGUMENT_BEFORE_COLON", GroovyBundle.message("code.style.option.in.named.argument.before.colon"), getInstance().SPACES_OTHER); consumer.showCustomOption(GroovyCodeStyleSettings.class, "SPACE_IN_NAMED_ARGUMENT", GroovyBundle.message("code.style.option.in.named.argument.after.colon"), getInstance().SPACES_OTHER); consumer.showCustomOption(GroovyCodeStyleSettings.class, "SPACE_WITHIN_LIST_OR_MAP", GroovyBundle.message("code.style.option.list.maps.literals"), getInstance().SPACES_WITHIN); consumer.showCustomOption(GroovyCodeStyleSettings.class, "SPACE_BEFORE_CLOSURE_LBRACE", GroovyBundle.message("code.style.option.closure.left.brace.in.method.calls"), getInstance().SPACES_BEFORE_LEFT_BRACE); consumer.showCustomOption(GroovyCodeStyleSettings.class, "SPACE_WITHIN_GSTRING_INJECTION_BRACES", GroovyBundle.message("code.style.option.gstring.injection.braces"), getInstance().SPACES_WITHIN); consumer.showCustomOption(GroovyCodeStyleSettings.class, "SPACE_WITHIN_TUPLE_EXPRESSION", GroovyBundle.message("code.style.option.tuple.assignment.expression"), getInstance().SPACES_WITHIN); consumer.showCustomOption(GroovyCodeStyleSettings.class, "SPACE_AROUND_REGEX_OPERATORS", GroovyBundle.message("code.style.option.regexp.expression"), getInstance().SPACES_AROUND_OPERATORS); consumer.showCustomOption(GroovyCodeStyleSettings.class, "SPACE_BEFORE_ASSERT_SEPARATOR", GroovyBundle.message("code.style.option.before.assert.separator"), getInstance().SPACES_OTHER); consumer.showCustomOption(GroovyCodeStyleSettings.class, "SPACE_AFTER_ASSERT_SEPARATOR", GroovyBundle.message("code.style.option.after.assert.separator"), getInstance().SPACES_OTHER); consumer.showCustomOption(GroovyCodeStyleSettings.class, "SPACE_BEFORE_RECORD_PARENTHESES", GroovyBundle.message("code.style.option.before.record.parameter.list"), getInstance().SPACES_BEFORE_PARENTHESES); return; } if (settingsType == BLANK_LINES_SETTINGS) { consumer.showStandardOptions( "KEEP_BLANK_LINES_IN_DECLARATIONS", "KEEP_BLANK_LINES_IN_CODE", "KEEP_BLANK_LINES_BEFORE_RBRACE", "BLANK_LINES_BEFORE_PACKAGE", "BLANK_LINES_AFTER_PACKAGE", "BLANK_LINES_BEFORE_IMPORTS", "BLANK_LINES_AFTER_IMPORTS", "BLANK_LINES_AROUND_CLASS", "BLANK_LINES_AFTER_CLASS_HEADER", //"BLANK_LINES_AFTER_ANONYMOUS_CLASS_HEADER", "BLANK_LINES_AROUND_FIELD_IN_INTERFACE", "BLANK_LINES_AROUND_FIELD", "BLANK_LINES_AROUND_METHOD_IN_INTERFACE", "BLANK_LINES_AROUND_METHOD", "BLANK_LINES_BEFORE_METHOD_BODY" ); return; } consumer.showAllStandardOptions(); }
customizeSettings
32,374
void (@NotNull CommonCodeStyleSettings commonSettings, @NotNull CommonCodeStyleSettings.IndentOptions indentOptions) { commonSettings.SPACE_WITHIN_BRACES = true; commonSettings.KEEP_SIMPLE_CLASSES_IN_ONE_LINE = true; commonSettings.KEEP_SIMPLE_METHODS_IN_ONE_LINE = true; commonSettings.KEEP_SIMPLE_LAMBDAS_IN_ONE_LINE = true; }
customizeDefaults
32,375
String (@NotNull SettingsType settingsType) { if (settingsType == BLANK_LINES_SETTINGS || settingsType == SPACING_SETTINGS || settingsType == WRAPPING_AND_BRACES_SETTINGS || settingsType == INDENT_SETTINGS) { return loadSample(settingsType); } return null; }
getCodeSample
32,376
String (@NotNull SettingsType settingsType) { String name = "/samples/" + settingsType.name() + ".txt"; try { try (Reader reader = new InputStreamReader(GroovyLanguageCodeStyleSettingsProvider.class.getResourceAsStream(name), UTF_8)) { return readText(reader); } } catch (IOException ignored) { } return ""; }
loadSample
32,377
IndentOptionsEditor () { return new SmartIndentOptionsEditor() { private JLabel myLabelIndentLabel; private IntegerField myLabelIndent; private JBLabel myStyleLabel; private JComboBox<LabelIndentStyle> myLabelIndentStyle; @Override protected void addComponents() { super.addComponents(); myLabelIndentLabel = new JLabel(ApplicationBundle.message("editbox.indent.label.indent")); myLabelIndent = new IntegerField(GroovyBundle.message("settings.code.style.label.indent.size"), 0, Integer.MAX_VALUE); add(myLabelIndentLabel, myLabelIndent); myStyleLabel = new JBLabel(GroovyBundle.message("settings.code.style.label.indent.style")); myLabelIndentStyle = new ComboBox<>(new EnumComboBoxModel<>(LabelIndentStyle.class)); add(myStyleLabel, myLabelIndentStyle); } @Override public boolean isModified(final CodeStyleSettings settings, final CommonCodeStyleSettings.IndentOptions options) { return super.isModified(settings, options) || myLabelIndent.getValue() != options.LABEL_INDENT_SIZE || isLabelStyleModified( options.LABEL_INDENT_ABSOLUTE, settings.getCustomSettings(GroovyCodeStyleSettings.class).INDENT_LABEL_BLOCKS ); } private boolean isLabelStyleModified(boolean absolute, boolean relative) { Object selectedStyle = myLabelIndentStyle.getSelectedItem(); if (absolute) { return selectedStyle != LabelIndentStyle.ABSOLUTE; } else if (relative) { return selectedStyle != LabelIndentStyle.RELATIVE; } else { return selectedStyle != LabelIndentStyle.RELATIVE_REVERSED; } } @Override public void apply(final CodeStyleSettings settings, final CommonCodeStyleSettings.IndentOptions options) { super.apply(settings, options); options.LABEL_INDENT_SIZE = myLabelIndent.getValue(); LabelIndentStyle labelIndentStyle = (LabelIndentStyle)myLabelIndentStyle.getSelectedItem(); options.LABEL_INDENT_ABSOLUTE = labelIndentStyle == LabelIndentStyle.ABSOLUTE; settings.getCustomSettings(GroovyCodeStyleSettings.class).INDENT_LABEL_BLOCKS = labelIndentStyle == LabelIndentStyle.RELATIVE; } @Override public void reset(@NotNull final CodeStyleSettings settings, @NotNull final CommonCodeStyleSettings.IndentOptions options) { super.reset(settings, options); myLabelIndent.setValue(options.LABEL_INDENT_SIZE); if (options.LABEL_INDENT_ABSOLUTE) { myLabelIndentStyle.setSelectedItem(LabelIndentStyle.ABSOLUTE); } else if (settings.getCustomSettings(GroovyCodeStyleSettings.class).INDENT_LABEL_BLOCKS) { myLabelIndentStyle.setSelectedItem(LabelIndentStyle.RELATIVE); } else { myLabelIndentStyle.setSelectedItem(LabelIndentStyle.RELATIVE_REVERSED); } } @Override public void setEnabled(final boolean enabled) { super.setEnabled(enabled); myLabelIndent.setEnabled(enabled); myLabelIndentLabel.setEnabled(enabled); myStyleLabel.setEnabled(enabled); myLabelIndentStyle.setEnabled(enabled); } }; }
getIndentOptionsEditor
32,378
void () { super.addComponents(); myLabelIndentLabel = new JLabel(ApplicationBundle.message("editbox.indent.label.indent")); myLabelIndent = new IntegerField(GroovyBundle.message("settings.code.style.label.indent.size"), 0, Integer.MAX_VALUE); add(myLabelIndentLabel, myLabelIndent); myStyleLabel = new JBLabel(GroovyBundle.message("settings.code.style.label.indent.style")); myLabelIndentStyle = new ComboBox<>(new EnumComboBoxModel<>(LabelIndentStyle.class)); add(myStyleLabel, myLabelIndentStyle); }
addComponents
32,379
boolean (final CodeStyleSettings settings, final CommonCodeStyleSettings.IndentOptions options) { return super.isModified(settings, options) || myLabelIndent.getValue() != options.LABEL_INDENT_SIZE || isLabelStyleModified( options.LABEL_INDENT_ABSOLUTE, settings.getCustomSettings(GroovyCodeStyleSettings.class).INDENT_LABEL_BLOCKS ); }
isModified
32,380
boolean (boolean absolute, boolean relative) { Object selectedStyle = myLabelIndentStyle.getSelectedItem(); if (absolute) { return selectedStyle != LabelIndentStyle.ABSOLUTE; } else if (relative) { return selectedStyle != LabelIndentStyle.RELATIVE; } else { return selectedStyle != LabelIndentStyle.RELATIVE_REVERSED; } }
isLabelStyleModified
32,381
void (final CodeStyleSettings settings, final CommonCodeStyleSettings.IndentOptions options) { super.apply(settings, options); options.LABEL_INDENT_SIZE = myLabelIndent.getValue(); LabelIndentStyle labelIndentStyle = (LabelIndentStyle)myLabelIndentStyle.getSelectedItem(); options.LABEL_INDENT_ABSOLUTE = labelIndentStyle == LabelIndentStyle.ABSOLUTE; settings.getCustomSettings(GroovyCodeStyleSettings.class).INDENT_LABEL_BLOCKS = labelIndentStyle == LabelIndentStyle.RELATIVE; }
apply
32,382
void (@NotNull final CodeStyleSettings settings, @NotNull final CommonCodeStyleSettings.IndentOptions options) { super.reset(settings, options); myLabelIndent.setValue(options.LABEL_INDENT_SIZE); if (options.LABEL_INDENT_ABSOLUTE) { myLabelIndentStyle.setSelectedItem(LabelIndentStyle.ABSOLUTE); } else if (settings.getCustomSettings(GroovyCodeStyleSettings.class).INDENT_LABEL_BLOCKS) { myLabelIndentStyle.setSelectedItem(LabelIndentStyle.RELATIVE); } else { myLabelIndentStyle.setSelectedItem(LabelIndentStyle.RELATIVE_REVERSED); } }
reset
32,383
void (final boolean enabled) { super.setEnabled(enabled); myLabelIndent.setEnabled(enabled); myLabelIndentLabel.setEnabled(enabled); myStyleLabel.setEnabled(enabled); myLabelIndentStyle.setEnabled(enabled); }
setEnabled
32,384
String () { return description.get(); }
toString
32,385
CodeStyleFieldAccessor (@NotNull Object codeStyleObject, @NotNull Field field) { if (PackageEntryTable.class.isAssignableFrom(field.getType())) { return new JavaPackageEntryTableAccessor(codeStyleObject, field); } if (codeStyleObject instanceof GroovyCodeStyleSettings) { if (field.getName().endsWith("_ORDER_WEIGHT")) { // Ignore all ORDER_WEIGHT_FIELDS for now // TODO: Needs a way to translate several fields to a set of values (single property) return new IntegerAccessor(codeStyleObject, field) { @Override public boolean isIgnorable() { return true; } }; } } return super.getAccessor(codeStyleObject, field); }
getAccessor
32,386
boolean () { return true; }
isIgnorable
32,387
List<CodeStylePropertyAccessor> (@NotNull Object codeStyleObject) { if (codeStyleObject instanceof GroovyCodeStyleSettings) { try { Field onDemandPackagesField = codeStyleObject.getClass().getField("PACKAGES_TO_USE_IMPORT_ON_DEMAND"); return Collections.singletonList(new JavaPackageEntryTableAccessor(codeStyleObject, onDemandPackagesField) { @Override public boolean set(@NotNull List<String> extVal) { PackageEntryTable entryTable = fromExternal(extVal); if (entryTable != null) { ((GroovyCodeStyleSettings)codeStyleObject).getPackagesToUseImportOnDemand().copyFrom(entryTable); return true; } return false; } }); } catch (NoSuchFieldException e) { // Ignore } } return super.getAdditionalAccessors(codeStyleObject); }
getAdditionalAccessors
32,388
boolean (@NotNull List<String> extVal) { PackageEntryTable entryTable = fromExternal(extVal); if (entryTable != null) { ((GroovyCodeStyleSettings)codeStyleObject).getPackagesToUseImportOnDemand().copyFrom(entryTable); return true; } return false; }
set
32,389
boolean () { return true; }
usesCommonKeepLineBreaks
32,390
int () { return 0; }
getRightMargin
32,391
EditorHighlighter (@NotNull EditorColorsScheme scheme) { return null; }
createHighlighter
32,392
FileType () { return JavaFileType.INSTANCE; }
getFileType
32,393
String () { return null; }
getPreviewText
32,394
void (@NotNull CodeStyleSettings settings) { myImportsPanel.apply(settings); }
apply
32,395
boolean (CodeStyleSettings settings) { return myImportsPanel.isModified(settings); }
isModified
32,396
JComponent () { return myImportsPanel; }
getPanel
32,397
void (@NotNull CodeStyleSettings settings) { myImportsPanel.reset(settings); }
resetImpl
32,398
CodeStyleImportsBaseUI (JComponent packages, JComponent importLayout) { myCbUseFQClassNamesInJavaDoc = new JCheckBox(ApplicationBundle.message("checkbox.use.fully.qualified.class.names.in.javadoc")); GroovyCodeStyleImportsUI result = new GroovyCodeStyleImportsUI(packages, importLayout, myCbUseFQClassNamesInJavaDoc); result.init(); return result; }
createKotlinUI
32,399
void (CodeStyleSettings settings) { GroovyCodeStyleSettings groovySettings = getGroovySettings(settings); applyLayoutSettings(groovySettings); groovySettings.USE_FQ_CLASS_NAMES_IN_JAVADOC = myCbUseFQClassNamesInJavaDoc.isSelected(); }
apply