Skip to content

Commit bf84d92

Browse files
committed
add missing @SInCE 6.0.0 versions
1 parent e33b921 commit bf84d92

28 files changed

Lines changed: 218 additions & 0 deletions

File tree

src/main/groovy/groovy/grape/GrapeUtil.groovy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ import java.util.zip.ZipFile
3333

3434
/**
3535
* Utility methods shared between GrapeIvy and GrapeMaven implementations.
36+
*
37+
* @since 6.0.0
3638
*/
3739
@CompileStatic
3840
class GrapeUtil {

src/main/java/groovy/lang/ExpandoMetaClass.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,9 @@ public void registerSubclassInstanceMethod(MetaMethod metaMethod) {
443443
addMixinClass(mixin);
444444
}
445445

446+
/**
447+
* @since 6.0.0
448+
*/
446449
public boolean addMixinClass(MixinInMetaClass mixin) {
447450
return mixinClasses.add(mixin);
448451
}

src/main/java/groovy/lang/MetaClassImpl.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1268,6 +1268,9 @@ private Object getOuterReference(final Class<?> innerClass, final Object object)
12681268
return outer;
12691269
}
12701270

1271+
/**
1272+
* @since 6.0.0
1273+
*/
12711274
protected static Class<?> getNonClosureOuter(Class<?> c) {
12721275
do { c = c.getEnclosingClass();
12731276
} while (c != null && GeneratedClosure.class.isAssignableFrom(c));
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
/**
21+
* <a href="https://asciidoctor.org/">Asciidoctor</a> extensions used when rendering the Groovy documentation.
22+
*
23+
* @since 6.0.0
24+
*/
25+
package org.apache.groovy.asciidoctor;

subprojects/groovy-console/src/main/groovy/groovy/console/ui/Console.groovy

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -756,9 +756,13 @@ class Console implements CaretListener, HyperlinkListener, ComponentListener, Fo
756756
prefs.putBoolean('autoClearOutput', autoClearOutput)
757757
}
758758

759+
/** @since 6.0.0 */
759760
void lightTheme(EventObject evt = null) { switchTheme(ThemeManager.ThemeMode.LIGHT) }
761+
/** @since 6.0.0 */
760762
void darkTheme(EventObject evt = null) { switchTheme(ThemeManager.ThemeMode.DARK) }
763+
/** @since 6.0.0 */
761764
void systemTheme(EventObject evt = null) { switchTheme(ThemeManager.ThemeMode.SYSTEM) }
765+
/** @since 6.0.0 */
762766
void cycleTheme(EventObject evt = null) { switchTheme(ThemeManager.cycleMode()) }
763767

764768
private void switchTheme(ThemeManager.ThemeMode mode) {
@@ -1271,17 +1275,24 @@ class Console implements CaretListener, HyperlinkListener, ComponentListener, Fo
12711275
lf.visible = true
12721276
}
12731277

1278+
/** @since 6.0.0 */
12741279
boolean isScaleIconsWithFont() { prefs.getBoolean('scaleIconsWithFont', false) }
1280+
/** @since 6.0.0 */
12751281
int getCurrentIconSize() { Icons.currentSize }
12761282

1283+
/** @since 6.0.0 */
12771284
void smallIcons(EventObject evt = null) { applyIconSize(Icons.SIZE_SMALL) }
1285+
/** @since 6.0.0 */
12781286
void normalIcons(EventObject evt = null) { applyIconSize(Icons.SIZE_NORMAL) }
1287+
/** @since 6.0.0 */
12791288
void largeIcons(EventObject evt = null) { applyIconSize(Icons.SIZE_LARGE) }
12801289

1290+
/** @since 6.0.0 */
12811291
void scaleIconsWithFont(EventObject evt = null) {
12821292
setScaleIconsWithFont(evt?.source?.isSelected() as boolean)
12831293
}
12841294

1295+
/** @since 6.0.0 */
12851296
void setScaleIconsWithFont(boolean enabled) {
12861297
prefs.putBoolean('scaleIconsWithFont', enabled)
12871298
if (enabled) {
@@ -1291,6 +1302,7 @@ class Console implements CaretListener, HyperlinkListener, ComponentListener, Fo
12911302
}
12921303
}
12931304

1305+
/** @since 6.0.0 */
12941306
void applyIconSize(int size) {
12951307
// only persist the preset when not tracking the font
12961308
if (!prefs.getBoolean('scaleIconsWithFont', false)) {
@@ -1301,10 +1313,12 @@ class Console implements CaretListener, HyperlinkListener, ComponentListener, Fo
13011313
toolbar?.repaint()
13021314
}
13031315

1316+
/** @since 6.0.0 */
13041317
void reapplyTheme() {
13051318
switchTheme(ThemeManager.currentMode)
13061319
}
13071320

1321+
/** @since 6.0.0 */
13081322
void reloadThemes() {
13091323
ThemeManager.reloadThemes()
13101324
reapplyTheme()
@@ -1541,6 +1555,7 @@ void largerFont(EventObject evt = null) {
15411555
binding.variables._outputTransforms = OutputTransforms.loadOutputTransforms()
15421556
}
15431557

1558+
/** @since 6.0.0 */
15441559
void setScriptArgs(EventObject evt = null) {
15451560
def result = JOptionPane.showInputDialog(frame, 'Enter script arguments (space-separated):',
15461561
'Set Script Arguments', JOptionPane.PLAIN_MESSAGE, null, null, scriptArgs)

subprojects/groovy-console/src/main/groovy/groovy/console/ui/ConsoleMavenPlugin.groovy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ import groovy.grape.GrapeEngine
2323

2424
/**
2525
* Adds Groovy Grape feedback for the Maven Resolver based engine.
26+
*
27+
* @since 6.0.0
2628
*/
2729
class ConsoleMavenPlugin {
2830
Console savedConsole

subprojects/groovy-console/src/main/groovy/groovy/console/ui/ConsoleTextEditor.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,9 @@ public void paintComponent(Graphics g) {
151151
private TextUndoManager undoManager;
152152
private int fontSize;
153153

154+
/**
155+
* @since 6.0.0
156+
*/
154157
public TextUndoManager getUndoManager() {
155158
return undoManager;
156159
}
@@ -161,6 +164,8 @@ public TextUndoManager getUndoManager() {
161164
* this doesn't pollute the undo/redo stack. Used after undo/redo
162165
* because UndoableEdits restore attributes captured at edit time,
163166
* which may no longer match the active theme.
167+
*
168+
* @since 6.0.0
164169
*/
165170
public void reapplyHighlighting() {
166171
Document doc = textEditor.getDocument();

subprojects/groovy-console/src/main/groovy/groovy/console/ui/Icons.groovy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ import java.util.function.Function
4242
* Both families return {@link DynamicSVGIcon} proxies so the outer
4343
* reference held by Actions/components stays stable; {@link #refreshAll()}
4444
* forces every icon (toolbar and menu) to re-render — use after a LaF switch.
45+
*
46+
* @since 6.0.0
4547
*/
4648
class Icons {
4749
static final int SIZE_SMALL = 16

subprojects/groovy-console/src/main/groovy/groovy/console/ui/ThemeManager.groovy

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,14 @@ import java.util.prefs.Preferences
3131

3232
/**
3333
* Manages theme state (light/dark/system) for GroovyConsole.
34+
*
35+
* @since 6.0.0
3436
*/
3537
class ThemeManager {
3638

39+
/**
40+
* @since 6.0.0
41+
*/
3742
enum ThemeMode {
3843
LIGHT, DARK, SYSTEM
3944
}

subprojects/groovy-console/src/main/groovy/groovy/console/ui/text/SmartDocumentFilter.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,8 @@ private void initStyles() {
413413
* Forces a full re-parse and re-render of the document with current styles.
414414
* Clears the incremental-render cache first so every token is restyled,
415415
* not just the ones that differ from the last parse.
416+
*
417+
* @since 6.0.0
416418
*/
417419
public void reparseDocument() {
418420
this.latestTokenList = Collections.emptyList();
@@ -428,6 +430,8 @@ public void reparseDocument() {
428430
* Attribute values are sourced from ThemeManager so custom .theme files
429431
* feed both this (ANTLR-token-driven) path and the regex-driven GroovyFilter
430432
* path from one place. Called at init time and on theme switch.
433+
*
434+
* @since 6.0.0
431435
*/
432436
public static void updateStyles() {
433437
StyleContext sc = StyleContext.getDefaultStyleContext();

0 commit comments

Comments
 (0)